diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2011-01-05 06:47:39 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2011-01-05 06:47:26 -0500 |
commit | fb0a9d7e865afdae70829a64bb004a74ff67d29f (patch) | |
tree | 91747a95a38e165cc9bb7a725fda73d22a8f20a7 /arch/s390/mm/fault.c | |
parent | 62d146ffe3adfed2747fc36138476c8417ce73a7 (diff) |
[S390] pfault: delay register of pfault interrupt
Use an early init call to initialize pfault. That way it is possible to
use the register_external_interrupt() instead of the early variant.
No need to enable pfault any earlier since it has only effect if user
space processes are running.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm/fault.c')
-rw-r--r-- | arch/s390/mm/fault.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 839b16df72b3..dccb85d91538 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -481,8 +481,7 @@ int __handle_fault(unsigned long uaddr, unsigned long pgm_int_code, int write) | |||
481 | /* | 481 | /* |
482 | * 'pfault' pseudo page faults routines. | 482 | * 'pfault' pseudo page faults routines. |
483 | */ | 483 | */ |
484 | static ext_int_info_t ext_int_pfault; | 484 | static int pfault_disable; |
485 | static int pfault_disable = 0; | ||
486 | 485 | ||
487 | static int __init nopfault(char *str) | 486 | static int __init nopfault(char *str) |
488 | { | 487 | { |
@@ -594,24 +593,28 @@ static void pfault_interrupt(unsigned int ext_int_code, | |||
594 | } | 593 | } |
595 | } | 594 | } |
596 | 595 | ||
597 | void __init pfault_irq_init(void) | 596 | static int __init pfault_irq_init(void) |
598 | { | 597 | { |
599 | if (!MACHINE_IS_VM) | 598 | int rc; |
600 | return; | ||
601 | 599 | ||
600 | if (!MACHINE_IS_VM) | ||
601 | return 0; | ||
602 | /* | 602 | /* |
603 | * Try to get pfault pseudo page faults going. | 603 | * Try to get pfault pseudo page faults going. |
604 | */ | 604 | */ |
605 | if (register_early_external_interrupt(0x2603, pfault_interrupt, | 605 | rc = register_external_interrupt(0x2603, pfault_interrupt); |
606 | &ext_int_pfault) != 0) | 606 | if (rc) { |
607 | panic("Couldn't request external interrupt 0x2603"); | 607 | pfault_disable = 1; |
608 | 608 | return rc; | |
609 | } | ||
609 | if (pfault_init() == 0) | 610 | if (pfault_init() == 0) |
610 | return; | 611 | return 0; |
611 | 612 | ||
612 | /* Tough luck, no pfault. */ | 613 | /* Tough luck, no pfault. */ |
613 | pfault_disable = 1; | 614 | pfault_disable = 1; |
614 | unregister_early_external_interrupt(0x2603, pfault_interrupt, | 615 | unregister_external_interrupt(0x2603, pfault_interrupt); |
615 | &ext_int_pfault); | 616 | return 0; |
616 | } | 617 | } |
618 | early_initcall(pfault_irq_init); | ||
619 | |||
617 | #endif | 620 | #endif |