diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-10-14 10:52:00 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-10-14 10:52:52 +0200 |
commit | e9a69c57442b6898a3f6f3184068857676ff40fe (patch) | |
tree | 9664355d9ece0179454891902ff53a6cdc63f76e | |
parent | validation: Use correct number of idle tasks (diff) | |
download | rtems-e9a69c57442b6898a3f6f3184068857676ff40fe.tar.bz2 |
riscv: Move functions to avoid build issues
The _RISCV_Map_cpu_index_to_hardid() and _RISCV_Map_hardid_to_cpu_index()
functions must be available to all riscv BSPs.
Diffstat (limited to '')
-rw-r--r-- | bsps/riscv/riscv/include/bsp/riscv.h | 10 | ||||
-rw-r--r-- | cpukit/score/cpu/riscv/include/rtems/score/cpuimpl.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/bsps/riscv/riscv/include/bsp/riscv.h b/bsps/riscv/riscv/include/bsp/riscv.h index 2ef2f8d83d..d38f46c069 100644 --- a/bsps/riscv/riscv/include/bsp/riscv.h +++ b/bsps/riscv/riscv/include/bsp/riscv.h @@ -34,16 +34,6 @@ extern "C" { #endif -static inline uint32_t _RISCV_Map_hardid_to_cpu_index(uint32_t hardid) -{ - return (hardid - RISCV_BOOT_HARTID); -} - -static inline uint32_t _RISCV_Map_cpu_index_to_hardid(uint32_t cpu_index) -{ - return (cpu_index + RISCV_BOOT_HARTID); -} - extern volatile RISCV_CLINT_regs *riscv_clint; void *riscv_fdt_get_address(const void *fdt, int node); diff --git a/cpukit/score/cpu/riscv/include/rtems/score/cpuimpl.h b/cpukit/score/cpu/riscv/include/rtems/score/cpuimpl.h index 627c48f94c..ea1e139d55 100644 --- a/cpukit/score/cpu/riscv/include/rtems/score/cpuimpl.h +++ b/cpukit/score/cpu/riscv/include/rtems/score/cpuimpl.h @@ -298,6 +298,16 @@ extern "C" { #endif +static inline uint32_t _RISCV_Map_hardid_to_cpu_index( uint32_t hardid ) +{ + return hardid - RISCV_BOOT_HARTID; +} + +static inline uint32_t _RISCV_Map_cpu_index_to_hardid( uint32_t cpu_index ) +{ + return cpu_index + RISCV_BOOT_HARTID; +} + /* Core Local Interruptor (CLINT) */ typedef union { |