block: add latest ROW I/O scheduler from CAF msm-3.4
together with following prerequisites

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.

Change-Id: I8aa74b9b45c0d3a2221bd4e82ea76eb4103e7cfa
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.

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

block: urgent request: remove unnecessary urgent marking
An urgent request is marked by the scheduler in rq->cmd_flags with the
REQ_URGENT flag. There is no need to add an additional marking by
the block layer.

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

block: add REQ_URGENT to request flags
This patch adds a new flag to be used in cmd_flags field of struct request
for marking request as urgent.
Urgent request is the one that should be given priority currently handled
(regular) request by the device driver. The decision of a request urgency
is taken by the scheduler.

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

block: urgent request: Update dispatch_urgent in case of requeue/reinsert
The block layer implements a mechanism for verifying that the device
driver won't be notified of an URGENT request if there is already an
URGENT request in flight. This is due to the fact that interrupting an
URGENT request isn't efficient.
This patch fixes the above described mechanism in case the URGENT request
was returned back to the block layer from some reason: by requeue or
reinsert.

CRs-fixed: 473376, 473036, 471736
Change-Id: Ie8b8208230a302d4526068531616984825f1050d
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
_____________________

block: urgent: Fix dispatching of URGENT mechanism
There are cases when blk_peek_request is called not from blk_fetch_request
thus the URGENT request may be started but the flag q->dispatched_urgent is
not updated.

Change-Id: I4fb588823f1b2949160cbd3907f4729767932e12
CRs-fixed: 471736
CRs-fixed: 473036
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
___________________

mm: pass readahead info down to the i/o scheduler
Some i/o schedulers (i.e. row-iosched, cfq-iosched) deploy an idling
algorithm in order to be better synced with the readahead algorithm.
Idling is a prediction algorithm for incoming read requests.

In this patch we mark pages which are part of a readahead window, by
setting a newly introduced flag. With this flag, the i/o scheduler can
identify a request which is associated with a readahead page. This
enables the i/o scheduler's idling mechanism to be en-sync with the
readahead mechanism and, in turn, can increase read throughput.

Change-Id: I0654f23315b6d19d71bcc9cc029c6b281a44b196
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
block: row: Fix crash when adding a new field in bio struct
When adding new field to struct bio there is a crash in the removed
code lines. This issue was introduced by commit
80a8f0f87bee18283e9ca0a8966ec97ad9f084e5 "block: row-iosched idling
triggered by readahead pages"

(Partly) reverting this patch till root cause is fixed (on FS level).

Change-Id: Ie82bc806ea52a6370b57aa15455c85b2db10d0da
Signed-off-by: Tanya Brokhman <tlinder@codeaurora.org>
block: introduce the BFQ-v7r5 I-O sched for 3.4
block: bfq: cgroups, kconfig, build bits for BFQ-v7r5-3.4 + block: bfq: Add Early-Queue-Merge-EQM to BFQ-v7r5 for 3.4.0
defconfig: enable ROW and BFQ, set BFQ as default
msm: acpuclock-krait: Inline some functions

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
msm: acpuclock-krait: Add undervolting support

Add undervolting support using 3 module parameters:
- lower_uV: undervolting value for lower frequencies
- upper_uV: undervolting value for upper frequencies
- upper_khz_thers: above this frequency upper_uV will be used. Else
lower_uV will be used.

Undervolting value is subtracted from stock voltage. The final voltage
for each frequency is calulated:
Vdd(final) = Vdd(core) + boost_uV - uV

Also debugfs (acpuclk/acpu_table) is used to show the acpu table
frequencies and voltages.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
msm: acpuclock-krait: Replace 'upper' with 'higher'

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
msm: acpuclock-krait: Use conditional directives for debufs parts

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
msm: acpuclock-krait: Remove unused ua_core calculation

ua_core data are not provided.
So, remove unused calculations.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
msm: acpuclock-krait: Add a column with undervolting value in debugfs

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
msm: acpuclock-krait: Fix type in message

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
msm: acpuclock-krait: Fix checkpatch warnings

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: acpuclock-krait: Change the pvs bin retrieval

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: acpuclock-krait: Fix PVS name in table show
msm: yuga: Change CPU regulators min_uV to 700mV
mach-msm: Introduce Dynamic hotplug driver for mako

Introduce a dynamic hotplug driver to automatically online/offline
CPUs proportional to load.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Clean up properly on exit

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Prevent immediate online of a CPU

When a CPU goes offline we should wait at least 1 sec before online it
again.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Check for valid return of cpufreq_get_policy

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>