@@ -59,6 +59,18 @@ static ssize_t sched_itmt_enabled_write(struct file *filp,
5959 return result ;
6060}
6161
62+ static int sched_core_priority_show (struct seq_file * s , void * unused )
63+ {
64+ int cpu ;
65+
66+ seq_puts (s , "CPU #\tPriority\n" );
67+ for_each_possible_cpu (cpu )
68+ seq_printf (s , "%d\t%d\n" , cpu , arch_asym_cpu_priority (cpu ));
69+
70+ return 0 ;
71+ }
72+ DEFINE_SHOW_ATTRIBUTE (sched_core_priority );
73+
6274static const struct file_operations dfs_sched_itmt_fops = {
6375 .read = debugfs_read_file_bool ,
6476 .write = sched_itmt_enabled_write ,
@@ -67,6 +79,7 @@ static const struct file_operations dfs_sched_itmt_fops = {
6779};
6880
6981static struct dentry * dfs_sched_itmt ;
82+ static struct dentry * dfs_sched_core_prio ;
7083
7184/**
7285 * sched_set_itmt_support() - Indicate platform supports ITMT
@@ -102,6 +115,14 @@ int sched_set_itmt_support(void)
102115 return - ENOMEM ;
103116 }
104117
118+ dfs_sched_core_prio = debugfs_create_file ("sched_core_priority" , 0644 ,
119+ arch_debugfs_dir , NULL ,
120+ & sched_core_priority_fops );
121+ if (IS_ERR_OR_NULL (dfs_sched_core_prio )) {
122+ dfs_sched_core_prio = NULL ;
123+ return - ENOMEM ;
124+ }
125+
105126 sched_itmt_capable = true;
106127
107128 sysctl_sched_itmt_enabled = 1 ;
@@ -133,6 +154,8 @@ void sched_clear_itmt_support(void)
133154
134155 debugfs_remove (dfs_sched_itmt );
135156 dfs_sched_itmt = NULL ;
157+ debugfs_remove (dfs_sched_core_prio );
158+ dfs_sched_core_prio = NULL ;
136159
137160 if (sysctl_sched_itmt_enabled ) {
138161 /* disable sched_itmt if we are no longer ITMT capable */
0 commit comments