Re: [PATCH] mmc: jz4740: rework pre_req/post_req implementation

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

 



On Tuesday, November 20, 2018 20:21 -03, Aaro Koskinen <aaro.koskinen@xxxxxx> wrote: 
 
> Hi,
> 
> On Tue, Nov 20, 2018 at 03:21:21PM -0300, Ezequiel Garcia wrote:
> > As reported by Aaro, the JZ4740 MMC driver throws a warning
> > when the kernel is built without preemption (CONFIG_PREEMPT_NONE=y).
> > 
> > [   16.461094] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 567 host->next_data.cookie 568
> [...]
> > [   16.601092] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 582 host->next_data.cookie 583
> > 
> > The problem seems to be related to how pre_req/post_req is implemented.
> > Currently, it seems the driver expects jz4740_mmc_prepare_dma_data()
> > to be called with monotonically increasing host_cookie values,
> > which is wrong.
> > 
> > Moreover, the implementation is overly complicated, keeping track
> > of unneeded "next cookie" state.
> > 
> > So, instead of attempting to fix the current pre_req/post_req
> > implementation, this commit refactors the driver, dropping
> > the state, following other drivers such as dw_mmc and sdhci.
> > 
> > Cc: Paul Cercueil <paul@xxxxxxxxxxxxxxx>
> > Cc: Mathieu Malaterre <malat@xxxxxxxxxx>
> > Reported-by: Aaro Koskinen <aaro.koskinen@xxxxxx>
> > Signed-off-by: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxx>
> 
> Thanks for this! I tested this on top of v4.19 on CI20 with PREEMPT_NONE=y
> and MMC works now fine without spam. I also did a longer stress test
> compiling Python natively on a file system on MMC. Also briefly checked
> with the PREEMPT=y kernel config and at least the rootfs got mounted
> fine. So:
> 
> Tested-by: Aaro Koskinen <aaro.koskinen@xxxxxx>
> 

Thanks a lot for the good testing!




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux