[asahilinux:nvme/dev 13/17] drivers/nvme/host/pci.c:2249:2-3: Unneeded semicolon

Christoph Hellwig hch at infradead.org
Mon Aug 9 07:29:16 PDT 2021


On Mon, Aug 09, 2021 at 12:02:55PM +0200, Arnd Bergmann wrote:
> Do you have any further suggestions? Should we just duplicate
> the driver and then simplify the platform version as much as possible
> as you suggested above, or try to share some of the code according
> to my original plan?

Yes, please duplicate it.  The tradeoff between absolute performance
requirements and various bits of broken consumer hardware already
is hard enough as-is that we don't need to support apples frankenchip
in the same codebase.

Note that I suspect you can probably drop a whole lot of the duplicate
code for the apple driver.  I doubt it supports things like CMB, HMB
T10 protection information, shadow doorbells, SGLs, etc.

Also given that it only supports a single I/O queue there is no need
to support read queues or poll queues or any kind of queue mapping.

Also can one of you look how PRPs are actually used by MacOS?  Given
that this device always seems to be behind a IOMMU creating one entry
per page seems rather weird given that the apple_nvmmu_tcb structure
already contains the full length.  Maybe it actually ignores all but
the first PRP?

So yes, duplicating the driver will probably look a little worse
from a pure LOC, but it will be much easier to maintain and to
understand.



More information about the Linux-nvme mailing list