From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 69083C433FE for ; Mon, 11 Apr 2022 19:04:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hyIlen3OWEYn4tf61XW3s9hhh+iOmmVLvdgftsSdHQ4=; b=poNHwksFQJUVhj u1qErUqdjZ+V7ZSW3xHuSCoiHQhSb7DezHahpxhtJybzxkGOv7X8YCivJSkBSzZaVC8lFhMvnJWRu /waZjJUcsi3UkgPRGqv3kzd3W14UusczzMNWIA3MpWozUNBrzfJ9Bcb9rKBHrVxWHZJ+4TJqnvJUh 9CHhEGMMj+p1qswCbmiz9uv5d6AxK4MjLgEye30EmSNGzaSYVy0jQXpSqwGa0lMq7VnXyU33M2F5g zW6PpVT0tulT3+G/QyBokuyzMBnq224c8J1aFh8oEMLfSSvIl7a+EVlxCgE1PcEI9GD1zSuHJ+i8W 6qKPvY5fs6GK3EBehVMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndzJs-00AHNi-Ho; Mon, 11 Apr 2022 19:03:24 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndzJn-00AHFO-PR for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2022 19:03:23 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 75ABB1570; Mon, 11 Apr 2022 12:03:07 -0700 (PDT) Received: from [192.168.122.164] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 46AE23F70D; Mon, 11 Apr 2022 12:03:06 -0700 (PDT) Message-ID: Date: Mon, 11 Apr 2022 14:02:46 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: GCC 12 miscompilation of volatile asm (was: Re: [PATCH] arm64/io: Remind compiler that there is a memory side effect) Content-Language: en-US To: Mark Rutland , 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 , Ard Biesheuvel , Peter Zijlstra , x86@kernel.org, andrew.cooper3@citrix.com References: <20220401164406.61583-1-jeremy.linton@arm.com> From: Jeremy Linton In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220411_120319_912620_E43080FD X-CRM114-Status: GOOD ( 14.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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, _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel