Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55889
b: refs/heads/master
c: 43c09ce
h: refs/heads/master
i:
  55887: e0d4949
v: v3
  • Loading branch information
Hirokazu Takata authored and Linus Torvalds committed May 11, 2007
1 parent 1c2da80 commit 3f07d71
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 44316634460a6b368ad3160da6cba3b4725a1433
refs/heads/master: 43c09ce7927912c7867617cba0a265beea38a154
4 changes: 4 additions & 0 deletions trunk/arch/m32r/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ config GENERIC_CALIBRATE_DELAY
bool
default y

config SCHED_NO_NO_OMIT_FRAME_POINTER
bool
default y

config PREEMPT
bool "Preemptible Kernel"
help
Expand Down
11 changes: 11 additions & 0 deletions trunk/include/asm-m32r/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,30 @@
* `next' and `prev' should be struct task_struct, but it isn't always defined
*/

#if defined(CONFIG_FRAME_POINTER) || \
!defined(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER)
#define M32R_PUSH_FP " push fp\n"
#define M32R_POP_FP " pop fp\n"
#else
#define M32R_PUSH_FP ""
#define M32R_POP_FP ""
#endif

#define switch_to(prev, next, last) do { \
__asm__ __volatile__ ( \
" seth lr, #high(1f) \n" \
" or3 lr, lr, #low(1f) \n" \
" st lr, @%4 ; store old LR \n" \
" ld lr, @%5 ; load new LR \n" \
M32R_PUSH_FP \
" st sp, @%2 ; store old SP \n" \
" ld sp, @%3 ; load new SP \n" \
" push %1 ; store `prev' on new stack \n" \
" jmp lr \n" \
" .fillinsn \n" \
"1: \n" \
" pop %0 ; restore `__last' from new stack \n" \
M32R_POP_FP \
: "=r" (last) \
: "0" (prev), \
"r" (&(prev->thread.sp)), "r" (&(next->thread.sp)), \
Expand Down

0 comments on commit 3f07d71

Please sign in to comment.