diff options
author | Heinz Graalfs <graalfs@linux.vnet.ibm.com> | 2012-06-11 16:06:59 +0200 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-06-13 20:53:45 -0300 |
commit | cd1834591fe9564720ac4b0193bf1c790fe89f0d (patch) | |
tree | d705284edf49d5054f6558db3c1f827179984bc4 /arch/s390/kernel/setup.c | |
parent | 61bde82caee95426bf1ad53fefc8dc691b8ba37c (diff) | |
download | linux-cd1834591fe9564720ac4b0193bf1c790fe89f0d.tar.gz linux-cd1834591fe9564720ac4b0193bf1c790fe89f0d.tar.bz2 linux-cd1834591fe9564720ac4b0193bf1c790fe89f0d.zip |
KVM: s390: Perform early event mask processing during boot
For processing under KVM it is required to detect
the actual SCLP console type in order to set it as
preferred console.
Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r-- | arch/s390/kernel/setup.c | 12 |
1 files changed, 9 insertions, 3 deletions
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 @@ #include <asm/kvm_virtio.h> #include <asm/diag.h> #include <asm/os_info.h> +#include <asm/sclp.h> #include "entry.h" long psw_kernel_bits = PSW_DEFAULT_KEY | PSW_MASK_BASE | PSW_ASC_PRIMARY | @@ -138,9 +139,14 @@ __setup("condev=", condev_setup); static void __init set_preferred_console(void) { - if (MACHINE_IS_KVM) - add_preferred_console("hvc", 0, NULL); - else if (CONSOLE_IS_3215 || CONSOLE_IS_SCLP) + if (MACHINE_IS_KVM) { + if (sclp_has_vt220()) + add_preferred_console("ttyS", 1, NULL); + else if (sclp_has_linemode()) + add_preferred_console("ttyS", 0, NULL); + else + add_preferred_console("hvc", 0, NULL); + } else if (CONSOLE_IS_3215 || CONSOLE_IS_SCLP) add_preferred_console("ttyS", 0, NULL); else if (CONSOLE_IS_3270) add_preferred_console("tty3270", 0, NULL); |