[Top] [All Lists]

Re: Compilation fails with CONFIG_DEBUG_SPINLOCK

To: Thomas Petazzoni <>
Subject: Re: Compilation fails with CONFIG_DEBUG_SPINLOCK
From: Ralf Baechle <>
Date: Fri, 22 Oct 2004 14:50:19 +0200
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Mutt/1.4.1i
On Wed, Oct 13, 2004 at 11:20:57AM +0200, Thomas Petazzoni wrote:

> I think this is trivial to fix, but I'm not sure what is the right
> place to declare the spin lock and to initialize it.

atomic_lock is intentionally undefined.  The code using it should ever
be referenced on uni-processor systems that don't have ll/sc and on those
the spinlock code happens to not reference the spinlock_t argument not
at all.  So iow if the compiled code actually references atomic_lock,
something is smelling.  In general the reason is not having an
include/asm-mips/mach-<foo>/cpu-feature-overrides.h file.  If this is
missing the kernel will fallback to runtime detection of cpu_has_llsc
which due to the performance sensitive nature of most atomic_t users is
a bad idea.  So this error is the bomb hidden in the code to alert
users ...


<Prev in Thread] Current Thread [Next in Thread>