1
2 #ifndef __ASM_SH_SEGMENT_H
3 #define __ASM_SH_SEGMENT_H
4
5 #ifndef __ASSEMBLY__
6
7 typedef struct {
8 unsigned long seg;
9 } mm_segment_t;
10
11 #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
12
13
14
15
16
17
18
19
20 #define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFFUL)
21 #ifdef CONFIG_MMU
22 #define USER_DS MAKE_MM_SEG(PAGE_OFFSET)
23 #else
24 #define USER_DS KERNEL_DS
25 #endif
26
27 #define segment_eq(a, b) ((a).seg == (b).seg)
28
29
30 #define get_fs() (current_thread_info()->addr_limit)
31 #define set_fs(x) (current_thread_info()->addr_limit = (x))
32
33 #endif
34 #endif