From: Rusty Russell <rusty@rustcorp.com.au>
To: Russell King <rmk@arm.linux.org.uk>
Cc: LKML <linux-kernel@vger.kernel.org>, torvalds@transmeta.com
Subject: Re: [PATCH] 2.5.32-smph
Date: Sat, 31 Aug 2002 15:21:24 +1000 [thread overview]
Message-ID: <20020831002231.196252C095@lists.samba.org> (raw)
In-Reply-To: Your message of "Fri, 30 Aug 2002 22:39:15 +0100." <E17ktU3-00035O-00@flint.arm.linux.org.uk>
In message <E17ktU3-00035O-00@flint.arm.linux.org.uk> you write:
> This patch appears not to be in 2.5.32, but applies cleanly.
>
> Use of cpu_online on UP causes the following warnings:
>
> page_alloc.c:555: warning: statement with no effect
> proc_misc.c:297: warning: statement with no effect
> proc_misc.c:313: warning: statement with no effect
> dev.c:1824: warning: statement with no effect
>
> This patch fixes these warnings.
I prefer this fix, which also adds cpu_possible(i) for UP.
Name: cpu_possible for UP
Author: Rusty Russell
Status: Trivial
D: This patch defines cpu_possible() for non-SMP.
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.32/include/linux/smp.h working-2.5.32-cpu-possible/include/linux/smp.h
--- linux-2.5.32/include/linux/smp.h 2002-08-28 09:29:53.000000000 +1000
+++ working-2.5.32-cpu-possible/include/linux/smp.h 2002-08-29 15:30:49.000000000 +1000
@@ -94,9 +94,10 @@ int cpu_up(unsigned int cpu);
static inline void smp_send_reschedule(int cpu) { }
static inline void smp_send_reschedule_all(void) { }
#define cpu_online_map 1
-#define cpu_online(cpu) ({ cpu; 1; })
+#define cpu_online(cpu) ({ BUG_ON((cpu) != 0); 1; })
#define num_online_cpus() 1
#define num_booting_cpus() 1
+#define cpu_possible(i) ({ BUG_ON((cpu) != 0); 1; })
struct notifier_block;
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
prev parent reply other threads:[~2002-08-31 5:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-30 21:39 Russell King
2002-08-31 5:21 ` Rusty Russell [this message]
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=20020831002231.196252C095@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
--cc=torvalds@transmeta.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®