[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 10/26] hw/intc/arm_gicv3_its: Use FIELD macros for DTEs
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 10/26] hw/intc/arm_gicv3_its: Use FIELD macros for DTEs |
Date: |
Mon, 13 Dec 2021 09:23:36 +0100 |
On Sun, Dec 12, 2021 at 10:16 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> On 12/11/21 20:11, Peter Maydell wrote:
> > Currently the ITS code that reads and writes DTEs uses open-coded
> > shift-and-mask to assemble the various fields into the 64-bit DTE
> > word. The names of the macros used for mask and shift values are
> > also somewhat inconsistent, and don't follow our usual convention
> > that a MASK macro should specify the bits in their place in the word.
> > Replace all these with use of the FIELD macro.
> >
> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> > ---
> > hw/intc/gicv3_internal.h | 7 ++++---
> > hw/intc/arm_gicv3_its.c | 20 +++++++++-----------
> > 2 files changed, 13 insertions(+), 14 deletions(-)
> >
> > diff --git a/hw/intc/gicv3_internal.h b/hw/intc/gicv3_internal.h
> > index 5a63e9ed5ce..6a3b145f377 100644
> > --- a/hw/intc/gicv3_internal.h
> > +++ b/hw/intc/gicv3_internal.h
> > @@ -393,9 +393,10 @@ FIELD(ITE_H, VPEID, 16, 16)
> > * Valid = 1 bit,ITTAddr = 44 bits,Size = 5 bits
> > */
> > #define GITS_DTE_SIZE (0x8ULL)
> > -#define GITS_DTE_ITTADDR_SHIFT 6
> > -#define GITS_DTE_ITTADDR_MASK
> > MAKE_64BIT_MASK(GITS_DTE_ITTADDR_SHIFT, \
> > - ITTADDR_LENGTH)
>
> Side note, both ITTADDR_LENGTH & ITTADDR_MASK definitions are now unused.
I misread the diff, once applying the series I noticed ITTADDR_MASK
is still used in process_mapd().