[linux-next:master 3959/4951] drivers/firmware/arm_scmi/transports/smc.c:235:3: error: write to reserved register 'R7'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Cristian,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   edd1ec2e3a9f5de7fb267a3af73e4f00e7e052b7
commit: d4ae39de300c808cf4ed38f56fc266ba3caf0507 [3959/4951] firmware: arm_scmi: Make SMC transport a standalone driver
config: arm-randconfig-002-20240816 (https://download.01.org/0day-ci/archive/20240816/202408160737.MRlXwG46-lkp@xxxxxxxxx/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project f86594788ce93b696675c94f54016d27a6c21d18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240816/202408160737.MRlXwG46-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408160737.MRlXwG46-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/firmware/arm_scmi/transports/smc.c:235:3: error: write to reserved register 'R7'
     235 |                 arm_smccc_1_1_invoke(scmi_info->func_id, scmi_info->cap_id, 0,
         |                 ^
   include/linux/arm-smccc.h:570:4: note: expanded from macro 'arm_smccc_1_1_invoke'
     570 |                         arm_smccc_1_1_smc(__VA_ARGS__);                 \
         |                         ^
   include/linux/arm-smccc.h:513:48: note: expanded from macro 'arm_smccc_1_1_smc'
     513 | #define arm_smccc_1_1_smc(...)  __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__)
         |                                                 ^
   include/linux/arm-smccc.h:400:24: note: expanded from macro 'SMCCC_SMC_INST'
     400 | #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/firmware/arm_scmi/transports/smc.c:235:3: error: write to reserved register 'R7'
   include/linux/arm-smccc.h:567:4: note: expanded from macro 'arm_smccc_1_1_invoke'
     567 |                         arm_smccc_1_1_hvc(__VA_ARGS__);                 \
         |                         ^
   include/linux/arm-smccc.h:529:48: note: expanded from macro 'arm_smccc_1_1_hvc'
     529 | #define arm_smccc_1_1_hvc(...)  __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
         |                                                 ^
   include/linux/arm-smccc.h:401:24: note: expanded from macro 'SMCCC_HVC_INST'
     401 | #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/firmware/arm_scmi/transports/smc.c:235:3: error: write to reserved register 'R7'
   include/linux/arm-smccc.h:573:4: note: expanded from macro 'arm_smccc_1_1_invoke'
     573 |                         __fail_smccc_1_1(__VA_ARGS__);                  \
         |                         ^
   include/linux/arm-smccc.h:540:8: note: expanded from macro '__fail_smccc_1_1'
     540 |                 asm ("" :                                               \
         |                      ^
   drivers/firmware/arm_scmi/transports/smc.c:238:3: error: write to reserved register 'R7'
     238 |                 arm_smccc_1_1_invoke(scmi_info->func_id, scmi_info->param_page,
         |                 ^
   include/linux/arm-smccc.h:570:4: note: expanded from macro 'arm_smccc_1_1_invoke'
     570 |                         arm_smccc_1_1_smc(__VA_ARGS__);                 \
         |                         ^
   include/linux/arm-smccc.h:513:48: note: expanded from macro 'arm_smccc_1_1_smc'
     513 | #define arm_smccc_1_1_smc(...)  __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__)
         |                                                 ^
   include/linux/arm-smccc.h:400:24: note: expanded from macro 'SMCCC_SMC_INST'
     400 | #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/firmware/arm_scmi/transports/smc.c:238:3: error: write to reserved register 'R7'
   include/linux/arm-smccc.h:567:4: note: expanded from macro 'arm_smccc_1_1_invoke'
     567 |                         arm_smccc_1_1_hvc(__VA_ARGS__);                 \
         |                         ^
   include/linux/arm-smccc.h:529:48: note: expanded from macro 'arm_smccc_1_1_hvc'
     529 | #define arm_smccc_1_1_hvc(...)  __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
         |                                                 ^
   include/linux/arm-smccc.h:401:24: note: expanded from macro 'SMCCC_HVC_INST'
     401 | #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/firmware/arm_scmi/transports/smc.c:238:3: error: write to reserved register 'R7'
   include/linux/arm-smccc.h:573:4: note: expanded from macro 'arm_smccc_1_1_invoke'
     573 |                         __fail_smccc_1_1(__VA_ARGS__);                  \
         |                         ^
   include/linux/arm-smccc.h:540:8: note: expanded from macro '__fail_smccc_1_1'
     540 |                 asm ("" :                                               \
         |                      ^
   6 errors generated.


vim +/R7 +235 drivers/firmware/arm_scmi/transports/smc.c

1dc6558062dadf drivers/firmware/arm_scmi/smc.c            Peng Fan         2020-03-08  219  
1dc6558062dadf drivers/firmware/arm_scmi/smc.c            Peng Fan         2020-03-08  220  static int smc_send_message(struct scmi_chan_info *cinfo,
1dc6558062dadf drivers/firmware/arm_scmi/smc.c            Peng Fan         2020-03-08  221  			    struct scmi_xfer *xfer)
1dc6558062dadf drivers/firmware/arm_scmi/smc.c            Peng Fan         2020-03-08  222  {
1dc6558062dadf drivers/firmware/arm_scmi/smc.c            Peng Fan         2020-03-08  223  	struct scmi_smc *scmi_info = cinfo->transport_info;
1dc6558062dadf drivers/firmware/arm_scmi/smc.c            Peng Fan         2020-03-08  224  	struct arm_smccc_res res;
1dc6558062dadf drivers/firmware/arm_scmi/smc.c            Peng Fan         2020-03-08  225  
f716cbd33f038a drivers/firmware/arm_scmi/smc.c            Cristian Marussi 2021-12-20  226  	/*
0bfdca8a8661aa drivers/firmware/arm_scmi/smc.c            Cristian Marussi 2021-12-20  227  	 * Channel will be released only once response has been
f716cbd33f038a drivers/firmware/arm_scmi/smc.c            Cristian Marussi 2021-12-20  228  	 * surely fully retrieved, so after .mark_txdone()
f716cbd33f038a drivers/firmware/arm_scmi/smc.c            Cristian Marussi 2021-12-20  229  	 */
0bfdca8a8661aa drivers/firmware/arm_scmi/smc.c            Cristian Marussi 2021-12-20  230  	smc_channel_lock_acquire(scmi_info, xfer);
1dc6558062dadf drivers/firmware/arm_scmi/smc.c            Peng Fan         2020-03-08  231  
d4ae39de300c80 drivers/firmware/arm_scmi/transports/smc.c Cristian Marussi 2024-08-12  232  	core->shmem->tx_prepare(scmi_info->shmem, xfer, cinfo);
1dc6558062dadf drivers/firmware/arm_scmi/smc.c            Peng Fan         2020-03-08  233  
da405477e76707 drivers/firmware/arm_scmi/smc.c            Nikunj Kela      2023-10-09  234  	if (scmi_info->cap_id != ULONG_MAX)
da405477e76707 drivers/firmware/arm_scmi/smc.c            Nikunj Kela      2023-10-09 @235  		arm_smccc_1_1_invoke(scmi_info->func_id, scmi_info->cap_id, 0,
da405477e76707 drivers/firmware/arm_scmi/smc.c            Nikunj Kela      2023-10-09  236  				     0, 0, 0, 0, 0, &res);
da405477e76707 drivers/firmware/arm_scmi/smc.c            Nikunj Kela      2023-10-09  237  	else
1f17395124a53a drivers/firmware/arm_scmi/smc.c            Sudeep Holla     2023-10-09  238  		arm_smccc_1_1_invoke(scmi_info->func_id, scmi_info->param_page,
da405477e76707 drivers/firmware/arm_scmi/smc.c            Nikunj Kela      2023-10-09  239  				     scmi_info->param_offset, 0, 0, 0, 0, 0,
da405477e76707 drivers/firmware/arm_scmi/smc.c            Nikunj Kela      2023-10-09  240  				     &res);
dd820ee21d5e07 drivers/firmware/arm_scmi/smc.c            Jim Quinlan      2020-12-22  241  
f7199cf489027a drivers/firmware/arm_scmi/smc.c            Sudeep Holla     2020-04-17  242  	/* Only SMCCC_RET_NOT_SUPPORTED is valid error code */
f716cbd33f038a drivers/firmware/arm_scmi/smc.c            Cristian Marussi 2021-12-20  243  	if (res.a0) {
0bfdca8a8661aa drivers/firmware/arm_scmi/smc.c            Cristian Marussi 2021-12-20  244  		smc_channel_lock_release(scmi_info);
f7199cf489027a drivers/firmware/arm_scmi/smc.c            Sudeep Holla     2020-04-17  245  		return -EOPNOTSUPP;
f716cbd33f038a drivers/firmware/arm_scmi/smc.c            Cristian Marussi 2021-12-20  246  	}
f716cbd33f038a drivers/firmware/arm_scmi/smc.c            Cristian Marussi 2021-12-20  247  
f7199cf489027a drivers/firmware/arm_scmi/smc.c            Sudeep Holla     2020-04-17  248  	return 0;
1dc6558062dadf drivers/firmware/arm_scmi/smc.c            Peng Fan         2020-03-08  249  }
1dc6558062dadf drivers/firmware/arm_scmi/smc.c            Peng Fan         2020-03-08  250  

:::::: The code at line 235 was first introduced by commit
:::::: da405477e7670782241234ea6b4309f3224ecb63 firmware: arm_scmi: Add qcom smc/hvc transport support

:::::: TO: Nikunj Kela <quic_nkela@xxxxxxxxxxx>
:::::: CC: Sudeep Holla <sudeep.holla@xxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux