Commit 2afa7994 authored by Thomas Zimmermann's avatar Thomas Zimmermann Committed by Borislav Petkov (AMD)

x86/setup: Move internal setup_data structures into setup_data.h

Move struct_efi_setup_data in order to unify duplicated definition of
the data structure in a single place. Also silence clang's warnings
about GNU extensions in real-mode code which might occur from the
changed includes.

  [ bp: Massage commit message. ]
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: default avatarArd Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20240112095000.8952-3-tzimmermann@suse.de
parent efd7def0
...@@ -53,6 +53,9 @@ REALMODE_CFLAGS += -fno-stack-protector ...@@ -53,6 +53,9 @@ REALMODE_CFLAGS += -fno-stack-protector
REALMODE_CFLAGS += -Wno-address-of-packed-member REALMODE_CFLAGS += -Wno-address-of-packed-member
REALMODE_CFLAGS += $(cc_stack_align4) REALMODE_CFLAGS += $(cc_stack_align4)
REALMODE_CFLAGS += $(CLANG_FLAGS) REALMODE_CFLAGS += $(CLANG_FLAGS)
ifdef CONFIG_CC_IS_CLANG
REALMODE_CFLAGS += -Wno-gnu
endif
export REALMODE_CFLAGS export REALMODE_CFLAGS
# BITS is used as extension for files which are available in a 32 bit # BITS is used as extension for files which are available in a 32 bit
......
...@@ -97,15 +97,6 @@ typedef struct { ...@@ -97,15 +97,6 @@ typedef struct {
u32 tables; u32 tables;
} efi_system_table_32_t; } efi_system_table_32_t;
/* kexec external ABI */
struct efi_setup_data {
u64 fw_vendor;
u64 __unused;
u64 tables;
u64 smbios;
u64 reserved[8];
};
struct efi_unaccepted_memory { struct efi_unaccepted_memory {
u32 version; u32 version;
u32 unit_size; u32 unit_size;
......
...@@ -143,15 +143,6 @@ extern void efi_free_boot_services(void); ...@@ -143,15 +143,6 @@ extern void efi_free_boot_services(void);
void arch_efi_call_virt_setup(void); void arch_efi_call_virt_setup(void);
void arch_efi_call_virt_teardown(void); void arch_efi_call_virt_teardown(void);
/* kexec external ABI */
struct efi_setup_data {
u64 fw_vendor;
u64 __unused;
u64 tables;
u64 smbios;
u64 reserved[8];
};
extern u64 efi_setup; extern u64 efi_setup;
#ifdef CONFIG_EFI #ifdef CONFIG_EFI
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include <linux/numa.h> #include <linux/numa.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/memtype.h> #include <asm/memtype.h>
#include <asm/setup_data.h>
struct pci_sysdata { struct pci_sysdata {
int domain; /* PCI domain */ int domain; /* PCI domain */
...@@ -124,16 +123,4 @@ cpumask_of_pcibus(const struct pci_bus *bus) ...@@ -124,16 +123,4 @@ cpumask_of_pcibus(const struct pci_bus *bus)
} }
#endif #endif
struct pci_setup_rom {
struct setup_data data;
uint16_t vendor;
uint16_t devid;
uint64_t pcilen;
unsigned long segment;
unsigned long bus;
unsigned long device;
unsigned long function;
uint8_t romdata[];
};
#endif /* _ASM_X86_PCI_H */ #endif /* _ASM_X86_PCI_H */
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_X86_SETUP_DATA_H
#define _ASM_X86_SETUP_DATA_H
#include <uapi/asm/setup_data.h>
#ifndef __ASSEMBLY__
struct pci_setup_rom {
struct setup_data data;
uint16_t vendor;
uint16_t devid;
uint64_t pcilen;
unsigned long segment;
unsigned long bus;
unsigned long device;
unsigned long function;
uint8_t romdata[];
};
/* kexec external ABI */
struct efi_setup_data {
u64 fw_vendor;
u64 __unused;
u64 tables;
u64 smbios;
u64 reserved[8];
};
#endif /* __ASSEMBLY__ */
#endif /* _ASM_X86_SETUP_DATA_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment