All of lore.kernel.org
 help / color / mirror / Atom feed
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/5] Fix regression introduced by set_irq_flags() removal
Date: Tue, 20 Oct 2015 16:23:33 +0200	[thread overview]
Message-ID: <20151020162333.5b4ca490@free-electrons.com> (raw)
In-Reply-To: <20151020141736.GX32532@n2100.arm.linux.org.uk>

Russell,

On Tue, 20 Oct 2015 15:17:36 +0100, Russell King - ARM Linux wrote:

> However, this is rather worrying.  NOAUTOEN is supposed to avoid enabling
> the interrupt when the interrupt is claimed.
> 
> If, as a result of Rob's patch, we now have a load of IRQs which are
> marked with NOAUTOEN which weren't, that's quite a large regression -
> possibly one which hasn't been properly found (not everyone tests -rc
> kernels) and we may be better to revert Rob's patch to avoid lots of
> breakge being reported when 4.3 is released.

I believe the problem is only for per-CPU interrupts. We have
IRQ_NOAUTOEN set for per-CPU interrupts because:

static inline void irq_set_percpu_devid_flags(unsigned int irq)
{
        irq_set_status_flags(irq,
                             IRQ_NOAUTOEN | IRQ_PER_CPU | IRQ_NOTHREAD |
                             IRQ_NOPROBE | IRQ_PER_CPU_DEVID);
}

Calling set_irq_flags() used to have the effect of *clearing* the
IRQ_NOAUTOEN flag:

-void set_irq_flags(unsigned int irq, unsigned int iflags)
-{
-       unsigned long clr = 0, set = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
-
-       if (irq >= nr_irqs) {
-               pr_err("Trying to set irq flags for IRQ%d\n", irq);
-               return;
-       }
-
-       if (iflags & IRQF_VALID)
-               clr |= IRQ_NOREQUEST;
-       if (iflags & IRQF_PROBE)
-               clr |= IRQ_NOPROBE;
-       if (!(iflags & IRQF_NOAUTOEN))
-               clr |= IRQ_NOAUTOEN;
-       /* Order is clear bits in "clr" then set bits in "set" */
-       irq_modify_status(irq, clr, set & ~clr);
-}

I.e, unless you were passing IRQF_NOAUTOEN in your set_irq_flags()
invocation, set_irq_flags() was automatically clearing the IRQ_NOAUTOEN
bit.

But this is really only a per-CPU interrupt problem, which probably
limits the potential regressions caused by Rob's change.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Jason Cooper <jason@lakedaemon.net>,
	Lior Amsalem <alior@marvell.com>, Andrew Lunn <andrew@lunn.ch>,
	Tawfik Bayouk <tawfik@marvell.com>,
	Marc Zyngier <marc.zyngier@arm.com>,
	linux-kernel@vger.kernel.org, Nadav Haklai <nadavh@marvell.com>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH 0/5] Fix regression introduced by set_irq_flags() removal
Date: Tue, 20 Oct 2015 16:23:33 +0200	[thread overview]
Message-ID: <20151020162333.5b4ca490@free-electrons.com> (raw)
In-Reply-To: <20151020141736.GX32532@n2100.arm.linux.org.uk>

Russell,

On Tue, 20 Oct 2015 15:17:36 +0100, Russell King - ARM Linux wrote:

> However, this is rather worrying.  NOAUTOEN is supposed to avoid enabling
> the interrupt when the interrupt is claimed.
> 
> If, as a result of Rob's patch, we now have a load of IRQs which are
> marked with NOAUTOEN which weren't, that's quite a large regression -
> possibly one which hasn't been properly found (not everyone tests -rc
> kernels) and we may be better to revert Rob's patch to avoid lots of
> breakge being reported when 4.3 is released.

I believe the problem is only for per-CPU interrupts. We have
IRQ_NOAUTOEN set for per-CPU interrupts because:

static inline void irq_set_percpu_devid_flags(unsigned int irq)
{
        irq_set_status_flags(irq,
                             IRQ_NOAUTOEN | IRQ_PER_CPU | IRQ_NOTHREAD |
                             IRQ_NOPROBE | IRQ_PER_CPU_DEVID);
}

Calling set_irq_flags() used to have the effect of *clearing* the
IRQ_NOAUTOEN flag:

-void set_irq_flags(unsigned int irq, unsigned int iflags)
-{
-       unsigned long clr = 0, set = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
-
-       if (irq >= nr_irqs) {
-               pr_err("Trying to set irq flags for IRQ%d\n", irq);
-               return;
-       }
-
-       if (iflags & IRQF_VALID)
-               clr |= IRQ_NOREQUEST;
-       if (iflags & IRQF_PROBE)
-               clr |= IRQ_NOPROBE;
-       if (!(iflags & IRQF_NOAUTOEN))
-               clr |= IRQ_NOAUTOEN;
-       /* Order is clear bits in "clr" then set bits in "set" */
-       irq_modify_status(irq, clr, set & ~clr);
-}

I.e, unless you were passing IRQF_NOAUTOEN in your set_irq_flags()
invocation, set_irq_flags() was automatically clearing the IRQ_NOAUTOEN
bit.

But this is really only a per-CPU interrupt problem, which probably
limits the potential regressions caused by Rob's change.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-10-20 14:23 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20 13:23 [PATCH 0/5] Fix regression introduced by set_irq_flags() removal Thomas Petazzoni
2015-10-20 13:23 ` Thomas Petazzoni
2015-10-20 13:23 ` [PATCH 1/5] kernel: irq: implement is_enabled_percpu_irq() Thomas Petazzoni
2015-10-20 13:23   ` Thomas Petazzoni
2015-12-08 11:57   ` [tip:irq/core] genirq: Implement irq_percpu_is_enabled() tip-bot for Thomas Petazzoni
2015-10-20 13:23 ` [PATCH 2/5] irqchip: armada-370-xp: prepare additions to armada_xp_mpic_secondary_init() Thomas Petazzoni
2015-10-20 13:23   ` Thomas Petazzoni
2015-10-20 14:00   ` Gregory CLEMENT
2015-10-20 14:00     ` Gregory CLEMENT
2015-10-20 13:23 ` [PATCH 3/5] irqchip: armada-370-xp: re-enable per-CPU interrupts at resume time Thomas Petazzoni
2015-10-20 13:23   ` Thomas Petazzoni
2015-10-20 13:46   ` Gregory CLEMENT
2015-10-20 13:46     ` Gregory CLEMENT
2015-10-20 13:50     ` Thomas Petazzoni
2015-10-20 13:50       ` Thomas Petazzoni
2015-10-25 21:22   ` Marcin Wojtas
2015-10-25 21:22     ` Marcin Wojtas
2015-10-26  0:10     ` Thomas Petazzoni
2015-10-26  0:10       ` Thomas Petazzoni
2015-10-26  4:35       ` Marcin Wojtas
2015-10-26  4:35         ` Marcin Wojtas
2015-10-26  5:09         ` Thomas Petazzoni
2015-10-26  5:09           ` Thomas Petazzoni
2015-10-26  7:06           ` Marcin Wojtas
2015-10-26  7:06             ` Marcin Wojtas
2015-10-26  8:27             ` Thomas Petazzoni
2015-10-26  8:27               ` Thomas Petazzoni
2015-10-20 13:23 ` [PATCH 4/5] irqchip: armada-370-xp: re-order register definitions Thomas Petazzoni
2015-10-20 13:23   ` Thomas Petazzoni
2015-10-20 13:55   ` Gregory CLEMENT
2015-10-20 13:55     ` Gregory CLEMENT
2015-10-20 13:23 ` [PATCH 5/5] irqchip: armada-370-xp: document the overall driver logic Thomas Petazzoni
2015-10-20 13:23   ` Thomas Petazzoni
2015-10-20 13:59   ` Gregory CLEMENT
2015-10-20 13:59     ` Gregory CLEMENT
2015-10-20 14:00   ` Thomas Petazzoni
2015-10-20 14:00     ` Thomas Petazzoni
2015-10-20 14:07     ` Jason Cooper
2015-10-20 14:07       ` Jason Cooper
2015-10-20 14:04 ` [PATCH 0/5] Fix regression introduced by set_irq_flags() removal Jason Cooper
2015-10-20 14:04   ` Jason Cooper
2015-10-20 14:08   ` Thomas Petazzoni
2015-10-20 14:08     ` Thomas Petazzoni
2015-10-20 14:17     ` Russell King - ARM Linux
2015-10-20 14:17       ` Russell King - ARM Linux
2015-10-20 14:23       ` Thomas Petazzoni [this message]
2015-10-20 14:23         ` Thomas Petazzoni
2015-10-20 19:24       ` Thomas Gleixner
2015-10-20 19:24         ` Thomas Gleixner
2015-10-22  8:01         ` Thomas Gleixner
2015-10-22  8:01           ` Thomas Gleixner
2015-10-20 19:23     ` Thomas Gleixner
2015-10-20 19:23       ` Thomas Gleixner
2015-10-21 13:48       ` [PATCH] irqchip: irq-armada-370-xp: fix regression by clearing IRQ_NOAUTOEN Thomas Petazzoni
2015-10-21 13:48         ` Thomas Petazzoni
2015-10-21 14:41         ` Jason Cooper
2015-10-21 14:41           ` Jason Cooper
2015-10-21 13:49       ` [PATCH 0/5] Fix regression introduced by set_irq_flags() removal Thomas Petazzoni
2015-10-21 13:49         ` Thomas Petazzoni
2015-11-11  8:26       ` Thomas Petazzoni
2015-11-11  8:26         ` Thomas Petazzoni
2015-11-13 20:11         ` Thomas Gleixner
2015-11-13 20:11           ` Thomas Gleixner
2015-12-04 11:03           ` Thomas Petazzoni
2015-12-04 11:03             ` Thomas Petazzoni
2015-12-05 17:24             ` Thomas Gleixner
2015-12-05 17:24               ` Thomas Gleixner
2015-12-06  9:28               ` Thomas Gleixner
2015-12-06  9:28                 ` Thomas Gleixner
2015-12-08  8:58                 ` Thomas Petazzoni
2015-12-08  8:58                   ` Thomas Petazzoni
2015-12-08 10:54                   ` Thomas Gleixner
2015-12-08 10:54                     ` Thomas Gleixner
2017-02-24 16:56                     ` Thomas Petazzoni
2017-02-24 16:56                       ` Thomas Petazzoni

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=20151020162333.5b4ca490@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.