Message ID | 20240122143512.196907-1-trini@konsulko.com |
---|---|
State | Accepted |
Commit | b84d2f203edb102568cd63630394559d62d51737 |
Delegated to: | Simon Glass |
Headers | show |
Series | x86: Make default_print_cpuinfo be a weak alias for print_cpuinfo | expand |
While a few SoCs have a unique print_cpuinfo function, a number of them
just use default_print_cpuinfo. Make default_print_cpuinfo have a weak
alias to provie print_cpuinfo.
Signed-off-by: Tom Rini <trini@konsulko.com>
---
This will make re-using arch/x86/cpu/efi/ as a generic set of support
code for U-Boot as EFI payload/app a little bit easier.
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
---
arch/x86/cpu/coreboot/coreboot.c | 5 -----
arch/x86/cpu/cpu.c | 2 ++
arch/x86/cpu/efi/app.c | 5 -----
arch/x86/cpu/efi/payload.c | 5 -----
arch/x86/cpu/slimbootloader/slimbootloader.c | 5 -----
arch/x86/cpu/tangier/tangier.c | 5 -----
6 files changed, 2 insertions(+), 25 deletions(-)
Applied to u-boot-dm, thanks!
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c index 82fe4c71cd27..5c8d32ff6acd 100644 --- a/arch/x86/cpu/coreboot/coreboot.c +++ b/arch/x86/cpu/coreboot/coreboot.c @@ -44,11 +44,6 @@ int checkcpu(void) return 0; } -int print_cpuinfo(void) -{ - return default_print_cpuinfo(); -} - static void board_final_init(void) { /* diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index ce55efc454bf..5090f5cad746 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -165,6 +165,8 @@ char *cpu_get_name(char *name) return ptr; } +int print_cpuinfo(void) __attribute__((weak, alias("default_print_cpuinfo"))); + int default_print_cpuinfo(void) { printf("CPU: %s, vendor %s, device %xh\n", diff --git a/arch/x86/cpu/efi/app.c b/arch/x86/cpu/efi/app.c index f754489784a7..0eea9e2b0975 100644 --- a/arch/x86/cpu/efi/app.c +++ b/arch/x86/cpu/efi/app.c @@ -19,11 +19,6 @@ int checkcpu(void) return 0; } -int print_cpuinfo(void) -{ - return default_print_cpuinfo(); -} - void board_final_init(void) { } diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c index 708bfbe7ee48..2bf4fefc19e6 100644 --- a/arch/x86/cpu/efi/payload.c +++ b/arch/x86/cpu/efi/payload.c @@ -144,11 +144,6 @@ int checkcpu(void) return 0; } -int print_cpuinfo(void) -{ - return default_print_cpuinfo(); -} - /* Find any available tables and copy them to a safe place */ int reserve_arch(void) { diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c index ec5b87cfd63f..1f98db1f7c77 100644 --- a/arch/x86/cpu/slimbootloader/slimbootloader.c +++ b/arch/x86/cpu/slimbootloader/slimbootloader.c @@ -55,8 +55,3 @@ int checkcpu(void) { return 0; } - -int print_cpuinfo(void) -{ - return default_print_cpuinfo(); -} diff --git a/arch/x86/cpu/tangier/tangier.c b/arch/x86/cpu/tangier/tangier.c index 1e2f6cc8b700..35bbecbf8479 100644 --- a/arch/x86/cpu/tangier/tangier.c +++ b/arch/x86/cpu/tangier/tangier.c @@ -20,8 +20,3 @@ int checkcpu(void) { return 0; } - -int print_cpuinfo(void) -{ - return default_print_cpuinfo(); -}
While a few SoCs have a unique print_cpuinfo function, a number of them just use default_print_cpuinfo. Make default_print_cpuinfo have a weak alias to provie print_cpuinfo. Signed-off-by: Tom Rini <trini@konsulko.com> --- This will make re-using arch/x86/cpu/efi/ as a generic set of support code for U-Boot as EFI payload/app a little bit easier. Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> --- arch/x86/cpu/coreboot/coreboot.c | 5 ----- arch/x86/cpu/cpu.c | 2 ++ arch/x86/cpu/efi/app.c | 5 ----- arch/x86/cpu/efi/payload.c | 5 ----- arch/x86/cpu/slimbootloader/slimbootloader.c | 5 ----- arch/x86/cpu/tangier/tangier.c | 5 ----- 6 files changed, 2 insertions(+), 25 deletions(-)