diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-01-12 05:01:12 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-01-12 05:01:12 -0500 |
commit | 1f16f116b01c110db20ab808562c8b8bc3ee3d6e (patch) | |
tree | 44db563f64cf5f8d62af8f99a61e2b248c44ea3a /arch/s390 | |
parent | 03724ac3d48f8f0e3caf1d30fa134f8fd96c94e2 (diff) | |
parent | f9eccf24615672896dc13251410c3f2f33a14f95 (diff) |
Merge branches 'clockevents/4.4-fixes' and 'clockevents/4.5-fixes' of http://git.linaro.org/people/daniel.lezcano/linux into timers/urgent
Pull in fixes from Daniel Lezcano:
- Fix the vt8500 timer leading to a system lock up when dealing with too
small delta (Roman Volkov)
- Select the CLKSRC_MMIO when the fsl_ftm_timer is enabled with COMPILE_TEST
(Daniel Lezcano)
- Prevent to compile timers using the 'iomem' API when the architecture has
not HAS_IOMEM set (Richard Weinberger)
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/dis.c | 17 | ||||
-rw-r--r-- | arch/s390/kvm/interrupt.c | 7 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 6 | ||||
-rw-r--r-- | arch/s390/kvm/priv.c | 2 | ||||
-rw-r--r-- | arch/s390/kvm/sigp.c | 8 |
5 files changed, 25 insertions, 15 deletions
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index 8140d10c6785..6e72961608f0 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c | |||
@@ -1920,16 +1920,23 @@ static int print_insn(char *buffer, unsigned char *code, unsigned long addr) | |||
1920 | } | 1920 | } |
1921 | if (separator) | 1921 | if (separator) |
1922 | ptr += sprintf(ptr, "%c", separator); | 1922 | ptr += sprintf(ptr, "%c", separator); |
1923 | /* | ||
1924 | * Use four '%' characters below because of the | ||
1925 | * following two conversions: | ||
1926 | * | ||
1927 | * 1) sprintf: %%%%r -> %%r | ||
1928 | * 2) printk : %%r -> %r | ||
1929 | */ | ||
1923 | if (operand->flags & OPERAND_GPR) | 1930 | if (operand->flags & OPERAND_GPR) |
1924 | ptr += sprintf(ptr, "%%r%i", value); | 1931 | ptr += sprintf(ptr, "%%%%r%i", value); |
1925 | else if (operand->flags & OPERAND_FPR) | 1932 | else if (operand->flags & OPERAND_FPR) |
1926 | ptr += sprintf(ptr, "%%f%i", value); | 1933 | ptr += sprintf(ptr, "%%%%f%i", value); |
1927 | else if (operand->flags & OPERAND_AR) | 1934 | else if (operand->flags & OPERAND_AR) |
1928 | ptr += sprintf(ptr, "%%a%i", value); | 1935 | ptr += sprintf(ptr, "%%%%a%i", value); |
1929 | else if (operand->flags & OPERAND_CR) | 1936 | else if (operand->flags & OPERAND_CR) |
1930 | ptr += sprintf(ptr, "%%c%i", value); | 1937 | ptr += sprintf(ptr, "%%%%c%i", value); |
1931 | else if (operand->flags & OPERAND_VR) | 1938 | else if (operand->flags & OPERAND_VR) |
1932 | ptr += sprintf(ptr, "%%v%i", value); | 1939 | ptr += sprintf(ptr, "%%%%v%i", value); |
1933 | else if (operand->flags & OPERAND_PCREL) | 1940 | else if (operand->flags & OPERAND_PCREL) |
1934 | ptr += sprintf(ptr, "%lx", (signed int) value | 1941 | ptr += sprintf(ptr, "%lx", (signed int) value |
1935 | + addr); | 1942 | + addr); |
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 373e32346d68..6a75352f453c 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -1030,8 +1030,7 @@ static int __inject_extcall(struct kvm_vcpu *vcpu, struct kvm_s390_irq *irq) | |||
1030 | src_id, 0); | 1030 | src_id, 0); |
1031 | 1031 | ||
1032 | /* sending vcpu invalid */ | 1032 | /* sending vcpu invalid */ |
1033 | if (src_id >= KVM_MAX_VCPUS || | 1033 | if (kvm_get_vcpu_by_id(vcpu->kvm, src_id) == NULL) |
1034 | kvm_get_vcpu(vcpu->kvm, src_id) == NULL) | ||
1035 | return -EINVAL; | 1034 | return -EINVAL; |
1036 | 1035 | ||
1037 | if (sclp.has_sigpif) | 1036 | if (sclp.has_sigpif) |
@@ -1110,6 +1109,10 @@ static int __inject_sigp_emergency(struct kvm_vcpu *vcpu, | |||
1110 | trace_kvm_s390_inject_vcpu(vcpu->vcpu_id, KVM_S390_INT_EMERGENCY, | 1109 | trace_kvm_s390_inject_vcpu(vcpu->vcpu_id, KVM_S390_INT_EMERGENCY, |
1111 | irq->u.emerg.code, 0); | 1110 | irq->u.emerg.code, 0); |
1112 | 1111 | ||
1112 | /* sending vcpu invalid */ | ||
1113 | if (kvm_get_vcpu_by_id(vcpu->kvm, irq->u.emerg.code) == NULL) | ||
1114 | return -EINVAL; | ||
1115 | |||
1113 | set_bit(irq->u.emerg.code, li->sigp_emerg_pending); | 1116 | set_bit(irq->u.emerg.code, li->sigp_emerg_pending); |
1114 | set_bit(IRQ_PEND_EXT_EMERGENCY, &li->pending_irqs); | 1117 | set_bit(IRQ_PEND_EXT_EMERGENCY, &li->pending_irqs); |
1115 | atomic_or(CPUSTAT_EXT_INT, li->cpuflags); | 1118 | atomic_or(CPUSTAT_EXT_INT, li->cpuflags); |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 8fe2f1c722dc..846589281b04 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -342,12 +342,16 @@ static int kvm_vm_ioctl_enable_cap(struct kvm *kvm, struct kvm_enable_cap *cap) | |||
342 | r = 0; | 342 | r = 0; |
343 | break; | 343 | break; |
344 | case KVM_CAP_S390_VECTOR_REGISTERS: | 344 | case KVM_CAP_S390_VECTOR_REGISTERS: |
345 | if (MACHINE_HAS_VX) { | 345 | mutex_lock(&kvm->lock); |
346 | if (atomic_read(&kvm->online_vcpus)) { | ||
347 | r = -EBUSY; | ||
348 | } else if (MACHINE_HAS_VX) { | ||
346 | set_kvm_facility(kvm->arch.model.fac->mask, 129); | 349 | set_kvm_facility(kvm->arch.model.fac->mask, 129); |
347 | set_kvm_facility(kvm->arch.model.fac->list, 129); | 350 | set_kvm_facility(kvm->arch.model.fac->list, 129); |
348 | r = 0; | 351 | r = 0; |
349 | } else | 352 | } else |
350 | r = -EINVAL; | 353 | r = -EINVAL; |
354 | mutex_unlock(&kvm->lock); | ||
351 | VM_EVENT(kvm, 3, "ENABLE: CAP_S390_VECTOR_REGISTERS %s", | 355 | VM_EVENT(kvm, 3, "ENABLE: CAP_S390_VECTOR_REGISTERS %s", |
352 | r ? "(not available)" : "(success)"); | 356 | r ? "(not available)" : "(success)"); |
353 | break; | 357 | break; |
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 77191b85ea7a..d76b51cb4b62 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -660,7 +660,7 @@ static int handle_pfmf(struct kvm_vcpu *vcpu) | |||
660 | 660 | ||
661 | kvm_s390_get_regs_rre(vcpu, ®1, ®2); | 661 | kvm_s390_get_regs_rre(vcpu, ®1, ®2); |
662 | 662 | ||
663 | if (!MACHINE_HAS_PFMF) | 663 | if (!test_kvm_facility(vcpu->kvm, 8)) |
664 | return kvm_s390_inject_program_int(vcpu, PGM_OPERATION); | 664 | return kvm_s390_inject_program_int(vcpu, PGM_OPERATION); |
665 | 665 | ||
666 | if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) | 666 | if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) |
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c index da690b69f9fe..77c22d685c7a 100644 --- a/arch/s390/kvm/sigp.c +++ b/arch/s390/kvm/sigp.c | |||
@@ -291,12 +291,8 @@ static int handle_sigp_dst(struct kvm_vcpu *vcpu, u8 order_code, | |||
291 | u16 cpu_addr, u32 parameter, u64 *status_reg) | 291 | u16 cpu_addr, u32 parameter, u64 *status_reg) |
292 | { | 292 | { |
293 | int rc; | 293 | int rc; |
294 | struct kvm_vcpu *dst_vcpu; | 294 | struct kvm_vcpu *dst_vcpu = kvm_get_vcpu_by_id(vcpu->kvm, cpu_addr); |
295 | 295 | ||
296 | if (cpu_addr >= KVM_MAX_VCPUS) | ||
297 | return SIGP_CC_NOT_OPERATIONAL; | ||
298 | |||
299 | dst_vcpu = kvm_get_vcpu(vcpu->kvm, cpu_addr); | ||
300 | if (!dst_vcpu) | 296 | if (!dst_vcpu) |
301 | return SIGP_CC_NOT_OPERATIONAL; | 297 | return SIGP_CC_NOT_OPERATIONAL; |
302 | 298 | ||
@@ -478,7 +474,7 @@ int kvm_s390_handle_sigp_pei(struct kvm_vcpu *vcpu) | |||
478 | trace_kvm_s390_handle_sigp_pei(vcpu, order_code, cpu_addr); | 474 | trace_kvm_s390_handle_sigp_pei(vcpu, order_code, cpu_addr); |
479 | 475 | ||
480 | if (order_code == SIGP_EXTERNAL_CALL) { | 476 | if (order_code == SIGP_EXTERNAL_CALL) { |
481 | dest_vcpu = kvm_get_vcpu(vcpu->kvm, cpu_addr); | 477 | dest_vcpu = kvm_get_vcpu_by_id(vcpu->kvm, cpu_addr); |
482 | BUG_ON(dest_vcpu == NULL); | 478 | BUG_ON(dest_vcpu == NULL); |
483 | 479 | ||
484 | kvm_s390_vcpu_wakeup(dest_vcpu); | 480 | kvm_s390_vcpu_wakeup(dest_vcpu); |