- SMP cleanups (remove SMP only use CONFIG_SMP) - Minor tweaks to romcc to keep it from taking forever compiling - failover fixes - Get a good implementation of k8_cpufixup and sizeram for the opteron git-svn-id: svn://svn.coreboot.org/coreboot/trunk@998 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
25 lines
618 B
C
25 lines
618 B
C
#ifndef SMP_SPINLOCK_H
|
|
#define SMP_SPINLOCK_H
|
|
|
|
#ifdef CONFIG_SMP
|
|
#include <arch/smp/spinlock.h>
|
|
#else /* !CONFIG_SMP */
|
|
|
|
/* Most GCC versions have a nasty bug with empty initializers */
|
|
#if (__GNUC__ > 2)
|
|
typedef struct { } spinlock_t;
|
|
#define SPIN_LOCK_UNLOCKED (spinlock_t) { }
|
|
#else
|
|
typedef struct { int gcc_is_buggy; } spinlock_t;
|
|
#define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
|
|
#endif
|
|
|
|
#define barrier() do {} while(0)
|
|
#define spin_is_locked(lock) 0
|
|
#define spin_unlock_wait(lock) do {} while(0)
|
|
#define spin_lock(lock) do {} while(0)
|
|
#define spin_unlock(lock) do {} while(0)
|
|
#endif
|
|
|
|
#endif /* SMP_SPINLOCK_H */
|