x86/vpmu: separate amd/intel vPMU code

Build AMD vPMU when CONFIG_AMD is on, and Intel vPMU when CONFIG_INTEL
is on respectively, allowing for a plaftorm-specific build.

No functional change intended.

Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Sergiy Kibrik authored and Jan Beulich committed 2024-05-16 13:34:54 +02:00
1 parent 6628bacc81
commit a3ec23a940
2 files changed
+7 -1

No files matched your search

+3 -1
View File
@@ -10,4 +10,6 @@ obj-y += intel.o
obj-y += intel_cacheinfo.o
obj-y += mwait-idle.o
obj-y += shanghai.o
obj-y += vpmu.o vpmu_amd.o vpmu_intel.o
obj-y += vpmu.o
obj-$(CONFIG_AMD) += vpmu_amd.o
obj-$(CONFIG_INTEL) += vpmu_intel.o
+4
View File
@@ -827,6 +827,7 @@ static int __init cf_check vpmu_init(void)
switch ( vendor )
{
#ifdef CONFIG_AMD
case X86_VENDOR_AMD:
ops = amd_vpmu_init();
break;
@@ -834,10 +835,13 @@ static int __init cf_check vpmu_init(void)
case X86_VENDOR_HYGON:
ops = hygon_vpmu_init();
break;
#endif
#ifdef CONFIG_INTEL
case X86_VENDOR_INTEL:
ops = core2_vpmu_init();
break;
#endif
default:
printk(XENLOG_WARNING "VPMU: Unknown CPU vendor: %d. "
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.