Subject: bus_space_barrier() [Re: CVS commit: syssrc]
To: Lennart Augustsson <augustss@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-kern
Date: 04/26/2000 08:00:21
On Tue, Apr 25, 2000 at 07:28:15AM -0700, Lennart Augustsson wrote:
> Module Name: syssrc
> Committed By: augustss
> Date: Tue Apr 25 14:28:15 UTC 2000
>
> Modified Files:
> syssrc/sys/dev/usb: ohci.c uhci.c
>
> Log Message:
> Insert (very conservative!) bus_space_barrier() calls at all register accesses.
> The bus_space(9) man page says you've gotta have them...
I want to at least partially revise this part of bus_space(9). It is, in
fact, the case *right now* that barriers are always implied by bus_space
operations. This is because for may devices, you would have to do what you
just did; insert barriers everywhere.
What I would like to do is add a __BUS_SPACE_NO_IMPLIED_BARRIERS which
drivers can define which disables the implicit bus_space_barrier() calls
for that source file. That way a driver could do optimized barriers if
it so chooses.
It would push some complexity into some of the bus.h implementations, but
I don't think it's worth it.
--
-- Jason R. Thorpe <thorpej@zembu.com>