Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18220
-gerrit
commit 4420b8f419a7ca0e60b74f1e7a90ea9d25414ab8 Author: Patrick Georgi pgeorgi@chromium.org Date: Tue Jan 24 12:30:04 2017 +0100
arch/x86: do not define type of SPIN_LOCK_UNLOCKED
This fixes building coreboot with -std=gnu11 on gcc 4.9.x Also needs fix ups for asus/kcma-d8 and asus/kgpe-d16 due to the missing type.
Change-Id: I920d492a1422433d7d4b4659b27f5a22914bc438 Signed-off-by: Patrick Georgi pgeorgi@chromium.org --- src/arch/x86/include/arch/smp/spinlock.h | 2 +- src/mainboard/asus/kcma-d8/romstage.c | 6 +++--- src/mainboard/asus/kgpe-d16/romstage.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/arch/x86/include/arch/smp/spinlock.h b/src/arch/x86/include/arch/smp/spinlock.h index 24f52f1..767f96e 100644 --- a/src/arch/x86/include/arch/smp/spinlock.h +++ b/src/arch/x86/include/arch/smp/spinlock.h @@ -36,7 +36,7 @@ spinlock_t* romstage_microcode_cbfs_lock(void); void initialize_romstage_microcode_cbfs_lock(void); #endif
-#define SPIN_LOCK_UNLOCKED (spinlock_t) { 1 } +#define SPIN_LOCK_UNLOCKED { 1 }
#ifndef __PRE_RAM__ #define DECLARE_SPIN_LOCK(x) static spinlock_t x = SPIN_LOCK_UNLOCKED; diff --git a/src/mainboard/asus/kcma-d8/romstage.c b/src/mainboard/asus/kcma-d8/romstage.c index c31d98a..8697bbb 100644 --- a/src/mainboard/asus/kcma-d8/romstage.c +++ b/src/mainboard/asus/kcma-d8/romstage.c @@ -323,7 +323,7 @@ spinlock_t* romstage_console_lock(void)
void initialize_romstage_console_lock(void) { - car_get_var(printk_spinlock) = SPIN_LOCK_UNLOCKED; + spin_unlock(romstage_console_lock()); }
static spinlock_t nvram_cbfs_spinlock CAR_GLOBAL; @@ -335,7 +335,7 @@ spinlock_t* romstage_nvram_cbfs_lock(void)
void initialize_romstage_nvram_cbfs_lock(void) { - car_get_var(nvram_cbfs_spinlock) = SPIN_LOCK_UNLOCKED; + spin_unlock(romstage_nvram_cbfs_lock()); }
static spinlock_t microcode_cbfs_spinlock CAR_GLOBAL; @@ -347,7 +347,7 @@ spinlock_t* romstage_microcode_cbfs_lock(void)
void initialize_romstage_microcode_cbfs_lock(void) { - car_get_var(microcode_cbfs_spinlock) = SPIN_LOCK_UNLOCKED; + spin_unlock(romstage_microcode_cbfs_lock()); }
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx) diff --git a/src/mainboard/asus/kgpe-d16/romstage.c b/src/mainboard/asus/kgpe-d16/romstage.c index 72581a0..7e8fb97 100644 --- a/src/mainboard/asus/kgpe-d16/romstage.c +++ b/src/mainboard/asus/kgpe-d16/romstage.c @@ -363,7 +363,7 @@ spinlock_t* romstage_console_lock(void)
void initialize_romstage_console_lock(void) { - car_get_var(printk_spinlock) = SPIN_LOCK_UNLOCKED; + spin_unlock(romstage_console_lock()); }
static spinlock_t nvram_cbfs_spinlock CAR_GLOBAL; @@ -375,7 +375,7 @@ spinlock_t* romstage_nvram_cbfs_lock(void)
void initialize_romstage_nvram_cbfs_lock(void) { - car_get_var(nvram_cbfs_spinlock) = SPIN_LOCK_UNLOCKED; + spin_unlock(romstage_nvram_cbfs_lock()); }
static spinlock_t microcode_cbfs_spinlock CAR_GLOBAL; @@ -387,7 +387,7 @@ spinlock_t* romstage_microcode_cbfs_lock(void)
void initialize_romstage_microcode_cbfs_lock(void) { - car_get_var(microcode_cbfs_spinlock) = SPIN_LOCK_UNLOCKED; + spin_unlock(romstage_microcode_cbfs_lock()); }
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)