diff mbox

[v1,1/2] target-microblaze: mmu: Correct masking of output addresses

Message ID 20180614202502.668-2-edgar.iglesias@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Edgar E. Iglesias June 14, 2018, 8:25 p.m. UTC
From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

Correct the masking of output addresses.

This fixes Coverity CID 1391441.

Fixes: commit 3924a9aa02
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
 target/microblaze/mmu.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Alistair Francis June 14, 2018, 8:30 p.m. UTC | #1
On Thu, Jun 14, 2018 at 1:25 PM, Edgar E. Iglesias
<edgar.iglesias@gmail.com> wrote:
> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
>
> Correct the masking of output addresses.
>
> This fixes Coverity CID 1391441.
>
> Fixes: commit 3924a9aa02
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  target/microblaze/mmu.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/target/microblaze/mmu.c b/target/microblaze/mmu.c
> index f4ceaea520..fcf86b12d5 100644
> --- a/target/microblaze/mmu.c
> +++ b/target/microblaze/mmu.c
> @@ -159,7 +159,6 @@ unsigned int mmu_translate(struct microblaze_mmu *mmu,
>
>              lu->vaddr = tlb_tag;
>              lu->paddr = tlb_rpn & mmu->c_addr_mask;
> -            lu->paddr = tlb_rpn;
>              lu->size = tlb_size;
>              lu->err = ERR_HIT;
>              lu->idx = i;
> --
> 2.14.1
>
>
Philippe Mathieu-Daudé June 15, 2018, 2:42 a.m. UTC | #2
On 06/14/2018 05:25 PM, Edgar E. Iglesias wrote:
> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
> 
> Correct the masking of output addresses.
> 
> This fixes Coverity CID 1391441.
> 
> Fixes: commit 3924a9aa02
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  target/microblaze/mmu.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/target/microblaze/mmu.c b/target/microblaze/mmu.c
> index f4ceaea520..fcf86b12d5 100644
> --- a/target/microblaze/mmu.c
> +++ b/target/microblaze/mmu.c
> @@ -159,7 +159,6 @@ unsigned int mmu_translate(struct microblaze_mmu *mmu,
>  
>              lu->vaddr = tlb_tag;
>              lu->paddr = tlb_rpn & mmu->c_addr_mask;
> -            lu->paddr = tlb_rpn;
>              lu->size = tlb_size;
>              lu->err = ERR_HIT;
>              lu->idx = i;
>
diff mbox

Patch

diff --git a/target/microblaze/mmu.c b/target/microblaze/mmu.c
index f4ceaea520..fcf86b12d5 100644
--- a/target/microblaze/mmu.c
+++ b/target/microblaze/mmu.c
@@ -159,7 +159,6 @@  unsigned int mmu_translate(struct microblaze_mmu *mmu,
 
             lu->vaddr = tlb_tag;
             lu->paddr = tlb_rpn & mmu->c_addr_mask;
-            lu->paddr = tlb_rpn;
             lu->size = tlb_size;
             lu->err = ERR_HIT;
             lu->idx = i;