| .. | .. |
|---|
| 1 | | -// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
|---|
| 2 | 2 | // Copyright (C) 2005-2017 Andes Technology Corporation |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | #ifndef __ASMNDS32_ELF_H |
|---|
| .. | .. |
|---|
| 9 | 9 | */ |
|---|
| 10 | 10 | |
|---|
| 11 | 11 | #include <asm/ptrace.h> |
|---|
| 12 | +#include <asm/fpu.h> |
|---|
| 13 | +#include <linux/elf-em.h> |
|---|
| 12 | 14 | |
|---|
| 13 | 15 | typedef unsigned long elf_greg_t; |
|---|
| 14 | 16 | typedef unsigned long elf_freg_t[3]; |
|---|
| 15 | 17 | |
|---|
| 16 | 18 | extern unsigned int elf_hwcap; |
|---|
| 17 | | - |
|---|
| 18 | | -#define EM_NDS32 167 |
|---|
| 19 | 19 | |
|---|
| 20 | 20 | #define R_NDS32_NONE 0 |
|---|
| 21 | 21 | #define R_NDS32_16_RELA 19 |
|---|
| .. | .. |
|---|
| 159 | 159 | |
|---|
| 160 | 160 | #endif |
|---|
| 161 | 161 | |
|---|
| 162 | + |
|---|
| 163 | +#if IS_ENABLED(CONFIG_FPU) |
|---|
| 164 | +#define FPU_AUX_ENT NEW_AUX_ENT(AT_FPUCW, FPCSR_INIT) |
|---|
| 165 | +#else |
|---|
| 166 | +#define FPU_AUX_ENT NEW_AUX_ENT(AT_IGNORE, 0) |
|---|
| 167 | +#endif |
|---|
| 168 | + |
|---|
| 162 | 169 | #define ARCH_DLINFO \ |
|---|
| 163 | 170 | do { \ |
|---|
| 171 | + /* Optional FPU initialization */ \ |
|---|
| 172 | + FPU_AUX_ENT; \ |
|---|
| 173 | + \ |
|---|
| 164 | 174 | NEW_AUX_ENT(AT_SYSINFO_EHDR, \ |
|---|
| 165 | 175 | (elf_addr_t)current->mm->context.vdso); \ |
|---|
| 166 | 176 | } while (0) |
|---|