riscv: Correct spelling of hart

RISC-V cores are called harts and have a hart ID (hartid).
This commit is contained in:
Kinsey Moore
2025-01-29 10:32:15 -06:00
committed by Kinsey Moore
parent 613f701b8c
commit 52c3ddfc3c
2 changed files with 5 additions and 5 deletions

View File

@@ -204,7 +204,7 @@ static void riscv_clint_init(const void *fdt)
hart_index = riscv_get_hart_index_by_phandle(fdt32_to_cpu(val[i / 4]));
#ifdef RTEMS_SMP
cpu_index = _RISCV_Map_hardid_to_cpu_index(hart_index);
cpu_index = _RISCV_Map_hartid_to_cpu_index(hart_index);
if (cpu_index >= rtems_configuration_get_maximum_processors()) {
continue;
}
@@ -292,7 +292,7 @@ static void riscv_plic_init(const void *fdt)
hart_index = riscv_get_hart_index_by_phandle(fdt32_to_cpu(val[i / 4]));
#ifdef RTEMS_SMP
cpu_index = _RISCV_Map_hardid_to_cpu_index(hart_index);
cpu_index = _RISCV_Map_hartid_to_cpu_index(hart_index);
if (cpu_index >= rtems_configuration_get_maximum_processors()) {
continue;
}

View File

@@ -298,12 +298,12 @@
extern "C" {
#endif
static inline uint32_t _RISCV_Map_hardid_to_cpu_index( uint32_t hardid )
static inline uint32_t _RISCV_Map_hartid_to_cpu_index( uint32_t hartid )
{
return hardid - RISCV_BOOT_HARTID;
return hartid - RISCV_BOOT_HARTID;
}
static inline uint32_t _RISCV_Map_cpu_index_to_hardid( uint32_t cpu_index )
static inline uint32_t _RISCV_Map_cpu_index_to_hartid( uint32_t cpu_index )
{
return cpu_index + RISCV_BOOT_HARTID;
}