[PATCH 06/11] smp: use smp_xcall_private() fron irq_work.c and core.c

From: Donghai Qiao
Date: Thu Apr 14 2022 - 22:47:50 EST


irq_work.c and core.c should use the cross interface rather than
using a unpublished internal function __smp_call_single_queue.

Signed-off-by: Donghai Qiao <dqiao@xxxxxxxxxx>
---
kernel/irq_work.c | 4 ++--
kernel/sched/core.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/irq_work.c b/kernel/irq_work.c
index f7df715ec28e..dac94a625665 100644
--- a/kernel/irq_work.c
+++ b/kernel/irq_work.c
@@ -159,8 +159,8 @@ bool irq_work_queue_on(struct irq_work *work, int cpu)
if (!irq_work_claim(work))
goto out;
}
-
- __smp_call_single_queue(cpu, &work->node.llist);
+ smp_xcall_private(cpu, (call_single_data_t *)&work->node.llist,
+ XCALL_TYPE_IRQ_WORK);
} else {
__irq_work_queue_local(work);
}
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 51efaabac3e4..417355fbe32d 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3780,7 +3780,7 @@ static void __ttwu_queue_wakelist(struct task_struct *p, int cpu, int wake_flags
p->sched_remote_wakeup = !!(wake_flags & WF_MIGRATED);

WRITE_ONCE(rq->ttwu_pending, 1);
- __smp_call_single_queue(cpu, &p->wake_entry.llist);
+ smp_xcall_private(cpu, (call_single_data_t *)&p->wake_entry.llist, XCALL_TYPE_TTWU);
}

void wake_up_if_idle(int cpu)
--
2.27.0