* Bug report: MIPS CI20/jz4740-mmc DMA and PREEMPT_NONE
@ 2018-10-14 17:04 Aaro Koskinen
2018-10-17 13:38 ` Mathieu Malaterre
2018-10-17 17:55 ` Ezequiel Garcia
0 siblings, 2 replies; 5+ messages in thread
From: Aaro Koskinen @ 2018-10-14 17:04 UTC (permalink / raw)
To: linux-mips, linux-mmc, linux-kernel, Ulf Hansson,
Mathieu Malaterre, Ezequiel Garcia
Hi,
There is something wrong with jz4740-mmc in current mainline kernel
(tested v4.18 and 4.19-rc, the MMC support for CI20 does not exist
prior those), as the DMA support does not work properly if I disable
kernel pre-emption. The console gets flooded with:
[ 16.461094] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 567 host->next_data.cookie 568
[ 16.473120] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 568 host->next_data.cookie 569
[ 16.485144] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 569 host->next_data.cookie 570
[ 16.497170] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 570 host->next_data.cookie 571
[ 16.509194] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 571 host->next_data.cookie 572
[ 16.532421] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 572 host->next_data.cookie 573
[ 16.544594] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 573 host->next_data.cookie 574
[ 16.556621] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 574 host->next_data.cookie 575
[ 16.568638] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 575 host->next_data.cookie 576
[ 16.601092] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 582 host->next_data.cookie 583
etc. ad inf.
This should be easily reproducible on CI20 board with ci20_defconfig
and setting CONFIG_PREEMPT_NONE=y.
A.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug report: MIPS CI20/jz4740-mmc DMA and PREEMPT_NONE
2018-10-14 17:04 Bug report: MIPS CI20/jz4740-mmc DMA and PREEMPT_NONE Aaro Koskinen
@ 2018-10-17 13:38 ` Mathieu Malaterre
2018-10-17 19:50 ` Aaro Koskinen
2018-10-17 17:55 ` Ezequiel Garcia
1 sibling, 1 reply; 5+ messages in thread
From: Mathieu Malaterre @ 2018-10-17 13:38 UTC (permalink / raw)
To: aaro.koskinen; +Cc: Linux-MIPS, linux-mmc, LKML, Ulf Hansson, Ezequiel Garcia
Hi,
On Sun, Oct 14, 2018 at 7:04 PM Aaro Koskinen <aaro.koskinen@iki.fi> wrote:
>
> Hi,
>
> There is something wrong with jz4740-mmc in current mainline kernel
> (tested v4.18 and 4.19-rc, the MMC support for CI20 does not exist
> prior those), as the DMA support does not work properly if I disable
> kernel pre-emption. The console gets flooded with:
>
> [ 16.461094] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 567 host->next_data.cookie 568
> [ 16.473120] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 568 host->next_data.cookie 569
> [ 16.485144] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 569 host->next_data.cookie 570
> [ 16.497170] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 570 host->next_data.cookie 571
> [ 16.509194] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 571 host->next_data.cookie 572
> [ 16.532421] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 572 host->next_data.cookie 573
> [ 16.544594] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 573 host->next_data.cookie 574
> [ 16.556621] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 574 host->next_data.cookie 575
> [ 16.568638] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 575 host->next_data.cookie 576
> [ 16.601092] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 582 host->next_data.cookie 583
>
> etc. ad inf.
>
> This should be easily reproducible on CI20 board with ci20_defconfig
> and setting CONFIG_PREEMPT_NONE=y.
Since CONFIG_PREEMPT has been 'y' since at least commit 0752f92934292
could you confirm that the original mmc driver (kernel from imgtech
people) did work ok with PREEMPT_NONE (sorry I did not do my homework)
?
Thanks
> A.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug report: MIPS CI20/jz4740-mmc DMA and PREEMPT_NONE
2018-10-14 17:04 Bug report: MIPS CI20/jz4740-mmc DMA and PREEMPT_NONE Aaro Koskinen
2018-10-17 13:38 ` Mathieu Malaterre
@ 2018-10-17 17:55 ` Ezequiel Garcia
1 sibling, 0 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2018-10-17 17:55 UTC (permalink / raw)
To: Aaro Koskinen, linux-mips, linux-mmc, linux-kernel, Ulf Hansson,
Mathieu Malaterre, Ezequiel Garcia
On Sun, 2018-10-14 at 20:04 +0300, Aaro Koskinen wrote:
> Hi,
>
> There is something wrong with jz4740-mmc in current mainline kernel
> (tested v4.18 and 4.19-rc, the MMC support for CI20 does not exist
> prior those), as the DMA support does not work properly if I disable
> kernel pre-emption. The console gets flooded with:
>
> [ 16.461094] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 567 host->next_data.cookie 568
> [ 16.473120] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 568 host->next_data.cookie 569
> [ 16.485144] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 569 host->next_data.cookie 570
> [ 16.497170] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 570 host->next_data.cookie 571
> [ 16.509194] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 571 host->next_data.cookie 572
> [ 16.532421] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 572 host->next_data.cookie 573
> [ 16.544594] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 573 host->next_data.cookie 574
> [ 16.556621] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 574 host->next_data.cookie 575
> [ 16.568638] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 575 host->next_data.cookie 576
> [ 16.601092] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 582 host->next_data.cookie 583
>
> etc. ad inf.
>
> This should be easily reproducible on CI20 board with ci20_defconfig
> and setting CONFIG_PREEMPT_NONE=y.
>
Will take a look as soon as possible, most likely after ELCE.
Thanks,
Eze
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug report: MIPS CI20/jz4740-mmc DMA and PREEMPT_NONE
2018-10-17 13:38 ` Mathieu Malaterre
@ 2018-10-17 19:50 ` Aaro Koskinen
2018-11-12 21:04 ` Ezequiel Garcia
0 siblings, 1 reply; 5+ messages in thread
From: Aaro Koskinen @ 2018-10-17 19:50 UTC (permalink / raw)
To: Mathieu Malaterre
Cc: Linux-MIPS, linux-mmc, LKML, Ulf Hansson, Ezequiel Garcia
Hi,
On Wed, Oct 17, 2018 at 03:38:07PM +0200, Mathieu Malaterre wrote:
> Since CONFIG_PREEMPT has been 'y' since at least commit 0752f92934292
> could you confirm that the original mmc driver (kernel from imgtech
> people) did work ok with PREEMPT_NONE (sorry I did not do my homework)
> ?
Sorry, cannot confirm or test that. I have only used the mainline kernel
on this board, since v4.5 or so with my own custom config which has
been PREEMPT_NONE until now.
A.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug report: MIPS CI20/jz4740-mmc DMA and PREEMPT_NONE
2018-10-17 19:50 ` Aaro Koskinen
@ 2018-11-12 21:04 ` Ezequiel Garcia
0 siblings, 0 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2018-11-12 21:04 UTC (permalink / raw)
To: aaro.koskinen
Cc: Mathieu Malaterre, Linux-MIPS, linux-mmc,
Linux Kernel Mailing List, Ulf Hansson, Ezequiel Garcia
On Wed, 17 Oct 2018 at 16:50, Aaro Koskinen <aaro.koskinen@iki.fi> wrote:
>
> Hi,
>
> On Wed, Oct 17, 2018 at 03:38:07PM +0200, Mathieu Malaterre wrote:
> > Since CONFIG_PREEMPT has been 'y' since at least commit 0752f92934292
> > could you confirm that the original mmc driver (kernel from imgtech
> > people) did work ok with PREEMPT_NONE (sorry I did not do my homework)
> > ?
>
> Sorry, cannot confirm or test that. I have only used the mainline kernel
> on this board, since v4.5 or so with my own custom config which has
> been PREEMPT_NONE until now.
>
Aaro,
I spent some time today investigating this issue. I think this driver
has a broken pre-request/post-request implementation.
Will post some patches soon.
Thanks for the report,
--
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-11-12 21:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-14 17:04 Bug report: MIPS CI20/jz4740-mmc DMA and PREEMPT_NONE Aaro Koskinen
2018-10-17 13:38 ` Mathieu Malaterre
2018-10-17 19:50 ` Aaro Koskinen
2018-11-12 21:04 ` Ezequiel Garcia
2018-10-17 17:55 ` Ezequiel Garcia
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).