aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/kernel/irq_ia64.c4
-rw-r--r--arch/ia64/kernel/msi_ia64.c10
2 files changed, 5 insertions, 9 deletions
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index 698d8fefde6c..3329177c262e 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -161,7 +161,6 @@ int bind_irq_vector(int irq, int vector, cpumask_t domain)
161static void __clear_irq_vector(int irq) 161static void __clear_irq_vector(int irq)
162{ 162{
163 int vector, cpu; 163 int vector, cpu;
164 cpumask_t mask;
165 cpumask_t domain; 164 cpumask_t domain;
166 struct irq_cfg *cfg = &irq_cfg[irq]; 165 struct irq_cfg *cfg = &irq_cfg[irq];
167 166
@@ -169,8 +168,7 @@ static void __clear_irq_vector(int irq)
169 BUG_ON(cfg->vector == IRQ_VECTOR_UNASSIGNED); 168 BUG_ON(cfg->vector == IRQ_VECTOR_UNASSIGNED);
170 vector = cfg->vector; 169 vector = cfg->vector;
171 domain = cfg->domain; 170 domain = cfg->domain;
172 cpumask_and(&mask, &cfg->domain, cpu_online_mask); 171 for_each_cpu_and(cpu, &cfg->domain, cpu_online_mask)
173 for_each_cpu_mask(cpu, mask)
174 per_cpu(vector_irq, cpu)[vector] = -1; 172 per_cpu(vector_irq, cpu)[vector] = -1;
175 cfg->vector = IRQ_VECTOR_UNASSIGNED; 173 cfg->vector = IRQ_VECTOR_UNASSIGNED;
176 cfg->domain = CPU_MASK_NONE; 174 cfg->domain = CPU_MASK_NONE;
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c
index 8ae36ea177d3..9dd7464f8c17 100644
--- a/arch/ia64/kernel/msi_ia64.c
+++ b/arch/ia64/kernel/msi_ia64.c
@@ -47,15 +47,14 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
47 struct msi_msg msg; 47 struct msi_msg msg;
48 unsigned long dest_phys_id; 48 unsigned long dest_phys_id;
49 int irq, vector; 49 int irq, vector;
50 cpumask_t mask;
51 50
52 irq = create_irq(); 51 irq = create_irq();
53 if (irq < 0) 52 if (irq < 0)
54 return irq; 53 return irq;
55 54
56 irq_set_msi_desc(irq, desc); 55 irq_set_msi_desc(irq, desc);
57 cpumask_and(&mask, &(irq_to_domain(irq)), cpu_online_mask); 56 dest_phys_id = cpu_physical_id(cpumask_any_and(&(irq_to_domain(irq)),
58 dest_phys_id = cpu_physical_id(first_cpu(mask)); 57 cpu_online_mask));
59 vector = irq_to_vector(irq); 58 vector = irq_to_vector(irq);
60 59
61 msg.address_hi = 0; 60 msg.address_hi = 0;
@@ -171,10 +170,9 @@ msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg)
171{ 170{
172 struct irq_cfg *cfg = irq_cfg + irq; 171 struct irq_cfg *cfg = irq_cfg + irq;
173 unsigned dest; 172 unsigned dest;
174 cpumask_t mask;
175 173
176 cpumask_and(&mask, &(irq_to_domain(irq)), cpu_online_mask); 174 dest = cpu_physical_id(cpumask_first_and(&(irq_to_domain(irq)),
177 dest = cpu_physical_id(first_cpu(mask)); 175 cpu_online_mask));
178 176
179 msg->address_hi = 0; 177 msg->address_hi = 0;
180 msg->address_lo = 178 msg->address_lo =