diff options
author | Mike Travis <travis@sgi.com> | 2008-04-05 05:11:10 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 21:44:59 +0400 |
commit | c5f59f0833df945eef7ff35f3dc6ba61c5f293dd (patch) | |
tree | 32c1a94847d0154051c79011212d401462723d55 /drivers/base/node.c | |
parent | b53e921ba1cff8453dc9a87a84052fa12d5b30bd (diff) | |
download | linux-c5f59f0833df945eef7ff35f3dc6ba61c5f293dd.tar.xz |
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/node.c')
-rw-r--r-- | drivers/base/node.c | 7 |
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 = { static ssize_t node_read_cpumap(struct sys_device * dev, char * buf) { struct node *node_dev = to_node(dev); - cpumask_t mask = node_to_cpumask(node_dev->sysdev.id); + node_to_cpumask_ptr(mask, node_dev->sysdev.id); int len; /* 2004/06/03: buf currently PAGE_SIZE, need > 1 char per 4 bits. */ BUILD_BUG_ON(MAX_NUMNODES/4 > PAGE_SIZE/2); - len = cpumask_scnprintf(buf, PAGE_SIZE-1, mask); - len += sprintf(buf + len, "\n"); + len = cpumask_scnprintf(buf, PAGE_SIZE-2, *mask); + buf[len++] = '\n'; + buf[len] = '\0'; return len; } |