* [PATCH] drm: xe: select configfs @ 2026-10-26 10:25 Arnd Bergmann 2026-11-11 19:01 ` Rodrigo Vivi 0 siblings, 1 reply; 4+ messages in thread From: Arnd Bergmann @ 2026-10-26 10:25 UTC (permalink / raw) To: Matthew Brost, Thomas Hellström, Rodrigo Vivi, David Airlie, Simona Vetter, Matt Roper, Lucas De Marchi, Riana Tauro Cc: Arnd Bergmann, Matthew Auld, Shuicheng Lin, Armin Wolf, Zhanjun Dong, Michal Wajdeczko, Piotr Piórkowski, Tejas Upadhyay, intel-xe, dri-devel, linux-kernel From: Arnd Bergmann <arnd@arndb.de> The original addition of configfs to xe missed a compile-time dependency, which leads to a link failure when configfs is enabled as a loadable module: ld.lld-21: error: undefined symbol: xe_configfs_get_survivability_mode >>> referenced by xe_survivability_mode.c:224 >>> drivers/gpu/drm/xe/xe_survivability_mode.o:(xe_survivability_mode_is_requested) in archive vmlinux.a A recent workaround added a 'IS_REACHABLE()' check around the calls into configfs, which makes it link in this configuration, but this is generally a bad idea because it makes the actual behavior inconsistent and confusing to users that expect configfs to work if both xe and configfs are enabled. Use 'select CONFIGFS_FS' instead, like every other configfs user does, and remove the unnecessary stub functions. There is little practical difference here as anyone using XE graphics is likely to have a complex configuration that already selects configfs anyway, and the link error or the IS_REACHABLE() would only manifest during randconfig testing. Fixes: 30499cbd7961 ("drm/xe: Fix build with DRM_XE=y and CONFIGFS_FS=m") Fixes: 16280ded45fb ("drm/xe: Add configfs to enable survivability mode") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/gpu/drm/xe/Kconfig | 1 + drivers/gpu/drm/xe/xe_configfs.h | 30 ------------------------------ 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index 4fc8abdc5cb6..b52a8dc28f97 100644 --- a/drivers/gpu/drm/xe/Kconfig +++ b/drivers/gpu/drm/xe/Kconfig @@ -11,6 +11,7 @@ config DRM_XE # the shmem_readpage() which depends upon tmpfs select SHMEM select TMPFS + select CONFIGFS_FS select DRM_BUDDY select DRM_CLIENT_SELECTION select DRM_KMS_HELPER diff --git a/drivers/gpu/drm/xe/xe_configfs.h b/drivers/gpu/drm/xe/xe_configfs.h index 327b648944ff..d726800de26a 100644 --- a/drivers/gpu/drm/xe/xe_configfs.h +++ b/drivers/gpu/drm/xe/xe_configfs.h @@ -14,7 +14,6 @@ struct pci_dev; -#if IS_REACHABLE(CONFIG_CONFIGFS_FS) int xe_configfs_init(void); void xe_configfs_exit(void); void xe_configfs_check_device(struct pci_dev *pdev); @@ -36,34 +35,5 @@ u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev, unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev); bool xe_configfs_admin_only_pf(struct pci_dev *pdev); #endif -#else -static inline int xe_configfs_init(void) { return 0; } -static inline void xe_configfs_exit(void) { } -static inline void xe_configfs_check_device(struct pci_dev *pdev) { } -static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; } -static inline bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev) { return true; } -static inline bool xe_configfs_media_gt_allowed(struct pci_dev *pdev) { return true; } -static inline u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev) { return U64_MAX; } -static inline bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev) { return false; } -static inline bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev) { return true; } -static inline u32 xe_configfs_get_migrate_ulls_period_ms(struct pci_dev *pdev) { return 5; } -static inline bool xe_configfs_get_disable_vram_page_offline(struct pci_dev *pdev) { return false; } -static inline u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev, - enum xe_engine_class class, - const u32 **cs) { return 0; } -static inline u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev, - enum xe_engine_class class, - const u32 **cs) { return 0; } -#ifdef CONFIG_PCI_IOV -static inline unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev) -{ - return xe_modparam.max_vfs; -} -static inline bool xe_configfs_admin_only_pf(struct pci_dev *pdev) -{ - return XE_DEFAULT_ADMIN_ONLY_PF; -} -#endif -#endif #endif -- 2.53.0 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: xe: select configfs 2026-10-26 10:25 [PATCH] drm: xe: select configfs Arnd Bergmann @ 2026-11-11 19:01 ` Rodrigo Vivi 2026-11-13 16:22 ` Matt Roper 0 siblings, 1 reply; 4+ messages in thread From: Rodrigo Vivi @ 2026-11-11 19:01 UTC (permalink / raw) To: Arnd Bergmann Cc: Matthew Brost, Thomas Hellström, David Airlie, Simona Vetter, Matt Roper, Lucas De Marchi, Riana Tauro, Arnd Bergmann, Matthew Auld, Shuicheng Lin, Armin Wolf, Zhanjun Dong, Michal Wajdeczko, Piotr Piórkowski, Tejas Upadhyay, intel-xe, dri-devel, linux-kernel On Mon, Oct 26, 2026 at 11:25:50AM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > The original addition of configfs to xe missed a compile-time dependency, > which leads to a link failure when configfs is enabled as a loadable module: > > ld.lld-21: error: undefined symbol: xe_configfs_get_survivability_mode > >>> referenced by xe_survivability_mode.c:224 > >>> drivers/gpu/drm/xe/xe_survivability_mode.o:(xe_survivability_mode_is_requested) in archive vmlinux.a > > A recent workaround added a 'IS_REACHABLE()' check around the calls into > configfs, which makes it link in this configuration, but this is generally > a bad idea because it makes the actual behavior inconsistent and confusing > to users that expect configfs to work if both xe and configfs are enabled. > > Use 'select CONFIGFS_FS' instead, like every other configfs user does, > and remove the unnecessary stub functions. There is little practical > difference here as anyone using XE graphics is likely to have a complex > configuration that already selects configfs anyway, and the link error > or the IS_REACHABLE() would only manifest during randconfig testing. > > Fixes: 30499cbd7961 ("drm/xe: Fix build with DRM_XE=y and CONFIGFS_FS=m") > Fixes: 16280ded45fb ("drm/xe: Add configfs to enable survivability mode") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/gpu/drm/xe/Kconfig | 1 + > drivers/gpu/drm/xe/xe_configfs.h | 30 ------------------------------ > 2 files changed, 1 insertion(+), 30 deletions(-) > > diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig > index 4fc8abdc5cb6..b52a8dc28f97 100644 > --- a/drivers/gpu/drm/xe/Kconfig > +++ b/drivers/gpu/drm/xe/Kconfig > @@ -11,6 +11,7 @@ config DRM_XE > # the shmem_readpage() which depends upon tmpfs > select SHMEM > select TMPFS > + select CONFIGFS_FS Perhaps another option would be what Jani had suggested: config DRM_XE_CONFIGFS def_bool y depends on DRM_XE && CONFIGFS_FS depends on CONFIGFS_FS=y || DRM_XE=m But anyway, we are depending more and more on the configfs for production choices. So, let's go with you select and close this for good. I'm pushing this to drm-xe-next. Thanks for the patch. > select DRM_BUDDY > select DRM_CLIENT_SELECTION > select DRM_KMS_HELPER > diff --git a/drivers/gpu/drm/xe/xe_configfs.h b/drivers/gpu/drm/xe/xe_configfs.h > index 327b648944ff..d726800de26a 100644 > --- a/drivers/gpu/drm/xe/xe_configfs.h > +++ b/drivers/gpu/drm/xe/xe_configfs.h > @@ -14,7 +14,6 @@ > > struct pci_dev; > > -#if IS_REACHABLE(CONFIG_CONFIGFS_FS) > int xe_configfs_init(void); > void xe_configfs_exit(void); > void xe_configfs_check_device(struct pci_dev *pdev); > @@ -36,34 +35,5 @@ u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev, > unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev); > bool xe_configfs_admin_only_pf(struct pci_dev *pdev); > #endif > -#else > -static inline int xe_configfs_init(void) { return 0; } > -static inline void xe_configfs_exit(void) { } > -static inline void xe_configfs_check_device(struct pci_dev *pdev) { } > -static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; } > -static inline bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev) { return true; } > -static inline bool xe_configfs_media_gt_allowed(struct pci_dev *pdev) { return true; } > -static inline u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev) { return U64_MAX; } > -static inline bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev) { return false; } > -static inline bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev) { return true; } > -static inline u32 xe_configfs_get_migrate_ulls_period_ms(struct pci_dev *pdev) { return 5; } > -static inline bool xe_configfs_get_disable_vram_page_offline(struct pci_dev *pdev) { return false; } > -static inline u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev, > - enum xe_engine_class class, > - const u32 **cs) { return 0; } > -static inline u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev, > - enum xe_engine_class class, > - const u32 **cs) { return 0; } > -#ifdef CONFIG_PCI_IOV > -static inline unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev) > -{ > - return xe_modparam.max_vfs; > -} > -static inline bool xe_configfs_admin_only_pf(struct pci_dev *pdev) > -{ > - return XE_DEFAULT_ADMIN_ONLY_PF; > -} > -#endif > -#endif > > #endif > -- > 2.53.0 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: xe: select configfs 2026-11-11 19:01 ` Rodrigo Vivi @ 2026-11-13 16:22 ` Matt Roper 2026-11-13 17:51 ` Raag Jadav 0 siblings, 1 reply; 4+ messages in thread From: Matt Roper @ 2026-11-13 16:22 UTC (permalink / raw) To: Rodrigo Vivi Cc: Arnd Bergmann, Matthew Brost, Thomas Hellström, David Airlie, Simona Vetter, Lucas De Marchi, Riana Tauro, Arnd Bergmann, Matthew Auld, Shuicheng Lin, Armin Wolf, Zhanjun Dong, Michal Wajdeczko, Piotr Piórkowski, Tejas Upadhyay, intel-xe, dri-devel, linux-kernel On Wed, Nov 11, 2026 at 02:01:45PM -0500, Rodrigo Vivi wrote: > On Mon, Oct 26, 2026 at 11:25:50AM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann <arnd@arndb.de> > > > > The original addition of configfs to xe missed a compile-time dependency, > > which leads to a link failure when configfs is enabled as a loadable module: > > > > ld.lld-21: error: undefined symbol: xe_configfs_get_survivability_mode > > >>> referenced by xe_survivability_mode.c:224 > > >>> drivers/gpu/drm/xe/xe_survivability_mode.o:(xe_survivability_mode_is_requested) in archive vmlinux.a > > > > A recent workaround added a 'IS_REACHABLE()' check around the calls into > > configfs, which makes it link in this configuration, but this is generally > > a bad idea because it makes the actual behavior inconsistent and confusing > > to users that expect configfs to work if both xe and configfs are enabled. > > > > Use 'select CONFIGFS_FS' instead, like every other configfs user does, > > and remove the unnecessary stub functions. There is little practical > > difference here as anyone using XE graphics is likely to have a complex > > configuration that already selects configfs anyway, and the link error > > or the IS_REACHABLE() would only manifest during randconfig testing. > > > > Fixes: 30499cbd7961 ("drm/xe: Fix build with DRM_XE=y and CONFIGFS_FS=m") > > Fixes: 16280ded45fb ("drm/xe: Add configfs to enable survivability mode") > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > --- > > drivers/gpu/drm/xe/Kconfig | 1 + > > drivers/gpu/drm/xe/xe_configfs.h | 30 ------------------------------ > > 2 files changed, 1 insertion(+), 30 deletions(-) > > > > diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig > > index 4fc8abdc5cb6..b52a8dc28f97 100644 > > --- a/drivers/gpu/drm/xe/Kconfig > > +++ b/drivers/gpu/drm/xe/Kconfig > > @@ -11,6 +11,7 @@ config DRM_XE > > # the shmem_readpage() which depends upon tmpfs > > select SHMEM > > select TMPFS > > + select CONFIGFS_FS > > Perhaps another option would be what Jani had suggested: > > config DRM_XE_CONFIGFS > def_bool y > depends on DRM_XE && CONFIGFS_FS > depends on CONFIGFS_FS=y || DRM_XE=m > > But anyway, we are depending more and more on the configfs for > production choices. So, let's go with you select and close this > for good. I really don't think this patch was the way we wanted to go. IS_REACHABLE was giving us exactly the behavior that we wanted, but now we're getting behavior that we did not want. Xe absolutely does not depend on configfs in any way. _If_ configfs is there we'll enable some config options in it, but none of those are mandatory for our driver as a whole. We're perfectly happy to build and run without configfs if it's not selected in the config. We're also happy to build and run without configfs functionality if the user wanted Xe built directly into the kernel, but configfs was built as an unreachable module solely for other non-Xe purposes. While this change won't matter to 99% of the cases where someone is running with a typical distro kernel, this is the kind of thing that makes embedded users unhappy since they're very carefully managing their configurations and we've taken away their ability to avoid configfs now. Also, as mentioned earlier in the threads, using 'select' on a user-visible config option rather than a hidden option often causes cascading problems down the road because it ignores any dependencies of the option being selected (configfs in this case). At the moment I don't think configfs has any dependencies of its own, but if it gets some down the road, this can cause problems. Matt > > I'm pushing this to drm-xe-next. > > Thanks for the patch. > > > > select DRM_BUDDY > > select DRM_CLIENT_SELECTION > > select DRM_KMS_HELPER > > diff --git a/drivers/gpu/drm/xe/xe_configfs.h b/drivers/gpu/drm/xe/xe_configfs.h > > index 327b648944ff..d726800de26a 100644 > > --- a/drivers/gpu/drm/xe/xe_configfs.h > > +++ b/drivers/gpu/drm/xe/xe_configfs.h > > @@ -14,7 +14,6 @@ > > > > struct pci_dev; > > > > -#if IS_REACHABLE(CONFIG_CONFIGFS_FS) > > int xe_configfs_init(void); > > void xe_configfs_exit(void); > > void xe_configfs_check_device(struct pci_dev *pdev); > > @@ -36,34 +35,5 @@ u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev, > > unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev); > > bool xe_configfs_admin_only_pf(struct pci_dev *pdev); > > #endif > > -#else > > -static inline int xe_configfs_init(void) { return 0; } > > -static inline void xe_configfs_exit(void) { } > > -static inline void xe_configfs_check_device(struct pci_dev *pdev) { } > > -static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; } > > -static inline bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev) { return true; } > > -static inline bool xe_configfs_media_gt_allowed(struct pci_dev *pdev) { return true; } > > -static inline u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev) { return U64_MAX; } > > -static inline bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev) { return false; } > > -static inline bool xe_configfs_get_enable_multi_queue(struct pci_dev *pdev) { return true; } > > -static inline u32 xe_configfs_get_migrate_ulls_period_ms(struct pci_dev *pdev) { return 5; } > > -static inline bool xe_configfs_get_disable_vram_page_offline(struct pci_dev *pdev) { return false; } > > -static inline u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev, > > - enum xe_engine_class class, > > - const u32 **cs) { return 0; } > > -static inline u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev, > > - enum xe_engine_class class, > > - const u32 **cs) { return 0; } > > -#ifdef CONFIG_PCI_IOV > > -static inline unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev) > > -{ > > - return xe_modparam.max_vfs; > > -} > > -static inline bool xe_configfs_admin_only_pf(struct pci_dev *pdev) > > -{ > > - return XE_DEFAULT_ADMIN_ONLY_PF; > > -} > > -#endif > > -#endif > > > > #endif > > -- > > 2.53.0 > > -- Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: xe: select configfs 2026-11-13 16:22 ` Matt Roper @ 2026-11-13 17:51 ` Raag Jadav 0 siblings, 0 replies; 4+ messages in thread From: Raag Jadav @ 2026-11-13 17:51 UTC (permalink / raw) To: Matt Roper Cc: Rodrigo Vivi, Arnd Bergmann, Matthew Brost, Thomas Hellström, David Airlie, Simona Vetter, Lucas De Marchi, Riana Tauro, Arnd Bergmann, Matthew Auld, Shuicheng Lin, Armin Wolf, Zhanjun Dong, Michal Wajdeczko, Piotr Piórkowski, Tejas Upadhyay, intel-xe, dri-devel, linux-kernel On Fri, Nov 13, 2026 at 08:22:12AM -0800, Matt Roper wrote: > On Wed, Nov 11, 2026 at 02:01:45PM -0500, Rodrigo Vivi wrote: > > On Mon, Oct 26, 2026 at 11:25:50AM +0100, Arnd Bergmann wrote: > > > From: Arnd Bergmann <arnd@arndb.de> > > > > > > The original addition of configfs to xe missed a compile-time dependency, > > > which leads to a link failure when configfs is enabled as a loadable module: > > > > > > ld.lld-21: error: undefined symbol: xe_configfs_get_survivability_mode > > > >>> referenced by xe_survivability_mode.c:224 > > > >>> drivers/gpu/drm/xe/xe_survivability_mode.o:(xe_survivability_mode_is_requested) in archive vmlinux.a > > > > > > A recent workaround added a 'IS_REACHABLE()' check around the calls into > > > configfs, which makes it link in this configuration, but this is generally > > > a bad idea because it makes the actual behavior inconsistent and confusing > > > to users that expect configfs to work if both xe and configfs are enabled. > > > > > > Use 'select CONFIGFS_FS' instead, like every other configfs user does, > > > and remove the unnecessary stub functions. There is little practical > > > difference here as anyone using XE graphics is likely to have a complex > > > configuration that already selects configfs anyway, and the link error > > > or the IS_REACHABLE() would only manifest during randconfig testing. > > > > > > Fixes: 30499cbd7961 ("drm/xe: Fix build with DRM_XE=y and CONFIGFS_FS=m") > > > Fixes: 16280ded45fb ("drm/xe: Add configfs to enable survivability mode") > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > > --- > > > drivers/gpu/drm/xe/Kconfig | 1 + > > > drivers/gpu/drm/xe/xe_configfs.h | 30 ------------------------------ > > > 2 files changed, 1 insertion(+), 30 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig > > > index 4fc8abdc5cb6..b52a8dc28f97 100644 > > > --- a/drivers/gpu/drm/xe/Kconfig > > > +++ b/drivers/gpu/drm/xe/Kconfig > > > @@ -11,6 +11,7 @@ config DRM_XE > > > # the shmem_readpage() which depends upon tmpfs > > > select SHMEM > > > select TMPFS > > > + select CONFIGFS_FS > > > > Perhaps another option would be what Jani had suggested: > > > > config DRM_XE_CONFIGFS > > def_bool y > > depends on DRM_XE && CONFIGFS_FS > > depends on CONFIGFS_FS=y || DRM_XE=m > > > > But anyway, we are depending more and more on the configfs for > > production choices. So, let's go with you select and close this > > for good. > > I really don't think this patch was the way we wanted to go. > IS_REACHABLE was giving us exactly the behavior that we wanted, but now > we're getting behavior that we did not want. Xe absolutely does not > depend on configfs in any way. _If_ configfs is there we'll enable some > config options in it, but none of those are mandatory for our driver as > a whole. We're perfectly happy to build and run without configfs if > it's not selected in the config. We're also happy to build and run > without configfs functionality if the user wanted Xe built directly into > the kernel, but configfs was built as an unreachable module solely for > other non-Xe purposes. > > While this change won't matter to 99% of the cases where someone is > running with a typical distro kernel, this is the kind of thing that > makes embedded users unhappy since they're very carefully managing their > configurations and we've taken away their ability to avoid configfs now. +1'ing on this. People go to great lengths to save a few bytes, only to be undone by a non-essential config. Raag ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-13 17:51 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-10-26 10:25 [PATCH] drm: xe: select configfs Arnd Bergmann 2026-11-11 19:01 ` Rodrigo Vivi 2026-11-13 16:22 ` Matt Roper 2026-11-13 17:51 ` Raag Jadav
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®