[OpenAFS-devel] Progress with snapshot-02-28 on HP-UX 11.0, 11i and ia64 11.22

Douglas E. Engert deengert@anl.gov
Mon, 03 Mar 2003 16:53:05 -0600


I now have hp_ux110, hp_ux11i and ia64_hpux1122 clients all running from the same
source based on the openafs-snap-2003-02-28.tar.gz. 

As I said last week, most of the changes applied to the 11.22 where really
for features first introduced in 11.00. So the attached set of chnages are mostly
changing test for AFS_HPUX1122_ENV to AFS_HPUX1111_ENV or AFS_HPUX110_ENV. 

Some points to consider:

  The HP /usr/include/sys/vfs_vm.h file for 11i is missing. Thanks, Carl, for 
  sending me a copy. This should be consifered an HP bug, and be released by HP 
  like they released the same file for HP-UX 11.0.
  
  I built both 32 and 64 bit kernels for hp_ux110, and hp_ux11i. Only a 64 bit
  kernel was built for the ia64_hp_ux1122. I am testing on dual procesor
  hp_ux110 and hp_ux11i systems with 32 bit kernels and on a single processor ia64.

  The config.guess with the OpenAFS needs to be updated as it does not recognize
  the ia64_hpux1122.  I added to the configure command line --build=ia64-hp-hpux11.22
  to avoid this. 

  The src/config/param.hp_ux11i.h is a new file. 
  
  I changed one line in  src/viced/callback.c An expression was re-casted to avoid 
  the compiler error message.

  The libjafs was not built. 

  I have not tested the server code at all, only the client. 

  The tokens command on ia64_hpux1122 gets a segfault, after listing the tokens.
  I willlok at this further.

  There are lots of changes to the kernel synchronization and locking code. I would hope 
  HP would look over these changes to see if they are correct. 
  
  I would also like to thank Ray Carlson, who has been helping with this work.



  
*** ./src/afs/HPUX/,osi_vnodeops.c      Thu Feb 27 11:27:31 2003
--- ./src/afs/HPUX/osi_vnodeops.c       Mon Mar  3 12:50:11 2003
***************
*** 49,66 ****
  
  #define vtoblksz(vp)  ((vp)->v_vfsp->vfs_bsize)
  
! #if defined(AFS_HPUX1122_ENV)
  /* We no longer need to lock on the VM Empire,
   * or at least that is what is claimed. 
   * so we will noopt the vmemp_ routines
   * This needs to be looked at closer.
   */
  #define vmemp_lockx()
  #define vmemp_returnx(a) return(a)
  #define vmemp_unlockx()
  #endif
  
! #if !defined(AFS_HPUX1122_ENV)
  /*
   * Copy an mbuf to the contiguous area pointed to by cp.
   * Skip <off> bytes and copy <len> bytes.
--- 49,67 ----
  
  #define vtoblksz(vp)  ((vp)->v_vfsp->vfs_bsize)
  
! #if defined(AFS_HPUX110_ENV)
  /* We no longer need to lock on the VM Empire,
   * or at least that is what is claimed. 
   * so we will noopt the vmemp_ routines
   * This needs to be looked at closer.
   */
  #define vmemp_lockx()
+ #undef  vmemp_returnx
  #define vmemp_returnx(a) return(a)
  #define vmemp_unlockx()
  #endif
  
! #if !defined(AFS_HPUX110_ENV)
  /*
   * Copy an mbuf to the contiguous area pointed to by cp.
   * Skip <off> bytes and copy <len> bytes.
***************
*** 1278,1284 ****
      if (change_to_fstore)
         afspgin_update_dbd(vm_info, bsize);
      
! #if defined(AFS_HPUX1122_ENV) 
        getppdp()->cnt.v_exfod += count;
  #else
      mpproc_info[getprocindex()].cnt.v_exfod += count;
--- 1279,1285 ----
      if (change_to_fstore)
         afspgin_update_dbd(vm_info, bsize);
      
! #if defined(AFS_HPUX110_ENV) 
        getppdp()->cnt.v_exfod += count;
  #else
      mpproc_info[getprocindex()].cnt.v_exfod += count;
***************
*** 1650,1656 ****
         */
        if (steal) {
            if (flags & PF_DEACT) {
! #if defined(AFS_HPUX1122_ENV)
                getppdp()->cnt.v_pswpout += npages;
  #else
                mpproc_info[getprocindex()].cnt.v_pswpout += npages;
--- 1651,1657 ----
         */
        if (steal) {
            if (flags & PF_DEACT) {
! #if defined(AFS_HPUX110_ENV)
                getppdp()->cnt.v_pswpout += npages;
  #else
                mpproc_info[getprocindex()].cnt.v_pswpout += npages;
***************
*** 1658,1664 ****
  /*            sar_bswapout += ptod(npages);*/
            }
            else if (vhand) {
! #if defined(AFS_HPUX1122_ENV)
                getppdp()->cnt.v_pgout++;
                getppdp()->cnt.v_pgpgout += npages;
  #else
--- 1659,1665 ----
  /*            sar_bswapout += ptod(npages);*/
            }
            else if (vhand) {
! #if defined(AFS_HPUX110_ENV)
                getppdp()->cnt.v_pgout++;
                getppdp()->cnt.v_pgpgout += npages;
  #else
***************
*** 1918,1924 ****
  afs_mmap(vp, off, size_bytes, access)
       struct vnode *vp;
       u_int off;
! #if defined(AFS_HPUX1122_ENV)
         u_long size_bytes;
  #else
       u_int size_bytes;
--- 1919,1925 ----
  afs_mmap(vp, off, size_bytes, access)
       struct vnode *vp;
       u_int off;
! #if defined(AFS_HPUX1111_ENV)
         u_long size_bytes;
  #else
       u_int size_bytes;
***************
*** 1956,1962 ****
  afs_unmap(vp,off, size_bytes,access)
       struct vnode *vp;
       u_int off;
! #if defined(AFS_HPUX1122_ENV)
         u_long size_bytes;
  #else
       u_int size_bytes;
--- 1957,1963 ----
  afs_unmap(vp,off, size_bytes,access)
       struct vnode *vp;
       u_int off;
! #if defined(AFS_HPUX1111_ENV)
         u_long size_bytes;
  #else
       u_int size_bytes;
***************
*** 2022,2028 ****
        return(ENOTTY);
  }
  
! #if defined(AFS_HPUX1122_ENV)
  /* looks like even if appl is 32 bit, we need to round to 8 bytes */
  /* This had no effect, it must not be being used */
  
--- 2023,2029 ----
        return(ENOTTY);
  }
  
! #if defined(AFS_HPUX1111_ENV)
  /* looks like even if appl is 32 bit, we need to round to 8 bytes */
  /* This had no effect, it must not be being used */
  
*** ./src/afs/HPUX/,osi_machdep.h       Thu Feb 27 11:27:31 2003
--- ./src/afs/HPUX/osi_machdep.h        Fri Feb 28 08:31:03 2003
***************
*** 51,57 ****
   * HP uses global mutex to protect afs land
   */
  
! #if !defined(AFS_HPUX1122_ENV)
  extern sema_t afs_global_sema;
  #else
  extern b_sema_t afs_global_sema;
--- 51,57 ----
   * HP uses global mutex to protect afs land
   */
  
! #if !defined(AFS_HPUX110_ENV)
  extern sema_t afs_global_sema;
  #else
  extern b_sema_t afs_global_sema;
***************
*** 59,65 ****
  
  extern void osi_InitGlock(void);
  
! #if !defined(AFS_HPUX1122_ENV)
  extern void       afsHash(int nbuckets);
  extern sv_sema_t *afsHashInsertFind(tid_t key);
  extern sv_sema_t *afsHashFind(tid_t key);
--- 59,65 ----
  
  extern void osi_InitGlock(void);
  
! #if !defined(AFS_HPUX110_ENV)
  extern void       afsHash(int nbuckets);
  extern sv_sema_t *afsHashInsertFind(tid_t key);
  extern sv_sema_t *afsHashFind(tid_t key);
***************
*** 90,96 ****
  #define USERPRI     NET_SPLX(splvar)
  #endif /* KERNEL */
  
! #if !defined(AFS_HPUX1122_ENV)
  /* 
   * On HP, the global lock is an alpha semaphore, hence it is automatically
   * released and reacquired aroubd a sleep() and wakeup().
--- 90,96 ----
  #define USERPRI     NET_SPLX(splvar)
  #endif /* KERNEL */
  
! #if !defined(AFS_HPUX110_ENV)
  /* 
   * On HP, the global lock is an alpha semaphore, hence it is automatically
   * released and reacquired aroubd a sleep() and wakeup().
***************
*** 110,128 ****
  
  #define       osi_NullHandle(x)       ((x)->proc == (caddr_t) 0)
  
! #if !defined(AFS_HPUX1122_ENV)
  extern caddr_t kmem_alloc();
- #else
- #undef kmem_alloc
- #undef kmem_free
- #define kmem_alloc(a) kmalloc(a, M_IHV, M_WAITOK)
- #define kmem_free(a,b)  kfree(a, M_IHV)
  #endif
  #include <sys/kthread_iface.h>        /* for kt_cred() */
  
  /* Expected to be available as a patch from HP */
  /* See section D of the top level README for details */
! #if defined(AFS_HPUX1122_ENV)
  #include <sys/vfs_vm.h>
  #else
  #include <vfs_vm.h>
--- 110,123 ----
  
  #define       osi_NullHandle(x)       ((x)->proc == (caddr_t) 0)
  
! #if !defined(AFS_HPUX110_ENV)
  extern caddr_t kmem_alloc();
  #endif
  #include <sys/kthread_iface.h>        /* for kt_cred() */
  
  /* Expected to be available as a patch from HP */
  /* See section D of the top level README for details */
! #if defined(AFS_HPUX110_ENV)
  #include <sys/vfs_vm.h>
  #else
  #include <vfs_vm.h>
*** ./src/afs/HPUX/,osi_sleep.c Thu Feb 27 11:27:31 2003
--- ./src/afs/HPUX/osi_sleep.c  Fri Feb 28 08:25:36 2003
***************
*** 16,23 ****
  #include "afsincludes.h"      /* Afs-based standard headers */
  #include "afs/afs_stats.h"   /* afs statistics */
  
! 
  static char waitV;
  
  /* call procedure aproc with arock as an argument, in ams milliseconds */
  static int afs_osi_CallProc(aproc, arock, ams)
--- 16,24 ----
  #include "afsincludes.h"      /* Afs-based standard headers */
  #include "afs/afs_stats.h"   /* afs statistics */
  
! #if !defined(AFS_HPUX110_ENV)
  static char waitV;
+ #endif
  
  /* call procedure aproc with arock as an argument, in ams milliseconds */
  static int afs_osi_CallProc(aproc, arock, ams)
***************
*** 28,39 ****
      int code;
  
      AFS_STATCNT(osi_CallProc);
! #if !defined(AFS_HPUX1122_ENV)
      AFS_GUNLOCK();
  #endif
      /* hz is in cycles/second, and timeout's 3rd parm is in cycles */
      code = timeout(aproc, arock, (ams * afs_hz)/1000 + 1);
! #if !defined(AFS_HPUX1122_ENV)
      AFS_GLOCK();
  #endif
      return code;
--- 29,40 ----
      int code;
  
      AFS_STATCNT(osi_CallProc);
! #if !defined(AFS_HPUX110_ENV)
      AFS_GUNLOCK();
  #endif
      /* hz is in cycles/second, and timeout's 3rd parm is in cycles */
      code = timeout(aproc, arock, (ams * afs_hz)/1000 + 1);
! #if !defined(AFS_HPUX110_ENV)
      AFS_GLOCK();
  #endif
      return code;
***************
*** 47,63 ****
      int code = 0;
      AFS_STATCNT(osi_CancelProc);
  
! #if !defined(AFS_HPUX1122_ENV)
      AFS_GUNLOCK();
  #endif
      code = untimeout(aproc, arock);
! #if !defined(AFS_HPUX1122_ENV)
      AFS_GLOCK();
  #endif
      return code;
  }
  
! #if defined(AFS_HPUX1122_ENV)
  static void AfsWaitHack(char * event)
  {
      lock_t * sleep_lock;
--- 48,64 ----
      int code = 0;
      AFS_STATCNT(osi_CancelProc);
  
! #if !defined(AFS_HPUX110_ENV)
      AFS_GUNLOCK();
  #endif
      code = untimeout(aproc, arock);
! #if !defined(AFS_HPUX110_ENV)
      AFS_GLOCK();
  #endif
      return code;
  }
  
! #if defined(AFS_HPUX110_ENV)
  static void AfsWaitHack(char * event)
  {
      lock_t * sleep_lock;
***************
*** 91,97 ****
      proc = achandle->proc;
      if (proc == 0) return;
      achandle->proc = (caddr_t) 0;   /* so dude can figure out he was signalled */
! #if defined(AFS_HPUX1122_ENV)
        afs_osi_Wakeup((char *)achandle);
  #else
      afs_osi_Wakeup(&waitV);
--- 92,98 ----
      proc = achandle->proc;
      if (proc == 0) return;
      achandle->proc = (caddr_t) 0;   /* so dude can figure out he was signalled */
! #if defined(AFS_HPUX110_ENV)
        afs_osi_Wakeup((char *)achandle);
  #else
      afs_osi_Wakeup(&waitV);
***************
*** 107,113 ****
  {
      int code;
      afs_int32 endTime, tid;
! #if defined(AFS_HPUX1122_ENV)
        char localwait;
        char * event;
  #endif
--- 108,114 ----
  {
      int code;
      afs_int32 endTime, tid;
! #if defined(AFS_HPUX110_ENV)
        char localwait;
        char * event;
  #endif
***************
*** 120,126 ****
        AFS_ASSERT_GLOCK();
        code = 0;
        /* do not do anything for solaris, digital, AIX, and SGI MP */
! #if defined(AFS_HPUX1122_ENV)
        if (ahandle) { 
                event = (char *) ahandle;
      }
--- 121,127 ----
        AFS_ASSERT_GLOCK();
        code = 0;
        /* do not do anything for solaris, digital, AIX, and SGI MP */
! #if defined(AFS_HPUX110_ENV)
        if (ahandle) { 
                event = (char *) ahandle;
      }
***************
*** 153,159 ****
      return 0;
  }
  
! #if defined(AFS_HPUX1122_ENV)
  void afs_osi_Sleep(void *event)
  {
        lock_t * sleep_lock;
--- 154,160 ----
      return 0;
  }
  
! #if defined(AFS_HPUX110_ENV)
  void afs_osi_Sleep(void *event)
  {
        lock_t * sleep_lock;
*** ./src/afs/HPUX/,osi_groups.c        Thu Feb 13 17:44:26 2003
--- ./src/afs/HPUX/osi_groups.c Fri Feb 28 08:45:24 2003
***************
*** 133,139 ****
      int *gp;
      struct ucred *newcr;
      ulong_t s;
! #if defined(AFS_HPUX1122_ENV)
        register ulong_t context;
  #endif
  
--- 133,139 ----
      int *gp;
      struct ucred *newcr;
      ulong_t s;
! #if defined(AFS_HPUX110_ENV)
        register ulong_t context;
  #endif
  
***************
*** 150,156 ****
            /* somebody else might have a pointer to this structure.
             ** make sure we do not have a race condition */
            newcr = *cred;
! #if defined(AFS_HPUX1122_ENV)
                /* all of the uniprocessor spinlocks are not defined. */
                /* I assume the UP and MP are now handled together */
                MP_SPINLOCK_USAV(cred_lock, context);
--- 150,156 ----
            /* somebody else might have a pointer to this structure.
             ** make sure we do not have a race condition */
            newcr = *cred;
! #if defined(AFS_HPUX110_ENV)
                /* all of the uniprocessor spinlocks are not defined. */
                /* I assume the UP and MP are now handled together */
                MP_SPINLOCK_USAV(cred_lock, context);
***************
*** 178,184 ****
        }
      else
        {
! #if defined(AFS_HPUX1122_ENV)
                MP_SPINUNLOCK_USAV(cred_lock, context);
  #else
            (void) UP_SPLX(s);
--- 178,184 ----
        }
      else
        {
! #if defined(AFS_HPUX110_ENV)
                MP_SPINUNLOCK_USAV(cred_lock, context);
  #else
            (void) UP_SPLX(s);
*** ./src/afs/HPUX/,osi_vfsops.c        Thu Feb 27 11:27:31 2003
--- ./src/afs/HPUX/osi_vfsops.c Fri Feb 28 08:16:36 2003
***************
*** 186,192 ****
  static int afs_Starting = 0;
  
  #pragma align 64
! #if !defined(AFS_HPUX1122_ENV)
  sema_t afs_global_sema = {
     NULL, 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, /* sa_type */
     0, 0, 0, 0, 0, 0, 0, NULL, /* sa_link */
--- 186,192 ----
  static int afs_Starting = 0;
  
  #pragma align 64
! #if !defined(AFS_HPUX110_ENV)
  sema_t afs_global_sema = {
     NULL, 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, /* sa_type */
     0, 0, 0, 0, 0, 0, 0, NULL, /* sa_link */
***************
*** 208,214 ****
      if ( !afs_Starting ) {
        afs_Starting = 1;
        SPINUNLOCK_USAV(sched_lock, context);
! #if defined(AFS_HPUX1122_ENV)
        b_initsema(&afs_global_sema, 1,  NFS_LOCK_ORDER2, "AFS GLOCK");
          /* afsHash(64); */    /* 64 buckets */
  #else
--- 208,214 ----
      if ( !afs_Starting ) {
        afs_Starting = 1;
        SPINUNLOCK_USAV(sched_lock, context);
! #if defined(AFS_HPUX110_ENV)
        b_initsema(&afs_global_sema, 1,  NFS_LOCK_ORDER2, "AFS GLOCK");
          /* afsHash(64); */    /* 64 buckets */
  #else
*** ./src/afs/VNOPS/,afs_vnop_attrs.c   Thu Feb 27 11:27:31 2003
--- ./src/afs/VNOPS/afs_vnop_attrs.c    Fri Feb 28 08:47:12 2003
***************
*** 33,39 ****
  extern afs_rwlock_t afs_xcbhash;
  struct afs_exporter *afs_nfsexporter;
  extern struct vcache *afs_globalVp;
! #if defined(AFS_HPUX1122_ENV)
  extern struct vfs *afs_globalVFS;
  #endif
  
--- 33,39 ----
  extern afs_rwlock_t afs_xcbhash;
  struct afs_exporter *afs_nfsexporter;
  extern struct vcache *afs_globalVp;
! #if defined(AFS_HPUX110_ENV)
  extern struct vfs *afs_globalVFS;
  #endif
  
***************
*** 139,145 ****
  #else 
      attrs->va_rdev = 1;
  #endif
! #if defined(AFS_HPUX1122_ENV)
        if (afs_globalVFS) attrs->va_fstype = afs_globalVFS->vfs_mtype;
  #endif
  
--- 139,145 ----
  #else 
      attrs->va_rdev = 1;
  #endif
! #if defined(AFS_HPUX110_ENV)
        if (afs_globalVFS) attrs->va_fstype = afs_globalVFS->vfs_mtype;
  #endif
  
*** ./src/afs/,sysincludes.h    Thu Feb 13 17:44:24 2003
--- ./src/afs/sysincludes.h     Fri Feb 28 08:18:05 2003
***************
*** 230,236 ****
  struct vfspage;                       /* for vnode.h compiler warnings */
  #    include "h/swap.h"       /* for struct swpdbd, for vnode.h compiler warnings */
  #    include "h/dbd.h"        /* for union idbd, for vnode.h compiler warnings */
! #ifdef AFS_HPUX1122_ENV
  #    include "h/resource.h"
  #endif
  #  endif /* AFS_HPUX_ENV */
--- 230,236 ----
  struct vfspage;                       /* for vnode.h compiler warnings */
  #    include "h/swap.h"       /* for struct swpdbd, for vnode.h compiler warnings */
  #    include "h/dbd.h"        /* for union idbd, for vnode.h compiler warnings */
! #ifdef AFS_HPUX110_ENV
  #    include "h/resource.h"
  #endif
  #  endif /* AFS_HPUX_ENV */
*** ./src/cf/,osconf.m4 Thu Feb 27 11:27:32 2003
--- ./src/cf/osconf.m4  Fri Feb 28 08:51:49 2003
***************
*** 119,125 ****
                SHLIB_LINKER="ld -b"
                ;;
  
!       hp_ux110)
                AR="/usr/bin/ar"
                AS="/usr/ccs/bin/as"
                CC="/opt/ansic/bin/cc"
--- 119,125 ----
                SHLIB_LINKER="ld -b"
                ;;
  
!       hp_ux11*)
                AR="/usr/bin/ar"
                AS="/usr/ccs/bin/as"
                CC="/opt/ansic/bin/cc"
*** ./src/config/,param.hp_ux11i.h      Fri Feb 28 08:56:47 2003
--- ./src/config/param.hp_ux11i.h       Fri Feb 28 14:34:12 2003
***************
*** 0 ****
--- 1,172 ----
+ #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
+  */
+ 
+ /* 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_64BIT_ENV         1       /* Defines afs_int32 as int, not long. */
+ #define AFS_64BITPOINTER_ENV  1       /* pointers are 64 bits. */
+ 
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_SYSCALL   48 /* slot reserved for AFS */
+ 
+ /* Machine / Operating system information */
+ #define SYS_NAME      "hp_ux11i"
+ #define SYS_NAME_ID   SYS_NAME_ID_hp_ux11i
+ #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_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;                      \
+                 }                                       \
+                 }
+ 
+ #define KERNEL_HAVE_UERROR 1
+ 
+ /* 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
+ 
+ #endif /* AFS_PARAM_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       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      "hp_ux11i"
+ #define SYS_NAME_ID   SYS_NAME_ID_hp_ux11i
+ #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     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 */
+ 
+ #endif /* !defined(UKERNEL) */
*** ./src/dir/,dir.c    Thu Feb 13 17:44:33 2003
--- ./src/dir/dir.c     Fri Feb 28 09:00:59 2003
***************
*** 73,79 ****
  #endif /* AFS_MACH_ENV */
  #endif
  #endif
! #if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX1122_ENV)
  #include "h/mbuf.h"
  #endif
  #ifndef AFS_LINUX20_ENV
--- 73,79 ----
  #endif /* AFS_MACH_ENV */
  #endif
  #endif
! #if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX110_ENV)
  #include "h/mbuf.h"
  #endif
  #ifndef AFS_LINUX20_ENV
*** ./src/libafs/,MakefileProto.HPUX.in Thu Feb 27 11:27:33 2003
--- ./src/libafs/MakefileProto.HPUX.in  Mon Mar  3 11:19:07 2003
***************
*** 48,54 ****
  # seems to hang).  When the compiler sees the +ES1.Xindirect_calls
  # option, however, it issues a warning and turns off +Z.
  #
! <hp_ux110 hp_ux102>
  KDEFS= +ES1.Xindirect_calls +XixdU +Hx0 +ESlit +ESsfc +ESssf -Wp,-H300000 -D_KERNEL
-D_KERNEL_BUILD
-D_UNSUPPORTED \
        -DMP +R500 -Wl,+k $(CPU_KDEFS)
  KDEFS_32 = +DA1.0 +DS1.0
--- 48,54 ----
  # seems to hang).  When the compiler sees the +ES1.Xindirect_calls
  # option, however, it issues a warning and turns off +Z.
  #
! <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)
  KDEFS_32 = +DA1.0 +DS1.0
***************
*** 83,89 ****
  
  include Makefile.common
  
! <hp_ux110 hp_ux102>
  BITS = 64 32
  <ia64_hpux1122>
  BITS = 64
--- 83,89 ----
  
  include Makefile.common
  
! <hp_ux11i hp_ux110 hp_ux102>
  BITS = 64 32
  <ia64_hpux1122>
  BITS = 64
***************
*** 91,99 ****
  
  setup:
        -$(RM) -f  h conf net dux machine netinet nfs rpc s200 ufs sys
! <hp_ux110 hp_ux102>
        ln -fs /usr/include/sys h
! <ia64_hpux1122>
        ln -fs /etc/conf/h h
  <all>
        ln -fs /etc/conf conf
--- 91,99 ----
  
  setup:
        -$(RM) -f  h conf net dux machine netinet nfs rpc s200 ufs sys
! <hp_ux102>
        ln -fs /usr/include/sys h
! <hp_ux110 hp_ux11i ia64_hpux1122>
        ln -fs /etc/conf/h h
  <all>
        ln -fs /etc/conf conf
***************
*** 104,110 ****
        ln -fs /etc/conf/nfs nfs
        ln -fs /usr/include/rpc rpc
        ln -fs /etc/conf/machine s200
! <hp_ux110 hp_ux102>
        ln -fs /etc/conf/ufs ufs
  <ia64_hpux1122>
        ln -fs /etc/conf/sys ufs
--- 104,110 ----
        ln -fs /etc/conf/nfs nfs
        ln -fs /usr/include/rpc rpc
        ln -fs /etc/conf/machine s200
! <hp_ux11i hp_ux110 hp_ux102>
        ln -fs /etc/conf/ufs ufs
  <ia64_hpux1122>
        ln -fs /etc/conf/sys ufs
*** ./src/libuafs/,MakefileProto.HPUX.in        Thu Feb 27 11:27:35 2003
--- ./src/libuafs/MakefileProto.HPUX.in Mon Mar  3 13:24:12 2003
***************
*** 11,17 ****
  # System specific build commands and flags
  CC = /opt/ansic/bin/cc
  DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL
! <hp_ux102 hp_ux110>
  KOPTS=-Wp,-H200000 -Wl,-a,archive +DA1.0 +z
  <ia64_hpux1122>
  KOPTS=-Wp,-H200000 -Wl,-a,archive_shared
--- 11,17 ----
  # System specific build commands and flags
  CC = /opt/ansic/bin/cc
  DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL
! <hp_ux102 hp_ux110 hp_ux11i>
  KOPTS=-Wp,-H200000 -Wl,-a,archive +DA1.0 +z
  <ia64_hpux1122>
  KOPTS=-Wp,-H200000 -Wl,-a,archive_shared
***************
*** 20,26 ****
  OPTF=-O
  WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD
  
! <hp_ux102 hp_ux110>
  TEST_CFLAGS= -Wp,-H200000 +DA1.0 +z -D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV -Dhpux
-DAFS_HPUX_ENV
  <ia64_hpux1122>
  TEST_CFLAGS= -Wp,-H200000 -D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV -Dhpux
-DAFS_HPUX_ENV
--- 20,26 ----
  OPTF=-O
  WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD
  
! <hp_ux102 hp_ux110 hp_ux11i>
  TEST_CFLAGS= -Wp,-H200000 +DA1.0 +z -D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV -Dhpux
-DAFS_HPUX_ENV
  <ia64_hpux1122>
  TEST_CFLAGS= -Wp,-H200000 -D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV -Dhpux
-DAFS_HPUX_ENV
*** ./src/lwp/,Makefile.in      Thu Feb 27 11:27:36 2003
--- ./src/lwp/Makefile.in       Fri Feb 28 09:13:04 2003
***************
*** 8,14 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${LWP_DBG} ${LWP_OPTMZ} ${COMMON_INCL}
  
  LIBOBJS=lwp.o process.o lock.o iomgr.o timer.o fasttime.o preempt.o \
        waitkey.o threadname.o AFS_component_version_number.o
--- 8,14 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${LWP_DBG} ${LWP_OPTMZ} ${XCFLAGS} ${COMMON_INCL}
  
  LIBOBJS=lwp.o process.o lock.o iomgr.o timer.o fasttime.o preempt.o \
        waitkey.o threadname.o AFS_component_version_number.o
*** ./src/rx/,rx_kcommon.h      Thu Feb 27 11:27:38 2003
--- ./src/rx/rx_kcommon.h       Fri Feb 28 09:28:01 2003
***************
*** 45,51 ****
  #include "h/dir.h"
  #endif
  #include "h/buf.h"
! #if !defined(AFS_HPUX1122_ENV)
  #include "h/mbuf.h"
  #endif
  #else /* !defined(AFS_SUN5_ENV) && !defined(AFS_XBSD_ENV) */
--- 45,51 ----
  #include "h/dir.h"
  #endif
  #include "h/buf.h"
! #if !defined(AFS_HPUX110_ENV)
  #include "h/mbuf.h"
  #endif
  #else /* !defined(AFS_SUN5_ENV) && !defined(AFS_XBSD_ENV) */
*** ./src/rx/HPUX/,rx_kmutex.h  Thu Feb 13 17:44:42 2003
--- ./src/rx/HPUX/rx_kmutex.h   Mon Mar  3 12:37:08 2003
***************
*** 112,118 ****
  
  #define MUTEX_TRYENTER(a) b_cpsema(a)
  
! #ifdef AFS_HPUX1122_ENV
  #define MUTEX_ENTER(a) \
        ((b_owns_sema(a)) ? osi_Panic("Already Held") : b_psema(a))
  #define MUTEX_EXIT(a) \
--- 112,118 ----
  
  #define MUTEX_TRYENTER(a) b_cpsema(a)
  
! #ifdef AFS_HPUX1111_ENV
  #define MUTEX_ENTER(a) \
        ((b_owns_sema(a)) ? osi_Panic("Already Held") : b_psema(a))
  #define MUTEX_EXIT(a) \
*** ./src/rx/,rx_packet.c       Thu Feb 13 17:44:40 2003
--- ./src/rx/rx_packet.c        Fri Feb 28 09:27:14 2003
***************
*** 36,42 ****
  #include "h/proc.h"
  #endif
  #include "h/socket.h"
! #if !defined(AFS_SUN5_ENV) &&  !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX1122_ENV)
  #if   !defined(AFS_OSF_ENV) && !defined(AFS_AIX41_ENV)
  #include "sys/mount.h"   /* it gets pulled in by something later anyway */
  #endif
--- 36,42 ----
  #include "h/proc.h"
  #endif
  #include "h/socket.h"
! #if !defined(AFS_SUN5_ENV) &&  !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX110_ENV)
  #if   !defined(AFS_OSF_ENV) && !defined(AFS_AIX41_ENV)
  #include "sys/mount.h"   /* it gets pulled in by something later anyway */
  #endif
***************
*** 939,945 ****
   * message receipt is done in rxk_input or rx_put.
   */
  
! #if defined(AFS_SUN5_ENV) || defined(AFS_HPUX1122_ENV)
  /*
   * Copy an mblock to the contiguous area pointed to by cp.
   * MTUXXX Supposed to skip <off> bytes and copy <len> bytes,
--- 939,945 ----
   * message receipt is done in rxk_input or rx_put.
   */
  
! #if defined(AFS_SUN5_ENV) || defined(AFS_HPUX110_ENV)
  /*
   * Copy an mblock to the contiguous area pointed to by cp.
   * MTUXXX Supposed to skip <off> bytes and copy <len> bytes,
***************
*** 1052,1058 ****
  
  #if !defined(AFS_LINUX20_ENV)
  int rx_mb_to_packet(amb, free, hdr_len, data_len, phandle)
! #if defined(AFS_SUN5_ENV) || defined(AFS_HPUX1122_ENV)
  mblk_t *amb;
  #else
  struct mbuf *amb;
--- 1052,1058 ----
  
  #if !defined(AFS_LINUX20_ENV)
  int rx_mb_to_packet(amb, free, hdr_len, data_len, phandle)
! #if defined(AFS_SUN5_ENV) || defined(AFS_HPUX110_ENV)
  mblk_t *amb;
  #else
  struct mbuf *amb;
*** ./src/viced/,callback.c     Tue Feb 18 21:50:47 2003
--- ./src/viced/callback.c      Fri Feb 28 13:23:40 2003
***************
*** 1395,1401 ****
            /* leave hold for MultiBreakVolumeCallBack to clear */
        }
        myfe = fe;
!       (struct object *)fe = ((struct object *)fe)->next;
        FreeFE(myfe);
      }
  
--- 1395,1401 ----
            /* leave hold for MultiBreakVolumeCallBack to clear */
        }
        myfe = fe;
!       fe = (struct FileEntry *)((struct object *)fe)->next;
        FreeFE(myfe);
      }
  
*** ./,acinclude.m4     Thu Feb 27 11:27:25 2003
--- ./acinclude.m4      Fri Feb 28 09:41:57 2003
***************
*** 375,382 ****
                        AFS_PARAM_COMMON=param.nbsd16.h
                        AFS_SYSNAME="alpha_nbsd16"
                        ;;
!               hppa*-hp-hpux11*)
                        AFS_SYSNAME="hp_ux110"
                        ;;
                ia64-hp-hpux*)
                        AFS_SYSNAME="ia64_hpux1122"
--- 375,385 ----
                        AFS_PARAM_COMMON=param.nbsd16.h
                        AFS_SYSNAME="alpha_nbsd16"
                        ;;
!               hppa*-hp-hpux11.0*)
                        AFS_SYSNAME="hp_ux110"
+                       ;;
+               hppa*-hp-hpux11.11)
+                       AFS_SYSNAME="hp_ux11i"
                        ;;
                ia64-hp-hpux*)
                        AFS_SYSNAME="ia64_hpux1122"
*** ./,Makefile.in      Thu Feb 27 11:27:25 2003
--- ./Makefile.in       Mon Mar  3 13:25:29 2003
***************
*** 356,362 ****
                rxstat_depinstall lwp_depinstall des
        set -x; \
        case ${SYS_NAME} in \
!       hp_ux102* | *_obsd* | sun*_4* | *_nbsd*| ia64_hpux1122) \
                echo Skipping libuafs for ${SYS_NAME} ;; \
        * ) \
                ${COMPILE_PART1} libuafs ${COMPILE_PART2} ;; \
--- 356,362 ----
                rxstat_depinstall lwp_depinstall des
        set -x; \
        case ${SYS_NAME} in \
!       hp_ux102* | *_obsd* | sun*_4* | *_nbsd*| hp_ux11i | ia64_hpux1122) \
                echo Skipping libuafs for ${SYS_NAME} ;; \
        * ) \
                ${COMPILE_PART1} libuafs ${COMPILE_PART2} ;; \
***************
*** 464,470 ****
  
  libjafs: libadmin
        case ${SYS_NAME} in \
!       alpha_dux*|sgi_*|sun4x_*|rs_aix*|*linux*|hp_ux11*) \
        ${COMPILE_PART1} JAVA/libjafs  ${COMPILE_PART2} ;; \
        *) \
                echo Not building MT libjafs for ${SYS_NAME} ;; \
--- 464,470 ----
  
  libjafs: libadmin
        case ${SYS_NAME} in \
!       alpha_dux*|sgi_*|sun4x_*|rs_aix*|*linux*|hp_ux110) \
        ${COMPILE_PART1} JAVA/libjafs  ${COMPILE_PART2} ;; \
        *) \
                echo Not building MT libjafs for ${SYS_NAME} ;; \


  

-- 

 Douglas E. Engert  <DEEngert@anl.gov>
 Argonne National Laboratory
 9700 South Cass Avenue
 Argonne, Illinois  60439 
 (630) 252-5444