[PATCH v2 0/2] firmware: arm_scmi: Ensure automatic module loading

Hans de Goede johannes.goede at oss.qualcomm.com
Thu Jun 18 13:31:12 PDT 2026


Hi,

On 18-Jun-26 17:56, Bjorn Andersson wrote:
> SCMI drivers such as the Arm SCMI CPUfreq driver are allowed to built as
> modules, but they are then not automatically loaded. Rework the SCMI
> device table alias support to make modpost consume the information from
> MODULE_DEVICE_TABLE(scmi, ...) and allow drivers to be loaded based on
> this information, if known. Also add a protocol-based alias to also
> trigger driver loading when only the SCMI protocol id is known.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson at oss.qualcomm.com>

So I just gave this a test spin and unfortunately it does not work.

The problem with Fedora's kernel-config / setup is that the
request_module() from patch 2/2 runs from the initramfs, but
the scmi_cpufreq module is only available in the rootfs.

It does work if I explictly add the scmi_cpufreq module to
the initramfs, then it does get autoloaded.

We really need some place to put a uevent sysfs attr which then
gets replayed when udev is restarted from the rootfs and then
re-reads all the uevent files as part of its coldplug
enumeration.

I wonder if it is ok for a single uevent file to have
multiple MODALIAS= lines in there.

Regards,

Hans



> ---
> Changes in v2:
> - Use request_module_nowait()
> - Drop #include <linux/mod_devicetable.h> from scmi_protocol.h
> - Link to v1: https://patch.msgid.link/20260616-scmi-modalias-v1-0-662b8dd52ab2@oss.qualcomm.com
> 
> To: Sudeep Holla <sudeep.holla at kernel.org>
> To: Cristian Marussi <cristian.marussi at arm.com>
> To: Michael Turquette <mturquette at baylibre.com>
> To: Nicolas Schier <nsc at kernel.org>
> Cc: Stephen Boyd <sboyd at kernel.org>
> Cc: Brian Masney <bmasney at redhat.com>
> Cc: "Rafael J. Wysocki" <rafael at kernel.org>
> Cc: Viresh Kumar <viresh.kumar at linaro.org>
> Cc: Frank Li <Frank.Li at nxp.com>
> Cc: Sascha Hauer <s.hauer at pengutronix.de>
> Cc: Pengutronix Kernel Team <kernel at pengutronix.de>
> Cc: Fabio Estevam <festevam at gmail.com>
> Cc: Guenter Roeck <linux at roeck-us.net>
> Cc: Jyoti Bhayana <jbhayana at google.com>
> Cc: Jonathan Cameron <jic23 at kernel.org>
> Cc: David Lechner <dlechner at baylibre.com>
> Cc: Nuno Sá <nuno.sa at analog.com>
> Cc: Andy Shevchenko <andy at kernel.org>
> Cc: Dmitry Torokhov <dmitry.torokhov at gmail.com>
> Cc: Ulf Hansson <ulfh at kernel.org>
> Cc: Liam Girdwood <lgirdwood at gmail.com>
> Cc: Mark Brown <broonie at kernel.org>
> Cc: Philipp Zabel <p.zabel at pengutronix.de>
> Cc: Alexandre Belloni <alexandre.belloni at bootlin.com>
> Cc: Nathan Chancellor <nathan at kernel.org>
> Cc: arm-scmi at vger.kernel.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-clk at vger.kernel.org
> Cc: linux-kernel at vger.kernel.org
> Cc: linux-pm at vger.kernel.org
> Cc: imx at lists.linux.dev
> Cc: linux-hwmon at vger.kernel.org
> Cc: linux-iio at vger.kernel.org
> Cc: linux-input at vger.kernel.org
> Cc: linux-rtc at vger.kernel.org
> Cc: linux-kbuild at vger.kernel.org
> 
> ---
> Bjorn Andersson (2):
>       module: add SCMI device table alias support
>       firmware: arm_scmi: request modules for discovered protocols
> 
>  drivers/clk/clk-scmi.c                         |  1 +
>  drivers/cpufreq/scmi-cpufreq.c                 |  1 +
>  drivers/firmware/arm_scmi/bus.c                | 20 ++++++++++----------
>  drivers/firmware/arm_scmi/driver.c             |  3 +++
>  drivers/firmware/arm_scmi/scmi_power_control.c |  1 +
>  drivers/firmware/imx/sm-cpu.c                  |  1 +
>  drivers/firmware/imx/sm-lmm.c                  |  1 +
>  drivers/firmware/imx/sm-misc.c                 |  1 +
>  drivers/hwmon/scmi-hwmon.c                     |  1 +
>  drivers/iio/common/scmi_sensors/scmi_iio.c     |  1 +
>  drivers/input/keyboard/imx-sm-bbm-key.c        |  1 +
>  drivers/pmdomain/arm/scmi_perf_domain.c        |  1 +
>  drivers/pmdomain/arm/scmi_pm_domain.c          |  1 +
>  drivers/powercap/arm_scmi_powercap.c           |  1 +
>  drivers/regulator/scmi-regulator.c             |  1 +
>  drivers/reset/reset-scmi.c                     |  1 +
>  drivers/rtc/rtc-imx-sm-bbm.c                   |  1 +
>  include/linux/mod_devicetable.h                | 12 ++++++++++++
>  include/linux/scmi_protocol.h                  |  5 +----
>  scripts/mod/devicetable-offsets.c              |  4 ++++
>  scripts/mod/file2alias.c                       | 13 +++++++++++++
>  21 files changed, 58 insertions(+), 14 deletions(-)
> ---
> base-commit: 8d6dbbbe3ba62de0a63e962ee004afb848c8e3ac
> change-id: 20260616-scmi-modalias-0f32421bd452
> 
> Best regards,
> --  
> Bjorn Andersson <bjorn.andersson at oss.qualcomm.com>
> 
> 




More information about the linux-arm-kernel mailing list