lkml.org 
[lkml]   [2009]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRE: [tip:x86/cpu] x86, cpu: intel_cacheinfo.c: use cpumask_first(to_cpumask())
    Date
    From
    Thanks! 

    > -----Original Message-----
    > From: H. Peter Anvin [mailto:hpa@linux.intel.com]
    > Sent: Wednesday, March 18, 2009 4:43 PM
    > To: linux-tip-commits@vger.kernel.org
    > Cc: hpa@zytor.com; mingo@redhat.com; Langsdorf, Mark;
    > tglx@linutronix.de; hpa@linux.intel.com
    > Subject: [tip:x86/cpu] x86, cpu: intel_cacheinfo.c: use
    > cpumask_first(to_cpumask())
    >
    > Commit-ID: d42c33ef0a236c6874c748438500c78edfaa1187
    > Gitweb:
    > http://git.kernel.org/tip/d42c33ef0a236c6874c748438500c78edfaa1187
    > Author: H. Peter Anvin <hpa@linux.intel.com>
    > AuthorDate: Wed, 18 Mar 2009 14:36:02 -0700
    > Committer: H. Peter Anvin <hpa@linux.intel.com>
    > CommitDate: Wed, 18 Mar 2009 14:38:36 -0700
    >
    > x86, 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 <hpa@linux.intel.com>
    > Cc: Mark Langsdorf <mark.langsdorf@amd.com>
    >
    >
    > ---
    > arch/x86/kernel/cpu/intel_cacheinfo.c | 6 ++++--
    > 1 files changed, 4 insertions(+), 2 deletions(-)
    >
    > diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c
    > b/arch/x86/kernel/cpu/intel_cacheinfo.c
    > index b728325..6f4d2a3 100644
    > --- a/arch/x86/kernel/cpu/intel_cacheinfo.c
    > +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
    > @@ -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];
    > unsigned 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;
    >
    >



    \
     
     \ /
      Last update: 2009-03-18 23:07    [W:0.035 / U:0.400 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site