[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <232267bf-d226-43df-bd4f-5977706176a2@kernel.org>
Date: Thu, 3 Jul 2025 12:19:53 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: André Draszik <andre.draszik@...aro.org>,
Peter Griffin <peter.griffin@...aro.org>,
Tudor Ambarus <tudor.ambarus@...aro.org>,
Alim Akhtar <alim.akhtar@...sung.com>
Cc: William Mcvicker <willmcvicker@...gle.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
linux-arm-kernel@...ts.infradead.org, linux-samsung-soc@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-team@...roid.com
Subject: Re: [PATCH v3] soc: samsung: exynos-pmu: Enable CPU Idle for gs101
On 03/07/2025 12:12, André Draszik wrote:
> Thanks Pete for your patch!
>
> On Fri, 2025-06-27 at 14:08 +0100, Peter Griffin wrote:
>> Register cpu pm notifiers for gs101 which call the
>> gs101_cpu_pmu_online/offline callbacks which in turn program the ACPM
>> hint. This is required to actually enter the C2 idle state.
>>
>> A couple of corner cases are handled, namely when the system is rebooting
>> or suspending we ignore the request. Additionally the request is ignored if
>> the CPU is in CPU hot plug. Some common code is refactored so that it can
>> be called from both the CPU hot plug callback and CPU PM notifier taking
>> into account that CPU PM notifiers are called with IRQs disabled whereas
>> CPU hotplug callbacks aren't.
>>
>> Note: this patch has a runtime dependency on adding 'local-timer-stop' dt
>> property to the CPU nodes. This informs the time framework to switch to a
>> broadcast timer as the local timer will be shutdown. Without that DT
>> property specified the system hangs in early boot with this patch applied.
>>
>> Signed-off-by: Peter Griffin <peter.griffin@...aro.org>
>
> With this applied, I see the following during boot:
>
> [ 1.841304][ T0] =============================
> [ 1.841422][ T0] [ BUG: Invalid wait context ]
> [ 1.841550][ T0] 6.16.0-rc4-next-20250702+ #54 Tainted: G U T
> [ 1.841727][ T0] -----------------------------
> [ 1.841844][ T0] swapper/0/0 is trying to lock:
> [ 1.841965][ T0] ffff000800ee84b8 (&pmu_context->cpupm_lock){....}-{3:3}
> [ 1.842001][ T0] , at: gs101_cpu_pm_notify_callback+0x48/0x100
> [ 1.842309][ T0] other info that might help us debug this:
> [ 1.842613][ T0] context-{5:5}
> [ 1.842987][ T0] 1 lock held by swapper/0/0:
> [ 1.843442][ T0] #0:
> [ 1.843859][ T0] ffffafe9d8f1f100
> [ 1.844282][ T0] (
> [ 1.844618][ T0] cpu_pm_notifier.lock
> [ 1.844980][ T0] ){....}-{2:2}, at: cpu_pm_enter+0x30/0x88
> [ 1.845340][ T0] stack backtrace:
> [ 1.845855][ T0] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G U T 6.16.0-rc4-next-20250702+ #54 PREEMPT
> [ 1.845878][ T0] Tainted: [U]=USER, [T]=RANDSTRUCT
> [ 1.845884][ T0] Hardware name: Oriole (DT)
> [ 1.845897][ T0] Call trace:
> [ 1.845909][ T0] show_stack+0x24/0x38 (C)
> [ 1.845934][ T0] dump_stack_lvl+0x40/0xc0
> [ 1.845949][ T0] dump_stack+0x18/0x24
> [ 1.845956][ T0] __lock_acquire+0xc68/0xd90
> [ 1.845976][ T0] lock_acquire+0x14c/0x2b8
> [ 1.845985][ T0] _raw_spin_lock+0x54/0x78
> [ 1.846011][ T0] gs101_cpu_pm_notify_callback+0x48/0x100
> [ 1.846021][ T0] notifier_call_chain+0xb0/0x198
> [ 1.846046][ T0] raw_notifier_call_chain_robust+0x50/0xb0
> [ 1.846053][ T0] cpu_pm_enter+0x4c/0x88
> [ 1.846063][ T0] psci_enter_idle_state+0x2c/0x70
> [ 1.846078][ T0] cpuidle_enter_state+0x14c/0x4c0
> [ 1.846097][ T0] cpuidle_enter+0x44/0x68
> [ 1.846121][ T0] do_idle+0x1f0/0x2a8
> [ 1.846142][ T0] cpu_startup_entry+0x40/0x50
> [ 1.846152][ T0] rest_init+0x1c4/0x1d0
> [ 1.846161][ T0] start_kernel+0x358/0x438
> [ 1.846181][ T0] __primary_switched+0x88/0x98
Thanks for the report. Probably such code should be always tested with
lock debugging options enabled, e.g.:
https://github.com/krzk/tools/blob/master/linux/build.sh#L845
Best regards,
Krzysztof
Powered by blists - more mailing lists