arm64: Remove unused __data_loc variable
authorGeoff Levand <geoff@infradead.org>
Sat, 14 Dec 2013 00:20:13 +0000 (00:20 +0000)
committerMark Brown <broonie@linaro.org>
Tue, 20 May 2014 00:01:31 +0000 (01:01 +0100)
The __data_loc variable is an unused left over from the 32 bit arm implementation.
Remove that variable and adjust the __mmap_switched startup routine accordingly.

Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit b22cf637bbaf99d4caf9908997a32f91cdcfae52)
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm64/kernel/head.S
arch/arm64/kernel/vmlinux.lds.S

index bf7efdf2d7e79584af4645992dd010a47f365c21..a0c10594f628be58e8d0e66bb09a818aed7ad303 100644 (file)
@@ -454,8 +454,6 @@ ENDPROC(__create_page_tables)
        .type   __switch_data, %object
 __switch_data:
        .quad   __mmap_switched
-       .quad   __data_loc                      // x4
-       .quad   _data                           // x5
        .quad   __bss_start                     // x6
        .quad   _end                            // x7
        .quad   processor_id                    // x4
@@ -470,15 +468,7 @@ __switch_data:
 __mmap_switched:
        adr     x3, __switch_data + 8
 
-       ldp     x4, x5, [x3], #16
        ldp     x6, x7, [x3], #16
-       cmp     x4, x5                          // Copy data segment if needed
-1:     ccmp    x5, x6, #4, ne
-       b.eq    2f
-       ldr     x16, [x4], #8
-       str     x16, [x5], #8
-       b       1b
-2:
 1:     cmp     x6, x7
        b.hs    2f
        str     xzr, [x6], #8                   // Clear BSS
index af46c8e13737ea70325bf8bf6efc1bda19c0aaf3..18a08e10357f2f2e2529210e78f2cb2f8afd76bc 100644 (file)
@@ -85,11 +85,9 @@ SECTIONS
 
        . = ALIGN(PAGE_SIZE);
        _data = .;
-       __data_loc = _data - LOAD_OFFSET;
        _sdata = .;
        RW_DATA_SECTION(64, PAGE_SIZE, THREAD_SIZE)
        _edata = .;
-       _edata_loc = __data_loc + SIZEOF(.data);
 
        BSS_SECTION(0, 0, 0)
        _end = .;