Commit e39a6ad8 authored by Russell King's avatar Russell King

[ARM] Move PHYS_TO_NID() to asm/memory.h

When CONFIG_DISCONTIGMEM=n, we define PHYS_TO_NID(x) to zero in each
architecture specific file.  This cset moves it into the generic
ARM code.  
parent 04e1aae5
......@@ -52,6 +52,4 @@
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
#define PHYS_TO_NID(x) 0
#endif
......@@ -31,6 +31,4 @@
#define __virt_to_bus__is_a_macro
#define __bus_to_virt__is_a_macro
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -50,6 +50,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) (x)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -46,6 +46,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -90,8 +90,6 @@
* memory bank. For those systems, simply undefine CONFIG_DISCONTIGMEM.
*/
#ifdef CONFIG_ARCH_EDB7211
#ifdef CONFIG_DISCONTIGMEM
/*
* Because of the wide memory address space between physical RAM banks on the
......@@ -155,11 +153,5 @@
#endif /* CONFIG_DISCONTIGMEM */
#endif /* CONFIG_ARCH_EDB7211 */
#ifndef PFN_TO_NID
#define PFN_TO_NID(pfn) (0)
#endif
#endif
......@@ -48,6 +48,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) (x)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -80,6 +80,4 @@ extern unsigned long __bus_to_virt(unsigned long);
#define __phys_to_virt__is_a_macro
#define __phys_to_virt(ppage) ((unsigned long)(ppage) + PAGE_OFFSET)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -38,8 +38,6 @@
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x00000000UL)
#define PHYS_TO_NID(addr) (0)
/*
* On epxa10, the dram is contiguous
*/
......
......@@ -58,6 +58,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) (x - INTEGRATOR_HDR0_SDRAM_BASE + PAGE_OFFSET)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -49,8 +49,6 @@
#define __virt_to_bus(x) (((__virt_to_phys(x)) & ~(*IOP310_SIATVR)) | ((*IOP310_SIABAR) & 0xfffffff0))
#define __bus_to_virt(x) (__phys_to_virt(((x) & ~(*IOP310_SIALR)) | ( *IOP310_SIATVR)))
#define PHYS_TO_NID(x) 0
/* boot mem allocate global pointer for MU circular queues QBAR */
#ifdef CONFIG_IOP310_MU
extern void *mu_mem;
......
......@@ -47,6 +47,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -43,6 +43,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) ((unsigned long)(x) + PAGE_OFFSET - BUS_OFFSET)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -34,7 +34,6 @@
* Physical DRAM offset.
*/
#define PHYS_OFFSET (0xa0000000UL)
#define PHYS_TO_NID(addr) (0)
/*
* physical vs virtual ram conversion
......
......@@ -50,6 +50,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -40,6 +40,4 @@
#define isa_virt_to_bus virt_to_bus
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -41,6 +41,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -74,6 +74,8 @@ static inline void *phys_to_virt(unsigned long x)
#define virt_to_page(kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT))
#define virt_addr_valid(kaddr) ((kaddr) >= PAGE_OFFSET && (kaddr) < (unsigned long)high_memory)
#define PHYS_TO_NID(addr) (0)
#else
/*
* This is more complex. We have a set of mem_map arrays spread
......
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