[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/6] target/microblaze: Use the IEC binary prefix definitions
From: |
Edgar E. Iglesias |
Subject: |
Re: [PATCH 1/6] target/microblaze: Use the IEC binary prefix definitions |
Date: |
Thu, 3 Jun 2021 18:29:12 +0200 |
On Thu, Jun 03, 2021 at 11:03:05AM +0200, Philippe Mathieu-Daudé wrote:
> IEC binary prefixes ease code review: the unit is explicit.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> ---
> target/microblaze/mmu.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/target/microblaze/mmu.c b/target/microblaze/mmu.c
> index cc40f275eaf..1481e2769f1 100644
> --- a/target/microblaze/mmu.c
> +++ b/target/microblaze/mmu.c
> @@ -19,14 +19,15 @@
> */
>
> #include "qemu/osdep.h"
> +#include "qemu/units.h"
> #include "cpu.h"
> #include "exec/exec-all.h"
>
> static unsigned int tlb_decode_size(unsigned int f)
> {
> static const unsigned int sizes[] = {
> - 1 * 1024, 4 * 1024, 16 * 1024, 64 * 1024, 256 * 1024,
> - 1 * 1024 * 1024, 4 * 1024 * 1024, 16 * 1024 * 1024
> + 1 * KiB, 4 * KiB, 16 * KiB, 64 * KiB, 256 * KiB,
> + 1 * MiB, 4 * MiB, 16 * MiB
> };
> assert(f < ARRAY_SIZE(sizes));
> return sizes[f];
> --
> 2.26.3
>
- [PATCH 0/6] target/microblaze: Clean up MMU translation failed path, Philippe Mathieu-Daudé, 2021/06/03
- [PATCH 1/6] target/microblaze: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2021/06/03
- [PATCH 2/6] target/microblaze: Extract FPU helpers to fpu_helper.c, Philippe Mathieu-Daudé, 2021/06/03
- [PATCH 3/6] target/microblaze: Assert transaction failures have exception enabled, Philippe Mathieu-Daudé, 2021/06/03
- [PATCH 4/6] target/microblaze: Fix Exception Status Register 'Cause' definitions, Philippe Mathieu-Daudé, 2021/06/03
- [PATCH 5/6] target/microblaze: Replace magic values by proper definitions, Philippe Mathieu-Daudé, 2021/06/03