linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] genirq: Saving/restoring the irqchip state of an irq line
@ 2014-10-25 10:14 Marc Zyngier
  2014-10-25 10:14 ` [PATCH 1/3] genirq: Allow the irqchip state of an IRQ to be save/restored Marc Zyngier
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Marc Zyngier @ 2014-10-25 10:14 UTC (permalink / raw)
  To: linux-arm-kernel

Despite Linux offering a rather fine grained control over the life
cycle of an interrupt, there is a few cases where it would be very
useful to snapshot (or even set) the internal state of the interrupt
controller for a given interrupt line:

- With KVM, a device shared between VMs must have its whole context
  switched, and that includes the interrupt line state. KVM/arm is
  moving to using this.
- Some GPIO controllers seem to require peeking into the interrupt controller
  they are connected to to report their internal state.

Instead of letting people facing this situation doing horrible
(controller specific) hacks in their code, let's offer a couple of new
entry points that allow a few attributes to be read and set.

Of course, this is a very dangerous thing to do if you don't know what
you doing, and I wouldn't expect most drivers to use this. But this
can also be a life saver at times.

This patch series implement said API, and adds support for this to the
two main ARM interrupt controllers (GIC and GICv3).

Based on 3.18-rc1, tested on arm/arm64, and also available at:
git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/irqchip_state

Marc Zyngier (3):
  genirq: Allow the irqchip state of an IRQ to be save/restored
  irqchip: GIC: Add support for irq_{get,set}_irqchip_state
  irqchip: GICv3: Add support for irq_{get,set}_irqchip_state

 drivers/irqchip/irq-gic-v3.c | 78 ++++++++++++++++++++++++++++++++++++--------
 drivers/irqchip/irq-gic.c    | 70 ++++++++++++++++++++++++++++++++++++---
 include/linux/interrupt.h    |  2 ++
 include/linux/irq.h          | 18 ++++++++++
 kernel/irq/manage.c          | 71 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 221 insertions(+), 18 deletions(-)

-- 
2.1.0

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

end of thread, other threads:[~2014-11-19 19:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-25 10:14 [PATCH 0/3] genirq: Saving/restoring the irqchip state of an irq line Marc Zyngier
2014-10-25 10:14 ` [PATCH 1/3] genirq: Allow the irqchip state of an IRQ to be save/restored Marc Zyngier
2014-10-25 19:35   ` Thomas Gleixner
2014-10-25 19:42     ` Thomas Gleixner
2014-10-27 11:47       ` Marc Zyngier
2014-11-19 19:10         ` Bjorn Andersson
2014-10-29 10:12   ` Linus Walleij
2014-10-29 11:17     ` Marc Zyngier
2014-10-31  9:57       ` Linus Walleij
2014-10-25 10:14 ` [PATCH 2/3] irqchip: GIC: Add support for irq_{get, set}_irqchip_state Marc Zyngier
2014-10-29 10:14   ` Linus Walleij
2014-10-29 10:22     ` Marc Zyngier
2014-10-25 10:14 ` [PATCH 3/3] irqchip: GICv3: " Marc Zyngier

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).