Module Name: src
Committed By: jdc
Date: Sun Sep 23 09:54:04 UTC 2012
Modified Files:
src/sys/arch/sparc/dev: sbus.c
Log Message:
Wrap sbuserr_handler and sbus_error with:
#if (defined(SUN4M) && !defined(MSIIEP)) || defined(SUN4D)
to give them the same scope as the definitions in ../sparc/intr.c.
Allows SUN4C-only kernels to compile.
OK mrg
To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/sparc/dev/sbus.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sparc/dev/sbus.c
diff -u src/sys/arch/sparc/dev/sbus.c:1.77 src/sys/arch/sparc/dev/sbus.c:1.78
--- src/sys/arch/sparc/dev/sbus.c:1.77 Sun Jul 29 00:04:05 2012
+++ src/sys/arch/sparc/dev/sbus.c Sun Sep 23 09:54:04 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: sbus.c,v 1.77 2012/07/29 00:04:05 matt Exp $ */
+/* $NetBSD: sbus.c,v 1.78 2012/09/23 09:54:04 jdc Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbus.c,v 1.77 2012/07/29 00:04:05 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbus.c,v 1.78 2012/09/23 09:54:04 jdc Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -113,8 +113,10 @@ void sbus_attach_mainbus(device_t, devic
void sbus_attach_iommu(device_t, device_t, void *);
void sbus_attach_xbox(device_t, device_t, void *);
+#if (defined(SUN4M) && !defined(MSIIEP)) || defined(SUN4D)
static int sbus_error(void);
extern int (*sbuserr_handler)(void);
+#endif
CFATTACH_DECL_NEW(sbus_mainbus, sizeof(struct sbus_softc),
sbus_match_mainbus, sbus_attach_mainbus, NULL, NULL);
@@ -311,7 +313,9 @@ sbus_attach_iommu(device_t parent, devic
printf(": clock = %s MHz\n", clockfreq(sc->sc_clockfreq));
sbus_sc = sc;
+#if (defined(SUN4M) && !defined(MSIIEP)) || defined(SUN4D)
sbuserr_handler = sbus_error;
+#endif
sbus_attach_common(sc, "sbus", node, NULL);
}
@@ -594,6 +598,7 @@ sbus_intr_establish(bus_space_tag_t t, i
return (ih);
}
+#if (defined(SUN4M) && !defined(MSIIEP)) || defined(SUN4D)
static int
sbus_error(void)
{
@@ -625,3 +630,4 @@ static int straytime, nstray;
return (0);
}
+#endif