From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 2/3] tests: Shut gcc up abput _Atomic(uint64_t) alignment
Date: Wed, 2 Oct 2024 22:04:05 +0300 [thread overview]
Message-ID: <Zv2ZJYdcugROe23f@intel.com> (raw)
In-Reply-To: <20241002155041.kdw5gclimpt6nfll@kamilkon-DESK.igk.intel.com>
On Wed, Oct 02, 2024 at 05:50:41PM +0200, Kamil Konieczny wrote:
> Hi Ville,
> On 2024-09-27 at 19:33:06 +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
>
> There is a typo in subject, I would also prefer 'Fix' so:
>
> [PATCH i-g-t 2/3] tests: Fix gcc warnings about _Atomic(uint64_t) alignment
>
> > x86-32 gcc keeps complaining about some alignment ABI change:
> > "note: the alignment of ‘_Atomic long long unsigned int’ fields changed in GCC 11.1"
> >
> > State the alignment explicitly to make gcc shut up.
>
> s/to make gcc shut up/to silence gcc/
>
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > tests/dumb_buffer.c | 2 +-
> > tests/intel/gem_create.c | 2 +-
> > tests/intel/gem_mmap_offset.c | 2 +-
> > 3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/tests/dumb_buffer.c b/tests/dumb_buffer.c
> > index e1c18c70b09b..dd237467d3f6 100644
> > --- a/tests/dumb_buffer.c
> > +++ b/tests/dumb_buffer.c
> > @@ -242,7 +242,7 @@ static uint64_t get_npages(_Atomic(uint64_t) *global, uint64_t npages)
> > }
> >
> > struct thread_clear {
> > - _Atomic(uint64_t) max;
> > + _Atomic(uint64_t) max __attribute__((aligned(8)));
>
> >From checkpatch.pl: prefer __aligned(8)
Isn't that a pure kernel thing? Pretty sure it's just a wrapper
around __attribute__.
>
> With or without this __aligned(8) change (and with above subject
> and description fixed):
>
> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Ta.
>
> > uint64_t page_size;
> > int timeout;
> > int fd;
> > diff --git a/tests/intel/gem_create.c b/tests/intel/gem_create.c
> > index ca39a8b64a62..f0749d288dcf 100644
> > --- a/tests/intel/gem_create.c
> > +++ b/tests/intel/gem_create.c
> > @@ -206,7 +206,7 @@ static uint64_t get_npages(_Atomic(uint64_t) *global, uint64_t npages)
> > }
> >
> > struct thread_clear {
> > - _Atomic(uint64_t) max;
> > + _Atomic(uint64_t) max __attribute__((aligned(8)));
> > struct drm_i915_gem_memory_class_instance region;
> > int timeout;
> > int i915;
> > diff --git a/tests/intel/gem_mmap_offset.c b/tests/intel/gem_mmap_offset.c
> > index c1a9811ff9d1..3f499abedbbb 100644
> > --- a/tests/intel/gem_mmap_offset.c
> > +++ b/tests/intel/gem_mmap_offset.c
> > @@ -716,7 +716,7 @@ static uint64_t get_npages(_Atomic(uint64_t) *global, uint64_t npages)
> > }
> >
> > struct thread_clear {
> > - _Atomic(uint64_t) max;
> > + _Atomic(uint64_t) max __attribute__((aligned(8)));
> > struct drm_i915_gem_memory_class_instance region;
> > int timeout;
> > int i915;
> > --
> > 2.45.2
> >
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2024-10-02 19:04 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ä [this message]
2024-09-27 16:33 ` [PATCH i-g-t 3/3] lib/intel_compute: Fix compiler warnings on x86-32 Ville Syrjala
2024-10-02 15:45 ` 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=Zv2ZJYdcugROe23f@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--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