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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user