[patch 11/26] x64, x2apic/intr-remap: generic irq migration support from process context

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <mingo@...>, <hpa@...>, <tglx@...>, <akpm@...>, <arjan@...>, <andi@...>, <ebiederm@...>, <jbarnes@...>, <steiner@...>
Cc: <linux-kernel@...>, Suresh Siddha <suresh.b.siddha@...>
Date: Thursday, July 10, 2008 - 2:16 pm

Generic infrastructure for migrating the irq from the process context in the
presence of CONFIG_GENERIC_PENDING_IRQ.

This will be used later for migrating irq in the presence of
interrupt-remapping.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---

Index: tree-x86/include/linux/irq.h
===================================================================
--- tree-x86.orig/include/linux/irq.h	2008-07-10 09:51:45.000000000 -0700
+++ tree-x86/include/linux/irq.h	2008-07-10 09:52:07.000000000 -0700
@@ -62,6 +62,7 @@
 #define IRQ_MOVE_PENDING	0x00200000	/* need to re-target IRQ destination */
 #define IRQ_NO_BALANCING	0x00400000	/* IRQ is excluded from balancing */
 #define IRQ_SPURIOUS_DISABLED	0x00800000	/* IRQ was disabled by the spurious trap */
+#define IRQ_MOVE_PCNTXT	0x01000000	/* IRQ migration from process context */
 
 #ifdef CONFIG_IRQ_PER_CPU
 # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
Index: tree-x86/kernel/irq/manage.c
===================================================================
--- tree-x86.orig/kernel/irq/manage.c	2008-07-10 09:51:45.000000000 -0700
+++ tree-x86/kernel/irq/manage.c	2008-07-10 09:52:07.000000000 -0700
@@ -89,7 +89,14 @@
 	set_balance_irq_affinity(irq, cpumask);
 
 #ifdef CONFIG_GENERIC_PENDING_IRQ
-	set_pending_irq(irq, cpumask);
+	if (desc->status & IRQ_MOVE_PCNTXT) {
+		unsigned long flags;
+
+		spin_lock_irqsave(&desc->lock, flags);
+		desc->chip->set_affinity(irq, cpumask);
+		spin_unlock_irqrestore(&desc->lock, flags);
+	} else
+		set_pending_irq(irq, cpumask);
 #else
 	desc->affinity = cpumask;
 	desc->chip->set_affinity(irq, cpumask);

-- 

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 11/26] x64, x2apic/intr-remap: generic irq migration ..., Suresh Siddha, (Thu Jul 10, 2:16 pm)
Re: [patch 11/26] x64, x2apic/intr-remap: generic irq migrat..., Eric W. Biederman, (Thu Jul 10, 7:08 pm)
Re: [patch 11/26] x64, x2apic/intr-remap: generic irq migrat..., Eric W. Biederman, (Fri Jul 11, 5:19 am)