]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/boot/compressed: Merge the local pgtable.h include into <asm/boot.h>
authorArd Biesheuvel <ardb@kernel.org>
Tue, 1 Apr 2025 13:34:18 +0000 (15:34 +0200)
committerIngo Molnar <mingo@kernel.org>
Sun, 6 Apr 2025 18:15:14 +0000 (20:15 +0200)
Merge the local include "pgtable.h" -which declares the API of the
5-level paging trampoline- into <asm/boot.h> so that its implementation
in la57toggle.S as well as the calling code can be decoupled from the
traditional decompressor.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250401133416.1436741-9-ardb+git@google.com
arch/x86/boot/compressed/head_64.S
arch/x86/boot/compressed/la57toggle.S
arch/x86/boot/compressed/misc.c
arch/x86/boot/compressed/pgtable.h [deleted file]
arch/x86/boot/compressed/pgtable_64.c
arch/x86/include/asm/boot.h

index eafd4f185e77dea3fd79e669ffd9b5005635ce24..d9dab940ff6264f09661a7e14b6bca81068a7804 100644 (file)
@@ -35,7 +35,6 @@
 #include <asm/bootparam.h>
 #include <asm/desc_defs.h>
 #include <asm/trapnr.h>
-#include "pgtable.h"
 
 /*
  * Fix alignment at 16 bytes. Following CONFIG_FUNCTION_ALIGNMENT will result
index 9ee002387eb1ac56e85dcc95c4f76c876655fd51..370075b4d95b4875fd3ef1d79c89b75fd713f475 100644 (file)
@@ -5,7 +5,6 @@
 #include <asm/boot.h>
 #include <asm/msr.h>
 #include <asm/processor-flags.h>
-#include "pgtable.h"
 
 /*
  * This is the 32-bit trampoline that will be copied over to low memory. It
index 1cdcd4aaf39555dc1701ec60f8251ed33eeeba89..94b5991da001a7c926680e94c754a504b4c815d2 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "misc.h"
 #include "error.h"
-#include "pgtable.h"
 #include "../string.h"
 #include "../voffset.h"
 #include <asm/bootparam_utils.h>
diff --git a/arch/x86/boot/compressed/pgtable.h b/arch/x86/boot/compressed/pgtable.h
deleted file mode 100644 (file)
index 6d595ab..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef BOOT_COMPRESSED_PAGETABLE_H
-#define BOOT_COMPRESSED_PAGETABLE_H
-
-#define TRAMPOLINE_32BIT_SIZE          (2 * PAGE_SIZE)
-
-#define TRAMPOLINE_32BIT_CODE_OFFSET   PAGE_SIZE
-#define TRAMPOLINE_32BIT_CODE_SIZE     0xA0
-
-#ifndef __ASSEMBLER__
-
-extern unsigned long *trampoline_32bit;
-
-extern void trampoline_32bit_src(void *trampoline, bool enable_5lvl);
-
-extern const u16 trampoline_ljmp_imm_offset;
-
-#endif /* __ASSEMBLER__ */
-#endif /* BOOT_COMPRESSED_PAGETABLE_H */
index d8c5de40669d3600280d5efe1defd25871ea81cd..5a6c7a190e5bce7add3ad60fae0ed8b2af843898 100644 (file)
@@ -4,7 +4,6 @@
 #include <asm/bootparam_utils.h>
 #include <asm/e820/types.h>
 #include <asm/processor.h>
-#include "pgtable.h"
 #include "../string.h"
 #include "efi.h"
 
index 3f02ff6d333d36f5c81c86233802ebabaed74423..02b23aa78955fb0268757c4d7ca026d457d46c2b 100644 (file)
 # define BOOT_STACK_SIZE       0x1000
 #endif
 
+#define TRAMPOLINE_32BIT_SIZE          (2 * PAGE_SIZE)
+
+#define TRAMPOLINE_32BIT_CODE_OFFSET   PAGE_SIZE
+#define TRAMPOLINE_32BIT_CODE_SIZE     0xA0
+
 #ifndef __ASSEMBLER__
 extern unsigned int output_len;
 extern const unsigned long kernel_text_size;
@@ -83,6 +88,11 @@ unsigned long decompress_kernel(unsigned char *outbuf, unsigned long virt_addr,
                                void (*error)(char *x));
 
 extern struct boot_params *boot_params_ptr;
+extern unsigned long *trampoline_32bit;
+extern const u16 trampoline_ljmp_imm_offset;
+
+void trampoline_32bit_src(void *trampoline, bool enable_5lvl);
+
 #endif
 
 #endif /* _ASM_X86_BOOT_H */