blob: 31f4d00b53526d8b5069c7361342984b89fc71d7 [file] [log] [blame]
Andrew Geissler635e0e42020-08-21 15:58:33 -05001From c5fec6d6368b4103557deb710150119dca438544 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 5 Aug 2020 10:46:39 -0700
4Subject: [PATCH] kexec: Fix build with -fno-common
5
6Ensure that my_debug is not doubly defined
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 kexec/arch/ppc64/kexec-elf-ppc64.c | 2 --
12 kexec/fs2dt.h | 2 +-
13 2 files changed, 1 insertion(+), 3 deletions(-)
14
15--- a/kexec/arch/ppc64/kexec-elf-ppc64.c
16+++ b/kexec/arch/ppc64/kexec-elf-ppc64.c
17@@ -44,8 +44,6 @@
18 uint64_t initrd_base, initrd_size;
19 unsigned char reuse_initrd = 0;
20 const char *ramdisk;
21-/* Used for enabling printing message from purgatory code */
22-int my_debug = 0;
23
24 int elf_ppc64_probe(const char *buf, off_t len)
25 {
26--- a/kexec/fs2dt.h
27+++ b/kexec/fs2dt.h
28@@ -30,7 +30,7 @@ extern struct bootblock bb[1];
29
30 /* Used for enabling printing message from purgatory code
31 * Only has implemented for PPC64 */
32-int my_debug;
33+extern int my_debug;
34 extern int dt_no_old_root;
35
36 void reserve(unsigned long long where, unsigned long long length);
37--- a/kexec/arch/arm64/kexec-arm64.h
38+++ b/kexec/arch/arm64/kexec-arm64.h
39@@ -50,8 +50,8 @@ int zImage_arm64_load(int argc, char **a
40 void zImage_arm64_usage(void);
41
42
43-off_t initrd_base;
44-off_t initrd_size;
45+extern off_t initrd_base;
46+extern off_t initrd_size;
47
48 /**
49 * struct arm64_mem - Memory layout info.
50@@ -65,7 +65,7 @@ struct arm64_mem {
51 };
52
53 #define arm64_mem_ngv UINT64_MAX
54-struct arm64_mem arm64_mem;
55+extern struct arm64_mem arm64_mem;
56
57 uint64_t get_phys_offset(void);
58 uint64_t get_vp_offset(void);
59--- a/kexec/arch/x86_64/kexec-bzImage64.c
60+++ b/kexec/arch/x86_64/kexec-bzImage64.c
61@@ -42,7 +42,6 @@
62 #include <arch/options.h>
63
64 static const int probe_debug = 0;
65-int bzImage_support_efi_boot;
66
67 int bzImage64_probe(const char *buf, off_t len)
68 {
Andrew Geisslerc9f78652020-09-18 14:11:35 -050069--- a/kexec/arch/ppc/kexec-elf-ppc.c
70+++ b/kexec/arch/ppc/kexec-elf-ppc.c
71@@ -33,7 +33,6 @@
72 static const int probe_debug = 0;
73
74 unsigned char reuse_initrd;
75-const char *ramdisk;
76 int create_flatten_tree(struct kexec_info *, unsigned char **, unsigned long *,
77 char *);
78