RE: [PATCH] RDMA: Fix software RDMA drivers for dma mapping error

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

 




> From: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxxxxxxxxxxxxx>
> Sent: Friday, October 30, 2020 5:50 PM
> 
> On 10/30/2020 8:17 AM, Jason Gunthorpe wrote:
> > On Fri, Oct 30, 2020 at 11:38:03AM +0200, Parav Pandit wrote:
> >> @@ -1140,7 +1141,10 @@ int rxe_register_device(struct rxe_dev *rxe,
> const char *ibdev_name)
> >>   			    rxe->ndev->dev_addr);
> >>   	dev->dev.dma_parms = &rxe->dma_parms;
> >>   	dma_set_max_seg_size(&dev->dev, UINT_MAX);
> >> -	dma_set_coherent_mask(&dev->dev,
> dma_get_required_mask(&dev->dev));
> >> +	dma_mask = IS_ENABLED(CONFIG_64BIT) ? DMA_BIT_MASK(64) :
> DMA_BIT_MASK(32);
> >> +	err = dma_coerce_mask_and_coherent(&dev->dev, dma_mask);
> >
> > Since this mask doesn't actually do anything, what is the reason to
> > have the 64/32?
> 
Christoph did say 64-bit good enough, but he mentioned that it is not correct on 32-bit platforms.
So it is only for theoretical correctness.

> Technically there isn't. We are already dependent on 64bit config anyway.
> Mike M just brought this up in a side bar conversation actually.
For rvt driver, I should drop the check and always set to 64-bit.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux