* [PATCH 1/4] FRV: Fix VLIW packing constraint violation in entry.S
@ 2012-10-15 11:43 David Howells
2012-10-15 11:43 ` [PATCH 2/4] FRV: Fix incorrect symbol in copy_thread() David Howells
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: David Howells @ 2012-10-15 11:43 UTC (permalink / raw)
To: linux-kernel; +Cc: David Howells, Al Viro
Fix VLIW packing constraint violation in entry.S:
arch/frv/kernel/entry.S: Assembler messages:
arch/frv/kernel/entry.S:871: Error: VLIW packing constraint violation
When packing CALLL with OR, CALLL must go in the first slot. The instructions
are executed simultaneously, so it doesn't matter which way round they're
packed from that point of view.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Al Viro <viro@ZenIV.linux.org.uk>
---
arch/frv/kernel/entry.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S
index 0027329..ee0beb3 100644
--- a/arch/frv/kernel/entry.S
+++ b/arch/frv/kernel/entry.S
@@ -867,8 +867,8 @@ ret_from_fork:
ret_from_kernel_thread:
lddi.p @(gr28,#REG_GR(8)),gr20
call schedule_tail
- or.p gr20,gr20,gr8
- calll @(gr21,gr0)
+ calll.p @(gr21,gr0)
+ or gr20,gr20,gr8
bra sys_exit
.globl ret_from_kernel_execve
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/4] FRV: Fix incorrect symbol in copy_thread()
2012-10-15 11:43 [PATCH 1/4] FRV: Fix VLIW packing constraint violation in entry.S David Howells
@ 2012-10-15 11:43 ` David Howells
2012-10-15 11:43 ` [PATCH 3/4] FRV: Fix const sections change David Howells
2012-10-15 11:44 ` [PATCH 4/4] FRV: Fix linux/elf-fdpic.h David Howells
2 siblings, 0 replies; 7+ messages in thread
From: David Howells @ 2012-10-15 11:43 UTC (permalink / raw)
To: linux-kernel; +Cc: David Howells, Al Viro
Fix an incorrect symbol in copy_thread():
arch/frv/kernel/process.c: In function 'copy_thread':
arch/frv/kernel/process.c:197: error: 'chilregs' undeclared (first use in this function)
arch/frv/kernel/process.c:197: error: (Each undeclared identifier is reported only once
arch/frv/kernel/process.c:197: error: for each function it appears in.)
m
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Al Viro <viro@ZenIV.linux.org.uk>
---
arch/frv/kernel/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index 655d90d..e1e3aa1 100644
--- a/arch/frv/kernel/process.c
+++ b/arch/frv/kernel/process.c
@@ -194,7 +194,7 @@ int copy_thread(unsigned long clone_flags,
memset(childregs, 0, sizeof(struct pt_regs));
childregs->gr9 = usp; /* function */
childregs->gr8 = arg;
- chilregs->psr = PSR_S;
+ childregs->psr = PSR_S;
p->thread.pc = (unsigned long) ret_from_kernel_thread;
save_user_regs(p->thread.user);
return 0;
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] FRV: Fix const sections change
2012-10-15 11:43 [PATCH 1/4] FRV: Fix VLIW packing constraint violation in entry.S David Howells
2012-10-15 11:43 ` [PATCH 2/4] FRV: Fix incorrect symbol in copy_thread() David Howells
@ 2012-10-15 11:43 ` David Howells
2012-10-15 11:44 ` [PATCH 4/4] FRV: Fix linux/elf-fdpic.h David Howells
2 siblings, 0 replies; 7+ messages in thread
From: David Howells @ 2012-10-15 11:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Andi Kleen, David Howells, Geert Uytterhoeven
From: Andi Kleen <andi@firstfloor.org>
Add __pminitconst to fix the build, otherwise the following error can occur:
arch/frv/kernel/setup.c:187:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
arch/frv/kernel/setup.c:386:2: error: 'clock_cmodes' undeclared (first use in this function)
arch/frv/kernel/setup.c:571:6: error: 'clock_cmodes' undeclared (first use in this function)
make[2]: *** [arch/frv/kernel/setup.o] Error 1
http://kisskb.ellerman.id.au/kisskb/buildresult/7344691/
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/frv/kernel/setup.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index 1f1e5ef..b8993c8 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];
#ifdef CONFIG_PM
#define __pminit
#define __pminitdata
+#define __pminitconst
#else
#define __pminit __init
#define __pminitdata __initdata
+#define __pminitconst __initconst
#endif
struct clock_cmode {
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] FRV: Fix linux/elf-fdpic.h
2012-10-15 11:43 [PATCH 1/4] FRV: Fix VLIW packing constraint violation in entry.S David Howells
2012-10-15 11:43 ` [PATCH 2/4] FRV: Fix incorrect symbol in copy_thread() David Howells
2012-10-15 11:43 ` [PATCH 3/4] FRV: Fix const sections change David Howells
@ 2012-10-15 11:44 ` David Howells
2012-10-15 12:15 ` Lars-Peter Clausen
2012-10-15 12:20 ` David Howells
2 siblings, 2 replies; 7+ messages in thread
From: David Howells @ 2012-10-15 11:44 UTC (permalink / raw)
To: linux-kernel; +Cc: David Howells, Fengguang Wu, Lars-Peter Clausen, uclinux-dev
It seems I accidentally switched the guard on linux/elf-fdpic.h from #ifdef
__KERNEL__ to #ifndef __KERNEL__ when attempting to expand the guarded region
to cover the elf_fdpic_params struct when doing the UAPI split - with the
result that the struct became unavailable to kernel code.
Move incorrectly guarded bits back to the kernelspace header.
Whilst we're at it, the __KERNEL__ guards can be deleted as they're no longer
necessary.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Fengguang Wu <fengguang.wu@intel.com>
cc: Lars-Peter Clausen <lars@metafoo.de>
cc: uclinux-dev@uclinux.org
---
include/uapi/linux/elf-fdpic.h | 42 +++-------------------------------------
1 file changed, 3 insertions(+), 39 deletions(-)
diff --git a/include/uapi/linux/elf-fdpic.h b/include/uapi/linux/elf-fdpic.h
index 1065078..3921e33 100644
--- a/include/uapi/linux/elf-fdpic.h
+++ b/include/uapi/linux/elf-fdpic.h
@@ -9,8 +9,8 @@
* 2 of the License, or (at your option) any later version.
*/
-#ifndef _LINUX_ELF_FDPIC_H
-#define _LINUX_ELF_FDPIC_H
+#ifndef _UAPI_LINUX_ELF_FDPIC_H
+#define _UAPI_LINUX_ELF_FDPIC_H
#include <linux/elf.h>
@@ -31,40 +31,4 @@ struct elf32_fdpic_loadmap {
#define ELF32_FDPIC_LOADMAP_VERSION 0x0000
-#ifndef __KERNEL__
-/*
- * binfmt binary parameters structure
- */
-struct elf_fdpic_params {
- struct elfhdr hdr; /* ref copy of ELF header */
- struct elf_phdr *phdrs; /* ref copy of PT_PHDR table */
- struct elf32_fdpic_loadmap *loadmap; /* loadmap to be passed to userspace */
- unsigned long elfhdr_addr; /* mapped ELF header user address */
- unsigned long ph_addr; /* mapped PT_PHDR user address */
- unsigned long map_addr; /* mapped loadmap user address */
- unsigned long entry_addr; /* mapped entry user address */
- unsigned long stack_size; /* stack size requested (PT_GNU_STACK) */
- unsigned long dynamic_addr; /* mapped PT_DYNAMIC user address */
- unsigned long load_addr; /* user address at which to map binary */
- unsigned long flags;
-#define ELF_FDPIC_FLAG_ARRANGEMENT 0x0000000f /* PT_LOAD arrangement flags */
-#define ELF_FDPIC_FLAG_INDEPENDENT 0x00000000 /* PT_LOADs can be put anywhere */
-#define ELF_FDPIC_FLAG_HONOURVADDR 0x00000001 /* PT_LOAD.vaddr must be honoured */
-#define ELF_FDPIC_FLAG_CONSTDISP 0x00000002 /* PT_LOADs require constant
- * displacement */
-#define ELF_FDPIC_FLAG_CONTIGUOUS 0x00000003 /* PT_LOADs should be contiguous */
-#define ELF_FDPIC_FLAG_EXEC_STACK 0x00000010 /* T if stack to be executable */
-#define ELF_FDPIC_FLAG_NOEXEC_STACK 0x00000020 /* T if stack not to be executable */
-#define ELF_FDPIC_FLAG_EXECUTABLE 0x00000040 /* T if this object is the executable */
-#define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */
-};
-
-#ifdef CONFIG_MMU
-extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params,
- struct elf_fdpic_params *interp_params,
- unsigned long *start_stack,
- unsigned long *start_brk);
-#endif
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_ELF_FDPIC_H */
+#endif /* _UAPI_LINUX_ELF_FDPIC_H */
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] FRV: Fix linux/elf-fdpic.h
2012-10-15 11:44 ` [PATCH 4/4] FRV: Fix linux/elf-fdpic.h David Howells
@ 2012-10-15 12:15 ` Lars-Peter Clausen
2012-10-15 12:20 ` David Howells
1 sibling, 0 replies; 7+ messages in thread
From: Lars-Peter Clausen @ 2012-10-15 12:15 UTC (permalink / raw)
To: David Howells; +Cc: linux-kernel, Fengguang Wu, uclinux-dev
On 10/15/2012 01:44 PM, David Howells wrote:
> It seems I accidentally switched the guard on linux/elf-fdpic.h from #ifdef
> __KERNEL__ to #ifndef __KERNEL__ when attempting to expand the guarded region
> to cover the elf_fdpic_params struct when doing the UAPI split - with the
> result that the struct became unavailable to kernel code.
>
> Move incorrectly guarded bits back to the kernelspace header.
>
> Whilst we're at it, the __KERNEL__ guards can be deleted as they're no longer
> necessary.
>
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Reported-by: Lars-Peter Clausen <lars@metafoo.de>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Fengguang Wu <fengguang.wu@intel.com>
> cc: Lars-Peter Clausen <lars@metafoo.de>
> cc: uclinux-dev@uclinux.org
> ---
>
> include/uapi/linux/elf-fdpic.h | 42 +++-------------------------------------
> 1 file changed, 3 insertions(+), 39 deletions(-)
The second part of the patch adding it back to include/linux/elf-fdpic.h
seems to be missing.
Thanks,
- Lars
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] FRV: Fix linux/elf-fdpic.h
2012-10-15 11:44 ` [PATCH 4/4] FRV: Fix linux/elf-fdpic.h David Howells
2012-10-15 12:15 ` Lars-Peter Clausen
@ 2012-10-15 12:20 ` David Howells
1 sibling, 0 replies; 7+ messages in thread
From: David Howells @ 2012-10-15 12:20 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: dhowells, linux-kernel, Fengguang Wu, uclinux-dev
Lars-Peter Clausen <lars@metafoo.de> wrote:
> The second part of the patch adding it back to include/linux/elf-fdpic.h
> seems to be missing.
Oops. Yes. I forgot to 'stg add' it.
David
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/4] FRV: Fix VLIW packing constraint violation in entry.S
@ 2012-10-15 23:10 David Howells
0 siblings, 0 replies; 7+ messages in thread
From: David Howells @ 2012-10-15 23:10 UTC (permalink / raw)
To: torvalds; +Cc: dhowells, linux-kernel
Fix VLIW packing constraint violation in entry.S:
arch/frv/kernel/entry.S: Assembler messages:
arch/frv/kernel/entry.S:871: Error: VLIW packing constraint violation
When packing CALLL with OR, CALLL must go in the first slot. The instructions
are executed simultaneously, so it doesn't matter which way round they're
packed from that point of view.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
---
arch/frv/kernel/entry.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S
index 0027329..ee0beb3 100644
--- a/arch/frv/kernel/entry.S
+++ b/arch/frv/kernel/entry.S
@@ -867,8 +867,8 @@ ret_from_fork:
ret_from_kernel_thread:
lddi.p @(gr28,#REG_GR(8)),gr20
call schedule_tail
- or.p gr20,gr20,gr8
- calll @(gr21,gr0)
+ calll.p @(gr21,gr0)
+ or gr20,gr20,gr8
bra sys_exit
.globl ret_from_kernel_execve
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-10-15 23:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-15 11:43 [PATCH 1/4] FRV: Fix VLIW packing constraint violation in entry.S David Howells
2012-10-15 11:43 ` [PATCH 2/4] FRV: Fix incorrect symbol in copy_thread() David Howells
2012-10-15 11:43 ` [PATCH 3/4] FRV: Fix const sections change David Howells
2012-10-15 11:44 ` [PATCH 4/4] FRV: Fix linux/elf-fdpic.h David Howells
2012-10-15 12:15 ` Lars-Peter Clausen
2012-10-15 12:20 ` David Howells
2012-10-15 23:10 [PATCH 1/4] FRV: Fix VLIW packing constraint violation in entry.S David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).