diff options
| author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2015-10-19 10:56:32 +0000 |
|---|---|---|
| committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2015-10-19 10:56:32 +0000 |
| commit | da7c18e051f83c8f98e9e578a78da26947865282 (patch) | |
| tree | 1b3b4d55a893b6ace25eb3cb7f97df8e9f4ab9b0 /sys/ofed/include/linux | |
| parent | dad154ab93d84ee3e90dd44db92220e8a0b8eb2e (diff) | |
Notes
Diffstat (limited to 'sys/ofed/include/linux')
| -rw-r--r-- | sys/ofed/include/linux/uaccess.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/ofed/include/linux/uaccess.h b/sys/ofed/include/linux/uaccess.h index 6ba34f7025b0..bab848c6ea09 100644 --- a/sys/ofed/include/linux/uaccess.h +++ b/sys/ofed/include/linux/uaccess.h @@ -2,7 +2,8 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2015 François Tigeot * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,4 +33,14 @@ #define get_user(_x, _p) -copyin((_p), &(_x), sizeof(*(_p))) #define put_user(_x, _p) -copyout(&(_x), (_p), sizeof(*(_p))) +static inline void pagefault_disable(void) +{ + curthread_pflags_set(TDP_NOFAULTING | TDP_RESETSPUR); +} + +static inline void pagefault_enable(void) +{ + curthread_pflags_restore(~(TDP_NOFAULTING | TDP_RESETSPUR)); +} + #endif /* _LINUX_UACCESS_H_ */ |
