Subject: Re: LKMs independent of DIAGNOSTIC?
To: Assar Westerlund <assar@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: port-alpha
Date: 08/06/2001 08:20:53
On Mon, Aug 06, 2001 at 04:53:53PM +0200, Assar Westerlund wrote:

 > I tried loading an LKM into an alpha kernel build with DIAGNOSTIC.
 > This fails some time after loading it in a not-very-pretty way since
 > the layout of `struct cpu_info' is different depending on DIAGNOSTIC
 > (and MULTIPROCESSOR).  To not have to build LKMs with the exakt same
 > set of defines (and no way of finding these) as the kernel, I suggest
 > something along the line of this patch.  Any comments?

Err, for DIAGNOSTIC, yah, the structure probably just shouldn't change...
Note this is not limited to the Alpha port -- the ci_spin_locks and
ci_simple_locks should probably just always be there, and COMMENTED that
they're only USED if DIAGNOSTIC || LOCKDEBUG.

If you make the change I suggest, please make sure you check all declarations
of cpu_info (on all ports);

As for MULTIPROCESSOR, MP vs. non-MP LKMs is a giantic mess right now,
and I don't think we should try to think to hard about that problem for
the moment.

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>