Skip to contentSkip to conversation

sparc: move page_to_phys to page.h

PATCH In review Sam Ravnborg 1 participant 1 message Apr 26, 2014 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 sparc: move page_to_phys to page.h

Preparation for introducing asm-generic/io.h this move was required. In asm-generic page_to_phys is placed in page.h - so do the same here.

---
 arch/sparc/include/asm/io_32.h | 2 --
 arch/sparc/include/asm/io_64.h | 1 -
 arch/sparc/include/asm/page.h  | 3 +++
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/sparc/include/asm/io_32.h +0 -2
index c1acbd8..271c94a 100644
@@ -8,8 +8,6 @@
 #include <asm/page.h>      /* IO address mapping routines need this */
 #include <asm-generic/pci_iomap.h>
 
-#define page_to_phys(page)	(page_to_pfn(page) << PAGE_SHIFT)
-
 static inline u32 flip_dword (u32 l)
 {
 	return ((l&0xff)<<24) | (((l>>8)&0xff)<<16) | (((l>>16)&0xff)<<8)| ((l>>24)&0xff);
arch/sparc/include/asm/io_64.h +0 -1
index 09b0b88..4484563 100644
@@ -15,7 +15,6 @@
 
 /* BIO layer definitions. */
 extern unsigned long kern_base, kern_size;
-#define page_to_phys(page)	(page_to_pfn(page) << PAGE_SHIFT)
 
 static inline u8 _inb(unsigned long addr)
 {
arch/sparc/include/asm/page.h +3 -0
index f21de03..1be2fde 100644
@@ -1,5 +1,8 @@
 #ifndef ___ASM_SPARC_PAGE_H
 #define ___ASM_SPARC_PAGE_H
+
+#define page_to_phys(page)	(page_to_pfn(page) << PAGE_SHIFT)
+
 #if defined(__sparc__) && defined(__arch64__)
 #include <asm/page_64.h>
 #else
Signature · 1 line
1.9.0