Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

um: Remove unused fields from thread_struct

These fields are no longer used since the removal of tt mode.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Signed-off-by: Richard Weinberger <richard@nod.at>

authored by

Tiwei Bie and committed by
Richard Weinberger
94090f41 669afa4e

+11 -21
+5 -15
arch/um/include/asm/processor-generic.h
··· 28 28 struct arch_thread arch; 29 29 jmp_buf switch_buf; 30 30 struct { 31 - int op; 32 - union { 33 - struct { 34 - int pid; 35 - } fork, exec; 36 - struct { 37 - int (*proc)(void *); 38 - void *arg; 39 - } thread; 40 - struct { 41 - void (*proc)(void *); 42 - void *arg; 43 - } cb; 44 - } u; 31 + struct { 32 + int (*proc)(void *); 33 + void *arg; 34 + } thread; 45 35 } request; 46 36 }; 47 37 ··· 41 51 .fault_addr = NULL, \ 42 52 .prev_sched = NULL, \ 43 53 .arch = INIT_ARCH_THREAD, \ 44 - .request = { 0 } \ 54 + .request = { } \ 45 55 } 46 56 47 57 /*
+4 -4
arch/um/kernel/process.c
··· 109 109 schedule_tail(current->thread.prev_sched); 110 110 current->thread.prev_sched = NULL; 111 111 112 - fn = current->thread.request.u.thread.proc; 113 - arg = current->thread.request.u.thread.arg; 112 + fn = current->thread.request.thread.proc; 113 + arg = current->thread.request.thread.arg; 114 114 115 115 /* 116 116 * callback returns only if the kernel thread execs a process ··· 158 158 arch_copy_thread(&current->thread.arch, &p->thread.arch); 159 159 } else { 160 160 get_safe_registers(p->thread.regs.regs.gp, p->thread.regs.regs.fp); 161 - p->thread.request.u.thread.proc = args->fn; 162 - p->thread.request.u.thread.arg = args->fn_arg; 161 + p->thread.request.thread.proc = args->fn; 162 + p->thread.request.thread.arg = args->fn_arg; 163 163 handler = new_thread_handler; 164 164 } 165 165
+2 -2
arch/um/kernel/skas/process.c
··· 39 39 40 40 init_new_thread_signals(); 41 41 42 - init_task.thread.request.u.thread.proc = start_kernel_proc; 43 - init_task.thread.request.u.thread.arg = NULL; 42 + init_task.thread.request.thread.proc = start_kernel_proc; 43 + init_task.thread.request.thread.arg = NULL; 44 44 return start_idle_thread(task_stack_page(&init_task), 45 45 &init_task.thread.switch_buf); 46 46 }