1 #ifndef _M68K_SEGMENT_H
2 #define _M68K_SEGMENT_H
5 /* Address spaces (FC0-FC2) */
8 #define __USER_DS (USER_DATA)
10 #define USER_PROGRAM (2)
11 #define SUPER_DATA (5)
13 #define __KERNEL_DS (SUPER_DATA)
15 #define SUPER_PROGRAM (6)
24 #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
25 #define USER_DS MAKE_MM_SEG(__USER_DS)
26 #define KERNEL_DS MAKE_MM_SEG(__KERNEL_DS)
29 * Get/set the SFC/DFC registers for MOVES instructions
32 static inline mm_segment_t
get_fs(void)
35 __asm__ ("movec %/dfc,%0":"=r" (_v
.seg
):);
40 static inline mm_segment_t
get_ds(void)
42 /* return the supervisor data space code */
46 static inline void set_fs(mm_segment_t val
)
48 __asm__
__volatile__ ("movec %0,%/sfc\n\t"
50 : /* no outputs */ : "r" (val
.seg
) : "memory");
53 #define segment_eq(a,b) ((a).seg == (b).seg)
55 #endif /* __ASSEMBLY__ */
57 #endif /* _M68K_SEGMENT_H */