14 Jul 2008 04:40
get_user & put_user accessing L1
If no one has any objections, this adds L1 instruction support for
put_user and get_user macros.
Index: asm-blackfin/uaccess.h
===================================================================
--- asm-blackfin/uaccess.h (revision 4802)
+++ asm-blackfin/uaccess.h (working copy)
<at> <at> -18,6 +18,8 <at> <at>
# include <asm/bfin-global.h>
#endif
+#include <asm/dma.h>
+
#define get_ds() (KERNEL_DS)
#define get_fs() (current_thread_info()->addr_limit)
<at> <at> -99,6 +101,10 <at> <at>
if (!access_ok(VERIFY_WRITE, _p, sizeof(*(_p)))) {\
_err = -EFAULT; \
} \
+ else if ( unlikely(L1_CODE_LENGTH != 0 && \
+ (unsigned int)p >= L1_CODE_START && \
+ (unsigned int)p <= L1_CODE_START + L1_CODE_LENGTH)) \
+ dma_memcpy(_p, &_x, sizeof (*(_p))); \
else { \
switch (sizeof (*(_p))) { \
case 1: \
<at> <at> -156,6 +162,10 <at> <at>
if (!access_ok(VERIFY_READ, _p, sizeof(*(_p)))) { \
_err = -EFAULT; \
(Continue reading)
RSS Feed