Thread (11 messages) read the whole thread 11 messages, 3 authors, 2017-03-07

Re: [PATCH 1/4] net: thunderx: Fix IOMMU translation faults

From: David Miller <davem@davemloft.net>
Date: 2017-03-03 17:56:56
Also in: linux-arm-kernel, lkml

From: sunil.kovvuri@gmail.com
Date: Fri,  3 Mar 2017 16:17:47 +0530
quoted hunk ↗ jump to hunk
@@ -1643,6 +1650,9 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (!pass1_silicon(nic->pdev))
 		nic->hw_tso = true;
 
+	/* Check if we are attached to IOMMU */
+	nic->iommu_domain = iommu_get_domain_for_dev(dev);
This function is not universally available.

This looks very hackish to me anyways, how all of this stuff is supposed
to work is that you simply use the DMA interfaces unconditionally and
whatever is behind the operations takes care of everything.

Doing it conditionally in the driver with all of this special IOMMU
domain et al. knowledge makes no sense to me at all.

I don't see other drivers doing stuff like this at all, so if you're
going to handle this in a unique way like this you better write
several paragraphs in your commit message explaining why this weird
crap is necessary.

There is no way I can apply this series as it is current written.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help