Obvious bug in /sys/i386/include/bus.h

Hans Petter Selasky hselasky at c2i.net
Tue Jun 14 00:49:37 GMT 2005


On Tuesday 14 June 2005 01:23, M. Warner Losh wrote:
> In message: <200506131412.38967.hselasky at c2i.net>
>
>             Hans Petter Selasky <hselasky at c2i.net> writes:
> : So can someone have this fixed, or is there a reason not to fix it. The
> : one who wrote the code has done the same mistake with every one of the
> : bus_space_XXXX that does memory mapped I/O. It currently breaks my
> : drivers.
>
> One isn't supposed to call these routines with count == 0.  One could
> say your drivers are broken :-)
>
> Back when these were written, small optimizations like this were made
> to make things go faster.  Now that cache sizes are bigger, a few
> extra instructions likely wouldn't affect things too much.  Best to
> measure the effects of your proposed changes on real workloads...

These functions are used to move smaller amounts of data. Larger amounts of 
data should be moved using DMA. In this case functionality is more important 
than performance?!

-- HPS


More information about the freebsd-hackers mailing list