aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.vnet.ibm.com>2018-02-20 07:28:33 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-02-27 02:05:23 -0500
commit320d9555cb9d2f42cf933c7f59468998933f6cc7 (patch)
tree829c10a73a1d891385749fc6d6ef936c35cec5e6
parent3ad6b250130de368066c5d6d7ebfdc328f655118 (diff)
s390: unify linker symbols usage
Common code defines linker symbols which denote sections start/end in a form of char []. Referencing those symbols as _symbol or &_symbol yields the same result, but "_symbol" form is more widespread across newly written code. Convert s390 specific code to this style. Also removes unused _text symbol definition in boot/compressed/misc.c. Signed-off-by: Vasily Gorbik <gor@linux.vnet.ibm.com> Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/boot/compressed/misc.c10
-rw-r--r--arch/s390/kernel/early.c2
-rw-r--r--arch/s390/kernel/setup.c20
-rw-r--r--arch/s390/kernel/suspend.c4
-rw-r--r--arch/s390/mm/dump_pagetables.c4
5 files changed, 20 insertions, 20 deletions
diff --git a/arch/s390/boot/compressed/misc.c b/arch/s390/boot/compressed/misc.c
index cecf38b9ec82..63838a17e56a 100644
--- a/arch/s390/boot/compressed/misc.c
+++ b/arch/s390/boot/compressed/misc.c
@@ -27,8 +27,8 @@
27/* Symbols defined by linker scripts */ 27/* Symbols defined by linker scripts */
28extern char input_data[]; 28extern char input_data[];
29extern int input_len; 29extern int input_len;
30extern char _text, _end; 30extern char _end[];
31extern char _bss, _ebss; 31extern char _bss[], _ebss[];
32 32
33static void error(char *m); 33static void error(char *m);
34 34
@@ -144,7 +144,7 @@ unsigned long decompress_kernel(void)
144{ 144{
145 void *output, *kernel_end; 145 void *output, *kernel_end;
146 146
147 output = (void *) ALIGN((unsigned long) &_end + HEAP_SIZE, PAGE_SIZE); 147 output = (void *) ALIGN((unsigned long) _end + HEAP_SIZE, PAGE_SIZE);
148 kernel_end = output + SZ__bss_start; 148 kernel_end = output + SZ__bss_start;
149 check_ipl_parmblock((void *) 0, (unsigned long) kernel_end); 149 check_ipl_parmblock((void *) 0, (unsigned long) kernel_end);
150 150
@@ -166,8 +166,8 @@ unsigned long decompress_kernel(void)
166 * Clear bss section. free_mem_ptr and free_mem_end_ptr need to be 166 * Clear bss section. free_mem_ptr and free_mem_end_ptr need to be
167 * initialized afterwards since they reside in bss. 167 * initialized afterwards since they reside in bss.
168 */ 168 */
169 memset(&_bss, 0, &_ebss - &_bss); 169 memset(_bss, 0, _ebss - _bss);
170 free_mem_ptr = (unsigned long) &_end; 170 free_mem_ptr = (unsigned long) _end;
171 free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; 171 free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
172 172
173 __decompress(input_data, input_len, NULL, NULL, output, 0, NULL, error); 173 __decompress(input_data, input_len, NULL, NULL, output, 0, NULL, error);
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index ac707a9f729e..53d089fc4501 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -67,7 +67,7 @@ static noinline __init void init_kernel_storage_key(void)
67#if PAGE_DEFAULT_KEY 67#if PAGE_DEFAULT_KEY
68 unsigned long end_pfn, init_pfn; 68 unsigned long end_pfn, init_pfn;
69 69
70 end_pfn = PFN_UP(__pa(&_end)); 70 end_pfn = PFN_UP(__pa(_end));
71 71
72 for (init_pfn = 0 ; init_pfn < end_pfn; init_pfn++) 72 for (init_pfn = 0 ; init_pfn < end_pfn; init_pfn++)
73 page_set_storage_key(init_pfn << PAGE_SHIFT, 73 page_set_storage_key(init_pfn << PAGE_SHIFT,
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index a6a91f01a17a..70ed7c72ab59 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -413,12 +413,12 @@ static void __init setup_resources(void)
413 struct memblock_region *reg; 413 struct memblock_region *reg;
414 int j; 414 int j;
415 415
416 code_resource.start = (unsigned long) &_text; 416 code_resource.start = (unsigned long) _text;
417 code_resource.end = (unsigned long) &_etext - 1; 417 code_resource.end = (unsigned long) _etext - 1;
418 data_resource.start = (unsigned long) &_etext; 418 data_resource.start = (unsigned long) _etext;
419 data_resource.end = (unsigned long) &_edata - 1; 419 data_resource.end = (unsigned long) _edata - 1;
420 bss_resource.start = (unsigned long) &__bss_start; 420 bss_resource.start = (unsigned long) __bss_start;
421 bss_resource.end = (unsigned long) &__bss_stop - 1; 421 bss_resource.end = (unsigned long) __bss_stop - 1;
422 422
423 for_each_memblock(memory, reg) { 423 for_each_memblock(memory, reg) {
424 res = memblock_virt_alloc(sizeof(*res), 8); 424 res = memblock_virt_alloc(sizeof(*res), 8);
@@ -667,7 +667,7 @@ static void __init check_initrd(void)
667 */ 667 */
668static void __init reserve_kernel(void) 668static void __init reserve_kernel(void)
669{ 669{
670 unsigned long start_pfn = PFN_UP(__pa(&_end)); 670 unsigned long start_pfn = PFN_UP(__pa(_end));
671 671
672#ifdef CONFIG_DMA_API_DEBUG 672#ifdef CONFIG_DMA_API_DEBUG
673 /* 673 /*
@@ -888,9 +888,9 @@ void __init setup_arch(char **cmdline_p)
888 888
889 /* Is init_mm really needed? */ 889 /* Is init_mm really needed? */
890 init_mm.start_code = PAGE_OFFSET; 890 init_mm.start_code = PAGE_OFFSET;
891 init_mm.end_code = (unsigned long) &_etext; 891 init_mm.end_code = (unsigned long) _etext;
892 init_mm.end_data = (unsigned long) &_edata; 892 init_mm.end_data = (unsigned long) _edata;
893 init_mm.brk = (unsigned long) &_end; 893 init_mm.brk = (unsigned long) _end;
894 894
895 parse_early_param(); 895 parse_early_param();
896#ifdef CONFIG_CRASH_DUMP 896#ifdef CONFIG_CRASH_DUMP
diff --git a/arch/s390/kernel/suspend.c b/arch/s390/kernel/suspend.c
index ce329c876d8c..75b7b307946e 100644
--- a/arch/s390/kernel/suspend.c
+++ b/arch/s390/kernel/suspend.c
@@ -153,8 +153,8 @@ int pfn_is_nosave(unsigned long pfn)
153{ 153{
154 unsigned long nosave_begin_pfn = PFN_DOWN(__pa(&__nosave_begin)); 154 unsigned long nosave_begin_pfn = PFN_DOWN(__pa(&__nosave_begin));
155 unsigned long nosave_end_pfn = PFN_DOWN(__pa(&__nosave_end)); 155 unsigned long nosave_end_pfn = PFN_DOWN(__pa(&__nosave_end));
156 unsigned long end_rodata_pfn = PFN_DOWN(__pa(&__end_rodata)) - 1; 156 unsigned long end_rodata_pfn = PFN_DOWN(__pa(__end_rodata)) - 1;
157 unsigned long stext_pfn = PFN_DOWN(__pa(&_stext)); 157 unsigned long stext_pfn = PFN_DOWN(__pa(_stext));
158 158
159 /* Always save lowcore pages (LC protection might be enabled). */ 159 /* Always save lowcore pages (LC protection might be enabled). */
160 if (pfn <= LC_PAGES) 160 if (pfn <= LC_PAGES)
diff --git a/arch/s390/mm/dump_pagetables.c b/arch/s390/mm/dump_pagetables.c
index 507f23ba2034..7cdea2ec51e9 100644
--- a/arch/s390/mm/dump_pagetables.c
+++ b/arch/s390/mm/dump_pagetables.c
@@ -24,8 +24,8 @@ enum address_markers_idx {
24 24
25static struct addr_marker address_markers[] = { 25static struct addr_marker address_markers[] = {
26 [IDENTITY_NR] = {0, "Identity Mapping"}, 26 [IDENTITY_NR] = {0, "Identity Mapping"},
27 [KERNEL_START_NR] = {(unsigned long)&_stext, "Kernel Image Start"}, 27 [KERNEL_START_NR] = {(unsigned long)_stext, "Kernel Image Start"},
28 [KERNEL_END_NR] = {(unsigned long)&_end, "Kernel Image End"}, 28 [KERNEL_END_NR] = {(unsigned long)_end, "Kernel Image End"},
29 [VMEMMAP_NR] = {0, "vmemmap Area"}, 29 [VMEMMAP_NR] = {0, "vmemmap Area"},
30 [VMALLOC_NR] = {0, "vmalloc Area"}, 30 [VMALLOC_NR] = {0, "vmalloc Area"},
31 [MODULES_NR] = {0, "Modules Area"}, 31 [MODULES_NR] = {0, "Modules Area"},