Skip to content

Commit

Permalink
[PATCH] unify pfn_to_page: sh pfn_to_page
Browse files Browse the repository at this point in the history
sh can use generic funcs.

Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Kazumoto Kojima <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
hkamezawa authored and Linus Torvalds committed Mar 27, 2006
1 parent aed6304 commit 104b8de
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/asm-sh/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;

/* PFN start number, because of __MEMORY_START */
#define PFN_START (__MEMORY_START >> PAGE_SHIFT)

#define pfn_to_page(pfn) (mem_map + (pfn) - PFN_START)
#define page_to_pfn(page) ((unsigned long)((page) - mem_map) + PFN_START)
#define ARCH_PFN_OFFSET (FPN_START)
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
#define pfn_valid(pfn) (((pfn) - PFN_START) < max_mapnr)
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
Expand All @@ -117,6 +115,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;

#endif /* __KERNEL__ */

#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>

#endif /* __ASM_SH_PAGE_H */

0 comments on commit 104b8de

Please sign in to comment.