diff options
-rw-r--r-- | arch/mips64/sgi-ip27/ip27-memory.c | 9 | ||||
-rw-r--r-- | include/asm-mips64/addrspace.h | 2 | ||||
-rw-r--r-- | include/asm-mips64/sn/types.h | 1 |
3 files changed, 8 insertions, 4 deletions
diff --git a/arch/mips64/sgi-ip27/ip27-memory.c b/arch/mips64/sgi-ip27/ip27-memory.c index 6633f3099..f0db21bc0 100644 --- a/arch/mips64/sgi-ip27/ip27-memory.c +++ b/arch/mips64/sgi-ip27/ip27-memory.c @@ -27,9 +27,6 @@ #include <asm/sn/arch.h> #include <asm/mmzone.h> -typedef unsigned long pfn_t; /* into <asm/sn/types.h> */ -#define KDM_TO_PHYS(x) ((x) & TO_PHYS_MASK) /* into asm/addrspace.h */ - extern char _end; #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) @@ -57,11 +54,15 @@ int numa_debug(void) */ pfn_t node_getfirstfree(cnodeid_t cnode) { + unsigned long loadbase = CKSEG0; nasid_t nasid = COMPACT_TO_NASID_NODEID(cnode); +#ifdef CONFIG_MAPPED_KERNEL + loadbase = CKSSEG; +#endif if (cnode == 0) return (KDM_TO_PHYS(PAGE_ALIGN((unsigned long)(&_end)) - - (CKSEG0 - K0BASE)) >> PAGE_SHIFT); + (loadbase - K0BASE)) >> PAGE_SHIFT); return (KDM_TO_PHYS(PAGE_ALIGN(SYMMON_STK_ADDR(nasid, 0))) >> PAGE_SHIFT); } diff --git a/include/asm-mips64/addrspace.h b/include/asm-mips64/addrspace.h index 1591e1071..90c33a22a 100644 --- a/include/asm-mips64/addrspace.h +++ b/include/asm-mips64/addrspace.h @@ -109,4 +109,6 @@ #define PHYS_TO_COMPATK1(x) ((x) | COMPAT_K1BASE32) /* 32-bit compat k1 */ #endif +#define KDM_TO_PHYS(x) ((x) & TO_PHYS_MASK) + #endif /* _ASM_ADDRSPACE_H */ diff --git a/include/asm-mips64/sn/types.h b/include/asm-mips64/sn/types.h index c3905ad24..40aced527 100644 --- a/include/asm-mips64/sn/types.h +++ b/include/asm-mips64/sn/types.h @@ -21,6 +21,7 @@ typedef signed char partid_t; /* partition ID type */ typedef signed short moduleid_t; /* user-visible module number type */ typedef signed short cmoduleid_t; /* kernel compact module id type */ typedef unsigned char clusterid_t; /* Clusterid of the cell */ +typedef unsigned long pfn_t; typedef dev_t vertex_hdl_t; /* hardware graph vertex handle */ |