| .. | .. |
|---|
| 35 | 35 | |
|---|
| 36 | 36 | #include <linux/compiler.h> |
|---|
| 37 | 37 | #include <linux/page-flags.h> |
|---|
| 38 | | -#include <linux/mm.h> |
|---|
| 39 | 38 | |
|---|
| 40 | 39 | #include <asm/intrinsics.h> |
|---|
| 41 | | -#include <asm/pgtable.h> |
|---|
| 40 | +#include <linux/pgtable.h> |
|---|
| 42 | 41 | #include <asm/io.h> |
|---|
| 43 | 42 | #include <asm/extable.h> |
|---|
| 44 | 43 | |
|---|
| .. | .. |
|---|
| 48 | 47 | #define KERNEL_DS ((mm_segment_t) { ~0UL }) /* cf. access_ok() */ |
|---|
| 49 | 48 | #define USER_DS ((mm_segment_t) { TASK_SIZE-1 }) /* cf. access_ok() */ |
|---|
| 50 | 49 | |
|---|
| 51 | | -#define get_ds() (KERNEL_DS) |
|---|
| 52 | 50 | #define get_fs() (current_thread_info()->addr_limit) |
|---|
| 53 | 51 | #define set_fs(x) (current_thread_info()->addr_limit = (x)) |
|---|
| 54 | 52 | |
|---|
| 55 | | -#define segment_eq(a, b) ((a).seg == (b).seg) |
|---|
| 53 | +#define uaccess_kernel() (get_fs().seg == KERNEL_DS.seg) |
|---|
| 56 | 54 | |
|---|
| 57 | 55 | /* |
|---|
| 58 | 56 | * When accessing user memory, we need to make sure the entire area really is in |
|---|
| .. | .. |
|---|
| 67 | 65 | return likely(addr <= seg) && |
|---|
| 68 | 66 | (seg == KERNEL_DS.seg || likely(REGION_OFFSET(addr) < RGN_MAP_LIMIT)); |
|---|
| 69 | 67 | } |
|---|
| 70 | | -#define access_ok(type, addr, size) __access_ok((addr), (size)) |
|---|
| 68 | +#define access_ok(addr, size) __access_ok((addr), (size)) |
|---|
| 71 | 69 | |
|---|
| 72 | 70 | /* |
|---|
| 73 | 71 | * These are the main single-value transfer routines. They automatically |
|---|