Move mach_ipi.h definitions into genapic.h.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
 }
 
 #endif /* CONFIG_X86_LOCAL_APIC */
+
 #endif /* _ASM_X86_GENAPIC_64_H */
 
 #ifndef _ASM_X86_IPI_H
 #define _ASM_X86_IPI_H
 
+#ifdef CONFIG_X86_LOCAL_APIC
+
 /*
  * Copyright 2004 James Cleverdon, IBM.
  * Subject to the GNU Public License, v.2
 }
 
 static inline void
-__default_send_IPI_shortcut(unsigned int shortcut,
-                           int vector, unsigned int dest)
+__default_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int dest)
 {
        /*
         * Subtle. In the case of the 'never do double writes' workaround
        local_irq_restore(flags);
 }
 
+
+/* Avoid include hell */
+#define NMI_VECTOR 0x02
+
+void default_send_IPI_mask_bitmask(const struct cpumask *mask, int vector);
+void default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
+
+extern int no_broadcast;
+
+#ifdef CONFIG_X86_64
+#include <asm/genapic.h>
+#else
+static inline void default_send_IPI_mask(const struct cpumask *mask, int vector)
+{
+       default_send_IPI_mask_bitmask(mask, vector);
+}
+void default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
+#endif
+
+static inline void __default_local_send_IPI_allbutself(int vector)
+{
+       if (no_broadcast || vector == NMI_VECTOR)
+               apic->send_IPI_mask_allbutself(cpu_online_mask, vector);
+       else
+               __default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector, apic->dest_logical);
+}
+
+static inline void __default_local_send_IPI_all(int vector)
+{
+       if (no_broadcast || vector == NMI_VECTOR)
+               apic->send_IPI_mask(cpu_online_mask, vector);
+       else
+               __default_send_IPI_shortcut(APIC_DEST_ALLINC, vector, apic->dest_logical);
+}
+
+#ifdef CONFIG_X86_32
+static inline void default_send_IPI_allbutself(int vector)
+{
+       /*
+        * if there are no other CPUs in the system then we get an APIC send 
+        * error if we try to broadcast, thus avoid sending IPIs in this case.
+        */
+       if (!(num_online_cpus() > 1))
+               return;
+
+       __default_local_send_IPI_allbutself(vector);
+}
+
+static inline void default_send_IPI_all(int vector)
+{
+       __default_local_send_IPI_all(vector);
+}
+#endif
+
+#endif
+
 #endif /* _ASM_X86_IPI_H */
 
+++ /dev/null
-#ifndef _ASM_X86_MACH_DEFAULT_MACH_IPI_H
-#define _ASM_X86_MACH_DEFAULT_MACH_IPI_H
-
-/* Avoid include hell */
-#define NMI_VECTOR 0x02
-
-void default_send_IPI_mask_bitmask(const struct cpumask *mask, int vector);
-void default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
-void __default_send_IPI_shortcut(unsigned int shortcut, int vector);
-
-extern int no_broadcast;
-
-#ifdef CONFIG_X86_64
-#include <asm/genapic.h>
-#else
-static inline void default_send_IPI_mask(const struct cpumask *mask, int vector)
-{
-       default_send_IPI_mask_bitmask(mask, vector);
-}
-void default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
-#endif
-
-static inline void __default_local_send_IPI_allbutself(int vector)
-{
-       if (no_broadcast || vector == NMI_VECTOR)
-               apic->send_IPI_mask_allbutself(cpu_online_mask, vector);
-       else
-               __default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
-}
-
-static inline void __default_local_send_IPI_all(int vector)
-{
-       if (no_broadcast || vector == NMI_VECTOR)
-               apic->send_IPI_mask(cpu_online_mask, vector);
-       else
-               __default_send_IPI_shortcut(APIC_DEST_ALLINC, vector);
-}
-
-#ifdef CONFIG_X86_32
-static inline void default_send_IPI_allbutself(int vector)
-{
-       /*
-        * if there are no other CPUs in the system then we get an APIC send 
-        * error if we try to broadcast, thus avoid sending IPIs in this case.
-        */
-       if (!(num_online_cpus() > 1))
-               return;
-
-       __default_local_send_IPI_allbutself(vector);
-}
-
-static inline void default_send_IPI_all(int vector)
-{
-       __default_local_send_IPI_all(vector);
-}
-#endif
-
-#endif /* _ASM_X86_MACH_DEFAULT_MACH_IPI_H */
 
+++ /dev/null
-#ifndef _ASM_X86_MACH_GENERIC_GPIO_H
-#define _ASM_X86_MACH_GENERIC_GPIO_H
-
-int gpio_request(unsigned gpio, const char *label);
-void gpio_free(unsigned gpio);
-int gpio_direction_input(unsigned gpio);
-int gpio_direction_output(unsigned gpio, int value);
-int gpio_get_value(unsigned gpio);
-void gpio_set_value(unsigned gpio, int value);
-int gpio_to_irq(unsigned gpio);
-int irq_to_gpio(unsigned irq);
-
-#include <asm-generic/gpio.h>           /* cansleep wrappers */
-
-#endif /* _ASM_X86_MACH_GENERIC_GPIO_H */
 
+++ /dev/null
-#ifndef _ASM_X86_MACH_GENERIC_MACH_IPI_H
-#define _ASM_X86_MACH_GENERIC_MACH_IPI_H
-
-#include <asm/genapic.h>
-
-#endif /* _ASM_X86_MACH_GENERIC_MACH_IPI_H */
 
+++ /dev/null
-#ifndef _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H
-#define _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H
-
-#endif /* _ASM_X86_MACH_GENERIC_MACH_APIC_H */
 
 #include <asm/i8259.h>
 #include <asm/smp.h>
 
-#include <mach_ipi.h>
+#include <asm/genapic.h>
 
 /*
  * Sanity check
 
 #include <asm/reboot.h>
 #include <asm/virtext.h>
 
-#include <mach_ipi.h>
+#include <asm/genapic.h>
 
 
 #if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC)
 
 #include <asm/uv/uv_hub.h>
 #include <asm/uv/uv_irq.h>
 
-#include <mach_ipi.h>
 #include <asm/genapic.h>
 
 #define __apicdebuginit(type) static type __init
 
 
 #ifdef CONFIG_X86_32
 #include <asm/genapic.h>
-#include <mach_ipi.h>
 
 /*
  * the following functions deal with sending IPIs between CPUs.
 
 #include <asm/apicdef.h>
 #include <asm/system.h>
 
-#include <mach_ipi.h>
+#include <asm/genapic.h>
 
 /*
  * Put the error code here just in case the user cares:
 
 # include <asm/iommu.h>
 #endif
 
-#include <mach_ipi.h>
+#include <asm/genapic.h>
 
 /*
  * Power off function, if any
 
 #include <asm/tlbflush.h>
 #include <asm/mmu_context.h>
 #include <asm/proto.h>
-#include <mach_ipi.h>
 #include <asm/genapic.h>
 /*
  *     Some notes on x86 processor bugs affecting SMP operation:
 
 #include <asm/e820.h>
 #include <asm/io.h>
 
-#include <mach_ipi.h>
+#include <asm/genapic.h>
 
 #include <asm/genapic.h>
 
 
 #include <asm/e820.h>
 #include <asm/setup.h>
 
-#include <mach_ipi.h>
+#include <asm/genapic.h>
 
 #ifdef CONFIG_HOTPLUG_CPU
 #define DEFAULT_SEND_IPI       (1)
 
 #include <linux/smp.h>
 #include <linux/init.h>
 #include <asm/genapic.h>
-#include <asm/mach-default/mach_ipi.h>
+#include <asm/ipi.h>
 
 static void default_vector_allocation_domain(int cpu, struct cpumask *retmask)
 {
 
 DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate)
                        = { &init_mm, 0, };
 
-#include <mach_ipi.h>
+#include <asm/genapic.h>
 /*
  *     Smarter SMP flushing macros.
  *             c/o Linus Torvalds.