summaryrefslogtreecommitdiff
path: root/arch/s390/mm
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2011-01-05 12:47:39 +0100
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-01-05 12:47:26 +0100
commitfb0a9d7e865afdae70829a64bb004a74ff67d29f (patch)
tree91747a95a38e165cc9bb7a725fda73d22a8f20a7 /arch/s390/mm
parent62d146ffe3adfed2747fc36138476c8417ce73a7 (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')
-rw-r--r--arch/s390/mm/fault.c27
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)
/*
* 'pfault' pseudo page faults routines.
*/
-static ext_int_info_t ext_int_pfault;
-static int pfault_disable = 0;
+static int pfault_disable;
static int __init nopfault(char *str)
{
@@ -594,24 +593,28 @@ static void pfault_interrupt(unsigned int ext_int_code,
}
}
-void __init pfault_irq_init(void)
+static int __init pfault_irq_init(void)
{
- if (!MACHINE_IS_VM)
- return;
+ int rc;
+ if (!MACHINE_IS_VM)
+ return 0;
/*
* Try to get pfault pseudo page faults going.
*/
- if (register_early_external_interrupt(0x2603, pfault_interrupt,
- &ext_int_pfault) != 0)
- panic("Couldn't request external interrupt 0x2603");
-
+ rc = register_external_interrupt(0x2603, pfault_interrupt);
+ if (rc) {
+ pfault_disable = 1;
+ return rc;
+ }
if (pfault_init() == 0)
- return;
+ return 0;
/* Tough luck, no pfault. */
pfault_disable = 1;
- unregister_early_external_interrupt(0x2603, pfault_interrupt,
- &ext_int_pfault);
+ unregister_external_interrupt(0x2603, pfault_interrupt);
+ return 0;
}
+early_initcall(pfault_irq_init);
+
#endif