1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _ASM_SCORE_SEGMENT_H 3 #define _ASM_SCORE_SEGMENT_H 4 5 #ifndef __ASSEMBLY__ 6 7 typedef struct { 8 unsigned long seg; 9 } mm_segment_t; 10 11 #define KERNEL_DS ((mm_segment_t){0}) 12 #define USER_DS KERNEL_DS 13 14 # define get_ds() (KERNEL_DS) 15 # define get_fs() (current_thread_info()->addr_limit) 16 # define set_fs(x) \ 17 do { current_thread_info()->addr_limit = (x); } while (0) 18 19 # define segment_eq(a, b) ((a).seg == (b).seg) 20 21 # endif /* __ASSEMBLY__ */ 22 #endif /* _ASM_SCORE_SEGMENT_H */ 23