* [PATCH] clk: spacemit: ccu_mix: fix inverted condition in ccu_mix_trigger_fc()
@ 2026-03-05 12:46 Shuwei Wu
2026-03-05 13:19 ` Yixun Lan
2026-03-24 6:45 ` Yixun Lan
0 siblings, 2 replies; 3+ messages in thread
From: Shuwei Wu @ 2026-03-05 12:46 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Yixun Lan, Alex Elder,
Inochi Amaoto, Haylen Chu
Cc: linux-clk, linux-riscv, spacemit, linux-kernel, Shuwei Wu
Fix inverted condition that skips frequency change trigger,
causing kernel panics during cpufreq scaling.
Fixes: 1b72c59db0ad ("clk: spacemit: Add clock support for SpacemiT K1 SoC")
Signed-off-by: Shuwei Wu <shuwei.wu@mailbox.org>
---
drivers/clk/spacemit/ccu_mix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/spacemit/ccu_mix.c b/drivers/clk/spacemit/ccu_mix.c
index 9578366e9746..a8b407049bf4 100644
--- a/drivers/clk/spacemit/ccu_mix.c
+++ b/drivers/clk/spacemit/ccu_mix.c
@@ -73,7 +73,7 @@ static int ccu_mix_trigger_fc(struct clk_hw *hw)
struct ccu_common *common = hw_to_ccu_common(hw);
unsigned int val;
- if (common->reg_fc)
+ if (!common->reg_fc)
return 0;
ccu_update(common, fc, common->mask_fc, common->mask_fc);
---
base-commit: c107785c7e8dbabd1c18301a1c362544b5786282
change-id: 20260305-k1-clk-fix-25b101c88459
Best regards,
--
Shuwei Wu <shuwei.wu@mailbox.org>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: spacemit: ccu_mix: fix inverted condition in ccu_mix_trigger_fc()
2026-03-05 12:46 [PATCH] clk: spacemit: ccu_mix: fix inverted condition in ccu_mix_trigger_fc() Shuwei Wu
@ 2026-03-05 13:19 ` Yixun Lan
2026-03-24 6:45 ` Yixun Lan
1 sibling, 0 replies; 3+ messages in thread
From: Yixun Lan @ 2026-03-05 13:19 UTC (permalink / raw)
To: Shuwei Wu
Cc: Michael Turquette, Stephen Boyd, Alex Elder, Inochi Amaoto,
Haylen Chu, linux-clk, linux-riscv, spacemit, linux-kernel
Hi Shuwei,
On 20:46 Thu 05 Mar , Shuwei Wu wrote:
> Fix inverted condition that skips frequency change trigger,
> causing kernel panics during cpufreq scaling.
>
> Fixes: 1b72c59db0ad ("clk: spacemit: Add clock support for SpacemiT K1 SoC")
> Signed-off-by: Shuwei Wu <shuwei.wu@mailbox.org>
Thanks for catching this..
Reviewed-by: Yixun Lan <dlan@kernel.org>
> ---
> drivers/clk/spacemit/ccu_mix.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/spacemit/ccu_mix.c b/drivers/clk/spacemit/ccu_mix.c
> index 9578366e9746..a8b407049bf4 100644
> --- a/drivers/clk/spacemit/ccu_mix.c
> +++ b/drivers/clk/spacemit/ccu_mix.c
> @@ -73,7 +73,7 @@ static int ccu_mix_trigger_fc(struct clk_hw *hw)
> struct ccu_common *common = hw_to_ccu_common(hw);
> unsigned int val;
>
> - if (common->reg_fc)
> + if (!common->reg_fc)
> return 0;
>
> ccu_update(common, fc, common->mask_fc, common->mask_fc);
>
> ---
> base-commit: c107785c7e8dbabd1c18301a1c362544b5786282
> change-id: 20260305-k1-clk-fix-25b101c88459
>
> Best regards,
> --
> Shuwei Wu <shuwei.wu@mailbox.org>
>
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: spacemit: ccu_mix: fix inverted condition in ccu_mix_trigger_fc()
2026-03-05 12:46 [PATCH] clk: spacemit: ccu_mix: fix inverted condition in ccu_mix_trigger_fc() Shuwei Wu
2026-03-05 13:19 ` Yixun Lan
@ 2026-03-24 6:45 ` Yixun Lan
1 sibling, 0 replies; 3+ messages in thread
From: Yixun Lan @ 2026-03-24 6:45 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Alex Elder, Inochi Amaoto,
Haylen Chu, Shuwei Wu
Cc: Yixun Lan, linux-clk, linux-riscv, spacemit, linux-kernel
On Thu, 05 Mar 2026 20:46:08 +0800, Shuwei Wu wrote:
> Fix inverted condition that skips frequency change trigger,
> causing kernel panics during cpufreq scaling.
>
>
Applied, thanks! Will send to clk maintainer as v7.0 fix
[1/1] clk: spacemit: ccu_mix: fix inverted condition in ccu_mix_trigger_fc()
https://github.com/spacemit-com/linux/commit/54e97360b44bed6b4399dd3be3d65f392df940fa
Best regards,
--
Yixun Lan <dlan@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-24 6:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 12:46 [PATCH] clk: spacemit: ccu_mix: fix inverted condition in ccu_mix_trigger_fc() Shuwei Wu
2026-03-05 13:19 ` Yixun Lan
2026-03-24 6:45 ` Yixun Lan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox