RE: [PATCH] 2.6.14-rc3: wider use of for_each_cpu_mask() in arch/ia64

From: Chen, Kenneth W <kenneth.w.chen_at_intel.com>
Date: 2005-10-09 10:38:00
hawkes@sgi.com wrote on Saturday, October 08, 2005 10:44 AM
> --- linux.orig/arch/ia64/kernel/module.c	2005-08-28
16:41:01.000000000 -0700
> +++ linux/arch/ia64/kernel/module.c	2005-10-07 14:34:09.000000000
-0700
> @@ -948,7 +948,8 @@
>  {
>  	unsigned int i;
>  	for (i = 0; i < NR_CPUS; i++)
> -		if (cpu_possible(i))
> -			memcpy(pcpudst + __per_cpu_offset[i], src,
size);
> +	for_each_cpu_mask(i, cpu_possible_map) {
> +		memcpy(pcpudst + __per_cpu_offset[i], src, size);
> +	}
>  }
>  #endif /* CONFIG_SMP */

Looks like you forgot to delete the for (i=0 ...) clause.


> --- linux.orig/arch/ia64/kernel/smpboot.c	2005-08-28
16:41:01.000000000 -0700
> +++ linux/arch/ia64/kernel/smpboot.c	2005-10-07 14:36:51.000000000
-0700
> @@ -695,8 +695,9 @@
>  	 */
>  
>  	for (cpu = 0; cpu < NR_CPUS; cpu++)
> -		if (cpu_online(cpu))
> -			bogosum += cpu_data(cpu)->loops_per_jiffy;
> +	for_each_cpu_mask(cpu, cpu_online_map) {
> +		bogosum += cpu_data(cpu)->loops_per_jiffy;
> +	}

Same here.
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sun Oct 09 10:38:48 2005

This archive was generated by hypermail 2.1.8 : 2005-10-09 10:38:57 EST