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 04:28:19PM +0000, Eduardo Horvath wrote:
> On Thu, 27 May 2010, David Young wrote:
> > You would not use flags, you would install an override function to be
> > used instead of bus_space_read_4().
> 
> Uh, no you wouldn't.  Endianness is set by MMU mappings when the registers 
> are mapped in.  Using the bswap routines on sparc64 is extremely 
> inefficient since they result in 4-8 dependent instructions vs 0 cycles 
> using the mux in the load/store path.

You could also override bus_space_map() or whichever routine is most
suitable.  (Did I mention that I've split bus-space reservations and
mappings? :-)

Maybe you should have a look at stp4020.c to see if the le32toh() call
in stp4020_read_4() can be avoided.

Dave

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


Home | Main Index | Thread Index | Old Index