diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2017-03-14 13:35:50 -0400 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2017-05-02 05:09:28 -0400 |
commit | 50a1062d61a62421f3181ce3e594a330f8a15cff (patch) | |
tree | f8cd7435d1faf675c739c636c4a7ba19fdbf5af2 | |
parent | 9963236d7c753cf89be2e0366af185e51f150c79 (diff) |
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 <vkuznets@redhat.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
-rw-r--r-- | arch/x86/xen/Kconfig | 2 | ||||
-rw-r--r-- | arch/x86/xen/Makefile | 6 | ||||
-rw-r--r-- | arch/x86/xen/pmu.h | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index 6d15c3439ecd..3bcb091ef298 100644 --- a/arch/x86/xen/Kconfig +++ b/arch/x86/xen/Kconfig | |||
@@ -6,7 +6,6 @@ config XEN | |||
6 | bool "Xen guest support" | 6 | bool "Xen guest support" |
7 | depends on PARAVIRT | 7 | depends on PARAVIRT |
8 | select PARAVIRT_CLOCK | 8 | select PARAVIRT_CLOCK |
9 | select XEN_HAVE_VPMU | ||
10 | depends on X86_64 || (X86_32 && X86_PAE) | 9 | depends on X86_64 || (X86_32 && X86_PAE) |
11 | depends on X86_LOCAL_APIC && X86_TSC | 10 | depends on X86_LOCAL_APIC && X86_TSC |
12 | help | 11 | help |
@@ -19,6 +18,7 @@ config XEN_PV | |||
19 | default y | 18 | default y |
20 | depends on XEN | 19 | depends on XEN |
21 | select XEN_HAVE_PVMMU | 20 | select XEN_HAVE_PVMMU |
21 | select XEN_HAVE_VPMU | ||
22 | help | 22 | help |
23 | Support running as a Xen PV guest. | 23 | Support running as a Xen PV guest. |
24 | 24 | ||
diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index cf8d6c5e36d8..f610651aec4d 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile | |||
@@ -10,13 +10,13 @@ nostackp := $(call cc-option, -fno-stack-protector) | |||
10 | CFLAGS_enlighten_pv.o := $(nostackp) | 10 | CFLAGS_enlighten_pv.o := $(nostackp) |
11 | CFLAGS_mmu_pv.o := $(nostackp) | 11 | CFLAGS_mmu_pv.o := $(nostackp) |
12 | 12 | ||
13 | obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ | 13 | obj-y := enlighten.o multicalls.o mmu.o irq.o \ |
14 | time.o xen-asm.o xen-asm_$(BITS).o \ | 14 | time.o xen-asm.o xen-asm_$(BITS).o \ |
15 | grant-table.o suspend.o platform-pci-unplug.o \ | 15 | 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 |
17 | 17 | ||
18 | obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o suspend_hvm.o | 18 | 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 |
20 | obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o | 20 | obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o |
21 | 21 | ||
22 | obj-$(CONFIG_EVENT_TRACING) += trace.o | 22 | obj-$(CONFIG_EVENT_TRACING) += trace.o |
diff --git a/arch/x86/xen/pmu.h b/arch/x86/xen/pmu.h index af5f0ad94078..4be5355b56f7 100644 --- a/arch/x86/xen/pmu.h +++ b/arch/x86/xen/pmu.h | |||
@@ -4,8 +4,13 @@ | |||
4 | #include <xen/interface/xenpmu.h> | 4 | #include <xen/interface/xenpmu.h> |
5 | 5 | ||
6 | irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id); | 6 | irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id); |
7 | #ifdef CONFIG_XEN_HAVE_VPMU | ||
7 | void xen_pmu_init(int cpu); | 8 | void xen_pmu_init(int cpu); |
8 | void xen_pmu_finish(int cpu); | 9 | 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 | ||
9 | bool is_xen_pmu(int cpu); | 14 | bool is_xen_pmu(int cpu); |
10 | bool pmu_msr_read(unsigned int msr, uint64_t *val, int *err); | 15 | bool pmu_msr_read(unsigned int msr, uint64_t *val, int *err); |
11 | bool pmu_msr_write(unsigned int msr, uint32_t low, uint32_t high, int *err); | 16 | bool pmu_msr_write(unsigned int msr, uint32_t low, uint32_t high, int *err); |