From: Andrea Parri <parri.andrea@gmail.com>
To: Alexandre Ghiti <alex@ghiti.fr>
Cc: Xu Lu <luxu.kernel@bytedance.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [External] Re: [PATCH] riscv: Fix local irq restore when flags indicates irq disabled
Date: Tue, 18 Jun 2024 13:05:49 +0200 [thread overview]
Message-ID: <ZnFqDRXRjoHMaJXW@andrea> (raw)
In-Reply-To: <329b22c6-435c-424a-8211-b9a029b0897d@ghiti.fr>
(merging replies)
> > > However, if local_irq_save() is called when irq is disabled. The SR_IE bit of
> > > flag returned is clear. If some code between local_irq_save() and
> > > local_irq_restore() reenables irq, causing the SR_IE bit of CSR_STATUS
> > > back to 1, then local_irq_restore() can not restore irq status back to disabled.
But doesn't that represent some bogus manipulation of the irq flags? cf.
config DEBUG_IRQFLAGS
bool "Debug IRQ flag manipulation"
help
Enables checks for potentially unsafe enabling or disabling of
interrupts, such as calling raw_local_irq_restore() when interrupts
are enabled.
in particular, raw_check_bogus_irq_restore() in raw_local_irq_restore().
> This got lost but this is still correct and needed.
You mean because of the mentioned rtl8723e example? are there other such
instances? IOW, why do you say that the changes in question are needed?
Andrea
next prev parent reply other threads:[~2024-06-18 11:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-25 7:05 [PATCH] riscv: Fix local irq restore when flags indicates irq disabled Xu Lu
2023-08-09 6:05 ` Palmer Dabbelt
2023-08-09 6:58 ` [External] " 旭路
2023-08-24 12:08 ` Xu Lu
2024-06-18 9:45 ` Alexandre Ghiti
2024-06-18 10:00 ` Xu Lu
2024-06-18 10:02 ` Alexandre Ghiti
2024-06-18 11:05 ` Andrea Parri [this message]
2024-06-18 11:52 ` Alexandre Ghiti
2024-06-19 3:53 ` Xu Lu
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=ZnFqDRXRjoHMaJXW@andrea \
--to=parri.andrea@gmail.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=luxu.kernel@bytedance.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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