From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: [PATCH 1/6] PPC: Add asm helpers for BE 32bit load/store Date: Tue, 17 Jun 2014 10:34:21 +0200 Message-ID: <539FFD8D.3020809@suse.de> References: <1402482831-8941-1-git-send-email-agraf@suse.de> <1402482831-8941-2-git-send-email-agraf@suse.de> <20140617005124.GA16554@iris.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, anton@samba.org, Benjamin Herrenschmidt To: Paul Mackerras Return-path: Received: from cantor2.suse.de ([195.135.220.15]:45187 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753304AbaFQIeY (ORCPT ); Tue, 17 Jun 2014 04:34:24 -0400 In-Reply-To: <20140617005124.GA16554@iris.ozlabs.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 17.06.14 02:51, Paul Mackerras wrote: > On Wed, Jun 11, 2014 at 12:33:46PM +0200, Alexander Graf wrote: >> >From assembly code we might not only have to explicitly BE access 64bit values, >> but sometimes also 32bit ones. Add helpers that allow for easy use of lwzx/stwx >> in their respective byte-reverse or native form. >> >> Signed-off-by: Alexander Graf >> CC: Benjamin Herrenschmidt >> --- >> arch/powerpc/include/asm/asm-compat.h | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/arch/powerpc/include/asm/asm-compat.h b/arch/powerpc/include/asm/asm-compat.h >> index 4b237aa..21164ff 100644 >> --- a/arch/powerpc/include/asm/asm-compat.h >> +++ b/arch/powerpc/include/asm/asm-compat.h >> @@ -34,10 +34,14 @@ >> #define PPC_MIN_STKFRM 112 >> >> #ifdef __BIG_ENDIAN__ >> +#define LWZX_BE stringify_in_c(lwzx) >> #define LDX_BE stringify_in_c(ldx) >> +#define STDX_BE stringify_in_c(stwx) > This should be STWX_BE, shouldn't it? And there I thought I would get away without anyone noticing it :). Yes, of course. Alex