Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christoph Hellwig and committed by
Joerg Roedel
151f9414 fd78696e

+7 -16
+3 -11
drivers/iommu/fsl_pamu.c
··· 181 181 * @win_addr: starting address of DSA window 182 182 * @win-size: size of DSA window 183 183 * @omi: Operation mapping index -- if ~omi == 0 then omi not defined 184 - * @rpn: real (true physical) page number 185 184 * @stashid: cache stash id for associated cpu -- if ~stashid == 0 then 186 185 * stashid not defined 187 - * @snoopid: snoop id for hardware coherency -- if ~snoopid == 0 then 188 - * snoopid not defined 189 186 * @prot: window permissions 190 187 * 191 188 * Returns 0 upon success else error code < 0 returned 192 189 */ 193 190 int pamu_config_ppaace(int liodn, phys_addr_t win_addr, phys_addr_t win_size, 194 - u32 omi, unsigned long rpn, u32 snoopid, u32 stashid, 195 - int prot) 191 + u32 omi, u32 stashid, int prot) 196 192 { 197 193 struct paace *ppaace; 198 194 ··· 230 234 if (~stashid != 0) 231 235 set_bf(ppaace->impl_attr, PAACE_IA_CID, stashid); 232 236 233 - /* configure snoop id */ 234 - if (~snoopid != 0) 235 - ppaace->domain_attr.to_host.snpid = snoopid; 236 - 237 237 set_bf(ppaace->impl_attr, PAACE_IA_ATM, PAACE_ATM_WINDOW_XLATE); 238 - ppaace->twbah = rpn >> 20; 239 - set_bf(ppaace->win_bitfields, PAACE_WIN_TWBAL, rpn); 238 + ppaace->twbah = 0; 239 + set_bf(ppaace->win_bitfields, PAACE_WIN_TWBAL, 0); 240 240 set_bf(ppaace->addr_bitfields, PAACE_AF_AP, prot); 241 241 set_bf(ppaace->impl_attr, PAACE_IA_WCE, 0); 242 242 set_bf(ppaace->addr_bitfields, PPAACE_AF_MW, 0);
+1 -2
drivers/iommu/fsl_pamu.h
··· 384 384 int pamu_enable_liodn(int liodn); 385 385 int pamu_disable_liodn(int liodn); 386 386 int pamu_config_ppaace(int liodn, phys_addr_t win_addr, phys_addr_t win_size, 387 - u32 omi, unsigned long rpn, u32 snoopid, uint32_t stashid, 388 - int prot); 387 + u32 omi, uint32_t stashid, int prot); 389 388 390 389 u32 get_stash_id(u32 stash_dest_hint, u32 vcpu); 391 390 void get_ome_index(u32 *omi_index, struct device *dev);
+3 -3
drivers/iommu/fsl_pamu_domain.c
··· 96 96 if (ret) 97 97 goto out_unlock; 98 98 ret = pamu_config_ppaace(liodn, geom->aperture_start, 99 - geom->aperture_end + 1, omi_index, 0, 100 - ~(u32)0, dma_domain->stash_id, 0); 99 + geom->aperture_end + 1, omi_index, 100 + dma_domain->stash_id, 0); 101 101 if (ret) 102 102 goto out_unlock; 103 103 ret = pamu_config_ppaace(liodn, geom->aperture_start, 104 104 geom->aperture_end + 1, ~(u32)0, 105 - 0, ~(u32)0, dma_domain->stash_id, 105 + dma_domain->stash_id, 106 106 PAACE_AP_PERMS_QUERY | PAACE_AP_PERMS_UPDATE); 107 107 out_unlock: 108 108 spin_unlock_irqrestore(&iommu_lock, flags);