mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
include/linux/mm.h: add PAGE_ALIGNED() helper
To test whether an address is aligned to PAGE_SIZE. Change-Id: Id956f67b1a5efc271ab29819e5cd04d4b7cddaa0 Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com>, Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
5fb7660030
commit
1e8f7eaacf
1 changed files with 3 additions and 0 deletions
|
@ -63,6 +63,9 @@ extern int mmap_rnd_compat_bits __read_mostly;
|
|||
/* 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
|
||||
|
|
Loading…
Reference in a new issue