[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210330122234.GE5908@willie-the-truck>
Date: Tue, 30 Mar 2021 13:22:34 +0100
From: Will Deacon <will@...nel.org>
To: Christoph Hellwig <hch@....de>
Cc: Joerg Roedel <joro@...tes.org>, Li Yang <leoyang.li@....com>,
Michael Ellerman <mpe@...erman.id.au>,
David Woodhouse <dwmw2@...radead.org>,
Lu Baolu <baolu.lu@...ux.intel.com>,
linuxppc-dev@...ts.ozlabs.org, linux-arm-msm@...r.kernel.org,
dri-devel@...ts.freedesktop.org, freedreno@...ts.freedesktop.org,
iommu@...ts.linux-foundation.org,
linux-arm-kernel@...ts.infradead.org, kvm@...r.kernel.org,
virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org
Subject: Re: [PATCH 05/18] iommu/fsl_pamu: remove support for multiple windows
On Tue, Mar 16, 2021 at 04:38:11PM +0100, Christoph Hellwig wrote:
> The only domains allocated forces use of a single window. Remove all
> the code related to multiple window support, as well as the need for
> qman_portal to force a single window.
>
> Remove the now unused DOMAIN_ATTR_WINDOWS iommu_attr.
>
> Signed-off-by: Christoph Hellwig <hch@....de>
> Acked-by: Li Yang <leoyang.li@....com>
> ---
> drivers/iommu/fsl_pamu.c | 264 +-------------------------
> drivers/iommu/fsl_pamu.h | 10 +-
> drivers/iommu/fsl_pamu_domain.c | 275 +++++-----------------------
> drivers/iommu/fsl_pamu_domain.h | 12 +-
> drivers/soc/fsl/qbman/qman_portal.c | 7 -
> include/linux/iommu.h | 1 -
> 6 files changed, 59 insertions(+), 510 deletions(-)
[...]
> + set_bf(ppaace->impl_attr, PAACE_IA_ATM, PAACE_ATM_WINDOW_XLATE);
> + ppaace->twbah = rpn >> 20;
> + set_bf(ppaace->win_bitfields, PAACE_WIN_TWBAL, rpn);
> + set_bf(ppaace->addr_bitfields, PAACE_AF_AP, prot);
> + set_bf(ppaace->impl_attr, PAACE_IA_WCE, 0);
> + set_bf(ppaace->addr_bitfields, PPAACE_AF_MW, 0);
> mb();
(I wonder what on Earth that mb() is doing...)
> diff --git a/drivers/iommu/fsl_pamu_domain.h b/drivers/iommu/fsl_pamu_domain.h
> index 53d359d66fe577..b9236fb5a8f82e 100644
> --- a/drivers/iommu/fsl_pamu_domain.h
> +++ b/drivers/iommu/fsl_pamu_domain.h
> @@ -17,23 +17,13 @@ struct dma_window {
> };
>
> struct fsl_dma_domain {
> - /*
> - * Number of windows assocaited with this domain.
> - * During domain initialization, it is set to the
> - * the maximum number of subwindows allowed for a LIODN.
> - * Minimum value for this is 1 indicating a single PAMU
> - * window, without any sub windows. Value can be set/
> - * queried by set_attr/get_attr API for DOMAIN_ATTR_WINDOWS.
> - * Value can only be set once the geometry has been configured.
> - */
> - u32 win_cnt;
> /*
> * win_arr contains information of the configured
> * windows for a domain. This is allocated only
> * when the number of windows for the domain are
> * set.
> */
The last part of this comment is now stale ^^
> - struct dma_window *win_arr;
> + struct dma_window win_arr[1];
> /* list of devices associated with the domain */
> struct list_head devices;
> /* dma_domain states:
Acked-by: Will Deacon <will@...nel.org>
Will
Powered by blists - more mailing lists