mm/oom_kill.c (affects lowmemorykiller): make tasks with oom_score_adj = -1000 unkillable

Signed-off-by: artas182x <artas182x@gmail.com>
Add ARM CPU topology

** This is a combination of 12 commits.
** The first commit's message is:
Add ARM cpu topology definition

(Patch accepted by Russell for 3.1:
http://www.spinics.net/lists/arm-kernel/msg131273.html)

The affinity between ARM processors is defined in the MPIDR register.
We can identify which processors are in the same cluster,
and which ones have performance interdependency. We can define the
cpu topology of ARM platform, that is then used by sched_mc and sched_smt.

The default state of sched_mc and sched_smt config is disable.
When enabled, the behavior of the scheduler can be modified with
sched_mc_power_savings and sched_smt_power_savings sysfs interfaces.

Changes since v4 :
*  Remove unnecessary parentheses and blank lines

Changes since v3 :
* Update the format of printk message
* Remove blank line

Changes since v2 :
* Update the commit message and some comments

Changes since v1 :
* Update the commit message
* Add read_cpuid_mpidr in arch/arm/include/asm/cputype.h
* Modify header of arch/arm/kernel/topology.c
* Modify tests and manipulation of MPIDR's bitfields
* Modify the place and dependancy of the config
* Modify Noop functions

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>

** This is the 2nd commit message:

ARM: cpu topology: fix warning

kernel/sched.c:7354:2: warning: initialization from incompatible pointer type

Align cpu_coregroup_mask prototype interface with sched_domain_mask_f typedef
use int cpu instead of unsigned int cpu

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>

** This is the 3rd commit message:

ARM: cpu topology: Add update_cpu_topology function

arch_update_cpu_topology function is called by the scheduler
before building its sched_domain hierarchy. Prepare the update
of the cpu topology masks in this function in addition to set
it in the the store_cpu_topology which is executed only once per cpu.

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>

** This is the 4th commit message:

ARM: cpu topology: modify cpu topology

Modify the CPU topology policy according to the sched_mc level and the cortex family

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>

** This is the 5th commit message:

ARM: scheduler: add a cpu_power function

Add an architecture specific function for setting cpu_power

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>

** This is the 6th commit message:

ARM: cpu topology: Modify cpu_power according to sched_mc level

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>

** This is the 7th commit message:

ARM: cpu topology: Modify cpu_power according to cpufreq

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>

** This is the 8th commit message:

ARM: cpu topology: Add asym topology flag for using cpu0 1st

Modify the CPU sched_domain flags in powersave mode for using the cpu0 in ched_mc powersave mode

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>

** This is the 9th commit message:

ARM: cpu topology: Add debugfs interface for cpu_power

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>

** This is the 10th commit message:

sched: Ensure cpu_power periodic update

With a lot of small tasks, the softirq sched is nearly never called
when no_hz is enable. The load_balance is mainly called with
the newly_idle mode which doesn't update the cpu_power.
Add a next_update field which ensures a maximum update period when
there is short activity

Signed-off-by: Vincent Guittot <vincent.guittot at linaro.org>

** This is the 11th commit message:

ARM: scheduler: add a missing part
This fix adds a missing part in the [RFC 07/11].

Signed-off-by: Vincent Guittot <vincent.guittot at linaro.org>

** This is the 12th commit message:

sched: nohz_idle_balance

clear rq->nohz_balance_kick before returning

if idle equals CPU_IDLE, we return and could let nohz_balance_kick set
rq->nohz_balance_kick is tested in nohz_balancer_kick before triggering a SOFTIRQ on the ilb.
If this_rq->nohz_balance_kick stay to 1, the ilb will no be triggered until it wakes up and performs a normal load_balance which will clear the nohz_balance_kick

Signed-off-by: Vincent Guittot <vincent.guittot at linaro.org>
Signed-off-by: artas182x <artas182x@gmail.com>
OMAP4: battery: capacity detection.

Capacity could be detected when it is not charging.
If charge status set to POWER_SUPPLY_STATUS_NOT_CHARGING
capacity detection path is omitted.

Add this state to let capacity detection happen.

Change-Id: I34a8295470457423d25cc2ec42e2498682339dcc
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
Signed-off-by: artas182x <artas182x@gmail.com>
Wlan port from stock kernel, other small fixes
mac80211: report OBSS beacons

If there's an interface in AP mode, OBSS beacons
are needed by hostapd/wpa_s to implement logic to
enable/disable protection etc. Report the frames
and set the capability flag.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: artas182x <artas182x@gmail.com>
Revert "mac80211: report OBSS beacons"

This reverts commit 8c88a18dd3c0ac27c7e0d4c0f31f7e93989a9152.