summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-08-05 09:42:37 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-08-08 14:47:58 +0200
commit6c55f61844427d7017ffa333812097e2020d5371 (patch)
treeb864348a01db112fdd993ec309c532f4fc190468 /arch/mips
parentaf31a14d1c455783adba9436a25bb1e94b9b4089 (diff)
downloadbarebox-6c55f61844427d7017ffa333812097e2020d5371.tar.gz
barebox-6c55f61844427d7017ffa333812097e2020d5371.tar.xz
MIPS: asm: add get_runtime_offset stub
MIPS' relocation setup differs from ARM and RISC-V, but as it always happen within assembly, we can assume C code to always be relocated, which allows a trivial implementation of get_runtime_offset(). Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220805074237.1148255-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/reloc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/mips/include/asm/reloc.h b/arch/mips/include/asm/reloc.h
new file mode 100644
index 0000000000..adffd6f1c7
--- /dev/null
+++ b/arch/mips/include/asm/reloc.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef _ASM_RELOC_H_
+#define _ASM_RELOC_H_
+
+static inline unsigned long get_runtime_offset(void)
+{
+ /* On MIPS, we always relocate before jumping into C */
+ return 0;
+}
+
+#include <asm-generic/reloc.h>
+
+#endif