From: Marc Horowitz Date: Sun, 8 May 2005 06:55:45 +0000 (+0000) Subject: sparc64-linux26-20050508 X-Git-Tag: openafs-devel-1_5_0~579 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=2669e1103bc733df4e27e24438c72d7d39a4c476;hp=160c01035ca3775d8bf21dd9a34bd0f51f309159 sparc64-linux26-20050508 FIXES 18485 add sparc64-linux24 port --- diff --git a/src/afs/LINUX/osi_syscall.c b/src/afs/LINUX/osi_syscall.c index 6fad884..3fa69a9 100644 --- a/src/afs/LINUX/osi_syscall.c +++ b/src/afs/LINUX/osi_syscall.c @@ -128,19 +128,33 @@ static void sys32_setgroups_stub() /***** SPARC64 *****/ #ifdef AFS_SPARC64_LINUX20_ENV +#ifdef AFS_SPARC64_LINUX26_ENV +static SYSCALLTYPE *afs_sys_call_table32; +#else extern SYSCALLTYPE *afs_sys_call_table32; +#endif static SYSCALLTYPE afs_ni_syscall32 = 0; extern int afs32_xsetgroups(); +#ifdef AFS_SPARC64_LINUX26_ENV +asmlinkage int (*sys32_setgroupsp) (int gidsetsize, + __kernel_gid32_t * grouplist); +#else asmlinkage int (*sys32_setgroupsp) (int gidsetsize, __kernel_gid_t32 * grouplist); +#endif #ifdef AFS_LINUX24_ENV /* This number is not exported for some bizarre reason. */ #define __NR_setgroups32 82 extern int afs32_xsetgroups32(); +#ifdef AFS_SPARC64_LINUX26_ENV +asmlinkage int (*sys32_setgroups32p) (int gidsetsize, + __kernel_gid32_t * grouplist); +#else asmlinkage int (*sys32_setgroups32p) (int gidsetsize, __kernel_gid_t32 * grouplist); #endif +#endif asmlinkage int afs_syscall32(long syscall, long parm1, long parm2, long parm3, long parm4, diff --git a/src/afs/afs.h b/src/afs/afs.h index 97e2740..4818d6e 100644 --- a/src/afs/afs.h +++ b/src/afs/afs.h @@ -43,7 +43,7 @@ extern int afs_shuttingdown; #if defined(AFS_HPUX102_ENV) #define AFS_FLOCK k_flock #else -#if defined(AFS_SUN56_ENV) || (defined(AFS_LINUX24_ENV) && !defined(AFS_PPC64_LINUX26_ENV) && !defined(AFS_AMD64_LINUX26_ENV) && !defined(AFS_IA64_LINUX26_ENV) && !defined(AFS_S390X_LINUX26_ENV) && !defined(AFS_ALPHA_LINUX26_ENV)) +#if defined(AFS_SUN56_ENV) || (defined(AFS_LINUX24_ENV) && !(defined(AFS_LINUX26_ENV) && defined(AFS_LINUX_64BIT_KERNEL))) #define AFS_FLOCK flock64 #else #define AFS_FLOCK flock diff --git a/src/afs/afs_call.c b/src/afs/afs_call.c index 39bf206..db2f9e1 100644 --- a/src/afs/afs_call.c +++ b/src/afs/afs_call.c @@ -1167,7 +1167,9 @@ copyin_iparam(caddr_t cmarg, struct iparam *dst) #if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV) struct iparam32 dst32; -#ifdef AFS_SPARC64_LINUX24_ENV +#ifdef AFS_SPARC64_LINUX26_ENV + if (test_thread_flag(TIF_32BIT)) +#elif AFS_SPARC64_LINUX24_ENV if (current->thread.flags & SPARC_FLAG_32BIT) #elif defined(AFS_SPARC64_LINUX20_ENV) if (current->tss.flags & SPARC_FLAG_32BIT) @@ -1345,7 +1347,12 @@ Afs_syscall() }) - if (current->thread.flags & SPARC_FLAG_32BIT) { +#ifdef AFS_SPARC64_LINUX26_ENV + if (test_thread_flag(TIF_32BIT)) +#else + if (current->thread.flags & SPARC_FLAG_32BIT) +#endif + { AFS_COPYIN((char *)parm4, (char *)eparm32, sizeof(eparm32), code); eparm[0] = AA(eparm32[0]); eparm[1] = AA(eparm32[1]); diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 1d6a65e..e6d734c 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -263,7 +263,9 @@ copyin_afs_ioctl(caddr_t cmarg, struct afs_ioctl *dst) #if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV) struct afs_ioctl32 dst32; -#ifdef AFS_SPARC64_LINUX24_ENV +#ifdef AFS_SPARC64_LINUX26_ENV + if (test_thread_flag(TIF_32BIT)) +#elif AFS_SPARC64_LINUX24_ENV if (current->thread.flags & SPARC_FLAG_32BIT) #elif defined(AFS_SPARC64_LINUX20_ENV) if (current->tss.flags & SPARC_FLAG_32BIT) diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index a22c13b..7461b83 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -151,6 +151,7 @@ #define SYS_NAME_ID_sparc64_linux2 1800 #define SYS_NAME_ID_sparc64_linux22 1801 #define SYS_NAME_ID_sparc64_linux24 1802 +#define SYS_NAME_ID_sparc64_linux26 1803 #define SYS_NAME_ID_s390_linux2 1900 #define SYS_NAME_ID_s390_linux22 1901 diff --git a/src/config/param.sparc64_linux26.h b/src/config/param.sparc64_linux26.h new file mode 100644 index 0000000..579da5e --- /dev/null +++ b/src/config/param.sparc64_linux26.h @@ -0,0 +1,171 @@ +#ifndef UKERNEL +/* This section for kernel libafs compiles only */ + +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + + +#ifndef _PARAM_SPARC64_LINUX26_H_ +#define _PARAM_SPARC64_LINUX26_H_ + +/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel, + * it's a judgment call. If something is obviously sparc64 specific, use that + * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2" + * in the sysname is the current version of the client. This takes into + * account the perferred OS user space configuration as well as the kernel. + */ + +#define AFS_LINUX20_ENV 1 +#define AFS_LINUX22_ENV 1 +#define AFS_LINUX24_ENV 1 +#define AFS_LINUX26_ENV 1 +#define AFS_SPARC64_LINUX20_ENV 1 +#define AFS_SPARC64_LINUX22_ENV 1 +#define AFS_SPARC64_LINUX24_ENV 1 +#define AFS_SPARC64_LINUX26_ENV 1 +#define AFS_LINUX_64BIT_KERNEL 1 +#define AFS_NONFSTRANS 1 + +#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */ +#define AFS_SYSCALL 227 +#define AFS_64BIT_IOPS_ENV 1 +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ + +#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#define AFS_64BIT_CLIENT 1 +#define AFS_32BIT_USR_ENV 1 +#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */ + +#if defined(__KERNEL__) && !defined(KDUMP_KERNEL) +#include + +#include +#ifdef CONFIG_SMP +#ifndef AFS_SMP +#define AFS_SMP 1 +#endif +#endif +/* Using "AFS_SMP" to map to however many #define's are required to get + * MP to compile for Linux + */ +#ifdef AFS_SMP +#ifndef CONFIG_SMP +#define CONFIG_SMP 1 +#endif +#define __SMP__ +#define AFS_GLOBAL_SUNLOCK +#endif + +#endif /* __KERNEL__ && !DUMP_KERNEL */ +#include + +#define AFS_USERSPACE_IP_ADDR 1 +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ + +/* Machine / Operating system information */ +#define SYS_NAME "sparc64_linux26" +#define SYS_NAME_ID SYS_NAME_ID_sparc64_linux26 +#define AFSBIG_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ +#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ + + +#ifdef KERNEL +#ifndef MIN +#define MIN(A,B) ((A) < (B) ? (A) : (B)) +#endif +#ifndef MAX +#define MAX(A,B) ((A) > (B) ? (A) : (B)) +#endif +#endif /* KERNEL */ + +/* on sparclinux is O_LARGEFILE defined but there is not off64_t, + so small hack to get usd_file.c work */ +#ifndef KERNEL +#define __USE_FILE_OFFSET64 1 +#define __USE_LARGEFILE64 1 +#if !defined off64_t +#define off64_t __off64_t +#endif +#endif + +#endif /* _PARAM_SPARC64_LINUX26_H_ */ + +#else /* !defined(UKERNEL) */ + +/* This section for user space compiles only */ + +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + +#ifndef _PARAM_USR_SPARC64_LINUX26_H_ +#define _PARAM_USR_SPARC64_LINUX26_H_ + +/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel, + * it's a judgment call. If something is obviously sparc64 specific, use that + * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2" + * in the sysname is the current version of the client. This takes into + * account the perferred OS user space configuration as well as the kernel. + */ + +#define UKERNEL 1 /* user space kernel */ +#define AFS_ENV 1 +#define AFS_USR_LINUX20_ENV 1 +#define AFS_USR_LINUX22_ENV 1 +#define AFS_USR_LINUX24_ENV 1 +#define AFS_USR_LINUX26_ENV 1 +#define AFS_NONFSTRANS 1 + +#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */ +#define AFS_SYSCALL 227 +#define AFS_64BIT_IOPS_ENV 1 +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#include + +#define AFS_USERSPACE_IP_ADDR 1 +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ + + +/* Machine / Operating system information */ +#define SYS_NAME "sparc64_linux26" +#define SYS_NAME_ID SYS_NAME_ID_sparc64_linux26 +#define AFSBIG_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ +#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ + +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_fmode uio_fmode +#define afsio_resid uio_resid +#define AFS_UIOSYS 1 +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES MCLBYTES +#define AFS_MINCHANGE 2 +#define VATTR_NULL usr_vattr_null + +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#endif /* _PARAM_USR_SPARC64_LINUX26_H_ */ + +#endif /* !defined(UKERNEL) */