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

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   This takes over the note part of #21354 by @W-M-R, split out as its review 
asked. The other two commits of #21354 are in master already (3834597df66 and 
06464bbc764).
   
   - **note: Add CONFIG_DRIVERS_NOTE_CPUID config**: without SMP or BMP every 
note records CPU 0. The new option sets the CPU ID that `note_common()` writes 
into `nc_cpu`, so that the notes of several single-core systems can be told 
apart.
   
   ## Impact
   
   - New Kconfig option `DRIVERS_NOTE_CPUID`, default 0, only with the 
uniprocessor choice `UP` (in master since 1a7babf631a). With the default the 
notes do not change.
   - The text dump of noteram prints CPU 0 on a build without SMP whatever 
`nc_cpu` holds; the binary dump and the other note channels carry the 
configured value.
   - No change for SMP or BMP builds.
   
   ## Testing
   
   Host: Ubuntu 22.04 x86_64, GCC 13.4.0 (sim), CMake 3.23 + Ninja 1.10. Base: 
master 4f8706c4b35.
   
   `./tools/checkpatch.sh -c -u -m -g HEAD~1..HEAD` passes.
   
   `sim:note` with hostfs: `trace start`, `sleep 1`, `trace stop`, `trace dump 
-b /host/a.bin`, then a walk over the notes of the binary dump (`nc_cpu` is the 
4th byte of each note):
   
   ```
   master:                         5031 notes, nc_cpu 0 in all of them
   this PR, DRIVERS_NOTE_CPUID=5:  2631 notes, nc_cpu 5 in all of them
   ```
   
   `sim:smp` with the note driver builds and does not offer the option. Make 
builds `sim:note` with `DRIVERS_NOTE_CPUID=5`.
   
   Not tested: real hardware.
   


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

  • [PR] note: add CONFIG_DRIVERS... huojianchaoyy (via GitHub) via commits

Reply via email to