Skip to content

[PW_SID:1085935] thermal: spacemit: Add support for SpacemiT K1 SoC thermal sensor#1819

Closed
linux-riscv-bot wants to merge 5 commits into
workflow__riscv__fixesfrom
pw1085935
Closed

[PW_SID:1085935] thermal: spacemit: Add support for SpacemiT K1 SoC thermal sensor#1819
linux-riscv-bot wants to merge 5 commits into
workflow__riscv__fixesfrom
pw1085935

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1085935 applied to workflow__riscv__fixes

Name: thermal: spacemit: Add support for SpacemiT K1 SoC thermal sensor
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1085935
Version: 5

nathanchance and others added 5 commits April 24, 2026 07:25
…_TYPED_FUNC_START

After commit 67bdd7b ("riscv: Split out measure_cycles() for
reuse") and commit c03ad15 ("riscv: Reuse measure_cycles() in
check_vector_unaligned_access()"), there are CFI failure when booting
kernels with CONFIG_CFI=y:

  CFI failure at measure_cycles+0x38/0xe0 (target: __riscv_copy_words_unaligned+0x0/0x50; expected type: ...)
  CFI failure at measure_cycles+0x38/0xe0 (target: __riscv_copy_vec_words_unaligned+0x0/0x24; expected type: ...)

The __riscv_copy_*_unaligned() functions are now called indirectly but
they are not defined with SYM_TYPED_FUNC_START, which is required for
assembly functions called indirectly from C to pass CFI checking. Switch
to SYM_TYPED_FUNC_START to clear up the CFI failures.

Fixes: 67bdd7b ("riscv: Split out measure_cycles() for reuse")
Fixes: c03ad15 ("riscv: Reuse measure_cycles() in check_vector_unaligned_access()")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Nam Cao <namcao@linutronix.de>
Link: https://patch.msgid.link/20260406-measure_cycles-cfi-failure-v1-1-03e0234ae02f@kernel.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Document the SpacemiT K1 Thermal Sensor, which supports
monitoring temperatures for five zones: soc, package, gpu, cluster0,
and cluster1.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Shuwei Wu <shuwei.wu@mailbox.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The thermal sensor on K1 supports monitoring five temperature zones.
The driver registers these sensors with the thermal framework
and supports standard operations:
- Reading temperature (millidegree Celsius)
- Setting high/low thresholds for interrupts

Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Reviewed-by: Yao Zi <me@ziyao.cc>
Tested-by: Vincent Legoll <legoll@online.fr> # OrangePi-RV2
Tested-by: Gong Shuai <gsh517025@gmail.com>
Signed-off-by: Shuwei Wu <shuwei.wu@mailbox.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Include the Thermal Sensor node in the SpacemiT K1 dtsi
with definitions for registers, clocks, and interrupts.
Additionally, configure thermal zones for the soc, package, gpu, and
clusters to enable temperature monitoring via the thermal framework.

Tested-by: Vincent Legoll <legoll@online.fr> # OrangePi-RV2
Tested-by: Gong Shuai <gsh517025@gmail.com>
Signed-off-by: Shuwei Wu <shuwei.wu@mailbox.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/3] dt-bindings: thermal: Add SpacemiT K1 thermal sensor"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 136.79 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/3] dt-bindings: thermal: Add SpacemiT K1 thermal sensor"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 923.36 seconds
Result: ERROR
Output:

Redirect to /build/tmp.6ZPnMIPQH7 and /build/tmp.qH23j5FLR7
Tree base:
01805bc4f902e ("Adding CI files")
Building the whole tree with the patch
error:
Warning: /build/tmpok0nh66_/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c:244 struct __packed mtk_mfg_opp_entry { __le32 freq_khz; __le32 voltage_core; __le32 voltage_sram; __le32 posdiv; __le32 voltage_margin; __le32 power_mw; }; error: Cannot parse struct or union!
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_words_unaligned'; recompile with -fPIC
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_bytes_unaligned'; recompile with -fPIC
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_vec_words_unaligned'; recompile with -fPIC
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_vec_bytes_unaligned'; recompile with -fPIC



real	15m14.717s
user	573m13.101s
sys	106m20.736s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/3] dt-bindings: thermal: Add SpacemiT K1 thermal sensor"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1340.69 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/3] dt-bindings: thermal: Add SpacemiT K1 thermal sensor"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.00 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/3] dt-bindings: thermal: Add SpacemiT K1 thermal sensor"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 26.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/3] dt-bindings: thermal: Add SpacemiT K1 thermal sensor"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.90 seconds
Result: WARNING
Output:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#19: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 76 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 392e1ccdbbe4 ("dt-bindings: thermal: Add SpacemiT K1 thermal sensor") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 76 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/3] dt-bindings: thermal: Add SpacemiT K1 thermal sensor"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.60 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/3] dt-bindings: thermal: Add SpacemiT K1 thermal sensor"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/3] dt-bindings: thermal: Add SpacemiT K1 thermal sensor"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/3] dt-bindings: thermal: Add SpacemiT K1 thermal sensor"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/3] dt-bindings: thermal: Add SpacemiT K1 thermal sensor"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v5,1/3] dt-bindings: thermal: Add SpacemiT K1 thermal sensor"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/3] thermal: spacemit: k1: Add thermal sensor support"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 136.59 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/3] thermal: spacemit: k1: Add thermal sensor support"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 926.03 seconds
Result: ERROR
Output:

Redirect to /build/tmp.hsm0Rc9dI5 and /build/tmp.XUOVMC6OVn
Tree base:
392e1ccdbbe4f ("dt-bindings: thermal: Add SpacemiT K1 thermal sensor")
Building the whole tree with the patch
error:
Warning: /build/tmpix2wu1mr/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c:244 struct __packed mtk_mfg_opp_entry { __le32 freq_khz; __le32 voltage_core; __le32 voltage_sram; __le32 posdiv; __le32 voltage_margin; __le32 power_mw; }; error: Cannot parse struct or union!
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_vec_words_unaligned'; recompile with -fPIC
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_vec_bytes_unaligned'; recompile with -fPIC
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_words_unaligned'; recompile with -fPIC
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_bytes_unaligned'; recompile with -fPIC



real	15m17.605s
user	573m36.445s
sys	106m44.927s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/3] thermal: spacemit: k1: Add thermal sensor support"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1623.47 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/3] thermal: spacemit: k1: Add thermal sensor support"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 24.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/3] thermal: spacemit: k1: Add thermal sensor support"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 26.12 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/3] thermal: spacemit: k1: Add thermal sensor support"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 3.61 seconds
Result: WARNING
Output:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#57: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 317 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit c006f897bd61 ("thermal: spacemit: k1: Add thermal sensor support") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 317 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/3] thermal: spacemit: k1: Add thermal sensor support"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.76 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/3] thermal: spacemit: k1: Add thermal sensor support"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/3] thermal: spacemit: k1: Add thermal sensor support"
kdoc
Desc: Detects for kdoc errors
Duration: 0.90 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/3] thermal: spacemit: k1: Add thermal sensor support"
module-param
Desc: Detect module_param changes
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/3] thermal: spacemit: k1: Add thermal sensor support"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v5,2/3] thermal: spacemit: k1: Add thermal sensor support"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v5,3/3] riscv: dts: spacemit: Add thermal sensor for K1 SoC"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 135.76 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v5,3/3] riscv: dts: spacemit: Add thermal sensor for K1 SoC"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 927.35 seconds
Result: ERROR
Output:

Redirect to /build/tmp.dqJsjnnveL and /build/tmp.jwpl9cjf8d
Tree base:
c006f897bd612 ("thermal: spacemit: k1: Add thermal sensor support")
Building the whole tree with the patch
error:
Warning: /build/tmpv4qwbktn/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c:244 struct __packed mtk_mfg_opp_entry { __le32 freq_khz; __le32 voltage_core; __le32 voltage_sram; __le32 posdiv; __le32 voltage_margin; __le32 power_mw; }; error: Cannot parse struct or union!
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_vec_words_unaligned'; recompile with -fPIC
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_vec_bytes_unaligned'; recompile with -fPIC
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_words_unaligned'; recompile with -fPIC
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_bytes_unaligned'; recompile with -fPIC



real	15m19.060s
user	572m6.459s
sys	106m46.219s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v5,3/3] riscv: dts: spacemit: Add thermal sensor for K1 SoC"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1417.38 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v5,3/3] riscv: dts: spacemit: Add thermal sensor for K1 SoC"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.03 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v5,3/3] riscv: dts: spacemit: Add thermal sensor for K1 SoC"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 26.53 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v5,3/3] riscv: dts: spacemit: Add thermal sensor for K1 SoC"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.37 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v5,3/3] riscv: dts: spacemit: Add thermal sensor for K1 SoC"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.12 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v5,3/3] riscv: dts: spacemit: Add thermal sensor for K1 SoC"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v5,3/3] riscv: dts: spacemit: Add thermal sensor for K1 SoC"
kdoc
Desc: Detects for kdoc errors
Duration: 1.33 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v5,3/3] riscv: dts: spacemit: Add thermal sensor for K1 SoC"
module-param
Desc: Detect module_param changes
Duration: 0.40 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v5,3/3] riscv: dts: spacemit: Add thermal sensor for K1 SoC"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v5,3/3] riscv: dts: spacemit: Add thermal sensor for K1 SoC"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot force-pushed the workflow__riscv__fixes branch from 01805bc to 94a07a2 Compare April 30, 2026 05:50
@linux-riscv-bot linux-riscv-bot deleted the pw1085935 branch April 30, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants