Re: [GIT pull] irq updates for 4.13

From: Sebastian Reichel
Date: Tue Jul 11 2017 - 10:39:50 EST


Hi,

On Tue, Jul 11, 2017 at 02:51:23PM +0100, Marc Zyngier wrote:
> On 11/07/17 12:21, Sebastian Reichel wrote:
> > Hi,
> >
> > On Tue, Jul 11, 2017 at 12:52:17PM +0200, Thomas Gleixner wrote:
> >> On Tue, 11 Jul 2017, Thomas Gleixner wrote:
> >>> On Tue, 11 Jul 2017, Sebastian Reichel wrote:
> >>> So this crashes in do_raw_spin_unlock_irqrestore() !?! I just have to
> >>> wonder how the raw_spin_lock() succeeded. That does not make any sense.
> >>
> >> can you please apply the patch below on top of 4.12? It's a backport
> >> isolating the resource request changes.
> >
> > Full bootlog for v4.12 + your patch is below. I used the same
> > .config with oldconfig.
>
> [...]
>
> > [ 1.329315] cpcap-core spi1.0: CPCAP vendor: ST rev: 2.10 (1a)
> > [ 1.336914] Unhandled fault: imprecise external abort (0x1406) at 0x00000000
> > [ 1.343994] pgd = c0004000
> > [ 1.346710] [00000000] *pgd=00000000
> > [ 1.350341] Internal error: : 1406 [#1] SMP ARM
> > [ 1.354888] Modules linked in:
> > [ 1.357971] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-00001-g2a481f732c4b #1539
> > [ 1.365936] Hardware name: Generic OMAP4 (Flattened Device Tree)
> > [ 1.371978] task: ee8aadc0 task.stack: ee8ac000
> > [ 1.376556] PC is at lock_release+0x25c/0x360
> > [ 1.380950] LR is at lock_release+0x25c/0x360
> > [ 1.385314] pc : [<c019a4ac>] lr : [<c019a4ac>] psr: 20000093
> > [ 1.385314] sp : ee8adb60 ip : c10fc43c fp : eea05010
> > [ 1.396881] r10: 00000001 r9 : c10f1e70 r8 : 60000093
> > [ 1.402130] r7 : c1007b6c r6 : c0520658 r5 : ee9fd274 r4 : a0000013
> > [ 1.408691] r3 : ee8aadc0 r2 : 00000003 r1 : 00000003 r0 : 00000000
> > [ 1.415252] Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
> > [ 1.422515] Control: 10c5387d Table: 8000404a DAC: 00000051
> > [ 1.428314] Process swapper/0 (pid: 1, stack limit = 0xee8ac218)
> > [ 1.434356] Stack: (0xee8adb60 to 0xee8ae000)
> > [ 1.438751] db60: a0000013 c0520648 00000007 a0000013 ee9fd264 ee9fd264 00000007 eea05100
> > [ 1.446960] db80: c061fe0c eea05000 eea05010 c0add86c 00000000 fc310134 ee9fd264 c0520658
> > [ 1.455200] dba0: 00000020 ee9fd2a4 ee9fd070 00000000 eea05100 c05196f0 ee9fd2a4 eea05010
> > [ 1.463439] dbc0: eef1d580 c0519c20 eea05000 00000021 eef1d580 c01a9508 0000000f c01aa584
> > [ 1.471649] dbe0: ee8000c0 60000013 00000000 eef1d580 00000000 c01a77b8 eef9c400 00000021
> > [ 1.479888] dc00: c061fe0c eea05000 eea05010 c01a9890 00002084 00000204 eef9c400 c10a7bc8
> > [ 1.488128] dc20: 00000001 eef18600 00000000 00000000 00000000 c0620d7c c0d93c60 eef9c400
> > [ 1.496368] dc40: 00000000 efd93038 ef6a85d0 0000014e 00000021 00000084 00000084 eef18600
> > [ 1.504577] dc60: eef1de90 00000021 00000084 eef19000 00000010 eef1e93c c0b613dc c0620f54
> > [ 1.512817] dc80: c10a7bc8 ee8adc8c 00000004 eef19000 eef19000 eef18600 00000021 eef17f90
> > [ 1.521057] dca0: eef1e810 c062bd68 ffffffff c10a7bc8 eef17f98 ee8aadc0 00000001 00000000
> > [ 1.529266] dcc0: c10a7bc8 00000010 00000000 00000000 eef19000 eef19000 eef17f90 00000000
> > [ 1.537506] dce0: 00000010 0000001a 00000013 00000000 00000000 c062bef0 0000000a 0000001a
> > [ 1.545745] dd00: 00000000 00000013 00000000 eef19000 c10a7b78 00000000 c10a7b88 00000000
> > [ 1.553985] dd20: 00000000 c06a06b8 eef19000 c18bfe4c 00000000 c05fcd9c 00000000 ee8add70
> > [ 1.562194] dd40: c05fcee8 00000001 00000000 c18bfe08 00000000 c05fb2d4 ee9eccd4 eef13c54
> > [ 1.570434] dd60: eef19000 eef19034 c10affe0 c05fca58 eef19000 00000001 c18bfe08 eef19008
> > [ 1.578674] dd80: eef19000 c10affe0 00000000 c05fc0d4 eef19008 eecdc000 eef19000 c05fa478
> > [ 1.586914] dda0: 00000000 eef19000 eef19260 00000000 eef19000 eecdc000 00000000 eea61c10
> > [ 1.595123] ddc0: 00000001 00000000 c0d7f208 c06a184c eecdc000 ef6e9a2c ef6e9a7c eef19000
> > [ 1.603363] dde0: 00000001 c06a20ac 00000000 00000002 c0add880 eea61c10 c06a1bd8 002dc6c0
> > [ 1.611602] de00: eea61c10 eef17210 eecdc000 eecdc000 eea61c10 eea61c10 c0da4ba0 c0da4b98
> > [ 1.619812] de20: 000001f0 c06a243c 00000000 eecdc4e0 eecdc000 eecdc000 eea61c10 c06a5e60
> > [ 1.628051] de40: 00000000 60000013 c1897138 00000004 8132535b eea61c10 ffffffed c10b0c74
> > [ 1.636291] de60: fffffdfb 00000000 00000000 c0f66858 c0f005a8 c05fecf8 eea61c10 c18bfe4c
> > [ 1.644531] de80: 00000000 c10b0c74 00000000 c05fcd9c eea61c10 c10b0c74 eea61c44 00000000
> > [ 1.652740] dea0: c10f8000 00000007 c0f66858 c05fcee4 00000000 c10b0c74 c05fce24 c05fb228
> > [ 1.660980] dec0: ee8a58a4 eea5ac50 c10b0c74 eef13580 c10a5720 c05fc2e4 c0d332c0 c0f4365c
> > [ 1.669219] dee0: 00000000 c10b0c74 c0f4365c 00000000 c0e4f6ec c05fdd28 ffffe000 c0f4365c
> > [ 1.677429] df00: 00000000 c0101874 00000134 00000000 efffec00 efffecdd c0e50efc 00000134
> > [ 1.685668] df20: 00000134 c015f5dc c0e4f6ec 00000000 00000006 00000006 efffecdd 00000000
> > [ 1.693908] df40: c0f7f7cc 00000006 c10f8000 c0f6684c c0f7fe74 c10f8000 c0f66850 c10f8000
> > [ 1.702148] df60: 00000007 c0f00eb4 00000006 00000006 00000000 c0f005a8 c0ad652c 00000134
> > [ 1.710357] df80: 00000000 00000000 c0ad652c 00000000 00000000 00000000 00000000 00000000
> > [ 1.718597] dfa0: 00000000 c0ad6534 00000000 c01077d0 00000000 00000000 00000000 00000000
> > [ 1.726837] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > [ 1.735046] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 c0c0c0c0 c0c0c0c0
> > [ 1.743316] [<c019a4ac>] (lock_release) from [<c0add86c>] (_raw_spin_unlock_irqrestore+0x1c/0x44)
> > [ 1.752258] [<c0add86c>] (_raw_spin_unlock_irqrestore) from [<c0520658>] (omap_gpio_get_direction+0x38/0x44)
> > [ 1.762145] [<c0520658>] (omap_gpio_get_direction) from [<c05196f0>] (gpiochip_lock_as_irq+0x98/0xe4)
> > [ 1.771423] [<c05196f0>] (gpiochip_lock_as_irq) from [<c0519c20>] (gpiochip_irq_reqres+0x2c/0x6c)
> > [ 1.780364] [<c0519c20>] (gpiochip_irq_reqres) from [<c01a9508>] (__setup_irq+0x46c/0x69c)
> > [ 1.788696] [<c01a9508>] (__setup_irq) from [<c01a9890>] (request_threaded_irq+0xcc/0x14c)
> > [ 1.796997] [<c01a9890>] (request_threaded_irq) from [<c0620d7c>] (regmap_add_irq_chip+0x794/0x914)
> > [ 1.806121] [<c0620d7c>] (regmap_add_irq_chip) from [<c0620f54>] (devm_regmap_add_irq_chip+0x58/0xb4)
> > [ 1.815399] [<c0620f54>] (devm_regmap_add_irq_chip) from [<c062bd68>] (cpcap_init_irq_chip+0x138/0x16c)
> > [ 1.824859] [<c062bd68>] (cpcap_init_irq_chip) from [<c062bef0>] (cpcap_probe+0x154/0x264)
> > [ 1.833190] [<c062bef0>] (cpcap_probe) from [<c06a06b8>] (spi_drv_probe+0x7c/0xac)
> > [ 1.840820] [<c06a06b8>] (spi_drv_probe) from [<c05fcd9c>] (driver_probe_device+0x260/0x2e8)
> > [ 1.849334] [<c05fcd9c>] (driver_probe_device) from [<c05fb2d4>] (bus_for_each_drv+0x64/0x98)
> > [ 1.857910] [<c05fb2d4>] (bus_for_each_drv) from [<c05fca58>] (__device_attach+0xb0/0x118)
> > [ 1.866241] [<c05fca58>] (__device_attach) from [<c05fc0d4>] (bus_probe_device+0x88/0x90)
> > [ 1.874450] [<c05fc0d4>] (bus_probe_device) from [<c05fa478>] (device_add+0x3c8/0x57c)
> > [ 1.882446] [<c05fa478>] (device_add) from [<c06a184c>] (spi_add_device+0x90/0x134)
> > [ 1.890136] [<c06a184c>] (spi_add_device) from [<c06a20ac>] (spi_register_master+0x444/0x7a4)
> > [ 1.898742] [<c06a20ac>] (spi_register_master) from [<c06a243c>] (devm_spi_register_master+0x30/0x70)
> > [ 1.908020] [<c06a243c>] (devm_spi_register_master) from [<c06a5e60>] (omap2_mcspi_probe+0x278/0x354)
> > [ 1.917297] [<c06a5e60>] (omap2_mcspi_probe) from [<c05fecf8>] (platform_drv_probe+0x50/0xb0)
> > [ 1.925872] [<c05fecf8>] (platform_drv_probe) from [<c05fcd9c>] (driver_probe_device+0x260/0x2e8)
> > [ 1.934814] [<c05fcd9c>] (driver_probe_device) from [<c05fcee4>] (__driver_attach+0xc0/0xc4)
> > [ 1.943298] [<c05fcee4>] (__driver_attach) from [<c05fb228>] (bus_for_each_dev+0x6c/0xa0)
> > [ 1.951538] [<c05fb228>] (bus_for_each_dev) from [<c05fc2e4>] (bus_add_driver+0x100/0x210)
> > [ 1.959869] [<c05fc2e4>] (bus_add_driver) from [<c05fdd28>] (driver_register+0x78/0xf4)
> > [ 1.967926] [<c05fdd28>] (driver_register) from [<c0101874>] (do_one_initcall+0x3c/0x170)
> > [ 1.976165] [<c0101874>] (do_one_initcall) from [<c0f00eb4>] (kernel_init_freeable+0x210/0x2dc)
> > [ 1.984924] [<c0f00eb4>] (kernel_init_freeable) from [<c0ad6534>] (kernel_init+0x8/0x114)
> > [ 1.993164] [<c0ad6534>] (kernel_init) from [<c01077d0>] (ret_from_fork+0x14/0x24)
> > [ 2.000793] Code: e121f008 eaffffc4 e5993010 eb005645 (e3500000)
>
> I've been trying to reproduce this with an OMAP5 UEVM and an OMAP4
> Panda-ES. Zero success so far, so I'm poking in the dark.
>
> Can you check which of the 3 cpcap_irq_chip is triggering this? Do you
> see any call to gpiochip_irq_relres?

I added a debug print to gpiochip_irq_relres and I do not see any
calls to it. I think the boards you tested do not use a GPIO as
interrupt out of the box?

-- Sebastian

Attachment: signature.asc
Description: PGP signature