On 12/9/2024 3:52 PM, Nathan Hartman wrote:
Hi all,

Unfortunately I missed the PR before it was merged, but PR-15073 has
broken High Priority, Zero Latency Interrupts! Fortunately I caught it
now. It was merged 17 hours ago.

This PR removed a very important Kconfig: config ARMV7M_USEBASEPRI,
and much of the logic related to it. This config is *required* when
using CONFIG_ARCH_HIPRI_INTERRUPT.

High Priority, Zero Latency Interrupts are documented here:
https://nuttx.apache.org/docs/latest/guides/zerolatencyinterrupts.html

I depend strongly on Zero Latency Interrupts. It is *required* for
critical handling in my firmware. I cannot use NuttX at all if NuttX
does not have Zero Latency Interrupts anymore.

PR-15073 was meant to fix a regression in PR-14881. PR-14881 attempted
to optimize handling of g_current_regs. The commit log of PR-15073
explains this. [1]

We have to find another way to fix it, without destroying the Zero
Latency Interrupts feature. Otherwise, it is a very serious problem.

I suggest to revert PR-15073, and possibly revert PR-14881, and find
another way to implement PR-14881 that doesn't cause this problem.

References:

[1] PR-15073: 
https://github.com/apache/nuttx/commit/0e1b432dd068880d353ae91c01e610f85b4a16ea#diff-24754055e0d9f2d702b8503e7f5b520394cb59affb5d24457fe0641c1d7678ceL27

[2] PR-14881: https://github.com/apache/nuttx/pull/14881

[3] High Priority Zero Latency Interrupts:
https://nuttx.apache.org/docs/latest/guides/zerolatencyinterrupts.html

Thanks,
Nathan

Using the basepri register would also be important if you ever want to implement nested interrupts.  I purist would say that nested, priority interrupts is necessary for true real-time performance.  More info:  https://cwiki.apache.org/confluence/display/NUTTX/Nested+Interrupts

Samsung has a working implementation of this in TizenRT: The are about 3 or 4 commits in May of 2019 that provides the full implementation.  It should drop into those architectures pretty simply.


Reply via email to