tech-kern archive

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

Re: bus_space(9) overrides & resource reservations



On Thu, May 27, 2010 at 10:18:53PM +0900, Izumi Tsutsui wrote:
> > What are the arguments to bus_space_tag_create()?
> > 
> > I'm looking for a flag to tell it the "bus endianess" of the resulting tag,
> > as that would help to sort out an abstraction violation in SBUS <-> pcmcia
> > adapters. Support for that would be optional, of course.
> 
> I doubt we will able to abstruct various bus quirks including
> endianness with such simple flags.

You would not use flags, you would install an override function to be
used instead of bus_space_read_4().

> As I wrote in another mail, suggested MI hooks should not
> be handled by "create" function.
> 
> The real "create" function, especially for access primitives,
> should stay in MD implementation.

bus_space_tag_create() is part of a new MI API, but its implementation
is MD.  This gives each port the flexibility to implement
bus_space_tag_create() in the most appropriate way.

Some ports may not provide bus_space_tag_create() at all.  Instead, they
will rely on the default implementation, which returns EOPNOTSUPP.

> (See atari/dev/if_ne_mb.c for awful examples)

You could use bus_space_tag_create() in MD code such as if_ne_mb.c and
dev/sbus/stp4020.c, but I don't know if it will be worth it.  The code
would look more consistent with MI code.

I will use bus_space_tag_create() first in MI code, sys/dev/pci/pccbb.c.

Dave

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


Home | Main Index | Thread Index | Old Index