diff options
author | Heinz Graalfs <graalfs@linux.vnet.ibm.com> | 2012-06-11 14:06:59 (GMT) |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-06-13 23:53:45 (GMT) |
commit | cd1834591fe9564720ac4b0193bf1c790fe89f0d (patch) | |
tree | d705284edf49d5054f6558db3c1f827179984bc4 /arch/s390/kernel | |
parent | 61bde82caee95426bf1ad53fefc8dc691b8ba37c (diff) | |
download | linux-fsl-qoriq-cd1834591fe9564720ac4b0193bf1c790fe89f0d.tar.xz |
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')
-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 489d1d8..e86bca6 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); |