Commit c9c8b0d8 authored by Pat Gefre's avatar Pat Gefre Committed by David Mosberger

[PATCH] ia64: Altix affinity fix

parent cc57b27f
......@@ -200,7 +200,6 @@ sn_shub_redirect_intr(pcibr_intr_t intr, unsigned long cpu)
int cpuphys, slice;
nasid_t nasid;
unsigned long xtalk_addr;
void *bridge = intr->bi_soft->bs_base;
int irq;
int i;
int old_cpu;
......@@ -237,13 +236,13 @@ sn_shub_redirect_intr(pcibr_intr_t intr, unsigned long cpu)
for (bit = 0; bit < 8; bit++) {
if (intr->bi_ibits & (1 << bit) ) {
/* Disable interrupts. */
pcireg_intr_enable_bit_clr(bridge, bit);
pcireg_intr_enable_bit_clr(intr->bi_soft, bit);
/* Reset Host address (Interrupt destination) */
pcireg_intr_addr_addr_set(bridge, bit, xtalk_addr);
pcireg_intr_addr_addr_set(intr->bi_soft, bit, xtalk_addr);
/* Enable interrupt */
pcireg_intr_enable_bit_set(bridge, bit);
pcireg_intr_enable_bit_set(intr->bi_soft, bit);
/* Force an interrupt, just in case. */
pcireg_force_intr_set(bridge, bit);
pcireg_force_intr_set(intr->bi_soft, bit);
}
}
irq = intr->bi_irq;
......
......@@ -15,6 +15,7 @@
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/bootmem.h>
#include <linux/cpumask.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/sn/sgi.h>
......@@ -118,10 +119,11 @@ sn_end_irq(unsigned int irq)
}
static void
sn_set_affinity_irq(unsigned int irq, unsigned long cpu)
sn_set_affinity_irq(unsigned int irq, cpumask_t mask)
{
#ifdef CONFIG_SMP
int redir = 0;
int cpu;
struct sn_intr_list_t *p = sn_intr_list[irq];
pcibr_intr_t intr;
extern void sn_shub_redirect_intr(pcibr_intr_t intr, unsigned long cpu);
......@@ -135,7 +137,9 @@ sn_set_affinity_irq(unsigned int irq, unsigned long cpu)
if (intr == NULL)
return;
cpu = first_cpu(mask);
sn_shub_redirect_intr(intr, cpu);
irq = irq & 0xff; /* strip off redirect bit, if someone stuck it on. */
(void) set_irq_affinity_info(irq, cpu_physical_id(intr->bi_cpu), redir);
#endif /* CONFIG_SMP */
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment