Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1238577

Re: [PATCH 1/2] genirq: Introduce a new flag IRQ_IS_CHAINED for chained interrupts

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] genirq: Introduce a new flag IRQ_IS_CHAINED for chained interrupts
Date 2015-10-02 22:20 +0200
Message-ID <qfeYb-5qP-19@gated-at.bofh.it> (permalink)
References <qf2tY-4cT-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 2 Oct 2015, Mika Westerberg wrote:

> In some cases it is useful to know if the interrupt in question has chained
> handler installed. For example when a cpu is offlined the architecture code
> needs to know if it has any users so that it can fixup affinity
> accordingly.
> 
> To make this possible we introduce a new flag IRQ_IS_CHAINED that is set by
> the core code when chained interrupt handler is installed. We also make it
> possible for core and architecture code to check the flag by introducing
> function irq_has_chained_handler() for this.

While looking at that patch it occured to me, that we can solve this
in a different way, which does not require any changes to the
migration code.

When we install the chained handler, we set the action of that irq
descriptor to a statically allocated chained_action which provides a
handler which emits a fat warning. chained handlers should never end
up calling an action and if they do, it's clearly a bug.

The availability of an action makes the migration code just pick it
and move it along. And that fixes all architectures in one go without
touching them.

Sorry, that I didn't think about this right away.

Thanks,

	tglx

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] genirq: Introduce a new flag IRQ_IS_CHAINED for chained interrupts Mika Westerberg <mika.westerberg@linux.intel.com> - 2015-10-02 09:00 +0200
  [PATCH 2/2] x86/irq: Take chained interrupts into account in fixup_irqs() Mika Westerberg <mika.westerberg@linux.intel.com> - 2015-10-02 09:00 +0200
  Re: [PATCH 1/2] genirq: Introduce a new flag IRQ_IS_CHAINED for  chained interrupts Thomas Gleixner <tglx@linutronix.de> - 2015-10-02 22:20 +0200
    [PATCH v2] genirq: Allow migration of chained interrupts by installing default action Mika Westerberg <mika.westerberg@linux.intel.com> - 2015-10-05 12:20 +0200

csiph-web