Introduce sbi_current_hartid()

Use this helper instead of hardcoding csr_read(mhartid).

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
This commit is contained in:
Damien Le Moal
2018-12-21 17:06:59 +09:00
parent 426adf9f60
commit 5563a03354
4 changed files with 15 additions and 4 deletions

View File

@@ -38,4 +38,6 @@ void sbi_hart_wait_for_coldboot(struct sbi_scratch *scratch, u32 hartid);
void sbi_hart_wake_coldboot_harts(struct sbi_scratch *scratch, u32 hartid);
u32 sbi_current_hartid(void);
#endif