···214214215215static noinline __init void detect_machine_type(void)216216{217217- /* No VM information? Looks like LPAR */218218- if (stsi(&vmms, 3, 2, 2) == -ENOSYS)217217+ /* Check current-configuration-level */218218+ if ((stsi(NULL, 0, 0, 0) >> 28) <= 2) {219219+ S390_lowcore.machine_flags |= MACHINE_FLAG_LPAR;219220 return;220220- if (!vmms.count)221221+ }222222+ /* Get virtual-machine cpu information. */223223+ if (stsi(&vmms, 3, 2, 2) == -ENOSYS || !vmms.count)221224 return;222225223226 /* Running under KVM? If not we assume z/VM */
+2-2
arch/s390/kernel/setup.c
···804804 if (MACHINE_IS_VM)805805 pr_info("Linux is running as a z/VM "806806 "guest operating system in 31-bit mode\n");807807- else807807+ else if (MACHINE_IS_LPAR)808808 pr_info("Linux is running natively in 31-bit mode\n");809809 if (MACHINE_HAS_IEEE)810810 pr_info("The hardware system has IEEE compatible "···818818 "guest operating system in 64-bit mode\n");819819 else if (MACHINE_IS_KVM)820820 pr_info("Linux is running under KVM in 64-bit mode\n");821821- else821821+ else if (MACHINE_IS_LPAR)822822 pr_info("Linux is running natively in 64-bit mode\n");823823#endif /* CONFIG_64BIT */824824
+1-1
drivers/s390/cio/cio.c
···661661 * We don't do this for VM because a tpi drops the cpu662662 * out of the sie which costs more cycles than it saves.663663 */664664- } while (!MACHINE_IS_VM && tpi (NULL) != 0);664664+ } while (MACHINE_IS_LPAR && tpi(NULL) != 0);665665 irq_exit();666666 set_irq_regs(old_regs);667667}
+1-1
drivers/s390/cio/qdio_main.c
···534534535535 if ((bufnr != q->last_move) || q->qdio_error) {536536 q->last_move = bufnr;537537- if (!is_thinint_irq(q->irq_ptr) && !MACHINE_IS_VM)537537+ if (!is_thinint_irq(q->irq_ptr) && MACHINE_IS_LPAR)538538 q->u.in.timestamp = get_usecs();539539 return 1;540540 } else