Bug 200905 - pxa_gpio conflicts with suspend on unrelated hw (tegra)
Summary: pxa_gpio conflicts with suspend on unrelated hw (tegra)
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-23 09:11 UTC by NicolasChauvet
Modified: 2018-09-11 07:20 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.18.1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Full log of systemctl suspend on trimslice (37.63 KB, text/plain)
2018-08-23 09:11 UTC, NicolasChauvet
Details
fedora based custom kernel config for armv7hl (201.23 KB, text/plain)
2018-08-23 19:39 UTC, NicolasChauvet
Details
First patch pxa_gpio suspend (4.82 KB, text/plain)
2018-08-29 18:34 UTC, NicolasChauvet
Details

Description NicolasChauvet 2018-08-23 09:11:33 UTC
Created attachment 278037 [details]
Full log of systemctl suspend on trimslice

When trying to enter suspend on a tegra20 arm device (Trimslice). I've experienced a crash with the pxa_gpio driver.

This driver shouldn't have been registered on the device.
This was discovered using a serial console and initcall_debug no_console_suspend=1

Please see attached a full log of the issue.
Once the pxa_gpio driver is disabled, I can suspend just fine.

For info, I'm using a distro kernel close to fedora 4.18x kernel.


FYI, the only arch that seems to rely on pxa_gpi is MMP2.
Comment 1 NicolasChauvet 2018-08-23 09:12:59 UTC
quote from the call trace:

---
[  118.291482] Disabling non-boot CPUs ...
[  118.321187] PM: Calling ledtrig_cpu_syscore_suspend+0x0/0x24
[  118.326961] PM: Calling sched_clock_suspend+0x0/0x40
[  118.331966] PM: Calling timekeeping_suspend+0x0/0x2bc
[  118.331966] PM: Calling irq_gc_suspend+0x0/0x80
[  118.331966] PM: Calling fw_suspend+0x0/0x28
[  118.331966] PM: Calling pxa_gpio_suspend+0x0/0x74
[  118.331966] Unable to handle kernel NULL pointer dereference at virtual address 000000d0
[  118.331966] pgd = 8e57fbdd
[  118.331966] [000000d0] *pgd=00000000
[  118.331966] Internal error: Oops: 5 [#1] SMP ARM
[  118.331966] Modules linked in: ofpart m25p80 spi_nor mtd tegra_drm snd_soc_tegra_trimslice snd_soc_tegra_utils cec rc_core drm_kms_helper snd_soc_tegra20_i2s snd_soc_tlv320aic23_i2c snd_soc_tlv320aic23 snd_sa
[  118.331966] CPU: 0 PID: 656 Comm: systemd-sleep Tainted: G         C        4.18.0-0.rc8.git0.1.tegra.fc28.armv7hl #1
[  118.331966] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[  118.331966] PC is at pxa_gpio_suspend+0x20/0x74
[  118.331966] LR is at syscore_suspend+0x140/0x270
[  118.331966] pc : [<c070f270>]    lr : [<c082a630>]    psr: 600f0193
[  118.331966] sp : c319bda8  ip : ffffffff  fp : c319bdb4
[  118.331966] r10: 00000004  r9 : c1304d80  r8 : c0e22934
[  118.331966] r7 : c13efb20  r6 : c13efb20  r5 : c1397ccc  r4 : 00000000
[  118.331966] r3 : 00000000  r2 : 00000000  r1 : 00000007  r0 : 00000000
[  118.331966] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
[  118.331966] Control: 10c5387d  Table: 2b73804a  DAC: 00000051
[  118.331966] Process systemd-sleep (pid: 656, stack limit = 0x21bb6793)
---
Comment 2 NicolasChauvet 2018-08-23 19:39:47 UTC
Created attachment 278051 [details]
fedora based custom kernel config for armv7hl
Comment 3 NicolasChauvet 2018-08-23 20:10:22 UTC
The previous config is the fixed config (without PXA_GPIO enabled).

Here is my reference configuration:
https://src.fedoraproject.org/rpms/kernel/blob/master/f/kernel-armv7hl.config

This is a distro config where there is only supposed to have armv7 and multiarch capable platform and drivers (built as module whenever possible).

I expect that the CONFIG_ARCH_MMP and CONFIG_ARCH_MMP2_DT need pxa_gpio. But are both or only the later are armv7 capable ?
So having CONFIG_ARCH_MMP disabled in the fedora config could be a way forward.
Comment 4 NicolasChauvet 2018-08-29 18:34:45 UTC
Created attachment 278201 [details]
First patch pxa_gpio suspend
Comment 5 NicolasChauvet 2018-08-29 18:35:17 UTC
The previous patch doesn't work for me, the problem looks the same.

Note You need to log in before you can comment on or make changes to this bug.