Linaro's test farm also notice this problem and reported internal bug on
dragonboard-410c device running 5.3.0-rc6 mainline kernel.

Bug 5460 - mainline: dragonboard-410c: WARNING at qcom_iommu.c:325 
qcom_iommu_domain_free+0x74/0x88
https://bugs.linaro.org/show_bug.cgi?id=5460


dragonboard-410c booting mainline kernel caused this kernel warning.

[    9.795563] msm_dsi_manager_register: failed to register mipi dsi host for 
DSI 0
[    9.802295] msm 1a00000.mdss: failed to bind 1a98000.dsi (ops dsi_ops 
[msm]): -517
[    9.803459] msm 1a00000.mdss: master bind failed: -517
[    9.812313] platform 1a01000.mdp: Removing from iommu group 1
[    9.816418] ------------[ cut here ]------------
[    9.822824] WARNING: CPU: 2 PID: 247 at 
/usr/src/kernel/drivers/iommu/qcom_iommu.c:325 qcom_iommu_domain_free+0x74/0x88
[    9.825039] Modules linked in: adv7511(+) cec msm(+) mdt_loader 
drm_kms_helper drm drm_panel_orientation_quirks qrtr fuse
[    9.835546] CPU: 2 PID: 247 Comm: systemd-udevd Not tainted 5.3.0-rc6 #1
[    9.847025] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
[    9.847047] pstate: 40000005 (nZcv daif -PAN -UAO)
[    9.847062] pc : qcom_iommu_domain_free+0x74/0x88
[    9.847072] lr : qcom_iommu_domain_free+0x74/0x88
[    9.847078] sp : ffff000012fcb5a0
[[    9.874161] x29: ffff000012fcb5a0 x28: 0000000000000000 
[    9.877635] x27: ffff00000923ef10 x26: ffff00001157ae08 
[    9.882930] x25: ffff8000352a99a0 x24: ffff8000352a9998 
[    9.888225] x23: ffff000011f800a0 x22: ffff000012212f20 
[    9.893519] x21: ffff80003458ba80 x20: ffff8000019de6c0 
[    9.898814] x19: ffff8000019de600 x18: ffffffffffffffff 
[    9.904110] x17: 0000000000000000 x16: 0000000000000000 
[    9.909405] x15: ffff000011f7f848 x14: 00313d4e5f454c42 
[    9.914700] x13: 0000000000000040 x12: 0000000000000228 
[    9.919994] x11: ffff000012258000 x10: 0000000000000050 
[    9.925289] x9 : 0000000000000000 x8 : ffff000011f7f848 
[    9.930586] x7 : 0000000079bb0468 x6 : ffff80003fc80400 
[    9.935880] x5 : ffff80003fc80400 x4 : ffff800038104500 
[    9.941175] x3 : ffff000011f80000 x2 : 01212b45321d0900 
[    9.946470] x1 : 0000000000000000 x0 : 0000000000000024 
[    9.951767] Call trace:
[0;32m  OK  [0m] Found device /dev/ttyMSM0[    9.957064]  
qcom_iommu_domain_free+0x74/0x88
.
[    9.968809]  kobject_del+0x50/0x68
[    9.968865]  kobject_put+0xd8/0xf8
[    9.971383]  iommu_group_remove_device+0x14c/0x298
[    9.974769]  qcom_iommu_remove_device+0x58/0x70
[    9.979545]  iommu_release_device+0x34/0x50
[    9.983970]  iommu_bus_notifier+0xf0/0x110
[    9.988135]  notifier_call_chain+0x5c/0xa0
[    9.992305]  blocking_notifier_call_chain+0x68/0x88
[    9.996384]  device_del+0x248/0x378
[   10.001157]  platform_device_del.part.3+0x20/0x98
[   10.004631]  platform_device_unregister+0x2c/0x40
[   10.009492]  of_platform_device_destroy+0xc0/0xc8
[   10.014180]  device_for_each_child+0x68/0xb0
[   10.018867]  of_platform_depopulate+0x4c/0x68
[   10.023356]  msm_pdev_probe+0x1d8/0x358 [msm]
[   10.027466]  platform_drv_probe+0x58/0xa8
[   10.031801]  really_probe+0xd8/0x2b0
[   10.035794]  driver_probe_device+0x5c/0x108
[   10.039439]  device_driver_attach+0x74/0x98
[   10.043345]  __driver_attach+0x9c/0xe8
[   10.047512]  bus_for_each_dev+0x84/0xd8
[   10.051329]  driver_attach+0x30/0x40
[   10.055063]  bus_add_driver+0x168/0x218
[   10.058882]  driver_register+0x64/0x118
[   10.062442]  __platform_driver_register+0x54/0x60
[   10.066402]  msm_drm_register+0x60/0x6c [msm]
[   10.071126]  do_one_initcall+0x94/0x458
[   10.075466]  do_init_module+0x60/0x200
[   10.079109]  load_module+0x1d20/0x1f70
[   10.082928]  __se_sys_finit_module+0xc8/0xe0
[   10.086662]  __arm64_sys_finit_module+0x24/0x30
[   10.091092]  el0_svc_common.constprop.0+0x7c/0x180
[   10.095346]  el0_svc_handler+0x34/0x90
[   10.100202]  el0_svc+0x8/0xc
[   10.103932] irq event stamp: 37548
[   10.106976] hardirqs last  enabled at (37547): [<ffff0000110470e0>] 
_raw_spin_unlock_irq+0x38/0x78
[   10.110194] hardirqs last disabled at (37548): [<ffff0000100a59c4>] 
debug_exception_enter+0xac/0xe8
[   10.119134] softirqs last  enabled at (37542): [<ffff00001008210c>] 
__do_softirq+0x474/0x580
[   10.128075] softirqs last disabled at (37503): [<ffff000010101924>] 
irq_exit+0x144/0x150
[   10.136750] ---[ end trace ed8dd217e26fd558 ]---

Full boot log link,
https://lkft.validation.linaro.org/scheduler/job/892990#L1395

metadata:
  git branch: master
  git repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
  git commit: 9cf6b756cdf2cd38b8b0dac2567f7c6daf5e79d5
  git describe: v5.3-rc6-119-g9cf6b756cdf2
  make_kernelversion: 5.3.0-rc6
  kernel-config: 
http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/dragonboard-410c/lkft/linux-mainline/2056/config
  build-location: 
http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/dragonboard-410c/lkft/linux-mainline/2056
  toolchain: aarch64-linaro-linux 7.%
  device_type: dragonboard-410c

** Bug watch added: Linaro Bug Tracking System #5460
   https://bugs.linaro.org/show_bug.cgi?id=5460

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-snapdragon in Ubuntu.
https://bugs.launchpad.net/bugs/1841911

Title:
  Kernel hangs during msm init

Status in linux-snapdragon package in Ubuntu:
  Invalid
Status in linux-snapdragon source package in Bionic:
  Fix Committed

Bug description:
  Impact:

  Ubuntu-snapdragon-4.15.0-1061.68 hangs during boot around msm init.
  Sometimes we get the following stack trace, or the boot completes and the 
board hangs during reboot:

  ...
  [    8.113018] msm_dsi_manager_register: failed to register mipi dsi host for 
DSI 0
  [    8.131081] msm 1a00000.mdss: failed to bind 1a98000.dsi (ops dsi_ops 
[msm]): -517
  [    8.138234] msm 1a00000.mdss: master bind failed: -517
  [    8.145551] platform 1a01000.mdp: Dropping the link to 1ef0000.iommu
  [    8.150545] iommu: Removing device 1a01000.mdp from group 1
  [    8.157051] ------------[ cut here ]------------
  [    8.162369] WARNING: CPU: 1 PID: 1316 at 
/build/linux-snapdragon-t5G9R3/linux-snapdragon-4.15.0/drivers/iommu/qcom_iommu.c:336
 qcom_iommu_domain_free
  +0x74/0x88
  [    8.167166] Modules linked in: adv7511_drm cec rc_core msm(+) mdt_loader
  [    8.181137] CPU: 1 PID: 1316 Comm: systemd-udevd Not tainted 
4.15.0-1061-snapdragon #68-Ubuntu
  [    8.188079] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
  [    8.196501] pstate: 60400005 (nZCv daif +PAN -UAO)
  [    8.203356] pc : qcom_iommu_domain_free+0x74/0x88
  [    8.207955] lr : qcom_iommu_domain_free+0x74/0x88
  [    8.212727] sp : ffff00000cbeb680
  [    8.217412] x29: ffff00000cbeb680 x28: ffff8000396d84b8
  [    8.220713] x27: ffff8000396d84b0 x26: ffff8000396d84c0
  [    8.226096] x25: ffff80003d057c10 x24: ffff8000396d8420
  [    8.231391] x23: 0000000000000003 x22: ffff80003ce40258
  [    8.236686] x21: ffff80000203ad00 x20: ffff80000203af30
  [    8.241981] x19: ffff80000203af00 x18: ffffffffffffffff
  [    8.247275] x17: 0000000000000000 x16: 0000000000000004
  [    8.252570] x15: ffff000009549c08 x14: 0720072007200720
  [    8.257866] x13: 0720072007200720 x12: 0720072007200720
  [    8.263161] x11: ffff000009549e80 x10: ffff00000871d340
  [    8.268456] x9 : 0720072007200720 x8 : 0000000000000005
  [    8.273751] x7 : 0720072d072d072d x6 : 000000000000014c
  [    8.279046] x5 : ffff000008610250 x4 : 0000000000000000
  [    8.284345] x3 : 0000000000000000 x2 : a59fa8ece8469a00
  [    8.289637] x1 : 0000000000000000 x0 : 0000000000000024
  [    8.294932] Call trace:
  [    8.300227]  qcom_iommu_domain_free+0x74/0x88
  [    8.302400]  iommu_group_release+0x54/0x90
  [    8.306914]  kobject_put+0x8c/0x1f0
  [    8.310905]  kobject_del.part.0+0x3c/0x50
  [    8.314292]  kobject_put+0x74/0x1f0
  [    8.318455]  iommu_group_remove_device+0x10c/0x198
  [    8.321756]  qcom_iommu_remove_device+0x58/0x70
  [    8.326617]  iommu_bus_notifier+0xa8/0x120
  [    8.331045]  notifier_call_chain+0x5c/0xa0
  [    8.335210]  blocking_notifier_call_chain+0x64/0x88
  [    8.339294]  device_del+0x234/0x368
  [    8.344066]  platform_device_del.part.3+0x2c/0x98
  [    8.347539]  platform_device_unregister+0x24/0x38
  [    8.352410]  of_platform_device_destroy+0xb8/0xc0
  [    8.357087]  device_for_each_child+0x58/0xb0
  [    8.361775]  of_platform_depopulate+0x4c/0x68
  [    8.366350]  msm_pdev_probe+0x2c4/0x388 [msm]
  [    8.370369]  platform_drv_probe+0x60/0xc0
  [    8.374707]  driver_probe_device+0x2ec/0x458
  [    8.378701]  __driver_attach+0xdc/0x128
  [    8.383042]  bus_for_each_dev+0x78/0xd8
  [    8.386598]  driver_attach+0x30/0x40
  [    8.390418]  bus_add_driver+0x20c/0x2a8
  [    8.394237]  driver_register+0x6c/0x110
  [    8.397797]  __platform_driver_register+0x54/0x60
  [    8.401841]  msm_drm_register+0x54/0x80 [msm]
  [    8.406481]  do_one_initcall+0x58/0x160
  [    8.410818]  do_init_module+0x64/0x1d8
  [    8.414463]  load_module+0x1378/0x15c8
  [    8.418282]  SyS_finit_module+0x100/0x118
  [    8.422016]  el0_svc_naked+0x30/0x34
  [    8.426095] ---[ end trace 800d0885aa276bfd ]---

  Fix:

  During the Ubuntu-snapdragon-4.15.0-1061.68 cycle, we picked up one
  upstream patch that of_platform_depopulate() msm in case of probe
  deferral (or during the removal), but that patch triggers a WARN_ON()
  during the wind down of the IOMMU (and the susequent kernel hang) -
  unless we want to backport the new msm dri driver (and all the
  relevant dependencies), revert the stable patch that calls
  of_platform_depopulate().

  How to test:

  Boot a patched kernel and check  if that stracktrace shows up again.

  Regression:

  None, i'm reverting a patch that wasn't there before and clearly
  wasn't tested with our downstream BSP.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-snapdragon/+bug/1841911/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to