aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/intel_cacheinfo.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-28 10:26:31 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-28 10:26:31 -0400
commitb7d0b6784565b846f3562608dfb3cf8516718724 (patch)
tree50a4931ce7e62e78b664bb8f43da2f4508c319f9 /arch/x86/kernel/cpu/intel_cacheinfo.c
parentcdcf772ed163651cacac8098b4974aba7f9e1c73 (diff)
parentc9272c4f9fbe2087beb3392f526dc5b19efaa56b (diff)
Merge branch 'linus' into x86/cpu
Conflicts: arch/x86/kernel/cpu/intel_cacheinfo.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/intel_cacheinfo.c')
-rw-r--r--arch/x86/kernel/cpu/intel_cacheinfo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 535d662716d..d763d24187c 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -511,7 +511,7 @@ static void __cpuinit cache_remove_shared_cpu_map(unsigned int cpu, int index)
511 int sibling; 511 int sibling;
512 512
513 this_leaf = CPUID4_INFO_IDX(cpu, index); 513 this_leaf = CPUID4_INFO_IDX(cpu, index);
514 for_each_cpu_mask(sibling, this_leaf->shared_cpu_map) { 514 for_each_cpu_mask_nr(sibling, this_leaf->shared_cpu_map) {
515 sibling_leaf = CPUID4_INFO_IDX(sibling, index); 515 sibling_leaf = CPUID4_INFO_IDX(sibling, index);
516 cpu_clear(cpu, sibling_leaf->shared_cpu_map); 516 cpu_clear(cpu, sibling_leaf->shared_cpu_map);
517 } 517 }
@@ -538,6 +538,7 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)
538 unsigned long j; 538 unsigned long j;
539 int retval; 539 int retval;
540 cpumask_t oldmask; 540 cpumask_t oldmask;
541 cpumask_of_cpu_ptr(newmask, cpu);
541 542
542 if (num_cache_leaves == 0) 543 if (num_cache_leaves == 0)
543 return -ENOENT; 544 return -ENOENT;
@@ -548,7 +549,7 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)
548 return -ENOMEM; 549 return -ENOMEM;
549 550
550 oldmask = current->cpus_allowed; 551 oldmask = current->cpus_allowed;
551 retval = set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); 552 retval = set_cpus_allowed_ptr(current, newmask);
552 if (retval) 553 if (retval)
553 goto out; 554 goto out;
554 555