| .. | .. |
|---|
| 12 | 12 | #ifndef _XTENSA_COPROCESSOR_H |
|---|
| 13 | 13 | #define _XTENSA_COPROCESSOR_H |
|---|
| 14 | 14 | |
|---|
| 15 | | -#include <linux/stringify.h> |
|---|
| 16 | | -#include <variant/core.h> |
|---|
| 17 | 15 | #include <variant/tie.h> |
|---|
| 16 | +#include <asm/core.h> |
|---|
| 18 | 17 | #include <asm/types.h> |
|---|
| 19 | 18 | |
|---|
| 20 | 19 | #ifdef __ASSEMBLY__ |
|---|
| .. | .. |
|---|
| 90 | 89 | |
|---|
| 91 | 90 | #ifndef __ASSEMBLY__ |
|---|
| 92 | 91 | |
|---|
| 93 | | - |
|---|
| 94 | | -#if XCHAL_HAVE_CP |
|---|
| 95 | | - |
|---|
| 96 | | -#define RSR_CPENABLE(x) do { \ |
|---|
| 97 | | - __asm__ __volatile__("rsr %0, cpenable" : "=a" (x)); \ |
|---|
| 98 | | - } while(0); |
|---|
| 99 | | -#define WSR_CPENABLE(x) do { \ |
|---|
| 100 | | - __asm__ __volatile__("wsr %0, cpenable; rsync" :: "a" (x)); \ |
|---|
| 101 | | - } while(0); |
|---|
| 102 | | - |
|---|
| 103 | | -#endif /* XCHAL_HAVE_CP */ |
|---|
| 104 | | - |
|---|
| 105 | | - |
|---|
| 106 | 92 | /* |
|---|
| 107 | 93 | * Additional registers. |
|---|
| 108 | 94 | * We define three types of additional registers: |
|---|
| .. | .. |
|---|
| 157 | 143 | __attribute__ ((aligned (XCHAL_CP7_SA_ALIGN))); |
|---|
| 158 | 144 | |
|---|
| 159 | 145 | extern struct thread_info* coprocessor_owner[XCHAL_CP_MAX]; |
|---|
| 160 | | -extern void coprocessor_save(void*, int); |
|---|
| 161 | | -extern void coprocessor_load(void*, int); |
|---|
| 162 | 146 | extern void coprocessor_flush(struct thread_info*, int); |
|---|
| 163 | | -extern void coprocessor_restore(struct thread_info*, int); |
|---|
| 164 | 147 | |
|---|
| 165 | 148 | extern void coprocessor_release_all(struct thread_info*); |
|---|
| 166 | 149 | extern void coprocessor_flush_all(struct thread_info*); |
|---|
| 167 | | - |
|---|
| 168 | | -static inline void coprocessor_clear_cpenable(void) |
|---|
| 169 | | -{ |
|---|
| 170 | | - unsigned long i = 0; |
|---|
| 171 | | - WSR_CPENABLE(i); |
|---|
| 172 | | -} |
|---|
| 173 | 150 | |
|---|
| 174 | 151 | #endif /* XTENSA_HAVE_COPROCESSORS */ |
|---|
| 175 | 152 | |
|---|