aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/ksysfs.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-12-07 16:09:52 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-12-07 19:59:37 -0500
commit79cfea0273876d9c438f3227b8f68c8c7ae31583 (patch)
treeb147a1c382fd50ac1ee5113ea851b517bf3405df /kernel/ksysfs.c
parent3e42ec1aa716f10c68294b8492ae3ea684528699 (diff)
rcu: Remove TINY_RCU bloat from pointless boot parameters
The rcu_expedited, rcu_normal, and rcu_normal_after_boot kernel boot parameters are pointless in the case of TINY_RCU because in that case synchronous grace periods, both expedited and normal, are no-ops. However, these three symbols contribute several hundred bytes of bloat. This commit therefore uses CPP directives to avoid compiling this code in TINY_RCU kernels. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/ksysfs.c')
-rw-r--r--kernel/ksysfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index b4e2fa52d8bc..152da4a48867 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -144,6 +144,7 @@ static ssize_t fscaps_show(struct kobject *kobj,
144} 144}
145KERNEL_ATTR_RO(fscaps); 145KERNEL_ATTR_RO(fscaps);
146 146
147#ifndef CONFIG_TINY_RCU
147int rcu_expedited; 148int rcu_expedited;
148static ssize_t rcu_expedited_show(struct kobject *kobj, 149static ssize_t rcu_expedited_show(struct kobject *kobj,
149 struct kobj_attribute *attr, char *buf) 150 struct kobj_attribute *attr, char *buf)
@@ -177,6 +178,7 @@ static ssize_t rcu_normal_store(struct kobject *kobj,
177 return count; 178 return count;
178} 179}
179KERNEL_ATTR_RW(rcu_normal); 180KERNEL_ATTR_RW(rcu_normal);
181#endif /* #ifndef CONFIG_TINY_RCU */
180 182
181/* 183/*
182 * Make /sys/kernel/notes give the raw contents of our kernel .notes section. 184 * Make /sys/kernel/notes give the raw contents of our kernel .notes section.
@@ -219,8 +221,10 @@ static struct attribute * kernel_attrs[] = {
219 &kexec_crash_size_attr.attr, 221 &kexec_crash_size_attr.attr,
220 &vmcoreinfo_attr.attr, 222 &vmcoreinfo_attr.attr,
221#endif 223#endif
224#ifndef CONFIG_TINY_RCU
222 &rcu_expedited_attr.attr, 225 &rcu_expedited_attr.attr,
223 &rcu_normal_attr.attr, 226 &rcu_normal_attr.attr,
227#endif
224 NULL 228 NULL
225}; 229};
226 230