From: "Farber, Eliav" <farbere@amazon.com>
To: Thomas Gleixner <tglx@linutronix.de>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"will@kernel.org" <will@kernel.org>,
"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
"npiggin@gmail.com" <npiggin@gmail.com>,
"christophe.leroy@csgroup.eu" <christophe.leroy@csgroup.eu>,
"naveen@kernel.org" <naveen@kernel.org>,
"maddy@linux.ibm.com" <maddy@linux.ibm.com>,
"paul.walmsley@sifive.com" <paul.walmsley@sifive.com>,
"palmer@dabbelt.com" <palmer@dabbelt.com>,
"aou@eecs.berkeley.edu" <aou@eecs.berkeley.edu>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"bhe@redhat.com" <bhe@redhat.com>,
"hbathini@linux.ibm.com" <hbathini@linux.ibm.com>,
"adityag@linux.ibm.com" <adityag@linux.ibm.com>,
"songshuaishuai@tinylab.org" <songshuaishuai@tinylab.org>,
"takakura@valinux.co.jp" <takakura@valinux.co.jp>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-riscv@lists.infradead.org"
<linux-riscv@lists.infradead.org>
Cc: "Chocron, Jonathan" <jonnyc@amazon.com>
Subject: RE: [PATCH v2] arm64: kexec: Check if IRQ is already masked before masking
Date: Thu, 28 Nov 2024 20:07:57 +0000 [thread overview]
Message-ID: <3a499ecdfa5042f8b6e8834c47cdb2d9@amazon.com> (raw)
On 11/28/2024 12:39 PM, Thomas Gleixner wrote:
> This is just wrong. If the interrupt was torn down, then its state is deactivated and it was masked already. So the EOI handling and the mask/disable dance are neither required nor make sense.
>
> So this whole thing should be:
>
> chip = irq_desc_get_chip(desc);
> - if (!chip)
> + if (!chip || !irqd_is_started(&desc->irq_data))
> continue;
ACK. Will be done this way in V3.
> But what's worse is that we have 4 almost identical variants of the same code.
>
> So instead of exposing core functionality and "fixing" up four variants, can we please have a consolidated version of this function in the core
> code:
> struct irq_chip *chip;
> int check_eoi = 1;
>
> chip = irq_desc_get_chip(desc);
> if (!chip || !irqd_is_started(&desc->irq_data))
> continue;
>
> if (IS_ENABLED(CONFIG_.....)) {
> /*
> * Add a sensible comment which explains this.
> */
> check_eoi = irq_set_irqchip_state(....);
> }
>
> if (check_eoi && ....)
> chip->irq_eoi(&desc->irq_data);
>
> irq_shutdown(desc);
>
> No?
In V3 I will add a preliminary patch that will remove the four variants
and instead add a common implementations to the kexec core.
Thanks, Eliav
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2024-12-02 17:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-28 20:07 Farber, Eliav [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-27 15:22 [PATCH v2] arm64: kexec: Check if IRQ is already masked before masking Eliav Farber
2024-11-28 10:39 ` Thomas Gleixner
2024-11-28 10:43 ` Thomas Gleixner
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=3a499ecdfa5042f8b6e8834c47cdb2d9@amazon.com \
--to=farbere@amazon.com \
--cc=adityag@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=aou@eecs.berkeley.edu \
--cc=bhe@redhat.com \
--cc=catalin.marinas@arm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=hbathini@linux.ibm.com \
--cc=jonnyc@amazon.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=naveen@kernel.org \
--cc=npiggin@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=songshuaishuai@tinylab.org \
--cc=takakura@valinux.co.jp \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
/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).