The memory attributes table is only used at init time by the core EFI code, so there is no need to carry its address in struct efi that is shared with the world. So move it out, and make it __ro_after_init as well, considering that the value is set during early boot.
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -539,7 +539,6 @@ extern struct efi { · 538 unmodified lines | ||
| 539 | 539 | unsigned long runtime; /* runtime table */ |
| 540 | 540 | unsigned long config_table; /* config tables */ |
| 541 | 541 | unsigned long esrt; /* ESRT table */ |
| 542 | − unsigned long mem_attr_table; /* memory attributes table */ | |
| 543 | 542 | unsigned long tpm_log; /* TPM2 Event Log table */ |
| 544 | 543 | unsigned long tpm_final_log; /* TPM2 Final Events Log table */ |
| 545 | 544 | unsigned long mem_reserve; /* Linux EFI memreserve table */ |
| @@ -641,6 +640,8 @@ extern void __init efi_fake_memmap(void); · 95 unmodified lines | ||
| 641 | 640 | static inline void efi_fake_memmap(void) { } |
| 642 | 641 | #endif |
| 643 | 642 | |
| 643 | +extern unsigned long efi_mem_attr_table; | |
| 644 | + | |
| 644 | 645 | /* |
| 645 | 646 | * efi_memattr_perm_setter - arch specific callback function passed into |
| 646 | 647 | * efi_memattr_apply_permissions() that updates the |