aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-11 16:20:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-11 16:20:42 -0400
commit12a499612e1ff439bdad240c7f86c55366941d4d (patch)
tree9fd218631e0c8c26a5ffc41ebce1d65f8e826339
parenteee2775d9924b22643bd89b2e568cc5eed7e8a04 (diff)
parent70590ea75b7f9ef4846b0b0f4400e8338dbcc7eb (diff)
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: pci/intr_remapping: Allocate irq_iommu on node irq: Add irq_node() primitive irq: Make sure irq_desc for legacy irq get correct node setting genirq: Add prototype for handle_nested_irq() irq: Remove superfluous NULL pointer check in check_irq_resend() irq: Clean up by removing irqfixup MODULE_PARM_DESC() genirq: Fix comment describing suspend_device_irqs() genirq: Remove obsolete defines and typedefs
-rw-r--r--Documentation/feature-removal-schedule.txt9
-rw-r--r--drivers/pci/intr_remapping.c14
-rw-r--r--include/linux/irq.h8
-rw-r--r--include/linux/irqnr.h6
-rw-r--r--kernel/irq/handle.c5
-rw-r--r--kernel/irq/pm.c8
-rw-r--r--kernel/irq/resend.c3
-rw-r--r--kernel/irq/spurious.c1
8 files changed, 19 insertions, 35 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index f0690bbbd73c..dae41960277b 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -394,15 +394,6 @@ Who: Thomas Gleixner <tglx@linutronix.de>
394 394
395----------------------------- 395-----------------------------
396 396
397What: obsolete generic irq defines and typedefs
398When: 2.6.30
399Why: The defines and typedefs (hw_interrupt_type, no_irq_type, irq_desc_t)
400 have been kept around for migration reasons. After more than two years
401 it's time to remove them finally
402Who: Thomas Gleixner <tglx@linutronix.de>
403
404---------------------------
405
406What: fakephp and associated sysfs files in /sys/bus/pci/slots/ 397What: fakephp and associated sysfs files in /sys/bus/pci/slots/
407When: 2011 398When: 2011
408Why: In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to 399Why: In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c
index 4f5b8712931f..44803644ca05 100644
--- a/drivers/pci/intr_remapping.c
+++ b/drivers/pci/intr_remapping.c
@@ -55,15 +55,12 @@ static struct irq_2_iommu *irq_2_iommu(unsigned int irq)
55 return desc->irq_2_iommu; 55 return desc->irq_2_iommu;
56} 56}
57 57
58static struct irq_2_iommu *irq_2_iommu_alloc_node(unsigned int irq, int node) 58static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq)
59{ 59{
60 struct irq_desc *desc; 60 struct irq_desc *desc;
61 struct irq_2_iommu *irq_iommu; 61 struct irq_2_iommu *irq_iommu;
62 62
63 /* 63 desc = irq_to_desc(irq);
64 * alloc irq desc if not allocated already.
65 */
66 desc = irq_to_desc_alloc_node(irq, node);
67 if (!desc) { 64 if (!desc) {
68 printk(KERN_INFO "can not get irq_desc for %d\n", irq); 65 printk(KERN_INFO "can not get irq_desc for %d\n", irq);
69 return NULL; 66 return NULL;
@@ -72,16 +69,11 @@ static struct irq_2_iommu *irq_2_iommu_alloc_node(unsigned int irq, int node)
72 irq_iommu = desc->irq_2_iommu; 69 irq_iommu = desc->irq_2_iommu;
73 70
74 if (!irq_iommu) 71 if (!irq_iommu)
75 desc->irq_2_iommu = get_one_free_irq_2_iommu(node); 72 desc->irq_2_iommu = get_one_free_irq_2_iommu(irq_node(irq));
76 73
77 return desc->irq_2_iommu; 74 return desc->irq_2_iommu;
78} 75}
79 76
80static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq)
81{
82 return irq_2_iommu_alloc_node(irq, cpu_to_node(boot_cpu_id));
83}
84
85#else /* !CONFIG_SPARSE_IRQ */ 77#else /* !CONFIG_SPARSE_IRQ */
86 78
87static struct irq_2_iommu irq_2_iommuX[NR_IRQS]; 79static struct irq_2_iommu irq_2_iommuX[NR_IRQS];
diff --git a/include/linux/irq.h b/include/linux/irq.h
index cb2e77a3f7f7..9e9eb76faf81 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -220,13 +220,6 @@ static inline struct irq_desc *move_irq_desc(struct irq_desc *desc, int node)
220extern struct irq_desc *irq_to_desc_alloc_node(unsigned int irq, int node); 220extern struct irq_desc *irq_to_desc_alloc_node(unsigned int irq, int node);
221 221
222/* 222/*
223 * Migration helpers for obsolete names, they will go away:
224 */
225#define hw_interrupt_type irq_chip
226#define no_irq_type no_irq_chip
227typedef struct irq_desc irq_desc_t;
228
229/*
230 * Pick up the arch-dependent methods: 223 * Pick up the arch-dependent methods:
231 */ 224 */
232#include <asm/hw_irq.h> 225#include <asm/hw_irq.h>
@@ -289,6 +282,7 @@ extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc);
289extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc); 282extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc);
290extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc); 283extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc);
291extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); 284extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc);
285extern void handle_nested_irq(unsigned int irq);
292 286
293/* 287/*
294 * Monolithic do_IRQ implementation. 288 * Monolithic do_IRQ implementation.
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h
index ec87b212ff7d..7bf89bc8cbca 100644
--- a/include/linux/irqnr.h
+++ b/include/linux/irqnr.h
@@ -41,6 +41,12 @@ extern struct irq_desc *irq_to_desc(unsigned int irq);
41 ; \ 41 ; \
42 else 42 else
43 43
44#ifdef CONFIG_SMP
45#define irq_node(irq) (irq_to_desc(irq)->node)
46#else
47#define irq_node(irq) 0
48#endif
49
44#endif /* CONFIG_GENERIC_HARDIRQS */ 50#endif /* CONFIG_GENERIC_HARDIRQS */
45 51
46#define for_each_irq_nr(irq) \ 52#define for_each_irq_nr(irq) \
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 065205bdd920..a81cf80554db 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -161,7 +161,7 @@ int __init early_irq_init(void)
161 161
162 desc = irq_desc_legacy; 162 desc = irq_desc_legacy;
163 legacy_count = ARRAY_SIZE(irq_desc_legacy); 163 legacy_count = ARRAY_SIZE(irq_desc_legacy);
164 node = first_online_node; 164 node = first_online_node;
165 165
166 /* allocate irq_desc_ptrs array based on nr_irqs */ 166 /* allocate irq_desc_ptrs array based on nr_irqs */
167 irq_desc_ptrs = kcalloc(nr_irqs, sizeof(void *), GFP_NOWAIT); 167 irq_desc_ptrs = kcalloc(nr_irqs, sizeof(void *), GFP_NOWAIT);
@@ -172,6 +172,9 @@ int __init early_irq_init(void)
172 172
173 for (i = 0; i < legacy_count; i++) { 173 for (i = 0; i < legacy_count; i++) {
174 desc[i].irq = i; 174 desc[i].irq = i;
175#ifdef CONFIG_SMP
176 desc[i].node = node;
177#endif
175 desc[i].kstat_irqs = kstat_irqs_legacy + i * nr_cpu_ids; 178 desc[i].kstat_irqs = kstat_irqs_legacy + i * nr_cpu_ids;
176 lockdep_set_class(&desc[i].lock, &irq_desc_lock_class); 179 lockdep_set_class(&desc[i].lock, &irq_desc_lock_class);
177 alloc_desc_masks(&desc[i], node, true); 180 alloc_desc_masks(&desc[i], node, true);
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index 638d8bedec14..a0bb09e79867 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -15,10 +15,10 @@
15/** 15/**
16 * suspend_device_irqs - disable all currently enabled interrupt lines 16 * suspend_device_irqs - disable all currently enabled interrupt lines
17 * 17 *
18 * During system-wide suspend or hibernation device interrupts need to be 18 * During system-wide suspend or hibernation device drivers need to be prevented
19 * disabled at the chip level and this function is provided for this purpose. 19 * from receiving interrupts and this function is provided for this purpose.
20 * It disables all interrupt lines that are enabled at the moment and sets the 20 * It marks all interrupt lines in use, except for the timer ones, as disabled
21 * IRQ_SUSPENDED flag for them. 21 * and sets the IRQ_SUSPENDED flag for each of them.
22 */ 22 */
23void suspend_device_irqs(void) 23void suspend_device_irqs(void)
24{ 24{
diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c
index 89c7117acf2b..090c3763f3a2 100644
--- a/kernel/irq/resend.c
+++ b/kernel/irq/resend.c
@@ -70,8 +70,7 @@ void check_irq_resend(struct irq_desc *desc, unsigned int irq)
70 if ((status & (IRQ_LEVEL | IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) { 70 if ((status & (IRQ_LEVEL | IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
71 desc->status = (status & ~IRQ_PENDING) | IRQ_REPLAY; 71 desc->status = (status & ~IRQ_PENDING) | IRQ_REPLAY;
72 72
73 if (!desc->chip || !desc->chip->retrigger || 73 if (!desc->chip->retrigger || !desc->chip->retrigger(irq)) {
74 !desc->chip->retrigger(irq)) {
75#ifdef CONFIG_HARDIRQS_SW_RESEND 74#ifdef CONFIG_HARDIRQS_SW_RESEND
76 /* Set it pending and activate the softirq: */ 75 /* Set it pending and activate the softirq: */
77 set_bit(irq, irqs_resend); 76 set_bit(irq, irqs_resend);
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index 4d568294de3e..114e704760fe 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -297,7 +297,6 @@ static int __init irqfixup_setup(char *str)
297 297
298__setup("irqfixup", irqfixup_setup); 298__setup("irqfixup", irqfixup_setup);
299module_param(irqfixup, int, 0644); 299module_param(irqfixup, int, 0644);
300MODULE_PARM_DESC("irqfixup", "0: No fixup, 1: irqfixup mode, 2: irqpoll mode");
301 300
302static int __init irqpoll_setup(char *str) 301static int __init irqpoll_setup(char *str)
303{ 302{