From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69674 invoked by alias); 28 Jun 2017 01:02:52 -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 69190 invoked by uid 89); 28 Jun 2017 01:02:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy= X-HELO: mail-qt0-f174.google.com Received: from mail-qt0-f174.google.com (HELO mail-qt0-f174.google.com) (209.85.216.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Jun 2017 01:02:48 +0000 Received: by mail-qt0-f174.google.com with SMTP id f92so38455931qtb.2 for ; Tue, 27 Jun 2017 18:02:47 -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=iXIFUb1rHJtlz8mK3B4YR2FkMHABA6VEH2fpkbH4L0U=; b=BvMm/BJfTqeF6XhcEYBifD8nQMOW4eE7G4DiL6wWDdKipQQWtJyaECcDVXivu5z1OR 09t4HYhrlJYPo69YL3YQq+c6Pp4Fv24C2lTwNsl7ssNSLFXrXSfowz1S5gw1py5Wv+tb fOHi/PMfqchqcXqqPuYHMJxxPv67+IAGf+dU9Lo/tPoZy1JrGCCEbGmXqYryVRfZS1Vl VsdK1TSOV6GzmFxeB+0u/61Zab/V4R+5jZobXfkWfNuyBa0HjFWCqa9mlT1WGjqnikeN 96vN38XAkl/IoNPaNg9xue7CcVHLQDgSf9AF28pP+6scxFgX1fGtsUio87qJvbBKv9BO Kc0Q== X-Gm-Message-State: AKS2vOzLD5FCWpkR7Xym1o05ZnQCvMk/sDDFqGUZs1fGY2TVdNv+shQz 88dGAxlyz6C5cKGoW8bqbctiSNXG+c/1PPxU/A== X-Received: by 10.237.58.35 with SMTP id n32mr10390199qte.109.1498611766176; Tue, 27 Jun 2017 18:02:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.36.155 with HTTP; Tue, 27 Jun 2017 18:02:45 -0700 (PDT) In-Reply-To: <752a2d93-0641-134f-33dd-bc550618f7f3@foss.arm.com> References: <752a2d93-0641-134f-33dd-bc550618f7f3@foss.arm.com> From: Kugan Vivekanandarajah Date: Wed, 28 Jun 2017 01:02:00 -0000 Message-ID: Subject: Re: [AARCH64] Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341 To: Ramana Radhakrishnan Cc: "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/msg02106.txt.bz2 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. 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. Thanks, Kugan > regards > Ramana