[i.MX8 PCIe] PCIe link fails after kexec
He, Guocai (CN)
Guocai.He.CN at windriver.com
Wed Sep 24 23:31:53 PDT 2025
Richard and Bjorn:
Thank you very much for your response and enthusiastic help.
The issue is still exist on 6.16, but In 6.17, from https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0bd0a41a5120f78685a132834865b0a631b9026a
the issue is disappeared. I have tried to use git bisect to find the commit and find a commit of "d31eb2174255 PCI: imx6: Remove apps_reset toggling from imx_pcie_{assert/deassert}_core_reset¡°.
In fact, I applied the patch which created from d31eb2174255 to somewhere of 6.17, it works. But applied to 6.16, it not works, let alone 6.6.
So I suspect the commit that fixed this issue was a combination of multiple commits.
I will compare the differences and try to identify where the issue lies.
Guocai
________________________________________
From: Hongxing Zhu <hongxing.zhu at nxp.com>
Sent: Thursday, September 25, 2025 2:19 PM
To: Bjorn Helgaas; He, Guocai (CN)
Cc: Lucas Stach; Lorenzo Pieralisi; Krzysztof Wilczy¨½ski; Rob Herring; Bjorn Helgaas; Shawn Guo; Sascha Hauer; Philipp Zabel; kernel at pengutronix.de; dl-linux-imx; linux-pci at vger.kernel.org; linux-arm-kernel at lists.infradead.org; Wang, Xiaolei
Subject: RE: [i.MX8 PCIe] PCIe link fails after kexec
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Guocai:
I tried the L6.17-rc1 on i.MX8QM MEK board.
No such kind of problem.
Here are the logs:
root at imx8qmmek:~# kexec /run/media/boot-mmcblk1p1/Image --dtb=/run/media/boot-mmcblk1p1/imx8qm-mek.dtb --command-line="console=ttyLP0,115200 earlycon no_console_suspend root=/dev/mmcblk1p2 rootwait rw"
root at imx8qmmek:~# Stopping Session c6 of User root...
[ OK ] Removed slice Slice /system/modprobe.
[ OK ] Stopped target Graphical Interface.
[ OK ] Stopped target Multi-User System.
...
[ 28.693426] kexec_core: Starting new kernel
[ 28.744358] psci: CPU1 killed (polled 0 ms)
[ 28.776362] psci: CPU2 killed (polled 0 ms)
[ 28.791996] psci: CPU3 killed (polled 0 ms)
[ 28.797151] Bye!
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
...
[ 2.432495] clk: Disabling unused clocks
[ 2.443360] check access for rdinit=/init failed: -2, ignoring
[ 2.629319] imx6q-pcie 5f000000.pcie: iATU: unroll F, 6 ob, 6 ib, align 4K, limit 4G
[ 2.637134] imx6q-pcie 5f000000.pcie: Invalid eDMA IRQs found
[ 2.746542] mmc1: new high speed SDHC card at address aaaa
[ 2.753040] mmcblk1: mmc1:aaaa SA16G 14.8 GiB
[ 2.761508] mmcblk1: p1 p2
[ 2.840973] imx6q-pcie 5f000000.pcie: PCIe Gen.3 x1 link up
[ 2.847724] imx6q-pcie 5f000000.pcie: PCI host bridge to bus 0000:00
[ 2.854136] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 2.859659] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
...
imx8qmmek login: root
root at imx8qmmek:~#
root at imx8qmmek:~#
root at imx8qmmek:~# uname -a
Linux imx8qmmek 6.17.0-rc1 #3 SMP PREEMPT Thu Sep 25 14:14:51 CST 2025 aarch64 GNU/Linux
root at imx8qmmek:~# lspci
00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0000 (rev 01)
01:00.0 Non-Volatile memory controller: Shenzhen Unionmemory Information System Ltd. AM610 PCIe 3.0 x2 NVMe SSD 128GB, 256GB (rev 01)
Best Regards
Richard Zhu
> -----Original Message-----
> From: Bjorn Helgaas <helgaas at kernel.org>
> Sent: 2025Äê9ÔÂ24ÈÕ 7:00
> To: He, Guocai (CN) <Guocai.He.CN at windriver.com>
> Cc: Hongxing Zhu <hongxing.zhu at nxp.com>; Lucas Stach
> <l.stach at pengutronix.de>; Lorenzo Pieralisi <lpieralisi at kernel.org>; Krzysztof
> Wilczy¨½ski <kw at linux.com>; Rob Herring <robh at kernel.org>; Bjorn Helgaas
> <bhelgaas at google.com>; Shawn Guo <shawnguo at kernel.org>; Sascha Hauer
> <s.hauer at pengutronix.de>; Philipp Zabel <p.zabel at pengutronix.de>;
> kernel at pengutronix.de; dl-linux-imx <linux-imx at nxp.com>;
> linux-pci at vger.kernel.org; linux-arm-kernel at lists.infradead.org; xiaolei.wang
> <xiaolei.wang at windriver.com>
> Subject: Re: [i.MX8 PCIe] PCIe link fails after kexec
>
> On Tue, Sep 23, 2025 at 03:35:56AM +0000, He, Guocai (CN) wrote:
> > Hi all,
> >
> > We are seeing a PCIe issue on i.MX8-based board when using kexec on
> > Linux kernel 6.6, we would appreciate your help to clarify whether
> > this is a known problem or if there is a recommended fix.
>
> Can you boot a recent kernel, e.g., v6.16 or v6.17-rc7, to make sure you're not
> seeing an already-fixed problem?
>
> If you can't try a recent kernel, please include your devicetree and the
> complete dmesg log including both the initial boot and the kexec.
>
> > ## Board & Setup
> > Linux version 6.6.103-yocto-standard (oe-user at oe-host)
> > (aarch64-wrs-linux-gcc (GCC) 13.4.0, GNU ld (GNU Binutils) 2
> > .42.0.20240723) #1 SMP PREEMPT Wed Sep 3 20:13:35 UTC 2025
> >
> > Machine model: Freescale i.MX8QM MEK
> > PCIe device: Intel Corporation Wireless 7260
> >
> >
> > ##Boot flow:
> > #step 1: Initial boot: Linux kernel boot from tftp .
> > setenv ipaddr 128.224.165.120
> > setenv gatewayip 128.224.165.1
> > setenv netmask 255.255.255.0
> > setenv serverip 128.224.165.20
> >
> > tftp 0x8a0000000 vlm-boards/29106/kernel tftp 0x8d0000000
> > vlm-boards/29106/dtb booti 0x8a0000000 - 0x8d0000000
> >
> >
> > #step 2: Switch to another kernel on disk using kexec Reproduction
> > steps root at nxp-imx8:~# mkdir /mnt/sdisk root at nxp-imx8:~# mount
> > /dev/mmcblk0p1 /mnt/sdisk/
> > root at nxp-imx8:~# scp ghe-cn at 128.224.153.151:/folk/ghe-cn/images/Image
> /mnt/sdisk/kernel //the images is the same.
> >
> > root at nxp-imx8:~# kexec -l /mnt/sdisk/kernel
> > --append="console=ttyLP0,115200 video=HDMI-A-1:1920x1080-32 at 60 rw
> > root= /dev/nfs
> > nfsroot=128.224.165.20:/export/pxeboot/vlm-boards/29105/rootfs,tcp,v3
> > ip=128.224.165.120:128.224.165.20:12
> > 8.224.165.1:255.255.255.0::eth0:off selinux=0 enforcing=0"
> >
> > root at nxp-imx8:~# kexec -e
> >
> >
> > #After the second kernel boots, the PCIe link does not come up.
> > #Key log differences
> >
> > ##### boot (boot_cold.log):
> > imx6q-pcie 5f010000.pcie: host bridge /bus at 5f000000/pcie at 5f010000
> ranges:
> > imx-drm display-subsystem: bound imx-drm-dpu-bliteng.2 (ops
> > dpu_bliteng_ops) imx6q-pcie 5f000000.pcie: host bridge
> /bus at 5f000000/pcie at 5f000000 ranges:
> > imx6q-pcie 5f000000.pcie: IO 0x006ff80000..0x006ff8ffff ->
> 0x0000000000
> > imx6q-pcie 5f000000.pcie: MEM 0x0060000000..0x006fefffff ->
> 0x0060000000
> > imx6q-pcie 5f000000.pcie: iATU: unroll F, 6 ob, 6 ib, align 4K, limit
> > 4G imx6q-pcie 5f000000.pcie: eDMA: unroll F, 1 wr, 1 rd imx6q-pcie
> > 5f000000.pcie: PCIe Gen.1 x1 link up imx6q-pcie 5f000000.pcie: PCIe
> > Gen.1 x1 link up imx6q-pcie 5f000000.pcie: Link up, Gen1 imx6q-pcie
> > 5f000000.pcie: PCIe Gen.1 x1 link up imx6q-pcie 5f000000.pcie: PCI
> > host bridge to bus 0000:00
> >
> > #¡ú Link up successfully
> >
> > root at nxp-imx8:~# lspci
> > 00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0000 (rev 01)
> > 01:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b)
> > root at nxp-imx8:~#
> >
> >
> > #####After kexec (boot_kexec.log):
> >
> > imx6q-pcie 5f000000.pcie: IO 0x006ff80000..0x006ff8ffff ->
> 0x0000000000
> > imx6q-pcie 5f000000.pcie: iATU: unroll F, 6 ob, 6 ib, align 4K, limit
> > 4G imx6q-pcie 5f000000.pcie: eDMA: unroll F, 1 wr, 1 rd
> >
> > imx6q-pcie 5f000000.pcie: Phy link never came up imx6q-pcie
> > 5f000000.pcie: Phy link never came up imx6q-pcie 5f000000.pcie: PCI
> > host bridge to bus 0000:00
> >
> > #¡ú Link never comes up, no PCIe devices detected.
> >
> > root at nxp-imx8:~# lspci
> > 00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0000 (rev 01)
> > root at nxp-imx8:~#
> >
> >
> > #Questions
> > Are there existing patches or recommended workarounds for this scenario?
> > Thanks for your time and any guidance you can provide.
> >
> > Best regards,
> >
> > Guocai
More information about the linux-arm-kernel
mailing list