aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2008-04-04 21:11:06 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-19 13:44:58 -0400
commitf70316dace2bb99730800d47044acb818c6735f6 (patch)
tree03c0178c8d6c0213a82b800f4a3e00c2da9a4d5c /drivers/pci
parentfc0e474840d1fd96f28fbd76d4f36b80e7ad1cc3 (diff)
generic: use new set_cpus_allowed_ptr function
* Use new set_cpus_allowed_ptr() function added by previous patch, which instead of passing the "newly allowed cpus" cpumask_t arg by value, pass it by pointer: -int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) +int set_cpus_allowed_ptr(struct task_struct *p, const cpumask_t *new_mask) * Modify CPU_MASK_ALL Depends on: [sched-devel]: sched: add new set_cpus_allowed_ptr function Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-driver.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index e571c72e6753..e8d94fafc280 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -182,15 +182,18 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
182 struct mempolicy *oldpol; 182 struct mempolicy *oldpol;
183 cpumask_t oldmask = current->cpus_allowed; 183 cpumask_t oldmask = current->cpus_allowed;
184 int node = pcibus_to_node(dev->bus); 184 int node = pcibus_to_node(dev->bus);
185 if (node >= 0 && node_online(node)) 185
186 set_cpus_allowed(current, node_to_cpumask(node)); 186 if (node >= 0) {
187 node_to_cpumask_ptr(nodecpumask, node);
188 set_cpus_allowed_ptr(current, nodecpumask);
189 }
187 /* And set default memory allocation policy */ 190 /* And set default memory allocation policy */
188 oldpol = current->mempolicy; 191 oldpol = current->mempolicy;
189 current->mempolicy = NULL; /* fall back to system default policy */ 192 current->mempolicy = NULL; /* fall back to system default policy */
190#endif 193#endif
191 error = drv->probe(dev, id); 194 error = drv->probe(dev, id);
192#ifdef CONFIG_NUMA 195#ifdef CONFIG_NUMA
193 set_cpus_allowed(current, oldmask); 196 set_cpus_allowed_ptr(current, &oldmask);
194 current->mempolicy = oldpol; 197 current->mempolicy = oldpol;
195#endif 198#endif
196 return error; 199 return error;