summaryrefslogtreecommitdiff
path: root/linux/dev/arch
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-04 10:27:44 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-04 10:27:44 +0100
commitba1b3afd50913473f3036a63b4a82d7ba5c42009 (patch)
tree9dff0ddec4bf8b927a025b4bf9882cb1731170f3 /linux/dev/arch
parentbfdb3be16e5a20eebc97b3ca613d9a4da4465533 (diff)
parent51e87d005139a435cd846ac5c224eed5042c4fa0 (diff)
Merge branch 'master' into master-gdb_stubs
Diffstat (limited to 'linux/dev/arch')
-rw-r--r--linux/dev/arch/i386/kernel/irq.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/linux/dev/arch/i386/kernel/irq.c b/linux/dev/arch/i386/kernel/irq.c
index 7faaa62c..68bf0c4b 100644
--- a/linux/dev/arch/i386/kernel/irq.c
+++ b/linux/dev/arch/i386/kernel/irq.c
@@ -47,10 +47,8 @@
#include <asm/io.h>
#include <asm/hardirq.h>
-extern void linux_timer_intr (void);
-extern spl_t splhigh (void);
-extern spl_t spl0 (void);
-extern void form_pic_mask (void);
+#include <linux/dev/glue/glue.h>
+#include <machine/machspl.h>
#if 0
/* XXX: This is the way it's done in linux 2.2. GNU Mach currently uses intr_count. It should be made using local_{bh/irq}_count instead (through hardirq_enter/exit) for SMP support. */
@@ -74,7 +72,7 @@ spl_t linux_intr_pri;
/*
* Flag indicating an interrupt is being handled.
*/
-unsigned long intr_count = 0;
+unsigned int intr_count = 0;
/*
* List of Linux interrupt handlers.
@@ -95,12 +93,6 @@ static struct linux_action *irq_action[16] =
NULL, NULL, NULL, NULL
};
-extern spl_t curr_ipl;
-extern int curr_pic_mask;
-extern int pic_mask[];
-
-extern void intnull (), prtnull ();
-
/*
* Generic interrupt handler for Linux devices.
* Set up a fake `struct pt_regs' then call the real handler.
@@ -223,15 +215,15 @@ setup_x86_irq (int irq, struct linux_action *new)
{
/* Can't share interrupts unless both agree to */
if (!(old->flags & new->flags & SA_SHIRQ))
- return (-LINUX_EBUSY);
+ return (-EBUSY);
/* Can't share interrupts unless both are same type */
if ((old->flags ^ new->flags) & SA_INTERRUPT)
- return (-LINUX_EBUSY);
+ return (-EBUSY);
/* Can't share at different levels */
if (intpri[irq] && linux_intr_pri != intpri[irq])
- return (-LINUX_EBUSY);
+ return (-EBUSY);
/* add new interrupt at end of irq queue */
do
@@ -271,7 +263,7 @@ request_irq (unsigned int irq, void (*handler) (int, void *, struct pt_regs *),
assert (irq < 16);
if (!handler)
- return -LINUX_EINVAL;
+ return -EINVAL;
/*
* Hmm... Should I use `kalloc()' ?
@@ -280,7 +272,7 @@ request_irq (unsigned int irq, void (*handler) (int, void *, struct pt_regs *),
action = (struct linux_action *)
linux_kmalloc (sizeof (struct linux_action), GFP_KERNEL);
if (action == NULL)
- return -LINUX_ENOMEM;
+ return -ENOMEM;
action->handler = handler;
action->next = NULL;
@@ -446,7 +438,6 @@ static void show(char * str)
int i;
unsigned long *stack;
int cpu = smp_processor_id();
- extern char *get_options(char *str, int *ints);
printk("\n%s, CPU %d:\n", str, cpu);
printk("irq: %d [%d %d]\n",