diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-05-29 09:22:56 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-05-29 09:22:56 -0700 |
| commit | 747ec9b0f1bfc43e54fb66086fcb366edbb70fcf (patch) | |
| tree | c3d70175ecb50bdc21d2edbef3b07cee7efa8f98 /include/linux | |
| parent | 718aca7fd8db5904ec91730ccaa0732738c1c50d (diff) | |
[PATCH] support 64 bit pci_alloc_consistent
From: Jes Sorensen <jes@wildopensource.com>
This is patch which provides support for 64 bit address allocations from
pci_alloc_consistent(), based on the address mask set through
pci_set_consistent_dma_mask(). This is necessary on some platforms which
are unable to provide physical memory in the lower 4GB block and do not
provide IOMMU support for cards operating in certain bus modes, such as
PCI-X on the SGI SN2.
The default mask for pci_alloc_consistent() is still 32 bit as there are 64
bit capable hardware out there that doesn't support 64 bit addresses for
descripters etc. Likewise, platforms which provide IOMMU support in all
bus modes can ignore struct pci_dev->consistent_dma_mask and just return a
32 bit address as before.
The patch also includes changes to tg3.c to make it use the new api as well
as a documentation update. I have done my best on the documentation part,
if anyone feel the can make my scribbles clearer, please do.
Thanks to Dave Miller, Grant Grundler, James Bottomley, Colin Ngam, and
Jeremy Higdon for input and code/documentation portions.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pci.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index fd6f80c5142d..c73088aa5dcf 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -390,6 +390,11 @@ struct pci_dev { or supports 64-bit transfers. */ struct list_head pools; /* pci_pools tied to this device */ + u64 consistent_dma_mask;/* Like dma_mask, but for + pci_alloc_consistent mappings as + not all hardware supports + 64 bit addresses for consistent + allocations such descriptors. */ u32 current_state; /* Current operating state. In ACPI-speak, this is D0-D3, D0 being fully functional, and D3 being off. */ @@ -623,6 +628,7 @@ int pci_set_mwi(struct pci_dev *dev); void pci_clear_mwi(struct pci_dev *dev); int pci_set_dma_mask(struct pci_dev *dev, u64 mask); int pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask); +int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); int pci_assign_resource(struct pci_dev *dev, int i); /* Power management related routines */ |
