Blackfin: export show_stack() to modules
[deliverable/linux.git] / arch / blackfin / kernel / entry.S
CommitLineData
1394f032
BW
1/*
2 * File: arch/blackfin/kernel/entry.S
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30#include <linux/linkage.h>
31#include <asm/thread_info.h>
32#include <asm/errno.h>
8f65873e 33#include <asm/blackfin.h>
1394f032
BW
34#include <asm/asm-offsets.h>
35
639f6571 36#include <asm/context.S>
1394f032
BW
37
38#ifdef CONFIG_EXCPT_IRQ_SYSC_L1
39.section .l1.text
40#else
41.text
42#endif
43
44ENTRY(_ret_from_fork)
6a01f230
YL
45#ifdef CONFIG_IPIPE
46 [--sp] = reti; /* IRQs on. */
47 SP += 4;
48#endif /* CONFIG_IPIPE */
1394f032
BW
49 SP += -12;
50 call _schedule_tail;
51 SP += 12;
52 r0 = [sp + PT_IPEND];
53 cc = bittst(r0,1);
54 if cc jump .Lin_kernel;
55 RESTORE_CONTEXT
56 rti;
57.Lin_kernel:
58 bitclr(r0,1);
59 [sp + PT_IPEND] = r0;
60 /* do a 'fake' RTI by jumping to [RETI]
61 * to avoid clearing supervisor mode in child
aa770aa7
RG
62 */
63 r0 = [sp + PT_PC];
64 [sp + PT_P0] = r0;
65
1394f032 66 RESTORE_ALL_SYS
1394f032 67 jump (p0);
51be24c3 68ENDPROC(_ret_from_fork)
1394f032
BW
69
70ENTRY(_sys_fork)
71 r0 = -EINVAL;
2cfebf2b
MH
72#if (ANOMALY_05000371)
73 nop;
74 nop;
75 nop;
76#endif
1394f032 77 rts;
51be24c3 78ENDPROC(_sys_fork)
1394f032
BW
79
80ENTRY(_sys_vfork)
81 r0 = sp;
82 r0 += 24;
83 [--sp] = rets;
84 SP += -12;
85 call _bfin_vfork;
86 SP += 12;
87 rets = [sp++];
88 rts;
51be24c3 89ENDPROC(_sys_vfork)
1394f032
BW
90
91ENTRY(_sys_clone)
92 r0 = sp;
93 r0 += 24;
94 [--sp] = rets;
95 SP += -12;
96 call _bfin_clone;
97 SP += 12;
98 rets = [sp++];
99 rts;
51be24c3 100ENDPROC(_sys_clone)
1394f032
BW
101
102ENTRY(_sys_rt_sigreturn)
103 r0 = sp;
104 r0 += 24;
105 [--sp] = rets;
106 SP += -12;
107 call _do_rt_sigreturn;
108 SP += 12;
109 rets = [sp++];
110 rts;
51be24c3 111ENDPROC(_sys_rt_sigreturn)
This page took 0.262047 seconds and 5 git commands to generate.