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>
This commit is contained in:
parent
b8ce1fa489
commit
c231359421
|
@ -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)
|
||||||
__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)
|
||||||
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)
|
||||||
#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)
|
||||||
.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
|
|
||||||
|
|
Loading…
Reference in a new issue