lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <6453C3CB8E2B3646B0D020C112613273C5AF23@sausexmb4.amd.com>
Date:	Wed, 18 Mar 2009 17:03:12 -0500
From:	"Langsdorf, Mark" <mark.langsdorf@....com>
To:	<linux-kernel@...r.kernel.org>, <mingo@...hat.com>,
	<hpa@...or.com>, "Langsdorf, Mark" <mark.langsdorf@....com>,
	<tglx@...utronix.de>, <hpa@...ux.intel.com>
Subject: RE: [tip:x86/cpu] x86, cpu: intel_cacheinfo.c: use cpumask_first(to_cpumask())

Thanks! 

> -----Original Message-----
> From: H. Peter Anvin [mailto:hpa@...ux.intel.com] 
> Sent: Wednesday, March 18, 2009 4:43 PM
> To: linux-tip-commits@...r.kernel.org
> Cc: hpa@...or.com; mingo@...hat.com; Langsdorf, Mark; 
> tglx@...utronix.de; hpa@...ux.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@...ux.intel.com>
> AuthorDate: Wed, 18 Mar 2009 14:36:02 -0700
> Committer:  H. Peter Anvin <hpa@...ux.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@...ux.intel.com>
> Cc: Mark Langsdorf <mark.langsdorf@....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;
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ