Received: by 10.223.185.116 with SMTP id b49csp718258wrg; Wed, 21 Feb 2018 05:55:04 -0800 (PST) X-Google-Smtp-Source: AH8x224M0caAeFUTQqjqXqSiRqN/9uM81Ho4qJ2++m8SMbhqN6oTSFM3b2SXOo7KKocUny5uKB/I X-Received: by 10.101.83.194 with SMTP id z2mr2792353pgr.133.1519221304824; Wed, 21 Feb 2018 05:55:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519221304; cv=none; d=google.com; s=arc-20160816; b=cgTBt8VaS0k/a0CK4VwgJeUpuHeGKZawkV951uIsxhgyNSVrb8jEd1Lo5MfEtO1nPc anL4lklfdAC/Pg1TbeuzSLWgZTRwmYgoIBfacSClHsJboG4s61NcpyCfp5qxXVe/eM5B mj4fe4yS43nE5FroVmoAXj5sFCz8vCYkGLcMG/buqTz4ma5c4a1mmJkhCsBt3mXpElf9 Srosd0oTDaVqOAfRhgzcO6jNkeHJlVX0iyXMFw/GMsQ/aGRUCm/KNNasJma4fDZ76jnJ Fvl2VCj8SOK5bmjali8E0LqgqdQTsjvzuFIGnOjJI+6z2WCfwrDwAFjQnEZzC5lvNrSw fiZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=YnThUNuI3f8c/NKWT/xfou/BCB5gfSG9aSYKGe3vLbQ=; b=qTl3p+1apccRypI8P/MPsSxx1P8VSQiu/I0rF07CZSQRVsCIG3CO168lHvjqm/zOzw sHqWvia9Mtkhrt4GW+lBSCAca1qANE/hDu9cRyhJTgM34MbZg2OHlTSprO74AF55UyGi dbb0V2gwrbmdv9OjcZOBcFLbBFccCX++KyhrHMJhyoBmUnkBf1mzGTF2RtKELlKORHCu 3Z21u7Q/6teAcbsHGqmYOxBJwpyExtV2G1jkeob/4AQgPb5+J0s1MnWUwkfWGQMjnX71 briP3Tk9m6T2pq7HbDJ00BUGYHaFZrclaBp3NdJ/2o4VbQkb/ZNTeRu8bie7AAEiekcV tLSA== ARC-Authentication-Results: i=1; mx.google.com; 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 e17si2960930pfb.261.2018.02.21.05.54.50; Wed, 21 Feb 2018 05:55:04 -0800 (PST) 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; 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 S965153AbeBUNHc (ORCPT + 99 others); Wed, 21 Feb 2018 08:07:32 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:41606 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936080AbeBUNH0 (ORCPT ); Wed, 21 Feb 2018 08:07:26 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C21E2FAD; Wed, 21 Feb 2018 13:07:25 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Ard Biesheuvel , Herbert Xu Subject: [PATCH 4.15 042/163] compiler-gcc.h: Introduce __optimize function attribute Date: Wed, 21 Feb 2018 13:47:51 +0100 Message-Id: <20180221124532.672161446@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Geert Uytterhoeven commit df5d45aa08f848b79caf395211b222790534ccc7 upstream. Create a new function attribute __optimize, which allows to specify an optimization level on a per-function basis. Signed-off-by: Geert Uytterhoeven Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- include/linux/compiler-gcc.h | 4 ++++ include/linux/compiler.h | 4 ++++ 2 files changed, 8 insertions(+) --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -196,6 +196,10 @@ #endif /* __CHECKER__ */ #endif /* GCC_VERSION >= 40300 */ +#if GCC_VERSION >= 40400 +#define __optimize(level) __attribute__((__optimize__(level))) +#endif /* GCC_VERSION >= 40400 */ + #if GCC_VERSION >= 40500 #ifndef __CHECKER__ --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -271,6 +271,10 @@ static __always_inline void __write_once #endif /* __ASSEMBLY__ */ +#ifndef __optimize +# define __optimize(level) +#endif + /* Compile time object size, -1 for unknown */ #ifndef __compiletime_object_size # define __compiletime_object_size(obj) -1