hujun260 commented on code in PR #15430:
URL: https://github.com/apache/nuttx/pull/15430#discussion_r1904883288
##########
arch/arm/src/armv7-r/arm_l2cc_pl310.c:
##########
@@ -457,18 +460,18 @@ void l2cc_enable(void)
/* Invalidate and enable the cache (must be disabled to do this!) */
- flags = enter_critical_section();
+ flags = spin_lock_irqsave(&g_l2cc_lock);
if ((getreg32(L2CC_CR) & L2CC_CR_L2CEN) != 0)
{
l2cc_disable();
Review Comment:
deadlock
##########
arch/arm/src/armv7-a/arm_l2cc_pl310.c:
##########
@@ -229,6 +230,8 @@
* Private Functions
****************************************************************************/
+static volatile spinlock_t g_l2cc_lock = SP_UNLOCKED;
Review Comment:
remove volatile
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]