* [PATCH] powerpc/ps3: Fix map failure path in dma_ioc0_map_pages()
@ 2026-07-11 13:09 Thorsten Blum
0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2026-07-11 13:09 UTC (permalink / raw)
To: Geoff Levand, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy (CS GROUP), Geert Uytterhoeven,
Paul Mackerras, MOKUNO Masakazu
Cc: Thorsten Blum, stable, Geoff Levand, linuxppc-dev, linux-kernel
If lv1_put_iopte() fails in dma_ioc0_map_pages(), the error path
decrements iopage but keeps using the failed mapping's offset. As a
result, it repeatedly tries to invalidate the failed IOPTE slot and
leaves the already installed IOPTEs valid.
Recompute offset and invalidate the installed IOPTEs instead.
Fixes: 6bb5cf102541 ("[POWERPC] PS3: System-bus rework")
Cc: stable@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/powerpc/platforms/ps3/mm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index 20fc5b68faee..315a32fd75b1 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -615,6 +615,7 @@ static int dma_ioc0_map_pages(struct ps3_dma_region *r, unsigned long phys_addr,
fail_map:
for (iopage--; 0 <= iopage; iopage--) {
+ offset = (1 << r->page_size) * iopage;
lv1_put_iopte(0,
c->bus_addr + offset,
c->lpar_addr + offset,
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-11 13:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-11 13:09 [PATCH] powerpc/ps3: Fix map failure path in dma_ioc0_map_pages() Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox