From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Bryan Wu <cooloney@kernel.org>,
torvalds@linux-foundation.org, mingo@elte.hu,
linux-kernel@vger.kernel.org, Graf Yang <graf.yang@analog.com>
Subject: Re: [PATCH 2/5] Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code
Date: Wed, 19 Nov 2008 18:05:07 +1100 [thread overview]
Message-ID: <200811191805.07656.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <20081118225629.eddd23ae.akpm@linux-foundation.org>
On Wednesday 19 November 2008 17:56, Andrew Morton wrote:
> On Tue, 18 Nov 2008 17:05:05 +0800 Bryan Wu <cooloney@kernel.org> wrote:
> > +#define smp_mb__before_clear_bit() barrier()
> > +#define smp_mb__after_clear_bit() barrier()
> > +
> > +static inline void __set_bit(int nr, volatile unsigned long *addr)
> > +{
> > + int *a = (int *)addr;
> > + int mask;
> > +
> > + a += nr >> 5;
> > + mask = 1 << (nr & 0x1f);
> > + *a |= mask;
> > +}
> > +
> > +static inline void __clear_bit(int nr, volatile unsigned long *addr)
> > +{
> > + int *a = (int *)addr;
> > + int mask;
> > +
> > + a += nr >> 5;
> > + mask = 1 << (nr & 0x1f);
> > + *a &= ~mask;
> > +}
> > +
> > +static inline void __change_bit(int nr, volatile unsigned long *addr)
> > +{
> > + int mask;
> > + unsigned long *ADDR = (unsigned long *)addr;
> > +
> > + ADDR += nr >> 5;
> > + mask = 1 << (nr & 31);
> > + *ADDR ^= mask;
> > +}
>
> I'm surprised there isn't any generic code which can be used for the above.
include/asm-generic/bitops/non-atomic.h
> > ...
>
> Gad what a lot of code. I don't think I have time to read it all, sorry.
:) I don't know who is expected to. Cc'ing linux-arch for something
like this might attract some helpful comments.
next prev parent reply other threads:[~2008-11-19 7:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-18 9:05 [PATCH 0/5] Blackfin SMP like patchset Bryan Wu
2008-11-18 9:05 ` [PATCH 1/5] Blackfin arch: SMP supporting patchset: BF561 related code Bryan Wu
2008-11-19 6:56 ` Andrew Morton
2008-11-19 7:39 ` Bryan Wu
2008-11-19 8:10 ` gyang
2008-11-18 9:05 ` [PATCH 2/5] Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code Bryan Wu
2008-11-19 6:56 ` Andrew Morton
2008-11-19 7:05 ` Nick Piggin [this message]
2008-11-19 7:44 ` Bryan Wu
2008-11-19 7:42 ` Bryan Wu
2008-11-20 13:50 ` Mike Frysinger
2008-11-19 7:52 ` gyang
2008-11-19 8:20 ` Bryan Wu
2008-11-19 7:44 ` Bryan Wu
2008-11-18 9:05 ` [PATCH 3/5] Blackfin arch: SMP supporting patchset: Blackfin CPLB related code Bryan Wu
2008-11-19 7:45 ` Bryan Wu
2008-11-18 9:05 ` [PATCH 4/5] Blackfin arch: SMP supporting patchset: Blackfin kernel and memory management code Bryan Wu
2008-11-19 7:46 ` Bryan Wu
2008-11-18 9:05 ` [PATCH 5/5] Blackfin arch: SMP supporting patchset: some other misc code Bryan Wu
2008-11-19 7:47 ` Bryan Wu
2008-11-19 6:56 ` [PATCH 0/5] Blackfin SMP like patchset Andrew Morton
2008-11-19 7:27 ` Bryan Wu
2008-11-19 7:28 ` Bryan Wu
2008-11-19 13:51 ` Mike Frysinger
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=200811191805.07656.nickpiggin@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@linux-foundation.org \
--cc=cooloney@kernel.org \
--cc=graf.yang@analog.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.