[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKT61h8AWzChE7eqiYwDMYPSoHM9HM2EvpWiD0kjkKtR+1-TRQ@mail.gmail.com>
Date: Tue, 19 Jan 2016 09:49:08 +0800
From: Wan ZongShun <mcuos.com@...il.com>
To: Wan Zongshun <vincent.wan@....com>, Borislav Petkov <bp@...e.de>,
vw@...mu.org
Cc: Joerg Roedel <joro@...tes.org>, iommu@...ts.linux-foundation.org,
Ray Huang <ray.huang@....com>, ken.xue@....com,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] iommu/amd: set AMD iommu-callbacks for the amba bus
2015-12-30 0:54 GMT+08:00 Wan Zongshun <vincent.wan@....com>:
> From: Wan Zongshun <Vincent.Wan@....com>
>
> 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 <Vincent.Wan@....com>
Joerg,
How about this patch?
It is a separating patch to our acpihid device support patches.
> ---
> drivers/iommu/amd_iommu.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
> index 8b2be1e..9097b11 100644
> --- a/drivers/iommu/amd_iommu.c
> +++ b/drivers/iommu/amd_iommu.c
> @@ -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@...ts.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu
--
---
Vincent Wan(Zongshun)
www.mcuos.com
Powered by blists - more mailing lists