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] tests/intel/xe_exec_system_allocator: Fix 32-bit compilation
Date: Tue, 29 Apr 2025 21:28:08 -0700 [thread overview]
Message-ID: <aBGm2OFT2GuKsInU@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20250429143051.36969-1-kamil.konieczny@linux.intel.com>
On Tue, Apr 29, 2025 at 04:30:51PM +0200, Kamil Konieczny wrote:
> There is one more place which needs fixing of Xe test
> compilation for 32-bit platforms, reported errors are:
>
> ../tests/intel/xe_exec_system_allocator.c:382:41: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> aligned_alloc_type.ptr = (void *)ALIGN((uint64_t)aligned_alloc_type.__ptr, alignment);
> ^
> ../tests/intel/xe_exec_system_allocator.c:382:27: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
> aligned_alloc_type.ptr = (void *)ALIGN((uint64_t)aligned_alloc_type.__ptr, alignment);
> ^
> cc1: some warnings being treated as errors
>
> Fixes: 9eda33fedff7 ("tests/xe: Add system_allocator test")
> Cc: Matthew Brost <matthew.brost@intel.com>
Sorry for the trouble and 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>
> ---
> tests/intel/xe_exec_system_allocator.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tests/intel/xe_exec_system_allocator.c b/tests/intel/xe_exec_system_allocator.c
> index e1121a862..30b99f3ed 100644
> --- a/tests/intel/xe_exec_system_allocator.c
> +++ b/tests/intel/xe_exec_system_allocator.c
> @@ -374,12 +374,15 @@ struct aligned_alloc_type {
> static struct aligned_alloc_type __aligned_alloc(size_t alignment, size_t size)
> {
> struct aligned_alloc_type aligned_alloc_type;
> + uint64_t addr;
>
> aligned_alloc_type.__ptr = mmap(NULL, alignment + size, PROT_NONE, MAP_PRIVATE |
> MAP_ANONYMOUS, -1, 0);
> igt_assert(aligned_alloc_type.__ptr != MAP_FAILED);
>
> - aligned_alloc_type.ptr = (void *)ALIGN((uint64_t)aligned_alloc_type.__ptr, alignment);
> + addr = to_user_pointer(aligned_alloc_type.__ptr);
> + addr = ALIGN(addr, (uint64_t)alignment);
> + aligned_alloc_type.ptr = from_user_pointer(addr);
> aligned_alloc_type.size = size;
> aligned_alloc_type.__size = size + alignment;
>
> --
> 2.49.0
>
next prev parent reply other threads:[~2025-04-30 4:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 14:30 [PATCH i-g-t] tests/intel/xe_exec_system_allocator: Fix 32-bit compilation Kamil Konieczny
2025-04-29 15:17 ` Francois Dugast
2025-04-30 4:00 ` ✓ i915.CI.BAT: success for " Patchwork
2025-04-30 4:28 ` Matthew Brost [this message]
2025-04-30 4:49 ` ✓ Xe.CI.BAT: " Patchwork
2025-04-30 6:52 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-30 8:44 ` Kamil Konieczny
2025-04-30 7:19 ` ✗ i915.CI.Full: " Patchwork
2025-04-30 8:39 ` Kamil Konieczny
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=aBGm2OFT2GuKsInU@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox