From: Andrew Morton <akpm@digeo.com>
To: Zwane Mwaikambo <zwane@holomorphy.com>
Cc: linux-kernel@vger.kernel.org, James.Bottomley@SteelEye.com
Subject: Re: [PATCH][2.5] fix for_each_cpu compilation on UP
Date: Thu, 16 Jan 2003 21:54:30 -0800 [thread overview]
Message-ID: <20030116215430.6c0ac6a0.akpm@digeo.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0301162358060.24250-100000@montezuma.mastecende.com>
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.
next prev parent reply other threads:[~2003-01-17 5:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-17 5:01 Zwane Mwaikambo
2003-01-17 5:54 ` Andrew Morton [this message]
2003-01-17 15:03 ` James Bottomley
2003-01-17 16:44 ` Zwane Mwaikambo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030116215430.6c0ac6a0.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zwane@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®