ia64-hpux1123-support-20031126
authorDouglas Engert <deengert@anl.gov>
Thu, 27 Nov 2003 01:17:34 +0000 (01:17 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 27 Nov 2003 01:17:34 +0000 (01:17 +0000)
FIXES 2579

necessary changes to support hpux 11.23 on ia64.

17 files changed:
Makefile.in
acinclude.m4
src/afs/HPUX/hpux_mod.modmeta [new file with mode: 0644]
src/afs/HPUX/osi_vfsops.c
src/afs/HPUX/osi_vnodeops.c
src/afs/VNOPS/afs_vnop_lookup.c
src/afs/VNOPS/afs_vnop_readdir.c
src/afs/afs.h
src/afs/afs_osi.c
src/afs/sysincludes.h
src/config/afs_sysnames.h
src/config/param.ia64_hpux1123.h [new file with mode: 0644]
src/config/param.ia64_hpux1123_usr.h [new file with mode: 0644]
src/libafs/Makefile.common.in
src/libafs/MakefileProto.HPUX.in
src/rx/HPUX/rx_kmutex.h
src/util/afsutil_prototypes.h

index 1dd09ff..3b0cbf7 100644 (file)
@@ -71,6 +71,8 @@ packages: dest
                ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.11 ;; \
        ia64_hpux1122 ) \
                ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.22 ;; \
+       ia64_hpux1123 ) \
+               ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.23 ;; \
        *) \
                echo Not building packages for ${SYS_NAME} ;; \
        esac
index 387e500..ef6346f 100644 (file)
@@ -437,9 +437,12 @@ else
                hppa*-hp-hpux11.11)
                        AFS_SYSNAME="hp_ux11i"
                        ;;
-               ia64-hp-hpux*)
+               ia64-hp-hpux11.22)
                        AFS_SYSNAME="ia64_hpux1122"
                        ;;
+               ia64-hp-hpux*)
+                       AFS_SYSNAME="ia64_hpux1123"
+                       ;;
                hppa*-hp-hpux10*)
                        AFS_SYSNAME="hp_ux102"
                        ;;
diff --git a/src/afs/HPUX/hpux_mod.modmeta b/src/afs/HPUX/hpux_mod.modmeta
new file mode 100644 (file)
index 0000000..f368e5f
--- /dev/null
@@ -0,0 +1,8 @@
+module AFSLIB_NAME {
+       version 1.0.3
+       type    misc 
+       desc    "AFS Kernel routines"
+       states  loaded static  
+       loadtimes driver_install run
+       initfunc driver_install afsc_link static 
+}
index fc1eb5a..4a7b739 100644 (file)
@@ -21,6 +21,47 @@ RCSID
 #include "afs/afs_stats.h"     /* statistics stuff */
 #include <sys/scall_kernprivate.h>
 
+#if defined(AFS_HPUX1123_ENV)
+#include <sys/moddefs.h>
+#endif /* AFS_HPUX1123_ENV */
+
+#if defined(AFS_HPUX1123_ENV)
+/* defind DLKM tables  so we can load dynamicly */
+/* we still need an afs_unload to unload */
+/* Note: There is to be a dependency on the
+ * the name of the struct <name>_wrapper, and the 
+ * name of the dynamicly loaded file <name>  
+ * We will define -DAFS_WRAPPER=<name>_wrapper
+ * and -DAFS_CONF_DATA=<name>_conf_data  and pass into
+ * this routine 
+ */ 
+
+extern struct mod_operations mod_misc_ops;
+extern struct mod_conf_data AFS_CONF_DATA;
+
+static int afs_load(void *arg);
+/* static int afs_unload(void *arg); */
+
+struct mod_type_data afs_mod_link = {
+       "AFS kernel module", 
+       NULL
+};
+
+struct modlink afs_modlink[] = {
+       {&mod_misc_ops, &afs_mod_link},
+       { NULL, NULL }
+};
+
+struct modwrapper AFS_WRAPPER = {
+       MODREV, 
+       afs_load, 
+       NULL,      /* should be afs_unload if we had one */ 
+       NULL,
+       &AFS_CONF_DATA, 
+       afs_modlink 
+}; 
+
+#endif /* AFS_HPUX1123_ENV */
 
 static char afs_mountpath[512];
 struct vfs *afs_globalVFS = 0;
@@ -233,6 +274,16 @@ osi_InitGlock()
     }
 }
 
+#if defined(AFS_HPUX1123_ENV)
+/* DLKM routine called when loaded */
+static int
+afs_load(void *arg)
+{
+       afsc_link();
+       return 0;
+}
+#endif /* AFS_HPUX1123_ENV */
+
 /*
  * afsc_link - Initialize VFS
  */
index 714128c..063818a 100644 (file)
@@ -181,12 +181,19 @@ afs_lockf(vp, flag, len, cred, fp, LB, UB)
 #endif
 #include "h/debug.h"
 #include "h/types.h"
+#if !defined(AFS_HPUX1123_ENV)
+       /* 11.23 is using 64 bit in many cases */
+#define kern_daddr_t daddr_t
+#endif
 #include "h/param.h"
 #include "h/vmmac.h"
 #include "h/time.h"
 #include "ufs/inode.h"
 #include "ufs/fs.h"
 #include "h/dbd.h"
+#if defined(AFS_HPUX1123_ENV)
+dbd_t       *finddbd();
+#endif /* AFS_HPUX1123_ENV */
 #include "h/vfd.h"
 #include "h/region.h"
 #include "h/pregion.h"
@@ -194,7 +201,9 @@ afs_lockf(vp, flag, len, cred, fp, LB, UB)
 #include "h/user.h"
 #include "h/sysinfo.h"
 #include "h/pfdat.h"
+#if !defined(AFS_HPUX1123_ENV)
 #include "h/tuneable.h"
+#endif
 #include "h/buf.h"
 #include "netinet/in.h"
 
@@ -207,7 +216,7 @@ struct buf *afs_bread_freebp = 0;
  */
 afs_bread(vp, lbn, bpp)
      struct vnode *vp;
-     daddr_t lbn;
+     kern_daddr_t lbn;
      struct buf **bpp;
 {
     int offset, fsbsize, error;
@@ -269,7 +278,7 @@ afs_brelse(vp, bp)
 
 afs_bmap(avc, abn, anvp, anbn)
      register struct vcache *avc;
-     afs_int32 abn, *anbn;
+     kern_daddr_t abn, *anbn;
      struct vcache **anvp;
 {
     AFS_STATCNT(afs_bmap);
@@ -525,7 +534,7 @@ mp_afs_fsync(register struct vnode *avc, struct AFS_UCRED *acred, int unused1)
 }
 
 int
-mp_afs_bread(register struct vnode *avc, daddr_t lbn, struct buf **bpp,
+mp_afs_bread(register struct vnode *avc, kern_daddr_t lbn, struct buf **bpp,
             struct vattr *unused1, struct ucred *unused2)
 {
     register int code;
@@ -692,7 +701,7 @@ afspgin_setup_io_ranges(vfspage_t * vm_info, pgcnt_t bpages, k_off_t isize,
     pgcnt_t maxpage;           /* one past last page to bring in */
     pgcnt_t maxpagein;
     pgcnt_t multio_maxpage;
-    daddr_t start_blk;
+    kern_daddr_t start_blk;
     dbd_t *dbd;
     expnd_flags_t up_reason, down_reason;
     int count = 1;
@@ -834,7 +843,7 @@ afspgin_blkflsh(vfspage_t * vm_info, struct vnode * devvp, pgcnt_t * num_4k)
 
     for (indx = 0; indx < num_io; indx++) {
        flush_reslt =
-           blkflush(devvp, (daddr_t) VM_GET_IO_STARTBLK(vm_info, indx),
+           blkflush(devvp, (kern_daddr_t) VM_GET_IO_STARTBLK(vm_info, indx),
                     ptob(VM_GET_IO_COUNT(vm_info, indx)), 0,
                     VM_REGION(vm_info));
        if (flush_reslt) {
@@ -966,7 +975,7 @@ afspgin_update_dbd(vfspage_t * vm_info, int bsize)
     k_off_t rem;
     pgcnt_t m;
     pgcnt_t pgindx;
-    daddr_t blkno;
+    kern_daddr_t blkno;
     int num_io = VM_GET_NUM_IO(vm_info);
     int i;
 
@@ -981,7 +990,7 @@ afspgin_update_dbd(vfspage_t * vm_info, int bsize)
        VASSERT(rem % NBPG == 0);
 
        pgindx -= (pgcnt_t) btop(rem);
-       blkno -= (daddr_t) btodb(rem);
+       blkno -= (kern_daddr_t) btodb(rem);
 
        /*
         * This region could start in mid-block.  If so, pgindx
@@ -1024,7 +1033,7 @@ afs_pagein(vp, prp, wrt, space, vaddr, ret_startindex)
     pgcnt_t maxpagein;
     struct vnode *devvp;
     pgcnt_t count;
-    daddr_t start_blk = 0;
+    kern_daddr_t start_blk = 0;
     int bsize;
     int error;
     k_off_t isize;
@@ -1580,6 +1589,16 @@ afs_pageout(vp, prp, start, end, flags)
         */
        old_cred = kt_cred(u.u_kthreadp);
        if (vhand) {
+#if defined(AFS_HPUX1123_ENV)
+               /*
+                * DEE - 1123 does not have the vas.h, and it looks
+                * we should never be called with a NFS type file anyway.
+                * so where did this come from? Was it copied from NFS?
+                * I assume it was, so we will add an assert for now
+                * and see if the code runs at all.
+                */
+               VASSERT(filevp->v_fstype != VNFS);
+#else
            set_kt_cred(u.u_kthreadp, filevp->v_vas->va_cred);
 
            /*
@@ -1590,6 +1609,7 @@ afs_pageout(vp, prp, start, end, flags)
             */
            if (kt_cred(u.u_kthreadp) == NULL)
                set_kt_cred(u.u_kthreadp, old_cred);
+#endif
        }
 
        /*
@@ -1708,13 +1728,13 @@ int
 afs_mapdbd(filevp, offset, bn, flags, hole, startidx, endidx)
      struct vnode *filevp;
      off_t offset;
-     daddr_t *bn;              /* Block number. */
+     kern_daddr_t *bn;         /* Block number. */
      int flags;                        /* B_READ or B_WRITE */
      int *hole;                        /* To be used for read-ahead. */
      pgcnt_t *startidx;                /* To be used for read-ahead. */
      pgcnt_t *endidx;          /* To be used for read-ahead. */
 {
-    daddr_t lbn, local_bn;
+    kern_daddr_t lbn, local_bn;
     int on;
     int err;
     long bsize = vtoblksz(filevp) & ~(DEV_BSIZE - 1);
@@ -1728,7 +1748,7 @@ afs_mapdbd(filevp, offset, bn, flags, hole, startidx, endidx)
     if (bsize <= 0)
        osi_Panic("afs_mapdbd: zero size");
 
-    lbn = (daddr_t) (offset / bsize);
+    lbn = (kern_daddr_t) (offset / bsize);
     on = offset % bsize;
 
     err = VOP_BMAP(filevp, lbn, NULL, &local_bn, flags);
@@ -1775,7 +1795,15 @@ afs_vm_stopio(vp, args)
 {
     fsdata_t *fsdata = (fsdata_t *) args->fs_data;
 
-    if ((dbtob(VM_END_PAGEOUT_BLK(args)) + NBPG) % (fsdata->bsize) == 0) {
+#if defined(AFS_HPUX1123_ENV)
+       uint64_t tmpdb;
+       tmpdb = VM_END_PAGEOUT_BLK(args);
+
+       if ((dbtob(tmpdb) + NBPG) % (fsdata->bsize) == 0)
+#else
+    if ((dbtob(VM_END_PAGEOUT_BLK(args)) + NBPG) % (fsdata->bsize) == 0) 
+#endif /* AFS_HPUX1123_ENV */
+       {
        return (1);
     } else {
        return (0);
index b794f9d..f377ea6 100644 (file)
@@ -476,12 +476,17 @@ Next_AtSys(register struct vcache *avc, struct vrequest *areq,
 #if (defined(AFS_SGI62_ENV) || defined(AFS_SUN57_64BIT_ENV))
 extern int BlobScan(ino64_t * afile, afs_int32 ablob);
 #else
+#if defined(AFS_HPUX1123_ENV)
+/* DEE should use the new afs_inode_t  for all */
+extern int BlobScan(ino_t *afile, afs_int32 ablob);
+#else
 #if defined AFS_LINUX_64BIT_KERNEL
 extern int BlobScan(long *afile, afs_int32 ablob);
 #else
 extern int BlobScan(afs_int32 * afile, afs_int32 ablob);
 #endif
 #endif
+#endif
 
 
 /* called with an unlocked directory and directory cookie.  Areqp
index 22980f4..92758b6 100644 (file)
@@ -70,6 +70,11 @@ extern struct DirEntry *afs_dir_GetBlob();
 int
 BlobScan(ino64_t * afile, afs_int32 ablob)
 #else
+#if defined(AFS_HPUX1123_ENV)
+/*DEE should use afs_inode_t for all */
+int 
+BlobScan(ino_t *afile, afs_int32 ablob)
+#else
 #ifdef AFS_LINUX_64BIT_KERNEL
 int
 BlobScan(long *afile, afs_int32 ablob)
@@ -78,6 +83,7 @@ int
 BlobScan(afs_int32 * afile, afs_int32 ablob)
 #endif
 #endif
+#endif
 {
     register afs_int32 relativeBlob;
     afs_int32 pageBlob;
index a99ec50..134d1be 100644 (file)
@@ -901,7 +901,7 @@ struct afs_fheader {
 #if defined(AFS_LINUX_64BIT_KERNEL)
 #define afs_inode_t long
 #else
-#if defined(AFS_AIX51_ENV)
+#if defined(AFS_AIX51_ENV) || defined(AFS_HPUX1123_ENV)
 #define afs_inode_t ino_t
 #else
 #define afs_inode_t afs_int32
index 89859cd..8a36cd1 100644 (file)
@@ -324,7 +324,7 @@ afs_osi_Invisible(void)
     u.u_procp->p_type |= SSYS;
 #elif defined(AFS_SUN5_ENV)
     curproc->p_flag |= SSYS;
-#elif defined(AFS_HPUX101_ENV)
+#elif defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV)
     set_system_proc(u.u_procp);
 #elif defined(AFS_DARWIN_ENV)
     /* maybe call init_process instead? */
index e9489fb..215884e 100644 (file)
@@ -239,6 +239,10 @@ struct vfspage;                    /* for vnode.h compiler warnings */
 #ifdef AFS_HPUX110_ENV
 #    include "h/resource.h"
 #endif
+#ifdef AFS_HPUX1123_ENV 
+#      include <sys/user.h>
+#      include <sys/cred.h>
+#endif
 #  endif /* AFS_HPUX_ENV */
 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
 #  if defined(AFS_FBSD50_ENV)
@@ -311,7 +315,7 @@ MALLOC_DECLARE(M_AFS);
 #include "h/ioctl.h"
 #endif /* AFS_FBSD_ENV */
 
-#if    defined(AFS_HPUX101_ENV)
+#if    defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV)
 #include "h/proc_iface.h"
 #include "h/vas.h"
 #endif
index 3249c17..11e768f 100644 (file)
@@ -47,6 +47,7 @@
 #define SYS_NAME_ID_hp_ux110            415
 #define SYS_NAME_ID_hp_ux11i             416
 #define SYS_NAME_ID_ia64_hpux1122               417
+#define SYS_NAME_ID_ia64_hpux1123               418
 
 #define SYS_NAME_ID_mac2_51             500
 #define SYS_NAME_ID_mac_aux10           501
diff --git a/src/config/param.ia64_hpux1123.h b/src/config/param.ia64_hpux1123.h
new file mode 100644 (file)
index 0000000..7632fe5
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * 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
+ */
+
+/* THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT */
+
+#ifndef        AFS_PARAM_H
+#define        AFS_PARAM_H
+
+#define AFS_HPUX_ENV   1
+#define        AFS_HPUX90_ENV  1
+#define        AFS_HPUX100_ENV 1
+#define        AFS_HPUX101_ENV 1
+#define        AFS_HPUX102_ENV 1
+#define        AFS_HPUX110_ENV 1
+#define        AFS_HPUX1111_ENV 1
+#define        AFS_HPUX1122_ENV 1
+#define        AFS_HPUX1123_ENV 1
+
+#define AFS_64BIT_ENV          1       /* Defines afs_int32 as int, not long. */
+#if defined(__LP64__)
+#define AFS_64BITPOINTER_ENV   1       /* pointers are 64 bits. */
+#endif
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_SYSCALL    48 /* slot reserved for AFS */
+
+/* Machine / Operating system information */
+#define SYS_NAME       "ia64_hpux1123"
+#define SYS_NAME_ID    SYS_NAME_ID_ia64_hpux1123
+#define AFSBIG_ENDIAN  1
+#define AFS_HAVE_FFS    1
+#define AFS_HAVE_STATVFS 1     /* System supports statvfs */
+#define AFS_GLOBAL_SUNLOCK 1
+#define RXK_LISTENER_ENV   1
+#define AFS_USERSPACE_IP_ADDR 1
+#define AFS_GCPAGS             0       /* if nonzero, garbage collect PAGs */
+#define AFS_USE_VOID_PTR 1
+/*
+ * #define AFS_VM_RDWR_ENV     1
+ */
+#define AFS_TEXT_ENV   1       /* Older kernels use TEXT */
+#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
+#define _KERNEL 1
+#define        afsio_iov       uio_iov
+#define        afsio_iovcnt    uio_iovcnt
+#define        afsio_offset    uio_offset
+#define        afsio_seg       uio_seg
+#define        afsio_resid     uio_resid
+#define        AFS_UIOSYS      UIOSEG_KERNEL
+#define        AFS_UIOUSER     UIOSEG_USER
+#define        AFS_CLBYTES     CLBYTES
+#define        AFS_MINCHANGE   2
+#define        osi_GetTime(x)  do { struct timeval osi_GetTimeVar; uniqtime(&osi_GetTimeVar); (x)->tv_sec = osi_GetTimeVar.tv_sec; (x)->tv_usec = osi_GetTimeVar.tv_usec; } while(0)
+#define        AFS_KALLOC      kmem_alloc
+#define        AFS_KFREE       kmem_free
+#define        VATTR_NULL      vattr_null
+
+#if defined(__LP64__)
+#define AFS_HPUX_64BIT_ENV 1
+#endif
+
+#ifndef UKERNEL
+/*
+ * On HP-UX, sys/socket.h includes sys/uio.h, and sys/file.h and
+ * sys/uio.h #include each other, and there's no simple way to avoid a
+ * warning about the struct uio declaration not being visible outside
+ * of some prototype or other.  So, we put in a tenative declaration to
+ * supress the warnings.
+ */
+struct uio;
+
+#define memset(A, B, S) bzero(A, S)
+#define memcpy(B, A, S) bcopy(A, B, S)
+#define memcmp(A, B, S) bcmp(A, B, S)
+#endif
+#endif /* KERNEL */
+#define        AFS_DIRENT      
+/* Non-standard definitions */
+#ifndef        EDQUOT
+#define        EDQUOT          69      /* Disc quota exceeded          */
+#endif
+
+#define USE_UCONTEXT        /* should be in afsconfig.h */
+
+#endif /* AFS_PARAM_H */
diff --git a/src/config/param.ia64_hpux1123_usr.h b/src/config/param.ia64_hpux1123_usr.h
new file mode 100644 (file)
index 0000000..ab8d641
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * 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        AFS_PARAM_H
+#define        AFS_PARAM_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_HPUX_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   48 /* slot reserved for AFS */
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS   1
+
+/* Machine / Operating system information */
+#define SYS_NAME       "ia64_hpux1123"
+#define SYS_NAME_ID    SYS_NAME_ID_ia64_hpux1123
+#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_USE_VOID_PTR 1
+
+/* 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     CLBYTES
+#define        AFS_MINCHANGE   2
+#define        VATTR_NULL      usr_vattr_null
+#endif /* KERNEL */
+#define        AFS_DIRENT      
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#endif /* AFS_PARAM_H */
index eb3e14f..1ad1372 100644 (file)
@@ -372,9 +372,13 @@ osi_sleep.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_sleep.c
 osi_misc.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_misc.c
        $(CRULE_NOOPT)
 osi_vfsops_nfs.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vfsops.c
-       $(CRULE_NOOPT) -o osi_vfsops_nfs.o
+       $(CRULE_NOOPT) -o osi_vfsops_nfs.o \
+       -DAFS_WRAPPER=${LIBAFS}_wrapper \
+       -DAFS_CONF_DATA=${LIBAFS}_conf_data
 osi_vfsops.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vfsops.c
-       $(CRULE_NOOPT) -DAFS_NONFSTRANS
+       $(CRULE_NOOPT) -DAFS_NONFSTRANS \
+       -DAFS_WRAPPER=${LIBAFSNONFS}_wrapper \
+       -DAFS_CONF_DATA=${LIBAFSNONFS}_conf_data
 osi_vm.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vm.c
        $(CRULE_NOOPT)
 osi_vnodeops.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vnodeops.c
index cc591f1..c6a1ba3 100644 (file)
@@ -21,9 +21,15 @@ AFS_OS_OBJS = \
        osi_vm.o
 
 AFS_OS_NFSOBJS = \
+<ia64_hpux1123>
+       hpux_mod_nfs.modmeta.o \
+<all>
        osi_vfsops_nfs.o
 
 AFS_OS_NONFSOBJS = \
+<ia64_hpux1123>
+       hpux_mod.modmeta.o \
+<all>
        osi_vfsops.o
 
 
@@ -48,6 +54,9 @@ AFS_OS_NONFSOBJS = \
 # seems to hang).  When the compiler sees the +ES1.Xindirect_calls
 # option, however, it issues a warning and turns off +Z.
 #
+# for 11.23, see the DDK BE/Sample_makefiles/Makefile.bld
+# for mod drivers.
+#
 <hp_ux110 hp_ux102 hp_ux11i>
 KDEFS= +ES1.Xindirect_calls +XixdU +Hx0 +ESlit +ESsfc +ESssf -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \
        -DMP +R500 -Wl,+k $(CPU_KDEFS)
@@ -66,6 +75,33 @@ KDEFS= +kernel -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \
 KDEFS_32 =
 KDEFS_64 = +DD64
 
+<ia64_hpux1123>
+
+CCOPTS_common= -Ae +DD64 +O2
+
+IDENTS_common= -DACLS -DAUDIT -DHPONCPLUS -DIDDS -DIPSEC -DIVT_INTERCEPT \
+    -DLWSYSCALL -DPGPROF -DSTCP -D_CLEAN_BE -D_HPUX_SOURCE -D_KERNEL \
+    -D_LARGEFILE64_SOURCE -D_NO_USER_PROTOS -D_UNSUPPORTED \
+    -D__BIGMSGQUEUE_ENABLED -D__ROSE__ -U__hp9000s700 \
+    -D_XPG4_EXTENDED -D__STDC_EXT__
+
+# Definitions which apply to IPF only
+
+CCOPTS_ipf= +DSitanium2 +kernel +objstatvars +Olit=all +Oshortdata=0 +W863
+
+IDENTS_ipf= -DKERNEL_DEBUGGER -DVARIABLE_UAREA -D_SYSCALL_64 -D__NO_PA_HDRS
+
+LDOPTS_ipf= +noobjdebug
+
+# above from the Makefile.bld example
+
+LDOPTS= $(LDOPTS_ipf)
+KDEFS= $(CCOPTS_common) $(IDENTS_common) $(CPU_KDEFS) 
+KDEFS_64= $(CCOPTS_ipf) $(IDENTS_ipf)
+
+MODLINK=/opt/ddk/11.23/BE/bin/modlink
+MODMETA=/opt/ddk/11.23/BE/bin/modmeta
+
 <all>
 
 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT -DHPONCPLUS
@@ -85,7 +121,7 @@ include Makefile.common
 
 <hp_ux11i hp_ux110 hp_ux102>
 BITS = 64 32
-<ia64_hpux1122>
+<ia64_hpux1122 ia64_hpux1123>
 BITS = 64
 <all>
 
@@ -95,7 +131,7 @@ setup:
        ln -fs /usr/include/sys h
 <hp_ux110 hp_ux11i ia64_hpux1122>
        ln -fs /etc/conf/h h
-<all>
+<hp_ux102 hp_ux110 hp_ux11i ia64_hpux1122>
        ln -fs /etc/conf conf
        ln -fs /etc/conf/net net
        ln -fs /etc/conf/dux dux
@@ -108,6 +144,13 @@ setup:
        ln -fs /etc/conf/ufs ufs
 <ia64_hpux1122>
        ln -fs /etc/conf/sys ufs
+<ia64_hpux1123>
+       ln -fs /usr/include/sys h
+       ln -fs /usr/include/net net
+       ln -fs /usr/include/netinet netinet
+       ln -fs /usr/include/nfs nfs
+       ln -fs /usr/include/rpc rpc
+       ln -fs /usr/include/sys ufs
 <all>
        ln -fs /usr/include/sys sys
        for b in $(BITS); do \
@@ -147,8 +190,13 @@ hpux_destdirs_libafs: dest_libafs
 
 
 # Below this line are targets when in the static directory:
+<all -ia64_hpux1123>
 LIBAFS = libafs$(BITSUFFIX).a
 LIBAFSNONFS = libafs$(BITSUFFIX).nonfs.a
+<ia64_hpux1123>
+LIBAFS = afs$(BITSUFFIX)_nfs
+LIBAFSNONFS =afs$(BITSUFFIX)
+<all>
 
 INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
 INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
@@ -174,9 +222,29 @@ $(DEST_LIBAFSNONFS): $(LIBAFSNONFS)
        ${INSTALL} -f $? $@
 
 ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
+<all -ia64_hpux1123>
        $(AR) cru $@ $?
        $(RANLIB) $@
+<ia64_hpux1123>
+       -$(MODLINK) -o $@ $?
+<all>
 
 ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
+<all -ia64_hpux1123>
        $(AR) cru $@ $?
        $(RANLIB) $@
+<ia64_hpux1123>
+       -$(MODLINK) -o $@ $?
+<all>
+
+<ia64_hpux1123>
+hpux_mod.modmeta.c: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/hpux_mod.modmeta
+       $(MODMETA) ${IDENTS_common} ${IDENTS_ipf} \
+               -DAFSLIB_NAME=${LIBAFSNONFS} \
+               $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/hpux_mod.modmeta > hpux_mod.modmeta.c
+
+hpux_mod_nfs.modmeta.c: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/hpux_mod.modmeta
+       $(MODMETA) ${IDENTS_common} ${IDENTS_ipf} \
+               -DAFSLIB_NAME=${LIBAFS} \
+               $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/hpux_mod.modmeta > hpux_mod_nfs.modmeta.c
+<all>
index de72193..3a4f4c8 100644 (file)
@@ -41,6 +41,40 @@ extern lock_t *rx_sleepLock;
 /* This is supposed to atomically drop the mutex and go to sleep
  * and reacquire the mutex when it wakes up.
  */
+
+/* With 11.23, ksleep_prepare is not defined anywhere  and 
+ * ksleep_one is only referenced in a comment. sleep, get_sleep_lock 
+ * and wakeup are defined in driver manuals.
+ * This works with 11.0, 11i, and 11.23
+ * Note: wakeup wakes up all threads waiting on cv. 
+ */
+
+#define CV_WAIT(cv, lck) \
+       do { \
+               get_sleep_lock((caddr_t)(cv)); \
+               if (!b_owns_sema(lck)) \
+                       osi_Panic("CV_WAIT mutex not held \n"); \
+               b_vsema(lck);   \
+               sleep((caddr_t)(cv), PRIBIO); \
+               b_psema(lck); \
+       } while(0)
+               
+#define CV_SIGNAL(cv)  \
+       do { \
+               lock_t * sleep_lock = get_sleep_lock((caddr_t)(cv)); \
+               wakeup((caddr_t)(cv)); \
+               spinunlock(sleep_lock); \
+       } while(0)
+
+#define CV_BROADCAST(cv) \
+       do { \
+               lock_t * sleep_lock = get_sleep_lock((caddr_t)(cv)); \
+               wakeup((caddr_t)(cv)); \
+               spinunlock(sleep_lock); \
+       } while(0)
+
+
+#if 0
 #define CV_WAIT(cv, lck) \
     do { \
         int code; \
@@ -80,6 +114,7 @@ extern lock_t *rx_sleepLock;
             osi_Panic("kwakeup_all failed: code = %d \n", code); \
         MP_SPINUNLOCK(rx_sleepLock); \
     } while (0)
+#endif /* 0 */
 
 #define CV_DESTROY(a)
 
index 84b1079..76f2cfd 100644 (file)
@@ -83,8 +83,10 @@ extern char *gettmpdir(void);
 #ifndef AFS_HPUX102_ENV
 extern int utimes(char *file, struct timeval tvp[2]);
 #endif
+#if !defined(AFS_HPUX110_ENV)
 extern int random(void);
 extern void srandom(int seed);
+#endif
 extern int getdtablesize(void);
 extern void setlinebuf(FILE * file);
 extern void psignal(unsigned int sig, char *s);