From: Tsutomu OWA <tsutomu.owa@toshiba.co.jp>
To: mingo@elte.hu
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org,
tsutomu.owa@toshiba.co.jp
Subject: [patch 6/7 -rt] powerpc 2.6.20-rt8: fix compile error (percpu.h)
Date: Wed, 07 Mar 2007 10:20:42 +0900 [thread overview]
Message-ID: <yyibqj526j9.wl@toshiba.co.jp> (raw)
In-Reply-To: <yyik5xt27c0.wl@toshiba.co.jp>
To fix the following compile error by adding necessary macro definitions
(mostly taken from asm-generic/percpu.h).
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
include/asm-powerpc/percpu.h
In file included from include/asm/tlb.h:52,
from arch/powerpc/mm/mem.c:44:
include/asm-generic/tlb.h:49: error: expected declaration specifiers or '...' before 'mmu_gathers'
include/asm-generic/tlb.h:49: warning: data definition has no type or storage class
include/asm-generic/tlb.h:49: warning: type defaults to 'int' in declaration of 'DECLARE_PER_CPU_LOCKED'
include/asm-generic/tlb.h: In function 'tlb_gather_mmu':
include/asm-generic/tlb.h:58: warning: implicit declaration of function '__get_cpu_lock'
include/asm-generic/tlb.h:58: error: 'mmu_gathers' undeclared (first use in this function)
include/asm-generic/tlb.h:58: error: (Each undeclared identifier is reported only once
include/asm-generic/tlb.h:58: error: for each function it appears in.)
:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Signed-off-by: Tsutomu Owa <tsutomu.owa@toshiba.co.jp>
-- owa
diff -rup linux-rt8/include/asm-powerpc/percpu.h rt/include/asm-powerpc/percpu.h
--- linux-rt8/include/asm-powerpc/percpu.h 2007-02-20 09:37:27.000000000 +0900
+++ rt/include/asm-powerpc/percpu.h 2007-02-20 16:03:44.000000000 +0900
@@ -19,12 +19,24 @@
/* Separate out the type, so (int[3], foo) works. */
#define DEFINE_PER_CPU(type, name) \
__attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name
+#define DEFINE_PER_CPU_LOCKED(type, name) \
+ __attribute__((__section__(".data.percpu"))) __DEFINE_SPINLOCK(per_cpu_lock__##name##_locked); \
+ __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name##_locked
/* var is in discarded region: offset to particular copy we want */
#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)))
#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()))
#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()))
+#define per_cpu_lock(var, cpu) \
+ (*RELOC_HIDE(&per_cpu_lock__##var##_locked, __per_cpu_offset(cpu)))
+#define per_cpu_var_locked(var, cpu) \
+ (*RELOC_HIDE(&per_cpu__##var##_locked, __per_cpu_offset(cpu)))
+#define __get_cpu_lock(var, cpu) \
+ per_cpu_lock(var, cpu)
+#define __get_cpu_var_locked(var, cpu) \
+ per_cpu_var_locked(var, cpu)
+
/* A macro to avoid #include hell... */
#define percpu_modcopy(pcpudst, src, size) \
do { \
@@ -40,17 +52,27 @@ extern void setup_per_cpu_areas(void);
#define DEFINE_PER_CPU(type, name) \
__typeof__(type) per_cpu__##name
+#define DEFINE_PER_CPU_LOCKED(type, name) \
+ __DEFINE_SPINLOCK(per_cpu_lock__##name##_locked); \
+ __typeof__(type) per_cpu__##name##_locked
#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var))
+#define per_cpu_var_locked(var, cpu) (*((void)(cpu), &per_cpu__##var##_locked))
+
#define __get_cpu_var(var) per_cpu__##var
#define __raw_get_cpu_var(var) per_cpu__##var
#endif /* SMP */
#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
+#define DECLARE_PER_CPU_LOCKED(type, name) \
+ extern spinlock_t per_cpu_lock__##name##_locked; \
+ extern __typeof__(type) per_cpu__##name##_locked
#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
+#define EXPORT_PER_CPU_LOCKED_SYMBOL(var) EXPORT_SYMBOL(per_cpu_lock__##var##_locked); EXPORT_SYMBOL(per_cpu__##var##_locked)
+#define EXPORT_PER_CPU_LOCKED_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu_lock__##var##_locked); EXPORT_SYMBOL_GPL(per_cpu__##var##_locked)
#else
#include <asm-generic/percpu.h>
next prev parent reply other threads:[~2007-03-07 1:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-07 1:03 [patch 0/7 -rt] powerpc 2.6.20-rt8: fix build breakage for PowerPC(ppc64) Tsutomu OWA
2007-03-07 1:14 ` [patch 1/7 -rt] powerpc 2.6.20-rt8: fix compile error in bug.h Tsutomu OWA
2007-03-07 1:15 ` [patch 2/7] powerpc 2.6.20-rt8: fix compile error (time.c) Tsutomu OWA
2007-03-07 1:16 ` [patch 3/7] powerpc 2.6.20-rt8: fix compile error (manage.c) Tsutomu OWA
2007-03-07 1:18 ` [patch 4/7] powerpc 2.6.20-rt8: fix compile error (futex.h) Tsutomu OWA
2007-03-07 1:19 ` [patch 5/7 -rt] powerpc 2.6.20-rt8: fix compile error (spinlock.h) Tsutomu OWA
2007-03-07 1:20 ` Tsutomu OWA [this message]
2007-03-07 1:22 ` [patch 7/7 -rt] powerpc 2.6.20-rt8: fix compile error (hw_irq.h) Tsutomu OWA
2007-03-07 9:05 ` [patch 0/7 -rt] powerpc 2.6.20-rt8: fix build breakage for PowerPC(ppc64) Ingo Molnar
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=yyibqj526j9.wl@toshiba.co.jp \
--to=tsutomu.owa@toshiba.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mingo@elte.hu \
/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®