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
1ec9c5dd
Commit
1ec9c5dd
authored
Nov 25, 2011
by
Cong Wang
Committed by
Cong Wang
Mar 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include/linux/highmem.h: remove the second argument of k[un]map_atomic()
Signed-off-by:
Cong Wang
<
amwang@redhat.com
>
parent
980c19e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
include/linux/highmem.h
include/linux/highmem.h
+14
-14
No files found.
include/linux/highmem.h
View file @
1ec9c5dd
...
@@ -167,9 +167,9 @@ do { \
...
@@ -167,9 +167,9 @@ do { \
#ifndef clear_user_highpage
#ifndef clear_user_highpage
static
inline
void
clear_user_highpage
(
struct
page
*
page
,
unsigned
long
vaddr
)
static
inline
void
clear_user_highpage
(
struct
page
*
page
,
unsigned
long
vaddr
)
{
{
void
*
addr
=
kmap_atomic
(
page
,
KM_USER0
);
void
*
addr
=
kmap_atomic
(
page
);
clear_user_page
(
addr
,
vaddr
,
page
);
clear_user_page
(
addr
,
vaddr
,
page
);
kunmap_atomic
(
addr
,
KM_USER0
);
kunmap_atomic
(
addr
);
}
}
#endif
#endif
...
@@ -220,16 +220,16 @@ alloc_zeroed_user_highpage_movable(struct vm_area_struct *vma,
...
@@ -220,16 +220,16 @@ alloc_zeroed_user_highpage_movable(struct vm_area_struct *vma,
static
inline
void
clear_highpage
(
struct
page
*
page
)
static
inline
void
clear_highpage
(
struct
page
*
page
)
{
{
void
*
kaddr
=
kmap_atomic
(
page
,
KM_USER0
);
void
*
kaddr
=
kmap_atomic
(
page
);
clear_page
(
kaddr
);
clear_page
(
kaddr
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
kunmap_atomic
(
kaddr
);
}
}
static
inline
void
zero_user_segments
(
struct
page
*
page
,
static
inline
void
zero_user_segments
(
struct
page
*
page
,
unsigned
start1
,
unsigned
end1
,
unsigned
start1
,
unsigned
end1
,
unsigned
start2
,
unsigned
end2
)
unsigned
start2
,
unsigned
end2
)
{
{
void
*
kaddr
=
kmap_atomic
(
page
,
KM_USER0
);
void
*
kaddr
=
kmap_atomic
(
page
);
BUG_ON
(
end1
>
PAGE_SIZE
||
end2
>
PAGE_SIZE
);
BUG_ON
(
end1
>
PAGE_SIZE
||
end2
>
PAGE_SIZE
);
...
@@ -239,7 +239,7 @@ static inline void zero_user_segments(struct page *page,
...
@@ -239,7 +239,7 @@ static inline void zero_user_segments(struct page *page,
if
(
end2
>
start2
)
if
(
end2
>
start2
)
memset
(
kaddr
+
start2
,
0
,
end2
-
start2
);
memset
(
kaddr
+
start2
,
0
,
end2
-
start2
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
kunmap_atomic
(
kaddr
);
flush_dcache_page
(
page
);
flush_dcache_page
(
page
);
}
}
...
@@ -268,11 +268,11 @@ static inline void copy_user_highpage(struct page *to, struct page *from,
...
@@ -268,11 +268,11 @@ static inline void copy_user_highpage(struct page *to, struct page *from,
{
{
char
*
vfrom
,
*
vto
;
char
*
vfrom
,
*
vto
;
vfrom
=
kmap_atomic
(
from
,
KM_USER0
);
vfrom
=
kmap_atomic
(
from
);
vto
=
kmap_atomic
(
to
,
KM_USER1
);
vto
=
kmap_atomic
(
to
);
copy_user_page
(
vto
,
vfrom
,
vaddr
,
to
);
copy_user_page
(
vto
,
vfrom
,
vaddr
,
to
);
kunmap_atomic
(
vto
,
KM_USER1
);
kunmap_atomic
(
vto
);
kunmap_atomic
(
vfrom
,
KM_USER0
);
kunmap_atomic
(
vfrom
);
}
}
#endif
#endif
...
@@ -281,11 +281,11 @@ static inline void copy_highpage(struct page *to, struct page *from)
...
@@ -281,11 +281,11 @@ static inline void copy_highpage(struct page *to, struct page *from)
{
{
char
*
vfrom
,
*
vto
;
char
*
vfrom
,
*
vto
;
vfrom
=
kmap_atomic
(
from
,
KM_USER0
);
vfrom
=
kmap_atomic
(
from
);
vto
=
kmap_atomic
(
to
,
KM_USER1
);
vto
=
kmap_atomic
(
to
);
copy_page
(
vto
,
vfrom
);
copy_page
(
vto
,
vfrom
);
kunmap_atomic
(
vto
,
KM_USER1
);
kunmap_atomic
(
vto
);
kunmap_atomic
(
vfrom
,
KM_USER0
);
kunmap_atomic
(
vfrom
);
}
}
#endif
/* _LINUX_HIGHMEM_H */
#endif
/* _LINUX_HIGHMEM_H */
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