linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: torvalds@transmeta.com, rusty@rustcorp.com.au
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] module_arch_cleanup()
Date: Thu, 8 May 2003 18:41:17 +0200	[thread overview]
Message-ID: <20030508184117.A26726@lst.de> (raw)

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);

             reply	other threads:[~2003-05-08 16:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-08 16:41 Christoph Hellwig [this message]
2003-05-08 20:43 ` [PATCH] module_arch_cleanup() David Mosberger
2003-05-08 23:02 ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030508184117.A26726@lst.de \
    --to=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).