linux-stable/include
Bibo Mao d2f8671045 LoongArch: Set initial pte entry with PAGE_GLOBAL for kernel space
There are two pages in one TLB entry on LoongArch system. For kernel
space, it requires both two pte entries (buddies) with PAGE_GLOBAL bit
set, otherwise HW treats it as non-global tlb, there will be potential
problems if tlb entry for kernel space is not global. Such as fail to
flush kernel tlb with the function local_flush_tlb_kernel_range() which
supposed only flush tlb with global bit.

Kernel address space areas include percpu, vmalloc, vmemmap, fixmap and
kasan areas. For these areas both two consecutive page table entries
should be enabled with PAGE_GLOBAL bit. So with function set_pte() and
pte_clear(), pte buddy entry is checked and set besides its own pte
entry. However it is not atomic operation to set both two pte entries,
there is problem with test_vmalloc test case.

So function kernel_pte_init() is added to init a pte table when it is
created for kernel address space, and the default initial pte value is
PAGE_GLOBAL rather than zero at beginning. Then only its own pte entry
need update with function set_pte() and pte_clear(), nothing to do with
the pte buddy entry.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2024-10-21 22:11:19 +08:00
..
acpi
asm-generic move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
clocksource
crypto move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cxl
drm Short summary of fixes pull: 2024-10-01 08:15:55 +10:00
dt-bindings soc: convert ep93xx to devicetree 2024-09-26 12:00:25 -07:00
keys
kunit The core clk framework is left largely untouched this time around except for 2024-09-23 15:01:48 -07:00
kvm
linux LoongArch: Set initial pte entry with PAGE_GLOBAL for kernel space 2024-10-21 22:11:19 +08:00
math-emu
media
memory
misc
net BPF fixes: 2024-10-18 16:27:14 -07:00
pcmcia
ras
rdma move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
rv
scsi move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
soc
sound ALSA: hda: fix trigger_tstamp_latched 2024-10-02 12:50:24 +02:00
target move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
trace dma-mapping fix for Linux 6.12 2024-10-20 10:56:42 -07:00
uapi BPF fixes: 2024-10-18 16:27:14 -07:00
ufs
vdso
video
xen xen: Remove dependency between pciback and privcmd 2024-10-18 11:59:04 +02:00