]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/kernel/iosapic.c
[PATCH] bitops: ia64: use cpu_set() instead of __set_bit()
[linux-2.6-omap-h63xx.git] / arch / ia64 / kernel / iosapic.c
index 8f53915f4ae673b043dcac7cd346e56472c5dadf..8832c553230ae1681e051858afd6912cb6a289f7 100644 (file)
@@ -631,6 +631,7 @@ get_target_cpu (unsigned int gsi, int vector)
 {
 #ifdef CONFIG_SMP
        static int cpu = -1;
+       extern int cpe_vector;
 
        /*
         * In case of vector shared by multiple RTEs, all RTEs that
@@ -653,6 +654,11 @@ get_target_cpu (unsigned int gsi, int vector)
        if (!cpu_online(smp_processor_id()))
                return cpu_physical_id(smp_processor_id());
 
+#ifdef CONFIG_ACPI
+       if (cpe_vector > 0 && vector == IA64_CPEP_VECTOR)
+               return get_cpei_target_cpu();
+#endif
+
 #ifdef CONFIG_NUMA
        {
                int num_cpus, cpu_index, iosapic_index, numa_cpu, i = 0;
@@ -735,11 +741,11 @@ again:
        spin_unlock_irqrestore(&iosapic_lock, flags);
 
        /* If vector is running out, we try to find a sharable vector */
-       vector = assign_irq_vector_nopanic(AUTO_ASSIGN);
+       vector = assign_irq_vector(AUTO_ASSIGN);
        if (vector < 0) {
                vector = iosapic_find_sharable_vector(trigger, polarity);
                if (vector < 0)
-                       Return -ENOSPC;
+                       return -ENOSPC;
        }
 
        spin_lock_irqsave(&irq_descp(vector)->lock, flags);
@@ -782,7 +788,6 @@ again:
        return vector;
 }
 
-#ifdef CONFIG_ACPI_DEALLOCATE_IRQ
 void
 iosapic_unregister_intr (unsigned int gsi)
 {
@@ -865,7 +870,6 @@ iosapic_unregister_intr (unsigned int gsi)
        spin_unlock(&iosapic_lock);
        spin_unlock_irqrestore(&idesc->lock, flags);
 }
-#endif /* CONFIG_ACPI_DEALLOCATE_IRQ */
 
 /*
  * ACPI calls this when it finds an entry for a platform interrupt.