-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add thermal framework #12824
Add thermal framework #12824
Conversation
Nice work @JianyuWang0623 kudos!!! Since it is a new subsystem we need Documentation/ to it, please submit it (on this PR or in a new one) |
Please fix these issues:
|
Signed-off-by: wangjianyu3 <[email protected]>
Signed-off-by: wangjianyu3 <[email protected]>
Signed-off-by: wangjianyu3 <[email protected]>
Signed-off-by: wangjianyu3 <[email protected]>
Signed-off-by: wangjianyu3 <[email protected]>
Signed-off-by: wangjianyu3 <[email protected]>
Signed-off-by: wangjianyu3 <[email protected]>
Test: ./tools/configure.sh -l sim:thermal && make -j8 Signed-off-by: wangjianyu3 <[email protected]>
Called by both of lpwork and Idle_Task: [ 0.000000] [ 0] [ INFO] [ap] thermal_zone_device_register: Registered zone device cpu-thermal [ 0.000000] [ 0] [ EMERG] [ap] _assert: Current Version: NuttX ap 0.0.0 Dec 11 2023 20:59:20 sim [ 0.000000] [ 0] [ EMERG] [ap] _assert: Assertion failed : at file: thermal/thermal_core.c:820 task: Idle_Task process: Kernel 0x32ade29 Signed-off-by: wangjianyu3 <[email protected]>
Ref: I7afe1047369e91662583c8ef9c98fffcf567fbb7 ``` sched: move etc romfs mount from nsh to sched/init ``` Signed-off-by: wangjianyu3 <[email protected]>
Signed-off-by: wangjianyu3 <[email protected]>
``` CID 1159822: (apache#1 of 2): 宏将无符号值与 0 做了比较 (NO_EFFECT) unsigned_compare: 不带符号值的此 greater-than-or-equal-to-zero 比较总是为 true。index >= 0U。 ``` Signed-off-by: wangjianyu3 <[email protected]>
…nd "hot" trip. Signed-off-by: wangjianyu3 <[email protected]>
Signed-off-by: wangjianyu3 <[email protected]>
When exec "echo 1 > /proc/thermal/cpu-thermal", procfs get "\n" after "1", treat as disable: ``` apache#1 0x000000000040f452 in thermal_procfs_write (filep=0x7ffff3d241e8, buffer=0x7ffff3d344fc "\n", buflen=1) at thermal/thermal_procfs.c:179 ``` Signed-off-by: wangjianyu3 <[email protected]>
ping @JianyuWang0623 |
All got, will update later |
d40b702
to
6b89240
Compare
apache#12824 Signed-off-by: wangjianyu3 <[email protected]>
1. cpufreq.h not found if cpufreq is not supported on some branches. ./thermal/thermal_dummy.c:25:10: fatal error: nuttx/cpufreq.h: No such file or directory 25 | #include <nuttx/cpufreq.h> | ^~~~~~~~~~~~~~~~~ compilation terminated. 2. debug.h is included by including <nuttx/cpufreq.h>, should not. CC: thermal/thermal_dummy.c thermal/thermal_dummy.c: In function ‘thermal_dummy_init’: thermal/thermal_dummy.c:338:7: warning: implicit declaration of function ‘therr’ [-Wimplicit-function-declaration] 338 | therr("Register cooling device fan0 failed!\n"); | apache#12824 Signed-off-by: wangjianyu3 <[email protected]>
33edaa1
to
01fd7b6
Compare
Done, please see Add Documentation for thermal framework |
Done |
CPUFreq has not upstreamed to apache:nuttx Warning/Error: $ make distclean $ ./tools/configure.sh -l sim:thermal $ make savedefconfig $ diff defconfig boards/sim/sim/sim/configs/thermal/defconfig 18a19 > CONFIG_CPUFREQ=y 73a75 > CONFIG_THERMAL_CDEV_CPUFREQ=y 74a77 > CONFIG_THERMAL_DUMMY_CPUFREQ=y Signed-off-by: wangjianyu3 <[email protected]>
01fd7b6
to
4994bad
Compare
Signed-off-by: wangjianyu3 <[email protected]>
4994bad
to
976bf30
Compare
#12824 Signed-off-by: wangjianyu3 <[email protected]>
1. cpufreq.h not found if cpufreq is not supported on some branches. ./thermal/thermal_dummy.c:25:10: fatal error: nuttx/cpufreq.h: No such file or directory 25 | #include <nuttx/cpufreq.h> | ^~~~~~~~~~~~~~~~~ compilation terminated. 2. debug.h is included by including <nuttx/cpufreq.h>, should not. CC: thermal/thermal_dummy.c thermal/thermal_dummy.c: In function ‘thermal_dummy_init’: thermal/thermal_dummy.c:338:7: warning: implicit declaration of function ‘therr’ [-Wimplicit-function-declaration] 338 | therr("Register cooling device fan0 failed!\n"); | #12824 Signed-off-by: wangjianyu3 <[email protected]>
Summary
Please see Documentation/components/drivers/thermal/index.rst of this PR for more details
Impact
New feature, disabled by default.
Testing
Configuration & Build
Runtime