linux-sg2042/arch
David S. Miller 4ca9a23765 sparc64: Guard against flushing openfirmware mappings.
Based almost entirely upon a patch by Christopher Alexander Tobias
Schulze.

In commit db64fe0225 ("mm: rewrite vmap
layer") lazy VMAP tlb flushing was added to the vmalloc layer.  This
causes problems on sparc64.

Sparc64 has two VMAP mapped regions and they are not contiguous with
eachother.  First we have the malloc mapping area, then another
unrelated region, then the vmalloc region.

This "another unrelated region" is where the firmware is mapped.

If the lazy TLB flushing logic in the vmalloc code triggers after
we've had both a module unload and a vfree or similar, it will pass an
address range that goes from somewhere inside the malloc region to
somewhere inside the vmalloc region, and thus covering the
openfirmware area entirely.

The sparc64 kernel learns about openfirmware's dynamic mappings in
this region early in the boot, and then services TLB misses in this
area.  But openfirmware has some locked TLB entries which are not
mentioned in those dynamic mappings and we should thus not disturb
them.

These huge lazy TLB flush ranges causes those openfirmware locked TLB
entries to be removed, resulting in all kinds of problems including
hard hangs and crashes during reboot/reset.

Besides causing problems like this, such huge TLB flush ranges are
also incredibly inefficient.  A plea has been made with the author of
the VMAP lazy TLB flushing code, but for now we'll put a safety guard
into our flush_tlb_kernel_range() implementation.

Since the implementation has become non-trivial, stop defining it as a
macro and instead make it a function in a C source file.

Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-04 20:16:00 -07:00
..
alpha Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
arc ARC: [SMP] Enable icache coherency 2014-06-26 11:59:01 +05:30
arm Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2014-07-28 11:35:30 -07:00
arm64 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2014-07-28 11:35:30 -07:00
avr32 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
blackfin blackfin: vmlinux.lds.S: reserve 32 bytes space at the end of data section for XIP kernel 2014-07-26 08:32:50 +08:00
c6x DeviceTree for 3.16: 2014-06-04 10:02:38 -07:00
cris cris: update comments for generic idle conversion 2014-06-06 16:08:18 -07:00
frv sys_sgetmask/sys_ssetmask: add CONFIG_SGETMASK_SYSCALL 2014-06-04 16:54:14 -07:00
hexagon Hexagon: Delete stale barrier.h 2014-05-01 10:09:47 -07:00
ia64 ia64: arch/ia64/include/uapi/asm/fcntl.h needs personality.h 2014-06-23 16:47:44 -07:00
m32r
m68k m68k: Export mach_random_get_entropy to modules 2014-07-11 10:37:53 +02:00
metag Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
microblaze Microblaze patches for 3.16-rc1 2014-06-05 16:15:33 -07:00
mips A bunch of one-liners (except the s390 one). 2014-07-01 09:27:34 -07:00
mn10300 sys_sgetmask/sys_ssetmask: add CONFIG_SGETMASK_SYSCALL 2014-06-04 16:54:14 -07:00
openrisc DeviceTree for 3.16: 2014-06-04 10:02:38 -07:00
parisc parisc: Eliminate memset after alloc_bootmem_pages 2014-07-24 22:05:08 +02:00
powerpc Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2014-07-28 11:34:31 -07:00
s390 s390: fix restore of invalid floating-point-control 2014-07-16 10:48:12 +02:00
score
sh sh: also try passing -m4-nofpu for SH2A builds 2014-07-23 15:10:54 -07:00
sparc sparc64: Guard against flushing openfirmware mappings. 2014-08-04 20:16:00 -07:00
tile Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
um um: segv: Save regs only in case of a kernel mode fault 2014-07-20 13:39:27 +02:00
unicore32 unicore32: Remove ARCH_HAS_CPUFREQ config option 2014-06-20 08:22:41 +08:00
x86 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-07-27 09:57:16 -07:00
xtensa Xtensa fixes for 3.16: 2014-07-15 22:18:30 -07:00
.gitignore
Kconfig