]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/pagemap: pass pagemap_addr by reference
authorArnd Bergmann <arnd@arndb.de>
Mon, 16 Feb 2026 13:46:01 +0000 (14:46 +0100)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 17 Feb 2026 12:10:52 +0000 (13:10 +0100)
commit95162db0208aee122d10ac1342fe97a1721cd258
tree50c38c7ade86b65e2f046c20923bc892373b9a0e
parent08d05c736605fb3dd3852a37c8bf20cd0fc2e08b
drm/pagemap: pass pagemap_addr by reference

Passing a structure by value into a function is sometimes problematic,
for a number of reasons. Of of these is a warning from the 32-bit arm
compiler:

drivers/gpu/drm/drm_gpusvm.c: In function '__drm_gpusvm_unmap_pages':
drivers/gpu/drm/drm_gpusvm.c:1152:33: note: parameter passing for argument of type 'struct drm_pagemap_addr' changed in GCC 9.1
 1152 |                                 dpagemap->ops->device_unmap(dpagemap,
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1153 |                                                             dev, *addr);
      |                                                             ~~~~~~~~~~~

This particular problem is harmless since we are not mixing compiler versions
inside of the compiler. However, passing this by reference avoids the warning
along with providing slightly better calling conventions as it avoids an
extra copy on the stack.

Fixes: 75af93b3f5d0 ("drm/pagemap, drm/xe: Support destination migration over interconnect")
Fixes: 2df55d9e66a2 ("drm/xe: Support pcie p2p dma as a fast interconnect")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patch.msgid.link/20260216134644.1025365-1-arnd@kernel.org
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/drm_gpusvm.c
drivers/gpu/drm/drm_pagemap.c
drivers/gpu/drm/xe/xe_svm.c
include/drm/drm_pagemap.h