diff options
-rw-r--r-- | arch/x86/include/asm/genapic.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/ipi.h | 61 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_ipi.h | 58 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-generic/gpio.h | 15 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-generic/mach_ipi.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-generic/mach_wakecpu.h | 4 | ||||
-rw-r--r-- | arch/x86/kernel/apic.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/crash.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/io_apic.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/ipi.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/kgdb.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/reboot.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/smp.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/visws_quirks.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-default/setup.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/default.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/tlb.c | 2 |
17 files changed, 68 insertions, 96 deletions
diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h index ccfcd19d5b7d..273b99452ae0 100644 --- a/arch/x86/include/asm/genapic.h +++ b/arch/x86/include/asm/genapic.h | |||
@@ -259,4 +259,5 @@ static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) | |||
259 | } | 259 | } |
260 | 260 | ||
261 | #endif /* CONFIG_X86_LOCAL_APIC */ | 261 | #endif /* CONFIG_X86_LOCAL_APIC */ |
262 | |||
262 | #endif /* _ASM_X86_GENAPIC_64_H */ | 263 | #endif /* _ASM_X86_GENAPIC_64_H */ |
diff --git a/arch/x86/include/asm/ipi.h b/arch/x86/include/asm/ipi.h index a8d717f2c7e7..e2e8e4e0a656 100644 --- a/arch/x86/include/asm/ipi.h +++ b/arch/x86/include/asm/ipi.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ASM_X86_IPI_H | 1 | #ifndef _ASM_X86_IPI_H |
2 | #define _ASM_X86_IPI_H | 2 | #define _ASM_X86_IPI_H |
3 | 3 | ||
4 | #ifdef CONFIG_X86_LOCAL_APIC | ||
5 | |||
4 | /* | 6 | /* |
5 | * Copyright 2004 James Cleverdon, IBM. | 7 | * Copyright 2004 James Cleverdon, IBM. |
6 | * Subject to the GNU Public License, v.2 | 8 | * Subject to the GNU Public License, v.2 |
@@ -56,8 +58,7 @@ static inline void __xapic_wait_icr_idle(void) | |||
56 | } | 58 | } |
57 | 59 | ||
58 | static inline void | 60 | static inline void |
59 | __default_send_IPI_shortcut(unsigned int shortcut, | 61 | __default_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int dest) |
60 | int vector, unsigned int dest) | ||
61 | { | 62 | { |
62 | /* | 63 | /* |
63 | * Subtle. In the case of the 'never do double writes' workaround | 64 | * Subtle. In the case of the 'never do double writes' workaround |
@@ -156,4 +157,60 @@ default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector) | |||
156 | local_irq_restore(flags); | 157 | local_irq_restore(flags); |
157 | } | 158 | } |
158 | 159 | ||
160 | |||
161 | /* Avoid include hell */ | ||
162 | #define NMI_VECTOR 0x02 | ||
163 | |||
164 | void default_send_IPI_mask_bitmask(const struct cpumask *mask, int vector); | ||
165 | void default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector); | ||
166 | |||
167 | extern int no_broadcast; | ||
168 | |||
169 | #ifdef CONFIG_X86_64 | ||
170 | #include <asm/genapic.h> | ||
171 | #else | ||
172 | static inline void default_send_IPI_mask(const struct cpumask *mask, int vector) | ||
173 | { | ||
174 | default_send_IPI_mask_bitmask(mask, vector); | ||
175 | } | ||
176 | void default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector); | ||
177 | #endif | ||
178 | |||
179 | static inline void __default_local_send_IPI_allbutself(int vector) | ||
180 | { | ||
181 | if (no_broadcast || vector == NMI_VECTOR) | ||
182 | apic->send_IPI_mask_allbutself(cpu_online_mask, vector); | ||
183 | else | ||
184 | __default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector, apic->dest_logical); | ||
185 | } | ||
186 | |||
187 | static inline void __default_local_send_IPI_all(int vector) | ||
188 | { | ||
189 | if (no_broadcast || vector == NMI_VECTOR) | ||
190 | apic->send_IPI_mask(cpu_online_mask, vector); | ||
191 | else | ||
192 | __default_send_IPI_shortcut(APIC_DEST_ALLINC, vector, apic->dest_logical); | ||
193 | } | ||
194 | |||
195 | #ifdef CONFIG_X86_32 | ||
196 | static inline void default_send_IPI_allbutself(int vector) | ||
197 | { | ||
198 | /* | ||
199 | * if there are no other CPUs in the system then we get an APIC send | ||
200 | * error if we try to broadcast, thus avoid sending IPIs in this case. | ||
201 | */ | ||
202 | if (!(num_online_cpus() > 1)) | ||
203 | return; | ||
204 | |||
205 | __default_local_send_IPI_allbutself(vector); | ||
206 | } | ||
207 | |||
208 | static inline void default_send_IPI_all(int vector) | ||
209 | { | ||
210 | __default_local_send_IPI_all(vector); | ||
211 | } | ||
212 | #endif | ||
213 | |||
214 | #endif | ||
215 | |||
159 | #endif /* _ASM_X86_IPI_H */ | 216 | #endif /* _ASM_X86_IPI_H */ |
diff --git a/arch/x86/include/asm/mach-default/mach_ipi.h b/arch/x86/include/asm/mach-default/mach_ipi.h deleted file mode 100644 index 85dec630c69c..000000000000 --- a/arch/x86/include/asm/mach-default/mach_ipi.h +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_IPI_H | ||
2 | #define _ASM_X86_MACH_DEFAULT_MACH_IPI_H | ||
3 | |||
4 | /* Avoid include hell */ | ||
5 | #define NMI_VECTOR 0x02 | ||
6 | |||
7 | void default_send_IPI_mask_bitmask(const struct cpumask *mask, int vector); | ||
8 | void default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector); | ||
9 | void __default_send_IPI_shortcut(unsigned int shortcut, int vector); | ||
10 | |||
11 | extern int no_broadcast; | ||
12 | |||
13 | #ifdef CONFIG_X86_64 | ||
14 | #include <asm/genapic.h> | ||
15 | #else | ||
16 | static inline void default_send_IPI_mask(const struct cpumask *mask, int vector) | ||
17 | { | ||
18 | default_send_IPI_mask_bitmask(mask, vector); | ||
19 | } | ||
20 | void default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector); | ||
21 | #endif | ||
22 | |||
23 | static inline void __default_local_send_IPI_allbutself(int vector) | ||
24 | { | ||
25 | if (no_broadcast || vector == NMI_VECTOR) | ||
26 | apic->send_IPI_mask_allbutself(cpu_online_mask, vector); | ||
27 | else | ||
28 | __default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector); | ||
29 | } | ||
30 | |||
31 | static inline void __default_local_send_IPI_all(int vector) | ||
32 | { | ||
33 | if (no_broadcast || vector == NMI_VECTOR) | ||
34 | apic->send_IPI_mask(cpu_online_mask, vector); | ||
35 | else | ||
36 | __default_send_IPI_shortcut(APIC_DEST_ALLINC, vector); | ||
37 | } | ||
38 | |||
39 | #ifdef CONFIG_X86_32 | ||
40 | static inline void default_send_IPI_allbutself(int vector) | ||
41 | { | ||
42 | /* | ||
43 | * if there are no other CPUs in the system then we get an APIC send | ||
44 | * error if we try to broadcast, thus avoid sending IPIs in this case. | ||
45 | */ | ||
46 | if (!(num_online_cpus() > 1)) | ||
47 | return; | ||
48 | |||
49 | __default_local_send_IPI_allbutself(vector); | ||
50 | } | ||
51 | |||
52 | static inline void default_send_IPI_all(int vector) | ||
53 | { | ||
54 | __default_local_send_IPI_all(vector); | ||
55 | } | ||
56 | #endif | ||
57 | |||
58 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_IPI_H */ | ||
diff --git a/arch/x86/include/asm/mach-generic/gpio.h b/arch/x86/include/asm/mach-generic/gpio.h deleted file mode 100644 index 995c45efdb33..000000000000 --- a/arch/x86/include/asm/mach-generic/gpio.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_GENERIC_GPIO_H | ||
2 | #define _ASM_X86_MACH_GENERIC_GPIO_H | ||
3 | |||
4 | int gpio_request(unsigned gpio, const char *label); | ||
5 | void gpio_free(unsigned gpio); | ||
6 | int gpio_direction_input(unsigned gpio); | ||
7 | int gpio_direction_output(unsigned gpio, int value); | ||
8 | int gpio_get_value(unsigned gpio); | ||
9 | void gpio_set_value(unsigned gpio, int value); | ||
10 | int gpio_to_irq(unsigned gpio); | ||
11 | int irq_to_gpio(unsigned irq); | ||
12 | |||
13 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
14 | |||
15 | #endif /* _ASM_X86_MACH_GENERIC_GPIO_H */ | ||
diff --git a/arch/x86/include/asm/mach-generic/mach_ipi.h b/arch/x86/include/asm/mach-generic/mach_ipi.h deleted file mode 100644 index 5691c09645c5..000000000000 --- a/arch/x86/include/asm/mach-generic/mach_ipi.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_GENERIC_MACH_IPI_H | ||
2 | #define _ASM_X86_MACH_GENERIC_MACH_IPI_H | ||
3 | |||
4 | #include <asm/genapic.h> | ||
5 | |||
6 | #endif /* _ASM_X86_MACH_GENERIC_MACH_IPI_H */ | ||
diff --git a/arch/x86/include/asm/mach-generic/mach_wakecpu.h b/arch/x86/include/asm/mach-generic/mach_wakecpu.h deleted file mode 100644 index 0b884c03a3fc..000000000000 --- a/arch/x86/include/asm/mach-generic/mach_wakecpu.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H | ||
2 | #define _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H | ||
3 | |||
4 | #endif /* _ASM_X86_MACH_GENERIC_MACH_APIC_H */ | ||
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index 41a0ba34d6b2..81efe86eca81 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c | |||
@@ -49,7 +49,7 @@ | |||
49 | #include <asm/i8259.h> | 49 | #include <asm/i8259.h> |
50 | #include <asm/smp.h> | 50 | #include <asm/smp.h> |
51 | 51 | ||
52 | #include <mach_ipi.h> | 52 | #include <asm/genapic.h> |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * Sanity check | 55 | * Sanity check |
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index 11b93cabdf78..ad7f2a696f4a 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <asm/reboot.h> | 28 | #include <asm/reboot.h> |
29 | #include <asm/virtext.h> | 29 | #include <asm/virtext.h> |
30 | 30 | ||
31 | #include <mach_ipi.h> | 31 | #include <asm/genapic.h> |
32 | 32 | ||
33 | 33 | ||
34 | #if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC) | 34 | #if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC) |
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c index e0744ea6d0f1..241a01d6fd4b 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c | |||
@@ -62,7 +62,6 @@ | |||
62 | #include <asm/uv/uv_hub.h> | 62 | #include <asm/uv/uv_hub.h> |
63 | #include <asm/uv/uv_irq.h> | 63 | #include <asm/uv/uv_irq.h> |
64 | 64 | ||
65 | #include <mach_ipi.h> | ||
66 | #include <asm/genapic.h> | 65 | #include <asm/genapic.h> |
67 | 66 | ||
68 | #define __apicdebuginit(type) static type __init | 67 | #define __apicdebuginit(type) static type __init |
diff --git a/arch/x86/kernel/ipi.c b/arch/x86/kernel/ipi.c index 50076d92fbc0..0893fa144581 100644 --- a/arch/x86/kernel/ipi.c +++ b/arch/x86/kernel/ipi.c | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | #ifdef CONFIG_X86_32 | 21 | #ifdef CONFIG_X86_32 |
22 | #include <asm/genapic.h> | 22 | #include <asm/genapic.h> |
23 | #include <mach_ipi.h> | ||
24 | 23 | ||
25 | /* | 24 | /* |
26 | * the following functions deal with sending IPIs between CPUs. | 25 | * the following functions deal with sending IPIs between CPUs. |
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c index b62a3811e01c..5c4f55483849 100644 --- a/arch/x86/kernel/kgdb.c +++ b/arch/x86/kernel/kgdb.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include <asm/apicdef.h> | 46 | #include <asm/apicdef.h> |
47 | #include <asm/system.h> | 47 | #include <asm/system.h> |
48 | 48 | ||
49 | #include <mach_ipi.h> | 49 | #include <asm/genapic.h> |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * Put the error code here just in case the user cares: | 52 | * Put the error code here just in case the user cares: |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 38dace28d625..32e8f0af292c 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -24,7 +24,7 @@ | |||
24 | # include <asm/iommu.h> | 24 | # include <asm/iommu.h> |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #include <mach_ipi.h> | 27 | #include <asm/genapic.h> |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * Power off function, if any | 30 | * Power off function, if any |
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index 892e7c389be1..0eb32ae9bf1f 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <asm/tlbflush.h> | 26 | #include <asm/tlbflush.h> |
27 | #include <asm/mmu_context.h> | 27 | #include <asm/mmu_context.h> |
28 | #include <asm/proto.h> | 28 | #include <asm/proto.h> |
29 | #include <mach_ipi.h> | ||
30 | #include <asm/genapic.h> | 29 | #include <asm/genapic.h> |
31 | /* | 30 | /* |
32 | * Some notes on x86 processor bugs affecting SMP operation: | 31 | * Some notes on x86 processor bugs affecting SMP operation: |
diff --git a/arch/x86/kernel/visws_quirks.c b/arch/x86/kernel/visws_quirks.c index 3bd7f47a91b7..4fd646e6dd43 100644 --- a/arch/x86/kernel/visws_quirks.c +++ b/arch/x86/kernel/visws_quirks.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <asm/e820.h> | 32 | #include <asm/e820.h> |
33 | #include <asm/io.h> | 33 | #include <asm/io.h> |
34 | 34 | ||
35 | #include <mach_ipi.h> | 35 | #include <asm/genapic.h> |
36 | 36 | ||
37 | #include <asm/genapic.h> | 37 | #include <asm/genapic.h> |
38 | 38 | ||
diff --git a/arch/x86/mach-default/setup.c b/arch/x86/mach-default/setup.c index df167f265622..b65ff0bf730e 100644 --- a/arch/x86/mach-default/setup.c +++ b/arch/x86/mach-default/setup.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <asm/e820.h> | 10 | #include <asm/e820.h> |
11 | #include <asm/setup.h> | 11 | #include <asm/setup.h> |
12 | 12 | ||
13 | #include <mach_ipi.h> | 13 | #include <asm/genapic.h> |
14 | 14 | ||
15 | #ifdef CONFIG_HOTPLUG_CPU | 15 | #ifdef CONFIG_HOTPLUG_CPU |
16 | #define DEFAULT_SEND_IPI (1) | 16 | #define DEFAULT_SEND_IPI (1) |
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c index 7d5123e474e1..d9d44c8c3db8 100644 --- a/arch/x86/mach-generic/default.c +++ b/arch/x86/mach-generic/default.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <asm/genapic.h> | 15 | #include <asm/genapic.h> |
16 | #include <asm/mach-default/mach_ipi.h> | 16 | #include <asm/ipi.h> |
17 | 17 | ||
18 | static void default_vector_allocation_domain(int cpu, struct cpumask *retmask) | 18 | static void default_vector_allocation_domain(int cpu, struct cpumask *retmask) |
19 | { | 19 | { |
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 6348e1146925..14c5af4d11e6 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c | |||
@@ -14,7 +14,7 @@ | |||
14 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) | 14 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) |
15 | = { &init_mm, 0, }; | 15 | = { &init_mm, 0, }; |
16 | 16 | ||
17 | #include <mach_ipi.h> | 17 | #include <asm/genapic.h> |
18 | /* | 18 | /* |
19 | * Smarter SMP flushing macros. | 19 | * Smarter SMP flushing macros. |
20 | * c/o Linus Torvalds. | 20 | * c/o Linus Torvalds. |