aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-08-23 17:28:20 -0400
committerH. Peter Anvin <hpa@zytor.com>2008-10-23 01:55:22 -0400
commitaa7bd942498512d6b77d1d0da846a8ecdd5d6186 (patch)
tree9a420b59a1e862ea47a4c5f89601ffbdf3366922 /arch/um/include
parent4198426af37e7122f2fda2538fa9dcaa19c5e397 (diff)
x86, um: get rid of header symlinks
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/um/include')
-rw-r--r--arch/um/include/asm/archparam-i386.h26
-rw-r--r--arch/um/include/asm/archparam-ppc.h8
-rw-r--r--arch/um/include/asm/archparam-x86_64.h26
-rw-r--r--arch/um/include/asm/elf-i386.h163
-rw-r--r--arch/um/include/asm/elf-ppc.h53
-rw-r--r--arch/um/include/asm/elf-x86_64.h119
-rw-r--r--arch/um/include/asm/module-i386.h13
-rw-r--r--arch/um/include/asm/module-x86_64.h30
-rw-r--r--arch/um/include/asm/processor-i386.h78
-rw-r--r--arch/um/include/asm/processor-ppc.h15
-rw-r--r--arch/um/include/asm/processor-x86_64.h56
-rw-r--r--arch/um/include/asm/ptrace-i386.h56
-rw-r--r--arch/um/include/asm/ptrace-x86_64.h72
13 files changed, 0 insertions, 715 deletions
diff --git a/arch/um/include/asm/archparam-i386.h b/arch/um/include/asm/archparam-i386.h
deleted file mode 100644
index 93fd723344e5..000000000000
--- a/arch/um/include/asm/archparam-i386.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_ARCHPARAM_I386_H
7#define __UM_ARCHPARAM_I386_H
8
9#ifdef CONFIG_X86_PAE
10#define LAST_PKMAP 512
11#else
12#define LAST_PKMAP 1024
13#endif
14
15#endif
16
17/*
18 * Overrides for Emacs so that we follow Linus's tabbing style.
19 * Emacs will notice this stuff at the end of the file and automatically
20 * adjust the settings for this buffer only. This must remain at the end
21 * of the file.
22 * ---------------------------------------------------------------------------
23 * Local variables:
24 * c-file-style: "linux"
25 * End:
26 */
diff --git a/arch/um/include/asm/archparam-ppc.h b/arch/um/include/asm/archparam-ppc.h
deleted file mode 100644
index 4269d8a37b4f..000000000000
--- a/arch/um/include/asm/archparam-ppc.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef __UM_ARCHPARAM_PPC_H
2#define __UM_ARCHPARAM_PPC_H
3
4/********* Bits for asm-um/string.h **********/
5
6#define __HAVE_ARCH_STRRCHR
7
8#endif
diff --git a/arch/um/include/asm/archparam-x86_64.h b/arch/um/include/asm/archparam-x86_64.h
deleted file mode 100644
index 270ed9586b68..000000000000
--- a/arch/um/include/asm/archparam-x86_64.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#ifndef __UM_ARCHPARAM_X86_64_H
8#define __UM_ARCHPARAM_X86_64_H
9
10
11/* No user-accessible fixmap addresses, i.e. vsyscall */
12#define FIXADDR_USER_START 0
13#define FIXADDR_USER_END 0
14
15#endif
16
17/*
18 * Overrides for Emacs so that we follow Linus's tabbing style.
19 * Emacs will notice this stuff at the end of the file and automatically
20 * adjust the settings for this buffer only. This must remain at the end
21 * of the file.
22 * ---------------------------------------------------------------------------
23 * Local variables:
24 * c-file-style: "linux"
25 * End:
26 */
diff --git a/arch/um/include/asm/elf-i386.h b/arch/um/include/asm/elf-i386.h
deleted file mode 100644
index d0da9d7c5371..000000000000
--- a/arch/um/include/asm/elf-i386.h
+++ /dev/null
@@ -1,163 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
5#ifndef __UM_ELF_I386_H
6#define __UM_ELF_I386_H
7
8#include <asm/user.h>
9#include "skas.h"
10
11#define R_386_NONE 0
12#define R_386_32 1
13#define R_386_PC32 2
14#define R_386_GOT32 3
15#define R_386_PLT32 4
16#define R_386_COPY 5
17#define R_386_GLOB_DAT 6
18#define R_386_JMP_SLOT 7
19#define R_386_RELATIVE 8
20#define R_386_GOTOFF 9
21#define R_386_GOTPC 10
22#define R_386_NUM 11
23
24typedef unsigned long elf_greg_t;
25
26#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
27typedef elf_greg_t elf_gregset_t[ELF_NGREG];
28
29typedef struct user_i387_struct elf_fpregset_t;
30
31/*
32 * This is used to ensure we don't load something for the wrong architecture.
33 */
34#define elf_check_arch(x) \
35 (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486))
36
37#define ELF_CLASS ELFCLASS32
38#define ELF_DATA ELFDATA2LSB
39#define ELF_ARCH EM_386
40
41#define ELF_PLAT_INIT(regs, load_addr) do { \
42 PT_REGS_EBX(regs) = 0; \
43 PT_REGS_ECX(regs) = 0; \
44 PT_REGS_EDX(regs) = 0; \
45 PT_REGS_ESI(regs) = 0; \
46 PT_REGS_EDI(regs) = 0; \
47 PT_REGS_EBP(regs) = 0; \
48 PT_REGS_EAX(regs) = 0; \
49} while (0)
50
51#define USE_ELF_CORE_DUMP
52#define ELF_EXEC_PAGESIZE 4096
53
54#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
55
56/* Shamelessly stolen from include/asm-i386/elf.h */
57
58#define ELF_CORE_COPY_REGS(pr_reg, regs) do { \
59 pr_reg[0] = PT_REGS_EBX(regs); \
60 pr_reg[1] = PT_REGS_ECX(regs); \
61 pr_reg[2] = PT_REGS_EDX(regs); \
62 pr_reg[3] = PT_REGS_ESI(regs); \
63 pr_reg[4] = PT_REGS_EDI(regs); \
64 pr_reg[5] = PT_REGS_EBP(regs); \
65 pr_reg[6] = PT_REGS_EAX(regs); \
66 pr_reg[7] = PT_REGS_DS(regs); \
67 pr_reg[8] = PT_REGS_ES(regs); \
68 /* fake once used fs and gs selectors? */ \
69 pr_reg[9] = PT_REGS_DS(regs); \
70 pr_reg[10] = PT_REGS_DS(regs); \
71 pr_reg[11] = PT_REGS_SYSCALL_NR(regs); \
72 pr_reg[12] = PT_REGS_IP(regs); \
73 pr_reg[13] = PT_REGS_CS(regs); \
74 pr_reg[14] = PT_REGS_EFLAGS(regs); \
75 pr_reg[15] = PT_REGS_SP(regs); \
76 pr_reg[16] = PT_REGS_SS(regs); \
77} while (0);
78
79extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu);
80
81#define ELF_CORE_COPY_FPREGS(t, fpu) elf_core_copy_fpregs(t, fpu)
82
83extern long elf_aux_hwcap;
84#define ELF_HWCAP (elf_aux_hwcap)
85
86extern char * elf_aux_platform;
87#define ELF_PLATFORM (elf_aux_platform)
88
89#define SET_PERSONALITY(ex) do { } while (0)
90
91extern unsigned long vsyscall_ehdr;
92extern unsigned long vsyscall_end;
93extern unsigned long __kernel_vsyscall;
94
95#define VSYSCALL_BASE vsyscall_ehdr
96#define VSYSCALL_END vsyscall_end
97
98/*
99 * This is the range that is readable by user mode, and things
100 * acting like user mode such as get_user_pages.
101 */
102#define FIXADDR_USER_START VSYSCALL_BASE
103#define FIXADDR_USER_END VSYSCALL_END
104
105/*
106 * Architecture-neutral AT_ values in 0-17, leave some room
107 * for more of them, start the x86-specific ones at 32.
108 */
109#define AT_SYSINFO 32
110#define AT_SYSINFO_EHDR 33
111
112#define ARCH_DLINFO \
113do { \
114 if ( vsyscall_ehdr ) { \
115 NEW_AUX_ENT(AT_SYSINFO, __kernel_vsyscall); \
116 NEW_AUX_ENT(AT_SYSINFO_EHDR, vsyscall_ehdr); \
117 } \
118} while (0)
119
120/*
121 * These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out
122 * extra segments containing the vsyscall DSO contents. Dumping its
123 * contents makes post-mortem fully interpretable later without matching up
124 * the same kernel and hardware config to see what PC values meant.
125 * Dumping its extra ELF program headers includes all the other information
126 * a debugger needs to easily find how the vsyscall DSO was being used.
127 */
128#define ELF_CORE_EXTRA_PHDRS \
129 (vsyscall_ehdr ? (((struct elfhdr *)vsyscall_ehdr)->e_phnum) : 0 )
130
131#define ELF_CORE_WRITE_EXTRA_PHDRS \
132if ( vsyscall_ehdr ) { \
133 const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \
134 const struct elf_phdr *const phdrp = \
135 (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \
136 int i; \
137 Elf32_Off ofs = 0; \
138 for (i = 0; i < ehdrp->e_phnum; ++i) { \
139 struct elf_phdr phdr = phdrp[i]; \
140 if (phdr.p_type == PT_LOAD) { \
141 ofs = phdr.p_offset = offset; \
142 offset += phdr.p_filesz; \
143 } \
144 else \
145 phdr.p_offset += ofs; \
146 phdr.p_paddr = 0; /* match other core phdrs */ \
147 DUMP_WRITE(&phdr, sizeof(phdr)); \
148 } \
149}
150#define ELF_CORE_WRITE_EXTRA_DATA \
151if ( vsyscall_ehdr ) { \
152 const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \
153 const struct elf_phdr *const phdrp = \
154 (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \
155 int i; \
156 for (i = 0; i < ehdrp->e_phnum; ++i) { \
157 if (phdrp[i].p_type == PT_LOAD) \
158 DUMP_WRITE((void *) phdrp[i].p_vaddr, \
159 phdrp[i].p_filesz); \
160 } \
161}
162
163#endif
diff --git a/arch/um/include/asm/elf-ppc.h b/arch/um/include/asm/elf-ppc.h
deleted file mode 100644
index af9463cd8ce5..000000000000
--- a/arch/um/include/asm/elf-ppc.h
+++ /dev/null
@@ -1,53 +0,0 @@
1#ifndef __UM_ELF_PPC_H
2#define __UM_ELF_PPC_H
3
4
5extern long elf_aux_hwcap;
6#define ELF_HWCAP (elf_aux_hwcap)
7
8#define SET_PERSONALITY(ex) do ; while(0)
9
10#define ELF_EXEC_PAGESIZE 4096
11
12#define elf_check_arch(x) (1)
13
14#ifdef CONFIG_64BIT
15#define ELF_CLASS ELFCLASS64
16#else
17#define ELF_CLASS ELFCLASS32
18#endif
19
20#define USE_ELF_CORE_DUMP
21
22#define R_386_NONE 0
23#define R_386_32 1
24#define R_386_PC32 2
25#define R_386_GOT32 3
26#define R_386_PLT32 4
27#define R_386_COPY 5
28#define R_386_GLOB_DAT 6
29#define R_386_JMP_SLOT 7
30#define R_386_RELATIVE 8
31#define R_386_GOTOFF 9
32#define R_386_GOTPC 10
33#define R_386_NUM 11
34
35#define ELF_PLATFORM (0)
36
37#define ELF_ET_DYN_BASE (0x08000000)
38
39/* the following stolen from asm-ppc/elf.h */
40#define ELF_NGREG 48 /* includes nip, msr, lr, etc. */
41#define ELF_NFPREG 33 /* includes fpscr */
42/* General registers */
43typedef unsigned long elf_greg_t;
44typedef elf_greg_t elf_gregset_t[ELF_NGREG];
45
46/* Floating point registers */
47typedef double elf_fpreg_t;
48typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
49
50#define ELF_DATA ELFDATA2MSB
51#define ELF_ARCH EM_PPC
52
53#endif
diff --git a/arch/um/include/asm/elf-x86_64.h b/arch/um/include/asm/elf-x86_64.h
deleted file mode 100644
index 6e8a9195e952..000000000000
--- a/arch/um/include/asm/elf-x86_64.h
+++ /dev/null
@@ -1,119 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 * Copyright (C) 2003 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
4 *
5 * Licensed under the GPL
6 */
7#ifndef __UM_ELF_X86_64_H
8#define __UM_ELF_X86_64_H
9
10#include <asm/user.h>
11#include "skas.h"
12
13/* x86-64 relocation types, taken from asm-x86_64/elf.h */
14#define R_X86_64_NONE 0 /* No reloc */
15#define R_X86_64_64 1 /* Direct 64 bit */
16#define R_X86_64_PC32 2 /* PC relative 32 bit signed */
17#define R_X86_64_GOT32 3 /* 32 bit GOT entry */
18#define R_X86_64_PLT32 4 /* 32 bit PLT address */
19#define R_X86_64_COPY 5 /* Copy symbol at runtime */
20#define R_X86_64_GLOB_DAT 6 /* Create GOT entry */
21#define R_X86_64_JUMP_SLOT 7 /* Create PLT entry */
22#define R_X86_64_RELATIVE 8 /* Adjust by program base */
23#define R_X86_64_GOTPCREL 9 /* 32 bit signed pc relative
24 offset to GOT */
25#define R_X86_64_32 10 /* Direct 32 bit zero extended */
26#define R_X86_64_32S 11 /* Direct 32 bit sign extended */
27#define R_X86_64_16 12 /* Direct 16 bit zero extended */
28#define R_X86_64_PC16 13 /* 16 bit sign extended pc relative */
29#define R_X86_64_8 14 /* Direct 8 bit sign extended */
30#define R_X86_64_PC8 15 /* 8 bit sign extended pc relative */
31
32#define R_X86_64_NUM 16
33
34typedef unsigned long elf_greg_t;
35
36#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
37typedef elf_greg_t elf_gregset_t[ELF_NGREG];
38
39typedef struct user_i387_struct elf_fpregset_t;
40
41/*
42 * This is used to ensure we don't load something for the wrong architecture.
43 */
44#define elf_check_arch(x) \
45 ((x)->e_machine == EM_X86_64)
46
47#define ELF_CLASS ELFCLASS64
48#define ELF_DATA ELFDATA2LSB
49#define ELF_ARCH EM_X86_64
50
51#define ELF_PLAT_INIT(regs, load_addr) do { \
52 PT_REGS_RBX(regs) = 0; \
53 PT_REGS_RCX(regs) = 0; \
54 PT_REGS_RDX(regs) = 0; \
55 PT_REGS_RSI(regs) = 0; \
56 PT_REGS_RDI(regs) = 0; \
57 PT_REGS_RBP(regs) = 0; \
58 PT_REGS_RAX(regs) = 0; \
59 PT_REGS_R8(regs) = 0; \
60 PT_REGS_R9(regs) = 0; \
61 PT_REGS_R10(regs) = 0; \
62 PT_REGS_R11(regs) = 0; \
63 PT_REGS_R12(regs) = 0; \
64 PT_REGS_R13(regs) = 0; \
65 PT_REGS_R14(regs) = 0; \
66 PT_REGS_R15(regs) = 0; \
67} while (0)
68
69#define ELF_CORE_COPY_REGS(pr_reg, regs) \
70 (pr_reg)[0] = (regs)->regs.gp[0]; \
71 (pr_reg)[1] = (regs)->regs.gp[1]; \
72 (pr_reg)[2] = (regs)->regs.gp[2]; \
73 (pr_reg)[3] = (regs)->regs.gp[3]; \
74 (pr_reg)[4] = (regs)->regs.gp[4]; \
75 (pr_reg)[5] = (regs)->regs.gp[5]; \
76 (pr_reg)[6] = (regs)->regs.gp[6]; \
77 (pr_reg)[7] = (regs)->regs.gp[7]; \
78 (pr_reg)[8] = (regs)->regs.gp[8]; \
79 (pr_reg)[9] = (regs)->regs.gp[9]; \
80 (pr_reg)[10] = (regs)->regs.gp[10]; \
81 (pr_reg)[11] = (regs)->regs.gp[11]; \
82 (pr_reg)[12] = (regs)->regs.gp[12]; \
83 (pr_reg)[13] = (regs)->regs.gp[13]; \
84 (pr_reg)[14] = (regs)->regs.gp[14]; \
85 (pr_reg)[15] = (regs)->regs.gp[15]; \
86 (pr_reg)[16] = (regs)->regs.gp[16]; \
87 (pr_reg)[17] = (regs)->regs.gp[17]; \
88 (pr_reg)[18] = (regs)->regs.gp[18]; \
89 (pr_reg)[19] = (regs)->regs.gp[19]; \
90 (pr_reg)[20] = (regs)->regs.gp[20]; \
91 (pr_reg)[21] = current->thread.arch.fs; \
92 (pr_reg)[22] = 0; \
93 (pr_reg)[23] = 0; \
94 (pr_reg)[24] = 0; \
95 (pr_reg)[25] = 0; \
96 (pr_reg)[26] = 0;
97
98extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu);
99
100#define ELF_CORE_COPY_FPREGS(t, fpu) elf_core_copy_fpregs(t, fpu)
101
102#ifdef TIF_IA32 /* XXX */
103#error XXX, indeed
104 clear_thread_flag(TIF_IA32);
105#endif
106
107#define USE_ELF_CORE_DUMP
108#define ELF_EXEC_PAGESIZE 4096
109
110#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
111
112extern long elf_aux_hwcap;
113#define ELF_HWCAP (elf_aux_hwcap)
114
115#define ELF_PLATFORM "x86_64"
116
117#define SET_PERSONALITY(ex) do ; while(0)
118
119#endif
diff --git a/arch/um/include/asm/module-i386.h b/arch/um/include/asm/module-i386.h
deleted file mode 100644
index 5ead4a0b2e35..000000000000
--- a/arch/um/include/asm/module-i386.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __UM_MODULE_I386_H
2#define __UM_MODULE_I386_H
3
4/* UML is simple */
5struct mod_arch_specific
6{
7};
8
9#define Elf_Shdr Elf32_Shdr
10#define Elf_Sym Elf32_Sym
11#define Elf_Ehdr Elf32_Ehdr
12
13#endif
diff --git a/arch/um/include/asm/module-x86_64.h b/arch/um/include/asm/module-x86_64.h
deleted file mode 100644
index 35b5491d3e96..000000000000
--- a/arch/um/include/asm/module-x86_64.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#ifndef __UM_MODULE_X86_64_H
8#define __UM_MODULE_X86_64_H
9
10/* UML is simple */
11struct mod_arch_specific
12{
13};
14
15#define Elf_Shdr Elf64_Shdr
16#define Elf_Sym Elf64_Sym
17#define Elf_Ehdr Elf64_Ehdr
18
19#endif
20
21/*
22 * Overrides for Emacs so that we follow Linus's tabbing style.
23 * Emacs will notice this stuff at the end of the file and automatically
24 * adjust the settings for this buffer only. This must remain at the end
25 * of the file.
26 * ---------------------------------------------------------------------------
27 * Local variables:
28 * c-file-style: "linux"
29 * End:
30 */
diff --git a/arch/um/include/asm/processor-i386.h b/arch/um/include/asm/processor-i386.h
deleted file mode 100644
index 82a9061ab5be..000000000000
--- a/arch/um/include/asm/processor-i386.h
+++ /dev/null
@@ -1,78 +0,0 @@
1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_PROCESSOR_I386_H
7#define __UM_PROCESSOR_I386_H
8
9#include "linux/string.h"
10#include <sysdep/host_ldt.h>
11#include "asm/segment.h"
12
13extern int host_has_cmov;
14
15/* include faultinfo structure */
16#include "sysdep/faultinfo.h"
17
18struct uml_tls_struct {
19 struct user_desc tls;
20 unsigned flushed:1;
21 unsigned present:1;
22};
23
24struct arch_thread {
25 struct uml_tls_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
26 unsigned long debugregs[8];
27 int debugregs_seq;
28 struct faultinfo faultinfo;
29};
30
31#define INIT_ARCH_THREAD { \
32 .tls_array = { [ 0 ... GDT_ENTRY_TLS_ENTRIES - 1 ] = \
33 { .present = 0, .flushed = 0 } }, \
34 .debugregs = { [ 0 ... 7 ] = 0 }, \
35 .debugregs_seq = 0, \
36 .faultinfo = { 0, 0, 0 } \
37}
38
39static inline void arch_flush_thread(struct arch_thread *thread)
40{
41 /* Clear any TLS still hanging */
42 memset(&thread->tls_array, 0, sizeof(thread->tls_array));
43}
44
45static inline void arch_copy_thread(struct arch_thread *from,
46 struct arch_thread *to)
47{
48 memcpy(&to->tls_array, &from->tls_array, sizeof(from->tls_array));
49}
50
51#include <asm/user.h>
52
53/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
54static inline void rep_nop(void)
55{
56 __asm__ __volatile__("rep;nop": : :"memory");
57}
58
59#define cpu_relax() rep_nop()
60
61/*
62 * Default implementation of macro that returns current
63 * instruction pointer ("program counter"). Stolen
64 * from asm-i386/processor.h
65 */
66#define current_text_addr() \
67 ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; })
68
69#define ARCH_IS_STACKGROW(address) \
70 (address + 32 >= UPT_SP(&current->thread.regs.regs))
71
72#define KSTK_EIP(tsk) KSTK_REG(tsk, EIP)
73#define KSTK_ESP(tsk) KSTK_REG(tsk, UESP)
74#define KSTK_EBP(tsk) KSTK_REG(tsk, EBP)
75
76#include "asm/processor-generic.h"
77
78#endif
diff --git a/arch/um/include/asm/processor-ppc.h b/arch/um/include/asm/processor-ppc.h
deleted file mode 100644
index 959323151229..000000000000
--- a/arch/um/include/asm/processor-ppc.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef __UM_PROCESSOR_PPC_H
2#define __UM_PROCESSOR_PPC_H
3
4#if defined(__ASSEMBLY__)
5
6#define CONFIG_PPC_MULTIPLATFORM
7#include "arch/processor.h"
8
9#else
10
11#include "asm/processor-generic.h"
12
13#endif
14
15#endif
diff --git a/arch/um/include/asm/processor-x86_64.h b/arch/um/include/asm/processor-x86_64.h
deleted file mode 100644
index 875a26a62614..000000000000
--- a/arch/um/include/asm/processor-x86_64.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#ifndef __UM_PROCESSOR_X86_64_H
8#define __UM_PROCESSOR_X86_64_H
9
10/* include faultinfo structure */
11#include "sysdep/faultinfo.h"
12
13struct arch_thread {
14 unsigned long debugregs[8];
15 int debugregs_seq;
16 unsigned long fs;
17 struct faultinfo faultinfo;
18};
19
20/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
21static inline void rep_nop(void)
22{
23 __asm__ __volatile__("rep;nop": : :"memory");
24}
25
26#define cpu_relax() rep_nop()
27
28#define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \
29 .debugregs_seq = 0, \
30 .fs = 0, \
31 .faultinfo = { 0, 0, 0 } }
32
33static inline void arch_flush_thread(struct arch_thread *thread)
34{
35}
36
37static inline void arch_copy_thread(struct arch_thread *from,
38 struct arch_thread *to)
39{
40 to->fs = from->fs;
41}
42
43#include <asm/user.h>
44
45#define current_text_addr() \
46 ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })
47
48#define ARCH_IS_STACKGROW(address) \
49 (address + 128 >= UPT_SP(&current->thread.regs.regs))
50
51#define KSTK_EIP(tsk) KSTK_REG(tsk, RIP)
52#define KSTK_ESP(tsk) KSTK_REG(tsk, RSP)
53
54#include "asm/processor-generic.h"
55
56#endif
diff --git a/arch/um/include/asm/ptrace-i386.h b/arch/um/include/asm/ptrace-i386.h
deleted file mode 100644
index 0273e4d09af7..000000000000
--- a/arch/um/include/asm/ptrace-i386.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_PTRACE_I386_H
7#define __UM_PTRACE_I386_H
8
9#define HOST_AUDIT_ARCH AUDIT_ARCH_I386
10
11#include "linux/compiler.h"
12#include "asm/ptrace-generic.h"
13
14#define PT_REGS_EAX(r) UPT_EAX(&(r)->regs)
15#define PT_REGS_EBX(r) UPT_EBX(&(r)->regs)
16#define PT_REGS_ECX(r) UPT_ECX(&(r)->regs)
17#define PT_REGS_EDX(r) UPT_EDX(&(r)->regs)
18#define PT_REGS_ESI(r) UPT_ESI(&(r)->regs)
19#define PT_REGS_EDI(r) UPT_EDI(&(r)->regs)
20#define PT_REGS_EBP(r) UPT_EBP(&(r)->regs)
21
22#define PT_REGS_CS(r) UPT_CS(&(r)->regs)
23#define PT_REGS_SS(r) UPT_SS(&(r)->regs)
24#define PT_REGS_DS(r) UPT_DS(&(r)->regs)
25#define PT_REGS_ES(r) UPT_ES(&(r)->regs)
26#define PT_REGS_FS(r) UPT_FS(&(r)->regs)
27#define PT_REGS_GS(r) UPT_GS(&(r)->regs)
28
29#define PT_REGS_EFLAGS(r) UPT_EFLAGS(&(r)->regs)
30
31#define PT_REGS_ORIG_SYSCALL(r) PT_REGS_EAX(r)
32#define PT_REGS_SYSCALL_RET(r) PT_REGS_EAX(r)
33#define PT_FIX_EXEC_STACK(sp) do ; while(0)
34
35#define profile_pc(regs) PT_REGS_IP(regs)
36
37#define user_mode(r) UPT_IS_USER(&(r)->regs)
38
39/*
40 * Forward declaration to avoid including sysdep/tls.h, which causes a
41 * circular include, and compilation failures.
42 */
43struct user_desc;
44
45extern int get_fpxregs(struct user_fxsr_struct __user *buf,
46 struct task_struct *child);
47extern int set_fpxregs(struct user_fxsr_struct __user *buf,
48 struct task_struct *tsk);
49
50extern int ptrace_get_thread_area(struct task_struct *child, int idx,
51 struct user_desc __user *user_desc);
52
53extern int ptrace_set_thread_area(struct task_struct *child, int idx,
54 struct user_desc __user *user_desc);
55
56#endif
diff --git a/arch/um/include/asm/ptrace-x86_64.h b/arch/um/include/asm/ptrace-x86_64.h
deleted file mode 100644
index 83d8c473b905..000000000000
--- a/arch/um/include/asm/ptrace-x86_64.h
+++ /dev/null
@@ -1,72 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#ifndef __UM_PTRACE_X86_64_H
8#define __UM_PTRACE_X86_64_H
9
10#include "linux/compiler.h"
11#include "asm/errno.h"
12
13#define __FRAME_OFFSETS /* Needed to get the R* macros */
14#include "asm/ptrace-generic.h"
15
16#define HOST_AUDIT_ARCH AUDIT_ARCH_X86_64
17
18#define PT_REGS_RBX(r) UPT_RBX(&(r)->regs)
19#define PT_REGS_RCX(r) UPT_RCX(&(r)->regs)
20#define PT_REGS_RDX(r) UPT_RDX(&(r)->regs)
21#define PT_REGS_RSI(r) UPT_RSI(&(r)->regs)
22#define PT_REGS_RDI(r) UPT_RDI(&(r)->regs)
23#define PT_REGS_RBP(r) UPT_RBP(&(r)->regs)
24#define PT_REGS_RAX(r) UPT_RAX(&(r)->regs)
25#define PT_REGS_R8(r) UPT_R8(&(r)->regs)
26#define PT_REGS_R9(r) UPT_R9(&(r)->regs)
27#define PT_REGS_R10(r) UPT_R10(&(r)->regs)
28#define PT_REGS_R11(r) UPT_R11(&(r)->regs)
29#define PT_REGS_R12(r) UPT_R12(&(r)->regs)
30#define PT_REGS_R13(r) UPT_R13(&(r)->regs)
31#define PT_REGS_R14(r) UPT_R14(&(r)->regs)
32#define PT_REGS_R15(r) UPT_R15(&(r)->regs)
33
34#define PT_REGS_FS(r) UPT_FS(&(r)->regs)
35#define PT_REGS_GS(r) UPT_GS(&(r)->regs)
36#define PT_REGS_DS(r) UPT_DS(&(r)->regs)
37#define PT_REGS_ES(r) UPT_ES(&(r)->regs)
38#define PT_REGS_SS(r) UPT_SS(&(r)->regs)
39#define PT_REGS_CS(r) UPT_CS(&(r)->regs)
40
41#define PT_REGS_ORIG_RAX(r) UPT_ORIG_RAX(&(r)->regs)
42#define PT_REGS_RIP(r) UPT_IP(&(r)->regs)
43#define PT_REGS_RSP(r) UPT_SP(&(r)->regs)
44
45#define PT_REGS_EFLAGS(r) UPT_EFLAGS(&(r)->regs)
46
47/* XXX */
48#define user_mode(r) UPT_IS_USER(&(r)->regs)
49#define PT_REGS_ORIG_SYSCALL(r) PT_REGS_RAX(r)
50#define PT_REGS_SYSCALL_RET(r) PT_REGS_RAX(r)
51
52#define PT_FIX_EXEC_STACK(sp) do ; while(0)
53
54#define profile_pc(regs) PT_REGS_IP(regs)
55
56struct user_desc;
57
58static inline int ptrace_get_thread_area(struct task_struct *child, int idx,
59 struct user_desc __user *user_desc)
60{
61 return -ENOSYS;
62}
63
64static inline int ptrace_set_thread_area(struct task_struct *child, int idx,
65 struct user_desc __user *user_desc)
66{
67 return -ENOSYS;
68}
69
70extern long arch_prctl(struct task_struct *task, int code,
71 unsigned long __user *addr);
72#endif