linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Saidi, Ali" <alisaidi@amazon.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	"Herrenschmidt, Benjamin" <benh@amazon.com>,
	"maz@kernel.org" <maz@kernel.org>
Cc: "jason@lakedaemon.net" <jason@lakedaemon.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"Woodhouse, David" <dwmw@amazon.co.uk>,
	"Zilberman, Zeev" <zeev@amazon.com>,
	"Machulsky, Zorik" <zorik@amazon.com>
Subject: Re: [PATCH] irqchip/gic-v3-its: Don't try to move a disabled irq
Date: Thu, 11 Jun 2020 17:44:45 +0000	[thread overview]
Message-ID: <24FB929B-CE0F-4B9D-8064-146A0CE0A15D@amazon.com> (raw)


On 6/8/20, 8:49 AM, "Thomas Gleixner" <tglx@linutronix.de> wrote:
    
    
    "Herrenschmidt, Benjamin" <benh@amazon.com> writes:
    > On Wed, 2020-06-03 at 16:16 +0100, Marc Zyngier wrote:
    >> > My original patch should certain check activated and not disabled.
    >> > With that do you still have reservations Marc?
    >>
    >> I'd still prefer it if we could do something in core code, rather
    >> than spreading these checks in the individual drivers. If we can't,
    >> fair enough. But it feels like the core set_affinity function could
    >> just do the same thing in a single place (although the started vs
    >> activated is yet another piece of the puzzle I didn't consider,
    >> and the ITS doesn't need the "can_reserve" thing).
    >
    > For the sake of fixing the problem in a timely and backportable way I
    > would suggest first merging the fix, *then* fixing the core core.
    
    The "fix" is just wrong
    
    >       if (cpu != its_dev->event_map.col_map[id]) {
    >               target_col = &its_dev->its->collections[cpu];
    > -             its_send_movi(its_dev, target_col, id);
    > +
    > +             /* If the IRQ is disabled a discard was sent so don't move */
    > +             if (!irqd_irq_disabled(d))
    
    That check needs to be !irqd_is_activated() because enable_irq() does
    not touch anything affinity related.
    
    > +                     its_send_movi(its_dev, target_col, id);
    > +
    >               its_dev->event_map.col_map[id] = cpu;
    >               irq_data_update_effective_affinity(d, cpumask_of(cpu));
    
    And then these associtations are disconnected from reality in any case.
    
    Something like the completely untested patch below should work.

I've been unable to reproduce the problem with your patch on an Arm system.

Thanks,

Ali




             reply	other threads:[~2020-06-11 17:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 17:44 Saidi, Ali [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-06-02 18:47 [PATCH] irqchip/gic-v3-its: Don't try to move a disabled irq Saidi, Ali
2020-06-03 15:16 ` Marc Zyngier
2020-06-03 22:14   ` Herrenschmidt, Benjamin
2020-06-08 13:48     ` Thomas Gleixner
2020-06-08 21:59       ` Benjamin Herrenschmidt
2020-06-08 23:36         ` Thomas Gleixner
2020-05-29  1:55 Ali Saidi
2020-05-29  4:07 ` Zenghui Yu
2020-05-29  8:32 ` Marc Zyngier
2020-05-29 12:36   ` Saidi, Ali
2020-05-30 16:49     ` Marc Zyngier
2020-05-31 11:09       ` Marc Zyngier
2020-06-01  0:10         ` Saidi, Ali
2020-06-01  2:40         ` Herrenschmidt, Benjamin
2020-06-02 20:54           ` Thomas Gleixner
2020-06-03 12:44             ` Marc Zyngier
2020-05-31  2:53 ` kbuild test robot

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=24FB929B-CE0F-4B9D-8064-146A0CE0A15D@amazon.com \
    --to=alisaidi@amazon.com \
    --cc=benh@amazon.com \
    --cc=dwmw@amazon.co.uk \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=zeev@amazon.com \
    --cc=zorik@amazon.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).