lkml.org 
[lkml]   [2002]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: 2.5.45: NTFS unresolved symbol
Date
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_ */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.078 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site