bluesleep: Don't wait for uart tx queue to flush

* UART tx queue created rare issues of BT resetting due to some error.
* This patch will help entering lpm faster.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Revert "cpufreq: interactive: Simplify frequency calculations"

This reverts commit dab8fc00db2dbef858e1f441444b8ddff32ea2fe.
cpufreq: cpuboost: Use hotplug infrastructure

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpufreq: cpu-boost: Fix cores getting stuck. Finally.

* In exclusive hotplug system, if a core is not taken down
  explicitly, it is observed that it gets stuck at input
  boost frequency.
* This fix resolves this issue completely.
* Root cause seems to be removal work is lost if queued on
  sibling cores. So simply fix this by queuing on boot CPU.

* Finally, I can use min_cpus_online > 1 for hotplug drivers
  without any issue.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpufreq: interactive: Allow go_hispeed to be disabled

Specify 0 for go_hispeed_load to disable it.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpufreq: interactive: Do not consider changed limits

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpufreq: interactive: Add target_loads_down freq selection

Using a single set of target loads causes an excessive number
of frequency changes.  Reduce by having a mode that allows
for separate load factos for "up" frequency selection and
"down" frequency selection.

If user-space specifies target_loads_down then the new
duel mode frequency selection will be used and frequencies
will be scaled up to meet the load requirements but they
will only be scaled down if the can be scaled down without
violating the down target loads.

If user-space does not store a value in target_loads_down
then this change makes no functional difference in the
governor.

neo: Cleanup hard coded values. These values need to come from
     userspace.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: hotplug: Increase boosted CPUs by default

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: Update compress device name

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
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: Pranav Vashi <neobuddy89@gmail.com>
seq_file: remove "%n" usage from seq_file users

All seq_printf() users are using "%n" for calculating padding size,
convert them to use seq_setwidth() / seq_pad() pair.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Joe Perches <joe@perches.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ravi Kumar <rsiddoji@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: qdsp6v2: Add a new waitqueue state for mem map/unmap

All of the commands being sent to the DSP are using cmd_state flag
which can be overwritten when several commands are sent at the same
time. This results in Memory map command timing out. The change will
separate the memory flag from flags for other commands so that they
do not overwrite each other.

Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>