From: dann frazier <dannf@dannf.org>
To: linux-ia64@vger.kernel.org
Subject: conflicting per_cpu_init() defines on non-SMP
Date: Wed, 09 Mar 2005 05:09:58 +0000 [thread overview]
Message-ID: <1110344998.9344.9.camel@localhost> (raw)
In 2.6.11 arch/ia64/mm/discontig.c defines a per_cpu_init() function;
however, non-SMP systems have a per_cpu_init macro defined in
include/asm-ia64/percpu.h.
#define per_cpu_init() (__phys_per_cpu_start)
Is this the right way to approach a patch to fix this?
diff -urN linux-2.6.11.orig/arch/ia64/mm/discontig.c linux-2.6.11/arch/ia64/mm/discontig.c
--- linux-2.6.11.orig/arch/ia64/mm/discontig.c 2005-03-02 00:38:25.000000000 -0700
+++ linux-2.6.11/arch/ia64/mm/discontig.c 2005-03-08 22:10:48.704466208 -0700
@@ -525,6 +524,7 @@
* find_pernode_space() does most of this already, we just need to set
* local_per_cpu_offset
*/
+#ifdef CONFIG_SMP
void *per_cpu_init(void)
{
int cpu;
@@ -538,6 +538,9 @@
return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
}
+#else
+#define per_cpu_init() (__phys_per_cpu_start)
+#endif
/**
* show_mem - give short summary of memory stats
diff -urN linux-2.6.11.orig/include/asm-ia64/percpu.h linux-2.6.11/include/asm-ia64/percpu.h
--- linux-2.6.11.orig/include/asm-ia64/percpu.h 2005-03-02 00:38:17.000000000 -0700
+++ linux-2.6.11/include/asm-ia64/percpu.h 2005-03-08 22:09:23.689818812 -0700
@@ -52,7 +52,6 @@
#define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var))
#define __get_cpu_var(var) per_cpu__##var
-#define per_cpu_init() (__phys_per_cpu_start)
#endif /* SMP */
--
dann frazier <dannf@dannf.org>
next reply other threads:[~2005-03-09 5:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-09 5:09 dann frazier [this message]
2005-03-09 17:38 ` conflicting per_cpu_init() defines on non-SMP Grant Grundler
2005-03-13 22:16 ` dann frazier
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=1110344998.9344.9.camel@localhost \
--to=dannf@dannf.org \
--cc=linux-ia64@vger.kernel.org \
/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