acpuclock-8064.c: Fix freq table
Signed-off-by: Seongmin Park <r_data@naver.com>
Update defconfig
Signed-off-by: Seongmin Park <r_data@naver.com>
sweep2wake: add lock up detection and re-init if detected

Signed-off-by: faux123 <reioux@gmail.com>
sweep2wake: force reinit upon detection of lock up

also added more debugging messages to narrow down exact cause

Signed-off-by: faux123 <reioux@gmail.com>
sweep2wake: add more debugging and re-organized reset code when lock up

Signed-off-by: faux123 <reioux@gmail.com>
sweep2wake: another attempt to re-init the touch driver

Signed-off-by: faux123 <reioux@gmail.com>
sweep2wake: release all touch events before enable irq in early suspend

per conversation with showp1984

Signed-off-by: faux123 <reioux@gmail.com>
Revert "final color config for pa 3.0"

This reverts commit 81c5fa82e2071ce13b5e6a6600e90a484b080fc1.
drivers: input: touch filter control enablement

1) Turn off accuracy filter by default and add a switch to turn it
on. Since it is off by default, users with issues should be fixed I
hope.  Good practice will be to turn off, set params, and turn on to
that the touchscreen is not disrupted if the user is interacting with
it.

To enable:
echo 1 > /sys/devices/virtual/input/lge_touch/accuracy_filter_enable

To disable:
echo 0 > /sys/devices/virtual/input/lge_touch/accuracy_filter_enable

2) Allow stock defaults to be set on init so when a user decides they
want to enable the filter, they will have reasonable defaults ready to
go.

3) TESTING ONLY - Allow Jitter filter control to be turned on in a
similar way and allow the adjust_margin parameter to be adjusted.  I
thought this might be useful for stylus control or users with big hands
etc, but after initial testing it doesn't seem to be useful at all and
makes the touch screen very hard to use. We will leave in for more
testing for now. Will likely pull unless it proves to be useful for some
purpose.

/sys/devices/virtual/input/lge_touch/adust_margin
/sys/devices/virtual/input/lge_touch/jitter_filter_enable

Notes: The stock kernel already allows all these parameters to be set in
one command as below. These recent changes initiated by Franco opens
each component up so that apps/scripts can more easily read the
variables. Since we add the ability to read by component, it makes sense
to also allow write by component and makes it easier to understand what
variables are being adjusted.

echo "accuracy_filter_enable ignore_pressure_gap delta_max
touch_max_count max_pressure direction_count time_to_max_pressure" >
/sys/devices/virtual/input/lge_touch/accuracy/sys/devices/virtual/input/lge_touch/accuracy

echo "jitter_filter_enable adjust_margin" >
/sys/devices/virtual/input/lge_touch/accuracy/sys/devices/virtual/input/lge_touch/jitter
Conflicts:

	drivers/input/touchscreen/lge_touch_core.c
Revert "+ "nohz/sched: delay going tickless when CPU is loaded" - http://lists.infradead.org/pipermail/linux-arm-kernel/2011-January/040165.html"

This reverts commit be7f1440c6b4a6466378c5bc639083b5b8640258.
Revert "Reduced Android Logger RAM usage. TNX to sakindia123@xda for point."

This reverts commit 33f96d3868709bd8fd823eda56e8f7c8b90dbba1.
Revert "LOAD_FREQ (4*HZ+61) avoids loadavg Moire"

This reverts commit 17b007221e72a029ade4f257ccc87ca22324cb71.
Makefile: Remove some flags
Signed-off-by: Seongmin Park <r_data@naver.com>
Makefile: Add mtune flag (Thanks to faux123)
Signed-off-by: Seongmin Park <r_data@naver.com>
rwsem: steal writing sem for better performance

Commit 5a50508 changes to rwsem from mutex, caused aim7 fork_test
performance to dropped 50%. Yuanhan liu did an analysis, found it was
caused by strict sequential writing. Ingo suggest stealing sem writing from
front task in wait queue. https://lkml.org/lkml/2013/1/29/84

So does this patch.
In this patch, I just allow write stealing to happen when the first waiter
is also writer. The performance fully is now fully recovered.

Reported-by: lkp@linux.intel.com
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Alex Shi <alex.shi@intel.com>
mako: charger: disable hsic host and mdm driver in charger mode

In off-mode charging, hsic host driver never release wake_lock.
Due to this, system cannot enter the suspend during off-mode
charging. This patch disable the hsic host driver and mdm
driver in off-mode charging to reduce power consumption.

Change-Id: I8580af1d5a9d754982b198c9bd47a98e4b69c725

Conflicts:

	arch/arm/mach-msm/lge/mako/board-mako.c
fat: eliminate iterations in fat_search_long and __fat_readdir in case of EOD

From: Namjae Jeon <namjae.jeon@samsung.com>

When doing lookups via fat_search_long(), we can stop checking for
further entries if we detect End of Directory, i.e. if (de->name[0] ==
0x00).The current code traverses the cluster chain of a directory until a hit
is found or till the last cluster for that directory, ignoring the EOD
mark. Fix this.
Likewise,when readdir(3) is called, we can stop checking for further
entries in __fat_readdir() when we hit EOD.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ravishankar N <ravi.n1@samsung.com>
tmpfs: add support for read_iter and write_iter

Convert tmpfs do_shmem_file_read() to shmem_file_read_iter().
Make file_read_iter_actor() global so tmpfs can use it too: delete
file_read_actor(), which was made global in 2.4.4 for use by tmpfs.
Replace tmpfs generic_file_aio_write() by generic_file_write_iter().

Signed-off-by: Hugh Dickins <hughd@google.com>
modified for Mako from LKML reference

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

Conflicts:

	mm/filemap.c
ext4: add support for read_iter and write_iter

use the generic_file_read_iter(), create ext4_file_write_iter() based on
ext4_file_write(), and make ext4_file_write() a wrapper around
ext4_file_write_iter().

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: linux-ext4@vger.kernel.org
modified for Mako from LKML reference

Signed-off-by: faux123 <reioux@gmail.com>
rwsem-spinlock: let rwsem write lock stealable

We(Linux Kernel Performance project) found a regression introduced by
commit 5a50508, which just convert all mutex lock to rwsem write lock.
The semantics is same, but the results is quite huge in some cases.
After investigation, we found the root cause: mutex support lock
stealing. Here is the link for the detailed regression report:
    https://lkml.org/lkml/2013/1/29/84

Ingo suggests to add write lock stealing to rwsem as well:
    "I think we should allow lock-steal between rwsem writers - that
     will not hurt fairness as most rwsem fairness concerns relate to
     reader vs. writer fairness"

And here is the rwsem-spinlock version.

With this patch, we got a double performance increase in one test box
with following aim7 workfile:
    FILESIZE: 1M
    POOLSIZE: 10M
    10 fork_test

some /usr/bin/time output w/o patch      some /usr/bin/time_output with patch
----------------------------------------------------------------------------
Percent of CPU this job got: 369%        Percent of CPU this job got: 537%
Voluntary context switches: 640595016    Voluntary context switches: 157915561
----------------------------------------------------------------------------
You will see we got a 45% increase of CPU usage and saves about 3/4
voluntary context switches.
Here is the .nr_running filed for all CPUs from /proc/sched_debug.

output w/o this patch:
----------------------
cpu 00:   0   0   ...   0   0   0   0   0   0   0   1   0   1 .... 0   0
cpu 01:   0   0   ...   1   0   0   0   0   0   1   1   0   1 .... 0   0
cpu 02:   0   0   ...   1   1   0   0   0   1   0   0   1   0 .... 1   1
cpu 03:   0   0   ...   0   1   0   0   0   1   1   0   1   1 .... 0   0
cpu 04:   0   1   ...   0   0   2   1   1   2   1   0   1   0 .... 1   0
cpu 05:   0   1   ...   0   0   2   1   1   2   1   1   1   1 .... 0   0
cpu 06:   0   0   ...   2   0   0   1   0   0   1   0   0   0 .... 0   0
cpu 07:   0   0   ...   2   0   0   0   1   0   1   1   0   0 .... 1   0
cpu 08:   0   0   ...   1   0   0   0   1   0   0   1   0   0 .... 0   1
cpu 09:   0   0   ...   1   0   0   0   1   0   0   1   0   0 .... 0   1
cpu 10:   0   0   ...   0   0   0   2   0   0   1   0   1   1 .... 1   2
cpu 11:   0   0   ...   0   0   0   2   2   0   1   0   1   0 .... 1   2
cpu 12:   0   0   ...   2   0   0   0   1   1   3   1   1   1 .... 1   0
cpu 13:   0   0   ...   2   0   0   0   1   1   3   1   1   0 .... 1   1
cpu 14:   0   0   ...   0   0   0   2   0   0   1   1   0   0 .... 1   0
cpu 15:   0   0   ...   1   0   0   2   0   0   1   1   0   0 .... 0   0
output with this patch:
-----------------------
cpu 00:   0   0   ...   1   1   2   1   1   1   2   1   1   1 .... 1   3
cpu 01:   0   0   ...   1   1   1   1   1   1   2   1   1   1 .... 1   3
cpu 02:   0   0   ...   2   2   3   2   0   2   1   2   1   1 .... 1   1
cpu 03:   0   0   ...   2   2   3   2   1   2   1   2   1   1 .... 1   1
cpu 04:   0   1   ...   2   0   0   1   0   1   3   1   1   1 .... 1   1
cpu 05:   0   1   ...   2   0   1   1   0   1   2   1   1   1 .... 1   1
cpu 06:   0   0   ...   2   1   1   2   0   1   2   1   1   1 .... 2   1
cpu 07:   0   0   ...   2   1   1   2   0   1   2   1   1   1 .... 2   1
cpu 08:   0   0   ...   1   1   1   1   1   1   1   1   1   1 .... 0   0
cpu 09:   0   0   ...   1   1   1   1   1   1   1   1   1   1 .... 0   0
cpu 10:   0   0   ...   1   1   1   0   0   1   1   1   1   1 .... 0   0
cpu 11:   0   0   ...   1   1   1   0   0   1   1   1   1   2 .... 1   0
cpu 12:   0   0   ...   1   1   1   0   1   1   0   0   0   1 .... 2   1
cpu 13:   0   0   ...   1   1   1   0   1   1   1   0   1   2 .... 2   0
cpu 14:   0   0   ...   2   0   0   0   0   1   1   1   1   1 .... 2   2
cpu 15:   0   0   ...   2   0   0   1   0   1   1   1   1   1 .... 2   2
------------------------------------------------------------------------
Where you can see that CPU is much busier with this patch.
v2: make it stealable at __down_write_trylock as well, pointed by Michel

Reported-by: LKP project <lkp@linux.intel.com>
Suggested-by: Ingo Molnar <mingo@kernel.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Michel Lespinasse <walken@google.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>