summaryrefslogtreecommitdiff
path: root/include/linux/module.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2003-07-18 05:23:14 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-07-18 05:23:14 -0700
commit518538b3446367487ff8fc3e8de5fc22076b5b8a (patch)
tree99ce04de086489fd140a559e9201af60625b569d /include/linux/module.h
parentf9feecc3eda1299617c2fe764e3ebbbf37cc1fec (diff)
[PATCH] Resolve module local_t conflict
Uses local_t for module reference counts.
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 1d48f23a8a6a..d12463033162 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -16,6 +16,7 @@
#include <linux/kmod.h>
#include <linux/elf.h>
#include <linux/stringify.h>
+#include <asm/local.h>
#include <asm/module.h>
@@ -171,7 +172,7 @@ void *__symbol_get_gpl(const char *symbol);
struct module_ref
{
- atomic_t count;
+ local_t count;
} ____cacheline_aligned;
enum module_state
@@ -283,12 +284,6 @@ void __symbol_put(const char *symbol);
#define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x)
void symbol_put_addr(void *addr);
-/* We only need protection against local interrupts. */
-#ifndef __HAVE_ARCH_LOCAL_INC
-#define local_inc(x) atomic_inc(x)
-#define local_dec(x) atomic_dec(x)
-#endif
-
/* Sometimes we know we already have a refcount, and it's easier not
to handle the error case (which only happens with rmmod --wait). */
static inline void __module_get(struct module *module)