Qemu crashes in -next due to 'of: remove *phandle properties from expanded device tree'

From: Guenter Roeck
Date: Wed Jun 14 2017 - 15:26:51 EST


Hi Frank,

your commit 'of: remove *phandle properties from expanded device tree' in
-next causes several of my ppc qemu tests to crash. Looking into qemu, it
sets "linux,phandle" properties for the mpic and for other devices.

The crashes are along the line of

------------[ cut here ]------------
kernel BUG at arch/powerpc/platforms/85xx/corenet_generic.c:50!
Oops: Exception in kernel mode, sig: 5 [#1]
SMP NR_CPUS=32
NUMA
CoreNet Generic
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.12.0-rc5-next-20170614 #1
task: c000000000ad8cc0 task.stack: c000000000bec000
NIP: c000000000a8ca7c LR: c000000000a8ca6c CTR: c000000000a8ca20
REGS: c000000000befb90 TRAP: 0700 Not tainted (4.12.0-rc5-next-20170614)
MSR: 0000000080021000 <CE,ME>
CR: 22000042 XER: 00000000
SOFTE: 0
GPR00: c000000000a8ca6c c000000000befe10 c000000000befa00 0000000000000000
GPR04: 0000000000000000 c000000000ac8458 c000000000ac8438 c000000000830658
GPR08: 0000000000000001 0000000000000001 0000000000000000 0000000000009531
GPR12: 0000000022000022 c00000003fff1000 0000000000000000 0000000000000000
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR24: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR28: c000000000000300 c00000003fff2cc0 c000000000ac06e0 c000000000ac06e0
NIP [c000000000a8ca7c] .corenet_gen_pic_init+0x5c/0x90
LR [c000000000a8ca6c] .corenet_gen_pic_init+0x4c/0x90
Call Trace:
[c000000000befe10] [c000000000a8ca6c] .corenet_gen_pic_init+0x4c/0x90
(unreliable)
[c000000000befe80] [c000000000a832f8] .init_IRQ+0x34/0x4c
[c000000000befef0] [c000000000a7fc88] .start_kernel+0x2fc/0x500
[c000000000beff90] [c000000000000554] start_here_common+0x1c/0x48
Instruction dump:
e8aa0068 39088268 39407002 38600000 7fa54800 39205002 7caa4f9e 4bffe9e9
60000000 2c230000 7d200026 55291ffe <0b090000> 4bfff335 60000000 3ca2ffdd
random: 0x600000003d220004 get_random_bytes called with crng_init=0
---[ end trace 0000000000000000 ]---

and are caused by the kernel not finding the mpic node anymore.

Any idea how to solve the problem ?

Bisect log is attached.

Thanks,
Guenter

---
# bad: [b14746170b0684005bab3e07893e6b91baf7dbf6] Add linux-next specific files for 20170614
# good: [32c1431eea4881a6b17bd7c639315010aeefa452] Linux 4.12-rc5
git bisect start 'HEAD' 'v4.12-rc5'
# good: [0500b956eedb4686b0420308ae01a74b00f9ab64] Merge remote-tracking branch 'crypto/master'
git bisect good 0500b956eedb4686b0420308ae01a74b00f9ab64
# bad: [4717c17660509cee9d3596eb19b99f3e26d57c36] Merge remote-tracking branch 'tip/auto-latest'
git bisect bad 4717c17660509cee9d3596eb19b99f3e26d57c36
# good: [f32807fd889514af115c32f597f59763d44ffae4] next-20170613/sound-asoc
git bisect good f32807fd889514af115c32f597f59763d44ffae4
# good: [8bf3df94bf566c7294b6f972cb5afa2d9a3a83f5] Merge remote-tracking branch 'iommu/next'
git bisect good 8bf3df94bf566c7294b6f972cb5afa2d9a3a83f5
# good: [e5c91c3569136b20783bd0799f026b89e4a2752a] Merge branch 'sched/core'
git bisect good e5c91c3569136b20783bd0799f026b89e4a2752a
# good: [3ff2be7e0e543ed1fbdd1a9f5ca49417be7b2a66] Merge branch 'x86/boot'
git bisect good 3ff2be7e0e543ed1fbdd1a9f5ca49417be7b2a66
# good: [2b37bbbc6291132aa8b08088ec31652eaf66ce6a] Merge remote-tracking branches 'spi/topic/rockchip', 'spi/topic/sh-msiof', 'spi/topic/spidev' and 'spi/topic/st-ssc4' into spi-next
git bisect good 2b37bbbc6291132aa8b08088ec31652eaf66ce6a
# good: [82a28f6c16030d04f5719889999f4fa9a35bcfc7] Merge branch 'x86/timers'
git bisect good 82a28f6c16030d04f5719889999f4fa9a35bcfc7
# bad: [d19a4961ac001b1284013ecff3deb6456a09abda] of: make __of_attach_node() static
git bisect bad d19a4961ac001b1284013ecff3deb6456a09abda
# good: [e5e9b5fae7e7d1fad87e4abb52f5f3d55c9f4e25] iio: proximity: as3935: add missing required spi-max-frequency
git bisect good e5e9b5fae7e7d1fad87e4abb52f5f3d55c9f4e25
# good: [d20dc1493db438fbbfb7733adc82f472dd8a0789] of: Support const and non-const use for to_of_node()
git bisect good d20dc1493db438fbbfb7733adc82f472dd8a0789
# good: [4811a1a7800bc59074e640a4fe9befdb668ae56f] Merge branch 'dt/property-move' into dt/next
git bisect good 4811a1a7800bc59074e640a4fe9befdb668ae56f
# bad: [f847192ce4061dc7e9087eb9136a38e3bf582efb] of: remove *phandle properties from expanded device tree
git bisect bad f847192ce4061dc7e9087eb9136a38e3bf582efb
# good: [6fedb069def034a4738584920fe94535ab29637a] of: Provide dummy of_device_compatible_match() for compile-testing
git bisect good 6fedb069def034a4738584920fe94535ab29637a
# first bad commit: [f847192ce4061dc7e9087eb9136a38e3bf582efb] of: remove *phandle properties from expanded device tree