~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to include/linux/module.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#include <linux/stringify.h>
16
16
#include <linux/kobject.h>
17
17
#include <linux/moduleparam.h>
18
 
#include <linux/marker.h>
19
18
#include <linux/tracepoint.h>
20
19
 
21
20
#include <linux/percpu.h>
65
64
        const char *version;
66
65
} __attribute__ ((__aligned__(sizeof(void *))));
67
66
 
 
67
extern ssize_t __modver_version_show(struct module_attribute *,
 
68
                                     struct module *, char *);
 
69
 
68
70
struct module_kobject
69
71
{
70
72
        struct kobject kobj;
173
175
#define MODULE_VERSION(_version) MODULE_INFO(version, _version)
174
176
#else
175
177
#define MODULE_VERSION(_version)                                        \
176
 
        extern ssize_t __modver_version_show(struct module_attribute *, \
177
 
                                             struct module *, char *);  \
178
 
        static struct module_version_attribute __modver_version_attr    \
179
 
        __used                                                          \
180
 
    __attribute__ ((__section__ ("__modver"),aligned(sizeof(void *)))) \
181
 
        = {                                                             \
 
178
        static struct module_version_attribute ___modver_attr = {       \
182
179
                .mattr  = {                                             \
183
180
                        .attr   = {                                     \
184
181
                                .name   = "version",                    \
188
185
                },                                                      \
189
186
                .module_name    = KBUILD_MODNAME,                       \
190
187
                .version        = _version,                             \
191
 
        }
 
188
        };                                                              \
 
189
        static const struct module_version_attribute                    \
 
190
        __used __attribute__ ((__section__ ("__modver")))               \
 
191
        * __moduleparam_const __modver_attr = &___modver_attr
192
192
#endif
193
193
 
194
194
/* Optional firmware file (or files) needed by the module
224
224
        extern void *__crc_##sym __attribute__((weak));         \
225
225
        static const unsigned long __kcrctab_##sym              \
226
226
        __used                                                  \
227
 
        __attribute__((section("__kcrctab" sec), unused))       \
 
227
        __attribute__((section("___kcrctab" sec "+" #sym), unused))     \
228
228
        = (unsigned long) &__crc_##sym;
229
229
#else
230
230
#define __CRC_SYMBOL(sym, sec)
239
239
        = MODULE_SYMBOL_PREFIX #sym;                            \
240
240
        static const struct kernel_symbol __ksymtab_##sym       \
241
241
        __used                                                  \
242
 
        __attribute__((section("__ksymtab" sec), unused))       \
 
242
        __attribute__((section("___ksymtab" sec "+" #sym), unused))     \
243
243
        = { (unsigned long)&sym, __kstrtab_##sym }
244
244
 
245
245
#define EXPORT_SYMBOL(sym)                                      \
368
368
        struct module_notes_attrs *notes_attrs;
369
369
#endif
370
370
 
 
371
        /* The command line arguments (may be mangled).  People like
 
372
           keeping pointers to this stuff */
 
373
        char *args;
 
374
 
371
375
#ifdef CONFIG_SMP
372
376
        /* Per-cpu data. */
373
377
        void __percpu *percpu;
374
378
        unsigned int percpu_size;
375
379
#endif
376
380
 
377
 
        /* The command line arguments (may be mangled).  People like
378
 
           keeping pointers to this stuff */
379
 
        char *args;
380
 
#ifdef CONFIG_MARKERS
381
 
        struct marker *markers;
382
 
        unsigned int num_markers;
383
 
#endif
384
381
#ifdef CONFIG_TRACEPOINTS
 
382
        unsigned int num_tracepoints;
385
383
        struct tracepoint * const *tracepoints_ptrs;
386
 
        unsigned int num_tracepoints;
387
384
#endif
388
385
#ifdef HAVE_JUMP_LABEL
389
386
        struct jump_entry *jump_entries;
390
387
        unsigned int num_jump_entries;
391
388
#endif
392
389
#ifdef CONFIG_TRACING
 
390
        unsigned int num_trace_bprintk_fmt;
393
391
        const char **trace_bprintk_fmt_start;
394
 
        unsigned int num_trace_bprintk_fmt;
395
392
#endif
396
393
#ifdef CONFIG_EVENT_TRACING
397
394
        struct ftrace_event_call **trace_events;
398
395
        unsigned int num_trace_events;
399
396
#endif
400
397
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
 
398
        unsigned int num_ftrace_callsites;
401
399
        unsigned long *ftrace_callsites;
402
 
        unsigned int num_ftrace_callsites;
403
400
#endif
404
401
 
405
402
#ifdef CONFIG_MODULE_UNLOAD
480
477
                                        bool warn);
481
478
 
482
479
/* Walk the exported symbol table */
483
 
bool each_symbol(bool (*fn)(const struct symsearch *arr, struct module *owner,
484
 
                            unsigned int symnum, void *data), void *data);
 
480
bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
 
481
                                    struct module *owner,
 
482
                                    void *data), void *data);
485
483
 
486
484
/* Returns 0 and fills in value, defined and namebuf, or -ERANGE if
487
485
   symnum out of range. */
579
577
int unregister_module_notifier(struct notifier_block * nb);
580
578
 
581
579
extern void print_modules(void);
582
 
extern void list_modules(void *call_data);
583
 
 
584
 
extern void module_update_markers(void);
585
 
extern int module_get_iter_markers(struct marker_iter *iter);
586
580
 
587
581
extern void module_update_tracepoints(void);
588
582
extern int module_get_iter_tracepoints(struct tracepoint_iter *iter);
703
697
{
704
698
}
705
699
 
706
 
static inline void list_modules(void *call_data)
707
 
{
708
 
}
709
 
 
710
 
static inline void module_update_markers(void)
711
 
{
712
 
}
713
 
 
714
700
static inline void module_update_tracepoints(void)
715
701
{
716
702
}
719
705
{
720
706
        return 0;
721
707
}
722
 
 
723
 
static inline int module_get_iter_markers(struct marker_iter *iter)
724
 
{
725
 
        return 0;
726
 
}
727
708
#endif /* CONFIG_MODULES */
728
709
 
729
710
#ifdef CONFIG_SYSFS