From cbb870c8221147ae337612e04b2bb0211f31a74b Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Fri, 26 Feb 2010 22:37:43 +0100 Subject: [S390] Cleanup struct _lowcore usage and defines. Use asm offsets to make sure the offset defines to struct _lowcore and its layout don't get out of sync. Also add a BUILD_BUG_ON() which checks that the size of the structure is sane. And while being at it change those sites which use odd casts to access the current lowcore. These should use S390_lowcore instead. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- arch/s390/mm/fault.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/s390/mm/fault.c') diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index fc102e70d9c2..8af5b3cbed50 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3 From 22e0a0467292222214d1974d9bc2664a6c05980d Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Fri, 26 Feb 2010 22:37:45 +0100 Subject: [S390] use kprobes_built_in() in mm/fault code Use kprobes_built_in() to avoid ifdefs like most other architectures do. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- arch/s390/mm/fault.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch/s390/mm/fault.c') diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 8af5b3cbed50..3040d7c78fe0 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -60,15 +60,13 @@ static inline int notify_page_fault(struct pt_regs *regs) { int ret = 0; -#ifdef CONFIG_KPROBES /* kprobe_running() needs smp_processor_id() */ - if (!user_mode(regs)) { + if (kprobes_built_in() && !user_mode(regs)) { preempt_disable(); if (kprobe_running() && kprobe_fault_handler(regs, 14)) ret = 1; preempt_enable(); } -#endif return ret; } -- cgit v1.2.3