diff options
author | Tiwei Bie <tiwei.btw@antgroup.com> | 2024-03-06 18:19:22 +0800 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2024-04-30 14:11:30 +0200 |
commit | f95bab86106ee5b180b197a68246282b56ef5d8a (patch) | |
tree | 1b72f825019083516fe297076f04fd078a156b30 /arch/um/kernel | |
parent | dac847ae2b718d41b72bd68eb911ca2862ecfb38 (diff) | |
download | lwn-f95bab86106ee5b180b197a68246282b56ef5d8a.tar.gz lwn-f95bab86106ee5b180b197a68246282b56ef5d8a.zip |
um: Stop tracking host PID in cpu_tasks
The host PID tracked in 'cpu_tasks' is no longer used. Stopping
tracking it will also save some cycles.
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r-- | arch/um/kernel/process.c | 12 | ||||
-rw-r--r-- | arch/um/kernel/skas/process.c | 4 |
2 files changed, 2 insertions, 14 deletions
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index e5d7d24045a2..d2134802f6a8 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -43,13 +43,7 @@ * cares about its entry, so it's OK if another processor is modifying its * entry. */ -struct cpu_task cpu_tasks[NR_CPUS] = { [0 ... NR_CPUS - 1] = { -1, NULL } }; - -static inline int external_pid(void) -{ - /* FIXME: Need to look up userspace_pid by cpu */ - return userspace_pid[0]; -} +struct cpu_task cpu_tasks[NR_CPUS] = { [0 ... NR_CPUS - 1] = { NULL } }; void free_stack(unsigned long stack, int order) { @@ -70,8 +64,7 @@ unsigned long alloc_stack(int order, int atomic) static inline void set_current(struct task_struct *task) { - cpu_tasks[task_thread_info(task)->cpu] = ((struct cpu_task) - { external_pid(), task }); + cpu_tasks[task_thread_info(task)->cpu] = ((struct cpu_task) { task }); } struct task_struct *__switch_to(struct task_struct *from, struct task_struct *to) @@ -206,7 +199,6 @@ void um_idle_sleep(void) void arch_cpu_idle(void) { - cpu_tasks[current_thread_info()->cpu].pid = os_getpid(); um_idle_sleep(); } diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c index fdd5922f9222..99a5cbb36083 100644 --- a/arch/um/kernel/skas/process.c +++ b/arch/um/kernel/skas/process.c @@ -18,12 +18,8 @@ extern void start_kernel(void); static int __init start_kernel_proc(void *unused) { - int pid; - block_signals_trace(); - pid = os_getpid(); - cpu_tasks[0].pid = pid; cpu_tasks[0].task = current; start_kernel(); |