Commit 309d34bb authored by KAMEZAWA Hiroyuki's avatar KAMEZAWA Hiroyuki Committed by Linus Torvalds

[PATCH] unify pfn_to_page: sh64 pfn_to_page

sh64 can use generic funcs.
Signed-off-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Richard Curnow <rc@rc0.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 104b8dea
...@@ -105,9 +105,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; ...@@ -105,9 +105,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
/* PFN start number, because of __MEMORY_START */ /* PFN start number, because of __MEMORY_START */
#define PFN_START (__MEMORY_START >> PAGE_SHIFT) #define PFN_START (__MEMORY_START >> PAGE_SHIFT)
#define ARCH_PFN_OFFSET (PFN_START)
#define pfn_to_page(pfn) (mem_map + (pfn) - PFN_START)
#define page_to_pfn(page) ((unsigned long)((page) - mem_map) + PFN_START)
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
#define pfn_valid(pfn) (((pfn) - PFN_START) < max_mapnr) #define pfn_valid(pfn) (((pfn) - PFN_START) < max_mapnr)
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
...@@ -117,6 +115,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; ...@@ -117,6 +115,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#include <asm-generic/memory_model.h>
#include <asm-generic/page.h> #include <asm-generic/page.h>
#endif /* __ASM_SH64_PAGE_H */ #endif /* __ASM_SH64_PAGE_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment