mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu@kernel.org>
To: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Cc: Wei Liu <wei.liu@kernel.org>, Arnd Bergmann <arnd@kernel.org>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Dexuan Cui <decui@microsoft.com>, Long Li <longli@microsoft.com>,
	Stansialv Kinsburskii <skinsburskii@linux.miscrosoft.com>,
	Nuno Das Neves <nunodasneves@linux.microsoft.com>,
	Praveen K Paladugu <prapal@linux.microsoft.com>,
	Easwar Hariharan <easwar.hariharan@linux.microsoft.com>,
	Anatol Belski <anbelski@linux.microsoft.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Sean Christopherson <seanjc@google.com>,
	Naman Jain <namjain@linux.microsoft.com>,
	linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mshv: hide x86-specific functions on arm64
Date: Thu, 18 Dec 2025 19:15:23 +0000	[thread overview]
Message-ID: <20251218191523.GB1749918@liuwe-devbox-debian-v2.local> (raw)
In-Reply-To: <aUH9GGzROHfbP6pj@skinsburskii.localdomain>

On Tue, Dec 16, 2025 at 04:45:12PM -0800, Stanislav Kinsburskii wrote:
> On Tue, Dec 16, 2025 at 10:21:29PM +0000, Wei Liu wrote:
> > On Tue, Dec 16, 2025 at 10:36:12PM +0100, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@arndb.de>
> > > 
> > > The hv_sleep_notifiers_register() and hv_machine_power_off() functions are
> > > only called and declared on x86, but cause a warning on arm64:
> > > 
> > > drivers/hv/mshv_common.c:210:6: error: no previous prototype for 'hv_sleep_notifiers_register' [-Werror=missing-prototypes]
> > >   210 | void hv_sleep_notifiers_register(void)
> > >       |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > drivers/hv/mshv_common.c:224:6: error: no previous prototype for 'hv_machine_power_off' [-Werror=missing-prototypes]
> > >   224 | void hv_machine_power_off(void)
> > >       |      ^~~~~~~~~~~~~~~~~~~~
> > > 
> > > Hide both inside of an #ifdef block.
> > > 
> > > Fixes: f0be2600ac55 ("mshv: Use reboot notifier to configure sleep state")
> > > Fixes: 615a6e7d83f9 ("mshv: Cleanly shutdown root partition with MSHV")
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > 
> > Thanks Arnd. I have a queued up a patch which make available the
> > declarations to arm64. Let me think about whether to use your patch
> > instead.
> > 
> > Anyway, this issue will be fixed one way or the other once I send a PR
> > to Linus.
> > 
> 
> The whole idea of mshv_common.c is to have common code for all archs.
> It would be nice to keep this file as it is.

The path forward is either to move these functions to an x86-specific
file or to make arm64 work the same way. I'm not too sure about the
latter yet given the port is yet to be done. For the time being, I am
going to drop my own patch and take Arnd's patch. We can figure out
which of the two approaches to take later.

Wei


      reply	other threads:[~2025-12-18 19:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-16 21:36 Arnd Bergmann
2025-12-16 22:21 ` Wei Liu
2025-12-17  0:45   ` Stanislav Kinsburskii
2025-12-18 19:15     ` Wei Liu [this message]

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=20251218191523.GB1749918@liuwe-devbox-debian-v2.local \
    --to=wei.liu@kernel.org \
    --cc=anbelski@linux.microsoft.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=decui@microsoft.com \
    --cc=easwar.hariharan@linux.microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=namjain@linux.microsoft.com \
    --cc=nunodasneves@linux.microsoft.com \
    --cc=prapal@linux.microsoft.com \
    --cc=seanjc@google.com \
    --cc=skinsburskii@linux.microsoft.com \
    --cc=skinsburskii@linux.miscrosoft.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

all inboxes | Powered by JetHome®