* Two "bugletts" on SPARC 64 @ kernel 2.4
@ 2006-08-21 11:37 Jurzitza, Dieter
2006-08-21 19:16 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jurzitza, Dieter @ 2006-08-21 11:37 UTC (permalink / raw)
To: linux-kernel
Dear listmembers,
please find attached two small patches against kernel 2.4.33 for (at least) SPARC 64:
--- linux/include/linux/module.h 2004-12-15 08:34:44.000000000 +0100
+++ linux/include/linux/module.h 2004-12-15 08:45:32.000000000 +0100
@@ -31,7 +31,11 @@
/* Used by get_kernel_syms, which is obsolete. */
struct kernel_sym
{
- unsigned long value;
+#ifdef __ARCH_SPARC64_ATOMIC__
+ unsigned int value;
+#else
+ unsigned long value;
+#endif
char name[60]; /* should have been 64-sizeof(long); oh well */
};
--- linux/arch/sparc64/kernel/sparc64_ksyms.c.original 2005-11-16 20:12:54.000000000 +0100
+++ linux/arch/sparc64/kernel/sparc64_ksyms.c 2006-08-14 12:55:48.000000000 +0200
@@ -357,6 +357,7 @@
EXPORT_SYMBOL_NOVERS(__ret_efault);
/* No version information on these, as gcc produces such symbols. */
+EXPORT_SYMBOL_NOVERS(memchr);
EXPORT_SYMBOL_NOVERS(memcmp);
EXPORT_SYMBOL_NOVERS(memcpy);
EXPORT_SYMBOL_NOVERS(memset);
--- linux/arch/sparc/kernel/sparc_ksyms.c.original 2006-08-14 12:59:04.000000000 +0200
+++ linux/arch/sparc/kernel/sparc_ksyms.c 2006-08-14 12:59:04.000000000 +0200
@@ -293,6 +293,7 @@
EXPORT_SYMBOL_NOVERS(__ret_efault);
/* No version information on these, as gcc produces such symbols. */
+EXPORT_SYMBOL_NOVERS(memchr);
EXPORT_SYMBOL_NOVERS(memcmp);
EXPORT_SYMBOL_NOVERS(memcpy);
EXPORT_SYMBOL_NOVERS(memset);
1.) due to the fact that sizeof(unsigned long) is larger on SPARC 64 (8 byte vs. 4 byte) than on some other architectures, the size of the structure kernel_sym grows accordingly. This results in the fact that on SPARC 64 less many kernel syms may be read by get_kernel_syms() than on other architectures due to the limitation in memory available. On 32-bit arches sizeof(kernel_sym) is 64. On SPARC64 it is initially 68, due to the need for word alignment we end up at 72 Byte per struct. Therefore we can read 2048 structs of type kernel_sym on x32 in contrast to only 1820 structs on SPARC64. The define shown above replacing the unsigned long by an unsigned int in case of SPARC64 fixes this (without any harm).
2.) with kernel 2.4.33 the call to memcpy has been introduced in the smbfs-module. Because there is no native function for this on SPARC, one needs to EXPORT_SYM_NOVERS for this (TX to Dave Miller who helped me finding this out). To avoid unneccessary questions on this issue the patch above is mentioned.
Take care
Dieter Jurzitza
--
________________________________________________
HARMAN BECKER AUTOMOTIVE SYSTEMS
Dr.-Ing. Dieter Jurzitza
Manager Hardware Systems
System Development
Industriegebiet Ittersbach
Becker-Göring Str. 16
D-76307 Karlsbad / Germany
Phone: +49 (0)7248 71-1577
Fax: +49 (0)7248 71-1216
eMail: DJurzitza@harmanbecker.com
Internet: http://www.becker.de
*******************************************
Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und loeschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the contents in this e-mail is strictly forbidden.
*******************************************
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Two "bugletts" on SPARC 64 @ kernel 2.4
2006-08-21 11:37 Two "bugletts" on SPARC 64 @ kernel 2.4 Jurzitza, Dieter
@ 2006-08-21 19:16 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2006-08-21 19:16 UTC (permalink / raw)
To: DJurzitza; +Cc: linux-kernel
From: "Jurzitza, Dieter" <DJurzitza@harmanbecker.com>
Date: Mon, 21 Aug 2006 13:37:51 +0200
> --- linux/include/linux/module.h 2004-12-15 08:34:44.000000000 +0100
> +++ linux/include/linux/module.h 2004-12-15 08:45:32.000000000 +0100
> @@ -31,7 +31,11 @@
> /* Used by get_kernel_syms, which is obsolete. */
> struct kernel_sym
> {
> - unsigned long value;
> +#ifdef __ARCH_SPARC64_ATOMIC__
> + unsigned int value;
> +#else
> + unsigned long value;
> +#endif
> char name[60]; /* should have been 64-sizeof(long); oh well */
> };
1) You should post sparc patches at least CC:'d to sparclinux@vger.kernel.org
which is where the Sparc developers hang out.
2) I can't see any reason why this part of your patch can be valid.
This structure is exported to userspace and therefor is part of
the user-visible API and thus cannot be changed.
If there is some bug or bogus limitation in the module tools which
limits the number of symbols visible due to the sizing of this
structure, that is what needs to be changed not this structure.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-21 19:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-21 11:37 Two "bugletts" on SPARC 64 @ kernel 2.4 Jurzitza, Dieter
2006-08-21 19:16 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®