From: Matthew Brost <matthew.brost@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: <igt-dev@lists.freedesktop.org>,
Jonathan Cavitt <jonathan.cavitt@intel.com>,
Francois Dugast <francois.dugast@intel.com>
Subject: Re: [PATCH i-g-t] lib/xe/xe_ioctl: Fix compilation on 32-bit armhf
Date: Mon, 28 Apr 2025 09:58:52 -0700 [thread overview]
Message-ID: <aA+zzMI9VMJ3REJS@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20250428162122.152829-1-kamil.konieczny@linux.intel.com>
On Mon, Apr 28, 2025 at 06:21:22PM +0200, Kamil Konieczny wrote:
> Fix some compilation eerors on 32-bit platforms like armhf:
>
> ../lib/xe/xe_ioctl.c:443:7: error: conflicting types for xe_bo_map_fixed void *xe_bo_map_fixed(int fd, uint32_t bo, size_t size, uint64_t addr)
> ^~~~~~~~~~~~~~~
> In file included from ../lib/xe/xe_ioctl.c:46:
> ../lib/xe/xe_ioctl.h:89:7: note: previous declaration of xe_bo_map_fixed was here
> void *xe_bo_map_fixed(int fd, uint32_t bo, size_t size, long unsigned int addr);
> ^~~~~~~~~~~~~~~
> ../lib/xe/xe_ioctl.c: In function xe_bo_map_fixed:
> ../lib/xe/xe_ioctl.c:449:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
> map = mmap((void *)addr, size, PROT_WRITE, MAP_SHARED | MAP_FIXED, fd, mmo);
> ^
> cc1: some warnings being treated as errors
>
> Fixes: 9eda33fedff7 ("tests/xe: Add system_allocator test")
> Cc: Matthew Brost <matthew.brost@intel.com>
Thanks for the fix:
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> Cc: Jonathan Cavitt <jonathan.cavitt@intel.com>
> Cc: Francois Dugast <francois.dugast@intel.com>
> Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> ---
> lib/xe/xe_ioctl.c | 2 +-
> lib/xe/xe_ioctl.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/xe/xe_ioctl.c b/lib/xe/xe_ioctl.c
> index 785fc9184..53a53cd0d 100644
> --- a/lib/xe/xe_ioctl.c
> +++ b/lib/xe/xe_ioctl.c
> @@ -446,7 +446,7 @@ void *xe_bo_map_fixed(int fd, uint32_t bo, size_t size, uint64_t addr)
> void *map;
>
> mmo = xe_bo_mmap_offset(fd, bo);
> - map = mmap((void *)addr, size, PROT_WRITE, MAP_SHARED | MAP_FIXED, fd, mmo);
> + map = mmap(from_user_pointer(addr), size, PROT_WRITE, MAP_SHARED | MAP_FIXED, fd, mmo);
> igt_assert(map != MAP_FAILED);
>
> return map;
> diff --git a/lib/xe/xe_ioctl.h b/lib/xe/xe_ioctl.h
> index 554a33c9c..522094ae2 100644
> --- a/lib/xe/xe_ioctl.h
> +++ b/lib/xe/xe_ioctl.h
> @@ -86,7 +86,7 @@ uint32_t xe_exec_queue_create_class(int fd, uint32_t vm, uint16_t class);
> void xe_exec_queue_destroy(int fd, uint32_t exec_queue);
> uint64_t xe_bo_mmap_offset(int fd, uint32_t bo);
> void *xe_bo_map(int fd, uint32_t bo, size_t size);
> -void *xe_bo_map_fixed(int fd, uint32_t bo, size_t size, long unsigned int addr);
> +void *xe_bo_map_fixed(int fd, uint32_t bo, size_t size, uint64_t addr);
> void *xe_bo_mmap_ext(int fd, uint32_t bo, size_t size, int prot);
> int __xe_exec(int fd, struct drm_xe_exec *exec);
> void xe_exec(int fd, struct drm_xe_exec *exec);
> --
> 2.49.0
>
next prev parent reply other threads:[~2025-04-28 16:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 16:21 [PATCH i-g-t] lib/xe/xe_ioctl: Fix compilation on 32-bit armhf Kamil Konieczny
2025-04-28 16:26 ` Francois Dugast
2025-04-29 9:14 ` Kamil Konieczny
2025-04-28 16:58 ` Matthew Brost [this message]
2025-04-30 0:06 ` ✗ Fi.CI.BAT: failure for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aA+zzMI9VMJ3REJS@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=francois.dugast@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jonathan.cavitt@intel.com \
--cc=kamil.konieczny@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.