mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] kdump: export per cpu crash notes pointer through sysfs
- Kexec on panic functionality allocates memory for saving cpu registers in case of system crash event. Address of this allocated memory needs to be exported to user space, which is used by kexec-tools. - Previously, a single /sys/kernel/crash_notes entry was being exported as memory allocated was a single continuous array. Now memory allocation being dyanmic and per cpu based, address of per cpu buffer is exported through "/sys/devices/system/cpu/cpuX/crash_notes" Signed-off-by: Vivek Goyal <[email protected]> Cc: Greg KH <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
cc57165874
commit
51be5606d9
2 changed files with 32 additions and 13 deletions
|
|
@ -51,16 +51,6 @@ static ssize_t uevent_helper_store(struct subsystem *subsys, const char *page, s
|
|||
KERNEL_ATTR_RW(uevent_helper);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KEXEC
|
||||
#include <asm/kexec.h>
|
||||
|
||||
static ssize_t crash_notes_show(struct subsystem *subsys, char *page)
|
||||
{
|
||||
return sprintf(page, "%p\n", (void *)crash_notes);
|
||||
}
|
||||
KERNEL_ATTR_RO(crash_notes);
|
||||
#endif
|
||||
|
||||
decl_subsys(kernel, NULL, NULL);
|
||||
EXPORT_SYMBOL_GPL(kernel_subsys);
|
||||
|
||||
|
|
@ -68,9 +58,6 @@ static struct attribute * kernel_attrs[] = {
|
|||
#ifdef CONFIG_HOTPLUG
|
||||
&uevent_seqnum_attr.attr,
|
||||
&uevent_helper_attr.attr,
|
||||
#endif
|
||||
#ifdef CONFIG_KEXEC
|
||||
&crash_notes_attr.attr,
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue