Skip to content

Commit f7ff3cf

Browse files
knaerzchejoergroedel
authored andcommitted
iommu/rockchip: Fix PAGE_DESC_HI_MASKs for RK3568
With the submission of iommu driver for RK3568 a subtle bug was introduced: PAGE_DESC_HI_MASK1 and PAGE_DESC_HI_MASK2 have to be the other way arround - that leads to random errors, especially when addresses beyond 32 bit are used. Fix it. Fixes: c55356c ("iommu: rockchip: Add support for iommu v2") Signed-off-by: Alex Bee <knaerzche@gmail.com> Tested-by: Peter Geis <pgwipeout@gmail.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Dan Johansen <strit@manjaro.org> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Link: https://lore.kernel.org/r/20211124021325.858139-1-knaerzche@gmail.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 717e88a commit f7ff3cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iommu/rockchip-iommu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ static inline phys_addr_t rk_dte_pt_address(u32 dte)
200200
#define DTE_HI_MASK2 GENMASK(7, 4)
201201
#define DTE_HI_SHIFT1 24 /* shift bit 8 to bit 32 */
202202
#define DTE_HI_SHIFT2 32 /* shift bit 4 to bit 36 */
203-
#define PAGE_DESC_HI_MASK1 GENMASK_ULL(39, 36)
204-
#define PAGE_DESC_HI_MASK2 GENMASK_ULL(35, 32)
203+
#define PAGE_DESC_HI_MASK1 GENMASK_ULL(35, 32)
204+
#define PAGE_DESC_HI_MASK2 GENMASK_ULL(39, 36)
205205

206206
static inline phys_addr_t rk_dte_pt_address_v2(u32 dte)
207207
{

0 commit comments

Comments
 (0)