OrangePi_CM5/include/asm-generic
Steve Capper b643807a73 tlb: hugetlb: Add more sizes to tlb_remove_huge_tlb_entry
[ Upstream commit 697a1d44af8ba0477ee729e632f4ade37999249a ]

tlb_remove_huge_tlb_entry only considers PMD_SIZE and PUD_SIZE when
updating the mmu_gather structure.

Unfortunately on arm64 there are two additional huge page sizes that
need to be covered: CONT_PTE_SIZE and CONT_PMD_SIZE. Where an end-user
attempts to employ contiguous huge pages, a VM_BUG_ON can be experienced
due to the fact that the tlb structure hasn't been correctly updated by
the relevant tlb_flush_p.._range() call from tlb_remove_huge_tlb_entry.

This patch adds inequality logic to the generic implementation of
tlb_remove_huge_tlb_entry s.t. CONT_PTE_SIZE and CONT_PMD_SIZE are
effectively covered on arm64. Also, as well as ptes, pmds and puds;
p4ds are now considered too.

Reported-by: David Hildenbrand <david@redhat.com>
Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/linux-mm/811c5c8e-b3a2-85d2-049c-717f17c3a03a@redhat.com/
Signed-off-by: Steve Capper <steve.capper@arm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220330112543.863-1-steve.capper@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-20 09:23:22 +02:00
..
bitops
…
vdso
…
Kbuild
…
asm-offsets.h
…
asm-prototypes.h
…
atomic-instrumented.h
…
atomic-long.h
…
atomic.h
…
atomic64.h
…
audit_change_attr.h
…
audit_dir_write.h
…
audit_read.h
…
audit_signal.h
…
audit_write.h
…
barrier.h
…
bitops.h
…
bitsperlong.h
…
bug.h
…
bugs.h
…
cache.h
…
cacheflush.h
…
checksum.h
…
cmpxchg-local.h
…
cmpxchg.h
…
compat.h
…
current.h
…
delay.h
…
device.h
…
div64.h
…
dma-mapping.h
…
dma.h
…
early_ioremap.h
…
emergency-restart.h
…
error-injection.h
…
exec.h
…
export.h
…
extable.h
…
fb.h
…
fixmap.h
…
flat.h
…
ftrace.h
…
futex.h
…
getorder.h
…
gpio.h
…
hardirq.h
…
hugetlb.h
…
hw_irq.h
…
hyperv-tlfs.h
…
ide_iops.h
…
int-ll64.h
…
io.h
…
ioctl.h
…
iomap.h
…
irq.h
…
irq_regs.h
…
irq_work.h
…
irqflags.h
…
kdebug.h
…
kmap_types.h
…
kprobes.h
…
kvm_para.h
…
kvm_types.h
…
linkage.h
…
local.h
…
local64.h
…
mcs_spinlock.h
…
memory_model.h
…
mm-arch-hooks.h
…
mm_hooks.h
…
mmiowb.h
…
mmiowb_types.h
…
mmu.h
…
mmu_context.h
…
module.h
…
module.lds.h
…
mshyperv.h
…
msi.h
…
page.h
…
param.h
…
parport.h
…
pci.h
…
pci_iomap.h
…
percpu.h
…
pgalloc.h
…
pgtable-nop4d.h
…
pgtable-nopmd.h
…
pgtable-nopud.h
…
pgtable_uffd.h
…
preempt.h
…
qrwlock.h
…
qrwlock_types.h
…
qspinlock.h
…
qspinlock_types.h
…
resource.h
…
rwonce.h
…
seccomp.h
…
sections.h
…
serial.h
…
set_memory.h
…
shmparam.h
…
signal.h
…
simd.h
…
spinlock.h
…
statfs.h
…
string.h
…
switch_to.h
…
syscall.h
…
syscalls.h
…
termios-base.h
…
termios.h
…
timex.h
…
tlb.h
…
tlbflush.h
…
topology.h
…
trace_clock.h
…
uaccess.h
…
unaligned.h
…
user.h
…
vermagic.h
…
vga.h
…
vmlinux.lds.h
…
vtime.h
…
word-at-a-time.h
…
xor.h
…