提交 2f099a28 编写于 作者: J Jonas Bonn

openrisc: fix virt_addr_valid

virt_addr_valid() shouldn't be comparing the address to memory_end which is
a phys_addr_t.  Change this to do like other arches and check that the
address falls within a valid page frame.
Signed-off-by: NJonas Bonn <jonas@southpole.se>
上级 01c4d33a
......@@ -94,8 +94,7 @@ extern unsigned long memory_end;
#define pfn_valid(pfn) ((pfn) < max_mapnr)
#define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
((void *)(kaddr) < (void *)memory_end))
#define virt_addr_valid(kaddr) (pfn_valid(virt_to_pfn(kaddr)))
#endif /* __ASSEMBLY__ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册