[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 1/3] hw/riscv: virt: Don't use a macro for the PLIC config
From: |
Bin Meng |
Subject: |
Re: [PATCH v1 1/3] hw/riscv: virt: Don't use a macro for the PLIC configuration |
Date: |
Fri, 3 Sep 2021 18:41:18 +0800 |
On Fri, Sep 3, 2021 at 2:50 PM Alistair Francis
<alistair.francis@opensource.wdc.com> wrote:
>
> From: Alistair Francis <alistair.francis@wdc.com>
>
> Using a macro for the PLIC configuration doesn't make the code any
> easier to read. Instead it makes it harder to figure out what is going
> on, so let's remove it.
>
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
> hw/riscv/virt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
> index 5624adda58..d562ec6722 100644
> --- a/hw/riscv/virt.c
> +++ b/hw/riscv/virt.c
> @@ -550,7 +550,7 @@ static char *plic_hart_config_string(int hart_count)
> int i;
>
> for (i = 0; i < hart_count; i++) {
> - vals[i] = VIRT_PLIC_HART_CONFIG;
This macro in virt.h should also be removed
> + vals[i] = "MS";
> }
> vals[i] = NULL;
>
> --
Other than that,
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>