From: Peter Maydell <peter.maydell@linaro.org>
To: "Inès Varhol" <ines.varhol@telecom-paris.fr>
Cc: qemu-devel@nongnu.org, "Thomas Huth" <thuth@redhat.com>,
qemu-arm@nongnu.org,
"Samuel Tardieu" <samuel.tardieu@telecom-paris.fr>,
"Alistair Francis" <alistair@alistair23.me>,
"Arnaud Minier" <arnaud.minier@telecom-paris.fr>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Laurent Vivier" <lvivier@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v2 2/2] tests/qtest: Check that EXTI fan-in irqs are correctly connected
Date: Thu, 22 Feb 2024 15:10:06 +0000 [thread overview]
Message-ID: <CAFEAcA-0YoNML0vcM_5Pa6TE_9miDcvnonJrGt3P5V58_wLx=g@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-Vq+r2ivjttHMhZyyFBcPpNst2CQNQN9TRbCZ9WfiSAQ@mail.gmail.com>
On Thu, 22 Feb 2024 at 15:09, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Tue, 20 Feb 2024 at 18:41, Inès Varhol <ines.varhol@telecom-paris.fr> wrote:
> >
> > This commit adds a QTest that verifies each input line of a specific
> > EXTI OR gate can influence the output line.
> >
> > Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr>
> > Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> > ---
> >
> > Hello,
> >
> > I expected this test to fail after switching the two patch commits,
> > but it didn't.
> > I'm mentionning it in case it reveals a problem with the test I didn't notice.
>
> The specific thing that goes wrong if you don't have the OR
> gate handling is that the NVIC input will see every up
> and down transition from each input separately. (This happens
> because a GPIO/irq 'input' in QEMU is basically a function,
> and wiring up an 'output' to an 'input' is setting "this
> is the function pointer you should call when the output
> changes". Nothing syntactically stops you passing the
> same function pointer to multiple outputs.)
>
> So if you have for instance
> raise A; raise B; drop B; drop A
> where A and B are ORed together into an NVIC input,
> the NVIC input is supposed to see the line go high
> at "raise A" and only drop at the last "drop B". Without
...at the last "drop *A*", I mean.
> the OR gate, it will see it go high at "raise A", and then
> drop at "drop B". (Well, it sees "level is 1", "level is 1",
> "level is 0", "level is 0", but inputs expect to sometimes see
> calls for "level happens to be the same thing it was
> previously", so it doesn't cause the NVIC to change state.)
-- PMM
next prev parent reply other threads:[~2024-02-22 15:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 18:34 [PATCH v2 0/2] hw/arm: Fix STM32L4x5 EXTI to CPU irq fan-in connections Inès Varhol
2024-02-20 18:34 ` [PATCH v2 1/2] hw/arm: Use TYPE_OR_IRQ when connecting STM32L4x5 EXTI fan-in IRQs Inès Varhol
2024-02-23 6:29 ` Philippe Mathieu-Daudé
2024-02-26 0:17 ` Alistair Francis
2024-02-20 18:34 ` [PATCH v2 2/2] tests/qtest: Check that EXTI fan-in irqs are correctly connected Inès Varhol
2024-02-22 15:09 ` Peter Maydell
2024-02-22 15:10 ` Peter Maydell [this message]
2024-02-22 16:06 ` [PATCH v2 0/2] hw/arm: Fix STM32L4x5 EXTI to CPU irq fan-in connections Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFEAcA-0YoNML0vcM_5Pa6TE_9miDcvnonJrGt3P5V58_wLx=g@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=alistair@alistair23.me \
--cc=arnaud.minier@telecom-paris.fr \
--cc=ines.varhol@telecom-paris.fr \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=samuel.tardieu@telecom-paris.fr \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).