[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87h5uycjr9.ffs@tglx>
Date: Thu, 13 Nov 2025 11:24:58 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Luigi Rizzo <lrizzo@...gle.com>, Marc Zyngier <maz@...nel.org>, Luigi
Rizzo <rizzo.unipi@...il.com>, Paolo Abeni <pabeni@...hat.com>, Andrew
Morton <akpm@...ux-foundation.org>, Sean Christopherson
<seanjc@...gle.com>, Jacob Pan <jacob.jun.pan@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org, Bjorn Helgaas
<bhelgaas@...gle.com>, Willem de Bruijn <willemb@...gle.com>, Luigi Rizzo
<lrizzo@...gle.com>
Subject: Re: [PATCH 2/6] genirq: soft_moderation: add base files, procfs hooks
On Thu, Nov 13 2025 at 10:29, Thomas Gleixner wrote:
> On Wed, Nov 12 2025 at 19:24, Luigi Rizzo wrote:
>> +static void set_moderation_mode(struct irq_desc *desc, bool mode)
>> +{
>> + if (desc) {
>
> Why would desc be NULL?
>
>> + struct irq_chip *chip = desc->irq_data.chip;
>> +
>> + /* Make sure this is msi and we can run enable_irq from irq context */
>> + mode &= desc->handle_irq == handle_edge_irq && chip && chip->irq_bus_lock == NULL &&
>> + chip->irq_bus_sync_unlock == NULL;
Q: How does this make sure that it is MSI?
A: Not at all
Q: How is this protected against concurrent modification?
A: Not at all
>> + if (mode != desc->moderation_mode)
>> + desc->moderation_mode = mode;
This conditional is truly making a difference.
Thanks
tglx
Powered by blists - more mailing lists