aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/module.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h30
1 files changed, 11 insertions, 19 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 84d75f3a8aca..eaec13ddd667 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -183,6 +183,7 @@ void *__symbol_get_gpl(const char *symbol);
183 183
184/* For every exported symbol, place a struct in the __ksymtab section */ 184/* For every exported symbol, place a struct in the __ksymtab section */
185#define __EXPORT_SYMBOL(sym, sec) \ 185#define __EXPORT_SYMBOL(sym, sec) \
186 extern typeof(sym) sym; \
186 __CRC_SYMBOL(sym, sec) \ 187 __CRC_SYMBOL(sym, sec) \
187 static const char __kstrtab_##sym[] \ 188 static const char __kstrtab_##sym[] \
188 __attribute__((section("__ksymtab_strings"))) \ 189 __attribute__((section("__ksymtab_strings"))) \
@@ -198,6 +199,9 @@ void *__symbol_get_gpl(const char *symbol);
198#define EXPORT_SYMBOL_GPL(sym) \ 199#define EXPORT_SYMBOL_GPL(sym) \
199 __EXPORT_SYMBOL(sym, "_gpl") 200 __EXPORT_SYMBOL(sym, "_gpl")
200 201
202#define EXPORT_SYMBOL_GPL_FUTURE(sym) \
203 __EXPORT_SYMBOL(sym, "_gpl_future")
204
201#endif 205#endif
202 206
203struct module_ref 207struct module_ref
@@ -242,6 +246,7 @@ struct module
242 /* Sysfs stuff. */ 246 /* Sysfs stuff. */
243 struct module_kobject mkobj; 247 struct module_kobject mkobj;
244 struct module_param_attrs *param_attrs; 248 struct module_param_attrs *param_attrs;
249 struct module_attribute *modinfo_attrs;
245 const char *version; 250 const char *version;
246 const char *srcversion; 251 const char *srcversion;
247 252
@@ -255,6 +260,11 @@ struct module
255 unsigned int num_gpl_syms; 260 unsigned int num_gpl_syms;
256 const unsigned long *gpl_crcs; 261 const unsigned long *gpl_crcs;
257 262
263 /* symbols that will be GPL-only in the near future. */
264 const struct kernel_symbol *gpl_future_syms;
265 unsigned int num_gpl_future_syms;
266 const unsigned long *gpl_future_crcs;
267
258 /* Exception table */ 268 /* Exception table */
259 unsigned int num_exentries; 269 unsigned int num_exentries;
260 const struct exception_table_entry *extable; 270 const struct exception_table_entry *extable;
@@ -441,6 +451,7 @@ void module_remove_driver(struct device_driver *);
441#else /* !CONFIG_MODULES... */ 451#else /* !CONFIG_MODULES... */
442#define EXPORT_SYMBOL(sym) 452#define EXPORT_SYMBOL(sym)
443#define EXPORT_SYMBOL_GPL(sym) 453#define EXPORT_SYMBOL_GPL(sym)
454#define EXPORT_SYMBOL_GPL_FUTURE(sym)
444 455
445/* Given an address, look for it in the exception tables. */ 456/* Given an address, look for it in the exception tables. */
446static inline const struct exception_table_entry * 457static inline const struct exception_table_entry *
@@ -544,25 +555,6 @@ static inline void module_remove_driver(struct device_driver *driver)
544 555
545/* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */ 556/* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */
546 557
547struct obsolete_modparm {
548 char name[64];
549 char type[64-sizeof(void *)];
550 void *addr;
551};
552
553static inline void MODULE_PARM_(void) { }
554#ifdef MODULE
555/* DEPRECATED: Do not use. */
556#define MODULE_PARM(var,type) \
557extern struct obsolete_modparm __parm_##var \
558__attribute__((section("__obsparm"))); \
559struct obsolete_modparm __parm_##var = \
560{ __stringify(var), type, &MODULE_PARM_ }; \
561__MODULE_PARM_TYPE(var, type);
562#else
563#define MODULE_PARM(var,type) static void __attribute__((__unused__)) *__parm_##var = &MODULE_PARM_;
564#endif
565
566#define __MODULE_STRING(x) __stringify(x) 558#define __MODULE_STRING(x) __stringify(x)
567 559
568/* Use symbol_get and symbol_put instead. You'll thank me. */ 560/* Use symbol_get and symbol_put instead. You'll thank me. */