prcmu-debug: Remove ARM OPP code

As it conflicts with LiveOPP code (The more cpufreq steps mess up prcmu debug driver).
And this code prevents us from having more available steps (can not boot).

Signed-off-by: cocafe <cocafehj@gmail.com>
LiveOPP: Recover ARM 100OPP PLLARM

To fix dead issue from 900 -> 300.

Signed-off-by: cocafe <cocafehj@gmail.com>
LiveOPP: Update to 1.0.1

Thanks @cocafe
LiveOPP: various improvements

Increase vbbn voltage for 1100 MHz step - @cocafe
Enable 100 MHz step - @cocafe
Adjust varm voltage for 1050-1250 MHz steps - ace2nutzer@xda-developers.com
Enable 300 MHz step
db8500-prcmu: Updates from cocore
Courtesy @cocafe
clock-db8500: Add arm_pll clock

Note: smp_twd is armss clock.

Signed-off-by: cocafe <cocafehj@gmail.com>
cpufreq: Optimize cpufreq_frequency_table_verify()

cpufreq_frequency_table_verify() is rewritten here to make it more logical
and efficient.
 - merge multiple lines for variable declarations together.
 - quit early if any frequency between min/max is found.
 - don't call cpufreq_verify_within_limits() in case any valid freq is
   found as it is of no use.
 - rename the count variable as found and change its type to boolean.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
misc: Clean up warnings

Signed-off-by: cocafe <cocafehj@gmail.com>
prcmu-qos-power: disable all qos ARM_KHZ requirements
pm: Remove most of ARM KHz Qos requirements

When requires ARM KHz QoS will override cpufreq min value.
That's why we "can not" set min value when touch booster is enabled,
We set it, then touch booster overrides it.

In other words, cpufreq min value control in userspace will have no effect.

Experimental still.

Signed-off-by: cocafe <cocafehj@gmail.com>
mali/ux500: Add GPU OC, beta version

Signed-off-by: cocafe <cocafehj@gmail.com>
mali/ux500: Add fullspeed interface

Some users reported that their GPU clocked at 199 kHz.
When ape opp50 is required, mali clock will be divided by 2.
Namely, 399 kHz goes to 199 kHz.
Now, added an interface to monitor this.
Say 1 to set opp100, say 0 to set opp50.

Signed-off-by: cocafe <cocafehj@gmail.com>
mali/ux500: Fix bugs

Signed-off-by: cocafe <cocafehj@gmail.com>
mali/ux500: GPU OC 1.0.1

1. Adjust DVFS table
2. Get rid of setting boost index manually
3. Various changes, code style

Signed-off-by: cocafe <cocafehj@gmail.com>
mm: kswapd inherit prio

When kswapd is awoken due to reclaim by a running task, set the priority of
kswapd to that of the calling task thus making memory reclaim cpu activity
affected by nice level.

-ck
AIO: Don't plug the I/O queue in do_io_submit() Asynchronous I/O latency to a solid-state disk greatly increased between the 2.6.32 and 3.0 kernels. By removing the plug from do_io_submit(), we observed a 34% improvement in the I/O latency.

Unfortunately, at this level, we don't know if the request is to
a rotating disk or not.

Change-Id: I7101df956473ed9fd5dcff18e473dd93b688a5c1
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: linux-aio@kvack.org
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Disable Gentle Fair Sleepers
cfg80211: Fix memory leak

When a driver requests a specific regulatory domain after cfg80211 already
has one, a struct ieee80211_regdomain is leaked.

Change-Id: Id28fc9861b9c911a97bd242439eabca097d76258
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: b7566fc363e23f0efd3fa1e1460f9421cdc0d77e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[mattw@codeaurora.org: trivially backport to the msm-3.4 kernel]
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
n_tty: Fix n_tty_write crash when echoing in raw mode

The tty atomic_write_lock does not provide an exclusion guarantee for
the tty driver if the termios settings are LECHO & !OPOST.  And since
it is unexpected and not allowed to call TTY buffer helpers like
tty_insert_flip_string concurrently, this may lead to crashes when
concurrect writers call pty_write. In that case the following two
writers:
* the ECHOing from a workqueue and
* pty_write from the process
race and can overflow the corresponding TTY buffer like follows.
If we look into tty_insert_flip_string_fixed_flag, there is:
  int space = __tty_buffer_request_room(port, goal, flags);
  struct tty_buffer *tb = port->buf.tail;
  ...
  memcpy(char_buf_ptr(tb, tb->used), chars, space);
  ...
  tb->used += space;
so the race of the two can result in something like this:
              A                                B
__tty_buffer_request_room
                                  __tty_buffer_request_room
memcpy(buf(tb->used), ...)
tb->used += space;
                                  memcpy(buf(tb->used), ...) ->BOOM
B's memcpy is past the tty_buffer due to the previous A's tb->used
increment.
Since the N_TTY line discipline input processing can output
concurrently with a tty write, obtain the N_TTY ldisc output_lock to
serialize echo output with normal tty writes.  This ensures the tty
buffer helper tty_insert_flip_string is not called concurrently and
everything is fine.
Note that this is nicely reproducible by an ordinary user using
forkpty and some setup around that (raw termios + ECHO). And it is
present in kernels at least after commit
d945cb9cce20ac7143c2de8d88b187f62db99bdc (pty: Rework the pty layer to
use the normal buffering logic) in 2.6.31-rc3.
js: add more info to the commit log
js: switch to bool
js: lock unconditionally
js: lock only the tty->ops->write call
Change-Id: Ie0b03989fa8cfd6ffe40d1f770044fe7447dda05
References: CVE-2014-0196
Reported-and-tested-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Cherry-picked from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
branch: master
commit: 4291086
Needed some tweaks because there is no
  bddc715 2012-10-18 jslaby@suse.cz TTY: move ldisc data from tty_struct: locks

Signed-off-by: JP Abgrall <jpa@google.com>
Drivers: staging: android: Lower the max allowed RAM for logger

Lowered RAM values to get more free RAM:

LOGGER_LOG_MAIN: 2048*1024 -> 64*1024
LOGGER_LOG_EVENTS: 256*1024 -> 32*1024
LOGGER_LOG_RADIO: 1024*1024 -> 32*1024
LOGGER_LOG_SYSTEM: 256*1024 -> 64*1024
LOGGER_LOG_SF: 256*1024 -> 64*1024