diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-05 12:16:37 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-05 12:16:37 -0400 |
| commit | 9e74e7c81a24aee66024fc477786bd1de84e293b (patch) | |
| tree | 8f172b7e5a86fe6b51e46f1d219e9c0707beab60 /include/linux/module.h | |
| parent | 4946d54cb55e86a156216fcfeed5568514b0830f (diff) | |
| parent | d5e50daf92df8afcb701fd717b301985691e802f (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
module: add stub for is_module_percpu_address
percpu, module: implement and use is_kernel/module_percpu_address()
module: encapsulate percpu handling better and record percpu_size
Diffstat (limited to 'include/linux/module.h')
| -rw-r--r-- | include/linux/module.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 5e869ffd34aa..8bd399a00343 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 */ |
| @@ -392,6 +395,7 @@ static inline int module_is_live(struct module *mod) | |||
| 392 | struct module *__module_text_address(unsigned long addr); | 395 | struct module *__module_text_address(unsigned long addr); |
| 393 | struct module *__module_address(unsigned long addr); | 396 | struct module *__module_address(unsigned long addr); |
| 394 | bool is_module_address(unsigned long addr); | 397 | bool is_module_address(unsigned long addr); |
| 398 | bool is_module_percpu_address(unsigned long addr); | ||
| 395 | bool is_module_text_address(unsigned long addr); | 399 | bool is_module_text_address(unsigned long addr); |
| 396 | 400 | ||
| 397 | static inline int within_module_core(unsigned long addr, struct module *mod) | 401 | static inline int within_module_core(unsigned long addr, struct module *mod) |
| @@ -563,6 +567,11 @@ static inline bool is_module_address(unsigned long addr) | |||
| 563 | return false; | 567 | return false; |
| 564 | } | 568 | } |
| 565 | 569 | ||
| 570 | static inline bool is_module_percpu_address(unsigned long addr) | ||
| 571 | { | ||
| 572 | return false; | ||
| 573 | } | ||
| 574 | |||
| 566 | static inline bool is_module_text_address(unsigned long addr) | 575 | static inline bool is_module_text_address(unsigned long addr) |
| 567 | { | 576 | { |
| 568 | return false; | 577 | return false; |
