Re: [PATCH v4 17/18] nvmet: New NVMe PCI endpoint target driver

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

 



On Tue, Dec 17, 2024 at 10:11:49PM +0530, Manivannan Sadhasivam wrote:
> 'iomem' is just a token that is used by sparse tool to verify correctness of
> MMIO address handling.

That is true, but we don't have the token just for fun, but because iomem
needs to be treated differently.

> I know that the memory here is returned by
> dma_alloc_coherent() and is not exactly a MMIO. But since you are using
> READ_ONCE() and le32_to_cpu() on these addresses, I thought about suggesting
> readl/writel that does exactly the same internally. If you do not need ordering,
> then you can use relaxed variants as well.

No, using readl/writel on dma_alloc_coherent buffers is simply wrong.





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux