Skip to content

Commit

Permalink
s390/early: move access registers setup in C code
Browse files Browse the repository at this point in the history
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
  • Loading branch information
Vasily Gorbik committed Nov 20, 2019
1 parent b8ce1fa commit c231359
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
9 changes: 9 additions & 0 deletions arch/s390/kernel/early.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -329,5 +337,6 @@ void __init startup_init(void)
setup_topology();
sclp_early_detect();
setup_control_registers();
setup_access_registers();
lockdep_on();
}
10 changes: 2 additions & 8 deletions arch/s390/kernel/head64.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand All @@ -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

0 comments on commit c231359

Please sign in to comment.