[coreboot] Patch set updated for coreboot: d0b512f Fix gcc-4.7 building problem.

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Mon Nov 12 03:48:16 CET 2012

Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1784


commit d0b512fc33b2d3627a47a6a0b4b3d8ebea6905ec
Author: Han Shen <shenhan at google.com>
Date:   Tue Oct 16 10:42:25 2012 -0700

    Fix gcc-4.7 building problem.
    Applied function attribute to function definition to avoid 'conflicting type' warning.
    Function declaration is in src/include/cpu.h
      void secondary_cpu_init(unsigned int cpu_index)__attribute__((regparm(0)));
    But function definition in lapic_cpu_init.c is missing the "__attribute__" part.
    Change-Id: Idb7cd00fda5a2d486893f9866920929c685d266e
    Signed-off-by: Han Shen <shenhan at google.com>
 src/cpu/x86/lapic/lapic_cpu_init.c | 2 +-
 src/include/cpu/cpu.h              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c
index fc5a786..b721e8f 100644
--- a/src/cpu/x86/lapic/lapic_cpu_init.c
+++ b/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -373,7 +373,7 @@ static __inline__ __attribute__((always_inline)) void writecr4(unsigned long Dat
 /* C entry point of secondary cpus */
-void secondary_cpu_init(void)
+void __attribute__((regparm(0))) secondary_cpu_init(void)
diff --git a/src/include/cpu/cpu.h b/src/include/cpu/cpu.h
index 34ba61e..a9369fb 100644
--- a/src/include/cpu/cpu.h
+++ b/src/include/cpu/cpu.h
@@ -7,7 +7,7 @@
 void cpu_initialize(void);
 struct bus;
 void initialize_cpus(struct bus *cpu_bus);
-void secondary_cpu_init(void);
+void __attribute__((regparm(0))) secondary_cpu_init(void);
 void smm_init(void);

More information about the coreboot mailing list