summaryrefslogtreecommitdiff
path: root/arch/hexagon/include/asm/elf.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-01 07:43:05 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-01 07:43:05 -0700
commitd70b1e06eb331afe1576ac23bb9523708026ba1f (patch)
treea6e430d45f8f7f37285369dcfd863a0358080c83 /arch/hexagon/include/asm/elf.h
parentb0b885657b6c8ef63a46bc9299b2a7715d19acde (diff)
parent426d29ccb2a8d44c18d3167327ee82b38287e7bf (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel
Pull Hexagon fixes from Richard Kuo: "Changes for the Hexagon architecture (and one touching OpenRISC). They include various fixes to make use of additional arch features and cleanups. The largest functional change is a cleanup of the signal and event return paths" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel: (32 commits) Hexagon: add v4 CS regs to core copyout macro Hexagon: use correct translation for VMALLOC_START Hexagon: use correct translations for DMA mappings Hexagon: fix return value for notify_resume case in do_work_pending Hexagon: fix signal number for user mem faults Hexagon: remove two Kconfig entries arch: remove CONFIG_GENERIC_FIND_NEXT_BIT again Hexagon: update copyright dates Hexagon: add translation types for __vmnewmap Hexagon: fix signal.c compile error Hexagon: break up user fn/arg register setting Hexagon: use generic sys_fork, sys_vfork, and sys_clone Hexagon: fix psp/sp macro Hexagon: fix up int enable/disable at ret_from_fork Hexagon: add IOMEM and _relaxed IO macros Hexagon: switch to using the device type for IO mappings Hexagon: don't print info for offline CPU's Hexagon: add support for single-stepping (v4+) Hexagon: use correct work mask when checking for more work Hexagon: add support for additional exceptions ...
Diffstat (limited to 'arch/hexagon/include/asm/elf.h')
-rw-r--r--arch/hexagon/include/asm/elf.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h
index 1f14e082588e..e1b933a0e121 100644
--- a/arch/hexagon/include/asm/elf.h
+++ b/arch/hexagon/include/asm/elf.h
@@ -1,7 +1,7 @@
/*
* ELF definitions for the Hexagon architecture
*
- * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -104,6 +104,16 @@ typedef unsigned long elf_fpregset_t;
* Bypass the whole "regsets" thing for now and use the define.
*/
+#if CONFIG_HEXAGON_ARCH_VERSION >= 4
+#define CS_COPYREGS(DEST,REGS) \
+do {\
+ DEST.cs0 = REGS->cs0;\
+ DEST.cs1 = REGS->cs1;\
+} while (0)
+#else
+#define CS_COPYREGS(DEST,REGS)
+#endif
+
#define ELF_CORE_COPY_REGS(DEST, REGS) \
do { \
DEST.r0 = REGS->r00; \
@@ -148,13 +158,12 @@ do { \
DEST.p3_0 = REGS->preds; \
DEST.gp = REGS->gp; \
DEST.ugp = REGS->ugp; \
- DEST.pc = pt_elr(REGS); \
+ CS_COPYREGS(DEST,REGS); \
+ DEST.pc = pt_elr(REGS); \
DEST.cause = pt_cause(REGS); \
DEST.badva = pt_badva(REGS); \
} while (0);
-
-
/*
* This is used to ensure we don't load something for the wrong architecture.
* Checks the machine and ABI type.
@@ -168,15 +177,15 @@ do { \
#define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_HEXAGON
-#ifdef CONFIG_HEXAGON_ARCH_V2
+#if CONFIG_HEXAGON_ARCH_VERSION == 2
#define ELF_CORE_EFLAGS 0x1
#endif
-#ifdef CONFIG_HEXAGON_ARCH_V3
+#if CONFIG_HEXAGON_ARCH_VERSION == 3
#define ELF_CORE_EFLAGS 0x2
#endif
-#ifdef CONFIG_HEXAGON_ARCH_V4
+#if CONFIG_HEXAGON_ARCH_VERSION == 4
#define ELF_CORE_EFLAGS 0x3
#endif