Home
last modified time | relevance | path

Searched refs:thread (Results 1 – 200 of 744) sorted by relevance

1234

/linux-4.1.27/tools/perf/util/
Dthread.c13 int thread__init_map_groups(struct thread *thread, struct machine *machine) in thread__init_map_groups() argument
15 struct thread *leader; in thread__init_map_groups()
16 pid_t pid = thread->pid_; in thread__init_map_groups()
18 if (pid == thread->tid || pid == -1) { in thread__init_map_groups()
19 thread->mg = map_groups__new(machine); in thread__init_map_groups()
23 thread->mg = map_groups__get(leader->mg); in thread__init_map_groups()
26 return thread->mg ? 0 : -1; in thread__init_map_groups()
29 struct thread *thread__new(pid_t pid, pid_t tid) in thread__new()
33 struct thread *thread = zalloc(sizeof(*thread)); in thread__new() local
35 if (thread != NULL) { in thread__new()
[all …]
Dthread.h14 struct thread { struct
39 struct thread *thread__new(pid_t pid, pid_t tid); argument
40 int thread__init_map_groups(struct thread *thread, struct machine *machine);
41 void thread__delete(struct thread *thread);
43 struct thread *thread__get(struct thread *thread);
44 void thread__put(struct thread *thread);
46 static inline void __thread__zput(struct thread **thread) in __thread__zput() argument
48 thread__put(*thread); in __thread__zput()
49 *thread = NULL; in __thread__zput()
52 #define thread__zput(thread) __thread__zput(&thread) argument
[all …]
Dunwind.h19 struct thread *thread,
24 int unwind__prepare_access(struct thread *thread);
25 void unwind__flush_access(struct thread *thread);
26 void unwind__finish_access(struct thread *thread);
28 static inline int unwind__prepare_access(struct thread *thread __maybe_unused) in unwind__prepare_access()
33 static inline void unwind__flush_access(struct thread *thread __maybe_unused) {} in unwind__flush_access()
34 static inline void unwind__finish_access(struct thread *thread __maybe_unused) {} in unwind__finish_access()
40 struct thread *thread __maybe_unused, in unwind__get_entries()
47 static inline int unwind__prepare_access(struct thread *thread __maybe_unused) in unwind__prepare_access()
52 static inline void unwind__flush_access(struct thread *thread __maybe_unused) {} in unwind__flush_access()
[all …]
Dthread-stack.c126 static struct thread_stack *thread_stack__new(struct thread *thread, in thread_stack__new() argument
140 if (thread->mg && thread->mg->machine) in thread_stack__new()
141 ts->kernel_start = machine__kernel_start(thread->mg->machine); in thread_stack__new()
195 static int thread_stack__call_return(struct thread *thread, in thread_stack__call_return() argument
202 .thread = thread, in thread_stack__call_return()
222 static int thread_stack__flush(struct thread *thread, struct thread_stack *ts) in thread_stack__flush() argument
233 err = thread_stack__call_return(thread, ts, --ts->cnt, in thread_stack__flush()
245 int thread_stack__event(struct thread *thread, u32 flags, u64 from_ip, in thread_stack__event() argument
248 if (!thread) in thread_stack__event()
251 if (!thread->ts) { in thread_stack__event()
[all …]
Dthread-stack.h24 struct thread;
59 struct thread *thread; member
94 int thread_stack__event(struct thread *thread, u32 flags, u64 from_ip,
96 void thread_stack__set_trace_nr(struct thread *thread, u64 trace_nr);
97 void thread_stack__sample(struct thread *thread, struct ip_callchain *chain,
99 void thread_stack__free(struct thread *thread);
105 int thread_stack__process(struct thread *thread, struct comm *comm,
Ddb-export.c122 int db_export__thread(struct db_export *dbe, struct thread *thread, in db_export__thread() argument
128 if (thread->db_id) in db_export__thread()
131 thread->db_id = ++dbe->thread_last_db_id; in db_export__thread()
133 if (thread->pid_ != -1) { in db_export__thread()
134 struct thread *main_thread; in db_export__thread()
136 if (thread->pid_ == thread->tid) { in db_export__thread()
137 main_thread = thread; in db_export__thread()
140 thread->pid_, in db_export__thread()
141 thread->pid_); in db_export__thread()
149 err = db_export__comm_thread(dbe, comm, thread); in db_export__thread()
[all …]
Dmachine.c48 struct thread *thread = machine__findnew_thread(machine, -1, in machine__init() local
52 if (thread == NULL) in machine__init()
56 thread__set_comm(thread, comm, 0); in machine__init()
97 struct thread *t = rb_entry(nd, struct thread, rb_node); in machine__delete_threads()
294 struct thread *th, pid_t pid) in machine__update_thread_pid()
296 struct thread *leader; in machine__update_thread_pid()
339 static struct thread *__machine__findnew_thread(struct machine *machine, in __machine__findnew_thread()
345 struct thread *th; in __machine__findnew_thread()
364 th = rb_entry(parent, struct thread, rb_node); in __machine__findnew_thread()
409 struct thread *machine__findnew_thread(struct machine *machine, pid_t pid, in machine__findnew_thread()
[all …]
Ddb-export.h24 struct thread;
51 int (*export_thread)(struct db_export *dbe, struct thread *thread,
55 struct comm *comm, struct thread *thread);
85 int db_export__thread(struct db_export *dbe, struct thread *thread,
88 struct thread *main_thread);
90 struct thread *thread);
Devlist.c285 int cpu, thread; in perf_evlist__disable() local
295 for (thread = 0; thread < nr_threads; thread++) in perf_evlist__disable()
296 ioctl(FD(pos, cpu, thread), in perf_evlist__disable()
304 int cpu, thread; in perf_evlist__enable() local
314 for (thread = 0; thread < nr_threads; thread++) in perf_evlist__enable()
315 ioctl(FD(pos, cpu, thread), in perf_evlist__enable()
324 int cpu, thread, err; in perf_evlist__disable_event() local
332 for (thread = 0; thread < nr_threads; thread++) { in perf_evlist__disable_event()
333 err = ioctl(FD(evsel, cpu, thread), in perf_evlist__disable_event()
345 int cpu, thread, err; in perf_evlist__enable_event() local
[all …]
Dunwind-libunwind.c90 struct thread *thread; member
318 thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER, in find_map()
412 thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER, in access_dso_mem()
514 static int entry(u64 ip, struct thread *thread, in entry() argument
520 thread__find_addr_location(thread, PERF_RECORD_MISC_USER, in entry()
563 int unwind__prepare_access(struct thread *thread) in unwind__prepare_access() argument
577 thread__set_priv(thread, addr_space); in unwind__prepare_access()
582 void unwind__flush_access(struct thread *thread) in unwind__flush_access() argument
589 addr_space = thread__priv(thread); in unwind__flush_access()
593 void unwind__finish_access(struct thread *thread) in unwind__finish_access() argument
[all …]
Dmachine.h15 struct thread;
34 struct thread *last_match;
71 struct thread *machine__find_thread(struct machine *machine, pid_t pid,
74 struct thread *thread);
123 void machine__remove_thread(struct machine *machine, struct thread *th);
129 int thread__resolve_callchain(struct thread *thread,
150 struct thread *machine__findnew_thread(struct machine *machine, pid_t pid,
209 int (*fn)(struct thread *thread, void *p),
Dunwind-libdw.c29 thread__find_addr_location(ui->thread, in __report_module()
92 thread__find_addr_map(ui->thread, PERF_RECORD_MISC_USER, in access_dso_mem()
167 struct thread *thread, in unwind__get_entries() argument
173 .thread = thread, in unwind__get_entries()
174 .machine = thread->mg->machine, in unwind__get_entries()
197 if (!dwfl_attach_state(ui.dwfl, EM_NONE, thread->tid, &callbacks, &ui)) in unwind__get_entries()
200 err = dwfl_getthread_frames(ui.dwfl, thread->tid, frame_callback, &ui); in unwind__get_entries()
Dvdso.c140 struct thread *thread) in machine__thread_dso_type() argument
146 map = map_groups__first(thread->mg, MAP__FUNCTION); in machine__thread_dso_type()
251 struct thread *thread, in vdso__dso_findnew_compat() argument
257 dso_type = machine__thread_dso_type(machine, thread); in vdso__dso_findnew_compat()
285 struct thread *thread __maybe_unused) in vdso__dso_findnew()
298 if (vdso__dso_findnew_compat(machine, thread, vdso_info, &dso)) in vdso__dso_findnew()
Dunwind-libdw.h9 bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg);
15 struct thread *thread; member
Devent.c459 int err = -1, thread, j; in perf_event__synthesize_thread_map() local
474 for (thread = 0; thread < threads->nr; ++thread) { in perf_event__synthesize_thread_map()
477 threads->map[thread], 0, in perf_event__synthesize_thread_map()
488 if ((int) comm_event->comm.pid != threads->map[thread]) { in perf_event__synthesize_thread_map()
792 void thread__find_addr_map(struct thread *thread, u8 cpumode, in thread__find_addr_map() argument
796 struct map_groups *mg = thread->mg; in thread__find_addr_map()
801 al->thread = thread; in thread__find_addr_map()
868 void thread__find_addr_location(struct thread *thread, in thread__find_addr_location() argument
872 thread__find_addr_map(thread, cpumode, type, addr, al); in thread__find_addr_location()
875 thread->mg->machine->symbol_filter); in thread__find_addr_location()
[all …]
Dvdso.h24 struct thread;
26 struct dso *vdso__dso_findnew(struct machine *machine, struct thread *thread);
Devsel.c778 int cpu, thread; in perf_evsel__alloc_fd() local
787 for (thread = 0; thread < nthreads; thread++) { in perf_evsel__alloc_fd()
788 FD(evsel, cpu, thread) = -1; in perf_evsel__alloc_fd()
799 int cpu, thread; in perf_evsel__run_ioctl() local
805 for (thread = 0; thread < nthreads; thread++) { in perf_evsel__run_ioctl()
806 int fd = FD(evsel, cpu, thread), in perf_evsel__run_ioctl()
882 int cpu, thread; in perf_evsel__close_fd() local
888 for (thread = 0; thread < nthreads; ++thread) { in perf_evsel__close_fd()
889 close(FD(evsel, cpu, thread)); in perf_evsel__close_fd()
890 FD(evsel, cpu, thread) = -1; in perf_evsel__close_fd()
[all …]
Devsel.h240 int cpu, int thread,
243 int perf_evsel__read_cb(struct perf_evsel *evsel, int cpu, int thread,
247 int cpu, int thread, bool scale);
257 int cpu, int thread) in perf_evsel__read_on_cpu() argument
259 return __perf_evsel__read_on_cpu(evsel, cpu, thread, false); in perf_evsel__read_on_cpu()
270 int cpu, int thread) in perf_evsel__read_on_cpu_scaled() argument
272 return __perf_evsel__read_on_cpu(evsel, cpu, thread, true); in perf_evsel__read_on_cpu_scaled()
Dsession.h16 struct thread;
61 struct thread *thread,
85 struct thread *perf_session__findnew(struct perf_session *session, pid_t pid);
/linux-4.1.27/arch/mips/include/asm/
Dasmmacro-32.h15 .macro fpu_save_single thread tmp=t0
19 s.d $f0, THREAD_FPR0(\thread)
20 s.d $f2, THREAD_FPR2(\thread)
21 s.d $f4, THREAD_FPR4(\thread)
22 s.d $f6, THREAD_FPR6(\thread)
23 s.d $f8, THREAD_FPR8(\thread)
24 s.d $f10, THREAD_FPR10(\thread)
25 s.d $f12, THREAD_FPR12(\thread)
26 s.d $f14, THREAD_FPR14(\thread)
27 s.d $f16, THREAD_FPR16(\thread)
[all …]
Dasmmacro.h59 .macro fpu_save_16even thread tmp=t0
63 sdc1 $f0, THREAD_FPR0(\thread)
64 sdc1 $f2, THREAD_FPR2(\thread)
65 sdc1 $f4, THREAD_FPR4(\thread)
66 sdc1 $f6, THREAD_FPR6(\thread)
67 sdc1 $f8, THREAD_FPR8(\thread)
68 sdc1 $f10, THREAD_FPR10(\thread)
69 sdc1 $f12, THREAD_FPR12(\thread)
70 sdc1 $f14, THREAD_FPR14(\thread)
71 sdc1 $f16, THREAD_FPR16(\thread)
[all …]
Dasmmacro-64.h16 .macro cpu_save_nonscratch thread
17 LONG_S s0, THREAD_REG16(\thread)
18 LONG_S s1, THREAD_REG17(\thread)
19 LONG_S s2, THREAD_REG18(\thread)
20 LONG_S s3, THREAD_REG19(\thread)
21 LONG_S s4, THREAD_REG20(\thread)
22 LONG_S s5, THREAD_REG21(\thread)
23 LONG_S s6, THREAD_REG22(\thread)
24 LONG_S s7, THREAD_REG23(\thread)
25 LONG_S sp, THREAD_REG29(\thread)
[all …]
Ddsp.h45 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); \
62 mthi1(tsk->thread.dsp.dspr[0]); \
63 mtlo1(tsk->thread.dsp.dspr[1]); \
64 mthi2(tsk->thread.dsp.dspr[2]); \
[all …]
Dcop2.h19 #define cop2_save(r) octeon_cop2_save(&(r)->thread.cp2)
20 #define cop2_restore(r) octeon_cop2_restore(&(r)->thread.cp2)
30 #define cop2_save(r) nlm_cop2_save(&(r)->thread.cp2)
31 #define cop2_restore(r) nlm_cop2_restore(&(r)->thread.cp2)
Delf.h305 current->thread.abi = &mips_abi; \
307 current->thread.fpu.fcr31 = boot_cpu_data.fpu_csr31; \
318 current->thread.abi = &mips_abi_n32; \
335 current->thread.abi = &mips_abi_32; \
367 current->thread.abi = &mips_abi; \
369 current->thread.fpu.fcr31 = boot_cpu_data.fpu_csr31; \
/linux-4.1.27/tools/perf/tests/
Ddwarf-unwind.c67 static int unwind_thread(struct thread *thread) in unwind_thread() argument
75 if (test__arch_unwind_sample(&sample, thread)) { in unwind_thread()
80 err = unwind__get_entries(unwind_entry, &cnt, thread, in unwind_thread()
102 struct thread *thread = *(struct thread **)p1; in compare() local
105 global_unwind_retval = unwind_thread(thread); in compare()
111 static int krava_3(struct thread *thread) in krava_3() argument
113 struct thread *array[2] = {thread, thread}; in krava_3()
125 _bsearch(array, &thread, 2, sizeof(struct thread **), compare); in krava_3()
130 static int krava_2(struct thread *thread) in krava_2() argument
132 return krava_3(thread); in krava_2()
[all …]
Dhists_common.c91 struct thread *thread; in setup_fake_machine() local
93 thread = machine__findnew_thread(machine, fake_threads[i].pid, in setup_fake_machine()
95 if (thread == NULL) in setup_fake_machine()
98 thread__set_comm(thread, fake_threads[i].comm, 0); in setup_fake_machine()
173 i, thread__comm_str(he->thread), in print_hists_in()
200 i, thread__comm_str(he->thread), he->thread->tid, in print_hists_out()
Dhists_link.c16 struct thread *thread; member
97 fake_common_samples[k].thread = al.thread; in add_hist_entries()
121 fake_samples[i][k].thread = al.thread; in add_hist_entries()
136 struct thread *t, struct map *m, struct symbol *s) in find_sample()
139 if (samples->thread == t && samples->map == m && in find_sample()
170 he->thread, he->ms.map, he->ms.sym)) { in __validate_match()
222 he->thread, he->ms.map, he->ms.sym) && in __validate_link()
225 he->thread, he->ms.map, he->ms.sym)) { in __validate_link()
Dcode-reading.c136 struct thread *thread, struct state *state) in read_object_code() argument
147 thread__find_addr_map(thread, cpumode, MAP__FUNCTION, addr, &al); in read_object_code()
171 ret_len = dso__data_read_offset(al.map->dso, thread->mg->machine, in read_object_code()
249 struct thread *thread; in process_sample_event() local
257 thread = machine__findnew_thread(machine, sample.pid, sample.tid); in process_sample_event()
258 if (!thread) { in process_sample_event()
265 return read_object_code(sample.ip, READLEN, cpumode, thread, state); in process_sample_event()
389 struct thread *thread; in do_test_code_reading() local
457 thread = machine__findnew_thread(machine, pid, pid); in do_test_code_reading()
458 if (!thread) { in do_test_code_reading()
Dtests.h58 struct thread;
61 struct thread *thread);
Dhists_filter.c16 struct thread *thread; member
88 fake_samples[i].thread = al.thread; in add_hist_entries()
164 hists->thread_filter = fake_samples[9].thread; in test__hists_filter()
253 hists->thread_filter = fake_samples[1].thread; in test__hists_filter()
Dthread-mg-share.c13 struct thread *leader; in test__thread_mg_share()
14 struct thread *t1, *t2, *t3; in test__thread_mg_share()
18 struct thread *other, *other_leader; in test__thread_mg_share()
Dmmap-thread-lookup.c184 struct thread *thread; in mmap_events() local
186 thread = machine__findnew_thread(machine, getpid(), td->tid); in mmap_events()
190 thread__find_addr_map(thread, in mmap_events()
/linux-4.1.27/arch/score/kernel/
Dptrace.c180 child->thread.single_step = 1; in user_enable_single_step()
181 child->thread.ss_nextcnt = 1; in user_enable_single_step()
191 child->thread.ss_nextcnt = 2; in user_enable_single_step()
198 child->thread.ss_nextcnt = 2; in user_enable_single_step()
211 child->thread.ss_nextcnt = 2; in user_enable_single_step()
220 child->thread.ss_nextcnt = 2; in user_enable_single_step()
228 if (child->thread.ss_nextcnt == 1) { in user_enable_single_step()
240 child->thread.insn1_type = 0; in user_enable_single_step()
241 child->thread.addr1 = epc; in user_enable_single_step()
243 child->thread.insn1 = (short)epc_insn; in user_enable_single_step()
[all …]
Dasm-offsets.c117 OFFSET(THREAD_REG0, task_struct, thread.reg0); in output_thread_defines()
118 OFFSET(THREAD_REG2, task_struct, thread.reg2); in output_thread_defines()
119 OFFSET(THREAD_REG3, task_struct, thread.reg3); in output_thread_defines()
120 OFFSET(THREAD_REG12, task_struct, thread.reg12); in output_thread_defines()
121 OFFSET(THREAD_REG13, task_struct, thread.reg13); in output_thread_defines()
122 OFFSET(THREAD_REG14, task_struct, thread.reg14); in output_thread_defines()
123 OFFSET(THREAD_REG15, task_struct, thread.reg15); in output_thread_defines()
124 OFFSET(THREAD_REG16, task_struct, thread.reg16); in output_thread_defines()
125 OFFSET(THREAD_REG17, task_struct, thread.reg17); in output_thread_defines()
126 OFFSET(THREAD_REG18, task_struct, thread.reg18); in output_thread_defines()
[all …]
Dprocess.c78 p->thread.reg0 = (unsigned long) childregs; in copy_thread()
81 p->thread.reg12 = usp; in copy_thread()
82 p->thread.reg13 = arg; in copy_thread()
83 p->thread.reg3 = (unsigned long) ret_from_kernel_thread; in copy_thread()
90 p->thread.reg3 = (unsigned long) ret_from_fork; in copy_thread()
93 p->thread.cp0_psr = 0; in copy_thread()
/linux-4.1.27/arch/powerpc/kernel/
Dptrace.c173 return task->thread.regs->msr | task->thread.fpexc_mode; in get_user_msr()
178 task->thread.regs->msr &= ~MSR_DEBUGCHANGE; in set_user_msr()
179 task->thread.regs->msr |= msr & MSR_DEBUGCHANGE; in set_user_msr()
186 *data = task->thread.dscr; in get_user_dscr()
192 task->thread.dscr = dscr; in set_user_dscr()
193 task->thread.dscr_inherit = 1; in set_user_dscr()
214 task->thread.regs->trap = trap & 0xfff0; in set_user_trap()
223 if ((task->thread.regs == NULL) || !data) in ptrace_get_reg()
235 *data = ((unsigned long *)task->thread.regs)[regno]; in ptrace_get_reg()
247 if (task->thread.regs == NULL) in ptrace_put_reg()
[all …]
Dprocess.c86 if (tsk == current && tsk->thread.regs && in giveup_fpu_maybe_transactional()
87 MSR_TM_ACTIVE(tsk->thread.regs->msr) && in giveup_fpu_maybe_transactional()
89 tsk->thread.tm_orig_msr = tsk->thread.regs->msr; in giveup_fpu_maybe_transactional()
104 if (tsk == current && tsk->thread.regs && in giveup_altivec_maybe_transactional()
105 MSR_TM_ACTIVE(tsk->thread.regs->msr) && in giveup_altivec_maybe_transactional()
107 tsk->thread.tm_orig_msr = tsk->thread.regs->msr; in giveup_altivec_maybe_transactional()
126 if (tsk->thread.regs) { in flush_fp_to_thread()
136 if (tsk->thread.regs->msr & MSR_FP) { in flush_fp_to_thread()
160 if (current->thread.regs && (current->thread.regs->msr & MSR_FP)) in enable_kernel_fp()
176 if (current->thread.regs && (current->thread.regs->msr & MSR_VEC)) in enable_kernel_altivec()
[all …]
Dsignal_32.c272 buf[i] = task->thread.TS_FPR(i); in copy_fpr_to_user()
273 buf[i] = task->thread.fp_state.fpscr; in copy_fpr_to_user()
286 task->thread.TS_FPR(i) = buf[i]; in copy_fpr_from_user()
287 task->thread.fp_state.fpscr = buf[i]; in copy_fpr_from_user()
300 buf[i] = task->thread.fp_state.fpr[i][TS_VSRLOWOFFSET]; in copy_vsx_to_user()
313 task->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; in copy_vsx_from_user()
326 buf[i] = task->thread.TS_TRANS_FPR(i); in copy_transact_fpr_to_user()
327 buf[i] = task->thread.transact_fp.fpscr; in copy_transact_fpr_to_user()
340 task->thread.TS_TRANS_FPR(i) = buf[i]; in copy_transact_fpr_from_user()
341 task->thread.transact_fp.fpscr = buf[i]; in copy_transact_fpr_from_user()
[all …]
Dsignal_64.c102 if (current->thread.used_vr) { in setup_sigcontext()
105 err |= __copy_to_user(v_regs, &current->thread.vr_state, in setup_sigcontext()
116 current->thread.vrsave = mfspr(SPRN_VRSAVE); in setup_sigcontext()
117 err |= __put_user(current->thread.vrsave, (u32 __user *)&v_regs[33]); in setup_sigcontext()
136 if (current->thread.used_vsr && ctx_has_vsx_region) { in setup_sigcontext()
208 if (current->thread.used_vr) { in setup_tm_sigcontexts()
211 err |= __copy_to_user(v_regs, &current->thread.vr_state, in setup_tm_sigcontexts()
218 &current->thread.transact_vr, in setup_tm_sigcontexts()
222 &current->thread.vr_state, in setup_tm_sigcontexts()
234 current->thread.vrsave = mfspr(SPRN_VRSAVE); in setup_tm_sigcontexts()
[all …]
Dptrace32.c95 CHECK_FULL_REGS(child->thread.regs); in compat_arch_ptrace()
107 tmp = ((unsigned int *)child->thread.fp_state.fpr) in compat_arch_ptrace()
145 CHECK_FULL_REGS(child->thread.regs); in compat_arch_ptrace()
149 tmp = child->thread.fp_state.fpr[numReg - PT_FPR0][0]; in compat_arch_ptrace()
198 CHECK_FULL_REGS(child->thread.regs); in compat_arch_ptrace()
208 ((unsigned int *)child->thread.fp_state.fpr) in compat_arch_ptrace()
237 CHECK_FULL_REGS(child->thread.regs); in compat_arch_ptrace()
252 tmp = &child->thread.fp_state.fpr[numReg - PT_FPR0][0]; in compat_arch_ptrace()
269 ret = put_user(child->thread.debug.dac1, (u32 __user *)data); in compat_arch_ptrace()
272 (child->thread.hw_brk.address & (~HW_BRK_TYPE_DABR)) | in compat_arch_ptrace()
[all …]
Duprobes.c68 autask->saved_trap_nr = current->thread.trap_nr; in arch_uprobe_pre_xol()
69 current->thread.trap_nr = UPROBE_TRAP_NR; in arch_uprobe_pre_xol()
99 if (t->thread.trap_nr != UPROBE_TRAP_NR) in arch_uprobe_xol_was_trapped()
116 WARN_ON_ONCE(current->thread.trap_nr != UPROBE_TRAP_NR); in arch_uprobe_post_xol()
118 current->thread.trap_nr = utask->autask.saved_trap_nr; in arch_uprobe_post_xol()
171 current->thread.trap_nr = utask->autask.saved_trap_nr; in arch_uprobe_abort_xol()
Dhw_breakpoint.c74 if (current->thread.last_hit_ubp != bp) in arch_install_hw_breakpoint()
114 bp->ctx->task->thread.last_hit_ubp = NULL; in arch_unregister_hw_breakpoint()
196 if (likely(!tsk->thread.last_hit_ubp)) in thread_change_pc()
199 info = counter_arch_bp(tsk->thread.last_hit_ubp); in thread_change_pc()
202 tsk->thread.last_hit_ubp = NULL; in thread_change_pc()
259 current->thread.last_hit_ubp = bp; in hw_breakpoint_handler()
302 bp = current->thread.last_hit_ubp; in single_step_dabr_instruction()
320 current->thread.last_hit_ubp = NULL; in single_step_dabr_instruction()
357 struct thread_struct *t = &tsk->thread; in flush_ptrace_hw_breakpoint()
Dtraps.c263 current->thread.trap_nr = code; in _exception()
381 #define single_stepping(regs) (current->thread.debug.dbcr0 & DBCR0_IC)
382 #define clear_single_step(regs) (current->thread.debug.dbcr0 &= ~DBCR0_IC)
860 code = __parse_fpscr(current->thread.fp_state.fpscr); in parse_fpe()
1089 current->thread.dscr = regs->gpr[rd]; in emulate_instruction()
1090 current->thread.dscr_inherit = 1; in emulate_instruction()
1091 mtspr(SPRN_DSCR, current->thread.dscr); in emulate_instruction()
1120 code = __parse_fpscr(current->thread.fp_state.fpscr); in emulate_math()
1271 if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS)) in alignment_exception()
1395 current->thread.dscr_inherit = 1; in facility_unavailable_exception()
[all …]
Dsignal.c127 if (current->thread.hw_brk.address && in do_signal()
128 current->thread.hw_brk.type) in do_signal()
129 __set_breakpoint(&current->thread.hw_brk); in do_signal()
193 return current->thread.ckpt_regs.gpr[1]; in get_tm_stackpointer()
/linux-4.1.27/arch/parisc/kernel/
Dasm-offsets.c66 DEFINE(TASK_REGS, offsetof(struct task_struct, thread.regs)); in main()
67 DEFINE(TASK_PT_PSW, offsetof(struct task_struct, thread.regs.gr[ 0])); in main()
68 DEFINE(TASK_PT_GR1, offsetof(struct task_struct, thread.regs.gr[ 1])); in main()
69 DEFINE(TASK_PT_GR2, offsetof(struct task_struct, thread.regs.gr[ 2])); in main()
70 DEFINE(TASK_PT_GR3, offsetof(struct task_struct, thread.regs.gr[ 3])); in main()
71 DEFINE(TASK_PT_GR4, offsetof(struct task_struct, thread.regs.gr[ 4])); in main()
72 DEFINE(TASK_PT_GR5, offsetof(struct task_struct, thread.regs.gr[ 5])); in main()
73 DEFINE(TASK_PT_GR6, offsetof(struct task_struct, thread.regs.gr[ 6])); in main()
74 DEFINE(TASK_PT_GR7, offsetof(struct task_struct, thread.regs.gr[ 7])); in main()
75 DEFINE(TASK_PT_GR8, offsetof(struct task_struct, thread.regs.gr[ 8])); in main()
[all …]
/linux-4.1.27/arch/metag/kernel/
Dprocess.c191 memset(&tsk->thread.kernel_context, 0, in copy_thread()
192 sizeof(tsk->thread.kernel_context)); in copy_thread()
194 tsk->thread.kernel_context = __TBISwitchInit(kernel_context, in copy_thread()
211 tsk->thread.int_depth = 2; in copy_thread()
225 tsk->thread.int_depth = 1; in copy_thread()
232 tsk->thread.tls_ptr = in copy_thread()
236 if (tsk->thread.fpu_context) { in copy_thread()
239 ctx = kmemdup(tsk->thread.fpu_context, in copy_thread()
241 tsk->thread.fpu_context = ctx; in copy_thread()
246 if (tsk->thread.dsp_context) { in copy_thread()
[all …]
Dsmp.c71 static int boot_secondary(unsigned int thread, struct task_struct *idle) in boot_secondary() argument
81 core_reg_write(TXUPC_ID, 0, thread, (unsigned int)secondary_startup); in boot_secondary()
82 core_reg_write(TXUPC_ID, 1, thread, 0); in boot_secondary()
88 core_reg_write(TXUCT_ID, TXSTATUS_REGNUM, thread, TXSTATUS_PSTAT_BIT); in boot_secondary()
91 val = core_reg_read(TXUCT_ID, TXPRIVEXT_REGNUM, thread); in boot_secondary()
92 core_reg_write(TXUCT_ID, TXPRIVEXT_REGNUM, thread, val & ~0x80); in boot_secondary()
98 val = core_reg_read(TXUCT_ID, TXENABLE_REGNUM, thread); in boot_secondary()
99 core_reg_write(TXUCT_ID, TXENABLE_REGNUM, thread, val | 0x1); in boot_secondary()
121 static void describe_cachepart_change(unsigned int thread, const char *label, in describe_cachepart_change() argument
132 pr_info("Thread %d: %s partition changed:", thread, label); in describe_cachepart_change()
[all …]
Dcore_reg.c41 void core_reg_write(int unit, int reg, int thread, unsigned int val) in core_reg_write() argument
47 void __iomem *cu_reg = __CU_addr(thread, reg); in core_reg_write()
62 val = UNIT_VAL(unit) | REG_VAL(reg) | THREAD_VAL(thread); in core_reg_write()
83 unsigned int core_reg_read(int unit, int reg, int thread) in core_reg_read() argument
90 void __iomem *cu_reg = __CU_addr(thread, reg); in core_reg_read()
102 val = (UNIT_VAL(unit) | REG_VAL(reg) | THREAD_VAL(thread) | in core_reg_read()
Dtraps.c215 dsp_ctx = current->thread.dsp_context; in nest_interrupts()
221 current->thread.dsp_context = dsp_ctx; in nest_interrupts()
224 current->thread.user_flags |= (D0_8 & 0xffff0000); in nest_interrupts()
241 current->thread.user_flags = savemask; in head_end()
282 BUG_ON(current->thread.int_depth > HARDIRQ_BITS); in head_end()
284 depth = current->thread.int_depth++; in head_end()
290 current->thread.txdefr_failure &= ~(1 << depth); in head_end()
292 current->thread.txdefr_failure |= (1 << depth); in head_end()
328 if (current->thread.fpu_context && in tail_end_sys()
329 current->thread.fpu_context->needs_restore) { in tail_end_sys()
[all …]
/linux-4.1.27/arch/um/kernel/
Dprocess.c82 to->thread.prev_sched = from; in __switch_to()
85 switch_threads(&from->thread.switch_buf, &to->thread.switch_buf); in __switch_to()
88 return current->thread.prev_sched; in __switch_to()
98 tracehook_notify_resume(&current->thread.regs); in interrupt_end()
119 if (current->thread.prev_sched != NULL) in new_thread_handler()
120 schedule_tail(current->thread.prev_sched); in new_thread_handler()
121 current->thread.prev_sched = NULL; in new_thread_handler()
123 fn = current->thread.request.u.thread.proc; in new_thread_handler()
124 arg = current->thread.request.u.thread.arg; in new_thread_handler()
130 userspace(&current->thread.regs.regs); in new_thread_handler()
[all …]
Dtrap.c168 current->thread.arch.faultinfo = fi; in bad_segv()
212 current->thread.segv_regs = container_of(regs, struct pt_regs, regs); in segv()
236 catcher = current->thread.fault_catcher; in segv()
240 current->thread.fault_addr = (void *) address; in segv()
243 else if (current->thread.fault_addr != NULL) in segv()
261 current->thread.arch.faultinfo = fi; in segv()
267 current->thread.arch.faultinfo = fi; in segv()
273 current->thread.segv_regs = NULL; in segv()
304 current->thread.arch.faultinfo = *fi; in relay_signal()
319 if (current->thread.fault_catcher != NULL) in bus_handler()
[all …]
Dsignal.c104 current->thread.singlestep_syscall = in kern_do_signal()
105 is_syscall(PT_REGS_IP(&current->thread.regs)); in kern_do_signal()
118 return kern_do_signal(&current->thread.regs); in do_signal()
/linux-4.1.27/arch/sh/kernel/cpu/sh4/
Dfpu.c88 :"0"((char *)(&tsk->thread.xstate->hardfpu.status)), in save_fpu()
138 :"0" (tsk->thread.xstate), "r" (FPSCR_RCHG) in restore_fpu()
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()
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()
254 fpscr = tsk->thread.xstate->hardfpu.fpscr; in ieee_fpe_handler()
264 | tsk->thread.xstate->hardfpu.fp_regs[n + 1]; in ieee_fpe_handler()
266 | tsk->thread.xstate->hardfpu.fp_regs[m + 1]; in ieee_fpe_handler()
268 tsk->thread.xstate->hardfpu.fp_regs[n] = llx >> 32; in ieee_fpe_handler()
[all …]
/linux-4.1.27/arch/sparc/kernel/
Dsigutil_32.c20 fpsave(&current->thread.float_regs[0], &current->thread.fsr, in save_fpu_state()
21 &current->thread.fpqueue[0], &current->thread.fpqdepth); in save_fpu_state()
28 fpsave(&current->thread.float_regs[0], &current->thread.fsr, in save_fpu_state()
29 &current->thread.fpqueue[0], &current->thread.fpqdepth); in save_fpu_state()
35 &current->thread.float_regs[0], in save_fpu_state()
37 err |= __put_user(current->thread.fsr, &fpu->si_fsr); in save_fpu_state()
38 err |= __put_user(current->thread.fpqdepth, &fpu->si_fpqdepth); in save_fpu_state()
39 if (current->thread.fpqdepth != 0) in save_fpu_state()
41 &current->thread.fpqueue[0], in save_fpu_state()
66 err = __copy_from_user(&current->thread.float_regs[0], &fpu->si_float_regs[0], in restore_fpu_state()
[all …]
Dprocess_32.c196 fpsave(&current->thread.float_regs[0], &current->thread.fsr,
197 &current->thread.fpqueue[0], &current->thread.fpqdepth);
217 fpsave(&current->thread.float_regs[0], &current->thread.fsr,
218 &current->thread.fpqueue[0], &current->thread.fpqdepth);
227 if (current->thread.flags & SPARC_FLAG_KTHREAD) {
228 current->thread.flags &= ~SPARC_FLAG_KTHREAD;
232 current->thread.kregs = (struct pt_regs *)
321 fpsave(&p->thread.float_regs[0], &p->thread.fsr,
322 &p->thread.fpqueue[0], &p->thread.fpqdepth);
343 p->thread.kregs = childregs;
[all …]
Dtraps_32.c195 fpsave(&fptask->thread.float_regs[0], &fptask->thread.fsr, in do_fpd_trap()
196 &fptask->thread.fpqueue[0], &fptask->thread.fpqdepth); in do_fpd_trap()
200 fpload(&current->thread.float_regs[0], &current->thread.fsr); in do_fpd_trap()
211 fpload(&current->thread.float_regs[0], &current->thread.fsr); in do_fpd_trap()
248 fpsave(&fpt->thread.float_regs[0], &fpt->thread.fsr,
249 &fpt->thread.fpqueue[0], &fpt->thread.fpqdepth);
251 printk("Hmm, FP exception, fsr was %016lx\n", fpt->thread.fsr);
254 switch ((fpt->thread.fsr & 0x1c000)) {
279 fpload(&current->thread.float_regs[0], &current->thread.fsr);
302 fsr = fpt->thread.fsr;
Dptrace_32.c53 const struct pt_regs *regs = target->thread.kregs; in genregs32_get()
131 struct pt_regs *regs = target->thread.kregs; in genregs32_set()
215 const unsigned long *fpregs = target->thread.float_regs; in fpregs32_get()
233 &target->thread.fsr, in fpregs32_get()
259 unsigned long *fpregs = target->thread.float_regs; in fpregs32_set()
275 &target->thread.fsr, in fpregs32_set()
343 unsigned long addr2 = current->thread.kregs->u_regs[UREG_I4]; in arch_ptrace()
/linux-4.1.27/arch/m68k/kernel/
Dprocess.c46 struct switch_stack *sw = (struct switch_stack *)tsk->thread.ksp; in thread_saved_pc()
105 current->thread.fs = __USER_DS; in flush_thread()
142 p->thread.ksp = (unsigned long)frame; in copy_thread()
143 p->thread.esp0 = (unsigned long)&frame->regs; in copy_thread()
149 p->thread.fs = get_fs().seg; in copy_thread()
158 p->thread.usp = 0; in copy_thread()
165 p->thread.usp = usp ?: rdusp(); in copy_thread()
173 asm volatile ("fsave %0" : : "m" (p->thread.fpstate[0]) : "memory"); in copy_thread()
175 if (!CPU_IS_060 ? p->thread.fpstate[0] : p->thread.fpstate[2]) { in copy_thread()
182 : "m" (p->thread.fp[0]), in copy_thread()
[all …]
Dptrace.c79 addr = &task->thread.usp; in get_reg()
81 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); in get_reg()
86 long stkadj = *(long *)(task->thread.esp0 + PT_REG(stkadj)); in get_reg()
104 addr = &task->thread.usp; in put_reg()
106 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); in put_reg()
111 long stkadj = *(long *)(task->thread.esp0 + PT_REG(stkadj)); in put_reg()
178 tmp = child->thread.fp[regno - 21]; in arch_ptrace()
219 child->thread.fp[regno - 21] = data; in arch_ptrace()
249 if (copy_to_user(datap, &child->thread.fp, in arch_ptrace()
255 if (copy_from_user(&child->thread.fp, datap, in arch_ptrace()
/linux-4.1.27/arch/s390/kernel/
Dprocess.c55 sf = (struct stack_frame *) (tsk->thread.ksp & PSW_ADDR_INSN); in thread_saved_pc()
84 if (tsk->thread.vxrs) in arch_release_task_struct()
85 kfree(tsk->thread.vxrs); in arch_release_task_struct()
99 p->thread.ksp = (unsigned long) frame; in copy_thread()
101 save_access_regs(&p->thread.acrs[0]); in copy_thread()
103 p->thread.mm_segment = get_fs(); in copy_thread()
105 memset(&p->thread.per_user, 0, sizeof(p->thread.per_user)); in copy_thread()
106 memset(&p->thread.per_event, 0, sizeof(p->thread.per_event)); in copy_thread()
141 p->thread.ri_cb = NULL; in copy_thread()
142 p->thread.ri_signum = 0; in copy_thread()
[all …]
Dptrace.c44 struct thread_struct *thread = &task->thread; in update_cr_regs() local
56 if (task->thread.per_flags & PER_FLAG_NO_TE) in update_cr_regs()
62 if (task->thread.vxrs) in update_cr_regs()
71 if (task->thread.per_flags & PER_FLAG_TE_ABORT_RAND) { in update_cr_regs()
72 if (task->thread.per_flags & in update_cr_regs()
83 new.control = thread->per_user.control; in update_cr_regs()
84 new.start = thread->per_user.start; in update_cr_regs()
85 new.end = thread->per_user.end; in update_cr_regs()
138 memset(&task->thread.per_user, 0, sizeof(task->thread.per_user)); in ptrace_disable()
139 memset(&task->thread.per_event, 0, sizeof(task->thread.per_event)); in ptrace_disable()
[all …]
Druntime_instr.c56 if (!task->thread.ri_cb) in exit_thread_runtime_instr()
59 kfree(task->thread.ri_cb); in exit_thread_runtime_instr()
60 task->thread.ri_signum = 0; in exit_thread_runtime_instr()
61 task->thread.ri_cb = NULL; in exit_thread_runtime_instr()
74 if (!current->thread.ri_cb) in runtime_instr_int_handler()
76 if (current->thread.ri_signum < SIGRTMIN || in runtime_instr_int_handler()
77 current->thread.ri_signum > SIGRTMAX) { in runtime_instr_int_handler()
83 info.si_signo = current->thread.ri_signum; in runtime_instr_int_handler()
92 send_sig_info(current->thread.ri_signum, &info, current); in runtime_instr_int_handler()
113 if (!current->thread.ri_cb) { in SYSCALL_DEFINE2()
[all …]
Dsignal.c107 save_access_regs(current->thread.acrs); in store_sigregs()
108 save_fp_ctl(&current->thread.fp_regs.fpc); in store_sigregs()
109 if (current->thread.vxrs) { in store_sigregs()
112 save_vx_regs(current->thread.vxrs); in store_sigregs()
114 current->thread.fp_regs.fprs[i] = in store_sigregs()
115 *(freg_t *)(current->thread.vxrs + i); in store_sigregs()
117 save_fp_regs(current->thread.fp_regs.fprs); in store_sigregs()
123 restore_access_regs(current->thread.acrs); in load_sigregs()
125 if (current->thread.vxrs) { in load_sigregs()
129 *(freg_t *)(current->thread.vxrs + i) = in load_sigregs()
[all …]
Dcompat_signal.c171 save_access_regs(current->thread.acrs); in store_sigregs()
172 save_fp_ctl(&current->thread.fp_regs.fpc); in store_sigregs()
173 if (current->thread.vxrs) { in store_sigregs()
174 save_vx_regs(current->thread.vxrs); in store_sigregs()
176 current->thread.fp_regs.fprs[i] = in store_sigregs()
177 *(freg_t *)(current->thread.vxrs + i); in store_sigregs()
179 save_fp_regs(current->thread.fp_regs.fprs); in store_sigregs()
187 restore_access_regs(current->thread.acrs); in load_sigregs()
189 if (current->thread.vxrs) { in load_sigregs()
191 *(freg_t *)(current->thread.vxrs + i) = in load_sigregs()
[all …]
Dtraps.c32 address = *(unsigned long *)(current->thread.trap_tdb + 24); in get_trap_ip()
107 (void __force __user *) current->thread.per_event.address; in do_per_trap()
239 save_fp_regs(tsk->thread.fp_regs.fprs); in alloc_vector_registers()
242 *(freg_t *) &vxrs[i] = tsk->thread.fp_regs.fprs[i]; in alloc_vector_registers()
243 tsk->thread.vxrs = vxrs; in alloc_vector_registers()
262 asm volatile("stfpc %0" : "=m" (current->thread.fp_regs.fpc)); in vector_exception()
263 vic = (current->thread.fp_regs.fpc & 0xf00) >> 8; in vector_exception()
300 asm volatile("stfpc %0" : "=m" (current->thread.fp_regs.fpc)); in data_exception()
302 if (MACHINE_HAS_VX && !current->thread.vxrs && in data_exception()
303 (current->thread.fp_regs.fpc & FPC_DXC_MASK) == 0xfe00) { in data_exception()
[all …]
Duprobes.c68 regs->psw.addr >= current->thread.per_user.start && in check_per_event()
69 regs->psw.addr <= current->thread.per_user.end) in check_per_event()
98 if (check_per_event(current->thread.per_event.cause, in arch_uprobe_post_xol()
99 current->thread.per_user.control, regs)) { in arch_uprobe_post_xol()
101 current->thread.per_event.address = utask->vaddr; in arch_uprobe_post_xol()
137 current->thread.per_event.address = current->utask->vaddr; in arch_uprobe_abort_xol()
242 if (!(current->thread.per_user.control & PER_EVENT_STORE)) in sim_stor_event()
244 if ((void *)current->thread.per_user.start > (addr + len)) in sim_stor_event()
246 if ((void *)current->thread.per_user.end < addr) in sim_stor_event()
248 current->thread.per_event.address = regs->psw.addr; in sim_stor_event()
[all …]
/linux-4.1.27/arch/x86/kernel/
Dprocess_64.c145 struct desc_struct *desc = t->thread.tls_array; in set_32bit_tls()
152 return get_desc_base(&t->thread.tls_array[tls]); in read_32bit_tls()
162 p->thread.sp0 = (unsigned long)task_stack_page(p) + THREAD_SIZE; in copy_thread()
164 p->thread.sp = (unsigned long) childregs; in copy_thread()
166 p->thread.io_bitmap_ptr = NULL; in copy_thread()
168 savesegment(gs, p->thread.gsindex); in copy_thread()
169 p->thread.gs = p->thread.gsindex ? 0 : me->thread.gs; in copy_thread()
170 savesegment(fs, p->thread.fsindex); in copy_thread()
171 p->thread.fs = p->thread.fsindex ? 0 : me->thread.fs; in copy_thread()
172 savesegment(es, p->thread.es); in copy_thread()
[all …]
Dprocess_32.c66 return ((unsigned long *)tsk->thread.sp)[3]; in thread_saved_pc()
139 p->thread.sp = (unsigned long) childregs; in copy_thread()
140 p->thread.sp0 = (unsigned long) (childregs+1); in copy_thread()
141 memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps)); in copy_thread()
146 p->thread.ip = (unsigned long) ret_from_kernel_thread; in copy_thread()
156 p->thread.io_bitmap_ptr = NULL; in copy_thread()
164 p->thread.ip = (unsigned long) ret_from_fork; in copy_thread()
167 p->thread.io_bitmap_ptr = NULL; in copy_thread()
172 p->thread.io_bitmap_ptr = kmemdup(tsk->thread.io_bitmap_ptr, in copy_thread()
174 if (!p->thread.io_bitmap_ptr) { in copy_thread()
[all …]
Dvm86_32.c84 #define VFLAGS (*(unsigned short *)&(current->thread.v86flags))
85 #define VEFLAGS (current->thread.v86flags)
141 if (!current->thread.vm86_info) { in save_v86_state()
145 set_flags(regs->pt.flags, VEFLAGS, X86_EFLAGS_VIF | current->thread.v86mask); in save_v86_state()
146 tmp = copy_vm86_regs_to_user(&current->thread.vm86_info->regs, regs); in save_v86_state()
147 tmp += put_user(current->thread.screen_bitmap, &current->thread.vm86_info->screen_bitmap); in save_v86_state()
154 current->thread.sp0 = current->thread.saved_sp0; in save_v86_state()
155 current->thread.sysenter_cs = __KERNEL_CS; in save_v86_state()
156 load_sp0(tss, &current->thread); in save_v86_state()
157 current->thread.saved_sp0 = 0; in save_v86_state()
[all …]
Dptrace.c285 return task->thread.fsindex; in get_segment_reg()
291 return task->thread.gsindex; in get_segment_reg()
297 return task->thread.ds; in get_segment_reg()
303 return task->thread.es; in get_segment_reg()
327 if ((value == FS_TLS_SEL && task->thread.fsindex == 0 && in set_segment_reg()
328 task->thread.fs != 0) || in set_segment_reg()
329 (value == 0 && task->thread.fsindex == FS_TLS_SEL && in set_segment_reg()
330 task->thread.fs == 0)) in set_segment_reg()
332 task->thread.fsindex = value; in set_segment_reg()
334 loadsegment(fs, task->thread.fsindex); in set_segment_reg()
[all …]
Dtraps.c212 tsk->thread.error_code = error_code; in do_trap_no_signal()
213 tsk->thread.trap_nr = trapnr; in do_trap_no_signal()
271 tsk->thread.error_code = error_code; in do_trap()
272 tsk->thread.trap_nr = trapnr; in do_trap()
357 tsk->thread.error_code = error_code; in do_double_fault()
358 tsk->thread.trap_nr = X86_TRAP_DF; in do_double_fault()
399 fpu_save_init(&tsk->thread.fpu); in do_bounds()
400 xsave_buf = &(tsk->thread.fpu.state->xsave); in do_bounds()
475 tsk->thread.error_code = error_code; in do_general_protection()
476 tsk->thread.trap_nr = X86_TRAP_GP; in do_general_protection()
[all …]
Dprocess.c90 dst->thread.fpu_counter = 0; in arch_dup_task_struct()
91 dst->thread.fpu.has_fpu = 0; in arch_dup_task_struct()
92 dst->thread.fpu.state = NULL; in arch_dup_task_struct()
95 int err = fpu_alloc(&dst->thread.fpu); in arch_dup_task_struct()
105 fpu_free(&tsk->thread.fpu); in free_thread_xstate()
128 struct thread_struct *t = &me->thread; in exit_thread()
153 memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array)); in flush_thread()
233 prev = &prev_p->thread; in __switch_to_xtra()
234 next = &next_p->thread; in __switch_to_xtra()
Di387.c277 ret = fpu_alloc(&tsk->thread.fpu); in init_fpu()
281 fpu_finit(&tsk->thread.fpu); in init_fpu()
319 &target->thread.fpu.state->fxsave, 0, -1); in xfpregs_get()
338 &target->thread.fpu.state->fxsave, 0, -1); in xfpregs_set()
343 target->thread.fpu.state->fxsave.mxcsr &= mxcsr_feature_mask; in xfpregs_set()
350 target->thread.fpu.state->xsave.xsave_hdr.xstate_bv |= XSTATE_FPSSE; in xfpregs_set()
369 xsave = &target->thread.fpu.state->xsave; in xstateregs_get()
399 xsave = &target->thread.fpu.state->xsave; in xstateregs_set()
489 struct i387_fxsave_struct *fxsave = &tsk->thread.fpu.state->fxsave; in convert_from_fxsr()
509 env->fos = tsk->thread.ds; in convert_from_fxsr()
[all …]
Dtls.c21 struct thread_struct *t = &current->thread; in get_free_idx()
85 struct thread_struct *t = &p->thread; in set_tls_desc()
103 if (t == &current->thread) in set_tls_desc()
188 &p->thread.tls_array[idx - GDT_ENTRY_TLS_MIN]); in do_get_thread_area()
203 struct thread_struct *t = &target->thread; in regset_tls_active()
224 tls = &target->thread.tls_array[pos]; in regset_tls_get()
Dhw_breakpoint.c349 struct thread_struct *thread = &current->thread; in aout_dump_debugregs() local
352 bp = thread->ptrace_bps[i]; in aout_dump_debugregs()
365 dump->u_debugreg[6] = current->thread.debugreg6; in aout_dump_debugregs()
377 struct thread_struct *t = &tsk->thread; in flush_ptrace_hw_breakpoint()
394 set_debugreg(current->thread.debugreg6, 6); in hw_breakpoint_restore()
442 current->thread.debugreg6 &= ~DR_TRAP_BITS; in hw_breakpoint_handler()
489 if ((current->thread.debugreg6 & DR_TRAP_BITS) || in hw_breakpoint_handler()
Dvsyscall_64.c97 struct thread_struct *thread = &current->thread; in write_ok_or_segv() local
99 thread->error_code = 6; /* user fault, no page, write */ in write_ok_or_segv()
100 thread->cr2 = ptr; in write_ok_or_segv()
101 thread->trap_nr = X86_TRAP_PF; in write_ok_or_segv()
/linux-4.1.27/arch/frv/kernel/
Dprocess.c140 p->thread.frame = childregs; in copy_thread()
141 p->thread.curr = p; in copy_thread()
142 p->thread.sp = (unsigned long) childregs; in copy_thread()
143 p->thread.fp = 0; in copy_thread()
144 p->thread.lr = 0; in copy_thread()
145 p->thread.frame0 = childregs; in copy_thread()
150 p->thread.pc = (unsigned long) ret_from_kernel_thread; in copy_thread()
151 save_user_regs(p->thread.user); in copy_thread()
158 p->thread.pc = (unsigned long) ret_from_fork; in copy_thread()
164 save_user_regs(p->thread.user); in copy_thread()
[all …]
Dptrace.c45 const struct user_int_regs *iregs = &target->thread.user->i; in genregs_get()
65 struct user_int_regs *iregs = &target->thread.user->i; in genregs_set()
110 const struct user_fpmedia_regs *fpregs = &target->thread.user->f; in fpmregs_get()
130 struct user_fpmedia_regs *fpregs = &target->thread.user->f; in fpmregs_set()
205 struct user_context *user = task->thread.user; in get_reg()
219 struct user_context *user = task->thread.user; in put_reg()
243 child->thread.frame0->__status |= REG__STATUS_STEP; in user_enable_single_step()
248 child->thread.frame0->__status &= ~REG__STATUS_STEP; in user_disable_single_step()
323 0, sizeof(child->thread.user->i), in arch_ptrace()
329 0, sizeof(child->thread.user->i), in arch_ptrace()
[all …]
/linux-4.1.27/arch/mn10300/kernel/
Dfpu.c52 info.si_addr = (void *) tsk->thread.uregs->pc; in fpu_exception()
57 fpcr = tsk->thread.fpu_state.fpcr; in fpu_exception()
88 if (tsk->thread.fpu_flags & THREAD_HAS_FPU) { in fpu_setup_sigcontext()
89 fpu_save(&tsk->thread.fpu_state); in fpu_setup_sigcontext()
90 tsk->thread.uregs->epsw &= ~EPSW_FE; in fpu_setup_sigcontext()
91 tsk->thread.fpu_flags &= ~THREAD_HAS_FPU; in fpu_setup_sigcontext()
95 fpu_save(&tsk->thread.fpu_state); in fpu_setup_sigcontext()
96 fpu_state_owner->thread.uregs->epsw &= ~EPSW_FE; in fpu_setup_sigcontext()
108 &tsk->thread.fpu_state, in fpu_setup_sigcontext()
125 if (tsk->thread.fpu_flags & THREAD_HAS_FPU) { in fpu_kill_state()
[all …]
Dprocess.c44 return ((unsigned long *) tsk->thread.sp)[3]; in thread_saved_pc()
159 p->thread.uregs = c_regs; in copy_thread()
161 p->thread.a3 = (unsigned long) c_regs; in copy_thread()
162 p->thread.sp = c_ksp; in copy_thread()
163 p->thread.wchan = p->thread.pc; in copy_thread()
164 p->thread.usp = c_usp; in copy_thread()
172 p->thread.pc = (unsigned long) ret_from_kernel_thread; in copy_thread()
184 p->thread.pc = (unsigned long) ret_from_fork; in copy_thread()
191 return p->thread.wchan; in get_wchan()
/linux-4.1.27/drivers/acpi/acpica/
Dexmutex.c55 struct acpi_thread_state *thread);
71 struct acpi_thread_state *thread = obj_desc->mutex.owner_thread; in acpi_ex_unlink_mutex() local
73 if (!thread) { in acpi_ex_unlink_mutex()
95 thread->acquired_mutex_list = obj_desc->mutex.next; in acpi_ex_unlink_mutex()
114 struct acpi_thread_state *thread) in acpi_ex_link_mutex() argument
118 list_head = thread->acquired_mutex_list; in acpi_ex_link_mutex()
133 thread->acquired_mutex_list = obj_desc; in acpi_ex_link_mutex()
238 if (!walk_state->thread) { in acpi_ex_acquire_mutex()
249 if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) { in acpi_ex_acquire_mutex()
253 walk_state->thread->current_sync_level)); in acpi_ex_acquire_mutex()
[all …]
Ddswstate.c447 *thread) in acpi_ds_get_current_walk_state()
451 if (!thread) { in acpi_ds_get_current_walk_state()
456 thread->walk_state_list)); in acpi_ds_get_current_walk_state()
458 return (thread->walk_state_list); in acpi_ds_get_current_walk_state()
476 struct acpi_thread_state *thread) in acpi_ds_push_walk_state() argument
480 walk_state->next = thread->walk_state_list; in acpi_ds_push_walk_state()
481 thread->walk_state_list = walk_state; in acpi_ds_push_walk_state()
500 struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state *thread) in acpi_ds_pop_walk_state() argument
506 walk_state = thread->walk_state_list; in acpi_ds_pop_walk_state()
512 thread->walk_state_list = walk_state->next; in acpi_ds_pop_walk_state()
[all …]
Dpsparse.c438 struct acpi_thread_state *thread; in acpi_ps_parse_aml() local
455 thread = acpi_ut_create_thread_state(); in acpi_ps_parse_aml()
456 if (!thread) { in acpi_ps_parse_aml()
470 walk_state->thread = thread; in acpi_ps_parse_aml()
477 walk_state->thread->current_sync_level = in acpi_ps_parse_aml()
481 acpi_ds_push_walk_state(walk_state, thread); in acpi_ps_parse_aml()
487 acpi_gbl_current_walk_list = thread; in acpi_ps_parse_aml()
515 acpi_ds_call_control_method(thread, walk_state, in acpi_ps_parse_aml()
526 walk_state = acpi_ds_get_current_walk_state(thread); in acpi_ps_parse_aml()
556 walk_state = acpi_ds_pop_walk_state(thread); in acpi_ps_parse_aml()
[all …]
Ddsmethod.c370 && (walk_state->thread->current_sync_level > in acpi_ds_begin_method_execution()
375 walk_state->thread->current_sync_level)); in acpi_ds_begin_method_execution()
386 (walk_state->thread->thread_id != in acpi_ds_begin_method_execution()
405 walk_state->thread->current_sync_level; in acpi_ds_begin_method_execution()
408 walk_state->thread->thread_id; in acpi_ds_begin_method_execution()
409 walk_state->thread->current_sync_level = in acpi_ds_begin_method_execution()
470 acpi_ds_call_control_method(struct acpi_thread_state *thread, in acpi_ds_call_control_method() argument
511 NULL, obj_desc, thread); in acpi_ds_call_control_method()
721 walk_state->thread->current_sync_level = in acpi_ds_terminate_control_method()
/linux-4.1.27/arch/arm/vfp/
Dvfpmodule.c65 static bool vfp_state_in_hw(unsigned int cpu, struct thread_info *thread) in vfp_state_in_hw() argument
68 if (thread->vfpstate.hard.cpu != cpu) in vfp_state_in_hw()
71 return vfp_current_hw_state[cpu] == &thread->vfpstate; in vfp_state_in_hw()
79 static void vfp_force_reload(unsigned int cpu, struct thread_info *thread) in vfp_force_reload() argument
81 if (vfp_state_in_hw(cpu, thread)) { in vfp_force_reload()
86 thread->vfpstate.hard.cpu = NR_CPUS; in vfp_force_reload()
93 static void vfp_thread_flush(struct thread_info *thread) in vfp_thread_flush() argument
95 union vfp_state *vfp = &thread->vfpstate; in vfp_thread_flush()
121 static void vfp_thread_exit(struct thread_info *thread) in vfp_thread_exit() argument
124 union vfp_state *vfp = &thread->vfpstate; in vfp_thread_exit()
[all …]
Dvfphw.S99 cmp r4, r10 @ this thread owns the hw context?
101 @ For UP, checking that this thread owns the hw context is
106 @ thread wants ownership of the VFP hardware, save the old
131 @ For SMP, if this thread does not own the hw context, then we
133 @ we always save the state when we switch away from a thread.
136 @ This thread has ownership of the current hardware context.
/linux-4.1.27/drivers/dma/
Ddmatest.c176 struct dmatest_thread *thread; in is_threaded_test_run() local
178 list_for_each_entry(thread, &dtc->threads, node) { in is_threaded_test_run()
179 if (!thread->done) in is_threaded_test_run()
402 struct dmatest_thread *thread = data; in dmatest_func() local
428 info = thread->info; in dmatest_func()
430 chan = thread->chan; in dmatest_func()
432 if (thread->type == DMA_MEMCPY) in dmatest_func()
434 else if (thread->type == DMA_XOR) { in dmatest_func()
438 } else if (thread->type == DMA_PQ) { in dmatest_func()
452 thread->srcs = kcalloc(src_cnt+1, sizeof(u8 *), GFP_KERNEL); in dmatest_func()
[all …]
/linux-4.1.27/arch/mips/kernel/
Dasm-offsets.c110 OFFSET(THREAD_REG16, task_struct, thread.reg16); in output_thread_defines()
111 OFFSET(THREAD_REG17, task_struct, thread.reg17); in output_thread_defines()
112 OFFSET(THREAD_REG18, task_struct, thread.reg18); in output_thread_defines()
113 OFFSET(THREAD_REG19, task_struct, thread.reg19); in output_thread_defines()
114 OFFSET(THREAD_REG20, task_struct, thread.reg20); in output_thread_defines()
115 OFFSET(THREAD_REG21, task_struct, thread.reg21); in output_thread_defines()
116 OFFSET(THREAD_REG22, task_struct, thread.reg22); in output_thread_defines()
117 OFFSET(THREAD_REG23, task_struct, thread.reg23); in output_thread_defines()
118 OFFSET(THREAD_REG29, task_struct, thread.reg29); in output_thread_defines()
119 OFFSET(THREAD_REG30, task_struct, thread.reg30); in output_thread_defines()
[all …]
Dptrace32.c128 tmp = child->thread.fpu.fcr31; in compat_arch_ptrace()
152 tmp = child->thread.dsp.dspcontrol; in compat_arch_ptrace()
202 memset(&child->thread.fpu, ~0, in compat_arch_ptrace()
203 sizeof(child->thread.fpu)); in compat_arch_ptrace()
204 child->thread.fpu.fcr31 = 0; in compat_arch_ptrace()
229 child->thread.fpu.fcr31 = data; in compat_arch_ptrace()
248 child->thread.dsp.dspcontrol = data; in compat_arch_ptrace()
Dptrace.c57 memset(&target->thread.fpu.fpr, ~0, sizeof(target->thread.fpu.fpr)); in init_fp_ctx()
91 fcr31 = child->thread.fpu.fcr31; in ptrace_setfcr31()
93 child->thread.fpu.fcr31 = (value & ~mask) | (fcr31 & mask); in ptrace_setfcr31()
166 __put_user(child->thread.fpu.fcr31, data + 64); in ptrace_getfpregs()
221 __put_user(child->thread.watch.mips3264.watchlo[i], in ptrace_get_watch_regs()
223 __put_user(child->thread.watch.mips3264.watchhi[i] & 0xfff, in ptrace_get_watch_regs()
272 child->thread.watch.mips3264.watchlo[i] = lt[i]; in ptrace_set_watch_regs()
274 child->thread.watch.mips3264.watchhi[i] = ht[i]; in ptrace_set_watch_regs()
452 if (sizeof(target->thread.fpu.fpr[i]) == sizeof(elf_fpreg_t)) in fpr_get()
454 &target->thread.fpu, in fpr_get()
[all …]
Dprocess.c127 p->thread.cp0_status = read_c0_status() & ~(ST0_CU2|ST0_CU1); in copy_thread()
130 unsigned long status = p->thread.cp0_status; in copy_thread()
133 p->thread.reg16 = usp; /* fn */ in copy_thread()
134 p->thread.reg17 = kthread_arg; in copy_thread()
135 p->thread.reg29 = childksp; in copy_thread()
136 p->thread.reg31 = (unsigned long) ret_from_kernel_thread; in copy_thread()
155 p->thread.reg29 = (unsigned long) childregs; in copy_thread()
156 p->thread.reg31 = (unsigned long) ret_from_fork; in copy_thread()
422 struct thread_struct *t = &tsk->thread; in thread_saved_pc()
534 sp = task->thread.reg29 + schedule_mfi.frame_size; in get_wchan()
/linux-4.1.27/arch/mn10300/include/asm/
Dfpu.h41 : "i"(THREAD_USING_FPU), "a"(&tsk->thread.fpu_flags) in set_using_fpu()
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)
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()
74 fpu_save(&tsk->thread.fpu_state); in unlazy_fpu()
97 if (tsk->thread.fpu_flags & THREAD_HAS_FPU) { in flush_fpu()
98 tsk->thread.fpu_flags &= ~THREAD_HAS_FPU; in flush_fpu()
[all …]
Dswitch_to.h24 if ((prev)->thread.fpu_flags & THREAD_HAS_FPU) { \
25 (prev)->thread.fpu_flags &= ~THREAD_HAS_FPU; \
26 (prev)->thread.uregs->epsw &= ~EPSW_FE; \
27 fpu_save(&(prev)->thread.fpu_state); \
43 current->thread.wchan = (u_long) __builtin_return_address(0); \
44 (last) = __switch_to(&(prev)->thread, &(next)->thread, (prev)); \
46 current->thread.wchan = 0; \
/linux-4.1.27/arch/s390/include/asm/
Dswitch_to.h130 if (task->thread.vxrs) in save_fp_vx_regs()
131 save_vx_regs(task->thread.vxrs); in save_fp_vx_regs()
133 save_fp_regs(task->thread.fp_regs.fprs); in save_fp_vx_regs()
138 if (task->thread.vxrs) in restore_fp_vx_regs()
139 restore_vx_regs(task->thread.vxrs); in restore_fp_vx_regs()
141 restore_fp_regs(task->thread.fp_regs.fprs); in restore_fp_vx_regs()
160 save_fp_ctl(&prev->thread.fp_regs.fpc); \
162 save_access_regs(&prev->thread.acrs[0]); \
163 save_ri_cb(prev->thread.ri_cb); \
167 restore_fp_ctl(&next->thread.fp_regs.fpc); \
[all …]
/linux-4.1.27/arch/m68k/mm/
Dfault.c25 siginfo.si_signo = current->thread.signo; in send_fault_sig()
26 siginfo.si_code = current->thread.code; in send_fault_sig()
27 siginfo.si_addr = (void *)current->thread.faddr; in send_fault_sig()
196 current->thread.signo = SIGBUS; in do_page_fault()
197 current->thread.faddr = address; in do_page_fault()
201 current->thread.signo = SIGBUS; in do_page_fault()
202 current->thread.code = BUS_ADRERR; in do_page_fault()
203 current->thread.faddr = address; in do_page_fault()
207 current->thread.signo = SIGSEGV; in do_page_fault()
208 current->thread.code = SEGV_MAPERR; in do_page_fault()
[all …]
/linux-4.1.27/arch/x86/include/asm/
Dfpu-internal.h89 tsk->thread.fpu.last_cpu = ~0; in task_disable_lazy_fpu_restore()
95 cpu == new->thread.fpu.last_cpu; in fpu_lazy_restore()
305 return fpu_save_init(&tsk->thread.fpu); in __save_init_fpu()
330 : : [addr] "m" (tsk->thread.fpu.has_fpu)); in restore_fpu_checking()
333 return fpu_restore_checking(&tsk->thread.fpu); in restore_fpu_checking()
343 return tsk->thread.fpu.has_fpu; in __thread_has_fpu()
349 tsk->thread.fpu.has_fpu = 0; in __thread_clear_has_fpu()
356 tsk->thread.fpu.has_fpu = 1; in __thread_set_has_fpu()
387 tsk->thread.fpu_counter = 0; in drop_fpu()
444 (use_eager_fpu() || new->thread.fpu_counter > 5); in switch_fpu_prepare()
[all …]
Dswitch_to.h55 : [prev_sp] "=m" (prev->thread.sp), \
56 [prev_ip] "=m" (prev->thread.ip), \
66 : [next_sp] "m" (next->thread.sp), \
67 [next_ip] "m" (next->thread.ip), \
123 [threadrsp] "i" (offsetof(struct task_struct, thread.sp)), \
/linux-4.1.27/drivers/android/
Dbinder.c1318 struct binder_thread *thread, in binder_transaction() argument
1336 e->from_thread = thread->pid; in binder_transaction()
1342 in_reply_to = thread->transaction_stack; in binder_transaction()
1345 proc->pid, thread->pid); in binder_transaction()
1350 if (in_reply_to->to_thread != thread) { in binder_transaction()
1352 proc->pid, thread->pid, in_reply_to->debug_id, in binder_transaction()
1361 thread->transaction_stack = in_reply_to->to_parent; in binder_transaction()
1369 proc->pid, thread->pid, in binder_transaction()
1386 proc->pid, thread->pid); in binder_transaction()
1409 if (!(tr->flags & TF_ONE_WAY) && thread->transaction_stack) { in binder_transaction()
[all …]
/linux-4.1.27/arch/sh/kernel/
Dprocess.c28 if (src->thread.xstate) { in arch_dup_task_struct()
29 dst->thread.xstate = kmem_cache_alloc(task_xstate_cachep, in arch_dup_task_struct()
31 if (!dst->thread.xstate) in arch_dup_task_struct()
33 memcpy(dst->thread.xstate, src->thread.xstate, xstate_size); in arch_dup_task_struct()
41 if (tsk->thread.xstate) { in free_thread_xstate()
42 kmem_cache_free(task_xstate_cachep, tsk->thread.xstate); in free_thread_xstate()
43 tsk->thread.xstate = NULL; in free_thread_xstate()
Dprocess_32.c140 p->thread.dsp_status = tsk->thread.dsp_status; in copy_thread()
144 memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps)); in copy_thread()
147 p->thread.sp = (unsigned long) childregs; in copy_thread()
150 p->thread.pc = (unsigned long) ret_from_kernel_thread; in copy_thread()
159 p->thread.fpu_counter = 0; in copy_thread()
172 p->thread.pc = (unsigned long) ret_from_fork; in copy_thread()
183 struct thread_struct *next_t = &next->thread; in __switch_to()
192 if (next->thread.fpu_counter > 5) in __switch_to()
210 if (next->thread.fpu_counter > 5) in __switch_to()
230 unsigned long schedule_frame = (unsigned long)p->thread.sp; in get_wchan()
Dtraps_64.c355 current->thread.xstate->hardfpu.fp_regs[destreg] = buflo; in misaligned_fpu_load()
359 current->thread.xstate->hardfpu.fp_regs[destreg] = buflo; in misaligned_fpu_load()
360 current->thread.xstate->hardfpu.fp_regs[destreg+1] = bufhi; in misaligned_fpu_load()
363 current->thread.xstate->hardfpu.fp_regs[destreg] = bufhi; in misaligned_fpu_load()
364 current->thread.xstate->hardfpu.fp_regs[destreg+1] = buflo; in misaligned_fpu_load()
366 current->thread.xstate->hardfpu.fp_regs[destreg] = buflo; in misaligned_fpu_load()
367 current->thread.xstate->hardfpu.fp_regs[destreg+1] = bufhi; in misaligned_fpu_load()
422 buflo = current->thread.xstate->hardfpu.fp_regs[srcreg]; in misaligned_fpu_store()
426 buflo = current->thread.xstate->hardfpu.fp_regs[srcreg]; in misaligned_fpu_store()
427 bufhi = current->thread.xstate->hardfpu.fp_regs[srcreg+1]; in misaligned_fpu_store()
[all …]
Dptrace_32.c81 struct thread_struct *thread = &tsk->thread; in set_single_step() local
85 bp = thread->ptrace_bps[0]; in set_single_step()
98 thread->ptrace_bps[0] = bp; in set_single_step()
199 &target->thread.xstate->hardfpu, 0, -1); in fpregs_get()
202 &target->thread.xstate->softfpu, 0, -1); in fpregs_get()
220 &target->thread.xstate->hardfpu, 0, -1); in fpregs_set()
223 &target->thread.xstate->softfpu, 0, -1); in fpregs_set()
240 (struct pt_dspregs *)&target->thread.dsp_status.dsp_regs; in dspregs_get()
258 (struct pt_dspregs *)&target->thread.dsp_status.dsp_regs; in dspregs_set()
401 tmp = ((unsigned long *)child->thread.xstate) in arch_ptrace()
[all …]
Dprocess_64.c282 tsk->thread.kregs = regs; in show_regs()
332 if(current->thread.kregs==&fake_swapper_regs) { in flush_thread()
333 current->thread.kregs = in flush_thread()
335 current->thread.uregs = current->thread.kregs; in flush_thread()
361 memcpy(fpu, &tsk->thread.xstate->hardfpu, sizeof(*fpu)); in dump_fpu()
391 p->thread.sp = (unsigned long) childregs; in copy_thread()
399 p->thread.pc = (unsigned long) ret_from_kernel_thread; in copy_thread()
412 p->thread.uregs = childregs; in copy_thread()
417 p->thread.pc = (unsigned long) ret_from_fork; in copy_thread()
451 sh64_switch_to_fp = (long) p->thread.sp; in get_wchan()
Dptrace_64.c62 stack = (unsigned char *)(task->thread.uregs); in get_stack_long()
91 tmp = ((long *)task->thread.xstate)[addr / sizeof(unsigned long)]; in get_fpu_long()
103 stack = (unsigned char *)(task->thread.uregs); in put_stack_long()
126 ((long *)task->thread.xstate)[addr / sizeof(unsigned long)] = data; in put_fpu_long()
132 struct pt_regs *regs = child->thread.uregs; in user_enable_single_step()
141 struct pt_regs *regs = child->thread.uregs; in user_disable_single_step()
228 &target->thread.xstate->hardfpu, 0, -1); in fpregs_get()
245 &target->thread.xstate->hardfpu, 0, -1); in fpregs_set()
/linux-4.1.27/arch/arm/kernel/
Dprocess.c184 struct thread_info *thread = current_thread_info(); in flush_thread() local
189 memset(thread->used_cp, 0, sizeof(thread->used_cp)); in flush_thread()
190 memset(&tsk->thread.debug, 0, sizeof(struct debug_info)); in flush_thread()
191 memset(&thread->fpstate, 0, sizeof(union fp_state)); in flush_thread()
195 thread_notify(THREAD_NOTIFY_FLUSH, thread); in flush_thread()
208 struct thread_info *thread = task_thread_info(p); in copy_thread() local
211 memset(&thread->cpu_context, 0, sizeof(struct cpu_context_save)); in copy_thread()
220 thread->cpu_context.r4 = stk_sz; in copy_thread()
221 thread->cpu_context.r5 = stack_start; in copy_thread()
224 thread->cpu_context.pc = (unsigned long)ret_from_fork; in copy_thread()
[all …]
Dptrace.c305 struct thread_info *thread = task_thread_info(tsk); in ptrace_getwmmxregs() local
307 if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) in ptrace_getwmmxregs()
309 iwmmxt_task_disable(thread); /* force it to ram */ in ptrace_getwmmxregs()
310 return copy_to_user(ufp, &thread->fpstate.iwmmxt, IWMMXT_SIZE) in ptrace_getwmmxregs()
319 struct thread_info *thread = task_thread_info(tsk); in ptrace_setwmmxregs() local
321 if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) in ptrace_setwmmxregs()
323 iwmmxt_task_release(thread); /* force a reload */ in ptrace_setwmmxregs()
324 return copy_from_user(&thread->fpstate.iwmmxt, ufp, IWMMXT_SIZE) in ptrace_setwmmxregs()
336 struct thread_info *thread = task_thread_info(tsk); in ptrace_getcrunchregs() local
338 crunch_task_disable(thread); /* force it to ram */ in ptrace_getcrunchregs()
[all …]
Dxscale-cp0.c35 struct thread_info *thread = t; in dsp_do() local
39 thread->cpu_context.extra[0] = 0; in dsp_do()
40 thread->cpu_context.extra[1] = 0; in dsp_do()
45 dsp_load_state(thread->cpu_context.extra); in dsp_do()
60 struct thread_info *thread = t; in iwmmxt_do() local
73 iwmmxt_task_release(thread); in iwmmxt_do()
77 iwmmxt_task_switch(thread); in iwmmxt_do()
Dpj4-cp0.c24 struct thread_info *thread = t; in iwmmxt_do() local
37 iwmmxt_task_release(thread); in iwmmxt_do()
41 iwmmxt_task_switch(thread); in iwmmxt_do()
/linux-4.1.27/arch/unicore32/kernel/
Dprocess.c213 struct thread_info *thread = current_thread_info(); in flush_thread() local
216 memset(thread->used_cp, 0, sizeof(thread->used_cp)); in flush_thread()
217 memset(&tsk->thread.debug, 0, sizeof(struct debug_info)); in flush_thread()
219 memset(&thread->fpstate, 0, sizeof(struct fp_state)); in flush_thread()
234 struct thread_info *thread = task_thread_info(p); in copy_thread() local
237 memset(&thread->cpu_context, 0, sizeof(struct cpu_context_save)); in copy_thread()
238 thread->cpu_context.sp = (unsigned long)childregs; in copy_thread()
240 thread->cpu_context.pc = (unsigned long)ret_from_kernel_thread; in copy_thread()
241 thread->cpu_context.r4 = stack_start; in copy_thread()
242 thread->cpu_context.r5 = stk_sz; in copy_thread()
[all …]
Dtraps.c179 static int __die(const char *str, int err, struct thread_info *thread, in __die() argument
182 struct task_struct *tsk = thread->task; in __die()
190 ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, \ in __die()
198 TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), thread + 1); in __die()
217 struct thread_info *thread = current_thread_info(); in die() local
225 ret = __die(str, err, thread, regs); in die()
244 current->thread.error_code = err; in uc32_notify_die()
245 current->thread.trap_no = trap; in uc32_notify_die()
/linux-4.1.27/arch/powerpc/include/asm/
Dswitch_to.h90 t->thread.ebbrr = 0; in clear_task_ebb()
91 t->thread.ebbhr = 0; in clear_task_ebb()
92 t->thread.bescr = 0; in clear_task_ebb()
93 t->thread.mmcr2 = 0; in clear_task_ebb()
94 t->thread.mmcr0 = 0; in clear_task_ebb()
95 t->thread.siar = 0; in clear_task_ebb()
96 t->thread.sdar = 0; in clear_task_ebb()
97 t->thread.sier = 0; in clear_task_ebb()
98 t->thread.used_ebb = 0; in clear_task_ebb()
Dtm.h13 extern void do_load_up_transact_fpu(struct thread_struct *thread);
14 extern void do_load_up_transact_altivec(struct thread_struct *thread);
18 extern void tm_reclaim(struct thread_struct *thread,
21 extern void tm_recheckpoint(struct thread_struct *thread,
24 extern void tm_save_sprs(struct thread_struct *thread);
25 extern void tm_restore_sprs(struct thread_struct *thread);
Dprocessor.h352 ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0)
354 #define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.regs)
358 #define KSTK_EIP(tsk) ((tsk)->thread.regs? (tsk)->thread.regs->nip: 0)
359 #define KSTK_ESP(tsk) ((tsk)->thread.regs? (tsk)->thread.regs->gpr[1]: 0)
/linux-4.1.27/drivers/gpu/drm/amd/amdkfd/
Dkfd_process.c59 static struct kfd_process *find_process(const struct task_struct *thread);
60 static struct kfd_process *create_process(const struct task_struct *thread);
77 struct kfd_process *kfd_create_process(const struct task_struct *thread) in kfd_create_process() argument
83 if (thread->mm == NULL) in kfd_create_process()
87 if (thread->group_leader->mm != thread->mm) in kfd_create_process()
91 down_write(&thread->mm->mmap_sem); in kfd_create_process()
101 process = find_process(thread); in kfd_create_process()
106 process = create_process(thread); in kfd_create_process()
110 up_write(&thread->mm->mmap_sem); in kfd_create_process()
115 struct kfd_process *kfd_get_process(const struct task_struct *thread) in kfd_get_process() argument
[all …]
/linux-4.1.27/arch/sh/kernel/cpu/sh2a/
Dfpu.c55 : "0" ((char *)(&tsk->thread.xstate->hardfpu.status)), in save_fpu()
87 : "0" (tsk->thread.xstate), "r" (FPSCR_RCHG) in restore_fpu()
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()
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()
478 fpscr = tsk->thread.xstate->hardfpu.fpscr; in ieee_fpe_handler()
488 | tsk->thread.xstate->hardfpu.fp_regs[n+1]; in ieee_fpe_handler()
490 | tsk->thread.xstate->hardfpu.fp_regs[m+1]; in ieee_fpe_handler()
495 tsk->thread.xstate->hardfpu.fp_regs[n] = llx >> 32; in ieee_fpe_handler()
[all …]
/linux-4.1.27/arch/sh/include/asm/
Dswitch_to_32.h7 (!!(tsk->thread.dsp_status.status & SR_DSP))
12 (u32 *)&tsk->thread.dsp_status; \
35 (u32 *)&tsk->thread.dsp_status + 14; \
82 __ts1 = (u32 *)&prev->thread.sp; \
83 __ts2 = (u32 *)&prev->thread.pc; \
86 __ts6 = (u32 *)&next->thread.sp; \
87 __ts7 = next->thread.pc; \
Dswitch_to_64.h27 struct pt_regs *regs = next->thread.uregs; \
30 last = sh64_switch_to(prev, &prev->thread, next, \
31 &next->thread); \
Dprocessor_64.h226 #define thread_saved_pc(tsk) (tsk->thread.pc)
230 #define KSTK_EIP(tsk) ((tsk)->thread.pc)
231 #define KSTK_ESP(tsk) ((tsk)->thread.sp)
/linux-4.1.27/arch/powerpc/math-emu/
Dmath.c331 op0 = (void *)&current->thread.TS_FPR((insn >> 21) & 0x1f); in do_mathemu()
332 op1 = (void *)&current->thread.TS_FPR((insn >> 16) & 0x1f); in do_mathemu()
333 op2 = (void *)&current->thread.TS_FPR((insn >> 11) & 0x1f); in do_mathemu()
337 op0 = (void *)&current->thread.TS_FPR((insn >> 21) & 0x1f); in do_mathemu()
338 op1 = (void *)&current->thread.TS_FPR((insn >> 16) & 0x1f); in do_mathemu()
339 op2 = (void *)&current->thread.TS_FPR((insn >> 6) & 0x1f); in do_mathemu()
343 op0 = (void *)&current->thread.TS_FPR((insn >> 21) & 0x1f); in do_mathemu()
344 op1 = (void *)&current->thread.TS_FPR((insn >> 16) & 0x1f); in do_mathemu()
345 op2 = (void *)&current->thread.TS_FPR((insn >> 11) & 0x1f); in do_mathemu()
346 op3 = (void *)&current->thread.TS_FPR((insn >> 6) & 0x1f); in do_mathemu()
[all …]
Dmath_efp.c203 vc.wp[0] = current->thread.evr[fc]; in do_spe_mathemu()
205 va.wp[0] = current->thread.evr[fa]; in do_spe_mathemu()
207 vb.wp[0] = current->thread.evr[fb]; in do_spe_mathemu()
680 &= ~(FP_EX_INVALID | FP_EX_UNDERFLOW) | current->thread.spefscr_last; in do_spe_mathemu()
683 current->thread.spefscr_last = __FPU_FPSCR; in do_spe_mathemu()
685 current->thread.evr[fc] = vc.wp[0]; in do_spe_mathemu()
695 if (current->thread.fpexc_mode & PR_FP_EXC_SW_ENABLE) { in do_spe_mathemu()
697 && (current->thread.fpexc_mode & PR_FP_EXC_DIV)) in do_spe_mathemu()
700 && (current->thread.fpexc_mode & PR_FP_EXC_OVF)) in do_spe_mathemu()
703 && (current->thread.fpexc_mode & PR_FP_EXC_UND)) in do_spe_mathemu()
[all …]
/linux-4.1.27/drivers/media/pci/saa7134/
Dsaa7134-tvaudio.c318 if (dev->thread.scan1 == dev->thread.scan2 && in tvaudio_sleep()
328 return dev->thread.scan1 != dev->thread.scan2; in tvaudio_sleep()
491 dev->thread.scan1 = dev->thread.scan2; in tvaudio_thread()
492 dprintk("tvaudio thread scan start [%d]\n",dev->thread.scan1); in tvaudio_thread()
531 if (dev->thread.scan1 != dev->thread.scan2) in tvaudio_thread()
607 if (UNSET == dev->thread.mode) { in tvaudio_thread()
611 mode = dev->thread.mode; in tvaudio_thread()
621 dev->thread.stopped = 1; in tvaudio_thread()
788 dev->thread.scan1 = dev->thread.scan2; in tvaudio_thread_ddep()
789 dprintk("tvaudio thread scan start [%d]\n",dev->thread.scan1); in tvaudio_thread_ddep()
[all …]
/linux-4.1.27/arch/c6x/kernel/
Dprocess.c107 current->thread.usp = usp; in start_thread()
125 p->thread.pc = (unsigned long) ret_from_kernel_thread; in copy_thread()
133 p->thread.pc = (unsigned long) ret_from_fork; in copy_thread()
137 p->thread.usp = childregs->sp; in copy_thread()
139 p->thread.wchan = p->thread.pc; in copy_thread()
156 return p->thread.wchan; in get_wchan()
/linux-4.1.27/arch/sparc/include/asm/
Dswitch_to_32.h20 fpsave(&(prv)->thread.float_regs[0], &(prv)->thread.fsr, \
21 &(prv)->thread.fpqueue[0], &(prv)->thread.fpqdepth); \
23 (prv)->thread.kregs->psr &= ~PSR_EF; \
33 (nxt)->thread.kregs->psr&=~PSR_EF; \
Dsfp-machine_32.h185 #define FP_ROUNDMODE ((current->thread.fsr >> 30) & 0x3)
187 #define FP_ROUNDMODE ((last_task_used_math->thread.fsr >> 30) & 0x3)
201 #define FP_INHIBIT_RESULTS ((current->thread.fsr >> 23) & _fex)
203 #define FP_INHIBIT_RESULTS ((last_task_used_math->thread.fsr >> 23) & _fex)
207 #define FP_TRAPPING_EXCEPTIONS ((current->thread.fsr >> 23) & 0x1f)
209 #define FP_TRAPPING_EXCEPTIONS ((last_task_used_math->thread.fsr >> 23) & 0x1f)
Dprocessor_32.h112 #define task_pt_regs(tsk) ((tsk)->thread.kregs)
113 #define KSTK_EIP(tsk) ((tsk)->thread.kregs->pc)
114 #define KSTK_ESP(tsk) ((tsk)->thread.kregs->u_regs[UREG_FP])
/linux-4.1.27/arch/arm64/kernel/
Dprocess.c221 current->thread.tp_value = 0; in tls_thread_flush()
257 unsigned long tls = p->thread.tp_value; in copy_thread()
259 memset(&p->thread.cpu_context, 0, sizeof(struct cpu_context)); in copy_thread()
289 p->thread.cpu_context.x19 = stack_start; in copy_thread()
290 p->thread.cpu_context.x20 = stk_sz; in copy_thread()
292 p->thread.cpu_context.pc = (unsigned long)ret_from_fork; in copy_thread()
293 p->thread.cpu_context.sp = (unsigned long)childregs; in copy_thread()
294 p->thread.tp_value = tls; in copy_thread()
307 current->thread.tp_value = tpidr; in tls_thread_switch()
312 tpidrro = next->thread.tp_value; in tls_thread_switch()
[all …]
Dfpsimd.c135 fpsimd_save_state(&current->thread.fpsimd_state); in fpsimd_thread_switch()
145 struct fpsimd_state *st = &next->thread.fpsimd_state; in fpsimd_thread_switch()
159 memset(&current->thread.fpsimd_state, 0, sizeof(struct fpsimd_state)); in fpsimd_flush_thread()
172 fpsimd_save_state(&current->thread.fpsimd_state); in fpsimd_preserve_current_state()
185 struct fpsimd_state *st = &current->thread.fpsimd_state; in fpsimd_restore_current_state()
204 struct fpsimd_state *st = &current->thread.fpsimd_state; in fpsimd_update_current_state()
217 t->thread.fpsimd_state.cpu = NR_CPUS; in fpsimd_flush_task_state()
246 fpsimd_save_state(&current->thread.fpsimd_state); in kernel_neon_begin_partial()
273 fpsimd_save_state(&current->thread.fpsimd_state); in fpsimd_cpu_pm_notifier()
Dtraps.c188 static int __die(const char *str, int err, struct thread_info *thread, in __die() argument
191 struct task_struct *tsk = thread->task; in __die()
206 TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), thread + 1); in __die()
225 struct thread_info *thread = current_thread_info(); in die() local
233 ret = __die(str, err, thread, regs); in die()
235 if (regs && kexec_should_crash(thread->task)) in die()
255 current->thread.fault_address = 0; in arm64_notify_die()
256 current->thread.fault_code = err; in arm64_notify_die()
/linux-4.1.27/tools/perf/arch/arm/tests/
Ddwarf-unwind.c12 struct thread *thread, u64 *regs) in sample_ustack() argument
27 map = map_groups__find(thread->mg, MAP__VARIABLE, (u64) sp); in sample_ustack()
44 struct thread *thread) in test__arch_unwind_sample() argument
60 return sample_ustack(sample, thread, buf); in test__arch_unwind_sample()
/linux-4.1.27/tools/perf/arch/x86/tests/
Ddwarf-unwind.c12 struct thread *thread, u64 *regs) in sample_ustack() argument
27 map = map_groups__find(thread->mg, MAP__VARIABLE, (u64) sp); in sample_ustack()
44 struct thread *thread) in test__arch_unwind_sample() argument
60 return sample_ustack(sample, thread, buf); in test__arch_unwind_sample()
/linux-4.1.27/drivers/staging/lustre/lustre/ptlrpc/
Dsec_gc.c166 struct ptlrpc_thread *thread = (struct ptlrpc_thread *) arg; in sec_gc_main() local
172 thread_set_flags(thread, SVC_RUNNING); in sec_gc_main()
173 wake_up(&thread->t_ctl_waitq); in sec_gc_main()
178 thread_clear_flags(thread, SVC_SIGNAL); in sec_gc_main()
205 l_wait_event(thread->t_ctl_waitq, in sec_gc_main()
206 thread_is_stopping(thread) || in sec_gc_main()
207 thread_is_signal(thread), in sec_gc_main()
210 if (thread_test_and_clear_flags(thread, SVC_STOPPING)) in sec_gc_main()
214 thread_set_flags(thread, SVC_STOPPED); in sec_gc_main()
215 wake_up(&thread->t_ctl_waitq); in sec_gc_main()
Dservice.c1727 struct ptlrpc_thread *thread) in ptlrpc_server_handle_req_in() argument
1845 req->rq_svc_thread = thread; in ptlrpc_server_handle_req_in()
1869 struct ptlrpc_thread *thread) in ptlrpc_server_handle_request() argument
1917 request->rq_session.lc_thread = thread; in ptlrpc_server_handle_request()
1923 request->rq_svc_thread = thread; in ptlrpc_server_handle_request()
1924 if (thread) in ptlrpc_server_handle_request()
2190 ptlrpc_thread_stopping(struct ptlrpc_thread *thread) in ptlrpc_thread_stopping() argument
2192 return thread_is_stopping(thread) || in ptlrpc_thread_stopping()
2193 thread->t_svcpt->scp_service->srv_is_stopping; in ptlrpc_thread_stopping()
2222 struct ptlrpc_thread *thread) in ptlrpc_wait_event() argument
[all …]
Dpinger.c237 struct ptlrpc_thread *thread = (struct ptlrpc_thread *)arg; in ptlrpc_pinger_main() local
240 thread_set_flags(thread, SVC_RUNNING); in ptlrpc_pinger_main()
241 wake_up(&thread->t_ctl_waitq); in ptlrpc_pinger_main()
288 l_wait_event(thread->t_ctl_waitq, in ptlrpc_pinger_main()
289 thread_is_stopping(thread) || in ptlrpc_pinger_main()
290 thread_is_event(thread), in ptlrpc_pinger_main()
292 if (thread_test_and_clear_flags(thread, SVC_STOPPING)) { in ptlrpc_pinger_main()
296 thread_test_and_clear_flags(thread, SVC_EVENT); in ptlrpc_pinger_main()
301 thread_set_flags(thread, SVC_STOPPED); in ptlrpc_pinger_main()
302 wake_up(&thread->t_ctl_waitq); in ptlrpc_pinger_main()
/linux-4.1.27/arch/sh/kernel/cpu/
Dfpu.c18 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()
47 tsk->thread.fpu_counter++; in __fpu_state_restore()
/linux-4.1.27/arch/x86/um/
Dsyscalls_64.c34 ret = restore_registers(pid, &current->thread.regs.regs); in arch_prctl()
57 current->thread.arch.fs = (unsigned long) ptr; in arch_prctl()
58 ret = save_registers(pid, &current->thread.regs.regs); in arch_prctl()
61 ret = save_registers(pid, &current->thread.regs.regs); in arch_prctl()
81 if ((to->thread.arch.fs == 0) || (to->mm == NULL)) in arch_switch_to()
84 arch_prctl(to, ARCH_SET_FS, (void __user *) to->thread.arch.fs); in arch_switch_to()
Dptrace_32.c108 child->thread.regs.regs.gp[HOST_EFLAGS] |= value; in putreg()
111 child->thread.regs.regs.syscall = value; in putreg()
116 child->thread.regs.regs.gp[reg_offsets[regno]] = value; in putreg()
133 child->thread.arch.debugregs[addr] = data; in poke_user()
146 return child->thread.regs.regs.syscall; in getreg()
169 return mask & child->thread.regs.regs.gp[reg_offsets[regno]]; in getreg()
188 tmp = child->thread.arch.debugregs[addr]; in peek_user()
Dtls_32.c64 struct thread_struct *t = &task->thread; in get_free_idx()
98 &to->thread.arch.tls_array[idx - GDT_ENTRY_TLS_MIN]; in load_TLS()
138 &task->thread.arch.tls_array[i - GDT_ENTRY_TLS_MIN]; in needs_TLS_update()
162 &task->thread.arch.tls_array[i - GDT_ENTRY_TLS_MIN]; in clear_flushed_tls()
205 struct thread_struct *t = &task->thread; in set_tls_entry()
223 (void __user *) UPT_SI(&new->thread.regs.regs), in arch_copy_tls()
242 struct thread_struct *t = &task->thread; in get_tls_entry()
Dtls_64.c14 t->thread.arch.fs = t->thread.regs.regs.gp[R8 / sizeof(long)]; in arch_copy_tls()
Dptrace_64.c102 child->thread.regs.regs.gp[HOST_EFLAGS] |= value; in putreg()
109 child->thread.regs.regs.gp[reg_offsets[regno >> 3]] = value; in putreg()
126 child->thread.arch.debugregs[addr] = data; in poke_user()
173 return mask & child->thread.regs.regs.gp[reg_offsets[regno >> 3]]; in getreg()
191 tmp = child->thread.arch.debugregs[addr]; in peek_user()
/linux-4.1.27/arch/um/kernel/skas/
Dprocess.c40 init_task.thread.request.u.thread.proc = start_kernel_proc; in start_uml()
41 init_task.thread.request.u.thread.arg = NULL; in start_uml()
43 &init_task.thread.switch_buf); in start_uml()
/linux-4.1.27/arch/arm/mach-ep93xx/
Dcrunch.c26 void crunch_task_release(struct thread_info *thread) in crunch_task_release() argument
29 if (crunch_owner == &thread->crunchstate) in crunch_task_release()
41 struct thread_info *thread = (struct thread_info *)t; in crunch_do() local
45 crunch_state = &thread->crunchstate; in crunch_do()
57 crunch_task_release(thread); in crunch_do()
/linux-4.1.27/drivers/staging/lustre/lustre/llite/
Dstatahead.c976 struct ptlrpc_thread *thread = &sai->sai_agl_thread; in ll_agl_thread() local
979 thread->t_pid = current_pid(); in ll_agl_thread()
986 if (thread_is_init(thread)) in ll_agl_thread()
990 thread_set_flags(thread, SVC_RUNNING); in ll_agl_thread()
992 wake_up(&thread->t_ctl_waitq); in ll_agl_thread()
995 l_wait_event(thread->t_ctl_waitq, in ll_agl_thread()
997 !thread_is_running(thread), in ll_agl_thread()
1000 if (!thread_is_running(thread)) in ll_agl_thread()
1026 thread_set_flags(thread, SVC_STOPPED); in ll_agl_thread()
1028 wake_up(&thread->t_ctl_waitq); in ll_agl_thread()
[all …]
/linux-4.1.27/arch/tile/kernel/
Dprocess.c123 p->thread.ksp = ksp; in copy_thread()
126 p->thread.creator_pid = current->pid; in copy_thread()
136 p->thread.pc = (unsigned long) ret_from_kernel_thread; in copy_thread()
144 p->thread.pc = (unsigned long) ret_from_fork; in copy_thread()
172 p->thread.usp0 = childregs->sp; in copy_thread()
187 memset(&p->thread.tile_dma_state, 0, sizeof(struct tile_dma_state)); in copy_thread()
188 memset(&p->thread.dma_async_tlb, 0, sizeof(struct async_tlb)); in copy_thread()
192 p->thread.proc_status = 0; in copy_thread()
196 memset(&p->thread.hardwall[0], 0, in copy_thread()
205 save_arch_state(&p->thread); in copy_thread()
[all …]
/linux-4.1.27/arch/s390/mm/
Dfault.c115 return current->thread.mm_segment.ar4; in user_space_fault()
418 current->thread.gmap_addr = address; in do_exception()
486 current->thread.gmap_pfault = 1; in do_exception()
502 address = __gmap_link(gmap, current->thread.gmap_addr, in do_exception()
660 if (tsk->thread.pfault_wait == 1) { in pfault_interrupt()
666 tsk->thread.pfault_wait = 0; in pfault_interrupt()
667 list_del(&tsk->thread.list); in pfault_interrupt()
679 tsk->thread.pfault_wait = -1; in pfault_interrupt()
685 if (tsk->thread.pfault_wait == 1) { in pfault_interrupt()
689 } else if (tsk->thread.pfault_wait == -1) { in pfault_interrupt()
[all …]
/linux-4.1.27/tools/usb/
Dffs-test.c286 struct thread;
288 static ssize_t read_wrap(struct thread *t, void *buf, size_t nbytes);
289 static ssize_t write_wrap(struct thread *t, const void *buf, size_t nbytes);
290 static ssize_t ep0_consume(struct thread *t, const void *buf, size_t nbytes);
291 static ssize_t fill_in_buf(struct thread *t, void *buf, size_t nbytes);
292 static ssize_t empty_out_buf(struct thread *t, const void *buf, size_t nbytes);
295 static struct thread { struct
299 ssize_t (*in)(struct thread *, void *, size_t); argument
302 ssize_t (*out)(struct thread *, const void *, size_t); argument
331 static void init_thread(struct thread *t) in init_thread() argument
[all …]
/linux-4.1.27/arch/m32r/include/asm/
Dswitch_to.h45 "r" (&(prev->thread.sp)), "r" (&(next->thread.sp)), \
46 "r" (&(prev->thread.lr)), "r" (&(next->thread.lr)) \
/linux-4.1.27/drivers/base/
Ddevtmpfs.c29 static struct task_struct *thread; variable
87 if (!thread) in devtmpfs_create_node()
113 wake_up_process(thread); in devtmpfs_create_node()
126 if (!thread) in devtmpfs_delete_node()
143 wake_up_process(thread); in devtmpfs_delete_node()
163 d_inode(dentry)->i_private = &thread; in dev_mkdir()
223 d_inode(dentry)->i_private = &thread; in handle_create()
239 if (d_inode(dentry)->i_private == &thread) in dev_rmdir()
280 if (inode->i_private != &thread) in dev_mynode()
354 if (!thread) in devtmpfs_mount()
[all …]
/linux-4.1.27/arch/sparc/math-emu/
Dmath_32.c171 printk("fpqdepth is %ld\n", fpt->thread.fpqdepth); in do_mathemu()
172 for (i = 0; i < fpt->thread.fpqdepth; i++) in do_mathemu()
173 printk("%d: %08lx at %08lx\n", i, fpt->thread.fpqueue[i].insn, in do_mathemu()
174 (unsigned long)fpt->thread.fpqueue[i].insn_addr); in do_mathemu()
177 if (fpt->thread.fpqdepth == 0) { /* no queue, guilty insn is at regs->pc */ in do_mathemu()
182 retcode = do_one_mathemu(insn, &fpt->thread.fsr, fpt->thread.float_regs); in do_mathemu()
193 for (i = 0; i < fpt->thread.fpqdepth; i++) { in do_mathemu()
194 retcode = do_one_mathemu(fpt->thread.fpqueue[i].insn, &(fpt->thread.fsr), fpt->thread.float_regs); in do_mathemu()
200 fpt->thread.fsr &= ~(0x3000 | FSR_CEXC_MASK); in do_mathemu()
202 fpt->thread.fsr &= ~0x3000; in do_mathemu()
[all …]
/linux-4.1.27/arch/c6x/include/asm/
Dswitch_to.h26 current->thread.wchan = (u_long) __builtin_return_address(0); \
27 (last) = __switch_to(&(prev)->thread, \
28 &(next)->thread, (prev)); \
30 current->thread.wchan = 0; \
Dprocessor.h108 (*(unsigned long *)&(tsk)->thread.b15_14)
110 (*(((unsigned long *)&(tsk)->thread.b15_14) + 1))
113 (*(((unsigned long *)&(tsk)->thread.b15_14) + 1))
115 (*(unsigned long *)&(tsk)->thread.b15_14)
/linux-4.1.27/arch/avr32/kernel/
Dprocess.c129 fp = tsk->thread.cpu_context.r7; in show_trace_log_lvl()
186 sp = tsk->thread.cpu_context.ksp; in show_stack_log_lvl()
290 p->thread.cpu_context.r0 = arg; in copy_thread()
291 p->thread.cpu_context.r1 = usp; /* fn */ in copy_thread()
292 p->thread.cpu_context.r2 = (unsigned long)syscall_return; in copy_thread()
293 p->thread.cpu_context.pc = (unsigned long)ret_from_kernel_thread; in copy_thread()
300 p->thread.cpu_context.pc = (unsigned long)ret_from_fork; in copy_thread()
303 p->thread.cpu_context.sr = MODE_SUPERVISOR | SR_GM; in copy_thread()
304 p->thread.cpu_context.ksp = (unsigned long)childregs; in copy_thread()
335 unsigned long fp = p->thread.cpu_context.r7; in get_wchan()
[all …]
/linux-4.1.27/drivers/net/wireless/rsi/
Drsi_common.h61 struct rsi_thread *thread, in rsi_create_kthread() argument
65 init_completion(&thread->completion); in rsi_create_kthread()
66 thread->task = kthread_run(func_ptr, common, "%s", name); in rsi_create_kthread()
67 if (IS_ERR(thread->task)) in rsi_create_kthread()
68 return (int)PTR_ERR(thread->task); in rsi_create_kthread()
/linux-4.1.27/Documentation/
Drobust-futex-ABI.txt9 The interesting data as to what futexes a thread is holding is kept on a
15 1) a one time call, per thread, to tell the kernel where its list of
18 by the exiting thread.
34 A thread that anticipates possibly using robust_futexes should first
42 bits on 64 bit arch's, and local byte order. Each thread should have
43 its own thread private 'head'.
45 If a thread is running in 32 bit compatibility mode on a 64 native arch
62 word' holds 3 flag bits in the upper 3 bits, and the thread id (TID)
63 of the thread holding the lock in the bottom 29 bits. See further
68 and is needed to correctly resolve races should a thread exit while
[all …]
/linux-4.1.27/arch/blackfin/include/asm/
Dprocessor.h88 #define thread_saved_pc(tsk) (tsk->thread.pc)
95 if ((tsk)->thread.esp0 > PAGE_SIZE && \
96 MAP_NR((tsk)->thread.esp0) < max_mapnr) \
97 eip = ((struct pt_regs *) (tsk)->thread.esp0)->pc; \
99 #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
/linux-4.1.27/arch/ia64/kernel/
Dprocess.c176 if (current->thread.pfm_needs_checking) in do_notify_resume_user()
269 if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0) in ia64_save_extra()
270 ia64_save_debug_regs(&task->thread.dbr[0]); in ia64_save_extra()
273 if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0) in ia64_save_extra()
289 if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0) in ia64_load_extra()
290 ia64_load_debug_regs(&task->thread.dbr[0]); in ia64_load_extra()
293 if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0) in ia64_load_extra()
352 p->thread.ksp = (unsigned long) child_stack - 16; in copy_thread()
373 p->thread.flags = ((current->thread.flags & ~THREAD_FLAGS_TO_CLEAR) in copy_thread()
436 if (current->thread.pfm_context) in copy_thread()
[all …]
/linux-4.1.27/drivers/vfio/
Dvirqfd.c55 virqfd->thread) in virqfd_wakeup()
103 if (virqfd->thread) in virqfd_inject()
104 virqfd->thread(virqfd->opaque, virqfd->data); in virqfd_inject()
109 void (*thread)(void *, void *), in vfio_virqfd_enable()
125 virqfd->thread = thread; in vfio_virqfd_enable()
176 if ((!handler || handler(opaque, data)) && thread) in vfio_virqfd_enable()
/linux-4.1.27/tools/perf/
Dbuiltin-script.c339 struct thread *thread, in print_sample_start() argument
349 printf("%8.8s ", thread__comm_str(thread)); in print_sample_start()
351 printf("%s ", thread__comm_str(thread)); in print_sample_start()
353 printf("%16s ", thread__comm_str(thread)); in print_sample_start()
381 struct thread *thread, in print_sample_addr() argument
391 perf_event__preprocess_sample_addr(event, sample, thread, &al); in print_sample_addr()
411 struct thread *thread, in print_sample_bts() argument
439 print_sample_addr(event, sample, thread, attr); in print_sample_bts()
451 struct thread *thread = al->thread; in process_event() local
457 print_sample_start(sample, thread, evsel); in process_event()
[all …]
Dbuiltin-trace.c244 struct thread *thread; member
1190 static struct thread_trace *thread__trace(struct thread *thread, FILE *fp) in thread__trace() argument
1194 if (thread == NULL) in thread__trace()
1197 if (thread__priv(thread) == NULL) in thread__trace()
1198 thread__set_priv(thread, thread_trace__new()); in thread__trace()
1200 if (thread__priv(thread) == NULL) in thread__trace()
1203 ttrace = thread__priv(thread); in thread__trace()
1229 struct thread *current;
1261 static int trace__set_fd_pathname(struct thread *thread, int fd, const char *pathname) in trace__set_fd_pathname() argument
1263 struct thread_trace *ttrace = thread__priv(thread); in trace__set_fd_pathname()
[all …]
Dbuiltin-sched.c45 pthread_t thread; member
91 struct thread *thread; member
140 struct thread *curr_thread[MAX_CPUS];
570 err = pthread_create(&task->thread, &attr, thread_func, parms); in create_tasks()
763 struct thread *child, *parent; in replay_fork_event()
811 thread_atoms_search(struct rb_root *root, struct thread *thread, in thread_atoms_search() argument
815 struct work_atoms key = { .thread = thread }; in thread_atoms_search()
829 BUG_ON(thread != atoms->thread); in thread_atoms_search()
861 static int thread_atoms_insert(struct perf_sched *sched, struct thread *thread) in thread_atoms_insert() argument
869 atoms->thread = thread__get(thread); in thread_atoms_insert()
[all …]
/linux-4.1.27/arch/arm/include/asm/
Ddomain.h73 struct thread_info *thread = current_thread_info(); \
74 unsigned int domain = thread->cpu_domain; \
76 thread->cpu_domain = domain | domain_val(dom, type); \
77 set_domain(thread->cpu_domain); \
/linux-4.1.27/arch/parisc/include/asm/
Dprocessor.h35 #define TASK_SIZE_OF(tsk) ((tsk)->thread.task_size)
37 #define TASK_UNMAPPED_BASE (current->thread.map_base)
133 #define task_pt_regs(tsk) ((struct pt_regs *)&((tsk)->thread.regs))
145 (task)->thread.flags = (((task)->thread.flags & ~PARISC_UAC_MASK) \
153 put_user(((task)->thread.flags & PARISC_UAC_MASK) \
335 #define KSTK_EIP(tsk) ((tsk)->thread.regs.iaoq[0])
336 #define KSTK_ESP(tsk) ((tsk)->thread.regs.gr[30])
/linux-4.1.27/drivers/irqchip/
Dirq-metag.c163 unsigned int thread = hard_processor_id(); in metag_internal_irq_unmask() local
168 metag_out32(TBI_TRIG_VEC(TBID_SIGNUM_TR1(thread)), vec_addr); in metag_internal_irq_unmask()
195 unsigned int cpu, thread; in metag_internal_irq_set_affinity() local
205 thread = cpu_2_hwthread_id[cpu]; in metag_internal_irq_set_affinity()
207 metag_out32(TBI_TRIG_VEC(TBID_SIGNUM_TR1(thread)), in metag_internal_irq_set_affinity()
284 unsigned int thread = cpu_2_hwthread_id[cpu]; in metag_internal_irq_init_cpu() local
285 unsigned int signum = TBID_SIGNUM_TR1(thread); in metag_internal_irq_init_cpu()
Dirq-metag-ext.c134 int thread = hard_processor_id(); in meta_intc_startup_irq() local
141 metag_out32(TBI_TRIG_VEC(TBID_SIGNUM_TR2(thread)), vec_addr); in meta_intc_startup_irq()
338 unsigned int thread = hard_processor_id(); in meta_intc_unmask_edge_irq_nomask() local
343 metag_out32(TBI_TRIG_VEC(TBID_SIGNUM_TR2(thread)), vec_addr); in meta_intc_unmask_edge_irq_nomask()
379 unsigned int thread = hard_processor_id(); in meta_intc_unmask_level_irq_nomask() local
384 metag_out32(TBI_TRIG_VEC(TBID_SIGNUM_TR2(thread)), vec_addr); in meta_intc_unmask_level_irq_nomask()
509 unsigned int cpu, thread; in meta_intc_set_affinity() local
519 thread = cpu_2_hwthread_id[cpu]; in meta_intc_set_affinity()
521 metag_out32(TBI_TRIG_VEC(TBID_SIGNUM_TR2(thread)), vec_addr); in meta_intc_set_affinity()
782 unsigned int thread = cpu_2_hwthread_id[cpu]; in meta_intc_init_cpu() local
[all …]
/linux-4.1.27/drivers/thermal/
Dintel_powerclamp.c511 struct task_struct *thread; in start_power_clamp() local
536 thread = kthread_create_on_node(clamp_thread, in start_power_clamp()
541 if (likely(!IS_ERR(thread))) { in start_power_clamp()
542 kthread_bind(thread, cpu); in start_power_clamp()
543 wake_up_process(thread); in start_power_clamp()
544 *p = thread; in start_power_clamp()
556 struct task_struct *thread; in end_power_clamp() local
568 thread = *per_cpu_ptr(powerclamp_thread, i); in end_power_clamp()
569 kthread_stop(thread); in end_power_clamp()
578 struct task_struct *thread; in powerclamp_cpu_callback() local
[all …]
/linux-4.1.27/arch/m68k/include/asm/
Dprocessor.h170 if ((tsk)->thread.esp0 > PAGE_SIZE && \
171 (virt_addr_valid((tsk)->thread.esp0))) \
172 eip = ((struct pt_regs *) (tsk)->thread.esp0)->pc; \
174 #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
176 #define task_pt_regs(tsk) ((struct pt_regs *) ((tsk)->thread.esp0))
/linux-4.1.27/arch/ia64/include/asm/
Dswitch_to.h41 ((t)->thread.flags & (IA64_THREAD_DBG_VALID|IA64_THREAD_PM_VALID) \
63 (prev)->thread.flags |= IA64_THREAD_FPH_VALID; \
64 __ia64_save_fpu((prev)->thread.fph); \
68 if (unlikely((current->thread.flags & IA64_THREAD_MIGRATION) && \
Dprocessor.h42 #define TASK_UNMAPPED_BASE (current->thread.map_base)
253 (task)->thread.flags = (((task)->thread.flags & ~IA64_THREAD_UAC_MASK) \
259 put_user(((task)->thread.flags & IA64_THREAD_UAC_MASK) >> IA64_THREAD_UAC_SHIFT, \
265 (task)->thread.flags = (((task)->thread.flags & ~IA64_THREAD_FPEMU_MASK) \
271 put_user(((task)->thread.flags & IA64_THREAD_FPEMU_MASK) >> IA64_THREAD_FPEMU_SHIFT, \
317 regs->ar_bspstore = current->thread.rbs_bot; \
354 #define KSTK_ESP(tsk) ((tsk)->thread.ksp)
404 (__ia64_islfo_task->thread.last_fph_cpu == smp_processor_id() \
414 __ia64_slfo_task->thread.last_fph_cpu = smp_processor_id(); \
419 #define ia64_drop_fpu(t) ((t)->thread.last_fph_cpu = -1)
/linux-4.1.27/arch/frv/include/asm/
Dswitch_to.h29 (prev)->thread.sched_lr = \
31 (last) = __switch_to(&(prev)->thread, &(next)->thread, (prev)); \
/linux-4.1.27/arch/metag/include/asm/
Dhwthread.h26 void __iomem *__CU_addr(unsigned int thread, unsigned int regnum) in __CU_addr() argument
30 WARN_ON(thread == BAD_HWTHREAD_ID); in __CU_addr()
34 thread_offset = TnUCTRX_STRIDE * thread; in __CU_addr()
Dprocessor.h114 current->thread.int_depth = 1; \
143 ((unsigned long)(tsk)->thread.kernel_context->CurrPC)
145 ((unsigned long)(tsk)->thread.kernel_context->AX[0].U0)
147 ((unsigned long)(tsk)->thread.kernel_context->AX[1].U0)
/linux-4.1.27/arch/m32r/kernel/
Dprocess.c44 return tsk->thread.lr; in thread_saved_pc()
116 memset(&current->thread.debug_trap, 0, sizeof(struct debug_trap)); in flush_thread()
143 tsk->thread.lr = (unsigned long)ret_from_kernel_thread; in copy_thread()
150 tsk->thread.lr = (unsigned long)ret_from_fork; in copy_thread()
152 tsk->thread.sp = (unsigned long)childregs; in copy_thread()
/linux-4.1.27/arch/cris/arch-v10/kernel/
Dprocess.c114 p->thread.ksp = (unsigned long) swstack; in copy_thread()
115 p->thread.usp = 0; in copy_thread()
132 p->thread.usp = usp ?: rdusp(); in copy_thread()
136 p->thread.ksp = (unsigned long) swstack; in copy_thread()
157 esp = p->thread.esp; in get_wchan()
/linux-4.1.27/Documentation/filesystems/nfs/
Dknfsd-stats.txt29 for each NFS thread pool.
36 The id number of the NFS thread pool to which this line applies.
40 at zero. The maximum value depends on the thread pool mode, but
42 Note that in the default case there will be a single thread pool
62 an nfsd thread to service it, i.e. no nfsd thread was considered
72 thread pool for the NFS workload (the workload is thread-limited),
74 the thread pool (the workload is CPU-limited). In the former case,
83 Counts how many times an idle nfsd thread is woken to try to
93 nfsd thread, despite the presence of idle nfsd threads, because
102 on all the CPUs in the nfsd thread pool.
[all …]
/linux-4.1.27/kernel/debug/
Dgdbstub.c495 struct task_struct *thread; in gdb_get_regs_helper() local
499 thread = kgdb_usethread; in gdb_get_regs_helper()
500 if (!thread) { in gdb_get_regs_helper()
501 thread = kgdb_info[ks->cpu].task; in gdb_get_regs_helper()
512 if (thread == kgdb_info[i].task) in gdb_get_regs_helper()
532 sleeping_thread_to_gdb_regs(gdb_regs, thread); in gdb_get_regs_helper()
800 struct task_struct *thread; in gdb_cmd_task() local
807 thread = getthread(ks->linux_regs, ks->threadid); in gdb_cmd_task()
808 if (!thread && ks->threadid > 0) { in gdb_cmd_task()
812 kgdb_usethread = thread; in gdb_cmd_task()
[all …]
/linux-4.1.27/drivers/block/paride/
DTransition-notes49 1) at any time at most one thread of execution can be in that area or
51 2) When there is such a thread, pd_busy is set or pd_lock is held by
52 that thread.
53 3) When there is such a thread, ps_tq_active is 0 or ps_spinlock is
54 held by that thread.
55 4) When there is such a thread, all PIA belonging to pd.c have NULL
56 ->claim_cont or pi_spinlock is held by thread in question.
60 (1) can become not true if some thread enters that area while another is there.
62 In the first case the thread was already in the area. In the second,
63 the thread was holding pd_lock and found pd_busy not set, which would
[all …]
/linux-4.1.27/kernel/
Dseccomp.c257 struct task_struct *thread, *caller; in seccomp_can_sync_threads() local
264 for_each_thread(caller, thread) { in seccomp_can_sync_threads()
268 if (thread == caller) in seccomp_can_sync_threads()
271 if (thread->seccomp.mode == SECCOMP_MODE_DISABLED || in seccomp_can_sync_threads()
272 (thread->seccomp.mode == SECCOMP_MODE_FILTER && in seccomp_can_sync_threads()
273 is_ancestor(thread->seccomp.filter, in seccomp_can_sync_threads()
278 failed = task_pid_vnr(thread); in seccomp_can_sync_threads()
298 struct task_struct *thread, *caller; in seccomp_sync_threads() local
305 for_each_thread(caller, thread) { in seccomp_sync_threads()
307 if (thread == caller) in seccomp_sync_threads()
[all …]
/linux-4.1.27/arch/sh/mm/
Dalignment.c72 if (current->thread.flags & SH_THREAD_UAC_SIGBUS) { in unaligned_user_action()
77 if (current->thread.flags & SH_THREAD_UAC_NOPRINT) in unaligned_user_action()
85 return put_user(tsk->thread.flags & SH_THREAD_UAC_MASK, in get_unalign_ctl()
91 tsk->thread.flags = (tsk->thread.flags & ~SH_THREAD_UAC_MASK) | in set_unalign_ctl()
/linux-4.1.27/arch/arm/probes/uprobes/
Dcore.c143 utask->autask.saved_trap_no = current->thread.trap_no; in arch_uprobe_pre_xol()
144 current->thread.trap_no = UPROBE_TRAP_NR; in arch_uprobe_pre_xol()
154 WARN_ON_ONCE(current->thread.trap_no != UPROBE_TRAP_NR); in arch_uprobe_post_xol()
156 current->thread.trap_no = utask->autask.saved_trap_no; in arch_uprobe_post_xol()
167 if (t->thread.trap_no != UPROBE_TRAP_NR) in arch_uprobe_xol_was_trapped()
177 current->thread.trap_no = utask->autask.saved_trap_no; in arch_uprobe_abort_xol()
/linux-4.1.27/Documentation/kdump/
Dgdbmacros.txt25 set var $stackp = $next_t.thread.esp
39 set var $stackp = $next_t.thread.esp
54 dump all thread stack traces on a kernel compiled with !CONFIG_FRAME_POINTER
66 set var $stackp = $next_t.thread.esp
82 set var $stackp = $next_t.thread.esp
98 dump all thread stack traces on a kernel compiled with CONFIG_FRAME_POINTER
129 set var $stackp = $pid_task.thread.esp
171 printf "Trapno %ld, cr2 0x%lx, error_code %ld\n", $pid_task.thread.trap_no, \
172 $pid_task.thread.cr2, $pid_task.thread.error_code
176 Run info threads and lookup pid of thread #1
/linux-4.1.27/arch/xtensa/kernel/
Dprocess.c204 p->thread.sp = (unsigned long)childregs; in copy_thread()
211 p->thread.ra = MAKE_RA_FOR_CALL( in copy_thread()
257 p->thread.ra = MAKE_RA_FOR_CALL( in copy_thread()
293 sp = p->thread.sp; in get_wchan()
294 pc = MAKE_PC_FROM_RA(p->thread.ra, p->thread.sp); in get_wchan()
/linux-4.1.27/arch/x86/um/asm/
Dprocessor_32.h38 static inline void arch_flush_thread(struct arch_thread *thread) in arch_flush_thread() argument
41 memset(&thread->tls_array, 0, sizeof(thread->tls_array)); in arch_flush_thread()
/linux-4.1.27/drivers/scsi/bnx2i/
Dbnx2i_init.c423 struct task_struct *thread; in bnx2i_percpu_thread_create() local
427 thread = kthread_create_on_node(bnx2i_percpu_io_thread, (void *)p, in bnx2i_percpu_thread_create()
431 if (likely(!IS_ERR(thread))) { in bnx2i_percpu_thread_create()
432 kthread_bind(thread, cpu); in bnx2i_percpu_thread_create()
433 p->iothread = thread; in bnx2i_percpu_thread_create()
434 wake_up_process(thread); in bnx2i_percpu_thread_create()
442 struct task_struct *thread; in bnx2i_percpu_thread_destroy() local
448 thread = p->iothread; in bnx2i_percpu_thread_destroy()
460 if (thread) in bnx2i_percpu_thread_destroy()
461 kthread_stop(thread); in bnx2i_percpu_thread_destroy()
/linux-4.1.27/Documentation/devicetree/bindings/arm/
Dtopology.txt14 - thread
19 The bottom hierarchy level sits at core or thread level depending on whether
23 threads existing in the system and map to the hierarchy level "thread" above.
74 - thread node
78 The nodes describing the CPU topology (cluster/core/thread) can only
79 be defined within the cpu-map node and every core/thread in the system
89 cluster/core/thread) (where N = {0, 1, ...} is the node number; nodes which
97 3 - cluster/core/thread node bindings
100 Bindings for cluster/cpu/thread nodes are defined as follows:
124 thread nodes.
[all …]
/linux-4.1.27/arch/cris/arch-v32/kernel/
Dprocess.c123 p->thread.ksp = (unsigned long) swstack; in copy_thread()
124 p->thread.usp = 0; in copy_thread()
149 p->thread.usp = usp ?: rdusp(); in copy_thread()
150 p->thread.ksp = (unsigned long) swstack; in copy_thread()
/linux-4.1.27/arch/nios2/include/asm/
Dprocessor.h84 #define thread_saved_pc(tsk) ((tsk)->thread.kregs->ea)
92 #define KSTK_EIP(tsk) ((tsk)->thread.kregs->ea)
93 #define KSTK_ESP(tsk) ((tsk)->thread.kregs->sp)
/linux-4.1.27/arch/arm64/include/asm/
Dthread_info.h81 ((unsigned long)(tsk->thread.cpu_context.pc))
83 ((unsigned long)(tsk->thread.cpu_context.sp))
85 ((unsigned long)(tsk->thread.cpu_context.fp))
/linux-4.1.27/arch/powerpc/platforms/cell/
Dcbe_regs.c266 struct cbe_thread_map *thread = &cbe_thread_map[i]; in cbe_regs_init() local
268 if (thread->cpu_node == cpu) { in cbe_regs_init()
269 thread->regs = map; in cbe_regs_init()
270 thread->cbe_id = cbe_id; in cbe_regs_init()
271 map->be_node = thread->be_node; in cbe_regs_init()
273 if(thread->thread_id == 0) in cbe_regs_init()
/linux-4.1.27/arch/x86/mm/
Dfault.c313 tsk->thread.screen_bitmap |= 1 << bit; in check_v8086_mode()
643 tsk->thread.cr2 = address; in pgtable_bad()
644 tsk->thread.trap_nr = X86_TRAP_PF; in pgtable_bad()
645 tsk->thread.error_code = error_code; in pgtable_bad()
678 tsk->thread.trap_nr = X86_TRAP_PF; in no_context()
679 tsk->thread.error_code = error_code | PF_USER; in no_context()
680 tsk->thread.cr2 = address; in no_context()
720 tsk->thread.cr2 = address; in no_context()
721 tsk->thread.trap_nr = X86_TRAP_PF; in no_context()
722 tsk->thread.error_code = error_code; in no_context()
[all …]
/linux-4.1.27/crypto/
Dalgboss.c97 struct task_struct *thread; in cryptomgr_schedule_probe() local
193 thread = kthread_run(cryptomgr_probe, param, "cryptomgr_probe"); in cryptomgr_schedule_probe()
194 if (IS_ERR(thread)) in cryptomgr_schedule_probe()
235 struct task_struct *thread; in cryptomgr_schedule_test() local
262 thread = kthread_run(cryptomgr_test, param, "cryptomgr_test"); in cryptomgr_schedule_test()
263 if (IS_ERR(thread)) in cryptomgr_schedule_test()
/linux-4.1.27/drivers/media/v4l2-core/
Dvideobuf-dvb.c106 if (NULL != dvb->thread) in videobuf_dvb_start_feed()
108 dvb->thread = kthread_run(videobuf_dvb_thread, in videobuf_dvb_start_feed()
110 if (IS_ERR(dvb->thread)) { in videobuf_dvb_start_feed()
111 rc = PTR_ERR(dvb->thread); in videobuf_dvb_start_feed()
112 dvb->thread = NULL; in videobuf_dvb_start_feed()
128 if (0 == dvb->nfeeds && NULL != dvb->thread) { in videobuf_dvb_stop_feed()
129 err = kthread_stop(dvb->thread); in videobuf_dvb_stop_feed()
130 dvb->thread = NULL; in videobuf_dvb_stop_feed()
/linux-4.1.27/Documentation/x86/x86_64/
Dkernel-stacks6 active thread. These thread stacks are THREAD_SIZE (2*PAGE_SIZE) big.
7 These stacks contain useful data as long as a thread is alive or a
8 zombie. While the thread is in user space the kernel stack is empty
11 In addition to the per thread stacks, there are specialized stacks
21 the split thread and interrupt stacks on i386, this gives more room
23 of every per thread stack.
44 will switch back to the per-thread stack. If software wants to allow
/linux-4.1.27/drivers/w1/
Dw1_int.c158 dev->thread = kthread_run(&w1_process, dev, "%s", dev->name); in w1_add_master_device()
159 if (IS_ERR(dev->thread)) { in w1_add_master_device()
160 retval = PTR_ERR(dev->thread); in w1_add_master_device()
181 kthread_stop(dev->thread); in w1_add_master_device()
201 kthread_stop(dev->thread); in __w1_remove_master_device()
/linux-4.1.27/arch/nios2/kernel/
Dprocess.c118 p->thread.ksp = (unsigned long) childstack; in copy_thread()
119 p->thread.kregs = childregs; in copy_thread()
131 p->thread.kregs = childregs; in copy_thread()
132 p->thread.ksp = (unsigned long) childstack; in copy_thread()
226 fp = ((struct switch_stack *)p->thread.ksp)->fp; /* ;dgt2 */ in get_wchan()
/linux-4.1.27/drivers/staging/lustre/lustre/include/
Dlustre_net.h1831 static inline int thread_is_init(struct ptlrpc_thread *thread) in thread_is_init() argument
1833 return thread->t_flags == 0; in thread_is_init()
1836 static inline int thread_is_stopped(struct ptlrpc_thread *thread) in thread_is_stopped() argument
1838 return !!(thread->t_flags & SVC_STOPPED); in thread_is_stopped()
1841 static inline int thread_is_stopping(struct ptlrpc_thread *thread) in thread_is_stopping() argument
1843 return !!(thread->t_flags & SVC_STOPPING); in thread_is_stopping()
1846 static inline int thread_is_starting(struct ptlrpc_thread *thread) in thread_is_starting() argument
1848 return !!(thread->t_flags & SVC_STARTING); in thread_is_starting()
1851 static inline int thread_is_running(struct ptlrpc_thread *thread) in thread_is_running() argument
1853 return !!(thread->t_flags & SVC_RUNNING); in thread_is_running()
[all …]
/linux-4.1.27/arch/powerpc/platforms/pseries/
Ddlpar.c370 u32 thread; in dlpar_online_cpu() local
380 thread = be32_to_cpu(intserv[i]); in dlpar_online_cpu()
382 if (get_hard_smp_processor_id(cpu) != thread) in dlpar_online_cpu()
396 "with physical id 0x%x\n", thread); in dlpar_online_cpu()
449 u32 thread; in dlpar_offline_cpu() local
459 thread = be32_to_cpu(intserv[i]); in dlpar_offline_cpu()
461 if (get_hard_smp_processor_id(cpu) != thread) in dlpar_offline_cpu()
483 BUG_ON(plpar_hcall_norets(H_PROD, thread) in dlpar_offline_cpu()
490 "with physical id 0x%x\n", thread); in dlpar_offline_cpu()
/linux-4.1.27/arch/score/mm/
Dfault.c141 tsk->thread.cp0_badvaddr = address; in do_page_fault()
142 tsk->thread.error_code = write; in do_page_fault()
154 current->thread.cp0_baduaddr = address; in do_page_fault()
191 tsk->thread.cp0_badvaddr = address; in do_page_fault()
/linux-4.1.27/arch/metag/mm/
Dcache.c203 int thread; in metag_phys_data_cache_flush() local
208 thread = (__core_reg_get(TXENABLE) & TXENABLE_THREAD_BITS) in metag_phys_data_cache_flush()
220 (SYSC_xCPARTn_STRIDE * thread)); in metag_phys_data_cache_flush()
348 int thread; in metag_phys_code_cache_flush() local
353 thread = (__core_reg_get(TXENABLE) & TXENABLE_THREAD_BITS) in metag_phys_code_cache_flush()
363 (SYSC_xCPARTn_STRIDE * thread)); in metag_phys_code_cache_flush()
/linux-4.1.27/arch/sh/kernel/cpu/sh5/
Dfpu.c57 : "r" (&tsk->thread.xstate->hardfpu) in save_fpu()
100 : "r" (&tsk->thread.xstate->hardfpu) in restore_fpu()
Dswitchto.S120 st.l r3, 0, r15 ! prev->thread.sp
121 st.l r3, 8, r1 ! prev->thread.kregs
122 st.l r3, 4, r9 ! prev->thread.pc
123 st.q r1, 0, r9 ! save prev->thread.pc into pt_regs->pc
126 ld.l r5, 4, r18 ! next->thread.pc
128 ld.l r5, 0, r15 ! next->thread.sp
135 ! go to save_pc for a reschedule, or the initial thread.pc for a new process

1234