linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: jdelvare@suse.de
Cc: LKML <linux-kernel@vger.kernel.org>,
	Alistair Strachan <astrachan@google.com>,
	Matthias Kaehlcke <mka@chromium.org>,
	Arnd Bergmann <arnd@arndb.de>,
	hpa@zytor.com, tstellar@redhat.com, sedat.dilek@gmail.com,
	jgross@suse.com, Ingo Molnar <mingo@kernel.org>,
	David.Laight@aculab.com
Subject: Re: native_save_fl() causes a warning
Date: Fri, 3 Aug 2018 09:38:03 -0700	[thread overview]
Message-ID: <CAKwvOdmBtzkca-C1YpB_OYVyqFFi3P_Q8DJPaKr96DFZF0e6Hg@mail.gmail.com> (raw)
In-Reply-To: <20180803151035.238a19d2@endymion>

On Fri, Aug 3, 2018 at 6:10 AM Jean Delvare <jdelvare@suse.de> wrote:
>
> Hi Nick,
>
> It seems that this linux kernel commit of yours:
>
> commit d0a8d9378d16eb3c69bd8e6d23779fbdbee3a8c7
> Author: Nick Desaulniers
> Date:   Thu Jun 21 09:23:24 2018 -0700
>
>     x86/paravirt: Make native_save_fl() extern inline
>
> introduced a new warning (with W=1):
>
> ./arch/x86/include/asm/irqflags.h:16:29: warning: no previous prototype for ‘native_save_fl’ [-Wmissing-prototypes]
>  extern inline unsigned long native_save_fl(void)
>                              ^
>
> Please fix it.

Hi Jean, thanks for the report.  David Laight also reported this
warning; he tested a patch I sent him overnight.

Let me guess, you're using a version of GCC < 4.9?  It seems that GCC
< 4.9 will produce that warning for extern inline functions without
previous declarations.

I'll add your Reported-By tag to the patch that I will send out in a
few minutes.

> Secondly, I am quite curious why you changed only native_save_fl() from
> static inline to extern inline, when native_restore_fl(),
> native_irq_disable() and native_irq_enable() are equally referenced by
> address in arch/x86/kernel/paravirt.c and thus should suffer from the
> same problem. Can you explain?

This is a good point.  With native_save_fl, we were not able to boot
the kernel at all.  Maybe this was called from the boot sequence
(maybe Juergen knows more)?  It seems that the other functions aren't
preventing us from booting, but maybe exercising other paths in
paravirt would expose such an issue?  Or maybe paravirt doesn't have
the same calling convention requirements for those functions?

Is there a standard testing procedure for paravirt? I'd be happy to
try it to see if we can expose more things that should have the same
cleanup.
-- 
Thanks,
~Nick Desaulniers

  reply	other threads:[~2018-08-03 16:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03 13:10 native_save_fl() causes a warning Jean Delvare
2018-08-03 16:38 ` Nick Desaulniers [this message]
2018-08-03 17:05   ` [PATCH] x86/irqflags: provide a declaration for native_save_fl Nick Desaulniers
2018-08-05 20:33     ` [tip:x86/urgent] x86/irqflags: Provide " tip-bot for Nick Desaulniers
2018-08-06 21:33       ` Nick Desaulniers
2018-08-07  7:29         ` Thomas Gleixner
2018-08-07 16:46           ` Nick Desaulniers
2018-08-07 16:57             ` Thomas Gleixner
2018-08-06 10:25     ` [PATCH] x86/irqflags: provide " David Laight
2018-08-06 10:38       ` Sedat Dilek
2018-08-03 17:49   ` native_save_fl() causes a warning Alistair Strachan

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=CAKwvOdmBtzkca-C1YpB_OYVyqFFi3P_Q8DJPaKr96DFZF0e6Hg@mail.gmail.com \
    --to=ndesaulniers@google.com \
    --cc=David.Laight@aculab.com \
    --cc=arnd@arndb.de \
    --cc=astrachan@google.com \
    --cc=hpa@zytor.com \
    --cc=jdelvare@suse.de \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mka@chromium.org \
    --cc=sedat.dilek@gmail.com \
    --cc=tstellar@redhat.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).