Re: SMP update: 2.1.30

Ingo Molnar (mingo@pc5829.hil.siemens.at)
Fri, 28 Mar 1997 18:01:37 +0100 (MET)


On 27 Mar 1997, Linus Torvalds wrote:

> [...] I haven't yet much looked into the impact of
> the new code on uni-processor machines, but I'd certainly appreciate
> comments and potential patches for UP-related issues too...

ksymoops breaks when compiling uniprocessor. spinlocks in sched.c are
declared but unused, this leads to extra 'U' entries at the beginning of
System.map, which in turn confuses ksymoops.

i've put those spinlocks into #ifdef __SMP__, but i think a more correct
solution would be to do something like this:

in asm/spinlock.h:

#ifdef __SMP__
# define DECLARE_SPINLOCK(name) spinlock_t name
#else
# define DECLARE_SPINLOCK(name)
#endif

sched.c:

DECLARE_SPINLOCK( runqueue_lock=SPIN_LOCK_UNLOCKED );

static spinlocks cant be defined this way, is that a problem?

-- mingo