Re: [PATCH v2 13/30] s390/pci: return status from zpci_refresh_trans

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2022-01-14 at 15:31 -0500, Matthew Rosato wrote:
> Current callers of zpci_refresh_trans don't need to interrogate the status
> returned from the underlying instructions.  However, a subsequent patch
> will add a KVM caller that needs this information.  Add a new argument to
> zpci_refresh_trans to pass the address of a status byte and update
> existing call sites to provide it.
> 
> Signed-off-by: Matthew Rosato <mjrosato@xxxxxxxxxxxxx>
> ---
>  arch/s390/include/asm/pci_insn.h |  2 +-
>  arch/s390/pci/pci_dma.c          |  6 ++++--
>  arch/s390/pci/pci_insn.c         | 10 +++++-----
>  drivers/iommu/s390-iommu.c       |  4 +++-
>  4 files changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/s390/include/asm/pci_insn.h b/arch/s390/include/asm/pci_insn.h
> index 5331082fa516..32759c407b8f 100644
> --- a/arch/s390/include/asm/pci_insn.h
> +++ b/arch/s390/include/asm/pci_insn.h
> @@ -135,7 +135,7 @@ union zpci_sic_iib {
>  DECLARE_STATIC_KEY_FALSE(have_mio);
>  
>  u8 zpci_mod_fc(u64 req, struct zpci_fib *fib, u8 *status);
> -int zpci_refresh_trans(u64 fn, u64 addr, u64 range);
> +int zpci_refresh_trans(u64 fn, u64 addr, u64 range, u8 *status);
> 
---8<---
>  
>  	return (cc) ? -EIO : 0;
> diff --git a/drivers/iommu/s390-iommu.c b/drivers/iommu/s390-iommu.c
> index 50860ebdd087..845bb99c183e 100644
> --- a/drivers/iommu/s390-iommu.c
> +++ b/drivers/iommu/s390-iommu.c
> @@ -214,6 +214,7 @@ static int s390_iommu_update_trans(struct s390_domain *s390_domain,
>  	unsigned long irq_flags, nr_pages, i;
>  	unsigned long *entry;
>  	int rc = 0;
> +	u8 status;
>  
>  	if (dma_addr < s390_domain->domain.geometry.aperture_start ||
>  	    dma_addr + size > s390_domain->domain.geometry.aperture_end)
> @@ -238,7 +239,8 @@ static int s390_iommu_update_trans(struct s390_domain *s390_domain,
>  	spin_lock(&s390_domain->list_lock);
>  	list_for_each_entry(domain_device, &s390_domain->devices, list) {
>  		rc = zpci_refresh_trans((u64) domain_device->zdev->fh << 32,
> -					start_dma_addr, nr_pages * PAGE_SIZE);
> +					start_dma_addr, nr_pages * PAGE_SIZE,
> +					&status);
>  		if (rc)
>  			break;
>  	}

Looks good.

Reviewed-by: Niklas Schnelle <schnelle@xxxxxxxxxxxxx>




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux