Two "bugletts" on SPARC 64 @ kernel 2.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: [email protected]
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.
*******************************************

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux