]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
treewide: Move dma_ops from struct dev_archdata into struct device
authorBart Van Assche <bart.vanassche@sandisk.com>
Fri, 20 Jan 2017 21:04:02 +0000 (13:04 -0800)
committerDoug Ledford <dledford@redhat.com>
Tue, 24 Jan 2017 17:23:35 +0000 (12:23 -0500)
Some but not all architectures provide set_dma_ops(). Move dma_ops
from struct dev_archdata into struct device such that it becomes
possible on all architectures to configure dma_ops per device.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Juergen Gross <jgross@suse.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Russell King <linux@armlinux.org.uk>
Cc: x86@kernel.org
Signed-off-by: Doug Ledford <dledford@redhat.com>
36 files changed:
arch/arm/include/asm/device.h
arch/arm/include/asm/dma-mapping.h
arch/arm64/include/asm/device.h
arch/arm64/include/asm/dma-mapping.h
arch/arm64/mm/dma-mapping.c
arch/m32r/include/asm/device.h
arch/m32r/include/asm/dma-mapping.h
arch/mips/include/asm/device.h
arch/mips/include/asm/dma-mapping.h
arch/mips/pci/pci-octeon.c
arch/powerpc/include/asm/device.h
arch/powerpc/include/asm/dma-mapping.h
arch/powerpc/kernel/dma.c
arch/powerpc/platforms/cell/iommu.c
arch/powerpc/platforms/pasemi/iommu.c
arch/powerpc/platforms/pasemi/setup.c
arch/powerpc/platforms/ps3/system-bus.c
arch/powerpc/platforms/pseries/ibmebus.c
arch/s390/include/asm/device.h
arch/s390/include/asm/dma-mapping.h
arch/s390/pci/pci.c
arch/tile/include/asm/device.h
arch/tile/include/asm/dma-mapping.h
arch/x86/include/asm/device.h
arch/x86/include/asm/dma-mapping.h
arch/x86/kernel/pci-calgary_64.c
arch/x86/pci/common.c
arch/x86/pci/sta2x11-fixup.c
arch/xtensa/include/asm/device.h
arch/xtensa/include/asm/dma-mapping.h
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/iommu/amd_iommu.c
drivers/misc/mic/bus/mic_bus.c
drivers/misc/mic/bus/scif_bus.c
drivers/misc/mic/bus/vop_bus.c
include/linux/device.h

index d8a572f9c18712aec40860f7fbcf238e56199ba6..220ba207be9130769d3effd8687b19722c32c9ca 100644 (file)
@@ -7,7 +7,6 @@
 #define ASMARM_DEVICE_H
 
 struct dev_archdata {
-       const struct dma_map_ops        *dma_ops;
 #ifdef CONFIG_DMABOUNCE
        struct dmabounce_device_info *dmabounce;
 #endif
index 1aabd781306f54a474832e4633918f9de445d8f8..312f4d0564d652e8fc6a07ebf1c8084d2a4efef1 100644 (file)
@@ -18,8 +18,8 @@ extern const struct dma_map_ops arm_coherent_dma_ops;
 
 static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev)
 {
-       if (dev && dev->archdata.dma_ops)
-               return dev->archdata.dma_ops;
+       if (dev && dev->dma_ops)
+               return dev->dma_ops;
        return &arm_dma_ops;
 }
 
@@ -34,7 +34,7 @@ static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
 static inline void set_dma_ops(struct device *dev, const struct dma_map_ops *ops)
 {
        BUG_ON(!dev);
-       dev->archdata.dma_ops = ops;
+       dev->dma_ops = ops;
 }
 
 #define HAVE_ARCH_DMA_SUPPORTED 1
index 00c678cc31e13181f37b79d30bc80dcdd94bd192..73d5bab015ebb3c702daaf80d7f31bc1292b4eb4 100644 (file)
@@ -17,7 +17,6 @@
 #define __ASM_DEVICE_H
 
 struct dev_archdata {
-       const struct dma_map_ops *dma_ops;
 #ifdef CONFIG_IOMMU_API
        void *iommu;                    /* private IOMMU data */
 #endif
index 1fedb43be712e8edac811b9b4b01f4376df77795..58ae36cc3b60c454588b7fe60375f57b4559427e 100644 (file)
@@ -29,8 +29,8 @@ extern const struct dma_map_ops dummy_dma_ops;
 
 static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev)
 {
-       if (dev && dev->archdata.dma_ops)
-               return dev->archdata.dma_ops;
+       if (dev && dev->dma_ops)
+               return dev->dma_ops;
 
        /*
         * We expect no ISA devices, and all other DMA masters are expected to
index bcef6368d48fd62d1a5b01768acf318dc0297c9e..dbab4c6c084b39ecdfd767d3342d6848c21f58d1 100644 (file)
@@ -837,7 +837,7 @@ static bool do_iommu_attach(struct device *dev, const struct iommu_ops *ops,
                return false;
        }
 
-       dev->archdata.dma_ops = &iommu_dma_ops;
+       dev->dma_ops = &iommu_dma_ops;
        return true;
 }
 
@@ -941,7 +941,7 @@ static void __iommu_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
 
 void arch_teardown_dma_ops(struct device *dev)
 {
-       dev->archdata.dma_ops = NULL;
+       dev->dma_ops = NULL;
 }
 
 #else
@@ -955,8 +955,8 @@ static void __iommu_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
 void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
                        const struct iommu_ops *iommu, bool coherent)
 {
-       if (!dev->archdata.dma_ops)
-               dev->archdata.dma_ops = &swiotlb_dma_ops;
+       if (!dev->dma_ops)
+               dev->dma_ops = &swiotlb_dma_ops;
 
        dev->archdata.dma_coherent = coherent;
        __iommu_setup_dma_ops(dev, dma_base, size, iommu);
index 7955a9799466aff0335b94fcb028ed147546a56b..5203fc87f080edaa854d685f7a7b3126d4151d66 100644 (file)
@@ -4,7 +4,6 @@
  * This file is released under the GPLv2
  */
 struct dev_archdata {
-       const struct dma_map_ops *dma_ops;
 };
 
 struct pdev_archdata {
index 99c43d2f05dc73100d9d3847a826c6a7556c2de4..27b1597ac5633ebf48fcbb41f4778749850fd0a9 100644 (file)
@@ -12,8 +12,8 @@
 
 static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
 {
-       if (dev && dev->archdata.dma_ops)
-               return dev->archdata.dma_ops;
+       if (dev && dev->dma_ops)
+               return dev->dma_ops;
        return &dma_noop_ops;
 }
 
index ebc5c12654737082ddc487cb9037d03198a87fcc..6aa796f1081a90b0b2f1dded017cb29fce683c09 100644 (file)
@@ -6,12 +6,7 @@
 #ifndef _ASM_MIPS_DEVICE_H
 #define _ASM_MIPS_DEVICE_H
 
-struct dma_map_ops;
-
 struct dev_archdata {
-       /* DMA operations on that device */
-       const struct dma_map_ops *dma_ops;
-
 #ifdef CONFIG_DMA_PERDEV_COHERENT
        /* Non-zero if DMA is coherent with CPU caches */
        bool dma_coherent;
index b59b084a75691ed2f33271ba4a982086ca431377..dad3b09fe993453e649cbcc38f29f4f5a171f2d3 100644 (file)
@@ -13,8 +13,8 @@ extern const struct dma_map_ops *mips_dma_map_ops;
 
 static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
 {
-       if (dev && dev->archdata.dma_ops)
-               return dev->archdata.dma_ops;
+       if (dev && dev->dma_ops)
+               return dev->dma_ops;
        else
                return mips_dma_map_ops;
 }
index 308d051fc45cd5d25e96c4157abbfeabd32cc5c0..9ee01936862ee1dfe11d8a21754bb16572230aac 100644 (file)
@@ -167,7 +167,7 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
                pci_write_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, dconfig);
        }
 
-       dev->dev.archdata.dma_ops = octeon_pci_dma_map_ops;
+       dev->dev.dma_ops = octeon_pci_dma_map_ops;
 
        return 0;
 }
index 49cbb0fca23339295a7a2f8e20786758a374e449..0245bfcaac324c4ed0f42af59f8c25ab486a2b5e 100644 (file)
@@ -6,7 +6,6 @@
 #ifndef _ASM_POWERPC_DEVICE_H
 #define _ASM_POWERPC_DEVICE_H
 
-struct dma_map_ops;
 struct device_node;
 #ifdef CONFIG_PPC64
 struct pci_dn;
@@ -20,9 +19,6 @@ struct iommu_table;
  * drivers/macintosh/macio_asic.c
  */
 struct dev_archdata {
-       /* DMA operations on that device */
-       const struct dma_map_ops        *dma_ops;
-
        /*
         * These two used to be a union. However, with the hybrid ops we need
         * both so here we store both a DMA offset for direct mappings and
index 2ec3eadf336fd74b9e6943f2d5564c06a1875ea1..59fbd4abcbf81edab74d4748b94b67b55fe15e6b 100644 (file)
@@ -88,12 +88,12 @@ static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
        if (unlikely(dev == NULL))
                return NULL;
 
-       return dev->archdata.dma_ops;
+       return dev->dma_ops;
 }
 
 static inline void set_dma_ops(struct device *dev, const struct dma_map_ops *ops)
 {
-       dev->archdata.dma_ops = ops;
+       dev->dma_ops = ops;
 }
 
 /*
index 03b98f1f98ecb7f73479ff77396cef58c60caa86..41c749586bd2241d471d4f916eaefaab04a2e0c2 100644 (file)
@@ -33,7 +33,7 @@ static u64 __maybe_unused get_pfn_limit(struct device *dev)
        struct dev_archdata __maybe_unused *sd = &dev->archdata;
 
 #ifdef CONFIG_SWIOTLB
-       if (sd->max_direct_dma_addr && sd->dma_ops == &swiotlb_dma_ops)
+       if (sd->max_direct_dma_addr && dev->dma_ops == &swiotlb_dma_ops)
                pfn = min_t(u64, pfn, sd->max_direct_dma_addr >> PAGE_SHIFT);
 #endif
 
index e1413e69e5feb7a36f56458d696382dc21ef2ac1..71b995bbcae0ebeff195e9cb983cdc0128e9853a 100644 (file)
@@ -692,7 +692,7 @@ static int cell_of_bus_notify(struct notifier_block *nb, unsigned long action,
                return 0;
 
        /* We use the PCI DMA ops */
-       dev->archdata.dma_ops = get_pci_dma_ops();
+       dev->dma_ops = get_pci_dma_ops();
 
        cell_dma_dev_setup(dev);
 
index e74adc4e7fd8ead2b6a8b9eb8bcf5a51be694041..7fec04de27fc0f15991690d05d0a72fccf61f385 100644 (file)
@@ -186,7 +186,7 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev)
         */
        if (dev->vendor == 0x1959 && dev->device == 0xa007 &&
            !firmware_has_feature(FW_FEATURE_LPAR)) {
-               dev->dev.archdata.dma_ops = &dma_direct_ops;
+               dev->dev.dma_ops = &dma_direct_ops;
                /*
                 * Set the coherent DMA mask to prevent the iommu
                 * being used unnecessarily
index 3182400cf48ff181dafa5fc11ac49dfd8e3a7f5d..c4a3e93dc324a252ffbf1e20044fbab6cd426c06 100644 (file)
@@ -363,7 +363,7 @@ static int pcmcia_notify(struct notifier_block *nb, unsigned long action,
                return 0;
 
        /* We use the direct ops for localbus */
-       dev->archdata.dma_ops = &dma_direct_ops;
+       dev->dma_ops = &dma_direct_ops;
 
        return 0;
 }
index c81450d98794b0bbec36c4cb4237f23aa7d8abe7..2d2e5f80a3d3fd3854c1774e89113bef4c7fcb6d 100644 (file)
@@ -756,11 +756,11 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev)
 
        switch (dev->dev_type) {
        case PS3_DEVICE_TYPE_IOC0:
-               dev->core.archdata.dma_ops = &ps3_ioc0_dma_ops;
+               dev->core.dma_ops = &ps3_ioc0_dma_ops;
                dev_set_name(&dev->core, "ioc0_%02x", ++dev_ioc0_count);
                break;
        case PS3_DEVICE_TYPE_SB:
-               dev->core.archdata.dma_ops = &ps3_sb_dma_ops;
+               dev->core.dma_ops = &ps3_sb_dma_ops;
                dev_set_name(&dev->core, "sb_%02x", ++dev_sb_count);
 
                break;
index 2e36a0b8944ac702b1fd6aeaf3b3e5e5f9f141ab..99a6bf7f3bcf3508f6a452f9512757bd6649aeb8 100644 (file)
@@ -169,7 +169,7 @@ static int ibmebus_create_device(struct device_node *dn)
                return -ENOMEM;
 
        dev->dev.bus = &ibmebus_bus_type;
-       dev->dev.archdata.dma_ops = &ibmebus_dma_ops;
+       dev->dev.dma_ops = &ibmebus_dma_ops;
 
        ret = of_device_add(dev);
        if (ret)
index 7955a9799466aff0335b94fcb028ed147546a56b..5203fc87f080edaa854d685f7a7b3126d4151d66 100644 (file)
@@ -4,7 +4,6 @@
  * This file is released under the GPLv2
  */
 struct dev_archdata {
-       const struct dma_map_ops *dma_ops;
 };
 
 struct pdev_archdata {
index 2776d205b1ffc57ffff20e32b793950331415354..a872027d0c1b55ffc72a7a6b267cb71066ac6cd8 100644 (file)
@@ -14,8 +14,8 @@ extern const struct dma_map_ops s390_pci_dma_ops;
 
 static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
 {
-       if (dev && dev->archdata.dma_ops)
-               return dev->archdata.dma_ops;
+       if (dev && dev->dma_ops)
+               return dev->dma_ops;
        return &dma_noop_ops;
 }
 
index 38e17d4d9884ddd240b8221a1155d991e00a253d..82abef8b8574eee49c5a64f601fb13b2bbcf3d32 100644 (file)
@@ -641,7 +641,7 @@ int pcibios_add_device(struct pci_dev *pdev)
        int i;
 
        pdev->dev.groups = zpci_attr_groups;
-       pdev->dev.archdata.dma_ops = &s390_pci_dma_ops;
+       pdev->dev.dma_ops = &s390_pci_dma_ops;
        zpci_map_resources(pdev);
 
        for (i = 0; i < PCI_BAR_COUNT; i++) {
index 25f23ac7d361982f59df6509ffbca051ecfde2c0..1cf45422a0dff1262be2ff1f8e15179eede80495 100644 (file)
@@ -17,9 +17,6 @@
 #define _ASM_TILE_DEVICE_H
 
 struct dev_archdata {
-       /* DMA operations on that device */
-        const struct dma_map_ops       *dma_ops;
-
        /* Offset of the DMA address from the PA. */
        dma_addr_t              dma_offset;
 
index 4a06cc75b85647152e25d0da62bb19642c63d93c..c0620697eaadfe792290042b1c676549f5fbc350 100644 (file)
@@ -31,8 +31,8 @@ extern const struct dma_map_ops *gx_hybrid_pci_dma_map_ops;
 
 static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
 {
-       if (dev && dev->archdata.dma_ops)
-               return dev->archdata.dma_ops;
+       if (dev && dev->dma_ops)
+               return dev->dma_ops;
        else
                return tile_dma_map_ops;
 }
@@ -61,7 +61,7 @@ static inline void dma_mark_clean(void *addr, size_t size) {}
 
 static inline void set_dma_ops(struct device *dev, const struct dma_map_ops *ops)
 {
-       dev->archdata.dma_ops = ops;
+       dev->dma_ops = ops;
 }
 
 static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
index b2d0b4ced7e38f000dbde87767754f7754089937..1b3ef26e77df2b264542f23a2ac38ceb561cc39f 100644 (file)
@@ -2,9 +2,6 @@
 #define _ASM_X86_DEVICE_H
 
 struct dev_archdata {
-#ifdef CONFIG_X86_DEV_DMA_OPS
-       const struct dma_map_ops *dma_ops;
-#endif
 #if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU)
        void *iommu; /* hook for IOMMU specific extension */
 #endif
index 5e4772886a1e8aa92322fa47506ea569a3c61062..94b5b96966cba5e6978c134cc88e1a2a3edfd2f0 100644 (file)
@@ -32,10 +32,10 @@ static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
 #ifndef CONFIG_X86_DEV_DMA_OPS
        return dma_ops;
 #else
-       if (unlikely(!dev) || !dev->archdata.dma_ops)
+       if (unlikely(!dev) || !dev->dma_ops)
                return dma_ops;
        else
-               return dev->archdata.dma_ops;
+               return dev->dma_ops;
 #endif
 }
 
index 17f180148c804d0eb594a73252df357892d35157..5070320780c687b0ebd4c0d4af6204448305aa61 100644 (file)
@@ -1177,7 +1177,7 @@ static int __init calgary_init(void)
                tbl = find_iommu_table(&dev->dev);
 
                if (translation_enabled(tbl))
-                       dev->dev.archdata.dma_ops = &calgary_dma_ops;
+                       dev->dev.dma_ops = &calgary_dma_ops;
        }
 
        return ret;
@@ -1201,7 +1201,7 @@ error:
                calgary_disable_translation(dev);
                calgary_free_bus(dev);
                pci_dev_put(dev); /* Undo calgary_init_one()'s pci_dev_get() */
-               dev->dev.archdata.dma_ops = NULL;
+               dev->dev.dma_ops = NULL;
        } while (1);
 
        return ret;
index a4fdfa7dcc1bc414af628411ac7e447651635b1d..0cb52ae0a8f07521ee1cdf6a1075a4221f920884 100644 (file)
@@ -667,7 +667,7 @@ static void set_dma_domain_ops(struct pci_dev *pdev)
        spin_lock(&dma_domain_list_lock);
        list_for_each_entry(domain, &dma_domain_list, node) {
                if (pci_domain_nr(pdev->bus) == domain->domain_nr) {
-                       pdev->dev.archdata.dma_ops = domain->dma_ops;
+                       pdev->dev.dma_ops = domain->dma_ops;
                        break;
                }
        }
index aa38288231705dbee1ad8d5cee8fc263cfe13c3d..ec008e800b45038794ce7beb41cea391dc176c9a 100644 (file)
@@ -203,7 +203,7 @@ static void sta2x11_setup_pdev(struct pci_dev *pdev)
                return;
        pci_set_consistent_dma_mask(pdev, STA2X11_AMBA_SIZE - 1);
        pci_set_dma_mask(pdev, STA2X11_AMBA_SIZE - 1);
-       pdev->dev.archdata.dma_ops = &sta2x11_dma_ops;
+       pdev->dev.dma_ops = &sta2x11_dma_ops;
 
        /* We must enable all devices as master, for audio DMA to work */
        pci_set_master(pdev);
@@ -223,7 +223,7 @@ bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
 {
        struct sta2x11_mapping *map;
 
-       if (dev->archdata.dma_ops != &sta2x11_dma_ops) {
+       if (dev->dma_ops != &sta2x11_dma_ops) {
                if (!dev->dma_mask)
                        return false;
                return addr + size - 1 <= *dev->dma_mask;
@@ -247,7 +247,7 @@ bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
  */
 dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
 {
-       if (dev->archdata.dma_ops != &sta2x11_dma_ops)
+       if (dev->dma_ops != &sta2x11_dma_ops)
                return paddr;
        return p2a(paddr, to_pci_dev(dev));
 }
@@ -259,7 +259,7 @@ dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
  */
 phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr)
 {
-       if (dev->archdata.dma_ops != &sta2x11_dma_ops)
+       if (dev->dma_ops != &sta2x11_dma_ops)
                return daddr;
        return a2p(daddr, to_pci_dev(dev));
 }
index a77d45d39f351d19d2273a4a44e3a3b6a8934ed7..1deeb8ebbb1bc30f236e3592d9920c678ba533ba 100644 (file)
@@ -6,11 +6,7 @@
 #ifndef _ASM_XTENSA_DEVICE_H
 #define _ASM_XTENSA_DEVICE_H
 
-struct dma_map_ops;
-
 struct dev_archdata {
-       /* DMA operations on that device */
-       const struct dma_map_ops *dma_ops;
 };
 
 struct pdev_archdata {
index 50d23106cce034082701a7521611a97e00857bf3..9eecfc3c5dc4045c4de3ac7de2306e8cfc751463 100644 (file)
@@ -22,8 +22,8 @@ extern const struct dma_map_ops xtensa_dma_map_ops;
 
 static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
 {
-       if (dev && dev->archdata.dma_ops)
-               return dev->archdata.dma_ops;
+       if (dev && dev->dma_ops)
+               return dev->dma_ops;
        else
                return &xtensa_dma_map_ops;
 }
index d21ba9d857c3717dd0942de2670792b77375ea75..dfc24f19178b00fd740091f7020677fabd88b668 100644 (file)
@@ -2465,7 +2465,7 @@ static void srpt_add_one(struct ib_device *device)
        int i;
 
        pr_debug("device = %p, device->dma_ops = %p\n", device,
-                device->dma_ops);
+                device->dma_device->dma_ops);
 
        sdev = kzalloc(sizeof(*sdev), GFP_KERNEL);
        if (!sdev)
index 3703fb9db419375d2dd80b913664e9ffe0adcd86..f7b86679bafec3f6f10b3fd95b9f6f0aa111c66c 100644 (file)
@@ -515,7 +515,7 @@ static void iommu_uninit_device(struct device *dev)
        iommu_group_remove_device(dev);
 
        /* Remove dma-ops */
-       dev->archdata.dma_ops = NULL;
+       dev->dma_ops = NULL;
 
        /*
         * We keep dev_data around for unplugged devices and reuse it when the
@@ -2164,7 +2164,7 @@ static int amd_iommu_add_device(struct device *dev)
                                dev_name(dev));
 
                iommu_ignore_device(dev);
-               dev->archdata.dma_ops = &nommu_dma_ops;
+               dev->dma_ops = &nommu_dma_ops;
                goto out;
        }
        init_iommu_group(dev);
@@ -2181,7 +2181,7 @@ static int amd_iommu_add_device(struct device *dev)
        if (domain->type == IOMMU_DOMAIN_IDENTITY)
                dev_data->passthrough = true;
        else
-               dev->archdata.dma_ops = &amd_iommu_dma_ops;
+               dev->dma_ops = &amd_iommu_dma_ops;
 
 out:
        iommu_completion_wait(iommu);
index c4b27a25662a6fc65d13bfb9b73f66b16eda6506..77b16ca668460157cf15cfa8f767e56d590b5e73 100644 (file)
@@ -158,7 +158,7 @@ mbus_register_device(struct device *pdev, int id, const struct dma_map_ops *dma_
        mbdev->dev.parent = pdev;
        mbdev->id.device = id;
        mbdev->id.vendor = MBUS_DEV_ANY_ID;
-       mbdev->dev.archdata.dma_ops = dma_ops;
+       mbdev->dev.dma_ops = dma_ops;
        mbdev->dev.dma_mask = &mbdev->dev.coherent_dma_mask;
        dma_set_mask(&mbdev->dev, DMA_BIT_MASK(64));
        mbdev->dev.release = mbus_release_dev;
index e5d377e97c86a3dfded10328454abf30c60d8af9..a444db5f61fe5bf3aed0b25f610751711aa4d930 100644 (file)
@@ -154,7 +154,7 @@ scif_register_device(struct device *pdev, int id, const struct dma_map_ops *dma_
        sdev->dev.parent = pdev;
        sdev->id.device = id;
        sdev->id.vendor = SCIF_DEV_ANY_ID;
-       sdev->dev.archdata.dma_ops = dma_ops;
+       sdev->dev.dma_ops = dma_ops;
        sdev->dev.release = scif_release_dev;
        sdev->hw_ops = hw_ops;
        sdev->dnode = dnode;
index e3caa6c5392287512ba7706a0d57e7b2bf558460..fd7f2a6049f86218ded7d3033773e03514ae8424 100644 (file)
@@ -154,7 +154,7 @@ vop_register_device(struct device *pdev, int id,
        vdev->dev.parent = pdev;
        vdev->id.device = id;
        vdev->id.vendor = VOP_DEV_ANY_ID;
-       vdev->dev.archdata.dma_ops = dma_ops;
+       vdev->dev.dma_ops = dma_ops;
        vdev->dev.dma_mask = &vdev->dev.coherent_dma_mask;
        dma_set_mask(&vdev->dev, DMA_BIT_MASK(64));
        vdev->dev.release = vop_release_dev;
index 491b4c0ca6333a217e90cc8841f8b2c5f5bc1dc4..46a567261ccc08cfe16680647432d11b8e99663a 100644 (file)
@@ -921,6 +921,7 @@ struct device {
 #ifdef CONFIG_NUMA
        int             numa_node;      /* NUMA node this device is close to */
 #endif
+       const struct dma_map_ops *dma_ops;
        u64             *dma_mask;      /* dma mask (if dma'able device) */
        u64             coherent_dma_mask;/* Like dma_mask, but for
                                             alloc_coherent mappings as