linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] module_arch_cleanup()
@ 2003-05-08 16:41 Christoph Hellwig
  2003-05-08 20:43 ` David Mosberger
  2003-05-08 23:02 ` Rusty Russell
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2003-05-08 16:41 UTC (permalink / raw)
  To: torvalds, rusty; +Cc: linux-kernel

IA64 needs to be able to hook into module unloading to get rid of
the unwind tables for modules.  (The actual implementation already
is in arch/ia64/kernel/module.c, David just seems to be to shy to
submit core changes :))


--- 1.11/include/asm-ia64/module.h	Wed Mar 26 04:08:03 2003
+++ edited/include/asm-ia64/module.h	Thu May  8 10:12:36 2003
@@ -31,4 +31,7 @@
 
 #define ARCH_SHF_SMALL	SHF_IA_64_SHORT
 
+void module_arch_cleanup(struct module *mod);
+#define __HAVE_ARCH_MODULE_CLEANUP	1
+
 #endif /* _ASM_IA64_MODULE_H */
--- 1.80/kernel/module.c	Wed Apr 30 10:17:38 2003
+++ edited/kernel/module.c	Thu May  8 10:13:28 2003
@@ -47,6 +47,11 @@
 #define ARCH_SHF_SMALL 0
 #endif
 
+/* Some architectures (like ia64) need to hook into module unloading */
+#ifndef __HAVE_ARCH_MODULE_CLEANUP
+#define module_arch_cleanup(mod)	do { } while (0)
+#endif
+
 /* If this is set, the section belongs in the init part of the module */
 #define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG-1))
 
@@ -909,6 +914,9 @@
 	spin_lock_irq(&modlist_lock);
 	list_del(&mod->list);
 	spin_unlock_irq(&modlist_lock);
+
+	/* Arch-specific cleanup. */
+	module_arch_cleanup(mod);
 
 	/* Module unload stuff */
 	module_unload_free(mod);

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-08 22:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-08 16:41 [PATCH] module_arch_cleanup() Christoph Hellwig
2003-05-08 20:43 ` David Mosberger
2003-05-08 23:02 ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).