msm: rpc: Do not allow new clients on reboot call.

RPC server closes all sockets at reboot call, however some drivers might try to
connect RPC again (such as pmapp). When this happens, RPC may hang.

Change-Id: I90e80d04197c680bde8abe3c200d2a1c421011f9
Revert "misc: Add support for PMEM ADSP (overriding ION)."

This reverts commit 201ebff15252b6d41d201625b52a44c8621356ba.
u8800: Remove leftovers of ANDROID_PMEM_ADSP.

Change-Id: I5831b672722810d34ebea8d37251c1c9c563d4bf
media: msm: Conditionally disable ION support for camera.

Automatically disable ION features if ANDROID_PMEM is selected (since these
drivers are from ICS, where PMEM was primary).

Change-Id: Id0c5ed8532f69a3af27f47a768178a288720b95f
misc: pmem: Add support for PMEM->ION wrapper.

PMEM to ION wrapper replaces standard PMEM driver with its own. It's sole
purpose is to redirect all PMEM allocations to ION.

If enabled, board driver must ensure pmem pdata provides .ion_client with the
name of the ION heap (such as camera, mm, sf, etc).

Since some kernel drivers are PMEM based, all drivers that request PMEM memory
will be getting ION memory (get_pmem_file/put_pmem_file). On a corner case,
such as userspace allocating memory directly with /dev/ion, PMEM wrapper driver
will automatically import the fd (from PMEM id 0 ION client) and return the
memory from ION.

Not a complete solution. Unfinished features have been marked with TODO.

Change-Id: I507ce0850d6fdbac4a72c83105140e9f3992a678
Signed-off-by: Rudolf Tammekivi <rtammekivi@gmail.com>
misc: pmem_wrapper: Add support for get_pmem_user_addr.

Change-Id: I228376080b51225c60a1e6476977fa250343cb3f
misc: pmem_wrapper: Add support for get_pmem_fd/put_pmem_fd.

Change-Id: Ic00aaacbf0c563576967146e2788c604c89148ed
misc: pmem_wrapper: Add support for pmem_cache_maint.

Change-Id: Ic473f55e8f1f2edbc7a1797aed2d33a85e49a827
misc: pmem_wrapper: Remove hacks.

Simply create a new file if it is not a pmem file. This avoids any potential
null pointer dereferences/invalid memory access.

Change-Id: I83c81ad59fa8ffc1dee6072a4b3190ad1d88d528
misc: pmem_wrapper: Add support for ioctl commands.

Currently supported:
PMEM_GET_SIZE
PMEM_GET_PHYS
PMEM_ALLOCATE
PMEM_CLEAN_INV_CACHES
PMEM_CLEAN_CACHES
PMEM_INV_CACHES
PMEM_ALLOCATE_ALIGNED

Change-Id: Id7ec293487f549f4fc484789cc7886e8a0aecf56
misc: pmem_wrapper: Check for allocation before mmap.

A driver may decide to allocate using ioctl commands and mmap later. To avoid
memory leaks this needs to be considered.

Change-Id: Ia5a619adb962200e104055179ea1df418260794d
misc: pmem_wrapper: Supply heap_mask to use correct ION heap.

Change-Id: I955819ee0361dd939bbc63065831af88aad65f40
misc: pmem_wrapper: Do not allow custom ion client name. Rename heap_mask.

Using the ion client name as pmem client name makes much more sense.
Rename heap_mask to ion_heap_mask so it would be clearer.

Change-Id: I9d2fd9d6674c208e3f0e3200a64fc50b469d574e
misc: pmem_wrapper: Add dedicated methods for allocation and free.

This simplifies the code & adds allocation parameters directly in the
allocation data, removing the need of calling additional functions.

Change-Id: Icc3750ebd5ad439469adb5ac8a8fbad2c2af6517
rename heap mask to heap id

Change-Id: I052b119c188dc81cf7ab99910f9706f06f9b6f75
u8800: Add & Enable PMEM->ION wrapper.

Remove references to PMEM DMA (cma).

Change-Id: I1ee8aeb28f4f729e0be93cb4bfc94615b7b7f9af