Skip to content

[PW_SID:971580] [v3] clk: spacemit: mark K1 pll1_d8 as critical#522

Closed
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw971580
Closed

[PW_SID:971580] [v3] clk: spacemit: mark K1 pll1_d8 as critical#522
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw971580

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 971580 applied to workflow__riscv__fixes

Name: [v3] clk: spacemit: mark K1 pll1_d8 as critical
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=971580
Version: 3

The pll1_d8 clock is enabled by the boot loader, and is ultimately a
parent for numerous clocks, including those used by APB and AXI buses.
Guodong Xu discovered that this clock got disabled while responding to
getting -EPROBE_DEFER when requesting a reset controller.

The needed clock (CLK_DMA, along with its parents) had already been
enabled.  To respond to the probe deferral return, the CLK_DMA clock
was disabled, and this led to parent clocks also reducing their enable
count.  When the enable count for pll1_d8 was decremented it became 0,
which caused it to be disabled.  This led to a system hang.

Marking that clock critical resolves this by preventing it from being
disabled.

Define a new macro CCU_FACTOR_GATE_DEFINE() to allow clock flags to
be supplied for a CCU_FACTOR_GATE clock.

Fixes: 1b72c59 ("clk: spacemit: Add clock support for SpacemiT K1 SoC")
Signed-off-by: Alex Elder <elder@riscstar.com>
Tested-by: Guodong Xu <guodong@riscstar.com>
Reviewed-by: Haylen Chu <heylenay@4d2.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3] clk: spacemit: mark K1 pll1_d8 as critical"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 107.97 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3] clk: spacemit: mark K1 pll1_d8 as critical"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1024.96 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3] clk: spacemit: mark K1 pll1_d8 as critical"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1376.46 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3] clk: spacemit: mark K1 pll1_d8 as critical"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.56 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3] clk: spacemit: mark K1 pll1_d8 as critical"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.46 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3] clk: spacemit: mark K1 pll1_d8 as critical"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.97 seconds
Result: WARNING
Output:

CHECK: Alignment should match open parenthesis
#43: FILE: drivers/clk/spacemit/ccu-k1.c:174:
+CCU_FACTOR_GATE_FLAGS_DEFINE(pll1_d8, CCU_PARENT_HW(pll1), APBS_PLL1_SWCR2, BIT(7), 8, 1,
+		CLK_IS_CRITICAL);

total: 0 errors, 0 warnings, 1 checks, 34 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 afb0374a636b ("clk: spacemit: mark K1 pll1_d8 as critical") 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, 0 warnings, 1 checks, 34 lines checked
CHECK: Alignment should match open parenthesis


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3] clk: spacemit: mark K1 pll1_d8 as critical"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 71.99 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3] clk: spacemit: mark K1 pll1_d8 as critical"
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 1: "[v3] clk: spacemit: mark K1 pll1_d8 as critical"
kdoc
Desc: Detects for kdoc errors
Duration: 0.90 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3] clk: spacemit: mark K1 pll1_d8 as critical"
module-param
Desc: Detect module_param changes
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3] clk: spacemit: mark K1 pll1_d8 as critical"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3] clk: spacemit: mark K1 pll1_d8 as critical"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw971580 branch June 20, 2025 01:05
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