From: Nathan Chancellor <nathan@kernel.org>
To: Jose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@duagon.com>
Cc: andy@kernel.org, krzk@kernel.org, linus.walleij@linaro.org,
nsc@kernel.org, gregkh@linuxfoundation.org, bleung@chromium.org,
heikki.krogerus@linux.intel.com, abhishekpandit@chromium.org,
masahiroy@kernel.org, legion@kernel.org, hughd@google.com,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Jorge Sanjuan Garcia <dev-jorge.sanjuangarcia@duagon.com>
Subject: Re: [PATCH v3] mcb: Add missing modpost build support
Date: Tue, 2 Dec 2025 13:34:21 -0700 [thread overview]
Message-ID: <20251202203421.GB1959956@ax162> (raw)
In-Reply-To: <20251202084200.10410-1-dev-josejavier.rodriguez@duagon.com>
On Tue, Dec 02, 2025 at 09:42:00AM +0100, Jose Javier Rodriguez Barbarin wrote:
> mcb bus is not prepared to autoload client drivers with the data defined on
> the drivers' MODULE_DEVICE_TABLE. modpost cannot access to mcb_table_id
> inside MODULE_DEVICE_TABLE so the data declared inside is ignored.
>
> Add modpost build support for accessing to the mcb_table_id coded on device
> drivers' MODULE_DEVICE_TABLE.
>
> Fixes: 3764e82e5150 ("drivers: Introduce MEN Chameleon Bus")
> Reviewed-by: Jorge Sanjuan Garcia <dev-jorge.sanjuangarcia@duagon.com>
> Signed-off-by: Jose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@duagon.com>
> ---
Acked-by: Nathan Chancellor <nathan@kernel.org>
We should be able to get this to Linus by 6.19-rc1.
> scripts/mod/devicetable-offsets.c | 3 +++
> scripts/mod/file2alias.c | 9 +++++++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c
> index d3d00e85edf7..0470ba7c796d 100644
> --- a/scripts/mod/devicetable-offsets.c
> +++ b/scripts/mod/devicetable-offsets.c
> @@ -198,6 +198,9 @@ int main(void)
> DEVID(cpu_feature);
> DEVID_FIELD(cpu_feature, feature);
>
> + DEVID(mcb_device_id);
> + DEVID_FIELD(mcb_device_id, device);
> +
> DEVID(mei_cl_device_id);
> DEVID_FIELD(mei_cl_device_id, name);
> DEVID_FIELD(mei_cl_device_id, uuid);
> diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
> index b3333560b95e..4e99393a35f1 100644
> --- a/scripts/mod/file2alias.c
> +++ b/scripts/mod/file2alias.c
> @@ -1110,6 +1110,14 @@ static void do_cpu_entry(struct module *mod, void *symval)
> module_alias_printf(mod, false, "cpu:type:*:feature:*%04X*", feature);
> }
>
> +/* Looks like: mcb:16zN */
> +static void do_mcb_entry(struct module *mod, void *symval)
> +{
> + DEF_FIELD(symval, mcb_device_id, device);
> +
> + module_alias_printf(mod, false, "mcb:16z%03d", device);
> +}
> +
> /* Looks like: mei:S:uuid:N:* */
> static void do_mei_entry(struct module *mod, void *symval)
> {
> @@ -1444,6 +1452,7 @@ static const struct devtable devtable[] = {
> {"mipscdmm", SIZE_mips_cdmm_device_id, do_mips_cdmm_entry},
> {"x86cpu", SIZE_x86_cpu_id, do_x86cpu_entry},
> {"cpu", SIZE_cpu_feature, do_cpu_entry},
> + {"mcb", SIZE_mcb_device_id, do_mcb_entry},
> {"mei", SIZE_mei_cl_device_id, do_mei_entry},
> {"rapidio", SIZE_rio_device_id, do_rio_entry},
> {"ulpi", SIZE_ulpi_device_id, do_ulpi_entry},
> --
> 2.51.1
next prev parent reply other threads:[~2025-12-02 20:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 8:42 [PATCH v3] mcb: Add missing modpost build support Jose Javier Rodriguez Barbarin
2025-12-02 14:37 ` Andy Shevchenko
2025-12-02 20:34 ` Nathan Chancellor [this message]
2025-12-03 8:07 ` Greg KH
2025-12-03 20:27 ` Nathan Chancellor
2025-12-27 20:10 ` Nicolas Schier
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=20251202203421.GB1959956@ax162 \
--to=nathan@kernel.org \
--cc=abhishekpandit@chromium.org \
--cc=andy@kernel.org \
--cc=bleung@chromium.org \
--cc=dev-jorge.sanjuangarcia@duagon.com \
--cc=dev-josejavier.rodriguez@duagon.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=hughd@google.com \
--cc=krzk@kernel.org \
--cc=legion@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nsc@kernel.org \
/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