Commit c2313594 authored by Vasily Gorbik's avatar Vasily Gorbik

s390/early: move access registers setup in C code

Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent b8ce1fa4
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <asm/sclp.h> #include <asm/sclp.h>
#include <asm/facility.h> #include <asm/facility.h>
#include <asm/boot_data.h> #include <asm/boot_data.h>
#include <asm/switch_to.h>
#include "entry.h" #include "entry.h"
static void __init reset_tod_clock(void) static void __init reset_tod_clock(void)
...@@ -271,6 +272,13 @@ static inline void setup_control_registers(void) ...@@ -271,6 +272,13 @@ static inline void setup_control_registers(void)
__ctl_load(reg, 0, 0); __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) static int __init disable_vector_extension(char *str)
{ {
S390_lowcore.machine_flags &= ~MACHINE_FLAG_VX; S390_lowcore.machine_flags &= ~MACHINE_FLAG_VX;
...@@ -329,5 +337,6 @@ void __init startup_init(void) ...@@ -329,5 +337,6 @@ void __init startup_init(void)
setup_topology(); setup_topology();
sclp_early_detect(); sclp_early_detect();
setup_control_registers(); setup_control_registers();
setup_access_registers();
lockdep_on(); lockdep_on();
} }
...@@ -35,13 +35,8 @@ ENTRY(startup_continue) ...@@ -35,13 +35,8 @@ ENTRY(startup_continue)
#ifdef CONFIG_KASAN #ifdef CONFIG_KASAN
brasl %r14,kasan_early_init brasl %r14,kasan_early_init
#endif #endif
# brasl %r14,startup_init # s390 specific early init
# Early machine initialization and detection functions. brasl %r14,start_kernel # common init code
#
brasl %r14,startup_init
lam 0,15,.Laregs-.LPG1(%r13) # load acrs needed by uaccess
brasl %r14,start_kernel # go to C code
# #
# We returned from start_kernel ?!? PANIK # We returned from start_kernel ?!? PANIK
# #
...@@ -51,4 +46,3 @@ ENTRY(startup_continue) ...@@ -51,4 +46,3 @@ ENTRY(startup_continue)
.align 16 .align 16
.LPG1: .LPG1:
.Ldw: .quad 0x0002000180000000,0x0000000000000000 .Ldw: .quad 0x0002000180000000,0x0000000000000000
.Laregs:.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment