Home
last modified time | relevance | path

Searched refs:tsk (Results 1 – 25 of 267) sorted by relevance

1234567891011

/arch/mn10300/include/asm/
Dfpu.h36 static inline void set_using_fpu(struct task_struct *tsk) in set_using_fpu() argument
41 : "i"(THREAD_USING_FPU), "a"(&tsk->thread.fpu_flags) in set_using_fpu()
45 static inline void clear_using_fpu(struct task_struct *tsk) in clear_using_fpu() argument
50 : "i"(THREAD_USING_FPU), "a"(&tsk->thread.fpu_flags) in clear_using_fpu()
54 #define is_using_fpu(tsk) ((tsk)->thread.fpu_flags & THREAD_USING_FPU) argument
63 static inline void unlazy_fpu(struct task_struct *tsk) in unlazy_fpu() argument
67 if (tsk->thread.fpu_flags & THREAD_HAS_FPU) { in unlazy_fpu()
68 fpu_save(&tsk->thread.fpu_state); in unlazy_fpu()
69 tsk->thread.fpu_flags &= ~THREAD_HAS_FPU; in unlazy_fpu()
70 tsk->thread.uregs->epsw &= ~EPSW_FE; in unlazy_fpu()
[all …]
/arch/mips/include/asm/
Ddsp.h43 #define __save_dsp(tsk) \ argument
45 tsk->thread.dsp.dspr[0] = mfhi1(); \
46 tsk->thread.dsp.dspr[1] = mflo1(); \
47 tsk->thread.dsp.dspr[2] = mfhi2(); \
48 tsk->thread.dsp.dspr[3] = mflo2(); \
49 tsk->thread.dsp.dspr[4] = mfhi3(); \
50 tsk->thread.dsp.dspr[5] = mflo3(); \
51 tsk->thread.dsp.dspcontrol = rddsp(DSP_MASK); \
54 #define save_dsp(tsk) \ argument
57 __save_dsp(tsk); \
[all …]
/arch/mn10300/kernel/
Dfpu.c36 struct task_struct *tsk = current; in fpu_exception() local
45 if (!is_using_fpu(tsk)) in fpu_exception()
52 info.si_addr = (void *) tsk->thread.uregs->pc; in fpu_exception()
55 unlazy_fpu(tsk); in fpu_exception()
57 fpcr = tsk->thread.fpu_state.fpcr; in fpu_exception()
68 force_sig_info(SIGFPE, &info, tsk); in fpu_exception()
76 struct task_struct *tsk = current; in fpu_setup_sigcontext() local
78 if (!is_using_fpu(tsk)) in fpu_setup_sigcontext()
88 if (tsk->thread.fpu_flags & THREAD_HAS_FPU) { in fpu_setup_sigcontext()
89 fpu_save(&tsk->thread.fpu_state); in fpu_setup_sigcontext()
[all …]
/arch/sh/kernel/cpu/
Dfpu.c7 int init_fpu(struct task_struct *tsk) in init_fpu() argument
9 if (tsk_used_math(tsk)) { in init_fpu()
10 if ((boot_cpu_data.flags & CPU_HAS_FPU) && tsk == current) in init_fpu()
11 unlazy_fpu(tsk, task_pt_regs(tsk)); in init_fpu()
18 if (!tsk->thread.xstate) { in init_fpu()
19 tsk->thread.xstate = kmem_cache_alloc(task_xstate_cachep, in init_fpu()
21 if (!tsk->thread.xstate) in init_fpu()
26 struct sh_fpu_hard_struct *fp = &tsk->thread.xstate->hardfpu; in init_fpu()
30 struct sh_fpu_soft_struct *fp = &tsk->thread.xstate->softfpu; in init_fpu()
35 set_stopped_child_used_math(tsk); in init_fpu()
[all …]
/arch/sh/kernel/cpu/sh4/
Dfpu.c45 void save_fpu(struct task_struct *tsk) in save_fpu() argument
88 :"0"((char *)(&tsk->thread.xstate->hardfpu.status)), in save_fpu()
95 void restore_fpu(struct task_struct *tsk) in restore_fpu() argument
138 :"0" (tsk->thread.xstate), "r" (FPSCR_RCHG) in restore_fpu()
232 struct task_struct *tsk = current; in ieee_fpe_handler() local
234 if ((tsk->thread.xstate->hardfpu.fpscr & FPSCR_CAUSE_ERROR)) in ieee_fpe_handler()
236 denormal_to_double(&tsk->thread.xstate->hardfpu, in ieee_fpe_handler()
245 struct task_struct *tsk = current; in ieee_fpe_handler() local
252 hx = tsk->thread.xstate->hardfpu.fp_regs[n]; in ieee_fpe_handler()
253 hy = tsk->thread.xstate->hardfpu.fp_regs[m]; in ieee_fpe_handler()
[all …]
/arch/arc/include/asm/
Dprocessor.h60 #define prepare_to_copy(tsk) do { } while (0) argument
74 #define copy_segments(tsk, mm) do { } while (0) argument
77 #define KSTK_EIP(tsk) (task_pt_regs(tsk)->ret) argument
78 #define KSTK_ESP(tsk) (task_pt_regs(tsk)->sp) argument
84 #define TSK_K_ESP(tsk) (tsk->thread.ksp) argument
86 #define TSK_K_REG(tsk, off) (*((unsigned int *)(TSK_K_ESP(tsk) + \ argument
89 #define TSK_K_BLINK(tsk) TSK_K_REG(tsk, 4) argument
90 #define TSK_K_FP(tsk) TSK_K_REG(tsk, 0) argument
/arch/sh/include/asm/
Dfpu.h24 #define save_fpu(tsk) do { } while (0) argument
25 #define restore_fpu(tsk) do { } while (0) argument
42 static inline void __unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs) in __unlazy_fpu() argument
44 if (task_thread_info(tsk)->status & TS_USEDFPU) { in __unlazy_fpu()
45 task_thread_info(tsk)->status &= ~TS_USEDFPU; in __unlazy_fpu()
46 save_fpu(tsk); in __unlazy_fpu()
49 tsk->thread.fpu_counter = 0; in __unlazy_fpu()
52 static inline void unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs) in unlazy_fpu() argument
55 __unlazy_fpu(tsk, regs); in unlazy_fpu()
59 static inline void clear_fpu(struct task_struct *tsk, struct pt_regs *regs) in clear_fpu() argument
[all …]
Dswitch_to_32.h6 #define is_dsp_enabled(tsk) \ argument
7 (!!(tsk->thread.dsp_status.status & SR_DSP))
9 #define __restore_dsp(tsk) \ argument
12 (u32 *)&tsk->thread.dsp_status; \
32 #define __save_dsp(tsk) \ argument
35 (u32 *)&tsk->thread.dsp_status + 14; \
58 #define is_dsp_enabled(tsk) (0) argument
59 #define __save_dsp(tsk) do { } while (0) argument
60 #define __restore_dsp(tsk) do { } while (0) argument
/arch/x86/include/asm/
Dfpu-internal.h48 struct task_struct *tsk);
49 extern void convert_to_fxsr(struct task_struct *tsk,
117 static inline void sanitize_i387_state(struct task_struct *tsk) in sanitize_i387_state() argument
121 __sanitize_i387_state(tsk); in sanitize_i387_state()
276 static inline int __save_init_fpu(struct task_struct *tsk) in __save_init_fpu() argument
278 return fpu_save_init(&tsk->thread.fpu); in __save_init_fpu()
291 static inline int restore_fpu_checking(struct task_struct *tsk) in restore_fpu_checking() argument
301 : : [addr] "m" (tsk->thread.fpu.has_fpu)); in restore_fpu_checking()
304 return fpu_restore_checking(&tsk->thread.fpu); in restore_fpu_checking()
312 static inline int __thread_has_fpu(struct task_struct *tsk) in __thread_has_fpu() argument
[all …]
/arch/powerpc/include/asm/
Dprocessor.h120 #define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \ argument
351 #define thread_saved_pc(tsk) \ argument
352 ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0)
354 #define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.regs) argument
358 #define KSTK_EIP(tsk) ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0) argument
359 #define KSTK_ESP(tsk) ((tsk)->thread.regs? (tsk)->thread.regs->gpr[1]: 0) argument
362 #define GET_FPEXC_CTL(tsk, adr) get_fpexc_mode((tsk), (adr)) argument
363 #define SET_FPEXC_CTL(tsk, val) set_fpexc_mode((tsk), (val)) argument
365 extern int get_fpexc_mode(struct task_struct *tsk, unsigned long adr);
366 extern int set_fpexc_mode(struct task_struct *tsk, unsigned int val);
[all …]
/arch/c6x/include/asm/
Dprocessor.h95 #define copy_segments(tsk, mm) do { } while (0) argument
101 #define thread_saved_pc(tsk) (task_pt_regs(tsk)->pc) argument
107 #define thread_saved_ksp(tsk) \ argument
108 (*(unsigned long *)&(tsk)->thread.b15_14)
109 #define thread_saved_dp(tsk) \ argument
110 (*(((unsigned long *)&(tsk)->thread.b15_14) + 1))
112 #define thread_saved_ksp(tsk) \ argument
113 (*(((unsigned long *)&(tsk)->thread.b15_14) + 1))
114 #define thread_saved_dp(tsk) \ argument
115 (*(unsigned long *)&(tsk)->thread.b15_14)
/arch/arc/kernel/
Dstacktrace.c42 static void seed_unwind_frame_info(struct task_struct *tsk, in seed_unwind_frame_info() argument
46 if (tsk == NULL && regs == NULL) { in seed_unwind_frame_info()
65 frame_info->task = tsk; in seed_unwind_frame_info()
67 frame_info->regs.r27 = TSK_K_FP(tsk); in seed_unwind_frame_info()
68 frame_info->regs.r28 = TSK_K_ESP(tsk); in seed_unwind_frame_info()
69 frame_info->regs.r31 = TSK_K_BLINK(tsk); in seed_unwind_frame_info()
86 frame_info->task = tsk; in seed_unwind_frame_info()
99 arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs, in arc_unwind_core() argument
107 seed_unwind_frame_info(tsk, regs, &frame_info); in arc_unwind_core()
210 noinline void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs) in show_stacktrace() argument
[all …]
/arch/sh/kernel/cpu/sh5/
Dfpu.c19 void save_fpu(struct task_struct *tsk) in save_fpu() argument
57 : "r" (&tsk->thread.xstate->hardfpu) in save_fpu()
61 void restore_fpu(struct task_struct *tsk) in restore_fpu() argument
100 : "r" (&tsk->thread.xstate->hardfpu) in restore_fpu()
106 struct task_struct *tsk = current; in do_fpu_error() local
110 force_sig(SIGFPE, tsk); in do_fpu_error()
/arch/microblaze/include/asm/
Dprocessor.h27 #define task_pt_regs(tsk) \ argument
28 (((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1)
77 # define KSTK_EIP(tsk) (0) argument
78 # define KSTK_ESP(tsk) (0) argument
126 # define thread_saved_pc(tsk) \ argument
127 ((tsk)->thread.regs ? (tsk)->thread.regs->r15 : 0)
138 # define task_pt_regs_plus_args(tsk) \ argument
139 ((void *)task_pt_regs(tsk))
148 # define deactivate_mm(tsk, mm) do { } while (0) argument
/arch/x86/um/asm/
Dprocessor.h13 #define KSTK_EIP(tsk) KSTK_REG(tsk, HOST_IP) argument
14 #define KSTK_ESP(tsk) KSTK_REG(tsk, HOST_SP) argument
15 #define KSTK_EBP(tsk) KSTK_REG(tsk, HOST_BP) argument
/arch/score/include/asm/
Dprocessor.h16 extern unsigned long thread_saved_pc(struct task_struct *tsk);
98 #define kstk_tos(tsk) \ argument
99 ((unsigned long)task_stack_page(tsk) + THREAD_SIZE - 32)
100 #define task_pt_regs(tsk) ((struct pt_regs *)kstk_tos(tsk) - 1) argument
102 #define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc) argument
103 #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29]) argument
/arch/avr32/kernel/
Dptrace.c25 static struct pt_regs *get_user_regs(struct task_struct *tsk) in get_user_regs() argument
27 return (struct pt_regs *)((unsigned long)task_stack_page(tsk) + in get_user_regs()
31 void user_enable_single_step(struct task_struct *tsk) in user_enable_single_step() argument
34 tsk->pid, task_pt_regs(tsk)->pc, task_pt_regs(tsk)->sr); in user_enable_single_step()
48 set_tsk_thread_flag(tsk, TIF_BREAKPOINT); in user_enable_single_step()
49 set_tsk_thread_flag(tsk, TIF_SINGLE_STEP); in user_enable_single_step()
73 static int ptrace_read_user(struct task_struct *tsk, unsigned long offset, in ptrace_read_user() argument
84 regs = (unsigned long *)get_user_regs(tsk); in ptrace_read_user()
91 tsk->comm, tsk->pid, offset, data, value); in ptrace_read_user()
101 static int ptrace_write_user(struct task_struct *tsk, unsigned long offset, in ptrace_write_user() argument
[all …]
/arch/sh/kernel/
Ddumpstack.c127 void show_trace(struct task_struct *tsk, unsigned long *sp, in show_trace() argument
135 unwind_stack(tsk, regs, sp, &print_trace_ops, ""); in show_trace()
139 if (!tsk) in show_trace()
140 tsk = current; in show_trace()
142 debug_show_held_locks(tsk); in show_trace()
145 void show_stack(struct task_struct *tsk, unsigned long *sp) in show_stack() argument
149 if (!tsk) in show_stack()
150 tsk = current; in show_stack()
151 if (tsk == current) in show_stack()
154 sp = (unsigned long *)tsk->thread.sp; in show_stack()
[all …]
/arch/metag/include/asm/
Dprocessor.h135 #define copy_segments(tsk, mm) do { } while (0) argument
141 #define thread_saved_pc(tsk) \ argument
142 ((unsigned long)(tsk)->thread.kernel_context->CurrPC)
143 #define thread_saved_sp(tsk) \ argument
144 ((unsigned long)(tsk)->thread.kernel_context->AX[0].U0)
145 #define thread_saved_fp(tsk) \ argument
146 ((unsigned long)(tsk)->thread.kernel_context->AX[1].U0)
150 #define KSTK_EIP(tsk) (task_pt_regs(tsk)->ctx.CurrPC) argument
151 #define KSTK_ESP(tsk) (task_pt_regs(tsk)->ctx.AX[0].U0) argument
200 extern void show_trace(struct task_struct *tsk, unsigned long *sp,
/arch/ia64/include/asm/
Dthread_info.h40 #define INIT_THREAD_INFO(tsk) \ argument
42 .task = &tsk, \
53 #define alloc_thread_info_node(tsk, node) \ argument
54 ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE))
55 #define task_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) argument
58 #define alloc_thread_info_node(tsk, node) ((struct thread_info *) 0) argument
59 #define task_thread_info(tsk) ((struct thread_info *) 0) argument
62 #define task_stack_page(tsk) ((void *)(tsk)) argument
86 #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) argument
/arch/blackfin/include/asm/
Dprocessor.h81 #define thread_saved_pc(tsk) (tsk->thread.pc) argument
85 #define KSTK_EIP(tsk) \ argument
88 if ((tsk)->thread.esp0 > PAGE_SIZE && \
89 MAP_NR((tsk)->thread.esp0) < max_mapnr) \
90 eip = ((struct pt_regs *) (tsk)->thread.esp0)->pc; \
92 #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) argument
/arch/um/kernel/
Dstacktrace.c19 void dump_trace(struct task_struct *tsk, in dump_trace() argument
25 struct pt_regs *segv_regs = tsk->thread.segv_regs; in dump_trace()
28 bp = get_frame_pointer(tsk, segv_regs); in dump_trace()
29 sp = get_stack_pointer(tsk, segv_regs); in dump_trace()
63 static void __save_stack_trace(struct task_struct *tsk, struct stack_trace *trace) in __save_stack_trace() argument
65 dump_trace(tsk, &dump_ops, trace); in __save_stack_trace()
76 void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) in save_stack_trace_tsk() argument
78 __save_stack_trace(tsk, trace); in save_stack_trace_tsk()
/arch/sh/kernel/cpu/sh2a/
Dfpu.c30 void save_fpu(struct task_struct *tsk) in save_fpu() argument
55 : "0" ((char *)(&tsk->thread.xstate->hardfpu.status)), in save_fpu()
63 void restore_fpu(struct task_struct *tsk) in restore_fpu() argument
87 : "0" (tsk->thread.xstate), "r" (FPSCR_RCHG) in restore_fpu()
457 struct task_struct *tsk = current; in ieee_fpe_handler() local
459 if ((tsk->thread.xstate->hardfpu.fpscr & FPSCR_FPU_ERROR)) { in ieee_fpe_handler()
461 denormal_to_double (&tsk->thread.xstate->hardfpu, in ieee_fpe_handler()
469 struct task_struct *tsk = current; in ieee_fpe_handler() local
476 hx = tsk->thread.xstate->hardfpu.fp_regs[n]; in ieee_fpe_handler()
477 hy = tsk->thread.xstate->hardfpu.fp_regs[m]; in ieee_fpe_handler()
[all …]
/arch/arm64/include/asm/
Dthread_info.h58 #define INIT_THREAD_INFO(tsk) \ argument
60 .task = &tsk, \
92 #define thread_saved_pc(tsk) \ argument
93 ((unsigned long)(tsk->thread.cpu_context.pc))
94 #define thread_saved_sp(tsk) \ argument
95 ((unsigned long)(tsk->thread.cpu_context.sp))
96 #define thread_saved_fp(tsk) \ argument
97 ((unsigned long)(tsk->thread.cpu_context.fp))
/arch/x86/kernel/
Dtraps.c111 do_trap_no_signal(struct task_struct *tsk, int trapnr, char *str, in do_trap_no_signal() argument
130 tsk->thread.error_code = error_code; in do_trap_no_signal()
131 tsk->thread.trap_nr = trapnr; in do_trap_no_signal()
175 struct task_struct *tsk = current; in do_trap() local
178 if (!do_trap_no_signal(tsk, trapnr, str, regs, error_code)) in do_trap()
189 tsk->thread.error_code = error_code; in do_trap()
190 tsk->thread.trap_nr = trapnr; in do_trap()
193 if (show_unhandled_signals && unhandled_signal(tsk, signr) && in do_trap()
196 tsk->comm, tsk->pid, str, in do_trap()
203 force_sig_info(signr, info ?: SEND_SIG_PRIV, tsk); in do_trap()
[all …]

1234567891011