From 2c1385ae0efdb9124724f409fc88cbe92cc93ae8 Mon Sep 17 00:00:00 2001 From: Rick Yiu Date: Tue, 13 May 2025 15:17:28 +0000 Subject: [PATCH] ANDROID: Modify android_rvh_find_lowest_rq hook The function find_lowest_rq now uses 2 parameters, sched_ctx and exec_ctx. Bug: 417372724 Change-Id: I14734236420a66025589623332252425361a585a Signed-off-by: Rick Yiu --- include/trace/hooks/sched.h | 6 +++--- kernel/sched/rt.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/trace/hooks/sched.h b/include/trace/hooks/sched.h index 5819b90dc99e..c6ff8503564a 100644 --- a/include/trace/hooks/sched.h +++ b/include/trace/hooks/sched.h @@ -40,9 +40,9 @@ DECLARE_RESTRICTED_HOOK(android_rvh_can_migrate_task, TP_ARGS(p, dst_cpu, can_migrate), 1); DECLARE_RESTRICTED_HOOK(android_rvh_find_lowest_rq, - TP_PROTO(struct task_struct *p, struct cpumask *local_cpu_mask, - int ret, int *lowest_cpu), - TP_ARGS(p, local_cpu_mask, ret, lowest_cpu), 1); + TP_PROTO(struct task_struct *sched_ctx, struct task_struct *exec_ctx, + struct cpumask *local_cpu_mask, int ret, int *lowest_cpu), + TP_ARGS(sched_ctx, exec_ctx, local_cpu_mask, ret, lowest_cpu), 1); DECLARE_RESTRICTED_HOOK(android_rvh_prepare_prio_fork, TP_PROTO(struct task_struct *p), diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 9ee03022482b..4233e357061d 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -1937,7 +1937,7 @@ static int find_lowest_rq(struct task_struct *sched_ctx, struct task_struct *exe sched_ctx, exec_ctx, lowest_mask); } - trace_android_rvh_find_lowest_rq(sched_ctx, lowest_mask, ret, &cpu); + trace_android_rvh_find_lowest_rq(sched_ctx, exec_ctx, lowest_mask, ret, &cpu); if (cpu >= 0) return cpu;