]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
powerpc/misc: merge reloc_offset() and add_reloc_offset()
authorChristophe Leroy <christophe.leroy@c-s.fr>
Tue, 17 Apr 2018 11:23:10 +0000 (13:23 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Jun 2018 14:39:17 +0000 (00:39 +1000)
reloc_offset() is the same as add_reloc_offset(0)

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/misc.S

index 2f18fc1368d0a69a2941a678085a301a7bc933f6..0b196cdcd15d46bfa4f79f209a37ff4f79c31554 100644 (file)
 /*
  * Returns (address we are running at) - (address we were linked at)
  * for use before the text and data are mapped to KERNELBASE.
- */
-
-_GLOBAL(reloc_offset)
-       mflr    r0
-       bl      1f
-1:     mflr    r3
-       PPC_LL  r4,(2f-1b)(r3)
-       subf    r3,r4,r3
-       mtlr    r0
-       blr
 
-       .align  3
-2:     PPC_LONG 1b
-
-/*
  * add_reloc_offset(x) returns x + reloc_offset().
  */
+
+_GLOBAL(reloc_offset)
+       li      r3, 0
 _GLOBAL(add_reloc_offset)
        mflr    r0
        bl      1f