[OpenAFS-devel] Re: AFS Support for ia64_hpux1123

Douglas E. Engert deengert@anl.gov
Fri, 05 Dec 2003 16:05:30 -0600


"Carl E. Davidson" wrote:
> 
> Doug,
> 
> This is great progress! Is there anything else you need from me at this
> time to complete the 11.23 port?

Yes. 

(1) As I said below, 

    "One concern I have, is with the v_vas not being available as the vas.h.
     It was used only once, in the vnodeops, and then only with NFS. It looks 
     like it would never be used, But see the comments about this in the code.  
     I think the routines was originally copied from NFS."

    I commented this out, and I don't think it is actually used, but am not sure.
    What do you think?

(2) I would also like to send you a list (output of nm) of all the routines in the 
    HP kernel used by AFS. If you could look at this and see if any of these are
    due to be removed in the next release. 

(3) The HP DDK and its documentation are good, and have been helpful.
    But AFS is not a device driver, but a VFS. Is there any documentation on
    writing a VFS? I


(4) The lack of access to kernel documentation or source makes it very difficult
    to tell if things are really working as they should.  Is there any additional
    documentation about the kernel?

(5) Is there anyway to get HP or the HP Porting Center more involved with AFS?

P.S. I also got the DLKM support to work and sent that in as a seperate e-mail.


> 
> Regards,
> Carl
> 
> > -----Original Message-----
> > From: Douglas E. Engert [mailto:deengert@anl.gov]
> > Sent: Tuesday, November 25, 2003 12:45 PM
> > To: Derrick Brashear via RT
> > Cc: Carl E. Davidson; 'Srikanth Vishwanathan'; Ray Carlson
> > Subject: AFS Support for ia64_hpux1123
> >
> >
> > Derrick,
> > As per you note earlier today, attached are diffs against
> > openafs-snap-2003-11-25.tar.gz to support HP-UX 11i V2 on the
> > Itanium.
> > These can also be found at
> > /afs/anl.gov/usr/ctd/b17783/pub/cdiff.snap.20031125
> >
> > HP has made a number of changes in the kernel between 11.22 and 11.23
> >
> >  o The kernel build is done completely different. The DDK is needed
> >    as it provides the modlink and modmeta programs need to link
> >    the kernel modules. afs/HPUX/hpux_mod.modmeta has some
> > data for this.
> >
> >  o The name of the kernel extension can not have periods, as its name
> >    is also used in some structures in the code. So the name is now
> >    afs64.
> >
> >  o The kernel extension can be linked "static" and I am very close to
> >    having it be "loaded" (These are HP terms.)
> >
> >  o The size of ino_t for inodes is now 64 bits in the kernel.
> > I see there is
> >    now an afs_inode_t. This needs to be 64 bits.  (The
> > BlobScan code in
> >    VNOPS should be cleaned up, as the first param is really
> > an afs_inode_t *)
> >
> >  o The size of a daddr_t in now 64 bits in the kernel, and the
> >    typedef kern_daddr_t is used for this as defined in the HP
> > headers.
> >
> >  o One concern I have, is with the v_vas not being available
> > as the vas.h.
> >    It was used only once, in the vnodeops, and then only with
> > NFS. It looks
> >    like it would never be used, But see the comments about
> > this in the code.
> >    I think the routines was originally copied from NFS.
> >
> >  o The rx_mutex.h code was using some obsolete kernel
> > routines that are
> >    not in 11.23. The CV_* macros where changed to use the supported
> >    get_sleep_lock, sleep and wakeup calls which are used in
> > other parts
> >    of the code, These were introduced in hp_ux110.
> >
> >  o The afsutil_prototypes.h needed some changes as random and srandom
> >    ae defined in system header files.
> >
> >
> > Some of these changes also apply to the hp_ux110, hp_ux11i
> > and ia64_hpux1122, such as the rx_mutex, and the use the kern_daddr_t,
> > and ino_t.
> >
> > My original changes where to the openafs-1.2.10-src.tar.gz
> > where I have
> > built the ia64_hpux1123, hp_ux110, and hp_ux11i versions and
> > have been doing some testing.
> >
> > Due to the short time frame you gave me in the note earlier today,
> > I have built the ia64_hpux1123 against today's snapshot and
> > have tested some of the client tools, but not the kernel yet.
> >
> > I plan on building the next release for hp_ux110, hp_ux11i
> > and ia64_hpux1123.
> >
> >
> > These ae the files changed:
> >
> > ./src/afs/HPUX/osi_vfsops.c
> > ./src/afs/HPUX/osi_vnodeops.c
> > ./src/afs/HPUX/hpux_mod.modmeta
> > ./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/param.ia64_hpux1123_usr.h
> > ./src/config/param.ia64_hpux1123.h
> > ./src/config/afs_sysnames.h
> > ./src/libafs/MakefileProto.HPUX.in
> > ./src/libafs/Makefile.common.in
> > ./src/rx/HPUX/rx_kmutex.h
> > ./src/util/afsutil_prototypes.h
> > ./Makefile.in
> > ./acinclude.m4
> >
> >
> > --- ./src/afs/HPUX/,osi_vfsops.c      Tue Nov 25 10:42:38 2003
> > +++ ./src/afs/HPUX/osi_vfsops.c       Tue Nov 25 11:09:56 2003
> > @@ -21,6 +21,47 @@
> >  #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;
> > @@ -232,6 +273,16 @@
> >       osi_Panic("osi_Init lost initialization race");
> >      }
> >  }
> > +
> > +#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
> > --- ./src/afs/HPUX/,osi_vnodeops.c    Tue Nov 25 10:45:09 2003
> > +++ ./src/afs/HPUX/osi_vnodeops.c     Tue Nov 25 13:17:39 2003
> > @@ -181,12 +181,19 @@
> >  #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 @@
> >  #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 @@
> >   */
> >  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_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 @@
> >  }
> >
> >  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 @@
> >      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 @@
> >
> >      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 @@
> >      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 @@
> >       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 @@
> >      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 @@
> >        */
> >       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 @@
> >            */
> >           if (kt_cred(u.u_kthreadp) == NULL)
> >               set_kt_cred(u.u_kthreadp, old_cred);
> > +#endif
> >       }
> >
> >       /*
> > @@ -1708,13 +1728,13 @@
> >  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 @@
> >      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 @@
> >  {
> >      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);
> > --- ./src/afs/HPUX/,hpux_mod.modmeta  Tue Nov 25 11:10:50 2003
> > +++ ./src/afs/HPUX/hpux_mod.modmeta   Tue Nov 25 11:10:50 2003
> > @@ -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
> > +}
> > --- ./src/afs/VNOPS/,afs_vnop_lookup.c        Tue Nov 25 10:37:20 2003
> > +++ ./src/afs/VNOPS/afs_vnop_lookup.c Tue Nov 25 13:31:58 2003
> > @@ -476,10 +476,15 @@
> >  #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
> >
> > --- ./src/afs/VNOPS/,afs_vnop_readdir.c       Tue Nov 25 10:39:54 2003
> > +++ ./src/afs/VNOPS/afs_vnop_readdir.c        Tue Nov 25 13:32:11 2003
> > @@ -70,12 +70,18 @@
> >  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)
> >  #else
> >  int
> >  BlobScan(afs_int32 * afile, afs_int32 ablob)
> > +#endif
> >  #endif
> >  #endif
> >  {
> > --- ./src/afs/,afs.h  Tue Nov 25 10:26:17 2003
> > +++ ./src/afs/afs.h   Tue Nov 25 10:32:54 2003
> > @@ -901,7 +901,7 @@
> >  #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
> > --- ./src/afs/,afs_osi.c      Tue Nov 25 10:33:11 2003
> > +++ ./src/afs/afs_osi.c       Tue Nov 25 13:07:59 2003
> > @@ -324,7 +324,7 @@
> >      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? */
> > --- ./src/afs/,sysincludes.h  Tue Nov 25 10:34:40 2003
> > +++ ./src/afs/sysincludes.h   Tue Nov 25 10:36:53 2003
> > @@ -239,6 +239,10 @@
> >  #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 @@
> >  #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
> > --- ./src/config/,param.ia64_hpux1123_usr.h   Tue Nov 25 10:22:01 2003
> > +++ ./src/config/param.ia64_hpux1123_usr.h    Tue Nov 25 10:22:01 2003
> > @@ -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 */
> > --- ./src/config/,param.ia64_hpux1123.h       Tue Nov 25 10:22:16 2003
> > +++ ./src/config/param.ia64_hpux1123.h        Tue Nov 25 10:22:16 2003
> > @@ -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 */
> > --- ./src/config/,afs_sysnames.h      Tue Nov 25 10:22:23 2003
> > +++ ./src/config/afs_sysnames.h       Tue Nov 25 10:23:58 2003
> > @@ -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
> > --- ./src/libafs/,MakefileProto.HPUX.in       Tue Nov 25 09:56:52 2003
> > +++ ./src/libafs/MakefileProto.HPUX.in        Tue Nov 25 11:20:06 2003
> > @@ -21,9 +21,15 @@
> >       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 @@
> >  # 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_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 @@
> >
> >  <hp_ux11i hp_ux110 hp_ux102>
> >  BITS = 64 32
> > -<ia64_hpux1122>
> > +<ia64_hpux1122 ia64_hpux1123>
> >  BITS = 64
> >  <all>
> >
> > @@ -95,7 +131,7 @@
> >       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 @@
> >       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 @@
> >
> >
> >  # 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 @@
> >       ${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>
> > --- ./src/libafs/,Makefile.common.in  Sun Nov  9 20:04:20 2003
> > +++ ./src/libafs/Makefile.common.in   Tue Nov 25 10:18:53 2003
> > @@ -372,9 +372,13 @@
> >  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
> > --- ./src/rx/HPUX/,rx_kmutex.h        Tue Nov 25 09:55:57 2003
> > +++ ./src/rx/HPUX/rx_kmutex.h Tue Nov 25 09:55:57 2003
> > @@ -41,6 +41,40 @@
> >  /* 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 @@
> >              osi_Panic("kwakeup_all failed: code = %d \n", code); \
> >          MP_SPINUNLOCK(rx_sleepLock); \
> >      } while (0)
> > +#endif /* 0 */
> >
> >  #define CV_DESTROY(a)
> >
> > --- ./src/util/,afsutil_prototypes.h  Tue Jul 15 18:17:15 2003
> > +++ ./src/util/afsutil_prototypes.h   Tue Nov 25 12:40:51 2003
> > @@ -83,8 +83,10 @@
> >  #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);
> > --- ./,Makefile.in    Tue Nov 25 09:52:35 2003
> > +++ ./Makefile.in     Tue Nov 25 09:52:36 2003
> > @@ -71,6 +71,8 @@
> >               ${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
> > --- ./,acinclude.m4   Tue Nov 25 09:53:14 2003
> > +++ ./acinclude.m4    Tue Nov 25 09:53:14 2003
> > @@ -437,8 +437,11 @@
> >               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"
> >

-- 

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