arm: Remove no-longer-required RCU_NONIDLE wrapper

Commit 21111be8 "ARM: Fix negative idle stats for offline cpu" moved call
to cpu_die() to occur outside of rcu_idle_enter()/rcu_idle_exit() section.
As a result, the RCU_NONIDLE() wrapper to complete() call in
arch/arm/kernel/process.c:cpu_die() is no longer required (and is
technically incorrect to have). Removing RCU_NONIDLE() wrapper also removes
this warning seen during CPU offline:

[Note: Below message has been edited to fit 75-char per line limit.
Insignificant portions of warning message has been removed in each line.]

------------[ cut here ]------------
WARNING: at kernel/rcutree.c:456 rcu_idle_exit_common+0x4c/0xe0()
Modules linked in:
(unwind_backtrace+0x0/0x120) from (warn_slowpath_common+0x4c/0x64)
(warn_slowpath_common+0x4c/0x64) from (warn_slowpath_null+0x18/0x1c)
(warn_slowpath_null+0x18/0x1c) from (rcu_idle_exit_common+0x4c/0xe0)
(rcu_idle_exit_common+0x4c/0xe0) from (rcu_idle_exit+0xa8/0xc0)
(rcu_idle_exit+0xa8/0xc0) from (cpu_die+0x24/0x5c)
(cpu_die+0x24/0x5c) from (cpu_idle+0xdc/0xf0)
(cpu_idle+0xdc/0xf0) from (0x8160)
---[ end trace 61bf21937a496a37 ]---

Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Change-Id: I721e6b20651674e6f6f584cf8d814af00b688c91
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug: decrease the jiffies for the scheduled works.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug: fix the detection of pending works, fix the cancel work calls, change the count condition to 10, and exported it to userspace by the name of sampling_rate. The change from 4 to 10 should help filtering low load spikes when the device is under stress.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: protect the cpu online/offline with some mutexes so that the watchdog doesn't trigger and the device reboots. Also export sample_timer to the userspace so that the users can control how often they want the hotplug decision work to check for load changes.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: general cleanup of the driver. Less clutter and less bullshit. Removed _thalamus as the author and copyright by his request.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug: fix dual-core and quad-core toggles.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug: add back a small buffer to make an average of the load based on the last 9 loads in the last 9 samples. Will had a ringbuffer in the original code so this is not new at all, just made a little rework comparing to the original buffer implementation.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
PLACEHOLDER: lock device as a quad core on intensive GPU work.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: fix the enable_all_threshold, previous value was just for testing.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug: lets consider 15 loads instead of 10.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
march armv7-a

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
block/partitions: optimize memory allocation in check_partition()

Currently, sizeof(struct parsed_partitions) may be 64KB in 32bit arch, so
it is easy to trigger page allocation failure by check_partition,
especially in hotplug block device situation(such as, USB mass storage,
MMC card, ...), and Felipe Balbi has observed the failure.

This patch does below optimizations on the allocation of struct
parsed_partitions to try to address the issue:

- make parsed_partitions.parts as pointer so that the pointed memory can
  fit in 32KB buffer, then approximate 32KB memory can be saved

- vmalloc the buffer pointed by parsed_partitions.parts because 32KB is
  still a bit big for kmalloc

- given that many devices have the partition count limit, so only
  allocate disk_max_parts() partitions instead of 256 partitions always

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Reported-by: Felipe Balbi <balbi@ti.com>
Cc: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>