2017-07-27 12:22:14 +02:00
|
|
|
#ifndef __LINUX_UACCESS_H__
|
|
|
|
#define __LINUX_UACCESS_H__
|
|
|
|
|
|
|
|
#include <linux/sched.h>
|
2018-02-02 15:53:42 +01:00
|
|
|
#include <asm/uaccess.h>
|
2017-07-27 12:22:14 +02:00
|
|
|
/*
|
|
|
|
* These routines enable/disable the pagefault handler. If disabled, it will
|
|
|
|
* not take any locks and go straight to the fixup table.
|
|
|
|
*
|
|
|
|
* User access methods will not sleep when called from a pagefault_disabled()
|
|
|
|
* environment.
|
|
|
|
*/
|
|
|
|
static inline void pagefault_disable(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void pagefault_enable(void)
|
|
|
|
{
|
|
|
|
}
|
2018-02-02 15:53:42 +01:00
|
|
|
#ifndef ARCH_HAS_NOCACHE_UACCESS
|
|
|
|
|
|
|
|
static inline unsigned long __copy_from_user_inatomic_nocache(void *to,
|
|
|
|
const void __user *from, unsigned long n)
|
|
|
|
{
|
|
|
|
return __copy_from_user_inatomic(to, from, n);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline unsigned long __copy_from_user_nocache(void *to,
|
|
|
|
const void __user *from, unsigned long n)
|
|
|
|
{
|
|
|
|
return __copy_from_user(to, from, n);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* ARCH_HAS_NOCACHE_UACCESS */
|
2017-07-27 12:22:14 +02:00
|
|
|
|
|
|
|
#endif /* __LINUX_UACCESS_H__ */
|