On 04.07.2025 17:29, Oleksii Kurochko wrote: > > On 6/30/25 4:27 PM, Jan Beulich wrote: >>> --- a/xen/arch/riscv/include/asm/smp.h >>> +++ b/xen/arch/riscv/include/asm/smp.h >>> @@ -3,6 +3,7 @@ >>> #define ASM__RISCV__SMP_H >>> >>> #include <xen/cpumask.h> >>> +#include <xen/macros.h> >>> #include <xen/percpu.h> >>> >>> #include <asm/current.h> >>> @@ -18,6 +19,18 @@ static inline unsigned long cpuid_to_hartid(unsigned >>> long cpuid) >>> return pcpu_info[cpuid].hart_id; >>> } >>> >>> +static inline unsigned int hartid_to_cpuid(unsigned long hartid) >>> +{ >>> + for ( unsigned int cpuid = 0; cpuid < ARRAY_SIZE(pcpu_info); cpuid++ ) >> We had been there before, I think: Why "cpuid", not "cpu" (as we have it >> about >> everywhere else)? > > To be in sync with other already merged functions, f.e. > set_cpuid_to_hartid(cpuid, hartid).
To be honest, I'd much rather see such uses of "cpuid" (as a variable or parameter name; it's less of a concern in function names) be changed. Jan