xiaoxiang781216 commented on PR #15705: URL: https://github.com/apache/nuttx/pull/15705#issuecomment-2625278109
> The advantage of the first option is that all code does not need to be changed, including the ESP third-party library, and the historical API behavior is the same as before. > We don't patch ESP third-party library at all, https://github.com/espressif/esp-hal-3rdparty/pull/8 could be closed directly. The real fix is this line: https://github.com/apache/nuttx/pull/15691/files#diff-152b325036721476f99d5da8cf9228ce7c3be72cd46c74a388050d0f3e677178R141 ESP HAL need put the early boot code into the special RAM. > For the second option, 90% of the places in the kernel that use spin_lock_irqsave need to be replaced with spin_lock_irqsave_preempt, and all implementations that are not in the nuttx repo also need to be re-modified All code which use the critical section before should be replaced with spin_lock_irqsave by default, only the careful analysis and performance critical code can be switched to spin_lock_irqsave_preempt. The code between spin_lock_irqsave_preempt and spin_lock_irqresore_preempt can't call any function which may wakeup other thread(this mean that even syslog can'be be called between them). This is a very big limitation and I don't believe that 90% critical section can be replaced with spin_lock_irqsave_preempt without issue. -- 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: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org