aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-03-10 04:56:10 -0500
committerTejun Heo <tj@kernel.org>2010-03-29 10:07:12 -0400
commit259354deaaf03d49a02dbb9975d6ec2a54675672 (patch)
treea05fbdfecfa5c2924235ce2fb7618b3acdecaa16 /include
parentb72c40949b0f04728f2993a1434598d3bad094ea (diff)
module: encapsulate percpu handling better and record percpu_size
Better encapsulate module static percpu area handling so that code outsidef of CONFIG_SMP ifdef doesn't deal with mod->percpu directly and add mod->percpu_size and record percpu_size in it. Both percpu fields are compiled out on UP. While at it, mark mod->percpu w/ __percpu. This is to prepare for is_module_percpu_address(). Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include')
-rw-r--r--include/linux/module.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 5e869ffd34aa..87d247ac6761 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -330,8 +330,11 @@ struct module
330 struct module_notes_attrs *notes_attrs; 330 struct module_notes_attrs *notes_attrs;
331#endif 331#endif
332 332
333#ifdef CONFIG_SMP
333 /* Per-cpu data. */ 334 /* Per-cpu data. */
334 void *percpu; 335 void __percpu *percpu;
336 unsigned int percpu_size;
337#endif
335 338
336 /* The command line arguments (may be mangled). People like 339 /* The command line arguments (may be mangled). People like
337 keeping pointers to this stuff */ 340 keeping pointers to this stuff */