]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sgi-gru: add macros for using the UV hub to send interrupts
authorJack Steiner <steiner@sgi.com>
Thu, 2 Apr 2009 23:59:03 +0000 (16:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Apr 2009 02:05:05 +0000 (19:05 -0700)
Add macros for using the UV hub to send interrupts.  Change the IPI code
to use these macros.  These macros will also be used in additional patches
that will follow.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/ia64/include/asm/uv/uv_hub.h
arch/x86/include/asm/uv/uv_hub.h
arch/x86/kernel/apic/x2apic_uv_x.c

index f607018af4a19397691212e7074a55455a2f3cd2..53e9dfacd07393a57b9ae9ab114c2e4b5596f4dc 100644 (file)
@@ -305,5 +305,11 @@ static inline int uv_num_possible_blades(void)
        return 1;
 }
 
+static inline void uv_hub_send_ipi(int pnode, int apicid, int vector)
+{
+       /* not currently needed on ia64 */
+}
+
+
 #endif /* __ASM_IA64_UV_HUB__ */
 
index 466ac8d09b156efdf04871ba8dd1ed5148f0e7d8..d3a98ea1062ef936c7825f1387a4d2f4b83c65b9 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/timer.h>
 #include <asm/types.h>
 #include <asm/percpu.h>
+#include <asm/uv/uv_mmrs.h>
 
 
 /*
@@ -398,6 +399,7 @@ static inline void uv_set_scir_bits(unsigned char value)
                uv_write_local_mmr8(uv_hub_info->scir.offset, value);
        }
 }
+
 static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value)
 {
        if (uv_cpu_hub_info(cpu)->scir.state != value) {
@@ -406,5 +408,15 @@ static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value)
        }
 }
 
+static inline void uv_hub_send_ipi(int pnode, int apicid, int vector)
+{
+       unsigned long val;
+
+       val = (1UL << UVH_IPI_INT_SEND_SHFT) |
+                       ((apicid & 0x3f) << UVH_IPI_INT_APIC_ID_SHFT) |
+                       (vector << UVH_IPI_INT_VECTOR_SHFT);
+       uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
+}
+
 #endif /* CONFIG_X86_64 */
 #endif /* _ASM_X86_UV_UV_HUB_H */
index 1bd6da1f8fadba5b0fd96c97355122629e9cc30d..1248318436e8903b7ac3527ee1bbe59203325d24 100644 (file)
@@ -118,17 +118,12 @@ static int uv_wakeup_secondary(int phys_apicid, unsigned long start_rip)
 
 static void uv_send_IPI_one(int cpu, int vector)
 {
-       unsigned long val, apicid;
+       unsigned long apicid;
        int pnode;
 
        apicid = per_cpu(x86_cpu_to_apicid, cpu);
        pnode = uv_apicid_to_pnode(apicid);
-
-       val = (1UL << UVH_IPI_INT_SEND_SHFT) |
-             (apicid << UVH_IPI_INT_APIC_ID_SHFT) |
-             (vector << UVH_IPI_INT_VECTOR_SHFT);
-
-       uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
+       uv_hub_send_ipi(pnode, apicid, vector);
 }
 
 static void uv_send_IPI_mask(const struct cpumask *mask, int vector)