sparc64-linux-20060113
authorTroy Benjegerdes <hozer@hozed.org>
Sat, 14 Jan 2006 08:00:01 +0000 (08:00 +0000)
committerRuss Allbery <rra@stanford.edu>
Sat, 14 Jan 2006 08:00:01 +0000 (08:00 +0000)
Hopefully fix sparc64 Linux support with 2.6 kernels.

src/afs/LINUX/osi_module.c
src/cf/osconf.m4
src/config/param.sparc64_linux26.h

index 8ac849c..117b3ce 100644 (file)
@@ -26,12 +26,16 @@ RCSID
 #ifdef AFS_AMD64_LINUX20_ENV
 #include <asm/ia32_unistd.h>
 #endif
+#ifdef AFS_SPARC64_LINUX20_ENV
+#include <linux/ioctl32.h>
+#endif
 
 #include <linux/proc_fs.h>
 #include <linux/slab.h>
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
 #include <linux/init.h>
 #include <linux/sched.h>
+#include <linux/kernel.h>
 #endif
 
 #ifdef HAVE_KERNEL_LINUX_SEQ_FILE_H
@@ -627,29 +631,27 @@ afs_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
     if (cmd != VIOC_SYSCALL && cmd != VIOC_SYSCALL32) return -EINVAL;
 
 #ifdef NEED_IOCTL32
+#ifdef AFS_LINUX26_ENV 
+#ifdef AFS_S390X_LINUX26_ENV
+    if (test_thread_flag(TIF_31BIT))
+#else
+    if (test_thread_flag(TIF_32BIT))
+#endif /* AFS_S390X_LINUX26_ENV */
+#else
 #ifdef AFS_SPARC64_LINUX24_ENV
     if (current->thread.flags & SPARC_FLAG_32BIT)
 #elif defined(AFS_SPARC64_LINUX20_ENV)
     if (current->tss.flags & SPARC_FLAG_32BIT)
 #elif defined(AFS_AMD64_LINUX20_ENV)
-#ifdef AFS_LINUX26_ENV
-    if (test_thread_flag(TIF_IA32))
-#else
     if (current->thread.flags & THREAD_IA32)
-#endif
 #elif defined(AFS_PPC64_LINUX20_ENV)
-#ifdef AFS_PPC64_LINUX26_ENV
-    if (current->thread_info->flags & _TIF_32BIT)
-#else /*Linux 2.6 */
     if (current->thread.flags & PPC_FLAG_32BIT)
-#endif
-#elif defined(AFS_S390X_LINUX26_ENV)
-    if (test_thread_flag(TIF_31BIT))
 #elif defined(AFS_S390X_LINUX20_ENV)
     if (current->thread.flags & S390_FLAG_31BIT)
 #else
 #error Not done for this linux type
-#endif
+#endif /* AFS_LINUX26_ENV */
+#endif /* NEED_IOCTL32 */
     {
        if (copy_from_user(&sysargs32, (void *)arg,
                           sizeof(struct afsprocdata32)))
index 4ff56e9..ac244c0 100644 (file)
@@ -656,7 +656,7 @@ case $AFS_SYSNAME in
                SHLIB_LINKER="${CC} -shared"
                ;;
 
-       sparc64_linux22)
+       sparc64_linux*)
                KERN_OPTMZ=-O2
                LEX="flex -l"
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
@@ -666,19 +666,8 @@ case $AFS_SYSNAME in
                SHLIB_LDFLAGS="-shared -Xlinker -x"
                TXLIBS="-lncurses"
                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
-               YACC="bison -y"
-               SHLIB_LINKER="${MT_CC} -shared"
-               ;;
-
-       sparc64_linux24)
-               KERN_OPTMZ=-O2
-               LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
-               MT_LIBS="-lpthread"
-               PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="-lncurses"
-               XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
+               XCFLAGS64="-O2 -D_LARGEFILE64_SOURCE -m64"
+               XLDFLAG64="-m64"
                YACC="bison -y"
                SHLIB_LINKER="${MT_CC} -shared"
                ;;
index 579da5e..30a3e9d 100644 (file)
@@ -59,8 +59,8 @@
 #define CONFIG_SMP 1
 #endif
 #define __SMP__
-#define AFS_GLOBAL_SUNLOCK
 #endif
+#define AFS_GLOBAL_SUNLOCK
 
 #endif /* __KERNEL__  && !DUMP_KERNEL */
 #include <afs/afs_sysnames.h>