]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/include/asm/apic.h
Merge branch 'x86/urgent' into x86/apic
[linux-2.6-omap-h63xx.git] / arch / x86 / include / asm / apic.h
index e644bf6f90dc8a8dc4cdb8c557ee9e8941622853..b03711d7990b8d6c7de68be47e80445452d64a52 100644 (file)
@@ -41,6 +41,21 @@ extern unsigned int apic_verbosity;
 extern int local_apic_timer_c2_ok;
 
 extern int disable_apic;
+
+#ifdef CONFIG_SMP
+extern void __inquire_remote_apic(int apicid);
+#else /* CONFIG_SMP */
+static inline void __inquire_remote_apic(int apicid)
+{
+}
+#endif /* CONFIG_SMP */
+
+static inline void default_inquire_remote_apic(int apicid)
+{
+       if (apic_verbosity >= APIC_DEBUG)
+               __inquire_remote_apic(apicid);
+}
+
 /*
  * Basic functions accessing APICs.
  */
@@ -54,7 +69,6 @@ extern int disable_apic;
 extern int is_vsmp_box(void);
 extern void xapic_wait_icr_idle(void);
 extern u32 safe_xapic_wait_icr_idle(void);
-extern u64 xapic_icr_read(void);
 extern void xapic_icr_write(u32, u32);
 extern int setup_profiling_timer(unsigned int);
 
@@ -197,4 +211,22 @@ static inline void disable_local_APIC(void) { }
 
 #endif /* !CONFIG_X86_LOCAL_APIC */
 
+#ifdef CONFIG_X86_64
+#define        SET_APIC_ID(x)          (apic->set_apic_id(x))
+#else
+
+#ifdef CONFIG_X86_LOCAL_APIC
+static inline unsigned default_get_apic_id(unsigned long x)
+{
+       unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));
+
+       if (APIC_XAPIC(ver))
+               return (x >> 24) & 0xFF;
+       else
+               return (x >> 24) & 0x0F;
+}
+#endif
+
+#endif
+
 #endif /* _ASM_X86_APIC_H */