[PATCH] nvme: Use pci_iomap instead of ioremap

Pankaj Raghav p.raghav at samsung.com
Thu Jan 27 07:56:28 PST 2022



On 2022-01-27 20:15, Christoph Hellwig wrote:
> On Thu, Jan 27, 2022 at 06:35:41PM +0530, Pankaj Raghav wrote:
>> On Wed, Jan 26, 2022 at 05:33:06PM +0100, Christoph Hellwig wrote:
>>> pci_iomap goes with the ioread/iowrite accessors which we absolutely
>>> do not want in nvme.
>> Is it because of ioread/iowrite has a conditional check everytime we do
>> a read/write with IO_COND? Or is there any other reason?
> 
> Yes, ioread* and iowrite* are more expensive.  And nvme doesn't support
> port I/O anyway so there is no point.

Ok. 

`ioremap` has a comment to prefer pci_iomap if the area we are trying 
to map is a PCI BAR. Does it makes sense then to have a comment in 
the nvme pci driver as to why ioremap is preferred over pci_iomap?

-- 
Regards,
Pankaj



More information about the Linux-nvme mailing list