diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/x86/include/asm/mpspec.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/x86/include/asm/mpspec.h')
-rw-r--r-- | arch/x86/include/asm/mpspec.h | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h index c82868e9f905..9c7d95f6174b 100644 --- a/arch/x86/include/asm/mpspec.h +++ b/arch/x86/include/asm/mpspec.h | |||
@@ -5,8 +5,9 @@ | |||
5 | 5 | ||
6 | #include <asm/mpspec_def.h> | 6 | #include <asm/mpspec_def.h> |
7 | #include <asm/x86_init.h> | 7 | #include <asm/x86_init.h> |
8 | #include <asm/apicdef.h> | ||
8 | 9 | ||
9 | extern int apic_version[MAX_APICS]; | 10 | extern int apic_version[]; |
10 | extern int pic_mode; | 11 | extern int pic_mode; |
11 | 12 | ||
12 | #ifdef CONFIG_X86_32 | 13 | #ifdef CONFIG_X86_32 |
@@ -24,7 +25,6 @@ extern int pic_mode; | |||
24 | #define MAX_IRQ_SOURCES 256 | 25 | #define MAX_IRQ_SOURCES 256 |
25 | 26 | ||
26 | extern unsigned int def_to_bigsmp; | 27 | extern unsigned int def_to_bigsmp; |
27 | extern u8 apicid_2_node[]; | ||
28 | 28 | ||
29 | #ifdef CONFIG_X86_NUMAQ | 29 | #ifdef CONFIG_X86_NUMAQ |
30 | extern int mp_bus_id_to_node[MAX_MP_BUSSES]; | 30 | extern int mp_bus_id_to_node[MAX_MP_BUSSES]; |
@@ -32,8 +32,6 @@ extern int mp_bus_id_to_local[MAX_MP_BUSSES]; | |||
32 | extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; | 32 | extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #define MAX_APICID 256 | ||
36 | |||
37 | #else /* CONFIG_X86_64: */ | 35 | #else /* CONFIG_X86_64: */ |
38 | 36 | ||
39 | #define MAX_MP_BUSSES 256 | 37 | #define MAX_MP_BUSSES 256 |
@@ -107,7 +105,7 @@ extern int mp_register_gsi(struct device *dev, u32 gsi, int edge_level, | |||
107 | int active_high_low); | 105 | int active_high_low); |
108 | #endif /* CONFIG_ACPI */ | 106 | #endif /* CONFIG_ACPI */ |
109 | 107 | ||
110 | #define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_APICS) | 108 | #define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_LOCAL_APIC) |
111 | 109 | ||
112 | struct physid_mask { | 110 | struct physid_mask { |
113 | unsigned long mask[PHYSID_ARRAY_SIZE]; | 111 | unsigned long mask[PHYSID_ARRAY_SIZE]; |
@@ -122,31 +120,31 @@ typedef struct physid_mask physid_mask_t; | |||
122 | test_and_set_bit(physid, (map).mask) | 120 | test_and_set_bit(physid, (map).mask) |
123 | 121 | ||
124 | #define physids_and(dst, src1, src2) \ | 122 | #define physids_and(dst, src1, src2) \ |
125 | bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_APICS) | 123 | bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_LOCAL_APIC) |
126 | 124 | ||
127 | #define physids_or(dst, src1, src2) \ | 125 | #define physids_or(dst, src1, src2) \ |
128 | bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_APICS) | 126 | bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_LOCAL_APIC) |
129 | 127 | ||
130 | #define physids_clear(map) \ | 128 | #define physids_clear(map) \ |
131 | bitmap_zero((map).mask, MAX_APICS) | 129 | bitmap_zero((map).mask, MAX_LOCAL_APIC) |
132 | 130 | ||
133 | #define physids_complement(dst, src) \ | 131 | #define physids_complement(dst, src) \ |
134 | bitmap_complement((dst).mask, (src).mask, MAX_APICS) | 132 | bitmap_complement((dst).mask, (src).mask, MAX_LOCAL_APIC) |
135 | 133 | ||
136 | #define physids_empty(map) \ | 134 | #define physids_empty(map) \ |
137 | bitmap_empty((map).mask, MAX_APICS) | 135 | bitmap_empty((map).mask, MAX_LOCAL_APIC) |
138 | 136 | ||
139 | #define physids_equal(map1, map2) \ | 137 | #define physids_equal(map1, map2) \ |
140 | bitmap_equal((map1).mask, (map2).mask, MAX_APICS) | 138 | bitmap_equal((map1).mask, (map2).mask, MAX_LOCAL_APIC) |
141 | 139 | ||
142 | #define physids_weight(map) \ | 140 | #define physids_weight(map) \ |
143 | bitmap_weight((map).mask, MAX_APICS) | 141 | bitmap_weight((map).mask, MAX_LOCAL_APIC) |
144 | 142 | ||
145 | #define physids_shift_right(d, s, n) \ | 143 | #define physids_shift_right(d, s, n) \ |
146 | bitmap_shift_right((d).mask, (s).mask, n, MAX_APICS) | 144 | bitmap_shift_right((d).mask, (s).mask, n, MAX_LOCAL_APIC) |
147 | 145 | ||
148 | #define physids_shift_left(d, s, n) \ | 146 | #define physids_shift_left(d, s, n) \ |
149 | bitmap_shift_left((d).mask, (s).mask, n, MAX_APICS) | 147 | bitmap_shift_left((d).mask, (s).mask, n, MAX_LOCAL_APIC) |
150 | 148 | ||
151 | static inline unsigned long physids_coerce(physid_mask_t *map) | 149 | static inline unsigned long physids_coerce(physid_mask_t *map) |
152 | { | 150 | { |
@@ -159,14 +157,6 @@ static inline void physids_promote(unsigned long physids, physid_mask_t *map) | |||
159 | map->mask[0] = physids; | 157 | map->mask[0] = physids; |
160 | } | 158 | } |
161 | 159 | ||
162 | /* Note: will create very large stack frames if physid_mask_t is big */ | ||
163 | #define physid_mask_of_physid(physid) \ | ||
164 | ({ \ | ||
165 | physid_mask_t __physid_mask = PHYSID_MASK_NONE; \ | ||
166 | physid_set(physid, __physid_mask); \ | ||
167 | __physid_mask; \ | ||
168 | }) | ||
169 | |||
170 | static inline void physid_set_mask_of_physid(int physid, physid_mask_t *map) | 160 | static inline void physid_set_mask_of_physid(int physid, physid_mask_t *map) |
171 | { | 161 | { |
172 | physids_clear(*map); | 162 | physids_clear(*map); |