[PATCH 2/7] xen/sched: credit: migrate to new sched_ops
Furkan Caliskan <[email protected]> Mon, 3 Aug 2026 08:06:09 +0300
| Newsgroups | gmane.comp.emulators.xen.devel |
|---|---|
| Message-ID | <[email protected]> |
Declare sched_credit_def as a struct sched_ops instead of a struct scheduler, dropping the .sched_data field, and register it with REGISTER_SCHED_OPS() so it is found through sched_ops_array[] instead of schedulers[]. This moves the credit scheduler onto the new sched_ops registration path. Signed-off-by: Furkan Caliskan <[email protected]> --- xen/common/sched/credit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/common/sched/credit.c b/xen/common/sched/credit.c index 328c802d0c..d8c949af11 100644 --- a/xen/common/sched/credit.c +++ b/xen/common/sched/credit.c @@ -2273,11 +2273,10 @@ csched_deinit(struct scheduler *ops) } } -static const struct scheduler sched_credit_def = { +static const struct sched_ops sched_credit_def = { .name = "SMP Credit Scheduler", .opt_name = "credit", .sched_id = XEN_SCHEDULER_CREDIT, - .sched_data = NULL, .global_init = csched_global_init, @@ -2312,4 +2311,4 @@ static const struct scheduler sched_credit_def = { .move_timers = csched_move_timers, }; -REGISTER_SCHEDULER(sched_credit_def); +REGISTER_SCHED_OPS(sched_credit_def); -- 2.34.1