diff options
author | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-05-17 05:01:40 +0000 |
---|---|---|
committer | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-05-17 05:01:40 +0000 |
commit | c37170bc17a42d62fdb980266929abe216b32fff (patch) | |
tree | 2be0e010bfeb7ee8021f8a09bfd854a1ac0e7c08 | |
parent | 45e51c1beee43766d3a4fd5b40a339af21ef7fc9 (diff) |
The device initialization code can not assume it is being invoked on
the master processor, aka processor 0, or on nasid 0. In an SMP
environment, any cpu can be doing do_basic_setup(). This fixes the
rare bootup problems we were seeing on SMP.
-rw-r--r-- | arch/mips64/sgi-ip27/ip27-irq.c | 3 | ||||
-rw-r--r-- | drivers/net/ioc3-eth.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/mips64/sgi-ip27/ip27-irq.c b/arch/mips64/sgi-ip27/ip27-irq.c index 33b2d390a..c5d5a060d 100644 --- a/arch/mips64/sgi-ip27/ip27-irq.c +++ b/arch/mips64/sgi-ip27/ip27-irq.c @@ -220,6 +220,7 @@ static unsigned int bridge_startup(unsigned int irq) bridge_t *bridge; int pin, swlevel; int real_irq = IRQ_FROM_IRQ(irq); + cpuid_t cpu = 0; bridge = (bridge_t *) NODE_SWIN_BASE(NASID_FROM_PCI_IRQ(irq), WID_FROM_PCI_IRQ(irq)); @@ -235,7 +236,7 @@ static unsigned int bridge_startup(unsigned int irq) * of INT_PEND0 are taken */ swlevel = IRQ_TO_SWLEVEL(real_irq); - intr_connect_level(smp_processor_id(), swlevel); + intr_connect_level(cpu, swlevel); bridge->b_int_addr[pin].addr = 0x20000 | swlevel; bridge->b_int_enable |= (1 << pin); diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c index 8a3952df4..5f0fcf9ca 100644 --- a/drivers/net/ioc3-eth.c +++ b/drivers/net/ioc3-eth.c @@ -664,7 +664,11 @@ ioc3_probe(struct net_device *dev) return 0; initialized++; - nid = get_nasid(); +#if 0 + nid = get_nasid(); /* Never assume we are on master cpu */ +#else + nid = 0; +#endif ioc3 = (struct ioc3 *) KL_CONFIG_CH_CONS_INFO(nid)->memory_base; ioc3_probe1(dev, ioc3); |