Skip to contentSkip to conversation

arm64/mm: Drop INIT_MM_CONTEXT()

PATCH Applied Anshuman Khandual 5 participants 5 messages Dec 2, 2024 – Dec 10, 2024 arm64

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64/mm: Drop INIT_MM_CONTEXT()

Platform override for INIT_MM_CONTEXT() is redundant because swapper_pg_dir always gets assigned as the pgd during init_mm initialization. So just drop this override on arm64.

Originally this override was added via the 'commit 2b5548b68199 ("arm64/mm:
Separate boot-time page tables from swapper_pg_dir")' because non standard init_pg_dir was assigned as the pgd. Subsequently it was changed as default swapper_pg_dir by the 'commit ba5b0333a847 ("arm64: mm: omit redundant remap of kernel image")', which might have also just dropped this override.

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc Ard Biesheuvel <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc Mark Rutland <[email protected]>

---
This patch applies on v6.13-rc1

 arch/arm64/include/asm/mmu.h | 3 ---
 1 file changed, 3 deletions(-)
arch/arm64/include/asm/mmu.h +0 -3
index 2ec96d91acc6..662471cfc536 100644
@@ -109,8 +109,5 @@ static inline bool kaslr_requires_kpti(void)
 	return true;
 }
 
-#define INIT_MM_CONTEXT(name)	\
-	.pgd = swapper_pg_dir,
-
 #endif	/* !__ASSEMBLY__ */
 #endif
Signature · 1 line
2.30.2
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Anshuman Khandual

Platform override for INIT_MM_CONTEXT() is redundant because swapper_pg_dir always gets assigned as the pgd during init_mm initialization. So just drop this override on arm64.

Originally this override was added via the 'commit 2b5548b68199 ("arm64/mm:
Separate boot-time page tables from swapper_pg_dir")' because non standard init_pg_dir was assigned as the pgd. Subsequently it was changed as default swapper_pg_dir by the 'commit ba5b0333a847 ("arm64: mm: omit redundant remap of kernel image")', which might have also just dropped this override.

Quoted 8 lines
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc Ard Biesheuvel <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc Mark Rutland <[email protected]>
Quoted 22 lines

---
This patch applies on v6.13-rc1

 arch/arm64/include/asm/mmu.h | 3 ---
 1 file changed, 3 deletions(-)
arch/arm64/include/asm/mmu.h +0 -4
index 2ec96d91acc6..662471cfc536 100644
@@ -109,8 +109,5 @@ static inline bool kaslr_requires_kpti(void)
        return true;
 }
 
-#define INIT_MM_CONTEXT(name)  \
-       .pgd = swapper_pg_dir,
-
 #endif /* !__ASSEMBLY__ */
 #endif
--

2.30.2

Reviewed-by on v1 1/1
#2 lore raw
In reply to Anshuman Khandual
Quoted 10 lines · Anshuman Khandual

Platform override for INIT_MM_CONTEXT() is redundant because swapper_pg_dir always gets assigned as the pgd during init_mm initialization. So just drop this override on arm64.

Originally this override was added via the 'commit 2b5548b68199 ("arm64/mm:
Separate boot-time page tables from swapper_pg_dir")' because non standard init_pg_dir was assigned as the pgd. Subsequently it was changed as default swapper_pg_dir by the 'commit ba5b0333a847 ("arm64: mm: omit redundant remap of kernel image")', which might have also just dropped this override.

Quoted 8 lines
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc Ard Biesheuvel <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc Mark Rutland <[email protected]>
Quoted 19 lines

---
This patch applies on v6.13-rc1

 arch/arm64/include/asm/mmu.h | 3 ---
 1 file changed, 3 deletions(-)
arch/arm64/include/asm/mmu.h +0 -3
index 2ec96d91acc6..662471cfc536 100644
@@ -109,8 +109,5 @@ static inline bool kaslr_requires_kpti(void)
 	return true;
 }
 
-#define INIT_MM_CONTEXT(name)	\
-	.pgd = swapper_pg_dir,
-
 #endif	/* !__ASSEMBLY__ */
 #endif
Reviewed-by on v1 1/1
#3 lore raw
In reply to Anshuman Khandual
Quoted 18 lines · Anshuman Khandual

Platform override for INIT_MM_CONTEXT() is redundant because swapper_pg_dir always gets assigned as the pgd during init_mm initialization. So just drop this override on arm64.

Originally this override was added via the 'commit 2b5548b68199 ("arm64/mm:
Separate boot-time page tables from swapper_pg_dir")' because non standard init_pg_dir was assigned as the pgd. Subsequently it was changed as default swapper_pg_dir by the 'commit ba5b0333a847 ("arm64: mm: omit redundant remap of kernel image")', which might have also just dropped this override.

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc Ard Biesheuvel <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc Mark Rutland <[email protected]>
Quoted 6 lines

---
This patch applies on v6.13-rc1

  arch/arm64/include/asm/mmu.h | 3 ---
  1 file changed, 3 deletions(-)
maintainer Applied
#4 lore raw
In reply to Anshuman Khandual
Quoted 11 lines · Anshuman Khandual

Platform override for INIT_MM_CONTEXT() is redundant because swapper_pg_dir always gets assigned as the pgd during init_mm initialization. So just drop this override on arm64.

Originally this override was added via the 'commit 2b5548b68199 ("arm64/mm:
Separate boot-time page tables from swapper_pg_dir")' because non standard init_pg_dir was assigned as the pgd. Subsequently it was changed as default swapper_pg_dir by the 'commit ba5b0333a847 ("arm64: mm: omit redundant remap of kernel image")', which might have also just dropped this override.

[...]

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64/mm: Drop INIT_MM_CONTEXT()

      https://git.kernel.org/arm64/c/5f882f4aa8aa

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev