hc
2023-11-06 e3e12f52b214121840b44c91de5b3e5af5d3eb84
kernel/kernel/ksysfs.c
....@@ -140,6 +140,15 @@
140140
141141 #endif /* CONFIG_CRASH_CORE */
142142
143
+#if defined(CONFIG_PREEMPT_RT_FULL)
144
+static ssize_t realtime_show(struct kobject *kobj,
145
+ struct kobj_attribute *attr, char *buf)
146
+{
147
+ return sprintf(buf, "%d\n", 1);
148
+}
149
+KERNEL_ATTR_RO(realtime);
150
+#endif
151
+
143152 /* whether file capabilities are enabled */
144153 static ssize_t fscaps_show(struct kobject *kobj,
145154 struct kobj_attribute *attr, char *buf)
....@@ -231,6 +240,9 @@
231240 &rcu_expedited_attr.attr,
232241 &rcu_normal_attr.attr,
233242 #endif
243
+#ifdef CONFIG_PREEMPT_RT_FULL
244
+ &realtime_attr.attr,
245
+#endif
234246 NULL
235247 };
236248