1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef __ASM_SH_SEGMENT_H
13#define __ASM_SH_SEGMENT_H
14
15#ifndef __ASSEMBLY__
16
17typedef struct {
18 unsigned long seg;
19} mm_segment_t;
20
21#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
22
23#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFFUL)
24#define USER_DS MAKE_MM_SEG(PAGE_OFFSET)
25
26#define segment_eq(a,b) ((a).seg == (b).seg)
27
28#define get_ds() (KERNEL_DS)
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
35