diff options
Diffstat (limited to 'kernel/ksysfs.c')
-rw-r--r-- | kernel/ksysfs.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c index c01eac66c0cc..6ada93c23a9a 100644 --- a/kernel/ksysfs.c +++ b/kernel/ksysfs.c | |||
@@ -140,6 +140,23 @@ static ssize_t fscaps_show(struct kobject *kobj, | |||
140 | } | 140 | } |
141 | KERNEL_ATTR_RO(fscaps); | 141 | KERNEL_ATTR_RO(fscaps); |
142 | 142 | ||
143 | int rcu_expedited; | ||
144 | static ssize_t rcu_expedited_show(struct kobject *kobj, | ||
145 | struct kobj_attribute *attr, char *buf) | ||
146 | { | ||
147 | return sprintf(buf, "%d\n", rcu_expedited); | ||
148 | } | ||
149 | static ssize_t rcu_expedited_store(struct kobject *kobj, | ||
150 | struct kobj_attribute *attr, | ||
151 | const char *buf, size_t count) | ||
152 | { | ||
153 | if (kstrtoint(buf, 0, &rcu_expedited)) | ||
154 | return -EINVAL; | ||
155 | |||
156 | return count; | ||
157 | } | ||
158 | KERNEL_ATTR_RW(rcu_expedited); | ||
159 | |||
143 | /* | 160 | /* |
144 | * Make /sys/kernel/notes give the raw contents of our kernel .notes section. | 161 | * Make /sys/kernel/notes give the raw contents of our kernel .notes section. |
145 | */ | 162 | */ |
@@ -179,6 +196,7 @@ static struct attribute * kernel_attrs[] = { | |||
179 | &kexec_crash_size_attr.attr, | 196 | &kexec_crash_size_attr.attr, |
180 | &vmcoreinfo_attr.attr, | 197 | &vmcoreinfo_attr.attr, |
181 | #endif | 198 | #endif |
199 | &rcu_expedited_attr.attr, | ||
182 | NULL | 200 | NULL |
183 | }; | 201 | }; |
184 | 202 | ||