x86/boot/32: De-uglify the 2/3 level paging difference in mk_early_pgtbl_32()
authorThomas Gleixner <tglx@linutronix.de>
Tue, 17 Oct 2023 21:23:26 +0000 (23:23 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Wed, 18 Oct 2023 16:27:30 +0000 (18:27 +0200)
commita62f4ca106fd250e9247decd100f3905131fc1fe
treeca6390e5e813052afce2fdaa0e49c654ef47dd8b
parent1e2dd572d2b773b5b8882aae66e5f0328d562aa9
x86/boot/32: De-uglify the 2/3 level paging difference in mk_early_pgtbl_32()

Move the ifdeffery out of the function and use proper typedefs to make it
work for both 2 and 3 level paging.

No functional change.

  [ bp: Move mk_early_pgtbl_32() declaration into a header. ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20231017211722.111059491@linutronix.de
arch/x86/include/asm/setup.h
arch/x86/kernel/head32.c