diff options
Diffstat (limited to 'arch/x86_64/kernel/genapic_flat.c')
-rw-r--r-- | arch/x86_64/kernel/genapic_flat.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/genapic_flat.c b/arch/x86_64/kernel/genapic_flat.c index 50ad153eaac4..0dfc223c1839 100644 --- a/arch/x86_64/kernel/genapic_flat.c +++ b/arch/x86_64/kernel/genapic_flat.c | |||
@@ -22,6 +22,20 @@ static cpumask_t flat_target_cpus(void) | |||
22 | return cpu_online_map; | 22 | return cpu_online_map; |
23 | } | 23 | } |
24 | 24 | ||
25 | static cpumask_t flat_vector_allocation_domain(int cpu) | ||
26 | { | ||
27 | /* Careful. Some cpus do not strictly honor the set of cpus | ||
28 | * specified in the interrupt destination when using lowest | ||
29 | * priority interrupt delivery mode. | ||
30 | * | ||
31 | * In particular there was a hyperthreading cpu observed to | ||
32 | * deliver interrupts to the wrong hyperthread when only one | ||
33 | * hyperthread was specified in the interrupt desitination. | ||
34 | */ | ||
35 | cpumask_t domain = { { [0] = APIC_ALL_CPUS, } }; | ||
36 | return domain; | ||
37 | } | ||
38 | |||
25 | /* | 39 | /* |
26 | * Set up the logical destination ID. | 40 | * Set up the logical destination ID. |
27 | * | 41 | * |
@@ -121,6 +135,7 @@ struct genapic apic_flat = { | |||
121 | .int_delivery_mode = dest_LowestPrio, | 135 | .int_delivery_mode = dest_LowestPrio, |
122 | .int_dest_mode = (APIC_DEST_LOGICAL != 0), | 136 | .int_dest_mode = (APIC_DEST_LOGICAL != 0), |
123 | .target_cpus = flat_target_cpus, | 137 | .target_cpus = flat_target_cpus, |
138 | .vector_allocation_domain = flat_vector_allocation_domain, | ||
124 | .apic_id_registered = flat_apic_id_registered, | 139 | .apic_id_registered = flat_apic_id_registered, |
125 | .init_apic_ldr = flat_init_apic_ldr, | 140 | .init_apic_ldr = flat_init_apic_ldr, |
126 | .send_IPI_all = flat_send_IPI_all, | 141 | .send_IPI_all = flat_send_IPI_all, |
@@ -141,6 +156,14 @@ static cpumask_t physflat_target_cpus(void) | |||
141 | return cpumask_of_cpu(0); | 156 | return cpumask_of_cpu(0); |
142 | } | 157 | } |
143 | 158 | ||
159 | static cpumask_t physflat_vector_allocation_domain(int cpu) | ||
160 | { | ||
161 | cpumask_t domain = CPU_MASK_NONE; | ||
162 | cpu_set(cpu, domain); | ||
163 | return domain; | ||
164 | } | ||
165 | |||
166 | |||
144 | static void physflat_send_IPI_mask(cpumask_t cpumask, int vector) | 167 | static void physflat_send_IPI_mask(cpumask_t cpumask, int vector) |
145 | { | 168 | { |
146 | send_IPI_mask_sequence(cpumask, vector); | 169 | send_IPI_mask_sequence(cpumask, vector); |
@@ -179,6 +202,7 @@ struct genapic apic_physflat = { | |||
179 | .int_delivery_mode = dest_Fixed, | 202 | .int_delivery_mode = dest_Fixed, |
180 | .int_dest_mode = (APIC_DEST_PHYSICAL != 0), | 203 | .int_dest_mode = (APIC_DEST_PHYSICAL != 0), |
181 | .target_cpus = physflat_target_cpus, | 204 | .target_cpus = physflat_target_cpus, |
205 | .vector_allocation_domain = physflat_vector_allocation_domain, | ||
182 | .apic_id_registered = flat_apic_id_registered, | 206 | .apic_id_registered = flat_apic_id_registered, |
183 | .init_apic_ldr = flat_init_apic_ldr,/*not needed, but shouldn't hurt*/ | 207 | .init_apic_ldr = flat_init_apic_ldr,/*not needed, but shouldn't hurt*/ |
184 | .send_IPI_all = physflat_send_IPI_all, | 208 | .send_IPI_all = physflat_send_IPI_all, |