From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793010371; b=bOoJyDOtyiRoAp/LzpxCxt/xf9DMjYpgDymNjw/9ZM6PzvlGHfiKmcWYSQzUvlhk7ajY saET8Xup4Na5A81/Ubh5gLX9uMhe4UKHuj97lGPD0uwm3HKG/XXNc/pHbkCbERyrOM5FE Dxx3A5mj/vmCfQsxr/ARjVAlXhV1LX8iHohJpKcSR7/6I/1qZ2OA5/LKSONE8b3sRDY06 H0fbGOTfzlVKKEkBmtv35kZSz9GLOoiAyx5Wqk6QFdK1JHdL/kG1qasfeSg5Ft7F9aLOi DLp4mKTCTjURQLlGPNwHFEzm5qwtzhL1pd10PzvORSBO3vhFdVqZK3wjAd+XW/3qw4A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793010371; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding; bh=Y6oRwARljAebElUKFvK8H3t3ANwhHxuF/Ppq0WMLrq8=; b=GMrYsWVX8CjTqnsTfN/FEMgy402/nx71oIXOj64NRZ/rQdfUh/NcWpjEIG6dXiShHDnO l0tULlnr4HYsAkUUleYcAcKMhlFyG7cU3JyHNdsif3IGc0WfQCdgb8MkdmW7dKynF6E04 X4UrIxAJmMsevBucYOCSOvLs/owILCTaMjf71HXuvB8mHlFP5lYo8MJoYLGTcQerjeqdG Q6HvbBxJY3PyN0hO7x+FMfTOsyljj7iJMMnf1pk9JwdqJ5AHqMgT/4giLV+upHnBv9SJx qMS0SUuOof6PVOcACIaJr4zP5U4rhj2KdPZqCOl9VqfJlslxN6mvnou2LwLMdLn+CgQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TCrIU93w; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B879F606A31A for ; Mon, 26 Oct 2026 10:26:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TCrIU93w Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CF781F01828; Mon, 26 Oct 2026 10:26:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793010370; bh=Y6oRwARljAebElUKFvK8H3t3ANwhHxuF/Ppq0WMLrq8=; h=From:To:Cc:Subject:Date; b=TCrIU93w9IHx64zbHME5wnCOja5h5+idy8mXAZzOIJn62yXZ5CiDq4JKjUxL9oeoV svklRgsVSTOk6cwdO3SCpHUUUsyLy6XbUXAq1e3GXOgrzpQbyUi6/nryC0XHKSYPDT xuFeQYaHtFksLzQicEe6FVWCOV7zDcaJ8MYpq/m3Wdhp4JxW6d0VkpgWQLqX6gbkYJ Vqs4kGvZVOYuSIp42uXgSEf8j71pmmpU3kkFmaSaihvBYQnBnokduJTty788sN3ueU FYXlFevbdSUl0FlGtHdOpuXtBUK/3KTK7ZQQFFf0n64JGXQ+bc8i77vfqZLM6KqS3O AKfe8307sq18w== From: Arnd Bergmann To: Matthew Brost , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , 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 , =?UTF-8?q?Piotr=20Pi=C3=B3rkowski?= , Tejas Upadhyay , intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm: xe: select configfs Date: Mon, 26 Oct 2026 11:25:50 +0100 Message-ID: <20261026102603.2045493-1-arnd@kernel.org> X-Mailer: git-send-email 2.53.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann 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 --- 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