From patchwork Tue Jun 27 01:20:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 780949 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wxSlm3n28z9s5L for ; Tue, 27 Jun 2017 11:20:18 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="yUYEO9M0"; dkim-atps=neutral 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:from:date:message-id:subject:to:content-type; q= dns; s=default; b=g8JMVhIuiaYRSIsOPG3pkJWYPYMVErjNnlBtb7apSV66Kf NFROXx6hpDZcdi0Y7POU/FBWelDuYhoLKGbnz3ir8t7nrJRdc+mIUnV638rDHm1u dXCcSegiUxDEqaj+EJOxZ/Jgljqd7MqfmZ1suSc/j/TiK49BeNk7wU8Sh2W/k= 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:from:date:message-id:subject:to:content-type; s= default; bh=81BqefPaGan+1p0bgwpSXVNVX7Y=; b=yUYEO9M0YTXsQn/jowrM maH3wGWpvNMKhNFdNz+934wHbVXk1NsclLxlu5AANbWCyBkbMgyy/Mc5GfZCXjfF H5PpCSphZdC5D3eddR29C9ayN03HiwqRG7T67w2ElfWP4t9C2wdYujOmWeZ0CZ1W 6A7WaVwppDu7iBKhINwx9vs= Received: (qmail 57189 invoked by alias); 27 Jun 2017 01:20:08 -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 57109 invoked by uid 89); 27 Jun 2017 01:20:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qk0-f171.google.com Received: from mail-qk0-f171.google.com (HELO mail-qk0-f171.google.com) (209.85.220.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Jun 2017 01:20:05 +0000 Received: by mail-qk0-f171.google.com with SMTP id 16so14788821qkg.2 for ; Mon, 26 Jun 2017 18:20:05 -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:from:date:message-id:subject:to; bh=OgsfcEBaXftipT8vZs6lfvacTFHy/GHmJQ2+Vu+yZc8=; b=SeXVce8MLaiaJsvaOXV/w9Y7O6kB4KaLhvnBnZHj2hK9ScrNCgzATOEkMgc3Z11HZF +JIbgPUak9pHKuNJO09T5kXTrwcs60IhM+weTeDTJSr/yB4SPCvhQjLOJTzLfdgzDOTX eaNKe9W+OMXVCljpSj0myHU2EgxZZWeG3ZDnp5qf81mWvQvdmFHHGeTwkeAwieKKX9D8 ZNx9itpJLtnpaoam/mNl79ldA/30t5WQ9NyX33wVFTSYJXwxdv6gkx2umNWr3iuplQfk 19mqsZsecE37pFEjm2zcEr5YD/WKbukwqOqHPZn4SJ4EmkxVD3ON1Qd4Wo57chPC20yE NWfw== X-Gm-Message-State: AKS2vOxZk4Hq0sYnJEpS++k6WfbeUVDzpwvDqWaiDY/KeryxAbe3sL4o 7pKzmYIY+2nzcySLcjEi/W7gYU1kidXt5DyIyw== X-Received: by 10.55.76.71 with SMTP id z68mr3691969qka.8.1498526403615; Mon, 26 Jun 2017 18:20:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.36.155 with HTTP; Mon, 26 Jun 2017 18:20:02 -0700 (PDT) From: Kugan Vivekanandarajah Date: Tue, 27 Jun 2017 11:20:02 +1000 Message-ID: Subject: [AARCH64] Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341 To: "gcc-patches@gcc.gnu.org" , James Greenhalgh , Richard Earnshaw X-IsSubscribed: yes 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 Bootstrapped and regression tested on aarch64-linux-gnu with no new regressions. Is this OK for trunk? Thanks, Kugan gcc/testsuite/ChangeLog: 2017-06-27 Kugan Vivekanandarajah * gcc.target/aarch64/pr63304_1.c: Remove-mno-fix-cortex-a53-843419. gcc/ChangeLog: 2017-06-27 Kugan Vivekanandarajah * config/aarch64/aarch64.c (aarch64_override_options_after_change_1): Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341 for default. From bf5d8151ad6a83903f51529655e83181bdb67200 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Thu, 8 Jun 2017 15:51:29 +1000 Subject: [PATCH] Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341 --- gcc/config/aarch64/aarch64.c | 11 ----------- gcc/testsuite/gcc.target/aarch64/pr63304_1.c | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 71f9819..99cfd20 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -8632,17 +8632,6 @@ aarch64_override_options_after_change_1 (struct gcc_options *opts) if (opts->x_pcrelative_literal_loads == 1) aarch64_pcrelative_literal_loads = true; - /* This is PR70113. When building the Linux kernel with - CONFIG_ARM64_ERRATUM_843419, support for relocations - R_AARCH64_ADR_PREL_PG_HI21 and R_AARCH64_ADR_PREL_PG_HI21_NC is - removed from the kernel to avoid loading objects with possibly - offending sequences. Without -mpc-relative-literal-loads we would - generate such relocations, preventing the kernel build from - succeeding. */ - if (opts->x_pcrelative_literal_loads == 2 - && TARGET_FIX_ERR_A53_843419) - aarch64_pcrelative_literal_loads = true; - /* In the tiny memory model it makes no sense to disallow PC relative literal pool loads. */ if (aarch64_cmodel == AARCH64_CMODEL_TINY diff --git a/gcc/testsuite/gcc.target/aarch64/pr63304_1.c b/gcc/testsuite/gcc.target/aarch64/pr63304_1.c index c917f81c..fa0fb56 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 -mno-fix-cortex-a53-843419" } */ +/* { dg-options "-O1 --save-temps" } */ #pragma GCC push_options #pragma GCC target ("+nothing+simd, cmodel=small") -- 2.7.4