aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Papageorgiou <root.expert.xda@gmail.com>2018-12-17 18:15:55 +0000
committerGerrit Code Review <gerrit2@aicp-server-3>2018-12-17 18:15:55 +0000
commit53daaccc344a80a881b91fc04129a85842254d5e (patch)
tree65086a7400cfb7a6b7012cdf57177cb4ad16dc69
parent612e4416c31b444dc2919224a022f90c9318241b (diff)
parent51253c5f37e0345ee53f1e5e049928c75ed33537 (diff)
Merge "UPSTREAM: include/linux/mm.h: add PAGE_ALIGNED() helper" into p9.0HEADp9.0
-rw-r--r--include/linux/mm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 044b3b06b2e..57daf95d881 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -70,6 +70,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