From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t 3/3] lib/intel_compute: Fix compiler warnings on x86-32
Date: Fri, 27 Sep 2024 19:33:07 +0300 [thread overview]
Message-ID: <20240927163307.10159-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20240927163307.10159-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
x86-32 gcc is not happy:
../lib/intel_compute.c: In function ‘xehp_compute_exec_compute’:
../lib/intel_compute.c:862:48: warning: right shift count >= width of type [-Wshift-count-overflow]
862 | addr_bo_buffer_batch[b++] = ADDR_BATCH >> 32;
| ^~
Just use ULL for all the address constants.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/intel_compute.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/intel_compute.c b/lib/intel_compute.c
index 1cc39f645c2e..3ab9ace7932c 100644
--- a/lib/intel_compute.c
+++ b/lib/intel_compute.c
@@ -27,20 +27,20 @@
#define SIZE_BATCH 0x1000
#define SIZE_BUFFER_INPUT MAX(sizeof(float) * SIZE_DATA, 0x1000)
#define SIZE_BUFFER_OUTPUT MAX(sizeof(float) * SIZE_DATA, 0x1000)
-#define ADDR_BATCH 0x100000UL
-#define ADDR_INPUT 0x200000UL
-#define ADDR_OUTPUT 0x300000UL
-#define ADDR_SURFACE_STATE_BASE 0x400000UL
-#define ADDR_DYNAMIC_STATE_BASE 0x500000UL
+#define ADDR_BATCH 0x100000ULL
+#define ADDR_INPUT 0x200000ULL
+#define ADDR_OUTPUT 0x300000ULL
+#define ADDR_SURFACE_STATE_BASE 0x400000ULL
+#define ADDR_DYNAMIC_STATE_BASE 0x500000ULL
#define ADDR_INDIRECT_OBJECT_BASE 0x100000000
#define OFFSET_INDIRECT_DATA_START 0xFFFD0000
#define OFFSET_KERNEL 0xFFFE0000
-#define ADDR_GENERAL_STATE_BASE 0x80000000UL
-#define ADDR_INSTRUCTION_STATE_BASE 0x90000000UL
+#define ADDR_GENERAL_STATE_BASE 0x80000000ULL
+#define ADDR_INSTRUCTION_STATE_BASE 0x90000000ULL
#define OFFSET_BINDING_TABLE 0x1000
-#define XE2_ADDR_STATE_CONTEXT_DATA_BASE 0x900000UL
+#define XE2_ADDR_STATE_CONTEXT_DATA_BASE 0x900000ULL
#define OFFSET_STATE_SIP 0xFFFF0000
/*
--
2.45.2
next prev parent reply other threads:[~2024-09-27 16:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-27 16:33 [PATCH i-g-t 1/3] igt: Fix printf formats on x86-32 Ville Syrjala
2024-09-27 16:33 ` [PATCH i-g-t 2/3] tests: Shut gcc up abput _Atomic(uint64_t) alignment Ville Syrjala
2024-10-02 15:50 ` Kamil Konieczny
2024-10-02 19:04 ` Ville Syrjälä
2024-09-27 16:33 ` Ville Syrjala [this message]
2024-10-02 15:45 ` [PATCH i-g-t 3/3] lib/intel_compute: Fix compiler warnings on x86-32 Kamil Konieczny
2024-09-27 18:15 ` ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] igt: Fix printf formats " Patchwork
2024-09-27 19:01 ` ✓ CI.xeBAT: " Patchwork
2024-09-28 19:45 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-10-02 16:01 ` [PATCH i-g-t 1/3] " Kamil Konieczny
2024-10-02 16:26 ` Ville Syrjälä
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=20240927163307.10159-3-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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