*/
static inline __attribute__((always_inline)) void stop_this_cpu(void)
{
-
/* Called by an AP when it is ready to halt and wait for a new task */
for(;;) {
hlt();
}
}
+#else
+void stop_this_cpu(void);
#endif
-#if ! defined (__ROMCC__)
+#if !defined(__PRE_RAM__)
#define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr))))
return x;
}
-
static inline void lapic_write_atomic(unsigned long reg, unsigned long v)
{
- xchg((volatile unsigned long *)(LAPIC_DEFAULT_BASE+reg), v);
+ (void)xchg((volatile unsigned long *)(LAPIC_DEFAULT_BASE+reg), v);
}
-#ifdef CONFIG_X86_GOOD_APIC
+#ifdef X86_GOOD_APIC
# define FORCE_READ_AROUND_WRITE 0
# define lapic_read_around(x) lapic_read(x)
# define lapic_write_around(x,y) lapic_write((x),(y))
void setup_lapic(void);
-
#if CONFIG_SMP == 1
struct device;
int start_cpu(struct device *cpu);
-
#endif /* CONFIG_SMP */
-
-#endif /* !__ROMCC__ */
+#endif /* !__PRE_RAM__ */
#endif /* CPU_X86_LAPIC_H */