linux-next: build failure after merge of the dma-mapping tree

Stephen Rothwell posted 1 patch 1 year, 5 months ago
kernel/dma/swiotlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
linux-next: build failure after merge of the dma-mapping tree
Posted by Stephen Rothwell 1 year, 5 months ago
Hi all,

After merging the dma-mapping tree, today's linux-next build (x86_64
allmodconfig) failed like this:

kernel/dma/swiotlb.c: In function 'swiotlb_alloc':
kernel/dma/swiotlb.c:1770:17: error: too few arguments to function 'swiotlb_release_slots'
 1770 |                 swiotlb_release_slots(dev, tlb_addr);
      |                 ^~~~~~~~~~~~~~~~~~~~~
kernel/dma/swiotlb.c:1443:13: note: declared here
 1443 | static void swiotlb_release_slots(struct device *dev, phys_addr_t tlb_addr,
      |             ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

  b21a42af002d ("swiotlb: reduce swiotlb pool lookups")

I applied the following patch (which may or may not be correct):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 10 Jul 2024 10:39:48 +1000
Subject: [PATCH] fixup for "swiotlb: reduce swiotlb pool lookups"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 kernel/dma/swiotlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index 618602fd10df..b4d8167b2f8d 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -1767,7 +1767,7 @@ struct page *swiotlb_alloc(struct device *dev, size_t size)
 	if (unlikely(!PAGE_ALIGNED(tlb_addr))) {
 		dev_WARN_ONCE(dev, 1, "Cannot allocate pages from non page-aligned swiotlb addr 0x%pa.\n",
 			      &tlb_addr);
-		swiotlb_release_slots(dev, tlb_addr);
+		swiotlb_release_slots(dev, tlb_addr, pool);
 		return NULL;
 	}
 
-- 
2.43.0

-- 
Cheers,
Stephen Rothwell
Re: linux-next: build failure after merge of the dma-mapping tree
Posted by Christoph Hellwig 1 year, 5 months ago
On Wed, Jul 10, 2024 at 11:05:45AM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the dma-mapping tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> kernel/dma/swiotlb.c: In function 'swiotlb_alloc':
> kernel/dma/swiotlb.c:1770:17: error: too few arguments to function 'swiotlb_release_slots'

Thanks for the notice and your patch which looks correct.  I'll fold
it in.