Skip to content

Commit d69ad12

Browse files
committed
Merge tag 'x86-build-2024-03-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 build updates from Ingo Molnar: - Reduce <asm/bootparam.h> dependencies - Simplify <asm/efi.h> - Unify *_setup_data definitions into <asm/setup_data.h> - Reduce the size of <asm/bootparam.h> * tag 'x86-build-2024-03-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Do not include <asm/bootparam.h> in several files x86/efi: Implement arch_ima_efi_boot_mode() in source file x86/setup: Move internal setup_data structures into setup_data.h x86/setup: Move UAPI setup structures into setup_data.h
2 parents 73f0d1d + 103bf75 commit d69ad12

File tree

21 files changed

+142
-109
lines changed

21 files changed

+142
-109
lines changed

arch/x86/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ REALMODE_CFLAGS += -fno-stack-protector
5353
REALMODE_CFLAGS += -Wno-address-of-packed-member
5454
REALMODE_CFLAGS += $(cc_stack_align4)
5555
REALMODE_CFLAGS += $(CLANG_FLAGS)
56+
ifdef CONFIG_CC_IS_CLANG
57+
REALMODE_CFLAGS += -Wno-gnu
58+
endif
5659
export REALMODE_CFLAGS
5760

5861
# BITS is used as extension for files which are available in a 32 bit

arch/x86/boot/compressed/acpi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#include "../string.h"
66
#include "efi.h"
77

8+
#include <asm/bootparam.h>
9+
810
#include <linux/numa.h>
911

1012
/*

arch/x86/boot/compressed/cmdline.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include "misc.h"
33

4+
#include <asm/bootparam.h>
5+
46
static unsigned long fs;
57
static inline void set_fs(unsigned long seg)
68
{

arch/x86/boot/compressed/efi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#include "misc.h"
99

10+
#include <asm/bootparam.h>
11+
1012
/**
1113
* efi_get_type - Given a pointer to boot_params, determine the type of EFI environment.
1214
*

arch/x86/boot/compressed/efi.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,6 @@ typedef struct {
9797
u32 tables;
9898
} efi_system_table_32_t;
9999

100-
/* kexec external ABI */
101-
struct efi_setup_data {
102-
u64 fw_vendor;
103-
u64 __unused;
104-
u64 tables;
105-
u64 smbios;
106-
u64 reserved[8];
107-
};
108-
109100
struct efi_unaccepted_memory {
110101
u32 version;
111102
u32 unit_size;

arch/x86/boot/compressed/pgtable_64.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include "misc.h"
3+
#include <asm/bootparam.h>
34
#include <asm/e820/types.h>
45
#include <asm/processor.h>
56
#include "pgtable.h"

arch/x86/boot/compressed/sev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*/
1313
#include "misc.h"
1414

15+
#include <asm/bootparam.h>
1516
#include <asm/pgtable_types.h>
1617
#include <asm/sev.h>
1718
#include <asm/trapnr.h>

arch/x86/include/asm/efi.h

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,6 @@ extern void efi_free_boot_services(void);
143143
void arch_efi_call_virt_setup(void);
144144
void arch_efi_call_virt_teardown(void);
145145

146-
/* kexec external ABI */
147-
struct efi_setup_data {
148-
u64 fw_vendor;
149-
u64 __unused;
150-
u64 tables;
151-
u64 smbios;
152-
u64 reserved[8];
153-
};
154-
155146
extern u64 efi_setup;
156147

157148
#ifdef CONFIG_EFI
@@ -418,8 +409,9 @@ extern int __init efi_memmap_split_count(efi_memory_desc_t *md,
418409
extern void __init efi_memmap_insert(struct efi_memory_map *old_memmap,
419410
void *buf, struct efi_mem_range *mem);
420411

421-
#define arch_ima_efi_boot_mode \
422-
({ extern struct boot_params boot_params; boot_params.secure_boot; })
412+
extern enum efi_secureboot_mode __x86_ima_efi_boot_mode(void);
413+
414+
#define arch_ima_efi_boot_mode __x86_ima_efi_boot_mode()
423415

424416
#ifdef CONFIG_EFI_RUNTIME_MAP
425417
int efi_get_runtime_map_size(void);

arch/x86/include/asm/kexec.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
#include <asm/page.h>
2727
#include <asm/ptrace.h>
28-
#include <asm/bootparam.h>
2928

3029
struct kimage;
3130

arch/x86/include/asm/pci.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <linux/numa.h>
1111
#include <asm/io.h>
1212
#include <asm/memtype.h>
13-
#include <asm/x86_init.h>
1413

1514
struct pci_sysdata {
1615
int domain; /* PCI domain */
@@ -124,16 +123,4 @@ cpumask_of_pcibus(const struct pci_bus *bus)
124123
}
125124
#endif
126125

127-
struct pci_setup_rom {
128-
struct setup_data data;
129-
uint16_t vendor;
130-
uint16_t devid;
131-
uint64_t pcilen;
132-
unsigned long segment;
133-
unsigned long bus;
134-
unsigned long device;
135-
unsigned long function;
136-
uint8_t romdata[];
137-
};
138-
139126
#endif /* _ASM_X86_PCI_H */

0 commit comments

Comments
 (0)