From: Linus Torvalds Date: Tue, 8 May 2007 18:50:19 +0000 (-0700) Subject: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc X-Git-Tag: 2.1b_release~28002 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df6d3916f3b7b7e2067567a256dd4f0c1ea854a2;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git Merge branch 'master' of git://git./linux/kernel/git/paulus/powerpc * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (77 commits) [POWERPC] Abolish powerpc_flash_init() [POWERPC] Early serial debug support for PPC44x [POWERPC] Support for the Ebony 440GP reference board in arch/powerpc [POWERPC] Add device tree for Ebony [POWERPC] Add powerpc/platforms/44x, disable platforms/4xx for now [POWERPC] MPIC U3/U4 MSI backend [POWERPC] MPIC MSI allocator [POWERPC] Enable MSI mappings for MPIC [POWERPC] Tell Phyp we support MSI [POWERPC] RTAS MSI implementation [POWERPC] PowerPC MSI infrastructure [POWERPC] Rip out the existing powerpc msi stubs [POWERPC] Remove use of 4level-fixup.h for ppc32 [POWERPC] Add powerpc PCI-E reset API implementation [POWERPC] Holly bootwrapper [POWERPC] Holly DTS [POWERPC] Holly defconfig [POWERPC] Add support for 750CL Holly board [POWERPC] Generalize tsi108 PCI setup [POWERPC] Generalize tsi108 PHY types ... Fixed conflict in include/asm-powerpc/kdebug.h manually Signed-off-by: Linus Torvalds --- df6d3916f3b7b7e2067567a256dd4f0c1ea854a2 diff --cc arch/powerpc/mm/fault.c index bec0cce,a0f8802..bfe9013 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c @@@ -37,39 -36,29 +37,28 @@@ #include #include #include -#include #include - #ifdef CONFIG_KPROBES - ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); - /* Hook to register for page fault notifications */ - int register_page_fault_notifier(struct notifier_block *nb) - { - return atomic_notifier_chain_register(¬ify_page_fault_chain, nb); - } - - int unregister_page_fault_notifier(struct notifier_block *nb) + #ifdef CONFIG_KPROBES + static inline int notify_page_fault(struct pt_regs *regs) { - return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb); - } + int ret = 0; + + /* kprobe_running() needs smp_processor_id() */ + if (!user_mode(regs)) { + preempt_disable(); + if (kprobe_running() && kprobe_fault_handler(regs, 11)) + ret = 1; + preempt_enable(); + } - static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) - { - struct die_args args = { - .regs = regs, - .str = str, - .err = err, - .trapnr = trap, - .signr = sig - }; - return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args); + return ret; } #else - static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) + static inline int notify_page_fault(struct pt_regs *regs) { - return NOTIFY_DONE; + return 0; } #endif diff --cc include/asm-powerpc/kdebug.h index 1c73d2e,df996b9..295f016 --- a/include/asm-powerpc/kdebug.h +++ b/include/asm-powerpc/kdebug.h @@@ -6,8 -6,32 +6,19 @@@ #include - extern int register_page_fault_notifier(struct notifier_block *); - extern int unregister_page_fault_notifier(struct notifier_block *); -struct pt_regs; - -struct die_args { - struct pt_regs *regs; - const char *str; - long err; - int trapnr; - int signr; -}; - -extern int register_die_notifier(struct notifier_block *); -extern int unregister_die_notifier(struct notifier_block *); - + /* + * These are only here because kprobes.c wants them to implement a + * blatant layering violation. Will hopefully go away soon once all + * architectures are updated. + */ + static inline int register_page_fault_notifier(struct notifier_block *nb) + { + return 0; + } + static inline int unregister_page_fault_notifier(struct notifier_block *nb) + { + return 0; + } extern struct atomic_notifier_head powerpc_die_chain; /* Grossly misnamed. */ @@@ -17,8 -41,13 +28,7 @@@ enum die_val DIE_DABR_MATCH, DIE_BPT, DIE_SSTEP, - DIE_PAGE_FAULT, }; -static inline int notify_die(enum die_val val,char *str,struct pt_regs *regs,long err,int trap, int sig) -{ - struct die_args args = { .regs=regs, .str=str, .err=err, .trapnr=trap,.signr=sig }; - return atomic_notifier_call_chain(&powerpc_die_chain, val, &args); -} - #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_KDEBUG_H */