From aede626233d267fedd8485ba07e2c64aedaaf8e3 Mon Sep 17 00:00:00 2001 From: hujun5 Date: Thu, 28 Nov 2024 14:45:09 +0800 Subject: [PATCH] remove redundant scheduling records reason: Since the scheduling records have already been moved to the interrupt exit in this submission, we need to delete the original records' locations. This commit fixes the regression from https://github.com/apache/nuttx/pull/13651 Signed-off-by: hujun5 --- arch/arm/src/armv7-a/arm_smpcall.c | 11 +---------- arch/arm/src/armv7-r/arm_smpcall.c | 11 +---------- arch/arm64/src/common/arm64_smpcall.c | 12 +----------- arch/x86_64/src/intel64/intel64_smpcall.c | 3 --- 4 files changed, 3 insertions(+), 34 deletions(-) diff --git a/arch/arm/src/armv7-a/arm_smpcall.c b/arch/arm/src/armv7-a/arm_smpcall.c index d83b9e6835047..220359fc0a77d 100644 --- a/arch/arm/src/armv7-a/arm_smpcall.c +++ b/arch/arm/src/armv7-a/arm_smpcall.c @@ -68,16 +68,7 @@ int arm_smp_sched_handler(int irq, void *context, void *arg) { - struct tcb_s *tcb; - int cpu = this_cpu(); - - tcb = current_task(cpu); - nxsched_suspend_scheduler(tcb); - nxsched_process_delivered(cpu); - tcb = current_task(cpu); - nxsched_resume_scheduler(tcb); - - UNUSED(tcb); + nxsched_process_delivered(this_cpu()); return OK; } diff --git a/arch/arm/src/armv7-r/arm_smpcall.c b/arch/arm/src/armv7-r/arm_smpcall.c index 52844957a91ae..5b963f7c26091 100644 --- a/arch/arm/src/armv7-r/arm_smpcall.c +++ b/arch/arm/src/armv7-r/arm_smpcall.c @@ -68,16 +68,7 @@ int arm_smp_sched_handler(int irq, void *context, void *arg) { - struct tcb_s *tcb; - int cpu = this_cpu(); - - tcb = current_task(cpu); - nxsched_suspend_scheduler(tcb); - nxsched_process_delivered(cpu); - tcb = current_task(cpu); - nxsched_resume_scheduler(tcb); - - UNUSED(tcb); + nxsched_process_delivered(this_cpu()); return OK; } diff --git a/arch/arm64/src/common/arm64_smpcall.c b/arch/arm64/src/common/arm64_smpcall.c index 0b42ba5ad4c4a..77f649c59c929 100644 --- a/arch/arm64/src/common/arm64_smpcall.c +++ b/arch/arm64/src/common/arm64_smpcall.c @@ -67,17 +67,7 @@ int arm64_smp_sched_handler(int irq, void *context, void *arg) { - struct tcb_s *tcb; - int cpu = this_cpu(); - - tcb = current_task(cpu); - nxsched_suspend_scheduler(tcb); - nxsched_process_delivered(cpu); - tcb = current_task(cpu); - nxsched_resume_scheduler(tcb); - - UNUSED(tcb); - + nxsched_process_delivered(this_cpu()); return OK; } diff --git a/arch/x86_64/src/intel64/intel64_smpcall.c b/arch/x86_64/src/intel64/intel64_smpcall.c index 8e4413b0129ae..a0d78a3dbdb90 100644 --- a/arch/x86_64/src/intel64/intel64_smpcall.c +++ b/arch/x86_64/src/intel64/intel64_smpcall.c @@ -94,11 +94,8 @@ int x86_64_smp_sched_handler(int irq, void *c, void *arg) struct tcb_s *tcb; int cpu = this_cpu(); - tcb = current_task(cpu); - nxsched_suspend_scheduler(tcb); nxsched_process_delivered(cpu); tcb = current_task(cpu); - nxsched_resume_scheduler(tcb); x86_64_restorestate(tcb->xcp.regs); return OK;