For now, only define it for x86 architectures.
The DRM generic code started to use it in Linux 6.11.
This is part of the update of DRM drivers to Linux 6.11.
Sponsored by: The FreeBSD Foundation
Differential D55734
linuxkpi: Define `PMD_SHIFT` Authored by dumbbell on Sun, Mar 8, 1:21 PM. Tags None Referenced Files
Subscribers
Details
For now, only define it for x86 architectures. The DRM generic code started to use it in Linux 6.11. This is part of the update of DRM drivers to Linux 6.11. Sponsored by: The FreeBSD Foundation
Diff Detail
Event TimelineComment Actions I don't really like this being done for x86 only, but I'd rather have it at least here for now and we can follow up with other architectures Comment Actions Where do these values come from? Do they match anything native? Do we want at least a comment which ones are considered "to be fixed"? Comment Actions for i386 PDRSHIFT_PAE, for amd64 PDRSHIFT, but outside it doesn't seems that FreeBSD has direct match. Maybe arm64 / riscv64 L2_SHIFT? Comment Actions Explain how the constants are computed on Linux and use the corresponding FreeBSD constants. This should address @bz concerns. Thank you @david_ixit.cz for the initial lookup! Comment Actions You made me run a grep on Linux; I assume your comments are for 6.11 as I just checked 7 and cannot find any hard coded 21ones anymore. Comment Actions Right, there could be a difference between Linux versions. In Linux 6.11 for instance, the x86 version is defined in arch/x86/include/asm/pgtable_64_types.h and arch/x86/include/asm/pgtable-3level_types.h as: #define PMD_SHIFT 21 |