linux-uconsole/arch/parisc/include/asm
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
..
agp.h
alternative.h parisc: Add ALTERNATIVE_CODE() and ALT_COND_RUN_ON_QEMU 2019-08-12 19:17:39 +02:00
asm-offsets.h
asmregs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 153 2019-05-30 11:26:32 -07:00
assembly.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 153 2019-05-30 11:26:32 -07:00
atomic.h Merge branch 'parisc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2020-08-12 12:41:15 -07:00
barrier.h parisc: Add alternative patching to synchronize_caches define 2020-10-15 08:10:38 +02:00
bitops.h parisc: Convert to BIT_MASK() and BIT_WORD() 2020-07-21 08:04:39 +02:00
bug.h
bugs.h
cache.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
cacheflush.h parisc/kmap: remove duplicate kmap code 2020-06-04 19:06:22 -07:00
checksum.h saner calling conventions for csum_and_copy_..._user() 2020-08-20 15:45:15 -04:00
cmpxchg.h parisc: avoid a warning on u8 cast for cmpxchg on u8 pointers 2021-04-14 08:41:59 +02:00
compat.h compat: lift compat_s64 and compat_u64 to <asm-generic/compat.h> 2020-09-17 13:00:46 -04:00
compat_ucontext.h
delay.h
dma-mapping.h parisc: move internal implementation details out of <asm/dma-mapping.h> 2019-02-21 20:37:11 +01:00
dma.h
dwarf.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
eisa_bus.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
eisa_eeprom.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
elf.h Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-08-09 13:33:54 -07:00
fb.h parisc/stifb: Fix fb_is_primary_device() only available with CONFIG_FB_STI 2022-06-29 08:59:53 +02:00
fixmap.h parisc: add kexec syscall support 2019-09-08 15:37:04 +02:00
floppy.h floppy: use symbolic register names in the parisc port 2020-05-12 19:34:53 +03:00
ftrace.h parisc/ftrace: Add ARCH_SUPPORTS_FTRACE_OPS support 2019-08-03 08:56:57 +02:00
futex.h parisc: Fix mask used to select futex spinlock 2021-12-29 12:26:02 +01:00
grfioctl.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
hardirq.h parisc: Count IPI function call interrupts 2019-02-21 20:37:11 +01:00
hardware.h parisc: Use per-pagetable spinlock 2019-05-03 23:47:41 +02:00
hash.h
hugetlb.h mm/hugetlb: define a generic fallback for arch_clear_hugepage_flags() 2020-06-03 20:09:46 -07:00
ide.h
io.h iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
irq.h
irqflags.h
jump_label.h parisc: Add static branch and JUMP_LABEL feature 2019-05-06 00:10:03 +02:00
kbdleds.h
Kbuild local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
kexec.h parisc: fix compilation when KEXEC=n and KEXEC_FILE=y 2019-12-15 21:05:38 +01:00
kgdb.h parisc: add KGDB support 2019-05-03 23:47:38 +02:00
kmap_types.h
kprobes.h parisc: add kprobe_fault_handler() 2019-07-21 11:01:55 +02:00
ldcw.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
led.h
linkage.h parisc: Fix boot failure of 64-bit kernel 2018-08-21 14:32:44 +02:00
machdep.h
mckinley.h
mmu.h
mmu_context.h parisc: Optimize per-pagetable spinlocks 2022-09-23 14:16:56 +02:00
mmzone.h parisc: Switch from DISCONTIGMEM to SPARSEMEM 2019-05-03 23:47:40 +02:00
module.h
page.h parisc: Optimize per-pagetable spinlocks 2022-09-23 14:16:56 +02:00
parisc-device.h
parport.h
patch.h parisc: add support for patching multiple words 2019-06-08 12:56:25 +02:00
pci.h parisc: remove the HBA_DATA macro 2019-02-21 20:37:12 +01:00
pdc.h parisc: add __pdc_cpu_rendezvous() 2019-09-08 15:19:58 +02:00
pdc_chassis.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 176 2019-05-30 11:29:19 -07:00
pdcpat.h parisc: Add constant for PDC_PAT_COMPLEX firmware call 2019-02-21 20:37:13 +01:00
perf.h
perf_event.h
pgalloc.h parisc: Optimize per-pagetable spinlocks 2022-09-23 14:16:56 +02:00
pgtable.h parisc: Optimize per-pagetable spinlocks 2022-09-23 14:16:56 +02:00
prefetch.h
processor.h treewide: remove current_text_addr 2018-10-31 08:54:12 -07:00
psw.h parisc: asm: psw.h: missing header guard 2019-06-25 14:52:26 +02:00
ptrace.h parisc: add functions required by KPROBE_EVENTS 2019-05-03 23:47:39 +02:00
ropes.h
rt_sigframe.h
runway.h
sections.h parisc: Add alternative coding infrastructure 2018-10-17 17:22:26 +02:00
serial.h
shmparam.h
signal.h parisc: Drop struct sigaction from not exported header file 2018-06-28 17:10:58 +02:00
smp.h
socket.h parisc: Define O_NONBLOCK to become 000200000 2020-10-15 08:10:38 +02:00
sparsemem.h parisc: Switch from DISCONTIGMEM to SPARSEMEM 2019-05-03 23:47:40 +02:00
special_insns.h parisc: Fix lpa and lpa_user defines 2022-01-27 10:54:26 +01:00
spinlock.h parisc: Improve spinlock handling 2020-10-15 08:10:39 +02:00
spinlock_types.h parisc: Rework arch_rw locking functions 2020-04-05 22:29:55 +02:00
string.h Revert "parisc: Add assembly implementations for memset, strlen, strcpy, strncpy and strcat" 2021-09-03 10:09:31 +02:00
superio.h
switch_to.h
syscall.h parisc: define syscall_get_error() 2019-07-16 19:23:24 -07:00
termios.h
thread_info.h Construct init thread stack in the linker script rather than by union 2018-01-09 23:21:02 +00:00
timex.h parisc: define get_cycles macro for arch-override 2022-05-30 09:33:40 +02:00
tlb.h parisc: use pgtable-nopXd instead of 4level-fixup 2019-12-04 19:44:15 -08:00
tlbflush.h parisc: Use per-pagetable spinlock 2019-05-03 23:47:41 +02:00
topology.h
traps.h parisc: Fix handling off probe non-access faults 2022-04-08 14:40:32 +02:00
uaccess.h uaccess: remove segment_eq 2020-08-12 10:57:58 -07:00
ucontext.h
unaligned.h
unistd.h parisc: Wire up clone3 syscall 2019-07-17 23:11:28 +02:00
unwind.h parisc: Consolidate unwind initialization calls 2018-08-17 17:00:08 +02:00
vmalloc.h mm/vmalloc: Add empty <asm/vmalloc.h> headers and use them from <linux/vmalloc.h> 2019-12-10 10:12:55 +01:00