drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 1573c8d4cb206a2d1454ff711e79f8df2353290b commit: 82e703dd438b71432cc0ccbb90925d1e32dd014a [9185/10024] pmdomain: airoha: Add Airoha CPU PM Domain support config: arm-randconfig-001-20250120 (https://download.01.org/0day-ci/archive/20250120/[email protected]/config) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project c23f2417dc5f6dc371afb07af5627ec2a9d373a0) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250120/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'
59 | arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE, AIROHA_AVS_OP_FREQ_DYN_ADJ,
| ^
include/linux/arm-smccc.h:632:4: note: expanded from macro 'arm_smccc_1_1_invoke'
632 | arm_smccc_1_1_smc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:575:48: note: expanded from macro 'arm_smccc_1_1_smc'
575 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:477:24: note: expanded from macro 'SMCCC_SMC_INST'
477 | #define SMCCC_SMC_INST __SMC(0)
| ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32'
215 | __inst_thumb32(thumb_opcode)
| ^
arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32'
205 | #define __inst_thumb32(x) ___inst_thumb32( \
| ^
arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32'
230 | ".short " __stringify(first) ", " __stringify(second) "\n\t"
| ^
>> drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:629:4: note: expanded from macro 'arm_smccc_1_1_invoke'
629 | arm_smccc_1_1_hvc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:591:48: note: expanded from macro 'arm_smccc_1_1_hvc'
591 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:478:24: note: expanded from macro 'SMCCC_HVC_INST'
478 | #define SMCCC_HVC_INST __HVC(0)
| ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32'
215 | __inst_thumb32(thumb_opcode)
| ^
arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32'
205 | #define __inst_thumb32(x) ___inst_thumb32( \
| ^
arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32'
230 | ".short " __stringify(first) ", " __stringify(second) "\n\t"
| ^
>> drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:635:4: note: expanded from macro 'arm_smccc_1_1_invoke'
635 | __fail_smccc_1_1(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:602:8: note: expanded from macro '__fail_smccc_1_1'
602 | asm ("" : \
| ^
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7'
35 | arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE, AIROHA_AVS_OP_GET_FREQ,
| ^
include/linux/arm-smccc.h:632:4: note: expanded from macro 'arm_smccc_1_1_invoke'
632 | arm_smccc_1_1_smc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:575:48: note: expanded from macro 'arm_smccc_1_1_smc'
575 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:477:24: note: expanded from macro 'SMCCC_SMC_INST'
477 | #define SMCCC_SMC_INST __SMC(0)
| ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32'
215 | __inst_thumb32(thumb_opcode)
| ^
arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32'
205 | #define __inst_thumb32(x) ___inst_thumb32( \
| ^
arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32'
230 | ".short " __stringify(first) ", " __stringify(second) "\n\t"
| ^
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:629:4: note: expanded from macro 'arm_smccc_1_1_invoke'
629 | arm_smccc_1_1_hvc(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:591:48: note: expanded from macro 'arm_smccc_1_1_hvc'
591 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
| ^
include/linux/arm-smccc.h:478:24: note: expanded from macro 'SMCCC_HVC_INST'
478 | #define SMCCC_HVC_INST __HVC(0)
| ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32'
215 | __inst_thumb32(thumb_opcode)
| ^
arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32'
205 | #define __inst_thumb32(x) ___inst_thumb32( \
| ^
arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32'
230 | ".short " __stringify(first) ", " __stringify(second) "\n\t"
| ^
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:635:4: note: expanded from macro 'arm_smccc_1_1_invoke'
635 | __fail_smccc_1_1(__VA_ARGS__); \
| ^
include/linux/arm-smccc.h:602:8: note: expanded from macro '__fail_smccc_1_1'
602 | asm ("" : \
| ^6 errors generated.
vim +/R7 +59 drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c
53
54 static int airoha_cpu_pmdomain_set_performance_state(struct generic_pm_domain *domain,
55 unsigned int state)
56 {
57 struct arm_smccc_res res;
58
> 59 arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE, AIROHA_AVS_OP_FREQ_DYN_ADJ,
60 0, state, 0, 0, 0, 0, &res);
61
62 /* SMC signal correct apply by unsetting BIT 0 */
63 return res.a0 & BIT(0) ? -EINVAL : 0;
64 }
65 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Il giorno lun 20 gen 2025 alle ore 11:32 kernel test robot <[email protected]> ha scritto:
Quoted 132 lines
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 1573c8d4cb206a2d1454ff711e79f8df2353290b commit: 82e703dd438b71432cc0ccbb90925d1e32dd014a [9185/10024] pmdomain: airoha: Add Airoha CPU PM Domain support config: arm-randconfig-001-20250120 (https://download.01.org/0day-ci/archive/20250120/[email protected]/config) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project c23f2417dc5f6dc371afb07af5627ec2a9d373a0) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250120/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/All errors (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'59 | arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE, AIROHA_AVS_OP_FREQ_DYN_ADJ, | ^ include/linux/arm-smccc.h:632:4: note: expanded from macro 'arm_smccc_1_1_invoke' 632 | arm_smccc_1_1_smc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:575:48: note: expanded from macro 'arm_smccc_1_1_smc' 575 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:477:24: note: expanded from macro 'SMCCC_SMC_INST' 477 | #define SMCCC_SMC_INST __SMC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^Quoted 1 line
Quoted 1 line
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:629:4: note: expanded from macro 'arm_smccc_1_1_invoke'629 | arm_smccc_1_1_hvc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:591:48: note: expanded from macro 'arm_smccc_1_1_hvc' 591 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:478:24: note: expanded from macro 'SMCCC_HVC_INST' 478 | #define SMCCC_HVC_INST __HVC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^Quoted 1 line
Quoted 1 line
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:635:4: note: expanded from macro 'arm_smccc_1_1_invoke'635 | __fail_smccc_1_1(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:602:8: note: expanded from macro '__fail_smccc_1_1' 602 | asm ("" : \ | ^ drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7' 35 | arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE, AIROHA_AVS_OP_GET_FREQ, | ^ include/linux/arm-smccc.h:632:4: note: expanded from macro 'arm_smccc_1_1_invoke' 632 | arm_smccc_1_1_smc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:575:48: note: expanded from macro 'arm_smccc_1_1_smc' 575 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:477:24: note: expanded from macro 'SMCCC_SMC_INST' 477 | #define SMCCC_SMC_INST __SMC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^ drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7' include/linux/arm-smccc.h:629:4: note: expanded from macro 'arm_smccc_1_1_invoke' 629 | arm_smccc_1_1_hvc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:591:48: note: expanded from macro 'arm_smccc_1_1_hvc' 591 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:478:24: note: expanded from macro 'SMCCC_HVC_INST' 478 | #define SMCCC_HVC_INST __HVC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^ drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7' include/linux/arm-smccc.h:635:4: note: expanded from macro 'arm_smccc_1_1_invoke' 635 | __fail_smccc_1_1(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:602:8: note: expanded from macro '__fail_smccc_1_1' 602 | asm ("" : \ | ^6 errors generated.
vim +/R7 +59
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c53 54 static int airoha_cpu_pmdomain_set_performance_state(struct generic_pm_domain *domain, 55 unsigned int state) 56 { 57 struct arm_smccc_res res; 58Quoted 1 line
59 arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE,
AIROHA_AVS_OP_FREQ_DYN_ADJ,60 0, state, 0, 0, 0, 0, &res); 61 62 /* SMC signal correct apply by unsetting BIT 0 */ 63 return res.a0 & BIT(0) ? -EINVAL : 0; 64 } 65
Quoted 3 lines
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Mhhhh.... Any idea how to fix this? Maybe we have to exclude some flags? Error is "error: write to reserved register 'R7'" and I guess it's very specific to some kind of ARM ERRATA.
+ Sudeep,
Quoted 135 lines · Christian Marangi (Ansuel)
Il giorno lun 20 gen 2025 alle ore 11:32 kernel test robot <[email protected]> ha scritto:
Quoted 132 lines
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 1573c8d4cb206a2d1454ff711e79f8df2353290b commit: 82e703dd438b71432cc0ccbb90925d1e32dd014a [9185/10024] pmdomain: airoha: Add Airoha CPU PM Domain support config: arm-randconfig-001-20250120 (https://download.01.org/0day-ci/archive/20250120/[email protected]/config) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project c23f2417dc5f6dc371afb07af5627ec2a9d373a0) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250120/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/All errors (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'59 | arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE, AIROHA_AVS_OP_FREQ_DYN_ADJ, | ^ include/linux/arm-smccc.h:632:4: note: expanded from macro 'arm_smccc_1_1_invoke' 632 | arm_smccc_1_1_smc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:575:48: note: expanded from macro 'arm_smccc_1_1_smc' 575 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:477:24: note: expanded from macro 'SMCCC_SMC_INST' 477 | #define SMCCC_SMC_INST __SMC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^Quoted 1 line
Quoted 1 line
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:629:4: note: expanded from macro 'arm_smccc_1_1_invoke'629 | arm_smccc_1_1_hvc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:591:48: note: expanded from macro 'arm_smccc_1_1_hvc' 591 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:478:24: note: expanded from macro 'SMCCC_HVC_INST' 478 | #define SMCCC_HVC_INST __HVC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^Quoted 1 line
Quoted 1 line
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:635:4: note: expanded from macro 'arm_smccc_1_1_invoke'635 | __fail_smccc_1_1(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:602:8: note: expanded from macro '__fail_smccc_1_1' 602 | asm ("" : \ | ^ drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7' 35 | arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE, AIROHA_AVS_OP_GET_FREQ, | ^ include/linux/arm-smccc.h:632:4: note: expanded from macro 'arm_smccc_1_1_invoke' 632 | arm_smccc_1_1_smc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:575:48: note: expanded from macro 'arm_smccc_1_1_smc' 575 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:477:24: note: expanded from macro 'SMCCC_SMC_INST' 477 | #define SMCCC_SMC_INST __SMC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^ drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7' include/linux/arm-smccc.h:629:4: note: expanded from macro 'arm_smccc_1_1_invoke' 629 | arm_smccc_1_1_hvc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:591:48: note: expanded from macro 'arm_smccc_1_1_hvc' 591 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:478:24: note: expanded from macro 'SMCCC_HVC_INST' 478 | #define SMCCC_HVC_INST __HVC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^ drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7' include/linux/arm-smccc.h:635:4: note: expanded from macro 'arm_smccc_1_1_invoke' 635 | __fail_smccc_1_1(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:602:8: note: expanded from macro '__fail_smccc_1_1' 602 | asm ("" : \ | ^6 errors generated.
vim +/R7 +59
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c53 54 static int airoha_cpu_pmdomain_set_performance_state(struct generic_pm_domain *domain, 55 unsigned int state) 56 { 57 struct arm_smccc_res res; 58Quoted 1 line
59 arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE,
AIROHA_AVS_OP_FREQ_DYN_ADJ,60 0, state, 0, 0, 0, 0, &res); 61 62 /* SMC signal correct apply by unsetting BIT 0 */ 63 return res.a0 & BIT(0) ? -EINVAL : 0; 64 } 65
Quoted 7 lines
Quoted 3 lines
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wikiMhhhh.... Any idea how to fix this? Maybe we have to exclude some flags? Error is "error: write to reserved register 'R7'" and I guess it's very specific to some kind of ARM ERRATA.
I don't know to be honest. The arm-scmi transport driver (drivers/firmware/arm_scmi/transports/smc.c) is having similar calls with 9 parameters to arm_smccc_1_1_invoke(). Not sure why it's a problem here and not there?
Anyway, do you need all the parameters? Perhaps try to drop some?
That said, I am keeping the offending patch as is and expecting to get a fix as soon as possible.
Kind regards
Uffe
Quoted 143 lines · Ulf Hansson
+ Sudeep,
Quoted 139 lines · Christian Marangi (Ansuel)
Il giorno lun 20 gen 2025 alle ore 11:32 kernel test robot <[email protected]> ha scritto:
Quoted 135 lines
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 1573c8d4cb206a2d1454ff711e79f8df2353290b commit: 82e703dd438b71432cc0ccbb90925d1e32dd014a [9185/10024] pmdomain: airoha: Add Airoha CPU PM Domain support config: arm-randconfig-001-20250120 (https://download.01.org/0day-ci/archive/20250120/[email protected]/config) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project c23f2417dc5f6dc371afb07af5627ec2a9d373a0) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250120/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/All errors (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'59 | arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE, AIROHA_AVS_OP_FREQ_DYN_ADJ, | ^ include/linux/arm-smccc.h:632:4: note: expanded from macro 'arm_smccc_1_1_invoke' 632 | arm_smccc_1_1_smc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:575:48: note: expanded from macro 'arm_smccc_1_1_smc' 575 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:477:24: note: expanded from macro 'SMCCC_SMC_INST' 477 | #define SMCCC_SMC_INST __SMC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^Quoted 1 line
Quoted 1 line
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:629:4: note: expanded from macro 'arm_smccc_1_1_invoke'629 | arm_smccc_1_1_hvc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:591:48: note: expanded from macro 'arm_smccc_1_1_hvc' 591 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:478:24: note: expanded from macro 'SMCCC_HVC_INST' 478 | #define SMCCC_HVC_INST __HVC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^Quoted 1 line
Quoted 1 line
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:635:4: note: expanded from macro 'arm_smccc_1_1_invoke'635 | __fail_smccc_1_1(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:602:8: note: expanded from macro '__fail_smccc_1_1' 602 | asm ("" : \ | ^ drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7' 35 | arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE, AIROHA_AVS_OP_GET_FREQ, | ^ include/linux/arm-smccc.h:632:4: note: expanded from macro 'arm_smccc_1_1_invoke' 632 | arm_smccc_1_1_smc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:575:48: note: expanded from macro 'arm_smccc_1_1_smc' 575 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:477:24: note: expanded from macro 'SMCCC_SMC_INST' 477 | #define SMCCC_SMC_INST __SMC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^ drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7' include/linux/arm-smccc.h:629:4: note: expanded from macro 'arm_smccc_1_1_invoke' 629 | arm_smccc_1_1_hvc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:591:48: note: expanded from macro 'arm_smccc_1_1_hvc' 591 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:478:24: note: expanded from macro 'SMCCC_HVC_INST' 478 | #define SMCCC_HVC_INST __HVC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^ drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7' include/linux/arm-smccc.h:635:4: note: expanded from macro 'arm_smccc_1_1_invoke' 635 | __fail_smccc_1_1(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:602:8: note: expanded from macro '__fail_smccc_1_1' 602 | asm ("" : \ | ^6 errors generated.
vim +/R7 +59
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c53 54 static int airoha_cpu_pmdomain_set_performance_state(struct generic_pm_domain *domain, 55 unsigned int state) 56 { 57 struct arm_smccc_res res; 58Quoted 1 line
59 arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE,
AIROHA_AVS_OP_FREQ_DYN_ADJ,60 0, state, 0, 0, 0, 0, &res); 61 62 /* SMC signal correct apply by unsetting BIT 0 */ 63 return res.a0 & BIT(0) ? -EINVAL : 0; 64 } 65--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Quoted 9 lines
Quoted 3 lines
Mhhhh.... Any idea how to fix this? Maybe we have to exclude some flags? Error is "error: write to reserved register 'R7'" and I guess it's very specific to some kind of ARM ERRATA.
I don't know to be honest. The arm-scmi transport driver (
drivers/firmware/arm_scmi/transports/smc.c) is having similar calls with 9 parameters toarm_smccc_1_1_invoke(). Not sure why it's a problem here and not there?
I think it is known issue and must be solved with the below patch if my understanding is right.
Quoted 2 lines
Anyway, do you need all the parameters? Perhaps try to drop some?
I don't think we need to do that.
Quoted 3 lines
That said, I am keeping the offending patch as is and expecting to get a fix as soon as possible.
Let me know if the patch helps.
Regards,
Sudeep
--->8
drivers/pmdomain/mediatek/Makefile +6 -0
@@ -2,3 +2,9 @@ obj-$(CONFIG_MTK_SCPSYS) += mtk-scpsys.o obj-$(CONFIG_MTK_SCPSYS_PM_DOMAINS) += mtk-pm-domains.o obj-$(CONFIG_AIROHA_CPU_PM_DOMAIN) += airoha-cpu-pmdomain.o +ifeq ($(CONFIG_THUMB2_KERNEL)$(CONFIG_CC_IS_CLANG),yy) +# The use of R7 in the SMCCC conflicts with the compiler's use of R7 as a frame +# pointer in Thumb2 mode, which is forcibly enabled by Clang when profiling +# hooks are inserted via the -pg switch. +CFLAGS_REMOVE_airoha-cpu-pmdomain.o += $(CC_FLAGS_FTRACE) +endif
Il giorno lun 20 gen 2025 alle ore 14:34 Sudeep Holla <[email protected]> ha scritto:
Quoted 149 lines · Ulf Hansson
Quoted 147 lines
+ Sudeep,
Quoted 142 lines · Christian Marangi (Ansuel)
Il giorno lun 20 gen 2025 alle ore 11:32 kernel test robot <[email protected]> ha scritto:
Quoted 132 lines
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 1573c8d4cb206a2d1454ff711e79f8df2353290b commit: 82e703dd438b71432cc0ccbb90925d1e32dd014a [9185/10024] pmdomain: airoha: Add Airoha CPU PM Domain support config: arm-randconfig-001-20250120 (https://download.01.org/0day-ci/archive/20250120/[email protected]/config) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project c23f2417dc5f6dc371afb07af5627ec2a9d373a0) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250120/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/All errors (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'59 | arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE, AIROHA_AVS_OP_FREQ_DYN_ADJ, | ^ include/linux/arm-smccc.h:632:4: note: expanded from macro 'arm_smccc_1_1_invoke' 632 | arm_smccc_1_1_smc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:575:48: note: expanded from macro 'arm_smccc_1_1_smc' 575 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:477:24: note: expanded from macro 'SMCCC_SMC_INST' 477 | #define SMCCC_SMC_INST __SMC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^Quoted 1 line
Quoted 1 line
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:629:4: note: expanded from macro 'arm_smccc_1_1_invoke'629 | arm_smccc_1_1_hvc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:591:48: note: expanded from macro 'arm_smccc_1_1_hvc' 591 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:478:24: note: expanded from macro 'SMCCC_HVC_INST' 478 | #define SMCCC_HVC_INST __HVC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^Quoted 1 line
Quoted 1 line
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:59:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:635:4: note: expanded from macro 'arm_smccc_1_1_invoke'635 | __fail_smccc_1_1(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:602:8: note: expanded from macro '__fail_smccc_1_1' 602 | asm ("" : \ | ^ drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7' 35 | arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE, AIROHA_AVS_OP_GET_FREQ, | ^ include/linux/arm-smccc.h:632:4: note: expanded from macro 'arm_smccc_1_1_invoke' 632 | arm_smccc_1_1_smc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:575:48: note: expanded from macro 'arm_smccc_1_1_smc' 575 | #define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:477:24: note: expanded from macro 'SMCCC_SMC_INST' 477 | #define SMCCC_SMC_INST __SMC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^ drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7' include/linux/arm-smccc.h:629:4: note: expanded from macro 'arm_smccc_1_1_invoke' 629 | arm_smccc_1_1_hvc(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:591:48: note: expanded from macro 'arm_smccc_1_1_hvc' 591 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__) | ^ include/linux/arm-smccc.h:478:24: note: expanded from macro 'SMCCC_HVC_INST' 478 | #define SMCCC_HVC_INST __HVC(0) | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32' 215 | __inst_thumb32(thumb_opcode) | ^ arch/arm/include/asm/opcodes.h:205:27: note: expanded from macro '__inst_thumb32' 205 | #define __inst_thumb32(x) ___inst_thumb32( \ | ^ arch/arm/include/asm/opcodes.h:230:2: note: expanded from macro '___inst_thumb32' 230 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ^ drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c:35:2: error: write to reserved register 'R7' include/linux/arm-smccc.h:635:4: note: expanded from macro 'arm_smccc_1_1_invoke' 635 | __fail_smccc_1_1(__VA_ARGS__); \ | ^ include/linux/arm-smccc.h:602:8: note: expanded from macro '__fail_smccc_1_1' 602 | asm ("" : \ | ^6 errors generated.
vim +/R7 +59
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c53 54 static int airoha_cpu_pmdomain_set_performance_state(struct generic_pm_domain *domain, 55 unsigned int state) 56 { 57 struct arm_smccc_res res; 58Quoted 1 line
59 arm_smccc_1_1_invoke(AIROHA_SIP_AVS_HANDLE,
AIROHA_AVS_OP_FREQ_DYN_ADJ,60 0, state, 0, 0, 0, 0, &res); 61 62 /* SMC signal correct apply by unsetting BIT 0 */ 63 return res.a0 & BIT(0) ? -EINVAL : 0; 64 } 65Quoted 3 lines
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wikiMhhhh.... Any idea how to fix this? Maybe we have to exclude some flags? Error is "error: write to reserved register 'R7'" and I guess it's very specific to some kind of ARM ERRATA.
Quoted 9 lines
Quoted 5 lines
I don't know to be honest. The arm-scmi transport driver (
drivers/firmware/arm_scmi/transports/smc.c) is having similar calls with 9 parameters toarm_smccc_1_1_invoke(). Not sure why it's a problem here and not there?I think it is known issue and must be solved with the below patch if my understanding is right.
If it's a known issue and affects also other use of smcc why we need specific fix in the driver makefile instead of a more generic one.
Do you have a link for the known issue?
Quoted 5 lines
Quoted 2 lines
Anyway, do you need all the parameters? Perhaps try to drop some?
I don't think we need to do that.
No we don't but the macro require to define all of them...
Quoted 6 lines
Quoted 3 lines
That said, I am keeping the offending patch as is and expecting to get a fix as soon as possible.
Let me know if the patch helps.
I will test!
Quoted 20 lines
Regards,
Sudeep--->8
drivers/pmdomain/mediatek/Makefile +6
-0@@ -2,3 +2,9 @@ obj-$(CONFIG_MTK_SCPSYS) += mtk-scpsys.o obj-$(CONFIG_MTK_SCPSYS_PM_DOMAINS) += mtk-pm-domains.o obj-$(CONFIG_AIROHA_CPU_PM_DOMAIN) += airoha-cpu-pmdomain.o +ifeq ($(CONFIG_THUMB2_KERNEL)$(CONFIG_CC_IS_CLANG),yy) +# The use of R7 in the SMCCC conflicts with the compiler's use of R7 as a frame +# pointer in Thumb2 mode, which is forcibly enabled by Clang when profiling +# hooks are inserted via the -pg switch. +CFLAGS_REMOVE_airoha-cpu-pmdomain.o += $(CC_FLAGS_FTRACE) +endif
Quoted 8 lines · Christian Marangi (Ansuel)
Il giorno lun 20 gen 2025 alle ore 14:34 Sudeep Holla <[email protected]> ha scritto:
Quoted 6 lines · Ulf Hansson
Quoted 4 lines
+ Sudeep,
On Mon, 20 Jan 2025 at 11:37, Christian Marangi (Ansuel) <[email protected]> wrote:
[...]
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines
Mhhhh.... Any idea how to fix this? Maybe we have to exclude some flags? Error is "error: write to reserved register 'R7'" and I guess it's very specific to some kind of ARM ERRATA.
I don't know to be honest. The arm-scmi transport driver (
drivers/firmware/arm_scmi/transports/smc.c) is having similar calls with 9 parameters toarm_smccc_1_1_invoke(). Not sure why it's a problem here and not there?
Quoted 7 lines
Quoted 3 lines
I think it is known issue and must be solved with the below patch if my understanding is right.
If it's a known issue and affects also other use of smcc why we need specific fix in the driver makefile instead of a more generic one.
IIUC, arm_smccc_1_1_invoke() is a macro which can be used anywhere. There are reasons why we can't move it to a module and export it.
Quoted 2 lines
Do you have a link for the known issue?
Nothing handy, but quick google search gave me this:
https://bugs.llvm.org/show_bug.cgi?id=45826
--
Regards,
Sudeep
Il giorno lun 20 gen 2025 alle ore 14:44 Sudeep Holla <[email protected]> ha scritto:
Quoted 32 lines · Christian Marangi (Ansuel)
Quoted 8 lines
Il giorno lun 20 gen 2025 alle ore 14:34 Sudeep Holla <[email protected]> ha scritto:
Quoted 6 lines · Ulf Hansson
Quoted 4 lines
+ Sudeep,
On Mon, 20 Jan 2025 at 11:37, Christian Marangi (Ansuel) <[email protected]> wrote:
[...]
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines
Mhhhh.... Any idea how to fix this? Maybe we have to exclude some flags? Error is "error: write to reserved register 'R7'" and I guess it's very specific to some kind of ARM ERRATA.
I don't know to be honest. The arm-scmi transport driver (
drivers/firmware/arm_scmi/transports/smc.c) is having similar calls with 9 parameters toarm_smccc_1_1_invoke(). Not sure why it's a problem here and not there?Quoted 7 lines
Quoted 3 lines
I think it is known issue and must be solved with the below patch if my understanding is right.
If it's a known issue and affects also other use of smcc why we need specific fix in the driver makefile instead of a more generic one.
Quoted 9 lines
IIUC,
arm_smccc_1_1_invoke()is a macro which can be used anywhere. There are reasons why we can't move it to a module and export it.Quoted 2 lines
Do you have a link for the known issue?
Nothing handy, but quick google search gave me this:
https://bugs.llvm.org/show_bug.cgi?id=45826
If only these test report were easy to report instead of me having to build the massive llvm-20 dev version...
Any hint if anyone knows if precompiled cross tool are present around the web (with llvm-20?)
Quoted 44 lines · Christian Marangi (Ansuel)
Il giorno lun 20 gen 2025 alle ore 14:44 Sudeep Holla <[email protected]> ha scritto:
Quoted 32 lines · Christian Marangi (Ansuel)
Quoted 8 lines
Il giorno lun 20 gen 2025 alle ore 14:34 Sudeep Holla <[email protected]> ha scritto:
Quoted 6 lines · Ulf Hansson
Quoted 4 lines
+ Sudeep,
On Mon, 20 Jan 2025 at 11:37, Christian Marangi (Ansuel) <[email protected]> wrote:
[...]
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines
Mhhhh.... Any idea how to fix this? Maybe we have to exclude some flags? Error is "error: write to reserved register 'R7'" and I guess it's very specific to some kind of ARM ERRATA.
I don't know to be honest. The arm-scmi transport driver (
drivers/firmware/arm_scmi/transports/smc.c) is having similar calls with 9 parameters toarm_smccc_1_1_invoke(). Not sure why it's a problem here and not there?Quoted 7 lines
Quoted 3 lines
I think it is known issue and must be solved with the below patch if my understanding is right.
If it's a known issue and affects also other use of smcc why we need specific fix in the driver makefile instead of a more generic one.
Quoted 9 lines
IIUC,
arm_smccc_1_1_invoke()is a macro which can be used anywhere. There are reasons why we can't move it to a module and export it.Quoted 2 lines
Do you have a link for the known issue?
Nothing handy, but quick google search gave me this:
https://bugs.llvm.org/show_bug.cgi?id=45826
Quoted 5 lines
If only these test report were easy to report instead of me having to build the massive llvm-20 dev version...
Any hint if anyone knows if precompiled cross tool are present around the web (with llvm-20?)
I can test it I guess as I have clang v20. Let me give it a go.
Signature · 2 lines
Regards, Sudeep
Il giorno lun 20 gen 2025 alle ore 16:05 Sudeep Holla <[email protected]> ha scritto:
Quoted 46 lines · Christian Marangi (Ansuel)
Quoted 44 lines
Il giorno lun 20 gen 2025 alle ore 14:44 Sudeep Holla <[email protected]> ha scritto:
Quoted 41 lines · Christian Marangi (Ansuel)
Quoted 8 lines
Il giorno lun 20 gen 2025 alle ore 14:34 Sudeep Holla <[email protected]> ha scritto:
Quoted 6 lines · Ulf Hansson
Quoted 4 lines
+ Sudeep,
On Mon, 20 Jan 2025 at 11:37, Christian Marangi (Ansuel) <[email protected]> wrote:
[...]
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines
Mhhhh.... Any idea how to fix this? Maybe we have to exclude some flags? Error is "error: write to reserved register 'R7'" and I guess it's very specific to some kind of ARM ERRATA.
I don't know to be honest. The arm-scmi transport driver (
drivers/firmware/arm_scmi/transports/smc.c) is having similar calls with 9 parameters toarm_smccc_1_1_invoke(). Not sure why it's a problem here and not there?Quoted 7 lines
Quoted 3 lines
I think it is known issue and must be solved with the below patch if my understanding is right.
If it's a known issue and affects also other use of smcc why we need specific fix in the driver makefile instead of a more generic one.
IIUC,
arm_smccc_1_1_invoke()is a macro which can be used anywhere. There are reasons why we can't move it to a module and export it.Quoted 2 lines
Do you have a link for the known issue?
Nothing handy, but quick google search gave me this:
https://bugs.llvm.org/show_bug.cgi?id=45826
Quoted 8 lines
Quoted 5 lines
If only these test report were easy to report instead of me having to build the massive llvm-20 dev version...
Any hint if anyone knows if precompiled cross tool are present around the web (with llvm-20?)
I can test it I guess as I have clang v20. Let me give it a go.
Ok no manage to repro and I can indeed confirm your patch fix the compilation error...
My main question is... Is it acceptable tho?
Il giorno lun 20 gen 2025 alle ore 16:20 Christian Marangi (Ansuel) <[email protected]> ha scritto:
Quoted 55 lines
Il giorno lun 20 gen 2025 alle ore 16:05 Sudeep Holla <[email protected]> ha scritto:
Quoted 52 lines · Christian Marangi (Ansuel)
Quoted 49 lines
Il giorno lun 20 gen 2025 alle ore 14:44 Sudeep Holla <[email protected]> ha scritto:
Quoted 32 lines · Christian Marangi (Ansuel)
Quoted 8 lines
Il giorno lun 20 gen 2025 alle ore 14:34 Sudeep Holla <[email protected]> ha scritto:
Quoted 6 lines · Ulf Hansson
Quoted 4 lines
+ Sudeep,
On Mon, 20 Jan 2025 at 11:37, Christian Marangi (Ansuel) <[email protected]> wrote:
[...]
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines
Mhhhh.... Any idea how to fix this? Maybe we have to exclude some flags? Error is "error: write to reserved register 'R7'" and I guess it's very specific to some kind of ARM ERRATA.
I don't know to be honest. The arm-scmi transport driver (
drivers/firmware/arm_scmi/transports/smc.c) is having similar calls with 9 parameters toarm_smccc_1_1_invoke(). Not sure why it's a problem here and not there?Quoted 7 lines
Quoted 3 lines
I think it is known issue and must be solved with the below patch if my understanding is right.
If it's a known issue and affects also other use of smcc why we need specific fix in the driver makefile instead of a more generic one.
Quoted 9 lines
IIUC,
arm_smccc_1_1_invoke()is a macro which can be used anywhere. There are reasons why we can't move it to a module and export it.Quoted 2 lines
Do you have a link for the known issue?
Nothing handy, but quick google search gave me this:
https://bugs.llvm.org/show_bug.cgi?id=45826If only these test report were easy to report instead of me having to build the massive llvm-20 dev version...
Any hint if anyone knows if precompiled cross tool are present around the web (with llvm-20?)
Quoted 7 lines
Quoted 2 lines
I can test it I guess as I have clang v20. Let me give it a go.
Ok no manage to repro and I can indeed confirm your patch fix the compilation error...
My main question is... Is it acceptable tho?
Honestly I will revert back and use the basic arm_smccc_smc. I don't really like the fix in the makefile and I think it should be handled in a more generic way for
any user of arm_smccc_1_1_invoke.
Il giorno lun 20 gen 2025 alle ore 16:28 Christian Marangi (Ansuel) <[email protected]> ha scritto:
Quoted 64 lines
Il giorno lun 20 gen 2025 alle ore 16:20 Christian Marangi (Ansuel) <[email protected]> ha scritto:
Quoted 61 lines
Il giorno lun 20 gen 2025 alle ore 16:05 Sudeep Holla <[email protected]> ha scritto:
Quoted 46 lines · Christian Marangi (Ansuel)
Quoted 44 lines
Il giorno lun 20 gen 2025 alle ore 14:44 Sudeep Holla <[email protected]> ha scritto:
Quoted 41 lines · Christian Marangi (Ansuel)
Quoted 8 lines
Il giorno lun 20 gen 2025 alle ore 14:34 Sudeep Holla <[email protected]> ha scritto:
Quoted 6 lines · Ulf Hansson
Quoted 4 lines
+ Sudeep,
On Mon, 20 Jan 2025 at 11:37, Christian Marangi (Ansuel) <[email protected]> wrote:
[...]
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines
Mhhhh.... Any idea how to fix this? Maybe we have to exclude some flags? Error is "error: write to reserved register 'R7'" and I guess it's very specific to some kind of ARM ERRATA.
I don't know to be honest. The arm-scmi transport driver (
drivers/firmware/arm_scmi/transports/smc.c) is having similar calls with 9 parameters toarm_smccc_1_1_invoke(). Not sure why it's a problem here and not there?Quoted 7 lines
Quoted 3 lines
I think it is known issue and must be solved with the below patch if my understanding is right.
If it's a known issue and affects also other use of smcc why we need specific fix in the driver makefile instead of a more generic one.
IIUC,
arm_smccc_1_1_invoke()is a macro which can be used anywhere. There are reasons why we can't move it to a module and export it.Quoted 2 lines
Do you have a link for the known issue?
Nothing handy, but quick google search gave me this:
https://bugs.llvm.org/show_bug.cgi?id=45826Quoted 8 lines
Quoted 5 lines
If only these test report were easy to report instead of me having to build the massive llvm-20 dev version...
Any hint if anyone knows if precompiled cross tool are present around the web (with llvm-20?)
I can test it I guess as I have clang v20. Let me give it a go.
Ok no manage to repro and I can indeed confirm your patch fix the compilation error...
Quoted 6 lines
Quoted 1 line
My main question is... Is it acceptable tho?
Honestly I will revert back and use the basic
arm_smccc_smc. I don't really like the fix in the makefile and I think it should be handled in a more generic way for
any user ofarm_smccc_1_1_invoke.
Actually sorry for the mail spam... Since this is already done I will follow how it's done for drivers/firmware/arm_scmi/transports/Makefile
Creating the patch that fix this. Thanks a lot for the hint and suggestion Sudeep Holla.
Quoted 6 lines · Christian Marangi (Ansuel)
Il giorno lun 20 gen 2025 alle ore 16:28 Christian Marangi (Ansuel) <[email protected]> ha scritto:
Actually sorry for the mail spam... Since this is already done I will follow how it's done for
drivers/firmware/arm_scmi/transports/Makefile
And in arch/arm/mach-bcm/Makefile and may be others.
Quoted 2 lines
Creating the patch that fix this. Thanks a lot for the hint and suggestion Sudeep Holla.
You are welcome.
--
Regards,
Sudeep
Quoted 4 lines · Christian Marangi (Ansuel)
Honestly I will revert back and use the basic
arm_smccc_smc. I don't really like the fix in the makefile and I think it should be handled in a more generic way for any user ofarm_smccc_1_1_invoke.
You can use arm_smccc_smc() or arm_smccc_hvc() if that works for you. If the system supports SMCCC v1.1+, then arm_smccc_1_1_invoke() helper provides a generic and portable way(switch between the conduits if running within a VM for example)
--
Regards,
Sudeep
Quoted 5 lines · Christian Marangi (Ansuel)
If only these test report were easy to report instead of me having to build the massive llvm-20 dev version...
Any hint if anyone knows if precompiled cross tool are present around the web (with llvm-20?)
I see this has been resolved based on my understanding of the rest of the comments in this thread but I figured I would comment on this bit. You generally do not need a version of LLVM from main (i.e., 20 right now) to reproduce these reports, it just happens to be the version that the robot used to flag this issue. I maintain precompiled versions of stable LLVM releases on kernel.org, which would show this issue with that same configuration, no building needed :)
https://mirrors.edge.kernel.org/pub/tools/llvm/
If you try the latest version and the problem does not show up, feel free to comment on the report (which should have [email protected] in CC) to let us know and we can see if it is an LLVM main problem (and bisect it to get it reported and fixed upstream at that point).
Cheers,
Nathan
Il giorno lun 20 gen 2025 alle ore 18:28 Nathan Chancellor <[email protected]> ha scritto:
Quoted 16 lines · Christian Marangi (Ansuel)
Quoted 5 lines
If only these test report were easy to report instead of me having to build the massive llvm-20 dev version...
Any hint if anyone knows if precompiled cross tool are present around the web (with llvm-20?)
I see this has been resolved based on my understanding of the rest of the comments in this thread but I figured I would comment on this bit. You generally do not need a version of LLVM from main (i.e., 20 right now) to reproduce these reports, it just happens to be the version that the robot used to flag this issue. I maintain precompiled versions of stable LLVM releases on kernel.org, which would show this issue with that same configuration, no building needed :)
Quoted 7 lines
https://mirrors.edge.kernel.org/pub/tools/llvm/
If you try the latest version and the problem does not show up, feel free to comment on the report (which should have [email protected] in CC) to let us know and we can see if it is an LLVM main problem (and bisect it to get it reported and fixed upstream at that point).
Hi Nathan,
I would like to first thank you and anyone involved in this kernel boot test project. It's a life saviour and helped me a lot to catch all kind of corner case with randconfig.
My main complain is that a lot of times, the repro step reference clang version or also gcc version that are actually not present in the download link making the repro step (and script) not usable.
Now I can use and try the previous version but given some compilation error happens only on the most recent build tools (due to additional warning and check introduced) It might be hard to repro.
My honest suggestion to make this even more accessible would be to also provide beta release of the build tool. Or at least add some comments in the repro file suggesting also to try with the previous version.
Quoted 26 lines · Christian Marangi (Ansuel)
Il giorno lun 20 gen 2025 alle ore 18:28 Nathan Chancellor <[email protected]> ha scritto:
Quoted 16 lines · Christian Marangi (Ansuel)
Quoted 5 lines
If only these test report were easy to report instead of me having to build the massive llvm-20 dev version...
Any hint if anyone knows if precompiled cross tool are present around the web (with llvm-20?)
I see this has been resolved based on my understanding of the rest of the comments in this thread but I figured I would comment on this bit. You generally do not need a version of LLVM from main (i.e., 20 right now) to reproduce these reports, it just happens to be the version that the robot used to flag this issue. I maintain precompiled versions of stable LLVM releases on kernel.org, which would show this issue with that same configuration, no building needed :)
Quoted 7 lines
https://mirrors.edge.kernel.org/pub/tools/llvm/
If you try the latest version and the problem does not show up, feel free to comment on the report (which should have [email protected] in CC) to let us know and we can see if it is an LLVM main problem (and bisect it to get it reported and fixed upstream at that point).
Quoted 5 lines
Hi Nathan,
I would like to first thank you and anyone involved in this kernel boot test project. It's a life saviour and helped me a lot to catch all kind of corner case with randconfig.
Heh, thanks for the high praise but I do not maintain or help with this service. I am focused on maintaining the LLVM build support in the kernel and our list is CC'd on reports that use clang so we can help with issues that appear only with clang (such as this one). Sorry I was unable to jump in sooner.
Quoted 4 lines
My main complain is that a lot of times, the repro step reference clang version or also gcc version that are actually not present in the download link making the repro step (and script) not usable.
Quoted 8 lines
Now I can use and try the previous version but given some compilation error happens only on the most recent build tools (due to additional warning and check introduced) It might be hard to repro.
My honest suggestion to make this even more accessible would be to also provide beta release of the build tool. Or at least add some comments in the repro file suggesting also to try with the previous version.
This sounds like good feedback for the LKP folks. I have my own wrapper and processes for reproducing these issues because I do it a lot so I am unaware of the potential jagged edges with the reproducers. They are usually pretty responsive to requests/reports of problems with their stuff in my experience.
Cheers,
Nathan
Quoted 8 lines · Nathan Chancellor
Quoted 7 lines · Christian Marangi (Ansuel)
Il giorno lun 20 gen 2025 alle ore 18:28 Nathan Chancellor <[email protected]> ha scritto:
Quoted 5 lines · Christian Marangi (Ansuel)
Quoted 3 lines
If only these test report were easy to report instead of me having to build the massive llvm-20 dev version...
[...]
Quoted 4 lines
Quoted 4 lines
My main complain is that a lot of times, the repro step reference clang version or also gcc version that are actually not present in the download link making the repro step (and script) not usable.
Apologize for this, we will resolve this to avoid such issue.
Quoted 11 lines
Quoted 9 lines
Now I can use and try the previous version but given some compilation error happens only on the most recent build tools (due to additional warning and check introduced) It might be hard to repro.
My honest suggestion to make this even more accessible would be to also provide beta release of the build tool. Or at least add some comments in the repro file suggesting also to try with the previous version.
This sounds like good feedback for the LKP folks. I have my own wrapper
Thanks all for the input, let me add it to our TODO list, before that we will enhance the repro comments as suggested when the version is failed for download.
Quoted 8 lines
and processes for reproducing these issues because I do it a lot so I am unaware of the potential jagged edges with the reproducers. They are usually pretty responsive to requests/reports of problems with their stuff in my experience.
Cheers,
Nathan