Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/macio: Ensure all dma routines get copied over

Also add a comment to dev_archdata, indicating that changes there need
to be verified against the driver code.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Nishanth Aravamudan and committed by
Benjamin Herrenschmidt
f6aedd86 a8daac8a

+9 -4
+6
arch/powerpc/include/asm/device.h
··· 9 9 struct dma_map_ops; 10 10 struct device_node; 11 11 12 + /* 13 + * Arch extensions to struct device. 14 + * 15 + * When adding fields, consider macio_add_one_device in 16 + * drivers/macintosh/macio_asic.c 17 + */ 12 18 struct dev_archdata { 13 19 /* DMA operations on that device */ 14 20 struct dma_map_ops *dma_ops;
+3 -4
drivers/macintosh/macio_asic.c
··· 387 387 /* Set the DMA ops to the ones from the PCI device, this could be 388 388 * fishy if we didn't know that on PowerMac it's always direct ops 389 389 * or iommu ops that will work fine 390 + * 391 + * To get all the fields, copy all archdata 390 392 */ 391 - dev->ofdev.dev.archdata.dma_ops = 392 - chip->lbus.pdev->dev.archdata.dma_ops; 393 - dev->ofdev.dev.archdata.dma_data = 394 - chip->lbus.pdev->dev.archdata.dma_data; 393 + dev->ofdev.dev.archdata = chip->lbus.pdev->dev.archdata; 395 394 #endif /* CONFIG_PCI */ 396 395 397 396 #ifdef DEBUG