summaryrefslogtreecommitdiff
path: root/include/asm-sparc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 19:46:16 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 19:46:16 +0400
commit7cece14acd063dd1c4e8933461d44ec6a5a5517b (patch)
treea7d2de4acaf64eed207ceab9eb6b2a386ebd7401 /include/asm-sparc
parent95dfec6ae1cb8c03406aac612a5642cbddb676b3 (diff)
parent8cd0ae3acc0154f3f9dfa1b4a2b7c02c271533f6 (diff)
downloadlinux-7cece14acd063dd1c4e8933461d44ec6a5a5517b.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc64: remove duplicated include sparc: Add kgdb support. kgdbts: Sparc needs sstep emulation. sparc32: Kill smp_message_pass() and related code. sparc64: Kill PIL_RESERVED, unused. sparc64: Split entry.S up into seperate files.
Diffstat (limited to 'include/asm-sparc')
-rw-r--r--include/asm-sparc/head.h11
-rw-r--r--include/asm-sparc/kgdb.h116
-rw-r--r--include/asm-sparc/smp.h2
-rw-r--r--include/asm-sparc/system.h2
4 files changed, 43 insertions, 88 deletions
diff --git a/include/asm-sparc/head.h b/include/asm-sparc/head.h
index fcdba5116339..e6532c3e09c9 100644
--- a/include/asm-sparc/head.h
+++ b/include/asm-sparc/head.h
@@ -52,6 +52,17 @@
nop; \
nop;
+#ifdef CONFIG_KGDB
+#define KGDB_TRAP(num) \
+ b kgdb_trap_low; \
+ rd %psr,%l0; \
+ nop; \
+ nop;
+#else
+#define KGDB_TRAP(num) \
+ BAD_TRAP(num)
+#endif
+
/* The Get Condition Codes software trap for userland. */
#define GETCC_TRAP \
b getcc_trap_handler; mov %psr, %l0; nop; nop;
diff --git a/include/asm-sparc/kgdb.h b/include/asm-sparc/kgdb.h
index d120adfb429f..b6ef301d05bf 100644
--- a/include/asm-sparc/kgdb.h
+++ b/include/asm-sparc/kgdb.h
@@ -1,94 +1,38 @@
-/* $Id: kgdb.h,v 1.8 1998/01/07 06:33:44 baccala Exp $
- * kgdb.h: Defines and declarations for serial line source level
- * remote debugging of the Linux kernel using gdb.
- *
- * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
- */
#ifndef _SPARC_KGDB_H
#define _SPARC_KGDB_H
-#ifndef __ASSEMBLY__
-/* To init the kgdb engine. */
-extern void set_debug_traps(void);
-
-/* To enter the debugger explicitly. */
-extern void breakpoint(void);
-
-/* For convenience we define the format of a kgdb trap breakpoint
- * frame here also.
- */
-struct kgdb_frame {
- unsigned long globals[8];
- unsigned long outs[8];
- unsigned long locals[8];
- unsigned long ins[8];
- unsigned long fpregs[32];
- unsigned long y;
- unsigned long psr;
- unsigned long wim;
- unsigned long tbr;
- unsigned long pc;
- unsigned long npc;
- unsigned long fpsr;
- unsigned long cpsr;
+#ifdef CONFIG_SPARC32
+#define BUFMAX 2048
+#else
+#define BUFMAX 4096
+#endif
+
+enum regnames {
+ GDB_G0, GDB_G1, GDB_G2, GDB_G3, GDB_G4, GDB_G5, GDB_G6, GDB_G7,
+ GDB_O0, GDB_O1, GDB_O2, GDB_O3, GDB_O4, GDB_O5, GDB_SP, GDB_O7,
+ GDB_L0, GDB_L1, GDB_L2, GDB_L3, GDB_L4, GDB_L5, GDB_L6, GDB_L7,
+ GDB_I0, GDB_I1, GDB_I2, GDB_I3, GDB_I4, GDB_I5, GDB_FP, GDB_I7,
+ GDB_F0,
+ GDB_F31 = GDB_F0 + 31,
+#ifdef CONFIG_SPARC32
+ GDB_Y, GDB_PSR, GDB_WIM, GDB_TBR, GDB_PC, GDB_NPC,
+ GDB_FSR, GDB_CSR,
+#else
+ GDB_F32 = GDB_F0 + 32,
+ GDB_F62 = GDB_F32 + 15,
+ GDB_PC, GDB_NPC, GDB_STATE, GDB_FSR, GDB_FPRS, GDB_Y,
+#endif
};
-#endif /* !(__ASSEMBLY__) */
-
-/* Macros for assembly usage of the kgdb breakpoint frame. */
-#define KGDB_G0 0x000
-#define KGDB_G1 0x004
-#define KGDB_G2 0x008
-#define KGDB_G4 0x010
-#define KGDB_G6 0x018
-#define KGDB_I0 0x020
-#define KGDB_I2 0x028
-#define KGDB_I4 0x030
-#define KGDB_I6 0x038
-#define KGDB_Y 0x100
-#define KGDB_PSR 0x104
-#define KGDB_WIM 0x108
-#define KGDB_TBR 0x10c
-#define KGDB_PC 0x110
-#define KGDB_NPC 0x114
-
-#define SAVE_KGDB_GLOBALS(reg) \
- std %g0, [%reg + STACKFRAME_SZ + KGDB_G0]; \
- std %g2, [%reg + STACKFRAME_SZ + KGDB_G2]; \
- std %g4, [%reg + STACKFRAME_SZ + KGDB_G4]; \
- std %g6, [%reg + STACKFRAME_SZ + KGDB_G6];
-
-#define SAVE_KGDB_INS(reg) \
- std %i0, [%reg + STACKFRAME_SZ + KGDB_I0]; \
- std %i2, [%reg + STACKFRAME_SZ + KGDB_I2]; \
- std %i4, [%reg + STACKFRAME_SZ + KGDB_I4]; \
- std %i6, [%reg + STACKFRAME_SZ + KGDB_I6];
-
-#define SAVE_KGDB_SREGS(reg, reg_y, reg_psr, reg_wim, reg_tbr, reg_pc, reg_npc) \
- st %reg_y, [%reg + STACKFRAME_SZ + KGDB_Y]; \
- st %reg_psr, [%reg + STACKFRAME_SZ + KGDB_PSR]; \
- st %reg_wim, [%reg + STACKFRAME_SZ + KGDB_WIM]; \
- st %reg_tbr, [%reg + STACKFRAME_SZ + KGDB_TBR]; \
- st %reg_pc, [%reg + STACKFRAME_SZ + KGDB_PC]; \
- st %reg_npc, [%reg + STACKFRAME_SZ + KGDB_NPC];
-#define LOAD_KGDB_GLOBALS(reg) \
- ld [%reg + STACKFRAME_SZ + KGDB_G1], %g1; \
- ldd [%reg + STACKFRAME_SZ + KGDB_G2], %g2; \
- ldd [%reg + STACKFRAME_SZ + KGDB_G4], %g4; \
- ldd [%reg + STACKFRAME_SZ + KGDB_G6], %g6;
+#ifdef CONFIG_SPARC32
+#define NUMREGBYTES ((GDB_CSR + 1) * 4)
+#else
+#define NUMREGBYTES ((GDB_Y + 1) * 8)
+#endif
-#define LOAD_KGDB_INS(reg) \
- ldd [%reg + STACKFRAME_SZ + KGDB_I0], %i0; \
- ldd [%reg + STACKFRAME_SZ + KGDB_I2], %i2; \
- ldd [%reg + STACKFRAME_SZ + KGDB_I4], %i4; \
- ldd [%reg + STACKFRAME_SZ + KGDB_I6], %i6;
+extern void arch_kgdb_breakpoint(void);
-#define LOAD_KGDB_SREGS(reg, reg_y, reg_psr, reg_wim, reg_tbr, reg_pc, reg_npc) \
- ld [%reg + STACKFRAME_SZ + KGDB_Y], %reg_y; \
- ld [%reg + STACKFRAME_SZ + KGDB_PSR], %reg_psr; \
- ld [%reg + STACKFRAME_SZ + KGDB_WIM], %reg_wim; \
- ld [%reg + STACKFRAME_SZ + KGDB_TBR], %reg_tbr; \
- ld [%reg + STACKFRAME_SZ + KGDB_PC], %reg_pc; \
- ld [%reg + STACKFRAME_SZ + KGDB_NPC], %reg_npc;
+#define BREAK_INSTR_SIZE 4
+#define CACHE_FLUSH_IS_SAFE 1
-#endif /* !(_SPARC_KGDB_H) */
+#endif /* _SPARC_KGDB_H */
diff --git a/include/asm-sparc/smp.h b/include/asm-sparc/smp.h
index b3f492208fd2..e6d561599726 100644
--- a/include/asm-sparc/smp.h
+++ b/include/asm-sparc/smp.h
@@ -51,13 +51,11 @@ void smp_bogo(struct seq_file *);
void smp_info(struct seq_file *);
BTFIXUPDEF_CALL(void, smp_cross_call, smpfunc_t, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
-BTFIXUPDEF_CALL(void, smp_message_pass, int, int, unsigned long, int)
BTFIXUPDEF_CALL(int, __hard_smp_processor_id, void)
BTFIXUPDEF_BLACKBOX(hard_smp_processor_id)
BTFIXUPDEF_BLACKBOX(load_current)
#define smp_cross_call(func,arg1,arg2,arg3,arg4,arg5) BTFIXUP_CALL(smp_cross_call)(func,arg1,arg2,arg3,arg4,arg5)
-#define smp_message_pass(target,msg,data,wait) BTFIXUP_CALL(smp_message_pass)(target,msg,data,wait)
static inline void xc0(smpfunc_t func) { smp_cross_call(func, 0, 0, 0, 0, 0); }
static inline void xc1(smpfunc_t func, unsigned long arg1)
diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h
index 4e08210cd4c2..b4b024445fc9 100644
--- a/include/asm-sparc/system.h
+++ b/include/asm-sparc/system.h
@@ -94,6 +94,8 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
} while(0)
#endif
+extern void flushw_all(void);
+
/*
* Flush windows so that the VM switch which follows
* would not pull the stack from under us.