Enable and fix kexec syscall support.

Use mem_text_write_kernel_word when assigning reboot_code_buffer parameters
to avoid protection faults (writes to read-only kernel memory) when
CONFIG_STRICT_MEMORY_RWX is enabled.

Conflicts:
	arch/arm/configs/m2_spr_defconfig
	arch/arm/kernel/machine_kexec.c
Enable caching and buffering for all of physical RAM in the decompressor.

Old method is to enable caching and buffering only for the 256 MB at the
start of the decompressor image.  This makes a hardboot-kexec'd kernel very
slow to decompress since the decompressor is located far above the kernel
destination.  This patch reduces boot time from 35 to 8 seconds on epicmtd.

Conflicts:
	arch/arm/boot/compressed/head.S
	arch/arm/configs/m2_spr_defconfig
	arch/arm/mach-msm/Kconfig
Support copying of kernel tagged list (atags) in the decompressor.

This is needed to hardboot kexec a kernel with a new tags list (including a
new kernel command line), since the new atags would otherwise be lost with
the limited kernel memory mapping.  Without this patch, a hardboot-kexec'd
kernel uses the atags provided by the bootloader.
Support hard booting to a kexec kernel.

See KEXEC_HARDBOOT config option help for details.

Conflicts:
	arch/arm/configs/m2_spr_defconfig
	arch/arm/kernel/machine_kexec.c
	arch/arm/mach-msm/board-m2_spr.c
Reboot with the recovery kernel when kexec hard booting.
video: msm: Remove logspam

Change-Id: I02df48181ece375c7f24223c0a2cbe3aa8594003
Revert "M2: Makefile: bring back "treat warnings as errors""

This reverts commit 2542644b937d2e9ca0d7e5c4791ccf5b8385c625.
block: Adding ROW scheduling algorithm

This patch adds the implementation of a new scheduling algorithm - ROW.
The policy of this algorithm is to prioritize READ requests over WRITE
as much as possible without starving the WRITE requests.
The requests are kept in queues according to their priority. The dispatch
is done in a Round Robin manner with a different slice for each queue.
READ request queues get bigger dispatch quantum than the write requests.

Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
block: Add support for reinsert a dispatched req

Add support for reinserting a dispatched request back to the
scheduler's internal data structures.
This capability is used by the device driver when it chooses to
interrupt the current request transmission and execute another (more
urgent) pending request. For example: interrupting long write in order
to handle pending read. The device driver re-inserts the
remaining write request back to the scheduler, to be rescheduled
for transmission later on.

Add API for verifying whether the current scheduler
supports reinserting requests mechanism. If reinsert mechanism isn't
supported by the scheduler, this code path will never be activated.

Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
block: Add API for urgent request handling

This patch add support in block & elevator layers for handling
urgent requests. The decision if a request is urgent or not is taken
by the scheduler. Urgent request notification is passed to the underlying
block device driver (eMMC for example). Block device driver may decide to
interrupt the currently running low priority request to serve the new
urgent request. By doing so READ latency is greatly reduced in read&write
collision scenarios.

Note that if the current scheduler doesn't implement the urgent request
mechanism, this code path is never activated.

Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
block: compile ROW statically into the kernel

ROW is a new scheduling algorithm. Similar to the existing scheduling
algorithms it should be compiled to the kernel statically giving the user
the ability to switch to it without kernel recompilation.

Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
row: Adding support for reinsert already dispatched req

Add support for reinserting already dispatched request back to the
schedulers internal data structures.
The request will be reinserted back to the queue (head) it was
dispatched from as if it was never dispatched.

Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
row: Add support for urgent request handling

This patch add support for handling urgent requests.
ROW queue can be marked as "urgent". If an urgent queue was
un-served in a previous dispatch cycle and a request was added
to it - it will trigger issuing urgent request to the device driver.

Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
block: row: Add some debug information on ROW queues

1. Add a counter for number of requests on queue.
2. Add function to print queues status (number requests
   currently on queue and number of already dispatched requests
   in current dispatch cycle).

Change-Id: I1e98b9ca33853e6e6a8ddc53240f6cd6981e6024
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
block: row: Insert dispatch_quantum into struct row_queue

There is really no point in keeping the dispatch quantum
of a queue outside of it. By inserting it to the row_queue
structure we spare extra level in accessing it.

Change-Id: Ic77571818b643e71f9aafbb2ca93d0a92158b199
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
block: row: fix sysfs functions - idle_time conversion

idle_time was updated to be stored in msec instead of jiffies.
So there is no need to convert the value when reading from user or
displaying the value to him.

Change-Id: I58e074b204e90a90536d32199ac668112966e9cf
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
block: row: Aggregate row_queue parameters to one structure

Each ROW queues has several parameters which default values are defined
in separate arrays. This patch aggregates all default values into one
array.
The values in question are:
 - is idling enabled for the queue
 - queue quantum
 - can the queue notify on urgent request

Change-Id: I3821b0a042542295069b340406a16b1000873ec6
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>