aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2008-04-04 21:11:10 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-19 13:44:59 -0400
commitc5f59f0833df945eef7ff35f3dc6ba61c5f293dd (patch)
tree32c1a94847d0154051c79011212d401462723d55 /drivers/base
parentb53e921ba1cff8453dc9a87a84052fa12d5b30bd (diff)
nodemask: use new node_to_cpumask_ptr function
* Use new node_to_cpumask_ptr. This creates a pointer to the cpumask for a given node. This definition is in mm patch: asm-generic-add-node_to_cpumask_ptr-macro.patch * Use new set_cpus_allowed_ptr function. Depends on: [mm-patch]: asm-generic-add-node_to_cpumask_ptr-macro.patch [sched-devel]: sched: add new set_cpus_allowed_ptr function [x86/latest]: x86: add cpus_scnprintf function Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Greg Banks <gnb@melbourne.sgi.com> Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/node.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c
index e59861f18ce5..8e3f25bb8f80 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -22,14 +22,15 @@ static struct sysdev_class node_class = {
22static ssize_t node_read_cpumap(struct sys_device * dev, char * buf) 22static ssize_t node_read_cpumap(struct sys_device * dev, char * buf)
23{ 23{
24 struct node *node_dev = to_node(dev); 24 struct node *node_dev = to_node(dev);
25 cpumask_t mask = node_to_cpumask(node_dev->sysdev.id); 25 node_to_cpumask_ptr(mask, node_dev->sysdev.id);
26 int len; 26 int len;
27 27
28 /* 2004/06/03: buf currently PAGE_SIZE, need > 1 char per 4 bits. */ 28 /* 2004/06/03: buf currently PAGE_SIZE, need > 1 char per 4 bits. */
29 BUILD_BUG_ON(MAX_NUMNODES/4 > PAGE_SIZE/2); 29 BUILD_BUG_ON(MAX_NUMNODES/4 > PAGE_SIZE/2);
30 30
31 len = cpumask_scnprintf(buf, PAGE_SIZE-1, mask); 31 len = cpumask_scnprintf(buf, PAGE_SIZE-2, *mask);
32 len += sprintf(buf + len, "\n"); 32 buf[len++] = '\n';
33 buf[len] = '\0';
33 return len; 34 return len;
34} 35}
35 36