| .. | .. |
|---|
| 45 | 45 | : /* no outputs */ : "r" (val.seg) : "memory"); |
|---|
| 46 | 46 | } |
|---|
| 47 | 47 | |
|---|
| 48 | | -static inline mm_segment_t get_ds(void) |
|---|
| 49 | | -{ |
|---|
| 50 | | - /* return the supervisor data space code */ |
|---|
| 51 | | - return KERNEL_DS; |
|---|
| 52 | | -} |
|---|
| 53 | | - |
|---|
| 54 | 48 | #else |
|---|
| 55 | 49 | #define USER_DS MAKE_MM_SEG(TASK_SIZE) |
|---|
| 56 | 50 | #define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) |
|---|
| 57 | | -#define get_ds() (KERNEL_DS) |
|---|
| 58 | 51 | #define get_fs() (current_thread_info()->addr_limit) |
|---|
| 59 | 52 | #define set_fs(x) (current_thread_info()->addr_limit = (x)) |
|---|
| 60 | 53 | #endif |
|---|
| 61 | 54 | |
|---|
| 62 | | -#define segment_eq(a, b) ((a).seg == (b).seg) |
|---|
| 55 | +#define uaccess_kernel() (get_fs().seg == KERNEL_DS.seg) |
|---|
| 63 | 56 | |
|---|
| 64 | 57 | #endif /* __ASSEMBLY__ */ |
|---|
| 65 | 58 | |
|---|