Hi All,

In order to compile lustre 1.5.95 on mips64, I had to modify the
following files:

lustre/ptlrpc/events.c
lustre/include/linux/lustre_types.h
lustre/include/linux/lustre_user.h
libsysio/include/native.h
lnet/ulnds/socklnd/select.c

Proposed patches attached.
Regards

Itamar
--- ./lustre-1.5.95/lustre/ptlrpc/events.c	2006-09-01 12:28:37.000000000 +0300
+++ ../lustre-1.5.95/patch/events.c	2006-12-06 17:54:53.000000000 +0200
@@ -27,6 +27,10 @@
 
 #ifndef __KERNEL__
 #include <liblustre.h>
+#else
+#if defined (_MIPS_SIM) &&(_MIPS_SIM == _MIPS_SIM_ABI64)
+#include <linux/kernel.h>
+#endif
 #endif
 #include <obd_class.h>
 #include <lustre_net.h>
--- ./lustre-1.5.95/lustre/include/linux/lustre_types.h	2006-08-08 02:01:35.000000000 +0300
+++ ../lustre-1.5.95/patch/lustre_types.h	2006-12-06 17:50:00.000000000 +0200
@@ -21,7 +21,8 @@
 #if !defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \
         !defined(_EXT2_TYPES_H) && !defined(_I386_TYPES_H) && \
         !defined(_ASM_IA64_TYPES_H) && !defined(_X86_64_TYPES_H) && \
-        !defined(_PPC_TYPES_H) && !defined(_PPC64_TYPES_H)
+        !defined(_PPC_TYPES_H) && !defined(_PPC64_TYPES_H)&& \
+	!(_MIPS_SIM == _MIPS_SIM_ABI64)
         /* yuck, would be nicer with _ASM_TYPES_H */
 
 typedef unsigned short umode_t;
--- ./lustre-1.5.95/lustre/include/linux/lustre_user.h	2006-06-21 23:16:44.000000000 +0300
+++ ../lustre-1.5.95/patch/lustre_user.h	2006-12-06 16:49:32.000000000 +0200
@@ -46,7 +46,7 @@
 #endif
 
 #if defined(__x86_64__) || defined(__ia64__) || defined(__ppc64__) || \
-    defined(__craynv)
+    defined(__craynv) || defined (_MIPS_SIM) &&(_MIPS_SIM == _MIPS_SIM_ABI64)
 typedef struct stat     lstat_t;
 #define lstat_f         lstat
 #define HAVE_LOV_USER_MDS_DATA
--- ./lustre-1.5.95/libsysio/include/native.h	2005-01-07 15:46:41.000000000 +0200
+++ ../lustre-1.5.95/patch/native.h	2006-12-06 17:40:28.000000000 +0200
@@ -129,8 +129,12 @@
 #define SYSIO_SYS_lseek		SYS_lseek
 #endif
 #if defined(SYS__llseek)
+#if defined (_MIPS_SIM) &&(_MIPS_SIM == _MIPS_SIM_ABI64)
+#define SYSIO_SYS__llseek SYS_O32__llseek
+#else
 #define SYSIO_SYS__llseek	SYS__llseek
 #endif
+#endif
 #if defined(SYS_read)
 #define SYSIO_SYS_read		SYS_read
 #endif
@@ -197,8 +201,12 @@
 #if _LARGEFILE64_SOURCE && defined(SYS_getdents64)
 #define SYSIO_SYS_getdents64	SYS_getdents64
 #elif defined(SYS_getdents)
+#if defined (_MIPS_SIM) &&(_MIPS_SIM == _MIPS_SIM_ABI64)
+#define SYSIO_SYS_getdents64	SYS_getdents
+#else
 #define SYSIO_SYS_getdents	SYS_getdents
 #endif
+#endif
 #if defined(SYS_link)
 #define SYSIO_SYS_link		SYS_link
 #endif
@@ -221,8 +229,12 @@
 #define SYSIO_SYS_utime		SYS_utime
 #endif
 #if defined(SYS_socketcall)
+#if defined (_MIPS_SIM) &&(_MIPS_SIM == _MIPS_SIM_ABI64)
+#define SYSIO_SYS_socketcall SYS_O32_socketcall
+#else
 #define SYSIO_SYS_socketcall	SYS_socketcall
 #endif
+#endif
 #if defined(SYS_socket)
 #define SYSIO_SYS_socket	SYS_socket
 #endif
--- ./lustre-1.5.95/lnet/ulnds/socklnd/select.c	2005-09-29 15:12:01.000000000 +0300
+++ ../lustre-1.5.95/patch/select.c	2006-12-06 17:05:48.000000000 +0200
@@ -318,7 +318,9 @@
         max = merge_fds(max, &fds[0], &fds[1], &fds[2]);
         select_timeout = choose_timeout(timeout_pointer, fd_extra.timeout);
     }
-
+#if defined (_MIPS_SIM) &&(_MIPS_SIM == _MIPS_SIM_ABI64)
+#define SYS_select SYS__newselect
+#endif
     /* XXX only compile for linux */
 #if __WORDSIZE == 64
     nready = syscall(SYS_select, max, &fds[0], &fds[1], &fds[2],
_______________________________________________
Lustre-devel mailing list
[email protected]
https://mail.clusterfs.com/mailman/listinfo/lustre-devel

Reply via email to