diff options
author | Sebastian Siewior <bigeasy@linutronix.de> | 2008-04-30 22:16:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-01 11:08:35 -0400 |
commit | a19325a77432338d2710b3ebbe7fd8e6627e81e3 (patch) | |
tree | da28058ae14e32e2aeaebffd3c2eba2b31a7adda /arch/m68knommu/platform/coldfire | |
parent | 2d7f16d6d12682c41fb287ea8261df8e4679f638 (diff) |
m68knommu: ColdFire add support for kernel preemption
As the subject says this patch adds the support for kernel preemption
on m68knommu Coldfire. I thing the same changes could be applied to
68360 & 68328 but since I don't have the HW for testing, I don't touch it.
Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68knommu/platform/coldfire')
-rw-r--r-- | arch/m68knommu/platform/coldfire/entry.S | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/m68knommu/platform/coldfire/entry.S b/arch/m68knommu/platform/coldfire/entry.S index 111b66dc737b..1af7c1d650f6 100644 --- a/arch/m68knommu/platform/coldfire/entry.S +++ b/arch/m68knommu/platform/coldfire/entry.S | |||
@@ -106,6 +106,22 @@ ret_from_exception: | |||
106 | btst #5,%sp@(PT_SR) /* check if returning to kernel */ | 106 | btst #5,%sp@(PT_SR) /* check if returning to kernel */ |
107 | jeq Luser_return /* if so, skip resched, signals */ | 107 | jeq Luser_return /* if so, skip resched, signals */ |
108 | 108 | ||
109 | #ifdef CONFIG_PREEMPT | ||
110 | movel %sp,%d1 /* get thread_info pointer */ | ||
111 | andl #-THREAD_SIZE,%d1 /* at base of kernel stack */ | ||
112 | movel %d1,%a0 | ||
113 | movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ | ||
114 | andl #_TIF_NEED_RESCHED,%d1 | ||
115 | jeq Lkernel_return | ||
116 | |||
117 | movel %a0@(TI_PREEMPTCOUNT),%d1 | ||
118 | cmpl #0,%d1 | ||
119 | jne Lkernel_return | ||
120 | |||
121 | pea Lkernel_return | ||
122 | jmp preempt_schedule_irq /* preempt the kernel */ | ||
123 | #endif | ||
124 | |||
109 | Lkernel_return: | 125 | Lkernel_return: |
110 | moveml %sp@,%d1-%d5/%a0-%a2 | 126 | moveml %sp@,%d1-%d5/%a0-%a2 |
111 | lea %sp@(32),%sp /* space for 8 regs */ | 127 | lea %sp@(32),%sp /* space for 8 regs */ |