Skip to content

[PW_SID:978120] Add SiFive power provider driver#596

Closed
linux-riscv-bot wants to merge 4 commits into
workflow__riscv__fixesfrom
pw978120
Closed

[PW_SID:978120] Add SiFive power provider driver#596
linux-riscv-bot wants to merge 4 commits into
workflow__riscv__fixesfrom
pw978120

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 978120 applied to workflow__riscv__fixes

Name: Add SiFive power provider driver
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=978120
Version: 3

Linux RISC-V bot and others added 4 commits June 27, 2025 17:47
SiFive Domain Management controller includes the following components
- SiFive Tile Management Controller
- SiFive Cluster Management Controller
- SiFive Core Complex Management Controller

These controllers control the clock and power domain of the
corresponding domain.

Add `- {}` for the first entry [1][2]. Once the SoCs are ready, we will
add the SoC compatible string at that time.

Links:
- [1] https://lore.kernel.org/lkml/20250311195953.GA14239-robh@kernel.org/
- [2] https://lore.kernel.org/lkml/CAKddAkAzDGL-7MbroRqQnZzPXOquUMKNuGGppqB-d_XZXbcvBA@mail.gmail.com/T/#t

Signed-off-by: Nick Hu <nick.hu@sifive.com>
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
To work with the external pmdomain driver, exposing the
`sbi_cpuidle_pd_power_off` and `sbi_dt_parse_state_node` so the external
pmdomain driver can parse the riscv idle state data and set the domain
idle state where powering off. In addition, separate the genpd init and
the idle driver init. The genpd remains functional even when the idle
state is absent.

Co-developed-by: Samuel Holland <samuel.holland@sifive.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Signed-off-by: Nick Hu <nick.hu@sifive.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The SiFive DMC is the power provider of the devices that inside the
SiFive CPU power domains, which include Tile, Cluster and Core Complex
power domains. Before the cpu entering the firmware-based idle state,
each devices that inside the corresponding domain should be suspended
properly. So this driver will create the power provider and set the
correct idle state.

Signed-off-by: Nick Hu <nick.hu@sifive.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/3] dt-bindings: power: Add SiFive Domain Management controllers"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 101.42 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/3] dt-bindings: power: Add SiFive Domain Management controllers"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 916.39 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/3] dt-bindings: power: Add SiFive Domain Management controllers"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1246.57 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/3] dt-bindings: power: Add SiFive Domain Management controllers"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.85 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/3] dt-bindings: power: Add SiFive Domain Management controllers"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/3] dt-bindings: power: Add SiFive Domain Management controllers"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.73 seconds
Result: WARNING
Output:

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

total: 0 errors, 1 warnings, 0 checks, 58 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 9f62903fb146 ("dt-bindings: power: Add SiFive Domain Management controllers") 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, 58 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/3] dt-bindings: power: Add SiFive Domain Management controllers"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 70.08 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/3] dt-bindings: power: Add SiFive Domain Management controllers"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/3] dt-bindings: power: Add SiFive Domain Management controllers"
kdoc
Desc: Detects for kdoc errors
Duration: 0.83 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/3] dt-bindings: power: Add SiFive Domain Management controllers"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/3] dt-bindings: power: Add SiFive Domain Management controllers"
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: "[v3,1/3] dt-bindings: power: Add SiFive Domain Management controllers"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/3] cpuidle: riscv-sbi: Work with the external pmdomain driver"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 100.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/3] cpuidle: riscv-sbi: Work with the external pmdomain driver"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1003.88 seconds
Result: ERROR
Output:

Redirect to /build/tmp.N3nuk6F5pS and /build/tmp.TAff26u2z8
Tree base:
9f62903fb146a ("dt-bindings: power: Add SiFive Domain Management controllers")
Building the whole tree with the patch
Building the tree before the patch
Building the tree with the patch
New errors added:
--- /build/tmp.YUtCvaJZwu	2025-07-02 10:52:20.987251445 +0000
+++ /build/tmp.rwaF7jpLTJ	2025-07-02 10:52:20.998251432 +0000
@@ -118,0 +119 @@
+      1 /build/tmp_06jhyu7/drivers/cpuidle/cpuidle-riscv-sbi.c:569:1: warning: unused label 'out' [-Wunused-label]
Per-file breakdown
error/warning file pre:
error/warning file post:
pre: 4984 post: 4985



real	13m58.800s
user	526m41.615s
sys	99m48.331s

real	1m20.200s
user	2m50.169s
sys	1m49.140s

real	1m15.472s
user	2m47.355s
sys	1m47.251s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/3] cpuidle: riscv-sbi: Work with the external pmdomain driver"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1496.50 seconds
Result: ERROR
Output:

Redirect to /build/tmp.ThPbklVxXu and /build/tmp.ECrHtJJ9gy
Tree base:
9f62903fb146a ("dt-bindings: power: Add SiFive Domain Management controllers")
Building the whole tree with the patch
Building the tree before the patch
Building the tree with the patch
New errors added:
--- /build/tmp.ILuYwMFRRi	2025-07-02 11:17:18.811748678 +0000
+++ /build/tmp.QkXztlNIBM	2025-07-02 11:17:18.819748671 +0000
@@ -118,0 +119 @@
+      1 /build/tmp_06jhyu7/drivers/cpuidle/cpuidle-riscv-sbi.c:569:1: warning: label 'out' defined but not used [-Wunused-label]
Per-file breakdown
error/warning file pre:
pre: 4984 post: 4985



real	19m23.272s
user	692m15.068s
sys	118m36.872s

real	2m51.653s
user	4m5.964s
sys	1m44.994s

real	2m32.053s
user	3m47.353s
sys	1m43.765s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/3] cpuidle: riscv-sbi: Work with the external pmdomain driver"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.87 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/3] cpuidle: riscv-sbi: Work with the external pmdomain driver"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.54 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/3] cpuidle: riscv-sbi: Work with the external pmdomain driver"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.12 seconds
Result: WARNING
Output:

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

total: 0 errors, 1 warnings, 0 checks, 138 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 91fcafed1d20 ("cpuidle: riscv-sbi: Work with the external pmdomain driver") 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, 138 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/3] cpuidle: riscv-sbi: Work with the external pmdomain driver"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 70.39 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/3] cpuidle: riscv-sbi: Work with the external pmdomain driver"
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 2: "[v3,2/3] cpuidle: riscv-sbi: Work with the external pmdomain driver"
kdoc
Desc: Detects for kdoc errors
Duration: 0.88 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/3] cpuidle: riscv-sbi: Work with the external pmdomain driver"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/3] cpuidle: riscv-sbi: Work with the external pmdomain driver"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/3] cpuidle: riscv-sbi: Work with the external pmdomain driver"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v3,3/3] cpuidle: Add SiFive power provider"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 100.65 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v3,3/3] cpuidle: Add SiFive power provider"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1013.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v3,3/3] cpuidle: Add SiFive power provider"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1497.72 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v3,3/3] cpuidle: Add SiFive power provider"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.29 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v3,3/3] cpuidle: Add SiFive power provider"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.48 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v3,3/3] cpuidle: Add SiFive power provider"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.27 seconds
Result: WARNING
Output:

WARNING: please write a help paragraph that fully describes the config symbol with at least 4 lines
#31: FILE: drivers/cpuidle/Kconfig.riscv:17:
+config SIFIVE_DMC_PD_CPUIDLE
+	bool "SiFive DMC SBI PD Provider Driver"
+	depends on ARCH_SIFIVE && RISCV_SBI && PM && OF
+	select PM_GENERIC_DOMAINS
+	select PM_GENERIC_DOMAINS_OF
+	select RISCV_SBI_CPUIDLE
+	default y
+	help
+	  Select this option to enable SiFive DMC SBI PD Provider driver.
+	  This driver will create the genpd provider and work with the
+	  RISC-V SBI firmware based CPU idle driver.

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

total: 0 errors, 2 warnings, 0 checks, 121 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 ce5b167b407b ("cpuidle: Add SiFive power provider") 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, 2 warnings, 0 checks, 121 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
WARNING: please write a help paragraph that fully describes the config symbol with at least 4 lines


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v3,3/3] cpuidle: Add SiFive power provider"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 70.85 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v3,3/3] cpuidle: Add SiFive power provider"
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 3: "[v3,3/3] cpuidle: Add SiFive power provider"
kdoc
Desc: Detects for kdoc errors
Duration: 0.86 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v3,3/3] cpuidle: Add SiFive power provider"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v3,3/3] cpuidle: Add SiFive power provider"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v3,3/3] cpuidle: Add SiFive power provider"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot force-pushed the workflow__riscv__fixes branch from a7cb30d to d776861 Compare July 2, 2025 18:46
@linux-riscv-bot linux-riscv-bot deleted the pw978120 branch July 9, 2025 08:56
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.

2 participants