On Tue, 7 Dec 1999, Andrea Arcangeli wrote:

>So it seems I'll have to skip paging_init plus my ugly SRM_printf hack in
>order to see a stack trace...

I used the above very ugly trick and I got:

        kmalloc ....
        can't alloc timer ...

I was calling kmalloc too early and the failed allocation was generating a
panic.

This patch is the only fix I had to apply over the irq rewrite to make it
working. I am writing this email with the resulting kernel and it run 
stable so far.

This patch is called alpha-3-to-4 and goes on the top of the previous
patches in the ftp site:

diff -urN 2.3.30pre6-alpha-3/arch/alpha/kernel/irq.c 
2.3.30pre6-alpha/arch/alpha/kernel/irq.c
--- 2.3.30pre6-alpha-3/arch/alpha/kernel/irq.c  Tue Dec  7 04:17:08 1999
+++ 2.3.30pre6-alpha/arch/alpha/kernel/irq.c    Tue Dec  7 03:59:36 1999
@@ -28,7 +28,6 @@
 #include <asm/io.h>
 #include <asm/bitops.h>
 #include <asm/machvec.h>
-#include <asm/spinlock.h>
 
 #include "proto.h"
 
diff -urN 2.3.30pre6-alpha-3/arch/alpha/kernel/time.c 
2.3.30pre6-alpha/arch/alpha/kernel/time.c
--- 2.3.30pre6-alpha-3/arch/alpha/kernel/time.c Tue Dec  7 04:17:08 1999
+++ 2.3.30pre6-alpha/arch/alpha/kernel/time.c   Tue Dec  7 04:06:14 1999
@@ -32,6 +32,7 @@
 #include <linux/delay.h>
 #include <linux/ioport.h>
 #include <linux/irq.h>
+#include <linux/interrupt.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -246,10 +247,11 @@
        outb(0x13, 0x42);
 }
 
+static struct irqaction irq0  = { timer_interrupt, SA_INTERRUPT, 0, "timer", NULL, 
+NULL};
+
 void
 time_init(void)
 {
-       void (*irq_handler)(int, void *, struct pt_regs *);
        unsigned int year, mon, day, hour, min, sec, cc1, cc2;
        unsigned long cycle_freq, one_percent;
        long diff;
@@ -338,9 +340,7 @@
        state.partial_tick = 0L;
 
        /* setup timer */ 
-       irq_handler = timer_interrupt;
-       if (request_irq(TIMER_IRQ, irq_handler, 0, "timer", NULL))
-               panic("Could not allocate timer IRQ!");
+       setup_irq(TIMER_IRQ, &irq0);
 }
 
 /*

Andrea

Reply via email to