diff options
-rw-r--r-- | arch/m32r/Kconfig | 4 | ||||
-rw-r--r-- | include/asm-m32r/system.h | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 9740d6b8ae11..c3bb8a755b00 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -241,6 +241,10 @@ config GENERIC_CALIBRATE_DELAY | |||
241 | bool | 241 | bool |
242 | default y | 242 | default y |
243 | 243 | ||
244 | config SCHED_NO_NO_OMIT_FRAME_POINTER | ||
245 | bool | ||
246 | default y | ||
247 | |||
244 | config PREEMPT | 248 | config PREEMPT |
245 | bool "Preemptible Kernel" | 249 | bool "Preemptible Kernel" |
246 | help | 250 | help |
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index f62f5c9abba6..b291b2f72954 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h | |||
@@ -21,12 +21,22 @@ | |||
21 | * `next' and `prev' should be struct task_struct, but it isn't always defined | 21 | * `next' and `prev' should be struct task_struct, but it isn't always defined |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #if defined(CONFIG_FRAME_POINTER) || \ | ||
25 | !defined(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER) | ||
26 | #define M32R_PUSH_FP " push fp\n" | ||
27 | #define M32R_POP_FP " pop fp\n" | ||
28 | #else | ||
29 | #define M32R_PUSH_FP "" | ||
30 | #define M32R_POP_FP "" | ||
31 | #endif | ||
32 | |||
24 | #define switch_to(prev, next, last) do { \ | 33 | #define switch_to(prev, next, last) do { \ |
25 | __asm__ __volatile__ ( \ | 34 | __asm__ __volatile__ ( \ |
26 | " seth lr, #high(1f) \n" \ | 35 | " seth lr, #high(1f) \n" \ |
27 | " or3 lr, lr, #low(1f) \n" \ | 36 | " or3 lr, lr, #low(1f) \n" \ |
28 | " st lr, @%4 ; store old LR \n" \ | 37 | " st lr, @%4 ; store old LR \n" \ |
29 | " ld lr, @%5 ; load new LR \n" \ | 38 | " ld lr, @%5 ; load new LR \n" \ |
39 | M32R_PUSH_FP \ | ||
30 | " st sp, @%2 ; store old SP \n" \ | 40 | " st sp, @%2 ; store old SP \n" \ |
31 | " ld sp, @%3 ; load new SP \n" \ | 41 | " ld sp, @%3 ; load new SP \n" \ |
32 | " push %1 ; store `prev' on new stack \n" \ | 42 | " push %1 ; store `prev' on new stack \n" \ |
@@ -34,6 +44,7 @@ | |||
34 | " .fillinsn \n" \ | 44 | " .fillinsn \n" \ |
35 | "1: \n" \ | 45 | "1: \n" \ |
36 | " pop %0 ; restore `__last' from new stack \n" \ | 46 | " pop %0 ; restore `__last' from new stack \n" \ |
47 | M32R_POP_FP \ | ||
37 | : "=r" (last) \ | 48 | : "=r" (last) \ |
38 | : "0" (prev), \ | 49 | : "0" (prev), \ |
39 | "r" (&(prev->thread.sp)), "r" (&(next->thread.sp)), \ | 50 | "r" (&(prev->thread.sp)), "r" (&(next->thread.sp)), \ |