Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sgi-gru: add macros for using the UV hub to send interrupts

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>

authored by

Jack Steiner and committed by
Linus Torvalds
66666e50 c7296700

+20 -7
+6
arch/ia64/include/asm/uv/uv_hub.h
··· 305 305 return 1; 306 306 } 307 307 308 + static inline void uv_hub_send_ipi(int pnode, int apicid, int vector) 309 + { 310 + /* not currently needed on ia64 */ 311 + } 312 + 313 + 308 314 #endif /* __ASM_IA64_UV_HUB__ */ 309 315
+12
arch/x86/include/asm/uv/uv_hub.h
··· 17 17 #include <linux/timer.h> 18 18 #include <asm/types.h> 19 19 #include <asm/percpu.h> 20 + #include <asm/uv/uv_mmrs.h> 20 21 21 22 22 23 /* ··· 399 398 uv_write_local_mmr8(uv_hub_info->scir.offset, value); 400 399 } 401 400 } 401 + 402 402 static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value) 403 403 { 404 404 if (uv_cpu_hub_info(cpu)->scir.state != value) { 405 405 uv_cpu_hub_info(cpu)->scir.state = value; 406 406 uv_write_local_mmr8(uv_cpu_hub_info(cpu)->scir.offset, value); 407 407 } 408 + } 409 + 410 + static inline void uv_hub_send_ipi(int pnode, int apicid, int vector) 411 + { 412 + unsigned long val; 413 + 414 + val = (1UL << UVH_IPI_INT_SEND_SHFT) | 415 + ((apicid & 0x3f) << UVH_IPI_INT_APIC_ID_SHFT) | 416 + (vector << UVH_IPI_INT_VECTOR_SHFT); 417 + uv_write_global_mmr64(pnode, UVH_IPI_INT, val); 408 418 } 409 419 410 420 #endif /* CONFIG_X86_64 */
+2 -7
arch/x86/kernel/apic/x2apic_uv_x.c
··· 118 118 119 119 static void uv_send_IPI_one(int cpu, int vector) 120 120 { 121 - unsigned long val, apicid; 121 + unsigned long apicid; 122 122 int pnode; 123 123 124 124 apicid = per_cpu(x86_cpu_to_apicid, cpu); 125 125 pnode = uv_apicid_to_pnode(apicid); 126 - 127 - val = (1UL << UVH_IPI_INT_SEND_SHFT) | 128 - (apicid << UVH_IPI_INT_APIC_ID_SHFT) | 129 - (vector << UVH_IPI_INT_VECTOR_SHFT); 130 - 131 - uv_write_global_mmr64(pnode, UVH_IPI_INT, val); 126 + uv_hub_send_ipi(pnode, apicid, vector); 132 127 } 133 128 134 129 static void uv_send_IPI_mask(const struct cpumask *mask, int vector)