]> git.neil.brown.name Git - history.git/commitdiff
[IA64] iosapic.c: don't direct interrupts to offline cpus
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Mon, 22 Nov 2004 06:43:13 +0000 (22:43 -0800)
committerTony Luck <tony.luck@intel.com>
Mon, 22 Nov 2004 06:43:13 +0000 (22:43 -0800)
Ignore offline CPUs when registering IOSAPIC interrupts.  We previously
directed interrupts even to offline CPUs, which means that if you have some
unused CPUs (e.g., you used "maxcpus="), some interrupts won't work.

This really hurts because distro installs typically use "maxcpus=1".

Patch by Alex Williamson.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/iosapic.c

index 51548a8c57e0404d2b507a3b231bcd1585199660..c5b15ddafac20b2c4bb1497b72edbc83b3ec1e9f 100644 (file)
@@ -521,7 +521,12 @@ get_target_cpu (unsigned int gsi, int vector)
                        goto skip_numa_setup;
 
                cpu_mask = node_to_cpumask(iosapic_lists[iosapic_index].node);
-               
+
+               for_each_cpu_mask(numa_cpu, cpu_mask) {
+                       if (!cpu_online(numa_cpu))
+                               cpu_clear(numa_cpu, cpu_mask);
+               }
+
                num_cpus = cpus_weight(cpu_mask);
 
                if (!num_cpus)