tech-kern archive

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

Re: bus_space(9) overrides & resource reservations



> Here is a bus_space(9) patch for review.  It adds the ability for MI
> code to override some of the bus_space(9) routines.  It also adds
> new bus_space(9) routines that decouple bus-space reservations from
> bus-space mapping.
 :
> Two new routines create and destroy bus_space_tag_t's.  One routine,
> bus_space_tag_create(), derives from an existing bus_space_tag_t a new
> one whose behavior is the same as the old except where you override it.

I'm afraid x86's bus_space_tag_t is too simple to review sample
code that significantly changes MI APIs around bus_space_tag_t.

On several architecture, bus_space_tag_t is a structure
which includes function pointers for alloc/access functions.
On such ports MD bus implementations already have
various "creating bus_space_tag_t" functions and
they allocalte/initialize bus_space_tag_t internally.
(See mips/include/bus_space.h, powerpc/include/bus.h,
 atari/atari/mainbus.c etc.)
On such ports, the name of "bus_space_tag_create()" looks a bit confusing.

I think the new functions should imply "adding/removing MI hooks
to/from MD bus_space_tag_t provided by MD implementation,"
not creating/destroying tags.
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index