]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
tile: normalize global variables exported by vmlinux.lds
authorJiang Liu <liuj97@gmail.com>
Wed, 3 Jul 2013 22:03:39 +0000 (15:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:07:34 +0000 (16:07 -0700)
Normalize global variables exported by vmlinux.lds to conform usage
guidelines from include/asm-generic/sections.h.

1) Use _text to mark the start of the kernel image including the head
text, and _stext to mark the start of the .text section.
2) Export mandatory global variables __init_begin and __init_end.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/tile/include/asm/sections.h
arch/tile/kernel/setup.c
arch/tile/kernel/vmlinux.lds.S
arch/tile/mm/init.c

index d062d463fca9c36f96818c40d65beda8efa09edd..7d8a935a9238a0191b0692a68ec85bcc57a9e3c7 100644 (file)
@@ -34,7 +34,7 @@ extern char __sys_cmpxchg_grab_lock[];
 extern char __start_atomic_asm_code[], __end_atomic_asm_code[];
 #endif
 
-/* Handle the discontiguity between _sdata and _stext. */
+/* Handle the discontiguity between _sdata and _text. */
 static inline int arch_is_kernel_data(unsigned long addr)
 {
        return addr >= (unsigned long)_sdata &&
index 7a5aa1a7864e2371900e5ccba2d2a0f507fa834e..41818e3ce97e671ab49f3cfdf9ca2a86f63b6bce 100644 (file)
@@ -307,8 +307,8 @@ static void __cpuinit store_permanent_mappings(void)
                hv_store_mapping(addr, pages << PAGE_SHIFT, pa);
        }
 
-       hv_store_mapping((HV_VirtAddr)_stext,
-                        (uint32_t)(_einittext - _stext), 0);
+       hv_store_mapping((HV_VirtAddr)_text,
+                        (uint32_t)(_einittext - _text), 0);
 }
 
 /*
index 631f10de12feee423e5c3376f56813cc35fb6053..a13ed902afbbd645c521a7751f5930d76b5c8704 100644 (file)
@@ -27,7 +27,6 @@ SECTIONS
   .intrpt1 (LOAD_OFFSET) : AT ( 0 )   /* put at the start of physical memory */
   {
     _text = .;
-    _stext = .;
     *(.intrpt1)
   } :intrpt1 =0
 
@@ -36,6 +35,7 @@ SECTIONS
 
   /* Now the real code */
   . = ALIGN(0x20000);
+  _stext = .;
   .text : AT (ADDR(.text) - LOAD_OFFSET) {
     HEAD_TEXT
     SCHED_TEXT
@@ -58,11 +58,13 @@ SECTIONS
   #define LOAD_OFFSET PAGE_OFFSET
 
   . = ALIGN(PAGE_SIZE);
+  __init_begin = .;
   VMLINUX_SYMBOL(_sinitdata) = .;
   INIT_DATA_SECTION(16) :data =0
   PERCPU_SECTION(L2_CACHE_BYTES)
   . = ALIGN(PAGE_SIZE);
   VMLINUX_SYMBOL(_einitdata) = .;
+  __init_end = .;
 
   _sdata = .;                   /* Start of data section */
 
index 45ce26d4e474f7ed75793b4a7935552911379273..f2ac2f40577516a0b0d7ef8858e51502135b9b6e 100644 (file)
@@ -562,7 +562,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
                        prot = ktext_set_nocache(prot);
                }
 
-               BUG_ON(address != (unsigned long)_stext);
+               BUG_ON(address != (unsigned long)_text);
                pte = NULL;
                for (; address < (unsigned long)_einittext;
                     pfn++, address += PAGE_SIZE) {