[meta-xilinx] MMC timeout with linux-yocto-48

Nathan Rossi nathan at nathanrossi.com
Thu Nov 10 07:18:08 PST 2016


On 5 November 2016 at 06:51, Philip Balister <philip at balister.org> wrote:
> I'm seeing this on a custom zynq board with Linux-yocto-4.8. Nathan
> Rossi confirmed he could dupe this on a zybo. Booting mainline with the
> multi_v7... config works though. Furthering moving around suggests
> linux-yocto-48 will work, if we can figure out the magic kernel config
> option.
>
> Anyone see this? Any suggestions where to look? Nothing obvious jumps
> out by inspection.
>
> Philip
>
> [ 6568.222913] mmc0: Timeout waiting for hardware interrupt.
> [ 6568.228268] sdhci: =========== REGISTER DUMP (mmc0)===========
> [ 6568.234084] sdhci: Sys addr: 0x00036a00 | Version:  0x00008901
> [ 6568.239899] sdhci: Blk size: 0x00007200 | Blk cnt:  0x00000001
> [ 6568.245714] sdhci: Argument: 0x0000af05 | Trn mode: 0x00000013
> [ 6568.251530] sdhci: Present:  0x01ff0202 | Host ctl: 0x00000017
> [ 6568.257345] sdhci: Power:    0x0000000f | Blk gap:  0x00000000
> [ 6568.263161] sdhci: Wake-up:  0x00000000 | Clock:    0x00000207
> [ 6568.268976] sdhci: Timeout:  0x0000000e | Int stat: 0x00000000
> [ 6568.274793] sdhci: Int enab: 0x02ff008b | Sig enab: 0x02ff008b
> [ 6568.280607] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
> [ 6568.286423] sdhci: Caps:     0x69ec0080 | Caps_1:   0x00000000
> [ 6568.292239] sdhci: Cmd:      0x0000113a | Max curr: 0x00000001
> [ 6568.298053] sdhci: Host ctl2: 0x00000000
> [ 6568.301957] sdhci: ADMA Err: 0x00000003 | ADMA Ptr: 0x2e403208
> [ 6568.307775] sdhci: ===========================================
> [ 6568.315732] mmcblk0: error -110 transferring data, sector 44805, nr
> 3, cmd response 0x900, card status 0x0

I dug nice and deep into this one. This regression first appears in
v4.6. But multi_v7_defconfig or linux-yocto-tiny configs don't see the
breakage.

Bisecting lead to a commit which enables DEBUG_RODATA by default for
CPU_V7. Previously this option was not enabled (and was called
ARM_KERNMEM_PERMS). But the multi_v7 and linux-yocto-tiny configs
enable this option as well.

But this boils down to a bug in the memory reserving of the first 512K
of memory, which can't be accessed by DMA. Because of DEBUG_RODATA the
memory between the end of .head.text and start of .text sections is
padded and becomes non-reserved thus available for allocation, but the
end of .head.text is below 0x80000.

There is a patch on linux mailing list that fixes up the reserve for Zynq:

https://patchwork.kernel.org/patch/9405895/

For linux-yocto 4.8 disabling CONFIG_DEBUG_RODATA will sort out the
issue (will send out a patch to meta-xilinx for that shortly), and
once the above patch is merged in mainline I will backport it.

Regards,
Nathan



More information about the meta-xilinx mailing list