From adf058f0f73198b8482a9504168d486204ee52a3 Mon Sep 17 00:00:00 2001 From: mjacob Date: Wed, 8 Jul 1998 00:47:53 +0000 Subject: [PATCH] There can only be one TurboLaser node, and now we'll overload into the integer tlsb_found a bit map of found nodes and export it to the rest of the kernel. This is so that at machine check time when we're doing some TLSB/KFTXX error handling we don't have to attempt a badaddr to look at all TLSB nodes (which will just be too sad to try...). --- sys/arch/alpha/tlsb/tlsb.c | 14 +++++++++----- sys/arch/alpha/tlsb/tlsbvar.h | 6 +++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/sys/arch/alpha/tlsb/tlsb.c b/sys/arch/alpha/tlsb/tlsb.c index 5635aaa3be3e..3134b935874c 100644 --- a/sys/arch/alpha/tlsb/tlsb.c +++ b/sys/arch/alpha/tlsb/tlsb.c @@ -1,4 +1,4 @@ -/* $NetBSD: tlsb.c,v 1.10 1998/05/14 00:01:32 thorpej Exp $ */ +/* $NetBSD: tlsb.c,v 1.11 1998/07/08 00:47:53 mjacob Exp $ */ /* * Copyright (c) 1997 by Matthew Jacob @@ -40,7 +40,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: tlsb.c,v 1.10 1998/05/14 00:01:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tlsb.c,v 1.11 1998/07/08 00:47:53 mjacob Exp $"); #include #include @@ -73,7 +73,7 @@ static int tlsbprint __P((void *, const char *)); static int tlsbsubmatch __P((struct device *, struct cfdata *, void *)); static char *tlsb_node_type_str __P((u_int32_t)); -/* There can be only one. */ +/* There can be only one, and we'll overload it with a bitmap of found nodes */ int tlsb_found; static int @@ -146,8 +146,6 @@ tlsbattach(parent, self, aux) printf("\n"); - tlsb_found = 1; - /* * Attempt to find all devices on the bus, including * CPUs, memory modules, and I/O modules. @@ -173,6 +171,12 @@ tlsbattach(parent, self, aux) /* Nothing at this node. */ continue; } + /* + * Store up that we found something at this node. + * We do this so that we don't have to do something + * silly at fault time like try a 'baddadr'... + */ + tlsb_found |= (1 << node); if (TLDEV_ISIOPORT(tldev)) continue; /* not interested right now */ ta.ta_node = node; diff --git a/sys/arch/alpha/tlsb/tlsbvar.h b/sys/arch/alpha/tlsb/tlsbvar.h index 5a15c7016a8a..98ba8f7ba840 100644 --- a/sys/arch/alpha/tlsb/tlsbvar.h +++ b/sys/arch/alpha/tlsb/tlsbvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: tlsbvar.h,v 1.5 1998/05/13 23:23:23 thorpej Exp $ */ +/* $NetBSD: tlsbvar.h,v 1.6 1998/07/08 00:47:53 mjacob Exp $ */ /* * Copyright (c) 1997 by Matthew Jacob @@ -57,3 +57,7 @@ struct tlsb_cpu_busdep { u_int8_t tcpu_vid; /* virtual ID of CPU */ int tcpu_node; /* TurboLaser node */ }; + +#ifdef _KERNEL +extern int tlsb_found; +#endif