@@ -701,7 +701,6 @@ a653sched_adjust_global(const struct scheduler *ops,
* The symbol must be visible to the rest of Xen at link time.
*/
static const struct scheduler sched_arinc653_def = {
- .name = "ARINC 653 Scheduler",
.opt_name = "arinc653",
.sched_id = XEN_SCHEDULER_ARINC653,
.sched_data = NULL,
@@ -2262,7 +2262,6 @@ static void csched_tick_resume(const struct scheduler *ops, unsigned int cpu)
}
static const struct scheduler sched_credit_def = {
- .name = "SMP Credit Scheduler",
.opt_name = "credit",
.sched_id = XEN_SCHEDULER_CREDIT,
.sched_data = NULL,
@@ -4076,7 +4076,6 @@ csched2_deinit(struct scheduler *ops)
}
static const struct scheduler sched_credit2_def = {
- .name = "SMP Credit Scheduler rev2",
.opt_name = "credit2",
.sched_id = XEN_SCHEDULER_CREDIT2,
.sched_data = NULL,
@@ -871,7 +871,6 @@ static void null_dump(const struct scheduler *ops)
}
static const struct scheduler sched_null_def = {
- .name = "null Scheduler",
.opt_name = "null",
.sched_id = XEN_SCHEDULER_NULL,
.sched_data = NULL,
@@ -1541,7 +1541,6 @@ static void repl_timer_handler(void *data){
}
static const struct scheduler sched_rtds_def = {
- .name = "SMP RTDS Scheduler",
.opt_name = "rtds",
.sched_id = XEN_SCHEDULER_RTDS,
.sched_data = NULL,
@@ -1729,11 +1729,11 @@ void __init scheduler_init(void)
{
if ( schedulers[i]->global_init && schedulers[i]->global_init() < 0 )
schedulers[i] = NULL;
- else if ( !ops.name && !strcmp(schedulers[i]->opt_name, opt_sched) )
+ else if ( !ops.opt_name && !strcmp(schedulers[i]->opt_name, opt_sched) )
ops = *schedulers[i];
}
- if ( !ops.name )
+ if ( !ops.opt_name )
{
printk("Could not find scheduler: %s\n", opt_sched);
for ( i = 0; i < NUM_SCHEDULERS; i++ )
@@ -1743,15 +1743,15 @@ void __init scheduler_init(void)
ops = *schedulers[i];
break;
}
- BUG_ON(!ops.name);
- printk("Using '%s' (%s)\n", ops.name, ops.opt_name);
+ BUG_ON(!ops.opt_name);
+ printk("Using scheduler (%s)\n", ops.opt_name);
}
if ( cpu_schedule_up(0) )
BUG();
register_cpu_notifier(&cpu_schedule_nfb);
- printk("Using scheduler: %s (%s)\n", ops.name, ops.opt_name);
+ printk("Using scheduler: (%s)\n", ops.opt_name);
if ( SCHED_OP(&ops, init) )
panic("scheduler returned error on init\n");
@@ -1926,7 +1926,7 @@ void schedule_dump(struct cpupool *c)
{
sched = c->sched;
cpus = c->cpu_valid;
- printk("Scheduler: %s (%s)\n", sched->name, sched->opt_name);
+ printk("Scheduler: (%s)\n", sched->opt_name);
SCHED_OP(sched, dump_settings);
}
else
@@ -130,8 +130,7 @@ struct task_slice {
};
struct scheduler {
- char *name; /* full name for this scheduler */
- char *opt_name; /* option name for this scheduler */
+ const char *opt_name; /* option name for this scheduler */
unsigned int sched_id; /* ID for this scheduler */
void *sched_data; /* global data pointer */
'struct scheduler' already has member 'opt_name' and 'sched_id', thus 'name' is a little redundant, so remove it. Signed-off-by: Baodong Chen <chenbaodong@mxnavi.com> --- xen/common/sched_arinc653.c | 1 - xen/common/sched_credit.c | 1 - xen/common/sched_credit2.c | 1 - xen/common/sched_null.c | 1 - xen/common/sched_rt.c | 1 - xen/common/schedule.c | 12 ++++++------ xen/include/xen/sched-if.h | 3 +-- 7 files changed, 7 insertions(+), 13 deletions(-)