The following function shall be wrapped:
- scheduler_id
Signed-off-by: Penny Zheng <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
---
xen/common/sched/core.c | 2 ++
xen/common/sysctl.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index 9043414290..13fdf57e57 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -2069,11 +2069,13 @@ long do_set_timer_op(s_time_t timeout)
return 0;
}
+#ifdef CONFIG_SYSCTL
/* scheduler_id - fetch ID of current scheduler */
int scheduler_id(void)
{
return operations.sched_id;
}
+#endif
/* Adjust scheduling parameter for a given domain. */
long sched_adjust(struct domain *d, struct xen_domctl_scheduler_op *op)
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index dfc87a2846..c3646517bc 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -72,10 +72,12 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t)
u_sysctl)
ret = tb_control(&op->u.tbuf_op);
break;
+#ifdef CONFIG_SYSCTL
case XEN_SYSCTL_sched_id:
op->u.sched_id.sched_id = scheduler_id();
break;
+#endif /* CONFIG_SYSCTL */
case XEN_SYSCTL_getdomaininfolist:
{
struct domain *d;
--
2.34.1