Re: [PATCH] 2.5.44: lkcd (9/9): dump driver and build files

Keith Owens (kaos@sgi.com)
Wed, 23 Oct 2002 08:56:18 +1000


On 22 Oct 2002 15:21:02 -0700,
Piet Delaney <piet@www.piet.net> wrote:
>Looks like your right, for parisc even these functions are using a
>spinlock. Is it really necessary for parisc to use spinlocks? Even
>Solaris doesn't use spinlocks for atomic set and reads of atomic
>variables.

Hardware restriction. Somebody read that "all locks can be implemented
in terms of a single hardware primitive" and believed it :(. The only
atomic operation on parisc is load and clear word. According to the
comments in asm-parisc/atomic.h, atomic_set should not require a lock,
but it is coded to use one. Atomic add/sub obviously needs a lock.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/