qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] hw/intc/riscv_aplic: Remove redundant "hart_idx" masking


From: Alistair Francis
Subject: Re: [PATCH v2] hw/intc/riscv_aplic: Remove redundant "hart_idx" masking
Date: Wed, 29 Jan 2025 11:51:16 +1000

On Wed, Jan 15, 2025 at 1:52 PM Huang Borong <huangborong@bosc.ac.cn> wrote:
>
> Remove the redundant masking of "hart_idx", as the same operation is
> performed later during address calculation.
>
> This change impacts the "hart_idx" value in the final qemu_log_mask()
> call. The original "hart_idx" parameter should be used for logging to
> ensure accuracy, rather than the masked value.
>
> Signed-off-by: Huang Borong <huangborong@bosc.ac.cn>
> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

Thanks!

Applied to riscv-to-apply.next

Alistair

> ---
>  hw/intc/riscv_aplic.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/hw/intc/riscv_aplic.c b/hw/intc/riscv_aplic.c
> index 4866649115..0974c6a5db 100644
> --- a/hw/intc/riscv_aplic.c
> +++ b/hw/intc/riscv_aplic.c
> @@ -421,7 +421,6 @@ static void riscv_aplic_msi_send(RISCVAPLICState *aplic,
>              APLIC_xMSICFGADDRH_HHXW_MASK;
>
>      group_idx = hart_idx >> lhxw;
> -    hart_idx &= APLIC_xMSICFGADDR_PPN_LHX_MASK(lhxw);
>
>      addr = msicfgaddr;
>      addr |= ((uint64_t)(msicfgaddrH & APLIC_xMSICFGADDRH_BAPPN_MASK)) << 32;
> --
> 2.34.1
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]