]> git.dujemihanovic.xyz Git - linux.git/commitdiff
s390/boot: move all linker symbol declarations from c to h files
authorAlexander Egorenkov <egorenar@linux.ibm.com>
Wed, 30 Jun 2021 15:12:25 +0000 (17:12 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 27 Jul 2021 07:39:12 +0000 (09:39 +0200)
To prevent multiple incompatible declarations of symbols and to catch
such mistakes at compile time.

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/boot/boot.h
arch/s390/boot/compressed/decompressor.c
arch/s390/boot/compressed/decompressor.h
arch/s390/boot/pgm_check_info.c
arch/s390/boot/startup.c

index ae04e1c93764cb7bf343c23442909de6061dd5df..937dbdd0ef4350257ddce7b9156e6a61d5d24462 100644 (file)
@@ -8,7 +8,7 @@
 
 #ifndef __ASSEMBLY__
 
-#include <linux/compiler.h>
+#include <asm/extable.h>
 
 void startup_kernel(void);
 unsigned long detect_memory(void);
@@ -22,11 +22,19 @@ void print_pgm_check_info(void);
 unsigned long get_random_base(unsigned long safe_addr);
 void __printf(1, 2) decompressor_printk(const char *fmt, ...);
 
+/* Symbols defined by linker scripts */
 extern const char kernel_version[];
 extern unsigned long memory_limit;
 extern unsigned long vmalloc_size;
 extern int vmalloc_size_set;
 extern int kaslr_enabled;
+extern char __boot_data_start[], __boot_data_end[];
+extern char __boot_data_preserved_start[], __boot_data_preserved_end[];
+extern char _sdma[], _edma[];
+extern char _stext_dma[], _etext_dma[];
+extern struct exception_table_entry _start_dma_ex_table[];
+extern struct exception_table_entry _stop_dma_ex_table[];
+extern char _decompressor_syms_start[], _decompressor_syms_end[];
 
 unsigned long read_ipl_report(unsigned long safe_offset);
 
index 37a4a8d33c6c5b89a301f08015874a2347773c6b..e27c2140d620689eb8270695059f6815b38b981e 100644 (file)
 #define memmove memmove
 #define memzero(s, n) memset((s), 0, (n))
 
-/* Symbols defined by linker scripts */
-extern char _end[];
-extern unsigned char _compressed_start[];
-extern unsigned char _compressed_end[];
-
 #ifdef CONFIG_KERNEL_BZIP2
 #define BOOT_HEAP_SIZE 0x400000
 #elif CONFIG_KERNEL_ZSTD
index 41f0ad97a4db269716569689bdc82546238ff2a4..a59f75c5b04903828ad83165932080931fd2fdc1 100644 (file)
@@ -26,7 +26,12 @@ struct vmlinux_info {
        unsigned long rela_dyn_end;
 };
 
+/* Symbols defined by linker scripts */
+extern char _end[];
+extern unsigned char _compressed_start[];
+extern unsigned char _compressed_end[];
 extern char _vmlinux_info[];
+
 #define vmlinux (*(struct vmlinux_info *)_vmlinux_info)
 
 #endif /* BOOT_COMPRESSED_DECOMPRESSOR_H */
index 3a46abed2549a259aa05e8fc7b15502335c385e9..7126a1b3293deb9c3295a586cf6508bb4c2c9cf1 100644 (file)
@@ -29,7 +29,6 @@ static char *symstart(char *p)
        return p + 1;
 }
 
-extern char _decompressor_syms_start[], _decompressor_syms_end[];
 static noinline char *findsym(unsigned long ip, unsigned short *off, unsigned short *len)
 {
        /* symbol entries are in a form "10000 c4 startup\0" */
index d0cf21641e3a9dd13ecbde5201ae98fb5687f224..793d1599825d3b7f176b44c20b8ec65153b8a96b 100644 (file)
@@ -13,8 +13,6 @@
 #include "compressed/decompressor.h"
 #include "boot.h"
 
-extern char __boot_data_start[], __boot_data_end[];
-extern char __boot_data_preserved_start[], __boot_data_preserved_end[];
 unsigned long __bootdata_preserved(__kaslr_offset);
 unsigned long __bootdata_preserved(VMALLOC_START);
 unsigned long __bootdata_preserved(VMALLOC_END);
@@ -35,10 +33,6 @@ u64 __bootdata_preserved(alt_stfle_fac_list[16]);
  * over to the decompressed / relocated kernel via the .boot.preserved.data
  * section.
  */
-extern char _sdma[], _edma[];
-extern char _stext_dma[], _etext_dma[];
-extern struct exception_table_entry _start_dma_ex_table[];
-extern struct exception_table_entry _stop_dma_ex_table[];
 unsigned long __bootdata_preserved(__sdma) = __pa(&_sdma);
 unsigned long __bootdata_preserved(__edma) = __pa(&_edma);
 unsigned long __bootdata_preserved(__stext_dma) = __pa(&_stext_dma);