diff options
author | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-08-05 19:23:23 +0000 |
---|---|---|
committer | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-08-05 19:23:23 +0000 |
commit | f50251b7156e1b2f6866898df1b81a19f845c0f1 (patch) | |
tree | 4f3287591fa5f2356f26a4883dd59fd2f561198b /include | |
parent | 58ed4f3e640185842bf81a9be49d6fef8feba258 (diff) |
Tweak the initialization macros so that they work even on a system
that has no physical address 0 (non nasid 0 systems).
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips64/sn/mapped_kernel.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/asm-mips64/sn/mapped_kernel.h b/include/asm-mips64/sn/mapped_kernel.h index 3724b2774..373be38d4 100644 --- a/include/asm-mips64/sn/mapped_kernel.h +++ b/include/asm-mips64/sn/mapped_kernel.h @@ -25,8 +25,20 @@ #ifdef CONFIG_MAPPED_KERNEL -#define MAPPED_KERN_RO_TO_PHYS(x) (x - CKSSEG) -#define MAPPED_KERN_RW_TO_PHYS(x) (x - CKSSEG - 16777216) +#define MAPPED_ADDR_RO_TO_PHYS(x) (x - CKSSEG) +#define MAPPED_ADDR_RW_TO_PHYS(x) (x - CKSSEG - 16777216) + +#define MAPPED_KERN_RO_PHYSBASE(n) \ + (PLAT_NODE_DATA(n)->kern_vars.kv_ro_baseaddr) +#define MAPPED_KERN_RW_PHYSBASE(n) \ + (PLAT_NODE_DATA(n)->kern_vars.kv_rw_baseaddr) + +#define MAPPED_KERN_RO_TO_PHYS(x) \ + ((unsigned long)MAPPED_ADDR_RO_TO_PHYS(x) | \ + MAPPED_KERN_RO_PHYSBASE(get_compact_nodeid())) +#define MAPPED_KERN_RW_TO_PHYS(x) \ + ((unsigned long)MAPPED_ADDR_RW_TO_PHYS(x) | \ + MAPPED_KERN_RW_PHYSBASE(get_compact_nodeid())) #else /* CONFIG_MAPPED_KERNEL */ |