iommu/amd: set AMD iommu-callbacks for the amba bus
PATCH 1/1 iommu/amd: set AMD iommu-callbacks for the amba bus
From: Wan Zongshun <[email protected]>
Since uart dma is using AMD iommu, and it bases on amba bus. So we need set callbacks for amba bus type firstly.
--- drivers/iommu/amd_iommu.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/iommu/amd_iommu.c +12 -1
@@ -35,6 +35,7 @@#include <linux/msi.h> #include <linux/dma-contiguous.h> #include <linux/irqdomain.h> +#include <linux/amba/bus.h> #include <asm/irq_remapping.h> #include <asm/io_apic.h> #include <asm/apic.h>
@@ -2758,7 +2759,17 @@ static struct dma_map_ops amd_iommu_dma_ops = {int __init amd_iommu_init_api (void ) { -return bus_set_iommu (&pci_bus_type, &amd_iommu_ops); +int err =0 ; + + err =bus_set_iommu (&pci_bus_type, &amd_iommu_ops); +if (err) +return err; +#ifdef CONFIG_ARM_AMBA + err =bus_set_iommu (&amba_bustype, &amd_iommu_ops); +if (err) +return err; +#endif +return 0 ; }int __init amd_iommu_init_dma_ops (void )
Signature · 1 line
1.9.1
2015-12-30 0:54 GMT+08:00 Wan Zongshun <[email protected]>:
Quoted 6 lines
From: Wan Zongshun <[email protected]>
Since uart dma is using AMD iommu, and it bases on amba bus. So we need set callbacks for amba bus type firstly.
Signed-off-by Wan Zongshun <[email protected]>
Joerg,
How about this patch?
It is a separating patch to our acpihid device support patches.
Quoted 42 lines
--- drivers/iommu/amd_iommu.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)drivers/iommu/amd_iommu.c +12
-2@@ -35,6 +35,7 @@#include <linux/msi.h> #include <linux/dma-contiguous.h> #include <linux/irqdomain.h> +#include <linux/amba/bus.h> #include <asm/irq_remapping.h> #include <asm/io_apic.h> #include <asm/apic.h> @@ -2758,7 +2759,17 @@ static struct dma_map_ops amd_iommu_dma_ops = {int __init amd_iommu_init_api (void ) { -return bus_set_iommu (&pci_bus_type, &amd_iommu_ops); +int err =0 ; + + err =bus_set_iommu (&pci_bus_type, &amd_iommu_ops); +if (err) +return err; +#ifdef CONFIG_ARM_AMBA + err =bus_set_iommu (&amba_bustype, &amd_iommu_ops); +if (err) +return err; +#endif +return 0 ; }int __init amd_iommu_init_dma_ops (void ) --1.9.1
_______________________________________________
iommu mailing list iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Signature · 3 lines
--- Vincent Wan(Zongshun) www.mcuos.com
Joerg Roedel
maintainerHi,
Quoted 1 line · Wan ZongShun
It is a separating patch to our acpihid device support patches.
Please re-submit it after the merge window together with the acpihid support patches. This stuff can be merged together.
Thanks,
Joerg