CV-Bowen opened a new pull request, #21895:
URL: https://github.com/apache/nuttx/pull/21895

   ## Summary
   
   Add `irq_save()`/`irq_restore()` to `include/nuttx/irq.h` as the
   architecture-independent way for code outside `arch/` to disable and
   restore local interrupts.  For now they map directly to
   `up_irq_save()`/`up_irq_restore()`; having one name above the arch layer
   gives a single place to hook IRQ-disabled time monitoring later.
   
   The first user is the lock-free ring (`include/nuttx/ring.h`), which
   will follow in a separate PR and depends on this one.  Existing
   `up_irq_save()` callers are not converted here.
   
   ## Impact
   
   - Two new macros, defined only when `__ASSEMBLY__` is not defined.
   - No behaviour, Kconfig, build or ABI change; nothing in the tree uses
     them yet.
   
   ## Testing
   
   Host: Ubuntu 22.04.5 LTS x86_64, QEMU version 10.2.1, sim: cc (Ubuntu 
13.1.0-8ubuntu1~22.04) 13.1.0, qemu-armv8a: aarch64-none-elf-gcc (Arm GNU 
Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205
   
   Built `sim:nsh` with the ring PR applied on top and
   `CONFIG_TESTING_CMOCKA=y CONFIG_TESTING_RING=y` (the ring cmocka tests,
   apps PR to follow), then ran `ring_test`:
   
   | tree | result |
   |---|---|
   | master + ring | link fails: `undefined reference to 'irq_save'` / 
`'irq_restore'` from `include/nuttx/ring.h` |
   | master + this PR + ring | builds with no warnings; 80/80 cmocka cases pass 
|
   
   <details><summary>ring_test (master + this PR + ring)</summary>
   
   ```
   [==========] g_spsc_local_tests: Running 36 test(s).
   [==========] g_spsc_local_tests: 36 test(s) run.
   [  PASSED  ] 36 test(s).
   [==========] g_mpsc_local_tests: Running 11 test(s).
   [==========] g_mpsc_local_tests: 11 test(s) run.
   [  PASSED  ] 11 test(s).
   [==========] g_spmc_local_tests: Running 11 test(s).
   [==========] g_spmc_local_tests: 11 test(s) run.
   [  PASSED  ] 11 test(s).
   [==========] g_mpmc_local_tests: Running 22 test(s).
   [==========] g_mpmc_local_tests: 22 test(s) run.
   [  PASSED  ] 22 test(s).
   ```
   
   </details>
   
   No regression in rpmsg: sim:rpserver/rpproxy and 
qemu-armv8a:rpserver/rpproxy boot and pass the fixed rpmsg cases (dump, ping, 
rpmsgfs; 15/15). qemu-armv8a was built with LIBC_ENVPATH and BINFMT_CHECKEXEC 
disabled, which current master needs for nxinit to start nsh there; unrelated 
to this change.
   


-- 
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]

Reply via email to