From b8e106eaddad09003d57ae6c2c902b37928d1820 Mon Sep 17 00:00:00 2001 From: Peter Grehan Date: Tue, 28 Dec 2004 05:07:49 +0000 Subject: [PATCH] Don't probe for a disk unless explicitly enabled by a tunable. This allows boot to proceed on a real system until the issue of calling back into certain OpenFirmware calls (e.g. finddevice) in thread context is understood. (this commit only affects psim users, of which I think I am the only one...) --- sys/dev/ofw/ofw_disk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/ofw/ofw_disk.c b/sys/dev/ofw/ofw_disk.c index 54a3d2afe244..67a9451d94db 100644 --- a/sys/dev/ofw/ofw_disk.c +++ b/sys/dev/ofw/ofw_disk.c @@ -73,6 +73,9 @@ struct g_class g_ofwd_class = { DECLARE_GEOM_CLASS(g_ofwd_class, g_ofwd); +static int ofwd_enable = 0; +TUNABLE_INT("kern.ofw.disk", &ofwd_enable); + static int ofwd_startio(struct ofwd_softc *sc, struct bio *bp) { @@ -139,6 +142,9 @@ g_ofwd_init(struct g_class *mp __unused) ihandle_t ifd; int error; + if (ofwd_enable == 0) + return; + ofd = OF_finddevice("ofwdisk"); if (ofd == -1) return;