Move LOAD_REG_IMMEDIATE() and LOAD_REG_ADDR() from cstart64.S to ppc_asm.h Signed-off-by: Laurent Vivier <lvivier@xxxxxxxxxx> Reviewed-by: Andrew Jones <drjones@xxxxxxxxxx> Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx> --- 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 <asm/hcall.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) +#include <asm/ppc_asm.h> .section .init -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html