vserver 1.9.3
[linux-2.6.git] / arch / alpha / kernel / irq.c
index ee98752..199435f 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/irq.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
+#include <linux/profile.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -83,6 +84,7 @@ handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
                 struct irqaction *action)
 {
        int status = 1; /* Force the "do bottom halves" bit */
+       int ret;
 
        do {
                if (!(action->flags & SA_INTERRUPT))
@@ -90,8 +92,9 @@ handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
                else
                        local_irq_disable();
 
-               status |= action->flags;
-               action->handler(irq, action->dev_id, regs);
+               ret = action->handler(irq, action->dev_id, regs);
+               if (ret == IRQ_HANDLED)
+                       status |= action->flags;
                action = action->next;
        } while (action);
        if (status & SA_SAMPLE_RANDOM)
@@ -288,31 +291,6 @@ irq_affinity_write_proc(struct file *file, const char __user *buffer,
        return full_count;
 }
 
-static int
-prof_cpu_mask_read_proc(char *page, char **start, off_t off,
-                       int count, int *eof, void *data)
-{
-       int len = cpumask_scnprintf(page, count, *(cpumask_t *)data);
-       if (count - len < 2)
-               return -EINVAL;
-       len += sprintf(page + len, "\n");
-       return len;
-}
-
-static int
-prof_cpu_mask_write_proc(struct file *file, const char __user *buffer,
-                        unsigned long count, void *data)
-{
-       unsigned long full_count = count, err;
-       cpumask_t new_value, *mask = (cpumask_t *)data;
-
-       err = cpumask_parse(buffer, count, new_value);
-       if (err)
-               return err;
-
-       *mask = new_value;
-       return full_count;
-}
 #endif /* CONFIG_SMP */
 
 #define MAX_NAMELEN 10
@@ -350,14 +328,9 @@ register_irq_proc (unsigned int irq)
 #endif
 }
 
-unsigned long prof_cpu_mask = ~0UL;
-
 void
 init_irq_proc (void)
 {
-#ifdef CONFIG_SMP
-       struct proc_dir_entry *entry;
-#endif
        int i;
 
        /* create /proc/irq */
@@ -365,12 +338,7 @@ init_irq_proc (void)
 
 #ifdef CONFIG_SMP 
        /* create /proc/irq/prof_cpu_mask */
-       entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
-
-       entry->nlink = 1;
-       entry->data = (void *)&prof_cpu_mask;
-       entry->read_proc = prof_cpu_mask_read_proc;
-       entry->write_proc = prof_cpu_mask_write_proc;
+       create_prof_cpu_mask(root_irq_dir);
 #endif
 
        /*