From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Huth Date: Tue, 01 Mar 2016 08:30:22 +0000 Subject: Re: [kvm-unit-tests PATCH v3 1/2] powerpc: add asm/ppc_asm.h Message-Id: <56D5531E.10108@redhat.com> List-Id: References: <1456768146-10136-1-git-send-email-lvivier@redhat.com> <1456768146-10136-2-git-send-email-lvivier@redhat.com> In-Reply-To: <1456768146-10136-2-git-send-email-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Laurent Vivier , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Cc: drjones@redhat.com, dgibson@redhat.com, agraf@suse.de, pbonzini@redhat.com On 29.02.2016 18:49, Laurent Vivier wrote: > Move LOAD_REG_IMMEDIATE() and LOAD_REG_ADDR() > from cstart64.S to ppc_asm.h > > Signed-off-by: Laurent Vivier > --- > lib/powerpc/asm/ppc_asm.h | 14 ++++++++++++++ > lib/ppc64/asm/ppc_asm.h | 1 + > powerpc/cstart64.S | 11 +---------- > 3 files changed, 16 insertions(+), 10 deletions(-) > create mode 100644 lib/powerpc/asm/ppc_asm.h > create mode 100644 lib/ppc64/asm/ppc_asm.h > > diff --git a/lib/powerpc/asm/ppc_asm.h b/lib/powerpc/asm/ppc_asm.h > new file mode 100644 > index 0000000..f63bb72 > --- /dev/null > +++ b/lib/powerpc/asm/ppc_asm.h > @@ -0,0 +1,14 @@ > +#ifndef _ASMPOWERPC_PPC_ASM_H > +#define _ASMPOWERPC_PPC_ASM_H > + > +#define LOAD_REG_IMMEDIATE(reg,expr) \ > + lis reg,(expr)@highest; \ > + ori reg,reg,(expr)@higher; \ > + rldicr reg,reg,32,31; \ > + oris reg,reg,(expr)@h; \ > + ori reg,reg,(expr)@l; > + > +#define LOAD_REG_ADDR(reg,name) \ > + ld reg,name@got(r2) > + > +#endif /* _ASMPOWERPC_PPC_ASM_H */ > diff --git a/lib/ppc64/asm/ppc_asm.h b/lib/ppc64/asm/ppc_asm.h > new file mode 100644 > index 0000000..e3929ee > --- /dev/null > +++ b/lib/ppc64/asm/ppc_asm.h > @@ -0,0 +1 @@ > +#include "../../powerpc/asm/ppc_asm.h" > diff --git a/powerpc/cstart64.S b/powerpc/cstart64.S > index 4693ba1..6072597 100644 > --- a/powerpc/cstart64.S > +++ b/powerpc/cstart64.S > @@ -7,16 +7,7 @@ > */ > #define __ASSEMBLY__ > #include > - > -#define LOAD_REG_IMMEDIATE(reg,expr) \ > - lis reg,(expr)@highest; \ > - ori reg,reg,(expr)@higher; \ > - rldicr reg,reg,32,31; \ > - oris reg,reg,(expr)@h; \ > - ori reg,reg,(expr)@l; > - > -#define LOAD_REG_ADDR(reg,name) \ > - ld reg,name@got(r2) > +#include > > .section .init Reviewed-by: Thomas Huth