diff options
author | mjacob <mjacob@FreeBSD.org> | 2001-08-15 17:23:22 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2001-08-15 17:23:22 +0000 |
commit | 7965e326b3d19f97024b7bfe55a1e50dd5c01111 (patch) | |
tree | 50cf73042403c001c352662ce409c3321e310427 /sys/alpha | |
parent | e6d799200dffb72eb6e1aa39a0dd4845ad47733d (diff) | |
download | FreeBSD-src-7965e326b3d19f97024b7bfe55a1e50dd5c01111.zip FreeBSD-src-7965e326b3d19f97024b7bfe55a1e50dd5c01111.tar.gz |
Old business: some SMP support.
Diffstat (limited to 'sys/alpha')
-rw-r--r-- | sys/alpha/tlsb/tlsbcpu.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/sys/alpha/tlsb/tlsbcpu.c b/sys/alpha/tlsb/tlsbcpu.c index 40fc028..7be42f1 100644 --- a/sys/alpha/tlsb/tlsbcpu.c +++ b/sys/alpha/tlsb/tlsbcpu.c @@ -78,7 +78,7 @@ static driver_t tlsbcpu_driver = { static int tlsbcpu_probe(device_t dev) { - u_int32_t vid; + u_int32_t vid, imsreg; device_t child; static int inst = 0; struct tlsb_device *tdev = DEVTOTLSB(dev); @@ -105,17 +105,25 @@ tlsbcpu_probe(device_t dev) /* * Hook in the first CPU unit. */ - tlsb_primary_cpu = tdev; - TLSB_PUT_NODEREG(tdev->td_node, TLCPUMASK, (1 << vid)); + if (device_get_unit(dev) == 0) { + tlsb_primary_cpu = tdev; + } + /* + * Make this CPU a candidate for receiving interrupts. + */ + TLSB_PUT_NODEREG(tdev->td_node, TLCPUMASK, + TLSB_GET_NODEREG(tdev->td_node, TLCPUMASK) | (1 << vid)); /* - * Attach gbus. + * Attach gbus for first instance. */ - child = device_add_child(dev, "gbus", inst++); - if (child == NULL) { - return (-1); + if (device_get_unit(dev) == 0) { + child = device_add_child(dev, "gbus", inst++); + if (child == NULL) { + return (-1); + } + device_set_ivars(child, tdev); } - device_set_ivars(child, tdev); return (0); } DRIVER_MODULE(tlsbcpu, tlsb, tlsbcpu_driver, tlsbcpu_devclass, 0, 0); |