block: row: change hrtimer_cancel to hrtimer_try_to_cancel

Calling hrtimer_cancel with interrupts disabled can result in a livelock.
When flushing plug list in the block layer interrupts are disabled and an
hrtimer is used when adding requests from that plug list to the scheduler.
In this code flow, if the hrtimer (which is used for idling) is set, it's
being canceled by calling hrtimer_cancel. hrtimer_cancel will perform
the following in an endless loop:
1. try cancel the timer
2. if fails - rest_cpu
the cancellation can fail if the timer function already started. Since
interrupts are disabled it can never complete.
This patch reduced the number of times the hrtimer lock is taken while
interrupts are disabled by calling hrtimer_try_co_cancel. the later will
try to cancel the timer just once and return with an error code if fails.

CRs-fixed: 499887
Change-Id: I25f79c357426d72ad67c261ce7cb503ae97dc7b9
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
block: Add URGENT request notification support to CFQ scheduler

When the scheduler reports to the block layer that there is an urgent
request pending, the device driver may decide to stop the transmission
of the current request in order to handle the urgent one. This is done
in order to reduce the latency of an urgent request. For example:
long WRITE may be stopped to handle an urgent READ.

Change-Id: I3072b8a1423870fed9c04c28d93caaf9557a7b89
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
scripts: dtc: make dtb out with alignment 4 bytes

dtb size should be aligned with 4 bytes when we use appended dtb
in the zImage-dtb. Bootloader parses the dtb header from the appended dtb.
If not aligned 4 bytes, it would cause data abort due to unaligned data
access.

Change-Id: I8f80341864ceeb2dddbd23712d8193605c6fb8c3
Signed-off-by: Devin Kim <dojip.kim@lge.com>
ARM: convert build of appended dtb zImage to list of dtbs

Allow CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES to specify
a space separated list of dtbs to append to the zImage,
and name the resulting file zImage-dtb

Change-Id: I36d9108a2349bdbb373e95076dcb1417d8c7dce6
Signed-off-by: Colin Cross <ccross@android.com>

Conflicts:
	arch/arm/Kconfig
	arch/arm/Makefile
Signed-off-by: Patrick Tjin <pattjin@google.com>
gcc-wrapper: trim whitelist for gcc 4.7

With recent code and defconfig changes, the number warnings needing to
be ignored has gone done.  Update the wrapper accordingly.

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
script: dtc: clean generated files

Fix "make distclean" to clean up generated dtc files.

Without this patch the following files are left around:
 - dtc-lexer.lex.c
 - dtc-parser.tab.c
 - dtc-parser.tab.h

Change-Id: I0dd3b4804bd244827b02be9446f239b5bfef3d0c
Signed-off-by: Magnus Damm <damm@opensource.se>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Git-commit: 4f3be1cfa8422c93271dcdb59f223f6c84c70804
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: David Collins <collinsd@codeaurora.org>
dtc: import latest upstream dtc

This updates scripts/dtc to commit 317a5d9 "dtc: zero out new label
objects" from git://git.jdl.com/software/dtc.git.

This adds features such as:
* /bits/ syntax for cell data.
* Math expressions within cell data.
* The ability to delete properties or nodes.
* Support for #line directives in the input file, which allows the use of
  cpp on *.dts.
* -i command-line option (/include/ path)
* -W/-E command-line options for error/warning control.
* Removal of spew to STDOUT containing the filename being compiled.
* Many additions to the libfdt API.

Change-Id: I026548e66cb994b75fe01ee323155bf23938e43e
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Git-commit: cd296721a9645f9f28800a072490fa15458d1fb7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: David Collins <collinsd@codeaurora.org>
dtc: fix for_each_*() to skip first object if deleted

The previous definition of for_each_*() would always include the very
first object within the list, irrespective of whether it was marked
deleted, since the deleted flag was not checked on the first object,
but only on any "next" object.

Fix for_each_*() to check the deleted flag in the loop body every
iteration to correct this.

(upstream dtc commit 1762ab42ef77db7ab2776d0d6cba3515150f518a)

Change-Id: Icfe0cd4bc7903c2ea7b85febfa154e9bcf4b552c
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Git-commit: 205a8eb7ce713c7f1722297dd97d19dcea6f266c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: David Collins <collinsd@codeaurora.org>
msm: ipc: Make the kernel-space read operation as non-blocking

Update the read operations of kernel space to be non-blocking and
return -ENOMSG when there is no message to read.

CRs-Fixed: 508370
Change-Id: I92f55d8829755078f34ff3cbe2dc9b16ed7988df
Signed-off-by: Zaheerulla Meer <zmeer@codeaurora.org>
Signed-off-by: FNU Ramendra <rramendr@codeaurora.org>
arm/dt: 8974: Add enabled interrupts to bypass list

The following interrupts were added to Bypass list
to enable XO shutdown for smart panel during static
display

hwirq: 56 ->  modem_wdog
hwirq: 70 ->  msm_iommu_pmon_nonsecure_irq
hwirq: 97 ->  msm_iommu_nonsecure_irq
hwirq: 105 -> msm_iommu_pmon_nonsecure_irq
hwirq: 181 -> wcnss_wdog
hwirq: 211 -> dwc3_otg

Signed-off-by: Badhri Jagan Sridharan <badhris@codeaurora.org>
Change-Id: I554e8090bcc8168f0f7e60f6962e55871ea44b1b
msm: clock-8974: Add PNOC request to prevent PNOC clk gating

Keep a request of 19.2Mhz for PNOC bus when APSS is not
in idle-pc.

Signed-off-by: Badhri Jagan Sridharan <badhris@codeaurora.org>
Change-Id: Ib08b92949c970bc353cca1d5a5e3155a65c02dbb
msm: acpuclock-8974: Modify L2 and DDR mapping

This helps power by voting for DDR to run at 460 MHZ
instead of 614 MHz when L2 is running at 1.04 GHz

Change-Id: I6e285de5d1806adcbedf2e526de9c733814df709
Signed-off-by: Dilip Gudlur <dgudlur@codeaurora.org>
arm/dt: msm8974: spi_qsd: Add support for clock path voting

Voting for the entire clock path (using the bus-scaling driver)
requires information about the master endpoint number. A second
new field signals the driver if vote should follow the runtime-pm
state or the application processor power state. These values
are configured in the device tree. In addition, the device-tree
binding document is updated to reflect the new fields.

Change-Id: Ie97cfd209c77fbee01a0ea4f44fa1a34377af519
Signed-off-by: Gilad Avidov <gavidov@codeaurora.org>
msm: clock-8974: Add BCR registers for GDSC-collapsible cores

The GDSC driver allows collapse of cores to be disabled
via device tree. Client drivers may still expect the core
to be reset to a clean state after calls to the GDSC APIs,
however.

Specify .bcr_reg addresses for GDSC-collapsible cores so
that the GDSC driver can assert resets to these cores in
lieu of collapsing them. This is similar to what's already
been done for venus0_vcodec0_clk for the same reason.

Change-Id: I1dfdf9562dd49eee7b38a204a063d6787fc4ce85
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
arm/dt: msm: Add bus bandwidth support to PRNG

Add device tree entries to support bus bandwidth
for PRNG driver on MSM8974, MSM8226, MSM8610.

Change-Id: Ic93a7b6e4d42f839293946d10d532a56acc94ed1
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
ARM: dts: msm: Increase size of memory hole in memory map

Update the size of the memory hole to accomodate a larger
region for the modem image.

Change-Id: If38851e3cb4c2cf12f3b6fc11696b04d1c21bda3
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
arm/dt: 8974: Configure FCC learning parameters

Set the Full Charge Capacity (FCC) learning parameters
and enable FCC learning.

Change-Id: I7119eb60886509b8c3a40cfea8e7907386c5088c
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>