RFC arm64: Add support for 48-bit Physical Addresses
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest0 of 2 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 2 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/2] arm64: Add support for 48-bit Physical Addresses
Quoted 3 lines · Radha Mohan
Quoted 2 lines · Marc Zyngier
So should the 4-level page table cost be unconditionally forced onto all implementations?
Definitely not.
Quoted 22 lines
We can have a kernel compile-time config option so that platforms having a 48-bit PA can select that option. But having it will create the code something like below
#ifndef
CONFIG_ARM64_64KB_PAGES
#ifdefCONFIG_ARCH_SUPPORTS_48BIT_PA
...
..
#else
..
..
#endif
#else /* !CONFIG_ARM64_64KB_PAGES */
#ifdefCONFIG_ARCH_SUPPORTS_48BIT_PA
..
..
#else
..
..
#endif
#endif /*CONFIG_ARM64_64KB_PAGES*/
Quoted 1 line
And we might need to do this at lot of places. Is this ok?
We have to figure a way to avoid this. I haven't looked in detail at the patches (BTW, please cc the arm64 maintainers on the next version) but I think we could restrict the #ifdef's to much fewer headers (primarily asm/page.h and asm/pgtable-hwdef.h). What I'm thinking is to have:
pgtable-2level-*.h 64K pages only
pgtable-3level-*.h 4K and 64K pages support
pgtable-4level-*.h 4K pages only
You can move the PTRS_PER_* and PMD_SHIFT etc. macros to some common header as these depend on the page size. The other definitions like pmd_t depend on the number of page table levels. With some care you could define PMD_SHIFT for 64K into a single file with some #ifdef's around __PAGETABLE_PMD_FOLDED. Same for PUD_SHIFT with 4K pages.
Signature · 1 line
Catalin