On 12 April 2018 at 08:37, Eric Auger <eric.au...@redhat.com> wrote: > We introduce some helpers to handle wired IRQs and especially > GERROR interrupt. SMMU writes GERROR register on GERROR event > and SW acks GERROR interrupts by setting GERRORn. > > The Wired interrupts are edge sensitive hence the pulse usage. > > Signed-off-by: Eric Auger <eric.au...@redhat.com> > Signed-off-by: Prem Mallappa <prem.malla...@broadcom.com> > > --- > v9 - v10: > - s/hwaddr/uint64_t in trace-events > - use qemu_log_mask LOG_UNIMP on PRI IRQ > - add a comment saying smmuv3_trigger_irq and smmuv3_write_gerrorn > will become static later on > - write gerrorn without filtering (ie. even if the guest toggles non > active IRQs) > - pulse if at least one new IRQ type > - smmuv3_eventq_irq_enabled and smmuv3_gerror_irq_enabled become > static inline > > v7 -> v8: > - remove SMMU_PENDING_GERRORS macro > - properly toggle gerror > - properly sanitize gerrorn write > --- > hw/arm/smmuv3-internal.h | 36 +++++++++++---------------- > hw/arm/smmuv3.c | 64 > ++++++++++++++++++++++++++++++++++++++++++++++++ > hw/arm/trace-events | 3 +++ > 3 files changed, 81 insertions(+), 22 deletions(-) > > diff --git a/hw/arm/smmuv3-internal.h b/hw/arm/smmuv3-internal.h > index a6461fe..32f81d4 100644 > --- a/hw/arm/smmuv3-internal.h > +++ b/hw/arm/smmuv3-internal.h > @@ -129,28 +129,6 @@ typedef struct Evt { > uint32_t word[8]; > } Evt; > > -/** > - * smmu_read64 - 64-bit register read utility function supporting > - * aligned 32-bit word access to both 32-bit halves and aligned 64-bit > - * access. > - * > - * @r: register address > - * @offset: byte offset if 32-bit access > - * @size: read byte size > - */ > -static inline uint64_t smmu_read64(uint64_t r, unsigned offset, > - unsigned size) > -{ > - if (size == 8) { > - return r; > - } > - > - /* 32 bit access */ > - assert(!offset || offset == 4); > - > - return extract64(r, offset << 3, 32); > -} > -
Ah, this change should be squashed into the previous patch, which addresses one of my review comments there. Otherwise Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM