Revert "Revert "atmel_mxt1188S: Consolidate input report calls""

This reverts commit 83b0b49a911621e36d3d96303b79647015ab2b65.
Revert "(4/x): input: removed toucbhoost_func"

This reverts commit 4822413b5c8a288595730a3250fa1e533002e9eb.

Conflicts:
	drivers/input/touchscreen/touchboost.c
Revert "touchboost: gpu_idle stays false now for at least 20 * 5 ms"

This reverts commit d4fa602cacfcef3238c30f8775051d0c9ba1fcc5.
Revert "(3/x): big thx to @franciscofranco for his generic touchboost driver"

This reverts commit d54f93b5bfd0f3e2ce54e8b6fcbedc4f4def16d1.

Conflicts:
	include/linux/hotplug.h
prima: add WAKE_UP_IDLE routine
prima: Fix 5G channel settings for Taiwan.

1. Make Japan mapping to REGDOMAIN_WORLD.
2. Make Taiwan mapping to REGDOMAIN_JAPAN.

b/9382238

Change-Id: Idefdd735a9181e63c150f513ca1ea56ffa401b5b
Signed-off-by: jim1_lin <jim1_lin@asus.com>
prima: release v3.2.2.17b

	git://codeaurora.org/external/wlan/prima.git

	4990d1c Wlan: Release 3.2.2.17B
	d6b217f wlan: DTIM3 changed to DTIM1 after roaming
	f83a6cd Wlan: Release 3.2.2.17A
	2f45a43 Fix for "crash in pMac->cfg.gCfgEntry"
	c8faf30 wlan: Change regulatory followed customer request
	82e75bf wlan: Add msecs_to_jiffies() to wake lock argument
	f1bb518 Revert "wlan: Release 3.2.2.18"
	a65fc60 Revert "wlan: Set the country code in cfg before creating channel list."
	d235ff4 Revert "wlan: Release 3.2.2.19"
	2742bc2 Revert "wlan: Decrease SAP timeout from 100 to 10 seconds"
	768b6f5 Revert "wlan: Change RX wakelock to 50 milliseconds"
	4edbdc7 Revert "wlan: Fix for spectrum management bit in AddBss for SM disabled AP"
	2b46b25 Revert "wlan: Release 3.2.2.20"
	0647d89 wlan: Release 3.2.2.20
	e1c76a3 wlan: Fix for spectrum management bit in AddBss for SM disabled AP
	b8493a3 wlan: Change RX wakelock to 50 milliseconds
	476a501 wlan: Decrease SAP timeout from 100 to 10 seconds
	c883f13 wlan: Release 3.2.2.19
	4dbdab2 wlan: Set the country code in cfg before creating channel list.
	7cabdd8 wlan: Release 3.2.2.18

Signed-off-by: Iliyan Malchev <malchev@google.com>
(cherry picked from commit 3bafaebe43a88fbd951b02d257def2f7f1489bb3)
Revert "blx: Battery Life eXtender (BLX)"

This reverts commit b442e1b869869a6dd966e186c8e522088c78562b.

Conflicts:
	drivers/misc/Makefile
defconfig: use intelliactive by default
msm_otg: hack to allow externally powered usb host mode
HACK: add sysfs interface to ziddey's MSM OTG hack for N4

this allows for normal / OTG Hack based on user sysfs command.
minor code clean up as well.

Signed-off-by: Paul Reioux <reioux@gmail.com>
HACK USB OTG: fix logic derp

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	drivers/usb/otg/msm_otg.c
cifs: fix parsing of password mount option

commit e73f843a3235a19de38359c91586e9eadef12238 upstream.

The double delimiter check that allows a comma in the password parsing code is
unconditional. We set "tmp_end" to the end of the string and we continue to
check for double delimiter. In the case where the password doesn't contain a
comma we end up setting tmp_end to NULL and eventually setting "options" to
"end". This results in the premature termination of the options string and hence
the values of UNCip and UNC are being set to NULL. This results in mount failure
with "Connecting to DFS root not implemented yet" error.

This error is usually not noticable as we have password as the last option in
the superblock mountdata. But when we call expand_dfs_referral() from
cifs_mount() and try to compose mount options for the submount, the resulting
mountdata will be of the form

   ",ver=1,user=foo,pass=bar,ip=x.x.x.x,unc=\\server\share"

and hence results in the above error. This bug has been seen with older NAS
servers running Samba 3.0.24.

Fix this by moving the double delimiter check inside the conditional loop.

Changes since -v1

   - removed the wrong strlen() micro optimization.

Signed-off-by: Suresh Jayaraman <sjayaraman@suse.com>
Acked-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/namespace.c: making system wide mounting possible

Signed-off-by: Paul Reioux <reioux@gmail.com>
fs: sync: don't block the flusher thread waiting on IO

When sync does it's WB_SYNC_ALL writeback, it issues data Io and
then immediately waits for IO completion. This is done in the
context of the flusher thread, and hence completely ties up the
flusher thread for the backing device until all the dirty inodes
have been synced. On filesystems that are dirtying inodes constantly
and quickly, this means the flusher thread can be tied up for
minutes per sync call and hence badly affect system level write IO
performance as the page cache cannot be cleaned quickly.

We already have a wait loop for IO completion for sync(2), so cut
this out of the flusher thread and delegate it to wait_sb_inodes().
Hence we can do rapid IO submission, and then wait for it all to
complete.

Effect of sync on fsmark before the patch:

FSUse%        Count         Size    Files/sec     App Overhead
.....
     0       640000         4096      35154.6          1026984
     0       720000         4096      36740.3          1023844
     0       800000         4096      36184.6           916599
     0       880000         4096       1282.7          1054367
     0       960000         4096       3951.3           918773
     0      1040000         4096      40646.2           996448
     0      1120000         4096      43610.1           895647
     0      1200000         4096      40333.1           921048

And a single sync pass took:

  real    0m52.407s
  user    0m0.000s
  sys     0m0.090s

After the patch, there is no impact on fsmark results, and each
individual sync(2) operation run concurrently with the same fsmark
workload takes roughly 7s:

  real    0m6.930s
  user    0m0.000s
  sys     0m0.039s

IOWs, sync is 7-8x faster on a busy filesystem and does not have an
adverse impact on ongoing async data write operations.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
fs: sync: Make sync() satisfy many requests with one invocation

Dave Jones reported RCU stalls, overly long hrtimer interrupts, and
amazingly long NMI handlers from a trinity-induced workload involving
lots of concurrent sync() calls (https://lkml.org/lkml/2013/7/23/369).
There are any number of things that one might do to make sync() behave
better under high levels of contention, but it is also the case that
multiple concurrent sync() system calls can be satisfied by a single
sys_sync() invocation.

Given that this situation is reminiscent of rcu_barrier(), this commit
applies the rcu_barrier() approach to sys_sync().  This approach uses
a global mutex and a sequence counter.  The mutex is held across the
sync() operation, which eliminates contention between concurrent sync()
operations.  The counter is incremented at the beginning and end of
each sync() operation, so that it is odd while a sync() operation is in
progress and even otherwise, just like sequence locks.

The code that used to be in sys_sync() is now in do_sync(), and sys_sync()
now handles the concurrency.  The sys_sync() function first takes a
snapshot of the counter, then acquires the mutex, and then takes another
snapshot of the counter.  If the values of the two snapshots indicate that
a full do_sync() executed during the mutex acquisition, the sys_sync()
function releases the mutex and returns ("Our work is done!").  Otherwise,
sys_sync() increments the counter, invokes do_sync(), and increments
the counter again.

This approach allows a single call to do_sync() to satisfy an arbitrarily
large number of sync() system calls, which should eliminate issues due
to large numbers of concurrent invocations of the sync() system call.

Changes since v1 (https://lkml.org/lkml/2013/7/24/683):

o	Add a pair of memory barriers to keep the increments from
	bleeding into the do_sync() code.  (The failure probability
	is insanely low, but when you have several hundred million
	devices running Linux, you can expect several hundred instances
	of one-in-a-million failures.)

o	Actually CC some people who have experience in this area.

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>
Cc: Curt Wohlgemuth <curtw@google.com>
Cc: Jens Axboe <jaxboe@fusionio.com>
Cc: linux-fsdevel@vger.kernel.org

Signed-off-by: Paul Reioux <reioux@gmail.com>
cpufreq: intelliactive: intellidemand: tune for APQ8064T devices
Revert "Revert "(3/x): big thx to @franciscofranco for his generic touchboost driver""

This reverts commit 3af07ff57baffb81a213f7434ef8d750b94516ac.
Revert "Revert "touchboost: gpu_idle stays false now for at least 20 * 5 ms""

This reverts commit 99a452c61e11a625d17658395db889527d87af75.
Revert "Revert "(4/x): input: removed toucbhoost_func""

This reverts commit 8529cb61ae261b749d8fa4db4688271053a6b597.