diff options
author | Christoph Hellwig <hch@lst.de> | 2006-06-06 16:11:35 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-06-09 21:24:01 +1000 |
commit | 8eb6c6e3b9c8bfed3d75536ab142d7694627c2e5 (patch) | |
tree | 7dd9c4146f60e88ca1fc8ebe976e1b7a3ae6ea2c /arch/powerpc/kernel/pci_iommu.c | |
parent | 318facbee05417fb432603a8309a10cdb942a87b (diff) | |
download | lwn-8eb6c6e3b9c8bfed3d75536ab142d7694627c2e5.tar.gz lwn-8eb6c6e3b9c8bfed3d75536ab142d7694627c2e5.zip |
[PATCH] powerpc: node-aware dma allocations
Make sure dma_alloc_coherent allocates memory from the local node. This
is important on Cell where we avoid going through the slow cpu
interconnect.
Note: I could only test this patch on Cell, it should be verified on
some pseries machine by those that have the hardware.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/pci_iommu.c')
-rw-r--r-- | arch/powerpc/kernel/pci_iommu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/pci_iommu.c b/arch/powerpc/kernel/pci_iommu.c index 48aa82d01624..7fb4cca021be 100644 --- a/arch/powerpc/kernel/pci_iommu.c +++ b/arch/powerpc/kernel/pci_iommu.c @@ -86,7 +86,8 @@ static void *pci_iommu_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_handle, gfp_t flag) { return iommu_alloc_coherent(device_to_table(hwdev), size, dma_handle, - device_to_mask(hwdev), flag); + device_to_mask(hwdev), flag, + pcibus_to_node(to_pci_dev(hwdev)->bus)); } static void pci_iommu_free_coherent(struct device *hwdev, size_t size, |