aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorGrant Grundler <grundler@parisc-linux.org>2005-11-17 16:29:16 -0500
committerKyle McMartin <kyle@parisc-linux.org>2005-11-17 16:29:16 -0500
commit03afe22f074231196dcf3298f962cfc787ebbc60 (patch)
tree9a1b4400f387f46dd2009500dc1d4f2fa0a15f44 /arch/parisc
parentc2ab64d09815cc4d48347ee3679658f197455a2a (diff)
[PARISC] irq_affinityp[] only available for SMP builds
irq_affinityp[] only available for SMP builds, make code that uses it conditional on CONFIG_SMP. Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/irq.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 2626405e70c4..144fc25b3872 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -261,13 +261,17 @@ int txn_alloc_irq(unsigned int bits_wide)
261 return -1; 261 return -1;
262} 262}
263 263
264
264unsigned long txn_affinity_addr(unsigned int irq, int cpu) 265unsigned long txn_affinity_addr(unsigned int irq, int cpu)
265{ 266{
267#ifdef CONFIG_SMP
266 irq_affinity[irq] = cpumask_of_cpu(cpu); 268 irq_affinity[irq] = cpumask_of_cpu(cpu);
269#endif
267 270
268 return cpu_data[cpu].txn_addr; 271 return cpu_data[cpu].txn_addr;
269} 272}
270 273
274
271unsigned long txn_alloc_addr(unsigned int virt_irq) 275unsigned long txn_alloc_addr(unsigned int virt_irq)
272{ 276{
273 static int next_cpu = -1; 277 static int next_cpu = -1;
@@ -321,14 +325,16 @@ void do_cpu_irq_mask(struct pt_regs *regs)
321 325
322 /* Work our way from MSb to LSb...same order we alloc EIRs */ 326 /* Work our way from MSb to LSb...same order we alloc EIRs */
323 for (irq = TIMER_IRQ; eirr_val && bit; bit>>=1, irq++) { 327 for (irq = TIMER_IRQ; eirr_val && bit; bit>>=1, irq++) {
328#ifdef CONFIG_SMP
324 cpumask_t dest = irq_affinity[irq]; 329 cpumask_t dest = irq_affinity[irq];
325 330#endif
326 if (!(bit & eirr_val)) 331 if (!(bit & eirr_val))
327 continue; 332 continue;
328 333
329 /* clear bit in mask - can exit loop sooner */ 334 /* clear bit in mask - can exit loop sooner */
330 eirr_val &= ~bit; 335 eirr_val &= ~bit;
331 336
337#ifdef CONFIG_SMP
332 /* FIXME: because generic set affinity mucks 338 /* FIXME: because generic set affinity mucks
333 * with the affinity before sending it to us 339 * with the affinity before sending it to us
334 * we can get the situation where the affinity is 340 * we can get the situation where the affinity is
@@ -337,12 +343,13 @@ void do_cpu_irq_mask(struct pt_regs *regs)
337 !cpu_isset(smp_processor_id(), dest)) { 343 !cpu_isset(smp_processor_id(), dest)) {
338 int cpu = first_cpu(dest); 344 int cpu = first_cpu(dest);
339 345
340 printk("rethrowing irq %d from %d to %d\n", 346 printk("redirecting irq %d from CPU %d to %d\n",
341 irq, smp_processor_id(), cpu); 347 irq, smp_processor_id(), cpu);
342 gsc_writel(irq + CPU_IRQ_BASE, 348 gsc_writel(irq + CPU_IRQ_BASE,
343 cpu_data[cpu].hpa); 349 cpu_data[cpu].hpa);
344 continue; 350 continue;
345 } 351 }
352#endif
346 353
347 __do_IRQ(irq, regs); 354 __do_IRQ(irq, regs);
348 } 355 }