David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __ASMARC_SEGMENT_H |
| 7 | #define __ASMARC_SEGMENT_H |
| 8 | |
| 9 | #ifndef __ASSEMBLY__ |
| 10 | |
| 11 | typedef unsigned long mm_segment_t; |
| 12 | |
| 13 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) |
| 14 | |
| 15 | #define KERNEL_DS MAKE_MM_SEG(0) |
| 16 | #define USER_DS MAKE_MM_SEG(TASK_SIZE) |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 17 | #define uaccess_kernel() (get_fs() == KERNEL_DS) |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 18 | |
| 19 | #endif /* __ASSEMBLY__ */ |
| 20 | #endif /* __ASMARC_SEGMENT_H */ |