diff options
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r-- | arch/s390/kernel/setup.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 9717717c6fea..cbb897bc50bd 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -154,6 +154,20 @@ 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 | s390_virtio_console_init(); | ||
162 | return; | ||
163 | } | ||
164 | |||
165 | if (CONSOLE_IS_3215 || CONSOLE_IS_SCLP) | ||
166 | add_preferred_console("ttyS", 0, NULL); | ||
167 | if (CONSOLE_IS_3270) | ||
168 | add_preferred_console("tty3270", 0, NULL); | ||
169 | } | ||
170 | |||
157 | static int __init conmode_setup(char *str) | 171 | static int __init conmode_setup(char *str) |
158 | { | 172 | { |
159 | #if defined(CONFIG_SCLP_CONSOLE) || defined(CONFIG_SCLP_VT220_CONSOLE) | 173 | #if defined(CONFIG_SCLP_CONSOLE) || defined(CONFIG_SCLP_VT220_CONSOLE) |
@@ -168,6 +182,7 @@ static int __init conmode_setup(char *str) | |||
168 | if (strncmp(str, "3270", 5) == 0) | 182 | if (strncmp(str, "3270", 5) == 0) |
169 | SET_CONSOLE_3270; | 183 | SET_CONSOLE_3270; |
170 | #endif | 184 | #endif |
185 | set_preferred_console(); | ||
171 | return 1; | 186 | return 1; |
172 | } | 187 | } |
173 | 188 | ||
@@ -780,9 +795,6 @@ static void __init setup_hwcaps(void) | |||
780 | void __init | 795 | void __init |
781 | setup_arch(char **cmdline_p) | 796 | setup_arch(char **cmdline_p) |
782 | { | 797 | { |
783 | /* set up preferred console */ | ||
784 | add_preferred_console("ttyS", 0, NULL); | ||
785 | |||
786 | /* | 798 | /* |
787 | * print what head.S has found out about the machine | 799 | * print what head.S has found out about the machine |
788 | */ | 800 | */ |
@@ -802,11 +814,9 @@ setup_arch(char **cmdline_p) | |||
802 | if (MACHINE_IS_VM) | 814 | if (MACHINE_IS_VM) |
803 | pr_info("Linux is running as a z/VM " | 815 | pr_info("Linux is running as a z/VM " |
804 | "guest operating system in 64-bit mode\n"); | 816 | "guest operating system in 64-bit mode\n"); |
805 | else if (MACHINE_IS_KVM) { | 817 | else if (MACHINE_IS_KVM) |
806 | pr_info("Linux is running under KVM in 64-bit mode\n"); | 818 | pr_info("Linux is running under KVM in 64-bit mode\n"); |
807 | add_preferred_console("hvc", 0, NULL); | 819 | else |
808 | s390_virtio_console_init(); | ||
809 | } else | ||
810 | pr_info("Linux is running natively in 64-bit mode\n"); | 820 | pr_info("Linux is running natively in 64-bit mode\n"); |
811 | #endif /* CONFIG_64BIT */ | 821 | #endif /* CONFIG_64BIT */ |
812 | 822 | ||
@@ -851,6 +861,7 @@ setup_arch(char **cmdline_p) | |||
851 | 861 | ||
852 | /* Setup default console */ | 862 | /* Setup default console */ |
853 | conmode_default(); | 863 | conmode_default(); |
864 | set_preferred_console(); | ||
854 | 865 | ||
855 | /* Setup zfcpdump support */ | 866 | /* Setup zfcpdump support */ |
856 | setup_zfcpdump(console_devno); | 867 | setup_zfcpdump(console_devno); |