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:
@@ -301,7 +301,6 @@ static inline int
|
||||
svc_pool_map_set_cpumask(unsigned int pidx, cpumask_t *oldmask)
|
||||
{
|
||||
struct svc_pool_map *m = &svc_pool_map;
|
||||
unsigned int node; /* or cpu */
|
||||
|
||||
/*
|
||||
* The caller checks for sv_nrpools > 1, which
|
||||
@@ -314,16 +313,23 @@ svc_pool_map_set_cpumask(unsigned int pidx, cpumask_t *oldmask)
|
||||
default:
|
||||
return 0;
|
||||
case SVC_POOL_PERCPU:
|
||||
node = m->pool_to[pidx];
|
||||
{
|
||||
unsigned int cpu = m->pool_to[pidx];
|
||||
|
||||
*oldmask = current->cpus_allowed;
|
||||
set_cpus_allowed(current, cpumask_of_cpu(node));
|
||||
set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
|
||||
return 1;
|
||||
}
|
||||
case SVC_POOL_PERNODE:
|
||||
node = m->pool_to[pidx];
|
||||
{
|
||||
unsigned int node = m->pool_to[pidx];
|
||||
node_to_cpumask_ptr(nodecpumask, node);
|
||||
|
||||
*oldmask = current->cpus_allowed;
|
||||
set_cpus_allowed(current, node_to_cpumask(node));
|
||||
set_cpus_allowed_ptr(current, nodecpumask);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user