diff options
author | Christoph Hellwig | 2021-04-01 17:52:48 +0200 |
---|---|---|
committer | Joerg Roedel | 2021-04-07 10:56:52 +0200 |
commit | 151f9414b88bf62cdc671892ca1409ddf05ae72f (patch) | |
tree | e6d2bfb6fe1d9d2022a67b4b1ac10170044327a4 /drivers/iommu | |
parent | fd78696ece54a83c8fc4f6ff1c959b7bcf25c410 (diff) |
iommu/fsl_pamu: remove the rpn and snoop_id arguments to pamu_config_ppaac
These are always wired to fixed values, so don't bother passing them as
arguments.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210401155256.298656-13-hch@lst.de
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/fsl_pamu.c | 14 | ||||
-rw-r--r-- | drivers/iommu/fsl_pamu.h | 3 | ||||
-rw-r--r-- | drivers/iommu/fsl_pamu_domain.c | 6 |
3 files changed, 7 insertions, 16 deletions
diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index 3e1647cd5ad4..742fa0e8c45b 100644 --- a/drivers/iommu/fsl_pamu.c +++ b/drivers/iommu/fsl_pamu.c @@ -181,18 +181,14 @@ int pamu_update_paace_stash(int liodn, u32 value) * @win_addr: starting address of DSA window * @win-size: size of DSA window * @omi: Operation mapping index -- if ~omi == 0 then omi not defined - * @rpn: real (true physical) page number * @stashid: cache stash id for associated cpu -- if ~stashid == 0 then * stashid not defined - * @snoopid: snoop id for hardware coherency -- if ~snoopid == 0 then - * snoopid not defined * @prot: window permissions * * Returns 0 upon success else error code < 0 returned */ int pamu_config_ppaace(int liodn, phys_addr_t win_addr, phys_addr_t win_size, - u32 omi, unsigned long rpn, u32 snoopid, u32 stashid, - int prot) + u32 omi, u32 stashid, int prot) { struct paace *ppaace; @@ -234,13 +230,9 @@ int pamu_config_ppaace(int liodn, phys_addr_t win_addr, phys_addr_t win_size, if (~stashid != 0) set_bf(ppaace->impl_attr, PAACE_IA_CID, stashid); - /* configure snoop id */ - if (~snoopid != 0) - ppaace->domain_attr.to_host.snpid = snoopid; - 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); + ppaace->twbah = 0; + set_bf(ppaace->win_bitfields, PAACE_WIN_TWBAL, 0); 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); diff --git a/drivers/iommu/fsl_pamu.h b/drivers/iommu/fsl_pamu.h index 04fd843d718d..c96b29f0c707 100644 --- a/drivers/iommu/fsl_pamu.h +++ b/drivers/iommu/fsl_pamu.h @@ -384,8 +384,7 @@ int pamu_domain_init(void); int pamu_enable_liodn(int liodn); int pamu_disable_liodn(int liodn); int pamu_config_ppaace(int liodn, phys_addr_t win_addr, phys_addr_t win_size, - u32 omi, unsigned long rpn, u32 snoopid, uint32_t stashid, - int prot); + u32 omi, uint32_t stashid, int prot); u32 get_stash_id(u32 stash_dest_hint, u32 vcpu); void get_ome_index(u32 *omi_index, struct device *dev); diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c index e9c1e0dd68f0..c83f1e7c2cb0 100644 --- a/drivers/iommu/fsl_pamu_domain.c +++ b/drivers/iommu/fsl_pamu_domain.c @@ -96,13 +96,13 @@ static int pamu_set_liodn(struct fsl_dma_domain *dma_domain, struct device *dev, if (ret) goto out_unlock; ret = pamu_config_ppaace(liodn, geom->aperture_start, - geom->aperture_end + 1, omi_index, 0, - ~(u32)0, dma_domain->stash_id, 0); + geom->aperture_end + 1, omi_index, + dma_domain->stash_id, 0); if (ret) goto out_unlock; ret = pamu_config_ppaace(liodn, geom->aperture_start, geom->aperture_end + 1, ~(u32)0, - 0, ~(u32)0, dma_domain->stash_id, + dma_domain->stash_id, PAACE_AP_PERMS_QUERY | PAACE_AP_PERMS_UPDATE); out_unlock: spin_unlock_irqrestore(&iommu_lock, flags); |