Commit 2d11e6a4 authored by Thomas Bogendoerfer's avatar Thomas Bogendoerfer Committed by Paul Burton

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: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: default avatarPaul 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
parent 36366e36
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <asm/sn/mapped_kernel.h> #include <asm/sn/mapped_kernel.h>
#include <asm/sn/sn_private.h> #include <asm/sn/sn_private.h>
static cpumask_t ktext_repmask; static nodemask_t ktext_repmask;
/* /*
* XXX - This needs to be much smarter about where it puts copies of the * XXX - This needs to be much smarter about where it puts copies of the
...@@ -30,8 +30,8 @@ static cpumask_t ktext_repmask; ...@@ -30,8 +30,8 @@ static cpumask_t ktext_repmask;
void __init setup_replication_mask(void) void __init setup_replication_mask(void)
{ {
/* Set only the master cnode's bit. The master cnode is always 0. */ /* Set only the master cnode's bit. The master cnode is always 0. */
cpumask_clear(&ktext_repmask); nodes_clear(ktext_repmask);
cpumask_set_cpu(0, &ktext_repmask); node_set(0, ktext_repmask);
#ifdef CONFIG_REPLICATE_KTEXT #ifdef CONFIG_REPLICATE_KTEXT
#ifndef CONFIG_MAPPED_KERNEL #ifndef CONFIG_MAPPED_KERNEL
...@@ -44,7 +44,7 @@ void __init setup_replication_mask(void) ...@@ -44,7 +44,7 @@ void __init setup_replication_mask(void)
if (nasid == 0) if (nasid == 0)
continue; continue;
/* Advertise that we have a copy of the kernel */ /* Advertise that we have a copy of the kernel */
cpumask_set_cpu(nasid, &ktext_repmask); node_set(nasid, ktext_repmask);
} }
} }
#endif #endif
...@@ -98,7 +98,7 @@ void __init replicate_kernel_text(void) ...@@ -98,7 +98,7 @@ void __init replicate_kernel_text(void)
continue; continue;
/* Check if this node should get a copy of the kernel */ /* Check if this node should get a copy of the kernel */
if (cpumask_test_cpu(client_nasid, &ktext_repmask)) { if (node_isset(client_nasid, ktext_repmask)) {
server_nasid = client_nasid; server_nasid = client_nasid;
copy_kernel(server_nasid); copy_kernel(server_nasid);
} }
...@@ -122,7 +122,7 @@ unsigned long node_getfirstfree(nasid_t nasid) ...@@ -122,7 +122,7 @@ unsigned long node_getfirstfree(nasid_t nasid)
loadbase += 16777216; loadbase += 16777216;
#endif #endif
offset = PAGE_ALIGN((unsigned long)(&_end)) - loadbase; offset = PAGE_ALIGN((unsigned long)(&_end)) - loadbase;
if ((nasid == 0) || (cpumask_test_cpu(nasid, &ktext_repmask))) if ((nasid == 0) || (node_isset(nasid, ktext_repmask)))
return TO_NODE(nasid, offset) >> PAGE_SHIFT; return TO_NODE(nasid, offset) >> PAGE_SHIFT;
else else
return KDM_TO_PHYS(PAGE_ALIGN(SYMMON_STK_ADDR(nasid, 0))) >> PAGE_SHIFT; return KDM_TO_PHYS(PAGE_ALIGN(SYMMON_STK_ADDR(nasid, 0))) >> PAGE_SHIFT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment