9 #include <linux/kernel.h>
11 #include <linux/string.h>
14 #include <asm/sections.h>
15 #include <asm/sn/types.h>
16 #include <asm/sn/arch.h>
35 #ifdef CONFIG_REPLICATE_KTEXT
36 #ifndef CONFIG_MAPPED_KERNEL
37 #error Kernel replication works with mapped kernel support. No calias support.
51 GDA->g_ktext_repmask = &ktext_repmask;
59 kvp = &
hub_data(client_nasid)->kern_vars;
68 printk(
"REPLICATION: ON nasid %d, ktext from nasid %d, kdata from nasid %d\n", client_nasid, server_nasid,
master_nasid);
74 unsigned long dest_kern_start, source_start, source_end,
kern_size;
76 source_start = (
unsigned long) _stext;
77 source_end = (
unsigned long) _etext;
78 kern_size = source_end - source_start;
82 memcpy((
void *)dest_kern_start, (
void *)source_start, kern_size);
103 server_nasid = client_nasid;
104 copy_kernel(server_nasid);
108 set_ktext_source(client_nasid, server_nasid);
123 #ifdef CONFIG_MAPPED_KERNEL
124 loadbase += 16777216;
127 if ((cnode == 0) || (
cpu_isset(cnode, ktext_repmask)))