[PATCH v2 3/3] RISC-V: Add support for srmcfg CSR from Ssqosid ext
Drew Fustini
fustini at kernel.org
Tue Sep 16 11:30:10 PDT 2025
On Tue, Sep 16, 2025 at 11:55:39PM +0800, kernel test robot wrote:
> Hi Drew,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Drew-Fustini/dt-bindings-riscv-Add-Ssqosid-extension-description/20250916-131818
> base: 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c
> patch link: https://lore.kernel.org/r/20250915-ssqosid-v6-17-rc5-v2-3-2d4b0254dfd6%40kernel.org
> patch subject: [PATCH v2 3/3] RISC-V: Add support for srmcfg CSR from Ssqosid ext
> config: riscv-allnoconfig (https://download.01.org/0day-ci/archive/20250916/202509162355.wByessnb-lkp@intel.com/config)
> compiler: riscv64-linux-gcc (GCC) 15.1.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250916/202509162355.wByessnb-lkp@intel.com/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 at intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202509162355.wByessnb-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> kernel/sched/core.c: In function 'context_switch':
> >> kernel/sched/core.c:5357:35: error: macro '__switch_to_srmcfg' passed 1 arguments, but takes just 0
> 5357 | switch_to(prev, next, prev);
> | ^
It seems I had incorrectly defined __switch_to_srmcfg() in the case
where CONFIG_RISCV_ISA_SSQOSID is not defined. I was able to reproduce
the error locally and this change seems to resolve it:
diff --git a/arch/riscv/include/asm/qos.h b/arch/riscv/include/asm/qos.h
index 7371e53e9e91..84830d7c6dc4 100644
--- a/arch/riscv/include/asm/qos.h
+++ b/arch/riscv/include/asm/qos.h
@@ -35,7 +35,7 @@ static __always_inline bool has_srmcfg(void)
#else /* ! CONFIG_RISCV_ISA_SSQOSID */
static __always_inline bool has_srmcfg(void) { return false; }
-#define __switch_to_srmcfg() do { } while (0)
+#define __switch_to_srmcfg(__next) do { } while (0)
#endif /* CONFIG_RISCV_ISA_SSQOSID */
#endif /* _ASM_RISCV_QOS_H */
I'll include this change in the next revision.
Thanks,
Drew
More information about the linux-riscv
mailing list