msm: bam_dmux: prevent duplicate subsystem restart

If a subsystem restart is triggered while BAM DMUX is waiting for a
power control response, then BAM DMUX will timeout and trigger another
subsystem restart which will cause a kernel panic.

Check if an SSR is already in progress before triggering another
subsystem restart.

CRs-Fixed: 515398
Change-Id: I9e8e5513f6568da9c0090fd97c671a9bc824c43b
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
msm: bam_dmux: add downlink processing state logging

State transitions of the downlink packet processing task are not directly
logged.  This leads to information gaps when debugging downlink issues.

Add explict logging of the state transitions to provide complete
information on what the downlink processing task has done.

Change-Id: Ie253c9739447da6ed236e865b7f1ed318e13cb6e
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
msm: clock-8974: Reduce PLL lock time

Current PLL locking sequence is taking minimum time of 4.6 msec.  For command
mode panels, PLL will be disabled on system idle screen and enabled back on
first update. Very first display update after idle screen is taking long time
due to PLL locking sequence.  We need to optimize PLL lock time for better user
experience.

Change-Id: I1604d4544a3b33ed668ae6f36d19a876c2923e0c
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Revert "msm: pm-8x60: Don't save or restore GIC,VFP state in power collapse"

Save and restore of GIC and VFP state is required to avoid subtle
userspace crashes due to corrupted state across power-collapse

This reverts commit ddc642d6dcc71ebf65cda22287a0aa468218e994

CRs-Fixed: 550405
Change-Id: I1ebe5666dc858116ddc5b830d706e3dacbb16cbe
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Signed-off-by: Patrick Tjin <pattjin@google.com>
Revert "msm: iomap: Remove GIC mappings for device tree targets"

This reverts commit 4baedc0dafac1e4bc03181dfc6dd9e54cadbb146
so that pm-8x60 may resume use of these mappings.

Minor context conflicts have been resolved, and corresponding
8x10 changes have been made (which were not part of the original
commit).

CRs-Fixed: 550405
Change-Id: I838999faf1adb49bbd42f66b3c663e1d5aadef6b
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/include/mach/msm_iomap-8084.h
	arch/arm/mach-msm/include/mach/msm_iomap-8092.h
	arch/arm/mach-msm/include/mach/msm_iomap-8974.h
	arch/arm/mach-msm/include/mach/msm_iomap-9625.h
	arch/arm/mach-msm/io.c

Signed-off-by: Patrick Tjin <pattjin@google.com>
perf/arm: Fix armpmu_map_hw_event()

Fix constraint check in armpmu_map_hw_event().

Reported-and-tested-by: Vince Weaver <vincent.weaver@maine.edu>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Patrick Tjin <pattjin@google.com>
ARM: 7809/1: perf: fix event validation for software group leaders

It is possible to construct an event group with a software event as a
group leader and then subsequently add a hardware event to the group.
This results in the event group being validated by adding all members
of the group to a fake PMU and attempting to allocate each event on
their respective PMU.

Unfortunately, for software events wthout a corresponding arm_pmu, this
results in a kernel crash attempting to dereference the ->get_event_idx
function pointer.

This patch fixes the problem by checking explicitly for software events
and ignoring those in event validation (since they can always be
scheduled). We will probably want to revisit this for 3.12, since the
validation checks don't appear to work correctly when dealing with
multiple hardware PMUs anyway.

Cc: <stable@vger.kernel.org>
Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Tested-by: Vince Weaver <vincent.weaver@maine.edu>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Conflicts:
	arch/arm/kernel/perf_event.c

Signed-off-by: Patrick Tjin <pattjin@google.com>
msm: audio: initialize the structure before sending to user space

If uninitialzied structure is passed from kernel to user space, it
may contain sensitive information that will be leaked.

Change-Id: Ie7c4568c78df8cbd1efeff559848058c2163b0b8
Signed-off-by: Fred Oh <fred@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>