Re: [PATCH for review] [109/145] x86_64: Convert modlist_lock to bea raw spinlock

From: Andrew Morton
Date: Sun Aug 13 2006 - 03:00:48 EST

On Sun, 13 Aug 2006 08:52:46 +0200
Andi Kleen <ak@xxxxxxx> wrote:

> On Sunday 13 August 2006 07:48, Andrew Morton wrote:
> > On Thu, 10 Aug 2006 21:37:07 +0200 (CEST)
> > Andi Kleen <ak@xxxxxxx> wrote:
> >
> > > This is a preparationary patch for converting stacktrace over to the
> > > new dwarf2 unwinder. lockdep uses stacktrace and the new unwinder
> > > takes the modlist_lock so using a normal spinlock would cause a deadlock.
> > > Use a raw lock instead.
> > >
> >
> > It breaks the build on most architectures.
> Hmm, I grepped and most architectures seem to have both __raw_spin_lock
> and local_save_flags.

box:/usr/src/25> grep -l raw_local_save_flags include/asm-*/*.h

> I didn't actually compile them because crosstool
> doesn't love me anymore since I use gcc 4.0.

crosstool is a bit of a bitch.

> What is the official portable interface to do a raw spinlock
> if this one doesn't work?

I don't see a way, really. Apart from going in and implementing it on the
various architectures.

Perhaps x86_64-mm-module-locks-raw-spinlock-hack-hack-hack.patch could be
hoisted up to include/linux/spinlock.h and then at least only
lockdep-enabled architectures need to implement these things.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at