Skip to content

Commit

Permalink
[S390] disable MACHINE_IS_VM check for pfault
Browse files Browse the repository at this point in the history
This patch disables the check for MACHINE_IS_VM when initializing the
pfault infrastructure. The code checks for successful completion of
diag 258 anyway, thus it's safe to try initialization on LPAR anyway.
This is needed to use pfault on kvm

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Carsten Otte authored and Martin Schwidefsky committed Dec 27, 2011
1 parent 400d829 commit f32269a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/s390/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ int pfault_init(void)
.reserved = __PF_RES_FIELD };
int rc;

if (!MACHINE_IS_VM || pfault_disable)
if (pfault_disable)
return -1;
asm volatile(
" diag %1,%0,0x258\n"
Expand All @@ -530,7 +530,7 @@ void pfault_fini(void)
.refversn = 2,
};

if (!MACHINE_IS_VM || pfault_disable)
if (pfault_disable)
return;
asm volatile(
" diag %0,0,0x258\n"
Expand Down Expand Up @@ -643,8 +643,6 @@ static int __init pfault_irq_init(void)
{
int rc;

if (!MACHINE_IS_VM)
return 0;
rc = register_external_interrupt(0x2603, pfault_interrupt);
if (rc)
goto out_extint;
Expand Down

0 comments on commit f32269a

Please sign in to comment.