diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-14 15:32:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-14 15:32:16 -0500 |
commit | 0a80939b3e6af4b0dc93bf88ec02fd7e90a16f1b (patch) | |
tree | a112335f2b2b2a51e90531c6c67e8a3b54dcf0ef /include/linux | |
parent | 0b48d42235caf627121f440b57d376f48a9af8b6 (diff) | |
parent | 72db395ffadb1d33233fd123c2bf87ba0198c6c1 (diff) |
Merge tag 'for-linus' of git://github.com/rustyrussell/linux
Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1
* tag 'for-linus' of git://github.com/rustyrussell/linux:
module_param: check that bool parameters really are bool.
intelfbdrv.c: bailearly is an int module_param
paride/pcd: fix bool verbose module parameter.
module_param: make bool parameters really bool (drivers & misc)
module_param: make bool parameters really bool (arch)
module_param: make bool parameters really bool (core code)
kernel/async: remove redundant declaration.
printk: fix unnecessary module_param_name.
lirc_parallel: fix module parameter description.
module_param: avoid bool abuse, add bint for special cases.
module_param: check type correctness for module_param_array
modpost: use linker section to generate table.
modpost: use a table rather than a giant if/else statement.
modules: sysfs - export: taint, coresize, initsize
kernel/params: replace DEBUGP with pr_debug
module: replace DEBUGP with pr_debug
module: struct module_ref should contains long fields
module: Fix performance regression on modules with large symbol tables
module: Add comments describing how the "strmap" logic works
Fix up conflicts in scripts/mod/file2alias.c due to the new linker-
generated table approach to adding __mod_*_device_table entries. The
ARM sa11x0 mcp bus needed to be converted to that too.
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/console.h | 2 | ||||
-rw-r--r-- | include/linux/init.h | 3 | ||||
-rw-r--r-- | include/linux/lockd/lockd.h | 2 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 2 | ||||
-rw-r--r-- | include/linux/module.h | 21 | ||||
-rw-r--r-- | include/linux/moduleparam.h | 17 |
6 files changed, 30 insertions, 17 deletions
diff --git a/include/linux/console.h b/include/linux/console.h index 7453cfd593c8..7201ce4280ca 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -152,7 +152,7 @@ extern int braille_register_console(struct console *, int index, | |||
152 | char *console_options, char *braille_options); | 152 | char *console_options, char *braille_options); |
153 | extern int braille_unregister_console(struct console *); | 153 | extern int braille_unregister_console(struct console *); |
154 | extern void console_sysfs_notify(void); | 154 | extern void console_sysfs_notify(void); |
155 | extern int console_suspend_enabled; | 155 | extern bool console_suspend_enabled; |
156 | 156 | ||
157 | /* Suspend and resume console messages over PM events */ | 157 | /* Suspend and resume console messages over PM events */ |
158 | extern void suspend_console(void); | 158 | extern void suspend_console(void); |
diff --git a/include/linux/init.h b/include/linux/init.h index 9146f39cdddf..6b951095a42f 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_INIT_H | 2 | #define _LINUX_INIT_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/types.h> | ||
5 | 6 | ||
6 | /* These macros are used to mark some functions or | 7 | /* These macros are used to mark some functions or |
7 | * initialized data (doesn't apply to uninitialized data) | 8 | * initialized data (doesn't apply to uninitialized data) |
@@ -156,7 +157,7 @@ void prepare_namespace(void); | |||
156 | 157 | ||
157 | extern void (*late_time_init)(void); | 158 | extern void (*late_time_init)(void); |
158 | 159 | ||
159 | extern int initcall_debug; | 160 | extern bool initcall_debug; |
160 | 161 | ||
161 | #endif | 162 | #endif |
162 | 163 | ||
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 90b0656a869e..88a114fce477 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -195,7 +195,7 @@ extern struct svc_procedure nlmsvc_procedures4[]; | |||
195 | #endif | 195 | #endif |
196 | extern int nlmsvc_grace_period; | 196 | extern int nlmsvc_grace_period; |
197 | extern unsigned long nlmsvc_timeout; | 197 | extern unsigned long nlmsvc_timeout; |
198 | extern int nsm_use_hostnames; | 198 | extern bool nsm_use_hostnames; |
199 | extern u32 nsm_local_state; | 199 | extern u32 nsm_local_state; |
200 | 200 | ||
201 | /* | 201 | /* |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index dd13e0539092..0beba1e5e1ed 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -417,7 +417,7 @@ static inline void mmc_set_disable_delay(struct mmc_host *host, | |||
417 | } | 417 | } |
418 | 418 | ||
419 | /* Module parameter */ | 419 | /* Module parameter */ |
420 | extern int mmc_assume_removable; | 420 | extern bool mmc_assume_removable; |
421 | 421 | ||
422 | static inline int mmc_card_is_removable(struct mmc_host *host) | 422 | static inline int mmc_card_is_removable(struct mmc_host *host) |
423 | { | 423 | { |
diff --git a/include/linux/module.h b/include/linux/module.h index 3cb7839a60b9..4598bf03e98b 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -205,6 +205,20 @@ enum module_state | |||
205 | MODULE_STATE_GOING, | 205 | MODULE_STATE_GOING, |
206 | }; | 206 | }; |
207 | 207 | ||
208 | /** | ||
209 | * struct module_ref - per cpu module reference counts | ||
210 | * @incs: number of module get on this cpu | ||
211 | * @decs: number of module put on this cpu | ||
212 | * | ||
213 | * We force an alignment on 8 or 16 bytes, so that alloc_percpu() | ||
214 | * put @incs/@decs in same cache line, with no extra memory cost, | ||
215 | * since alloc_percpu() is fine grained. | ||
216 | */ | ||
217 | struct module_ref { | ||
218 | unsigned long incs; | ||
219 | unsigned long decs; | ||
220 | } __attribute((aligned(2 * sizeof(unsigned long)))); | ||
221 | |||
208 | struct module | 222 | struct module |
209 | { | 223 | { |
210 | enum module_state state; | 224 | enum module_state state; |
@@ -347,10 +361,7 @@ struct module | |||
347 | /* Destruction function. */ | 361 | /* Destruction function. */ |
348 | void (*exit)(void); | 362 | void (*exit)(void); |
349 | 363 | ||
350 | struct module_ref { | 364 | struct module_ref __percpu *refptr; |
351 | unsigned int incs; | ||
352 | unsigned int decs; | ||
353 | } __percpu *refptr; | ||
354 | #endif | 365 | #endif |
355 | 366 | ||
356 | #ifdef CONFIG_CONSTRUCTORS | 367 | #ifdef CONFIG_CONSTRUCTORS |
@@ -434,7 +445,7 @@ extern void __module_put_and_exit(struct module *mod, long code) | |||
434 | #define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code); | 445 | #define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code); |
435 | 446 | ||
436 | #ifdef CONFIG_MODULE_UNLOAD | 447 | #ifdef CONFIG_MODULE_UNLOAD |
437 | unsigned int module_refcount(struct module *mod); | 448 | unsigned long module_refcount(struct module *mod); |
438 | void __symbol_put(const char *symbol); | 449 | void __symbol_put(const char *symbol); |
439 | #define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x) | 450 | #define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x) |
440 | void symbol_put_addr(void *addr); | 451 | void symbol_put_addr(void *addr); |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 7939f636c8ba..c47f4d60db0b 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -350,23 +350,23 @@ extern int param_set_charp(const char *val, const struct kernel_param *kp); | |||
350 | extern int param_get_charp(char *buffer, const struct kernel_param *kp); | 350 | extern int param_get_charp(char *buffer, const struct kernel_param *kp); |
351 | #define param_check_charp(name, p) __param_check(name, p, char *) | 351 | #define param_check_charp(name, p) __param_check(name, p, char *) |
352 | 352 | ||
353 | /* For historical reasons "bool" parameters can be (unsigned) "int". */ | 353 | /* We used to allow int as well as bool. We're taking that away! */ |
354 | extern struct kernel_param_ops param_ops_bool; | 354 | extern struct kernel_param_ops param_ops_bool; |
355 | extern int param_set_bool(const char *val, const struct kernel_param *kp); | 355 | extern int param_set_bool(const char *val, const struct kernel_param *kp); |
356 | extern int param_get_bool(char *buffer, const struct kernel_param *kp); | 356 | extern int param_get_bool(char *buffer, const struct kernel_param *kp); |
357 | #define param_check_bool(name, p) \ | 357 | #define param_check_bool(name, p) __param_check(name, p, bool) |
358 | static inline void __check_##name(void) \ | ||
359 | { \ | ||
360 | BUILD_BUG_ON(!__same_type((p), bool *) && \ | ||
361 | !__same_type((p), unsigned int *) && \ | ||
362 | !__same_type((p), int *)); \ | ||
363 | } | ||
364 | 358 | ||
365 | extern struct kernel_param_ops param_ops_invbool; | 359 | extern struct kernel_param_ops param_ops_invbool; |
366 | extern int param_set_invbool(const char *val, const struct kernel_param *kp); | 360 | extern int param_set_invbool(const char *val, const struct kernel_param *kp); |
367 | extern int param_get_invbool(char *buffer, const struct kernel_param *kp); | 361 | extern int param_get_invbool(char *buffer, const struct kernel_param *kp); |
368 | #define param_check_invbool(name, p) __param_check(name, p, bool) | 362 | #define param_check_invbool(name, p) __param_check(name, p, bool) |
369 | 363 | ||
364 | /* An int, which can only be set like a bool (though it shows as an int). */ | ||
365 | extern struct kernel_param_ops param_ops_bint; | ||
366 | extern int param_set_bint(const char *val, const struct kernel_param *kp); | ||
367 | #define param_get_bint param_get_int | ||
368 | #define param_check_bint param_check_int | ||
369 | |||
370 | /** | 370 | /** |
371 | * module_param_array - a parameter which is an array of some type | 371 | * module_param_array - a parameter which is an array of some type |
372 | * @name: the name of the array variable | 372 | * @name: the name of the array variable |
@@ -395,6 +395,7 @@ extern int param_get_invbool(char *buffer, const struct kernel_param *kp); | |||
395 | * module_param_named() for why this might be necessary. | 395 | * module_param_named() for why this might be necessary. |
396 | */ | 396 | */ |
397 | #define module_param_array_named(name, array, type, nump, perm) \ | 397 | #define module_param_array_named(name, array, type, nump, perm) \ |
398 | param_check_##type(name, &(array)[0]); \ | ||
398 | static const struct kparam_array __param_arr_##name \ | 399 | static const struct kparam_array __param_arr_##name \ |
399 | = { .max = ARRAY_SIZE(array), .num = nump, \ | 400 | = { .max = ARRAY_SIZE(array), .num = nump, \ |
400 | .ops = ¶m_ops_##type, \ | 401 | .ops = ¶m_ops_##type, \ |