Subject: Re: 64 bit DMA tags for PCI
To: Matt Thomas <matt@3am-software.com>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 05/12/2003 07:43:08
On Monday, May 12, 2003, at 12:15  AM, Matt Thomas wrote:

> I also want a #define that indicates the 64bit DMA is available so that
> if it isn't present, the code can be compiled out.  No need for 64bit
> DMA support on macppc or hpcmips for instance

Yah, I agree with this.  E.g. in <machine/pci_machdep.h>, do:

#define _PCI_HAVE_DMA64

This would only be defined if the platform had a 64-bit bus_addr_t 
*and* supported 64-bit PCI DMA (not all platforms that have 64-bit 
bus_addr_t's can support 64-bit PCI DMA ... perhaps you only have 
32-bit PCI slots and your host bridge doesn't support dual address 
cycles).

> Since bus_dma_tag_t are pointers, why not let this function
> return the bus_dma_tag_t for 64bit dma if useful or NULL if not.

Well...

They're not defined in the API to be pointers, they just happen to be 
so.

I'd say add a BUS_DMA_TAG_INVALID macro.

         -- Jason R. Thorpe <thorpej@wasabisystems.com>