From: Linus Torvalds <torvalds@woody.linux-foundation.org>
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: v2.6.22-rc1~358
X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=df6d3916f3b7b7e2067567a256dd4f0c1ea854a2;p=linux-2.6-omap-h63xx.git

Merge branch 'master' of git://git.kernel.org/pub/scm/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 <torvalds@linux-foundation.org>
---

df6d3916f3b7b7e2067567a256dd4f0c1ea854a2
diff --cc arch/powerpc/mm/fault.c
index bec0cce79a7,a0f88026e46..bfe90135314
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@@ -37,39 -36,29 +37,28 @@@
  #include <asm/system.h>
  #include <asm/uaccess.h>
  #include <asm/tlbflush.h>
 -#include <asm/kdebug.h>
  #include <asm/siginfo.h>
  
- #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(&notify_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(&notify_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(&notify_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 1c73d2ec9b5,df996b933de..295f0162c60
--- a/include/asm-powerpc/kdebug.h
+++ b/include/asm-powerpc/kdebug.h
@@@ -6,8 -6,32 +6,19 @@@
  
  #include <linux/notifier.h>
  
- 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 */