Root/
1 | /* |
2 | * Copyright (C) 2004-2006 Atmel Corporation |
3 | * |
4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 as |
6 | * published by the Free Software Foundation. |
7 | */ |
8 | |
9 | #include <asm/sysreg.h> |
10 | |
11 | .text |
12 | .global __switch_to |
13 | .type __switch_to, @function |
14 | |
15 | /* Switch thread context from "prev" to "next", returning "last" |
16 | * r12 : prev |
17 | * r11 : &prev->thread + 1 |
18 | * r10 : &next->thread |
19 | */ |
20 | __switch_to: |
21 | stm --r11, r0,r1,r2,r3,r4,r5,r6,r7,sp,lr |
22 | mfsr r9, SYSREG_SR |
23 | st.w --r11, r9 |
24 | ld.w r8, r10++ |
25 | /* |
26 | * schedule() may have been called from a mode with a different |
27 | * set of registers. Make sure we don't lose anything here. |
28 | */ |
29 | pushm r10,r12 |
30 | mtsr SYSREG_SR, r8 |
31 | frs /* flush the return stack */ |
32 | sub pc, -2 /* flush the pipeline */ |
33 | popm r10,r12 |
34 | ldm r10++, r0,r1,r2,r3,r4,r5,r6,r7,sp,pc |
35 | .size __switch_to, . - __switch_to |
36 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9