[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdmFVnSos71vAUnayuocBDhxLg76tvGF0y3sj+4+s7TCcw@mail.gmail.com>
Date: Mon, 16 Jul 2018 10:27:04 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: David.Laight@...lab.com
Cc: mingo@...hat.com, Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>, hpa@...or.com,
linux-efi@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
x86@...nel.org, virtualization@...ts.linux-foundation.org,
Alistair Strachan <astrachan@...gle.com>,
Manoj Gupta <manojgupta@...gle.com>,
Greg Hackmann <ghackmann@...gle.com>, sedat.dilek@...il.com,
tstellar@...hat.com, Kees Cook <keescook@...gle.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <michal.lkml@...kovi.net>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Will Deacon <will.deacon@....com>, mawilcox@...rosoft.com,
Arnd Bergmann <arnd@...db.de>,
David Rientjes <rientjes@...gle.com>, acme@...hat.com,
Philippe Ombredanne <pombredanne@...b.com>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Kate Stewart <kstewart@...uxfoundation.org>,
boris.ostrovsky@...cle.com, "J. Kiszka" <jan.kiszka@...mens.com>,
rostedt@...dmis.org,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
akataria@...are.com, brijesh.singh@....com,
Cao jin <caoj.fnst@...fujitsu.com>,
Greg KH <gregkh@...uxfoundation.org>,
jarkko.sakkinen@...ux.intel.com, jgross@...e.com,
Josh Poimboeuf <jpoimboe@...hat.com>,
Matthias Kaehlcke <mka@...omium.org>, thomas.lendacky@....com,
Thiebaud Weksteen <tweek@...gle.com>, mjg59@...gle.com,
joe@...ches.com, andrea.parri@...rulasolutions.com
Subject: Re: [PATCH v6 3/3] x86: paravirt: make native_save_fl extern inline
On Fri, Jul 13, 2018 at 3:15 AM David Laight <David.Laight@...lab.com> wrote:
>
> From: Nick Desaulniers
> > Sent: 21 June 2018 17:23
> >
> > native_save_fl() is marked static inline, but by using it as
> > a function pointer in arch/x86/kernel/paravirt.c, it MUST be outlined.
> >
> > paravirt's use of native_save_fl() also requires that no GPRs other than
> > %rax are clobbered.
> ...
> > diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
> > index 89f08955fff7..c4fc17220df9 100644
> > --- a/arch/x86/include/asm/irqflags.h
> > +++ b/arch/x86/include/asm/irqflags.h
> > @@ -13,7 +13,7 @@
> > * Interrupt control:
> > */
> >
> > -static inline unsigned long native_save_fl(void)
> > +extern inline unsigned long native_save_fl(void)
>
> This is generating a the compilation warning (that we treat as an error):
> "no previous prototype for 'native_save_fl".
> Fixable by replicating the line with an appended ;
Thanks for the report and sorry for breaking things for you. Just
curious about more information to try to reproduce the issue to make
sure I fix the issue correctly:
* What compiler and compiler version are you using?
* Are you setting any configs or enabling any warning CFLAGS to see this?
* Do you see this warning for other `extern inline` functions? (It
seems like the few other ones in the kernel are for non-x86 archs)
I would have guessed that extern inline functions with gnu_inline
semantics (gnu89 behavior) should not have a previous declaration, but
it probably doesn't hurt to add it.
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists