linux/arch/parisc
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
..
configs mm/usercopy: get rid of CONFIG_DEBUG_STRICT_USER_COPY_CHECKS 2016-08-30 10:10:21 -07:00
include parisc: Purge TLB before setting PTE 2016-12-07 08:56:40 +01:00
kernel parisc: Fix TLB related boot crash on SMP machines 2016-12-08 21:27:18 +01:00
lib parisc: Add hardened usercopy feature 2016-10-06 22:10:19 +02:00
math-emu parisc: Fix typo in fpudispatch.c 2016-05-22 22:29:07 +02:00
mm parisc: Show trap name in kernel crash 2016-10-11 20:52:47 +02:00
oprofile oprofile: more whitespace fixes 2008-10-15 20:55:51 +02:00
defpalo.conf parisc: switch to gzip-compressed vmlinuz kernel 2013-07-09 22:09:20 +02:00
install.sh parisc: make "make install" not depend on vmlinux 2013-11-07 22:28:06 +01:00
Kconfig parisc: Switch to generic sched_clock implementation 2016-11-25 12:31:58 +01:00
Kconfig.debug parisc: Fix ftrace function tracer 2016-04-14 17:47:19 +02:00
Makefile parisc: Fix ftrace function tracer 2016-04-14 17:47:19 +02:00
nm