summaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/inventory.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2019-04-28 00:09:53 +0200
committerHelge Deller <deller@gmx.de>2019-05-03 23:47:41 +0200
commitb37d1c1898b288c69f3dc9267bc2c41af06f4a4b (patch)
treed041b4796035a447687ae8b1bc7d904c39f8729b /arch/parisc/kernel/inventory.c
parentd19a12906e5e558c0f6b6cfece7b7caf1012ef95 (diff)
downloadlinux-b37d1c1898b288c69f3dc9267bc2c41af06f4a4b.tar.gz
linux-b37d1c1898b288c69f3dc9267bc2c41af06f4a4b.tar.bz2
linux-b37d1c1898b288c69f3dc9267bc2c41af06f4a4b.zip
parisc: Use per-pagetable spinlock
PA-RISC uses a global spinlock to protect pagetable updates in the TLB fault handlers. When multiple cores are taking TLB faults simultaneously, the cache line containing the spinlock becomes a bottleneck. This patch embeds the spinlock in the top level page directory, so that every process has its own lock. It improves performance by 30% when doing parallel compilations. At least on the N class systems, only one PxTLB inter processor broadcast can be active at any one time on the Merced bus. If a Merced bus is found, this patch serializes the TLB flushes with the pa_tlb_flush_lock spinlock. v1: Initial patch by Mikulas v2: Added Merced detection by Helge v3: Revised TLB serialization by Dave & Helge Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel/inventory.c')
-rw-r--r--arch/parisc/kernel/inventory.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/parisc/kernel/inventory.c b/arch/parisc/kernel/inventory.c
index 35d05fdd7483..6f2d611347a1 100644
--- a/arch/parisc/kernel/inventory.c
+++ b/arch/parisc/kernel/inventory.c
@@ -31,6 +31,7 @@
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/parisc-device.h>
+#include <asm/tlbflush.h>
/*
** Debug options
@@ -638,4 +639,10 @@ void __init do_device_inventory(void)
}
printk(KERN_INFO "Found devices:\n");
print_parisc_devices();
+
+#if defined(CONFIG_64BIT) && defined(CONFIG_SMP)
+ pa_serialize_tlb_flushes = machine_has_merced_bus();
+ if (pa_serialize_tlb_flushes)
+ pr_info("Merced bus found: Enable PxTLB serialization.\n");
+#endif
}