Subject: Re: bus_dma.c for mips (Re: CVS commit: src/sys/arch/sgimips/sgimips)
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Christopher SEKIYA <wileyc@rezrov.net>
List: port-mips
Date: 04/13/2004 17:01:24
On Tue, Apr 13, 2004 at 12:45:51AM +0900, Izumi Tsutsui wrote:

> I think the previous sgimips code which I committed does the right
> thing, and I just committed the change only port I tested.
> arc also has the same code, but I have no machines which use
> MI mips bus_dma.c.

Okay, I'll back out those bits and add a comment stating that the sgimips
code is better than the mips code, to prevent things like this in the future.

> chigau? :-)

Oops.

> Would you please show an example?
> At least, some mips ports have 64bit paadr_t even though their vaddr_t
> is (still) 32bit. That's the reason we have both vaddr_t and
> paddr_t, but some old code might have some bugs in the usage of them.

Well, _bus_dmamem_alloc() uses vaddr_t for curaddr and lastaddr in sgimips code,
but paddr_t in the mips code.  Same for lastaddr in _bus_dmamap_load_uio().
There are a few more in there ...

-- Chris
	GPG key FEB9DE7F (91AF 4534 4529 4BCC 31A5  938E 023E EEFB FEB9 DE7F)