All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Fix regression introduced by set_irq_flags() removal
@ 2015-10-20 13:23 ` Thomas Petazzoni
  0 siblings, 0 replies; 75+ messages in thread
From: Thomas Petazzoni @ 2015-10-20 13:23 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier
  Cc: linux-kernel, linux-arm-kernel, Tawfik Bayouk, Nadav Haklai,
	Lior Amsalem, Andrew Lunn, Sebastian Hesselbarth,
	Gregory Clement, Thomas Petazzoni

Thomas, Jason, Marc, Rob,

In commit d17cab4451df ("irqchip: Kill off set_irq_flags usage"), Rob
Herring modified the irqchip drivers to not use the ARM-specific
set_irq_flags() and instead rely on various functions provided by the
core irq subsystem.

While his commit was supposed to have no functional effect, it in fact
does have one effect: the IRQ_NOAUTOEN flag used to be *cleared* for
all interrupts and it is now *set* by default.

Thanks to this flag being *cleared* by default, the irq-armada-370-xp
was able to properly re-enable per-CPU interrupts at resume time. Now
that this flag is *set*, the irqd_irq_disabled() function no longer
indicates that such per-CPU interrupts are enabled (and in fact a
CPU-global flag to tell whether a per-CPU is enabled or not is
silly). Due to this, our local timer per-CPU interrupt is no longer
re-enabled at resume time on Armada XP, on the boot CPU, which causes
a hang at resume time.

This is a regression between 4.2 (where suspend/resume works fine) and
4.3-rc (where suspend/resume is broken). Reverting d17cab4451df1 on
top of 4.3-rc makes the problem go away (of course you also need to
revert eb811129ed9ea so that set_irq_flags is re-introduced).

The minimal fix would be to clear the IRQ_NOAUTOEN flag so that we get
back to the original situation. However, this does not really seem
like the right fix.

Instead, this patch series proposes to add an is_enabled_percpu_irq()
function to the core irq subsystem, which is then used by the
irq-armada-370-xp to find out if such or such per-CPU interrupt should
be re-enabled at resume time on the boot CPU.

The organization of the patch series is as follows:

 - PATCH 1 introduces the is_enabled_percpu_irq() function.

 - PATCH 2 does a minor refactoring of armada_xp_mpic_secondary_init()
   to prepare the following patch.

 - PATCH 3 changes the irq-armada-370-xp driver to use the
   is_enabled_percpu_irq() to re-enable the per-CPU interrupts on the
   boot CPU at resume time, and also modifies the secondary CPU
   notifier to re-enable per-CPU interrupts if needed.

 - PATCH 4 and 5 are further cleanups/improvements to the
   irq-armada-370-xp, which are not needed to fix the problem.

Since this is fixing a regression introduced between 4.2 and 4.3-rc,
it would be great if patches 1 to 3 could be merged in 4.3. The last
two patches are only cosmetic, so merging them for 4.4 is of course
the way to go.

Thanks,

Thomas

Thomas Petazzoni (5):
  kernel: irq: implement is_enabled_percpu_irq()
  irqchip: armada-370-xp: prepare additions to
    armada_xp_mpic_secondary_init()
  irqchip: armada-370-xp: re-enable per-CPU interrupts at resume time
  irqchip: armada-370-xp: re-order register definitions
  irqchip: armada-370-xp: document the overall driver logic

 drivers/irqchip/irq-armada-370-xp.c | 151 +++++++++++++++++++++++++++++++-----
 include/linux/interrupt.h           |   1 +
 kernel/irq/chip.c                   |   5 ++
 kernel/irq/internals.h              |   1 +
 kernel/irq/manage.c                 |  19 +++++
 5 files changed, 158 insertions(+), 19 deletions(-)

-- 
2.6.2


^ permalink raw reply	[flat|nested] 75+ messages in thread

end of thread, other threads:[~2017-02-24 17:06 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.