Re: 6.8 SPI Chip Select Regression

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

 



Hi Mark,

Thanks for the quick response.

On Wed, Apr 03, 2024 at 12:52:44AM +0100, Mark Brown wrote:
> On Tue, Apr 02, 2024 at 04:32:50PM -0500, Colin Foster wrote:
> > Hi Amit,
> 
> Amit, please respond to these issues - you never replied to the mails
> about the other regressions this introduced either...
> 
> > [    3.459990] omap2_mcspi 48030000.spi: chipselect 0 already in use
> > [    3.466135] spi_master spi0: spi_device register error /ocp/interconnect@48000000/segment@0/target-module@30000/spi@0/soc@0
> > [    3.477495] spi_master spi0: Failed to create SPI device for /ocp/interconnect@48000000/segment@0/target-module@30000/spi@0/soc@0
> 
> > Is this a known issue? Is there anything I either might need to do to a
> > device tree, or something you might suggest to help troubleshoot this?
> 
> This is not known, and given that you say there's only one chip select
> in use on the system seems clearly bogus.  There were some regressions
> with trying to use more than the hard coded maximum number of chip
> selects but they have a different error pattern.  It's late so I'll not
> look properly right now but...
> 
> Do you know what chip select 0 is - if you add a WARN_ON() to
> spi_set_chipselect() it should show a prior call to the function,

Log is below. There aren't any other SPI devices, so I'm not really sure
what is the issue just yet. It is also using the built-in chip select,
not a GPIO.

> or is
> it some logic bug that somehow is not manifesting on other systems that
> use chip select 0?  Though looking quickly there has been some factoring
> out since that commit was merged...  just to confirm, did you bisect to
> find the problematic commit? 

I bisected, and just confirmed again that the previous commit,
f05e2f61fe88: ("ALSA: hda/cs35l56: Use set/get APIs to access spi->chip_select")
does boot as expected.

I noticed the issue on 6.9-rc2, then jumped back to 6.8, then 6.7.
Bisected between 6.7 and 6.8.

> If you could show the DT for your setup
> that'd help, especially if this is a GPIO chip select.

It should be attached. It is really nothing more than the beaglebone
black with this SPI addition. The only things out-of-tree are some VLAN
and MTU tweaks I had to make for my DSA networking setup to work.




The boot log with WARN_ON(true) at spi_set_chipselect, as well as
dump_stack() before both "chipselect %d already in use" messages.


Linux version 6.7.0-rc1-00003-g4d8ff6b0991d-dirty (colin@euler) (arm-unknown-linux-gnueabi-gcc (crosstool-NG 1.25.0) 11.2.0, GNU ld (crosstool-NG 1.25.0) 2.38) #1375 SMP PREEMPT Tue Apr  2 20:36:28 CDT 2024

8<

at24 0-0050: using lookup tables for GPIO lookup
at24 0-0050: No GPIO consumer wp found
at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
------------[ cut here ]------------
WARNING: CPU: 0 PID: 25 at include/linux/spi/spi.h:299 of_register_spi_device+0x218/0x5f0
Modules linked in:
CPU: 0 PID: 25 Comm: kworker/u2:2 Not tainted 6.7.0-rc1-00003-g4d8ff6b0991d-dirty #1375
Hardware name: Generic AM33XX (Flattened Device Tree)
Workqueue: events_unbound deferred_probe_work_func
Backtrace: 
 dump_backtrace from show_stack+0x20/0x24
 show_stack from dump_stack_lvl+0x60/0x78
 dump_stack_lvl from dump_stack+0x18/0x1c
 dump_stack from __warn+0x88/0x160
 __warn from warn_slowpath_fmt+0x168/0x1f4
 warn_slowpath_fmt from of_register_spi_device+0x218/0x5f0
 of_register_spi_device from spi_register_controller+0x3b0/0x6b8
 spi_register_controller from devm_spi_register_controller+0x54/0x94
 devm_spi_register_controller from omap2_mcspi_probe+0x4c4/0x584
 omap2_mcspi_probe from platform_probe+0x6c/0xcc
 platform_probe from really_probe+0xd8/0x2e8
 really_probe from __driver_probe_device+0x98/0x1b0
 __driver_probe_device from driver_probe_device+0x40/0x114
 driver_probe_device from __device_attach_driver+0xa4/0x10c
 __device_attach_driver from bus_for_each_drv+0x94/0xec
 bus_for_each_drv from __device_attach+0xbc/0x1e0
 __device_attach from device_initial_probe+0x1c/0x20
 device_initial_probe from bus_probe_device+0x98/0x9c
 bus_probe_device from deferred_probe_work_func+0x88/0xb4
 deferred_probe_work_func from process_one_work+0x170/0x43c
 process_one_work from worker_thread+0x2c4/0x4ec
 worker_thread from kthread+0x114/0x148
 kthread from ret_from_fork+0x14/0x28
Exception stack(0xe006dfb0 to 0xe006dff8)
dfa0:                                     00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c037c070 r4:c21d6140
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 25 at include/linux/spi/spi.h:299 of_register_spi_device+0x218/0x5f0
Modules linked in:
CPU: 0 PID: 25 Comm: kworker/u2:2 Tainted: G        W          6.7.0-rc1-00003-g4d8ff6b0991d-dirty #1375
Hardware name: Generic AM33XX (Flattened Device Tree)
Workqueue: events_unbound deferred_probe_work_func
Backtrace: 
 dump_backtrace from show_stack+0x20/0x24
 show_stack from dump_stack_lvl+0x60/0x78
 dump_stack_lvl from dump_stack+0x18/0x1c
 dump_stack from __warn+0x88/0x160
 __warn from warn_slowpath_fmt+0x168/0x1f4
 warn_slowpath_fmt from of_register_spi_device+0x218/0x5f0
 of_register_spi_device from spi_register_controller+0x3b0/0x6b8
 spi_register_controller from devm_spi_register_controller+0x54/0x94
 devm_spi_register_controller from omap2_mcspi_probe+0x4c4/0x584
 omap2_mcspi_probe from platform_probe+0x6c/0xcc
 platform_probe from really_probe+0xd8/0x2e8
 really_probe from __driver_probe_device+0x98/0x1b0
 __driver_probe_device from driver_probe_device+0x40/0x114
 driver_probe_device from __device_attach_driver+0xa4/0x10c
 __device_attach_driver from bus_for_each_drv+0x94/0xec
 bus_for_each_drv from __device_attach+0xbc/0x1e0
 __device_attach from device_initial_probe+0x1c/0x20
 device_initial_probe from bus_probe_device+0x98/0x9c
 bus_probe_device from deferred_probe_work_func+0x88/0xb4
 deferred_probe_work_func from process_one_work+0x170/0x43c
 process_one_work from worker_thread+0x2c4/0x4ec
 worker_thread from kthread+0x114/0x148
 kthread from ret_from_fork+0x14/0x28
Exception stack(0xe006dfb0 to 0xe006dff8)
dfa0:                                     00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c037c070 r4:c21d6140
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 25 at include/linux/spi/spi.h:299 of_register_spi_device+0x218/0x5f0
Modules linked in:
CPU: 0 PID: 25 Comm: kworker/u2:2 Tainted: G        W          6.7.0-rc1-00003-g4d8ff6b0991d-dirty #1375
Hardware name: Generic AM33XX (Flattened Device Tree)
Workqueue: events_unbound deferred_probe_work_func
Backtrace: 
 dump_backtrace from show_stack+0x20/0x24
 show_stack from dump_stack_lvl+0x60/0x78
 dump_stack_lvl from dump_stack+0x18/0x1c
 dump_stack from __warn+0x88/0x160
 __warn from warn_slowpath_fmt+0x168/0x1f4
 warn_slowpath_fmt from of_register_spi_device+0x218/0x5f0
 of_register_spi_device from spi_register_controller+0x3b0/0x6b8
 spi_register_controller from devm_spi_register_controller+0x54/0x94
 devm_spi_register_controller from omap2_mcspi_probe+0x4c4/0x584
 omap2_mcspi_probe from platform_probe+0x6c/0xcc
 platform_probe from really_probe+0xd8/0x2e8
 really_probe from __driver_probe_device+0x98/0x1b0
 __driver_probe_device from driver_probe_device+0x40/0x114
 driver_probe_device from __device_attach_driver+0xa4/0x10c
 __device_attach_driver from bus_for_each_drv+0x94/0xec
 bus_for_each_drv from __device_attach+0xbc/0x1e0
 __device_attach from device_initial_probe+0x1c/0x20
 device_initial_probe from bus_probe_device+0x98/0x9c
 bus_probe_device from deferred_probe_work_func+0x88/0xb4
 deferred_probe_work_func from process_one_work+0x170/0x43c
 process_one_work from worker_thread+0x2c4/0x4ec
 worker_thread from kthread+0x114/0x148
 kthread from ret_from_fork+0x14/0x28
Exception stack(0xe006dfb0 to 0xe006dff8)
dfa0:                                     00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c037c070 r4:c21d6140
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 25 at include/linux/spi/spi.h:299 of_register_spi_device+0x218/0x5f0
Modules linked in:
CPU: 0 PID: 25 Comm: kworker/u2:2 Tainted: G        W          6.7.0-rc1-00003-g4d8ff6b0991d-dirty #1375
Hardware name: Generic AM33XX (Flattened Device Tree)
Workqueue: events_unbound deferred_probe_work_func
Backtrace: 
 dump_backtrace from show_stack+0x20/0x24
 show_stack from dump_stack_lvl+0x60/0x78
 dump_stack_lvl from dump_stack+0x18/0x1c
 dump_stack from __warn+0x88/0x160
 __warn from warn_slowpath_fmt+0x168/0x1f4
 warn_slowpath_fmt from of_register_spi_device+0x218/0x5f0
 of_register_spi_device from spi_register_controller+0x3b0/0x6b8
 spi_register_controller from devm_spi_register_controller+0x54/0x94
 devm_spi_register_controller from omap2_mcspi_probe+0x4c4/0x584
 omap2_mcspi_probe from platform_probe+0x6c/0xcc
 platform_probe from really_probe+0xd8/0x2e8
 really_probe from __driver_probe_device+0x98/0x1b0
 __driver_probe_device from driver_probe_device+0x40/0x114
 driver_probe_device from __device_attach_driver+0xa4/0x10c
 __device_attach_driver from bus_for_each_drv+0x94/0xec
 bus_for_each_drv from __device_attach+0xbc/0x1e0
 __device_attach from device_initial_probe+0x1c/0x20
 device_initial_probe from bus_probe_device+0x98/0x9c
 bus_probe_device from deferred_probe_work_func+0x88/0xb4
 deferred_probe_work_func from process_one_work+0x170/0x43c
 process_one_work from worker_thread+0x2c4/0x4ec
 worker_thread from kthread+0x114/0x148
 kthread from ret_from_fork+0x14/0x28
Exception stack(0xe006dfb0 to 0xe006dff8)
dfa0:                                     00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c037c070 r4:c21d6140
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 25 at include/linux/spi/spi.h:299 of_register_spi_device+0x2c0/0x5f0
Modules linked in:
CPU: 0 PID: 25 Comm: kworker/u2:2 Tainted: G        W          6.7.0-rc1-00003-g4d8ff6b0991d-dirty #1375
Hardware name: Generic AM33XX (Flattened Device Tree)
Workqueue: events_unbound deferred_probe_work_func
Backtrace: 
 dump_backtrace from show_stack+0x20/0x24
 show_stack from dump_stack_lvl+0x60/0x78
 dump_stack_lvl from dump_stack+0x18/0x1c
 dump_stack from __warn+0x88/0x160
 __warn from warn_slowpath_fmt+0x168/0x1f4
 warn_slowpath_fmt from of_register_spi_device+0x2c0/0x5f0
 of_register_spi_device from spi_register_controller+0x3b0/0x6b8
 spi_register_controller from devm_spi_register_controller+0x54/0x94
 devm_spi_register_controller from omap2_mcspi_probe+0x4c4/0x584
 omap2_mcspi_probe from platform_probe+0x6c/0xcc
 platform_probe from really_probe+0xd8/0x2e8
 really_probe from __driver_probe_device+0x98/0x1b0
 __driver_probe_device from driver_probe_device+0x40/0x114
 driver_probe_device from __device_attach_driver+0xa4/0x10c
 __device_attach_driver from bus_for_each_drv+0x94/0xec
 bus_for_each_drv from __device_attach+0xbc/0x1e0
 __device_attach from device_initial_probe+0x1c/0x20
 device_initial_probe from bus_probe_device+0x98/0x9c
 bus_probe_device from deferred_probe_work_func+0x88/0xb4
 deferred_probe_work_func from process_one_work+0x170/0x43c
 process_one_work from worker_thread+0x2c4/0x4ec
 worker_thread from kthread+0x114/0x148
 kthread from ret_from_fork+0x14/0x28
Exception stack(0xe006dfb0 to 0xe006dff8)
dfa0:                                     00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c037c070 r4:c21d6140
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 25 at include/linux/spi/spi.h:299 of_register_spi_device+0x2c0/0x5f0
Modules linked in:
CPU: 0 PID: 25 Comm: kworker/u2:2 Tainted: G        W          6.7.0-rc1-00003-g4d8ff6b0991d-dirty #1375
Hardware name: Generic AM33XX (Flattened Device Tree)
Workqueue: events_unbound deferred_probe_work_func
Backtrace: 
 dump_backtrace from show_stack+0x20/0x24
 show_stack from dump_stack_lvl+0x60/0x78
 dump_stack_lvl from dump_stack+0x18/0x1c
 dump_stack from __warn+0x88/0x160
 __warn from warn_slowpath_fmt+0x168/0x1f4
 warn_slowpath_fmt from of_register_spi_device+0x2c0/0x5f0
 of_register_spi_device from spi_register_controller+0x3b0/0x6b8
 spi_register_controller from devm_spi_register_controller+0x54/0x94
 devm_spi_register_controller from omap2_mcspi_probe+0x4c4/0x584
 omap2_mcspi_probe from platform_probe+0x6c/0xcc
 platform_probe from really_probe+0xd8/0x2e8
 really_probe from __driver_probe_device+0x98/0x1b0
 __driver_probe_device from driver_probe_device+0x40/0x114
 driver_probe_device from __device_attach_driver+0xa4/0x10c
 __device_attach_driver from bus_for_each_drv+0x94/0xec
 bus_for_each_drv from __device_attach+0xbc/0x1e0
 __device_attach from device_initial_probe+0x1c/0x20
 device_initial_probe from bus_probe_device+0x98/0x9c
 bus_probe_device from deferred_probe_work_func+0x88/0xb4
 deferred_probe_work_func from process_one_work+0x170/0x43c
 process_one_work from worker_thread+0x2c4/0x4ec
 worker_thread from kthread+0x114/0x148
 kthread from ret_from_fork+0x14/0x28
Exception stack(0xe006dfb0 to 0xe006dff8)
dfa0:                                     00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c037c070 r4:c21d6140
---[ end trace 0000000000000000 ]---
idx = 0, nw_idx = 1, cs = 0
CPU: 0 PID: 25 Comm: kworker/u2:2 Tainted: G        W          6.7.0-rc1-00003-g4d8ff6b0991d-dirty #1375
Hardware name: Generic AM33XX (Flattened Device Tree)
Workqueue: events_unbound deferred_probe_work_func
Backtrace: 
 dump_backtrace from show_stack+0x20/0x24
 show_stack from dump_stack_lvl+0x60/0x78
 dump_stack_lvl from dump_stack+0x18/0x1c
 dump_stack from __spi_add_device+0x190/0x224
 __spi_add_device from spi_add_device+0x50/0x64
 spi_add_device from of_register_spi_device+0x430/0x5f0
 of_register_spi_device from spi_register_controller+0x3b0/0x6b8
 spi_register_controller from devm_spi_register_controller+0x54/0x94
 devm_spi_register_controller from omap2_mcspi_probe+0x4c4/0x584
 omap2_mcspi_probe from platform_probe+0x6c/0xcc
 platform_probe from really_probe+0xd8/0x2e8
 really_probe from __driver_probe_device+0x98/0x1b0
 __driver_probe_device from driver_probe_device+0x40/0x114
 driver_probe_device from __device_attach_driver+0xa4/0x10c
 __device_attach_driver from bus_for_each_drv+0x94/0xec
 bus_for_each_drv from __device_attach+0xbc/0x1e0
 __device_attach from device_initial_probe+0x1c/0x20
 device_initial_probe from bus_probe_device+0x98/0x9c
 bus_probe_device from deferred_probe_work_func+0x88/0xb4
 deferred_probe_work_func from process_one_work+0x170/0x43c
 process_one_work from worker_thread+0x2c4/0x4ec
 worker_thread from kthread+0x114/0x148
 kthread from ret_from_fork+0x14/0x28
Exception stack(0xe006dfb0 to 0xe006dff8)
dfa0:                                     00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c037c070 r4:c21d6140
omap2_mcspi 48030000.spi: chipselect 0 already in use
spi_master spi0: spi_device register error /ocp/interconnect@48000000/segment@0/target-module@30000/spi@0/soc@0
spi_master spi0: Failed to create SPI device for /ocp/interconnect@48000000/segment@0/target-module@30000/spi@0/soc@0
sdhci-omap 48060000.mmc: using DT '/ocp/interconnect@48000000/segment@0/target-module@60000/mmc@0' for 'cd' GPIO lookup
of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@60000/mmc@0[0]' - status (0)

Attachment: am335x-boneblack-vsc7512.dts
Description: audio/vnd.dts


[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