Skip to content

Commit bb2166c

Browse files
committed
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: genirq: Fix spurious irq seqfile conversion genirq: switch /proc/irq/*/spurious to seq_file irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed irq: Remove unused debug_poll_all_shared_irqs() irq: Fix docbook comments irq: trivial: Fix typo in comment for #endif
2 parents 0bf7969 + 3476994 commit bb2166c

5 files changed

Lines changed: 29 additions & 39 deletions

File tree

‎include/linux/interrupt.h‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -603,12 +603,6 @@ static inline void init_irq_proc(void)
603603
}
604604
#endif
605605

606-
#if defined(CONFIG_GENERIC_HARDIRQS) && defined(CONFIG_DEBUG_SHIRQ)
607-
extern void debug_poll_all_shared_irqs(void);
608-
#else
609-
static inline void debug_poll_all_shared_irqs(void) { }
610-
#endif
611-
612606
struct seq_file;
613607
int show_interrupts(struct seq_file *p, void *v);
614608

‎include/linux/irqflags.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,6 @@
124124
typecheck(unsigned long, flags); \
125125
raw_irqs_disabled_flags(flags); \
126126
})
127-
#endif /* CONFIG_X86 */
127+
#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
128128

129129
#endif

‎kernel/irq/chip.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ int set_irq_data(unsigned int irq, void *data)
166166
EXPORT_SYMBOL(set_irq_data);
167167

168168
/**
169-
* set_irq_data - set irq type data for an irq
169+
* set_irq_msi - set MSI descriptor data for an irq
170170
* @irq: Interrupt number
171171
* @entry: Pointer to MSI descriptor data
172172
*
173-
* Set the hardware irq controller data for an irq
173+
* Set the MSI descriptor entry for an irq
174174
*/
175175
int set_irq_msi(unsigned int irq, struct msi_desc *entry)
176176
{
@@ -590,7 +590,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
590590
}
591591

592592
/**
593-
* handle_percpu_IRQ - Per CPU local irq handler
593+
* handle_percpu_irq - Per CPU local irq handler
594594
* @irq: the interrupt number
595595
* @desc: the interrupt description structure for this irq
596596
*

‎kernel/irq/proc.c‎

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static ssize_t default_affinity_write(struct file *file,
136136

137137
static int default_affinity_open(struct inode *inode, struct file *file)
138138
{
139-
return single_open(file, default_affinity_show, NULL);
139+
return single_open(file, default_affinity_show, PDE(inode)->data);
140140
}
141141

142142
static const struct file_operations default_affinity_proc_fops = {
@@ -148,18 +148,28 @@ static const struct file_operations default_affinity_proc_fops = {
148148
};
149149
#endif
150150

151-
static int irq_spurious_read(char *page, char **start, off_t off,
152-
int count, int *eof, void *data)
151+
static int irq_spurious_proc_show(struct seq_file *m, void *v)
153152
{
154-
struct irq_desc *desc = irq_to_desc((long) data);
155-
return sprintf(page, "count %u\n"
156-
"unhandled %u\n"
157-
"last_unhandled %u ms\n",
158-
desc->irq_count,
159-
desc->irqs_unhandled,
160-
jiffies_to_msecs(desc->last_unhandled));
153+
struct irq_desc *desc = irq_to_desc((long) m->private);
154+
155+
seq_printf(m, "count %u\n" "unhandled %u\n" "last_unhandled %u ms\n",
156+
desc->irq_count, desc->irqs_unhandled,
157+
jiffies_to_msecs(desc->last_unhandled));
158+
return 0;
159+
}
160+
161+
static int irq_spurious_proc_open(struct inode *inode, struct file *file)
162+
{
163+
return single_open(file, irq_spurious_proc_show, NULL);
161164
}
162165

166+
static const struct file_operations irq_spurious_proc_fops = {
167+
.open = irq_spurious_proc_open,
168+
.read = seq_read,
169+
.llseek = seq_lseek,
170+
.release = single_release,
171+
};
172+
163173
#define MAX_NAMELEN 128
164174

165175
static int name_unique(unsigned int irq, struct irqaction *new_action)
@@ -204,7 +214,6 @@ void register_handler_proc(unsigned int irq, struct irqaction *action)
204214
void register_irq_proc(unsigned int irq, struct irq_desc *desc)
205215
{
206216
char name [MAX_NAMELEN];
207-
struct proc_dir_entry *entry;
208217

209218
if (!root_irq_dir || (desc->chip == &no_irq_chip) || desc->dir)
210219
return;
@@ -214,18 +223,17 @@ void register_irq_proc(unsigned int irq, struct irq_desc *desc)
214223

215224
/* create /proc/irq/1234 */
216225
desc->dir = proc_mkdir(name, root_irq_dir);
226+
if (!desc->dir)
227+
return;
217228

218229
#ifdef CONFIG_SMP
219230
/* create /proc/irq/<irq>/smp_affinity */
220231
proc_create_data("smp_affinity", 0600, desc->dir,
221232
&irq_affinity_proc_fops, (void *)(long)irq);
222233
#endif
223234

224-
entry = create_proc_entry("spurious", 0444, desc->dir);
225-
if (entry) {
226-
entry->data = (void *)(long)irq;
227-
entry->read_proc = irq_spurious_read;
228-
}
235+
proc_create_data("spurious", 0444, desc->dir,
236+
&irq_spurious_proc_fops, (void *)(long)irq);
229237
}
230238

231239
#undef MAX_NAMELEN

‎kernel/irq/spurious.c‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static int misrouted_irq(int irq)
104104
return ok;
105105
}
106106

107-
static void poll_all_shared_irqs(void)
107+
static void poll_spurious_irqs(unsigned long dummy)
108108
{
109109
struct irq_desc *desc;
110110
int i;
@@ -125,23 +125,11 @@ static void poll_all_shared_irqs(void)
125125
try_one_irq(i, desc);
126126
local_irq_enable();
127127
}
128-
}
129-
130-
static void poll_spurious_irqs(unsigned long dummy)
131-
{
132-
poll_all_shared_irqs();
133128

134129
mod_timer(&poll_spurious_irq_timer,
135130
jiffies + POLL_SPURIOUS_IRQ_INTERVAL);
136131
}
137132

138-
#ifdef CONFIG_DEBUG_SHIRQ
139-
void debug_poll_all_shared_irqs(void)
140-
{
141-
poll_all_shared_irqs();
142-
}
143-
#endif
144-
145133
/*
146134
* If 99,900 of the previous 100,000 interrupts have not been handled
147135
* then assume that the IRQ is stuck in some manner. Drop a diagnostic

0 commit comments

Comments
 (0)