linux-mips
[Top] [All Lists]

Re: Compilation fails with CONFIG_DEBUG_SPINLOCK

To: Thomas Petazzoni <thomas.petazzoni@enix.org>
Subject: Re: Compilation fails with CONFIG_DEBUG_SPINLOCK
From: Ralf Baechle <ralf@linux-mips.org>
Date: Fri, 22 Oct 2004 14:50:19 +0200
Cc: linux-mips@linux-mips.org, mentre@tcl.ite.mee.com
In-reply-to: <20041013092057.GQ11236@enix.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20041013092057.GQ11236@enix.org>
Sender: linux-mips-bounce@linux-mips.org
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 ...

  Ralf

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