diff options
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/include/asm/sclp.h | 2 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h index bf238c55740b..173f07aaeb2b 100644 --- a/arch/s390/include/asm/sclp.h +++ b/arch/s390/include/asm/sclp.h | |||
@@ -55,5 +55,7 @@ int sclp_chp_configure(struct chp_id chpid); | |||
55 | int sclp_chp_deconfigure(struct chp_id chpid); | 55 | int sclp_chp_deconfigure(struct chp_id chpid); |
56 | int sclp_chp_read_info(struct sclp_chp_info *info); | 56 | int sclp_chp_read_info(struct sclp_chp_info *info); |
57 | void sclp_get_ipl_info(struct sclp_ipl_info *info); | 57 | void sclp_get_ipl_info(struct sclp_ipl_info *info); |
58 | bool sclp_has_linemode(void); | ||
59 | bool sclp_has_vt220(void); | ||
58 | 60 | ||
59 | #endif /* _ASM_S390_SCLP_H */ | 61 | #endif /* _ASM_S390_SCLP_H */ |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 489d1d8d96b0..e86bca6f975c 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include <asm/kvm_virtio.h> | 63 | #include <asm/kvm_virtio.h> |
64 | #include <asm/diag.h> | 64 | #include <asm/diag.h> |
65 | #include <asm/os_info.h> | 65 | #include <asm/os_info.h> |
66 | #include <asm/sclp.h> | ||
66 | #include "entry.h" | 67 | #include "entry.h" |
67 | 68 | ||
68 | long psw_kernel_bits = PSW_DEFAULT_KEY | PSW_MASK_BASE | PSW_ASC_PRIMARY | | 69 | long psw_kernel_bits = PSW_DEFAULT_KEY | PSW_MASK_BASE | PSW_ASC_PRIMARY | |
@@ -138,9 +139,14 @@ __setup("condev=", condev_setup); | |||
138 | 139 | ||
139 | static void __init set_preferred_console(void) | 140 | static void __init set_preferred_console(void) |
140 | { | 141 | { |
141 | if (MACHINE_IS_KVM) | 142 | if (MACHINE_IS_KVM) { |
142 | add_preferred_console("hvc", 0, NULL); | 143 | if (sclp_has_vt220()) |
143 | else if (CONSOLE_IS_3215 || CONSOLE_IS_SCLP) | 144 | add_preferred_console("ttyS", 1, NULL); |
145 | else if (sclp_has_linemode()) | ||
146 | add_preferred_console("ttyS", 0, NULL); | ||
147 | else | ||
148 | add_preferred_console("hvc", 0, NULL); | ||
149 | } else if (CONSOLE_IS_3215 || CONSOLE_IS_SCLP) | ||
144 | add_preferred_console("ttyS", 0, NULL); | 150 | add_preferred_console("ttyS", 0, NULL); |
145 | else if (CONSOLE_IS_3270) | 151 | else if (CONSOLE_IS_3270) |
146 | add_preferred_console("tty3270", 0, NULL); | 152 | add_preferred_console("tty3270", 0, NULL); |