Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182171
b: refs/heads/master
c: 27d7160
h: refs/heads/master
i:
  182169: 62e43fc
  182167: 6dce547
v: v3
  • Loading branch information
Martin Schwidefsky authored and Martin Schwidefsky committed Feb 26, 2010
1 parent 918c100 commit e42eb30
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 432ac5e04b931df8376e0858d4bf0fd41436a271
refs/heads/master: 27d71602b4a605fbb31088e69ac12187e69a9443
3 changes: 3 additions & 0 deletions trunk/arch/s390/include/asm/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down
9 changes: 6 additions & 3 deletions trunk/arch/s390/kernel/early.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/s390/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand All @@ -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 */

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/s390/cio/cio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/s390/cio/qdio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e42eb30

Please sign in to comment.