[PATCH] x86_64: "invalid operand" -> "invalid opcode"
[usb.git] / include / asm-cris / arch-v32 / processor.h
blob8c939bf27987f36a6c89cb3acfe6db6d874f2419
1 #ifndef _ASM_CRIS_ARCH_PROCESSOR_H
2 #define _ASM_CRIS_ARCH_PROCESSOR_H
4 #include <linux/config.h>
6 /* Return current instruction pointer. */
7 #define current_text_addr() \
8 ({void *pc; __asm__ __volatile__ ("lapcq .,%0" : "=rm" (pc)); pc;})
11 * Since CRIS doesn't do hardware task-switching this hasn't really anything to
12 * do with the proccessor itself, it's just here for legacy reasons. This is
13 * used when task-switching using _resume defined in entry.S. The offsets here
14 * are hardcoded into _resume, so if this struct is changed, entry.S needs to be
15 * changed as well.
17 struct thread_struct {
18 unsigned long ksp; /* Kernel stack pointer. */
19 unsigned long usp; /* User stack pointer. */
20 unsigned long ccs; /* Saved flags register. */
24 * User-space process size. This is hardcoded into a few places, so don't
25 * changed it unless everything's clear!
27 #ifndef CONFIG_ETRAXFS_SIM
28 #define TASK_SIZE (0xB0000000UL)
29 #else
30 #define TASK_SIZE (0xA0000000UL)
31 #endif
33 /* CCS I=1, enable interrupts. */
34 #define INIT_THREAD { 0, 0, (1 << I_CCS_BITNR) }
36 #define KSTK_EIP(tsk) \
37 ({ \
38 unsigned long eip = 0; \
39 unsigned long regs = (unsigned long)user_regs(tsk); \
40 if (regs > PAGE_SIZE && virt_addr_valid(regs)) \
41 eip = ((struct pt_regs *)regs)->erp; \
42 eip; \
46 * Give the thread a program location, set user-mode and switch user
47 * stackpointer.
49 #define start_thread(regs, ip, usp) \
50 do { \
51 set_fs(USER_DS); \
52 regs->erp = ip; \
53 regs->ccs |= 1 << (U_CCS_BITNR + CCS_SHIFT); \
54 wrusp(usp); \
55 } while(0)
57 /* Nothing special to do for v32 when handling a kernel bus fault fixup. */
58 #define arch_fixup(regs) {};
60 #endif /* _ASM_CRIS_ARCH_PROCESSOR_H */