CVSROOT: /home/cvs
Module name: linux
Changes by: ralf@ftp.linux-mips.org 05/01/08 14:55:53
Modified files:
arch/mips/sgi-ip27: ip27-klnuma.c
include/asm-mips/sn: mapped_kernel.h
Log message:
For code replication the base address is not in CKSEG0 when building
with 64-bit ELF builds enabled. Make sure we're using the right value.
diff -urN linux/arch/mips/sgi-ip27/ip27-klnuma.c
linux/arch/mips/sgi-ip27/ip27-klnuma.c
--- linux/arch/mips/sgi-ip27/ip27-klnuma.c 2004/11/14 12:21:59 1.7
+++ linux/arch/mips/sgi-ip27/ip27-klnuma.c 2005/01/08 14:55:53 1.8
@@ -124,12 +124,12 @@
*/
pfn_t node_getfirstfree(cnodeid_t cnode)
{
- unsigned long loadbase = CKSEG0;
+ unsigned long loadbase = REP_BASE;
nasid_t nasid = COMPACT_TO_NASID_NODEID(cnode);
unsigned long offset;
#ifdef CONFIG_MAPPED_KERNEL
- loadbase = CKSSEG + 16777216;
+ loadbase += 16777216;
#endif
offset = PAGE_ALIGN((unsigned long)(&_end)) - loadbase;
if ((cnode == 0) || (cpu_isset(cnode, ktext_repmask)))
diff -urN linux/include/asm-mips/sn/mapped_kernel.h
linux/include/asm-mips/sn/mapped_kernel.h
--- linux/include/asm-mips/sn/mapped_kernel.h 2004/10/25 20:44:44 1.2
+++ linux/include/asm-mips/sn/mapped_kernel.h 2005/01/08 14:55:53 1.3
@@ -23,10 +23,16 @@
#include <linux/config.h>
#include <asm/addrspace.h>
+#ifdef CONFIG_BUILD_ELF64
+#define REP_BASE CAC_BASE
+#else
+#define REP_BASE CKSEG0
+#endif
+
#ifdef CONFIG_MAPPED_KERNEL
-#define MAPPED_ADDR_RO_TO_PHYS(x) (x - CKSSEG)
-#define MAPPED_ADDR_RW_TO_PHYS(x) (x - CKSSEG - 16777216)
+#define MAPPED_ADDR_RO_TO_PHYS(x) (x - REP_BASE)
+#define MAPPED_ADDR_RW_TO_PHYS(x) (x - REP_BASE - 16777216)
#define MAPPED_KERN_RO_PHYSBASE(n) \
(PLAT_NODE_DATA(n)->kern_vars.kv_ro_baseaddr)
@@ -42,8 +48,8 @@
#else /* CONFIG_MAPPED_KERNEL */
-#define MAPPED_KERN_RO_TO_PHYS(x) (x - CKSEG0)
-#define MAPPED_KERN_RW_TO_PHYS(x) (x - CKSEG0)
+#define MAPPED_KERN_RO_TO_PHYS(x) (x - REP_BASE)
+#define MAPPED_KERN_RW_TO_PHYS(x) (x - REP_BASE)
#endif /* CONFIG_MAPPED_KERNEL */
|