Commit b987a834 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'frv-fixes-20121102' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-frv

Pull FRV fixes from David Howells:
 "A collection of small fixes for the FRV architecture."

* tag 'frv-fixes-20121102' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-frv:
  frv: fix the broken preempt
  frv: switch to saner kernel_execve() semantics
  FRV: Fix the new-style kernel_thread() stuff
  FRV: Fix the preemption handling
  FRV: gcc-4.1.2 also inlines weak functions
  FRV: Don't objcopy the GNU build_id note
  FRV: Add missing linux/export.h #inclusions
parents 66b6a0c9 1d72d9f8
...@@ -13,6 +13,7 @@ config FRV ...@@ -13,6 +13,7 @@ config FRV
select GENERIC_CPU_DEVICES select GENERIC_CPU_DEVICES
select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_IPC_PARSE_VERSION
select GENERIC_KERNEL_THREAD select GENERIC_KERNEL_THREAD
select GENERIC_KERNEL_EXECVE
config ZONE_DMA config ZONE_DMA
bool bool
......
...@@ -17,6 +17,8 @@ PARAMS_PHYS = 0x0207c000 ...@@ -17,6 +17,8 @@ PARAMS_PHYS = 0x0207c000
INITRD_PHYS = 0x02180000 INITRD_PHYS = 0x02180000
INITRD_VIRT = 0x02180000 INITRD_VIRT = 0x02180000
OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment
# #
# If you don't define ZRELADDR above, # If you don't define ZRELADDR above,
# then it defaults to ZTEXTADDR # then it defaults to ZTEXTADDR
...@@ -32,18 +34,18 @@ Image: $(obj)/Image ...@@ -32,18 +34,18 @@ Image: $(obj)/Image
targets: $(obj)/Image targets: $(obj)/Image
$(obj)/Image: vmlinux FORCE $(obj)/Image: vmlinux FORCE
$(OBJCOPY) -O binary -R .note -R .comment -S vmlinux $@ $(OBJCOPY) $(OBJCOPYFLAGS) -S vmlinux $@
#$(obj)/Image: $(CONFIGURE) $(SYSTEM) #$(obj)/Image: $(CONFIGURE) $(SYSTEM)
# $(OBJCOPY) -O binary -R .note -R .comment -g -S $(SYSTEM) $@ # $(OBJCOPY) $(OBJCOPYFLAGS) -g -S $(SYSTEM) $@
bzImage: zImage bzImage: zImage
zImage: $(CONFIGURE) compressed/$(LINUX) zImage: $(CONFIGURE) compressed/$(LINUX)
$(OBJCOPY) -O binary -R .note -R .comment -S compressed/$(LINUX) $@ $(OBJCOPY) $(OBJCOPYFLAGS) -S compressed/$(LINUX) $@
bootpImage: bootp/bootp bootpImage: bootp/bootp
$(OBJCOPY) -O binary -R .note -R .comment -S bootp/bootp $@ $(OBJCOPY) $(OBJCOPYFLAGS) -S bootp/bootp $@
compressed/$(LINUX): $(LINUX) dep compressed/$(LINUX): $(LINUX) dep
@$(MAKE) -C compressed $(LINUX) @$(MAKE) -C compressed $(LINUX)
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#define __ARCH_WANT_SYS_RT_SIGACTION #define __ARCH_WANT_SYS_RT_SIGACTION
#define __ARCH_WANT_SYS_RT_SIGSUSPEND #define __ARCH_WANT_SYS_RT_SIGSUSPEND
#define __ARCH_WANT_SYS_EXECVE #define __ARCH_WANT_SYS_EXECVE
#define __ARCH_WANT_KERNEL_EXECVE
/* /*
* "Conditional" syscalls * "Conditional" syscalls
......
...@@ -869,11 +869,6 @@ ret_from_kernel_thread: ...@@ -869,11 +869,6 @@ ret_from_kernel_thread:
call schedule_tail call schedule_tail
calll.p @(gr21,gr0) calll.p @(gr21,gr0)
or gr20,gr20,gr8 or gr20,gr20,gr8
bra sys_exit
.globl ret_from_kernel_execve
ret_from_kernel_execve:
ori gr28,0,sp
bra __syscall_exit bra __syscall_exit
################################################################################################### ###################################################################################################
...@@ -1080,27 +1075,10 @@ __entry_return_from_kernel_interrupt: ...@@ -1080,27 +1075,10 @@ __entry_return_from_kernel_interrupt:
subicc gr5,#0,gr0,icc0 subicc gr5,#0,gr0,icc0
beq icc0,#0,__entry_return_direct beq icc0,#0,__entry_return_direct
__entry_preempt_need_resched: subcc gr0,gr0,gr0,icc2 /* set Z and clear C */
ldi @(gr15,#TI_FLAGS),gr4 call preempt_schedule_irq
andicc gr4,#_TIF_NEED_RESCHED,gr0,icc0
beq icc0,#1,__entry_return_direct
setlos #PREEMPT_ACTIVE,gr5
sti gr5,@(gr15,#TI_FLAGS)
andi gr23,#~PSR_PIL,gr23
movgs gr23,psr
call schedule
sti gr0,@(gr15,#TI_PRE_COUNT)
movsg psr,gr23
ori gr23,#PSR_PIL_14,gr23
movgs gr23,psr
bra __entry_preempt_need_resched
#else
bra __entry_return_direct
#endif #endif
bra __entry_return_direct
############################################################################### ###############################################################################
......
...@@ -181,6 +181,9 @@ int copy_thread(unsigned long clone_flags, ...@@ -181,6 +181,9 @@ int copy_thread(unsigned long clone_flags,
childregs = (struct pt_regs *) childregs = (struct pt_regs *)
(task_stack_page(p) + THREAD_SIZE - FRV_FRAME0_SIZE); (task_stack_page(p) + THREAD_SIZE - FRV_FRAME0_SIZE);
/* set up the userspace frame (the only place that the USP is stored) */
*childregs = *__kernel_frame0_ptr;
p->set_child_tid = p->clear_child_tid = NULL; p->set_child_tid = p->clear_child_tid = NULL;
p->thread.frame = childregs; p->thread.frame = childregs;
...@@ -191,10 +194,8 @@ int copy_thread(unsigned long clone_flags, ...@@ -191,10 +194,8 @@ int copy_thread(unsigned long clone_flags,
p->thread.frame0 = childregs; p->thread.frame0 = childregs;
if (unlikely(!regs)) { if (unlikely(!regs)) {
memset(childregs, 0, sizeof(struct pt_regs));
childregs->gr9 = usp; /* function */ childregs->gr9 = usp; /* function */
childregs->gr8 = arg; childregs->gr8 = arg;
childregs->psr = PSR_S;
p->thread.pc = (unsigned long) ret_from_kernel_thread; p->thread.pc = (unsigned long) ret_from_kernel_thread;
save_user_regs(p->thread.user); save_user_regs(p->thread.user);
return 0; return 0;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/export.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/pci.h> #include <linux/pci.h>
......
...@@ -442,9 +442,11 @@ void __init __weak smp_setup_processor_id(void) ...@@ -442,9 +442,11 @@ void __init __weak smp_setup_processor_id(void)
{ {
} }
# if THREAD_SIZE >= PAGE_SIZE
void __init __weak thread_info_cache_init(void) void __init __weak thread_info_cache_init(void)
{ {
} }
#endif
/* /*
* Set up kernel memory allocators * Set up kernel memory allocators
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment