Skip to content

Commit 9894906

Browse files
author
Thomas Hellström
committed
drm/xe: Annotate xe_ttm_stolen_mgr::mapping with __iomem
The pointer points to IO memory, but the __iomem annotation was incorrectly placed. Annotate it correctly, update its usage accordingly and fix the corresponding sparse error. Fixes: d8b52a0 ("drm/xe: Implement stolen memory.") Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240109112405.108136-5-thomas.hellstrom@linux.intel.com (cherry picked from commit dcddb6f) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
1 parent 5c63e75 commit 9894906

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct xe_ttm_stolen_mgr {
3131
/* GPU base offset */
3232
resource_size_t stolen_base;
3333

34-
void *__iomem mapping;
34+
void __iomem *mapping;
3535
};
3636

3737
static inline struct xe_ttm_stolen_mgr *
@@ -275,7 +275,7 @@ static int __xe_ttm_stolen_io_mem_reserve_bar2(struct xe_device *xe,
275275
drm_WARN_ON(&xe->drm, !(mem->placement & TTM_PL_FLAG_CONTIGUOUS));
276276

277277
if (mem->placement & TTM_PL_FLAG_CONTIGUOUS && mgr->mapping)
278-
mem->bus.addr = (u8 *)mgr->mapping + mem->bus.offset;
278+
mem->bus.addr = (u8 __force *)mgr->mapping + mem->bus.offset;
279279

280280
mem->bus.offset += mgr->io_base;
281281
mem->bus.is_iomem = true;

0 commit comments

Comments
 (0)