diff mbox series

parisc: remove 32-bit DMA enforcement from sba_iommu

Message ID 20190924150131.24404-1-svens@stackframe.org (mailing list archive)
State Accepted, archived
Headers show
Series parisc: remove 32-bit DMA enforcement from sba_iommu | expand

Commit Message

Sven Schnelle Sept. 24, 2019, 3:01 p.m. UTC
This breaks booting from sata_sil24 with the recent DMA
change. According to James Bottomley this was in to improve
performance. Remove it for now to make DMA working again.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
---
 drivers/parisc/sba_iommu.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Sven Schnelle Sept. 26, 2019, 7:58 a.m. UTC | #1
Helge,

On Tue, Sep 24, 2019 at 05:01:31PM +0200, Sven Schnelle wrote:
> This breaks booting from sata_sil24 with the recent DMA
> change. According to James Bottomley this was in to improve
> performance. Remove it for now to make DMA working again.
> 
> Signed-off-by: Sven Schnelle <svens@stackframe.org>
> ---
>  drivers/parisc/sba_iommu.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
> index 296668caf7e5..6ac9500f2752 100644
> --- a/drivers/parisc/sba_iommu.c
> +++ b/drivers/parisc/sba_iommu.c
> @@ -678,14 +678,6 @@ static int sba_dma_supported( struct device *dev, u64 mask)
>  		return(0);
>  	}
>  
> -	/* Documentation/DMA-API-HOWTO.txt tells drivers to try 64-bit
> -	 * first, then fall back to 32-bit if that fails.
> -	 * We are just "encouraging" 32-bit DMA masks here since we can
> -	 * never allow IOMMU bypass unless we add special support for ZX1.
> -	 */
> -	if (mask > ~0U)
> -		return 0;
> -
>  	ioc = GET_IOC(dev);
>  	if (!ioc)
>  		return 0;
> -- 
> 2.23.0.rc1
> 

please drop that patch for now. With 64-bit DMA my C8000 crashes with HPMCs
likely caused by invalid DMA transfers. So i have to read up a bit on the DMA
capabilites, and what "since we can never allow IOMMU bypass unless we add
special support for ZX1" means.

The other option is to prepare a patch that limits the DMA mask with the
API Christoph mentioned, but i would first like to understand the
capabilities of the chipset.

Regards
Sven
diff mbox series

Patch

diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index 296668caf7e5..6ac9500f2752 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -678,14 +678,6 @@  static int sba_dma_supported( struct device *dev, u64 mask)
 		return(0);
 	}
 
-	/* Documentation/DMA-API-HOWTO.txt tells drivers to try 64-bit
-	 * first, then fall back to 32-bit if that fails.
-	 * We are just "encouraging" 32-bit DMA masks here since we can
-	 * never allow IOMMU bypass unless we add special support for ZX1.
-	 */
-	if (mask > ~0U)
-		return 0;
-
 	ioc = GET_IOC(dev);
 	if (!ioc)
 		return 0;