summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/entry_32.S
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2019-04-30 12:38:51 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2019-05-03 01:20:27 +1000
commit37737a2afd69c201d0dac334c84fd1f0d596dfc0 (patch)
tree461d4806f47fef0c14fedc0708aadd98f5800280 /arch/powerpc/kernel/entry_32.S
parent8a23fdec3dbdc8bfde6f806d36e773236dab6663 (diff)
downloadtalos-op-linux-37737a2afd69c201d0dac334c84fd1f0d596dfc0.tar.gz
talos-op-linux-37737a2afd69c201d0dac334c84fd1f0d596dfc0.zip
powerpc/32: move LOAD_MSR_KERNEL() into head_32.h and use it
As preparation for using head_32.h for head_40x.S, move LOAD_MSR_KERNEL() there and use it to load r10 with MSR_KERNEL value. In the mean time, this patch modifies it so that it takes into account the size of the passed value to determine if 'li' can be used or if 'lis/ori' is needed instead of using the size of MSR_KERNEL. This is done by using gas macro. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/entry_32.S')
-rw-r--r--arch/powerpc/kernel/entry_32.S9
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 2f3d159c11d7..d0cea3deb86c 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -38,14 +38,7 @@
#include <asm/barrier.h>
#include <asm/kup.h>
-/*
- * MSR_KERNEL is > 0x10000 on 4xx/Book-E since it include MSR_CE.
- */
-#if MSR_KERNEL >= 0x10000
-#define LOAD_MSR_KERNEL(r, x) lis r,(x)@h; ori r,r,(x)@l
-#else
-#define LOAD_MSR_KERNEL(r, x) li r,(x)
-#endif
+#include "head_32.h"
/*
* Align to 4k in order to ensure that all functions modyfing srr0/srr1
OpenPOWER on IntegriCloud