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
next reply other threads:[~2024-11-28 20:08 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$(echo .)com \
--cc=adityag@linux$(echo .)ibm.com \
--cc=akpm@linux-foundation$(echo .)org \
--cc=aou@eecs$(echo .)berkeley.edu \
--cc=bhe@redhat$(echo .)com \
--cc=catalin.marinas@arm$(echo .)com \
--cc=christophe.leroy@csgroup$(echo .)eu \
--cc=hbathini@linux$(echo .)ibm.com \
--cc=jonnyc@amazon$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-riscv@lists$(echo .)infradead.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=maddy@linux$(echo .)ibm.com \
--cc=mpe@ellerman$(echo .)id.au \
--cc=naveen@kernel$(echo .)org \
--cc=npiggin@gmail$(echo .)com \
--cc=palmer@dabbelt$(echo .)com \
--cc=paul.walmsley@sifive$(echo .)com \
--cc=songshuaishuai@tinylab$(echo .)org \
--cc=takakura@valinux$(echo .)co.jp \
--cc=tglx@linutronix$(echo .)de \
--cc=will@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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