aboutsummaryrefslogtreecommitdiffstats
path: root/arch/openrisc
diff options
context:
space:
mode:
authorJonas Bonn <jonas@southpole.se>2012-04-10 04:49:13 -0400
committerJonas Bonn <jonas@southpole.se>2012-05-08 05:43:30 -0400
commitb0e026f4dc118752382fa926431b4512a8042e09 (patch)
tree6d2d91a655e9da94dc96c19342ca87421676f9df /arch/openrisc
parent4971f2bdb746e6cc8423ea60f99694884f6052c5 (diff)
openrisc: header file cleanups
elf.h: We can export some of these symbols to userspace. libc needs them and we just as well provide them as asm/elf.h as copying them into separate libc headers. ptrace.h: Having padding in the user_regs_struct isn't of any particular value and just confuses GDB. spr_defs isn't needed in userspace; libc has its own copy anyway. Signed-off-by: Jonas Bonn <jonas@southpole.se>
Diffstat (limited to 'arch/openrisc')
-rw-r--r--arch/openrisc/include/asm/Kbuild3
-rw-r--r--arch/openrisc/include/asm/elf.h12
-rw-r--r--arch/openrisc/include/asm/ptrace.h6
3 files changed, 14 insertions, 7 deletions
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild
index dcea5a0308ae..c936483bc8e2 100644
--- a/arch/openrisc/include/asm/Kbuild
+++ b/arch/openrisc/include/asm/Kbuild
@@ -1,6 +1,7 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3header-y += spr_defs.h 3header-y += elf.h
4header-y += ucontext.h
4 5
5generic-y += atomic.h 6generic-y += atomic.h
6generic-y += auxvec.h 7generic-y += auxvec.h
diff --git a/arch/openrisc/include/asm/elf.h b/arch/openrisc/include/asm/elf.h
index 2ce603bbfdd3..a8fe2c513070 100644
--- a/arch/openrisc/include/asm/elf.h
+++ b/arch/openrisc/include/asm/elf.h
@@ -20,11 +20,17 @@
20#define __ASM_OPENRISC_ELF_H 20#define __ASM_OPENRISC_ELF_H
21 21
22/* 22/*
23 * This files is partially exported to userspace. This allows us to keep
24 * the ELF bits in one place which should assist in keeping the kernel and
25 * userspace in sync.
26 */
27
28/*
23 * ELF register definitions.. 29 * ELF register definitions..
24 */ 30 */
25#include <linux/types.h>
26#include <linux/ptrace.h>
27 31
32/* for struct user_regs_struct definition */
33#include <asm/ptrace.h>
28 34
29/* The OR1K relocation types... not all relevant for module loader */ 35/* The OR1K relocation types... not all relevant for module loader */
30#define R_OR32_NONE 0 36#define R_OR32_NONE 0
@@ -62,6 +68,8 @@ typedef unsigned long elf_fpregset_t;
62 68
63#ifdef __KERNEL__ 69#ifdef __KERNEL__
64 70
71#include <linux/types.h>
72
65/* 73/*
66 * This is used to ensure we don't load something for the wrong architecture. 74 * This is used to ensure we don't load something for the wrong architecture.
67 */ 75 */
diff --git a/arch/openrisc/include/asm/ptrace.h b/arch/openrisc/include/asm/ptrace.h
index 4651a737591d..8555c0c3d4d7 100644
--- a/arch/openrisc/include/asm/ptrace.h
+++ b/arch/openrisc/include/asm/ptrace.h
@@ -19,8 +19,6 @@
19#ifndef __ASM_OPENRISC_PTRACE_H 19#ifndef __ASM_OPENRISC_PTRACE_H
20#define __ASM_OPENRISC_PTRACE_H 20#define __ASM_OPENRISC_PTRACE_H
21 21
22#include <asm/spr_defs.h>
23
24#ifndef __ASSEMBLY__ 22#ifndef __ASSEMBLY__
25/* 23/*
26 * This is the layout of the regset returned by the GETREGSET ptrace call 24 * This is the layout of the regset returned by the GETREGSET ptrace call
@@ -30,13 +28,13 @@ struct user_regs_struct {
30 unsigned long gpr[32]; 28 unsigned long gpr[32];
31 unsigned long pc; 29 unsigned long pc;
32 unsigned long sr; 30 unsigned long sr;
33 unsigned long pad1;
34 unsigned long pad2;
35}; 31};
36#endif 32#endif
37 33
38#ifdef __KERNEL__ 34#ifdef __KERNEL__
39 35
36#include <asm/spr_defs.h>
37
40/* 38/*
41 * Make kernel PTrace/register structures opaque to userspace... userspace can 39 * Make kernel PTrace/register structures opaque to userspace... userspace can
42 * access thread state via the regset mechanism. This allows us a bit of 40 * access thread state via the regset mechanism. This allows us a bit of