initial-solaris8-support-20001105
authorChas Williams <chas@cmf.nrl.navy.mil>
Mon, 6 Nov 2000 04:22:21 +0000 (04:22 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 6 Nov 2000 04:22:21 +0000 (04:22 +0000)
Iniktial Solaris 8 support

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
Initial Solaris 8 support

====================
Initial Solaris 8 support

18 files changed:
src/Makefile
src/afs/SOLARIS/osi_inode.c
src/afs/SOLARIS/osi_vfsops.c
src/afs/VNOPS/afs_vnop_flock.c
src/afs/afs_analyze.c
src/afs/afs_cell.c
src/afs/afs_conn.c
src/afs/afs_server.c
src/afs/afs_user.c
src/afs/afs_util.c
src/afs/afs_volume.c
src/afsd/Makefile
src/afsd/afsd.c
src/config/afs_sysnames.h
src/config/param.sun4x_58.h [new file with mode: 0644]
src/config/param.sun4x_58_usr.h [new file with mode: 0644]
src/libafs/MakefileProto.SOLARIS
src/rx/SOLARIS/rx_knet.c

index 50eb1ac..cb66684 100644 (file)
@@ -69,7 +69,7 @@ comerr: basics util
 cmd: basics comerr
        ${COMPILE_PART1} cmd ${COMPILE_PART2}
        @case ${SYS_NAME} in \
-       sgi_6* | sun4x_57 | hp_ux11* ) \
+       sgi_6* | sun4x_57 | sun4x_58 | hp_ux11* ) \
                ${COMPILE_PART1} cmd ${COMPILE_PART2} install64 ;; \
        esac
 
@@ -231,6 +231,7 @@ uss: des kauth project rx vlserver vol
 
 ntp: project volser
        case ${SYS_NAME} in \
+         sun4x_58 ) echo skipping ntp for ${SYS_NAME} ;; \
          *linux* ) echo skipping ntp for ${SYS_NAME} ;; \
          * ) ${COMPILE_PART1} ntp ${COMPILE_PART2} ;; \
        esac
@@ -260,6 +261,8 @@ vfsck:      minproject vol
                echo skip vfsck for ${SYS_NAME} ;; \
        sun4x_57 )  \
                echo skip vfsck for ${SYS_NAME} ;; \
+       sun4x_58 )  \
+               echo skip vfsck for ${SYS_NAME} ;; \
         * ) \
                ${COMPILE_PART1} vfsck ${COMPILE_PART2} ;; \
        esac
index 6982a43..306b282 100644 (file)
@@ -39,7 +39,11 @@ getinode(vfsp, dev, inode, ipp, credp,perror)
     
     *perror = 0;
     
-    if (!vfsp && !(vfsp = vfs_devsearch(dev))) {
+    if (!vfsp 
+#if !defined(AFS_SUN58_ENV)
+       && !(vfsp = vfs_devsearch(dev))
+#endif
+       ) {
        return (ENODEV);
     }
     if (code = (*ufs_igetp)(vfsp, inode, &ip, credp)) {
index e9b25fa..343df6d 100644 (file)
@@ -433,7 +433,9 @@ _init()
 #else
     read_binding_file(sysbind, sb_hashtab);
 #endif
+#if !defined(AFS_SUN58_ENV)
     make_syscallname("afs", AFS_SYSCALL);
+#endif
 
     if (sysent[AFS_SYSCALL].sy_call == nosys) {
        if ((sysn = mod_getsysname(AFS_SYSCALL)) != NULL) {
index 797f981..5181863 100644 (file)
@@ -511,7 +511,7 @@ struct AFS_UCRED *acred; {
        acmd = F_SETLK;
     }
 #endif
-#if defined(AFS_SUN_ENV) || defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV)
+#if (defined(AFS_SUN_ENV) || defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV)) && !defined(AFS_SUN58_ENV)
     if ((acmd == F_GETLK) || (acmd == F_RGETLK)) {
 #else
     if (acmd == F_GETLK) {
@@ -525,7 +525,7 @@ struct AFS_UCRED *acred; {
        return code;
     }
     else if ((acmd == F_SETLK) || (acmd == F_SETLKW) 
-#if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
+#if (defined(AFS_SUN_ENV) || defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV)) && !defined(AFS_SUN58_ENV)
             || (acmd == F_RSETLK)|| (acmd == F_RSETLKW)) {
 #else
        ) {
@@ -548,7 +548,7 @@ struct AFS_UCRED *acred; {
        else if (af->l_type == F_UNLCK) code = LOCK_UN;
        else return EINVAL; /* unknown lock type */
        if (((acmd == F_SETLK) 
-#if    defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV)
+#if    (defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV)) && !defined(AFS_SUN58_ENV)
        || (acmd == F_RSETLK) 
 #endif
        ) && code != LOCK_UN)
index a17c014..32bfc5c 100644 (file)
@@ -36,6 +36,9 @@
 #if    defined(AFS_SUN56_ENV)
 #include <inet/led.h>
 #include <inet/common.h>
+#if     defined(AFS_SUN58_ENV)
+#include <netinet/ip6.h>
+#endif
 #include <inet/ip.h>
 #endif
 
index 9bb5046..2b271e1 100644 (file)
@@ -32,6 +32,9 @@
 #if    defined(AFS_SUN56_ENV)
 #include <inet/led.h>
 #include <inet/common.h>
+#if     defined(AFS_SUN58_ENV)
+#include <netinet/ip6.h>
+#endif
 #include <inet/ip.h>
 #endif
 
index c57216a..16bc447 100644 (file)
@@ -32,6 +32,9 @@
 #if    defined(AFS_SUN56_ENV)
 #include <inet/led.h>
 #include <inet/common.h>
+#if     defined(AFS_SUN58_ENV)
+#include <netinet/ip6.h>
+#endif
 #include <inet/ip.h>
 #endif
 
index 8fe31b4..e2ddf74 100644 (file)
 #if    defined(AFS_SUN56_ENV)
 #include <inet/led.h>
 #include <inet/common.h>
+#if     defined(AFS_SUN58_ENV)
+# include <netinet/ip6.h>
+# define ipif_local_addr ipif_lcl_addr
+#  ifndef V4_PART_OF_V6
+#  define V4_PART_OF_V6(v6)       v6.s6_addr32[3]
+#  endif
+# endif
 #include <inet/ip.h>
 #endif
 
index 65aaeac..18c317d 100644 (file)
@@ -32,6 +32,9 @@
 #if    defined(AFS_SUN56_ENV)
 #include <inet/led.h>
 #include <inet/common.h>
+#if   defined(AFS_SUN58_ENV)
+#include <netinet/ip6.h>
+#endif
 #include <inet/ip.h>
 #endif
 
index b1e1a4b..4d22160 100644 (file)
@@ -34,6 +34,9 @@
 #if    defined(AFS_SUN56_ENV)
 #include <inet/led.h>
 #include <inet/common.h>
+#if     defined(AFS_SUN58_ENV)
+#include <netinet/ip6.h>
+#endif
 #include <inet/ip.h>
 #endif
 
index 909a48c..427e315 100644 (file)
@@ -37,6 +37,9 @@
 #if    defined(AFS_SUN56_ENV)
 #include <inet/led.h>
 #include <inet/common.h>
+#if     defined(AFS_SUN58_ENV)
+#include <netinet/ip6.h>
+#endif
 #include <inet/ip.h>
 #endif
 
index d748260..debf725 100644 (file)
@@ -88,6 +88,8 @@ install: all
                        ${INSTALL} -f afs.rc.solaris ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
                sun4x_57 ) \
                        ${INSTALL} -f afs.rc.solaris.2.7 ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
+               sun4x_58 ) \
+                       ${INSTALL} -f afs.rc.solaris.2.8 ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
                 sun4x_5? ) \
                         ${INSTALL} -f afs.rc.solaris.2_5 ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
                alpha_osf* ) \
index fb311f1..57eb222 100644 (file)
@@ -1368,7 +1368,7 @@ mainproc(as, arock)
 #endif
 #else
 #ifdef AFS_SUN5_ENV
-    if ((mount("",cacheMountDir,mountFlags,"afs", (char *)0, 0)) < 0) {
+    if ((mount("AFS",cacheMountDir,mountFlags,"afs", (char *)0, 0)) < 0) {
 #else
 #if defined(AFS_SGI_ENV)
     mountFlags = MS_FSS;
@@ -1464,7 +1464,7 @@ char **argv; {
 #endif
 
 static int HandleMTab() {
-#if defined (AFS_SUN_ENV) || defined (AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV)
+#if (defined (AFS_SUN_ENV) || defined (AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV)) && !defined(AFS_SUN58_ENV)
     FILE *tfilep;
 #ifdef AFS_SUN5_ENV
     char tbuf[16];
index 437314a..33d64d4 100644 (file)
@@ -77,6 +77,7 @@
 #define SYS_NAME_ID_sunx86_56                   936
 #define SYS_NAME_ID_sunx86_55                   937
 #define SYS_NAME_ID_sun4x_57            938
+#define SYS_NAME_ID_sun4x_58            939
 
 
 #define SYS_NAME_ID_vax_ul4            1003
diff --git a/src/config/param.sun4x_58.h b/src/config/param.sun4x_58.h
new file mode 100644 (file)
index 0000000..7326e4f
--- /dev/null
@@ -0,0 +1,104 @@
+#ifndef        _PARAM_SUN4X_58_H_
+#define        _PARAM_SUN4X_58_H_
+
+#define AFS_VFS_ENV    1
+/* Used only in vfsck/* code; is it needed any more???? */
+
+#define AFS_VFSINCL_ENV        1       /* NOBODY uses this.... */
+#define AFS_GREEDY43_ENV       1       /* Used only in rx/rx_user.c */
+#define AFS_ENV                        1
+#define AFS_SUN_ENV            1
+#define AFS_SUN5_ENV           1
+#define        AFS_SUN52_ENV           1
+#define        AFS_SUN53_ENV           1
+#define        AFS_SUN54_ENV           1
+#define        AFS_SUN55_ENV           1
+#define        AFS_SUN56_ENV           1
+#define AFS_SUN57_ENV          1
+#define AFS_SUN58_ENV          1
+
+#define AFS_64BIT_ENV          1       /* Defines afs_int32 as int, not long. */
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_GLOBAL_SUNLOCK     1       /* For global locking */
+#define RXK_LISTENER_ENV   1
+#define AFS_GCPAGS             1       /* if nonzero, garbage collect PAGs */
+
+#define        AFS_3DISPARES           1       /* Utilize the 3 available disk inode 'spares' */
+#define        AFS_SYSCALL             101
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS   "afs"
+
+/* Machine / Operating system information */
+#define sys_sun4x_58   1
+#define SYS_NAME       "sun4x_58"
+#define SYS_NAME_ID    SYS_NAME_ID_sun4x_58
+#define AFSBIG_ENDIAN  1
+#define AFS_HAVE_FFS    1       /* Use system's ffs. */
+#define AFS_HAVE_VXFS  1       /* Support cache on Veritas vxfs file system */
+#define AFS_HAVE_STATVFS 1     /* System supports statvfs */
+#define AFS_VM_RDWR_ENV        1       /* read/write implemented via VM */
+#define AFS_USE_GETTIMEOFDAY 1  /* use gettimeofday to implement rx clock */
+
+#define NEARINODE_HINT  1   /* hint to ufs module to scatter inodes on disk*/
+#define nearInodeHash(volid, hval) {                                 \
+                unsigned char*  ts = (unsigned char*)&(volid)+sizeof(volid)-1;\
+                for ( (hval)=0; ts >= (unsigned char*)&(volid); ts--){\
+                    (hval) *= 173;                      \
+                    (hval) += *ts;                      \
+                }                                       \
+                }
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef KERNEL
+/* sun definitions here */
+#define        AFS_UIOFMODE            1       /* Only in afs/afs_vnodeops.c (afs_ustrategy) */
+#define        AFS_SYSVLOCK            1       /* sys v locking supported */
+/*#define      AFS_USEBUFFERS  1*/
+#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      UIO_SYSSPACE
+#define        AFS_UIOUSER     UIO_USERSPACE
+#define        AFS_CLBYTES     MCLBYTES
+#define        AFS_MINCHANGE   2
+#define        osi_GetTime(x)  uniqtime(x)
+
+/**
+  * These defines are for the 64 bit Solaris 7 port
+  * AFS_SYSCALL32 is used to protect the ILP32 syscall interface
+  * AFS_64BIT_ENV is for use of 64 bit inode numbers
+  */
+#if defined(__sparcv9)
+#define        AFS_SUN57_64BIT_ENV     1
+#define AFS_64BIT_INO          1
+#endif
+
+/**
+  * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
+  * use 32 bit quantities for time in afs, we now use uniqtime32
+  */
+#if defined(AFS_SUN57_64BIT_ENV)
+#undef osi_GetTime
+#define osi_GetTime(x)  uniqtime32(x)
+#endif
+
+
+
+#define        AFS_KALLOC(n)   kmem_alloc(n, KM_SLEEP)
+#define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
+#define        AFS_KFREE       kmem_free
+#define        VATTR_NULL      vattr_null
+#endif KERNEL
+#define        AFS_DIRENT      
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+#define        ROOTINO         UFSROOTINO
+
+#endif _PARAM_SUN4X_58_H_
diff --git a/src/config/param.sun4x_58_usr.h b/src/config/param.sun4x_58_usr.h
new file mode 100644 (file)
index 0000000..e6c08d3
--- /dev/null
@@ -0,0 +1,59 @@
+#ifndef        _PARAM_SUN4X_58_H_
+#define        _PARAM_SUN4X_58_H_
+
+#define AFS_VFS_ENV    1
+/* Used only in vfsck code; is it needed any more???? */
+#define RXK_LISTENER_ENV       1
+#define AFS_USERSPACE_IP_ADDR  1
+#define AFS_GCPAGS             0       /* if nonzero, garbage collect PAGs */
+
+#define UKERNEL                        1       /* user space kernel */
+#define AFS_GREEDY43_ENV       1       /* Used only in rx/rx_user.c */
+#define AFS_ENV                        1
+#define AFS_USR_SUN5_ENV       1
+#define AFS_USR_SUN6_ENV       1
+#define AFS_USR_SUN7_ENV       1
+#define AFS_USR_SUN8_ENV       1
+
+#include <afs/afs_sysnames.h>
+
+/*#define AFS_GLOBAL_SUNLOCK   1       /* For global locking */
+
+#define        AFS_3DISPARES           1       /* Utilize the 3 available disk inode 'spares' */
+#define        AFS_SYSCALL             101
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS   1
+
+/* Machine / Operating system information */
+#define sys_sun4x_58   1
+#define SYS_NAME       "sun4x_58"
+#define SYS_NAME_ID    SYS_NAME_ID_sun4x_58
+#define AFSBIG_ENDIAN  1
+#define AFS_HAVE_FFS            1       /* Use system's ffs. */
+#define AFS_HAVE_STATVFS      0       /* System doesn't support statvfs */
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef KERNEL
+#define        AFS_UIOFMODE            1       /* Only in afs/afs_vnodeops.c (afs_ustrategy) */
+#define        AFS_SYSVLOCK            1       /* sys v locking supported */
+/*#define      AFS_USEBUFFERS  1*/
+#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
+#endif /* KERNEL */
+#define        AFS_DIRENT      
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+#define        ROOTINO         UFSROOTINO
+
+#endif _PARAM_SUN4X_58_H_
index 873062a..666f5ef 100644 (file)
@@ -34,7 +34,7 @@ CC = /opt/SUNWspro/bin/cc
 KDEFS= -Dsun4c -DSUN4C_60 -DNFSCLIENT -DSYSACCT -DOLDSCSI -DVDDRV -D_KERNEL \
        -DSYSV -dn ${ARCH_DEFS}
 
-<sun4x_57>
+<sun4x_57 sun4x_58>
 KDEFS_32 = 
 KDEFS_64 = -xarch=v9
 
@@ -42,17 +42,17 @@ KDEFS_64 = -xarch=v9
 CFLAGS=-I. -I.. ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
 
 # Name of directory to hold object files and libraries.
-<all -sun4x_57>
+<all -sun4x_57 -sun4x_58>
 KOBJ = MODLOAD
-<sun4x_57>
+<sun4x_57 sun4x_58>
 KOBJ = MODLOAD32 MODLOAD64
 
 
 # This tells Makefile.common to use it's single directory build target.
-<all -sun4x_57>
+<all -sun4x_57 -sun4x_58>
 COMPDIRS = single_compdir
 
-<sun4x_57>
+<sun4x_57 sun4x_58>
 COMPDIRS = solaris_compdirs
 
 <all>
@@ -81,7 +81,7 @@ setup:
 ## This is the target for a Solaris 7. Here we build both the 32 bit and
 ## the 64 bit libafs in MODLOAD32 and MODLOAD64 directories respectively
 
-<sun4x_57>
+<sun4x_57 sun4x_58>
 ${COMPDIRS}:
        for t in ${KOBJ} ; do \
                echo Building directory: $$t ; \
@@ -106,7 +106,7 @@ ${COMPDIRS}:
 LIBAFS = libafs.o
 LIBAFSNONFS = libafs.nonfs.o
 
-<all -sun4x_57>
+<all -sun4x_57 sun4x_58>
 DEST_LIBAFS = ${DESTDIR}/root.client/usr/vice/etc/modload/${LIBAFS}
 DEST_LIBAFSNONFS = ${DESTDIR}/root.client/usr/vice/etc/modload/${LIBAFSNONFS}
 
@@ -130,7 +130,7 @@ ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
        $(RM) -f $@
        $(LD) -r -o $@  $(AFSAOBJS) ${AFSNONFSOBJS}
 
-<sun4x_57>
+<sun4x_57 sun4x_58>
 MODLOADDIR = ${DESTDIR}root.client/usr/vice/etc/modload
 
 libafs: ${LIBAFSNONFS}
index 254b8c7..c732bc9 100644 (file)
@@ -21,6 +21,9 @@
 #include "../sys/stream.h"
 #include "../sys/tihdr.h"
 #include "../sys/fcntl.h"
+#ifdef AFS_SUN58_ENV
+#include "../netinet/ip6.h"
+#endif
 #include "../inet/ip.h"
 #include "../netinet/udp.h"