From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933192AbdGKOjp (ORCPT ); Tue, 11 Jul 2017 10:39:45 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:44563 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932678AbdGKOjo (ORCPT ); Tue, 11 Jul 2017 10:39:44 -0400 Date: Tue, 11 Jul 2017 16:39:40 +0200 From: Sebastian Reichel To: Marc Zyngier Cc: Thomas Gleixner , Linus Torvalds , LKML , Andrew Morton , Ingo Molnar , "H. Peter Anvin" , Tony Lindgren , Pavel Machek Subject: Re: [GIT pull] irq updates for 4.13 Message-ID: <20170711143940.v3l2zio3s7vh7c7g@earth> References: <20170710133505.eo6w73kq2327n34p@earth> <20170711092639.jmfg775bf2k7vwen@earth> <20170711112125.icbezbb722oymzwv@earth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wbpgdnug5zmctuk7" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --wbpgdnug5zmctuk7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Tue, Jul 11, 2017 at 02:51:23PM +0100, Marc Zyngier wrote: > On 11/07/17 12:21, Sebastian Reichel wrote: > > Hi, > >=20 > > 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 sens= e. > >> > >> can you please apply the patch below on top of 4.12? It's a backport > >> isolating the resource request changes. > >=20 > > Full bootlog for v4.12 + your patch is below. I used the same > > .config with oldconfig. >=20 > [...] >=20 > > [ 1.329315] cpcap-core spi1.0: CPCAP vendor: ST rev: 2.10 (1a) > > [ 1.336914] Unhandled fault: imprecise external abort (0x1406) at 0x= 00000000 > > [ 1.343994] pgd =3D c0004000 > > [ 1.346710] [00000000] *pgd=3D00000000 > > [ 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-g= 2a481f732c4b #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 : [] lr : [] 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 : a00000= 13 > > [ 1.408691] r3 : ee8aadc0 r2 : 00000003 r1 : 00000003 r0 : 000000= 00 > > [ 1.415252] Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Se= gment none > > [ 1.422515] Control: 10c5387d Table: 8000404a DAC: 00000051 > > [ 1.428314] Process swapper/0 (pid: 1, stack limit =3D 0xee8ac218) > > [ 1.434356] Stack: (0xee8adb60 to 0xee8ae000) > > [ 1.438751] db60: a0000013 c0520648 00000007 a0000013 ee9fd264 ee9fd= 264 00000007 eea05100 > > [ 1.446960] db80: c061fe0c eea05000 eea05010 c0add86c 00000000 fc310= 134 ee9fd264 c0520658 > > [ 1.455200] dba0: 00000020 ee9fd2a4 ee9fd070 00000000 eea05100 c0519= 6f0 ee9fd2a4 eea05010 > > [ 1.463439] dbc0: eef1d580 c0519c20 eea05000 00000021 eef1d580 c01a9= 508 0000000f c01aa584 > > [ 1.471649] dbe0: ee8000c0 60000013 00000000 eef1d580 00000000 c01a7= 7b8 eef9c400 00000021 > > [ 1.479888] dc00: c061fe0c eea05000 eea05010 c01a9890 00002084 00000= 204 eef9c400 c10a7bc8 > > [ 1.488128] dc20: 00000001 eef18600 00000000 00000000 00000000 c0620= d7c c0d93c60 eef9c400 > > [ 1.496368] dc40: 00000000 efd93038 ef6a85d0 0000014e 00000021 00000= 084 00000084 eef18600 > > [ 1.504577] dc60: eef1de90 00000021 00000084 eef19000 00000010 eef1e= 93c c0b613dc c0620f54 > > [ 1.512817] dc80: c10a7bc8 ee8adc8c 00000004 eef19000 eef19000 eef18= 600 00000021 eef17f90 > > [ 1.521057] dca0: eef1e810 c062bd68 ffffffff c10a7bc8 eef17f98 ee8aa= dc0 00000001 00000000 > > [ 1.529266] dcc0: c10a7bc8 00000010 00000000 00000000 eef19000 eef19= 000 eef17f90 00000000 > > [ 1.537506] dce0: 00000010 0000001a 00000013 00000000 00000000 c062b= ef0 0000000a 0000001a > > [ 1.545745] dd00: 00000000 00000013 00000000 eef19000 c10a7b78 00000= 000 c10a7b88 00000000 > > [ 1.553985] dd20: 00000000 c06a06b8 eef19000 c18bfe4c 00000000 c05fc= d9c 00000000 ee8add70 > > [ 1.562194] dd40: c05fcee8 00000001 00000000 c18bfe08 00000000 c05fb= 2d4 ee9eccd4 eef13c54 > > [ 1.570434] dd60: eef19000 eef19034 c10affe0 c05fca58 eef19000 00000= 001 c18bfe08 eef19008 > > [ 1.578674] dd80: eef19000 c10affe0 00000000 c05fc0d4 eef19008 eecdc= 000 eef19000 c05fa478 > > [ 1.586914] dda0: 00000000 eef19000 eef19260 00000000 eef19000 eecdc= 000 00000000 eea61c10 > > [ 1.595123] ddc0: 00000001 00000000 c0d7f208 c06a184c eecdc000 ef6e9= a2c ef6e9a7c eef19000 > > [ 1.603363] dde0: 00000001 c06a20ac 00000000 00000002 c0add880 eea61= c10 c06a1bd8 002dc6c0 > > [ 1.611602] de00: eea61c10 eef17210 eecdc000 eecdc000 eea61c10 eea61= c10 c0da4ba0 c0da4b98 > > [ 1.619812] de20: 000001f0 c06a243c 00000000 eecdc4e0 eecdc000 eecdc= 000 eea61c10 c06a5e60 > > [ 1.628051] de40: 00000000 60000013 c1897138 00000004 8132535b eea61= c10 ffffffed c10b0c74 > > [ 1.636291] de60: fffffdfb 00000000 00000000 c0f66858 c0f005a8 c05fe= cf8 eea61c10 c18bfe4c > > [ 1.644531] de80: 00000000 c10b0c74 00000000 c05fcd9c eea61c10 c10b0= c74 eea61c44 00000000 > > [ 1.652740] dea0: c10f8000 00000007 c0f66858 c05fcee4 00000000 c10b0= c74 c05fce24 c05fb228 > > [ 1.660980] dec0: ee8a58a4 eea5ac50 c10b0c74 eef13580 c10a5720 c05fc= 2e4 c0d332c0 c0f4365c > > [ 1.669219] dee0: 00000000 c10b0c74 c0f4365c 00000000 c0e4f6ec c05fd= d28 ffffe000 c0f4365c > > [ 1.677429] df00: 00000000 c0101874 00000134 00000000 efffec00 efffe= cdd c0e50efc 00000134 > > [ 1.685668] df20: 00000134 c015f5dc c0e4f6ec 00000000 00000006 00000= 006 efffecdd 00000000 > > [ 1.693908] df40: c0f7f7cc 00000006 c10f8000 c0f6684c c0f7fe74 c10f8= 000 c0f66850 c10f8000 > > [ 1.702148] df60: 00000007 c0f00eb4 00000006 00000006 00000000 c0f00= 5a8 c0ad652c 00000134 > > [ 1.710357] df80: 00000000 00000000 c0ad652c 00000000 00000000 00000= 000 00000000 00000000 > > [ 1.718597] dfa0: 00000000 c0ad6534 00000000 c01077d0 00000000 00000= 000 00000000 00000000 > > [ 1.726837] dfc0: 00000000 00000000 00000000 00000000 00000000 00000= 000 00000000 00000000 > > [ 1.735046] dfe0: 00000000 00000000 00000000 00000000 00000013 00000= 000 c0c0c0c0 c0c0c0c0 > > [ 1.743316] [] (lock_release) from [] (_raw_spin= _unlock_irqrestore+0x1c/0x44) > > [ 1.752258] [] (_raw_spin_unlock_irqrestore) from [] (omap_gpio_get_direction+0x38/0x44) > > [ 1.762145] [] (omap_gpio_get_direction) from []= (gpiochip_lock_as_irq+0x98/0xe4) > > [ 1.771423] [] (gpiochip_lock_as_irq) from [] (g= piochip_irq_reqres+0x2c/0x6c) > > [ 1.780364] [] (gpiochip_irq_reqres) from [] (__= setup_irq+0x46c/0x69c) > > [ 1.788696] [] (__setup_irq) from [] (request_th= readed_irq+0xcc/0x14c) > > [ 1.796997] [] (request_threaded_irq) from [] (r= egmap_add_irq_chip+0x794/0x914) > > [ 1.806121] [] (regmap_add_irq_chip) from [] (de= vm_regmap_add_irq_chip+0x58/0xb4) > > [ 1.815399] [] (devm_regmap_add_irq_chip) from [= ] (cpcap_init_irq_chip+0x138/0x16c) > > [ 1.824859] [] (cpcap_init_irq_chip) from [] (cp= cap_probe+0x154/0x264) > > [ 1.833190] [] (cpcap_probe) from [] (spi_drv_pr= obe+0x7c/0xac) > > [ 1.840820] [] (spi_drv_probe) from [] (driver_p= robe_device+0x260/0x2e8) > > [ 1.849334] [] (driver_probe_device) from [] (bu= s_for_each_drv+0x64/0x98) > > [ 1.857910] [] (bus_for_each_drv) from [] (__dev= ice_attach+0xb0/0x118) > > [ 1.866241] [] (__device_attach) from [] (bus_pr= obe_device+0x88/0x90) > > [ 1.874450] [] (bus_probe_device) from [] (devic= e_add+0x3c8/0x57c) > > [ 1.882446] [] (device_add) from [] (spi_add_dev= ice+0x90/0x134) > > [ 1.890136] [] (spi_add_device) from [] (spi_reg= ister_master+0x444/0x7a4) > > [ 1.898742] [] (spi_register_master) from [] (de= vm_spi_register_master+0x30/0x70) > > [ 1.908020] [] (devm_spi_register_master) from [= ] (omap2_mcspi_probe+0x278/0x354) > > [ 1.917297] [] (omap2_mcspi_probe) from [] (plat= form_drv_probe+0x50/0xb0) > > [ 1.925872] [] (platform_drv_probe) from [] (dri= ver_probe_device+0x260/0x2e8) > > [ 1.934814] [] (driver_probe_device) from [] (__= driver_attach+0xc0/0xc4) > > [ 1.943298] [] (__driver_attach) from [] (bus_fo= r_each_dev+0x6c/0xa0) > > [ 1.951538] [] (bus_for_each_dev) from [] (bus_a= dd_driver+0x100/0x210) > > [ 1.959869] [] (bus_add_driver) from [] (driver_= register+0x78/0xf4) > > [ 1.967926] [] (driver_register) from [] (do_one= _initcall+0x3c/0x170) > > [ 1.976165] [] (do_one_initcall) from [] (kernel= _init_freeable+0x210/0x2dc) > > [ 1.984924] [] (kernel_init_freeable) from [] (k= ernel_init+0x8/0x114) > > [ 1.993164] [] (kernel_init) from [] (ret_from_f= ork+0x14/0x24) > > [ 2.000793] Code: e121f008 eaffffc4 e5993010 eb005645 (e3500000)=20 >=20 > 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. >=20 > 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 --wbpgdnug5zmctuk7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAllk4ykACgkQ2O7X88g7 +poXmRAAgh5eZwfNJ9On/2T1oCrH34L45JO2CMQVamocgugPBj05asBnF6t66Ch5 e82gTxikQyTzKPR3OmppAPIkC0PW62JnvMIrPbAdCcRzPnVw6vliipEXtXOSwZzW kASCOLP4wo0RkKqsZXFuNA/Fppmjn7REwmPKXc0kBWaPtvNcbXnHphoc25SZzCfl c5mDwanwSFIxAZOCrbt9X3Hj/HFsmI9XlLXEI+zFM5ZLqH/hpCAibNq5cT8dlMBp M2CpqVfo4bEQomDY1b8d8uXiMAsXCzC9CNePJjLpRhKlo7uQ26OMFY5aJJof0u8l EZu4++DEQI1hpM89XuiRjhN3WQzV91XCJ7v1N8k/a4OzlhxP9Ux8he8bijzvirXJ K3YiV/77LJX+oJmanrt+jH7LRGJfDSJ4yJJhKxzqowWP+2nrh6xbY6K8x5iijsVN 5i+hAwdzmrt1Zccrw9WFR8ryCXddfKG7Db18y/fpNQg0+gwpuow2udm/6kWJVszy ezkqWGz1eEIvk4HpbD0X5ShXit4RZlkVaTwBYQ2omPhJSAiRWEESu10NVH9BCpdy wtPTVd/G4Eunjul2phWzePTz2ZhvKIoq4qbzSMW9s+Pz4n/++b35NWTyXLBDa9VR blbxxTJNShtMD1s8ghhTSm4xRUNmgEJ6Lxe1fUv2dM2dlGIxDzw= =zoqn -----END PGP SIGNATURE----- --wbpgdnug5zmctuk7--