]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/mm: Simplify PAE PGD sharing macros
authorDave Hansen <dave.hansen@linux.intel.com>
Mon, 14 Apr 2025 17:32:38 +0000 (10:32 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Thu, 17 Apr 2025 17:39:25 +0000 (10:39 -0700)
commit45fb940563f80b8138f465f18d71c2d3e4a0724e
treec115ddfb9a7b651ff0b59f85a789088cbe073cdd
parenteb9c7f00f22d6ea2a94e00eb4f33a79064681564
x86/mm: Simplify PAE PGD sharing macros

There are a few too many levels of abstraction here.

First, just expand the PREALLOCATED_PMDS macro in place to make it
clear that it is only conditional on PTI.

Second, MAX_PREALLOCATED_PMDS is only used in one spot for an
on-stack allocation. It has a *maximum* value of 4. Do not bother
with the macro MAX() magic.  Just set it to 4.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20250414173238.6E3CDA56%40davehans-spike.ostc.intel.com
arch/x86/mm/pgtable.c