[PATCH 2/2] mmc: convert sg_miter user to SG_MITER_LOCAL
Michał Mirosław
mirq-linux at rere.qmqm.pl
Wed Dec 2 14:28:50 PST 2026
On Wed, Dec 02, 2026 at 04:23:49PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd at arndb.de>
>
> These mmc drivers all use the sg_miter infrastructure with the default
> iterator using kmap(), but they are safe to use kmap_local() instead,
> so use that to get us one step closer to removing kmap().
>
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
> ---
> drivers/mmc/host/cavium.c | 3 ++-
> drivers/mmc/host/cb710-mmc.c | 4 ++--
Acked-by: Michał Mirosław <mirq-linux at rere.qmqm.pl>
> diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
> index 31daec787495..1e6d567c1edd 100644
> --- a/drivers/mmc/host/cb710-mmc.c
> +++ b/drivers/mmc/host/cb710-mmc.c
> @@ -274,7 +274,7 @@ static int cb710_mmc_receive(struct cb710_slot *slot, struct mmc_data *data)
> if (unlikely(data->blksz & 15 && (data->blocks != 1 || data->blksz != 8)))
> return -EINVAL;
>
> - sg_miter_start(&miter, data->sg, data->sg_len, SG_MITER_TO_SG);
> + sg_miter_start(&miter, data->sg, data->sg_len, SG_MITER_LOCAL | SG_MITER_TO_SG);
>
> cb710_modify_port_8(slot, CB710_MMC_CONFIG2_PORT,
> 15, CB710_MMC_C2_READ_PIO_SIZE_MASK);
> @@ -318,7 +318,7 @@ static int cb710_mmc_send(struct cb710_slot *slot, struct mmc_data *data)
> if (unlikely(data->blocks > 1 && data->blksz & 15))
> return -EINVAL;
>
> - sg_miter_start(&miter, data->sg, data->sg_len, SG_MITER_FROM_SG);
> + sg_miter_start(&miter, data->sg, data->sg_len, SG_MITER_LOCAL | SG_MITER_FROM_SG);
>
> cb710_modify_port_8(slot, CB710_MMC_CONFIG2_PORT,
> 0, CB710_MMC_C2_READ_PIO_SIZE_MASK);
--
Michał Mirosław
More information about the linux-arm-kernel
mailing list