sun4x_56/
sun4x_57/
sun4x_58/
+ alpha_linux_2216_22/ (DES does not work, will require one more change to
+ compile)
Example:
% mkdir i386_linux22
asmlinkage int (*sys_settimeofdayp)(struct timeval *tv, struct timezone *tz);
+#if !defined(AFS_ALPHA_LINUX20_ENV)
asmlinkage int (*sys_socketcallp)(int call, long *args);
+#endif /* no socketcall on alpha */
asmlinkage int (*sys_killp)(int pid, int signal);
asmlinkage int (*sys_setgroupsp)(int gidsetsize, gid_t *grouplist);
+#ifdef AFS_SPARC64_LINUX20_ENV
extern unsigned int sys_call_table[]; /* changed to uint because SPARC64 has syscaltable of 32bit items */
+#else
+extern void * sys_call_table[]; /* safer for other linuces */
+#endif
extern struct file_system_type afs_file_system;
static long get_page_offset(void);
}
#endif
+#ifdef AFS_SPARC64_LINUX20_ENV
#define POINTER2SYSCALL (unsigned int)(unsigned long)
#define SYSCALL2POINTER (void *)(long)
+#else
+#define POINTER2SYSCALL (void *)
+#define SYSCALL2POINTER (void *)
+#endif
int init_module(void)
{
/* Initialize pointers to kernel syscalls. */
sys_settimeofdayp = SYSCALL2POINTER sys_call_table[__NR_settimeofday];
+#if !defined(AFS_ALPHA_LINUX20_ENV)
sys_socketcallp = SYSCALL2POINTER sys_call_table[__NR_socketcall];
+#endif /* no socketcall on alpha */
sys_killp = SYSCALL2POINTER sys_call_table[__NR_kill];
/* setup AFS entry point. */
static long get_page_offset(void)
{
-#if defined(AFS_PPC_LINUX22_ENV) || defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV)
+#if defined(AFS_PPC_LINUX22_ENV) || defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV) || defined(AFS_ALPHA_LINUX20_ENV)
return PAGE_OFFSET;
#else
struct task_struct *p;
}
#endif /* AFS_SUN57_64BIT_ENV */
-#if defined(AFS_LINUX_64BIT_KERNEL)
+#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV)
struct iparam32 dst32;
#ifdef AFS_SPARC64_LINUX20_ENV
- if (current->tss.flags & SPARC_FLAG_32BIT) {
+ if (current->tss.flags & SPARC_FLAG_32BIT)
#else
#error Not done for this linux version
-#endif
+#endif /* AFS_SPARC64_LINUX20_ENV */
+ {
AFS_COPYIN(cmarg, (caddr_t) &dst32, sizeof dst32, code);
if (!code)
iparam32_to_iparam(&dst32, dst);
}
#endif /* defined(AFS_SGI_ENV) && (_MIPS_SZLONG==64) */
-#if defined(AFS_LINUX_64BIT_KERNEL)
+#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV)
struct afs_ioctl32 dst32;
#ifdef AFS_SPARC64_LINUX20_ENV
- if (current->tss.flags & SPARC_FLAG_32BIT) {
+ if (current->tss.flags & SPARC_FLAG_32BIT)
#else
#error Not done for this linux type
-#endif
+#endif /* AFS_SPARC64_LINUX20_ENV */
+ {
AFS_COPYIN(cmarg, (caddr_t) &dst32, sizeof dst32, code);
if (!code)
afs_ioctl32_to_afs_ioctl(&dst32, dst);
afs_syscall_pioctl(path, com, cmarg, follow)
#endif
char *path;
- int com;
+ unsigned int com;
caddr_t cmarg;
int follow;
{
fclose(ctPtr->textStream);
sprintf(tmpFileName, "%s/bu_XXXXXX", gettmpdir());
+#ifdef AFS_LINUX20_ENV
+ mkstemp(tmpFileName);
+#else
mktemp(tmpFileName);
+#endif
ctPtr->textStream = fopen(tmpFileName, "w+");
if ( ctPtr->textStream == NULL )
ERROR(BUDB_INTERNALERROR);
{
int retval = -1;
+#ifdef AFS_LINUX20_ENV
+ retval = open(mkstemp(st), O_RDWR|O_CREAT|O_EXCL, 0600);
+#else
retval = open(mktemp(st), O_RDWR|O_CREAT|O_EXCL, 0600);
+#endif
error_exit:
return(retval);
/* open the text file */
sprintf(filename, "%s/bu_XXXXXX", gettmpdir());
+#ifdef AFS_LINUX20_ENV
+ fid = open(mkstemp(filename), O_RDWR|O_CREAT|O_EXCL, 0600);
+#else
fid = open(mktemp(filename), O_RDWR|O_CREAT|O_EXCL, 0600);
+#endif
if (fid < 0)
{
ErrorLog(0, rstTapeInfoPtr->taskId, errno, 0,
--- /dev/null
+# Makefile for Linux 2.2.16 kernel on Alpha with glibc 2.2
+# Keep macros within each section in sorted order for clean diff displays.
+#
+# AFS_OSTYPE used to indicate suffixes and os specific subdirectories.
+AFS_OSTYPE = LINUX
+# Base directory for linux kernel source. Actually a prefix which is complete
+# when LINUX_VERS is appended to it.
+LINUX_SRCDIR = /usr/src/linux-
+# Default list of Linux kernels to build. Build will run only if all
+# can be built. To build a different set, specify LINUX_VERS to make.
+LINUX_VERS = 2.2.16
+
+#
+# compilation and link editor flags
+DBG=-g
+OPTMZ=-O2
+PAM_CFLAGS = -O2 -Dlinux -DLINUX_PAM -fPIC
+# Put -O2 here to _ensure_ all Makefiles pick it up.
+XCFLAGS= -O2
+MT_CFLAGS=-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}
+XLDFLAGS=
+SHARE_LDFLAGS = -shared -Xlinker -x
+SHLIB_SUFFIX=so
+SHLIB_CFLAGS=
+#
+# libraries
+MTLIBS=-lpthread
+TXLIBS= /usr/lib/libncurses.so
+XLIBS=
+#
+# programs
+AR=ar
+AS=as
+CP=cp
+INSTALL=${SRCDIR}bin/install
+LD=ld
+MT_CC=cc
+MV=mv
+RANLIB=ranlib
+RM=rm
+WASHTOOL=${SRCDIR}bin/washtool
+#
+# Other OS specific requirements
+#
+YACC = bison -y
+LEX = flex -l
+# Used in des library.
+CRYPT_OBJ = crypt.o
#define SYS_NAME_ID_s390_linux22 1901
#define SYS_NAME_ID_s390_linux24 1902
+#define SYS_NAME_ID_alpha_linux_2 2000
+#define SYS_NAME_ID_alpha_linux_22 2001
+#define SYS_NAME_ID_alpha_linux_24 2002
+
/*
* Placeholder to keep system-wide standard flags since this file is included by all
--- /dev/null
+#ifndef _PARAM_ALPHA_LINUX2216_22_H_
+#define _PARAM_ALPHA_LINUX2216_22_H_
+
+/* Linux 2.2.16 kernel on Alpha with glibc 2.2 */
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously sparc64 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define AFS_LINUX20_ENV 1
+#define AFS_LINUX22_ENV 1
+#define AFS_ALPHA_LINUX20_ENV 1
+#define AFS_ALPHA_LINUX22_ENV 1
+#define __alpha 1
+#define AFS_LINUX_64BIT_KERNEL 1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 338
+#define AFS_64BIT_IOPS_ENV 1
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+
+#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_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+/* Machine / Operating system information */
+#define SYS_NAME "alpha_linux_22"
+#define SYS_NAME_ID SYS_NAME_ID_alpha_linux_22
+#define AFSLITTLE_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
+
+#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+#include <linux/config.h>
+#ifdef CONFIG_SMP
+#undef CONFIG_SMP
+#endif
+/* Using "AFS_SMP" to map to however many #define's are required to get
+ * MP to compile for Linux
+ */
+#ifdef AFS_SMP
+#define CONFIG_SMP
+#define __SMP__
+#define AFS_GLOBAL_SUNLOCK
+#endif
+
+#endif /* __KERNEL__ && !DUMP_KERNEL*/
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#endif /* _PARAM_ALPHA_LINUX2216_22_H_ */
--- /dev/null
+#ifndef _PARAM_ALPHA_LINUX2216_22_USR_H_
+#define _PARAM_ALPHA_LINUX2216_22_USR_H_
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously sparc64 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define UKERNEL 1 /* user space kernel */
+#define AFS_ENV 1
+#define AFS_USR_LINUX20_ENV 1
+#define AFS_USR_LINUX22_ENV 1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 338
+#define AFS_64BIT_IOPS_ENV 1
+#define AFS_64BIT_ENV 1
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+
+/* Machine / Operating system information */
+#define SYS_NAME "alpha_linux_22"
+#define SYS_NAME_ID SYS_NAME_ID_alpha_linux_22
+#define AFSLITTLE_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
+
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_fmode uio_fmode
+#define afsio_resid uio_resid
+#define AFS_UIOSYS 1
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES MCLBYTES
+#define AFS_MINCHANGE 2
+#define VATTR_NULL usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#endif /* _PARAM_ALPHA_LINUX2216_22_USR_H_ */
#if defined(sgi)
#include "conf-sgi.h"
#else
-#ifdef __alpha
+#if defined(__alpha) && !defined(AFS_ALPHA_LINUX20_ENV)
#include "conf-bsd-alpha.h"
#else
#if defined(AFS_X86_ENV)
#ifdef AFS_S390_LINUX20_ENV
#include "conf-s390-linux.h"
#else
+#ifdef AFS_ALPHA_LINUX20_ENV
+#include "conf-alpha-linux.h"
+#else
#include "conf-i386-linux.h"
+#endif /* AFS_ALPHA_LINUX20_ENV */
#endif /* AFS_S390_LINUX20_ENV */
#endif /* AFS_SPARC64_LINUX20_ENV */
#endif /* AFS_SPARC_LINUX20_ENV */
--- /dev/null
+/*
+ * Copyright 1988 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
+ *
+ * Machine-type definitions: Alpha
+ */
+
+#include <mit-cpyright.h>
+
+#define ALPHA
+
+/* 'course this is a joke, but I am not going to rewrite this mess */
+#define BITS32
+
+#define BIG
+#define LSBFIRST
afs_int32 tlen)
{
char tbuffer[32]; /* need at least 26 bytes */
+ time_t passtime; /* modern systems have 64 bit time */
if (!time) strcpy (tstr, "no date");/* special case this */
else if (time == NEVERDATE) strcpy(tstr, "never");
else {
+ passtime = time;
strncpy(tstr,
- afs_ctime((time_t *)&time, tbuffer, sizeof(tbuffer)), tlen);
+ afs_ctime(&passtime, tbuffer, sizeof(tbuffer)), tlen);
tstr[strlen(tstr)-1] = '\0'; /* punt the newline character */
}
}
if (sscanf(nextc, "%s\t%d\n", lnames.namelist_val[i], &k) != 2)
return(-1);
(*acl)->entries[i].rights = k;
- nextc = (char *) (1 + index(nextc, '\n'));
+ nextc = (char *) (index(nextc, '\n'));
+ nextc ++; /* 1 + index can cast ptr to integer */
}
j=i;
for (i = (*acl)->total - 1; i >= (*acl)->total - (*acl)->negative; i--,j++) {
if (sscanf(nextc, "%s\t%d\n", lnames.namelist_val[j], &((*acl)->entries[j].rights)) != 2)
return(-1);
- nextc = (char *) (1 + index(nextc, '\n'));
+ nextc = (char *) (index(nextc, '\n'));
+ nextc ++;
}
lids.idlist_len = 0;
lids.idlist_val = 0;
-fno-strength-reduce -pipe -m486 -malign-loops=2 -malign-jumps=2 \
-malign-functions=2
DEFINES = -D__KERNEL__ -DCPU=586 -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
+<alpha_linux_22 alpha_linux_24>
+CCFLAGS = -O2 -fomit-frame-pointer -fno-strength-reduce -pipe -mno-fp-regs -ffixed-8
+DEFINES = -D__KERNEL__ -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
<s390_linux22 s390_linux24>
CCFLAGS = -O2 -fomit-frame-pointer -fno-strength-reduce \
-fno-strict-aliasing -fsigned-char
rm -f asm-generic; \
ln -s ${LINUX_SRCDIR}$$v/include/asm-generic asm-generic; \
rm -f asm; \
+<alpha_linux_22 alpha_linux_24>
+ ln -s ${LINUX_SRCDIR}$$v/include/asm-alpha asm ; \
<i386_linux22 i386_linux24>
ln -s ${LINUX_SRCDIR}$$v/include/asm-i386 asm ; \
<ppc_linux22 ppc_linux24>
#elif defined(AFS_SPARC64_LINUX20_ENV) && defined(AFS_32BIT_USR_ENV)
#define LWP_SP 0
#define LWP_FP 1
+#elif defined(AFS_ALPHA_LINUX20_ENV)
+#define LWP_SP 8
+#define LWP_FP 7
#else
#error Unsupported linux LWP system type.
#endif
typedef __uint64_t jmp_buf_type;
#endif
#else
+#ifdef AFS_ALPHA_LINUX20_ENV
+typedef long jmp_buf_type;
+#else
typedef int jmp_buf_type;
-#endif
+#endif /*AFS_ALPHA_LINUX20_ENV*/
+#endif /*SGI*/
static jmp_buf jmp_tmp;
static char (*EP)();
** pretty good that the next packet coming in is from the same connection
** as the last packet, since we're send multiple packets in a transmit window.
*/
-struct rx_connection *rxLastConn;
+struct rx_connection *rxLastConn = 0;
#ifdef RX_ENABLE_LOCKS
/* The locking hierarchy for rx fine grain locking is composed of five
{
struct clock thisRtt, *rttp = &thisRtt;
+#if defined(AFS_ALPHA_LINUX22_ENV) && defined(AFS_PTHREAD_ENV) && !defined(KERNEL)
+ /* making year 2038 bugs to get this running now - stroucki */
+ struct timeval temptime;
+#endif
register int rtt_timeout;
static char id[]="@(#)adaptive RTO";
- clock_GetTime(rttp);
+#if defined(AFS_ALPHA_LINUX20_ENV) && defined(AFS_PTHREAD_ENV) && !defined(KERNEL)
+ /* yet again. This was the worst Heisenbug of the port - stroucki */
+ clock_GetTime(&temptime);
+ rttp->sec=(afs_int32)temptime.tv_sec;
+ rttp->usec=(afs_int32)temptime.tv_usec;
+#else
+ clock_GetTime(rttp);
+#endif
if (clock_Lt(rttp, sentp)) {
clock_Zero(rttp);
return; /* somebody set the clock back, don't count this time. */
* version of _IOW() to check the size of user space arguments -- except
* on Digital Unix.
*/
-#if defined(KERNEL) && !defined(AFS_OSF_ENV)
+#if defined(KERNEL) && !defined(AFS_OSF_ENV) && !defined(AFS_ALPHA_LINUX20_ENV)
#define _VICEIOCTL(id) ((unsigned int ) _IOW('V', id, struct ViceIoctl32))
#else
#define _VICEIOCTL(id) ((unsigned int ) _IOW('V', id, struct ViceIoctl))
kdump.o: kdump.c ${INCLS} AFS_component_version_number.c
set -x; \
case ${SYS_NAME} in \
+ alpha_linux* ) \
+ for lv in ${LINUX_VERS}; do \
+ ${CC} -g -I${LINUX_SRCDIR}$$lv/include -I${DESTDIR}include -I${SRCDIR}include ${XCFLAGS} -mno-fp-regs -ffixed-8 -o kdump-$$lv.o -c kdump.c ; \
+ done ;; \
*linux* ) \
for lv in ${LINUX_VERS}; do \
${CC} -g -I${LINUX_SRCDIR}$$lv/include -I${DESTDIR}include -I${SRCDIR}include ${XCFLAGS} -o kdump-$$lv.o -c kdump.c ; \
#ifdef AFS_SPARC_LINUX20_ENV
#define _SPARC_STATFS_H
#else
+#ifdef AFS_ALPHA_LINUX20_ENV
+#define _ALPHA_STATFS_H
+#else
#define _I386_STATFS_H
+#endif /* AFS_ALPHA_LINUX20_ENV */
#endif /* AFS_SPARC_LINUX20_ENV */
#endif /* AFS_SPARC64_LINUX20_ENV */
#endif /* AFS_S390_LINUX20_ENV */
struct timezone {
int a,b;
};
+#ifndef AFS_ALPHA_LINUX20_ENV
typedef struct timeval {
int tv_sec;
int tv_usec;
} timeval_t; /* Needed here since KERNEL defined. */
+#endif /*AFS_ALPHA_LINUX20_ENV*/
#if defined(AFSBIG_ENDIAN)
#define _LINUX_BYTEORDER_BIG_ENDIAN_H
#else
u_short ncbs;
u_short firstcb;
u_short spare;
-#ifdef AFS_ALPHA_ENV
+#if defined(AFS_ALPHA_ENV) || defined(AFS_ALPHA_LINUX20_ENV)
u_short spare1;
u_short spare2;
#endif
assert(pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED) == 0);
/* Block signals in the threads */
AFS_SIGSET_CLEAR();
- assert(pthread_create(&serverPid, &tattr, FiveMinuteCheckLWP, &fiveminutes) == 0);
- assert(pthread_create(&serverPid, &tattr, HostCheckLWP, &fiveminutes) == 0);
+ assert(pthread_create(&serverPid, &tattr, (void *)FiveMinuteCheckLWP, &fiveminutes) == 0);
+ assert(pthread_create(&serverPid, &tattr, (void *)HostCheckLWP, &fiveminutes) == 0);
AFS_SIGSET_RESTORE();
#else /* AFS_PTHREAD_ENV */
assert(LWP_CreateProcess(FiveMinuteCheckLWP, stack*1024, LWP_MAX_PRIORITY - 2,