diff options
author | Vivek Goyal <vgoyal@in.ibm.com> | 2005-06-25 17:58:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:24:51 -0400 |
commit | 625f1c8219d95300ed32e4c67eb62a50ded095ba (patch) | |
tree | 2e303a649604cabc922f2ade67435eaf83bbfa98 /kernel/ksysfs.c | |
parent | cf13f0eaffa31bf6a145c53c589654b11c72ddc7 (diff) |
[PATCH] Kdump: Export crash notes section address through sysfs
o Following patch exports kexec global variable "crash_notes" to user space
through sysfs as kernel attribute in /sys/kernel.
Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/ksysfs.c')
-rw-r--r-- | kernel/ksysfs.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c index 1f064a63f8cf..015fb69ad94d 100644 --- a/kernel/ksysfs.c +++ b/kernel/ksysfs.c | |||
@@ -30,6 +30,16 @@ static ssize_t hotplug_seqnum_show(struct subsystem *subsys, char *page) | |||
30 | KERNEL_ATTR_RO(hotplug_seqnum); | 30 | KERNEL_ATTR_RO(hotplug_seqnum); |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #ifdef CONFIG_KEXEC | ||
34 | #include <asm/kexec.h> | ||
35 | |||
36 | static ssize_t crash_notes_show(struct subsystem *subsys, char *page) | ||
37 | { | ||
38 | return sprintf(page, "%p\n", (void *)crash_notes); | ||
39 | } | ||
40 | KERNEL_ATTR_RO(crash_notes); | ||
41 | #endif | ||
42 | |||
33 | decl_subsys(kernel, NULL, NULL); | 43 | decl_subsys(kernel, NULL, NULL); |
34 | EXPORT_SYMBOL_GPL(kernel_subsys); | 44 | EXPORT_SYMBOL_GPL(kernel_subsys); |
35 | 45 | ||
@@ -37,6 +47,9 @@ static struct attribute * kernel_attrs[] = { | |||
37 | #ifdef CONFIG_HOTPLUG | 47 | #ifdef CONFIG_HOTPLUG |
38 | &hotplug_seqnum_attr.attr, | 48 | &hotplug_seqnum_attr.attr, |
39 | #endif | 49 | #endif |
50 | #ifdef CONFIG_KEXEC | ||
51 | &crash_notes_attr.attr, | ||
52 | #endif | ||
40 | NULL | 53 | NULL |
41 | }; | 54 | }; |
42 | 55 | ||