public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Andrew Morton <akpm@digeo.com>
Cc: Pawel Kot <pkot@bezsensu.pl>, torvalds@transmeta.com
Cc: "Dieter Nützel" <Dieter.Nuetzel@hamburg.de>,
	"Anton Altaparmakov" <aia21@cantab.net>,
	"Linux Kernel List" <linux-kernel@vger.kernel.org>
Subject: Re: 2.5.45: NTFS unresolved symbol
Date: Sat, 02 Nov 2002 09:24:05 +1100	[thread overview]
Message-ID: <20021101222448.F11852C445@lists.samba.org> (raw)
In-Reply-To: Your message of "Fri, 01 Nov 2002 11:48:48 -0800." <3DC2DAA0.A46C5085@digeo.com>

In message <3DC2DAA0.A46C5085@digeo.com> you write:
> > +EXPORT_SYMBOL(page_states__per_cpu);

> Which works OK without module versioning.  But with module versioning,
> genksyms goes looking through source files for "EXPORT_SYMBOL".  Which
> isn't there.

Proper fix below.  Linus please apply.

The source is run through CPP before hitting genksyms (which is why
the #define EXPORT_SYMBOL is under #ifndef __GENKSYMS__).  So in fact,
"EXPORT_SYMBOL( page_states__per_cpu) ;" gets to kenksyms.  But your
fix doesn't work either: genksyms can't handle the __typeof__ in the
definition it sees, and gives up.

Note, that this fix (almost certainly) breaks:
	DEFINE_PER_CPU(int[3], myvar);
	EXPORT_PER_CPU_SYMBOL(myvar);

But we'd need to teach genksyms about EXPORT_PER_CPU_SYMBOL or
__typeof__ for that[1]

Rusty.
[1] Proving the point about the separation of that from the kernel
    source being wrong.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.45/include/asm-generic/percpu.h working-2.5.45-tmp/include/asm-generic/percpu.h
--- linux-2.5.45/include/asm-generic/percpu.h	2002-10-31 12:36:56.000000000 +1100
+++ working-2.5.45-tmp/include/asm-generic/percpu.h	2002-11-02 09:20:06.000000000 +1100
@@ -35,4 +35,10 @@ extern unsigned long __per_cpu_offset[NR
 #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(var##__per_cpu)
 #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(var##__per_cpu)
 
+/* Genksyms can't follow the percpu declaration.  Give it a fake one. */
+#ifdef __GENKSYMS__
+#undef DEFINE_PER_CPU
+#define DEFINE_PER_CPU(type, name) type name##__per_cpu
+#endif /*__GENKSYMS__*/
+
 #endif /* _ASM_GENERIC_PERCPU_H_ */

      parent reply	other threads:[~2002-11-01 22:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-01  3:31 2.5.45: NTFS unresolved symbol Dieter Nützel
2002-11-01 12:20 ` Pawel Kot
2002-11-01 19:48   ` Andrew Morton
2002-11-01 20:00     ` Sam Ravnborg
2002-11-01 22:24     ` 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=20021101222448.F11852C445@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@digeo.com \
    --cc=pkot@bezsensu.pl \
    --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