Subject: PR 31468 -- distributed LKMs are not useful because of incompatible config
To: None <tech-kern@netbsd.org>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 10/30/2005 09:04:56
hi,

does anyone object to turning off DIAGNOSTIC in all the GENERIC configs?
this seems like reasonable anyway, and it fixes this issue in nicely.


in the longer term, I think that DIAGNOSTIC should not make LKMs incompatible.
I checked the source tree for reasons why turning on this option might cause
incompatibilities, and I found just a few things:

 - these structures have an extra field if DIAGNOSTIC is on:

	struct irframe_softc
	struct usbd_xfer
	struct wsemul_vt100_emuldata
	struct cpu_data

	struct ehci_xfer
	struct ohci_soft_itd
	struct uhci_intr_info
	struct union_node


   I'm guessing that structures in the first group are significant for LKMs
   whereas those the second group are not.

   I think that for structures in the first group we should either have
   these fields always present, or just remove them and the code that
   references them.  It would be nice to do that for the second group
   as well, just so that it's easier to make sure we don't add more things
   to the first group in the future.


 - these headers define functions as inline iff !DIAGNOSTIC
	sys/vnode.h
		holdrelel
		vholdl
		vref

   I think we should just make these not be inline.


any objections to these longer-term changes?

-Chuck