ARMv7: Flush the vectors page using the base address

ARMv7: Flush the vectors page using the base address

With the domains removal patch, the vectors page is populated using the
kernel linear mapping address. However, the flush_icache_range()
function must be called on the high vectors address because the I-cache
is allowed to have aliases (or can even be ASID-tagged VIVT). Note that
on ARMv7 processors the D-cache is non-aliasing.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: stable@vger.kernel.org
ARM: Allow ASID 0 to be allocated to tasks

ARM: Allow ASID 0 to be allocated to tasks

Now that ASID 0 is no longer used as a reserved value, allow it to be
allocated to tasks.

Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Marc Zyngier <Marc.Zyngier@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
ARM: Set bit 22 in the PL310 (cache controller) AuxCtlr register

ARM: Set bit 22 in the PL310 (cache controller) AuxCtlr register

Clearing bit 22 in the PL310 Auxiliary Control register (shared
attribute override enable) has the side effect of transforming Normal
Shared Non-cacheable reads into Cacheable no-allocate reads.

Coherent DMA buffers in Linux always have a Cacheable alias via the
kernel linear mapping and the processor can speculatively load cache
lines into the PL310 controller. With bit 22 cleared, Non-cacheable
reads would unexpectedly hit such cache lines leading to buffer
corruption.

This patch ensures that bit 22 is set in the l2x0_init() function if
PL310 and not rely on the platform code to specify it. It also modifies
the 'aux' variable only if the actual register is written so that the
final printk displays the real hardware value.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Update
[PATCH] genirq: pm: Fix the enable ordering in resume
OMAP4: MFD: Modifying operational code to adjust for the compilation issue

Modifying operational code to adjust for the compilation issue:
drivers/mfd/twl6030-poweroff.c:28: warning: "TWL6030_PHOENIX_DEV_ON"
redefined include/linux/i2c/twl.h:473: note: this is the location
of the previous definition drivers/mfd/twl6030-poweroff.c

Change-Id: Ifa344bbdcf1348024c9f06ee83ca802f7de40407
Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>
ARM: net: JIT compiler for packet filters enabled by default

Signed-off-by: faux123 <reioux@gmail.com>

Conflicts:
	arch/arm/net/bpf_jit_32.c
Enable BPF_JIT
mmc: core: Increase write data timeout value for bad SDHC cards

SD2.0 specification says the max. timeout for writes is 250msecs
for SDHC cards. But when the card is almost full and there are too few
free sectors, the garbage collectors inside SD card  may take more time
and hence delaying the write more than 250msecs. This typically happens
with cards that don't adhere to specification. Based on this the timeout
is increased to 300msecs but still for some cards this is not sufficient.

Few SanDisk class4 SD cards violate the spec. and may take more time than
expected when the card is full. So increase the data timeout to 800msecs,
otherwise we might see file system corruption due to loss of important FS
metadata in timeouts.

Change-Id: Ie8f0616dbbb2a15d7dbe95cd49eeb2308a5badd1
Signed-off-by: Sujith Reddy Thumma <sthumma@codeaurora.org>
sched_features disable GENTLE_FAIR_SLEEPERS
Fuel Gauge: Add fuel gauging algorithms

FG module takes voltage, current and coulomb counter
readings from the PMIC, executes fuel gauging algorithms,
and outputs estimated battery state of charge to the
sysfs interface.

Change-Id: I182acbdb0bb69380a7452c1b3a99f198031fdf64
Signed-off-by: Max Herman <mherman@fsisys.com>
POWER: TWL6030_BCI: Integrate Fuel Gauge

Change-Id: I7564fb0c3eb617c1beba2dc0162db25b5799a8e5
Signed-off-by: Max Herman <mherman@fsisys.com>

Conflicts:
	drivers/power/Kconfig
	drivers/power/Makefile
	drivers/power/twl6030_bci_battery.c
	include/linux/i2c/twl.h
OMAP4: board: power: Add Fuel Gauge configuration

Change-Id: I81b3865daee3241d34f9209888010e3ba1e8984e
Signed-off-by: Max Herman <mherman@fsisys.com>

Conflicts:
	arch/arm/configs/tuna_defconfig
	arch/arm/mach-omap2/board-44xx-power.c

Conflicts:
	arch/arm/configs/tuna_defconfig
rq_stats: add run queue statistic collection to kernel tick scheduler

adapted from CAF reference for OMAP2 Platform

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	arch/arm/mach-omap2/Makefile
	kernel/time/tick-sched.c

Conflicts:
	arch/arm/mach-omap2/omap2plus-cpufreq.c

Conflicts:
	arch/arm/mach-omap2/omap2plus-cpufreq.c
LOAD_FREQ (4*HZ+61) avoids loadavg Moire
Since the OMAP board is using 128HZ as the default kernel timer we have to adapt the LOAD_FREQ constant to be exactly 4,61s like we wanted to.
block: strict rq_affinity
SCHEDULER: Autogroup patch group by current user android UID instead of task ID
irq: Set CPU affinity as soon as the irq thread is created

In an embedded target where IRQ affinities are pre-configured during
boot-time (and not modified through /proc/irq/../smp_affinity) during
run-time, the extra latency due to irq_thread_check_affinity can be
avoided during processing of the first interrupt with this patch.
Thoughts?

backported from Linux 3.5+ by faux123
procfs: add num_to_str() to speed up /proc/stat

== stat_check.py
num = 0
with open("/proc/stat") as f:
        while num < 1000 :
                data = f.read()
                f.seek(0, 0)
                num = num + 1
==

perf shows

    20.39%  stat_check.py  [kernel.kallsyms]    [k] format_decode
    13.41%  stat_check.py  [kernel.kallsyms]    [k] number
    12.61%  stat_check.py  [kernel.kallsyms]    [k] vsnprintf
    10.85%  stat_check.py  [kernel.kallsyms]    [k] memcpy
     4.85%  stat_check.py  [kernel.kallsyms]    [k] radix_tree_lookup
     4.43%  stat_check.py  [kernel.kallsyms]    [k] seq_printf

This patch removes most of calls to vsnprintf() by adding num_to_str()
and seq_print_decimal_ull(), which prints decimal numbers without rich
functions provided by printf().

On my 8cpu box.
== Before patch ==
[root@bluextal test]# time ./stat_check.py

real    0m0.150s
user    0m0.026s
sys     0m0.121s

== After patch ==
[root@bluextal test]# time ./stat_check.py

real    0m0.055s
user    0m0.022s
sys     0m0.030s

[akpm@linux-foundation.org: remove incorrect comment, use less statck in num_to_str(), move comment from .h to .c, simplify seq_put_decimal_ull()]
[andrea@betterlinux.com: avoid breaking the ABI in /proc/stat]
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrea Righi <andrea@betterlinux.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Glauber Costa <glommer@parallels.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Turner <pjt@google.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
backported from Linux 3.4-rc4 to Linux 3.0.x by faux123