On 9/8/07, Satyam Sharma <[EMAIL PROTECTED]> wrote: > On 9/7/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > > > On Fri, 7 Sep 2007 00:34:59 -0700 "Luck, Tony" <[EMAIL PROTECTED]> wrote: > > > > local symbol 0: discarded in section `.exit.text' from > > > > arch/ia64/kernel/built-in.o > > > > > > This usually means that there is a static __exit function (or __devexit > > > etc.) > > > somewhere in the object being linked. The error message is pretty > > > unhelpful > > > in figuring out *where* in the module. Look at the 'mm' patches that > > > touch > > > arch/ia64/kernel to see if one of them tinkers with __exit* attributes. > > > > Confused. There are >2500 static __exit functions in the tree, including > > ones like > > > > arch/ia64/kernel/esi.c:static void __exit esi_exit (void) > > That message means the linker found someone referencing an .exit.text > function -- on other archs this would've been a section mismatch but on > ia64 its a link error due to reasons below > (although it would not have ever caused an oops). ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In general, there's obviously nothing wrong with ia64's policy of discarding .exit.text at link time (in fact it's a good optimization), and generally most references from .init.text (or .text) to .exit.text would really be oopsen. But not so with this case, because with HOTPLUG_CPU=n (which is when this link error can occur) it's not possible for the notifier to be called out in the first place, and especially not for a CPU_DEAD event, which is when this reference could've occurred in practice. Anyway, I came across another little thing while investigating this, patch attached ... Satyam
[PATCH] ia64 perfmon: Remove exit_pfm_fs() Because it is dead code and not referenced by anybody else (that file cannot be built modular). Signed-off-by: Satyam Sharma <[EMAIL PROTECTED]> --- arch/ia64/kernel/perfmon.c | 7 ------- 1 file changed, 7 deletions(-) --- linux-2.6.23-rc4-mm1/arch/ia64/kernel/perfmon.c~fix 2007-09-08 12:54:24.000000000 +0530 +++ linux-2.6.23-rc4-mm1/arch/ia64/kernel/perfmon.c 2007-09-08 12:54:56.000000000 +0530 @@ -1539,13 +1539,6 @@ init_pfm_fs(void) return err; } -static void __exit -exit_pfm_fs(void) -{ - unregister_filesystem(&pfm_fs_type); - mntput(pfmfs_mnt); -} - static ssize_t pfm_read(struct file *filp, char __user *buf, size_t size, loff_t *ppos) {