i386 is a very naughty arch. While messing with this code make i386 and amd64 more identical.
guenther@ tested this on an mp i386 for me yesterday, the machine seemed happy. Cheers, -0- diff --git a/arch/amd64/isa/clock.c b/arch/amd64/isa/clock.c index 23fc0f0..1b4ff7c 100644 --- a/arch/amd64/isa/clock.c +++ b/arch/amd64/isa/clock.c @@ -315,7 +315,7 @@ i8254_initclocks(void) isa_intr_establish(NULL, 0, IST_PULSE, IPL_CLOCK, clockintr, 0, "clock"); - isa_intr_establish(NULL, 8, IST_PULSE, IPL_CLOCK, rtcintr, + isa_intr_establish(NULL, 8, IST_PULSE, IPL_STATCLOCK, rtcintr, 0, "rtc"); rtcstart(); /* start the mc146818 clock */ diff --git a/arch/i386/i386/apicvec.s b/arch/i386/i386/apicvec.s index b8d8424..7976692 100644 --- a/arch/i386/i386/apicvec.s +++ b/arch/i386/i386/apicvec.s @@ -170,16 +170,10 @@ XINTR(ltimer): ioapic_asm_ack() sti incl CPUVAR(IDEPTH) -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintlock) -#endif movl %esp,%eax pushl %eax call _C_LABEL(lapic_clockintr) addl $4,%esp -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintunlock) -#endif decl CPUVAR(IDEPTH) jmp _C_LABEL(Xdoreti) diff --git a/arch/i386/include/intr.h b/arch/i386/include/intr.h index d13f876..86b8ecd 100644 --- a/arch/i386/include/intr.h +++ b/arch/i386/include/intr.h @@ -107,7 +107,7 @@ void splassert_check(int, const char *); #define spltty() splraise(IPL_TTY) #define splaudio() splraise(IPL_AUDIO) #define splclock() splraise(IPL_CLOCK) -#define splstatclock() splhigh() +#define splstatclock() splclock() #define splipi() splraise(IPL_IPI) /* diff --git a/arch/i386/include/intrdefs.h b/arch/i386/include/intrdefs.h index c399d47..ef419d3 100644 --- a/arch/i386/include/intrdefs.h +++ b/arch/i386/include/intrdefs.h @@ -65,10 +65,10 @@ #define IPL_VM MAKEIPL(7) /* memory allocation */ #define IPL_AUDIO MAKEIPL(8) /* audio */ #define IPL_CLOCK MAKEIPL(9) /* clock */ -#define IPL_STATCLOCK MAKEIPL(10) /* statclock */ -#define IPL_SCHED IPL_STATCLOCK -#define IPL_HIGH MAKEIPL(11) /* everything */ -#define IPL_IPI MAKEIPL(12) /* interprocessor interrupt */ +#define IPL_STATCLOCK IPL_CLOCK /* statclock */ +#define IPL_SCHED IPL_CLOCK +#define IPL_HIGH MAKEIPL(10) /* everything */ +#define IPL_IPI MAKEIPL(11) /* interprocessor interrupt */ /* Interrupt sharing types. */ #define IST_NONE 0 /* none */ diff --git a/arch/i386/isa/clock.c b/arch/i386/isa/clock.c index ef669ff..f881378 100644 --- a/arch/i386/isa/clock.c +++ b/arch/i386/isa/clock.c @@ -390,7 +390,7 @@ i8254_initclocks(void) /* When using i8254 for clock, we also use the rtc for profclock */ (void)isa_intr_establish(NULL, 0, IST_PULSE, IPL_CLOCK, clockintr, 0, "clock"); - (void)isa_intr_establish(NULL, 8, IST_PULSE, IPL_CLOCK, + (void)isa_intr_establish(NULL, 8, IST_PULSE, IPL_STATCLOCK, rtcintr, 0, "rtc"); rtcstart(); /* start the mc146818 clock */ -- The best defense against logic is ignorance.