From: Boris Brezillon <boris.brezillon@collabora.com>
To: Tudor Ambarus <tudor.ambarus@microchip.com>
Cc: <miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com>,
<peda@axentia.se>, <nicolas.ferre@microchip.com>,
<alexandre.belloni@bootlin.com>, <claudiu.beznea@microchip.com>,
<bbrezillon@kernel.org>, <linux-mtd@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH] mtd: rawnand: atmel: Unmap streaming DMA mappings
Date: Tue, 16 Aug 2022 11:09:52 +0200 [thread overview]
Message-ID: <20220816110952.31cf212b@collabora.com> (raw)
In-Reply-To: <20220728074014.145406-1-tudor.ambarus@microchip.com>
On Thu, 28 Jul 2022 10:40:14 +0300
Tudor Ambarus <tudor.ambarus@microchip.com> wrote:
> Every dma_map_single() call should have its dma_unmap_single() counterpart,
> because the DMA address space is a shared resource and one could render the
> machine unusable by consuming all DMA addresses.
>
> Cc: stable@vger.kernel.org
> Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
> drivers/mtd/nand/raw/atmel/nand-controller.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
> index 6ef14442c71a..330d2dafdd2d 100644
> --- a/drivers/mtd/nand/raw/atmel/nand-controller.c
> +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c
> @@ -405,6 +405,7 @@ static int atmel_nand_dma_transfer(struct atmel_nand_controller *nc,
>
> dma_async_issue_pending(nc->dmac);
> wait_for_completion(&finished);
> + dma_unmap_single(nc->dev, buf_dma, len, dir);
>
> return 0;
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Tudor Ambarus <tudor.ambarus@microchip.com>
Cc: <miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com>,
<peda@axentia.se>, <nicolas.ferre@microchip.com>,
<alexandre.belloni@bootlin.com>, <claudiu.beznea@microchip.com>,
<bbrezillon@kernel.org>, <linux-mtd@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH] mtd: rawnand: atmel: Unmap streaming DMA mappings
Date: Tue, 16 Aug 2022 11:09:52 +0200 [thread overview]
Message-ID: <20220816110952.31cf212b@collabora.com> (raw)
In-Reply-To: <20220728074014.145406-1-tudor.ambarus@microchip.com>
On Thu, 28 Jul 2022 10:40:14 +0300
Tudor Ambarus <tudor.ambarus@microchip.com> wrote:
> Every dma_map_single() call should have its dma_unmap_single() counterpart,
> because the DMA address space is a shared resource and one could render the
> machine unusable by consuming all DMA addresses.
>
> Cc: stable@vger.kernel.org
> Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
> drivers/mtd/nand/raw/atmel/nand-controller.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
> index 6ef14442c71a..330d2dafdd2d 100644
> --- a/drivers/mtd/nand/raw/atmel/nand-controller.c
> +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c
> @@ -405,6 +405,7 @@ static int atmel_nand_dma_transfer(struct atmel_nand_controller *nc,
>
> dma_async_issue_pending(nc->dmac);
> wait_for_completion(&finished);
> + dma_unmap_single(nc->dev, buf_dma, len, dir);
>
> return 0;
>
WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Tudor Ambarus <tudor.ambarus@microchip.com>
Cc: alexandre.belloni@bootlin.com, linux-kernel@vger.kernel.org,
vigneshr@ti.com, bbrezillon@kernel.org, richard@nod.at,
stable@vger.kernel.org, claudiu.beznea@microchip.com,
linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com,
peda@axentia.se, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: atmel: Unmap streaming DMA mappings
Date: Tue, 16 Aug 2022 11:09:52 +0200 [thread overview]
Message-ID: <20220816110952.31cf212b@collabora.com> (raw)
In-Reply-To: <20220728074014.145406-1-tudor.ambarus@microchip.com>
On Thu, 28 Jul 2022 10:40:14 +0300
Tudor Ambarus <tudor.ambarus@microchip.com> wrote:
> Every dma_map_single() call should have its dma_unmap_single() counterpart,
> because the DMA address space is a shared resource and one could render the
> machine unusable by consuming all DMA addresses.
>
> Cc: stable@vger.kernel.org
> Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
> drivers/mtd/nand/raw/atmel/nand-controller.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
> index 6ef14442c71a..330d2dafdd2d 100644
> --- a/drivers/mtd/nand/raw/atmel/nand-controller.c
> +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c
> @@ -405,6 +405,7 @@ static int atmel_nand_dma_transfer(struct atmel_nand_controller *nc,
>
> dma_async_issue_pending(nc->dmac);
> wait_for_completion(&finished);
> + dma_unmap_single(nc->dev, buf_dma, len, dir);
>
> return 0;
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-08-16 9:11 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-28 7:40 [PATCH] mtd: rawnand: atmel: Unmap streaming DMA mappings Tudor Ambarus
2022-07-28 7:40 ` Tudor Ambarus
2022-07-28 7:40 ` Tudor Ambarus
2022-07-29 10:59 ` Alexander Dahl
2022-07-29 10:59 ` Alexander Dahl
2022-07-29 10:59 ` Alexander Dahl
2022-08-09 6:28 ` Alexander Dahl
2022-08-09 6:28 ` Alexander Dahl
2022-08-09 6:28 ` Alexander Dahl
2022-08-02 11:03 ` Tudor.Ambarus
2022-08-02 11:03 ` Tudor.Ambarus
2022-08-02 11:03 ` Tudor.Ambarus
2022-08-16 9:09 ` Boris Brezillon [this message]
2022-08-16 9:09 ` Boris Brezillon
2022-08-16 9:09 ` Boris Brezillon
2022-08-17 9:28 ` Thorsten Leemhuis
2022-08-17 9:28 ` Thorsten Leemhuis
2022-08-17 9:28 ` Thorsten Leemhuis
2022-08-21 14:45 ` Peter Rosin
2022-08-21 14:45 ` Peter Rosin
2022-08-21 14:45 ` Peter Rosin
2022-09-07 9:06 ` Tudor.Ambarus
2022-09-07 9:06 ` Tudor.Ambarus
2022-09-07 9:06 ` Tudor.Ambarus
2022-09-19 15:29 ` Miquel Raynal
2022-09-19 15:29 ` Miquel Raynal
2022-09-19 15:29 ` Miquel Raynal
2022-09-20 8:10 ` Miquel Raynal
2022-09-20 8:10 ` Miquel Raynal
2022-09-20 8:10 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220816110952.31cf212b@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=alexandre.belloni@bootlin.com \
--cc=bbrezillon@kernel.org \
--cc=claudiu.beznea@microchip.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=nicolas.ferre@microchip.com \
--cc=peda@axentia.se \
--cc=richard@nod.at \
--cc=stable@vger.kernel.org \
--cc=tudor.ambarus@microchip.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.