Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8128921ybn; Tue, 1 Oct 2019 03:45:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuXp9TbTd4DFS4FDq/2SRGBEVakTA1tjExbbnNqbZbluRgGIP10j9LrnLR2Ob/eSNphSm9 X-Received: by 2002:a50:f0dd:: with SMTP id a29mr24671635edm.219.1569926705129; Tue, 01 Oct 2019 03:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569926705; cv=none; d=google.com; s=arc-20160816; b=Wdn2iZyGND8oviXCwiji3KAwMHOSndhXWgxmYsgu+bKHhgi2neDLZv9nIaNj+uiPmC tfjfaZpImChOetvLBAFQMhyAuB1Mzp3kVL/P5nBS4t2pPAZ9PnA93ysWpx+U5dWdiR2r nkHGV7KBENyz7Efz02VbMgnIziUyVuAcIeFRreu/NOemYvOSNt7ShAf7u9I5psQT2r77 LVVPD9KPRJ9h49WTTsNKUGON/rX9VeUsEME5MpL6Uu7FOd+K9ovJgO5DX4lBTPFbgC2d VOQ0j5XGLv+LGCegTsDfS4uLS97C+W3V9S/tBjjGdN/yZSLc2hVHwh8ZiiurcmmgFT5h pFIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=EA000x56yuLpzLKFmkuve24xWazXQL8zVN7DoYxeiWM=; b=g+FuafgKBuMQBEBLwRRGD1SnsoVTPIBE2Eh+zLJVOIFVe7r51UOzn3lfAFfDKvtwhv EwNsGOeIMfu25M/PQiDDWVOXdu6lwg4C6qjx2W1gL/f9qwBZmp9/wMXWp6AOPqLJHBjy 6oVtICLq592QIDiOe8L2HVHJzSyNajVp+cQQX+1nYNIQM/PhwhTa92HtefQzEVt7LTdN ByEP6M5syOPSGFcMd+ZQkN+8av9g5tXCDXl9CKYsEHqZt3ssJwp6qWi7WiteOVCVRnJH e8wRfUT5G10aP6ncdjyyHlGCgvrWyPJxDAy04VS5+3U5oO5I8uAdQsh9/kKP6Va/ecSA Z9CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PRf2kKjU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si8552461edu.432.2019.10.01.03.44.40; Tue, 01 Oct 2019 03:45:05 -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=@kernel.org header.s=default header.b=PRf2kKjU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731104AbfJAKnA (ORCPT + 99 others); Tue, 1 Oct 2019 06:43:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:51994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726494AbfJAKm7 (ORCPT ); Tue, 1 Oct 2019 06:42:59 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EAC6221906; Tue, 1 Oct 2019 10:42:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569926578; bh=fLlcwekdrGSCzJboirhCdZb2pRq7XYqkATwD0/s6rn8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PRf2kKjUQf04+gaCdNG46D5w6U0piINzln1PR2OvjWhQXDAlD/RkxgHyAojkua2nz tq/4o9XqfWbnpabpQep2kx3FXyKQzNDFI7iTKDHAJn8QNaUG8OfOL1tlrbNEC1ejgW RF5s1iWFOxLXHv36ZMje4zqPQUovVagB/ZgUvNJI= Date: Tue, 1 Oct 2019 11:42:54 +0100 From: Will Deacon To: Masahiro Yamada Cc: Linus Torvalds , linux-arm-kernel , Linux Kernel Mailing List , Nicolas Saenz Julienne , Catalin Marinas , Russell King , Arnd Bergmann Subject: Re: [PATCH] Partially revert "compiler: enable CONFIG_OPTIMIZE_INLINING forcibly" Message-ID: <20191001104253.fci7s3sn5ov3h56d@willie-the-truck> References: <20190930114540.27498-1-will@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 01, 2019 at 06:40:26PM +0900, Masahiro Yamada wrote: > On Mon, Sep 30, 2019 at 8:45 PM Will Deacon wrote: > > 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. It matches the previous default behaviour! > 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. So you'd prefer I do something like the diff below? I mean, it's a start, but I do worry that we're hanging arch/arm/ out to dry. Will --->8 diff --git a/arch/arm64/include/asm/atomic_lse.h b/arch/arm64/include/asm/atomic_lse.h index c6bd87d2915b..574808b9df4c 100644 --- a/arch/arm64/include/asm/atomic_lse.h +++ b/arch/arm64/include/asm/atomic_lse.h @@ -321,7 +321,8 @@ static inline s64 __lse_atomic64_dec_if_positive(atomic64_t *v) } #define __CMPXCHG_CASE(w, sfx, name, sz, mb, cl...) \ -static inline u##sz __lse__cmpxchg_case_##name##sz(volatile void *ptr, \ +static __always_inline u##sz \ +__lse__cmpxchg_case_##name##sz(volatile void *ptr, \ u##sz old, \ u##sz new) \ { \ @@ -362,7 +363,8 @@ __CMPXCHG_CASE(x, , mb_, 64, al, "memory") #undef __CMPXCHG_CASE #define __CMPXCHG_DBL(name, mb, cl...) \ -static inline long __lse__cmpxchg_double##name(unsigned long old1, \ +static __always_inline long \ +__lse__cmpxchg_double##name(unsigned long old1, \ unsigned long old2, \ unsigned long new1, \ unsigned long new2, \