diff options
| author | Chris Zankel <chris@zankel.net> | 2008-02-12 16:17:07 -0500 |
|---|---|---|
| committer | Chris Zankel <chris@zankel.net> | 2008-02-13 20:41:43 -0500 |
| commit | c658eac628aa8df040dfe614556d95e6da3a9ffb (patch) | |
| tree | e2211e1d5c894c29e92d4c744f504b38410efe41 /include/asm-xtensa/processor.h | |
| parent | 71d28e6c285548106f551fde13ca6d589433d843 (diff) | |
[XTENSA] Add support for configurable registers and coprocessors
The Xtensa architecture allows to define custom instructions and
registers. Registers that are bound to a coprocessor are only
accessible if the corresponding enable bit is set, which allows
to implement a 'lazy' context switch mechanism. Other registers
needs to be saved and restore at the time of the context switch
or during interrupt handling.
This patch adds support for these additional states:
- save and restore registers that are used by the compiler upon
interrupt entry and exit.
- context switch additional registers unbound to any coprocessor
- 'lazy' context switch of registers bound to a coprocessor
- ptrace interface to provide access to additional registers
- update configuration files in include/asm-xtensa/variant-fsf
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'include/asm-xtensa/processor.h')
| -rw-r--r-- | include/asm-xtensa/processor.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/include/asm-xtensa/processor.h b/include/asm-xtensa/processor.h index 96408f4366..4918a4e96d 100644 --- a/include/asm-xtensa/processor.h +++ b/include/asm-xtensa/processor.h | |||
| @@ -103,10 +103,6 @@ struct thread_struct { | |||
| 103 | unsigned long dbreaka[XCHAL_NUM_DBREAK]; | 103 | unsigned long dbreaka[XCHAL_NUM_DBREAK]; |
| 104 | unsigned long dbreakc[XCHAL_NUM_DBREAK]; | 104 | unsigned long dbreakc[XCHAL_NUM_DBREAK]; |
| 105 | 105 | ||
| 106 | /* Allocate storage for extra state and coprocessor state. */ | ||
| 107 | unsigned char cp_save[XTENSA_CP_EXTRA_SIZE] | ||
| 108 | __attribute__ ((aligned(XTENSA_CP_EXTRA_ALIGN))); | ||
| 109 | |||
| 110 | /* Make structure 16 bytes aligned. */ | 106 | /* Make structure 16 bytes aligned. */ |
| 111 | int align[0] __attribute__ ((aligned(16))); | 107 | int align[0] __attribute__ ((aligned(16))); |
| 112 | }; | 108 | }; |
| @@ -162,21 +158,16 @@ struct thread_struct { | |||
| 162 | struct task_struct; | 158 | struct task_struct; |
| 163 | struct mm_struct; | 159 | struct mm_struct; |
| 164 | 160 | ||
| 165 | // FIXME: do we need release_thread for CP?? | ||
| 166 | /* Free all resources held by a thread. */ | 161 | /* Free all resources held by a thread. */ |
| 167 | #define release_thread(thread) do { } while(0) | 162 | #define release_thread(thread) do { } while(0) |
| 168 | 163 | ||
| 169 | // FIXME: do we need prepare_to_copy (lazy status) for CP?? | ||
| 170 | /* Prepare to copy thread state - unlazy all lazy status */ | 164 | /* Prepare to copy thread state - unlazy all lazy status */ |
| 171 | #define prepare_to_copy(tsk) do { } while (0) | 165 | extern void prepare_to_copy(struct task_struct*); |
| 172 | 166 | ||
| 173 | /* | 167 | /* Create a kernel thread without removing it from tasklists */ |
| 174 | * create a kernel thread without removing it from tasklists | ||
| 175 | */ | ||
| 176 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | 168 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); |
| 177 | 169 | ||
| 178 | /* Copy and release all segment info associated with a VM */ | 170 | /* Copy and release all segment info associated with a VM */ |
| 179 | |||
| 180 | #define copy_segments(p, mm) do { } while(0) | 171 | #define copy_segments(p, mm) do { } while(0) |
| 181 | #define release_segments(mm) do { } while(0) | 172 | #define release_segments(mm) do { } while(0) |
| 182 | #define forget_segments() do { } while (0) | 173 | #define forget_segments() do { } while (0) |
