summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-03-13 21:49:48 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-03-13 21:49:48 -0800
commita0729eb408f161c647545e677982190e95947988 (patch)
treec933eb84197974d43c7a776a24ea28f9ec361c26 /include/linux
parentfa9fcf5fffe3413d95ad6f6d7e9c35310e132787 (diff)
[PATCH] move consistent_dma_mask to the generic device
From: James Bottomley <James.Bottomley@SteelEye.com> pci_dev.consistent_dma_mask was introduced to get around problems in the IA64 Altix machine. Now, we have a use for it in x86: the aacraid needs coherent memory in a 31 bit address range (2GB). Unfortunately, x86 is converted to the dma model, so it can't see the pci_dev by the time coherent memory is allocated. The solution to all of this is to move pci_dev.consistent_dma_mask to dev.coherent_dma_mask and make x86 use it in the dma_alloc_coherent() calls. This should allow me to make the aacraid set the coherent mask instead of using it's current dma_mask juggling.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h6
-rw-r--r--include/linux/pci.h5
2 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index aef6b2f8836e..28e101a77070 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -285,6 +285,12 @@ struct device {
detached from its driver. */
u64 *dma_mask; /* dma mask (if dma'able device) */
+ u64 coherent_dma_mask;/* Like dma_mask, but for
+ alloc_coherent mappings as
+ not all hardware supports
+ 64 bit addresses for consistent
+ allocations such descriptors. */
+
struct list_head dma_pools; /* dma pools (if dma'ble) */
void (*release)(struct device * dev);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index eb594a816bec..3f2b4949a65e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -393,11 +393,6 @@ struct pci_dev {
this if your device has broken DMA
or supports 64-bit transfers. */
- 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. */