powerpc/mm/hash64: Map all the kernel regions in the same 0xc range
[linux-2.6-block.git] / arch / powerpc / include / asm / page.h
index ed870468ef6f12562f7833fc8af56bb24d44cc85..918228f2205ba2eea8725d1957490ece61c1a2ad 100644 (file)
@@ -139,7 +139,8 @@ static inline bool pfn_valid(unsigned long pfn)
  * return true for some vmalloc addresses, which is incorrect. So explicitly
  * check that the address is in the kernel region.
  */
-#define virt_addr_valid(kaddr) (REGION_ID(kaddr) == KERNEL_REGION_ID && \
+/* may be can drop get_region_id */
+#define virt_addr_valid(kaddr) (get_region_id((unsigned long)kaddr) == KERNEL_REGION_ID && \
                                pfn_valid(virt_to_pfn(kaddr)))
 #else
 #define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr))