Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1223528imm; Tue, 5 Jun 2018 10:57:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKInE4YqcXzlHcxu2jDJykJBUSeEvh0jXjM/iGlkBDAJ174eNodsHN7kB4qX+SU45GRM5BXu X-Received: by 2002:a65:6355:: with SMTP id p21-v6mr17281285pgv.293.1528221433233; Tue, 05 Jun 2018 10:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528221433; cv=none; d=google.com; s=arc-20160816; b=xXiOXYUC8xzn3Gd+yAVaCaBPW24lt9ol5OZkmh6AJywTg+BebXxe1xooSSqI4xHsq9 fgEtsw2dJyYqGibh4ndEm9kr3QPeXqZe1v8ZaUgpqg3TT6VJwaIqR9r9Lh19ydvlxGAT IoMnR8Lv+8EykAxN9QxnzPxUnmbtDfKByTV2NkbKlTlsR1p9s8xazYotYeN5aUsbxcjc p9I64LwMuznY/vxH1MOhiWwQ9si9Jxzt5ZnmyEzhvB0ZmJwVU8oOAREtRmHyf7IVKkvH po9Z5E7UAglL1StIUG5GFZF0v6eummhiaqcoL4/l0m5bb77B37uTvHfo0K3eFRwOYgRB iOtA== 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 :arc-authentication-results; bh=n2zfgXJWWJY74uxJBtyRDaJcVFiTh9UVeyONXZaEPYs=; b=mwzaQBzuwwaCxx+gcba5iZ/0Bx+kU8Z29jRQafrYBd6r/lwbqbvPVU9vWsoHI1FawZ oychoXo1ySGJZKblINQeTOMvtCVrxOCL2dWw2xHPDG3BtNtgV3pvdtjMjXE2qL60Gjsf 3R8KpaGxFXvEMasyVXf3fH6mAuO7qK0JpDvyFGlLL0k+e15SadNs4EJNpPfIal0ctZVo nAeYDBfe/yB6JNzhyeoe1DW98VWcEhX6GcMAIKIYtthTTD7cRXb/uG71/exvA054y0nl F2KOIDoSL+mkwjfT9rmpRgqsnIMsmt6KQ71moblrquPTsXeXwopE2xjcgkTTphf3dj+D 79LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ed6yyTjG; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64-v6si48881873pfl.309.2018.06.05.10.56.59; Tue, 05 Jun 2018 10:57:13 -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=@google.com header.s=20161025 header.b=Ed6yyTjG; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751864AbeFERzx (ORCPT + 99 others); Tue, 5 Jun 2018 13:55:53 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:44677 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753044AbeFERzu (ORCPT ); Tue, 5 Jun 2018 13:55:50 -0400 Received: by mail-pg0-f65.google.com with SMTP id p21-v6so1571568pgd.11 for ; Tue, 05 Jun 2018 10:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=n2zfgXJWWJY74uxJBtyRDaJcVFiTh9UVeyONXZaEPYs=; b=Ed6yyTjGXbKxhVDliP5HdXbXky3qMNOAc8Llwzf7y+/CGgNELvIt6SrMQ10BKK/2iU SxQggJxr+u2OR5N3Hf/WNbC0ZIrTOSwGXkXvJBmUmlbWhcvA56qyl5ch1aWUavssZWyy i9zZ7ODkc+FvF9VttY7tnV+Zw2ozfcW7vOfNO1tPU1WZ3SynTv9ti7jS6xHi0xtnapJ8 mfI6433Vuy+/xtmMjPBYa6uWD4vBtxpSUQa0UG3U6SQoMB6xZ2QapUIfRPcBn0eQ281S LzYoLFwj/Kom5MYPOHbrNHgh+UcFe2GSHJSix1hxuiJmsIeQKPZHSSxHXbNj14JyzPit Salw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=n2zfgXJWWJY74uxJBtyRDaJcVFiTh9UVeyONXZaEPYs=; b=cLhT/R2H7CgeJVHdTNJl0JKQEGgqVbv5KwGgqLuXO335lEGgeIFFrvMHt8FA262x+w QM8K6Fe6Q94b8OC+mI9AE7QN6XS3OcHnzr7d1EYITb7y3FMivuLGPdIfphPEW5vtaHlJ sHD3VfMsuTLjbbW2WE6Ss47zdjUuuFmR7JtMkquQKWbB0EQmWOQz21QQdaNHc1V9xhUT yTwA9LP1KtiwE0XZVz7Uy2Pzm03SAG08BoqqC/QV0PKxVRmEDV2eb9dqZ/9Tw8ZgXBYJ VgiVhDkC3I/XXqK50mdX8NvjXglqGHe8GqcxcgBtkxgOnysU0mLnEv18StCgKs4pr01Z sY7Q== X-Gm-Message-State: ALKqPwfbQZ6dsq0U7Lm9sPmW2lqN3JBmTlWrS9wC1cKk7LFzYqM0mIv+ du3N6TTOIk8ESL2rAXdjS2Y2+NG9ytiYVaXjrzt3aQ== X-Received: by 2002:a63:ad46:: with SMTP id y6-v6mr21729470pgo.10.1528221349741; Tue, 05 Jun 2018 10:55:49 -0700 (PDT) MIME-Version: 1.0 References: <20180605170532.170361-1-ndesaulniers@google.com> <20180605170532.170361-2-ndesaulniers@google.com> <202492204c2d5bd5ca27307cbca5e44673b739ed.camel@perches.com> In-Reply-To: <202492204c2d5bd5ca27307cbca5e44673b739ed.camel@perches.com> From: Nick Desaulniers Date: Tue, 5 Jun 2018 10:55:38 -0700 Message-ID: Subject: Re: [PATCH v2 1/2] compiler-gcc.h: add gnu_inline to all inline declarations To: joe@perches.com Cc: Andrew Morton , Ard Biesheuvel , Andrey Ryabinin , akataria@vmware.com, boris.ostrovsky@oracle.com, brijesh.singh@amd.com, Cao jin , Greg KH , hpa@zytor.com, "J. Kiszka" , jarkko.sakkinen@linux.intel.com, jgross@suse.com, Josh Poimboeuf , kirill.shutemov@linux.intel.com, mingo@redhat.com, mjg59@google.com, Matthias Kaehlcke , Philippe Ombredanne , rostedt@goodmis.org, Thomas Gleixner , thomas.lendacky@amd.com, Thiebaud Weksteen , linux-efi@vger.kernel.org, LKML , x86@kernel.org, virtualization@lists.linux-foundation.org, Alistair Strachan , Manoj Gupta , Greg Hackmann , sedat.dilek@gmail.com, tstellar@redhat.com, Kees Cook , Masahiro Yamada , Michal Marek , Linux Kbuild mailing list , geert@linux-m68k.org, Will Deacon , mawilcox@microsoft.com, Arnd Bergmann , David Rientjes 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 Tue, Jun 5, 2018 at 10:23 AM Joe Perches wrote: > On Tue, 2018-06-05 at 10:05 -0700, Nick Desaulniers wrote: > > #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ > > !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) > > -#define inline inline __attribute__((always_inline,unused)) notrace > > -#define __inline__ __inline__ __attribute__((always_inline,unused)) notrace > > -#define __inline __inline __attribute__((always_inline,unused)) notrace > > +#define inline \ > > + inline __attribute__((always_inline, unused, gnu_inline)) notrace > > +#define __inline__ \ > > + __inline__ __attribute__((always_inline, unused, gnu_inline)) notrace > > +#define __inline \ > > + __inline __attribute__((always_inline, unused, gnu_inline)) notrace > > Perhaps these are simpler as > > #define __inline__ inline > #define __inline inline > > > #else > > /* A lot of inline functions can cause havoc with function tracing */ > > -#define inline inline __attribute__((unused)) notrace > > -#define __inline__ __inline__ __attribute__((unused)) notrace > > -#define __inline __inline __attribute__((unused)) notrace > > +#define inline inline __attribute__((unused, gnu_inline)) notrace > > +#define __inline__ __inline__ __attribute__((unused, gnu_inline)) notrace > > +#define __inline __inline __attribute__((unused, gnu_inline)) notrace > > #endif > > And only set once along with: > > > #define __always_inline inline __attribute__((always_inline)) > > And perhaps this __always_inline should be updated > with gnu_inline as well > Great idea, I'll pick this up and add you to the Suggested-by: tag in v3. Thanks Joe! -- Thanks, ~Nick Desaulniers