Port-sun3 archive

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

Re: __BROKEN_CONFIG_UNIT_USAGE ?



On Tue, Dec 01, 2009 at 01:48:44PM -0800, Jason Thorpe wrote:
> 
> On Dec 1, 2009, at 12:46 PM, David Young wrote:
> 
> > On Tue, Dec 01, 2009 at 09:44:29PM +0100, Manuel Bouyer wrote:
> >> On Mon, Nov 30, 2009 at 01:54:13PM -0600, David Young wrote:
> >>> Only NetBSD/sun3 uses __BROKEN_CONFIG_UNIT_USAGE.  The name of this
> >>> mysterious #define, which affects which code in subr_autoconf.c is
> >>> compiled, implies that sun3 is somehow "broken"?  Will somebody fix it?
> >> 
> >> So you know what is broken exactly ?
> > 
> > No, I do not.  I'm hoping that some NetBSD/sun3 developer knows.
> 
> The code makes assumptions about the behavior / relationships of
> devices at fixed unit numbers.  See sun3/sun3/vme.c:vme_match(),

Can this magic in vme_match()

#define VME_UNITS       6

        unit = cf->cf_unit;
        if (unit >= VME_UNITS)
                return 0;

        if (ca->ca_bustype != vme_info[unit].bustype)
                return 0;

be avoided by creating a new locator, "bustype", and
rewriting the kernel configuration

        vme0 at mainbus? # A16/D16
        vme1 at mainbus? # A16/D32
        vme2 at mainbus? # A24/D16
        vme3 at mainbus? # A24/D32
        vme4 at mainbus? # A32/D16
        vme5 at mainbus? # A32/D32

as follows?

        vme0 at mainbus? bustype 0 # A16/D16
        vme1 at mainbus? bustype 1 # A16/D32
        vme2 at mainbus? bustype 2 # A24/D16
        vme3 at mainbus? bustype 3 # A24/D32
        vme4 at mainbus? bustype 4 # A32/D16
        vme5 at mainbus? bustype 5 # A32/D32

> and to a lesser extent, sun3/dev/xd.c:xdmatch() and
> sun3/dev/xy.c:xymatch().

Wow, what are *those* doing?  Any reason that cannot be expressed in the
kernel configuration, too?

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index