tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: config_mounroot - spinout while attaching nouveaufb0 on amd64 with LOCKDEBUG



FWIW, i've been running my radeon with a patch that exlicitly drops
kernel lock around the "real attach" function (the one that config
mountroot ends up calling.)

we really need to MPSAFE-ify the autoconf subsystem.  right now, it
is expected that autoconf runs with kernel lock... i am not sure of
the path we should take for this -- but let's actually have a design
in place we are happy with, while my change below works, it's ugly
and wrong.


.mrg.


Index: sys/external/bsd/drm2/radeon/radeon_pci.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/radeon/radeon_pci.c,v
retrieving revision 1.14
diff -p -u -r1.14 radeon_pci.c
--- sys/external/bsd/drm2/radeon/radeon_pci.c	24 Jan 2020 11:44:27 -0000	1.14
+++ sys/external/bsd/drm2/radeon/radeon_pci.c	17 Feb 2020 16:54:05 -0000
@@ -229,6 +229,9 @@ radeon_attach_real(device_t self)
 	unsigned long flags;
 	int error;
 
+	/* XXXSMP autoconf */
+	KERNEL_UNLOCK_ONE(NULL);
+
 	ok = radeon_pci_lookup(pa, &flags);
 	KASSERT(ok);
 
@@ -274,6 +277,9 @@ radeon_attach_real(device_t self)
 	}
 
 out:	sc->sc_dev = self;
+
+	/* XXXSMP autoconf */
+	KERNEL_LOCK(1, NULL);
 }
 
 static int


Home | Main Index | Thread Index | Old Index