[PATCH] Fixes for linux-2.6.0-test4 ppc64 build errors

Sridhar Samudrala sri at us.ibm.com
Wed Sep 17 07:16:17 EST 2003


I ran into a following compiler errors and an undefined symbol warning while
building linux-2.6.0-test4 on a PPC64 box with SCTP as a module.

In file included from arch/ppc64/kernel/setup.c:14:
include/linux/module.h:19:23: asm/local.h: No such file or directory
In file included from arch/ppc64/kernel/setup.c:14:
include/linux/module.h:175: syntax error before "local_t"
include/linux/module.h:175: warning: no semicolon at end of struct or union
include/linux/module.h:176: warning: empty declaration
include/linux/module.h:235: field `ref' has incomplete type
include/linux/module.h:267: confused by earlier errors, bailing out
make[1]: *** [arch/ppc64/kernel/setup.o] Error 1
make: *** [arch/ppc64/kernel] Error 2

  CC      arch/ppc64/kernel/pSeries_pci.o
arch/ppc64/kernel/pSeries_pci.c: In function `pcibios_name_device':
arch/ppc64/kernel/pSeries_pci.c:440: structure has no member named `name'
arch/ppc64/kernel/pSeries_pci.c:441: structure has no member named `name'
arch/ppc64/kernel/pSeries_pci.c:441: structure has no member named `name'
arch/ppc64/kernel/pSeries_pci.c:442: structure has no member named `name'
arch/ppc64/kernel/pSeries_pci.c:443: structure has no member named `name'
arch/ppc64/kernel/pSeries_pci.c:444: structure has no member named `name'
arch/ppc64/kernel/pSeries_pci.c:445: structure has no member named `name'
arch/ppc64/kernel/pSeries_pci.c:445: structure has no member named `name'
make[1]: *** [arch/ppc64/kernel/pSeries_pci.o] Error 1
make: *** [arch/ppc64/kernel] Error 2

  CC      arch/ppc64/kernel/eeh.o
arch/ppc64/kernel/eeh.c: In function `eeh_check_failure':
arch/ppc64/kernel/eeh.c:119: structure has no member named `name'

  MODPOST
*** Warning: "paca" [net/sctp/sctp.ko] undefined!

Here is a patch that fixes these issues.

Thanks
Sridhar
------------------------------------------------------------------------------
diff -urN -X dontdiff a/arch/ppc64/kernel/eeh.c b/arch/ppc64/kernel/eeh.c
--- a/arch/ppc64/kernel/eeh.c	2003-08-22 16:57:23.000000000 -0700
+++ b/arch/ppc64/kernel/eeh.c	2003-09-04 14:21:39.000000000 -0700
@@ -116,7 +116,7 @@
 				dn->eeh_config_addr, BUID_HI(dn->phb->buid), BUID_LO(dn->phb->buid));
 		if (ret == 0 && rets[1] == 1 && rets[0] >= 2) {
 			panic("EEH:  MMIO failure (%ld) on device:\n  %s %s\n",
-			      rets[0], pci_name(dev), dev->dev.name);
+			      rets[0], pci_name(dev), dev->dev.bus_id);
 		}
 	}
 	eeh_false_positives++;
diff -urN -X dontdiff a/arch/ppc64/kernel/pSeries_pci.c b/arch/ppc64/kernel/pSeries_pci.c
--- a/arch/ppc64/kernel/pSeries_pci.c	2003-08-22 17:03:21.000000000 -0700
+++ b/arch/ppc64/kernel/pSeries_pci.c	2003-09-04 14:21:02.000000000 -0700
@@ -437,12 +437,12 @@
 		char *loc_code = get_property(dn, "ibm,loc-code", 0);
 		if (loc_code) {
 			int loc_len = strlen(loc_code);
-			if (loc_len < sizeof(dev->dev.name)) {
-				memmove(dev->dev.name+loc_len+1, dev->dev.name,
-					sizeof(dev->dev.name)-loc_len-1);
-				memcpy(dev->dev.name, loc_code, loc_len);
-				dev->dev.name[loc_len] = ' ';
-				dev->dev.name[sizeof(dev->dev.name)-1] = '\0';
+			if (loc_len < sizeof(dev->dev.bus_id)) {
+				memmove(dev->dev.bus_id+loc_len+1, dev->dev.bus_id,
+					sizeof(dev->dev.bus_id)-loc_len-1);
+				memcpy(dev->dev.bus_id, loc_code, loc_len);
+				dev->dev.bus_id[loc_len] = ' ';
+				dev->dev.bus_id[sizeof(dev->dev.bus_id)-1] = '\0';
 			}
 		}
 	}
diff -urN -X dontdiff a/arch/ppc64/kernel/ppc_ksyms.c b/arch/ppc64/kernel/ppc_ksyms.c
--- a/arch/ppc64/kernel/ppc_ksyms.c	2003-08-22 16:53:07.000000000 -0700
+++ b/arch/ppc64/kernel/ppc_ksyms.c	2003-09-08 11:19:06.000000000 -0700
@@ -232,3 +232,4 @@
 #endif

 EXPORT_SYMBOL(tb_ticks_per_usec);
+EXPORT_SYMBOL(paca);
diff -urN -X dontdiff a/include/asm-ppc64/local.h b/include/asm-ppc64/local.h
--- a/include/asm-ppc64/local.h	1969-12-31 16:00:00.000000000 -0800
+++ b/include/asm-ppc64/local.h	2003-09-04 11:55:40.000000000 -0700
@@ -0,0 +1,6 @@
+#ifndef __PPC_LOCAL_H
+#define __PPC_LOCAL_H
+
+#include <asm-generic/local.h>
+
+#endif /* __PPC_LOCAL_H */

-------------------------------------------------------------------------------


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list