Revert "msm: Make CONFIG_STRICT_MEMORY_RWX even stricter"

The offending patch caused (CR): slows down whole system performance

This reverts commit a8ccac6755bd6ed4119da3b78819af2688b12a5f.

Change-Id: Ic8e0451a6a705e7eb28e613d37ed05b104de9580
Reviewed-on: http://gerrit.pcs.mot.com/616003
Reviewed-by: Yu Liu <e7664c@motorola.com>
SLTApproved: Yu Liu <e7664c@motorola.com>
Submit-Approved: Yu Liu <e7664c@motorola.com>
Tested-by: Yu Liu <e7664c@motorola.com>
misc: dropbox: add support for file events

This will allow drivers to add dropbox events with data containing the
path of a file which should be added to the dropbox.

Change-Id: I23757db8fda4d65019a97c83e4d8bb6fbfe27962
Signed-off-by: Patrick Auchter <wpa722@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/617705
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jared Suttles <jsuttles@motorola.com>
Reviewed-by: Fred Fettinger <fettinge@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
SLTApproved: Christopher Fries <c.fries@motorola.com>
msm: kgsl: send snapshot dump file to dropbox

The device->snapshot doesn't contain all the data which is collected as
part of the snapshot.  Send the path to the snapshot dump file which will
contain all the data to dropbox.

Change-Id: Ia0d11cb9e0ac17b4c82606df2d265bc35493a439
Signed-off-by: Patrick Auchter <wpa722@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/617706
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Fred Fettinger <fettinge@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
SLTApproved: Christopher Fries <c.fries@motorola.com>
drivers: ov660: Support LSC Part-to-part correction

Currently LSC OTP data is created when LENC is not enabled therefore
LSC OTP data is not used for LSC Part-to-part correction for ISP.
To support AIS LSC functionality, it requires to disable ov660 LENC.

Change-Id: I04dce46fa4a71c6d65d144d43bd49c4361fccb41
Signed-off-by: Hideki Yoshino <pgq674@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/620204
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Elena Satraitis <esatrait@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
defconfig: 8960: Enable support for SMC USB ethernet adapter

Enable the config (USB_PEGASUS) for SMC based USB ethernet adapters

Change-Id: I866d6d57d146ae12ce326a5c198d8dd8bc10ec2e
Signed-off-by: Ravi Vembu <a18394@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/616905
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Reviewed-by: Ravikumar Vembu <raviv@motorola.com>
SLTApproved: Christopher Fries <c.fries@motorola.com>
(cherry picked from commit f5c67c01e09a33f32f8762b803d0cd25a806f164)
mmi_defconfig: Enable support for SMC USB ethernet adapter

Enable the config (USB_PEGASUS) for SMC based USB ethernet adapters

Change-Id: I5012732b3eadec43be97e4cdb13a0ab1d2c2ba37
msm_fb: correct quickdraw buffer alignment

To prevent display corruption when drawing non-fullscreen buffers
to the display panel the buffers need to be aligned along the
x-axis per the panel "column alignment" specification. For example,
if a panel has a 4-pixel alignment restriction buffers must start
at a x-coordinate that is divisible by 4 with a width that is also
divisible by 4. Buffers are auto-corrected by shifting to the nearest
x-coordinate that is divisible by the panel's column alignment
requirement. Any buffer that has a width that is not divisible by the
panel's column alignment requirement is considered invalid.

Change-Id: I26d0fdd94b0adeac17676ef40696eecbf521e310
Signed-off-by: Joe Swantek <jswantek@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/622377
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jared Suttles <jsuttles@motorola.com>
Reviewed-by: Patrick Auchter <auchter@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
(cherry picked from commit 81278547915102b42c7ba04734182d2ecb68d75d)
Reviewed-on: http://gerrit.pcs.mot.com/625592
Reviewed-by: Upgrade Build <dbbuild@motorola.com>
SLTApproved: Upgrade Build <dbbuild@motorola.com>
Submit-Approved: Upgrade Build <dbbuild@motorola.com>
Tested-by: Upgrade Build <dbbuild@motorola.com>
msm_fb: program column alignment for panels

Change-Id: Id2efe7a7d6fdc208def005d085b4ba75e003f1c5
Signed-off-by: Joe Swantek <jswantek@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/622376
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-by: Zachary Crosby <zac@motorola.com>
Reviewed-by: Patrick Auchter <auchter@motorola.com>
Reviewed-by: Fred Fettinger <fettinge@motorola.com>
Reviewed-by: Jared Suttles <jsuttles@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
(cherry picked from commit c8b136fc1a6f67d82018300fd1329eb89ed88338)
Reviewed-on: http://gerrit.pcs.mot.com/625593
Reviewed-by: Upgrade Build <dbbuild@motorola.com>
SLTApproved: Upgrade Build <dbbuild@motorola.com>
Submit-Approved: Upgrade Build <dbbuild@motorola.com>
Tested-by: Upgrade Build <dbbuild@motorola.com>
msm_fb: add column alignment to panel info

Add the col_align parameter to the panel info structure that defines
the x-coordinate alignment requirements to start and end data writes.

Change-Id: Id45b165703681fdea6b0c19ac8caadee0a802371
Signed-off-by: Joe Swantek <jswantek@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/622375
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-by: Zachary Crosby <zac@motorola.com>
Reviewed-by: Patrick Auchter <auchter@motorola.com>
Reviewed-by: Fred Fettinger <fettinge@motorola.com>
Reviewed-by: Jared Suttles <jsuttles@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
(cherry picked from commit 898fa25f0dbac0e8c9fbb211ae8a907a55953cb3)
Reviewed-on: http://gerrit.pcs.mot.com/625594
Reviewed-by: Upgrade Build <dbbuild@motorola.com>
SLTApproved: Upgrade Build <dbbuild@motorola.com>
Submit-Approved: Upgrade Build <dbbuild@motorola.com>
Tested-by: Upgrade Build <dbbuild@motorola.com>
msm_fb: add cropping support to quickdraw engine

Allow buffers that would be partially on the screen to be drawn
successfully. Analyze the buffer coordinates and draw only the portion
of the buffer that will appear on the screen, essentially cropping the
image to the viewable screen area.

Change-Id: I193f52461746d1d1a00ca0a5e464e1b7b4c7d028
Signed-off-by: Joe Swantek <jswantek@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/623363
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jared Suttles <jsuttles@motorola.com>
Reviewed-by: Patrick Auchter <auchter@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
(cherry picked from commit 1830188f10429f5dfafe1615fb187aa133e29378)
Reviewed-on: http://gerrit.pcs.mot.com/625595
Reviewed-by: Upgrade Build <dbbuild@motorola.com>
SLTApproved: Upgrade Build <dbbuild@motorola.com>
Submit-Approved: Upgrade Build <dbbuild@motorola.com>
Tested-by: Upgrade Build <dbbuild@motorola.com>
msm_fb: allow negative x,y quickpeek buffer coordinates

By allowing the x,y coordinates of a quickpeek buffer to be signed we are
allowing for buffers to be partially drawn to the viewable screen area
(i.e. have a buffer be clipped to the edge of the screen).

Change-Id: I9c67b950c51a0c2d9a96836c4a9ace32f7aca3b9
Signed-off-by: Joe Swantek <jswantek@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/623361
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jared Suttles <jsuttles@motorola.com>
Reviewed-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-by: Patrick Auchter <auchter@motorola.com>
Reviewed-by: Fred Fettinger <fettinge@motorola.com>
Reviewed-by: George Standish <george.standish@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
(cherry picked from commit 0d4ffe9a0fcc367876d5ed0b7c4c94e61bc89f09)
Reviewed-on: http://gerrit.pcs.mot.com/625598
Reviewed-by: Upgrade Build <dbbuild@motorola.com>
SLTApproved: Upgrade Build <dbbuild@motorola.com>
Submit-Approved: Upgrade Build <dbbuild@motorola.com>
Tested-by: Upgrade Build <dbbuild@motorola.com>
msm_fb: add quickdraw COORD_NO_OVERRIDE definition

This definition (0xFFFF) is used during a QuickDraw to indicate that we
should use the pre-defined coordinates in the buffer structure. If any
other value is used, the value defines panel (x,y) coordinates to draw the
buffer at. This has the inherit restriction that a buffer can't be drawn
at (-1,-1).

Change-Id: Ia105582abe9a5457605505c6f3ee0ada8bb9dd6a
Signed-off-by: Joe Swantek <jswantek@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/623362
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jared Suttles <jsuttles@motorola.com>
Reviewed-by: Patrick Auchter <auchter@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
(cherry picked from commit 121cdaaa393236a8f2c171e26291b4493f0191c2)
Reviewed-on: http://gerrit.pcs.mot.com/625597
Reviewed-by: Upgrade Build <dbbuild@motorola.com>
SLTApproved: Upgrade Build <dbbuild@motorola.com>
Submit-Approved: Upgrade Build <dbbuild@motorola.com>
Tested-by: Upgrade Build <dbbuild@motorola.com>
msm: bam_dmux: Remove SSR after shutdown_completion timeout

The modem restart introduced by following commit
3d04101 msm: bam_dmux: delay shutdown until DL polling is complete
is seen to be called incorrectly even when modem is up normally.

Avoid condition by:
1) Removed SSR upon shutdown completetion timeout to make
   behaviour similar to previous releases
2) Increased the SHUTDOWN_TIMEOUT_MS from 500ms to 2s as per QC suggestion

Change-Id: Ic7b9f5661b8eed8b12455a4295ff1b738e6a76b7
Signed-off-by: A. Kaul <w42726@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/624505
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jayachandran Chinnakkannu <jayc@motorola.com>
Reviewed-by: Christopher Fries <c.fries@motorola.com>
Submit-Approved: Maulik Desai <amd093@motorola.com>
(cherry picked from commit 55b2454d4b0b0c1e81b20fdca88d5dd02021fb2c)
Reviewed-on: http://gerrit.pcs.mot.com/625599
Reviewed-by: Upgrade Build <dbbuild@motorola.com>
SLTApproved: Upgrade Build <dbbuild@motorola.com>
Submit-Approved: Upgrade Build <dbbuild@motorola.com>
Tested-by: Upgrade Build <dbbuild@motorola.com>
Revert "(CR): drivers: ov660: Support LSC Part-to-part correction"

This reverts commit 30164ad042301f8a99a42413e346388589c5818e.

Change-Id: Iefc0423dbe9186459b0b07d5d981671392e835dd
Signed-off-by: a1205z <a1205z@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/626372
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Reviewed-by: James Wilson <jimwilson@motorola.com>
Reviewed-by: Elena Satraitis <w04888@motorola.com>
Reviewed-by: Hideki Yoshino <hideki.yoshino@motorola.com>
Reviewed-by: Andrew Wheeler <awheeler@motorola.com>
(cherry picked from commit ac3a9a68d4f1dff9ea2c7d325367269aeb4888a7)
Reviewed-on: http://gerrit.pcs.mot.com/626927
SLTApproved: Maulik Desai <amd093@motorola.com>
Reviewed-by: Maulik Desai <amd093@motorola.com>
qseecom: Add checks for API called in IOCTL

Ported from QCOM commit eb8377a745 : Validate the inputs.

Change-Id: Icb00ed70129b1c7511fb5652c44867cd36c0a500
Signed-off-by: wljv10 <wljv10@motorola.com>
ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork

Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to
prevent it from being used as a covert channel between two tasks.

There are more and more applications coming to Windows RT,
Wine could support them, but mostly they expect to have
the thread environment block (TEB) in TPIDRURW.

This patch preserves that register per thread instead of clearing it.
Unlike the TPIDRURO, which is already switched, the TPIDRURW
can be updated from userspace so needs careful treatment in the case that we
modify TPIDRURW and call fork(). To avoid this we must always read
TPIDRURW in copy_thread.

Change-Id: Ib1e25be7b9faa846ba5335aad2574e21a1246066
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Git-commit: a4780adeefd042482f624f5e0d577bf9cdcbb760
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[joonwoop@codeaurora.org: fixed merge conflict]
CRs-fixed: 561044
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>

(cherry picked from commit 1adea3713e01f978bb04dbbfe0f936643eeb4e24)
Revert "(CR) netfilter: qtaguid: lock socket when accessing"

The patch can not totally resolve the original issue and
is risky in some cases.

This reverts commit 32db4981510ce26638db0418738fd8abeda25bea.

Change-Id: I497d4c9d33302a5f934d36c8d672e9fd76087b0c
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
Reviewed-on: http://gerrit.mot.com/626622
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Reviewed-by: Christopher Fries <c.fries@motorola.com>
Reviewed-by: Yi-Wei Zhao <gbjc64@motorola.com>
(cherry picked from commit 8a1090f478e3c8199ad2cb7bf7701ab9ab4dee30)
Reviewed-on: http://gerrit.mot.com/629275
Reviewed-by: Upgrade Build <dbbuild@motorola.com>
SLTApproved: Upgrade Build <dbbuild@motorola.com>
Submit-Approved: Upgrade Build <dbbuild@motorola.com>
Tested-by: Upgrade Build <dbbuild@motorola.com>
netfilter: qtaguid: Add err handle for tag cmd

In some condition, xt_qtaguid would goes into re-tagging path
with the same sk but different sockfd or socket.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++
ctrl_cmd_tag
     sockfd_lookup(e.g., sock_fd=1)
              fget(f1)
     tag f1

 ctrl_cmd_tag
      sockfd_lookup(e.g., sock_fd=2)
              fget(f2)
      retag
               fput(f1)

 ctrl_cmd_tag
      sockfd_lookup(e.g., sock_fd=3)
              fget(f3)
      retag
               fput(f1)

 ctrl_cmd_untagdd
      sockfd_lookup(e.g., sock_fd=xx)
              fput(f1)
              fput(fxx)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

Explicitly, the first retag would trigger spinlock lockup,
and the second retag may panic because f1 has been released
during the first time re-tagging.
Or sometimes, tag -> retag -> untag -> panic, the reason is
the same.

To void the issue, we goto err path and put back the socket
ref in this call's, but not the tagged socket.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++
ctrl_cmd_tag
     sockfd_lookup(e.g., sock_fd=1)
              fget(f1)
     tag f1

 ctrl_cmd_tag
      sockfd_lookup(e.g., sock_fd=2)
              fget(f2)
      retag
	       if(f2!=f1)
      err:
               fput(f2)

 ctrl_cmd_tag
      sockfd_lookup(e.g., sock_fd=3)
              fget(f3)
      retag
	       if(f3!=f2)
      err:
               fput(f3)

 ctrl_cmd_untag
      sockfd_lookup(e.g., sock_fd=xx)
              fput(f1)
              fput(fxx)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

Change-Id: I4ad5db2457dc55899ebbbf974dce6dc5f81293af
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
Reviewed-on: http://gerrit.mot.com/626623
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Yi-Wei Zhao <gbjc64@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Reviewed-by: Christopher Fries <c.fries@motorola.com>
(cherry picked from commit 82760d15221e19509e85a8c43233c01741df7d4b)
Reviewed-on: http://gerrit.mot.com/629277
Reviewed-by: Upgrade Build <dbbuild@motorola.com>
SLTApproved: Upgrade Build <dbbuild@motorola.com>
Submit-Approved: Upgrade Build <dbbuild@motorola.com>
Tested-by: Upgrade Build <dbbuild@motorola.com>
drivers: s5k5b3g: Fix row noise

The row noise came in with the trap and patch code
that samsung lsi had provided to fix a known
sensor hardware issue with stream on. ((CR))

The patch now has the correct noise settings for the
sensor.

Change-Id: Icb92b86485ddd13619739cc353e98de1aee13b33
Signed-off-by: Elena Satraitis <w04888@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/603627
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Paul Sheldon <psheldon@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
SLTApproved: Maulik Desai <amd093@motorola.com>
misc: msp430: properly set error code for BREATH ioctl

A user's BREATH vote request can not fail so set the error code to
success.

Change-Id: Icffe6b364633359afd2dc6f4df9f27e97df19245
Signed-off-by: Jared Suttles <jsuttles@motorola.com>
Signed-off-by: Joe Swantek <w98568@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/600402
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Patrick Auchter <auchter@motorola.com>
Reviewed-by: Christian Flowers <flowers@motorola.com>
Reviewed-by: Joseph Swantek <jswantek@motorola.com>
Reviewed-by: Fred Fettinger <fettinge@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
SLTApproved: Stephen Rossbach <rossbach@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>