summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2019-11-14 14:08:28 +0100
committerVasily Gorbik <gor@linux.ibm.com>2019-11-20 12:58:13 +0100
commitc2313594216b3fde9559e502bb36d14e9d601a56 (patch)
tree13ab7e185f35cbc2d93107bb1fac3e976ccaa8ee
parents390/head64: remove unnecessary vdso_per_cpu_data setup (diff)
downloadlinux-c2313594216b3fde9559e502bb36d14e9d601a56.tar.xz
linux-c2313594216b3fde9559e502bb36d14e9d601a56.zip
s390/early: move access registers setup in C code
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
-rw-r--r--arch/s390/kernel/early.c9
-rw-r--r--arch/s390/kernel/head64.S10
2 files changed, 11 insertions, 8 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 0ed6ae6a8bde..db32a55daaec 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -30,6 +30,7 @@
#include <asm/sclp.h>
#include <asm/facility.h>
#include <asm/boot_data.h>
+#include <asm/switch_to.h>
#include "entry.h"
static void __init reset_tod_clock(void)
@@ -271,6 +272,13 @@ static inline void setup_control_registers(void)
__ctl_load(reg, 0, 0);
}
+static inline void setup_access_registers(void)
+{
+ unsigned int acrs[NUM_ACRS] = { 0 };
+
+ restore_access_regs(acrs);
+}
+
static int __init disable_vector_extension(char *str)
{
S390_lowcore.machine_flags &= ~MACHINE_FLAG_VX;
@@ -329,5 +337,6 @@ void __init startup_init(void)
setup_topology();
sclp_early_detect();
setup_control_registers();
+ setup_access_registers();
lockdep_on();
}
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
index 9d649abddffd..b9e585f528a6 100644
--- a/arch/s390/kernel/head64.S
+++ b/arch/s390/kernel/head64.S
@@ -35,13 +35,8 @@ ENTRY(startup_continue)
#ifdef CONFIG_KASAN
brasl %r14,kasan_early_init
#endif
-#
-# Early machine initialization and detection functions.
-#
- brasl %r14,startup_init
-
- lam 0,15,.Laregs-.LPG1(%r13) # load acrs needed by uaccess
- brasl %r14,start_kernel # go to C code
+ brasl %r14,startup_init # s390 specific early init
+ brasl %r14,start_kernel # common init code
#
# We returned from start_kernel ?!? PANIK
#
@@ -51,4 +46,3 @@ ENTRY(startup_continue)
.align 16
.LPG1:
.Ldw: .quad 0x0002000180000000,0x0000000000000000
-.Laregs:.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0