From: Jani Nikula <jani.nikula@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>,
intel-xe@lists.freedesktop.org, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] drm/xe: Fix build with DRM_XE=y and CONFIGFS_FS=m
Date: Mon, 19 Oct 2026 19:53:31 +0300 [thread overview]
Message-ID: <4810b908f782874431348ea1509975a7a30f5148@intel.com> (raw)
In-Reply-To: <20261019152559.GE1329272@mdroper-desk1>
On Mon, 19 Oct 2026, Matt Roper <matthew.d.roper@intel.com> wrote:
> On Mon, Oct 19, 2026 at 06:21:29PM +0300, Jani Nikula wrote:
>> On Fri, 16 Oct 2026, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
>> > When xe is built-in but configfs is a module, xe_configfs.o is not
>> > linked into xe, while IS_ENABLED(CONFIG_CONFIGFS_FS) in xe_configfs.h
>> > still exposes the real declarations, leading to undefined references.
>> >
>> > Use IS_REACHABLE() so this case falls back to the stubs, the same as
>> > CONFIGFS_FS=n.
>>
>> I think using IS_REACHABLE() is almost always a mistake. It's a hack to
>> avoid link errors when something in a module needs something that is
>> built-in. It's a combo that should be handled at Kconfig level, not at
>> build level.
>
> But isn't this situation exactly the case that it's intended for? Xe
> doesn't "need" configfs, but will use it if it's present and usable. In
> cases where configfs is built as a module, then it will not be usable by
> any built-in driver (including Xe), and that's perfectly fine; we just
> treat that the same as the 'n' case.
Yeah, but there's zero discoverability for the user, or the developer
looking at a future bug report, with IS_REACHABLE().
The user enables two configs, the Kconfig doesn't enforce a relationship
between the two, but they still fail to work together. How is the user
supposed to know?
With the proxy kconfig option you at least get a hint at what's
required. And you could make it more comprehensible with e.g. something
like this:
config DRM_XE_CONFIGFS
def_bool y
depends on DRM_XE && CONFIGFS_FS
depends on CONFIGFS_FS=y || DRM_XE=m
Anyway, that's just my opinion. Obviously using IS_REACHABLE() is
"simpler" from Kconfig perspective, but I think explicit is better than
implicit.
BR,
Jani.
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-10-19 16:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 17:29 [PATCH] drm/xe: Fix build with DRM_XE=y and CONFIGFS_FS=m Rodrigo Vivi
2026-10-16 17:39 ` ✓ CI.KUnit: success for " Patchwork
2026-10-16 18:20 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-16 18:54 ` [PATCH] " Summers, Stuart
2026-10-16 19:18 ` Matt Roper
2026-10-16 19:32 ` Rodrigo Vivi
2026-10-19 15:21 ` Jani Nikula
2026-10-19 15:25 ` Matt Roper
2026-10-19 16:53 ` Jani Nikula [this message]
2026-10-19 17:06 ` Matt Roper
2026-10-19 21:58 ` Rodrigo Vivi
2026-10-19 22:55 ` Matt Roper
2026-10-16 19:44 ` ✓ CI.KUnit: success for drm/xe: Fix build with DRM_XE=y and CONFIGFS_FS=m (rev2) Patchwork
2026-10-16 20:25 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-17 2:10 ` ✓ Xe.CI.FULL: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2026-10-21 19:45 [PATCH] drm/xe: Fix build with DRM_XE=y and CONFIGFS_FS=m Rodrigo Vivi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4810b908f782874431348ea1509975a7a30f5148@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lkp@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox