diff options
Diffstat (limited to 'arch/x86/kernel/genx2apic_cluster.c')
-rw-r--r-- | arch/x86/kernel/genx2apic_cluster.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c index f5fa9a91ad38..fd8047f4e455 100644 --- a/arch/x86/kernel/genx2apic_cluster.c +++ b/arch/x86/kernel/genx2apic_cluster.c | |||
@@ -123,6 +123,21 @@ static unsigned int x2apic_cpu_mask_to_apicid(const cpumask_t *cpumask) | |||
123 | return BAD_APICID; | 123 | return BAD_APICID; |
124 | } | 124 | } |
125 | 125 | ||
126 | static unsigned int x2apic_cpu_mask_to_apicid_and(const cpumask_t *cpumask, | ||
127 | const cpumask_t *andmask) | ||
128 | { | ||
129 | int cpu; | ||
130 | |||
131 | /* | ||
132 | * We're using fixed IRQ delivery, can only return one phys APIC ID. | ||
133 | * May as well be the first. | ||
134 | */ | ||
135 | while ((cpu = next_cpu(-1, *cpumask)) < nr_cpu_ids) | ||
136 | if (cpu_isset(cpu, *andmask)) | ||
137 | return per_cpu(x86_cpu_to_apicid, cpu); | ||
138 | return BAD_APICID; | ||
139 | } | ||
140 | |||
126 | static unsigned int get_apic_id(unsigned long x) | 141 | static unsigned int get_apic_id(unsigned long x) |
127 | { | 142 | { |
128 | unsigned int id; | 143 | unsigned int id; |
@@ -172,6 +187,7 @@ struct genapic apic_x2apic_cluster = { | |||
172 | .send_IPI_mask_allbutself = x2apic_send_IPI_mask_allbutself, | 187 | .send_IPI_mask_allbutself = x2apic_send_IPI_mask_allbutself, |
173 | .send_IPI_self = x2apic_send_IPI_self, | 188 | .send_IPI_self = x2apic_send_IPI_self, |
174 | .cpu_mask_to_apicid = x2apic_cpu_mask_to_apicid, | 189 | .cpu_mask_to_apicid = x2apic_cpu_mask_to_apicid, |
190 | .cpu_mask_to_apicid_and = x2apic_cpu_mask_to_apicid_and, | ||
175 | .phys_pkg_id = phys_pkg_id, | 191 | .phys_pkg_id = phys_pkg_id, |
176 | .get_apic_id = get_apic_id, | 192 | .get_apic_id = get_apic_id, |
177 | .set_apic_id = set_apic_id, | 193 | .set_apic_id = set_apic_id, |