lkml.org 
[lkml]   [2003]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][2.5] fix for_each_cpu compilation on UP
Zwane Mwaikambo <zwane@holomorphy.com> wrote:
>
> This adds a definition for for_each_cpu when !CONFIG_SMP
>
> Please apply
>
> Index: linux-2.5.58-cpu_hotplug/include/linux/smp.h
> ===================================================================
> RCS file: /build/cvsroot/linux-2.5.58/include/linux/smp.h,v
> retrieving revision 1.1.1.1.2.3
> diff -u -r1.1.1.1.2.3 smp.h
> --- linux-2.5.58-cpu_hotplug/include/linux/smp.h 17 Jan 2003 03:13:12 -0000 1.1.1.1.2.3
> +++ linux-2.5.58-cpu_hotplug/include/linux/smp.h 17 Jan 2003 03:14:40 -0000
> @@ -109,6 +109,7 @@
> #define num_booting_cpus() 1
> #define cpu_possible(cpu) ({ BUG_ON((cpu) != 0); 1; })
> #define smp_prepare_boot_cpu() do {} while (0)
> +#define for_each_cpu(cpu, mask) for (cpu = 0; cpu == 0; cpu++)
>

This will cause nasty warnings (and posibly break) x86_64 builds, which
define their own for_each_cpu() in the !CONFIG_SMP case.

wimpy fix: move this into include/asm-i386/smp.h

nice fix: do a generic for_each_cpu() in include/linux/wherever.h, and rip
out the arch-private definitions.


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

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.063 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site