arm64/common: Critical Section Optimization.

Replace critical_section with spinlock.
The benefits of doing this are:

1. It makes the code logic clearer, with different resources protected by different locks.

2. It improves system responsiveness and avoids contention issues caused by acquiring the same large lock.

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
This commit is contained in:
wangzhi16
2025-06-20 21:18:26 +08:00
committed by Xiang Xiao
parent a53d58c5c3
commit 4de188cbed
-6
View File
@@ -60,16 +60,10 @@
void arm64_fork_fpureg_save(struct fork_s *context)
{
irqstate_t flags;
/* Take a snapshot of the thread fpu reg context right now */
flags = enter_critical_section();
arm64_fpu_save(context->fpu);
UP_DSB();
leave_critical_section(flags);
}
#endif