diff options
Diffstat (limited to 'arch/frv/kernel')
-rw-r--r-- | arch/frv/kernel/entry.S | 32 | ||||
-rw-r--r-- | arch/frv/kernel/process.c | 5 | ||||
-rw-r--r-- | arch/frv/kernel/setup.c | 2 |
3 files changed, 10 insertions, 29 deletions
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 002732960315..dfcd263c0517 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S | |||
@@ -867,13 +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 | ||
873 | |||
874 | .globl ret_from_kernel_execve | ||
875 | ret_from_kernel_execve: | ||
876 | ori gr28,0,sp | ||
877 | bra __syscall_exit | 872 | bra __syscall_exit |
878 | 873 | ||
879 | ################################################################################################### | 874 | ################################################################################################### |
@@ -1080,27 +1075,10 @@ __entry_return_from_kernel_interrupt: | |||
1080 | subicc gr5,#0,gr0,icc0 | 1075 | subicc gr5,#0,gr0,icc0 |
1081 | beq icc0,#0,__entry_return_direct | 1076 | beq icc0,#0,__entry_return_direct |
1082 | 1077 | ||
1083 | __entry_preempt_need_resched: | 1078 | subcc gr0,gr0,gr0,icc2 /* set Z and clear C */ |
1084 | ldi @(gr15,#TI_FLAGS),gr4 | 1079 | call preempt_schedule_irq |
1085 | andicc gr4,#_TIF_NEED_RESCHED,gr0,icc0 | ||
1086 | beq icc0,#1,__entry_return_direct | ||
1087 | |||
1088 | setlos #PREEMPT_ACTIVE,gr5 | ||
1089 | sti gr5,@(gr15,#TI_FLAGS) | ||
1090 | |||
1091 | andi gr23,#~PSR_PIL,gr23 | ||
1092 | movgs gr23,psr | ||
1093 | |||
1094 | call schedule | ||
1095 | sti gr0,@(gr15,#TI_PRE_COUNT) | ||
1096 | |||
1097 | movsg psr,gr23 | ||
1098 | ori gr23,#PSR_PIL_14,gr23 | ||
1099 | movgs gr23,psr | ||
1100 | bra __entry_preempt_need_resched | ||
1101 | #else | ||
1102 | bra __entry_return_direct | ||
1103 | #endif | 1080 | #endif |
1081 | bra __entry_return_direct | ||
1104 | 1082 | ||
1105 | 1083 | ||
1106 | ############################################################################### | 1084 | ############################################################################### |
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index 655d90d20bb0..7e33215f1d8f 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c | |||
@@ -181,6 +181,9 @@ int copy_thread(unsigned long clone_flags, | |||
181 | childregs = (struct pt_regs *) | 181 | childregs = (struct pt_regs *) |
182 | (task_stack_page(p) + THREAD_SIZE - FRV_FRAME0_SIZE); | 182 | (task_stack_page(p) + THREAD_SIZE - FRV_FRAME0_SIZE); |
183 | 183 | ||
184 | /* set up the userspace frame (the only place that the USP is stored) */ | ||
185 | *childregs = *__kernel_frame0_ptr; | ||
186 | |||
184 | p->set_child_tid = p->clear_child_tid = NULL; | 187 | p->set_child_tid = p->clear_child_tid = NULL; |
185 | 188 | ||
186 | p->thread.frame = childregs; | 189 | p->thread.frame = childregs; |
@@ -191,10 +194,8 @@ int copy_thread(unsigned long clone_flags, | |||
191 | p->thread.frame0 = childregs; | 194 | p->thread.frame0 = childregs; |
192 | 195 | ||
193 | if (unlikely(!regs)) { | 196 | if (unlikely(!regs)) { |
194 | memset(childregs, 0, sizeof(struct pt_regs)); | ||
195 | childregs->gr9 = usp; /* function */ | 197 | childregs->gr9 = usp; /* function */ |
196 | childregs->gr8 = arg; | 198 | childregs->gr8 = arg; |
197 | chilregs->psr = PSR_S; | ||
198 | p->thread.pc = (unsigned long) ret_from_kernel_thread; | 199 | p->thread.pc = (unsigned long) ret_from_kernel_thread; |
199 | save_user_regs(p->thread.user); | 200 | save_user_regs(p->thread.user); |
200 | return 0; | 201 | 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 { |