Commit f7a4f91e authored by David S. Miller's avatar David S. Miller

[SPARC]: Move virt_to_phys/phy_to_virt into page.h

parent bd4498b5
...@@ -187,9 +187,6 @@ extern unsigned long sbus_ioremap(struct resource *res, unsigned long offset, ...@@ -187,9 +187,6 @@ extern unsigned long sbus_ioremap(struct resource *res, unsigned long offset,
extern void sbus_iounmap(unsigned long vaddr, unsigned long size); extern void sbus_iounmap(unsigned long vaddr, unsigned long size);
#define virt_to_phys(x) __pa((unsigned long)(x))
#define phys_to_virt(x) __va((unsigned long)(x))
/* /*
* At the moment, we do not use CMOS_READ anywhere outside of rtc.c, * At the moment, we do not use CMOS_READ anywhere outside of rtc.c,
* so rtc_port is static in it. This should not change unless a new * so rtc_port is static in it. This should not change unless a new
......
...@@ -174,6 +174,9 @@ extern __inline__ int get_order(unsigned long size) ...@@ -174,6 +174,9 @@ extern __inline__ int get_order(unsigned long size)
#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET) #define __pa(x) ((unsigned long)(x) - PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
#define virt_to_phys(x) __pa((unsigned long)(x))
#define phys_to_virt(x) __va((unsigned long)(x))
#define pfn_to_page(pfn) (mem_map + (pfn)) #define pfn_to_page(pfn) (mem_map + (pfn))
#define page_to_pfn(page) ((unsigned long)((page) - mem_map)) #define page_to_pfn(page) ((unsigned long)((page) - mem_map))
#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT)) #define virt_to_page(kaddr) (mem_map + (__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