lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKXTTqoIBAMWbeCI@pluto>
Date: Wed, 20 Aug 2025 14:53:18 +0100
From: Cristian Marussi <cristian.marussi@....com>
To: Peng Fan <peng.fan@....com>
Cc: Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>, Arnd Bergmann <arnd@...db.de>,
	Sudeep Holla <sudeep.holla@....com>,
	Cristian Marussi <cristian.marussi@....com>, imx@...ts.linux.dev,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] firmware: imx: Add stub functions for SCMI CPU API

On Thu, Aug 07, 2025 at 09:47:44AM +0800, Peng Fan wrote:
> To ensure successful builds when CONFIG_IMX_SCMI_CPU_DRV is not enabled,
> this patch adds static inline stub implementations for the following
> functions:
> 
>   - scmi_imx_cpu_start()
>   - scmi_imx_cpu_started()
>   - scmi_imx_cpu_reset_vector_set()
> 
> These stubs return -EOPNOTSUPP to indicate that the functionality is not
> supported in the current configuration. This avoids potential build or
> link errors in code that conditionally calls these functions based on
> feature availability.
> 
> Fixes: 1055faa5d660 ("firmware: imx: Add i.MX95 SCMI CPU driver")
> Signed-off-by: Peng Fan <peng.fan@....com>
> ---
>  include/linux/firmware/imx/sm.h | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/include/linux/firmware/imx/sm.h b/include/linux/firmware/imx/sm.h
> index f2a72177bb37c1d46145a60710e3809641e0f5a2..a33b45027356751f4b8ad9b9136f0dd302a82520 100644
> --- a/include/linux/firmware/imx/sm.h
> +++ b/include/linux/firmware/imx/sm.h
> @@ -41,10 +41,28 @@ static inline int scmi_imx_misc_ctrl_set(u32 id, u32 val)
>  }
>  #endif
>  
> +#if IS_ENABLED(CONFIG_IMX_SCMI_CPU_DRV)
>  int scmi_imx_cpu_start(u32 cpuid, bool start);
>  int scmi_imx_cpu_started(u32 cpuid, bool *started);
>  int scmi_imx_cpu_reset_vector_set(u32 cpuid, u64 vector, bool start, bool boot,
>  				  bool resume);
> +#else
> +static inline int scmi_imx_cpu_start(u32 cpuid, bool start)
> +{
> +	return -EOPNOTSUPP;
> +}
> +
> +static inline int scmi_imx_cpu_started(u32 cpuid, bool *started)
> +{
> +	return -EOPNOTSUPP;
> +}
> +
> +static inline int scmi_imx_cpu_reset_vector_set(u32 cpuid, u64 vector, bool start,
> +						bool boot, bool resume)
> +{
> +	return -EOPNOTSUPP;
> +}
> +#endif

LGTM.

Reviewed-by: Cristian Marussi <cristian.marussi@....com>

Thanks,
Cristian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ