Firefly开源社区

RK3568 PCIe 异常排查

858

积分

10

威望

10

贡献

技术大神

Rank: 3Rank: 3

积分
858
发表于 2021-8-24 10:25:01     
本帖最后由 firefly_zhongw 于 2021-8-24 10:49 编辑

PCIe3.0控制器初始化设备系统异常
  1. [   21.202444] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
  2. [   21.202467] rcu:     3-...0: (1 GPs behind) idle=21a/1/0x4000000000000000 softirq=23/25 fqs=1856
  3. [   21.202473] rcu:     (detected by 2, t=6302 jiffies, g=-1163, q=24)
  4. [   21.202482] Task dump for CPU 3:
  5. [   21.202488] rk-pcie         R  running task        0    54      2 0x0000002a
  6. [   21.202497] Call trace:
  7. [   21.202511]  __switch_to+0xe4/0x138
  8. [   21.202518]  0x4
  9. [   21.205777] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
  10. [   21.205796] rcu:     3-...!: (24 ticks this GP) idle=21a/1/0x4000000000000000 softirq=5/25 fqs=1
  11. [   21.205801] rcu:     (detected by 2, t=6302 jiffies, g=-1183, q=2)
  12. [   21.205810] Task dump for CPU 3:
  13. [   21.205815] rk-pcie         R  running task        0    54      2 0x0000002a
  14. [   21.205823] Call trace:
  15. [   21.205831]  __switch_to+0xe4/0x138
  16. [   21.205837]  0x4
  17. [   21.205846] rcu: rcu_sched kthread starved for 6299 jiffies! g-1183 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=0
  18. [   21.205851] rcu: RCU grace-period kthread stack dump:
  19. [   21.205856] rcu_sched       I    0    11      2 0x00000028
  20. [   21.205863] Call trace:
  21. [   21.205869]  __switch_to+0xe4/0x138
  22. [   21.205879]  __schedule+0x2f4/0x930
  23. [   21.205886]  schedule+0x38/0xa0
  24. [   21.205892]  schedule_timeout+0x194/0x478
  25. [   21.205901]  rcu_gp_kthread+0x4fc/0x840
  26. [   21.205909]  kthread+0x12c/0x158
  27. [   21.205916]  ret_from_fork+0x10/0x18
复制代码
异常原因:
    如果系统卡住此 log 附近,则表明 PCIe3.0 的 PHY 工作异常。

解决方法:
硬件上使用PCIe
1. 外部晶振芯片的时钟输入是否异常,如果无时钟或者幅度异常,将导致 phy 无法锁定。
2. 检查 PCIE30_AVDD_0V9 和 PCIE30_AVDD_1V8 电压是否满足要求。

硬件上不使用PCIe
kernel 的 dts 里把 PCIe disabled。
  1. &pcie30phy {
  2.     status = "disabled";
  3. };

  4. &pcie3x2 {
  5.     status = "disabled";
  6. };
复制代码










回复

使用道具 举报

12

积分

0

威望

0

贡献

技术小白

积分
12
发表于 2021-9-1 19:04:01     
我们又遇到如下:
[    1.206302] rk-pcie 3c0800000.pcie: PCIe Linking... LTSSM is 0x0
[    2.219630] rk-pcie 3c0800000.pcie: PCIe Linking... LTSSM is 0x0
[    3.232964] rk-pcie 3c0800000.pcie: PCIe Linking... LTSSM is 0x0
[    4.242959] rk-pcie 3c0800000.pcie: PCIe Linking... LTSSM is 0x1
[    5.256292] rk-pcie 3c0800000.pcie: PCIe Linking... LTSSM is 0x0
[    6.269624] rk-pcie 3c0800000.pcie: PCIe Linking... LTSSM is 0x0
[    7.286295] rk-pcie 3c0800000.pcie: PCIe Linking... LTSSM is 0x0
[    8.296290] rk-pcie 3c0800000.pcie: PCIe Linking... LTSSM is 0x0
[    9.309624] rk-pcie 3c0800000.pcie: PCIe Linking... LTSSM is 0x0
[   10.326290] rk-pcie 3c0800000.pcie: PCIe Linking... LTSSM is 0x0
[   11.336288] rk-pcie 3c0800000.pcie: PCIe Link Fail
[   11.336308] rk-pcie 3c0800000.pcie: failed to initialize host
[   21.592941] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[   21.592963] rcu:     2-...0: (2 GPs behind) idle=7c2/1/0x4000000000000000 softirq=57/59 fqs=1811
[   21.592969] rcu:     (detected by 0, t=6302 jiffies, g=-1039, q=289)
[   21.592978] Task dump for CPU 2:
[   21.592983] swapper/0       R  running task        0     1      0 0x0000002a
[   21.592992] Call trace:
[   21.593007]  __switch_to+0xe4/0x138
[   21.593025]  enqueue_task_fair+0x48c/0x1868
[   84.609593] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[   84.609615] rcu:     2-...0: (2 GPs behind) idle=7c2/1/0x4000000000000000 softirq=57/59 fqs=7335
[   84.609620] rcu:     (detected by 0, t=25207 jiffies, g=-1039, q=289)
[   84.609628] Task dump for CPU 2:
[   84.609633] swapper/0       R  running task        0     1      0 0x0000002a
[   84.609640] Call trace:
[   84.609649]  __switch_to+0xe4/0x138
[   84.609658]  enqueue_task_fair+0x48c/0x1868
[  147.626248] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[  147.626270] rcu:     2-...0: (2 GPs behind) idle=7c2/1/0x4000000000000000 softirq=57/59 fqs=12974
[  147.626275] rcu:     (detected by 1, t=44112 jiffies, g=-1039, q=289)
[  147.626283] Task dump for CPU 2:
[  147.626288] swapper/0       R  running task        0     1      0 0x0000002a
[  147.626295] Call trace:
[  147.626304]  __switch_to+0xe4/0x138
[  147.626312]  enqueue_task_fair+0x48c/0x1868,然后机卡死了,这个能办看下么
回复

使用道具 举报

858

积分

10

威望

10

贡献

技术大神

Rank: 3Rank: 3

积分
858
发表于 2021-9-2 14:28:34     
自己做的底板,由于PCIe导致的问题,优先排查PCIe相关的硬件电路以及信号。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表