From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55274 invoked by alias); 28 Jun 2017 22:06:31 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 55242 invoked by uid 89); 28 Jun 2017 22:06:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:2443 X-HELO: mail-pg0-f65.google.com Received: from mail-pg0-f65.google.com (HELO mail-pg0-f65.google.com) (74.125.83.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Jun 2017 22:06:28 +0000 Received: by mail-pg0-f65.google.com with SMTP id u36so9560360pgn.3 for ; Wed, 28 Jun 2017 15:06:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ZwiZFpwZuqwDpwexFQQmK3juKiS8AhZqEqiJ5ZNLkAw=; b=dmBEfkJcfNQxfiXTXJ5nOoLYUktYbO4pkvwYKkySXRNyQONlGf1ggSjJw65ATXevID SzijM2H2rHJyt0XimNw6HKPvqQ4+uDAfcjNTfLoV70BtQwEayy6Ny7AxdhLOIVFPjCCj RAJmgr5IXKWtiyBpnpw4yUde5XxfbZeAITwly+dGtqaytNt8Rj/E/JbaelIFFAiTGTVm 5TGjC2q1ZNtlspOaPQitMNDqGmuF4ggVqcOnZftOIdn05Txv3quTkGtngveiMRWflDG8 H4Y1lqeQ9z7Bnqn2dFp/yHgk4oCbUlzbOqE25Md5438WFmr4JDKkjzXZ8U8fROOvwt/w kpJQ== X-Gm-Message-State: AKS2vOz2mkfVzeaKEk4FQjsDy9qcU2z06uuZ5efABm1L74E3NaRMza++ b+kmySrMArAU/bsZfTTk/nwTfg4H5g== X-Received: by 10.99.121.77 with SMTP id u74mr12363519pgc.107.1498687587101; Wed, 28 Jun 2017 15:06:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.191.1 with HTTP; Wed, 28 Jun 2017 15:06:26 -0700 (PDT) In-Reply-To: References: <752a2d93-0641-134f-33dd-bc550618f7f3@foss.arm.com> From: Ramana Radhakrishnan Date: Wed, 28 Jun 2017 22:06:00 -0000 Message-ID: Subject: Re: [AARCH64] Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341 To: Kugan Vivekanandarajah Cc: Ramana Radhakrishnan , "gcc-patches@gcc.gnu.org" , James Greenhalgh , Richard Earnshaw Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg02217.txt.bz2 On Wed, Jun 28, 2017 at 2:02 AM, Kugan Vivekanandarajah wrote: > Hi Ramana, > > On 27 June 2017 at 18:01, Ramana Radhakrishnan > wrote: >> On 27/06/17 02:20, Kugan Vivekanandarajah wrote: >>> >>> https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00614.html added this >>> workaround to get kernel building with when TARGET_FIX_ERR_A53_843419 >>> is enabled. >>> >>> This was added to support building kernel loadable modules. In kernel, >>> when CONFIG_ARM64_ERRATUM_843419 is selected, the relocation needed >>> for ADRP/LDR (R_AARCH64_ADR_PREL_PG_HI21 and >>> R_AARCH64_ADR_PREL_PG_HI21_NC are removed from the kernel to avoid >>> loading objects with possibly offending sequence). Thus, it could only >>> support pc relative literal loads. >>> >>> However, the following patch was posted to kernel to add >>> -mpc-relative-literal-loads >>> http://www.spinics.net/lists/arm-kernel/msg476149.html >>> >>> -mpc-relative-literal-loads is unconditionally added to the kernel >>> build as can be seen from: >>> https://github.com/torvalds/linux/blob/master/arch/arm64/Makefile >>> >>> Therefore this patch removes the hunk so that applications like >>> SPECcpu2017's 521/621.wrf can be built (with LTO in this case) without >>> -mno-pc-relative-literal-loads >> >> >> Is that because your compiler has defaulted to -mpc-relative-literal-loads >> because it has the workaround enabled by default ? I'm curious as to why >> others haven't seen this issue. >> > > If TARGET_FIX_ERR_A53_843419 is selected, compiler defaults to > -mpc-relative-literal-loads unless we explicitly specify > -mno-pc-relative-literal-loads. Linaro toolchain is built with > TARGET_FIX_ERR_A53_843419. That explains why we haven't been hit by this issue in our builds of SPEC2017 even though I don't think we've done any lto builds recently., > > This linking of TARGET_FIX_ERR_A53_843419 and > -mpc-relative-literal-loads should now be relaxed since the kernel > explicitly uses -mpc-relative-literal-loads. > > This 1MiB issue should be very rarely seen even before you fixed it. > This particular issue maybe, but the original patch was put in because we had a number of users complaining about functions > 1MiB especially with autogenerated code. regards Ramana > Thanks, > Kugan > > >> regards >> Ramana