diff options
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r-- | arch/s390/kernel/setup.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 9717717c6fea..9ed13a1ed376 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -154,6 +154,16 @@ static int __init condev_setup(char *str) | |||
154 | 154 | ||
155 | __setup("condev=", condev_setup); | 155 | __setup("condev=", condev_setup); |
156 | 156 | ||
157 | static void __init set_preferred_console(void) | ||
158 | { | ||
159 | if (MACHINE_IS_KVM) | ||
160 | add_preferred_console("hvc", 0, NULL); | ||
161 | else if (CONSOLE_IS_3215 || CONSOLE_IS_SCLP) | ||
162 | add_preferred_console("ttyS", 0, NULL); | ||
163 | else if (CONSOLE_IS_3270) | ||
164 | add_preferred_console("tty3270", 0, NULL); | ||
165 | } | ||
166 | |||
157 | static int __init conmode_setup(char *str) | 167 | static int __init conmode_setup(char *str) |
158 | { | 168 | { |
159 | #if defined(CONFIG_SCLP_CONSOLE) || defined(CONFIG_SCLP_VT220_CONSOLE) | 169 | #if defined(CONFIG_SCLP_CONSOLE) || defined(CONFIG_SCLP_VT220_CONSOLE) |
@@ -168,6 +178,7 @@ static int __init conmode_setup(char *str) | |||
168 | if (strncmp(str, "3270", 5) == 0) | 178 | if (strncmp(str, "3270", 5) == 0) |
169 | SET_CONSOLE_3270; | 179 | SET_CONSOLE_3270; |
170 | #endif | 180 | #endif |
181 | set_preferred_console(); | ||
171 | return 1; | 182 | return 1; |
172 | } | 183 | } |
173 | 184 | ||
@@ -780,9 +791,6 @@ static void __init setup_hwcaps(void) | |||
780 | void __init | 791 | void __init |
781 | setup_arch(char **cmdline_p) | 792 | setup_arch(char **cmdline_p) |
782 | { | 793 | { |
783 | /* set up preferred console */ | ||
784 | add_preferred_console("ttyS", 0, NULL); | ||
785 | |||
786 | /* | 794 | /* |
787 | * print what head.S has found out about the machine | 795 | * print what head.S has found out about the machine |
788 | */ | 796 | */ |
@@ -802,11 +810,9 @@ setup_arch(char **cmdline_p) | |||
802 | if (MACHINE_IS_VM) | 810 | if (MACHINE_IS_VM) |
803 | pr_info("Linux is running as a z/VM " | 811 | pr_info("Linux is running as a z/VM " |
804 | "guest operating system in 64-bit mode\n"); | 812 | "guest operating system in 64-bit mode\n"); |
805 | else if (MACHINE_IS_KVM) { | 813 | else if (MACHINE_IS_KVM) |
806 | pr_info("Linux is running under KVM in 64-bit mode\n"); | 814 | pr_info("Linux is running under KVM in 64-bit mode\n"); |
807 | add_preferred_console("hvc", 0, NULL); | 815 | else |
808 | s390_virtio_console_init(); | ||
809 | } else | ||
810 | pr_info("Linux is running natively in 64-bit mode\n"); | 816 | pr_info("Linux is running natively in 64-bit mode\n"); |
811 | #endif /* CONFIG_64BIT */ | 817 | #endif /* CONFIG_64BIT */ |
812 | 818 | ||
@@ -851,6 +857,7 @@ setup_arch(char **cmdline_p) | |||
851 | 857 | ||
852 | /* Setup default console */ | 858 | /* Setup default console */ |
853 | conmode_default(); | 859 | conmode_default(); |
860 | set_preferred_console(); | ||
854 | 861 | ||
855 | /* Setup zfcpdump support */ | 862 | /* Setup zfcpdump support */ |
856 | setup_zfcpdump(console_devno); | 863 | setup_zfcpdump(console_devno); |