Skip to content

Commit 5443937

Browse files
nivedita76ardbiesheuvel
authored andcommitted
efi: Kill __efistub_global
Now that both arm and x86 are using the linker script to place the EFI stub's global variables in the correct section, remove __efistub_global. Signed-off-by: Arvind Sankar <[email protected]> Reviewed-by: Ard Biesheuvel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent 26a9242 commit 5443937

File tree

5 files changed

+11
-14
lines changed

5 files changed

+11
-14
lines changed

drivers/firmware/efi/libstub/efi-stub-helper.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@
1212

1313
#include "efistub.h"
1414

15-
static bool __efistub_global efi_nochunk;
16-
static bool __efistub_global efi_nokaslr;
17-
static bool __efistub_global efi_noinitrd;
18-
static bool __efistub_global efi_quiet;
19-
static bool __efistub_global efi_novamap;
20-
static bool __efistub_global efi_nosoftreserve;
21-
static bool __efistub_global efi_disable_pci_dma =
22-
IS_ENABLED(CONFIG_EFI_DISABLE_PCI_DMA);
15+
static bool efi_nochunk;
16+
static bool efi_nokaslr;
17+
static bool efi_noinitrd;
18+
static bool efi_quiet;
19+
static bool efi_novamap;
20+
static bool efi_nosoftreserve;
21+
static bool efi_disable_pci_dma = IS_ENABLED(CONFIG_EFI_DISABLE_PCI_DMA);
2322

2423
bool __pure nochunk(void)
2524
{

drivers/firmware/efi/libstub/efi-stub.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
#endif
3737

3838
static u64 virtmap_base = EFI_RT_VIRTUAL_BASE;
39-
static bool __efistub_global flat_va_mapping;
39+
static bool flat_va_mapping;
4040

41-
static efi_system_table_t *__efistub_global sys_table;
41+
static efi_system_table_t *sys_table;
4242

4343
__pure efi_system_table_t *efi_system_table(void)
4444
{

drivers/firmware/efi/libstub/efistub.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
#define EFI_ALLOC_ALIGN EFI_PAGE_SIZE
2626
#endif
2727

28-
#define __efistub_global
29-
3028
extern bool __pure nochunk(void);
3129
extern bool __pure nokaslr(void);
3230
extern bool __pure noinitrd(void);

drivers/firmware/efi/libstub/gop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static struct {
3232
u8 depth;
3333
} res;
3434
};
35-
} cmdline __efistub_global = { .option = EFI_CMDLINE_NONE };
35+
} cmdline = { .option = EFI_CMDLINE_NONE };
3636

3737
static bool parse_modenum(char *option, char **next)
3838
{

drivers/firmware/efi/libstub/x86-stub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/* Maximum physical address for 64-bit kernel with 4-level paging */
2121
#define MAXMEM_X86_64_4LEVEL (1ull << 46)
2222

23-
static efi_system_table_t *sys_table __efistub_global;
23+
static efi_system_table_t *sys_table;
2424
extern const bool efi_is64;
2525
extern u32 image_offset;
2626

0 commit comments

Comments
 (0)