STABLE14-sparc64-linux-20060113

Hopefully fix sparc64 Linux support with 2.6 kernels.


(cherry picked from commit 0b24f2d91a444c4bb11b3eaf8082356907b32d44)
This commit is contained in:
Troy Benjegerdes 2006-01-30 18:19:38 +00:00 committed by Russ Allbery
parent 7ce44cff31
commit 5cde4cb204
3 changed files with 17 additions and 26 deletions

View 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
@ -283,29 +287,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)))

View File

@ -643,20 +643,7 @@ case $AFS_SYSNAME in
SHLIB_LINKER="${CC} -shared"
;;
sparc64_linux22)
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"
YACC="bison -y"
SHLIB_LINKER="${MT_CC} -shared"
;;
sparc64_linux24)
sparc64_linux*)
KERN_OPTMZ=-O2
LEX="flex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
@ -665,6 +652,8 @@ case $AFS_SYSNAME in
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"
;;

View 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>