aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/sn/kernel/irq.c18
-rw-r--r--arch/ia64/sn/kernel/msi_sn.c4
2 files changed, 15 insertions, 7 deletions
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c
index 0b49459a878a..8c5bee01eaa2 100644
--- a/arch/ia64/sn/kernel/irq.c
+++ b/arch/ia64/sn/kernel/irq.c
@@ -117,7 +117,10 @@ struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *sn_irq_info,
117 nasid_t nasid, int slice) 117 nasid_t nasid, int slice)
118{ 118{
119 int vector; 119 int vector;
120 int cpuid;
121#ifdef CONFIG_SMP
120 int cpuphys; 122 int cpuphys;
123#endif
121 int64_t bridge; 124 int64_t bridge;
122 int local_widget, status; 125 int local_widget, status;
123 nasid_t local_nasid; 126 nasid_t local_nasid;
@@ -146,7 +149,6 @@ struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *sn_irq_info,
146 vector = sn_irq_info->irq_irq; 149 vector = sn_irq_info->irq_irq;
147 /* Free the old PROM new_irq_info structure */ 150 /* Free the old PROM new_irq_info structure */
148 sn_intr_free(local_nasid, local_widget, new_irq_info); 151 sn_intr_free(local_nasid, local_widget, new_irq_info);
149 /* Update kernels new_irq_info with new target info */
150 unregister_intr_pda(new_irq_info); 152 unregister_intr_pda(new_irq_info);
151 153
152 /* allocate a new PROM new_irq_info struct */ 154 /* allocate a new PROM new_irq_info struct */
@@ -160,8 +162,10 @@ struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *sn_irq_info,
160 return NULL; 162 return NULL;
161 } 163 }
162 164
163 cpuphys = nasid_slice_to_cpuid(nasid, slice); 165 /* Update kernels new_irq_info with new target info */
164 new_irq_info->irq_cpuid = cpuphys; 166 cpuid = nasid_slice_to_cpuid(new_irq_info->irq_nasid,
167 new_irq_info->irq_slice);
168 new_irq_info->irq_cpuid = cpuid;
165 register_intr_pda(new_irq_info); 169 register_intr_pda(new_irq_info);
166 170
167 pci_provider = sn_pci_provider[new_irq_info->irq_bridge_type]; 171 pci_provider = sn_pci_provider[new_irq_info->irq_bridge_type];
@@ -180,6 +184,7 @@ struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *sn_irq_info,
180 call_rcu(&sn_irq_info->rcu, sn_irq_info_free); 184 call_rcu(&sn_irq_info->rcu, sn_irq_info_free);
181 185
182#ifdef CONFIG_SMP 186#ifdef CONFIG_SMP
187 cpuphys = cpu_physical_id(cpuid);
183 set_irq_affinity_info((vector & 0xff), cpuphys, 0); 188 set_irq_affinity_info((vector & 0xff), cpuphys, 0);
184#endif 189#endif
185 190
@@ -299,6 +304,9 @@ void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info)
299 nasid_t nasid = sn_irq_info->irq_nasid; 304 nasid_t nasid = sn_irq_info->irq_nasid;
300 int slice = sn_irq_info->irq_slice; 305 int slice = sn_irq_info->irq_slice;
301 int cpu = nasid_slice_to_cpuid(nasid, slice); 306 int cpu = nasid_slice_to_cpuid(nasid, slice);
307#ifdef CONFIG_SMP
308 int cpuphys;
309#endif
302 310
303 pci_dev_get(pci_dev); 311 pci_dev_get(pci_dev);
304 sn_irq_info->irq_cpuid = cpu; 312 sn_irq_info->irq_cpuid = cpu;
@@ -311,6 +319,10 @@ void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info)
311 spin_unlock(&sn_irq_info_lock); 319 spin_unlock(&sn_irq_info_lock);
312 320
313 register_intr_pda(sn_irq_info); 321 register_intr_pda(sn_irq_info);
322#ifdef CONFIG_SMP
323 cpuphys = cpu_physical_id(cpu);
324 set_irq_affinity_info(sn_irq_info->irq_irq, cpuphys, 0);
325#endif
314} 326}
315 327
316void sn_irq_unfixup(struct pci_dev *pci_dev) 328void sn_irq_unfixup(struct pci_dev *pci_dev)
diff --git a/arch/ia64/sn/kernel/msi_sn.c b/arch/ia64/sn/kernel/msi_sn.c
index 6ffd1f850d41..b3a435fd70fb 100644
--- a/arch/ia64/sn/kernel/msi_sn.c
+++ b/arch/ia64/sn/kernel/msi_sn.c
@@ -136,10 +136,6 @@ int sn_setup_msi_irq(unsigned int irq, struct pci_dev *pdev)
136 */ 136 */
137 msg.data = 0x100 + irq; 137 msg.data = 0x100 + irq;
138 138
139#ifdef CONFIG_SMP
140 set_irq_affinity_info(irq, sn_irq_info->irq_cpuid, 0);
141#endif
142
143 write_msi_msg(irq, &msg); 139 write_msi_msg(irq, &msg);
144 set_irq_chip_and_handler(irq, &sn_msi_chip, handle_edge_irq); 140 set_irq_chip_and_handler(irq, &sn_msi_chip, handle_edge_irq);
145 141