[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/mwait-idle: add dependency on general Intel CPU support
commit c4344ecc5a4a9789a75c21a2c9da3d4d76f092dc Author: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx> AuthorDate: Tue Sep 24 10:33:38 2024 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Sep 24 10:33:38 2024 +0200 x86/mwait-idle: add dependency on general Intel CPU support Currently mwait_idle driver in Xen only implements support for Intel CPUs. Thus in order to reduce dead code in non-Intel build configurations it can be made explicitly dependant on CONFIG_INTEL option. Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/cpu/Makefile | 2 +- xen/arch/x86/include/asm/cpuidle.h | 7 +++++++ xen/arch/x86/include/asm/mwait.h | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/cpu/Makefile b/xen/arch/x86/cpu/Makefile index eafce5f204..7cfe28b7ec 100644 --- a/xen/arch/x86/cpu/Makefile +++ b/xen/arch/x86/cpu/Makefile @@ -8,7 +8,7 @@ obj-y += common.o obj-y += hygon.o obj-y += intel.o obj-y += intel_cacheinfo.o -obj-y += mwait-idle.o +obj-$(CONFIG_INTEL) += mwait-idle.o obj-y += shanghai.o obj-y += vpmu.o obj-$(CONFIG_AMD) += vpmu_amd.o diff --git a/xen/arch/x86/include/asm/cpuidle.h b/xen/arch/x86/include/asm/cpuidle.h index 707b3e948d..3a6b73142b 100644 --- a/xen/arch/x86/include/asm/cpuidle.h +++ b/xen/arch/x86/include/asm/cpuidle.h @@ -15,7 +15,14 @@ extern void (*lapic_timer_on)(void); extern uint64_t (*cpuidle_get_tick)(void); +#ifdef CONFIG_INTEL int mwait_idle_init(struct notifier_block *nfb); +#else +static inline int mwait_idle_init(struct notifier_block *nfb) +{ + return -ENODEV; +} +#endif int cpuidle_init_cpu(unsigned int cpu); void cf_check default_dead_idle(void); void cf_check acpi_dead_idle(void); diff --git a/xen/arch/x86/include/asm/mwait.h b/xen/arch/x86/include/asm/mwait.h index 9298f987c4..000a692f6d 100644 --- a/xen/arch/x86/include/asm/mwait.h +++ b/xen/arch/x86/include/asm/mwait.h @@ -14,6 +14,13 @@ #define MWAIT_ECX_INTERRUPT_BREAK 0x1 void mwait_idle_with_hints(unsigned int eax, unsigned int ecx); +#ifdef CONFIG_INTEL bool mwait_pc10_supported(void); +#else +static inline bool mwait_pc10_supported(void) +{ + return false; +} +#endif #endif /* __ASM_X86_MWAIT_H__ */ -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |