diff options
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r-- | arch/s390/kernel/setup.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 0c35dee10b00..18640ff0aa1a 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -346,7 +346,7 @@ setup_lowcore(void) | |||
346 | lc = __alloc_bootmem_low(LC_PAGES * PAGE_SIZE, LC_PAGES * PAGE_SIZE, 0); | 346 | lc = __alloc_bootmem_low(LC_PAGES * PAGE_SIZE, LC_PAGES * PAGE_SIZE, 0); |
347 | lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; | 347 | lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; |
348 | lc->restart_psw.addr = | 348 | lc->restart_psw.addr = |
349 | PSW_ADDR_AMODE | (unsigned long) restart_int_handler; | 349 | PSW_ADDR_AMODE | (unsigned long) psw_restart_int_handler; |
350 | if (user_mode != HOME_SPACE_MODE) | 350 | if (user_mode != HOME_SPACE_MODE) |
351 | lc->restart_psw.mask |= PSW_ASC_HOME; | 351 | lc->restart_psw.mask |= PSW_ASC_HOME; |
352 | lc->external_new_psw.mask = psw_kernel_bits; | 352 | lc->external_new_psw.mask = psw_kernel_bits; |
@@ -529,6 +529,27 @@ static void __init setup_memory_end(void) | |||
529 | memory_end = memory_size; | 529 | memory_end = memory_size; |
530 | } | 530 | } |
531 | 531 | ||
532 | void *restart_stack __attribute__((__section__(".data"))); | ||
533 | |||
534 | /* | ||
535 | * Setup new PSW and allocate stack for PSW restart interrupt | ||
536 | */ | ||
537 | static void __init setup_restart_psw(void) | ||
538 | { | ||
539 | psw_t psw; | ||
540 | |||
541 | restart_stack = __alloc_bootmem(ASYNC_SIZE, ASYNC_SIZE, 0); | ||
542 | restart_stack += ASYNC_SIZE; | ||
543 | |||
544 | /* | ||
545 | * Setup restart PSW for absolute zero lowcore. This is necesary | ||
546 | * if PSW restart is done on an offline CPU that has lowcore zero | ||
547 | */ | ||
548 | psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; | ||
549 | psw.addr = PSW_ADDR_AMODE | (unsigned long) psw_restart_int_handler; | ||
550 | copy_to_absolute_zero(&S390_lowcore.restart_psw, &psw, sizeof(psw)); | ||
551 | } | ||
552 | |||
532 | static void __init | 553 | static void __init |
533 | setup_memory(void) | 554 | setup_memory(void) |
534 | { | 555 | { |
@@ -792,6 +813,7 @@ setup_arch(char **cmdline_p) | |||
792 | setup_addressing_mode(); | 813 | setup_addressing_mode(); |
793 | setup_memory(); | 814 | setup_memory(); |
794 | setup_resources(); | 815 | setup_resources(); |
816 | setup_restart_psw(); | ||
795 | setup_lowcore(); | 817 | setup_lowcore(); |
796 | 818 | ||
797 | cpu_init(); | 819 | cpu_init(); |