Merge "msm: display: fix iommu page faults for devices with lcdc panel."
msm: thermal: Use signed int for temperature

Temperatures could be in negative and negative signed ints may be
incorrectly read as unsigned int.

Change-Id: I817db2756c54816296a700ffcd004a83161f2b95
CRs-Fixed: 441632, 473507
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Merge "radio-tavarua: Handle I2C read/write errors during sleep mode."
Merge "radio: iris: Add synchronize mechanism to handle multiple command requests"
media: dvb: Discard sections TS packets with transport error indicator

Corrupted section data should not be notified to the application,
TS packets holding sections with transport error indicator (TEI)
are discarded.

CRs-Fixed: 473875
Change-Id: I43f500a8cde86ad970360a7f1b50615f16fb7a89
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Merge tag 'AU_LINUX_ANDROID_JB_2.5.04.02.02.040.250' of git://codeaurora.org/kernel/msm into cm-10.1

AU_LINUX_ANDROID_JB_2.5.04.02.02.040.250 based on quic/aosp/jb_2.5
DIE Section mismatch DIE: add __ref's to stop annoying warning
cpufreq: ktoonservative: Add boost sync'r so both CPUs are running same Mhz on boost pulse
cpufreq: ktoonservative: Move extern declaration to top with the rest
d2: clean up logspam

Change-Id: Id19ca8fc1c51f975da91a57b2c14809a69b5294e
bcmdhd: Enable Ad-Hoc (IBSS) mode

Enable Ad-Hoc (IBSS) mode for bcmdhd. We basically just need to set the
interface flag and avoid some P2P specific settings while scanning.

Also add the "station get" command for IBSS mode.

Change-Id: Ie6f0fa77b55d92a7c22cbda72bad200cbfaede04
Signed-off-by: Bruno Randolf <br1@einfach.org>
M2: regulators: fixup: make RPM_VREG_ID_PM8921_S2 regulator sleep_selectable

M2: ATT: Increase frequency for RPM_VREG_ID_PM8921_S2 regulator to 2.4

(same as in stock. ATT specific change is forced in rpm-regulator.c)

Change-Id: Ib351f8f75437e85fb50ba166dcaf887fac042df5
Revert "M2: regulators: fixup: make RPM_VREG_ID_PM8921_S2 regulator sleep_selectable"

This reverts commit 991dceb1c0aa8d10d177785777d936048f40fa0b.
Revert "cpufreq: ktoonservative: Move extern declaration to top with the rest"

This reverts commit b5c040ecbec0e4bf9861c39ccfc5f5cc9916cb5a.
Revert "cpufreq: ktoonservative: Add boost sync'r so both CPUs are running same Mhz on boost pulse"

This reverts commit a6e3ae604af1c8ae030433fdf526e3e871676db8.
Linux 3.4.40
Signed-off-by: task650 <task650@gmail.com>
hrtimer: Consider preemption when migrating hrtimer cpu_bases

When switching to a new cpu_base in switch_hrtimer_base(), we
briefly enable preemption by unlocking the cpu_base lock in two
places. During this interval it's possible for the running thread
to be swapped to a different CPU.

Consider the following example:

CPU #0                                 CPU #1
----                                   ----
hrtimer_start()                        ...
 lock_hrtimer_base()
 switch_hrtimer_base()
  this_cpu = 0;
  target_cpu_base = 0;
  raw_spin_unlock(&cpu_base->lock)
<migrate to CPU 1>
...                                    this_cpu == 0
                                       cpu == this_cpu
                                       timer->base = CPU #0
                                       timer->base != LOCAL_CPU

Since the cached this_cpu is no longer accurate, we'll skip the
hrtimer_check_target() check. Once we eventually go to program
the hardware, we'll decide not to do so since it knows the real
CPU that we're running on is not the same as the chosen base. As
a consequence, we may end up missing the hrtimer's deadline.

Fix this by updating the local CPU number each time we retake a
cpu_base lock in switch_hrtimer_base().

Another possibility is to disable preemption across the whole of
switch_hrtimer_base.  This looks suboptimal since preemption
would be disabled while waiting for lock(s).

Change-Id: I3f76d528ab2288ef5f950f4d048e7f3fa6cf1228
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
hrtimer: Prevent enqueue of hrtimer on dead CPU

When switching the hrtimer cpu_base, we briefly allow for
preemption to become enabled by unlocking the cpu_base lock.
During this time, the CPU corresponding to the new cpu_base
that was selected may in fact go offline. In this scenario, the
hrtimer is enqueued to a CPU that's not online, and therefore
it never fires.

As an example, consider this example:

CPU #0                          CPU #1
----                            ----
...                             hrtimer_start()
                                 lock_hrtimer_base()
                                 switch_hrtimer_base()
                                  cpu = hrtimer_get_target() -> 1
                                  spin_unlock(&cpu_base->lock)
                                <migrate thread to CPU #0>
                                <offline>
spin_lock(&new_base->lock)
this_cpu = 0
cpu != this_cpu
enqueue_hrtimer(cpu_base #1)

To prevent this scenario, verify that the CPU corresponding to
the new cpu_base is indeed online before selecting it in
hrtimer_switch_base(). If it's not online, fallback to using the
base of the current CPU.

Change-Id: I6359cb299ba7e08abf25d3360fcdd925b4c03b69
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
lib/memcopy: use glibc version

the kernel's memcpy and memmove is very inefficient. But the glibc version is
quite fast, in some cases it is 10 times faster than the kernel version. So I
introduce some memory copy macros and functions of the glibc to improve the
kernel version's performance.

The strategy of the memory functions is:
1. Copy bytes until the destination pointer is aligned.
2. Copy words in unrolled loops.  If the source and destination are not
   aligned in the same way, use word memory operations, but shift and merge
   two read words before writing.
3. Copy the few remaining bytes.

Signed-off-by: Miao Xie <miaox*******>
Signed-off-by: faux123 <reioux@gmail.com>
lib/string: use glibc version

the performance of memcpy and memmove of the general version is very
inefficient, this patch improved them.

Signed-off-by: Miao Xie <miaox*******>
Signed-off-by: faux123 <reioux@gmail.com>