Revert "OMAP4: PM: IVA AUTO RET relaxed workaround in idle path"

This reverts commit 6ed82199e376bd75dfa2b2cdd56f1dd0df5b04eb.
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

* 'for-linus' of git://git.kernel.dk/linux-block: (23 commits)
  Revert "cfq: Remove special treatment for metadata rqs."
  block: fix flush machinery for stacking drivers with differring flush flags
  block: improve rq_affinity placement
  blktrace: add FLUSH/FUA support
  Move some REQ flags to the common bio/request area
  allow blk_flush_policy to return REQ_FSEQ_DATA independent of *FLUSH
  xen/blkback: Make description more obvious.
  cfq-iosched: Add documentation about idling
  block: Make rq_affinity = 1 work as expected
  block: swim3: fix unterminated of_device_id table
  block/genhd.c: remove useless cast in diskstats_show()
  drivers/cdrom/cdrom.c: relax check on dvd manufacturer value
  drivers/block/drbd/drbd_nl.c: use bitmap_parse instead of __bitmap_parse
  bsg-lib: add module.h include
  cfq-iosched: Reduce linked group count upon group destruction
  blk-throttle: correctly determine sync bio
  loop: fix deadlock when sysfs and LOOP_CLR_FD race against each other
  loop: add BLK_DEV_LOOP_MIN_COUNT=%i to allow distros 0 pre-allocated loop devices
  loop: add management interface for on-demand device allocation
  loop: replace linked list of allocated devices with an idr index
  ...
(cherry picked from commit 5ccc38740a283aba81a00e92941310d0c1aeb2ee)
net: wireless: bcmdhd: Report proper mcs rate mask: Setting proper mcs rate mask allows to connect in 802.11n-only mode - https://android.googlesource.com/kernel/omap/+/6a5fe817ac903697a9e996af18bc74f0d8e82ce9
cpufreq: interactiver governor: Add a time view concept

CPUFreq governors are always a tradeoff between power vs performance.
For low power UCs we want to have a less reponsive cpufreq governor that
does not respond or react to each load pick.
However when scrolling on the screen or during webbrowsing we need a more
responsive governor that interact or esponse to each load variation.

To detect which kind of application we have, we'll rely on the history of
the load. if the the average over the load history is high that means we
need to be more responsive so we change the governor paramters in that
direction.
if the average over the load history is low thatmeans we are in low power
UCs so we change the governor parameter to be less responsive

Change-Id: Ifd55ac4cfbc1bd9eded4ae603b158054c6169e8c
Signed-off-by: Nicole Chalhoub <n-chalhoub@ti.com>
Signed-off-by: Taras Kondratiuk <taras@ti.com>
(cherry picked from commit c9d2e290d40f629306ba4cd020be1d71ed5e1d23)
cpufreq: interactive governor: Fix not uniform buf filling & memory corruption

Each CPU has it's own load history buffer, but all they use shared
<history_load_index> variable, this lead to not uniform filling
of the cpu's circular buffers. Only about half of buffer is updated
during each buffer rewriting cycle that obligate governor to use
outdated data during freq tuning.

Moreover access to <history_load_index> variable is not atomic, that
create race conditions. Simultaneous increment could cause situation
where such check:

        if (++history_load_index == sampling_periods)
                history_load_index = 0;

not safe and buffer overflow will not be prevented. That will lead
to memory corruption.

To avoid such problems this patch move buffer-index variable to
<cpufreq_interactive_cpuinfo> structure, which is separate for each CPU.
Also, buffer overflow checking will be paranoidly changed.

Change-Id: I333a4462be17816372a7a57529811d87930058c0
Signed-off-by: Leonid Iziumtsev <x0153368@ti.com>
(cherry picked from commit befb3fe3e38d88bc1872d99748c246c26406315d)
cpufreq: interactive: take idle notifications only when active - https://github.com/android/kernel_common/commit/22a51ab6e21de740c1b555f9a03626d28aaebdf3
cpufreq: interactive: keep freezer happy when not current governor - https://github.com/android/kernel_common/commit/5ff8407798f1d8c44f3165bc535676a2a897666b
cpufreq: interactive: handle speed up and down in the realtime task - https://github.com/android/kernel_common/commit/f8aa05d96a0d18416d2627c493f7dc9bc5324901
cpufreq: interactive: remove input_boost handling - https://github.com/android/kernel_common/commit/4e27eb56e819745a1b184f278d7f3dd3887a456c
cpufreq: interactive: fix compiling errors from the latest commits
Kernel Version: ak.050.jb.exp - Update Interactive Governor
Update .gitignore
cyanogenmod_ak_defconfig: Update config, Experimental always build -O2