From: Jack Steiner 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 --- arch/ia64/include/asm/uv/uv_hub.h | 6 ++++++ arch/x86/include/asm/uv/uv_hub.h | 12 ++++++++++++ arch/x86/kernel/genx2apic_uv_x.c | 9 ++------- 3 files changed, 20 insertions(+), 7 deletions(-) Index: linux/arch/ia64/include/asm/uv/uv_hub.h =================================================================== --- linux.orig/arch/ia64/include/asm/uv/uv_hub.h 2009-01-11 07:28:11.000000000 -0600 +++ linux/arch/ia64/include/asm/uv/uv_hub.h 2009-01-11 07:28:36.000000000 -0600 @@ -305,5 +305,11 @@ static inline int uv_num_possible_blades 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: linux/arch/x86/include/asm/uv/uv_hub.h =================================================================== --- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2009-01-11 07:28:11.000000000 -0600 +++ linux/arch/x86/include/asm/uv/uv_hub.h 2009-01-11 07:28:36.000000000 -0600 @@ -16,6 +16,7 @@ #include #include #include +#include /* @@ -401,4 +402,15 @@ static inline void uv_set_cpu_scir_bits( } } +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 /* _ASM_X86_UV_UV_HUB_H */ Index: linux/arch/x86/kernel/genx2apic_uv_x.c =================================================================== --- linux.orig/arch/x86/kernel/genx2apic_uv_x.c 2009-01-11 07:28:11.000000000 -0600 +++ linux/arch/x86/kernel/genx2apic_uv_x.c 2009-01-11 07:28:36.000000000 -0600 @@ -113,17 +113,12 @@ int uv_wakeup_secondary(int phys_apicid, static void uv_send_IPI_one(int cpu, int vector) { - unsigned long val, apicid, lapicid; + unsigned long apicid; int pnode; apicid = per_cpu(x86_cpu_to_apicid, cpu); - lapicid = apicid & 0x3f; /* ZZZ macro needed */ pnode = uv_apicid_to_pnode(apicid); - val = - (1UL << UVH_IPI_INT_SEND_SHFT) | (lapicid << - 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) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/