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
Kirill Smelkov
linux
Commits
9d5fa8ef
Commit
9d5fa8ef
authored
Jun 22, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: small __access_ok optimisation
parent
7252df80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
include/asm-ppc64/uaccess.h
include/asm-ppc64/uaccess.h
+5
-2
No files found.
include/asm-ppc64/uaccess.h
View file @
9d5fa8ef
...
@@ -44,11 +44,14 @@
...
@@ -44,11 +44,14 @@
* Address valid if:
* Address valid if:
* - "addr" doesn't have any high-bits set
* - "addr" doesn't have any high-bits set
* - AND "size" doesn't have any high-bits set
* - AND "size" doesn't have any high-bits set
* - AND "addr+size" doesn't have any high-bits set
* - OR we are in kernel mode.
* - OR we are in kernel mode.
*
* We dont have to check for high bits in (addr+size) because the first
* two checks force the maximum result to be below the start of the
* kernel region.
*/
*/
#define __access_ok(addr,size,segment) \
#define __access_ok(addr,size,segment) \
(((segment).seg & (addr | size
| (addr+size)
)) == 0)
(((segment).seg & (addr | size )) == 0)
#define access_ok(type,addr,size) \
#define access_ok(type,addr,size) \
__access_ok(((unsigned long)(addr)),(size),get_fs())
__access_ok(((unsigned long)(addr)),(size),get_fs())
...
...
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