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 9740d6b8ae1..c3bb8a755b0 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -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 diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index f62f5c9abba..b291b2f7295 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h @@ -21,12 +21,22 @@   * `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" \ @@ -34,6 +44,7 @@  		"	.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)), \  |