diff options
| -rw-r--r-- | arch/x86/kernel/apic/x2apic_cluster.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c index bde78d0098a4..c88baa4ff0e5 100644 --- a/arch/x86/kernel/apic/x2apic_cluster.c +++ b/arch/x86/kernel/apic/x2apic_cluster.c | |||
| @@ -209,13 +209,30 @@ static int x2apic_cluster_probe(void) | |||
| 209 | return 0; | 209 | return 0; |
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | static const struct cpumask *x2apic_cluster_target_cpus(void) | ||
| 213 | { | ||
| 214 | return cpu_all_mask; | ||
| 215 | } | ||
| 216 | |||
| 212 | /* | 217 | /* |
| 213 | * Each x2apic cluster is an allocation domain. | 218 | * Each x2apic cluster is an allocation domain. |
| 214 | */ | 219 | */ |
| 215 | static void cluster_vector_allocation_domain(int cpu, struct cpumask *retmask, | 220 | static void cluster_vector_allocation_domain(int cpu, struct cpumask *retmask, |
| 216 | const struct cpumask *mask) | 221 | const struct cpumask *mask) |
| 217 | { | 222 | { |
| 218 | cpumask_and(retmask, mask, per_cpu(cpus_in_cluster, cpu)); | 223 | /* |
| 224 | * To minimize vector pressure, default case of boot, device bringup | ||
| 225 | * etc will use a single cpu for the interrupt destination. | ||
| 226 | * | ||
| 227 | * On explicit migration requests coming from irqbalance etc, | ||
| 228 | * interrupts will be routed to the x2apic cluster (cluster-id | ||
| 229 | * derived from the first cpu in the mask) members specified | ||
| 230 | * in the mask. | ||
| 231 | */ | ||
| 232 | if (mask == x2apic_cluster_target_cpus()) | ||
| 233 | cpumask_copy(retmask, cpumask_of(cpu)); | ||
| 234 | else | ||
| 235 | cpumask_and(retmask, mask, per_cpu(cpus_in_cluster, cpu)); | ||
| 219 | } | 236 | } |
| 220 | 237 | ||
| 221 | static struct apic apic_x2apic_cluster = { | 238 | static struct apic apic_x2apic_cluster = { |
| @@ -229,7 +246,7 @@ static struct apic apic_x2apic_cluster = { | |||
| 229 | .irq_delivery_mode = dest_LowestPrio, | 246 | .irq_delivery_mode = dest_LowestPrio, |
| 230 | .irq_dest_mode = 1, /* logical */ | 247 | .irq_dest_mode = 1, /* logical */ |
| 231 | 248 | ||
| 232 | .target_cpus = online_target_cpus, | 249 | .target_cpus = x2apic_cluster_target_cpus, |
| 233 | .disable_esr = 0, | 250 | .disable_esr = 0, |
| 234 | .dest_logical = APIC_DEST_LOGICAL, | 251 | .dest_logical = APIC_DEST_LOGICAL, |
| 235 | .check_apicid_used = NULL, | 252 | .check_apicid_used = NULL, |
