Received: by 10.223.185.116 with SMTP id b49csp946792wrg; Wed, 21 Feb 2018 09:27:18 -0800 (PST) X-Google-Smtp-Source: AH8x2264IZyLx8waJM9rRPqb68S7DnKQW3W4bk2jIY1KR7Hj3pKOjRNWIZD/0/yc/8zjtTUJ/MlM X-Received: by 10.101.83.194 with SMTP id z2mr3284691pgr.133.1519234037912; Wed, 21 Feb 2018 09:27:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519234037; cv=none; d=google.com; s=arc-20160816; b=Wk+CqYS44Fs+pL/FQGXwtBUBTamQCzP80Pyiq8S7g15njmXvcuhX9KovrLbJm6I8Av l6xySzLHdyeyGFq3ubQUtDdnvY0Gfpi9+EwSipTzH32pINsn3+ckPIKedFv8Jt4MNvCd orzXNIMstDIXxaRhYGbz3XBKyoWzCJdzPs2vKotxO9AmuOQQjMJFsXTY4j1Z2zMof7HX 7obxlUDeYQ6cwJT1jX8wHfd60n6eYhadJAakfArIbFM3y9d+vm/nos1VPEJVWbHOjgJR MFPDJs7/20gb4IYW+6piYv/NLoR5/KwFAWXScSFzGi88VzDmTr+IwPHUGdyEY6/VF0yy R97w== 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=G9bfjPJoGIoBNhANZVEfavYW37Ck/MMywRwhGu7QQ7E=; b=S9FRcIBwDBsUqTymsKr8OfD/5VrVDOqYUhudAd+V8FEjq3zAuJjbYGPqdS22YwgFQK ltf990Sfu9pDYy/aw490LcHuN0Tm9qOtYTlC6BBmWf9dmEAtHhvdXuENIJoQnRiLynZT h73xfnLaLT9di9sZBejn/yxJyeM2nDaUP9RfQnIWBcWSxkpJ66EY2bKIEk7ULkp6n/bo hFEHGjihngcDIN0ZPVbzkxoCD0awlT9gOn1bYFxNCGs2IPCfE3MM3jskTN57YI0/m7Mf eQd6H9WIkUho+68Aio33nG45w1Y1tCAOEGcTGkqWPrWOOoVvsXr4q55i7nS+/gV+t/wt pKIw== 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 e17si3201420pfb.261.2018.02.21.09.27.03; Wed, 21 Feb 2018 09:27:17 -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 S935108AbeBUM7a (ORCPT + 99 others); Wed, 21 Feb 2018 07:59:30 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:36524 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935025AbeBUM70 (ORCPT ); Wed, 21 Feb 2018 07:59: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 89FC5FF9; Wed, 21 Feb 2018 12:59: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.14 042/167] compiler-gcc.h: Introduce __optimize function attribute Date: Wed, 21 Feb 2018 13:47:33 +0100 Message-Id: <20180221124526.889117611@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124524.639039577@linuxfoundation.org> References: <20180221124524.639039577@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.14-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 @@ -266,6 +266,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