Revert "msm: boards: Enable Krait Retention."

This reverts commit b9c179131f4e66f267ef63f71755ebd076d39780.
Revert "msm: boards: Enable Krait Retention."

This reverts commit 78a71689bd87e5f7b9ddd94f8e1066079c738b5d.
Revert "usb: host: ehci: allow ehci_bus_resume symbol to be unused"

This reverts commit 13f38d57dfb718996343cc06bdeaef401146d06e.
Revert "msm: mdm: Assert soft_reset_gpio in mdm_power_down_common"

This reverts commit 32c2009eb4e609df71e1f1a0e833c8acf8c93b74.
ARM: smp: Fix cpu_up() racing with sys_reboot

Nothing stops a process from hotplugging in a CPU concurrently
with a sys_reboot() call. In such a situation we could have
ipi_cpu_stop() mark a cpu as 'offline' and _cpu_up() ignore the
fact that the CPU is not really offline and call the
CPU_UP_PREPARE notifier. When this happens stop_machine code will
complain that the cpu thread already exists and BUG_ON().

CPU0                      CPU1

sys_reboot()
 kernel_restart()
  machine_restart()
   machine_shutdown()
    smp_send_stop()
    ...                   ipi_cpu_stop()
                           set_cpu_online(1, false)
                            local_irq_disable()
                             while(1)
    <PREEMPT>
cpu_up()
 _cpu_up()
   if (!cpu_online(1))
    __cpu_notify(CPU_UP_PREPARE...)

cpu_stop_cpu_callback()
  BUG_ON(stopper->thread)

This is easily reproducible by hotplugging in and out in a tight
loop while also rebooting.

Since the CPU is not really offline and hasn't gone through the
proper steps to be marked as such, let's mark the CPU as inactive.
This is just as easily testable as online and avoids any possibility
of _cpu_up() trying to bring the CPU back online when it never was
offline to begin with.

Change-Id: Ia1daea407220578d4212ef6c65c4be837ca370fd
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Seongmin Park <r_data@naver.com>
ARM: SoC: add per-platform SMP operations

This adds a 'struct smp_operations' to abstract the CPU initialization
and hot plugging functions on SMP systems, which otherwise conflict
in a multiplatform kernel. This also helps shmobile and potentially
others that have more than one method to do these.

To allow the kernel to continue building, the platform hooks are
defined as weak symbols which are overrided by the platform code.
Once all platforms are converted, the "weak" attribute will be
removed and the function made static.

Unlike the original version from Marc, this new version from Arnd
does not use a generalized abstraction for per-soc data structures
but only tries to solve the problem for the SMP operations. This
way, we can collapse the previous four data structures into a
single struct, which is less systematic but also easier to follow
as a causal reader.

Change-Id: I9d022d4e789f8f87f26a237fa2e9e410be070976
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[rameezmustafa@codeaurora.org: backport to kernel 3.4]
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Seongmin Park <r_data@naver.com>
smp: fix derp.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Seongmin Park <r_data@naver.com>
ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp

If CONFIG_SMP, cpufreq skips loops_per_jiffy update, because different
arch has different per-cpu loops_per_jiffy definition.

Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
thermal: tsens8960: Increase the polling rate

Change the polling rate at which the sensors temperature
is read from 1 second to .25 seconds. On faster parts
there is a need to poll the temperature at a higher
frequency to improve reporting temperature changes.

Change-Id: I10049707c3e55316597fff72fbd00246cd29bed3
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: Seongmin Park <r_data@naver.com>
Revert "msm: pm-8x60: Do not default to WFI when not enabled"

This reverts commit 6850ad4c75ab91f48fae77dc24c04249b5385a6d.
Revert "msm: pm: Adjust for events with hard wakeups"

This reverts commit 79bdf66994d9925318bdcbf1bf0800bf0b3c6f12.
Revert "msm: avs: Add API to restore the AVSCSR register"

This reverts commit 179ef1c5180648cc547b066a844edd1f06612609.
Revert "Undervolt: few minor changes, mostly for clarity."

This reverts commit 2a7e5cf05f2689367c0feb3319c9efda54684936.
Revert "Undervolt: clean it up, make it elegant and remove the constrain of fixed set of NUM_FREQS - its not dynamic based on the number of freqs used for scaling via an external function."

This reverts commit d0283c6bbd59a273898f885295bc950c86f0a3ae.
Revert "Mako (absolute) Voltage control."

This reverts commit 3078789d153a310caacf78d60f83fbb46e017cd3.

Conflicts:

	arch/arm/mach-msm/acpuclock-8064.c
Voltage Control: initial voltage control for MSM S4-Pro SOC

Signed-off-by: faux123 <reioux@gmail.com>

Conflicts:

	arch/arm/mach-msm/Kconfig
Overclocking: limit initial max to system default

Signed-off-by: faux123 <reioux@gmail.com>
msm: Disable 432Mhz, and Fix freqs and voltages

Signed-off-by: Seongmin Park <r_data@naver.com>