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
This commit is contained in:
Linus Torvalds 2009-12-05 09:53:08 -08:00
commit bb2166c898
5 changed files with 29 additions and 39 deletions

View File

@ -603,12 +603,6 @@ static inline void init_irq_proc(void)
} }
#endif #endif
#if defined(CONFIG_GENERIC_HARDIRQS) && defined(CONFIG_DEBUG_SHIRQ)
extern void debug_poll_all_shared_irqs(void);
#else
static inline void debug_poll_all_shared_irqs(void) { }
#endif
struct seq_file; struct seq_file;
int show_interrupts(struct seq_file *p, void *v); int show_interrupts(struct seq_file *p, void *v);

View File

@ -124,6 +124,6 @@
typecheck(unsigned long, flags); \ typecheck(unsigned long, flags); \
raw_irqs_disabled_flags(flags); \ raw_irqs_disabled_flags(flags); \
}) })
#endif /* CONFIG_X86 */ #endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
#endif #endif

View File

@ -166,11 +166,11 @@ int set_irq_data(unsigned int irq, void *data)
EXPORT_SYMBOL(set_irq_data); EXPORT_SYMBOL(set_irq_data);
/** /**
* set_irq_data - set irq type data for an irq * set_irq_msi - set MSI descriptor data for an irq
* @irq: Interrupt number * @irq: Interrupt number
* @entry: Pointer to MSI descriptor data * @entry: Pointer to MSI descriptor data
* *
* Set the hardware irq controller data for an irq * Set the MSI descriptor entry for an irq
*/ */
int set_irq_msi(unsigned int irq, struct msi_desc *entry) int set_irq_msi(unsigned int irq, struct msi_desc *entry)
{ {
@ -590,7 +590,7 @@ out_unlock:
} }
/** /**
* handle_percpu_IRQ - Per CPU local irq handler * handle_percpu_irq - Per CPU local irq handler
* @irq: the interrupt number * @irq: the interrupt number
* @desc: the interrupt description structure for this irq * @desc: the interrupt description structure for this irq
* *

View File

@ -136,7 +136,7 @@ out:
static int default_affinity_open(struct inode *inode, struct file *file) static int default_affinity_open(struct inode *inode, struct file *file)
{ {
return single_open(file, default_affinity_show, NULL); return single_open(file, default_affinity_show, PDE(inode)->data);
} }
static const struct file_operations default_affinity_proc_fops = { static const struct file_operations default_affinity_proc_fops = {
@ -148,18 +148,28 @@ static const struct file_operations default_affinity_proc_fops = {
}; };
#endif #endif
static int irq_spurious_read(char *page, char **start, off_t off, static int irq_spurious_proc_show(struct seq_file *m, void *v)
int count, int *eof, void *data)
{ {
struct irq_desc *desc = irq_to_desc((long) data); struct irq_desc *desc = irq_to_desc((long) m->private);
return sprintf(page, "count %u\n"
"unhandled %u\n" seq_printf(m, "count %u\n" "unhandled %u\n" "last_unhandled %u ms\n",
"last_unhandled %u ms\n", desc->irq_count, desc->irqs_unhandled,
desc->irq_count, jiffies_to_msecs(desc->last_unhandled));
desc->irqs_unhandled, return 0;
jiffies_to_msecs(desc->last_unhandled));
} }
static int irq_spurious_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, irq_spurious_proc_show, NULL);
}
static const struct file_operations irq_spurious_proc_fops = {
.open = irq_spurious_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
#define MAX_NAMELEN 128 #define MAX_NAMELEN 128
static int name_unique(unsigned int irq, struct irqaction *new_action) 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)
void register_irq_proc(unsigned int irq, struct irq_desc *desc) void register_irq_proc(unsigned int irq, struct irq_desc *desc)
{ {
char name [MAX_NAMELEN]; char name [MAX_NAMELEN];
struct proc_dir_entry *entry;
if (!root_irq_dir || (desc->chip == &no_irq_chip) || desc->dir) if (!root_irq_dir || (desc->chip == &no_irq_chip) || desc->dir)
return; return;
@ -214,6 +223,8 @@ void register_irq_proc(unsigned int irq, struct irq_desc *desc)
/* create /proc/irq/1234 */ /* create /proc/irq/1234 */
desc->dir = proc_mkdir(name, root_irq_dir); desc->dir = proc_mkdir(name, root_irq_dir);
if (!desc->dir)
return;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* create /proc/irq/<irq>/smp_affinity */ /* create /proc/irq/<irq>/smp_affinity */
@ -221,11 +232,8 @@ void register_irq_proc(unsigned int irq, struct irq_desc *desc)
&irq_affinity_proc_fops, (void *)(long)irq); &irq_affinity_proc_fops, (void *)(long)irq);
#endif #endif
entry = create_proc_entry("spurious", 0444, desc->dir); proc_create_data("spurious", 0444, desc->dir,
if (entry) { &irq_spurious_proc_fops, (void *)(long)irq);
entry->data = (void *)(long)irq;
entry->read_proc = irq_spurious_read;
}
} }
#undef MAX_NAMELEN #undef MAX_NAMELEN

View File

@ -104,7 +104,7 @@ static int misrouted_irq(int irq)
return ok; return ok;
} }
static void poll_all_shared_irqs(void) static void poll_spurious_irqs(unsigned long dummy)
{ {
struct irq_desc *desc; struct irq_desc *desc;
int i; int i;
@ -125,23 +125,11 @@ static void poll_all_shared_irqs(void)
try_one_irq(i, desc); try_one_irq(i, desc);
local_irq_enable(); local_irq_enable();
} }
}
static void poll_spurious_irqs(unsigned long dummy)
{
poll_all_shared_irqs();
mod_timer(&poll_spurious_irq_timer, mod_timer(&poll_spurious_irq_timer,
jiffies + POLL_SPURIOUS_IRQ_INTERVAL); jiffies + POLL_SPURIOUS_IRQ_INTERVAL);
} }
#ifdef CONFIG_DEBUG_SHIRQ
void debug_poll_all_shared_irqs(void)
{
poll_all_shared_irqs();
}
#endif
/* /*
* If 99,900 of the previous 100,000 interrupts have not been handled * If 99,900 of the previous 100,000 interrupts have not been handled
* then assume that the IRQ is stuck in some manner. Drop a diagnostic * then assume that the IRQ is stuck in some manner. Drop a diagnostic