mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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>
This commit is contained in:
parent
b72c40949b
commit
259354deaa
2 changed files with 39 additions and 32 deletions
|
@ -330,8 +330,11 @@ struct module
|
|||
struct module_notes_attrs *notes_attrs;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/* Per-cpu data. */
|
||||
void *percpu;
|
||||
void __percpu *percpu;
|
||||
unsigned int percpu_size;
|
||||
#endif
|
||||
|
||||
/* The command line arguments (may be mangled). People like
|
||||
keeping pointers to this stuff */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue