|
From: Kenn H. <ke...@us...> - 2003-02-09 01:49:27
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel
In directory sc8-pr-cvs1:/tmp/cvs-serv31289/arch/vax/kernel
Modified Files:
interrupt.c
Log Message:
2.5.28 removed the big IRQ lock. We also now require some of the
preemption definitions (even though we don't support preemption yet).
Index: interrupt.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/kernel/interrupt.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- interrupt.c 28 Dec 2002 02:13:08 -0000 1.9
+++ interrupt.c 9 Feb 2003 01:49:22 -0000 1.10
@@ -419,25 +419,19 @@
need to walk the list of irqactions as in x86 because we don't have
shared interrupts on the VAX */
-static inline int dispatch_irq(struct pt_regs *regs, struct irqvector *vec)
+static inline void dispatch_irq(struct pt_regs *regs, struct irqvector *vec)
{
- int status;
struct irqaction *action;
int vec_num;
- status = 1; /* Force the "do bottom halves" bit */
-
-
action = &vec->action;
vec_num = vec->vec_num;
- status |= action->flags;
action->handler(vec_num, action->dev_id, regs);
- if (status & SA_SAMPLE_RANDOM)
+ if (action->flags & SA_SAMPLE_RANDOM) {
add_interrupt_randomness(vec_num);
-
- return status;
+ }
}
/* This is called once we know that an interrupt or exception is actually
@@ -446,28 +440,22 @@
static inline void do_irq(struct pt_regs *regs, struct irqvector *vec)
{
int flags;
- int status;
- int cpu;
+
/* Fake a single-priority-level interrupt system by raising IPL
to 31 for _any_ interrupt. This is such a waste of the VAX's
hardware capabilities... */
- cpu=smp_processor_id();
- irq_enter(cpu);
+ irq_enter();
save_and_cli(flags);
- status = dispatch_irq(regs, vec);
- irq_exit(cpu);
+ dispatch_irq(regs, vec);
+ irq_exit();
restore_flags(flags);
- // if (status) {
-// if (softirq_active(cpu)&softirq_mask(cpu)) {
- if (softirq_pending(cpu)) {
- do_softirq();
- // }
+ if (softirq_pending(smp_processor_id())) {
+ do_softirq();
}
-
}
static inline void do_exception(struct pt_regs *regs, struct irqvector *vec, void *excep_info)
@@ -648,12 +636,7 @@
if (!handler)
return -EINVAL;
-#ifdef KMALLOC_WORKS
- vector = (struct irqvector *)
- kmalloc(sizeof(struct irqvector), GFP_KERNEL);
-#else
vector = alloc_irqvector();
-#endif
if (!vector)
return -ENOMEM;
@@ -671,11 +654,7 @@
retval = hook_scb_vector(irq, vector, 1);
if (retval)
-#ifdef KMALLOC_WORKS
- kfree(vector);
-#else
free_irqvector(vector);
-#endif
return retval;
}
@@ -715,11 +694,7 @@
restore_flags(flags);
-#ifdef KMALLOC_WORKS
- kfree(vector);
-#else
- free_irqvector(vector);
-#endif
+ free_irqvector(vector);
}
void free_irq(unsigned int irq, void *dev_id)
@@ -788,12 +763,7 @@
if (!handler)
return -EINVAL;
-#ifdef KMALLOC_WORKS
- vector = (struct irqvector *)
- kmalloc(sizeof(struct irqvector), GFP_KERNEL);
-#else
vector = alloc_irqvector();
-#endif
if (!vector)
return -ENOMEM;
@@ -807,11 +777,7 @@
if (retval)
-#ifdef KMALLOC_WORKS
- kfree(vector);
-#else
free_irqvector(vector);
-#endif
return retval;
}
|