Subject: Re: com rumblings...
To: Izumi Tsutsui <>
From: Garrett D'Amore <>
List: tech-kern
Date: 06/16/2006 12:45:27
Izumi Tsutsui wrote:
> wrote:
>>> Hmm, my intention to create fake softcs is to make
>>> CSR_{READ,WRITE} macros take softc as most drivers do.
>>> If it's okay to make them take struct com_regs, faked one
>>> isn't needed. (I don't have strong insistence which is better)
>> FWIW, if I were dealing with a sane driver where nearly all routines had
>> the softc passed in, I would have made CSR_READ/WRITE take that softc. 
>> But since there were a number of functions that operate without a softc
>> (basically the console stuff), I decided it was better to create a
>> structure that had only the data in it needed for the console.
> Okay, the problem is that most macros/functions to read/write
> registers in each driver use bus_space stuff stored in softc,
> but consinit related functions have to use it before the device
> is attached. There are a bunch of ugliness around consinit stuff
> (especially on framebuffers), so I thought faking softc is
> just one of them :-)
> BTW, even without fake softcs I still think we can avoid
> all MD changes.

I had thought about making the changes to do that.  But there were other
concerns, and by doing it this way, I was able to *find* all the
attachment points because they won't compile.  So this was an
intentional decision. :-)  In any case, everything except ARM and m68k
are converted.  It takes about 5 minutes to convert a typical MD
attachment.  If you are slow. :-)

    -- Garrett
> ---
> Izumi Tsutsui

Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
Phone: 951 325-2134  Fax: 951 325-2191