Loading arch/s390/include/asm/setup.h +3 −0 Original line number Diff line number Diff line Loading @@ -71,9 +71,12 @@ extern unsigned int user_mode; #define MACHINE_FLAG_KVM (1UL << 9) #define MACHINE_FLAG_HPAGE (1UL << 10) #define MACHINE_FLAG_PFMF (1UL << 11) #define MACHINE_FLAG_LPAR (1UL << 12) #define MACHINE_IS_VM (S390_lowcore.machine_flags & MACHINE_FLAG_VM) #define MACHINE_IS_KVM (S390_lowcore.machine_flags & MACHINE_FLAG_KVM) #define MACHINE_IS_LPAR (S390_lowcore.machine_flags & MACHINE_FLAG_LPAR) #define MACHINE_HAS_DIAG9C (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG9C) #ifndef __s390x__ Loading arch/s390/kernel/early.c +6 −3 Original line number Diff line number Diff line Loading @@ -214,10 +214,13 @@ static __initdata struct sysinfo_3_2_2 vmms __aligned(PAGE_SIZE); static noinline __init void detect_machine_type(void) { /* No VM information? Looks like LPAR */ if (stsi(&vmms, 3, 2, 2) == -ENOSYS) /* Check current-configuration-level */ if ((stsi(NULL, 0, 0, 0) >> 28) <= 2) { S390_lowcore.machine_flags |= MACHINE_FLAG_LPAR; return; if (!vmms.count) } /* Get virtual-machine cpu information. */ if (stsi(&vmms, 3, 2, 2) == -ENOSYS || !vmms.count) return; /* Running under KVM? If not we assume z/VM */ Loading arch/s390/kernel/setup.c +2 −2 Original line number Diff line number Diff line Loading @@ -804,7 +804,7 @@ setup_arch(char **cmdline_p) if (MACHINE_IS_VM) pr_info("Linux is running as a z/VM " "guest operating system in 31-bit mode\n"); else else if (MACHINE_IS_LPAR) pr_info("Linux is running natively in 31-bit mode\n"); if (MACHINE_HAS_IEEE) pr_info("The hardware system has IEEE compatible " Loading @@ -818,7 +818,7 @@ setup_arch(char **cmdline_p) "guest operating system in 64-bit mode\n"); else if (MACHINE_IS_KVM) pr_info("Linux is running under KVM in 64-bit mode\n"); else else if (MACHINE_IS_LPAR) pr_info("Linux is running natively in 64-bit mode\n"); #endif /* CONFIG_64BIT */ Loading drivers/s390/cio/cio.c +1 −1 Original line number Diff line number Diff line Loading @@ -661,7 +661,7 @@ void __irq_entry do_IRQ(struct pt_regs *regs) * We don't do this for VM because a tpi drops the cpu * out of the sie which costs more cycles than it saves. */ } while (!MACHINE_IS_VM && tpi (NULL) != 0); } while (MACHINE_IS_LPAR && tpi(NULL) != 0); irq_exit(); set_irq_regs(old_regs); } Loading drivers/s390/cio/qdio_main.c +1 −1 Original line number Diff line number Diff line Loading @@ -534,7 +534,7 @@ static int qdio_inbound_q_moved(struct qdio_q *q) if ((bufnr != q->last_move) || q->qdio_error) { q->last_move = bufnr; if (!is_thinint_irq(q->irq_ptr) && !MACHINE_IS_VM) if (!is_thinint_irq(q->irq_ptr) && MACHINE_IS_LPAR) q->u.in.timestamp = get_usecs(); return 1; } else Loading Loading
arch/s390/include/asm/setup.h +3 −0 Original line number Diff line number Diff line Loading @@ -71,9 +71,12 @@ extern unsigned int user_mode; #define MACHINE_FLAG_KVM (1UL << 9) #define MACHINE_FLAG_HPAGE (1UL << 10) #define MACHINE_FLAG_PFMF (1UL << 11) #define MACHINE_FLAG_LPAR (1UL << 12) #define MACHINE_IS_VM (S390_lowcore.machine_flags & MACHINE_FLAG_VM) #define MACHINE_IS_KVM (S390_lowcore.machine_flags & MACHINE_FLAG_KVM) #define MACHINE_IS_LPAR (S390_lowcore.machine_flags & MACHINE_FLAG_LPAR) #define MACHINE_HAS_DIAG9C (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG9C) #ifndef __s390x__ Loading
arch/s390/kernel/early.c +6 −3 Original line number Diff line number Diff line Loading @@ -214,10 +214,13 @@ static __initdata struct sysinfo_3_2_2 vmms __aligned(PAGE_SIZE); static noinline __init void detect_machine_type(void) { /* No VM information? Looks like LPAR */ if (stsi(&vmms, 3, 2, 2) == -ENOSYS) /* Check current-configuration-level */ if ((stsi(NULL, 0, 0, 0) >> 28) <= 2) { S390_lowcore.machine_flags |= MACHINE_FLAG_LPAR; return; if (!vmms.count) } /* Get virtual-machine cpu information. */ if (stsi(&vmms, 3, 2, 2) == -ENOSYS || !vmms.count) return; /* Running under KVM? If not we assume z/VM */ Loading
arch/s390/kernel/setup.c +2 −2 Original line number Diff line number Diff line Loading @@ -804,7 +804,7 @@ setup_arch(char **cmdline_p) if (MACHINE_IS_VM) pr_info("Linux is running as a z/VM " "guest operating system in 31-bit mode\n"); else else if (MACHINE_IS_LPAR) pr_info("Linux is running natively in 31-bit mode\n"); if (MACHINE_HAS_IEEE) pr_info("The hardware system has IEEE compatible " Loading @@ -818,7 +818,7 @@ setup_arch(char **cmdline_p) "guest operating system in 64-bit mode\n"); else if (MACHINE_IS_KVM) pr_info("Linux is running under KVM in 64-bit mode\n"); else else if (MACHINE_IS_LPAR) pr_info("Linux is running natively in 64-bit mode\n"); #endif /* CONFIG_64BIT */ Loading
drivers/s390/cio/cio.c +1 −1 Original line number Diff line number Diff line Loading @@ -661,7 +661,7 @@ void __irq_entry do_IRQ(struct pt_regs *regs) * We don't do this for VM because a tpi drops the cpu * out of the sie which costs more cycles than it saves. */ } while (!MACHINE_IS_VM && tpi (NULL) != 0); } while (MACHINE_IS_LPAR && tpi(NULL) != 0); irq_exit(); set_irq_regs(old_regs); } Loading
drivers/s390/cio/qdio_main.c +1 −1 Original line number Diff line number Diff line Loading @@ -534,7 +534,7 @@ static int qdio_inbound_q_moved(struct qdio_q *q) if ((bufnr != q->last_move) || q->qdio_error) { q->last_move = bufnr; if (!is_thinint_irq(q->irq_ptr) && !MACHINE_IS_VM) if (!is_thinint_irq(q->irq_ptr) && MACHINE_IS_LPAR) q->u.in.timestamp = get_usecs(); return 1; } else Loading