diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2014-09-14 15:34:38 +0200 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2014-09-14 15:35:36 +0200 |
| commit | db985cbd67c45f875ef43cb5febfaa8cbd203c27 (patch) | |
| tree | 63542d05b1c0f730ec1ad5f915dc4eb3c015e616 /include/linux/module.h | |
| parent | c6f1224573c3b609bd8073b39f496637a16cc06f (diff) | |
| parent | 468a903c0e5147e3f93187f0b808a3ef957fd00e (diff) | |
Merge tag 'irqchip-core-3.18' of git://git.infradead.org/users/jcooper/linux into irq/core
irqchip core changes for v3.18
- renesas: suspend to RAM, runtime PM, cleanups and DT binding docs
- keystone: add new driver
- hip04: add Hisilicon HiP04 driver (without touching irq-gic.c)
- gic: Use defines instead of magic number, preserve v2 bybass bits
- handle_domain_irq: common low level interrupt entry handler
Diffstat (limited to 'include/linux/module.h')
| -rw-r--r-- | include/linux/module.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index f520a767c86c..71f282a4e307 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -396,18 +396,25 @@ 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, const struct module *mod) +static inline bool within_module_core(unsigned long addr, + const struct module *mod) { return (unsigned long)mod->module_core <= addr && addr < (unsigned long)mod->module_core + mod->core_size; } -static inline int within_module_init(unsigned long addr, const struct module *mod) +static inline bool within_module_init(unsigned long addr, + const struct module *mod) { return (unsigned long)mod->module_init <= addr && addr < (unsigned long)mod->module_init + mod->init_size; } +static inline bool within_module(unsigned long addr, const struct module *mod) +{ + return within_module_init(addr, mod) || within_module_core(addr, mod); +} + /* Search for module by name: must hold module_mutex. */ struct module *find_module(const char *name); |
