linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ISSUE and PATCH: failure to build certain modules on alpha
@ 2001-11-05  9:25 michael
  0 siblings, 0 replies; only message in thread
From: michael @ 2001-11-05  9:25 UTC (permalink / raw)
  To: linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 3104 bytes --]

Hello,
	This concerns a failure to build certain modules on the Alpha
platform. A patch to fix this is attached.

	The current kernel sources fail to build certain parts as modules
on the Alpha correctly. The modules in question are udf.o (UDF filesystem),
ext2.o (ext2 filesystem) and ymfpci.o (sound module).

	The apparent problem with the filesystem modules is that the function
'memscan' is implemented as a macro on the i386 platform, but as a regular
functions on other architectures like the Alpha. I only attempted to fix the
issue on the Alpha, as my experience in kernel hacking isn't extensive. If
other platforms are affected, I presume the fix would be similar to what I
did for the Alpha.

	From what I can see, the issue with the ymfpci module is general in
nature and probably affects all platforms. The macro 'mdelay' is defined in
include/linux/delay.h, which is not included by drivers/sound/ymfpci.c.

Keywords: drivers, modules, alpha, unresolved symbols

Versions affected: all 2.4 versions (confirmed on 2.4.10 and 2.4.13).
Environment: 
  This is a Debian GNU/Linux system running unstable.
  marsupilami:~# cat /proc/version
  Linux version 2.4.10 (stroucki@marsupilami) (gcc version 2.95.4 20010902 (Debian prerelease)) #1 Tue Sep 25 02:02:22 EDT 2001
  marsupilami:~# uname -a
  Linux marsupilami 2.4.10 #1 Tue Sep 25 02:02:22 EDT 2001 alpha unknown

Triggering issue:
  Kernel compile (using make-kpkg) completes successfully, but on installing
  (via dpkg -i), unresolved symbols are found by depmod. The kernel boots,
  but the affected modules to not insert.
  Here's a detailed output of depmod:-
marsupilami:/lib/modules/2.4.13# depmod -e -a -F /boot/System.map-2.4.13 2.4.13
depmod: *** Unresolved symbols in /lib/modules/2.4.13/kernel/drivers/sound/ymfpci.o
depmod:         mdelay
depmod: *** Unresolved symbols in /lib/modules/2.4.13/kernel/fs/ext2/ext2.o
depmod:         memscan
depmod: *** Unresolved symbols in /lib/modules/2.4.13/kernel/fs/udf/udf.o
depmod:         memscan

Patch:
  The patch is attached to this message and fixes the issue on the Alpha.
  It is quite small, only 19 lines. It was generated from the 2.4.13 sources,
  but should apply to 2.4.10 and others also.

Verification:
  I first became annoyed enough to work on this with the 2.4.10 version.
  After the patch was applied, the warnings from depmod were absent, and
  upon booting, the relevant modules inserted (and removed) correctly:-
marsupilami:~# lsmod
Module                  Size  Used by
udf                   141904   0  (unused)
...
ext2                   50024   2  (autoclean)

Personal info:
  I do not read the kernel mailing list regularly, but will do so for the
  next week. I am reachable at michael@stroucken.org .

Greetings,
Michael.
-- 
This message may have passed through thousands of machines throughout
the entire civilised world. It might have cost the net hundreds, if not
thousands of dollars to send everywhere.
Michael Stroucken ++ michael@stroucken.org ++ DEC Alpha ++ 1982 Honda CM450C

[-- Attachment #1.2: Fix for unresolved symbols on Alpha --]
[-- Type: text/plain, Size: 844 bytes --]

diff -urN kernel-source-2.4.13.orig/arch/alpha/kernel/alpha_ksyms.c kernel-source-2.4.13/arch/alpha/kernel/alpha_ksyms.c
--- kernel-source-2.4.13.orig/arch/alpha/kernel/alpha_ksyms.c	Fri Oct 12 18:35:53 2001
+++ kernel-source-2.4.13/arch/alpha/kernel/alpha_ksyms.c	Sun Nov  4 18:12:42 2001
@@ -257,3 +257,4 @@
 EXPORT_SYMBOL_NOVERS(memchr);
 
 EXPORT_SYMBOL(get_wchan);
+EXPORT_SYMBOL(memscan);
diff -urN kernel-source-2.4.13.orig/drivers/sound/ymfpci.c kernel-source-2.4.13/drivers/sound/ymfpci.c
--- kernel-source-2.4.13.orig/drivers/sound/ymfpci.c	Mon Oct 22 11:38:18 2001
+++ kernel-source-2.4.13/drivers/sound/ymfpci.c	Sun Nov  4 18:12:56 2001
@@ -51,6 +51,7 @@
 #include <linux/soundcard.h>
 #include <linux/ac97_codec.h>
 #include <linux/sound.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/dma.h>

[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-11-05  9:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-05  9:25 ISSUE and PATCH: failure to build certain modules on alpha michael

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