diff options
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r-- | arch/s390/kernel/setup.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 489d1d8d96b0..743c0f32fe3b 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -1,8 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * arch/s390/kernel/setup.c | ||
3 | * | ||
4 | * S390 version | 2 | * S390 version |
5 | * Copyright (C) IBM Corp. 1999,2012 | 3 | * Copyright IBM Corp. 1999, 2012 |
6 | * Author(s): Hartmut Penner (hp@de.ibm.com), | 4 | * Author(s): Hartmut Penner (hp@de.ibm.com), |
7 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 5 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
8 | * | 6 | * |
@@ -63,6 +61,7 @@ | |||
63 | #include <asm/kvm_virtio.h> | 61 | #include <asm/kvm_virtio.h> |
64 | #include <asm/diag.h> | 62 | #include <asm/diag.h> |
65 | #include <asm/os_info.h> | 63 | #include <asm/os_info.h> |
64 | #include <asm/sclp.h> | ||
66 | #include "entry.h" | 65 | #include "entry.h" |
67 | 66 | ||
68 | long psw_kernel_bits = PSW_DEFAULT_KEY | PSW_MASK_BASE | PSW_ASC_PRIMARY | | 67 | long psw_kernel_bits = PSW_DEFAULT_KEY | PSW_MASK_BASE | PSW_ASC_PRIMARY | |
@@ -138,9 +137,14 @@ __setup("condev=", condev_setup); | |||
138 | 137 | ||
139 | static void __init set_preferred_console(void) | 138 | static void __init set_preferred_console(void) |
140 | { | 139 | { |
141 | if (MACHINE_IS_KVM) | 140 | if (MACHINE_IS_KVM) { |
142 | add_preferred_console("hvc", 0, NULL); | 141 | if (sclp_has_vt220()) |
143 | else if (CONSOLE_IS_3215 || CONSOLE_IS_SCLP) | 142 | add_preferred_console("ttyS", 1, NULL); |
143 | else if (sclp_has_linemode()) | ||
144 | add_preferred_console("ttyS", 0, NULL); | ||
145 | else | ||
146 | add_preferred_console("hvc", 0, NULL); | ||
147 | } else if (CONSOLE_IS_3215 || CONSOLE_IS_SCLP) | ||
144 | add_preferred_console("ttyS", 0, NULL); | 148 | add_preferred_console("ttyS", 0, NULL); |
145 | else if (CONSOLE_IS_3270) | 149 | else if (CONSOLE_IS_3270) |
146 | add_preferred_console("tty3270", 0, NULL); | 150 | add_preferred_console("tty3270", 0, NULL); |
@@ -430,10 +434,11 @@ static void __init setup_lowcore(void) | |||
430 | lc->restart_source = -1UL; | 434 | lc->restart_source = -1UL; |
431 | 435 | ||
432 | /* Setup absolute zero lowcore */ | 436 | /* Setup absolute zero lowcore */ |
433 | memcpy_absolute(&S390_lowcore.restart_stack, &lc->restart_stack, | 437 | mem_assign_absolute(S390_lowcore.restart_stack, lc->restart_stack); |
434 | 4 * sizeof(unsigned long)); | 438 | mem_assign_absolute(S390_lowcore.restart_fn, lc->restart_fn); |
435 | memcpy_absolute(&S390_lowcore.restart_psw, &lc->restart_psw, | 439 | mem_assign_absolute(S390_lowcore.restart_data, lc->restart_data); |
436 | sizeof(lc->restart_psw)); | 440 | mem_assign_absolute(S390_lowcore.restart_source, lc->restart_source); |
441 | mem_assign_absolute(S390_lowcore.restart_psw, lc->restart_psw); | ||
437 | 442 | ||
438 | set_prefix((u32)(unsigned long) lc); | 443 | set_prefix((u32)(unsigned long) lc); |
439 | lowcore_ptr[0] = lc; | 444 | lowcore_ptr[0] = lc; |
@@ -598,9 +603,7 @@ static void __init setup_memory_end(void) | |||
598 | static void __init setup_vmcoreinfo(void) | 603 | static void __init setup_vmcoreinfo(void) |
599 | { | 604 | { |
600 | #ifdef CONFIG_KEXEC | 605 | #ifdef CONFIG_KEXEC |
601 | unsigned long ptr = paddr_vmcoreinfo_note(); | 606 | mem_assign_absolute(S390_lowcore.vmcore_info, paddr_vmcoreinfo_note()); |
602 | |||
603 | memcpy_absolute(&S390_lowcore.vmcore_info, &ptr, sizeof(ptr)); | ||
604 | #endif | 607 | #endif |
605 | } | 608 | } |
606 | 609 | ||