linux/arch/x86
Jonathan Marek d8a719059b Revert "mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge"
This reverts commit c742199a01.

c742199a01 ("mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge")
breaks arm64 in at least two ways for configurations where PUD or PMD
folding occur:

  1. We no longer install huge-vmap mappings and silently fall back to
     page-granular entries, despite being able to install block entries
     at what is effectively the PGD level.

  2. If the linear map is backed with block mappings, these will now
     silently fail to be created in alloc_init_pud(), causing a panic
     early during boot.

The pgtable selftests caught this, although a fix has not been
forthcoming and Christophe is AWOL at the moment, so just revert the
change for now to get a working -rc3 on which we can queue patches for
5.15.

A simple revert breaks the build for 32-bit PowerPC 8xx machines, which
rely on the default function definitions when the corresponding
page-table levels are folded, since commit a6a8f7c4aa ("powerpc/8xx:
add support for huge pages on VMAP and VMALLOC"), eg:

  powerpc64-linux-ld: mm/vmalloc.o: in function `vunmap_pud_range':
  linux/mm/vmalloc.c:362: undefined reference to `pud_clear_huge'

To avoid that, add stubs for pud_clear_huge() and pmd_clear_huge() in
arch/powerpc/mm/nohash/8xx.c as suggested by Christophe.

Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: c742199a01 ("mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Marc Zyngier <maz@kernel.org>
[mpe: Fold in 8xx.c changes from Christophe and mention in change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/linux-arm-kernel/CAMuHMdXShORDox-xxaeUfDW3wx2PeggFSqhVSHVZNKCGK-y_vQ@mail.gmail.com/
Link: https://lore.kernel.org/r/20210717160118.9855-1-jonathan@marek.ca
Link: https://lore.kernel.org/r/87r1fs1762.fsf@mpe.ellerman.id.au
Signed-off-by: Will Deacon <will@kernel.org>
2021-07-21 11:28:09 +01:00
..
boot Modernize the genimage.sh script, add a 'hdimage' target and EFI support. 2021-06-28 13:05:09 -07:00
configs
crypto crypto: x86/curve25519 - fix cpu feature checking logic in mod_exit 2021-06-11 15:03:29 +08:00
entry arch, mm: wire up memfd_secret system call where relevant 2021-07-08 11:48:21 -07:00
events A fix and a hardware-enablement addition: 2021-07-11 11:10:48 -07:00
hyperv Drivers: hv: Move Hyper-V extended capability check to arch neutral code 2021-06-05 10:22:34 +00:00
ia32 binfmt: remove in-tree usage of MAP_EXECUTABLE 2021-06-29 10:53:50 -07:00
include mm: rename p4d_page_vaddr to p4d_pgtable and make it return pud_t * 2021-07-08 11:48:22 -07:00
kernel x86/dumpstack: use %pSb/%pBb for backtrace printing 2021-07-08 11:48:22 -07:00
kvm Fixes and improvements for FPU handling on x86: 2021-07-07 11:12:01 -07:00
lib - Differentiate the type of exception the #VC handler raises depending 2021-06-28 11:29:12 -07:00
math-emu x86/math-emu: Rename frstor() 2021-06-23 18:16:33 +02:00
mm Revert "mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge" 2021-07-21 11:28:09 +01:00
net bpf, x86: Fix extable offset calculation 2021-06-28 15:11:43 +02:00
pci pci-v5.14-changes 2021-07-08 12:06:20 -07:00
platform EFI changes: two driver API cleanups, and a log message tweak. 2021-06-28 11:34:16 -07:00
power - turn the stack canary into a normal __percpu variable on 32-bit which 2021-04-27 17:45:09 -07:00
purgatory kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
ras
realmode A single ELF format fix for a section flags mismatch bug that breaks 2021-06-28 11:35:55 -07:00
tools x86/tools/insn_sanity: Convert to insn_decode() 2021-03-15 12:21:11 +01:00
um x86/uml/syscalls: Remove array index from syscall initializers 2021-05-25 16:59:23 +02:00
video
xen kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
.gitignore
Kbuild
Kconfig Merge branch 'akpm' (patches from Andrew) 2021-07-02 12:08:10 -07:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug
Makefile Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
Makefile.um um: allow not setting extra rpaths in the linux binary 2021-06-17 21:54:15 +02:00
Makefile_32.cpu