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

   # ARM64: support more than 8 CPUs when SMP
   
   ## Summary
   
   Extend the ARM64 SMP interrupt-stack initialization so configurations with 
more than eight CPUs can be supported.
   
   ## Changes
   
   - Extend `g_cpu_int_stacktop` initialization beyond CPU 7.
   - Extend `g_cpu_int_fiq_stacktop` initialization beyond CPU 7 when 
high-priority interrupt support is enabled.
   - Replace the previous hard compile-time limit for `CONFIG_SMP_NCPUS > 8` 
with generated entries for the configured CPU count.
   - Preserve the existing per-CPU interrupt and FIQ stack layout.
   
   ## Problem
   
   The previous implementation stopped compilation for more than eight CPUs 
with:
   
   ```text
   #error This logic needs to extended for CONFIG_SMP_NCPUS > 8
   ```
   
   This prevented valid ARM64 SMP configurations with `CONFIG_SMP_NCPUS` 
greater than 8 from building.
   
   ## Implementation
   
   The per-CPU stack-top arrays now use the configured CPU count to initialize 
an entry for every CPU:
   
   ```c
   uint64_t *const g_cpu_int_stacktop[CONFIG_SMP_NCPUS] =
   {
     /* one interrupt stack entry per configured CPU */
   };
   ```
   
   When `CONFIG_ARCH_HIPRI_INTERRUPT` is enabled, the FIQ stack-top array is 
extended in the same way.
   
   ## Testing
   
   The change is intended for ARM64 SMP configurations with more than eight 
CPUs. Validation should include a configuration with:
   
   ```text
   CONFIG_SMP=y
   CONFIG_SMP_NCPUS=9
   ```
   
   Recommended checks:
   
   ```text
   $ git diff --check
   $ tools/checkpatch.sh -g apache/master..HEAD
   ```
   
   ## Commit
   
   ```text
   a290c68ebbd ARM64: support more than 8 CPUS when SMP
   ```
   


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