aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/iosapic.c
diff options
context:
space:
mode:
authorYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>2007-07-17 08:22:33 -0400
committerTony Luck <tony.luck@intel.com>2007-07-17 12:52:13 -0400
commit4994be1b3fe9120c88022ff5c0c33f6312b17adb (patch)
treeb4d32c77681029d2b5dfd94b0eb5a09be0ccae9e /arch/ia64/kernel/iosapic.c
parente1b30a392835e92581db09a4e8b4b2ad53a0c370 (diff)
[IA64] Add support for vector domain
Add fundamental support for multiple vector domain. There still exists only one vector domain even with this patch. IRQ migration across domain is not supported yet by this patch. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/iosapic.c')
-rw-r--r--arch/ia64/kernel/iosapic.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index cf27cfb4d165..e647254c2707 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -354,6 +354,8 @@ iosapic_set_affinity (unsigned int irq, cpumask_t mask)
354 354
355 irq &= (~IA64_IRQ_REDIRECTED); 355 irq &= (~IA64_IRQ_REDIRECTED);
356 356
357 /* IRQ migration across domain is not supported yet */
358 cpus_and(mask, mask, irq_to_domain(irq));
357 if (cpus_empty(mask)) 359 if (cpus_empty(mask))
358 return; 360 return;
359 361
@@ -663,6 +665,7 @@ get_target_cpu (unsigned int gsi, int irq)
663#ifdef CONFIG_SMP 665#ifdef CONFIG_SMP
664 static int cpu = -1; 666 static int cpu = -1;
665 extern int cpe_vector; 667 extern int cpe_vector;
668 cpumask_t domain = irq_to_domain(irq);
666 669
667 /* 670 /*
668 * In case of vector shared by multiple RTEs, all RTEs that 671 * In case of vector shared by multiple RTEs, all RTEs that
@@ -701,7 +704,7 @@ get_target_cpu (unsigned int gsi, int irq)
701 goto skip_numa_setup; 704 goto skip_numa_setup;
702 705
703 cpu_mask = node_to_cpumask(iosapic_lists[iosapic_index].node); 706 cpu_mask = node_to_cpumask(iosapic_lists[iosapic_index].node);
704 707 cpus_and(cpu_mask, cpu_mask, domain);
705 for_each_cpu_mask(numa_cpu, cpu_mask) { 708 for_each_cpu_mask(numa_cpu, cpu_mask) {
706 if (!cpu_online(numa_cpu)) 709 if (!cpu_online(numa_cpu))
707 cpu_clear(numa_cpu, cpu_mask); 710 cpu_clear(numa_cpu, cpu_mask);
@@ -731,7 +734,7 @@ skip_numa_setup:
731 do { 734 do {
732 if (++cpu >= NR_CPUS) 735 if (++cpu >= NR_CPUS)
733 cpu = 0; 736 cpu = 0;
734 } while (!cpu_online(cpu)); 737 } while (!cpu_online(cpu) || !cpu_isset(cpu, domain));
735 738
736 return cpu_physical_id(cpu); 739 return cpu_physical_id(cpu);
737#else /* CONFIG_SMP */ 740#else /* CONFIG_SMP */
@@ -900,7 +903,7 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi,
900 switch (int_type) { 903 switch (int_type) {
901 case ACPI_INTERRUPT_PMI: 904 case ACPI_INTERRUPT_PMI:
902 irq = vector = iosapic_vector; 905 irq = vector = iosapic_vector;
903 bind_irq_vector(irq, vector); 906 bind_irq_vector(irq, vector, CPU_MASK_ALL);
904 /* 907 /*
905 * since PMI vector is alloc'd by FW(ACPI) not by kernel, 908 * since PMI vector is alloc'd by FW(ACPI) not by kernel,
906 * we need to make sure the vector is available 909 * we need to make sure the vector is available
@@ -917,7 +920,7 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi,
917 break; 920 break;
918 case ACPI_INTERRUPT_CPEI: 921 case ACPI_INTERRUPT_CPEI:
919 irq = vector = IA64_CPE_VECTOR; 922 irq = vector = IA64_CPE_VECTOR;
920 BUG_ON(bind_irq_vector(irq, vector)); 923 BUG_ON(bind_irq_vector(irq, vector, CPU_MASK_ALL));
921 delivery = IOSAPIC_LOWEST_PRIORITY; 924 delivery = IOSAPIC_LOWEST_PRIORITY;
922 mask = 1; 925 mask = 1;
923 break; 926 break;
@@ -953,7 +956,7 @@ iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi,
953 unsigned int dest = cpu_physical_id(smp_processor_id()); 956 unsigned int dest = cpu_physical_id(smp_processor_id());
954 957
955 irq = vector = isa_irq_to_vector(isa_irq); 958 irq = vector = isa_irq_to_vector(isa_irq);
956 BUG_ON(bind_irq_vector(irq, vector)); 959 BUG_ON(bind_irq_vector(irq, vector, CPU_MASK_ALL));
957 register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY, polarity, trigger); 960 register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY, polarity, trigger);
958 961
959 DBG("ISA: IRQ %u -> GSI %u (%s,%s) -> CPU %d (0x%04x) vector %d\n", 962 DBG("ISA: IRQ %u -> GSI %u (%s,%s) -> CPU %d (0x%04x) vector %d\n",