do { } while ( lapic_read( LAPIC_ICR ) & LAPIC_ICR_BUSY );
}
-
-
static inline void enable_lapic(void)
{
return lapic_read(LAPIC_ID) >> 24;
}
-
+#ifndef __ROMCC__
#if CONFIG_AP_IN_SIPI_WAIT != 1
/* If we need to go back to sipi wait, we use the long non-inlined version of
* this function in lapic_cpu_init.c
*/
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);
}
void setup_lapic(void);
-
#if CONFIG_SMP == 1
struct device;
int start_cpu(struct device *cpu);
-
#endif /* CONFIG_SMP */
+#endif /* !__PRE_RAM__ */
-#endif /* !__ROMCC__ */
+int boot_cpu(void);
+#endif
#endif /* CPU_X86_LAPIC_H */