Merge LinuxKPI changes from DragonflyBSD:
- Implement pagefault_disable() and pagefault_enable(). Sponsored by: Mellanox Technologies
This commit is contained in:
parent
dad154ab93
commit
da7c18e051
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=289565
@ -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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user