aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/processor_32.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/include/asm/processor_32.h')
-rw-r--r--arch/sh/include/asm/processor_32.h35
1 files changed, 14 insertions, 21 deletions
diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h
index 1f3d6fab660c..572b4eb09493 100644
--- a/arch/sh/include/asm/processor_32.h
+++ b/arch/sh/include/asm/processor_32.h
@@ -14,6 +14,7 @@
14#include <asm/page.h> 14#include <asm/page.h>
15#include <asm/types.h> 15#include <asm/types.h>
16#include <asm/ptrace.h> 16#include <asm/ptrace.h>
17#include <asm/hw_breakpoint.h>
17 18
18/* 19/*
19 * Default implementation of macro that returns current 20 * Default implementation of macro that returns current
@@ -90,9 +91,9 @@ struct sh_fpu_soft_struct {
90 unsigned long entry_pc; 91 unsigned long entry_pc;
91}; 92};
92 93
93union sh_fpu_union { 94union thread_xstate {
94 struct sh_fpu_hard_struct hard; 95 struct sh_fpu_hard_struct hardfpu;
95 struct sh_fpu_soft_struct soft; 96 struct sh_fpu_soft_struct softfpu;
96}; 97};
97 98
98struct thread_struct { 99struct thread_struct {
@@ -100,38 +101,30 @@ struct thread_struct {
100 unsigned long sp; 101 unsigned long sp;
101 unsigned long pc; 102 unsigned long pc;
102 103
103 /* Hardware debugging registers */ 104 /* Various thread flags, see SH_THREAD_xxx */
104 unsigned long ubc_pc; 105 unsigned long flags;
105 106
106 /* floating point info */ 107 /* Save middle states of ptrace breakpoints */
107 union sh_fpu_union fpu; 108 struct perf_event *ptrace_bps[HBP_NUM];
108 109
109#ifdef CONFIG_SH_DSP 110#ifdef CONFIG_SH_DSP
110 /* Dsp status information */ 111 /* Dsp status information */
111 struct sh_dsp_struct dsp_status; 112 struct sh_dsp_struct dsp_status;
112#endif 113#endif
113};
114 114
115/* Count of active tasks with UBC settings */ 115 /* Extended processor state */
116extern int ubc_usercnt; 116 union thread_xstate *xstate;
117};
117 118
118#define INIT_THREAD { \ 119#define INIT_THREAD { \
119 .sp = sizeof(init_stack) + (long) &init_stack, \ 120 .sp = sizeof(init_stack) + (long) &init_stack, \
121 .flags = 0, \
120} 122}
121 123
122/*
123 * Do necessary setup to start up a newly executed thread.
124 */
125#define start_thread(_regs, new_pc, new_sp) \
126 set_fs(USER_DS); \
127 _regs->pr = 0; \
128 _regs->sr = SR_FD; /* User mode. */ \
129 _regs->pc = new_pc; \
130 _regs->regs[15] = new_sp
131
132/* Forward declaration, a strange C thing */ 124/* Forward declaration, a strange C thing */
133struct task_struct; 125struct task_struct;
134struct mm_struct; 126
127extern void start_thread(struct pt_regs *regs, unsigned long new_pc, unsigned long new_sp);
135 128
136/* Free all resources held by a thread. */ 129/* Free all resources held by a thread. */
137extern void release_thread(struct task_struct *); 130extern void release_thread(struct task_struct *);