msm: Fix for APR session based callbacks

In the callback function src_port was being used
instead of dest_port for returning the callbacks.
Fixed by changing src_port to dest_port.

Signed-off-by: Vicky Sehrawat <vickys@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: Allow native driver to communicate with APR

Add a new driver to expose IOCTLs for userspace clients
to use to communicate directly with APR. This will allow
clients to directly interact with services such MVM, CVS,
etc

Signed-off-by: Vicky Sehrawat <vickys@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Conflicts:
	include/sound/Kbuild

Change-Id: Ie19c15b978124d6d09737beafa495dbb0b549afd
soc: qcom: smd: Validate read and write addresses

The address from which data has to be read and the address to which the
SMD data has to be written is calculated based on the head and tail
indices for that SMD FIFO. If the indices are corrupted, then the
calculated pointer may be outside of the FIFO and may even be outside of
the range of SMEM.

Validate the read and write addresses to be with in the limits of
receive and send FIFO limits respectively.

Signed-off-by: Zaheerulla Meer <zmeer@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Conflicts:
	arch/arm/mach-msm/smem.c

Change-Id: Ia6780bf207b1402d4ac9dfc9c3a48526265ea713
msm: gpiomux: Add msm_tlmm_misc_reg_read API

Provide an API for drivers to read from miscellaneous registers
in the MSM TLMM region.

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
sched/rt: Perform cleanup for moved rt specific bits

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Conflicts:
	drivers/net/wireless/bcmdhd/dhd_linux.c

Change-Id: I4a555cc4956753b5899296782f49639f0bc41279
ARM: SoC: convert MSM to SMP operations

Convert MSM SMP platforms to use struct smp_operations to provide
their SMP and CPU hotplug operations.

[antypas@xda: Adapt to 8974/hammerhead]
[linflux@arcor.de: Minor cleanups]

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: David Brown <davidb@codeaurora.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Conflicts:
	arch/arm/mach-msm/hotplug.c

Change-Id: I5945298718c27e4a30813f82392af0efa14beb7e
ARM: smp: Make SMP operations mandatory

Now that all SMP platforms have been converted to use struct
smp_operations, remove the "weak" attribute from the hooks
in smp.c, and make the functions static wherever possible.

Change-Id: I2464ef7aabdcd414763a47d4c4afdd8626eb7f80
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ARM: smp: remove wrapper functions

Remove some silly wrapper functions which aren't really required:
	platform_smp_prepare_cpus
	platform_secondary_init
	platform_cpu_die

This simplifies the code.

Change-Id: I42393b82fc856a85fd9f66033a4b7c8ead92c24d
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: clock: Fix invalid pointer dereferences on error condition

Check whether a clock pointer is an error value before deferencing it.

Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: clock: Check arguments to clk_set_parent

Verify that the struct clk pointer is valid before accessing
its members.

Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: pm: Fix errors with gcc 4.9

Switching to gcc 4.9 throws a "iteration 3u undefined behavior" when
variables are updated by function returns and the function in itself
takes the variable as a parameter. Fix issue by using a local variable
to store the intermediate value

Also, fix a issue where the variable counter_name could be indexed
incorrectly by explicitly declaring the size of the variable.

Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>