summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.osdl.org>2004-02-13 15:37:38 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2004-02-13 15:37:38 -0800
commit8a81d818dd622a57ba096a58d668aaba9ef8180e (patch)
tree0b318bed50041038d35a575c0851e4826294488e /include
parentd5acfb1f1a1f324dbd4606b97895402223d085c7 (diff)
parent49555a7c0ad55ed62884b610fddf75c8b5dfa3a5 (diff)
Merge bk://kernel.bkbits.net/davem/netfix-2.6
into home.osdl.org:/home/torvalds/v2.5/linux
Diffstat (limited to 'include')
-rw-r--r--include/asm-ppc64/ppcdebug.h13
-rw-r--r--include/asm-ppc64/smp.h14
-rw-r--r--include/asm-ppc64/system.h51
-rw-r--r--include/asm-ppc64/xmon.h17
4 files changed, 40 insertions, 55 deletions
diff --git a/include/asm-ppc64/ppcdebug.h b/include/asm-ppc64/ppcdebug.h
index 91c31d5284ee..862ae6df6b0b 100644
--- a/include/asm-ppc64/ppcdebug.h
+++ b/include/asm-ppc64/ppcdebug.h
@@ -95,11 +95,6 @@ extern char *trace_names[64];
#define ppcdebugset(FLAGS) (udbg_ifdebug(FLAGS))
#define PPCDBG_BINFMT (test_thread_flag(TIF_32BIT) ? PPCDBG_BINFMT32 : PPCDBG_BINFMT64)
-#ifdef CONFIG_XMON
-#define PPCDBG_ENTER_DEBUGGER() xmon(0)
-#define PPCDBG_ENTER_DEBUGGER_REGS(X) xmon(X)
-#endif
-
#else
#define PPCDBG(...) do {;} while (0)
#define PPCDBGCALL(FLAGS,FUNCTION) do {;} while (0)
@@ -107,12 +102,4 @@ extern char *trace_names[64];
#define ppcdebugset(FLAGS) (0)
#endif /* CONFIG_PPCDBG */
-#ifndef PPCDBG_ENTER_DEBUGGER
-#define PPCDBG_ENTER_DEBUGGER() do {;} while(0)
-#endif
-
-#ifndef PPCDBG_ENTER_DEBUGGER_REGS
-#define PPCDBG_ENTER_DEBUGGER_REGS(A) do {;} while(0)
-#endif
-
#endif /*__PPCDEBUG_H */
diff --git a/include/asm-ppc64/smp.h b/include/asm-ppc64/smp.h
index c54f858b3b85..7c8fae309721 100644
--- a/include/asm-ppc64/smp.h
+++ b/include/asm-ppc64/smp.h
@@ -29,8 +29,7 @@
#ifdef CONFIG_SMP
extern void smp_message_pass(int target, int msg, unsigned long data, int wait);
-extern void smp_send_tlb_invalidate(int);
-extern void smp_send_xmon_break(int cpu);
+extern void smp_send_debugger_break(int cpu);
struct pt_regs;
extern void smp_message_recv(int, struct pt_regs *);
@@ -63,17 +62,22 @@ extern cpumask_t cpu_available_map;
* in /proc/interrupts will be wrong!!! --Troy */
#define PPC_MSG_CALL_FUNCTION 0
#define PPC_MSG_RESCHEDULE 1
+/* This is unused now */
+#if 0
#define PPC_MSG_MIGRATE_TASK 2
-#define PPC_MSG_XMON_BREAK 3
+#endif
+#define PPC_MSG_DEBUGGER_BREAK 3
void smp_init_iSeries(void);
void smp_init_pSeries(void);
#endif /* !(CONFIG_SMP) */
-#endif /* __ASSEMBLY__ */
#define get_hard_smp_processor_id(CPU) (paca[(CPU)].xHwProcNum)
-#define set_hard_smp_processor_id(CPU, VAL) do { (paca[(CPU)].xHwProcNum = VAL); } while (0)
+#define set_hard_smp_processor_id(CPU, VAL) \
+ do { (paca[(CPU)].xHwProcNum = VAL); } while (0)
+
+#endif /* __ASSEMBLY__ */
#endif /* !(_PPC64_SMP_H) */
#endif /* __KERNEL__ */
diff --git a/include/asm-ppc64/system.h b/include/asm-ppc64/system.h
index 2a88765fd600..7080a2c3cb23 100644
--- a/include/asm-ppc64/system.h
+++ b/include/asm-ppc64/system.h
@@ -9,6 +9,7 @@
*/
#include <linux/config.h>
+#include <linux/compiler.h>
#include <asm/page.h>
#include <asm/processor.h>
#include <asm/hw_irq.h>
@@ -52,31 +53,41 @@
#define smp_read_barrier_depends() do { } while(0)
#endif /* CONFIG_SMP */
-#ifdef CONFIG_DEBUG_KERNEL
-extern void (*debugger)(struct pt_regs *regs);
-extern int (*debugger_bpt)(struct pt_regs *regs);
-extern int (*debugger_sstep)(struct pt_regs *regs);
-extern int (*debugger_iabr_match)(struct pt_regs *regs);
-extern int (*debugger_dabr_match)(struct pt_regs *regs);
-extern void (*debugger_fault_handler)(struct pt_regs *regs);
+#ifdef CONFIG_DEBUGGER
+
+extern int (*__debugger)(struct pt_regs *regs);
+extern int (*__debugger_bpt)(struct pt_regs *regs);
+extern int (*__debugger_sstep)(struct pt_regs *regs);
+extern int (*__debugger_iabr_match)(struct pt_regs *regs);
+extern int (*__debugger_dabr_match)(struct pt_regs *regs);
+extern int (*__debugger_fault_handler)(struct pt_regs *regs);
+
+#define DEBUGGER_BOILERPLATE(__NAME) \
+static inline int __NAME(struct pt_regs *regs) \
+{ \
+ if (unlikely(__ ## __NAME)) \
+ return __ ## __NAME(regs); \
+ return 0; \
+}
+
+DEBUGGER_BOILERPLATE(debugger)
+DEBUGGER_BOILERPLATE(debugger_bpt)
+DEBUGGER_BOILERPLATE(debugger_sstep)
+DEBUGGER_BOILERPLATE(debugger_iabr_match)
+DEBUGGER_BOILERPLATE(debugger_dabr_match)
+DEBUGGER_BOILERPLATE(debugger_fault_handler)
+
+#ifdef CONFIG_XMON
+extern void xmon_init(void);
+#endif
+
#else
-#define debugger(regs) do { } while (0)
+#define debugger(regs) 0
#define debugger_bpt(regs) 0
#define debugger_sstep(regs) 0
#define debugger_iabr_match(regs) 0
#define debugger_dabr_match(regs) 0
-#define debugger_fault_handler ((void (*)(struct pt_regs *))0)
-#endif
-
-#ifdef CONFIG_XMON
-extern void xmon_irq(int, void *, struct pt_regs *);
-
-extern void xmon(struct pt_regs *regs);
-extern int xmon_bpt(struct pt_regs *regs);
-extern int xmon_sstep(struct pt_regs *regs);
-extern int xmon_iabr_match(struct pt_regs *regs);
-extern int xmon_dabr_match(struct pt_regs *regs);
-extern void (*xmon_fault_handler)(struct pt_regs *regs);
+#define debugger_fault_handler(regs) 0
#endif
extern void show_regs(struct pt_regs * regs);
diff --git a/include/asm-ppc64/xmon.h b/include/asm-ppc64/xmon.h
deleted file mode 100644
index 042b83e6680d..000000000000
--- a/include/asm-ppc64/xmon.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef __PPC_XMON_H
-#define __PPC_XMON_H
-#ifdef __KERNEL__
-
-struct pt_regs;
-
-extern void xmon(struct pt_regs *excp);
-extern void xmon_printf(const char *fmt, ...);
-extern void xmon_map_scc(void);
-extern int xmon_bpt(struct pt_regs *regs);
-extern int xmon_sstep(struct pt_regs *regs);
-extern int xmon_iabr_match(struct pt_regs *regs);
-extern int xmon_dabr_match(struct pt_regs *regs);
-extern void (*xmon_fault_handler)(struct pt_regs *regs);
-
-#endif
-#endif