Message ID | 20240221-fix-sh-mmcif-v2-0-5e521eb25ae4@linaro.org |
---|---|
Headers | show |
Series | Try to fix the sg_mitet bugs in SH MMCIF | expand |
Hi Linus, On Wed, Feb 21, 2024 at 10:23 PM Linus Walleij <linus.walleij@linaro.org> wrote: > All the sglist iterations happen in the *threaded* interrupt handler > and that context is not atomic, so don't request an atomic > sglist miter. Using an atomic miter results in "BUG: scheduling while > atomic" splats. > > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> > Fixes: 27b57277d9ba ("mmc: sh_mmcif: Use sg_miter for PIO") > Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- > Hi Geert, it'd be great if you could test this! Done before (see the Tb above ;-) You probably still want to s/does not need to/must not/? (sorry, I miswrote that previously) Gr{oetje,eeting}s, Geert
On Wed, 21 Feb 2024 at 22:23, Linus Walleij <linus.walleij@linaro.org> wrote: > > This adresses some bugs found after the introduction of the > memory iterator sg_miter to the sh mmcif driver. > > This was first just one patch for fixing the atomic bug, but > now also a second patch is needed to fix a semantic issue. > > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- > Changes in v2: > - Collect Geerts test tag on patch 1 > - Add a second patch fixing the problem with advancing to > the next sglist entry before reading/writing the first block and > after reading/writing each block in a multiblock operation. > - Link to v1: https://lore.kernel.org/r/20240220-fix-sh-mmcif-v1-1-b9d08a787c1f@linaro.org > > --- > Linus Walleij (2): > mmc: sh_mmcif: sg_miter does not need to be atomic > mmc: sh_mmcif: Advance sg_miter before reading blocks > > drivers/mmc/host/sh_mmcif.c | 46 +++++++++++++++++++++++++++++---------------- > 1 file changed, 30 insertions(+), 16 deletions(-) > --- Applied for next and by amending the commit message header as pointed out by Geert, thanks! Kind regards Uffe
This adresses some bugs found after the introduction of the memory iterator sg_miter to the sh mmcif driver. This was first just one patch for fixing the atomic bug, but now also a second patch is needed to fix a semantic issue. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- Changes in v2: - Collect Geerts test tag on patch 1 - Add a second patch fixing the problem with advancing to the next sglist entry before reading/writing the first block and after reading/writing each block in a multiblock operation. - Link to v1: https://lore.kernel.org/r/20240220-fix-sh-mmcif-v1-1-b9d08a787c1f@linaro.org --- Linus Walleij (2): mmc: sh_mmcif: sg_miter does not need to be atomic mmc: sh_mmcif: Advance sg_miter before reading blocks drivers/mmc/host/sh_mmcif.c | 46 +++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) --- base-commit: 2d5c7b7eb345249cb34d42cbc2b97b4c57ea944e change-id: 20240220-fix-sh-mmcif-49c1de70c5b7 Best regards,