From: David Howells <dhowells@redhat.com>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: David Howells <dhowells@redhat.com>,
Andrew Morton <akpm@osdl.org>,
torvalds@osdl.org, davem@davemloft.com, wli@holomorphy.com,
matthew@wil.cx, linux-kernel@vger.kernel.org,
linux-arch@vger.kernel.org
Subject: Re: [PATCH 3/3] WorkStruct: Use direct assignment rather than cmpxchg()
Date: Thu, 07 Dec 2006 23:58:23 +0000 [thread overview]
Message-ID: <26012.1165535903@redhat.com> (raw)
In-Reply-To: <20061207234250.GH1255@flint.arm.linux.org.uk>
Russell King <rmk+lkml@arm.linux.org.uk> wrote:
> Incorrect. pre-v6 ARM bitops for test_and_xxx_bit() all do:
>
> save and disable irqs
> load value
> test bit
> if not in desired state, alter bit and write it back
> restore irqs
Hmmm... ARM has two implementations. One in the header files which is what I
consulted when writing that email:
static inline void ____atomic_set_bit(unsigned int bit, volatile unsigned long *p)
{
unsigned long flags;
unsigned long mask = 1UL << (bit & 31);
p += bit >> 5;
raw_local_irq_save(flags);
*p |= mask;
raw_local_irq_restore(flags);
}
And the other in the libs which does as you say. Why the one in the header
file at all?
David
next prev parent reply other threads:[~2006-12-07 23:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-07 15:31 [PATCH 1/3] WorkStruct: Fix up some PA-RISC work items David Howells
2006-12-07 15:31 ` [PATCH 2/3] WorkStruct: Add assign_bits() to give an atomic-bitops safe assignment David Howells
2006-12-07 15:31 ` [PATCH 3/3] WorkStruct: Use direct assignment rather than cmpxchg() David Howells
2006-12-07 16:54 ` Andrew Morton
2006-12-07 20:06 ` David Howells
2006-12-07 21:06 ` Andrew Morton
2006-12-07 21:06 ` James Bottomley
2006-12-07 21:16 ` David Howells
2006-12-07 22:11 ` David Miller
2006-12-07 23:42 ` Russell King
2006-12-07 23:58 ` David Howells [this message]
2006-12-08 11:14 ` Russell King
2006-12-08 13:57 ` David Howells
2006-12-08 3:42 ` [PATCH 1/3] WorkStruct: Fix up some PA-RISC work items Kyle McMartin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=26012.1165535903@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=davem@davemloft.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=torvalds@osdl.org \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox