Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8070904ybn; Tue, 1 Oct 2019 02:44:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrU0pK49GBF+sDYpdcEURaPklA0qe+t8ACgtlJrJeqLxvrL2dmqHQ7PoZzIZrGs2uFXR9S X-Received: by 2002:a50:fc0c:: with SMTP id i12mr24533241edr.82.1569923055526; Tue, 01 Oct 2019 02:44:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569923055; cv=none; d=google.com; s=arc-20160816; b=hMnaJmu2Pf4doRbSKHmYy8s5Pisj0lHH2wJFVlih1KgacZzv0RdBS1Sjc/GbjSY6Uf 76TB8NgUKG1NZUOr0ukpQGuj9XCRRnYMBWRSzNKSxTrfDzd4HG4JNIOn0UwZR3RrKEWe aX2/c9EUGGA6hvi57NPuYa1AWlKNZ8AUwsOstxYUvgTLgCf/W1KaMbxqleTqWmaFTMA+ gmtVTfVpXeMwdthcGrPFLwZ6cCUOb4X4fVnOdmWejS69F+bWiIYniL28djukBxPSioEf I0vcwlbDZ5l7W+XTfgAW5Zd7wi8h1Vn/n8AABt6701uGdTmqqzZHVVRXEPwLD8iRSyq5 iunQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=z8ce72/SMhyC4NzYpXxLNBlQ7Qfn61j6lff6zp0DVOE=; b=nAy8usUfApHAv9NmL1qnaJczEUCtNUZC1rOzMJ2r4YW24jjtswYLPPDOUkaDB4YOz3 39Zefhj9ZU9z+fqHG/NATXPu030BIbdyPe80iYaw9N2RzN0n1iKdIvQrAkyFKuWKhGvC fCPD4BSm4dpL3KmMh44TI1gnQvIf0DRb9CPTPSJbeBjtyWNJjLYkez/jC7fuEs0/yRbT lqN4cyN4b1oN9bn1xeSDoc1MYaQ6/NpV9acr7HprR2FcqjRjtPwXD33oNpkvA/OZ/5Fq OeUf7ByMm4HZst9ezaVeNSIZLStp72JTMcZfhc4fLlJm1rPeNLdbc+gHPuB1dfJ4B7Ak rdiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=0GyxRT2L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pw28si8579961ejb.43.2019.10.01.02.43.51; Tue, 01 Oct 2019 02:44:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=0GyxRT2L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729450AbfJAJlK (ORCPT + 99 others); Tue, 1 Oct 2019 05:41:10 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:55733 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727130AbfJAJlK (ORCPT ); Tue, 1 Oct 2019 05:41:10 -0400 Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (authenticated) by conssluserg-02.nifty.com with ESMTP id x919f20O011246 for ; Tue, 1 Oct 2019 18:41:03 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com x919f20O011246 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1569922863; bh=z8ce72/SMhyC4NzYpXxLNBlQ7Qfn61j6lff6zp0DVOE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=0GyxRT2LzLXiEGk8kojVVJ5Rz/GHgaHl0RTyayGqGY+rYUj4+CLIuTcL4OTbJgDgF jZuZfqWqo5VzCAqAvyJPODX8XF+dnaI+9mwtq25PEd6t6m4S+uh8C2i4jl6X340Wya vLORtMoeyQqOJapAm35q2n2Ga4dRJ/XeLYRn8Ps8IbVI7mtwsNCYnaZJii7ooqblwF xplKIZteg0vuOBHyqg6z7gLVTc2JTN5ra/wGSshmz/SpJtA2oIv3yGsYnGhhHSMXHM NMmFcgbW2x+x5g+ENBu3RZfQiWUlZaVshgbcueGFVVSGYaohvH/RkaOFJ7Xa0R6U+Y X/+HobsXeYmJw== X-Nifty-SrcIP: [209.85.160.175] Received: by mail-qt1-f175.google.com with SMTP id j31so20763208qta.5 for ; Tue, 01 Oct 2019 02:41:03 -0700 (PDT) X-Gm-Message-State: APjAAAVH27FZp0OJsRpEA2s3LXdbWyNXQUvD7X8jeLKE1cBC7vUyZHxV dQQ6MSdxuq2wJoZLi0qSEUuu2nqvwtZYaZqyyj8= X-Received: by 2002:ac8:1639:: with SMTP id p54mr29615937qtj.290.1569922862203; Tue, 01 Oct 2019 02:41:02 -0700 (PDT) MIME-Version: 1.0 References: <20190930114540.27498-1-will@kernel.org> In-Reply-To: <20190930114540.27498-1-will@kernel.org> From: Masahiro Yamada Date: Tue, 1 Oct 2019 18:40:26 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Partially revert "compiler: enable CONFIG_OPTIMIZE_INLINING forcibly" To: Will Deacon Cc: Linus Torvalds , linux-arm-kernel , Linux Kernel Mailing List , Nicolas Saenz Julienne , Catalin Marinas , Russell King , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 30, 2019 at 8:45 PM Will Deacon wrote: > > This reverts commit ac7c3e4ff401b304489a031938dbeaab585bfe0a for ARM and > arm64. > > Building an arm64 kernel with CONFIG_OPTIMIZE_INLINING=y has been shown > to violate fixed register allocations of local variables passed to > inline assembly with GCC prior to version 9 which can lead to subtle > failures at runtime: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91111 > > A very similar has been reported for 32-bit ARM as well: > > https://lkml.kernel.org/r/f5c221f5749e5768c9f0d909175a14910d349456.camel@suse.de For reviewers: The main discussion is here: https://lore.kernel.org/patchwork/patch/1122097/ > Although GCC 9.1 appears to work for the specific case in the bugzilla > above, the exact issue has not been root-caused so play safe and disable > the option for now on these architectures. > > Cc: Nicolas Saenz Julienne > Cc: Linus Torvalds > Cc: Catalin Marinas > Cc: Russell King > Cc: Masahiro Yamada , > Cc: Arnd Bergmann > Signed-off-by: Will Deacon > --- > lib/Kconfig.debug | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 93d97f9b0157..c37c72adaeff 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -312,6 +312,7 @@ config HEADERS_CHECK > > config OPTIMIZE_INLINING > def_bool y > + depends on !(ARM || ARM64) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91111 This is a too big hammer. For ARM, it is not a compiler bug, so I am trying to fix the kernel code. For ARM64, even if it is a compiler bug, you can add __always_inline to the functions in question. (arch_atomic64_dec_if_positive in this case). You do not need to force __always_inline globally. > help > This option determines if the kernel forces gcc to inline the functions > developers have marked 'inline'. Doing so takes away freedom from gcc to > -- > 2.23.0.444.g18eeb5a265-goog > -- Best Regards Masahiro Yamada