Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80179
b: refs/heads/master
c: 96d97cf
h: refs/heads/master
i:
  80177: df0eb1e
  80175: f38ae57
v: v3
  • Loading branch information
Andi Kleen authored and Ingo Molnar committed Jan 30, 2008
1 parent 430d6ff commit 64d3b2e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9e094c17ee2b85130ab7b2ea37456f6867eb687a
refs/heads/master: 96d97cf03b3d68e6c857623da93acd522b2b7e1a
21 changes: 19 additions & 2 deletions trunk/kernel/irq/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ static int irq_affinity_write_proc(struct file *file, const char __user *buffer,

#endif

static int irq_spurious_read(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
struct irq_desc *d = &irq_desc[(long) data];
return sprintf(page, "count %u\n"
"unhandled %u\n"
"last_unhandled %u ms\n",
d->irq_count,
d->irqs_unhandled,
jiffies_to_msecs(d->last_unhandled));
}

#define MAX_NAMELEN 128

static int name_unique(unsigned int irq, struct irqaction *new_action)
Expand Down Expand Up @@ -118,6 +130,7 @@ void register_handler_proc(unsigned int irq, struct irqaction *action)
void register_irq_proc(unsigned int irq)
{
char name [MAX_NAMELEN];
struct proc_dir_entry *entry;

if (!root_irq_dir ||
(irq_desc[irq].chip == &no_irq_chip) ||
Expand All @@ -132,8 +145,6 @@ void register_irq_proc(unsigned int irq)

#ifdef CONFIG_SMP
{
struct proc_dir_entry *entry;

/* create /proc/irq/<irq>/smp_affinity */
entry = create_proc_entry("smp_affinity", 0600, irq_desc[irq].dir);

Expand All @@ -144,6 +155,12 @@ void register_irq_proc(unsigned int irq)
}
}
#endif

entry = create_proc_entry("spurious", 0444, irq_desc[irq].dir);
if (entry) {
entry->data = (void *)(long)irq;
entry->read_proc = irq_spurious_read;
}
}

#undef MAX_NAMELEN
Expand Down

0 comments on commit 64d3b2e

Please sign in to comment.