On Wed Mar 12, 2025 at 4:06 AM GMT, Penny Zheng wrote: > The following function shall be wrapped: > - scheduler_id > > Signed-off-by: Penny Zheng <penny.zh...@amd.com> > --- > xen/common/sched/core.c | 2 ++ > xen/include/xen/sched.h | 7 +++++++ > 2 files changed, 9 insertions(+) > > diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c > index d6296d99fd..ea452d8b3e 100644 > --- a/xen/common/sched/core.c > +++ b/xen/common/sched/core.c > @@ -2052,11 +2052,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/include/xen/sched.h b/xen/include/xen/sched.h > index 559d201e0c..9bdeb85aa4 100644 > --- a/xen/include/xen/sched.h > +++ b/xen/include/xen/sched.h > @@ -849,7 +849,14 @@ int sched_init_domain(struct domain *d, unsigned int > poolid); > void sched_destroy_domain(struct domain *d); > long sched_adjust(struct domain *d, struct xen_domctl_scheduler_op *op); > long sched_adjust_global(struct xen_sysctl_scheduler_op *op); > +#ifdef CONFIG_SYSCTL > int scheduler_id(void); > +#else > +static inline int scheduler_id(void) > +{ > + return -EOPNOTSUPP; > +}
Is this ever used when sysctl.c is compiled out? > +#endif > > /* > * sched_get_id_by_name - retrieves a scheduler id given a scheduler name Cheers, Alejandro