1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * This file contains miscellaneous low-level functions.
4 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * Largely rewritten by Cort Dougan (cort@cs.nmt.edu)
9 * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
11 * setjmp/longjmp code by Paul Mackerras.
13 #include <asm/ppc_asm.h>
14 #include <asm/unistd.h>
15 #include <asm/asm-compat.h>
16 #include <asm/asm-offsets.h>
17 #include <asm/export.h>
22 * Returns (address we are running at) - (address we were linked at)
23 * for use before the text and data are mapped to KERNELBASE.
25 * add_reloc_offset(x) returns x + reloc_offset().
30 _GLOBAL(add_reloc_offset)
60 PPC_STL r19,10*SZL(r3)
61 PPC_STL r20,11*SZL(r3)
62 PPC_STL r21,12*SZL(r3)
63 PPC_STL r22,13*SZL(r3)
64 PPC_STL r23,14*SZL(r3)
65 PPC_STL r24,15*SZL(r3)
66 PPC_STL r25,16*SZL(r3)
67 PPC_STL r26,17*SZL(r3)
68 PPC_STL r27,18*SZL(r3)
69 PPC_STL r28,19*SZL(r3)
70 PPC_STL r29,20*SZL(r3)
71 PPC_STL r30,21*SZL(r3)
72 PPC_STL r31,22*SZL(r3)
100 PPC_LL r31,22*SZL(r3)
113 _GLOBAL(current_stack_pointer)
116 EXPORT_SYMBOL(current_stack_pointer)