pci-v5.9-fixes-1
-----BEGIN PGP SIGNATURE----- iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAl8+4XcUHGJoZWxnYWFz QGdvb2dsZS5jb20ACgkQWYigwDrT+vwpNA/6Aqb4Q4g6zZhjdRS8GOewMqn37VOd SATT6nmmVoCndx1kG9W/Ggl+p4Ia3fn3qbt9qNZvuivOw9AAgMX6RkgdfN3TnnB/ Bzj1D06sy8/9dg011nvlR+EA/rReiY7V8VJoDcmn36lkaNPJxQwAyydcPs4pRKso 6q76XMRi3249jHzKxPRaBiHlSKZhmmYJUQ9eL2oHOGD3USAQhfZqkE1iCc3oGS1I Ow5+Ofzitoznr6XgTa/Iryzxh6xOKpGzcpse5E6IK5VMr1I//1iDwxqGyU+07rUd /9PwTaX1Achhj37dFh7Bd7ycxUqBiyQ4+3iQXxVltsXPQP2F14tmot+XghgD6kTl fkbZokzUvE0Cy1/OxwPFShxT0NdmyUxDUp9wFEjEiOHJ1zqk7hWz0bkJmJkBfxnZ wJjUU1rQtaawhjJ/PPpNznY0/BTD3YmNWkOHBEaK5ReP0CM8Y9iChfpA0uTwhvVB sAbYpu5yuJou3HV3+T2HiygMc+0CKTHnr/aouGnyqGn7+KYrwBFLS9VreD6/mVbj MChyaCNGr0+Wi8kir0/EyeaskKsFWta0ZvYIcMrFKKhpb4bGdPZ5rTllhLNcm9Uv 67Hp+BdILCOCnsh1zxF7VSwK9pH+xVbUwpDvdmhGl0eRhYRQJN6Fe69UyJtyIP7N e2PQdvszMa2RFmU= =F1zG -----END PGP SIGNATURE----- Merge tag 'pci-v5.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Fix P2PDMA build issue (Christoph Hellwig)" * tag 'pci-v5.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI/P2PDMA: Fix build without DMA ops
This commit is contained in:
Коммит
da2968ff87
|
@ -556,13 +556,14 @@ int pci_p2pdma_distance_many(struct pci_dev *provider, struct device **clients,
|
|||
return -1;
|
||||
|
||||
for (i = 0; i < num_clients; i++) {
|
||||
if (IS_ENABLED(CONFIG_DMA_VIRT_OPS) &&
|
||||
clients[i]->dma_ops == &dma_virt_ops) {
|
||||
#ifdef CONFIG_DMA_VIRT_OPS
|
||||
if (clients[i]->dma_ops == &dma_virt_ops) {
|
||||
if (verbose)
|
||||
dev_warn(clients[i],
|
||||
"cannot be used for peer-to-peer DMA because the driver makes use of dma_virt_ops\n");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
pci_client = find_parent_pci_dev(clients[i]);
|
||||
if (!pci_client) {
|
||||
|
@ -842,9 +843,10 @@ static int __pci_p2pdma_map_sg(struct pci_p2pdma_pagemap *p2p_pgmap,
|
|||
* this should never happen because it will be prevented
|
||||
* by the check in pci_p2pdma_distance_many()
|
||||
*/
|
||||
if (WARN_ON_ONCE(IS_ENABLED(CONFIG_DMA_VIRT_OPS) &&
|
||||
dev->dma_ops == &dma_virt_ops))
|
||||
#ifdef CONFIG_DMA_VIRT_OPS
|
||||
if (WARN_ON_ONCE(dev->dma_ops == &dma_virt_ops))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
for_each_sg(sg, s, nents, i) {
|
||||
paddr = sg_phys(s);
|
||||
|
|
Загрузка…
Ссылка в новой задаче