aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 13:14:52 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-29 08:16:49 -0500
commitd53e2f2855f1c7c2725d550c1ae6b26f4d671c50 (patch)
treef749e169c6b8099428cb3aa3f0aa1412ce6e1a17 /arch/x86/include
parent9f4187f0a3b93fc215b4472063b6c0b44364e60c (diff)
x86, smp: remove mach_ipi.h
Move mach_ipi.h definitions into genapic.h. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/genapic.h1
-rw-r--r--arch/x86/include/asm/ipi.h61
-rw-r--r--arch/x86/include/asm/mach-default/mach_ipi.h58
-rw-r--r--arch/x86/include/asm/mach-generic/gpio.h15
-rw-r--r--arch/x86/include/asm/mach-generic/mach_ipi.h6
-rw-r--r--arch/x86/include/asm/mach-generic/mach_wakecpu.h4
6 files changed, 60 insertions, 85 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
58static inline void 60static 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
164void default_send_IPI_mask_bitmask(const struct cpumask *mask, int vector);
165void default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
166
167extern int no_broadcast;
168
169#ifdef CONFIG_X86_64
170#include <asm/genapic.h>
171#else
172static inline void default_send_IPI_mask(const struct cpumask *mask, int vector)
173{
174 default_send_IPI_mask_bitmask(mask, vector);
175}
176void default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
177#endif
178
179static 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
187static 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
196static 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
208static 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
7void default_send_IPI_mask_bitmask(const struct cpumask *mask, int vector);
8void default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
9void __default_send_IPI_shortcut(unsigned int shortcut, int vector);
10
11extern int no_broadcast;
12
13#ifdef CONFIG_X86_64
14#include <asm/genapic.h>
15#else
16static inline void default_send_IPI_mask(const struct cpumask *mask, int vector)
17{
18 default_send_IPI_mask_bitmask(mask, vector);
19}
20void default_send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
21#endif
22
23static 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
31static 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
40static 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
52static 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
4int gpio_request(unsigned gpio, const char *label);
5void gpio_free(unsigned gpio);
6int gpio_direction_input(unsigned gpio);
7int gpio_direction_output(unsigned gpio, int value);
8int gpio_get_value(unsigned gpio);
9void gpio_set_value(unsigned gpio, int value);
10int gpio_to_irq(unsigned gpio);
11int 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 */