mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Michal Sojka <sojkam1@fel.cvut.cz>,
	Ingo Molnar <mingo@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Philippe Bergheaud <felix@linux.vnet.ibm.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	"David S. Miller" <davem@davemloft.net>,
	Anton Blanchard <anton@samba.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arch/powerpc: provide zero_bytemask() for big-endian
Date: Thu, 08 Oct 2015 14:39:35 +1100	[thread overview]
Message-ID: <1444275575.9940.4.camel@ellerman.id.au> (raw)
In-Reply-To: <1444229188-19640-1-git-send-email-cmetcalf@ezchip.com>

On Wed, 2015-10-07 at 10:46 -0400, Chris Metcalf wrote:
> For some reason, only the little-endian flavor of
> powerpc provided the zero_bytemask() implementation.

Because previously it was optional unless DCACHE_WORD_ACCESS was enabled.

> Reported-by: Michal Sojka <sojkam1@fel.cvut.cz>
> Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
> ---
>  arch/powerpc/include/asm/word-at-a-time.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/powerpc/include/asm/word-at-a-time.h b/arch/powerpc/include/asm/word-at-a-time.h
> index 5b3a903adae6..e4396a7d0f7c 100644
> --- a/arch/powerpc/include/asm/word-at-a-time.h
> +++ b/arch/powerpc/include/asm/word-at-a-time.h
> @@ -40,6 +40,11 @@ static inline bool has_zero(unsigned long val, unsigned long *data, const struct
>  	return (val + c->high_bits) & ~rhs;
>  }
>  
> +static inline unsigned long zero_bytemask(unsigned long mask)
> +{
> +	return ~1ul << __fls(mask);
> +}
> +
>  #else
>  
>  #ifdef CONFIG_64BIT


This looks right, and I tested it too so have an ack if you want it:

Acked-by: Michael Ellerman <mpe@ellerman.id.au>


If you can CC linuxppc-dev@lists.ozlabs.org in future on powerpc patches I'll
notice them quicker, I know I was CC'ed on this but because it also went to
LKML it got put in my lkml folder.

cheers




      reply	other threads:[~2015-10-08  3:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 12:53 error: implicit declaration of function 'zero_bytemask' Michal Sojka
2015-10-07 13:29 ` Chris Metcalf
2015-10-07 13:41   ` Michal Sojka
2015-10-07 14:46     ` [PATCH] arch/powerpc: provide zero_bytemask() for big-endian Chris Metcalf
2015-10-08  3:39       ` Michael Ellerman [this message]

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=1444275575.9940.4.camel@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=cmetcalf@ezchip.com \
    --cc=davem@davemloft.net \
    --cc=felix@linux.vnet.ibm.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulus@samba.org \
    --cc=sojkam1@fel.cvut.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome