From: Bin Meng Date: Tue, 11 Dec 2018 23:11:25 -0800 Subject: [U-Boot] [PATCH v4 24/25] riscv: bootm: Change to use boot_hart from global data In-Reply-To: <1544598686-14130-1-git-send-email-bmeng.cn@gmail.com> References: <1544598686-14130-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1544598686-14130-25-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Avoid reading mhartid CSR directly, instead use the one we saved in the global data structure before. With this patch, BBL no longer needs to be hacked to provide the mhartid CSR emulation for S-mode U-Boot. Signed-off-by: Bin Meng Reviewed-by: Lukas Auer --- Changes in v4: None Changes in v3: - new patch to change to use boot_hart from global data Changes in v2: None arch/riscv/lib/bootm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index 124aeef..60b32cc 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -93,7 +93,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) if (!fake) { if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) - kernel(csr_read(mhartid), images->ft_addr); + kernel(gd->arch.boot_hart, images->ft_addr); } } -- 2.7.4