hujun260 opened a new pull request, #22037:
URL: https://github.com/apache/nuttx/pull/22037

   # arm_m: merge ARM-M syscall dispatch implementation
   
   ## Summary
   
   Merge the duplicated `arm_dispatch_syscall.S` implementation used by ARMv6-M,
   ARMv7-M, and ARMv8-M into the common `arch/arm/src/arm_m` directory.
   
   This keeps the syscall dispatch implementation in one place and reduces the
   maintenance cost of applying assembly and CFI changes to multiple ARM-M
   architecture directories.
   
   ## Changes
   
   - Move `arm_dispatch_syscall.S` from `arch/arm/src/armv6-m` to
     `arch/arm/src/arm_m`.
   - Add the common source to the ARM-M Make and CMake source lists.
   - Remove the duplicate ARMv7-M and ARMv8-M source files.
   - Remove the duplicate source-list entries from the ARMv6-M, ARMv7-M, and
     ARMv8-M Make/CMake descriptions.
   - Update the syscall dispatch assembly CFI directives so the saved registers
     and return address are described for stack unwinding and syscall debugging.
   
   ## Commits
   
   - `67840e84a46f4d8e4fce58964cda2286dbcb5fd7` arm-m: Optimize CFI 
instructions to debug syscall
   - `778b887dfc730b1cab74e8ee685c2c397cd9ab7f` arm_m: merge 
arm_dispatch_syscall.S
   
   ## Testing
   
   ### Checkpatch
   
   Command executed from `nuttx`:
   
   ```text
   $ tools/checkpatch.sh -c -u -m -g HEAD~2..HEAD
   Used config files:
       1: .codespellrc
   ✔️ All checks pass.
   ```
   
   ### CMake/Ninja build
   
   A clean CMake/Ninja build was attempted with the ARMv8-M configuration:
   
   ```text
   $ cmake -S . -B /tmp/nuttx-pr-build \\
       -DBOARD_CONFIG=nucleo-h563zi:nsh -GNinja
   $ ninja -C /tmp/nuttx-pr-build
   ```
   
   CMake configuration completed and generated the build files. The build did
   not complete. The first reported compiler failure was:
   
   ```text
   FAILED: arch/CMakeFiles/arch.dir/arm/src/armv8-m/arm_saveusercontext.S.o
   /home/hujun5/work/ssd/online_nuttx/nuttx/include/arch/stm32f4/chip.h:869:4:
   error: #error "Unsupported STM32 chip"
   ```
   
   The same error was then reported while compiling multiple ARMv8-M sources,
   including `arm_exception.S`, `arm_svcall.c`, `arm_cache.c`, and
   `arm_systemreset.c`. This local build result is recorded as **failed**. The
   failure has not been attributed to this PR because the diagnostic originates
   from the selected STM32 configuration/header combination rather than from
   `arm_dispatch_syscall.S`.
   
   ### Runtime test
   
   Not run. No hardware or simulator runtime log is included.
   
   ## Scope not tested
   
   - ARMv6-M, ARMv7-M, and ARMv8-M Make builds were not completed separately.
   - Protected and kernel builds were not run.
   - Hardware and simulator runtime tests were not run.
   - The GitHub Actions `arm-other` matrix was not reproduced locally.
   
   ## Review notes
   
   The functional change is limited to the common ARM-M syscall dispatch source
   and its Make/CMake source registration. The ARMv7-M and ARMv8-M copies are
   removed because their implementation is now provided through 
`arm_m/Make.defs`
   and `arm_m/CMakeLists.txt`.
   


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