Hi all, After merging the drm-xe tree, today's linux-next build (x86_64 allmodconfig) failed like this: In file included from include/linux/kernel.h:22, from include/linux/cpumask.h:11, from arch/x86/include/asm/paravirt.h:21, from arch/x86/include/asm/irqflags.h:80, from include/linux/irqflags.h:18, from include/linux/spinlock.h:59, from include/linux/mmzone.h:8, from include/linux/gfp.h:7, from include/linux/mm.h:7, from include/linux/pagemap.h:8, from include/drm/ttm/ttm_tt.h:30, from drivers/gpu/drm/xe/xe_bo.h:9, from drivers/gpu/drm/xe/xe_svm.c:6: drivers/gpu/drm/xe/xe_svm.c: In function 'page_to_vr': drivers/gpu/drm/xe/xe_svm.c:344:33: error: 'struct page' has no member named 'pgmap' 344 | return container_of(page->pgmap, struct xe_vram_region, pagemap); | ^~ include/linux/container_of.h:19:33: note: in definition of macro 'container_of' 19 | void *__mptr = (void *)(ptr); \ | ^~~ In file included from include/linux/init.h:5, from include/linux/printk.h:6, from include/asm-generic/bug.h:22, from arch/x86/include/asm/bug.h:99, from include/linux/bug.h:5, from include/linux/mmdebug.h:5, from include/linux/mm.h:6: drivers/gpu/drm/xe/xe_svm.c:344:33: error: 'struct page' has no member named 'pgmap' 344 | return container_of(page->pgmap, struct xe_vram_region, pagemap); | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:20:23: note: in expansion of macro '__same_type' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~ drivers/gpu/drm/xe/xe_svm.c:344:16: note: in expansion of macro 'container_of' 344 | return container_of(page->pgmap, struct xe_vram_region, pagemap); | ^~~~~~~~~~~~ drivers/gpu/drm/xe/xe_svm.c:344:33: error: 'struct page' has no member named 'pgmap' 344 | return container_of(page->pgmap, struct xe_vram_region, pagemap); | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:21:23: note: in expansion of macro '__same_type' 21 | __same_type(*(ptr), void), \ | ^~~~~~~~~~~ drivers/gpu/drm/xe/xe_svm.c:344:16: note: in expansion of macro 'container_of' 344 | return container_of(page->pgmap, struct xe_vram_region, pagemap); | ^~~~~~~~~~~~ include/linux/compiler_types.h:483:27: error: expression in static assertion is not an integer 483 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:20:23: note: in expansion of macro '__same_type' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~ drivers/gpu/drm/xe/xe_svm.c:344:16: note: in expansion of macro 'container_of' 344 | return container_of(page->pgmap, struct xe_vram_region, pagemap); | ^~~~~~~~~~~~ Caused by commit 11bbe0d9aa96 ("drm/xe: Add drm_pagemap ops to SVM") interacting with commit 089b22f60a0f ("mm: allow compound zone device pages") from the mm-unstable branch of the mm tree. I have applied the following merge fix patch for today From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Date: Fri, 7 Mar 2025 13:14:37 +1100 Subject: [PATCH] fixup for "drm/xe: Add drm_pagemap ops to SVM" 089b22f60a0f ("mm: allow compound zone device pages") from the mm-unstable branch of the mm tree. Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> --- drivers/gpu/drm/xe/xe_svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index 516898e99b26..3e829c87d7b4 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -341,7 +341,7 @@ static void xe_svm_garbage_collector_work_func(struct work_struct *w) static struct xe_vram_region *page_to_vr(struct page *page) { - return container_of(page->pgmap, struct xe_vram_region, pagemap); + return container_of(page_pgmap(page), struct xe_vram_region, pagemap); } static struct xe_tile *vr_to_tile(struct xe_vram_region *vr) -- 2.45.2 -- Cheers, Stephen Rothwell
Attachment:
pgpPvnII2s6ur.pgp
Description: OpenPGP digital signature