hw/intc/riscv_aplic: Remove redundant "hart_idx" masking
PATCH v2 1/1 hw/intc/riscv_aplic: Remove redundant "hart_idx" masking
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.
--- hw/intc/riscv_aplic.c | 1 - 1 file changed, 1 deletion(-)
hw/intc/riscv_aplic.c +0 -1
@@ -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 ;
Signature · 1 line
2.34.1
Quoted 10 lines · Huang Borong
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 finalqemu_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 <[email protected]>Reviewed-by Daniel Henrique Barboza <[email protected]>---
Please add a changelog here when sending new versions. In this case, it could just be
v2: Improved commit message and added text about qemu_log_mask
to the commit message
Also CC reviewers of previous versions even if they weren't CC'ed on the version they reviewed.
Quoted 19 lines
hw/intc/riscv_aplic.c | 1 - 1 file changed, 1 deletion(-)hw/intc/riscv_aplic.c +0
-1@@ -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 ;Signature · 1 line
2.34.1
Alistair Francis
AppliedQuoted 10 lines · Huang Borong
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 finalqemu_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 <[email protected]>Reviewed-by Daniel Henrique Barboza <[email protected]>
Thanks!
Applied to riscv-to-apply.next
Alistair
Quoted 20 lines
--- hw/intc/riscv_aplic.c | 1 - 1 file changed, 1 deletion(-)hw/intc/riscv_aplic.c +0
-2@@ -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