x86, cpu: intel_cacheinfo.c: use cpumask_first(to_cpumask())
A message that is not in the archive (sent off-list or not yet received): [email protected]
Thanks!
Quoted 61 lines
-----Original Message-----
From: H. Peter Anvin [mailto:[email protected]]
Sent: Wednesday, March 18, 2009 4:43 PM
To: [email protected]
Cc: [email protected]; [email protected]; Langsdorf, Mark; [email protected]; [email protected]
Subject: [tip:x86/cpu] x86, cpu:intel_cacheinfo.c: use cpumask_first(to_cpumask())Commit-ID:
d42c33ef0a236c6874c748438500c78edfaa1187Gitweb:
http://git.kernel.org/tip/d42c33ef0a236c6874c748438500c78edfaa1187Author: H. Peter Anvin <[email protected]> AuthorDate: Wed, 18 Mar 2009 14:36:02 -0700 Committer: H. Peter Anvin <[email protected]> CommitDate: Wed, 18 Mar 2009 14:38:36 -0700x86, cpu:
intel_cacheinfo.c: use cpumask_first(to_cpumask())Impact: fix warning and possible UP build failure
Instead of using
first_cpu()on a raw bitmask, use cpumask_first(to_cpumask()).Signed-off-by H. Peter Anvin <[email protected]>Cc Mark Langsdorf <[email protected]>--- arch/x86/kernel/cpu/intel_cacheinfo.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)arch/x86/kernel/cpu/intel_cacheinfo.c +2
-1@@ -643,7 +643,8 @@ static ssize_t show_##file_name \static ssize_t show_cache_disable (struct _cpuid4_info *this_leaf,char *buf,unsigned int index) { -int node =cpu_to_node (first_cpu (this_leaf->shared_cpu_map)); +int cpu =cpumask_first (to_cpumask (this_leaf->shared_cpu_map)); +int node =cpu_to_node (cpu);struct pci_dev *dev = k8_northbridges[node];arch/x86/kernel/cpu/intel_cacheinfo.c +2
-1unsigned int reg =0 ;@@ -665,7 +666,8 @@ static ssize_t store_cache_disable(struct _cpuid4_info *this_leaf, const char *buf, size_t count, unsigned int index) { - int node = cpu_to_node(first_cpu(this_leaf->shared_cpu_map)); + int cpu = cpumask_first(to_cpumask(this_leaf->shared_cpu_map)); +int node =cpu_to_node (cpu);struct pci_dev *dev = k8_northbridges[node];unsigned long val =0 ;unsigned int scrubber =0 ;