Re: [PATCH v4 0/4] spi: cadence-qspi: Fix runtime PM and system-wide suspend

From: Mark Brown
Date: Mon Feb 26 2024 - 08:28:33 EST


On Mon, Feb 26, 2024 at 05:48:03PM +0530, Dhruva Gole wrote:
> On Feb 22, 2024 at 19:13:29 +0000, Mark Brown wrote:

> > [1/4] spi: cadence-qspi: fix pointer reference in runtime PM hooks
> > commit: 32ce3bb57b6b402de2aec1012511e7ac4e7449dc
> > [2/4] spi: cadence-qspi: remove system-wide suspend helper calls from runtime PM hooks
> > commit: 959043afe53ae80633e810416cee6076da6e91c6
> > [3/4] spi: cadence-qspi: put runtime in runtime PM hooks names
> > commit: 4efa1250b59ebf47ce64a7b6b7c3e2e0a2a9d35a
> > [4/4] spi: cadence-qspi: add system-wide suspend and resume callbacks
> > commit: 078d62de433b4f4556bb676e5dd670f0d4103376

> It seems like between 6.8.0-rc5-next-20240220 and
> 6.8.0-rc5-next-20240222 some of TI K3 platform boot have been broken.

Is this with some specific kernel configuration?

> It particularly seemed related to these patches because we can see
> cqspi_probe in the call trace and also cqspi_suspend toward the top.

It would be useful to bisect which patch, there's only 4 of them...

> See logs for kernel crash in [0] and working in [1]

> [0] https://gist.github.com/DhruvaG2000/ed997452b41d6e5301598225fc579800
> [1] https://gist.github.com/DhruvaG2000/d4e73111aeafaca555ba2d5208deb6dd

The relevant section from the failing log is:

[ 1.516342] printk: legacy bootconsole [ns16550a0] disabled
[ 1.533247] Unable to handle kernel paging request at virtual address 12800000340001b4

..

[ 1.709414] Call trace:
[ 1.711852] __mutex_lock.constprop.0+0x84/0x540
[ 1.716460] __mutex_lock_slowpath+0x14/0x20
[ 1.720719] mutex_lock+0x48/0x54
[ 1.724026] spi_controller_suspend+0x30/0x7c
[ 1.728377] cqspi_suspend+0x1c/0x6c
[ 1.731944] pm_generic_runtime_suspend+0x2c/0x44
[ 1.736640] genpd_runtime_suspend+0xa8/0x254

(it's generally helpful to provide the most relevant section directly.)

The issue here appears to be that we've registered for runtime suspend
prior to registering the controller...

Attachment: signature.asc
Description: PGP signature