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

   # arch/arm: consolidate shared ARM A/R sources in arm_a_r
   
   ## Summary
   
   Consolidate the shared ARM A/R architecture sources under 
`arch/arm/src/arm_a_r`.
   
   This PR contains two related changes:
   
   1. Move `arm_tcbinfo.c` from the ARMv7-A directory to `arm_a_r`.
   2. Move the shared `sctlr.h` definitions from ARMv7-A to `arm_a_r` and 
remove the duplicate ARMv7-R and ARMv8-R copies.
   
   ## Changes
   
   ### TCB register information
   
   - Move `arch/arm/src/armv7-a/arm_tcbinfo.c` to 
`arch/arm/src/arm_a_r/arm_tcbinfo.c`.
   - Add the source to `arm_a_r/Make.defs`.
   - Add the source to `arm_a_r/CMakeLists.txt`.
   - Remove the old entries from the generic ARM, ARMv7-A, ARMv7-R, and ARMv8-R 
Make/CMake source lists.
   
   ### SCTLR definitions
   
   - Move `arch/arm/src/armv7-a/sctlr.h` to `arch/arm/src/arm_a_r/sctlr.h`.
   - Remove the duplicate ARMv7-R `sctlr.h`.
   - Remove the duplicate ARMv8-R `sctlr.h`.
   - Make the shared ARM A/R implementation use one common SCTLR header 
location.
   
   ## Rationale
   
   `arm_tcbinfo.c` and `sctlr.h` are shared by ARMv7-A, ARMv7-R, and ARMv8-R. 
Keeping separate copies in profile-specific directories creates duplication and 
makes common source ownership unclear. The `arm_a_r` directory is the 
appropriate common location for these definitions and implementations.
   
   ## Build-system impact
   
   Both Make and CMake source lists are updated consistently:
   
   ```text
   arch/arm/src/arm_a_r/Make.defs
   arch/arm/src/arm_a_r/CMakeLists.txt
   ```
   
   The old profile-specific references are removed from the ARMv7-A, ARMv7-R, 
and ARMv8-R build descriptions.
   
   ## Testing
   
   ```text
   $ git diff --check
   
   $ tools/checkpatch.sh -g apache/master..HEAD
   ✔️ All checks pass.
   ```
   
   The two commits were checked to ensure that each moved shared file is 
included exactly once by the corresponding Make and CMake build descriptions.
   
   ## Commits
   
   ```text
   arch/arm: move arm_tcbinfo.c to arm_a_r
   arch/arm_a_r: merge sctlr.h
   ```
   


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