diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-16 21:49:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-16 21:49:22 -0400 |
commit | 90a24a4a7e8f8b3488438276e1d15bb3762df31e (patch) | |
tree | d669b36e7558fa9caa8d4466c09db928801d7a01 | |
parent | 85eae82a0855d49852b87deac8653e4ebc8b291f (diff) | |
parent | 0c552e5fb9bec3d4942663a2a90e04a685fd8482 (diff) |
Merge branch 'frv' (FRV patches from David Howells)
Merge emailed FRV fixes from David Howells.
* frv:
FRV: Fix linux/elf-fdpic.h
FRV: Fix const sections change
FRV: Fix incorrect symbol in copy_thread()
FRV: Fix VLIW packing constraint violation in entry.S
-rw-r--r-- | arch/frv/kernel/entry.S | 4 | ||||
-rw-r--r-- | arch/frv/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/frv/kernel/setup.c | 2 | ||||
-rw-r--r-- | include/linux/elf-fdpic.h | 51 | ||||
-rw-r--r-- | include/uapi/linux/elf-fdpic.h | 42 |
5 files changed, 59 insertions, 42 deletions
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 002732960315..ee0beb354e4d 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S | |||
@@ -867,8 +867,8 @@ ret_from_fork: | |||
867 | ret_from_kernel_thread: | 867 | ret_from_kernel_thread: |
868 | lddi.p @(gr28,#REG_GR(8)),gr20 | 868 | lddi.p @(gr28,#REG_GR(8)),gr20 |
869 | call schedule_tail | 869 | call schedule_tail |
870 | or.p gr20,gr20,gr8 | 870 | calll.p @(gr21,gr0) |
871 | calll @(gr21,gr0) | 871 | or gr20,gr20,gr8 |
872 | bra sys_exit | 872 | bra sys_exit |
873 | 873 | ||
874 | .globl ret_from_kernel_execve | 874 | .globl ret_from_kernel_execve |
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index 655d90d20bb0..e1e3aa196aa4 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c | |||
@@ -194,7 +194,7 @@ int copy_thread(unsigned long clone_flags, | |||
194 | memset(childregs, 0, sizeof(struct pt_regs)); | 194 | memset(childregs, 0, sizeof(struct pt_regs)); |
195 | childregs->gr9 = usp; /* function */ | 195 | childregs->gr9 = usp; /* function */ |
196 | childregs->gr8 = arg; | 196 | childregs->gr8 = arg; |
197 | chilregs->psr = PSR_S; | 197 | childregs->psr = PSR_S; |
198 | p->thread.pc = (unsigned long) ret_from_kernel_thread; | 198 | p->thread.pc = (unsigned long) ret_from_kernel_thread; |
199 | save_user_regs(p->thread.user); | 199 | save_user_regs(p->thread.user); |
200 | return 0; | 200 | return 0; |
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c index 1f1e5efb3385..b8993c87d3de 100644 --- a/arch/frv/kernel/setup.c +++ b/arch/frv/kernel/setup.c | |||
@@ -112,9 +112,11 @@ char __initdata redboot_command_line[COMMAND_LINE_SIZE]; | |||
112 | #ifdef CONFIG_PM | 112 | #ifdef CONFIG_PM |
113 | #define __pminit | 113 | #define __pminit |
114 | #define __pminitdata | 114 | #define __pminitdata |
115 | #define __pminitconst | ||
115 | #else | 116 | #else |
116 | #define __pminit __init | 117 | #define __pminit __init |
117 | #define __pminitdata __initdata | 118 | #define __pminitdata __initdata |
119 | #define __pminitconst __initconst | ||
118 | #endif | 120 | #endif |
119 | 121 | ||
120 | struct clock_cmode { | 122 | struct clock_cmode { |
diff --git a/include/linux/elf-fdpic.h b/include/linux/elf-fdpic.h new file mode 100644 index 000000000000..386440317b0c --- /dev/null +++ b/include/linux/elf-fdpic.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* FDPIC ELF load map | ||
2 | * | ||
3 | * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _LINUX_ELF_FDPIC_H | ||
13 | #define _LINUX_ELF_FDPIC_H | ||
14 | |||
15 | #include <uapi/linux/elf-fdpic.h> | ||
16 | |||
17 | /* | ||
18 | * binfmt binary parameters structure | ||
19 | */ | ||
20 | struct elf_fdpic_params { | ||
21 | struct elfhdr hdr; /* ref copy of ELF header */ | ||
22 | struct elf_phdr *phdrs; /* ref copy of PT_PHDR table */ | ||
23 | struct elf32_fdpic_loadmap *loadmap; /* loadmap to be passed to userspace */ | ||
24 | unsigned long elfhdr_addr; /* mapped ELF header user address */ | ||
25 | unsigned long ph_addr; /* mapped PT_PHDR user address */ | ||
26 | unsigned long map_addr; /* mapped loadmap user address */ | ||
27 | unsigned long entry_addr; /* mapped entry user address */ | ||
28 | unsigned long stack_size; /* stack size requested (PT_GNU_STACK) */ | ||
29 | unsigned long dynamic_addr; /* mapped PT_DYNAMIC user address */ | ||
30 | unsigned long load_addr; /* user address at which to map binary */ | ||
31 | unsigned long flags; | ||
32 | #define ELF_FDPIC_FLAG_ARRANGEMENT 0x0000000f /* PT_LOAD arrangement flags */ | ||
33 | #define ELF_FDPIC_FLAG_INDEPENDENT 0x00000000 /* PT_LOADs can be put anywhere */ | ||
34 | #define ELF_FDPIC_FLAG_HONOURVADDR 0x00000001 /* PT_LOAD.vaddr must be honoured */ | ||
35 | #define ELF_FDPIC_FLAG_CONSTDISP 0x00000002 /* PT_LOADs require constant | ||
36 | * displacement */ | ||
37 | #define ELF_FDPIC_FLAG_CONTIGUOUS 0x00000003 /* PT_LOADs should be contiguous */ | ||
38 | #define ELF_FDPIC_FLAG_EXEC_STACK 0x00000010 /* T if stack to be executable */ | ||
39 | #define ELF_FDPIC_FLAG_NOEXEC_STACK 0x00000020 /* T if stack not to be executable */ | ||
40 | #define ELF_FDPIC_FLAG_EXECUTABLE 0x00000040 /* T if this object is the executable */ | ||
41 | #define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */ | ||
42 | }; | ||
43 | |||
44 | #ifdef CONFIG_MMU | ||
45 | extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params, | ||
46 | struct elf_fdpic_params *interp_params, | ||
47 | unsigned long *start_stack, | ||
48 | unsigned long *start_brk); | ||
49 | #endif | ||
50 | |||
51 | #endif /* _LINUX_ELF_FDPIC_H */ | ||
diff --git a/include/uapi/linux/elf-fdpic.h b/include/uapi/linux/elf-fdpic.h index 1065078938f9..3921e33aec8e 100644 --- a/include/uapi/linux/elf-fdpic.h +++ b/include/uapi/linux/elf-fdpic.h | |||
@@ -9,8 +9,8 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef _LINUX_ELF_FDPIC_H | 12 | #ifndef _UAPI_LINUX_ELF_FDPIC_H |
13 | #define _LINUX_ELF_FDPIC_H | 13 | #define _UAPI_LINUX_ELF_FDPIC_H |
14 | 14 | ||
15 | #include <linux/elf.h> | 15 | #include <linux/elf.h> |
16 | 16 | ||
@@ -31,40 +31,4 @@ struct elf32_fdpic_loadmap { | |||
31 | 31 | ||
32 | #define ELF32_FDPIC_LOADMAP_VERSION 0x0000 | 32 | #define ELF32_FDPIC_LOADMAP_VERSION 0x0000 |
33 | 33 | ||
34 | #ifndef __KERNEL__ | 34 | #endif /* _UAPI_LINUX_ELF_FDPIC_H */ |
35 | /* | ||
36 | * binfmt binary parameters structure | ||
37 | */ | ||
38 | struct elf_fdpic_params { | ||
39 | struct elfhdr hdr; /* ref copy of ELF header */ | ||
40 | struct elf_phdr *phdrs; /* ref copy of PT_PHDR table */ | ||
41 | struct elf32_fdpic_loadmap *loadmap; /* loadmap to be passed to userspace */ | ||
42 | unsigned long elfhdr_addr; /* mapped ELF header user address */ | ||
43 | unsigned long ph_addr; /* mapped PT_PHDR user address */ | ||
44 | unsigned long map_addr; /* mapped loadmap user address */ | ||
45 | unsigned long entry_addr; /* mapped entry user address */ | ||
46 | unsigned long stack_size; /* stack size requested (PT_GNU_STACK) */ | ||
47 | unsigned long dynamic_addr; /* mapped PT_DYNAMIC user address */ | ||
48 | unsigned long load_addr; /* user address at which to map binary */ | ||
49 | unsigned long flags; | ||
50 | #define ELF_FDPIC_FLAG_ARRANGEMENT 0x0000000f /* PT_LOAD arrangement flags */ | ||
51 | #define ELF_FDPIC_FLAG_INDEPENDENT 0x00000000 /* PT_LOADs can be put anywhere */ | ||
52 | #define ELF_FDPIC_FLAG_HONOURVADDR 0x00000001 /* PT_LOAD.vaddr must be honoured */ | ||
53 | #define ELF_FDPIC_FLAG_CONSTDISP 0x00000002 /* PT_LOADs require constant | ||
54 | * displacement */ | ||
55 | #define ELF_FDPIC_FLAG_CONTIGUOUS 0x00000003 /* PT_LOADs should be contiguous */ | ||
56 | #define ELF_FDPIC_FLAG_EXEC_STACK 0x00000010 /* T if stack to be executable */ | ||
57 | #define ELF_FDPIC_FLAG_NOEXEC_STACK 0x00000020 /* T if stack not to be executable */ | ||
58 | #define ELF_FDPIC_FLAG_EXECUTABLE 0x00000040 /* T if this object is the executable */ | ||
59 | #define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */ | ||
60 | }; | ||
61 | |||
62 | #ifdef CONFIG_MMU | ||
63 | extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params, | ||
64 | struct elf_fdpic_params *interp_params, | ||
65 | unsigned long *start_stack, | ||
66 | unsigned long *start_brk); | ||
67 | #endif | ||
68 | #endif /* __KERNEL__ */ | ||
69 | |||
70 | #endif /* _LINUX_ELF_FDPIC_H */ | ||