-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mmc_spi: has anyone been successfully using it with one of the newest kernels? #911
Comments
are you using spi-gpio.ko? 2015-03-26 17:10 GMT+01:00 msperl [email protected]:
|
no - the native spi-bcm2835 driver. |
note that I have bisected as far as: Has anyone a hint what the earliest commit of 3.10 is that works on the rpi? All commits in the 3.10 I have tried so far miss arch/arm/mach-bcm2708/bcm2708.c, so they have not been merged that early during the 3.10 cycle... |
note that on a 4.0-rc5 the following seems to solve the issue:
I have not tried it with a foundation kernel (yet), but it seems likely to work as well. |
@msperl has your issue been resolved? If so, please close this issue. Thanks. |
Well - afaik this has not been fixed upstream, so I assume it is not fixed downstream either (unless you have applied the above patch here: msperl@aef50a1). So many in reality it does not make any sense compiling spi_mmc unless the patch is applied. So from my perspective it is your call if you want to apply a variation of the patch or if you want to ship a broken driver. You can also close the issue. |
Has this been reported upstream? |
The point is that it is still unclear why it fails with the dma code - or even just this section - enabled, so I guess upstream will not accept a bandaid patch. And as I am not using it (unless I work on spi-bcm2835, where I use it for test purposes)I am not pushing it. Fact is that it does not work with a set dma_mask and you are shipping it broken right now. |
@msperl Any movement on this on latest kernel? |
Will be closing soon if no furthur comments. |
Closing due to lack of activity. Reopen if you feel this issue is still relevant. |
[ Upstream commit ce5c31d ] At the moment, UBSAN report will be serialized using a spin_lock(). On RT-systems, spinlocks are turned to rt_spin_lock and may sleep. This will result to the following splat if the undefined behavior is in a context that can sleep: BUG: sleeping function called from invalid context at /src/linux/kernel/locking/rtmutex.c:968 in_atomic(): 1, irqs_disabled(): 128, pid: 3447, name: make 1 lock held by make/3447: #0: 000000009a966332 (&mm->mmap_sem){++++}, at: do_page_fault+0x140/0x4f8 irq event stamp: 6284 hardirqs last enabled at (6283): [<ffff000011326520>] _raw_spin_unlock_irqrestore+0x90/0xa0 hardirqs last disabled at (6284): [<ffff0000113262b0>] _raw_spin_lock_irqsave+0x30/0x78 softirqs last enabled at (2430): [<ffff000010088ef8>] fpsimd_restore_current_state+0x60/0xe8 softirqs last disabled at (2427): [<ffff000010088ec0>] fpsimd_restore_current_state+0x28/0xe8 Preemption disabled at: [<ffff000011324a4c>] rt_mutex_futex_unlock+0x4c/0xb0 CPU: 3 PID: 3447 Comm: make Tainted: G W 5.2.14-rt7-01890-ge6e057589653 #911 Call trace: dump_backtrace+0x0/0x148 show_stack+0x14/0x20 dump_stack+0xbc/0x104 ___might_sleep+0x154/0x210 rt_spin_lock+0x68/0xa0 ubsan_prologue+0x30/0x68 handle_overflow+0x64/0xe0 __ubsan_handle_add_overflow+0x10/0x18 __lock_acquire+0x1c28/0x2a28 lock_acquire+0xf0/0x370 _raw_spin_lock_irqsave+0x58/0x78 rt_mutex_futex_unlock+0x4c/0xb0 rt_spin_unlock+0x28/0x70 get_page_from_freelist+0x428/0x2b60 __alloc_pages_nodemask+0x174/0x1708 alloc_pages_vma+0x1ac/0x238 __handle_mm_fault+0x4ac/0x10b0 handle_mm_fault+0x1d8/0x3b0 do_page_fault+0x1c8/0x4f8 do_translation_fault+0xb8/0xe0 do_mem_abort+0x3c/0x98 el0_da+0x20/0x24 The spin_lock() will protect against multiple CPUs to output a report together, I guess to prevent them from being interleaved. However, they can still interleave with other messages (and even splat from __might_sleep). So the lock usefulness seems pretty limited. Rather than trying to accomodate RT-system by switching to a raw_spin_lock(), the lock is now completely dropped. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Julien Grall <[email protected]> Reported-by: Andre Przywara <[email protected]> Acked-by: Andrey Ryabinin <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Cc: Steven Rostedt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
I honestly don't know why nobody complained about it. https://github.com/raspberrypi/linux/blob/rpi-6.1.y/drivers/mmc/host/mmc_spi.c#L1513 I patched it because spi_probe was never actually invoking Changed both "mmc-spi-slot" to "mmc_spi" and used the following overlay "mmc_spi.dts":
compiled it with: output from dmesg is:
|
The module is called mmc_spi. The compatible string required in an overlay is "mmc-spi-slot", exactly as stated in the binding. I don't see an overlay being shipped as part of this kernel tree using mmc_spi / mmc-spi-slot, so I don't believe there is an issue outstanding. |
Hi!
has anyone been able to run mmc_spi with one of the latest kernels?
The last time I have tried I was still on 3.12 or earlier - now I only get error messages like this:
mmc1: error -110 whilst initialising SD card
-110 would mean -ETIMEDOUT.
And that with 8 different SD-Cards.
Might be related to kernel versions...
Any Ideas?
Martin
The text was updated successfully, but these errors were encountered: