diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-09-12 07:04:37 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-12 07:04:37 -0400 |
commit | 87d721ad7a37b7650dd710c88dd5c6a5bf9fe996 (patch) | |
tree | 869d633803eb7c429624d3bd16a6117816849763 /arch/s390 | |
parent | ddd559b13f6d2fe3ad68c4b3f5235fd3c2eae4e3 (diff) | |
parent | b7cfda9fc3d7aa60cffab5367f2a72a4a70060cd (diff) |
Merge branch 'master' into devel
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/early.c | 3 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 25 | ||||
-rw-r--r-- | arch/s390/kvm/interrupt.c | 2 | ||||
-rw-r--r-- | arch/s390/kvm/sigp.c | 7 |
4 files changed, 26 insertions, 11 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 8d15314381e0..cae14c499511 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -208,6 +208,9 @@ static noinline __init void detect_machine_type(void) | |||
208 | machine_flags |= MACHINE_FLAG_KVM; | 208 | machine_flags |= MACHINE_FLAG_KVM; |
209 | else | 209 | else |
210 | machine_flags |= MACHINE_FLAG_VM; | 210 | machine_flags |= MACHINE_FLAG_VM; |
211 | |||
212 | /* Store machine flags for setting up lowcore early */ | ||
213 | S390_lowcore.machine_flags = machine_flags; | ||
211 | } | 214 | } |
212 | 215 | ||
213 | static __init void early_pgm_check_handler(void) | 216 | static __init void early_pgm_check_handler(void) |
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); |
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index f04f5301b1b4..4d613415c435 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -386,7 +386,7 @@ no_timer: | |||
386 | } | 386 | } |
387 | __unset_cpu_idle(vcpu); | 387 | __unset_cpu_idle(vcpu); |
388 | __set_current_state(TASK_RUNNING); | 388 | __set_current_state(TASK_RUNNING); |
389 | remove_wait_queue(&vcpu->wq, &wait); | 389 | remove_wait_queue(&vcpu->arch.local_int.wq, &wait); |
390 | spin_unlock_bh(&vcpu->arch.local_int.lock); | 390 | spin_unlock_bh(&vcpu->arch.local_int.lock); |
391 | spin_unlock(&vcpu->arch.local_int.float_int->lock); | 391 | spin_unlock(&vcpu->arch.local_int.float_int->lock); |
392 | hrtimer_try_to_cancel(&vcpu->arch.ckc_timer); | 392 | hrtimer_try_to_cancel(&vcpu->arch.ckc_timer); |
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c index 36678835034d..0ef81d6776e9 100644 --- a/arch/s390/kvm/sigp.c +++ b/arch/s390/kvm/sigp.c | |||
@@ -169,7 +169,7 @@ static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address, | |||
169 | unsigned long *reg) | 169 | unsigned long *reg) |
170 | { | 170 | { |
171 | struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int; | 171 | struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int; |
172 | struct kvm_s390_local_interrupt *li; | 172 | struct kvm_s390_local_interrupt *li = NULL; |
173 | struct kvm_s390_interrupt_info *inti; | 173 | struct kvm_s390_interrupt_info *inti; |
174 | int rc; | 174 | int rc; |
175 | u8 tmp; | 175 | u8 tmp; |
@@ -189,9 +189,10 @@ static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address, | |||
189 | return 2; /* busy */ | 189 | return 2; /* busy */ |
190 | 190 | ||
191 | spin_lock(&fi->lock); | 191 | spin_lock(&fi->lock); |
192 | li = fi->local_int[cpu_addr]; | 192 | if (cpu_addr < KVM_MAX_VCPUS) |
193 | li = fi->local_int[cpu_addr]; | ||
193 | 194 | ||
194 | if ((cpu_addr >= KVM_MAX_VCPUS) || (li == NULL)) { | 195 | if (li == NULL) { |
195 | rc = 1; /* incorrect state */ | 196 | rc = 1; /* incorrect state */ |
196 | *reg &= SIGP_STAT_INCORRECT_STATE; | 197 | *reg &= SIGP_STAT_INCORRECT_STATE; |
197 | kfree(inti); | 198 | kfree(inti); |