aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-cris/arch-v32/processor.h
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2008-11-19 09:48:07 -0500
committerDavid Vrabel <david.vrabel@csr.com>2008-11-19 09:48:07 -0500
commitdba0a918722ee0f0ba3442575e4448c3ab622be4 (patch)
treefdb466cf09e7916135098d651b18924b2fe9ba5f /include/asm-cris/arch-v32/processor.h
parent0996e6382482ce9014787693d3884e9468153a5c (diff)
parent7f0f598a0069d1ab072375965a4b69137233169c (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
Diffstat (limited to 'include/asm-cris/arch-v32/processor.h')
-rw-r--r--include/asm-cris/arch-v32/processor.h59
1 files changed, 0 insertions, 59 deletions
diff --git a/include/asm-cris/arch-v32/processor.h b/include/asm-cris/arch-v32/processor.h
deleted file mode 100644
index f80b47790ca6..000000000000
--- a/include/asm-cris/arch-v32/processor.h
+++ /dev/null
@@ -1,59 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_PROCESSOR_H
2#define _ASM_CRIS_ARCH_PROCESSOR_H
3
4
5/* Return current instruction pointer. */
6#define current_text_addr() \
7 ({void *pc; __asm__ __volatile__ ("lapcq .,%0" : "=rm" (pc)); pc;})
8
9/*
10 * Since CRIS doesn't do hardware task-switching this hasn't really anything to
11 * do with the proccessor itself, it's just here for legacy reasons. This is
12 * used when task-switching using _resume defined in entry.S. The offsets here
13 * are hardcoded into _resume, so if this struct is changed, entry.S needs to be
14 * changed as well.
15 */
16struct thread_struct {
17 unsigned long ksp; /* Kernel stack pointer. */
18 unsigned long usp; /* User stack pointer. */
19 unsigned long ccs; /* Saved flags register. */
20};
21
22/*
23 * User-space process size. This is hardcoded into a few places, so don't
24 * changed it unless everything's clear!
25 */
26#ifndef CONFIG_ETRAX_VCS_SIM
27#define TASK_SIZE (0xB0000000UL)
28#else
29#define TASK_SIZE (0xA0000000UL)
30#endif
31
32/* CCS I=1, enable interrupts. */
33#define INIT_THREAD { 0, 0, (1 << I_CCS_BITNR) }
34
35#define KSTK_EIP(tsk) \
36({ \
37 unsigned long eip = 0; \
38 unsigned long regs = (unsigned long)task_pt_regs(tsk); \
39 if (regs > PAGE_SIZE && virt_addr_valid(regs)) \
40 eip = ((struct pt_regs *)regs)->erp; \
41 eip; \
42})
43
44/*
45 * Give the thread a program location, set user-mode and switch user
46 * stackpointer.
47 */
48#define start_thread(regs, ip, usp) \
49do { \
50 set_fs(USER_DS); \
51 regs->erp = ip; \
52 regs->ccs |= 1 << (U_CCS_BITNR + CCS_SHIFT); \
53 wrusp(usp); \
54} while(0)
55
56/* Nothing special to do for v32 when handling a kernel bus fault fixup. */
57#define arch_fixup(regs) {};
58
59#endif /* _ASM_CRIS_ARCH_PROCESSOR_H */