Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: SGI-IP27: use nodemask instead of cpumask

Replication is done on a per node basis, so the use of cpumask
was a misusage here.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

authored by

Thomas Bogendoerfer and committed by
Paul Burton
2d11e6a4 36366e36

+6 -6
+6 -6
arch/mips/sgi-ip27/ip27-klnuma.c
··· 20 20 #include <asm/sn/mapped_kernel.h> 21 21 #include <asm/sn/sn_private.h> 22 22 23 - static cpumask_t ktext_repmask; 23 + static nodemask_t ktext_repmask; 24 24 25 25 /* 26 26 * XXX - This needs to be much smarter about where it puts copies of the ··· 30 30 void __init setup_replication_mask(void) 31 31 { 32 32 /* Set only the master cnode's bit. The master cnode is always 0. */ 33 - cpumask_clear(&ktext_repmask); 34 - cpumask_set_cpu(0, &ktext_repmask); 33 + nodes_clear(ktext_repmask); 34 + node_set(0, ktext_repmask); 35 35 36 36 #ifdef CONFIG_REPLICATE_KTEXT 37 37 #ifndef CONFIG_MAPPED_KERNEL ··· 44 44 if (nasid == 0) 45 45 continue; 46 46 /* Advertise that we have a copy of the kernel */ 47 - cpumask_set_cpu(nasid, &ktext_repmask); 47 + node_set(nasid, ktext_repmask); 48 48 } 49 49 } 50 50 #endif ··· 98 98 continue; 99 99 100 100 /* Check if this node should get a copy of the kernel */ 101 - if (cpumask_test_cpu(client_nasid, &ktext_repmask)) { 101 + if (node_isset(client_nasid, ktext_repmask)) { 102 102 server_nasid = client_nasid; 103 103 copy_kernel(server_nasid); 104 104 } ··· 122 122 loadbase += 16777216; 123 123 #endif 124 124 offset = PAGE_ALIGN((unsigned long)(&_end)) - loadbase; 125 - if ((nasid == 0) || (cpumask_test_cpu(nasid, &ktext_repmask))) 125 + if ((nasid == 0) || (node_isset(nasid, ktext_repmask))) 126 126 return TO_NODE(nasid, offset) >> PAGE_SHIFT; 127 127 else 128 128 return KDM_TO_PHYS(PAGE_ALIGN(SYMMON_STK_ADDR(nasid, 0))) >> PAGE_SHIFT;