Files
linux/arch/sparc/kernel
Stian Halseth d5b5e8149a sparc: Fix page alignment in dma mapping
'phys' may include an offset within the page, while previously used
'base_paddr' was already page-aligned. This caused incorrect DMA mapping
in dma_4u_map_phys and dma_4v_map_phys.

Fix both functions by masking 'phys' with IO_PAGE_MASK, covering both
generic SPARC code and sun4v.

Fixes: 38c0d0ebf5 ("sparc: Use physical address DMA mapping")
Reported-by: Stian Halseth <stian@itx.no>
Closes: https://github.com/sparclinux/issues/issues/75
Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Stian Halseth <stian@itx.no>
Tested-by: Nathaniel Roach <nroach44@nroach44.id.au>
Tested-by: Han Gao <gaohan@iscas.ac.cn> # on SPARC Enterprise T5220
[mszyprow: adjusted commit description a bit]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20260218120056.3366-2-stian@itx.no
2026-02-23 08:33:51 +01:00
..
2024-02-16 16:49:58 +01:00
2018-01-22 08:17:15 -08:00
2018-01-22 08:17:15 -08:00
2024-03-08 21:20:23 +01:00
2024-02-16 16:50:25 +01:00
2024-03-08 21:20:23 +01:00
2021-09-15 13:42:33 -07:00
2026-02-06 15:16:22 +01:00
2024-02-16 16:50:25 +01:00
2020-08-23 17:36:59 -05:00
2026-01-11 06:09:11 -10:00
2024-02-16 16:50:25 +01:00
2024-02-16 16:50:25 +01:00
2024-04-22 15:33:07 +02:00
2024-02-16 16:50:25 +01:00
2024-02-16 16:50:25 +01:00
2022-09-29 19:21:10 -07:00
2022-09-29 19:21:10 -07:00