projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d702909
)
include/linux/mm.h: add PAGE_ALIGNED() helper
author
Andrew Morton
<
[email protected]
>
Wed, 3 Jul 2013 22:02:11 +0000
(15:02 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 3 Jul 2013 23:07:30 +0000
(16:07 -0700)
To test whether an address is aligned to PAGE_SIZE.
Cc: HATAYAMA Daisuke <
[email protected]
>
Cc: "Eric W. Biederman" <
[email protected]
>,
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
include/linux/mm.h
patch
|
blob
|
history
diff --git
a/include/linux/mm.h
b/include/linux/mm.h
index 66d881f1d57665b5791d3a5a357c8cbff3d4c9a0..949bd70358954a4435daa7a033c57b3c58398f06 100644
(file)
--- a/
include/linux/mm.h
+++ b/
include/linux/mm.h
@@
-52,6
+52,9
@@
extern unsigned long sysctl_admin_reserve_kbytes;
/* to align the pointer to the (next) page boundary */
#define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
+/* test whether an address (unsigned long or pointer) is aligned to PAGE_SIZE */
+#define PAGE_ALIGNED(addr) IS_ALIGNED((unsigned long)addr, PAGE_SIZE)
+
/*
* Linux kernel virtual memory manager primitives.
* The idea being to have a "virtual" mm in the same way