12 #include <linux/string.h>
14 #include <linux/export.h>
16 #include <linux/kexec.h>
18 #include <linux/stat.h>
19 #include <linux/sched.h>
20 #include <linux/capability.h>
22 #define KERNEL_ATTR_RO(_name) \
23 static struct kobj_attribute _name##_attr = __ATTR_RO(_name)
25 #define KERNEL_ATTR_RW(_name) \
26 static struct kobj_attribute _name##_attr = \
27 __ATTR(_name, 0644, _name##_show, _name##_store)
29 #if defined(CONFIG_HOTPLUG)
59 #ifdef CONFIG_PROFILING
67 const char *buf,
size_t count)
78 profile_setup((
char *)buf);
82 ret = create_proc_profile();
112 const char *buf,
size_t count)
121 return ret < 0 ? ret :
count;
128 return sprintf(buf,
"%lx %x\n",
149 #define notes_size (&__stop_notes - &__start_notes)
153 char *buf, loff_t off,
size_t count)
155 memcpy(buf, &__start_notes + off, count);
170 static struct attribute * kernel_attrs[] = {
172 #if defined(CONFIG_HOTPLUG)
173 &uevent_seqnum_attr.attr,
174 &uevent_helper_attr.attr,
176 #ifdef CONFIG_PROFILING
177 &profiling_attr.attr,
180 &kexec_loaded_attr.attr,
181 &kexec_crash_loaded_attr.attr,
182 &kexec_crash_size_attr.attr,
183 &vmcoreinfo_attr.attr,
189 .attrs = kernel_attrs,
192 static int __init ksysfs_init(
void)