msm: sps: Fix BAM ISR race with pipe disconnect

Pipe EOT can occur while SPS pipe disconnect is being done.
The pipe disconnect can free up resources and pointers that
are used by bam_isr() in parallel in SMP environment and can
cause null pointer dereference.

Fix this by calling synchronize_irq() before freeing up resources
and by spin_lock to avoid race conditions.

Change-Id: I51eb88e1d68123d13d4aaf654e729236a4a3f144
Signed-off-by: Dipen Parmar <dipenp@codeaurora.org>
cpufreq: Retain only online cpus in managed_policy->cpus

cpufreq's handling of cpu online event can incorrectly initialize
managed_policy->cpus to include offline cpus. This causes cpufreq
governors to include offline cpus in their idle time computation, which
causes frequency to shoot up beyond normal levels (on systems where 2 or
more cpus need to be synchronized wrt frequency change).

This frequency shootup was not seen prior to commit 21111be8 which
changed idle time accounting for offline cpus. Prior to commit 21111be8,
idle time statistics for offline cpus would include their offline time
as well. Post commit 21111be8, offline time is not included in a cpu's
idle time statistics.

As a result, ondemand (or other cpufreq) governors would see unchanged
idle time for offline cpus, causing them to interpret those (offline)
cpus as 100% busy, which is wrong.

This patch fixes the issue by modifying cpufreq's hotplug handling to
retain only online cpus in managed_policy->cpus field. cpufreq governors
would then skip such offline cpus from idle time calculations.

Change-Id: Id2eba8c0ec3367609369b2e42a4e1386ff2e7ab5
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
msm: Kconfig: Disable SPARSEMEM for A-Family targets

SPARSEMEM is no longer needed since the features that required it
(memory hotplug, for example) have been superseded by other
solutions. Remove it since it introduces overhead.

CRs-Fixed: 430996
Change-Id: I25ff8591dae1e48b5b0bf8a0669196a6d7d0cd85
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
d2: Disable CONFIG_SUSPEND_TIME

 * MSM doesn't implement read_persistent_clock, so this code doesn't
   work. It's also misleading, since we're always logging a suspend time
   of zero which may cause some developer to hunt for bugs in all the
   wrong places.

Change-Id: If2d540e78a1523865baee50abd4931c02a6e0aaf

d2: Enable branch optimizations

Change-Id: Ibf3163f197a3c88ac45595572001ad078f0e52a5