diff options
| author | David S. Miller <davem@davemloft.net> | 2010-04-11 14:53:53 -0700 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-04-11 14:53:53 -0700 | 
| commit | 871039f02f8ec4ab2e5e9010718caa8e085786f1 (patch) | |
| tree | f0d2b3127fc48c862967d68c46c2d46668137515 /include/linux/module.h | |
| parent | e4077e018b5ead3de9951fc01d8bf12eeeeeefed (diff) | |
| parent | 4a1032faac94ebbf647460ae3e06fc21146eb280 (diff) | |
| download | olio-linux-3.10-871039f02f8ec4ab2e5e9010718caa8e085786f1.tar.xz olio-linux-3.10-871039f02f8ec4ab2e5e9010718caa8e085786f1.zip  | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/stmmac/stmmac_main.c
	drivers/net/wireless/wl12xx/wl1271_cmd.c
	drivers/net/wireless/wl12xx/wl1271_main.c
	drivers/net/wireless/wl12xx/wl1271_spi.c
	net/core/ethtool.c
	net/mac80211/scan.c
Diffstat (limited to 'include/linux/module.h')
| -rw-r--r-- | include/linux/module.h | 25 | 
1 files changed, 17 insertions, 8 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 5e869ffd34a..515d53ae6a7 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -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 */ @@ -365,7 +368,8 @@ struct module  	void (*exit)(void);  	struct module_ref { -		int count; +		unsigned int incs; +		unsigned int decs;  	} __percpu *refptr;  #endif @@ -392,6 +396,7 @@ static inline int module_is_live(struct module *mod)  struct module *__module_text_address(unsigned long addr);  struct module *__module_address(unsigned long addr);  bool is_module_address(unsigned long addr); +bool is_module_percpu_address(unsigned long addr);  bool is_module_text_address(unsigned long addr);  static inline int within_module_core(unsigned long addr, struct module *mod) @@ -459,9 +464,9 @@ static inline void __module_get(struct module *module)  {  	if (module) {  		preempt_disable(); -		__this_cpu_inc(module->refptr->count); +		__this_cpu_inc(module->refptr->incs);  		trace_module_get(module, _THIS_IP_, -				 __this_cpu_read(module->refptr->count)); +				 __this_cpu_read(module->refptr->incs));  		preempt_enable();  	}  } @@ -474,11 +479,10 @@ static inline int try_module_get(struct module *module)  		preempt_disable();  		if (likely(module_is_live(module))) { -			__this_cpu_inc(module->refptr->count); +			__this_cpu_inc(module->refptr->incs);  			trace_module_get(module, _THIS_IP_, -				__this_cpu_read(module->refptr->count)); -		} -		else +				__this_cpu_read(module->refptr->incs)); +		} else  			ret = 0;  		preempt_enable(); @@ -563,6 +567,11 @@ static inline bool is_module_address(unsigned long addr)  	return false;  } +static inline bool is_module_percpu_address(unsigned long addr) +{ +	return false; +} +  static inline bool is_module_text_address(unsigned long addr)  {  	return false;  |