Re: [PATCH v5 01/12] x86/paravirt: Move halt paravirt calls under CONFIG_PARAVIRT

From: Juergen Gross
Date: Tue Aug 17 2021 - 09:47:29 EST


On 17.08.21 15:39, Kuppuswamy, Sathyanarayanan wrote:


On 8/17/21 6:28 AM, Juergen Gross wrote:
I guess you have been lucky and all users of arch_safe_halt() and halt()
are directly or indirectly including asm/paravirt.h by other means.

There might be configs where this is not true, though.

In any case I believe you should fix your patch to let asm/irqflags.h
include asm/paravirt.h for the CONFIG_PARAVIRT case.

Ok. I will include it.

#if defined(CONFIG_PARAVIRT) && !defined(CONFIG_PARAVIRT_XXL)
#include <asm/paravirt.h>
#endif


I don't see a reason to have two "#include <asm/paravirt.h>" lines in
one file. Why don't you use:

#ifdef CONFIG_PARAVIRT
#include <asm/paravirt.h>
#else
#ifndef __ASSEMBLY___
...
#endif
#endif

#ifndef CONFIG_PARAVIRT_XXL
...
#endif


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature