]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: Make default_print_cpuinfo be a weak alias for print_cpuinfo
authorTom Rini <trini@konsulko.com>
Mon, 22 Jan 2024 14:35:12 +0000 (09:35 -0500)
committerSimon Glass <sjg@chromium.org>
Fri, 18 Oct 2024 20:10:21 +0000 (14:10 -0600)
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>
arch/x86/cpu/coreboot/coreboot.c
arch/x86/cpu/cpu.c
arch/x86/cpu/efi/app.c
arch/x86/cpu/efi/payload.c
arch/x86/cpu/slimbootloader/slimbootloader.c
arch/x86/cpu/tangier/tangier.c

index c3d7442b4a86063406547662ccb724a5a2527595..ef1a3f42d2e6196d79019db15f2c0171b85c7734 100644 (file)
@@ -43,11 +43,6 @@ int checkcpu(void)
        return 0;
 }
 
-int print_cpuinfo(void)
-{
-       return default_print_cpuinfo();
-}
-
 static void board_final_init(void)
 {
        /*
index ea11b09eacc00475b67b4c64c9489a8b9502b9e3..f8549e320923cb4b46aef7737d717c5548a66815 100644 (file)
@@ -163,6 +163,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",
index 218a68c4642dfc15cddc7faa18ba5f5a005aa227..84fe50e2f2f86b53a55c28e8639eb16610d123d8 100644 (file)
@@ -19,11 +19,6 @@ int checkcpu(void)
        return 0;
 }
 
-int print_cpuinfo(void)
-{
-       return default_print_cpuinfo();
-}
-
 void board_final_init(void)
 {
 }
index 642a87a37d8b2aeb65cca9adaf7506511f5ba78f..6845ce72ff940685a65b338bc2139338c1de678f 100644 (file)
@@ -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)
 {
index 142c9341cf86c041371ea7df2f925a1e49a8b451..8a5c78595aa68e1fafbaed7622540e82b4f44e57 100644 (file)
@@ -54,8 +54,3 @@ int checkcpu(void)
 {
        return 0;
 }
-
-int print_cpuinfo(void)
-{
-       return default_print_cpuinfo();
-}
index 8a8f7d27a9d19d534daf11c79f3db8ff1cd271f1..b005bc7d9a0edad15c067ddcedc17588baaa675a 100644 (file)
@@ -19,8 +19,3 @@ int checkcpu(void)
 {
        return 0;
 }
-
-int print_cpuinfo(void)
-{
-       return default_print_cpuinfo();
-}