From: Alistair Francis <alistair23@gmail.com>
To: Sergey Makarov <s.makarov@syntacore.com>
Cc: Alistar.Francis@wdc.com, bmeng.cn@gmail.com, palmer@dabbelt.com,
qemu-riscv@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 2/2] hw/intc: Don't clear pending bits on IRQ lowering
Date: Tue, 8 Oct 2024 11:25:17 +1000 [thread overview]
Message-ID: <CAKmqyKOSqzC9d8PUbCgHcme9UMMT_wz6U8gXHfYjLDnR9b=dFA@mail.gmail.com> (raw)
In-Reply-To: <20240918140229.124329-3-s.makarov@syntacore.com>
On Thu, Sep 19, 2024 at 12:03 AM Sergey Makarov <s.makarov@syntacore.com> wrote:
>
> According to PLIC specification (chapter 5), there
> is only one case, when interrupt is claimed. Fix
> PLIC controller to match this behavior.
>
> Signed-off-by: Sergey Makarov <s.makarov@syntacore.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> hw/intc/sifive_plic.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/intc/sifive_plic.c b/hw/intc/sifive_plic.c
> index 3f3ee96ebc..deec162630 100644
> --- a/hw/intc/sifive_plic.c
> +++ b/hw/intc/sifive_plic.c
> @@ -354,8 +354,10 @@ static void sifive_plic_irq_request(void *opaque, int irq, int level)
> {
> SiFivePLICState *s = opaque;
>
> - sifive_plic_set_pending(s, irq, level > 0);
> - sifive_plic_update(s);
> + if (level > 0) {
> + sifive_plic_set_pending(s, irq, true);
> + sifive_plic_update(s);
> + }
> }
>
> static void sifive_plic_realize(DeviceState *dev, Error **errp)
> --
> 2.34.1
>
>
next prev parent reply other threads:[~2024-10-08 1:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-18 14:02 [PATCH 0/2] riscv: hw/intc: Fixes for standard conformance Sergey Makarov
2024-09-18 14:02 ` [PATCH 1/2] hw/intc: Make zeroth priority register read-only Sergey Makarov
2024-10-08 1:19 ` Alistair Francis
2024-09-18 14:02 ` [PATCH 2/2] hw/intc: Don't clear pending bits on IRQ lowering Sergey Makarov
2024-10-08 1:25 ` Alistair Francis [this message]
2024-10-08 1:28 ` [PATCH 0/2] riscv: hw/intc: Fixes for standard conformance Alistair Francis
-- strict thread matches above, loose matches on Subject: below --
2024-09-11 13:18 [PATCH 0/2] " Sergey Makarov
2024-09-11 13:19 ` [PATCH 2/2] hw/intc: Don't clear pending bits on IRQ lowering Sergey Makarov
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='CAKmqyKOSqzC9d8PUbCgHcme9UMMT_wz6U8gXHfYjLDnR9b=dFA@mail.gmail.com' \
--to=alistair23@gmail.com \
--cc=Alistar.Francis@wdc.com \
--cc=bmeng.cn@gmail.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=s.makarov@syntacore.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).