public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmytro Maluka <dmaluka@chromium.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
	<x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
	Yue Haibing <yuehaibing@huawei.com>,
	"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/extable: include asm/processor.h for cpu_relax()
Date: Fri, 18 Apr 2025 14:36:02 +0200	[thread overview]
Message-ID: <aAJHMnQPl5iRO5wy@google.com> (raw)
In-Reply-To: <20250418121203.GBaAJBk9bOo7ad1d4L@fat_crate.local>

On Fri, Apr 18, 2025 at 02:12:03PM +0200, Borislav Petkov wrote:
> On Fri, Apr 18, 2025 at 11:57:00AM +0000, Dmytro Maluka wrote:
> > Include asm/processor.h to prevents compilation failures due to implicit
> > declaration of cpu_relax() in ex_handler_msr_mce() when compiling with
> > CONFIG_X86_MCE disabled.
> 
> Builds fine here:
> 
> $ grep X86_MCE .config
> # CONFIG_X86_MCE is not set
> 
> $ make -j...
> ...
> 
>   OBJCOPY arch/x86/boot/setup.bin
>   BUILD   arch/x86/boot/bzImage
> Kernel: arch/x86/boot/bzImage is ready  (#1)
> $

Yeah, I meant precisely: when compiling with CONFIG_X86_MCE disabled and
some code enabled that includes asm/extable.h without prior including
asm/processor.h.

I encountered that with the out-of-tree-yet code [1] (which is a part of
a prototype implementation of pKVM on x86) which includes asm/sections.h
which includes asm/extable.h.

[1] https://github.com/intel-staging/pKVM-IA/blob/pvVMCS-POC-v6.12/arch/x86/kvm/pkvm/smp.c

  reply	other threads:[~2025-04-18 12:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-18 11:57 [PATCH] x86/extable: include asm/processor.h for cpu_relax() Dmytro Maluka
2025-04-18 12:12 ` Borislav Petkov
2025-04-18 12:36   ` Dmytro Maluka [this message]
2025-04-18 12:38     ` Borislav Petkov

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=aAJHMnQPl5iRO5wy@google.com \
    --to=dmaluka@chromium.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yuehaibing@huawei.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