This should access arch-specific properties. Fix it and update the
existing usage.

Signed-off-by: Simon Glass <s...@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.g...@gmx.de>
---

(no changes since v2)

Changes in v2:
- Add a new patch to correct gd_smbios_start()

 include/asm-generic/global_data.h | 2 +-
 lib/efi_loader/efi_smbios.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-generic/global_data.h 
b/include/asm-generic/global_data.h
index e8c6412e3f8..c1f7818817f 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -553,7 +553,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
 #endif
 
 #ifdef CONFIG_SMBIOS
-#define gd_smbios_start()      gd->smbios_start
+#define gd_smbios_start()      gd->arch.smbios_start
 #define gd_set_smbios_start(addr)      gd->arch.smbios_start = addr
 #else
 #define gd_smbios_start()      0UL
diff --git a/lib/efi_loader/efi_smbios.c b/lib/efi_loader/efi_smbios.c
index bbb8421ce14..49adc87e45a 100644
--- a/lib/efi_loader/efi_smbios.c
+++ b/lib/efi_loader/efi_smbios.c
@@ -28,7 +28,7 @@ efi_status_t efi_smbios_register(void)
        ulong addr;
        efi_status_t ret;
 
-       addr = gd->arch.smbios_start;
+       addr = gd_smbios_start();
        if (!addr) {
                log_err("No SMBIOS tables to install\n");
                return EFI_NOT_FOUND;
-- 
2.34.1

Reply via email to