Commit 82b11318 authored by Dave Hansen's avatar Dave Hansen Committed by Linus Torvalds

[PATCH] ppc64: add a pfn_to_kaddr() function

This is a helper function that a few architectures already have.  This just
copies the i386 implementation to ppc64.
Signed-off-by: default avatarDave Hansen <haveblue@us.ibm.com>
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent de2c2c9b
...@@ -240,6 +240,7 @@ extern int page_is_ram(unsigned long physaddr); ...@@ -240,6 +240,7 @@ extern int page_is_ram(unsigned long physaddr);
#endif #endif
#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_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
......
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