aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/page.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/page.h')
-rw-r--r--include/asm-powerpc/page.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h
index 18c1e5e..94905ba 100644
--- a/include/asm-powerpc/page.h
+++ b/include/asm-powerpc/page.h
@@ -86,6 +86,12 @@
/* to align the pointer to the (next) page boundary */
#define PAGE_ALIGN(addr) _ALIGN(addr, PAGE_SIZE)
+/*
+ * Don't compare things with KERNELBASE or PAGE_OFFSET to test for
+ * "kernelness", use is_kernel_addr() - it should do what you want.
+ */
+#define is_kernel_addr(x) ((x) >= PAGE_OFFSET)
+
#ifndef __ASSEMBLY__
#undef STRICT_MM_TYPECHECKS