Skip to contentSkip to conversation

amd_iommu fallback question

DISCUSSION Christoph Hellwig 2 participants 2 messages Apr 5, 2018 – Apr 6, 2018 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi Joerg,

I've got a little question on the amd_iommu code, hope you (or someone else on the list) can answer it. Most of the dma_map_ops methods have a fallback for the case when get_domain() return -EINVAL, which basically duplicates the normal no-iommu implementation, with the map_sg method being and exception that always returns and error (return value of 0 is an error for its calling convention). Is that an oversight? If yes so I wonder why it hasn't been caught yet. Or is the whole fallback code dead and can be removed?

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Hi Christoph,

Quoted 8 lines · Christoph Hellwig

I've got a little question on the amd_iommu code, hope you (or someone else on the list) can answer it. Most of the dma_map_ops methods have a fallback for the case when get_domain() return -EINVAL, which basically duplicates the normal no-iommu implementation, with the map_sg method being and exception that always returns and error (return value of 0 is an error for its calling convention). Is that an oversight? If yes so I wonder why it hasn't been caught yet. Or is the whole fallback code dead and can be removed?

Yeah, the fall-back code is basically dead since the amd driver uses per-device dma_ops. It was just an oversight that it is not removed yet.

Joerg