Linux kbuild/kconfig development
 help / color / mirror / Atom feed
* [PATCH v3] mcb: Add missing modpost build support
@ 2025-12-02  8:42 Jose Javier Rodriguez Barbarin
  2025-12-02 14:37 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jose Javier Rodriguez Barbarin @ 2025-12-02  8:42 UTC (permalink / raw)
  To: andy, krzk, linus.walleij, nathan, nsc, gregkh, bleung,
	heikki.krogerus, abhishekpandit, masahiroy, legion, hughd
  Cc: linux-kbuild, linux-kernel, Jose Javier Rodriguez Barbarin,
	Jorge Sanjuan Garcia

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>
---
 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] mcb: Add missing modpost build support
  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
  2025-12-27 20:10 ` Nicolas Schier
  2 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2025-12-02 14:37 UTC (permalink / raw)
  To: Jose Javier Rodriguez Barbarin
  Cc: andy, krzk, linus.walleij, nathan, nsc, gregkh, bleung,
	heikki.krogerus, abhishekpandit, masahiroy, legion, hughd,
	linux-kbuild, linux-kernel, Jorge Sanjuan Garcia

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.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] mcb: Add missing modpost build support
  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
  2025-12-03  8:07   ` Greg KH
  2025-12-27 20:10 ` Nicolas Schier
  2 siblings, 1 reply; 6+ messages in thread
From: Nathan Chancellor @ 2025-12-02 20:34 UTC (permalink / raw)
  To: Jose Javier Rodriguez Barbarin
  Cc: andy, krzk, linus.walleij, nsc, gregkh, bleung, heikki.krogerus,
	abhishekpandit, masahiroy, legion, hughd, linux-kbuild,
	linux-kernel, Jorge Sanjuan Garcia

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] mcb: Add missing modpost build support
  2025-12-02 20:34 ` Nathan Chancellor
@ 2025-12-03  8:07   ` Greg KH
  2025-12-03 20:27     ` Nathan Chancellor
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2025-12-03  8:07 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Jose Javier Rodriguez Barbarin, andy, krzk, linus.walleij, nsc,
	bleung, heikki.krogerus, abhishekpandit, masahiroy, legion, hughd,
	linux-kbuild, linux-kernel, Jorge Sanjuan Garcia

On Tue, Dec 02, 2025 at 01:34:21PM -0700, Nathan Chancellor wrote:
> 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.

Why?  What's the rush?  It should have been in -next already to get into
-rc1.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] mcb: Add missing modpost build support
  2025-12-03  8:07   ` Greg KH
@ 2025-12-03 20:27     ` Nathan Chancellor
  0 siblings, 0 replies; 6+ messages in thread
From: Nathan Chancellor @ 2025-12-03 20:27 UTC (permalink / raw)
  To: Greg KH
  Cc: Jose Javier Rodriguez Barbarin, andy, krzk, linus.walleij, nsc,
	bleung, heikki.krogerus, abhishekpandit, masahiroy, legion, hughd,
	linux-kbuild, linux-kernel, Jorge Sanjuan Garcia

On Wed, Dec 03, 2025 at 09:07:02AM +0100, Greg KH wrote:
> On Tue, Dec 02, 2025 at 01:34:21PM -0700, Nathan Chancellor wrote:
> > 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.
> 
> Why?  What's the rush?

I was going off of Andy's previous comments about getting this into a
6.19-rc release to allow Jose to send the follow up changes for removing
MODULE_ALIAS from the drivers that use mcb_device_id, which are spread
out across the tree.

  https://lore.kernel.org/CAHp75VfhM5GuYY1qUKgBhePDo4oe5k3K1ZDTPbYJNr5NtjVVfQ@mail.gmail.com/
  https://lore.kernel.org/aS3YUYtrEn39lUPl@smile.fi.intel.com/

That could be -rc2 or -rc3 obviously but -rc1 is objectively the most
compatible base for all maintainer trees.

> It should have been in -next already to get into -rc1.

This seems like a low risk change, maybe even a borderline fix (and it
would still be in -next before it went to Linus). I do not have to push
it that quickly though, I have no strong opinion on the priority of this
change. Another option would be a shared branch after -rc1 is out that
other trees could pull in so that those changes could go into 6.20 and
get proper -next soak time.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] mcb: Add missing modpost build support
  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
@ 2025-12-27 20:10 ` Nicolas Schier
  2 siblings, 0 replies; 6+ messages in thread
From: Nicolas Schier @ 2025-12-27 20:10 UTC (permalink / raw)
  To: andy, krzk, linus.walleij, nathan, gregkh, bleung,
	heikki.krogerus, abhishekpandit, masahiroy, legion, hughd,
	Jose Javier Rodriguez Barbarin
  Cc: Nicolas Schier, linux-kbuild, linux-kernel, Jorge Sanjuan Garcia


On Tue, 02 Dec 2025 09:42:00 +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.
> 
> [...]

Applied to kbuild-fixes, thanks!

[1/1] mcb: Add missing modpost build support
      commit: 1f4ea4838b13c3b2278436a8dcb148e3c23f4b64
      https://git.kernel.org/kbuild/c/1f4ea4838b13

Best regards,
-- 
Nicolas


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-12-27 21:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-12-03  8:07   ` Greg KH
2025-12-03 20:27     ` Nathan Chancellor
2025-12-27 20:10 ` Nicolas Schier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox