Kconfig: Add config option to support vmalloc savings

The virtual space belonging to any subsystem which is
expected to have a lifetime of the entire system can be
reclaimed. Adding config option to enable or disable
this feature.

Change-Id: I56faef4b71c948185fdfe336054a5951dfa8d011
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
Kconfig: Add menu choice option to reclaim virtual memory

Add menu choice options for selecting the method of reclaiming
virtual memory, either by mapping around the largest hole or
reclaiming virtual memory belonging to any subsystem expected to
have a lifetime of the entire system. By default virtual memory
is not reclaimed.

Change-Id: I1b8a1492062bb9532700122878618989e5148647
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
msm: acpuclock: Fix acpuclk_data null pointer dereference

If acpuclk_data is null, dereferencing it in acpuclk_get_switch_time
causes a kernel panic.  Add pointer check to fix that.

Change-Id: I69b92671c8cf26cb45ec8f1193c147be2ebe4c16
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
msm: Add null-pointer checks for domains

Add check for null-pointer before passing domain pointer
into map and unmap api to avoid null-pointer deferences.

CRs-fixed: 493503
Change-Id: I185deb9f2878ef62601eb4ca1d2b71f892ca0185
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
msm: Fix race condition in domain lookup

During lookup of domains we take a pointer to the root node
of the rb tree before taking the mutex to protect the rb tree.
However, the rb root node might change if another process updates
the rb tree after we take the pointer to the root node. This can
cause us to not find the entry that we are looking for.
Fix this by ensuring we have taken the mutex before getting the
root node pointer.

CRs-fixed: 493503
Change-Id: I4702740e486fda0cd92df0401d8e4706598a899b
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
msm: ipc_logging: Add ipc logging context destroy API

If IPC logging gets used by other drivers and modules, then those
drivers/modules may need to destroy the logging context for dynamic
modules that get unloaded.

Add a function called ipc_log_context_destroy() that will destroy a
logging context created by ipc_log_context_create().

Change-Id: I0f927235e51bd17b82bb2bd2eea198fc681e03cd
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>