summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/arcdevice.h2
-rw-r--r--include/linux/atalk.h2
-rw-r--r--include/linux/awe_voice.h42
-rw-r--r--include/linux/cdrom.h3
-rw-r--r--include/linux/coda.h606
-rw-r--r--include/linux/coda_cache.h2
-rw-r--r--include/linux/coda_fs_i.h8
-rw-r--r--include/linux/coda_linux.h11
-rw-r--r--include/linux/coda_psdev.h65
-rw-r--r--include/linux/consolemap.h2
-rw-r--r--include/linux/cyclades.h1
-rw-r--r--include/linux/dcache.h12
-rw-r--r--include/linux/fb.h2
-rw-r--r--include/linux/file.h48
-rw-r--r--include/linux/fs.h50
-rw-r--r--include/linux/genhd.h67
-rw-r--r--include/linux/hdreg.h63
-rw-r--r--include/linux/hfs_fs_i.h3
-rw-r--r--include/linux/i2c.h22
-rw-r--r--include/linux/if_arp.h1
-rw-r--r--include/linux/if_ether.h2
-rw-r--r--include/linux/if_pppvar.h5
-rw-r--r--include/linux/inetdevice.h2
-rw-r--r--include/linux/interrupt.h5
-rw-r--r--include/linux/ip_masq.h15
-rw-r--r--include/linux/ipc.h5
-rw-r--r--include/linux/ipx.h1
-rw-r--r--include/linux/isdn.h11
-rw-r--r--include/linux/isicom.h302
-rw-r--r--include/linux/kernel.h8
-rw-r--r--include/linux/kmod.h8
-rw-r--r--include/linux/mm.h90
-rw-r--r--include/linux/module.h24
-rw-r--r--include/linux/msdos_fs_sb.h8
-rw-r--r--include/linux/nfs_fs.h2
-rw-r--r--include/linux/nfsd/nfsd.h11
-rw-r--r--include/linux/nls.h1
-rw-r--r--include/linux/ntfs_fs_i.h14
-rw-r--r--include/linux/pagemap.h2
-rw-r--r--include/linux/pc_keyb.h2
-rw-r--r--include/linux/pci.h18
-rw-r--r--include/linux/poll.h53
-rw-r--r--include/linux/ppp_defs.h3
-rw-r--r--include/linux/proc_fs.h31
-rw-r--r--include/linux/quota.h2
-rw-r--r--include/linux/scc.h5
-rw-r--r--include/linux/sched.h32
-rw-r--r--include/linux/sem.h1
-rw-r--r--include/linux/shm.h3
-rw-r--r--include/linux/smp.h17
-rw-r--r--include/linux/socket.h3
-rw-r--r--include/linux/sound.h10
-rw-r--r--include/linux/sunrpc/sched.h2
-rw-r--r--include/linux/sunrpc/stats.h16
-rw-r--r--include/linux/sunrpc/svc.h3
-rw-r--r--include/linux/sunrpc/xprt.h2
-rw-r--r--include/linux/swap.h23
-rw-r--r--include/linux/swapctl.h64
-rw-r--r--include/linux/sysctl.h41
-rw-r--r--include/linux/sysv_fs.h4
-rw-r--r--include/linux/tasks.h2
-rw-r--r--include/linux/timex.h3
-rw-r--r--include/linux/tty.h2
-rw-r--r--include/linux/ufs_fs.h4
-rw-r--r--include/linux/videodev.h20
-rw-r--r--include/linux/wavefront.h13
66 files changed, 1289 insertions, 618 deletions
diff --git a/include/linux/arcdevice.h b/include/linux/arcdevice.h
index 054c59f15..4c0f2e05d 100644
--- a/include/linux/arcdevice.h
+++ b/include/linux/arcdevice.h
@@ -192,7 +192,7 @@ extern int arcnet_debug;
-#define JIFFER(time) for (delayval=jiffies+time; jiffies<delayval;) ;
+#define JIFFER(time) for (delayval=jiffies+time; time_before(jiffies,delayval);) ;
/* a complete ARCnet packet */
union ArcPacket
diff --git a/include/linux/atalk.h b/include/linux/atalk.h
index 5641129d7..e9d209791 100644
--- a/include/linux/atalk.h
+++ b/include/linux/atalk.h
@@ -10,7 +10,7 @@
#define ATPORT_FIRST 1
#define ATPORT_RESERVED 128
-#define ATPORT_LAST 255
+#define ATPORT_LAST 254 /* 254 is only legal on localtalk */
#define ATADDR_ANYNET (__u16)0
#define ATADDR_ANYNODE (__u8)0
#define ATADDR_ANYPORT (__u8)0
diff --git a/include/linux/awe_voice.h b/include/linux/awe_voice.h
index aa1313131..95fc207da 100644
--- a/include/linux/awe_voice.h
+++ b/include/linux/awe_voice.h
@@ -2,10 +2,10 @@
* sound/awe_voice.h
*
* Voice information definitions for the low level driver for the
- * AWE32/Sound Blaster 32 wave table synth.
- * version 0.4.2c; Oct. 7, 1997
+ * AWE32/SB32/AWE64 wave table synth.
+ * version 0.4.3; Mar. 1, 1998
*
- * Copyright (C) 1996,1997 Takashi Iwai
+ * Copyright (C) 1996-1998 Takashi Iwai
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -55,6 +55,8 @@ typedef struct awe_patch_info {
#define AWE_UNLOAD_PATCH 4 /* none */
#define AWE_REPLACE_DATA 5 /* awe_sample_info (optarg=#channels)*/
#define AWE_MAP_PRESET 6 /* awe_voice_map */
+/*#define AWE_PROBE_INFO 7*/ /* awe_voice_map (pat only) */
+#define AWE_PROBE_DATA 8 /* optarg=sample */
#define AWE_LOAD_CHORUS_FX 0x10 /* awe_chorus_fx_rec (optarg=mode) */
#define AWE_LOAD_REVERB_FX 0x11 /* awe_reverb_fx_rec (optarg=mode) */
@@ -88,6 +90,7 @@ typedef struct _awe_open_parm {
#define AWE_PAT_TYPE_MAP 7
#define AWE_PAT_LOCKED 0x100 /* lock the samples */
+#define AWE_PAT_SHARED 0x200 /* sample is shared */
short reserved;
char name[AWE_PATCH_NAME_LEN];
@@ -126,6 +129,30 @@ typedef struct _awe_voice_parm {
unsigned short reserved[4]; /* not used */
} awe_voice_parm;
+typedef struct _awe_voice_parm_block {
+ unsigned short moddelay; /* modulation delay (0x8000) */
+ unsigned char modatk, modhld;
+ unsigned char moddcy, modsus;
+ unsigned short modrel, moddummy;
+ short modkeyhold, modkeydecay; /* envelope change per key (not used) */
+ unsigned short voldelay; /* volume delay (0x8000) */
+ unsigned char volatk, volhld;
+ unsigned char voldcy, volsus;
+ unsigned char volrel, voldummy;
+ short volkeyhold, volkeydecay; /* envelope change per key (not used) */
+ unsigned short lfo1delay; /* LFO1 delay (0x8000) */
+ unsigned short lfo2delay; /* LFO2 delay (0x8000) */
+ unsigned char env1fc, env1pit;
+ unsigned char lfo1fc, lfo1pit;
+ unsigned char lfo1freq, lfo1vol;
+ unsigned char lfo2freq, lfo2pit;
+ unsigned char cutoff; /* initial cutoff (0xff) */
+ unsigned char filterQ; /* initial filter Q [0-15] (0x0) */
+ unsigned char chorus; /* chorus send (0x00) */
+ unsigned char reverb; /* reverb send (0x00) */
+ unsigned short reserved[4]; /* not used */
+} awe_voice_parm_block;
+
#define AWE_VOICE_PARM_SIZE 48
@@ -419,7 +446,7 @@ enum {
/* 0*/ AWE_MD_EXCLUSIVE_OFF, /* obsolete */
/* 1*/ AWE_MD_EXCLUSIVE_ON, /* obsolete */
/* 2*/ AWE_MD_VERSION, /* read only */
-/* 3*/ AWE_MD_EXCLUSIVE_SOUND, /* ignored */
+/* 3*/ AWE_MD_EXCLUSIVE_SOUND, /* 0/1: exclusive note on (default=1) */
/* 4*/ AWE_MD_REALTIME_PAN, /* 0/1: do realtime pan change (default=1) */
/* 5*/ AWE_MD_GUS_BANK, /* bank number for GUS patches (default=0) */
/* 6*/ AWE_MD_KEEP_EFFECT, /* 0/1: keep effect values, (default=0) */
@@ -430,6 +457,13 @@ enum {
/*11*/ AWE_MD_DEF_BANK, /* integer: default bank number (def=0) */
/*12*/ AWE_MD_DEF_DRUM, /* integer: default drumset number (def=0) */
/*13*/ AWE_MD_TOGGLE_DRUM_BANK, /* 0/1: toggle drum flag with bank# (def=0) */
+/*14*/ AWE_MD_NEW_VOLUME_CALC, /* 0/1: volume calculation mode (def=1) */
+/*15*/ AWE_MD_CHORUS_MODE, /* integer: chorus mode (def=2) */
+/*16*/ AWE_MD_REVERB_MODE, /* integer: chorus mode (def=4) */
+/*17*/ AWE_MD_BASS_LEVEL, /* integer: bass level (def=5) */
+/*18*/ AWE_MD_TREBLE_LEVEL, /* integer: treble level (def=9) */
+/*19*/ AWE_MD_DEBUG_MODE, /* integer: debug level (def=0) */
+/*20*/ AWE_MD_PAN_EXCHANGE, /* 0/1: exchange panning direction (def=0) */
AWE_MD_END,
};
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h
index 9b8a9c3c6..c63d79037 100644
--- a/include/linux/cdrom.h
+++ b/include/linux/cdrom.h
@@ -5,8 +5,7 @@
* 1994, 1995 Eberhard Moenkeberg, emoenke@gwdg.de
* 1996 David van Leeuwen, david@tm.tno.nl
* 1997, 1998 Erik Andersen, andersee@debian.org
- * 1998 Jens Axboe, axboe@image.dk and
- * Chris Zwilling, chris@cloudnet.com
+ * 1998, 1999 Jens Axboe, axboe@image.dk
*/
#ifndef _LINUX_CDROM_H
diff --git a/include/linux/coda.h b/include/linux/coda.h
index 564b3933b..ac3301c8a 100644
--- a/include/linux/coda.h
+++ b/include/linux/coda.h
@@ -1,12 +1,63 @@
+/*
+ You may distribute this file under either of the two licenses that
+ follow at your discretion.
+*/
+
+/* BLURB lgpl
+
+ Coda File System
+ Release 5
+
+ Copyright (c) 1987-1999 Carnegie Mellon University
+ Additional copyrights listed below
+
+This code is distributed "AS IS" without warranty of any kind under
+the terms of the GNU Library General Public Licence Version 2, as
+shown in the file LICENSE, or under the license shown below. The
+technical and financial contributors to Coda are listed in the file
+CREDITS.
+
+ Additional copyrights
+*/
+
+/*
+
+ Coda: an Experimental Distributed File System
+ Release 4.0
+
+ Copyright (c) 1987-1999 Carnegie Mellon University
+ All Rights Reserved
+
+Permission to use, copy, modify and distribute this software and its
+documentation is hereby granted, provided that both the copyright
+notice and this permission notice appear in all copies of the
+software, derivative works or modified versions, and any portions
+thereof, and that both notices appear in supporting documentation, and
+that credit is given to Carnegie Mellon University in all documents
+and publicity pertaining to direct or indirect use of this code or its
+derivatives.
+
+CODA IS AN EXPERIMENTAL SOFTWARE SYSTEM AND IS KNOWN TO HAVE BUGS,
+SOME OF WHICH MAY HAVE SERIOUS CONSEQUENCES. CARNEGIE MELLON ALLOWS
+FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION. CARNEGIE MELLON
+DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER
+RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE OR OF
+ANY DERIVATIVE WORK.
+
+Carnegie Mellon encourages users of this software to return any
+improvements or extensions that they make, and to grant Carnegie
+Mellon the rights to redistribute these changes without encumbrance.
+*/
/*
*
* Based on cfs.h from Mach, but revamped for increased simplicity.
- * Linux modifications by Peter Braam, Aug 1996
+ * Linux modifications by
+ * Peter Braam, Aug 1996
*/
-#ifndef _CFS_HEADER_
-#define _CFS_HEADER_
+#ifndef _CODA_HEADER_
+#define _CODA_HEADER_
@@ -15,7 +66,11 @@
#include <sys/types.h>
#endif
-#ifdef DJGPP
+#ifndef CODA_MAXSYMLINKS
+#define CODA_MAXSYMLINKS 10
+#endif
+
+#if defined(DJGPP) || defined(__CYGWIN32__)
#ifdef KERNEL
typedef unsigned long u_long;
typedef unsigned int u_int;
@@ -23,7 +78,11 @@ typedef unsigned short u_short;
typedef u_long ino_t;
typedef u_long dev_t;
typedef void * caddr_t;
-typedef u_long u_quad_t;
+#ifdef DOS
+typedef unsigned __int64 u_quad_t;
+#else
+typedef unsigned long long u_quad_t;
+#endif
#define inline
@@ -34,12 +93,12 @@ struct timespec {
#else /* DJGPP but not KERNEL */
#include <sys/types.h>
#include <sys/time.h>
-typedef u_long u_quad_t;
+typedef unsigned long long u_quad_t;
#endif /* !KERNEL */
#endif /* !DJGPP */
-#if defined(__linux__) || defined(__CYGWIN32__)
+#if defined(__linux__)
#define cdev_t u_quad_t
#if !defined(_UQUAD_T_) && (!defined(__GLIBC__) || __GLIBC__ < 2)
#define _UQUAD_T_ 1
@@ -61,9 +120,9 @@ struct timespec {
/*
* Cfs constants
*/
-#define CFS_MAXNAMLEN 255
-#define CFS_MAXPATHLEN 1024
-#define CFS_MAXSYMLINK 10
+#define CODA_MAXNAMLEN 255
+#define CODA_MAXPATHLEN 1024
+#define CODA_MAXSYMLINK 10
/* these are Coda's version of O_RDONLY etc combinations
* to deal with VFS open modes
@@ -79,9 +138,9 @@ struct timespec {
#define C_M_WRITE 00200
/* for access Venus will use */
+#define C_A_C_OK 8 /* Test for writing upon create. */
#define C_A_R_OK 4 /* Test for read permission. */
#define C_A_W_OK 2 /* Test for write permission. */
-#define C_A_C_OK 8 /* Test for writing upon create. */
#define C_A_X_OK 1 /* Test for execute permission. */
#define C_A_F_OK 0 /* Test for existence. */
@@ -94,23 +153,23 @@ struct venus_dirent {
unsigned short d_reclen; /* length of this record */
char d_type; /* file type, see below */
char d_namlen; /* length of string in d_name */
- char d_name[CFS_MAXNAMLEN + 1];/* name must be no longer than this */
+ char d_name[CODA_MAXNAMLEN + 1];/* name must be no longer than this */
};
#undef DIRSIZ
-#define DIRSIZ(dp) ((sizeof (struct venus_dirent) - (CFS_MAXNAMLEN+1)) + \
+#define DIRSIZ(dp) ((sizeof (struct venus_dirent) - (CODA_MAXNAMLEN+1)) + \
(((dp)->d_namlen+1 + 3) &~ 3))
/*
* File types
*/
#define CDT_UNKNOWN 0
-#define CDT_FIFO 1
+#define CDT_FIFO 1
#define CDT_CHR 2
#define CDT_DIR 4
#define CDT_BLK 6
#define CDT_REG 8
#define CDT_LNK 10
-#define CDT_SOCK 12
+#define CDT_SOCK 12
#define CDT_WHT 14
/*
@@ -138,14 +197,27 @@ typedef struct ViceFid {
} ViceFid;
#endif /* VICEFID */
-static inline ino_t coda_f2i(struct ViceFid *fid)
+
+#ifdef __linux__
+static __inline__ ino_t coda_f2i(struct ViceFid *fid)
{
- if ( fid ) {
- return (fid->Unique + (fid->Vnode << 10) + (fid->Volume << 20));
- } else {
- return 0;
- }
+ if ( ! fid )
+ return 0;
+ if (fid->Vnode == 0xfffffffe || fid->Vnode == 0xffffffff)
+ return ((fid->Volume << 20) | (fid->Unique & 0xfffff));
+ else
+ return (fid->Unique + (fid->Vnode<<10) + (fid->Volume<<20));
}
+
+#else
+#define coda_f2i(fid)\
+ ((fid) ? ((fid)->Unique + ((fid)->Vnode<<10) + ((fid)->Volume<<20)) : 0)
+#endif
+
+
+#ifndef __BIT_TYPES_DEFINED__
+#define u_int32_t unsigned int
+#endif
#ifndef _VUID_T_
@@ -157,12 +229,12 @@ typedef u_int32_t vgid_t;
#ifndef _CODACRED_T_
#define _CODACRED_T_
struct coda_cred {
- vuid_t cr_uid, cr_euid, cr_suid, cr_fsuid; /* Real, efftve, set, fs uid*/
-#if defined(__NetBSD__) || defined(__FreeBSD__)
- vgid_t cr_groupid, cr_egid, cr_sgid, cr_fsgid; /* same for groups */
-#else
- vgid_t cr_gid, cr_egid, cr_sgid, cr_fsgid; /* same for groups */
-#endif
+ vuid_t cr_uid, cr_euid, cr_suid, cr_fsuid;
+ vgid_t cr_groupid, cr_egid, cr_sgid, cr_fsgid;
+#if defined(CODA_SUPPORTS_SUPPLEMENTARY_GROUPS)
+ int cr_nsupgps;
+ vgid_t cr_supgps[NGROUPS];
+#endif /* defined(CODA_SUPPORTS_SUPPLEMENTARY_GROUPS) */
};
#endif
@@ -174,7 +246,7 @@ struct coda_cred {
enum coda_vtype { C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD };
struct coda_vattr {
- enum coda_vtype va_type; /* vnode type (for create) */
+ int va_type; /* vnode type (for create) */
u_short va_mode; /* files access mode and type */
short va_nlink; /* number of references to file */
vuid_t va_uid; /* owner user id */
@@ -198,50 +270,59 @@ struct coda_vattr {
* Kernel <--> Venus communications.
*/
-#define CFS_ROOT ((u_long) 2)
-#define CFS_SYNC ((u_long) 3)
-#define CFS_OPEN ((u_long) 4)
-#define CFS_CLOSE ((u_long) 5)
-#define CFS_IOCTL ((u_long) 6)
-#define CFS_GETATTR ((u_long) 7)
-#define CFS_SETATTR ((u_long) 8)
-#define CFS_ACCESS ((u_long) 9)
-#define CFS_LOOKUP ((u_long) 10)
-#define CFS_CREATE ((u_long) 11)
-#define CFS_REMOVE ((u_long) 12)
-#define CFS_LINK ((u_long) 13)
-#define CFS_RENAME ((u_long) 14)
-#define CFS_MKDIR ((u_long) 15)
-#define CFS_RMDIR ((u_long) 16)
-#define CFS_READDIR ((u_long) 17)
-#define CFS_SYMLINK ((u_long) 18)
-#define CFS_READLINK ((u_long) 19)
-#define CFS_FSYNC ((u_long) 20)
-#define CFS_INACTIVE ((u_long) 21)
-#define CFS_VGET ((u_long) 22)
-#define CFS_SIGNAL ((u_long) 23)
-#define CFS_REPLACE ((u_long) 24)
-#define CFS_FLUSH ((u_long) 25)
-#define CFS_PURGEUSER ((u_long) 26)
-#define CFS_ZAPFILE ((u_long) 27)
-#define CFS_ZAPDIR ((u_long) 28)
-/* #define CFS_ZAPVNODE ((u_long) 29) obsolete */
-#define CFS_PURGEFID ((u_long) 30)
-#define CFS_OPEN_BY_PATH ((u_long) 31)
-#define CFS_NCALLS 32
-
-#define DOWNCALL(opcode) (opcode >= CFS_REPLACE && opcode <= CFS_PURGEFID)
+#define CODA_ROOT 2
+#define CODA_SYNC 3
+#define CODA_OPEN 4
+#define CODA_CLOSE 5
+#define CODA_IOCTL 6
+#define CODA_GETATTR 7
+#define CODA_SETATTR 8
+#define CODA_ACCESS 9
+#define CODA_LOOKUP 10
+#define CODA_CREATE 11
+#define CODA_REMOVE 12
+#define CODA_LINK 13
+#define CODA_RENAME 14
+#define CODA_MKDIR 15
+#define CODA_RMDIR 16
+#define CODA_READDIR 17
+#define CODA_SYMLINK 18
+#define CODA_READLINK 19
+#define CODA_FSYNC 20
+#define CODA_INACTIVE 21
+#define CODA_VGET 22
+#define CODA_SIGNAL 23
+#define CODA_REPLACE 24
+#define CODA_FLUSH 25
+#define CODA_PURGEUSER 26
+#define CODA_ZAPFILE 27
+#define CODA_ZAPDIR 28
+#define CODA_PURGEFID 30
+#define CODA_OPEN_BY_PATH 31
+#define CODA_RESOLVE 32
+#define CODA_REINTEGRATE 33
+#define CODA_NCALLS 34
+
+#define DOWNCALL(opcode) (opcode >= CODA_REPLACE && opcode <= CODA_PURGEFID)
#define VC_MAXDATASIZE 8192
#define VC_MAXMSGSIZE sizeof(union inputArgs)+sizeof(union outputArgs) +\
VC_MAXDATASIZE
-
+#define CIOC_KERNEL_VERSION _IOWR('c', 10, sizeof (int))
+#if 0
+ /* don't care about kernel version number */
+#define CODA_KERNEL_VERSION 0
+ /* The old venus 4.6 compatible interface */
+#define CODA_KERNEL_VERSION 1
+#endif
+ /* venus_lookup gets an extra parameter to aid windows.*/
+#define CODA_KERNEL_VERSION 2
/*
* Venus <-> Coda RPC arguments
*/
-struct cfs_in_hdr {
+struct coda_in_hdr {
unsigned long opcode;
unsigned long unique; /* Keep multiple outstanding msgs distinct */
u_short pid; /* Common to all */
@@ -251,53 +332,53 @@ struct cfs_in_hdr {
};
/* Really important that opcode and unique are 1st two fields! */
-struct cfs_out_hdr {
+struct coda_out_hdr {
unsigned long opcode;
unsigned long unique;
unsigned long result;
};
-/* cfs_root: NO_IN */
-struct cfs_root_out {
- struct cfs_out_hdr oh;
+/* coda_root: NO_IN */
+struct coda_root_out {
+ struct coda_out_hdr oh;
ViceFid VFid;
};
-struct cfs_root_in {
- struct cfs_in_hdr in;
+struct coda_root_in {
+ struct coda_in_hdr in;
};
-/* cfs_sync: */
-/* Nothing needed for cfs_sync */
+/* coda_sync: */
+/* Nothing needed for coda_sync */
-/* cfs_open: */
-struct cfs_open_in {
- struct cfs_in_hdr ih;
+/* coda_open: */
+struct coda_open_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
int flags;
};
-struct cfs_open_out {
- struct cfs_out_hdr oh;
+struct coda_open_out {
+ struct coda_out_hdr oh;
cdev_t dev;
ino_t inode;
};
-/* cfs_close: */
-struct cfs_close_in {
- struct cfs_in_hdr ih;
+/* coda_close: */
+struct coda_close_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
int flags;
};
-struct cfs_close_out {
- struct cfs_out_hdr out;
+struct coda_close_out {
+ struct coda_out_hdr out;
};
-/* cfs_ioctl: */
-struct cfs_ioctl_in {
- struct cfs_in_hdr ih;
+/* coda_ioctl: */
+struct coda_ioctl_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
int cmd;
int len;
@@ -305,64 +386,70 @@ struct cfs_ioctl_in {
char *data; /* Place holder for data. */
};
-struct cfs_ioctl_out {
- struct cfs_out_hdr oh;
+struct coda_ioctl_out {
+ struct coda_out_hdr oh;
int len;
caddr_t data; /* Place holder for data. */
};
-/* cfs_getattr: */
-struct cfs_getattr_in {
- struct cfs_in_hdr ih;
+/* coda_getattr: */
+struct coda_getattr_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
};
-struct cfs_getattr_out {
- struct cfs_out_hdr oh;
+struct coda_getattr_out {
+ struct coda_out_hdr oh;
struct coda_vattr attr;
};
-/* cfs_setattr: NO_OUT */
-struct cfs_setattr_in {
- struct cfs_in_hdr ih;
+/* coda_setattr: NO_OUT */
+struct coda_setattr_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
struct coda_vattr attr;
};
-struct cfs_setattr_out {
- struct cfs_out_hdr out;
+struct coda_setattr_out {
+ struct coda_out_hdr out;
};
-/* cfs_access: NO_OUT */
-struct cfs_access_in {
- struct cfs_in_hdr ih;
+/* coda_access: NO_OUT */
+struct coda_access_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
int flags;
};
-struct cfs_access_out {
- struct cfs_out_hdr out;
+struct coda_access_out {
+ struct coda_out_hdr out;
};
-/* cfs_lookup: */
-struct cfs_lookup_in {
- struct cfs_in_hdr ih;
+
+/* lookup flags */
+#define CLU_CASE_SENSITIVE 0x01
+#define CLU_CASE_INSENSITIVE 0x02
+
+/* coda_lookup: */
+struct coda_lookup_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
int name; /* Place holder for data. */
+ int flags;
};
-struct cfs_lookup_out {
- struct cfs_out_hdr oh;
+struct coda_lookup_out {
+ struct coda_out_hdr oh;
ViceFid VFid;
int vtype;
};
-/* cfs_create: */
-struct cfs_create_in {
- struct cfs_in_hdr ih;
+/* coda_create: */
+struct coda_create_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
struct coda_vattr attr;
int excl;
@@ -370,188 +457,188 @@ struct cfs_create_in {
int name; /* Place holder for data. */
};
-struct cfs_create_out {
- struct cfs_out_hdr oh;
+struct coda_create_out {
+ struct coda_out_hdr oh;
ViceFid VFid;
struct coda_vattr attr;
};
-/* cfs_remove: NO_OUT */
-struct cfs_remove_in {
- struct cfs_in_hdr ih;
+/* coda_remove: NO_OUT */
+struct coda_remove_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
int name; /* Place holder for data. */
};
-struct cfs_remove_out {
- struct cfs_out_hdr out;
+struct coda_remove_out {
+ struct coda_out_hdr out;
};
-/* cfs_link: NO_OUT */
-struct cfs_link_in {
- struct cfs_in_hdr ih;
+/* coda_link: NO_OUT */
+struct coda_link_in {
+ struct coda_in_hdr ih;
ViceFid sourceFid; /* cnode to link *to* */
ViceFid destFid; /* Directory in which to place link */
int tname; /* Place holder for data. */
};
-struct cfs_link_out {
- struct cfs_out_hdr out;
+struct coda_link_out {
+ struct coda_out_hdr out;
};
-/* cfs_rename: NO_OUT */
-struct cfs_rename_in {
- struct cfs_in_hdr ih;
+/* coda_rename: NO_OUT */
+struct coda_rename_in {
+ struct coda_in_hdr ih;
ViceFid sourceFid;
int srcname;
ViceFid destFid;
int destname;
};
-struct cfs_rename_out {
- struct cfs_out_hdr out;
+struct coda_rename_out {
+ struct coda_out_hdr out;
};
-/* cfs_mkdir: */
-struct cfs_mkdir_in {
- struct cfs_in_hdr ih;
+/* coda_mkdir: */
+struct coda_mkdir_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
struct coda_vattr attr;
int name; /* Place holder for data. */
};
-struct cfs_mkdir_out {
- struct cfs_out_hdr oh;
+struct coda_mkdir_out {
+ struct coda_out_hdr oh;
ViceFid VFid;
struct coda_vattr attr;
};
-/* cfs_rmdir: NO_OUT */
-struct cfs_rmdir_in {
- struct cfs_in_hdr ih;
+/* coda_rmdir: NO_OUT */
+struct coda_rmdir_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
int name; /* Place holder for data. */
};
-struct cfs_rmdir_out {
- struct cfs_out_hdr out;
+struct coda_rmdir_out {
+ struct coda_out_hdr out;
};
-/* cfs_readdir: */
-struct cfs_readdir_in {
- struct cfs_in_hdr ih;
+/* coda_readdir: */
+struct coda_readdir_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
int count;
int offset;
};
-struct cfs_readdir_out {
- struct cfs_out_hdr oh;
+struct coda_readdir_out {
+ struct coda_out_hdr oh;
int size;
caddr_t data; /* Place holder for data. */
};
-/* cfs_symlink: NO_OUT */
-struct cfs_symlink_in {
- struct cfs_in_hdr ih;
+/* coda_symlink: NO_OUT */
+struct coda_symlink_in {
+ struct coda_in_hdr ih;
ViceFid VFid; /* Directory to put symlink in */
int srcname;
struct coda_vattr attr;
int tname;
};
-struct cfs_symlink_out {
- struct cfs_out_hdr out;
+struct coda_symlink_out {
+ struct coda_out_hdr out;
};
-/* cfs_readlink: */
-struct cfs_readlink_in {
- struct cfs_in_hdr ih;
+/* coda_readlink: */
+struct coda_readlink_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
};
-struct cfs_readlink_out {
- struct cfs_out_hdr oh;
+struct coda_readlink_out {
+ struct coda_out_hdr oh;
int count;
caddr_t data; /* Place holder for data. */
};
-/* cfs_fsync: NO_OUT */
-struct cfs_fsync_in {
- struct cfs_in_hdr ih;
+/* coda_fsync: NO_OUT */
+struct coda_fsync_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
};
-struct cfs_fsync_out {
- struct cfs_out_hdr out;
+struct coda_fsync_out {
+ struct coda_out_hdr out;
};
-/* cfs_inactive: NO_OUT */
-struct cfs_inactive_in {
- struct cfs_in_hdr ih;
+/* coda_inactive: NO_OUT */
+struct coda_inactive_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
};
-/* cfs_vget: */
-struct cfs_vget_in {
- struct cfs_in_hdr ih;
+/* coda_vget: */
+struct coda_vget_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
};
-struct cfs_vget_out {
- struct cfs_out_hdr oh;
+struct coda_vget_out {
+ struct coda_out_hdr oh;
ViceFid VFid;
int vtype;
};
-/* CFS_SIGNAL is out-of-band, doesn't need data. */
-/* CFS_INVALIDATE is a venus->kernel call */
-/* CFS_FLUSH is a venus->kernel call */
+/* CODA_SIGNAL is out-of-band, doesn't need data. */
+/* CODA_INVALIDATE is a venus->kernel call */
+/* CODA_FLUSH is a venus->kernel call */
-/* cfs_purgeuser: */
-/* CFS_PURGEUSER is a venus->kernel call */
-struct cfs_purgeuser_out {
- struct cfs_out_hdr oh;
+/* coda_purgeuser: */
+/* CODA_PURGEUSER is a venus->kernel call */
+struct coda_purgeuser_out {
+ struct coda_out_hdr oh;
struct coda_cred cred;
};
-/* cfs_zapfile: */
-/* CFS_ZAPFILE is a venus->kernel call */
-struct cfs_zapfile_out {
- struct cfs_out_hdr oh;
+/* coda_zapfile: */
+/* CODA_ZAPFILE is a venus->kernel call */
+struct coda_zapfile_out {
+ struct coda_out_hdr oh;
ViceFid CodaFid;
};
-/* cfs_zapdir: */
-/* CFS_ZAPDIR is a venus->kernel call */
-struct cfs_zapdir_out {
- struct cfs_out_hdr oh;
+/* coda_zapdir: */
+/* CODA_ZAPDIR is a venus->kernel call */
+struct coda_zapdir_out {
+ struct coda_out_hdr oh;
ViceFid CodaFid;
};
-/* cfs_zapnode: */
-/* CFS_ZAPVNODE is a venus->kernel call */
-struct cfs_zapvnode_out {
- struct cfs_out_hdr oh;
+/* coda_zapnode: */
+/* CODA_ZAPVNODE is a venus->kernel call */
+struct coda_zapvnode_out {
+ struct coda_out_hdr oh;
struct coda_cred cred;
ViceFid VFid;
};
-/* cfs_purgefid: */
-/* CFS_PURGEFID is a venus->kernel call */
-struct cfs_purgefid_out {
- struct cfs_out_hdr oh;
+/* coda_purgefid: */
+/* CODA_PURGEFID is a venus->kernel call */
+struct coda_purgefid_out {
+ struct coda_out_hdr oh;
ViceFid CodaFid;
};
-/* cfs_rdwr: */
-struct cfs_rdwr_in {
- struct cfs_in_hdr ih;
+/* coda_rdwr: */
+struct coda_rdwr_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
int rwflag;
int count;
@@ -560,97 +647,97 @@ struct cfs_rdwr_in {
caddr_t data; /* Place holder for data. */
};
-struct cfs_rdwr_out {
- struct cfs_out_hdr oh;
+struct coda_rdwr_out {
+ struct coda_out_hdr oh;
int rwflag;
int count;
caddr_t data; /* Place holder for data. */
};
-/* cfs_replace: */
-/* CFS_REPLACE is a venus->kernel call */
-struct cfs_replace_out { /* cfs_replace is a venus->kernel call */
- struct cfs_out_hdr oh;
+/* coda_replace: */
+/* CODA_REPLACE is a venus->kernel call */
+struct coda_replace_out { /* coda_replace is a venus->kernel call */
+ struct coda_out_hdr oh;
ViceFid NewFid;
ViceFid OldFid;
};
-/* cfs_open_by_path: */
-struct cfs_open_by_path_in {
- struct cfs_in_hdr ih;
+/* coda_open_by_path: */
+struct coda_open_by_path_in {
+ struct coda_in_hdr ih;
ViceFid VFid;
int flags;
};
-struct cfs_open_by_path_out {
- struct cfs_out_hdr oh;
+struct coda_open_by_path_out {
+ struct coda_out_hdr oh;
int path;
};
/*
- * Occasionally, we don't cache the fid returned by CFS_LOOKUP.
+ * Occasionally, we don't cache the fid returned by CODA_LOOKUP.
* For instance, if the fid is inconsistent.
* This case is handled by setting the top bit of the type result parameter.
*/
-#define CFS_NOCACHE 0x80000000
+#define CODA_NOCACHE 0x80000000
union inputArgs {
- struct cfs_in_hdr ih; /* NB: every struct below begins with an ih */
- struct cfs_open_in cfs_open;
- struct cfs_close_in cfs_close;
- struct cfs_ioctl_in cfs_ioctl;
- struct cfs_getattr_in cfs_getattr;
- struct cfs_setattr_in cfs_setattr;
- struct cfs_access_in cfs_access;
- struct cfs_lookup_in cfs_lookup;
- struct cfs_create_in cfs_create;
- struct cfs_remove_in cfs_remove;
- struct cfs_link_in cfs_link;
- struct cfs_rename_in cfs_rename;
- struct cfs_mkdir_in cfs_mkdir;
- struct cfs_rmdir_in cfs_rmdir;
- struct cfs_readdir_in cfs_readdir;
- struct cfs_symlink_in cfs_symlink;
- struct cfs_readlink_in cfs_readlink;
- struct cfs_fsync_in cfs_fsync;
- struct cfs_inactive_in cfs_inactive;
- struct cfs_vget_in cfs_vget;
- struct cfs_rdwr_in cfs_rdwr;
- struct cfs_open_by_path_in cfs_open_by_path;
+ struct coda_in_hdr ih; /* NB: every struct below begins with an ih */
+ struct coda_open_in coda_open;
+ struct coda_close_in coda_close;
+ struct coda_ioctl_in coda_ioctl;
+ struct coda_getattr_in coda_getattr;
+ struct coda_setattr_in coda_setattr;
+ struct coda_access_in coda_access;
+ struct coda_lookup_in coda_lookup;
+ struct coda_create_in coda_create;
+ struct coda_remove_in coda_remove;
+ struct coda_link_in coda_link;
+ struct coda_rename_in coda_rename;
+ struct coda_mkdir_in coda_mkdir;
+ struct coda_rmdir_in coda_rmdir;
+ struct coda_readdir_in coda_readdir;
+ struct coda_symlink_in coda_symlink;
+ struct coda_readlink_in coda_readlink;
+ struct coda_fsync_in coda_fsync;
+ struct coda_inactive_in coda_inactive;
+ struct coda_vget_in coda_vget;
+ struct coda_rdwr_in coda_rdwr;
+ struct coda_open_by_path_in coda_open_by_path;
};
union outputArgs {
- struct cfs_out_hdr oh; /* NB: every struct below begins with an oh */
- struct cfs_root_out cfs_root;
- struct cfs_open_out cfs_open;
- struct cfs_ioctl_out cfs_ioctl;
- struct cfs_getattr_out cfs_getattr;
- struct cfs_lookup_out cfs_lookup;
- struct cfs_create_out cfs_create;
- struct cfs_mkdir_out cfs_mkdir;
- struct cfs_readdir_out cfs_readdir;
- struct cfs_readlink_out cfs_readlink;
- struct cfs_vget_out cfs_vget;
- struct cfs_purgeuser_out cfs_purgeuser;
- struct cfs_zapfile_out cfs_zapfile;
- struct cfs_zapdir_out cfs_zapdir;
- struct cfs_zapvnode_out cfs_zapvnode;
- struct cfs_purgefid_out cfs_purgefid;
- struct cfs_rdwr_out cfs_rdwr;
- struct cfs_replace_out cfs_replace;
- struct cfs_open_by_path_out cfs_open_by_path;
+ struct coda_out_hdr oh; /* NB: every struct below begins with an oh */
+ struct coda_root_out coda_root;
+ struct coda_open_out coda_open;
+ struct coda_ioctl_out coda_ioctl;
+ struct coda_getattr_out coda_getattr;
+ struct coda_lookup_out coda_lookup;
+ struct coda_create_out coda_create;
+ struct coda_mkdir_out coda_mkdir;
+ struct coda_readdir_out coda_readdir;
+ struct coda_readlink_out coda_readlink;
+ struct coda_vget_out coda_vget;
+ struct coda_purgeuser_out coda_purgeuser;
+ struct coda_zapfile_out coda_zapfile;
+ struct coda_zapdir_out coda_zapdir;
+ struct coda_zapvnode_out coda_zapvnode;
+ struct coda_purgefid_out coda_purgefid;
+ struct coda_rdwr_out coda_rdwr;
+ struct coda_replace_out coda_replace;
+ struct coda_open_by_path_out coda_open_by_path;
};
-union cfs_downcalls {
- /* CFS_INVALIDATE is a venus->kernel call */
- /* CFS_FLUSH is a venus->kernel call */
- struct cfs_purgeuser_out purgeuser;
- struct cfs_zapfile_out zapfile;
- struct cfs_zapdir_out zapdir;
- struct cfs_zapvnode_out zapvnode;
- struct cfs_purgefid_out purgefid;
- struct cfs_replace_out replace;
+union coda_downcalls {
+ /* CODA_INVALIDATE is a venus->kernel call */
+ /* CODA_FLUSH is a venus->kernel call */
+ struct coda_purgeuser_out purgeuser;
+ struct coda_zapfile_out zapfile;
+ struct coda_zapdir_out zapdir;
+ struct coda_zapvnode_out zapvnode;
+ struct coda_purgefid_out purgefid;
+ struct coda_replace_out replace;
};
@@ -665,14 +752,23 @@ struct ViceIoctl {
short out_size; /* Maximum size of output buffer, <= 2K */
};
+#if defined(__CYGWIN32__) || defined(DJGPP)
+struct PioctlData {
+ unsigned long cmd;
+ const char *path;
+ int follow;
+ struct ViceIoctl vi;
+};
+#else
struct PioctlData {
const char *path;
int follow;
struct ViceIoctl vi;
};
+#endif
-#define CFS_CONTROL ".CONTROL"
-#define CFS_CONTROLLEN 8
+#define CODA_CONTROL ".CONTROL"
+#define CODA_CONTROLLEN 8
#define CTL_VOL -1
#define CTL_VNO -1
#define CTL_UNI -1
diff --git a/include/linux/coda_cache.h b/include/linux/coda_cache.h
index fc607fdba..e549b02e7 100644
--- a/include/linux/coda_cache.h
+++ b/include/linux/coda_cache.h
@@ -30,7 +30,7 @@ int coda_cache_check(struct inode *inode, int mask);
/* for downcalls and attributes and lookups */
void coda_flag_inode(struct inode *inode, int flag);
-void coda_flag_alias_children(struct inode *inode, int flag);
+void coda_flag_inode_children(struct inode *inode, int flag);
/*
diff --git a/include/linux/coda_fs_i.h b/include/linux/coda_fs_i.h
index 83980b26e..baa136b97 100644
--- a/include/linux/coda_fs_i.h
+++ b/include/linux/coda_fs_i.h
@@ -33,12 +33,12 @@ struct coda_inode_info {
};
/* flags */
-#define C_VATTR 0x1 /* Validity of vattr in the cnode */
-#define C_SYMLINK 0x2 /* Validity of symlink pointer in the cnode */
-#define C_DYING 0x4 /* Set for outstanding cnodes from venus (which died) */
-#define C_PURGE 0x8
+#define C_VATTR 0x1 /* Validity of vattr in inode */
+#define C_PURGE 0x8
#define C_ZAPDIR 0x10
+#define C_DYING 0x4 /* from venus (which died) */
#define C_INITED 0x20
+#define C_FLUSH 0x2 /* used after a flush */
int coda_cnode_make(struct inode **, struct ViceFid *, struct super_block *);
int coda_cnode_makectl(struct inode **inode, struct super_block *sb);
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h
index 98407f73b..82ace8e27 100644
--- a/include/linux/coda_linux.h
+++ b/include/linux/coda_linux.h
@@ -46,6 +46,7 @@ extern int coda_access_cache;
/* this file: heloers */
static __inline__ struct ViceFid *coda_i2f(struct inode *);
char *coda_f2s(ViceFid *f);
+char *coda_f2s2(ViceFid *f);
int coda_isroot(struct inode *i);
int coda_fid_is_volroot(struct ViceFid *);
int coda_fid_is_weird(struct ViceFid *fid);
@@ -71,16 +72,20 @@ int coda_inode_grab(dev_t dev, ino_t ino, struct inode **ind);
#define NB_SFS_SIZ 0x895440
/* cache.c */
-void coda_purge_children(struct inode *);
+void coda_purge_children(struct inode *, int);
void coda_purge_dentries(struct inode *);
+/* sysctl.h */
+void coda_sysctl_init(void);
+void coda_sysctl_clean(void);
+
/* debugging masks */
#define D_SUPER 1 /* print results returned by Venus */
#define D_INODE 2 /* print entry and exit into procedure */
-#define D_FILE 4 /* print malloc, de-alloc information */
+#define D_FILE 4
#define D_CACHE 8 /* cache debugging */
-#define D_MALLOC 16
+#define D_MALLOC 16 /* print malloc, de-alloc information */
#define D_CNODE 32
#define D_UPCALL 64 /* up and downcall debugging */
#define D_PSDEV 128
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
index 7b827e8c3..2de8ff1ff 100644
--- a/include/linux/coda_psdev.h
+++ b/include/linux/coda_psdev.h
@@ -4,16 +4,8 @@
#define CODA_PSDEV_MAJOR 67
#define MAX_CODADEVS 5 /* how many do we allow */
-extern struct vcomm psdev_vcomm[];
-
-/* queue stuff; the rest is static to psdev.c */
-struct queue {
- struct queue *forw, *back;
-};
-void coda_q_insert(struct queue *el, struct queue *q);
-void coda_q_remove(struct queue *q);
-
-
+extern struct venus_comm coda_upc_comm;
+extern struct coda_sb_info coda_super_info;
#define CODA_SUPER_MAGIC 0x73757245
struct coda_sb_info
@@ -21,31 +13,23 @@ struct coda_sb_info
struct inode * sbi_psdev; /* /dev/cfs? Venus/kernel device */
struct inode * sbi_ctlcp; /* control magic file */
int sbi_refct;
- struct vcomm * sbi_vcomm;
+ struct venus_comm * sbi_vcomm;
struct inode * sbi_root;
+ struct super_block *sbi_sb;
struct list_head sbi_cchead;
struct list_head sbi_volroothead;
};
-/* communication pending/processing queues queues */
-struct vcomm {
+/* communication pending/processing queues */
+struct venus_comm {
u_long vc_seq;
struct wait_queue *vc_waitq; /* Venus wait queue */
- struct queue vc_pending;
- struct queue vc_processing;
- struct super_block *vc_sb;
+ struct list_head vc_pending;
+ struct list_head vc_processing;
int vc_inuse;
+ pid_t vc_pid; /* Venus pid */
};
-static inline int vcomm_open(struct vcomm *vcp)
-{
- return ((vcp)->vc_pending.forw != NULL);
-}
-
-static inline void mark_vcomm_closed(struct vcomm *vcp)
-{
- (vcp)->vc_pending.forw = NULL;
-}
static inline struct coda_sb_info *coda_sbp(struct super_block *sb)
{
@@ -67,7 +51,8 @@ int venus_setattr(struct super_block *, struct ViceFid *,
int venus_lookup(struct super_block *sb, struct ViceFid *fid,
const char *name, int length, int *type,
struct ViceFid *resfid);
-int venus_release(struct super_block *sb, struct ViceFid *fid, int flags);
+int venus_release(struct super_block *sb, struct ViceFid *fid, int flags,
+ struct coda_cred *);
int venus_open(struct super_block *sb, struct ViceFid *fid,
int flags, ino_t *ino, dev_t *dev);
int venus_mkdir(struct super_block *sb, struct ViceFid *dirfid,
@@ -100,18 +85,22 @@ int venus_fsync(struct super_block *sb, struct ViceFid *fid);
/* messages between coda filesystem in kernel and Venus */
extern int coda_hard;
extern unsigned long coda_timeout;
-struct vmsg {
- struct queue vm_chain;
- caddr_t vm_data;
- u_short vm_flags;
- u_short vm_inSize; /* Size is at most 5000 bytes */
- u_short vm_outSize;
- u_short vm_opcode; /* copied from data to save lookup */
- int vm_unique;
- struct wait_queue *vm_sleep; /* process' wait queue */
- unsigned long vm_posttime;
+struct upc_req {
+ struct list_head uc_chain;
+ caddr_t uc_data;
+ u_short uc_flags;
+ u_short uc_inSize; /* Size is at most 5000 bytes */
+ u_short uc_outSize;
+ u_short uc_opcode; /* copied from data to save lookup */
+ int uc_unique;
+ struct wait_queue *uc_sleep; /* process' wait queue */
+ unsigned long uc_posttime;
};
+#define REQ_ASYNC 0x1
+#define REQ_READ 0x2
+#define REQ_WRITE 0x4
+
/*
* Statistics
@@ -119,7 +108,7 @@ struct vmsg {
struct coda_upcallstats {
int ncalls; /* client requests */
int nbadcalls; /* upcall failures */
- int reqs[CFS_NCALLS]; /* count of each request */
+ int reqs[CODA_NCALLS]; /* count of each request */
} ;
extern struct coda_upcallstats coda_callstats;
@@ -127,7 +116,7 @@ extern struct coda_upcallstats coda_callstats;
static inline void clstats(int opcode)
{
coda_callstats.ncalls++;
- if ( (0 <= opcode) && (opcode <= CFS_NCALLS) )
+ if ( (0 <= opcode) && (opcode <= CODA_NCALLS) )
coda_callstats.reqs[opcode]++;
else
printk("clstats called with bad opcode %d\n", opcode);
diff --git a/include/linux/consolemap.h b/include/linux/consolemap.h
index fd0bcd43f..dee4b654c 100644
--- a/include/linux/consolemap.h
+++ b/include/linux/consolemap.h
@@ -11,5 +11,5 @@
struct vc_data;
extern unsigned char inverse_translate(struct vc_data *conp, int glyph);
-extern unsigned short *set_translate(int m);
+extern unsigned short *set_translate(int m,int currcons);
extern int conv_uni_to_pc(struct vc_data *conp, long ucs);
diff --git a/include/linux/cyclades.h b/include/linux/cyclades.h
index 41d57b959..6e67b5414 100644
--- a/include/linux/cyclades.h
+++ b/include/linux/cyclades.h
@@ -581,6 +581,7 @@ struct cyclades_port {
#define CyISA_Ywin 0x2000
#define CyPCI_Ywin 0x4000
+#define CyPCI_Yctl 0x80
#define CyPCI_Zctl CTRL_WINDOW_SIZE
#define CyPCI_Zwin 0x80000
#define CyPCI_Ze_win (2 * CyPCI_Zwin)
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 93b863695..ecf38fd06 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -42,7 +42,7 @@ static __inline__ unsigned long end_name_hash(unsigned long hash)
}
/* Compute the hash for a name string. */
-static __inline__ unsigned int full_name_hash(const char * name, unsigned int len)
+static __inline__ unsigned int full_name_hash(const unsigned char * name, unsigned int len)
{
unsigned long hash = init_name_hash();
while (len--)
@@ -150,10 +150,18 @@ extern struct dentry * d_alloc_root(struct inode * root_inode, struct dentry * o
extern int is_root_busy(struct dentry *);
/*
+ * This adds the entry to the hash queues.
+ */
+extern void d_rehash(struct dentry * entry);
+/*
* This adds the entry to the hash queues and initializes "d_inode".
* The entry was actually filled in earlier during "d_alloc()"
*/
-extern void d_add(struct dentry * entry, struct inode * inode);
+static __inline__ void d_add(struct dentry * entry, struct inode * inode)
+{
+ d_rehash(entry);
+ d_instantiate(entry, inode);
+}
/* used for rename() and baskets */
extern void d_move(struct dentry * entry, struct dentry * newdentry);
diff --git a/include/linux/fb.h b/include/linux/fb.h
index cb5618a56..f4c775db4 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -35,6 +35,8 @@
#define FB_AUX_TEXT_MDA 0 /* Monochrome text */
#define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */
#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */
+#define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */
+#define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */
#define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */
#define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */
diff --git a/include/linux/file.h b/include/linux/file.h
index 0884fad2f..05f388f08 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -6,7 +6,6 @@
#define __LINUX_FILE_H
extern void __fput(struct file *);
-extern void insert_file_free(struct file *file);
/*
* Check whether the specified task has the fd open. Since the task
@@ -50,34 +49,23 @@ extern inline void fd_install(unsigned int fd, struct file *file)
current->files->fd[fd] = file;
}
-/* It does not matter which list it is on. */
-extern inline void remove_filp(struct file *file)
-{
- if(file->f_next)
- file->f_next->f_pprev = file->f_pprev;
- *file->f_pprev = file->f_next;
-}
-
-extern inline void fput(struct file *file)
-{
- int count = file->f_count-1;
-
- if (!count) {
- locks_remove_flock(file);
- __fput(file);
- file->f_count = 0;
- remove_filp(file);
- insert_file_free(file);
- } else
- file->f_count = count;
-}
-
-extern inline void put_filp(struct file *file)
-{
- if(--file->f_count == 0) {
- remove_filp(file);
- insert_file_free(file);
- }
-}
+/*
+ * 23/12/1998 Marcin Dalecki <dalecki@cs.net.pl>:
+ *
+ * Since those functions where calling other functions, it was compleatly
+ * bogous to make them all "extern inline".
+ *
+ * The removal of this pseudo optimization saved me scandaleous:
+ *
+ * 3756 (i386 arch)
+ *
+ * precious bytes from my kernel, even without counting all the code compiled
+ * as module!
+ *
+ * I suspect there are many other similar "optimizations" across the
+ * kernel...
+ */
+extern void fput(struct file *file);
+extern void put_filp(struct file *file);
#endif
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 3a38d6f86..311409e8b 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -176,8 +176,6 @@ typedef char buffer_block[BLOCK_SIZE];
#define BH_Dirty 1 /* 1 if the buffer is dirty */
#define BH_Lock 2 /* 1 if the buffer is locked */
#define BH_Req 3 /* 0 if the buffer has been invalidated */
-#define BH_Touched 4 /* 1 if the buffer has been touched (aging) */
-#define BH_Has_aged 5 /* 1 if the buffer has been aged (aging) */
#define BH_Protected 6 /* 1 if the buffer is protected */
/*
@@ -210,8 +208,6 @@ struct buffer_head {
unsigned int b_list; /* List that this buffer appears */
unsigned long b_flushtime; /* Time when this (dirty) buffer
* should be written */
- unsigned long b_lru_time; /* Time when this buffer was
- * last used. */
struct wait_queue * b_wait;
struct buffer_head ** b_pprev; /* doubly linked list of hash-queue */
struct buffer_head * b_prev_free; /* doubly linked list of buffers */
@@ -248,21 +244,24 @@ static inline int buffer_req(struct buffer_head * bh)
return test_bit(BH_Req, &bh->b_state);
}
-static inline int buffer_touched(struct buffer_head * bh)
-{
- return test_bit(BH_Touched, &bh->b_state);
-}
-
-static inline int buffer_has_aged(struct buffer_head * bh)
-{
- return test_bit(BH_Has_aged, &bh->b_state);
-}
-
static inline int buffer_protected(struct buffer_head * bh)
{
return test_bit(BH_Protected, &bh->b_state);
}
+/*
+ * Deprecated - we don't keep per-buffer reference flags
+ * any more.
+ *
+ * We _could_ try to update the page reference, but that
+ * doesn't seem to really be worth it either. If we did,
+ * it would look something like this:
+ *
+ * #define buffer_page(bh) (mem_map + MAP_NR((bh)->b_data))
+ * #define touch_buffer(bh) set_bit(PG_referenced, &buffer_page(bh)->flags)
+ */
+#define touch_buffer(bh) do { } while (0)
+
#include <linux/pipe_fs_i.h>
#include <linux/minix_fs_i.h>
#include <linux/ext2_fs_i.h>
@@ -423,7 +422,7 @@ struct file {
struct file_operations *f_op;
mode_t f_mode;
loff_t f_pos;
- unsigned short f_count, f_flags;
+ unsigned int f_count, f_flags;
unsigned long f_reada, f_ramax, f_raend, f_ralen, f_rawin;
struct fown_struct f_owner;
@@ -472,7 +471,7 @@ struct file_lock {
} fl_u;
};
-extern struct file_lock *file_lock_table;
+extern struct file_lock *file_lock_table;
#include <linux/fcntl.h>
@@ -564,6 +563,13 @@ struct super_block {
};
/*
+ * VFS helper functions..
+ */
+extern int vfs_rmdir(struct inode *, struct dentry *);
+extern int vfs_unlink(struct inode *, struct dentry *);
+extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
+
+/*
* This is the "filldir" function type, used by readdir() to let
* the kernel specify what kind of dirent layout it wants to have.
* This allows the kernel to read directories into kernel space or
@@ -693,7 +699,8 @@ extern int close_fp(struct file *, fl_owner_t id);
extern struct file *filp_open(const char *, int, int);
extern char * getname(const char * filename);
-extern void putname(char * name);
+#define __getname() ((char *) __get_free_page(GFP_KERNEL))
+#define putname(name) free_page((unsigned long)(name))
extern void kill_fasync(struct fasync_struct *fa, int sig);
extern int register_blkdev(unsigned int, const char *, struct file_operations *);
@@ -703,11 +710,16 @@ extern int blkdev_release (struct inode * inode);
extern struct file_operations def_blk_fops;
extern struct inode_operations blkdev_inode_operations;
+/* fs/devices.c */
extern int register_chrdev(unsigned int, const char *, struct file_operations *);
extern int unregister_chrdev(unsigned int major, const char * name);
extern int chrdev_open(struct inode * inode, struct file * filp);
extern struct file_operations def_chr_fops;
extern struct inode_operations chrdev_inode_operations;
+extern char * bdevname(kdev_t dev);
+extern char * cdevname(kdev_t dev);
+extern char * kdevname(kdev_t dev);
+
extern void init_fifo(struct inode * inode);
extern struct inode_operations fifo_inode_operations;
@@ -733,7 +745,7 @@ extern struct file *inuse_filps;
extern void refile_buffer(struct buffer_head * buf);
extern void set_writetime(struct buffer_head * buf, int flag);
-extern int try_to_free_buffer(struct buffer_head*, struct buffer_head**, int);
+extern int try_to_free_buffers(struct page *);
extern int nr_buffers;
extern int buffermem;
@@ -816,8 +828,6 @@ extern struct buffer_head * get_hash_table(kdev_t, int, int);
extern struct buffer_head * getblk(kdev_t, int, int);
extern struct buffer_head * find_buffer(kdev_t dev, int block, int size);
extern void ll_rw_block(int, int, struct buffer_head * bh[]);
-extern void ll_rw_page(int, kdev_t, unsigned long, char *);
-extern void ll_rw_swap_file(int, kdev_t, unsigned int *, int, char *);
extern int is_read_only(kdev_t);
extern void __brelse(struct buffer_head *);
extern inline void brelse(struct buffer_head *buf)
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index fe89b7e7a..20589194f 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -108,12 +108,21 @@ struct solaris_x86_vtoc {
#ifdef CONFIG_BSD_DISKLABEL
/*
* BSD disklabel support by Yossi Gottlieb <yogo@math.tau.ac.il>
+ * updated by Marc Espie <Marc.Espie@openbsd.org>
*/
+#define FREEBSD_PARTITION 0xa5 /* FreeBSD Partition ID */
+#define OPENBSD_PARTITION 0xa6 /* OpenBSD Partition ID */
+#define NETBSD_PARTITION 0xa9 /* NetBSD Partition ID */
+#define BSDI_PARTITION 0xb7 /* BSDI Partition ID */
-#define BSD_PARTITION 0xa5 /* Partition ID */
+/* Ours is not to wonder why.. */
+#define BSD_PARTITION FREEBSD_PARTITION
+
+/* check against BSD src/sys/sys/disklabel.h for consistency */
#define BSD_DISKMAGIC (0x82564557UL) /* The disk magic number */
#define BSD_MAXPARTITIONS 8
+#define OPENBSD_MAXPARTITIONS 16
#define BSD_FS_UNUSED 0 /* disklabel unused partition entry ID */
struct bsd_disklabel {
__u32 d_magic; /* the magic number */
@@ -160,6 +169,62 @@ struct bsd_disklabel {
#endif /* CONFIG_BSD_DISKLABEL */
+#ifdef CONFIG_UNIXWARE_DISKLABEL
+/*
+ * Unixware slices support by Andrzej Krzysztofowicz <ankry@mif.pg.gda.pl>
+ * and Krzysztof G. Baranowski <kgb@knm.org.pl>
+ */
+
+#define UNIXWARE_PARTITION 0x63 /* Partition ID, same as */
+ /* GNU_HURD and SCO Unix */
+#define UNIXWARE_DISKMAGIC (0xCA5E600DUL) /* The disk magic number */
+#define UNIXWARE_DISKMAGIC2 (0x600DDEEEUL) /* The slice table magic nr */
+#define UNIXWARE_NUMSLICE 16
+#define UNIXWARE_FS_UNUSED 0 /* Unused slice entry ID */
+
+struct unixware_slice {
+ __u16 s_label; /* label */
+ __u16 s_flags; /* permission flags */
+ __u32 start_sect; /* starting sector */
+ __u32 nr_sects; /* number of sectors in slice */
+};
+
+struct unixware_disklabel {
+ __u32 d_type; /* drive type */
+ __u32 d_magic; /* the magic number */
+ __u32 d_version; /* version number */
+ char d_serial[12]; /* serial number of the device */
+ __u32 d_ncylinders; /* # of data cylinders per device */
+ __u32 d_ntracks; /* # of tracks per cylinder */
+ __u32 d_nsectors; /* # of data sectors per track */
+ __u32 d_secsize; /* # of bytes per sector */
+ __u32 d_part_start; /* # of first sector of this partition */
+ __u32 d_unknown1[12]; /* ? */
+ __u32 d_alt_tbl; /* byte offset of alternate table */
+ __u32 d_alt_len; /* byte length of alternate table */
+ __u32 d_phys_cyl; /* # of physical cylinders per device */
+ __u32 d_phys_trk; /* # of physical tracks per cylinder */
+ __u32 d_phys_sec; /* # of physical sectors per track */
+ __u32 d_phys_bytes; /* # of physical bytes per sector */
+ __u32 d_unknown2; /* ? */
+ __u32 d_unknown3; /* ? */
+ __u32 d_pad[8]; /* pad */
+
+ struct unixware_vtoc {
+ __u32 v_magic; /* the magic number */
+ __u32 v_version; /* version number */
+ char v_name[8]; /* volume name */
+ __u16 v_nslices; /* # of slices */
+ __u16 v_unknown1; /* ? */
+ __u32 v_reserved[10]; /* reserved */
+ struct unixware_slice
+ v_slice[UNIXWARE_NUMSLICE]; /* slice headers */
+ } vtoc;
+
+}; /* 408 */
+
+#endif /* CONFIG_UNIXWARE_DISKLABEL */
+
extern struct gendisk *gendisk_head; /* linked list of disks */
/*
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h
index 79d657a0d..e467ae9b6 100644
--- a/include/linux/hdreg.h
+++ b/include/linux/hdreg.h
@@ -52,6 +52,13 @@
#define WIN_SETIDLE1 0xE3
#define WIN_SETIDLE2 0x97
+#define WIN_STANDBYNOW1 0xE0
+#define WIN_STANDBYNOW2 0x94
+#define WIN_SLEEPNOW1 0xE6
+#define WIN_SLEEPNOW2 0x99
+#define WIN_CHECKPOWERMODE1 0xE5
+#define WIN_CHECKPOWERMODE2 0x98
+
#define WIN_DOORLOCK 0xde /* lock door on removable drives */
#define WIN_DOORUNLOCK 0xdf /* unlock door on removable drives */
@@ -59,6 +66,7 @@
#define WIN_MULTWRITE 0xC5 /* write sectors using multiple mode */
#define WIN_SETMULT 0xC6 /* enable/disable multiple mode */
#define WIN_IDENTIFY 0xEC /* ask drive to identify itself */
+#define WIN_IDENTIFY_DMA 0xEE /* same as WIN_IDENTIFY, but DMA */
#define WIN_SETFEATURES 0xEF /* set special drive features */
#define WIN_READDMA 0xc8 /* read sectors using DMA transfers */
#define WIN_WRITEDMA 0xca /* write sectors using DMA transfers */
@@ -85,6 +93,14 @@
#define SMART_STATUS 0xda
#define SMART_AUTO_OFFLINE 0xdb
+/* WIN_SECURITY sub-commands */
+#define SECURITY_SET_PASSWORD 0xBA /* 0xF1 */
+#define SECURITY_UNLOCK 0xBB /* 0xF2 */
+#define SECURITY_ERASE_PREPARE 0xBC /* 0xF3 */
+#define SECURITY_ERASE_UNIT 0xBD /* 0xF4 */
+#define SECURITY_FREEZE_LOCK 0xBE /* 0xF5 */
+#define SECURITY_DISABLE_PASSWORD 0xBF /* 0xF6 */
+
/* Bits for HD_ERROR */
#define MARK_ERR 0x01 /* Bad address mark */
#define TRK0_ERR 0x02 /* couldn't find track 0 */
@@ -125,6 +141,7 @@ struct hd_geometry {
#define HDIO_SET_PIO_MODE 0x0327 /* reconfig interface to new speed */
#define HDIO_SCAN_HWIF 0x0328 /* register and (re)scan interface */
#define HDIO_SET_NICE 0x0329 /* set nice flags */
+#define HDIO_UNREGISTER_HWIF 0x032a /* unregister interface */
/* structure returned by HDIO_GET_IDENTITY, as per ANSI ATA2 rev.2f spec */
struct hd_driveid {
@@ -184,14 +201,54 @@ struct hd_driveid {
unsigned short word79;
unsigned short word80;
unsigned short word81;
- unsigned short word82;
- unsigned short word83;
+ unsigned short command_sets; /* bits 0:Smart 1:Security 2:Removable 3:PM */
+ unsigned short word83; /* bits 14:Smart Enabled 13:0 zero */
unsigned short word84;
unsigned short word85;
unsigned short word86;
unsigned short word87;
unsigned short dma_ultra;
- unsigned short reserved[167];
+ unsigned short word89; /* reserved (word 89) */
+ unsigned short word90; /* reserved (word 90) */
+ unsigned short word91; /* reserved (word 91) */
+ unsigned short word92; /* reserved (word 92) */
+ unsigned short word93; /* reserved (word 93) */
+ unsigned short word94; /* reserved (word 94) */
+ unsigned short word95; /* reserved (word 95) */
+ unsigned short word96; /* reserved (word 96) */
+ unsigned short word97; /* reserved (word 97) */
+ unsigned short word98; /* reserved (word 98) */
+ unsigned short word99; /* reserved (word 99) */
+ unsigned short word100; /* reserved (word 100) */
+ unsigned short word101; /* reserved (word 101) */
+ unsigned short word102; /* reserved (word 102) */
+ unsigned short word103; /* reserved (word 103) */
+ unsigned short word104; /* reserved (word 104) */
+ unsigned short word105; /* reserved (word 105) */
+ unsigned short word106; /* reserved (word 106) */
+ unsigned short word107; /* reserved (word 107) */
+ unsigned short word108; /* reserved (word 108) */
+ unsigned short word109; /* reserved (word 109) */
+ unsigned short word110; /* reserved (word 110) */
+ unsigned short word111; /* reserved (word 111) */
+ unsigned short word112; /* reserved (word 112) */
+ unsigned short word113; /* reserved (word 113) */
+ unsigned short word114; /* reserved (word 114) */
+ unsigned short word115; /* reserved (word 115) */
+ unsigned short word116; /* reserved (word 116) */
+ unsigned short word117; /* reserved (word 117) */
+ unsigned short word118; /* reserved (word 118) */
+ unsigned short word119; /* reserved (word 119) */
+ unsigned short word120; /* reserved (word 120) */
+ unsigned short word121; /* reserved (word 121) */
+ unsigned short word122; /* reserved (word 122) */
+ unsigned short word123; /* reserved (word 123) */
+ unsigned short word124; /* reserved (word 124) */
+ unsigned short word125; /* reserved (word 125) */
+ unsigned short word126; /* reserved (word 126) */
+ unsigned short word127; /* reserved (word 127) */
+ unsigned short security; /* bits 0:support 1:enabled 2:locked 3:frozen */
+ unsigned short reserved[127];
};
/*
diff --git a/include/linux/hfs_fs_i.h b/include/linux/hfs_fs_i.h
index 453896882..03585a086 100644
--- a/include/linux/hfs_fs_i.h
+++ b/include/linux/hfs_fs_i.h
@@ -33,6 +33,9 @@ struct hfs_inode_info {
const struct hfs_hdr_layout *default_layout;
struct hfs_hdr_layout *layout;
+ /* to deal with localtime ugliness */
+ int tz_secondswest;
+
/* for dentry cleanup */
void (*d_drop_op)(struct dentry *, const ino_t);
};
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 44c09570d..129e1ed58 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -6,7 +6,7 @@
* There are:
*
* i2c the basic control module (like scsi_mod)
- * bus driver a driver with a i2c bus (host adapter driver)
+ * bus driver a driver with a i2c bus (hostadapter driver)
* chip driver a driver for a chip connected
* to a i2c bus (cdrom/hd driver)
*
@@ -87,8 +87,21 @@ struct i2c_driver
/* needed: unsigned long flags */
-#define LOCK_I2C_BUS(bus) spin_lock_irqsave(&(bus->bus_lock),flags);
-#define UNLOCK_I2C_BUS(bus) spin_unlock_irqrestore(&(bus->bus_lock),flags);
+#if LINUX_VERSION_CODE >= 0x020100
+# if 0
+# define LOCK_FLAGS unsigned long flags;
+# define LOCK_I2C_BUS(bus) spin_lock_irqsave(&(bus->bus_lock),flags);
+# define UNLOCK_I2C_BUS(bus) spin_unlock_irqrestore(&(bus->bus_lock),flags);
+# else
+# define LOCK_FLAGS
+# define LOCK_I2C_BUS(bus) spin_lock(&(bus->bus_lock));
+# define UNLOCK_I2C_BUS(bus) spin_unlock(&(bus->bus_lock));
+# endif
+#else
+# define LOCK_FLAGS unsigned long flags;
+# define LOCK_I2C_BUS(bus) { save_flags(flags); cli(); }
+# define UNLOCK_I2C_BUS(bus) { restore_flags(flags); }
+#endif
struct i2c_bus
{
@@ -96,7 +109,9 @@ struct i2c_bus
int id;
void *data; /* free for use by the bus driver */
+#if LINUX_VERSION_CODE >= 0x020100
spinlock_t bus_lock;
+#endif
/* attach/detach inform callbacks */
void (*attach_inform)(struct i2c_bus *bus, int id);
@@ -163,4 +178,5 @@ int i2c_read(struct i2c_bus *bus, unsigned char addr);
int i2c_write(struct i2c_bus *bus, unsigned char addr,
unsigned char b1, unsigned char b2, int both);
+int i2c_init(void);
#endif /* I2C_H */
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index 31bab91a4..30d8b8f0a 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -65,6 +65,7 @@
#define ARPHRD_HIPPI 780 /* High Performance Parallel Interface */
#define ARPHRD_ASH 781 /* Nexus 64Mbps Ash */
#define ARPHRD_ECONET 782 /* Acorn Econet */
+#define ARPHRD_IRDA 783 /* Linux/IR */
/* ARP protocol opcodes. */
#define ARPOP_REQUEST 1 /* ARP request */
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index 68213c539..3fae9a9de 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -73,6 +73,8 @@
#define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/
#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */
#define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */
+#define ETH_P_CONTROL 0x0016 /* Card specific control frames */
+#define ETH_P_IRDA 0x0017 /* Linux/IR */
/*
* This is an Ethernet frame header.
diff --git a/include/linux/if_pppvar.h b/include/linux/if_pppvar.h
index a85b33cd1..6fae4b94b 100644
--- a/include/linux/if_pppvar.h
+++ b/include/linux/if_pppvar.h
@@ -42,7 +42,7 @@
*/
/*
- * ==FILEVERSION 981004==
+ * ==FILEVERSION 990114==
*
* NOTE TO MAINTAINERS:
* If you modify this file at all, please set the above date.
@@ -61,7 +61,8 @@
#define NP_IP 0 /* Internet Protocol */
#define NP_IPX 1 /* IPX protocol */
#define NP_AT 2 /* Appletalk protocol */
-#define NUM_NP 3 /* Number of NPs. */
+#define NP_IPV6 3 /* Internet Protocol */
+#define NUM_NP 4 /* Number of NPs. */
#define OBUFSIZE 256 /* # chars of output buffering */
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index f4662fc3d..25c449598 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -76,8 +76,6 @@ extern struct in_device *inetdev_init(struct device *dev);
extern struct in_device *inetdev_by_index(int);
extern u32 inet_select_addr(struct device *dev, u32 dst, int scope);
extern struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, u32 prefix, u32 mask);
-extern int inet_add_bootp_addr(struct device *dev);
-extern void inet_del_bootp_addr(struct device *dev);
extern void inet_forward_change(void);
extern __inline__ int inet_ifa_match(u32 addr, struct in_ifaddr *ifa)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 925e70d20..aa157d4a5 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -17,7 +17,7 @@ struct irqaction {
extern volatile unsigned char bh_running;
-extern int bh_mask_count[32];
+extern atomic_t bh_mask_count[32];
extern unsigned long bh_active;
extern unsigned long bh_mask;
extern void (*bh_base[32])(void);
@@ -43,7 +43,8 @@ enum {
CYCLADES_BH,
CM206_BH,
JS_BH,
- MACSERIAL_BH
+ MACSERIAL_BH,
+ ISICOM_BH
};
#include <asm/hardirq.h>
diff --git a/include/linux/ip_masq.h b/include/linux/ip_masq.h
index ac7ca606e..ba8931383 100644
--- a/include/linux/ip_masq.h
+++ b/include/linux/ip_masq.h
@@ -1,6 +1,6 @@
/*
* IP_MASQ user space control interface
- * $Id: ip_masq.h,v 1.1 1998/08/29 23:50:56 davem Exp $
+ * $Id: ip_masq.h,v 1.2 1998/12/08 05:41:48 davem Exp $
*/
#ifndef _LINUX_IP_MASQ_H
@@ -90,16 +90,19 @@ struct ip_portfw_user {
};
/*
- * MARKFW stuff
+ * MFW stuff
*/
-struct ip_markfw_user {
+struct ip_mfw_user {
u_int32_t fwmark; /* Firewalling mark */
u_int32_t raddr; /* remote port */
u_int16_t rport; /* remote port */
u_int16_t dummy; /* Make up to multiple of 4 */
int pref; /* Preference value */
+ unsigned flags; /* misc flags */
};
+#define IP_MASQ_MFW_SCHED 0x01
+
#define IP_FW_MASQCTL_MAX 256
#define IP_MASQ_TNAME_MAX 32
@@ -110,7 +113,7 @@ struct ip_masq_ctl {
union {
struct ip_portfw_user portfw_user;
struct ip_autofw_user autofw_user;
- struct ip_markfw_user markfw_user;
+ struct ip_mfw_user mfw_user;
struct ip_masq_user user;
unsigned char m_raw[IP_FW_MASQCTL_MAX];
} u;
@@ -123,14 +126,14 @@ struct ip_masq_ctl {
#define IP_MASQ_TARGET_USER 3
#define IP_MASQ_TARGET_LAST 4
-#define IP_MASQ_CMD_NONE 0
+#define IP_MASQ_CMD_NONE 0 /* just peek */
#define IP_MASQ_CMD_INSERT 1
#define IP_MASQ_CMD_ADD 2
#define IP_MASQ_CMD_SET 3
#define IP_MASQ_CMD_DEL 4
#define IP_MASQ_CMD_GET 5
#define IP_MASQ_CMD_FLUSH 6
-#define IP_MASQ_CMD_LIST 7
+#define IP_MASQ_CMD_LIST 7 /* actually fake: done via /proc */
#define IP_MASQ_CMD_ENABLE 8
#define IP_MASQ_CMD_DISABLE 9
diff --git a/include/linux/ipc.h b/include/linux/ipc.h
index 10840cab1..c1d9cbaf1 100644
--- a/include/linux/ipc.h
+++ b/include/linux/ipc.h
@@ -21,6 +21,11 @@ struct ipc_perm
#define IPC_EXCL 00002000 /* fail if key exists */
#define IPC_NOWAIT 00004000 /* return error on wait */
+/* these fields are used by the DIPC package so the kernel as standard
+ should avoid using them if possible */
+
+#define IPC_DIPC 00010000 /* make it distributed */
+#define IPC_OWN 00020000 /* this machine is the DIPC owner */
/*
* Control commands used with semctl, msgctl and shmctl
diff --git a/include/linux/ipx.h b/include/linux/ipx.h
index c6846779b..8b9d6bb12 100644
--- a/include/linux/ipx.h
+++ b/include/linux/ipx.h
@@ -76,6 +76,7 @@ struct ipx_route_def
#define SIOCAIPXITFCRT (SIOCPROTOPRIVATE)
#define SIOCAIPXPRISLT (SIOCPROTOPRIVATE+1)
#define SIOCIPXCFGDATA (SIOCPROTOPRIVATE+2)
+#define SIOCIPXNCPCONN (SIOCPROTOPRIVATE+3)
#ifdef __KERNEL__
#include <linux/skbuff.h>
diff --git a/include/linux/isdn.h b/include/linux/isdn.h
index e061cabaa..0b61899c0 100644
--- a/include/linux/isdn.h
+++ b/include/linux/isdn.h
@@ -1,9 +1,3 @@
-/* Changes for X.25 support:
- Added ISDN_NET_ENCAP_X25IFACE macro.
- Additional field in isdn_net_dev_s and isdn_net_local to support
- generic encapsulation protocols.
-*/
-
/* $Id: isdn.h,v 1.37 1998/02/22 19:45:24 fritz Exp $
*
* Main header for the Linux ISDN subsystem (linklevel).
@@ -26,6 +20,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
+ * Note: This file differs from the corresponding revision as present in the
+ * isdn4linux CVS repository because some later bug fixes have been extracted
+ * from the repository and merged into this file. -- Henner Eisen
+ *
* $Log: isdn.h,v $
* Revision 1.37 1998/02/22 19:45:24 fritz
* Some changes regarding V.110
@@ -800,6 +798,7 @@ typedef struct isdn_devt {
int v110emu[ISDN_MAX_CHANNELS];/* V.110 emulator-mode 0=none */
atomic_t v110use[ISDN_MAX_CHANNELS];/* Usage-Semaphore for stream */
isdn_v110_stream *v110[ISDN_MAX_CHANNELS]; /* V.110 private data */
+ struct semaphore sem; /* serialize list access*/
} isdn_dev;
extern isdn_dev *dev;
diff --git a/include/linux/isicom.h b/include/linux/isicom.h
new file mode 100644
index 000000000..82325a9b8
--- /dev/null
+++ b/include/linux/isicom.h
@@ -0,0 +1,302 @@
+#ifndef _LINUX_ISICOM_H
+#define _LINUX_ISICOM_H
+
+/*#define ISICOM_DEBUG*/
+/*#define ISICOM_DEBUG_DTR_RTS*/
+
+
+/*
+ * Firmware Loader definitions ...
+ */
+
+#define __MultiTech ('M'<<8)
+#define MIOCTL_LOAD_FIRMWARE (__MultiTech | 0x01)
+#define MIOCTL_READ_FIRMWARE (__MultiTech | 0x02)
+#define MIOCTL_XFER_CTRL (__MultiTech | 0x03)
+#define MIOCTL_RESET_CARD (__MultiTech | 0x04)
+
+#define DATA_SIZE 16
+
+typedef struct {
+ unsigned short exec_segment;
+ unsigned short exec_addr;
+} exec_record;
+
+typedef struct {
+ int board; /* Board to load */
+ unsigned short addr;
+ unsigned short count;
+} bin_header;
+
+typedef struct {
+ int board; /* Board to load */
+ unsigned short addr;
+ unsigned short count;
+ unsigned short segment;
+ unsigned char bin_data[DATA_SIZE];
+} bin_frame;
+
+#ifdef __KERNEL__
+
+#define YES 1
+#define NO 0
+
+#define ISILOAD_MISC_MINOR 155 /* /dev/isctl */
+#define ISILOAD_NAME "ISILoad"
+
+/*
+ * ISICOM Driver definitions ...
+ *
+ */
+
+#define ISICOM_NAME "ISICom"
+
+/*
+ * These are now officially allocated numbers
+ */
+
+#define ISICOM_NMAJOR 112 /* normal */
+#define ISICOM_CMAJOR 113 /* callout */
+#define ISICOM_MAGIC (('M' << 8) | 'T')
+
+#define WAKEUP_CHARS 256 /* hard coded for now */
+#define TX_SIZE 254
+
+#define BOARD_COUNT 4
+#define PORT_COUNT (BOARD_COUNT*16)
+
+#define SERIAL_TYPE_NORMAL 1
+#define SERIAL_TYPE_CALLOUT 2
+
+/* character sizes */
+
+#define ISICOM_CS5 0x0000
+#define ISICOM_CS6 0x0001
+#define ISICOM_CS7 0x0002
+#define ISICOM_CS8 0x0003
+
+/* stop bits */
+
+#define ISICOM_1SB 0x0000
+#define ISICOM_2SB 0x0004
+
+/* parity */
+
+#define ISICOM_NOPAR 0x0000
+#define ISICOM_ODPAR 0x0008
+#define ISICOM_EVPAR 0x0018
+
+/* flow control */
+
+#define ISICOM_CTSRTS 0x03
+#define ISICOM_INITIATE_XONXOFF 0x04
+#define ISICOM_RESPOND_XONXOFF 0x08
+
+#define InterruptTheCard(base) (outw(0,(base)+0xc))
+#define ClearInterrupt(base) (inw((base)+0x0a))
+
+#define BOARD(line) (((line) >> 4) & 0x3)
+#define MIN(a, b) ( (a) < (b) ? (a) : (b) )
+
+ /* isi kill queue bitmap */
+
+#define ISICOM_KILLTX 0x01
+#define ISICOM_KILLRX 0x02
+
+ /* isi_board status bitmap */
+
+#define FIRMWARE_LOADED 0x0001
+#define BOARD_ACTIVE 0x0002
+
+ /* isi_port status bitmap */
+
+#define ISI_CTS 0x1000
+#define ISI_DSR 0x2000
+#define ISI_RI 0x4000
+#define ISI_DCD 0x8000
+#define ISI_DTR 0x0100
+#define ISI_RTS 0x0200
+
+
+#define ISI_TXOK 0x0001
+
+struct isi_board {
+ unsigned short base;
+ unsigned char irq;
+ unsigned char port_count;
+ unsigned short status;
+ unsigned short port_status; /* each bit represents a single port */
+ unsigned short shift_count;
+ struct isi_port * ports;
+ signed char count;
+};
+
+struct isi_port {
+ unsigned short magic;
+ unsigned int flags;
+ int count;
+ int blocked_open;
+ int close_delay;
+ unsigned short channel;
+ unsigned short status;
+ unsigned short closing_wait;
+ long session;
+ long pgrp;
+ struct isi_board * card;
+ struct tty_struct * tty;
+ struct wait_queue * close_wait;
+ struct wait_queue * open_wait;
+ struct tq_struct hangup_tq;
+ struct tq_struct bh_tqueue;
+ unsigned char * xmit_buf;
+ int xmit_head;
+ int xmit_tail;
+ int xmit_cnt;
+ struct termios normal_termios;
+ struct termios callout_termios;
+};
+
+
+/*
+ * ISI Card specific ops ...
+ */
+
+extern inline void raise_dtr(struct isi_port * port)
+{
+ struct isi_board * card = port->card;
+ unsigned short base = card->base;
+ unsigned char channel = port->channel;
+ short wait=300;
+ while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
+ if (wait <= 0) {
+ printk(KERN_WARNING "ISICOM: Card found busy in raise_dtr.\n");
+ return;
+ }
+#ifdef ISICOM_DEBUG_DTR_RTS
+ printk(KERN_DEBUG "ISICOM: raise_dtr.\n");
+#endif
+ outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+ outw(0x0504, base);
+ InterruptTheCard(base);
+ port->status |= ISI_DTR;
+}
+
+extern inline void drop_dtr(struct isi_port * port)
+{
+ struct isi_board * card = port->card;
+ unsigned short base = card->base;
+ unsigned char channel = port->channel;
+ short wait=300;
+ while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
+ if (wait <= 0) {
+ printk(KERN_WARNING "ISICOM: Card found busy in drop_dtr.\n");
+ return;
+ }
+#ifdef ISICOM_DEBUG_DTR_RTS
+ printk(KERN_DEBUG "ISICOM: drop_dtr.\n");
+#endif
+ outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+ outw(0x0404, base);
+ InterruptTheCard(base);
+ port->status &= ~ISI_DTR;
+}
+extern inline void raise_rts(struct isi_port * port)
+{
+ struct isi_board * card = port->card;
+ unsigned short base = card->base;
+ unsigned char channel = port->channel;
+ short wait=300;
+ while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
+ if (wait <= 0) {
+ printk(KERN_WARNING "ISICOM: Card found busy in raise_rts.\n");
+ return;
+ }
+#ifdef ISICOM_DEBUG_DTR_RTS
+ printk(KERN_DEBUG "ISICOM: raise_rts.\n");
+#endif
+ outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+ outw(0x0a04, base);
+ InterruptTheCard(base);
+ port->status |= ISI_RTS;
+}
+extern inline void drop_rts(struct isi_port * port)
+{
+ struct isi_board * card = port->card;
+ unsigned short base = card->base;
+ unsigned char channel = port->channel;
+ short wait=300;
+ while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
+ if (wait <= 0) {
+ printk(KERN_WARNING "ISICOM: Card found busy in drop_rts.\n");
+ return;
+ }
+#ifdef ISICOM_DEBUG_DTR_RTS
+ printk(KERN_DEBUG "ISICOM: drop_rts.\n");
+#endif
+ outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+ outw(0x0804, base);
+ InterruptTheCard(base);
+ port->status &= ~ISI_RTS;
+}
+extern inline void raise_dtr_rts(struct isi_port * port)
+{
+ struct isi_board * card = port->card;
+ unsigned short base = card->base;
+ unsigned char channel = port->channel;
+ short wait=300;
+ while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
+ if (wait <= 0) {
+ printk(KERN_WARNING "ISICOM: Card found busy in raise_dtr_rts.\n");
+ return;
+ }
+#ifdef ISICOM_DEBUG_DTR_RTS
+ printk(KERN_DEBUG "ISICOM: raise_dtr_rts.\n");
+#endif
+ outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+ outw(0x0f04, base);
+ InterruptTheCard(base);
+ port->status |= (ISI_DTR | ISI_RTS);
+}
+extern inline void drop_dtr_rts(struct isi_port * port)
+{
+ struct isi_board * card = port->card;
+ unsigned short base = card->base;
+ unsigned char channel = port->channel;
+ short wait=300;
+ while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
+ if (wait <= 0) {
+ printk(KERN_WARNING "ISICOM: Card found busy in drop_dtr_rts.\n");
+ return;
+ }
+#ifdef ISICOM_DEBUG_DTR_RTS
+ printk(KERN_DEBUG "ISICOM: drop_dtr_rts.\n");
+#endif
+ outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+ outw(0x0c04, base);
+ InterruptTheCard(base);
+ port->status &= ~(ISI_RTS | ISI_DTR);
+}
+
+extern inline void kill_queue(struct isi_port * port, short queue)
+{
+ struct isi_board * card = port->card;
+ unsigned short base = card->base;
+ unsigned char channel = port->channel;
+ short wait=300;
+ while(((inw(base+0x0e) & 0x01) == 0) && (wait-- > 0));
+ if (wait <= 0) {
+ printk(KERN_WARNING "ISICOM: Card found busy in kill_queue.\n");
+ return;
+ }
+#ifdef ISICOM_DEBUG
+ printk(KERN_DEBUG "ISICOM: kill_queue 0x%x.\n", queue);
+#endif
+ outw(0x8000 | (channel << card->shift_count) | 0x02 , base);
+ outw((queue << 8) | 0x06, base);
+ InterruptTheCard(base);
+}
+
+#endif /* __KERNEL__ */
+
+#endif /* ISICOM_H */
+
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 1111b19b4..73a0a689e 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -72,10 +72,10 @@ asmlinkage int printk(const char * fmt, ...)
*/
#define NIPQUAD(addr) \
- (int)(((addr) >> 0) & 0xff), \
- (int)(((addr) >> 8) & 0xff), \
- (int)(((addr) >> 16) & 0xff), \
- (int)(((addr) >> 24) & 0xff)
+ ((unsigned char *)&addr)[0], \
+ ((unsigned char *)&addr)[1], \
+ ((unsigned char *)&addr)[2], \
+ ((unsigned char *)&addr)[3]
#endif /* __KERNEL__ */
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 876c7f222..7392910d3 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -1,4 +1,12 @@
/*
kmod header
*/
+
+#include <linux/config.h>
+
+#ifdef CONFIG_KMOD
extern int request_module(const char * name);
+#else
+#define request_module(x) do {} while(0)
+#endif
+
diff --git a/include/linux/mm.h b/include/linux/mm.h
index b413095d3..2413bfedf 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -11,6 +11,7 @@
extern unsigned long max_mapnr;
extern unsigned long num_physpages;
extern void * high_memory;
+extern int page_cluster;
#include <asm/page.h>
#include <asm/atomic.h>
@@ -34,10 +35,17 @@ struct vm_area_struct {
struct mm_struct * vm_mm; /* VM area parameters */
unsigned long vm_start;
unsigned long vm_end;
+
+ /* linked list of VM areas per task, sorted by address */
+ struct vm_area_struct *vm_next;
+
pgprot_t vm_page_prot;
unsigned short vm_flags;
- struct vm_area_struct *vm_next;
- struct vm_area_struct **vm_pprev;
+
+ /* AVL tree of VM areas per task, sorted by address */
+ short vm_avl_height;
+ struct vm_area_struct * vm_avl_left;
+ struct vm_area_struct * vm_avl_right;
/* For areas with inode, the list inode->i_mmap, for shm areas,
* the list of attaches, otherwise unused.
@@ -97,7 +105,7 @@ struct vm_operations_struct {
unsigned long (*nopage)(struct vm_area_struct * area, unsigned long address, int write_access);
unsigned long (*wppage)(struct vm_area_struct * area, unsigned long address,
unsigned long page);
- int (*swapout)(struct vm_area_struct *, unsigned long, pte_t *);
+ int (*swapout)(struct vm_area_struct *, struct page *);
pte_t (*swapin)(struct vm_area_struct *, unsigned long, unsigned long);
};
@@ -117,32 +125,32 @@ typedef struct page {
unsigned long offset;
struct page *next_hash;
atomic_t count;
- unsigned int unused;
unsigned long flags; /* atomic flags, some possibly updated asynchronously */
struct wait_queue *wait;
struct page **pprev_hash;
struct buffer_head * buffers;
- unsigned long map_nr; /* page->map_nr == page - mem_map */
} mem_map_t;
/* Page flag bit values */
#define PG_locked 0
#define PG_error 1
#define PG_referenced 2
-#define PG_uptodate 3
-#define PG_free_after 4
-#define PG_decr_after 5
-#define PG_swap_unlock_after 6
-#define PG_DMA 7
-#define PG_Slab 8
-#define PG_swap_cache 9
-#define PG_skip 10
+#define PG_dirty 3
+#define PG_uptodate 4
+#define PG_free_after 5
+#define PG_decr_after 6
+#define PG_swap_unlock_after 7
+#define PG_DMA 8
+#define PG_Slab 9
+#define PG_swap_cache 10
+#define PG_skip 11
#define PG_reserved 31
/* Make it prettier to test the above... */
#define PageLocked(page) (test_bit(PG_locked, &(page)->flags))
#define PageError(page) (test_bit(PG_error, &(page)->flags))
#define PageReferenced(page) (test_bit(PG_referenced, &(page)->flags))
+#define PageDirty(page) (test_bit(PG_dirty, &(page)->flags))
#define PageUptodate(page) (test_bit(PG_uptodate, &(page)->flags))
#define PageFreeAfter(page) (test_bit(PG_free_after, &(page)->flags))
#define PageDecrAfter(page) (test_bit(PG_decr_after, &(page)->flags))
@@ -154,12 +162,17 @@ typedef struct page {
#define PageSetSlab(page) (set_bit(PG_Slab, &(page)->flags))
#define PageSetSwapCache(page) (set_bit(PG_swap_cache, &(page)->flags))
+
+#define PageTestandSetDirty(page) \
+ (test_and_set_bit(PG_dirty, &(page)->flags))
#define PageTestandSetSwapCache(page) \
(test_and_set_bit(PG_swap_cache, &(page)->flags))
#define PageClearSlab(page) (clear_bit(PG_Slab, &(page)->flags))
#define PageClearSwapCache(page)(clear_bit(PG_swap_cache, &(page)->flags))
+#define PageTestandClearDirty(page) \
+ (test_and_clear_bit(PG_dirty, &(page)->flags))
#define PageTestandClearSwapCache(page) \
(test_and_clear_bit(PG_swap_cache, &(page)->flags))
@@ -249,6 +262,8 @@ extern inline unsigned long get_free_page(int gfp_mask)
return page;
}
+extern int low_on_memory;
+
/* memory.c & swap.c*/
#define free_page(addr) free_pages((addr),0)
@@ -260,7 +275,7 @@ extern unsigned long put_dirty_page(struct task_struct * tsk,unsigned long page,
unsigned long address);
extern void free_page_tables(struct mm_struct * mm);
-extern void clear_page_tables(struct task_struct * tsk);
+extern void clear_page_tables(struct mm_struct *, unsigned long, int);
extern int new_page_tables(struct task_struct * tsk);
extern void zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long size);
@@ -285,6 +300,7 @@ extern void si_meminfo(struct sysinfo * val);
extern void vma_init(void);
extern void merge_segments(struct mm_struct *, unsigned long, unsigned long);
extern void insert_vm_struct(struct mm_struct *, struct vm_area_struct *);
+extern void build_mmap_avl(struct mm_struct *);
extern void exit_mmap(struct mm_struct *);
extern unsigned long get_unmapped_area(unsigned long, unsigned long);
@@ -307,15 +323,18 @@ extern void put_cached_page(unsigned long);
#define __GFP_LOW 0x02
#define __GFP_MED 0x04
#define __GFP_HIGH 0x08
+#define __GFP_IO 0x10
+#define __GFP_SWAP 0x20
#define __GFP_UNCACHED 0x40
#define __GFP_DMA 0x80
#define GFP_BUFFER (__GFP_LOW | __GFP_WAIT)
#define GFP_ATOMIC (__GFP_HIGH)
-#define GFP_USER (__GFP_LOW | __GFP_WAIT)
-#define GFP_KERNEL (__GFP_MED | __GFP_WAIT)
-#define GFP_NFS (__GFP_HIGH | __GFP_WAIT)
+#define GFP_USER (__GFP_LOW | __GFP_WAIT | __GFP_IO)
+#define GFP_KERNEL (__GFP_MED | __GFP_WAIT | __GFP_IO)
+#define GFP_NFS (__GFP_HIGH | __GFP_WAIT | __GFP_IO)
+#define GFP_KSWAPD (__GFP_IO | __GFP_SWAP)
/* Flag - indicates that the buffer should be allocated uncached as for an
architecture where the caches don't snoop DMA access. This is a even
@@ -359,22 +378,7 @@ static inline int expand_stack(struct vm_area_struct * vma, unsigned long addres
}
/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */
-static inline struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr)
-{
- struct vm_area_struct *vma = NULL;
-
- if (mm) {
- /* Check the cache first. */
- vma = mm->mmap_cache;
- if(!vma || (vma->vm_end <= addr) || (vma->vm_start > addr)) {
- vma = mm->mmap;
- while(vma && vma->vm_end <= addr)
- vma = vma->vm_next;
- mm->mmap_cache = vma;
- }
- }
- return vma;
-}
+extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr);
/* Look up the first VMA which intersects the interval start_addr..end_addr-1,
NULL if none. Assume start_addr < end_addr. */
@@ -389,28 +393,8 @@ static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * m
#define buffer_under_min() ((buffermem >> PAGE_SHIFT) * 100 < \
buffer_mem.min_percent * num_physpages)
-#define buffer_under_borrow() ((buffermem >> PAGE_SHIFT) * 100 < \
- buffer_mem.borrow_percent * num_physpages)
-#define buffer_under_max() ((buffermem >> PAGE_SHIFT) * 100 < \
- buffer_mem.max_percent * num_physpages)
-#define buffer_over_min() ((buffermem >> PAGE_SHIFT) * 100 > \
- buffer_mem.min_percent * num_physpages)
-#define buffer_over_borrow() ((buffermem >> PAGE_SHIFT) * 100 > \
- buffer_mem.borrow_percent * num_physpages)
-#define buffer_over_max() ((buffermem >> PAGE_SHIFT) * 100 > \
- buffer_mem.max_percent * num_physpages)
#define pgcache_under_min() (page_cache_size * 100 < \
page_cache.min_percent * num_physpages)
-#define pgcache_under_borrow() (page_cache_size * 100 < \
- page_cache.borrow_percent * num_physpages)
-#define pgcache_under_max() (page_cache_size * 100 < \
- page_cache.max_percent * num_physpages)
-#define pgcache_over_min() (page_cache_size * 100 > \
- page_cache.min_percent * num_physpages)
-#define pgcache_over_borrow() (page_cache_size * 100 > \
- page_cache.borrow_percent * num_physpages)
-#define pgcache_over_max() (page_cache_size * 100 > \
- page_cache.max_percent * num_physpages)
#endif /* __KERNEL__ */
diff --git a/include/linux/module.h b/include/linux/module.h
index ad3d10baf..94cce874f 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -20,6 +20,7 @@
# endif
#endif /* __GENKSYMS__ */
+#include <asm/atomic.h>
/* Don't need to bring in all of uaccess.h just for this decl. */
struct exception_table_entry;
@@ -54,7 +55,12 @@ struct module
const char *name;
unsigned long size;
- long usecount;
+ union
+ {
+ atomic_t usecount;
+ long pad;
+ } uc; /* Needs to keep its size - so says rth */
+
unsigned long flags; /* AUTOCLEAN et al */
unsigned nsyms;
@@ -80,10 +86,10 @@ struct module
struct module_info
{
- unsigned long addr;
- unsigned long size;
- unsigned long flags;
- long usecount;
+ unsigned long addr;
+ unsigned long size;
+ unsigned long flags;
+ long usecount;
};
/* Bits of module.flags. */
@@ -114,17 +120,17 @@ struct module_info
/* Backwards compatibility definition. */
-#define GET_USE_COUNT(module) ((module)->usecount)
+#define GET_USE_COUNT(module) (atomic_read(&(module)->uc.usecount))
/* Poke the use count of a module. */
#define __MOD_INC_USE_COUNT(mod) \
- ((mod)->usecount++, (mod)->flags |= MOD_VISITED|MOD_USED_ONCE)
+ (atomic_inc(&(mod)->uc.usecount), (mod)->flags |= MOD_VISITED|MOD_USED_ONCE)
#define __MOD_DEC_USE_COUNT(mod) \
- ((mod)->usecount--, (mod)->flags |= MOD_VISITED)
+ (atomic_dec(&(mod)->uc.usecount), (mod)->flags |= MOD_VISITED)
#define __MOD_IN_USE(mod) \
(mod_member_present((mod), can_unload) && (mod)->can_unload \
- ? (mod)->can_unload() : (mod)->usecount)
+ ? (mod)->can_unload() : atomic_read(&(mod)->uc.usecount))
/* Indirect stringification. */
diff --git a/include/linux/msdos_fs_sb.h b/include/linux/msdos_fs_sb.h
index 4985eef15..4497eeedb 100644
--- a/include/linux/msdos_fs_sb.h
+++ b/include/linux/msdos_fs_sb.h
@@ -35,9 +35,11 @@ struct vfat_unicode {
struct msdos_sb_info {
unsigned short cluster_size; /* sectors/cluster */
unsigned char fats,fat_bits; /* number of FATs, FAT bits (12 or 16) */
- unsigned short fat_start,fat_length; /* FAT start & length (sec.) */
- unsigned short dir_start,dir_entries; /* root dir start & entries */
- unsigned short data_start; /* first data sector */
+ unsigned short fat_start;
+ unsigned long fat_length; /* FAT start & length (sec.) */
+ unsigned long dir_start;
+ unsigned short dir_entries; /* root dir start & entries */
+ unsigned long data_start; /* first data sector */
unsigned long clusters; /* number of clusters */
unsigned long root_cluster; /* first cluster of the root directory */
unsigned long fsinfo_offset; /* FAT32 fsinfo offset from start of disk */
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 9a9297cac..afd52c619 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -222,13 +222,13 @@ extern int nfs_check_error(struct inode *);
extern int nfs_wb_all(struct inode *);
extern int nfs_wb_page(struct inode *, struct page *);
extern int nfs_wb_pid(struct inode *, pid_t);
+extern int nfs_flush_trunc(struct inode *, unsigned long);
/*
* Invalidate write-backs, possibly trying to write them
* back first..
*/
extern void nfs_inval(struct inode *);
-extern int nfs_truncate_dirty_pages(struct inode *, unsigned long);
extern int nfs_updatepage(struct file *, struct page *, unsigned long, unsigned int, int);
/*
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index aea15a68b..4c32fe530 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -26,11 +26,6 @@
*/
#define NFSD_VERSION "0.4"
-/*
- * Maximum number of nfsd processes
- */
-#define NFSD_MAXSERVS 16
-
#ifdef __KERNEL__
/*
* Special flags for nfsd_permission. These must be different from MAY_READ,
@@ -76,6 +71,7 @@ int nfsd_svc(unsigned short port, int nrservs);
/* nfsd/vfs.c */
int fh_lock_parent(struct svc_fh *, struct dentry *);
void nfsd_racache_init(void);
+void nfsd_racache_shutdown(void);
int nfsd_lookup(struct svc_rqst *, struct svc_fh *,
const char *, int, struct svc_fh *);
int nfsd_setattr(struct svc_rqst *, struct svc_fh *,
@@ -167,6 +163,11 @@ extern u32 nfs_ok,
*/
extern struct timeval nfssvc_boot;
+/*
+ * The number of nfsd threads.
+ */
+extern int nfsd_nservers;
+
#endif /* __KERNEL__ */
#endif /* LINUX_NFSD_NFSD_H */
diff --git a/include/linux/nls.h b/include/linux/nls.h
index 3321e2958..efcd58920 100644
--- a/include/linux/nls.h
+++ b/include/linux/nls.h
@@ -36,6 +36,7 @@ extern int init_nls_iso8859_6(void);
extern int init_nls_iso8859_7(void);
extern int init_nls_iso8859_8(void);
extern int init_nls_iso8859_9(void);
+extern int init_nls_iso8859_15(void);
extern int init_nls_cp437(void);
extern int init_nls_cp737(void);
extern int init_nls_cp775(void);
diff --git a/include/linux/ntfs_fs_i.h b/include/linux/ntfs_fs_i.h
index dbb0289fd..cab27748c 100644
--- a/include/linux/ntfs_fs_i.h
+++ b/include/linux/ntfs_fs_i.h
@@ -5,13 +5,17 @@
struct ntfs_attribute;
struct ntfs_sb_info;
-/* Duplicate definitions from ntfs/types.h */
+/* Duplicate definitions from ntfs/ntfstypes.h */
#ifndef NTFS_INTEGRAL_TYPES
#define NTFS_INTEGRAL_TYPES
-typedef unsigned char ntfs_u8;
-typedef unsigned short ntfs_u16;
-typedef unsigned int ntfs_u32;
-typedef unsigned long long ntfs_u64;
+typedef u8 ntfs_u8;
+typedef u16 ntfs_u16;
+typedef u32 ntfs_u32;
+typedef u64 ntfs_u64;
+typedef s8 ntfs_s8;
+typedef s16 ntfs_s16;
+typedef s32 ntfs_s32;
+typedef s64 ntfs_s64;
#endif
#ifndef NTMODE_T
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 667f214e1..e9305f9b8 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -14,7 +14,7 @@
static inline unsigned long page_address(struct page * page)
{
- return PAGE_OFFSET + PAGE_SIZE * page->map_nr;
+ return PAGE_OFFSET + PAGE_SIZE * (page - mem_map);
}
#define PAGE_HASH_BITS 11
diff --git a/include/linux/pc_keyb.h b/include/linux/pc_keyb.h
index 651bf4b19..b79ecf0eb 100644
--- a/include/linux/pc_keyb.h
+++ b/include/linux/pc_keyb.h
@@ -51,6 +51,8 @@ extern unsigned char aux_device_present;
#define KBD_CCMD_KBD_TEST 0xAB /* Keyboard interface test */
#define KBD_CCMD_KBD_DISABLE 0xAD /* Keyboard interface disable */
#define KBD_CCMD_KBD_ENABLE 0xAE /* Keyboard interface enable */
+#define KBD_CCMD_WRITE_AUX_OBUF 0xD3 /* Write to output buffer as if
+ initiated by the auxiliary device */
#define KBD_CCMD_WRITE_MOUSE 0xD4 /* Write the following byte to the mouse */
/*
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 539586e40..6ba04c1d3 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -408,7 +408,11 @@
#define PCI_DEVICE_ID_MATROX_MYS 0x051A
#define PCI_DEVICE_ID_MATROX_MIL_2 0x051b
#define PCI_DEVICE_ID_MATROX_MIL_2_AGP 0x051f
+#define PCI_DEVICE_ID_MATROX_G200_PCI 0x0520
+#define PCI_DEVICE_ID_MATROX_G200_AGP 0x0521
#define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10
+#define PCI_DEVICE_ID_MATROX_G100_MM 0x1000
+#define PCI_DEVICE_ID_MATROX_G100_AGP 0x1001
#define PCI_VENDOR_ID_CT 0x102c
#define PCI_DEVICE_ID_CT_65545 0x00d8
@@ -538,6 +542,7 @@
#define PCI_VENDOR_ID_QLOGIC 0x1077
#define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020
#define PCI_DEVICE_ID_QLOGIC_ISP1022 0x1022
+#define PCI_DEVICE_ID_QLOGIC_ISP2100 0x2100
#define PCI_VENDOR_ID_CYRIX 0x1078
#define PCI_DEVICE_ID_CYRIX_5510 0x0000
@@ -587,6 +592,8 @@
#define PCI_VENDOR_ID_BROOKTREE 0x109e
#define PCI_DEVICE_ID_BROOKTREE_848 0x0350
#define PCI_DEVICE_ID_BROOKTREE_849A 0x0351
+#define PCI_DEVICE_ID_BROOKTREE_878_1 0x036e
+#define PCI_DEVICE_ID_BROOKTREE_878 0x0878
#define PCI_DEVICE_ID_BROOKTREE_8474 0x8474
#define PCI_VENDOR_ID_SIERRA 0x10a8
@@ -720,6 +727,7 @@
#define PCI_DEVICE_ID_VIA_82C586_0 0x0586
#define PCI_DEVICE_ID_VIA_82C595 0x0595
#define PCI_DEVICE_ID_VIA_82C597_0 0x0597
+#define PCI_DEVICE_ID_VIA_82C598_0 0x0598
#define PCI_DEVICE_ID_VIA_82C926 0x0926
#define PCI_DEVICE_ID_VIA_82C416 0x1571
#define PCI_DEVICE_ID_VIA_82C595_97 0x1595
@@ -727,6 +735,10 @@
#define PCI_DEVICE_ID_VIA_82C586_3 0x3040
#define PCI_DEVICE_ID_VIA_86C100A 0x6100
#define PCI_DEVICE_ID_VIA_82C597_1 0x8597
+#define PCI_DEVICE_ID_VIA_82C598_1 0x8598
+
+#define PCI_VENDOR_ID_SMC2 0x1113
+#define PCI_DEVICE_ID_SMC2_1211TX 0x1211
#define PCI_VENDOR_ID_VORTEX 0x1119
#define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000
@@ -897,6 +909,7 @@
#define PCI_VENDOR_ID_3DFX 0x121a
#define PCI_DEVICE_ID_3DFX_VOODOO 0x0001
#define PCI_DEVICE_ID_3DFX_VOODOO2 0x0002
+#define PCI_DEVICE_ID_3DFX_BANSHEE 0x0003
#define PCI_VENDOR_ID_SIGMADES 0x1236
#define PCI_DEVICE_ID_SIGMADES_6425 0x6401
@@ -982,6 +995,9 @@
#define PCI_DEVICE_ID_S3_ViRGE_MXPMV 0x8c03
#define PCI_DEVICE_ID_S3_SONICVIBES 0xca00
+#define PCI_VENDOR_ID_DCI 0x6666
+#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001
+
#define PCI_VENDOR_ID_GENROCO 0x5555
#define PCI_DEVICE_ID_GENROCO_HFP832 0x0003
@@ -1048,8 +1064,10 @@
#define PCI_VENDOR_ID_ADAPTEC2 0x9005
#define PCI_DEVICE_ID_ADAPTEC2_2940U2 0x0010
+#define PCI_DEVICE_ID_ADAPTEC2_78902 0x0013
#define PCI_DEVICE_ID_ADAPTEC2_7890 0x001f
#define PCI_DEVICE_ID_ADAPTEC2_3940U2 0x0050
+#define PCI_DEVICE_ID_ADAPTEC2_3950U2D 0x0051
#define PCI_DEVICE_ID_ADAPTEC2_7896 0x005f
#define PCI_VENDOR_ID_ATRONICS 0x907f
diff --git a/include/linux/poll.h b/include/linux/poll.h
index 7cafbfbad..7eb57334f 100644
--- a/include/linux/poll.h
+++ b/include/linux/poll.h
@@ -7,6 +7,7 @@
#include <linux/wait.h>
#include <linux/string.h>
+#include <linux/mm.h>
#include <asm/uaccess.h>
@@ -17,31 +18,21 @@ struct poll_table_entry {
};
typedef struct poll_table_struct {
+ struct poll_table_struct * next;
unsigned int nr;
struct poll_table_entry * entry;
} poll_table;
-#define __MAX_POLL_TABLE_ENTRIES (PAGE_SIZE / sizeof (struct poll_table_entry))
+#define __MAX_POLL_TABLE_ENTRIES ((PAGE_SIZE - sizeof (poll_table)) / sizeof (struct poll_table_entry))
+
+extern void __pollwait(struct file * filp, struct wait_queue ** wait_address, poll_table *p);
extern inline void poll_wait(struct file * filp, struct wait_queue ** wait_address, poll_table *p)
{
- struct poll_table_entry * entry;
-
- if (!p || !wait_address)
- return;
- if (p->nr >= __MAX_POLL_TABLE_ENTRIES)
- return;
- entry = p->entry + p->nr;
- entry->filp = filp;
- filp->f_count++;
- entry->wait_address = wait_address;
- entry->wait.task = current;
- entry->wait.next = NULL;
- add_wait_queue(wait_address,&entry->wait);
- p->nr++;
+ if (p && wait_address)
+ __pollwait(filp, wait_address, p);
}
-
/*
* For the kernel fd_set we use a fixed set-size for allocation purposes.
* This set-size doesn't necessarily bear any relation to the size the user
@@ -59,11 +50,21 @@ extern inline void poll_wait(struct file * filp, struct wait_queue ** wait_addre
#define KFDS_NR (KFDS_64BLOCK*8 > NR_OPEN ? NR_OPEN : KFDS_64BLOCK*8)
typedef unsigned long kernel_fd_set[KFDS_NR/__NFDBITS];
+/*
+ * Scaleable version of the fd_set.
+ */
+
typedef struct {
- kernel_fd_set in, out, ex;
- kernel_fd_set res_in, res_out, res_ex;
-} fd_set_buffer;
+ unsigned long *in, *out, *ex;
+ unsigned long *res_in, *res_out, *res_ex;
+} fd_set_bits;
+/*
+ * How many longwords for "nr" bits?
+ */
+#define FDS_BITPERLONG (8*sizeof(long))
+#define FDS_LONGS(nr) (((nr)+FDS_BITPERLONG-1)/FDS_BITPERLONG)
+#define FDS_BYTES(nr) (FDS_LONGS(nr)*sizeof(long))
/*
* We do a VERIFY_WRITE here even though we are only reading this time:
@@ -74,8 +75,7 @@ typedef struct {
static inline
int get_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset)
{
- /* round up nr to nearest "unsigned long" */
- nr = (nr + 8*sizeof(long) - 1) / (8*sizeof(long)) * sizeof(long);
+ nr = FDS_BYTES(nr);
if (ufdset) {
int error;
error = verify_area(VERIFY_WRITE, ufdset, nr);
@@ -90,20 +90,17 @@ int get_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset)
static inline
void set_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset)
{
- if (ufdset) {
- nr = (nr + 8*sizeof(long) - 1) / (8*sizeof(long))*sizeof(long);
- __copy_to_user(ufdset, fdset, nr);
- }
+ if (ufdset)
+ __copy_to_user(ufdset, fdset, FDS_BYTES(nr));
}
static inline
void zero_fd_set(unsigned long nr, unsigned long *fdset)
{
- nr = (nr + 8*sizeof(long) - 1) / (8*sizeof(long)) * sizeof(long);
- memset(fdset, 0, nr);
+ memset(fdset, 0, FDS_BYTES(nr));
}
-extern int do_select(int n, fd_set_buffer *fds, long *timeout);
+extern int do_select(int n, fd_set_bits *fds, long *timeout);
#endif /* KERNEL */
diff --git a/include/linux/ppp_defs.h b/include/linux/ppp_defs.h
index bb2d14c6e..c506c90ab 100644
--- a/include/linux/ppp_defs.h
+++ b/include/linux/ppp_defs.h
@@ -28,7 +28,7 @@
*/
/*
- * ==FILEVERSION 970607==
+ * ==FILEVERSION 990114==
*
* NOTE TO MAINTAINERS:
* If you modify this file at all, please set the above date.
@@ -75,6 +75,7 @@
#define PPP_IPCP 0x8021 /* IP Control Protocol */
#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */
#define PPP_IPXCP 0x802b /* IPX Control Protocol */
+#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */
#define PPP_CCP 0x80fd /* Compression Control Protocol */
#define PPP_LCP 0xc021 /* Link Control Protocol */
#define PPP_PAP 0xc023 /* Password Authentication Protocol */
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index d12e05650..e02d072f7 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -139,10 +139,13 @@ enum net_directory_inos {
PROC_NET_DN_L2,
PROC_NET_DN_CACHE,
PROC_NET_DN_SKT,
+ PROC_NET_DN_FW,
+ PROC_NET_DN_RAW,
PROC_NET_NETSTAT,
PROC_NET_IPFW_CHAINS,
PROC_NET_IPFW_CHAIN_NAMES,
PROC_NET_AT_AARP,
+ PROC_NET_BRIDGE,
PROC_NET_LAST
};
@@ -167,6 +170,7 @@ enum scsi_directory_inos {
PROC_SCSI_PAS16,
PROC_SCSI_QLOGICFAS,
PROC_SCSI_QLOGICISP,
+ PROC_SCSI_QLOGICFC,
PROC_SCSI_SEAGATE,
PROC_SCSI_T128,
PROC_SCSI_NCR53C7xx,
@@ -180,7 +184,9 @@ enum scsi_directory_inos {
PROC_SCSI_AM53C974,
PROC_SCSI_SSC,
PROC_SCSI_NCR53C406A,
+ PROC_SCSI_MEGARAID,
PROC_SCSI_PPA,
+ PROC_SCSI_ATP870U,
PROC_SCSI_ESP,
PROC_SCSI_QLOGICPTI,
PROC_SCSI_AMIGA7XX,
@@ -196,6 +202,7 @@ enum scsi_directory_inos {
PROC_SCSI_MESH,
PROC_SCSI_53C94,
PROC_SCSI_PLUTO,
+ PROC_SCSI_INI9100U,
PROC_SCSI_SCSI_DEBUG,
PROC_SCSI_NOT_PRESENT,
PROC_SCSI_FILE, /* I'm assuming here that we */
@@ -290,6 +297,8 @@ typedef int (write_proc_t)(struct file *file, const char *buffer,
extern int (* dispatch_scsi_info_ptr) (int ino, char *buffer, char **start,
off_t offset, int length, int inout);
+#ifdef CONFIG_PROC_FS
+
extern struct proc_dir_entry proc_root;
extern struct proc_dir_entry proc_root_fs;
extern struct proc_dir_entry *proc_net;
@@ -429,4 +438,26 @@ extern void proc_tty_unregister_driver(struct tty_driver *driver);
*/
extern void proc_device_tree_init(void);
+#else
+
+extern inline int proc_register(struct proc_dir_entry *a, struct proc_dir_entry *b) {};
+extern inline int proc_unregister(struct proc_dir_entry *a, int b) {};
+extern inline int proc_net_register(struct proc_dir_entry *a) {};
+extern inline int proc_net_unregister(int x) {};
+extern inline int proc_scsi_register(struct proc_dir_entry *b, struct proc_dir_entry *c) {};
+extern inline int proc_scsi_unregister(struct proc_dir_entry *a, int x);
+
+extern inline struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
+ struct proc_dir_entry *parent)
+{
+ return NULL;
+}
+
+extern inline void remove_proc_entry(const char *name, struct proc_dir_entry *parent) {};
+
+extern inline void proc_tty_register_driver(struct tty_driver *driver) {};
+extern inline void proc_tty_unregister_driver(struct tty_driver *driver) {};
+
+
+#endif
#endif /* _LINUX_PROC_FS_H */
diff --git a/include/linux/quota.h b/include/linux/quota.h
index c0945f60b..2c4a5bcef 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -86,7 +86,7 @@ extern int max_dquots;
extern int dquot_root_squash;
#define NR_DQHASH 43 /* Just an arbitrary number */
-#define NR_DQUOTS 256 /* Maximum number of quotas active at one time (Configurable from /proc/sys/fs) */
+#define NR_DQUOTS 1024 /* Maximum number of quotas active at one time (Configurable from /proc/sys/fs) */
/*
* Command definitions for the 'quotactl' system call.
diff --git a/include/linux/scc.h b/include/linux/scc.h
index c8a440538..7ad72e102 100644
--- a/include/linux/scc.h
+++ b/include/linux/scc.h
@@ -82,8 +82,8 @@ enum HWEVENT_opts {
/* channel grouping */
-#define RXGROUP 0x100 /* if set, only tx when all channels clear */
-#define TXGROUP 0x200 /* if set, don't transmit simultaneously */
+#define RXGROUP 0100 /* if set, only tx when all channels clear */
+#define TXGROUP 0200 /* if set, don't transmit simultaneously */
/* Tx/Rx clock sources */
@@ -237,6 +237,7 @@ struct scc_channel {
unsigned char wreg[16]; /* Copy of last written value in WRx */
unsigned char status; /* Copy of R0 at last external interrupt */
+ unsigned char dcd; /* DCD status */
struct scc_kiss kiss; /* control structure for KISS params */
struct scc_stat stat; /* statistical information */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index da5be1f10..b37bce2cc 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -11,6 +11,7 @@ extern unsigned long event;
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/times.h>
+#include <linux/timex.h>
#include <asm/system.h>
#include <asm/semaphore.h>
@@ -32,6 +33,7 @@ extern unsigned long event;
#define CLONE_SIGHAND 0x00000800 /* set if signal handlers shared */
#define CLONE_PID 0x00001000 /* set if pid shared */
#define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */
+#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */
/*
* These are the constant used to fake the fixed-point load-average
@@ -154,11 +156,16 @@ struct fs_struct {
/* Maximum number of active map areas.. This is a random (large) number */
#define MAX_MAP_COUNT (65536)
+/* Number of map areas at which the AVL tree is activated. This is arbitrary. */
+#define AVL_MIN_MAP_COUNT 32
+
struct mm_struct {
- struct vm_area_struct *mmap, *mmap_cache;
+ struct vm_area_struct *mmap; /* list of VMAs */
+ struct vm_area_struct *mmap_avl; /* tree of VMAs */
+ struct vm_area_struct *mmap_cache; /* last find_vma result */
pgd_t * pgd;
atomic_t count;
- int map_count;
+ int map_count; /* number of VMAs */
struct semaphore mmap_sem;
unsigned long context;
unsigned long start_code, end_code, start_data, end_data;
@@ -175,7 +182,8 @@ struct mm_struct {
};
#define INIT_MM { \
- &init_mmap, NULL, swapper_pg_dir, \
+ &init_mmap, NULL, NULL, \
+ swapper_pg_dir, \
ATOMIC_INIT(1), 1, \
MUTEX, \
0, \
@@ -219,6 +227,7 @@ struct task_struct {
/* various fields */
long counter;
long priority;
+ cycles_t avg_slice;
/* SMP and runqueue state */
int has_cpu;
int processor;
@@ -256,6 +265,7 @@ struct task_struct {
struct task_struct **tarray_ptr;
struct wait_queue *wait_chldexit; /* for wait4() */
+ struct semaphore *vfork_sem; /* for vfork() */
unsigned long policy, rt_priority;
unsigned long it_real_value, it_prof_value, it_virt_value;
unsigned long it_real_incr, it_prof_incr, it_virt_incr;
@@ -267,8 +277,6 @@ struct task_struct {
unsigned long min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap;
int swappable:1;
unsigned long swap_address;
- unsigned long old_maj_flt; /* old value of maj_flt */
- unsigned long dec_flt; /* page fault count of the last time */
unsigned long swap_cnt; /* number of pages to swap on next pass */
/* process credentials */
uid_t uid,euid,suid,fsuid;
@@ -295,6 +303,7 @@ struct task_struct {
struct files_struct *files;
/* memory management info */
struct mm_struct *mm;
+
/* signal handlers */
spinlock_t sigmask_lock; /* Protects signal and blocked */
struct signal_struct *sig;
@@ -318,6 +327,7 @@ struct task_struct {
#define PF_DUMPCORE 0x00000200 /* dumped core */
#define PF_SIGNALED 0x00000400 /* killed by a signal */
#define PF_MEMALLOC 0x00000800 /* Allocating memory */
+#define PF_VFORK 0x00001000 /* Wake up parent in mm_release */
#define PF_USEDFPU 0x00100000 /* task used FPU this quantum (SMP) */
#define PF_DTRACE 0x00200000 /* delayed trace (used on m68k, i386) */
@@ -328,7 +338,7 @@ struct task_struct {
*/
#define _STK_LIM (8*1024*1024)
-#define DEF_PRIORITY (20*HZ/100) /* 200 ms time slices */
+#define DEF_PRIORITY (20*HZ/100) /* 210 ms time slices */
/*
* INIT_TASK is used to set up the first task table, touch at
@@ -336,7 +346,7 @@ struct task_struct {
*/
#define INIT_TASK \
/* state etc */ { 0,0,0,KERNEL_DS,&default_exec_domain,0, \
-/* counter */ DEF_PRIORITY,DEF_PRIORITY, \
+/* counter */ DEF_PRIORITY,DEF_PRIORITY,0, \
/* SMP */ 0,0,0,-1, \
/* schedlink */ &init_task,&init_task, &init_task, &init_task, \
/* binfmt */ NULL, \
@@ -345,13 +355,13 @@ struct task_struct {
/* proc links*/ &init_task,&init_task,NULL,NULL,NULL, \
/* pidhash */ NULL, NULL, \
/* tarray */ &task[0], \
-/* chld wait */ NULL, \
+/* chld wait */ NULL, NULL, \
/* timeout */ SCHED_OTHER,0,0,0,0,0,0,0, \
/* timer */ { NULL, NULL, 0, 0, it_real_fn }, \
/* utime */ {0,0,0,0},0, \
/* per CPU times */ {0, }, {0, }, \
/* flt */ 0,0,0,0,0,0, \
-/* swp */ 0,0,0,0,0, \
+/* swp */ 0,0,0, \
/* process credentials */ \
/* uid etc */ 0,0,0,0,0,0,0,0, \
/* suppl grps*/ 0, {0,}, \
@@ -455,6 +465,8 @@ extern unsigned long prof_shift;
extern void FASTCALL(__wake_up(struct wait_queue ** p, unsigned int mode));
extern void FASTCALL(sleep_on(struct wait_queue ** p));
+extern long FASTCALL(sleep_on_timeout(struct wait_queue ** p,
+ signed long timeout));
extern void FASTCALL(interruptible_sleep_on(struct wait_queue ** p));
extern long FASTCALL(interruptible_sleep_on_timeout(struct wait_queue ** p,
signed long timeout));
@@ -603,6 +615,8 @@ static inline void mmget(struct mm_struct * mm)
atomic_inc(&mm->count);
}
extern void mmput(struct mm_struct *);
+/* Remove the current tasks stale references to the old mm_struct */
+extern void mm_release(void);
extern int copy_thread(int, unsigned long, unsigned long, struct task_struct *, struct pt_regs *);
extern void flush_thread(void);
diff --git a/include/linux/sem.h b/include/linux/sem.h
index a5b3134bf..3fb2a48f6 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -92,6 +92,7 @@ struct sem_queue {
struct semid_ds * sma; /* semaphore array for operations */
struct sembuf * sops; /* array of pending operations */
int nsops; /* number of operations */
+ int alter; /* operation will alter semaphore */
};
/* Each task has a list of undo requests. They are executed automatically
diff --git a/include/linux/shm.h b/include/linux/shm.h
index 819e346a4..a6d13e8d9 100644
--- a/include/linux/shm.h
+++ b/include/linux/shm.h
@@ -14,6 +14,9 @@ struct shmid_ds {
__kernel_ipc_pid_t shm_cpid; /* pid of creator */
__kernel_ipc_pid_t shm_lpid; /* pid of last operator */
unsigned short shm_nattch; /* no. of current attaches */
+ unsigned short shm_unused; /* compatibility */
+ void *shm_unused2; /* ditto - used by DIPC */
+ void *shm_unused3; /* unused */
};
struct shmid_kernel
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 5034c71f6..80ea3056f 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -11,12 +11,22 @@
#include <asm/smp.h>
/*
- * main IPI interface, handles INIT, TLB flush, STOP, etc. (defined in asm header):
- *
- * extern void smp_message_pass(int target, int msg, unsigned long data, int wait);
+ * main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc.
+ * (defined in asm header):
*/
/*
+ * stops all CPUs but the current one:
+ */
+extern void smp_send_stop(void);
+
+/*
+ * sends a 'reschedule' event to another CPU:
+ */
+extern void FASTCALL(smp_send_reschedule(int cpu));
+
+
+/*
* Boot processor call to load the other CPU's
*/
extern void smp_boot_cpus(void);
@@ -61,7 +71,6 @@ extern volatile int smp_msg_id;
#define smp_num_cpus 1
#define smp_processor_id() 0
#define hard_smp_processor_id() 0
-#define smp_message_pass(t,m,d,w)
#define smp_threads_ready 1
#define kernel_lock()
#define cpu_logical_map(cpu) 0
diff --git a/include/linux/socket.h b/include/linux/socket.h
index f1e8dcfaf..41e759751 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -154,6 +154,7 @@ struct ucred {
#define AF_ECONET 19 /* Acorn Econet */
#define AF_ATMSVC 20 /* ATM SVCs */
#define AF_SNA 22 /* Linux SNA Project (nutters!) */
+#define AF_IRDA 23 /* IRDA sockets */
#define AF_MAX 32 /* For now.. */
/* Protocol families, same as address families. */
@@ -181,6 +182,7 @@ struct ucred {
#define PF_ECONET AF_ECONET
#define PF_ATMSVC AF_ATMSVC
#define PF_SNA AF_SNA
+#define PF_IRDA AF_IRDA
#define PF_MAX AF_MAX
@@ -194,6 +196,7 @@ struct ucred {
#define MSG_OOB 1
#define MSG_PEEK 2
#define MSG_DONTROUTE 4
+#define MSG_TRYHARD 4 /* Synonym for MSG_DONTROUTE for DECnet */
#define MSG_CTRUNC 8
#define MSG_PROXY 0x10 /* Supply or ask second address. */
#define MSG_TRUNC 0x20
diff --git a/include/linux/sound.h b/include/linux/sound.h
index bc9335801..4921b90e2 100644
--- a/include/linux/sound.h
+++ b/include/linux/sound.h
@@ -2,11 +2,11 @@
* Sound core interface functions
*/
-extern int register_sound_special(struct file_operations *, int);
-extern int register_sound_mixer(struct file_operations *fops);
-extern int register_sound_midi(struct file_operations *fops);
-extern int register_sound_dsp(struct file_operations *fops);
-extern int register_sound_synth(struct file_operations *fops);
+extern int register_sound_special(struct file_operations *fops, int unit);
+extern int register_sound_mixer(struct file_operations *fops, int dev);
+extern int register_sound_midi(struct file_operations *fops, int dev);
+extern int register_sound_dsp(struct file_operations *fops, int dev);
+extern int register_sound_synth(struct file_operations *fops, int dev);
extern void unregister_sound_special(int unit);
extern void unregister_sound_mixer(int unit);
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index f0f8e0384..8ec30527f 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -128,7 +128,7 @@ void rpc_killall_tasks(struct rpc_clnt *);
void rpc_execute(struct rpc_task *);
void rpc_run_child(struct rpc_task *parent, struct rpc_task *child,
rpc_action action);
-void rpc_add_wait_queue(struct rpc_wait_queue *, struct rpc_task *);
+int rpc_add_wait_queue(struct rpc_wait_queue *, struct rpc_task *);
void rpc_remove_wait_queue(struct rpc_task *);
void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *,
rpc_action action, rpc_action timer);
diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h
index c01ebfa4b..24da571cb 100644
--- a/include/linux/sunrpc/stats.h
+++ b/include/linux/sunrpc/stats.h
@@ -9,6 +9,7 @@
#ifndef _LINUX_SUNRPC_STATS_H
#define _LINUX_SUNRPC_STATS_H
+#include <linux/config.h>
#include <linux/proc_fs.h>
struct rpc_stat {
@@ -44,6 +45,7 @@ void rpc_proc_exit(void);
void rpc_modcount(struct inode *, int);
#endif
+#ifdef CONFIG_PROC_FS
struct proc_dir_entry * rpc_proc_register(struct rpc_stat *);
void rpc_proc_unregister(const char *);
int rpc_proc_read(char *, char **, off_t, int,
@@ -55,4 +57,18 @@ int svc_proc_read(char *, char **, off_t, int,
int *, void *);
void svc_proc_zero(struct svc_program *);
+#else
+
+extern inline void svc_proc_unregister(const char *p) {}
+extern inline struct proc_dir_entry*svc_proc_register(struct svc_stat *s)
+{
+ return NULL;
+}
+
+extern inline int svc_proc_read(char *a, char **b, off_t c, int d, int *e, void *f)
+{
+ return 0;
+}
+#endif
+
#endif /* _LINUX_SUNRPC_STATS_H */
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 7c9a1e525..4ab59ed1c 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -106,7 +106,8 @@ struct svc_rqst {
u32 rq_prot; /* IP protocol */
unsigned short rq_verfed : 1, /* reply has verifier */
rq_userset : 1, /* auth->setuser OK */
- rq_secure : 1; /* secure port */
+ rq_secure : 1, /* secure port */
+ rq_auth : 1; /* check client */
void * rq_argp; /* decoded arguments */
void * rq_resp; /* xdr'd results */
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index df16576d7..032293ea3 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -158,7 +158,7 @@ struct rpc_xprt {
*/
union { /* record marker & XID */
u32 header[2];
- u8 * data[8];
+ u8 data[8];
} tcp_recm;
struct rpc_rqst * tcp_rqstp;
struct iovec tcp_iovec[MAX_IOVEC];
diff --git a/include/linux/swap.h b/include/linux/swap.h
index d4fcf03b8..66ba5d623 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -1,6 +1,8 @@
#ifndef _LINUX_SWAP_H
#define _LINUX_SWAP_H
+#include <asm/page.h>
+
#define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */
#define SWAP_FLAG_PRIO_MASK 0x7fff
#define SWAP_FLAG_PRIO_SHIFT 0
@@ -26,6 +28,13 @@ union swap_header {
#ifdef __KERNEL__
+/*
+ * Max bad pages in the new format..
+ */
+#define __swapoffset(x) ((unsigned long)&((union swap_header *)0)->x)
+#define MAX_SWAP_BADPAGES \
+ ((__swapoffset(magic.magic) - __swapoffset(info.badpages)) / sizeof(int))
+
#undef DEBUG_SWAP
#include <asm/atomic.h>
@@ -69,12 +78,16 @@ struct sysinfo;
/* linux/ipc/shm.c */
extern int shm_swap (int, int);
+/* linux/mm/swap.c */
+extern void swap_setup (void);
+
/* linux/mm/vmscan.c */
-extern int try_to_free_pages(unsigned int gfp_mask, int count);
+extern int try_to_free_pages(unsigned int gfp_mask);
/* linux/mm/page_io.c */
extern void rw_swap_page(int, unsigned long, char *, int);
extern void rw_swap_page_nocache(int, unsigned long, char *);
+extern void rw_swap_page_nolock(int, unsigned long, char *, int);
extern void swap_after_unlock_page (unsigned long entry);
/* linux/mm/page_alloc.c */
@@ -87,6 +100,7 @@ extern void show_swap_cache_info(void);
extern int add_to_swap_cache(struct page *, unsigned long);
extern int swap_duplicate(unsigned long);
extern int swap_check_entry(unsigned long);
+struct page * lookup_swap_cache(unsigned long);
extern struct page * read_swap_cache_async(unsigned long, int);
#define read_swap_cache(entry) read_swap_cache_async(entry, 1);
extern int FASTCALL(swap_count(unsigned long));
@@ -125,9 +139,7 @@ asmlinkage int sys_swapon(const char *, int);
#ifdef SWAP_CACHE_INFO
extern unsigned long swap_cache_add_total;
-extern unsigned long swap_cache_add_success;
extern unsigned long swap_cache_del_total;
-extern unsigned long swap_cache_del_success;
extern unsigned long swap_cache_find_total;
extern unsigned long swap_cache_find_success;
#endif
@@ -152,12 +164,7 @@ static inline int is_page_shared(struct page *page)
return 1;
count = atomic_read(&page->count);
if (PageSwapCache(page))
- {
- /* PARANOID */
- if (page->inode != &swapper_inode)
- panic("swap cache page has wrong inode\n");
count += swap_count(page->offset) - 2;
- }
if (PageFreeAfter(page))
count--;
return count > 1;
diff --git a/include/linux/swapctl.h b/include/linux/swapctl.h
index 54fb59381..f9f2d2acb 100644
--- a/include/linux/swapctl.h
+++ b/include/linux/swapctl.h
@@ -4,33 +4,6 @@
#include <asm/page.h>
#include <linux/fs.h>
-/* Swap tuning control */
-
-typedef struct swap_control_v6
-{
- unsigned int sc_max_page_age;
- unsigned int sc_page_advance;
- unsigned int sc_page_decline;
- unsigned int sc_page_initial_age;
- unsigned int sc_age_cluster_fract;
- unsigned int sc_age_cluster_min;
- unsigned int sc_pageout_weight;
- unsigned int sc_bufferout_weight;
-} swap_control_v6;
-typedef struct swap_control_v6 swap_control_t;
-extern swap_control_t swap_control;
-
-typedef struct swapstat_v1
-{
- unsigned int wakeups;
- unsigned int pages_reclaimed;
- unsigned int pages_shm;
- unsigned int pages_mmap;
- unsigned int pages_swap;
-} swapstat_v1;
-typedef swapstat_v1 swapstat_t;
-extern swapstat_t swapstats;
-
typedef struct buffer_mem_v1
{
unsigned int min_percent;
@@ -59,41 +32,4 @@ typedef struct pager_daemon_v1
typedef pager_daemon_v1 pager_daemon_t;
extern pager_daemon_t pager_daemon;
-#define SC_VERSION 1
-#define SC_MAX_VERSION 1
-
-#ifdef __KERNEL__
-
-/* Define the maximum (least urgent) priority for the page reclaim code */
-#define RCL_MAXPRI 6
-/* We use an extra priority in the swap accounting code to represent
- failure to free a resource at any priority */
-#define RCL_FAILURE (RCL_MAXPRI + 1)
-
-#define AGE_CLUSTER_FRACT (swap_control.sc_age_cluster_fract)
-#define AGE_CLUSTER_MIN (swap_control.sc_age_cluster_min)
-#define PAGEOUT_WEIGHT (swap_control.sc_pageout_weight)
-#define BUFFEROUT_WEIGHT (swap_control.sc_bufferout_weight)
-
-/* Page aging (see mm/swap.c) */
-
-#define MAX_PAGE_AGE (swap_control.sc_max_page_age)
-#define PAGE_ADVANCE (swap_control.sc_page_advance)
-#define PAGE_DECLINE (swap_control.sc_page_decline)
-#define PAGE_INITIAL_AGE (swap_control.sc_page_initial_age)
-
-/* Given a resource of N units (pages or buffers etc), we only try to
- * age and reclaim AGE_CLUSTER_FRACT per 1024 resources each time we
- * scan the resource list. */
-static inline int AGE_CLUSTER_SIZE(int resources)
-{
- unsigned int n = (resources * AGE_CLUSTER_FRACT) >> 10;
- if (n < AGE_CLUSTER_MIN)
- return AGE_CLUSTER_MIN;
- else
- return n;
-}
-
-#endif /* __KERNEL */
-
#endif /* _LINUX_SWAPCTL_H */
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 20e3b9abf..413864d40 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -56,7 +56,7 @@ enum
CTL_PROC=4, /* Process info */
CTL_FS=5, /* Filesystems */
CTL_DEBUG=6, /* Debugging */
- CTL_DEV=7, /* Devices */
+ CTL_DEV=7 /* Devices */
};
@@ -89,6 +89,14 @@ enum
KERN_SG_BIG_BUFF=29,
KERN_ACCT=30, /* BSD process accounting parameters */
KERN_PPC_L2CR=31, /* l2cr register on PPC */
+
+ KERN_RTSIGNR=32, /* Number of rt sigs queued */
+ KERN_RTSIGMAX=33, /* Max queuable */
+
+ KERN_SHMMAX=34, /* int: Maximum shared memory segment */
+ KERN_MSGMAX=35, /* int: Maximum size of a messege */
+ KERN_MSGMNB=36, /* int: Maximum message queue size */
+ KERN_MSGPOOL=37 /* int: Maximum system message pool size */
};
@@ -103,7 +111,8 @@ enum
VM_BUFFERMEM=6, /* struct: Set buffer memory thresholds */
VM_PAGECACHE=7, /* struct: Set cache memory thresholds */
VM_PAGERDAEMON=8, /* struct: Control kswapd behaviour */
- VM_PGT_CACHE=9 /* struct: Set page table cache parameters */
+ VM_PGT_CACHE=9, /* struct: Set page table cache parameters */
+ VM_PAGE_CLUSTER=10 /* int: set number of pages to swap together */
};
@@ -140,7 +149,7 @@ enum
NET_CORE_FASTROUTE=7,
NET_CORE_MSG_COST=8,
NET_CORE_MSG_BURST=9,
- NET_CORE_OPTMEM_MAX=10,
+ NET_CORE_OPTMEM_MAX=10
};
/* /proc/sys/net/ethernet */
@@ -152,7 +161,7 @@ enum
enum
{
NET_UNIX_DESTROY_DELAY=1,
- NET_UNIX_DELETE_DELAY=2,
+ NET_UNIX_DELETE_DELAY=2
};
/* /proc/sys/net/ipv4 */
@@ -198,6 +207,8 @@ enum
NET_IPV4_ICMP_TIMEEXCEED_RATE=61,
NET_IPV4_ICMP_PARAMPROB_RATE=62,
NET_IPV4_ICMP_ECHOREPLY_RATE=63,
+ NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES=64,
+ NET_IPV4_IGMP_MAX_MEMBERSHIPS=65
};
enum {
@@ -214,13 +225,13 @@ enum {
NET_IPV4_ROUTE_REDIRECT_SILENCE=11,
NET_IPV4_ROUTE_ERROR_COST=12,
NET_IPV4_ROUTE_ERROR_BURST=13,
- NET_IPV4_ROUTE_GC_ELASTICITY=14,
+ NET_IPV4_ROUTE_GC_ELASTICITY=14
};
enum
{
NET_PROTO_CONF_ALL=-2,
- NET_PROTO_CONF_DEFAULT=-3,
+ NET_PROTO_CONF_DEFAULT=-3
/* And device ifindices ... */
};
@@ -237,14 +248,14 @@ enum
NET_IPV4_CONF_RP_FILTER=8,
NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE=9,
NET_IPV4_CONF_BOOTP_RELAY=10,
- NET_IPV4_CONF_LOG_MARTIANS=11,
+ NET_IPV4_CONF_LOG_MARTIANS=11
};
/* /proc/sys/net/ipv6 */
enum {
NET_IPV6_CONF=16,
NET_IPV6_NEIGH=17,
- NET_IPV6_ROUTE=18,
+ NET_IPV6_ROUTE=18
};
enum {
@@ -254,7 +265,7 @@ enum {
NET_IPV6_ROUTE_GC_MIN_INTERVAL=4,
NET_IPV6_ROUTE_GC_TIMEOUT=5,
NET_IPV6_ROUTE_GC_INTERVAL=6,
- NET_IPV6_ROUTE_GC_ELASTICITY=7,
+ NET_IPV6_ROUTE_GC_ELASTICITY=7
};
enum {
@@ -267,7 +278,7 @@ enum {
NET_IPV6_DAD_TRANSMITS=7,
NET_IPV6_RTR_SOLICITS=8,
NET_IPV6_RTR_SOLICIT_INTERVAL=9,
- NET_IPV6_RTR_SOLICIT_DELAY=10,
+ NET_IPV6_RTR_SOLICIT_DELAY=10
};
/* /proc/sys/net/<protocol>/neigh/<dev> */
@@ -298,7 +309,7 @@ enum {
NET_ATALK_AARP_EXPIRY_TIME=1,
NET_ATALK_AARP_TICK_TIME=2,
NET_ATALK_AARP_RETRANSMIT_LIMIT=3,
- NET_ATALK_AARP_RESOLVE_TIME=4,
+ NET_ATALK_AARP_RESOLVE_TIME=4
};
@@ -346,7 +357,7 @@ enum {
NET_ROSE_LINK_FAIL_TIMEOUT=7,
NET_ROSE_MAX_VCS=8,
NET_ROSE_WINDOW_SIZE=9,
- NET_ROSE_NO_ACTIVITY_TIMEOUT=10,
+ NET_ROSE_NO_ACTIVITY_TIMEOUT=10
};
/* /proc/sys/net/x25 */
@@ -388,7 +399,7 @@ enum
FS_MAXFILE=7, /* int:maximum number of filedescriptors that can be allocated */
FS_DENTRY=8,
FS_NRSUPER=9, /* int:current number of allocated super_blocks */
- FS_MAXSUPER=10, /* int:maximum number of super_blocks that can be allocated */
+ FS_MAXSUPER=10 /* int:maximum number of super_blocks that can be allocated */
};
/* CTL_DEBUG names: */
@@ -396,12 +407,12 @@ enum
/* CTL_DEV names: */
enum {
DEV_CDROM=1,
- DEV_HWMON=2,
+ DEV_HWMON=2
};
/* /proc/sys/dev/cdrom */
enum {
- DEV_CDROM_INFO=1,
+ DEV_CDROM_INFO=1
};
#ifdef __KERNEL__
diff --git a/include/linux/sysv_fs.h b/include/linux/sysv_fs.h
index 76dab1072..547e5c2c1 100644
--- a/include/linux/sysv_fs.h
+++ b/include/linux/sysv_fs.h
@@ -98,7 +98,9 @@ struct xenix_super_block {
char s_fill[371];
s32 s_magic; /* version of file system */
s32 s_type; /* type of file system: 1 for 512 byte blocks
- 2 for 1024 byte blocks */
+ 2 for 1024 byte blocks
+ 3 for 2048 byte blocks */
+
};
/* Xenix free list block on disk */
diff --git a/include/linux/tasks.h b/include/linux/tasks.h
index 4a82ad4e0..91b758f49 100644
--- a/include/linux/tasks.h
+++ b/include/linux/tasks.h
@@ -11,7 +11,7 @@
#define NR_CPUS 1
#endif
-#define NR_TASKS 512
+#define NR_TASKS 512 /* On x86 Max 4092, or 4090 w/APM configured. */
#define MAX_TASKS_PER_USER (NR_TASKS/2)
#define MIN_TASKS_LEFT_FOR_ROOT 4
diff --git a/include/linux/timex.h b/include/linux/timex.h
index df4743f58..653009adf 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -45,6 +45,8 @@
* Derived linux/timex.h
* 1995-08-13 Torsten Duwe
* kernel PLL updated to 1994-12-13 specs (rfc-1589)
+ * 1997-08-30 Ulrich Windl
+ * Added new constant NTP_PHASE_LIMIT
*/
#ifndef _LINUX_TIMEX_H
#define _LINUX_TIMEX_H
@@ -102,6 +104,7 @@
#define MAXTIME (200L << PPS_AVG) /* max PPS error (jitter) (200 us) */
#define MINSEC 16L /* min interval between updates (s) */
#define MAXSEC 1200L /* max interval between updates (s) */
+#define NTP_PHASE_LIMIT (MAXPHASE << 5) /* beyond max. dispersion */
/*
* The following defines are used only if a pulse-per-second (PPS)
diff --git a/include/linux/tty.h b/include/linux/tty.h
index f0e8e0656..854cbd1a8 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -304,6 +304,7 @@ struct tty_struct {
int canon_data;
unsigned long canon_head;
unsigned int canon_column;
+ struct semaphore atomic_read;
};
/* tty magic number */
@@ -325,6 +326,7 @@ struct tty_struct {
#define TTY_DO_WRITE_WAKEUP 5
#define TTY_PUSH 6
#define TTY_CLOSING 7
+#define TTY_DONT_FLIP 8
#define TTY_HW_COOK_OUT 14
#define TTY_HW_COOK_IN 15
#define TTY_PTY_LOCK 16
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index 0f5975b6e..65d26195f 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -110,12 +110,12 @@
#define UFS_MOUNT_ONERROR_UMOUNT 0x00000004
#define UFS_MOUNT_ONERROR_REPAIR 0x00000008
-#define UFS_MOUNT_UFSTYPE 0x000000F0
+#define UFS_MOUNT_UFSTYPE 0x000001F0
#define UFS_MOUNT_UFSTYPE_OLD 0x00000010
#define UFS_MOUNT_UFSTYPE_44BSD 0x00000020
#define UFS_MOUNT_UFSTYPE_SUN 0x00000040
#define UFS_MOUNT_UFSTYPE_NEXT 0x00000080
-
+#define UFS_MOUNT_UFSTYPE_OPENSTEP 0x00000100
#define ufs_clear_opt(o,opt) o &= ~UFS_MOUNT_##opt
#define ufs_set_opt(o,opt) o |= UFS_MOUNT_##opt
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index f8e85a1b1..57e5a2a12 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -1,9 +1,14 @@
#ifndef __LINUX_VIDEODEV_H
#define __LINUX_VIDEODEV_H
+#include <linux/types.h>
+#include <linux/version.h>
+
#ifdef __KERNEL__
+#if LINUX_VERSION_CODE >= 0x020100
#include <linux/poll.h>
+#endif
struct video_device
{
@@ -16,7 +21,9 @@ struct video_device
long (*read)(struct video_device *, char *, unsigned long, int noblock);
/* Do we need a write method ? */
long (*write)(struct video_device *, const char *, unsigned long, int noblock);
+#if LINUX_VERSION_CODE >= 0x020100
unsigned int (*poll)(struct video_device *, struct file *, poll_table *);
+#endif
int (*ioctl)(struct video_device *, unsigned int , void *);
int (*mmap)(struct video_device *, const char *, unsigned long);
int (*initialize)(struct video_device *);
@@ -48,7 +55,6 @@ extern void video_unregister_device(struct video_device *);
#define VID_TYPE_SCALES 128 /* Scalable */
#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
-#define VID_TYPE_OUTPUT 1024 /* Can output video data */
struct video_capability
{
@@ -120,6 +126,10 @@ struct video_picture
#define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */
#define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */
#define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */
+#define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */
+#define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */
+#define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */
+#define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */
};
struct video_audio
@@ -136,8 +146,8 @@ struct video_audio
char name[16];
#define VIDEO_SOUND_MONO 1
#define VIDEO_SOUND_STEREO 2
-#define VIDEO_SOUND_LANG1 3
-#define VIDEO_SOUND_LANG2 4
+#define VIDEO_SOUND_LANG1 4
+#define VIDEO_SOUND_LANG2 8
__u16 mode;
__u16 balance; /* Stereo balance */
__u16 step; /* Step actual volume uses */
@@ -261,7 +271,9 @@ struct video_unit
#define VID_HARDWARE_PERMEDIA2 14 /* Reserved for Permedia2 */
#define VID_HARDWARE_RIVA128 15 /* Reserved for RIVA 128 */
#define VID_HARDWARE_PLANB 16 /* PowerMac motherboard video-in */
-#define VID_HARDWARE_VINO 17
+#define VID_HARDWARE_BROADWAY 17 /* Broadway project */
+#define VID_HARDWARE_GEMTEK 18
+#define VID_HARDWARE_VINO 19 /* SGI Indy Vino */
/*
* Initialiser list
diff --git a/include/linux/wavefront.h b/include/linux/wavefront.h
index f5f4052d6..f96c52d04 100644
--- a/include/linux/wavefront.h
+++ b/include/linux/wavefront.h
@@ -307,7 +307,7 @@ struct wf_layer
UCHAR8 mute:1;
UCHAR8 split_point:7;
- UCHAR8 updown:1;
+ UCHAR8 play_below:1;
UCHAR8 pan_mod_src:2;
UCHAR8 pan_or_mod:1;
@@ -507,9 +507,16 @@ typedef union wf_any {
typedef struct wf_patch_info {
+ /* the first two fields are used by the OSS "patch loading" interface
+ only, and are unused by the current user-level library.
+ */
+
INT16 key; /* Use WAVEFRONT_PATCH here */
UINT16 devno; /* fill in when sending */
UCHAR8 subkey; /* WF_ST_{SAMPLE,ALIAS,etc.} */
+
+#define WAVEFRONT_FIND_FREE_SAMPLE_SLOT 999
+
UINT16 number; /* patch/sample/prog number */
UINT32 size; /* size of any data included in
@@ -548,13 +555,15 @@ typedef struct wf_patch_info {
*/
typedef struct wavefront_control {
- int devno; /* from /dev/sequencer interface */
int cmd; /* WFC_* */
char status; /* return status to user-space */
unsigned char rbuf[WF_MAX_READ]; /* bytes read from card */
unsigned char wbuf[WF_MAX_WRITE]; /* bytes written to card */
} wavefront_control;
+#define WFCTL_WFCMD 0x1
+#define WFCTL_LOAD_SPP 0x2
+
/* Modulator table */
#define WF_MOD_LFO1 0