kernel_optimize_test/arch/parisc/kernel
Helge Deller 24d0492b7d parisc: Fix TLB related boot crash on SMP machines
At bootup we run measurements to calculate the best threshold for when we
should be using full TLB flushes instead of just flushing a specific amount of
TLB entries.  This performance test is run over the kernel text segment.

But running this TLB performance test on the kernel text segment turned out to
crash some SMP machines when the kernel text pages were mapped as huge pages.

To avoid those crashes this patch simply skips this test on some SMP machines
and calculates an optimal threshold based on the maximum number of available
TLB entries and number of online CPUs.

On a technical side, this seems to happen:
The TLB measurement code uses flush_tlb_kernel_range() to flush specific TLB
entries with a page size of 4k (pdtlb 0(sr1,addr)). On UP systems this purge
instruction seems to work without problems even if the pages were mapped as
huge pages.  But on SMP systems the TLB purge instruction is broadcasted to
other CPUs. Those CPUs then crash the machine because the page size is not as
expected.  C8000 machines with PA8800/PA8900 CPUs were not affected by this
problem, because the required cache coherency prohibits to use huge pages at
all.  Sadly I didn't found any documentation about this behaviour, so this
finding is purely based on testing with phyiscal SMP machines (A500-44 and
J5000, both were 2-way boxes).

Cc: <stable@vger.kernel.org> # v3.18+
Signed-off-by: Helge Deller <deller@gmx.de>
2016-12-08 21:27:18 +01:00
..
.gitignore
asm-offsets.c parisc: Unbreak handling exceptions from kernel modules 2016-04-08 22:14:14 +02:00
audit.c parisc: add kernel audit feature 2013-11-07 22:27:20 +01:00
binfmt_elf32.c parisc: fix redefinition of SET_PERSONALITY 2013-03-02 20:15:28 +01:00
cache.c parisc: Fix TLB related boot crash on SMP machines 2016-12-08 21:27:18 +01:00
compat_audit.c parisc: add kernel audit feature 2013-11-07 22:27:20 +01:00
drivers.c parisc: use KERN_CONT when printing device inventory 2016-11-02 23:04:46 +01:00
entry.S parisc: Add cfi_startproc and cfi_endproc to assembly code 2016-10-05 22:54:40 +02:00
firmware.c parisc: Add break statements to pdc_pat_io_pci_cfg_read() 2016-08-02 16:44:33 +02:00
ftrace.c ftrace: Add return address pointer to ftrace_ret_stack 2016-08-24 12:15:14 +02:00
hardware.c parisc: add serial ports of C8000/1GHz machine to hardware database 2014-07-13 15:51:58 +02:00
head.S parisc: Fix ftrace function tracer 2016-04-14 17:47:19 +02:00
hpmc.S parisc: Add cfi_startproc and cfi_endproc to assembly code 2016-10-05 22:54:40 +02:00
inventory.c parisc: Fix printk continuations in system detection 2016-11-22 18:09:33 +01:00
irq.c parisc: Filter out spurious interrupts in PA-RISC irq handler 2015-09-08 15:31:16 +02:00
Makefile parisc: Fix ftrace function tracer 2016-04-14 17:47:19 +02:00
module.c parisc: Handle R_PARISC_PCREL32 relocations in kernel modules 2016-04-08 22:10:35 +02:00
pa7300lc.c
pacache.S parisc: Remove unnecessary TLB purges from flush_dcache_page_asm and flush_icache_page_asm 2016-12-07 09:01:21 +01:00
parisc_ksyms.c parisc: Avoid function pointers for kernel exception routines 2016-04-08 22:13:45 +02:00
pci-dma.c parisc: Fix race in pci-dma.c 2016-11-25 12:31:59 +01:00
pci.c parisc: Initialize PCI bridge cache line and default latency 2016-01-12 22:03:21 +01:00
pdc_chassis.c parisc: single_open() leaks 2013-05-05 00:10:41 -04:00
pdc_cons.c parisc: don't use module_init for non-modular core pdc_cons code 2015-06-16 14:12:30 -04:00
perf_asm.S
perf_images.h
perf.c parisc64: don't use module_init for non-modular core perf code 2015-06-16 14:12:30 -04:00
process.c exit_thread: remove empty bodies 2016-05-20 17:58:30 -07:00
processor.c parisc: Fix automatic selection of cr16 clocksource 2016-08-20 13:33:51 +02:00
ptrace.c parisc/ptrace: run seccomp after ptrace 2016-06-14 10:54:44 -07:00
real2.S parisc: Add cfi_startproc and cfi_endproc to assembly code 2016-10-05 22:54:40 +02:00
setup.c parisc: Fix races in parisc_setup_cache_timing() 2016-11-25 12:31:57 +01:00
signal.c parisc: Fix syscall restarts 2015-12-21 10:16:18 +01:00
signal32.c parisc: Fix SIGSYS signals in compat case 2016-03-31 12:28:37 +02:00
signal32.h constify copy_siginfo_to_user{,32}() 2013-11-09 00:16:29 -05:00
smp.c parisc: Check return value of smp_boot_one_cpu() 2016-09-20 18:02:36 +02:00
stacktrace.c
sys_parisc.c parisc: Drop alloc_hugepages and free_hugepages syscalls 2016-03-23 15:42:18 +01:00
sys_parisc32.c parisc: drop unused defines and header includes 2014-07-13 15:56:12 +02:00
syscall_table.S parisc: Wire up preadv2 and pwritev2 syscalls 2016-03-23 16:22:42 +01:00
syscall.S parisc: Use LINUX_GATEWAY_ADDR define instead of hardcoded value 2016-11-02 23:06:38 +01:00
time.c parisc: Switch to generic sched_clock implementation 2016-11-25 12:31:58 +01:00
topology.c
traps.c parisc: Show trap name in kernel crash 2016-10-11 20:52:47 +02:00
unaligned.c parisc: Move die_if_kernel() prototype into traps.h header 2016-06-05 08:49:01 +02:00
unwind.c parisc: Fix backtrace on PA-RISC 2016-06-04 22:05:07 +02:00
vmlinux.lds.S parisc: Move exception table into read-only section 2016-10-09 13:29:07 +02:00