patch-2.1.23 linux/arch/i386/kernel/irq.c
Next file: linux/arch/i386/kernel/ldt.c
Previous file: linux/arch/i386/kernel/ioport.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Sun Jan 26 12:07:04 1997
- Orig file:
v2.1.22/linux/arch/i386/kernel/irq.c
- Orig date:
Thu Jan 23 21:06:46 1997
diff -u --recursive --new-file v2.1.22/linux/arch/i386/kernel/irq.c linux/arch/i386/kernel/irq.c
@@ -25,6 +25,8 @@
#include <linux/timex.h>
#include <linux/malloc.h>
#include <linux/random.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
#include <asm/system.h>
#include <asm/io.h>
@@ -346,6 +348,8 @@
struct irqaction * action = *(irq + irq_action);
int do_random = 0;
+ lock_kernel();
+ intr_count++;
#ifdef __SMP__
if(smp_threads_ready && active_kernel_processor!=smp_processor_id())
panic("IRQ %d: active processor set wrongly(%d not %d).\n", irq, active_kernel_processor, smp_processor_id());
@@ -362,6 +366,8 @@
}
if (do_random & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
+ intr_count--;
+ unlock_kernel();
}
/*
@@ -374,6 +380,8 @@
struct irqaction * action = *(irq + irq_action);
int do_random = 0;
+ lock_kernel();
+ intr_count++;
#ifdef __SMP__
/* IRQ 13 is allowed - that's a flush tlb */
if(smp_threads_ready && active_kernel_processor!=smp_processor_id() && irq!=13)
@@ -391,6 +399,8 @@
}
if (do_random & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
+ intr_count--;
+ unlock_kernel();
}
int setup_x86_irq(int irq, struct irqaction * new)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov