From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Peter Zijlstra <peterz@infradead•org>
Cc: Linus Walleij <linus.walleij@linaro•org>,
Thomas Gleixner <tglx@linutronix•de>, Ingo Molnar <mingo@elte•hu>,
"H. Peter Anvin" <hpa@zytor•com>,
Linux-Next Mailing List <linux-next@vger•kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Lukas Wunner <lukas@wunner•de>, Andi Kleen <ak@linux•intel.com>
Subject: Re: linux-next: manual merge of the gpio tree with the tip tree
Date: Thu, 2 Nov 2017 19:26:32 +1100 [thread overview]
Message-ID: <20171102192632.409d8138@canb.auug.org.au> (raw)
In-Reply-To: <20171102080627.6lhlrfcucz7zsfch@hirez.programming.kicks-ass.net>
Hi Peter,
On Thu, 2 Nov 2017 09:06:27 +0100 Peter Zijlstra <peterz@infradead•org> wrote:
>
> On Thu, Nov 02, 2017 at 03:59:52PM +1100, Stephen Rothwell wrote:
> > diff --cc include/linux/bitops.h
> > index 15a5bcfcd0a2,9a874deee6e2..000000000000
> > --- a/include/linux/bitops.h
> > +++ b/include/linux/bitops.h
> > @@@ -227,32 -227,30 +227,56 @@@ static inline unsigned long __ffs64(u6
> > return __ffs((unsigned long)word);
> > }
> >
> > +/*
> > + * clear_bit32 - Clear a bit in memory for u32 array
> > + * @nr: Bit to clear
> > + * @addr: u32 * address of bitmap
> > + *
> > + * Same as clear_bit, but avoids needing casts for u32 arrays.
> > + */
> > +
> > +static __always_inline void clear_bit32(long nr, volatile u32 *addr)
> > +{
> > + clear_bit(nr, (volatile unsigned long *)addr);
> > +}
> > +
> > +/*
> > + * set_bit32 - Set a bit in memory for u32 array
> > + * @nr: Bit to clear
> > + * @addr: u32 * address of bitmap
> > + *
> > + * Same as set_bit, but avoids needing casts for u32 arrays.
> > + */
> > +
> > +static __always_inline void set_bit32(long nr, volatile u32 *addr)
> > +{
> > + set_bit(nr, (volatile unsigned long *)addr);
> > +}
>
> How is that not fundamentally broken for big-endian?
Yes, that went through my mind as well :-)
--
Cheers,
Stephen Rothwell
next prev parent reply other threads:[~2017-11-02 8:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 4:59 linux-next: manual merge of the gpio tree with the tip tree Stephen Rothwell
2017-11-02 8:06 ` Peter Zijlstra
2017-11-02 8:26 ` Stephen Rothwell [this message]
2017-11-02 8:38 ` Peter Zijlstra
-- strict thread matches above, loose matches on Subject: below --
2016-03-02 4:27 Stephen Rothwell
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=20171102192632.409d8138@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=ak@linux$(echo .)intel.com \
--cc=hpa@zytor$(echo .)com \
--cc=linus.walleij@linaro$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=lukas@wunner$(echo .)de \
--cc=mingo@elte$(echo .)hu \
--cc=peterz@infradead$(echo .)org \
--cc=tglx@linutronix$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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