summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/msi_ia64.c
diff options
context:
space:
mode:
authorYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>2007-07-17 14:22:33 +0200
committerTony Luck <tony.luck@intel.com>2007-07-17 18:52:13 +0200
commit4994be1b3fe9120c88022ff5c0c33f6312b17adb (patch)
treeb4d32c77681029d2b5dfd94b0eb5a09be0ccae9e /arch/ia64/kernel/msi_ia64.c
parent[IA64] Add mapping table between irq and vector (diff)
downloadlinux-4994be1b3fe9120c88022ff5c0c33f6312b17adb.tar.xz
linux-4994be1b3fe9120c88022ff5c0c33f6312b17adb.zip
[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/msi_ia64.c')
-rw-r--r--arch/ia64/kernel/msi_ia64.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c
index c81080df70df..1d22670cc88b 100644
--- a/arch/ia64/kernel/msi_ia64.c
+++ b/arch/ia64/kernel/msi_ia64.c
@@ -52,6 +52,11 @@ static void ia64_set_msi_irq_affinity(unsigned int irq, cpumask_t cpu_mask)
struct msi_msg msg;
u32 addr;
+ /* IRQ migration across domain is not supported yet */
+ cpus_and(cpu_mask, cpu_mask, irq_to_domain(irq));
+ if (cpus_empty(cpu_mask))
+ return;
+
read_msi_msg(irq, &msg);
addr = msg.address_lo;
@@ -69,13 +74,15 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
struct msi_msg msg;
unsigned long dest_phys_id;
int irq, vector;
+ cpumask_t mask;
irq = create_irq();
if (irq < 0)
return irq;
set_irq_msi(irq, desc);
- dest_phys_id = cpu_physical_id(first_cpu(cpu_online_map));
+ cpus_and(mask, irq_to_domain(irq), cpu_online_map);
+ dest_phys_id = cpu_physical_id(first_cpu(mask));
vector = irq_to_vector(irq);
msg.address_hi = 0;