From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-spi <linux-spi@vger.kernel.org>,
Mark Brown <broonie@kernel.org>,
Fabio Estevam <festevam@gmail.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: Boot failure with 5.4-rc5, bisected to 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors")
Date: Tue, 26 Nov 2019 20:08:00 +0100 [thread overview]
Message-ID: <3c79a8b9-65e4-bfc9-d718-b8530fe1e672@c-s.fr> (raw)
In-Reply-To: <CACRpkdYUBj+45Jr94kdERKJogVoL96JH6i85o_bVUtjmkTt19g@mail.gmail.com>
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@c-s.fr> 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
next prev parent reply other threads:[~2019-11-26 19:08 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 12:33 Boot failure with 5.4-rc5, bisected to 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors") Christophe Leroy
2019-11-08 13:09 ` Linus Walleij
2019-11-08 13:34 ` Christophe Leroy
2019-11-26 15:01 ` Christophe Leroy
2019-11-26 15:35 ` Fabio Estevam
2019-11-26 16:16 ` Christophe Leroy
2019-11-26 16:23 ` Mark Brown
2019-11-26 15:48 ` Linus Walleij
2019-11-26 19:08 ` Christophe Leroy [this message]
2019-11-26 19:14 ` Christophe Leroy
2019-11-27 8:26 ` Linus Walleij
2019-11-27 8:57 ` Christophe Leroy
2019-11-27 9:07 ` Christophe Leroy
2019-11-27 9:11 ` Linus Walleij
2019-11-27 9:34 ` Christophe Leroy
2019-11-27 10:02 ` Linus Walleij
2019-11-27 10:39 ` Christophe Leroy
2019-11-27 10:55 ` Linus Walleij
2019-11-27 12:04 ` Christophe Leroy
2019-11-27 13:00 ` Linus Walleij
2019-11-27 13:44 ` Christophe Leroy
2019-11-27 13:52 ` Linus Walleij
2019-11-27 13:54 ` Christophe Leroy
2019-11-27 13:56 ` Linus Walleij
2019-11-27 14:29 ` Christophe Leroy
2019-11-28 8:42 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3c79a8b9-65e4-bfc9-d718-b8530fe1e672@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).