aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/bigsmp/ipi.h14
-rw-r--r--arch/x86/include/asm/es7000/ipi.h13
-rw-r--r--arch/x86/include/asm/genapic_32.h11
-rw-r--r--arch/x86/include/asm/genapic_64.h11
-rw-r--r--arch/x86/include/asm/ipi.h10
-rw-r--r--arch/x86/include/asm/mach-default/mach_apic.h12
-rw-r--r--arch/x86/include/asm/mach-default/mach_ipi.h12
-rw-r--r--arch/x86/include/asm/numaq/ipi.h14
-rw-r--r--arch/x86/include/asm/smp.h4
9 files changed, 47 insertions, 54 deletions
diff --git a/arch/x86/include/asm/bigsmp/ipi.h b/arch/x86/include/asm/bigsmp/ipi.h
index 63553e9f22b2..27fcd01b3ae6 100644
--- a/arch/x86/include/asm/bigsmp/ipi.h
+++ b/arch/x86/include/asm/bigsmp/ipi.h
@@ -1,26 +1,22 @@
1#ifndef __ASM_MACH_IPI_H 1#ifndef __ASM_MACH_IPI_H
2#define __ASM_MACH_IPI_H 2#define __ASM_MACH_IPI_H
3 3
4void send_IPI_mask_sequence(const cpumask_t *mask, int vector); 4void send_IPI_mask_sequence(const struct cpumask *mask, int vector);
5void send_IPI_mask_allbutself(const cpumask_t *mask, int vector); 5void send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
6 6
7static inline void send_IPI_mask(const cpumask_t *mask, int vector) 7static inline void send_IPI_mask(const struct cpumask *mask, int vector)
8{ 8{
9 send_IPI_mask_sequence(mask, vector); 9 send_IPI_mask_sequence(mask, vector);
10} 10}
11 11
12static inline void send_IPI_allbutself(int vector) 12static inline void send_IPI_allbutself(int vector)
13{ 13{
14 cpumask_t mask = cpu_online_map; 14 send_IPI_mask_allbutself(cpu_online_mask, vector);
15 cpu_clear(smp_processor_id(), mask);
16
17 if (!cpus_empty(mask))
18 send_IPI_mask(&mask, vector);
19} 15}
20 16
21static inline void send_IPI_all(int vector) 17static inline void send_IPI_all(int vector)
22{ 18{
23 send_IPI_mask(&cpu_online_map, vector); 19 send_IPI_mask(cpu_online_mask, vector);
24} 20}
25 21
26#endif /* __ASM_MACH_IPI_H */ 22#endif /* __ASM_MACH_IPI_H */
diff --git a/arch/x86/include/asm/es7000/ipi.h b/arch/x86/include/asm/es7000/ipi.h
index 1a8507265f91..7e8ed24d4b8a 100644
--- a/arch/x86/include/asm/es7000/ipi.h
+++ b/arch/x86/include/asm/es7000/ipi.h
@@ -1,25 +1,22 @@
1#ifndef __ASM_ES7000_IPI_H 1#ifndef __ASM_ES7000_IPI_H
2#define __ASM_ES7000_IPI_H 2#define __ASM_ES7000_IPI_H
3 3
4void send_IPI_mask_sequence(const cpumask_t *mask, int vector); 4void send_IPI_mask_sequence(const struct cpumask *mask, int vector);
5void send_IPI_mask_allbutself(const cpumask_t *mask, int vector); 5void send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
6 6
7static inline void send_IPI_mask(const cpumask_t *mask, int vector) 7static inline void send_IPI_mask(const struct cpumask *mask, int vector)
8{ 8{
9 send_IPI_mask_sequence(mask, vector); 9 send_IPI_mask_sequence(mask, vector);
10} 10}
11 11
12static inline void send_IPI_allbutself(int vector) 12static inline void send_IPI_allbutself(int vector)
13{ 13{
14 cpumask_t mask = cpu_online_map; 14 send_IPI_mask_allbutself(cpu_online_mask, vector);
15 cpu_clear(smp_processor_id(), mask);
16 if (!cpus_empty(mask))
17 send_IPI_mask(&mask, vector);
18} 15}
19 16
20static inline void send_IPI_all(int vector) 17static inline void send_IPI_all(int vector)
21{ 18{
22 send_IPI_mask(&cpu_online_map, vector); 19 send_IPI_mask(cpu_online_mask, vector);
23} 20}
24 21
25#endif /* __ASM_ES7000_IPI_H */ 22#endif /* __ASM_ES7000_IPI_H */
diff --git a/arch/x86/include/asm/genapic_32.h b/arch/x86/include/asm/genapic_32.h
index eed6e305291f..746f37a7963a 100644
--- a/arch/x86/include/asm/genapic_32.h
+++ b/arch/x86/include/asm/genapic_32.h
@@ -24,7 +24,7 @@ struct genapic {
24 int (*probe)(void); 24 int (*probe)(void);
25 25
26 int (*apic_id_registered)(void); 26 int (*apic_id_registered)(void);
27 const cpumask_t *(*target_cpus)(void); 27 const struct cpumask *(*target_cpus)(void);
28 int int_delivery_mode; 28 int int_delivery_mode;
29 int int_dest_mode; 29 int int_dest_mode;
30 int ESR_DISABLE; 30 int ESR_DISABLE;
@@ -57,15 +57,16 @@ struct genapic {
57 57
58 unsigned (*get_apic_id)(unsigned long x); 58 unsigned (*get_apic_id)(unsigned long x);
59 unsigned long apic_id_mask; 59 unsigned long apic_id_mask;
60 unsigned int (*cpu_mask_to_apicid)(const cpumask_t *cpumask); 60 unsigned int (*cpu_mask_to_apicid)(const struct cpumask *cpumask);
61 unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask, 61 unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask,
62 const struct cpumask *andmask); 62 const struct cpumask *andmask);
63 void (*vector_allocation_domain)(int cpu, cpumask_t *retmask); 63 void (*vector_allocation_domain)(int cpu, struct cpumask *retmask);
64 64
65#ifdef CONFIG_SMP 65#ifdef CONFIG_SMP
66 /* ipi */ 66 /* ipi */
67 void (*send_IPI_mask)(const cpumask_t *mask, int vector); 67 void (*send_IPI_mask)(const struct cpumask *mask, int vector);
68 void (*send_IPI_mask_allbutself)(const cpumask_t *mask, int vector); 68 void (*send_IPI_mask_allbutself)(const struct cpumask *mask,
69 int vector);
69 void (*send_IPI_allbutself)(int vector); 70 void (*send_IPI_allbutself)(int vector);
70 void (*send_IPI_all)(int vector); 71 void (*send_IPI_all)(int vector);
71#endif 72#endif
diff --git a/arch/x86/include/asm/genapic_64.h b/arch/x86/include/asm/genapic_64.h
index 244b71729ecb..adf32fb56aa6 100644
--- a/arch/x86/include/asm/genapic_64.h
+++ b/arch/x86/include/asm/genapic_64.h
@@ -20,17 +20,18 @@ struct genapic {
20 u32 int_delivery_mode; 20 u32 int_delivery_mode;
21 u32 int_dest_mode; 21 u32 int_dest_mode;
22 int (*apic_id_registered)(void); 22 int (*apic_id_registered)(void);
23 const cpumask_t *(*target_cpus)(void); 23 const struct cpumask *(*target_cpus)(void);
24 void (*vector_allocation_domain)(int cpu, cpumask_t *retmask); 24 void (*vector_allocation_domain)(int cpu, struct cpumask *retmask);
25 void (*init_apic_ldr)(void); 25 void (*init_apic_ldr)(void);
26 /* ipi */ 26 /* ipi */
27 void (*send_IPI_mask)(const cpumask_t *mask, int vector); 27 void (*send_IPI_mask)(const struct cpumask *mask, int vector);
28 void (*send_IPI_mask_allbutself)(const cpumask_t *mask, int vector); 28 void (*send_IPI_mask_allbutself)(const struct cpumask *mask,
29 int vector);
29 void (*send_IPI_allbutself)(int vector); 30 void (*send_IPI_allbutself)(int vector);
30 void (*send_IPI_all)(int vector); 31 void (*send_IPI_all)(int vector);
31 void (*send_IPI_self)(int vector); 32 void (*send_IPI_self)(int vector);
32 /* */ 33 /* */
33 unsigned int (*cpu_mask_to_apicid)(const cpumask_t *cpumask); 34 unsigned int (*cpu_mask_to_apicid)(const struct cpumask *cpumask);
34 unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask, 35 unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask,
35 const struct cpumask *andmask); 36 const struct cpumask *andmask);
36 unsigned int (*phys_pkg_id)(int index_msb); 37 unsigned int (*phys_pkg_id)(int index_msb);
diff --git a/arch/x86/include/asm/ipi.h b/arch/x86/include/asm/ipi.h
index 24b6e613edfa..c745a306f7d3 100644
--- a/arch/x86/include/asm/ipi.h
+++ b/arch/x86/include/asm/ipi.h
@@ -117,7 +117,8 @@ static inline void __send_IPI_dest_field(unsigned int mask, int vector,
117 native_apic_mem_write(APIC_ICR, cfg); 117 native_apic_mem_write(APIC_ICR, cfg);
118} 118}
119 119
120static inline void send_IPI_mask_sequence(const cpumask_t *mask, int vector) 120static inline void send_IPI_mask_sequence(const struct cpumask *mask,
121 int vector)
121{ 122{
122 unsigned long flags; 123 unsigned long flags;
123 unsigned long query_cpu; 124 unsigned long query_cpu;
@@ -128,14 +129,15 @@ static inline void send_IPI_mask_sequence(const cpumask_t *mask, int vector)
128 * - mbligh 129 * - mbligh
129 */ 130 */
130 local_irq_save(flags); 131 local_irq_save(flags);
131 for_each_cpu_mask_nr(query_cpu, *mask) { 132 for_each_cpu(query_cpu, mask) {
132 __send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, query_cpu), 133 __send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, query_cpu),
133 vector, APIC_DEST_PHYSICAL); 134 vector, APIC_DEST_PHYSICAL);
134 } 135 }
135 local_irq_restore(flags); 136 local_irq_restore(flags);
136} 137}
137 138
138static inline void send_IPI_mask_allbutself(const cpumask_t *mask, int vector) 139static inline void send_IPI_mask_allbutself(const struct cpumask *mask,
140 int vector)
139{ 141{
140 unsigned long flags; 142 unsigned long flags;
141 unsigned int query_cpu; 143 unsigned int query_cpu;
@@ -144,7 +146,7 @@ static inline void send_IPI_mask_allbutself(const cpumask_t *mask, int vector)
144 /* See Hack comment above */ 146 /* See Hack comment above */
145 147
146 local_irq_save(flags); 148 local_irq_save(flags);
147 for_each_cpu_mask_nr(query_cpu, *mask) 149 for_each_cpu(query_cpu, mask)
148 if (query_cpu != this_cpu) 150 if (query_cpu != this_cpu)
149 __send_IPI_dest_field( 151 __send_IPI_dest_field(
150 per_cpu(x86_cpu_to_apicid, query_cpu), 152 per_cpu(x86_cpu_to_apicid, query_cpu),
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index df8e024c43c5..8863d978cb96 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.h
@@ -8,12 +8,12 @@
8 8
9#define APIC_DFR_VALUE (APIC_DFR_FLAT) 9#define APIC_DFR_VALUE (APIC_DFR_FLAT)
10 10
11static inline const cpumask_t *target_cpus(void) 11static inline const struct cpumask *target_cpus(void)
12{ 12{
13#ifdef CONFIG_SMP 13#ifdef CONFIG_SMP
14 return &cpu_online_map; 14 return cpu_online_mask;
15#else 15#else
16 return &cpumask_of_cpu(0); 16 return cpumask_of(0);
17#endif 17#endif
18} 18}
19 19
@@ -62,9 +62,9 @@ static inline int apic_id_registered(void)
62 return physid_isset(read_apic_id(), phys_cpu_present_map); 62 return physid_isset(read_apic_id(), phys_cpu_present_map);
63} 63}
64 64
65static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) 65static inline unsigned int cpu_mask_to_apicid(const struct cpumask *cpumask)
66{ 66{
67 return cpus_addr(*cpumask)[0]; 67 return cpumask_bits(cpumask)[0];
68} 68}
69 69
70static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask, 70static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
@@ -98,7 +98,7 @@ static inline int apicid_to_node(int logical_apicid)
98#endif 98#endif
99} 99}
100 100
101static inline void vector_allocation_domain(int cpu, cpumask_t *retmask) 101static inline void vector_allocation_domain(int cpu, struct cpumask *retmask)
102{ 102{
103 /* Careful. Some cpus do not strictly honor the set of cpus 103 /* Careful. Some cpus do not strictly honor the set of cpus
104 * specified in the interrupt destination when using lowest 104 * specified in the interrupt destination when using lowest
diff --git a/arch/x86/include/asm/mach-default/mach_ipi.h b/arch/x86/include/asm/mach-default/mach_ipi.h
index 9353ab854a10..191312d155da 100644
--- a/arch/x86/include/asm/mach-default/mach_ipi.h
+++ b/arch/x86/include/asm/mach-default/mach_ipi.h
@@ -4,8 +4,8 @@
4/* Avoid include hell */ 4/* Avoid include hell */
5#define NMI_VECTOR 0x02 5#define NMI_VECTOR 0x02
6 6
7void send_IPI_mask_bitmask(const cpumask_t *mask, int vector); 7void send_IPI_mask_bitmask(const struct cpumask *mask, int vector);
8void send_IPI_mask_allbutself(const cpumask_t *mask, int vector); 8void send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
9void __send_IPI_shortcut(unsigned int shortcut, int vector); 9void __send_IPI_shortcut(unsigned int shortcut, int vector);
10 10
11extern int no_broadcast; 11extern int no_broadcast;
@@ -15,17 +15,17 @@ extern int no_broadcast;
15#define send_IPI_mask (genapic->send_IPI_mask) 15#define send_IPI_mask (genapic->send_IPI_mask)
16#define send_IPI_mask_allbutself (genapic->send_IPI_mask_allbutself) 16#define send_IPI_mask_allbutself (genapic->send_IPI_mask_allbutself)
17#else 17#else
18static inline void send_IPI_mask(const cpumask_t *mask, int vector) 18static inline void send_IPI_mask(const struct cpumask *mask, int vector)
19{ 19{
20 send_IPI_mask_bitmask(mask, vector); 20 send_IPI_mask_bitmask(mask, vector);
21} 21}
22void send_IPI_mask_allbutself(const cpumask_t *mask, int vector); 22void send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
23#endif 23#endif
24 24
25static inline void __local_send_IPI_allbutself(int vector) 25static inline void __local_send_IPI_allbutself(int vector)
26{ 26{
27 if (no_broadcast || vector == NMI_VECTOR) 27 if (no_broadcast || vector == NMI_VECTOR)
28 send_IPI_mask_allbutself(&cpu_online_map, vector); 28 send_IPI_mask_allbutself(cpu_online_mask, vector);
29 else 29 else
30 __send_IPI_shortcut(APIC_DEST_ALLBUT, vector); 30 __send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
31} 31}
@@ -33,7 +33,7 @@ static inline void __local_send_IPI_allbutself(int vector)
33static inline void __local_send_IPI_all(int vector) 33static inline void __local_send_IPI_all(int vector)
34{ 34{
35 if (no_broadcast || vector == NMI_VECTOR) 35 if (no_broadcast || vector == NMI_VECTOR)
36 send_IPI_mask(&cpu_online_map, vector); 36 send_IPI_mask(cpu_online_mask, vector);
37 else 37 else
38 __send_IPI_shortcut(APIC_DEST_ALLINC, vector); 38 __send_IPI_shortcut(APIC_DEST_ALLINC, vector);
39} 39}
diff --git a/arch/x86/include/asm/numaq/ipi.h b/arch/x86/include/asm/numaq/ipi.h
index c734d7acc430..a8374c652778 100644
--- a/arch/x86/include/asm/numaq/ipi.h
+++ b/arch/x86/include/asm/numaq/ipi.h
@@ -1,26 +1,22 @@
1#ifndef __ASM_NUMAQ_IPI_H 1#ifndef __ASM_NUMAQ_IPI_H
2#define __ASM_NUMAQ_IPI_H 2#define __ASM_NUMAQ_IPI_H
3 3
4void send_IPI_mask_sequence(const cpumask_t *mask, int vector); 4void send_IPI_mask_sequence(const struct cpumask *mask, int vector);
5void send_IPI_mask_allbutself(const cpumask_t *mask, int vector); 5void send_IPI_mask_allbutself(const struct cpumask *mask, int vector);
6 6
7static inline void send_IPI_mask(const cpumask_t *mask, int vector) 7static inline void send_IPI_mask(const struct cpumask *mask, int vector)
8{ 8{
9 send_IPI_mask_sequence(mask, vector); 9 send_IPI_mask_sequence(mask, vector);
10} 10}
11 11
12static inline void send_IPI_allbutself(int vector) 12static inline void send_IPI_allbutself(int vector)
13{ 13{
14 cpumask_t mask = cpu_online_map; 14 send_IPI_mask_allbutself(cpu_online_mask, vector);
15 cpu_clear(smp_processor_id(), mask);
16
17 if (!cpus_empty(mask))
18 send_IPI_mask(&mask, vector);
19} 15}
20 16
21static inline void send_IPI_all(int vector) 17static inline void send_IPI_all(int vector)
22{ 18{
23 send_IPI_mask(&cpu_online_map, vector); 19 send_IPI_mask(cpu_online_mask, vector);
24} 20}
25 21
26#endif /* __ASM_NUMAQ_IPI_H */ 22#endif /* __ASM_NUMAQ_IPI_H */
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index c4a9aa52df6e..830b9fcb6427 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -60,7 +60,7 @@ struct smp_ops {
60 void (*cpu_die)(unsigned int cpu); 60 void (*cpu_die)(unsigned int cpu);
61 void (*play_dead)(void); 61 void (*play_dead)(void);
62 62
63 void (*send_call_func_ipi)(const cpumask_t *mask); 63 void (*send_call_func_ipi)(const struct cpumask *mask);
64 void (*send_call_func_single_ipi)(int cpu); 64 void (*send_call_func_single_ipi)(int cpu);
65}; 65};
66 66
@@ -138,7 +138,7 @@ void native_cpu_die(unsigned int cpu);
138void native_play_dead(void); 138void native_play_dead(void);
139void play_dead_common(void); 139void play_dead_common(void);
140 140
141void native_send_call_func_ipi(const cpumask_t *mask); 141void native_send_call_func_ipi(const struct cpumask *mask);
142void native_send_call_func_single_ipi(int cpu); 142void native_send_call_func_single_ipi(int cpu);
143 143
144extern void prefill_possible_map(void); 144extern void prefill_possible_map(void);