Re: [PATCH] soc: qcom: smem: Add stubs for CONFIG_QCOM_SMEM=n

Daniel Baluta <[email protected]>
Newsgroups dev.linux.lists.imx,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 8/11/26 16:53, Dmitry Baryshkov wrote:
> On Tue, Aug 11, 2026 at 03:31:03PM +0300, Daniel Baluta wrote:
>> drivers/soc/qcom/ubwc_config.c calls qcom_smem_is_available() and
>> qcom_smem_dram_get_hbb() unconditionally. These symbols are provided
>> by the QCOM_SMEM module, but QCOM_UBWC_CONFIG can be selected by
>> DRM_MSM even on non-Qcom platforms (e.g. with SOC_IMX5) thus resulting
>> in the following link error:
>>
>>   arm-linux-gnueabihf-ld: ubwc_config.c:(.text+0x2c): undefined
>>       reference to 'qcom_smem_is_available'
>>   arm-linux-gnueabihf-ld: ubwc_config.c:(.text+0x4c): undefined
>>       reference to 'qcom_smem_dram_get_hbb'
>>
>> Add static inline stub definitions for the !CONFIG_QCOM_SMEM case for
>> all `qcom_smem_` functions in order to fix the issue above.
>>
>> Fixes: 1b445022d1d0 ("soc: qcom: ubwc: Get HBB from SMEM")
>> Signed-off-by: Daniel Baluta <[email protected]>
>> ---
>>  include/linux/soc/qcom/smem.h | 51 +++++++++++++++++++++++++++++++++++
>>  1 file changed, 51 insertions(+)
> 
> I think a proper fix would be to relax drm/msm dependency on UBWC_CONFIG
> (limiting it to ARM64 && ARCH_QCOM) and letting UBWC_CONFIG have strict
> dependency on QCOM_SMEM. WDYT?
> 

Yes, that would work.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.