Skip to contentSkip to conversation

per-cpu patch 1/3

PATCH In review Rusty Russell 2 participants 3 messages Jul 18, 2002 – Jul 22, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 per-cpu patch 1/3

Name: Export __per_cpu_offset so modules can use per-cpu data.
Author: Rusty Russell
Status: Trivial

D: As per Andrew Morton's request.

kernel/ksyms.c +4 -0
diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.25/kernel/ksyms.c working-2.5.25-percpu/kernel/ksyms.c
@@ -50,6 +50,7 @@
 #include <linux/namei.h>
 #include <linux/buffer_head.h>
 #include <linux/root_dev.h>
+#include <linux/percpu.h>
 #include <asm/checksum.h>
 
 #if defined(CONFIG_PROC_FS)
@@ -597,3 +598,6 @@
 
 EXPORT_SYMBOL(tasklist_lock);
 EXPORT_SYMBOL(pidhash);
+#if defined(CONFIG_SMP) && defined(__GENERIC_PER_CPU)
+EXPORT_SYMBOL(__per_cpu_offset);
+#endif

--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

#1 lore raw
Quoted 2 lines · Rusty Russell

Name: Export __per_cpu_offset so modules can use per-cpu data.

ie: so modules can access per-cpu data which is defined in vmlinux. afaik, modules cannot define percpu.h-style per-cpu storage of their own, yes?

That's rather a trap. It would be nice to ensure that any attempt to define per-cpu data in a module fails reliably at compile-time, please.

-

#2 lore raw

In message <[email protected]> you write:

Quoted 11 lines
Quoted 2 lines · Rusty Russell

Name: Export __per_cpu_offset so modules can use per-cpu data.

ie: so modules can access per-cpu data which is defined in vmlinux. afaik, modules cannot define percpu.h-style per-cpu storage of their own, yes?

That's rather a trap. It would be nice to ensure that any attempt to define per-cpu data in a module fails reliably at compile-time, please.

See patch 3/3.

Cheers!
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.