diff options
author | John Keller <jpk@sgi.com> | 2006-11-06 15:10:50 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-12-07 13:50:09 -0500 |
commit | c69577711a8fd232e6b309c3e99f9a8f96f63082 (patch) | |
tree | 7b70542ab00109a4f4018fe4d34ea7a89857d0b0 /arch | |
parent | d61b49c1aa49efc657aa0cf270cf931444680563 (diff) |
[IA64] SN: Correctly update smp_affinty mask
On Altix systems, the /proc/irq/nn/smp_affinity mask is not being setup
at device iniitalization, or updated after an interrupt redirection.
This patch resolves those issues.
Signed-off-by: John Keller <jpk@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/sn/kernel/irq.c | 18 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/msi_sn.c | 4 |
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 | ||
316 | void sn_irq_unfixup(struct pci_dev *pci_dev) | 328 | void 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 | ||