Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b5ca71a5
Commit
b5ca71a5
authored
Nov 02, 2005
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Plain Diff
Merge
git://oak/home/sfr/kernels/iseries/work
parents
a0005034
48fe4871
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
21 deletions
+8
-21
include/asm-powerpc/uaccess.h
include/asm-powerpc/uaccess.h
+8
-21
No files found.
include/asm-powerpc/uaccess.h
View file @
b5ca71a5
...
@@ -115,10 +115,8 @@ struct exception_table_entry {
...
@@ -115,10 +115,8 @@ struct exception_table_entry {
#define __put_user64(x, ptr) __put_user(x, ptr)
#define __put_user64(x, ptr) __put_user(x, ptr)
#endif
#endif
#ifdef __powerpc64__
#define __get_user_unaligned __get_user
#define __get_user_unaligned __get_user
#define __put_user_unaligned __put_user
#define __put_user_unaligned __put_user
#endif
extern
long
__put_user_bad
(
void
);
extern
long
__put_user_bad
(
void
);
...
@@ -333,9 +331,6 @@ extern inline unsigned long copy_to_user(void __user *to,
...
@@ -333,9 +331,6 @@ extern inline unsigned long copy_to_user(void __user *to,
return
n
;
return
n
;
}
}
#define __copy_to_user_inatomic __copy_to_user
#define __copy_from_user_inatomic __copy_from_user
#else
/* __powerpc64__ */
#else
/* __powerpc64__ */
#define __copy_in_user(to, from, size) \
#define __copy_in_user(to, from, size) \
...
@@ -348,6 +343,8 @@ extern unsigned long copy_to_user(void __user *to, const void *from,
...
@@ -348,6 +343,8 @@ extern unsigned long copy_to_user(void __user *to, const void *from,
extern
unsigned
long
copy_in_user
(
void
__user
*
to
,
const
void
__user
*
from
,
extern
unsigned
long
copy_in_user
(
void
__user
*
to
,
const
void
__user
*
from
,
unsigned
long
n
);
unsigned
long
n
);
#endif
/* __powerpc64__ */
static
inline
unsigned
long
__copy_from_user_inatomic
(
void
*
to
,
static
inline
unsigned
long
__copy_from_user_inatomic
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
)
const
void
__user
*
from
,
unsigned
long
n
)
{
{
...
@@ -368,9 +365,10 @@ static inline unsigned long __copy_from_user_inatomic(void *to,
...
@@ -368,9 +365,10 @@ static inline unsigned long __copy_from_user_inatomic(void *to,
__get_user_size
(
*
(
u64
*
)
to
,
from
,
8
,
ret
);
__get_user_size
(
*
(
u64
*
)
to
,
from
,
8
,
ret
);
break
;
break
;
}
}
return
(
ret
==
-
EFAULT
)
?
n
:
0
;
if
(
ret
==
0
)
return
0
;
}
}
return
__copy_tofrom_user
((
__force
void
__user
*
)
to
,
from
,
n
);
return
__copy_tofrom_user
((
__force
void
__user
*
)
to
,
from
,
n
);
}
}
static
inline
unsigned
long
__copy_to_user_inatomic
(
void
__user
*
to
,
static
inline
unsigned
long
__copy_to_user_inatomic
(
void
__user
*
to
,
...
@@ -393,33 +391,24 @@ static inline unsigned long __copy_to_user_inatomic(void __user *to,
...
@@ -393,33 +391,24 @@ static inline unsigned long __copy_to_user_inatomic(void __user *to,
__put_user_size
(
*
(
u64
*
)
from
,
(
u64
__user
*
)
to
,
8
,
ret
);
__put_user_size
(
*
(
u64
*
)
from
,
(
u64
__user
*
)
to
,
8
,
ret
);
break
;
break
;
}
}
return
(
ret
==
-
EFAULT
)
?
n
:
0
;
if
(
ret
==
0
)
return
0
;
}
}
return
__copy_tofrom_user
(
to
,
(
__force
const
void
__user
*
)
from
,
n
);
return
__copy_tofrom_user
(
to
,
(
__force
const
void
__user
*
)
from
,
n
);
}
}
#endif
/* __powerpc64__ */
static
inline
unsigned
long
__copy_from_user
(
void
*
to
,
static
inline
unsigned
long
__copy_from_user
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
size
)
const
void
__user
*
from
,
unsigned
long
size
)
{
{
might_sleep
();
might_sleep
();
#ifndef __powerpc64__
return
__copy_tofrom_user
((
__force
void
__user
*
)
to
,
from
,
size
);
#else
/* __powerpc64__ */
return
__copy_from_user_inatomic
(
to
,
from
,
size
);
return
__copy_from_user_inatomic
(
to
,
from
,
size
);
#endif
/* __powerpc64__ */
}
}
static
inline
unsigned
long
__copy_to_user
(
void
__user
*
to
,
static
inline
unsigned
long
__copy_to_user
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
size
)
const
void
*
from
,
unsigned
long
size
)
{
{
might_sleep
();
might_sleep
();
#ifndef __powerpc64__
return
__copy_tofrom_user
(
to
,
(
__force
void
__user
*
)
from
,
size
);
#else
/* __powerpc64__ */
return
__copy_to_user_inatomic
(
to
,
from
,
size
);
return
__copy_to_user_inatomic
(
to
,
from
,
size
);
#endif
/* __powerpc64__ */
}
}
extern
unsigned
long
__clear_user
(
void
__user
*
addr
,
unsigned
long
size
);
extern
unsigned
long
__clear_user
(
void
__user
*
addr
,
unsigned
long
size
);
...
@@ -429,12 +418,10 @@ static inline unsigned long clear_user(void __user *addr, unsigned long size)
...
@@ -429,12 +418,10 @@ static inline unsigned long clear_user(void __user *addr, unsigned long size)
might_sleep
();
might_sleep
();
if
(
likely
(
access_ok
(
VERIFY_WRITE
,
addr
,
size
)))
if
(
likely
(
access_ok
(
VERIFY_WRITE
,
addr
,
size
)))
return
__clear_user
(
addr
,
size
);
return
__clear_user
(
addr
,
size
);
#ifndef __powerpc64__
if
((
unsigned
long
)
addr
<
TASK_SIZE
)
{
if
((
unsigned
long
)
addr
<
TASK_SIZE
)
{
unsigned
long
over
=
(
unsigned
long
)
addr
+
size
-
TASK_SIZE
;
unsigned
long
over
=
(
unsigned
long
)
addr
+
size
-
TASK_SIZE
;
return
__clear_user
(
addr
,
size
-
over
)
+
over
;
return
__clear_user
(
addr
,
size
-
over
)
+
over
;
}
}
#endif
/* __powerpc64__ */
return
size
;
return
size
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment