public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeremy Linton <jeremy.linton@arm.com>
To: Mark Rutland <mark.rutland@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, gcc@gcc.gnu.org,
	catalin.marinas@arm.com, will@kernel.org, marcan@marcan.st,
	maz@kernel.org, szabolcs.nagy@arm.com, f.fainelli@gmail.com,
	opendmb@gmail.com, Andrew Pinski <pinskia@gmail.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	x86@kernel.org, andrew.cooper3@citrix.com
Subject: Re: GCC 12 miscompilation of volatile asm (was: Re: [PATCH] arm64/io: Remind compiler that there is a memory side effect)
Date: Mon, 11 Apr 2022 14:02:46 -0500	[thread overview]
Message-ID: <b98efe11-a11e-5787-49a7-c151efdf9401@arm.com> (raw)
In-Reply-To: <YlQDfC+J8BXHcvpk@FVFF77S0Q05N>

Hi,


On 4/11/22 05:31, Mark Rutland wrote:
> On Tue, Apr 05, 2022 at 01:51:30PM +0100, Mark Rutland wrote:
>> Hi all,
>>
>> [adding kernel folk who work on asm stuff]
>>
>> As a heads-up, GCC 12 (not yet released) appears to erroneously optimize away
>> calls to functions with volatile asm. Szabolcs has raised an issue on the GCC
>> bugzilla:
>>
>>    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105160
>>
>> ... which is a P1 release blocker, and is currently being investigated.
> 
> Jan Hubicka fixed this in GCC commit:
> 
>    aabb9a261ef060cf ("Propagate nondeterministic and side_effects flags in modref summary after inlining")
> 
> ... and all my local tests look good with that applied.
> 
> Compiler explorer's trunk build now has that fix, so the examples from before
> now look good:
> 
>    aarch64: https://godbolt.org/z/vMczqjYvs
> 
>    x86_64: https://godbolt.org/z/cveff9hq5
> 
> Jeremy, now that the real issue has been identified and fixed, I assume you'll
> send a revert for commit:
> 
>    8d3ea3d402db94b6 ("net: bcmgenet: Use stronger register read/writes to assure ordering")
> 
> ... ?

Yes, that's the plan.

Thanks,


      reply	other threads:[~2022-04-11 19:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-01 16:44 [PATCH] arm64/io: Remind compiler that there is a memory side effect Jeremy Linton
2022-04-01 17:22 ` Mark Rutland
2022-04-03  7:36   ` Andrew Pinski
2022-04-03  7:47     ` Ard Biesheuvel
2022-04-03  7:47       ` Ard Biesheuvel
2022-04-04  9:14         ` Will Deacon
2022-04-03 17:40     ` Doug Berger
2022-04-05 12:51   ` GCC 12 miscompilation of volatile asm (was: Re: [PATCH] arm64/io: Remind compiler that there is a memory side effect) Mark Rutland
2022-04-05 13:04     ` Mark Rutland
2022-04-05 13:20       ` Andrew Cooper
2022-04-05 14:05     ` Peter Zijlstra
2022-04-11 10:22       ` Mark Rutland
2022-04-11 10:31     ` Mark Rutland
2022-04-11 19:02       ` Jeremy Linton [this message]

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=b98efe11-a11e-5787-49a7-c151efdf9401@arm.com \
    --to=jeremy.linton@arm.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=f.fainelli@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcan@marcan.st \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=opendmb@gmail.com \
    --cc=peterz@infradead.org \
    --cc=pinskia@gmail.com \
    --cc=szabolcs.nagy@arm.com \
    --cc=will@kernel.org \
    --cc=x86@kernel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).