aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMikael Starvik <mikael.starvik@axis.com>2005-07-27 14:44:27 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-27 19:25:59 -0400
commitcb09f540a1c5e6c5beb6e82f554d51a1f2c87e67 (patch)
tree869d0be20eb950ea64b7fdcfcbb07082f173cfae /arch
parente1637f437f1a2e552e0572e02d46e2c395a4ecaf (diff)
[PATCH] CRIS update: arch split
Changes necessary to make the sub-arch split complete. Signed-off-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/cris/kernel/ptrace.c37
1 files changed, 6 insertions, 31 deletions
diff --git a/arch/cris/kernel/ptrace.c b/arch/cris/kernel/ptrace.c
index e85a2fdd9acf..2b6363cbe985 100644
--- a/arch/cris/kernel/ptrace.c
+++ b/arch/cris/kernel/ptrace.c
@@ -8,6 +8,12 @@
8 * Authors: Bjorn Wesen 8 * Authors: Bjorn Wesen
9 * 9 *
10 * $Log: ptrace.c,v $ 10 * $Log: ptrace.c,v $
11 * Revision 1.10 2004/09/22 11:50:01 orjanf
12 * * Moved get_reg/put_reg to arch-specific files.
13 * * Added functions to access debug registers (CRISv32).
14 * * Added support for PTRACE_SINGLESTEP (CRISv32).
15 * * Added S flag to CCS_MASK (CRISv32).
16 *
11 * Revision 1.9 2003/07/04 12:56:11 tobiasa 17 * Revision 1.9 2003/07/04 12:56:11 tobiasa
12 * Moved arch-specific code to arch-specific files. 18 * Moved arch-specific code to arch-specific files.
13 * 19 *
@@ -72,37 +78,6 @@
72#include <asm/system.h> 78#include <asm/system.h>
73#include <asm/processor.h> 79#include <asm/processor.h>
74 80
75/*
76 * Get contents of register REGNO in task TASK.
77 */
78inline long get_reg(struct task_struct *task, unsigned int regno)
79{
80 /* USP is a special case, it's not in the pt_regs struct but
81 * in the tasks thread struct
82 */
83
84 if (regno == PT_USP)
85 return task->thread.usp;
86 else if (regno < PT_MAX)
87 return ((unsigned long *)user_regs(task->thread_info))[regno];
88 else
89 return 0;
90}
91
92/*
93 * Write contents of register REGNO in task TASK.
94 */
95inline int put_reg(struct task_struct *task, unsigned int regno,
96 unsigned long data)
97{
98 if (regno == PT_USP)
99 task->thread.usp = data;
100 else if (regno < PT_MAX)
101 ((unsigned long *)user_regs(task->thread_info))[regno] = data;
102 else
103 return -1;
104 return 0;
105}
106 81
107/* notification of userspace execution resumption 82/* notification of userspace execution resumption
108 * - triggered by current->work.notify_resume 83 * - triggered by current->work.notify_resume