]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Suresh Siddha <suresh.b.siddha@intel.com> |
2 | Subject: x64, x2apic/intr-remap: introcude self IPI to genapic routines | |
3 | References: fate #303948 and fate #303984 | |
4 | Patch-Mainline: queued for .28 | |
5 | Commit-ID: cff73a6ffaed726780b001937d2a42efde553922 | |
6 | ||
7 | Signed-off-by: Thomas Renninger <trenn@suse.de> | |
8 | ||
9 | Introduce self IPI op for genapic. | |
10 | ||
11 | Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> | |
12 | Cc: akpm@linux-foundation.org | |
13 | Cc: arjan@linux.intel.com | |
14 | Cc: andi@firstfloor.org | |
15 | Cc: ebiederm@xmission.com | |
16 | Cc: jbarnes@virtuousgeek.org | |
17 | Cc: steiner@sgi.com | |
18 | Signed-off-by: Ingo Molnar <mingo@elte.hu> | |
19 | ||
20 | --- | |
21 | arch/x86/kernel/genapic_64.c | 2 +- | |
22 | arch/x86/kernel/genapic_flat_64.c | 2 ++ | |
23 | include/asm-x86/genapic_64.h | 2 ++ | |
24 | include/asm-x86/hw_irq.h | 2 ++ | |
25 | include/asm-x86/mach-default/mach_apic.h | 1 + | |
26 | 5 files changed, 8 insertions(+), 1 deletion(-) | |
27 | ||
28 | Index: linux-2.6.26/arch/x86/kernel/genapic_64.c | |
29 | =================================================================== | |
30 | --- linux-2.6.26.orig/arch/x86/kernel/genapic_64.c | |
31 | +++ linux-2.6.26/arch/x86/kernel/genapic_64.c | |
32 | @@ -61,7 +61,7 @@ void __init setup_apic_routing(void) | |
33 | ||
34 | /* Same for both flat and physical. */ | |
35 | ||
36 | -void send_IPI_self(int vector) | |
37 | +void apic_send_IPI_self(int vector) | |
38 | { | |
39 | __send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL); | |
40 | } | |
41 | Index: linux-2.6.26/arch/x86/kernel/genapic_flat_64.c | |
42 | =================================================================== | |
43 | --- linux-2.6.26.orig/arch/x86/kernel/genapic_flat_64.c | |
44 | +++ linux-2.6.26/arch/x86/kernel/genapic_flat_64.c | |
45 | @@ -131,6 +131,7 @@ struct genapic apic_flat = { | |
46 | .send_IPI_all = flat_send_IPI_all, | |
47 | .send_IPI_allbutself = flat_send_IPI_allbutself, | |
48 | .send_IPI_mask = flat_send_IPI_mask, | |
49 | + .send_IPI_self = apic_send_IPI_self, | |
50 | .cpu_mask_to_apicid = flat_cpu_mask_to_apicid, | |
51 | .phys_pkg_id = phys_pkg_id, | |
52 | .read_apic_id = read_xapic_id, | |
53 | @@ -196,6 +197,7 @@ struct genapic apic_physflat = { | |
54 | .send_IPI_all = physflat_send_IPI_all, | |
55 | .send_IPI_allbutself = physflat_send_IPI_allbutself, | |
56 | .send_IPI_mask = physflat_send_IPI_mask, | |
57 | + .send_IPI_self = apic_send_IPI_self, | |
58 | .cpu_mask_to_apicid = physflat_cpu_mask_to_apicid, | |
59 | .phys_pkg_id = phys_pkg_id, | |
60 | .read_apic_id = read_xapic_id, | |
61 | Index: linux-2.6.26/include/asm-x86/genapic_64.h | |
62 | =================================================================== | |
63 | --- linux-2.6.26.orig/include/asm-x86/genapic_64.h | |
64 | +++ linux-2.6.26/include/asm-x86/genapic_64.h | |
65 | @@ -24,6 +24,7 @@ struct genapic { | |
66 | void (*send_IPI_mask)(cpumask_t mask, int vector); | |
67 | void (*send_IPI_allbutself)(int vector); | |
68 | void (*send_IPI_all)(int vector); | |
69 | + void (*send_IPI_self)(int vector); | |
70 | /* */ | |
71 | unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask); | |
72 | unsigned int (*phys_pkg_id)(int index_msb); | |
73 | @@ -36,6 +37,7 @@ extern struct genapic apic_flat; | |
74 | extern struct genapic apic_physflat; | |
75 | extern int acpi_madt_oem_check(char *, char *); | |
76 | ||
77 | +extern void apic_send_IPI_self(int vector); | |
78 | enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC}; | |
79 | extern enum uv_system_type get_uv_system_type(void); | |
80 | extern int is_uv_system(void); | |
81 | Index: linux-2.6.26/include/asm-x86/hw_irq.h | |
82 | =================================================================== | |
83 | --- linux-2.6.26.orig/include/asm-x86/hw_irq.h | |
84 | +++ linux-2.6.26/include/asm-x86/hw_irq.h | |
85 | @@ -73,7 +73,9 @@ extern void enable_IO_APIC(void); | |
86 | #endif | |
87 | ||
88 | /* IPI functions */ | |
89 | +#ifdef CONFIG_X86_32 | |
90 | extern void send_IPI_self(int vector); | |
91 | +#endif | |
92 | extern void send_IPI(int dest, int vector); | |
93 | ||
94 | /* Statistics */ | |
95 | Index: linux-2.6.26/include/asm-x86/mach-default/mach_apic.h | |
96 | =================================================================== | |
97 | --- linux-2.6.26.orig/include/asm-x86/mach-default/mach_apic.h | |
98 | +++ linux-2.6.26/include/asm-x86/mach-default/mach_apic.h | |
99 | @@ -31,6 +31,7 @@ static inline cpumask_t target_cpus(void | |
100 | #define phys_pkg_id (genapic->phys_pkg_id) | |
101 | #define vector_allocation_domain (genapic->vector_allocation_domain) | |
102 | #define read_apic_id (genapic->read_apic_id) | |
103 | +#define send_IPI_self (genapic->send_IPI_self) | |
104 | extern void setup_apic_routing(void); | |
105 | #else | |
106 | #define INT_DELIVERY_MODE dest_LowestPrio |