From patchwork Mon Mar 14 15:34:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 63825 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp106571lbc; Mon, 14 Mar 2016 08:34:38 -0700 (PDT) X-Received: by 10.66.152.231 with SMTP id vb7mr38950428pab.132.1457969678536; Mon, 14 Mar 2016 08:34:38 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id yj6si129826pab.164.2016.03.14.08.34.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Mar 2016 08:34:38 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-423205-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-return-423205-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-423205-patch=linaro.org@gcc.gnu.org; dkim=pass header.i=@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=ES+tpTZ1UY80MnEmH+ OXODQXqKJwzz4DmyB4a5wCAF7mi6sGQ0ltXA8Q5CFLOh8euIeAgRvFixra204pHn jLkMZIDQ98eERot8p4gcb+mZ1f43Sd3Z7rFbfxtbnCQBUdw6PlngG6QysxN6uJFY oog6lQ2wnUVnq3PBWG22I8Crw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=o22OikUSk0euw+VAqBbG4/tH 6e0=; b=Jm/4S4aC+JhUzdlA6V5XAn2geDn5v3oRZXnGnasTqnTkMRJipTkgPBHu qxedODnfhxnW8XomryqhOmmQj0Ld3YURT6eEjNI+N00q0/91wj4mJEAS9zzhiBqZ mIY2L8qdXymtfIBh2DM59B5t++UZjN9iKwWZzN6luI5H8gP9VlA= Received: (qmail 67470 invoked by alias); 14 Mar 2016 15:34:06 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 67456 invoked by uid 89); 14 Mar 2016 15:34:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=literal, sk:christo X-HELO: mail-qg0-f47.google.com Received: from mail-qg0-f47.google.com (HELO mail-qg0-f47.google.com) (209.85.192.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 14 Mar 2016 15:34:03 +0000 Received: by mail-qg0-f47.google.com with SMTP id y89so156631126qge.2 for ; Mon, 14 Mar 2016 08:34:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=wcQb+rFV8/3AO18VMBGPXPJonTUvJdnVZyEugmpqOgQ=; b=CUcX42u0OTd9IMyCNgxktkMHrCpxXrCJs0bGXn42kuDa/w8wOMxKUXftmqkQDgsTS2 GQMZ8Eg3q1W+ApbRQs6PkXspOLm6k97ZOjHl4m2rOZRxU38xDvvhpDueGAsInWnR1FqE db42LmNSZ4wIHsKQ2NUwj9eoG8tAPH9RTlX1nMXvYdU2jtV7caWDSZopYDtIVLylTDyL 5aAXxlZRpkHCZordVjv0Rr5ntYUtEvZnj342pQ/wWf6s0Rxp3/Scc5Mdrh2DGGNGht3S VV3fPctqxTkrhAjJAl0UWBqVHy2wJ3GWUVwx1OTzYnMXJy7NjOfR3PiM8R5IEimSABeR 2p/g== X-Gm-Message-State: AD7BkJKMHX5J0uflvd1QV2ajErxl7cf8wCu02guUveGJK67+0Kx/oYDvcvGKyIc8bVqoflfVydqXeOQUmV9u7qBI MIME-Version: 1.0 X-Received: by 10.140.99.69 with SMTP id p63mr30508281qge.97.1457969640487; Mon, 14 Mar 2016 08:34:00 -0700 (PDT) Received: by 10.140.22.164 with HTTP; Mon, 14 Mar 2016 08:34:00 -0700 (PDT) In-Reply-To: <20160310132440.GB38844@arm.com> References: <20160310114348.GB38000@arm.com> <20160310132440.GB38844@arm.com> Date: Mon, 14 Mar 2016 16:34:00 +0100 Message-ID: Subject: Re: [AArch64] Disable pcrelative_literal_loads with fix-cortex-a53-843419 From: Christophe Lyon To: James Greenhalgh Cc: "gcc-patches@gcc.gnu.org" , Ramana Radhakrishnan X-IsSubscribed: yes On 10 March 2016 at 14:24, James Greenhalgh wrote: > On Thu, Mar 10, 2016 at 01:37:50PM +0100, Christophe Lyon wrote: >> On 10 March 2016 at 12:43, James Greenhalgh wrote: >> > On Tue, Jan 26, 2016 at 03:43:36PM +0100, Christophe Lyon wrote: >> >> With the attachment.... >> >> >> >> >> >> On 26 January 2016 at 15:42, Christophe Lyon wrote: >> >> > Hi, >> >> > >> >> > This is a followup to PR63304. >> >> > >> >> > As discussed in bugzilla, this patch disables pcrelative_literal_loads >> >> > when -mfix-cortex-a53-843419 (or its default configure option) is >> >> > used. >> >> > >> >> > I copied the behavior of -mfix-cortex-a53-835769 (e.g. in >> >> > aarch64_can_inline_p), and I have tested by building the Linux kernel >> >> > using -mfix-cortex-a53-843419 and checked that >> >> > R_AARCH64_ADR_PREL_PG_HI21 relocations are not emitted anymore (under >> >> > CONFIG_ARM64_ERRATUM_843419). >> >> > >> >> > For reference, this is motivated by: >> >> > https://bugs.linaro.org/show_bug.cgi?id=1994 >> >> > and further details on Launchpad: >> >> > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1533009 >> >> > >> >> > OK for trunk? >> > >> > Thanks, this looks like a clear regression from GCC 5 (we can no longer >> > build the kernel, so this workaround is fine to go in now). Please remember >> > to add the link to the relevant PR in the ChangeLog. >> > >> > I'd also really appreciate a nice big comment over this code: >> > >> >> + /* If it is not set on the command line, we default to no pc >> >> + relative literal loads, unless the workaround for Cortex-A53 >> >> + erratum 843419 is in effect. */ >> >> + if (opts->x_nopcrelative_literal_loads == 2 >> >> + && !TARGET_FIX_ERR_A53_843419) >> > >> > Explaining why this is important (i.e. some summary of the discussion >> > in PR63304 regarding the kernel module loader). >> > >> > Can you repost with that comment added? I don't have any other objections >> > to the patch. >> > >> >> OK, here is an updated version. > > Thanks. > > This is OK for trunk. > When GCC is configured to enable the A53 erratum 843419 workaround by default, this patch caused gcc.target/aarch64/pr63304_1.c to fail. The attached patch fixes the problem by forcing the use of -mno-fix-cortex-a53-843419. OK, or do we prefer not to bother? Thanks, Christophe > James > 2016-03-14 Christophe Lyon * gcc.target/aarch64/pr63304_1.c: Add -mno-fix-cortex-a53-843419. diff --git a/gcc/testsuite/gcc.target/aarch64/pr63304_1.c b/gcc/testsuite/gcc.target/aarch64/pr63304_1.c index fa0fb56..c917f81c 100644 --- a/gcc/testsuite/gcc.target/aarch64/pr63304_1.c +++ b/gcc/testsuite/gcc.target/aarch64/pr63304_1.c @@ -1,5 +1,5 @@ /* { dg-do assemble } */ -/* { dg-options "-O1 --save-temps" } */ +/* { dg-options "-O1 --save-temps -mno-fix-cortex-a53-843419" } */ #pragma GCC push_options #pragma GCC target ("+nothing+simd, cmodel=small")