msm: kgsl: convert timestamp_cmp logic to use unsigned logic

msm: kgsl: convert timestamp_cmp logic to use unsigned logic

The meaning of timestamps becomes difficult to understand when
converting between unsigned and signed values. Values that
were seperated by 0x80000000 also returned inconsistent
results.

CRs-Fixed: 355752

Conflicts:

	drivers/gpu/msm/kgsl.h

Change-Id: I5d5d1ad64ef120da8769d72ac69dde37f8f5c6ae
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
msm: kgsl: fix cleanup code in kgsl_ioctl_map_user_mem()

ion handles need to be handled differently than pmem or
ashmem handles.

CRs-Fixed: 359268
Change-Id: I20637644f247859245fbba80e5bc6b50fd896403
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
(cherry picked from commit 53d4dd028583c3d0a97233d3dff4336ae086ca91)
msm: rpc: free the buffer if read fails

In do_read_data(), while reading a data fragment, if
read() fails to read all the required bytes, free the fragment
buffer.  Also correct the allocation size for fragment buffer.

cherry-picked and adapted for DHD from:
https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=commitdiff;h=449bec7d0dd444fe8481677022ca2a0e23ba3ed8
ARM: msm: only create rpcrouter pdev once

Change-Id: I1e3bebe50c93eb4c4874d35d1c87ebafa4f88af5
Signed-off-by: Dima Zavin <dima@android.com>
msm: rpc: remove unused variable

In __msm_rpc_read() variable __wait is not used.
 Remove it.

Change-Id: I27ca763bb35180d75b3de10462c14548c9f860dd
CRs-Fixed: 262799
Signed-off-by: Niranjana Vishwanathapura <nvishwan@codeaurora.org>

Cherry-picked from:
https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=commitdiff;h=2e58d7c92bc942392fc45ebb325b1d128ce7ba08
msm: rpc: Remove timeout in client's read thread

Remove the timeout while waiting in client's read thread
which causes unnecessary wakeups and results in increased
power consumption. While closing a client, wakeup the
read wait so that the read thread gets closed properly.

Change-Id: Ib77d723d26c5e2d560038d2be34ac352bc97aa38
CRs-Fixed: 255989
Signed-off-by: Niranjana Vishwanathapura <nvishwan@codeaurora.org>

Cherry-picked and adapted for DHD from:
https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=commitdiff;h=001fa8892ffd5dbb286f5c03c011a9e415f8e2b1
cpufreq: interactive: restart above_hispeed_delay at each hispeed load

Change-Id: I2e5b91d45e8806b0ab94ca2301ed671c9af9ab13
Signed-off-by: Todd Poynor <toddpoynor@google.com>
cpufreq: interactive: fixup trace of string params

Change-Id: Iac47f62437e61b13724afbbf9df1a0729f58f236
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Merge branch 'new-kgsl' into android-msm-2.6.35-ics-bfs
Merge commit 'b942d4f10c' into android-msm-2.6.35-ics-bfs
makefile: tweak compiler flags
mm: uksm: add new Ultra KSM implementation, version 0.1.1
mm: uksm: finished the backporting
mm: uksm: merge is_uksm_zero_pfn() into is_zero_pfn()
UKSM: Documentation and some comment fix.
UKSM 0.1.1.1
UKSM: update anon_page counter when a anon_page remap to uksm_zero_page
UKSM: add VM_MERGEABLE to vm_flags before vma_merge()
UKSM: add missing text info in vmstat_text
base: genlock: allow synchronization with a single gralloc handle

In order to support synchronization in a process with a single
gralloc handle we require the ability to write lock a buffer
while it is already read locked by the same handle. This change
extends the concept of an exclusive write lock or recursive read
locks to a genlock handle (rather than the genlock lock).
Genlock cannot provide deadlock protection because the same
handle can be used simultaneously by a producer and consumer.
In practice an error will still be generated when the timeout
expires.

CRs-fixed: 356263

Signed-off-by: Jeff Boody <jboody@codeaurora.org>
(cherry picked from commit 6d9076fe46bcba71986a25cf357e71a4d83958c1)

Change-Id: I5d02591586023f4b622915522e2e038c16c9f2f2
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>