per-cpu patch 1/3
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
@@ -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.
Quoted 2 lines · Rusty Russell
Name: Export
__per_cpu_offsetso 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.
-
In message <[email protected]> you write:
Quoted 11 lines
Quoted 2 lines · Rusty Russell
Name: Export
__per_cpu_offsetso 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.