diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2021-08-11 10:51:00 +0200 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2021-08-24 17:09:01 -0500 |
commit | 33709413014cd5b8e54d4d9efa07a30ba028e1db (patch) | |
tree | cb83aefd99af102d0a14def9507b21e78f381e09 /include/linux/crash_dump.h | |
parent | 0b3813014c865a74b6322a4512de6610abf999b6 (diff) | |
download | linux-33709413014cd5b8e54d4d9efa07a30ba028e1db.tar.gz linux-33709413014cd5b8e54d4d9efa07a30ba028e1db.tar.bz2 linux-33709413014cd5b8e54d4d9efa07a30ba028e1db.zip |
crash_dump: Make elfcorehdr address/size symbols always visible
Make the forward declarations of elfcorehdr_addr and elfcorehdr_size,
and the definitions of ELFCORE_ADDR_MAX and ELFCORE_ADDR_ERR always
available, like is done for phys_initrd_start and phys_initrd_size.
Code referring to these symbols can then just check for
IS_ENABLED(CONFIG_CRASH_DUMP), instead of requiring conditional
compilation using an #ifdef, thus preparing to increase compile
coverage.
Suggested-by: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/ba965ca613c0cc82c1ec2fe353ee34fb13b36474.1628670468.git.geert+renesas@glider.be
Diffstat (limited to 'include/linux/crash_dump.h')
-rw-r--r-- | include/linux/crash_dump.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index a5192b718dbe..2618577a4d6d 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h @@ -10,13 +10,14 @@ #include <linux/pgtable.h> /* for pgprot_t */ -#ifdef CONFIG_CRASH_DUMP +/* For IS_ENABLED(CONFIG_CRASH_DUMP) */ #define ELFCORE_ADDR_MAX (-1ULL) #define ELFCORE_ADDR_ERR (-2ULL) extern unsigned long long elfcorehdr_addr; extern unsigned long long elfcorehdr_size; +#ifdef CONFIG_CRASH_DUMP extern int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size); extern void elfcorehdr_free(unsigned long long addr); extern ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos); |