summaryrefslogtreecommitdiffstats
path: root/arch/riscv/include
diff options
context:
space:
mode:
authorIngo Molnar2018-07-17 09:27:43 +0200
committerIngo Molnar2018-07-17 09:27:43 +0200
commit52b544bd386688177c41d53e748111c29d0ccc98 (patch)
treec2083582176e773084364af93cc44e0f94b6cde8 /arch/riscv/include
parentlocking/refcount: Always allow checked forms (diff)
parentLinux 4.18-rc5 (diff)
downloadkernel-qcow2-linux-52b544bd386688177c41d53e748111c29d0ccc98.tar.gz
kernel-qcow2-linux-52b544bd386688177c41d53e748111c29d0ccc98.tar.xz
kernel-qcow2-linux-52b544bd386688177c41d53e748111c29d0ccc98.zip
Merge tag 'v4.18-rc5' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r--arch/riscv/include/uapi/asm/elf.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/riscv/include/uapi/asm/elf.h b/arch/riscv/include/uapi/asm/elf.h
index 5cae4c30cd8e..1e0dfc36aab9 100644
--- a/arch/riscv/include/uapi/asm/elf.h
+++ b/arch/riscv/include/uapi/asm/elf.h
@@ -21,8 +21,13 @@ typedef struct user_regs_struct elf_gregset_t;
typedef union __riscv_fp_state elf_fpregset_t;
-#define ELF_RISCV_R_SYM(r_info) ((r_info) >> 32)
-#define ELF_RISCV_R_TYPE(r_info) ((r_info) & 0xffffffff)
+#if __riscv_xlen == 64
+#define ELF_RISCV_R_SYM(r_info) ELF64_R_SYM(r_info)
+#define ELF_RISCV_R_TYPE(r_info) ELF64_R_TYPE(r_info)
+#else
+#define ELF_RISCV_R_SYM(r_info) ELF32_R_SYM(r_info)
+#define ELF_RISCV_R_TYPE(r_info) ELF32_R_TYPE(r_info)
+#endif
/*
* RISC-V relocation types