mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Iyer, Sundar" <sundar.iyer@intel.com>
To: "tglx@linutronix.de" <tglx@linutronix.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"lethal@linux-sh.org" <lethal@linux-sh.org>,
	"arjan@linux.intel.com" <arjan@linux.intel.com>,
	"Monroy, German" <german.monroy@intel.com>
Subject: RE: [PATCH v2] x86/irq: handle chained interrupts during IRQ migration
Date: Wed, 6 Jun 2012 17:52:21 +0000	[thread overview]
Message-ID: <2FABAEF0D3DCAF4F9C9628D6E2F968451D8329@BGSMSX102.gar.corp.intel.com> (raw)
In-Reply-To: <1338370137-18929-1-git-send-email-sundar.iyer@intel.com>

Hi Thomas,

Any comments on this version? Or do you suggest to add a new flag in the accessors and set it?

Thanks

>-----Original Message-----
>From: Iyer, Sundar
>Sent: Wednesday, May 30, 2012 2:59 PM
>To: tglx@linutronix.de
>Cc: linux-kernel@vger.kernel.org; lethal@linux-sh.org; arjan@linux.intel.com; Iyer,
>Sundar; Monroy, German
>Subject: [PATCH v2] x86/irq: handle chained interrupts during IRQ migration
>
>Chained interrupt handlers dont have an irqaction and hence are not handled during
>migrating interrupts when some cores go offline.
>
>Handle this by introducing a irq_is_chained() check which is based on the the very least
>NOREQUEST, NOPROBE, and NOTHREAD flags being set for such interrupts.
>fixup_irq() can then handle such interrupts and not skip them over.
>
>Change-Id: I011de8bee98c1702a362deb06106845ca7bcad61
>Signed-off-by: Sundar Iyer <sundar.iyer@intel.com>
>---
>v1: use accessors instead of new variables to identify chained irqs
>v2: use a mask of NOREQUEST, NOPROBE, and NOTHREAD accessor flags as per
>Paul M
>
> arch/x86/kernel/irq.c   |    6 ++++--
> include/linux/irqdesc.h |   11 +++++++++++
> 2 files changed, 15 insertions(+), 2 deletions(-)
>
>diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 6c0802e..acd7949 100644
>--- a/arch/x86/kernel/irq.c
>+++ b/arch/x86/kernel/irq.c
>@@ -249,8 +249,10 @@ void fixup_irqs(void)
>
> 		data = irq_desc_get_irq_data(desc);
> 		affinity = data->affinity;
>-		if (!irq_has_action(irq) || irqd_is_per_cpu(data) ||
>-		    cpumask_subset(affinity, cpu_online_mask)) {
>+		/* include IRQs who have no action, but are chained */
>+		if ((!irq_has_action(irq) && irq_is_chained(irq)) ||
>+			irqd_is_per_cpu(data) ||
>+			cpumask_subset(affinity, cpu_online_mask)) {
> 			raw_spin_unlock(&desc->lock);
> 			continue;
> 		}
>diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 2d921b3..8d5eb42
>100644
>--- a/include/linux/irqdesc.h
>+++ b/include/linux/irqdesc.h
>@@ -120,6 +120,17 @@ static inline int irq_has_action(unsigned int irq)
> 	return desc->action != NULL;
> }
>
>+/*
>+ * Test to see if the IRQ is chained; it would not be requested and
>+hence
>+ * very miinimum _IRQ_NOREQUEST, _IRQ_NOPROBE, _IRQ_NOTHREAD  would be
>+set  */ static inline int irq_is_chained(unsigned int irq) {
>+	struct irq_desc *desc = irq_to_desc(irq);
>+	return !(desc->status_use_accessors &
>+			(IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOTHREAD)); }
>+
> /* caller has locked the irq_desc and both params are valid */  static inline void
>__irq_set_handler_locked(unsigned int irq,
> 					    irq_flow_handler_t handler)
>--
>1.7.1


  reply	other threads:[~2012-06-06 17:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-30  9:28 Sundar Iyer
2012-06-06 17:52 ` Iyer, Sundar [this message]
2012-06-06 21:01   ` Thomas Gleixner

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=2FABAEF0D3DCAF4F9C9628D6E2F968451D8329@BGSMSX102.gar.corp.intel.com \
    --to=sundar.iyer@intel.com \
    --cc=arjan@linux.intel.com \
    --cc=german.monroy@intel.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®