vector.c (52b166af40faec9813cd5ac26d6ba9adec2e3a9d) | vector.c (91cd9cb7ee1c081304d0e61f09e9faccb33d3df7) |
---|---|
1/* 2 * Local APIC related interfaces to support IOAPIC, MSI, HT_IRQ etc. 3 * 4 * Copyright (C) 1997, 1998, 1999, 2000, 2009 Ingo Molnar, Hajnalka Szabo 5 * Moved from arch/x86/kernel/apic/io_apic.c. 6 * Jiang Liu <jiang.liu@linux.intel.com> 7 * Enable support of hierarchical irqdomains 8 * --- 127 unchanged lines hidden (view full) --- 136 int new_cpu, offset; 137 138 /* Get the possible target cpus for @mask/@cpu from the apic */ 139 apic->vector_allocation_domain(cpu, vector_cpumask, mask); 140 141 /* 142 * Clear the offline cpus from @vector_cpumask for searching 143 * and verify whether the result overlaps with @mask. If true, | 1/* 2 * Local APIC related interfaces to support IOAPIC, MSI, HT_IRQ etc. 3 * 4 * Copyright (C) 1997, 1998, 1999, 2000, 2009 Ingo Molnar, Hajnalka Szabo 5 * Moved from arch/x86/kernel/apic/io_apic.c. 6 * Jiang Liu <jiang.liu@linux.intel.com> 7 * Enable support of hierarchical irqdomains 8 * --- 127 unchanged lines hidden (view full) --- 136 int new_cpu, offset; 137 138 /* Get the possible target cpus for @mask/@cpu from the apic */ 139 apic->vector_allocation_domain(cpu, vector_cpumask, mask); 140 141 /* 142 * Clear the offline cpus from @vector_cpumask for searching 143 * and verify whether the result overlaps with @mask. If true, |
144 * then the call to apic->cpu_mask_to_apicid_and() will | 144 * then the call to apic->cpu_mask_to_apicid() will |
145 * succeed as well. If not, no point in trying to find a 146 * vector in this mask. 147 */ 148 cpumask_and(vector_searchmask, vector_cpumask, cpu_online_mask); 149 if (!cpumask_intersects(vector_searchmask, mask)) 150 goto next_cpu; 151 152 if (cpumask_subset(vector_cpumask, d->domain)) { --- 67 unchanged lines hidden (view full) --- 220 /* 221 * Cache destination APIC IDs into cfg->dest_apicid. This cannot fail 222 * as we already established, that mask & d->domain & cpu_online_mask 223 * is not empty. 224 * 225 * vector_searchmask is a subset of d->domain and has the offline 226 * cpus masked out. 227 */ | 145 * succeed as well. If not, no point in trying to find a 146 * vector in this mask. 147 */ 148 cpumask_and(vector_searchmask, vector_cpumask, cpu_online_mask); 149 if (!cpumask_intersects(vector_searchmask, mask)) 150 goto next_cpu; 151 152 if (cpumask_subset(vector_cpumask, d->domain)) { --- 67 unchanged lines hidden (view full) --- 220 /* 221 * Cache destination APIC IDs into cfg->dest_apicid. This cannot fail 222 * as we already established, that mask & d->domain & cpu_online_mask 223 * is not empty. 224 * 225 * vector_searchmask is a subset of d->domain and has the offline 226 * cpus masked out. 227 */ |
228 BUG_ON(apic->cpu_mask_to_apicid_and(mask, vector_searchmask, 229 &d->cfg.dest_apicid)); | 228 cpumask_and(vector_searchmask, vector_searchmask, mask); 229 BUG_ON(apic->cpu_mask_to_apicid(vector_searchmask, &d->cfg.dest_apicid)); |
230 return 0; 231} 232 233static int assign_irq_vector(int irq, struct apic_chip_data *data, 234 const struct cpumask *mask) 235{ 236 int err; 237 unsigned long flags; --- 745 unchanged lines hidden --- | 230 return 0; 231} 232 233static int assign_irq_vector(int irq, struct apic_chip_data *data, 234 const struct cpumask *mask) 235{ 236 int err; 237 unsigned long flags; --- 745 unchanged lines hidden --- |