efi: Fix TPM code build failure on ARM
Subsystems (2)
PATCH 1/1 efi: Fix TPM code build failure on ARM
asm/early_ioremap.h needs to be #included before tpm_eventlog.h in order to ensure that early_memremap is available.
--- drivers/firmware/efi/tpm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/firmware/efi/tpm.c +1 -2
@@ -7,13 +7,12 @@#define TPM_MEMREMAP (start, size) early_memremap(start, size)#define TPM_MEMUNMAP (start, size) early_memunmap(start, size) +#include <asm/early_ioremap.h> #include <linux/efi.h> #include <linux/init.h> #include <linux/memblock.h> #include <linux/tpm_eventlog.h> -#include <asm/early_ioremap.h> -int efi_tpm_final_log_size;EXPORT_SYMBOL (efi_tpm_final_log_size);
Signature · 1 line
2.22.0.rc1.311.g5d7573a151-goog
Quoted 4 lines · Matthew Garrett
asm/early_ioremap.hneeds to be #included beforetpm_eventlog.hin order to ensure thatearly_memremapis available.
Doesn't that make it tpm_eventlog.h's job to #include it?
Quoted 27 lines
Signed-off-by Matthew Garrett <[email protected]>--- drivers/firmware/efi/tpm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/firmware/efi/tpm.c +1
-3@@ -7,13 +7,12 @@#define TPM_MEMREMAP (start, size) early_memremap(start, size)#define TPM_MEMUNMAP (start, size) early_memunmap(start, size) +#include <asm/early_ioremap.h> #include <linux/efi.h> #include <linux/init.h> #include <linux/memblock.h> #include <linux/tpm_eventlog.h> -#include <asm/early_ioremap.h> -int efi_tpm_final_log_size;EXPORT_SYMBOL (efi_tpm_final_log_size); --2.22.0.rc1.311.g5d7573a151-goog
Quoted 8 lines · Ard Biesheuvel
Quoted 4 lines · Matthew Garrett
asm/early_ioremap.hneeds to be #included beforetpm_eventlog.hin order to ensure thatearly_memremapis available.Doesn't that make it tpm_eventlog.h's job to #include it?
tpm_eventlog.h doesn't use early_memremap directly, it's expanded from the macros declared in tpm.c .
Ard Biesheuvel
Acked-byQuoted 5 lines · Matthew Garrett
Quoted 3 lines · Ard Biesheuvel
Quoted 1 line · Matthew Garrett
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
asm/early_ioremap.hneeds to be #included beforetpm_eventlog.hin order to ensure thatearly_memremapis available.Doesn't that make it tpm_eventlog.h's job to #include it?
tpm_eventlog.hdoesn't useearly_memremapdirectly, it's expanded from the macros declared intpm.c.
Fair enough
Quoted 4 lines · Matthew Garrett
asm/early_ioremap.hneeds to be #included beforetpm_eventlog.hin order to ensure thatearly_memremapis available.Signed-off-by Matthew Garrett <[email protected]>
Thanks, squashed to "tpm: Reserve the TPM final events table".
/Jarkko