mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen: Put wait.c behind CONFIG_VM_EVENT
wait.c is only used by vm_event.c, so build it when CONFIG_VM_EVENT is selected. Provide stubs of functions called from common code. entry.S needs an ifdef to hide the symbol from the assembly. Also conditionalize .waitqueue_vcpu in struct vcpu to save space. Signed-off-by: Jason Andryuk <jason.andryuk@amd.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
3ff1030ea7
commit
b8f7b62e02
4 files changed
+14
-3
No files matched your search
@@ -664,7 +664,9 @@ FUNC(continue_pv_domain)
|
||||
ALTERNATIVE "", "mov $2, %eax; incsspd %eax", X86_FEATURE_XEN_SHSTK
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VM_EVENT
|
||||
call check_wakeup_from_wait
|
||||
#endif
|
||||
ret_from_intr:
|
||||
GET_CURRENT(bx)
|
||||
testb $3, UREGS_cs(%rsp)
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ obj-y += virtual_region.o
|
||||
obj-$(CONFIG_VM_EVENT) += vm_event.o
|
||||
obj-$(CONFIG_HAS_VMAP) += vmap.o
|
||||
obj-y += vsprintf.o
|
||||
obj-y += wait.o
|
||||
obj-$(CONFIG_VM_EVENT) += wait.o
|
||||
obj-bin-y += warning.init.o
|
||||
obj-y += xmalloc_tlsf.o
|
||||
|
||||
|
||||
@@ -293,7 +293,9 @@ struct vcpu
|
||||
/* Multicall information. */
|
||||
struct mc_state mc_state;
|
||||
|
||||
#ifdef CONFIG_VM_EVENT
|
||||
struct waitqueue_vcpu *waitqueue_vcpu;
|
||||
#endif
|
||||
|
||||
struct evtchn_fifo_vcpu *evtchn_fifo;
|
||||
|
||||
|
||||
@@ -49,11 +49,18 @@ do { \
|
||||
} while (0)
|
||||
|
||||
/* Private functions. */
|
||||
int init_waitqueue_vcpu(struct vcpu *v);
|
||||
void destroy_waitqueue_vcpu(struct vcpu *v);
|
||||
void prepare_to_wait(struct waitqueue_head *wq);
|
||||
void wait(void);
|
||||
void finish_wait(struct waitqueue_head *wq);
|
||||
|
||||
#ifdef CONFIG_VM_EVENT
|
||||
int init_waitqueue_vcpu(struct vcpu *v);
|
||||
void destroy_waitqueue_vcpu(struct vcpu *v);
|
||||
void check_wakeup_from_wait(void);
|
||||
#else
|
||||
static inline int init_waitqueue_vcpu(struct vcpu *v) { return 0; }
|
||||
static inline void destroy_waitqueue_vcpu(struct vcpu *v) {}
|
||||
static inline void check_wakeup_from_wait(void) {}
|
||||
#endif
|
||||
|
||||
#endif /* __XEN_WAIT_H__ */
|
||||