Skip to content

Commit 50a1062

Browse files
vittyvkjgross1
authored andcommitted
x86/xen: put setup.c, pmu.c and apic.c under CONFIG_XEN_PV
xen_pmu_init/finish() functions are used in suspend.c and enlighten.c, add stubs for now. Signed-off-by: Vitaly Kuznetsov <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Signed-off-by: Juergen Gross <[email protected]>
1 parent 9963236 commit 50a1062

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

arch/x86/xen/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ config XEN
66
bool "Xen guest support"
77
depends on PARAVIRT
88
select PARAVIRT_CLOCK
9-
select XEN_HAVE_VPMU
109
depends on X86_64 || (X86_32 && X86_PAE)
1110
depends on X86_LOCAL_APIC && X86_TSC
1211
help
@@ -19,6 +18,7 @@ config XEN_PV
1918
default y
2019
depends on XEN
2120
select XEN_HAVE_PVMMU
21+
select XEN_HAVE_VPMU
2222
help
2323
Support running as a Xen PV guest.
2424

arch/x86/xen/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ nostackp := $(call cc-option, -fno-stack-protector)
1010
CFLAGS_enlighten_pv.o := $(nostackp)
1111
CFLAGS_mmu_pv.o := $(nostackp)
1212

13-
obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \
13+
obj-y := enlighten.o multicalls.o mmu.o irq.o \
1414
time.o xen-asm.o xen-asm_$(BITS).o \
1515
grant-table.o suspend.o platform-pci-unplug.o \
16-
p2m.o apic.o pmu.o enlighten_pv.o mmu_pv.o
16+
p2m.o enlighten_pv.o mmu_pv.o
1717

1818
obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o suspend_hvm.o
19-
obj-$(CONFIG_XEN_PV) += suspend_pv.o
19+
obj-$(CONFIG_XEN_PV) += setup.o apic.o pmu.o suspend_pv.o
2020
obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o
2121

2222
obj-$(CONFIG_EVENT_TRACING) += trace.o

arch/x86/xen/pmu.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44
#include <xen/interface/xenpmu.h>
55

66
irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id);
7+
#ifdef CONFIG_XEN_HAVE_VPMU
78
void xen_pmu_init(int cpu);
89
void xen_pmu_finish(int cpu);
10+
#else
11+
static inline void xen_pmu_init(int cpu) {}
12+
static inline void xen_pmu_finish(int cpu) {}
13+
#endif
914
bool is_xen_pmu(int cpu);
1015
bool pmu_msr_read(unsigned int msr, uint64_t *val, int *err);
1116
bool pmu_msr_write(unsigned int msr, uint32_t low, uint32_t high, int *err);

0 commit comments

Comments
 (0)