diff options
author | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-06-09 06:04:43 +0000 |
---|---|---|
committer | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-06-09 06:04:43 +0000 |
commit | d664fc3c7e5dfcff2bf348050ace5894c7648b3a (patch) | |
tree | 244409f22c55a564677e77fa920855a006a791f3 | |
parent | 513bee05b74dd15729a240b6b0ce4a6c695e73bc (diff) |
Have the slave bootstrap code actually look at the text and data server
nasids that the master nasid found for it. Sanitize the replication
procedures.
-rw-r--r-- | arch/mips64/kernel/head.S | 9 | ||||
-rw-r--r-- | arch/mips64/sgi-ip27/ip27-klnuma.c | 18 | ||||
-rw-r--r-- | include/asm-mips64/sn/klkernvars.h | 4 |
3 files changed, 16 insertions, 15 deletions
diff --git a/arch/mips64/kernel/head.S b/arch/mips64/kernel/head.S index 88133ae40..29b7e17c0 100644 --- a/arch/mips64/kernel/head.S +++ b/arch/mips64/kernel/head.S @@ -21,6 +21,7 @@ #include <asm/pgtable.h> #include <asm/sn/addrs.h> #include <asm/sn/sn0/hubni.h> +#include <asm/sn/klkernvars.h> .macro ARC64_TWIDDLE_PC #if defined(CONFIG_ARC64) || defined(CONFIG_MAPPED_KERNEL) @@ -130,8 +131,12 @@ NESTED(kernel_entry, 16, sp) # kernel entry point NESTED(bootstrap, 16, sp) GET_NASID_ASM - move t1, zero # till we know who is master - move t2, zero # till we know who is master + li t0, KLDIR_OFFSET + (KLI_KERN_VARS * KLDIR_ENT_SIZE) + KLDIR_OFF_POINTER + K0BASE + dsll t1, NASID_SHFT + or t0, t0, t1 + ld t0, 0(t0) # t0 points to kern_vars struct + lh t1, KV_RO_NASID_OFFSET(t0) + lh t2, KV_RW_NASID_OFFSET(t0) MAPPED_KERNEL_SETUP_TLB ARC64_TWIDDLE_PC CLI diff --git a/arch/mips64/sgi-ip27/ip27-klnuma.c b/arch/mips64/sgi-ip27/ip27-klnuma.c index d913273fa..f4baebf78 100644 --- a/arch/mips64/sgi-ip27/ip27-klnuma.c +++ b/arch/mips64/sgi-ip27/ip27-klnuma.c @@ -3,7 +3,9 @@ * Copyright 2000 Silicon Graphics, Inc. */ #include <linux/config.h> +#include <linux/init.h> #include <linux/mmzone.h> +#include <linux/kernel.h> #include <asm/sn/types.h> #include <asm/sn/arch.h> @@ -19,16 +21,12 @@ static cpumask_t ktext_repmask; -static void set_ktext_source(nasid_t client_nasid, nasid_t server_nasid); - - /* * XXX - This needs to be much smarter about where it puts copies of the * kernel. For example, we should never put a copy on a headless node, * and we should respect the topology of the machine. */ -void -setup_replication_mask(int maxnodes) +void __init setup_replication_mask(int maxnodes) { static int numa_kernel_replication_ratio; cnodeid_t cnode; @@ -57,8 +55,7 @@ setup_replication_mask(int maxnodes) } -static void -set_ktext_source(nasid_t client_nasid, nasid_t server_nasid) +static __init void set_ktext_source(nasid_t client_nasid, nasid_t server_nasid) { kern_vars_t *kvp; cnodeid_t client_cnode; @@ -75,11 +72,11 @@ set_ktext_source(nasid_t client_nasid, nasid_t server_nasid) kvp->kv_rw_nasid = master_nasid; kvp->kv_ro_baseaddr = NODE_CAC_BASE(server_nasid); kvp->kv_rw_baseaddr = NODE_CAC_BASE(master_nasid); + printk("REPLICATION: ON nasid %d, ktext from nasid %d, kdata from nasid %d\n", client_nasid, server_nasid, master_nasid); } /* XXX - When the BTE works, we should use it instead of this. */ -static void -copy_kernel(nasid_t dest_nasid) +static __init void copy_kernel(nasid_t dest_nasid) { extern char _stext, _etext; unsigned long dest_kern_start, source_start, source_end, kern_size; @@ -93,8 +90,7 @@ copy_kernel(nasid_t dest_nasid) memcpy((void *)dest_kern_start, (void *)source_start, kern_size); } -void -replicate_kernel_text(int maxnodes) +void __init replicate_kernel_text(int maxnodes) { cnodeid_t cnode; nasid_t client_nasid; diff --git a/include/asm-mips64/sn/klkernvars.h b/include/asm-mips64/sn/klkernvars.h index e8d3ff12b..cc1b732d2 100644 --- a/include/asm-mips64/sn/klkernvars.h +++ b/include/asm-mips64/sn/klkernvars.h @@ -5,8 +5,6 @@ #ifndef __ASM_SN_KLKERNVARS_H #define __ASM_SN_KLKERNVARS_H -#include <asm/sn/types.h> - #define KV_MAGIC_OFFSET 0x0 #define KV_RO_NASID_OFFSET 0x4 #define KV_RW_NASID_OFFSET 0x6 @@ -15,6 +13,8 @@ #if _LANGUAGE_C +#include <asm/sn/types.h> + typedef struct kern_vars_s { int kv_magic; nasid_t kv_ro_nasid; |