vfs: Make __vfs_write() static
[linux/fpc-iii.git] / arch / h8300 / include / asm / segment.h
blob9adbf7e1aaa395e4337ab3b2e5e4729db9c2dc2c
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _H8300_SEGMENT_H
3 #define _H8300_SEGMENT_H
5 /* define constants */
6 #define USER_DATA (1)
7 #ifndef __USER_DS
8 #define __USER_DS (USER_DATA)
9 #endif
10 #define USER_PROGRAM (2)
11 #define SUPER_DATA (3)
12 #ifndef __KERNEL_DS
13 #define __KERNEL_DS (SUPER_DATA)
14 #endif
15 #define SUPER_PROGRAM (4)
17 #ifndef __ASSEMBLY__
19 typedef struct {
20 unsigned long seg;
21 } mm_segment_t;
23 #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
24 #define USER_DS MAKE_MM_SEG(__USER_DS)
25 #define KERNEL_DS MAKE_MM_SEG(__KERNEL_DS)
28 * Get/set the SFC/DFC registers for MOVES instructions
31 static inline mm_segment_t get_fs(void)
33 return USER_DS;
36 static inline mm_segment_t get_ds(void)
38 /* return the supervisor data space code */
39 return KERNEL_DS;
42 #define segment_eq(a, b) ((a).seg == (b).seg)
44 #endif /* __ASSEMBLY__ */
46 #endif /* _H8300_SEGMENT_H */