linux-uconsole/arch
Helge Deller b00a56e647 parisc: Optimize per-pagetable spinlocks
[ Upstream commit b7795074a0 ]

On parisc a spinlock is stored in the next page behind the pgd which
protects against parallel accesses to the pgd. That's why one additional
page (PGD_ALLOC_ORDER) is allocated for the pgd.

Matthew Wilcox suggested that we instead should use a pointer in the
struct page table for this spinlock and noted, that the comments for the
PGD_ORDER and PMD_ORDER defines were wrong.

Both suggestions are addressed with this patch. Instead of having an own
spinlock to protect the pgd, we now switch to use the existing
page_table_lock.  Additionally, beside loading the pgd into cr25 in
switch_mm_irqs_off(), the physical address of this lock is loaded into
cr28 (tr4), so that we can avoid implementing a complicated lookup in
assembly for this lock in the TLB fault handlers.

The existing Hybrid L2/L3 page table scheme (where the pmd is adjacent
to the pgd) has been dropped with this patch.

Remove the locking in set_pte() and the huge-page pte functions too.
They trigger a spinlock recursion on 32bit machines and seem unnecessary.

Suggested-by: Matthew Wilcox <willy@infradead.org>
Fixes: b37d1c1898 ("parisc: Use per-pagetable spinlock")
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Stable-dep-of: 38860b2c8b ("parisc: Flush kernel data mapping in set_pte_at() when installing pte for user page")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-09-23 14:16:56 +02:00
..
alpha tty: the rest, stop using tty_schedule_flip() 2022-07-29 17:19:28 +02:00
arc ARC: entry: fix syscall_trace_exit argument 2022-04-27 13:53:55 +02:00
arm ARM: dts: imx6qdl-kontron-samx6i: fix spi-flash compatible 2022-09-20 12:38:30 +02:00
arm64 arm64: errata: add detection for AMEVCNTR01 incrementing incorrectly 2022-09-15 11:32:06 +02:00
c6x
csky csky/kprobe: reclaim insn_slot on kprobe unregistration 2022-08-25 11:38:16 +02:00
h8300
hexagon hexagon: select ARCH_WANT_LD_ORPHAN_WARN 2022-08-21 15:15:33 +02:00
ia64 ia64, processor: fix -Wincompatible-pointer-types in ia64_get_irr() 2022-08-21 15:15:25 +02:00
m68k Revert "m68knommu: only set CONFIG_ISA_DMA_API for ColdFire sub-arch" 2022-07-29 17:19:09 +02:00
microblaze uaccess: fix nios2 and microblaze get_user_8() 2022-04-08 14:40:08 +02:00
mips MIPS: loongson32: ls1c: Fix hang during startup 2022-09-15 11:32:06 +02:00
nds32 nds32: fix access_ok() checks in get/put_user 2022-03-28 09:57:10 +02:00
nios2 nios2: add force_successful_syscall_return() 2022-08-25 11:38:04 +02:00
openrisc openrisc: start CPU timer early in boot 2022-06-09 10:20:55 +02:00
parisc parisc: Optimize per-pagetable spinlocks 2022-09-23 14:16:56 +02:00
powerpc KVM: PPC: Tick accounting should defer vtime accounting 'til after IRQ handling 2022-09-23 14:16:55 +02:00
riscv mm: pagewalk: Fix race between unmap and page walker 2022-09-08 11:11:38 +02:00
s390 s390: fix nospec table alignments 2022-09-08 11:11:40 +02:00
sh sh: convert nommu io{re,un}map() to static inline functions 2022-07-21 21:20:02 +02:00
sparc sparc: use fallback for random_get_entropy() instead of zero 2022-05-30 09:33:42 +02:00
um um: add "noreboot" command line option for PANIC_TIMEOUT=-1 setups 2022-08-25 11:38:16 +02:00
x86 x86/ftrace: Use alternative RET encoding 2022-09-20 12:38:33 +02:00
xtensa xtensa: iss: fix handling error cases in iss_net_configure() 2022-08-21 15:15:59 +02:00
.gitignore
Kconfig arch/cc: Introduce a function to check for confidential computing features 2021-11-18 14:04:32 +01:00