Received: by 10.223.185.116 with SMTP id b49csp1030105wrg; Wed, 21 Feb 2018 10:51:56 -0800 (PST) X-Google-Smtp-Source: AH8x2258ovq7ySUAtiYLvPqPXcIkiV8K3P53qdhPUYxT6CE5OGAheoDSkZKWOy+Usi9ZvQMc+uAa X-Received: by 2002:a17:902:7883:: with SMTP id q3-v6mr3960324pll.361.1519239116207; Wed, 21 Feb 2018 10:51:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519239116; cv=none; d=google.com; s=arc-20160816; b=C8M7fGTgWClg7ubqT9VOTn5Dt4r11exm3GbuQ0oirIxxnaQxSEfifmhuyGep4vqrDj T8Q59KopPvHZFyId+J2siM8o4WaCpUS83Gcj1b+9FQpeboGzpIEVdcZDoPJSnAedKjSC slVn+QAh7uy97d0dcTQzUXqtrKirkpSG5oFFLJX/QKSCYVjrx7X38aFM432dS5HWOOTw WZOnopXkFlp5MCbCE7cce4cxjsbzc4GEzmxn8r0DN4Fx0BfNUryXW5n+SchilaHA0XCM OwVqWNXUUSXLei0ocA5bui7JC60WuXctdjKmRWVaTF4zzyNa20NEu9nI0F34fFMMIOoW JrXg== 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=gZCZy5abDw1+B1mpijWaHgjeAY1JNuzQ79pKS8cw7sY=; b=Bt4FtACORX1WcLoXwiqyVfUl3eR39P0V/qZWXH08FP5vW1gTkP2WEgk9do5zk6r6BB WyM3IoC+Lvbwmh45CgMM/J4so0OS15Pg+/154ds0SL3G3yr1l9qEzG+oc+xrp2jV2Tu5 1s3x0TnTQArJZ+K7U1Ronm5feAnMq1Wq3LWf6Je5KYM/M8vN7KUA9csGTYIKCIC3BPhB 9i/hdwTgGmCPUQt5B2s7t3PDjXtpgbtnZg9tef1sCJf6sXsCw52qTFV5OQjbMXCPW1sI UK3F5IXDz1tlLEPpbpthzmG6fEjugi4Ia6jAPGwRumipfaa73hDZXAo62AI+gl8NspJe ZRow== 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 123si6871303pfg.361.2018.02.21.10.51.42; Wed, 21 Feb 2018 10:51:56 -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 S935347AbeBUOZc (ORCPT + 99 others); Wed, 21 Feb 2018 09:25:32 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35864 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934723AbeBUM5n (ORCPT ); Wed, 21 Feb 2018 07:57:43 -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 8C536F32; Wed, 21 Feb 2018 12:57:42 +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.9 51/77] compiler-gcc.h: Introduce __optimize function attribute Date: Wed, 21 Feb 2018 13:49:00 +0100 Message-Id: <20180221124434.371604297@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124432.172390020@linuxfoundation.org> References: <20180221124432.172390020@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.9-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 @@ -187,6 +187,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 @@ -469,6 +469,10 @@ static __always_inline void __write_once # define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) #endif +#ifndef __optimize +# define __optimize(level) +#endif + /* Compile time object size, -1 for unknown */ #ifndef __compiletime_object_size # define __compiletime_object_size(obj) -1