Go to the documentation of this file.
8 #define KMSG_COMPONENT "os_info"
9 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
12 #include <linux/kernel.h>
13 #include <asm/checksum.h>
66 #ifdef CONFIG_CRASH_DUMP
68 static struct os_info *os_info_old;
73 static void os_info_old_alloc(
int nr,
int align)
76 char *
buf, *buf_align, *
msg;
79 addr = os_info_old->
entry[
nr].addr;
81 msg =
"not available";
84 size = os_info_old->
entry[
nr].size;
96 if (csum != os_info_old->
entry[nr].csum) {
97 msg =
"checksum failed";
100 os_info_old->
entry[
nr].addr = (
u64)(
unsigned long)buf_align;
106 os_info_old->
entry[
nr].addr = 0;
108 pr_info(
"entry %i: %s (addr=0x%lx size=%lu)\n",
109 nr, msg, addr, size);
115 static void os_info_old_init(
void)
128 os_info_old = kzalloc(
sizeof(*os_info_old),
GFP_KERNEL);
141 pr_info(
"crashkernel: addr=0x%lx size=%lu\n",
156 void *os_info_old_entry(
int nr,
unsigned long *size)
162 if (!os_info_old->
entry[nr].addr)
164 *size = (
unsigned long) os_info_old->
entry[nr].size;