Skip to content

Commit 94090f4

Browse files
btw616richardweinberger
authored andcommitted
um: Remove unused fields from thread_struct
These fields are no longer used since the removal of tt mode. Signed-off-by: Tiwei Bie <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 669afa4 commit 94090f4

File tree

3 files changed

+11
-21
lines changed

3 files changed

+11
-21
lines changed

arch/um/include/asm/processor-generic.h

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,10 @@ struct thread_struct {
2828
struct arch_thread arch;
2929
jmp_buf switch_buf;
3030
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;
4535
} request;
4636
};
4737

@@ -51,7 +41,7 @@ struct thread_struct {
5141
.fault_addr = NULL, \
5242
.prev_sched = NULL, \
5343
.arch = INIT_ARCH_THREAD, \
54-
.request = { 0 } \
44+
.request = { } \
5545
}
5646

5747
/*

arch/um/kernel/process.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ void new_thread_handler(void)
109109
schedule_tail(current->thread.prev_sched);
110110
current->thread.prev_sched = NULL;
111111

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;
114114

115115
/*
116116
* callback returns only if the kernel thread execs a process
@@ -158,8 +158,8 @@ int copy_thread(struct task_struct * p, const struct kernel_clone_args *args)
158158
arch_copy_thread(&current->thread.arch, &p->thread.arch);
159159
} else {
160160
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;
163163
handler = new_thread_handler;
164164
}
165165

arch/um/kernel/skas/process.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ int __init start_uml(void)
3939

4040
init_new_thread_signals();
4141

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;
4444
return start_idle_thread(task_stack_page(&init_task),
4545
&init_task.thread.switch_buf);
4646
}

0 commit comments

Comments
 (0)