Re: Boot failure with 5.4-rc5, bisected to 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Le 26/11/2019 à 16:48, Linus Walleij a écrit :
Hi Christophe,

sorry for forgetting about this :(

On Fri, Nov 8, 2019 at 2:34 PM Christophe Leroy <christophe.leroy@xxxxxx> wrote:

With the two above changes, I get:
[    3.143014] fsl_spi ff000a80.spi: bail out with error code -22
[    3.148879] ------------[ cut here ]------------
[    3.153261] remove_proc_entry: removing non-empty directory 'irq/43',
leaking at least 'fsl_spi'
[    3.162473] WARNING: CPU: 0 PID: 1 at fs/proc/generic.c:684
remove_proc_entry+0x1a0/0x1c8

So that is another bug again. (Tearing down IRQs is erroneous
in some way.)

The problem is the first -22 (-EINVAL)

Which comes from of_fsl_spi_probe() IIUC.

Can you try the following? I'm sorry if gmail mangles the
patches, I put a copy here:
https://dflund.se/~triad/fsldebug.diff

I get the following

[    3.159953] fsl_spi ff000a80.spi: devm_spi_register_master() failed
[    3.166154] fsl_spi ff000a80.spi: exiting fsl_spi_probe() with error
[    3.172194] fsl_spi ff000a80.spi: fsl_spi_probe() failed
[    3.177670] ------------[ cut here ]------------
[ 3.181991] remove_proc_entry: removing non-empty directory 'irq/43', leaking at least 'fsl_spi' [ 3.191209] WARNING: CPU: 0 PID: 1 at fs/proc/generic.c:684 remove_proc_entry+0x1a0/0x1c8 [ 3.199139] CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.0-s3k-dev-00898-gd57c00e2472d-dirty #2499
[    3.207890] NIP:  c017eb74 LR: c017eb74 CTR: c0047584
[ 3.212892] REGS: c60e1c20 TRAP: 0700 Not tainted (5.4.0-s3k-dev-00898-gd57c00e2472d-dirty)
[    3.221385] MSR:  00029032 <EE,ME,IR,DR,RI>  CR: 22008222  XER: 00000000
[    3.228011]
[ 3.228011] GPR00: c017eb74 c60e1cd8 c60d4000 00000054 00000000 00000000 0000cf08 00000010 [ 3.228011] GPR08: c0779030 00000800 00000000 00001032 22000408 00000000 c0003890 00000000 [ 3.228011] GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 c0800000 0000009e [ 3.228011] GPR24: c0856778 c6211c50 ffffffea c077d3b8 00000001 c60d3863 c60d08e3 c60d3800
[    3.262659] NIP [c017eb74] remove_proc_entry+0x1a0/0x1c8
[    3.267905] LR [c017eb74] remove_proc_entry+0x1a0/0x1c8
[    3.273021] Call Trace:
[ 3.275478] [c60e1cd8] [c017eb74] remove_proc_entry+0x1a0/0x1c8 (unreliable)
[    3.282466] [c60e1d08] [c005d17c] unregister_irq_proc+0x5c/0x70
[    3.288292] [c60e1d28] [c00551f0] free_desc+0x4c/0x90
[    3.293285] [c60e1d48] [c0055458] irq_free_descs+0x70/0xa8
[    3.298709] [c60e1d68] [c030eb90] of_fsl_spi_probe+0xc0/0x418
[    3.304388] [c60e1db8] [c02c4e94] platform_drv_probe+0x44/0xa4
[    3.310181] [c60e1dc8] [c02c3038] really_probe+0x1ac/0x418
[    3.315588] [c60e1df8] [c02c3ab8] device_driver_attach+0x88/0x90
[    3.321524] [c60e1e18] [c02c3b60] __driver_attach+0xa0/0x154
[    3.327115] [c60e1e38] [c02c1098] bus_for_each_dev+0x64/0xb4
[    3.332709] [c60e1e68] [c02c1a74] bus_add_driver+0xe0/0x218
[    3.338222] [c60e1e88] [c02c4318] driver_register+0x84/0x148
[    3.343815] [c60e1e98] [c06d8d30] do_one_initcall+0x8c/0x1cc
[    3.349401] [c60e1ef8] [c06d8fac] kernel_init_freeable+0x13c/0x1ec
[    3.355509] [c60e1f28] [c00038a4] kernel_init+0x14/0x110
[    3.360763] [c60e1f38] [c000e1cc] ret_from_kernel_thread+0x14/0x1c
[    3.366825] Instruction dump:
[ 3.369760] 2c030000 4182004c 3863ffb0 3c80c05a 80e3005c 388477d0 3c60c068 7fa6eb78 [ 3.377417] 7fc5f378 38840280 386336d4 4be9e5a9 <0fe00000> 4bffff7c 3c60c06c 7fc4f378
[    3.385277] ---[ end trace 25f4e57540579d18 ]---
[    3.390369] fsl_spi: probe of ff000a80.spi failed with error -22

Digging a bit further, I see that devm_spi_register_master() fails in spi_register_controler() because ctlr->num_chipselect is 0

Christophe



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux