Re: 2.1.31: PATCH: SMP guess + compile fixes

Ingo Molnar (
Fri, 4 Apr 1997 14:25:24 +0200 (MET DST)

On Fri, 4 Apr 1997, Elliot Lee wrote:

> I am not a kernel hacker (yet ?), so it would make me most happy to be
> able to link to a web page that addresses the question of learning how to
> help with kernel development. If someone puts one up, please let me know
> via private E-mail.
> In addition, is there a TODO list of smallerish tasks that need doing in
> the kernel?

take a look at, to see how experimental patches for
possibly interesting features should look like.

plus there is an excellent collection of kernel-hacking related
information at

otherwise, you might just want to grab the latest sources, start at one
end of it, read the C source and find bugs/performance bottlenecks. Or if
you are lucky enough to get some nice oops or other kernel bug on your
current system, you might want to try to track it down alone.

if you see bugs or to-be improved parts of the kernel, you can always post
to linux-kernel, this is the point of this list in the first place ;).

( nobody is born as a kernel hacker, so dont worry about posting trivial
>hacking< questions, but make sure to track down the kernel archives at, maybe others are already working on it or the idea/problem
has already been answered. )

> --- linux/include/asm-i386/hardirq.h.sopwith Fri Apr 4 23:21:59 1997
> +++ linux/include/asm-i386/hardirq.h Fri Apr 4 23:22:11 1997
> @@ -1,7 +1,7 @@
> #ifndef __ASM_HARDIRQ_H
> #define __ASM_HARDIRQ_H
> -extern unsigned int local_irq_count[NR_CPUS];
> +unsigned int local_irq_count[NR_CPUS];
> #define in_interrupt() (local_irq_count[smp_processor_id()] != 0)
> #ifndef __SMP__

this patch is quite much broken both on uni and SMP processors ... it's
just luck that it works on uniprocessor. This one should take care of the
compilation problem:

--- linux-2.1.32_vanilla/arch/i386/kernel/irq.c Thu Apr 3 09:17:30 1997
+++ linux/arch/i386/kernel/irq.c Thu Apr 3 15:03:19 1997
@@ -500,6 +501,8 @@


+unsigned int local_irq_count[1]; /* uniprocessor is a .. hmm, single processor */
#define irq_enter(cpu, irq) (++intr_count)
#define irq_exit(cpu, irq) (--intr_count)

-- mingo