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)
36 __asm__ ("movec %/dfc,%0":"=r" (_v
.seg
):);
44 static inline mm_segment_t
get_ds(void)
46 /* return the supervisor data space code */
50 static inline void set_fs(mm_segment_t val
)
53 __asm__
__volatile__ ("movec %0,%/sfc\n\t"
55 : /* no outputs */ : "r" (val
.seg
) : "memory");
59 #define segment_eq(a,b) ((a).seg == (b).seg)
61 #endif /* __ASSEMBLY__ */
63 #endif /* _M68K_SEGMENT_H */