linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Stefan Agner <stefan@agner.ch>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Kees Cook <keescook@chromium.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>,
	Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Will Deacon <will.deacon@arm.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	dwmw@amazon.co.uk, Paul Lawrence <paullawrence@google.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Subject: Re: [PATCH] include/linux/compiler-clang.h: define __naked
Date: Mon, 10 Sep 2018 09:51:24 -0700	[thread overview]
Message-ID: <CAKwvOd=E6+QSoRqcMJ0o1_q8VSMO8Zoi75e+zhj2SRSTdfacJw@mail.gmail.com> (raw)
In-Reply-To: <CAK8P3a2cc741UqFSk+hXpC2s4S+A+0FuiM1yP=Z4rC18sJHq9g@mail.gmail.com>

On Mon, Sep 10, 2018 at 5:14 AM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Mon, Sep 10, 2018 at 8:05 AM Stefan Agner <stefan@agner.ch> wrote:
> >
> > ARM32 arch code uses the __naked attribute. This has previously been
> > defined in include/linux/compiler-gcc.h, which is no longer included
> > for Clang. Define __naked for Clang. Conservatively add all attributes
> > previously used (and supported by Clang).
> >
> > This fixes compile errors when building ARM32 using Clang:
> >   arch/arm/mach-exynos/mcpm-exynos.c:193:13: error: variable has incomplete type 'void'
> >   static void __naked exynos_pm_power_up_setup(unsigned int affinity_level)
> >               ^
> >
> > Fixes: 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive")
> > Signed-off-by: Stefan Agner <stefan@agner.ch>

Cool, thanks for this patch! I'll admit I need to start testing more
architectures with Clang.

>
> > +/*
> > + * ARM32 is currently the only user of __naked supported by Clang. Follow
> > + * gcc: Do not trace naked functions and make sure they don't get inlined.
> > + */
> > +#define __naked __attribute__((naked)) noinline notrace
> > +
>
> Please see patches 5 and 6 of the series that Miguel posted:
>
> https://lore.kernel.org/lkml/20180908212459.19736-6-miguel.ojeda.sandonis@gmail.com/

Yes, I'd prefer those 2 patches.

>
> I suppose we want the patch to fix clang build as soon as possible though,
> and follow up with the cleanup for the next merge window, right?

Can we take Miguel's two patches from above in the ARM tree, since
this attribute is only used on ARM, IIUC?

-- 
Thanks,
~Nick Desaulniers

  reply	other threads:[~2018-09-10 16:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10  6:04 [PATCH] include/linux/compiler-clang.h: define __naked Stefan Agner
2018-09-10 12:14 ` Arnd Bergmann
2018-09-10 16:51   ` Nick Desaulniers [this message]
2018-09-12  4:19   ` Miguel Ojeda
2018-09-13  4:02     ` Miguel Ojeda
2018-09-13 22:20       ` Nick Desaulniers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKwvOd=E6+QSoRqcMJ0o1_q8VSMO8Zoi75e+zhj2SRSTdfacJw@mail.gmail.com' \
    --to=ndesaulniers@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=aryabinin@virtuozzo.com \
    --cc=dwmw@amazon.co.uk \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=mingo@kernel.org \
    --cc=paullawrence@google.com \
    --cc=stefan@agner.ch \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).