public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: kvm-ppc@vger.kernel.org
Cc: kvm@vger.kernel.org, anton@samba.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: [PATCH 1/6] PPC: Add asm helpers for BE 32bit load/store
Date: Wed, 11 Jun 2014 12:33:46 +0200	[thread overview]
Message-ID: <1402482831-8941-2-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1402482831-8941-1-git-send-email-agraf@suse.de>

>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 <agraf@suse.de>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 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)
 #define STDX_BE	stringify_in_c(stdx)
 #else
+#define LWZX_BE	stringify_in_c(lwbrx)
 #define LDX_BE	stringify_in_c(ldbrx)
+#define STWX_BE	stringify_in_c(stwbrx)
 #define STDX_BE	stringify_in_c(stdbrx)
 #endif
 
-- 
1.8.1.4

  reply	other threads:[~2014-06-11 10:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11 10:33 [PATCH 0/6] KVM: PPC: Book3S HV: Enable on little endian hosts Alexander Graf
2014-06-11 10:33 ` Alexander Graf [this message]
2014-06-17  0:51   ` [PATCH 1/6] PPC: Add asm helpers for BE 32bit load/store Paul Mackerras
2014-06-17  8:34     ` Alexander Graf
2014-06-11 10:33 ` [PATCH 2/6] KVM: PPC: Book3S HV: Make HTAB code LE host aware Alexander Graf
2014-06-11 10:33 ` [PATCH 3/6] KVM: PPC: Book3S HV: Access guest VPA in BE Alexander Graf
2014-06-11 10:33 ` [PATCH 4/6] KVM: PPC: Book3S HV: Access host lppaca and shadow slb " Alexander Graf
2014-06-11 10:33 ` [PATCH 5/6] KVM: PPC: Book3S HV: Access XICS " Alexander Graf
2014-06-17  1:02   ` Paul Mackerras
2014-06-17  8:37     ` Alexander Graf
2014-06-17 10:22       ` Alexander Graf
2014-06-17 12:13         ` Paul Mackerras
2014-06-17 12:14           ` Alexander Graf
2014-06-11 10:33 ` [PATCH 6/6] KVM: PPC: Book3S HV: Enable for little endian hosts Alexander Graf
2014-06-16  4:22 ` [PATCH 0/6] KVM: PPC: Book3S HV: Enable on " Aneesh Kumar K.V
2014-06-16 12:17   ` Alexander Graf

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=1402482831-8941-2-git-send-email-agraf@suse.de \
    --to=agraf@suse.de \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.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