From 6778948f9de86c3cfaf36725a7c87dcff9ba247f Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 11 Dec 2023 08:20:59 +0000 Subject: [PATCH] kernel_5.10 no rt --- kernel/kernel/stop_machine.c | 27 +++------------------------ 1 files changed, 3 insertions(+), 24 deletions(-) diff --git a/kernel/kernel/stop_machine.c b/kernel/kernel/stop_machine.c index 30395a6..c65cfb7 100644 --- a/kernel/kernel/stop_machine.c +++ b/kernel/kernel/stop_machine.c @@ -33,26 +33,10 @@ struct list_head works; /* list of pending works */ struct cpu_stop_work stop_work; /* for stop_cpus */ - unsigned long caller; - cpu_stop_fn_t fn; }; static DEFINE_PER_CPU(struct cpu_stopper, cpu_stopper); static bool stop_machine_initialized = false; - -void print_stop_info(const char *log_lvl, struct task_struct *task) -{ - /* - * If @task is a stopper task, it cannot migrate and task_cpu() is - * stable. - */ - struct cpu_stopper *stopper = per_cpu_ptr(&cpu_stopper, task_cpu(task)); - - if (task != stopper->thread) - return; - - printk("%sStopper: %pS <- %pS\n", log_lvl, stopper->fn, (void *)stopper->caller); -} /* static data for stop_cpus */ static DEFINE_MUTEX(stop_cpus_mutex); @@ -130,7 +114,7 @@ int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg) { struct cpu_stop_done done; - struct cpu_stop_work work = { .fn = fn, .arg = arg, .done = &done, .caller = _RET_IP_ }; + struct cpu_stop_work work = { .fn = fn, .arg = arg, .done = &done }; cpu_stop_init_done(&done, 1); if (!cpu_stop_queue_work(cpu, &work)) @@ -338,8 +322,7 @@ work1 = work2 = (struct cpu_stop_work){ .fn = multi_cpu_stop, .arg = &msdata, - .done = &done, - .caller = _RET_IP_, + .done = &done }; cpu_stop_init_done(&done, 2); @@ -375,7 +358,7 @@ bool stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg, struct cpu_stop_work *work_buf) { - *work_buf = (struct cpu_stop_work){ .fn = fn, .arg = arg, .caller = _RET_IP_, }; + *work_buf = (struct cpu_stop_work){ .fn = fn, .arg = arg, }; return cpu_stop_queue_work(cpu, work_buf); } EXPORT_SYMBOL_GPL(stop_one_cpu_nowait); @@ -544,8 +527,6 @@ int ret; /* cpu stop callbacks must not sleep, make in_atomic() == T */ - stopper->caller = work->caller; - stopper->fn = fn; preempt_count_inc(); ret = fn(arg); if (done) { @@ -554,8 +535,6 @@ cpu_stop_signal_done(done); } preempt_count_dec(); - stopper->fn = NULL; - stopper->caller = 0; WARN_ONCE(preempt_count(), "cpu_stop: %ps(%p) leaked preempt count\n", fn, arg); goto repeat; -- Gitblit v1.6.2