cmd: comerr
@case ${SYS_NAME} in \
- sgi_6* | sun*_5[789] | hp_ux11* | sparc64_linux* | alpha_linux* ) \
+ sgi_6* | sun*_5[789] | hp_ux11* | ia64_hpux* | sparc64_linux* | alpha_linux* ) \
${COMPILE_PART1} cmd ${COMPILE_PART2}64 ;; \
*) \
${COMPILE_PART1} cmd ${COMPILE_PART2} ;; \
tviced: cmd comerr viced vlserver libafsrpc libafsauthent
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|*fbsd*|*nbsd2*) \
+ alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*|*nbsd2*) \
${COMPILE_PART1} tviced ${COMPILE_PART2} ;; \
*) \
echo Not building MT viced for ${SYS_NAME} ;; \
${TOP_LIBDIR}/libtermlib.a:
$(RM) -f ${TOP_LIBDIR}/libtermlib.a
case ${SYS_NAME} in \
- rs_aix* | sun4x_* | sunx86_* | sgi_6? | *linux* | ppc_darwin* | *fbsd* | hp_ux1122) \
+ rs_aix* | sun4x_* | sunx86_* | sgi_6? | *linux* | ppc_darwin* | *fbsd* | ia64_hpux*) \
ln -s libnull.a ${TOP_LIBDIR}/libtermlib.a ;; \
*) \
ln -s /usr/lib/libtermlib.a ${TOP_LIBDIR}/libtermlib.a ;; \
vfsck: vol
set -x; \
case ${SYS_NAME} in \
- sgi_* | *linux* | rs_aix42 | ppc_darwin* | hp_ux* | *fbsd* | *_obsd* | *_nbsd* | sun*_4* | rs_aix5* ) \
+ sgi_* | *linux* | rs_aix42 | ppc_darwin* | hp_ux* | ia64_hpux* | *fbsd* | *_obsd* | *_nbsd* | sun*_4* | rs_aix5* ) \
echo skip vfsck for ${SYS_NAME} ;; \
* ) \
${COMPILE_PART1} vfsck ${COMPILE_PART2} ;; \
${COMPILE_PART1} login ${COMPILE_PART2} ;; \
parisc_linux24) \
echo Skipping pam/login for parisc_linux24 ;; \
- sun4x_* | sunx86_* | hp_ux11* | *linux* | *fbsd* ) \
+ sun4x_* | sunx86_* | hp_ux11* | ia64_hpux* | *linux* | *fbsd* ) \
${COMPILE_PART1} pam ${COMPILE_PART2} ;; \
ppc_darwin* | *_obsd* | *_nbsd* | hp_ux* | rs_aix5* ) \
echo Skipping login for ${SYS_NAME} ;; \
rxstat_depinstall lwp_depinstall des
set -x; \
case ${SYS_NAME} in \
- hp_ux102* | *_obsd* | sun*_4* | *_nbsd*) \
+ hp_ux102* | *_obsd* | sun*_4* | *_nbsd*| ia64_hpux1122) \
echo Skipping libuafs for ${SYS_NAME} ;; \
* ) \
${COMPILE_PART1} libuafs ${COMPILE_PART2} ;; \
tbutc: cmd comerr bubasics butm budb bucoord cmd butc
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix4*|*linux*|hp_ux11*) \
+ alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix4*|*linux*|hp_ux11*|ia64_hpux*) \
${COMPILE_PART1} tbutc ${COMPILE_PART2} ;; \
*) \
echo Not building MT butc for ${SYS_NAME} ;; \
# pthread based user space RX library
libafsrpc: rx rxkad des
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|*fbsd*|*nbsd2*) \
+ alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*|*nbsd2*) \
${COMPILE_PART1} libafsrpc ${COMPILE_PART2} ;; \
*) \
echo Not building MT libafsrpc for ${SYS_NAME} ;; \
libafsauthent: ubik auth kauth libafsrpc
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|*fbsd*|*nbsd2*) \
+ alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*|*nbsd2*) \
${COMPILE_PART1} libafsauthent ${COMPILE_PART2} ;; \
*) \
echo Not building MT libafsrpc for ${SYS_NAME} ;; \
# pthread based user space RX library
shlibafsrpc: rx rxkad des
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*) \
+ alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
${COMPILE_PART1} shlibafsrpc ${COMPILE_PART2} ;; \
*) \
echo Not building shared libafsrpc for ${SYS_NAME} ;; \
shlibafsauthent: ubik auth kauth shlibafsrpc
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*) \
+ alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
${COMPILE_PART1} shlibafsauthent ${COMPILE_PART2} ;; \
*) \
echo Not building shared libafsrpc for ${SYS_NAME} ;; \
libadmin: libafsauthent bozo
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*) \
+ alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
$(MAKE) libadmin_real ;; \
*) \
echo Not building MT libadmin for ${SYS_NAME} ;; \
AFS_SYSNAME="hp_ux110"
;;
ia64-hp-hpux*)
- AFS_SYSNAME="hp_ux1122"
+ AFS_SYSNAME="ia64_hpux1122"
;;
hppa*-hp-hpux10*)
AFS_SYSNAME="hp_ux102"
* use the get_sleep_lock.
* afs_osi_Sleep and afs_osi_Wakeup are defined
*/
-void afs_osi_Sleep(char *event);
-void afs_osi_Wakeup(char *event);
+void afs_osi_Sleep(void *event);
+int afs_osi_Wakeup(void *event);
#endif
#define osi_NullHandle(x) ((x)->proc == (caddr_t) 0)
#include "afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h" /* afs statistics */
-#if defined(AFS_HPUX1122_ENV)
-void afs_osi_Wakeup(char *event);
-void afs_osi_Sleep(char *event);
-#endif
static char waitV;
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;
}
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;
+
+ AFS_STATCNT(WaitHack);
+ sleep_lock = get_sleep_lock(event);
+ wakeup(event);
+ spinunlock(sleep_lock);
+}
+#else
+
static void AfsWaitHack()
{
AFS_STATCNT(WaitHack);
wakeup(&waitV);
}
+#endif
void afs_osi_InitWaitHandle(struct afs_osi_WaitHandle *achandle)
{
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);
+#endif
+
}
/* afs_osi_Wait
{
int code;
afs_int32 endTime, tid;
+#if defined(AFS_HPUX1122_ENV)
+ char localwait;
+ char * event;
+#endif
AFS_STATCNT(osi_Wait);
endTime = osi_Time() + (ams/1000);
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;
+ }
+ else {
+ event = &localwait;
+ }
+ afs_osi_CallProc(AfsWaitHack, event, ams);
+ afs_osi_Sleep(event);
+ afs_osi_CancelProc(AfsWaitHack, event);
+#else
afs_osi_CallProc(AfsWaitHack, (char *) u.u_procp, ams);
afs_osi_Sleep(&waitV); /* for HP 10.0 */
/* do not do anything for solaris, digital, and SGI MP */
afs_osi_CancelProc(AfsWaitHack, (char *) u.u_procp);
if (code) break; /* if something happened, quit now */
+#endif
/* if we we're cancelled, quit now */
if (ahandle && (ahandle->proc == (caddr_t) 0)) {
/* we've been signalled */
return 0;
}
-int afs_osi_Wakeup(void *event)
-{
- wakeup((caddr_t) event);
- return 0;
-}
-
#if defined(AFS_HPUX1122_ENV)
-
-/* on HP 11.22 we are using beta semiphore for AFS_GLOCK */
-
-typedef struct afs_event {
- struct afs_event *next; /* next in hash chain */
- char *event; /* lwp event: an address */
- int refcount; /* Is it in use? */
- int seq; /* Sequence number: this is incremented
- by wakeup calls; wait will not return until
- it changes */
-} afs_event_t;
-
-#define HASHSIZE 128
-afs_event_t *afs_evhasht[HASHSIZE];/* Hash table for events */
-#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (HASHSIZE-1));
-int afs_evhashcnt = 0;
-
-/* Get and initialize event structure corresponding to lwp event (i.e. address)
- * */
-static afs_event_t *afs_getevent(char *event)
+void afs_osi_Sleep(void *event)
{
- afs_event_t *evp, *newp = 0;
- int hashcode;
-
- AFS_ASSERT_GLOCK();
- hashcode = afs_evhash(event);
- evp = afs_evhasht[hashcode];
- while (evp) {
- if (evp->event == event) {
- evp->refcount++;
- return evp;
- }
- if (evp->refcount == 0)
- newp = evp;
- evp = evp->next;
- }
- if (!newp) {
- newp = (afs_event_t *) osi_AllocSmallSpace(sizeof (afs_event_t));
- afs_evhashcnt++;
- newp->next = afs_evhasht[hashcode];
- afs_evhasht[hashcode] = newp;
- newp->seq = 0;
- }
- newp->event = event;
- newp->refcount = 1;
- return newp;
+ lock_t * sleep_lock;
+
+ AFS_ASSERT_GLOCK();
+ get_sleep_lock(event);
+ AFS_GUNLOCK();
+ sleep((caddr_t) event, PZERO-2);
+ AFS_GLOCK();
}
-
-
-/* Release the specified event */
-#define relevent(evp) ((evp)->refcount--)
-
-void afs_osi_Sleep(char *event)
+
+int afs_osi_Wakeup(void *event)
{
- struct afs_event *evp;
- int seq;
+ lock_t * sleep_lock;
- evp = afs_getevent(event);
- seq = evp->seq;
- while (seq == evp->seq) {
- AFS_ASSERT_GLOCK();
- get_sleep_lock(event);
- AFS_GUNLOCK();
- sleep(event, PZERO-2);
- AFS_GLOCK();
- }
- relevent(evp);
+ sleep_lock = get_sleep_lock(event);
+ wakeup((caddr_t) event);
+ spinunlock(sleep_lock);
+ return 0;
}
-
-void afs_osi_Wakeup(char *event)
+#else
+int afs_osi_Wakeup(void *event)
{
- struct afs_event *evp;
- lock_t * sleep_lock;
-
- evp = afs_getevent(event);
- sleep_lock = get_sleep_lock(event);
- if (evp->refcount > 1) {
- evp->seq++;
- wakeup(event);
- }
- spinunlock(sleep_lock);
+ wakeup((caddr_t) event);
+ return 0;
}
#endif
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
+ initsema(&afs_global_sema, 1, FILESYS_SEMA_PRI, FILESYS_SEMA_ORDER);
+ afsHash(64); /* 64 buckets */
+#endif
} else {
SPINUNLOCK_USAV(sched_lock, context);
}
if (change_to_fstore)
afspgin_update_dbd(vm_info, bsize);
-#if !defined(AFS_HPUX1122_ENV) /* needs to be fixed for 11.22 */
+#if defined(AFS_HPUX1122_ENV)
+ getppdp()->cnt.v_exfod += count;
+#else
mpproc_info[getprocindex()].cnt.v_exfod += count;
#endif
vmemp_unlockx(); /* free up VM empire */
/*
* Update statistics
*/
-#if !defined(AFS_HPUX1122_ENV) /* needs to be checked for 11.22 */
if (steal) {
if (flags & PF_DEACT) {
+#if defined(AFS_HPUX1122_ENV)
+ getppdp()->cnt.v_pswpout += npages;
+#else
mpproc_info[getprocindex()].cnt.v_pswpout += npages;
+#endif
/* sar_bswapout += ptod(npages);*/
}
else if (vhand) {
+#if defined(AFS_HPUX1122_ENV)
+ getppdp()->cnt.v_pgout++;
+ getppdp()->cnt.v_pgpgout += npages;
+#else
mpproc_info[getprocindex()].cnt.v_pgout++;
mpproc_info[getprocindex()].cnt.v_pgpgout += npages;
+#endif
}
}
-#endif
/*
* If time and patience have delivered enough
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;
+#endif
int access;
{
long bsize = vtoblksz(vp);
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;
+#endif
int access;
{
return 0;
int
afs_prealloc(vp, size, ignore_minfree, reserved)
struct vnode *vp;
+ /* DEE on 11.22 following is off_t */
size_t size;
int ignore_minfree;
int reserved;
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
/* copy out attributes from cache entry */
int afs_CopyOutAttrs(register struct vcache *avc, register struct vattr *attrs)
#else
attrs->va_rdev = 1;
#endif
+#if defined(AFS_HPUX1122_ENV)
+ if (afs_globalVFS) attrs->va_fstype = afs_globalVFS->vfs_mtype;
+#endif
/*
* Below return 0 (and not 1) blocks if the file is zero length. This conforms
-#if defined(AFS_SUN5_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_HPUX_ENV)
#include "osi_prototypes.h"
#endif
SHLIB_LINKER="ld -b"
;;
- hp_ux1122)
+ ia64_hpux*)
AR="/usr/bin/ar"
AS="/usr/ccs/bin/as"
CC="/opt/ansic/bin/cc"
#define SYS_NAME_ID_hp_ux102 414
#define SYS_NAME_ID_hp_ux110 415
#define SYS_NAME_ID_hp_ux11i 416
-#define SYS_NAME_ID_hp_ux1122 417
+#define SYS_NAME_ID_ia64_hpux1122 417
#define SYS_NAME_ID_mac2_51 500
#define SYS_NAME_ID_mac_aux10 501
#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_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
#define AFS_SYSCALL 48 /* slot reserved for AFS */
/* Machine / Operating system information */
-#define SYS_NAME "hp_ux1122"
-#define SYS_NAME_ID SYS_NAME_ID_hp_ux1122
+#define SYS_NAME "ia64_hpux1122"
+#define SYS_NAME_ID SYS_NAME_ID_ia64_hpux1122
#define AFSBIG_ENDIAN 1
#define AFS_HAVE_FFS 1
#define AFS_HAVE_STATVFS 1 /* System supports statvfs */
-I${TOP_OBJDIR}/src/fsint \
-I${TOP_OBJDIR}/src/vlserver \
-I${TOP_INCDIR} \
- -I${TOP_INCDIR}/afs \
+ -I${TOP_INCDIR}/afs
# Build rules - CC and CFLAGS are defined in system specific MakefileProtos.
.SUFFIXES: .i
<all>
-<hp_ux1122>
+<ia64_hpux1122>
KDEFS= +kernel -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \
-DFINE_GRAINED_PROTO_FILES \
-DMP -Wl,+k $(CPU_KDEFS)
<hp_ux110 hp_ux102>
BITS = 64 32
-<hp_ux1122>
+<ia64_hpux1122>
BITS = 64
<all>
-$(RM) -f h conf net dux machine netinet nfs rpc s200 ufs sys
<hp_ux110 hp_ux102>
ln -fs /usr/include/sys h
-<hp_ux1122>
+<ia64_hpux1122>
ln -fs /etc/conf/h h
<all>
ln -fs /etc/conf conf
ln -fs /etc/conf/machine s200
<hp_ux110 hp_ux102>
ln -fs /etc/conf/ufs ufs
-<hp_ux1122>
+<ia64_hpux1122>
ln -fs /etc/conf/sys ufs
<all>
ln -fs /usr/include/sys sys
SFLAGS=-P -I${TOP_INCDIR}
RX = ../rx
-CCRULE = ${CC} ${CFLAGS} -c $<
+CCRULE = ${CC} ${CFLAGS} -c $?
RXKAD = ../rxkad
RXSTAT = ../rxstat
FSINT = ../fsint
DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL
<hp_ux102 hp_ux110>
KOPTS=-Wp,-H200000 -Wl,-a,archive +DA1.0 +z
-<hp_ux1122>
+<ia64_hpux1122>
KOPTS=-Wp,-H200000 -Wl,-a,archive_shared
<all>
CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBUG}
<hp_ux102 hp_ux110>
TEST_CFLAGS= -Wp,-H200000 +DA1.0 +z -D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV -Dhpux -DAFS_HPUX_ENV
-<hp_ux1122>
+<ia64_hpux1122>
TEST_CFLAGS= -Wp,-H200000 -D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV -Dhpux -DAFS_HPUX_ENV
<all>
TEST_LDFLAGS=
${CC} -E -I${TOP_INCDIR} process.S >process.ss ; \
${AS} process.ss -o process.o ; \
$(RM) -f process.S ;;\
- hp_ux11* ) \
+ ia64_hpux11* | hp_ux11* ) \
${CC} ${CFLAGS} -c ${srcdir}/process.c;; \
*) \
/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s process.ss; \
{
#if defined(AFS_IA64_LINUX20_ENV)
register unsigned long sp __asm__("r12");
+#elif defined(AFS_HPUX1122_ENV)
+/* don't need anything special, will use
+ * ucontext.uc_stack.ss_sp as it matches r12.
+ * This should also work for Linux,
+ * but dont have system to test DEE
+ */
#else
#error "You need to update stack pointer register for this platform"
#endif
savearea->state = 0;
getcontext(&savearea->ucontext);
+#if defined(AFS_HPUX1122_ENV)
+ savearea->topstack = savearea->ucontext.uc_stack.ss_sp;
+#else
savearea->topstack = sp;
+#endif
switch (savearea->state)
{
case 0:
pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o
set -x; \
case "$(SYS_NAME)" in \
- hp_ux*) \
+ hp_ux* | ia64_hpux*) \
$(LD) $(LDFLAGS) -c ${srcdir}/mapfile.hp -o $@ \
afs_setcred.o afs_auth.o afs_util.o \
$(SHOBJS) $(LIBS) ;; \
pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o
set -x; \
case "$(SYS_NAME)" in \
- hp_ux*) \
+ hp_ux* | ia64_hpux*) \
$(LD) $(LDFLAGS) -c ${srcdir}/mapfile.hp -o $@ \
afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o \
$(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
test_pam: test_pam.o
set -x; \
case "$(SYS_NAME)" in \
- hp_ux*) \
+ hp_ux* | ia64_hpux*) \
$(CC) $(CFLAGS) -o $@ test_pam.o ${PAM_LIBS};; \
sun*_5*) \
$(CC) $(CFLAGS) -o $@ test_pam.o ${PAM_LIBS};; \
#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) */
#if defined(AFS_FBSD_ENV)
#include "h/dirent.h"
#if defined(AFS_HPUX_ENV)
signo = SIGPOLL;
-#elsif defined(AFS_NT40_ENV)
+#else
+#if defined(AFS_NT40_ENV)
signo = SIGUSR2;
#else
signo = SIGXCPU;
#endif
+#endif
#if defined(AFS_PTHREAD_ENV)
softsig_signal(signo, CheckSignal_Signal);