@@ -59,6 +59,18 @@ static ssize_t sched_itmt_enabled_write(struct file *filp,
59
59
return result ;
60
60
}
61
61
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
+
62
74
static const struct file_operations dfs_sched_itmt_fops = {
63
75
.read = debugfs_read_file_bool ,
64
76
.write = sched_itmt_enabled_write ,
@@ -67,6 +79,7 @@ static const struct file_operations dfs_sched_itmt_fops = {
67
79
};
68
80
69
81
static struct dentry * dfs_sched_itmt ;
82
+ static struct dentry * dfs_sched_core_prio ;
70
83
71
84
/**
72
85
* sched_set_itmt_support() - Indicate platform supports ITMT
@@ -102,6 +115,14 @@ int sched_set_itmt_support(void)
102
115
return - ENOMEM ;
103
116
}
104
117
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
+
105
126
sched_itmt_capable = true;
106
127
107
128
sysctl_sched_itmt_enabled = 1 ;
@@ -133,6 +154,8 @@ void sched_clear_itmt_support(void)
133
154
134
155
debugfs_remove (dfs_sched_itmt );
135
156
dfs_sched_itmt = NULL ;
157
+ debugfs_remove (dfs_sched_core_prio );
158
+ dfs_sched_core_prio = NULL ;
136
159
137
160
if (sysctl_sched_itmt_enabled ) {
138
161
/* disable sched_itmt if we are no longer ITMT capable */
0 commit comments