Subject: linux-next: build failure after merge of the pmdomain tree

From: Stephen Rothwell <[email-masked]>
Date: Thu, 23 Oct 2025 10:30:20 +1100

Hi all,

After merging the pmdomain tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/pmdomain/mediatek/mtk-pm-domains.c: In function 'scpsys_sec_infra_power_on':
drivers/pmdomain/mediatek/mtk-pm-domains.c:128:30: error: storage size of 'res' isn't known
  128 |         struct arm_smccc_res res;
      |                              ^~~
drivers/pmdomain/mediatek/mtk-pm-domains.c:131:9: error: implicit declaration of function 'arm_smccc_smc' [-Wimplicit-function-declaration]
  131 |         arm_smccc_smc(MTK_SIP_KERNEL_HWCCF_CONTROL, cmd, 0, 0, 0, 0, 0, 0, &res);
      |         ^~~~~~~~~~~~~
In file included from drivers/pmdomain/mediatek/mtk-pm-domains.c:18:
include/linux/soc/mediatek/mtk_sip_svc.h:22:9: error: implicit declaration of function 'ARM_SMCCC_CALL_VAL' [-Wimplicit-function-declaration]
   22 |         ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, MTK_SIP_SMC_CONVENTION, \
      |         ^~~~~~~~~~~~~~~~~~
drivers/pmdomain/mediatek/mtk-pm-domains.c:56:41: note: in expansion of macro 'MTK_SIP_SMC_CMD'
   56 | #define MTK_SIP_KERNEL_HWCCF_CONTROL    MTK_SIP_SMC_CMD(0x540)
      |                                         ^~~~~~~~~~~~~~~
drivers/pmdomain/mediatek/mtk-pm-domains.c:131:23: note: in expansion of macro 'MTK_SIP_KERNEL_HWCCF_CONTROL'
  131 |         arm_smccc_smc(MTK_SIP_KERNEL_HWCCF_CONTROL, cmd, 0, 0, 0, 0, 0, 0, &res);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/soc/mediatek/mtk_sip_svc.h:22:28: error: 'ARM_SMCCC_FAST_CALL' undeclared (first use in this function)
   22 |         ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, MTK_SIP_SMC_CONVENTION, \
      |                            ^~~~~~~~~~~~~~~~~~~
drivers/pmdomain/mediatek/mtk-pm-domains.c:56:41: note: in expansion of macro 'MTK_SIP_SMC_CMD'
   56 | #define MTK_SIP_KERNEL_HWCCF_CONTROL    MTK_SIP_SMC_CMD(0x540)
      |                                         ^~~~~~~~~~~~~~~
drivers/pmdomain/mediatek/mtk-pm-domains.c:131:23: note: in expansion of macro 'MTK_SIP_KERNEL_HWCCF_CONTROL'
  131 |         arm_smccc_smc(MTK_SIP_KERNEL_HWCCF_CONTROL, cmd, 0, 0, 0, 0, 0, 0, &res);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/soc/mediatek/mtk_sip_svc.h:22:28: note: each undeclared identifier is reported only once for each function it appears in
   22 |         ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, MTK_SIP_SMC_CONVENTION, \
      |                            ^~~~~~~~~~~~~~~~~~~
drivers/pmdomain/mediatek/mtk-pm-domains.c:56:41: note: in expansion of macro 'MTK_SIP_SMC_CMD'
   56 | #define MTK_SIP_KERNEL_HWCCF_CONTROL    MTK_SIP_SMC_CMD(0x540)
      |                                         ^~~~~~~~~~~~~~~
drivers/pmdomain/mediatek/mtk-pm-domains.c:131:23: note: in expansion of macro 'MTK_SIP_KERNEL_HWCCF_CONTROL'
  131 |         arm_smccc_smc(MTK_SIP_KERNEL_HWCCF_CONTROL, cmd, 0, 0, 0, 0, 0, 0, &res);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/soc/mediatek/mtk_sip_svc.h:18:41: error: 'ARM_SMCCC_SMC_32' undeclared (first use in this function)
   18 | #define MTK_SIP_SMC_CONVENTION          ARM_SMCCC_SMC_32
      |                                         ^~~~~~~~~~~~~~~~
include/linux/soc/mediatek/mtk_sip_svc.h:22:49: note: in expansion of macro 'MTK_SIP_SMC_CONVENTION'
   22 |         ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, MTK_SIP_SMC_CONVENTION, \
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~
drivers/pmdomain/mediatek/mtk-pm-domains.c:56:41: note: in expansion of macro 'MTK_SIP_SMC_CMD'
   56 | #define MTK_SIP_KERNEL_HWCCF_CONTROL    MTK_SIP_SMC_CMD(0x540)
      |                                         ^~~~~~~~~~~~~~~
drivers/pmdomain/mediatek/mtk-pm-domains.c:131:23: note: in expansion of macro 'MTK_SIP_KERNEL_HWCCF_CONTROL'
  131 |         arm_smccc_smc(MTK_SIP_KERNEL_HWCCF_CONTROL, cmd, 0, 0, 0, 0, 0, 0, &res);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/soc/mediatek/mtk_sip_svc.h:23:28: error: 'ARM_SMCCC_OWNER_SIP' undeclared (first use in this function)
   23 |                            ARM_SMCCC_OWNER_SIP, fn_id)
      |                            ^~~~~~~~~~~~~~~~~~~
drivers/pmdomain/mediatek/mtk-pm-domains.c:56:41: note: in expansion of macro 'MTK_SIP_SMC_CMD'
   56 | #define MTK_SIP_KERNEL_HWCCF_CONTROL    MTK_SIP_SMC_CMD(0x540)
      |                                         ^~~~~~~~~~~~~~~
drivers/pmdomain/mediatek/mtk-pm-domains.c:131:23: note: in expansion of macro 'MTK_SIP_KERNEL_HWCCF_CONTROL'
  131 |         arm_smccc_smc(MTK_SIP_KERNEL_HWCCF_CONTROL, cmd, 0, 0, 0, 0, 0, 0, &res);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pmdomain/mediatek/mtk-pm-domains.c:128:30: warning: unused variable 'res' [-Wunused-variable]
  128 |         struct arm_smccc_res res;
      |                              ^~~
drivers/pmdomain/mediatek/mtk-pm-domains.c:133:1: error: control reaches end of non-void function [-Werror=return-type]
  133 | }
      | ^
cc1: some warnings being treated as errors

Caused by commit

  df4e9ec1ed86 ("pmdomain: mediatek: Add support for secure HWCCF infra power on")

(and maybe others)

I have used the pmdomain tree from next-20251022 for today.

-- 
Cheers,
Stephen Rothwell