linux-next: build failure after merge of the hmm tree
Subsystems (3)
Hi all,
After merging the hmm tree, today's linux-next build (x86_64 allmodconfig) failed like this:
drivers/gpu/drm/i915/gem/i915_gem_ttm.c: In function 'i915_ttm_tt_get_st':drivers/gpu/drm/i915/gem/i915_gem_ttm.c:396:7: error: implicit declaration of function '__sg_alloc_table_from_pages'; did you mean 'sg_alloc_table_from_pages'? [-Werror=implicit-function-declaration]
396 | sg = __sg_alloc_table_from_pages
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| sg_alloc_table_from_pages
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:396:5: warning: assignment to 'struct scatterlist *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
396 | sg = __sg_alloc_table_from_pages
| ^Caused by commit
fcbfe956561b ("lib/scatterlist: Provide a dedicated function to support table append")
interacting with commit
213d50927763 ("drm/i915/ttm: Introduce a TTM i915 gem object backend")
from the drm tree.
I have applied the following merge resolution patch.
From: Stephen Rothwell <[email protected]>
Date: Mon, 23 Aug 2021 17:46:27 +1000
Subject: [PATCH] drm/i915/ttm: fix up for "lib/scatterlist: Provide a
dedicated function to support tableappend"
--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +4 -5
@@ -382,7 +382,6 @@ i915_ttm_region(struct ttm_device *bdev, int ttm_mem_type)static struct sg_table *i915_ttm_tt_get_st (struct ttm_tt *ttm) {struct i915_ttm_tt *i915_tt =container_of (ttm,typeof (*i915_tt), ttm); -struct scatterlist *sg;struct sg_table *st;int ret;
@@ -393,13 +392,13 @@ static struct sg_table *i915_ttm_tt_get_st(struct ttm_tt *ttm)if (!st)return ERR_PTR (-ENOMEM ); - sg =__sg_alloc_table_from_pages + ret =sg_alloc_table_from_pages_segment (st, ttm->pages, ttm->num_pages,0 , (unsigned long )ttm->num_pages <<PAGE_SHIFT , -i915_sg_segment_size (),NULL ,0 ,GFP_KERNEL ); -if (IS_ERR (sg)) { +i915_sg_segment_size (),GFP_KERNEL ); +if (ret) {kfree (st); -return ERR_CAST (sg); +return ERR_PTR (ret); } ret =dma_map_sgtable (i915_tt->dev, st,DMA_BIDIRECTIONAL ,0 );
Signature · 5 lines
2.32.0 -- Cheers, Stephen Rothwell
Quoted 26 lines · Stephen Rothwell
From: Stephen Rothwell <[email protected]>
Date: Mon, 23 Aug 2021 17:46:27 +1000
Subject: [PATCH] drm/i915/ttm: fix up for "lib/scatterlist: Provide a
dedicated function to support tableappend"Signed-off-by Stephen Rothwell <[email protected]>drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_ttm.c +2
-2+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c@@ -382,7 +382,6 @@ i915_ttm_region(struct ttm_device *bdev, int ttm_mem_type)static struct sg_table *i915_ttm_tt_get_st (struct ttm_tt *ttm) {struct i915_ttm_tt *i915_tt =container_of (ttm,typeof (*i915_tt), ttm); -struct scatterlist *sg;struct sg_table *st;int ret;@@ -393,13 +392,13 @@ static struct sg_table *i915_ttm_tt_get_st(struct ttm_tt *ttm)if (!st)return ERR_PTR (-ENOMEM ); - sg = __sg_alloc_table_from_pages + ret = sg_alloc_table_from_pages_segment
drivers/gpu/drm/i915/gem/i915_gem_ttm.c static struct sg_table *i915_ttm_tt_get_st(struct ttm_tt *ttm) · line 402
Quoted 10 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +3
-3(st, ttm->pages, ttm->num_pages,0 , (unsigned long )ttm->num_pages <<PAGE_SHIFT , -i915_sg_segment_size (),NULL ,0 ,GFP_KERNEL ); -if (IS_ERR (sg)) { +i915_sg_segment_size (),GFP_KERNEL ); +if (ret) {kfree (st); -return ERR_CAST (sg); +return ERR_PTR (ret); }
Looks right, thanks
Jason
Hi ,
Quoted 57 lines · On Mon, 23 Aug 2021 17:50:27 +1000 Stephen Rothwell <[email protected]>…
Hi all,
After merging the hmm tree, today's linux-next build (
x86_64allmodconfig) failed like this:
drivers/gpu/drm/i915/gem/i915_gem_ttm.c: In function 'i915_ttm_tt_get_st':drivers/gpu/drm/i915/gem/i915_gem_ttm.c:396:7: error: implicit declaration of function '__sg_alloc_table_from_pages'; did you mean 'sg_alloc_table_from_pages'? [-Werror=implicit-function-declaration]396 | sg = __sg_alloc_table_from_pages | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | sg_alloc_table_from_pages drivers/gpu/drm/i915/gem/i915_gem_ttm.c:396:5: warning: assignment to 'struct scatterlist *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 396 | sg = __sg_alloc_table_from_pages | ^Caused by commit
fcbfe956561b("lib/scatterlist: Provide a dedicated function to support table append")interacting with commit
213d50927763("drm/i915/ttm: Introduce a TTM i915 gem object backend")from the drm tree.
I have applied the following merge resolution patch.
From: Stephen Rothwell <[email protected]>
Date: Mon, 23 Aug 2021 17:46:27 +1000
Subject: [PATCH] drm/i915/ttm: fix up for "lib/scatterlist: Provide a
dedicated function to support tableappend"Signed-off-by Stephen Rothwell <[email protected]>--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_ttm.c +1
-2@@ -382,7 +382,6 @@ i915_ttm_region(struct ttm_device *bdev, int ttm_mem_type)static struct sg_table *i915_ttm_tt_get_st (struct ttm_tt *ttm) {struct i915_ttm_tt *i915_tt =container_of (ttm,typeof (*i915_tt), ttm); -struct scatterlist *sg;struct sg_table *st;int ret;@@ -393,13 +392,13 @@ static struct sg_table *i915_ttm_tt_get_st(struct ttm_tt *ttm)if (!st)return ERR_PTR (-ENOMEM ); - sg = __sg_alloc_table_from_pages + ret = sg_alloc_table_from_pages_segment (st, ttm->pages, ttm->num_pages, 0, (unsigned long)ttm->num_pages << PAGE_SHIFT,
drivers/gpu/drm/i915/gem/i915_gem_ttm.c static struct sg_table *i915_ttm_tt_get_st(struct ttm_tt *ttm) · line 404
Quoted 10 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +3
-3- i915_sg_segment_size(), NULL, 0, GFP_KERNEL); -if (IS_ERR (sg)) { + i915_sg_segment_size(), GFP_KERNEL); +if (ret) {kfree (st); -return ERR_CAST (sg); +return ERR_PTR (ret); } ret =dma_map_sgtable (i915_tt->dev, st,DMA_BIDIRECTIONAL ,0 );
I am now applying this merge fix patch to the merge of the rdma tree (since that has merged the hmm tree and the drm tree has been merged upstream).
Signature · 2 lines
Cheers, Stephen Rothwell