提交 89fccaf2 编写于 作者: K KAMEZAWA Hiroyuki 提交者: Linus Torvalds

[PATCH] unify pfn_to_page: arm26 pfn_to_page

arm26 can use generic funcs.
Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Ian Molton <spyro@f2s.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 7eb98a2f
...@@ -81,8 +81,7 @@ static inline void *phys_to_virt(unsigned long x) ...@@ -81,8 +81,7 @@ static inline void *phys_to_virt(unsigned long x)
* virt_to_page(k) convert a _valid_ virtual address to struct page * * virt_to_page(k) convert a _valid_ virtual address to struct page *
* virt_addr_valid(k) indicates whether a virtual address is valid * virt_addr_valid(k) indicates whether a virtual address is valid
*/ */
#define page_to_pfn(page) (((page) - mem_map) + PHYS_PFN_OFFSET) #define ARCH_PFN_OFFSET (PHYS_PFN_OFFSET)
#define pfn_to_page(pfn) ((mem_map + (pfn)) - PHYS_PFN_OFFSET)
#define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) #define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
#define virt_to_page(kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)) #define virt_to_page(kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT))
...@@ -98,4 +97,5 @@ static inline void *phys_to_virt(unsigned long x) ...@@ -98,4 +97,5 @@ static inline void *phys_to_virt(unsigned long x)
*/ */
#define page_to_bus(page) (page_address(page)) #define page_to_bus(page) (page_address(page))
#include <asm-generic/memory_model.h>
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册