summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-06-30 00:21:34 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-06-30 00:21:34 +0000
commit3917ac5846dd0f9ad1238166f90caab9912052e6 (patch)
tree1c298935def4f29edb39192365a65d73de999155 /include
parentaf2f803c8b2d469fe38e4a7ce952658dfcb6681a (diff)
o Merge with Linux 2.1.100.
o Cleanup the machine dependencies of floppy and rtc. The driver for the Dallas thingy in the Indy is still missing. o Handle allocation of zero'd pages correct for R4000SC / R4400SC. o Page colouring shit to match the virtual and physical colour of all mapped pages. This tends to produce extreme fragmentation problems, so it's deactivated for now. Users of R4000SC / R4400SC may re-enable the code in arch/mips/mm/init.c by removing the definition of CONF_GIVE_A_SHIT_ABOUT_COLOURS. Should get them somewhat further - but don't shake to hard ... o Fixed ptrace(2)-ing of syscalls, strace is now working again. o Fix the interrupt forwarding from the keyboard driver to the psaux driver, PS/2 mice are now working on the Indy. The fix is somewhat broken as it prevents generic kernels for Indy and machines which handle things different. o Things I can't remember.
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/floppy.h2
-rw-r--r--include/asm-alpha/ide.h2
-rw-r--r--include/asm-alpha/mmu_context.h18
-rw-r--r--include/asm-arm/floppy.h1
-rw-r--r--include/asm-arm/ide.h2
-rw-r--r--include/asm-arm/mmu_context.h1
-rw-r--r--include/asm-i386/ide.h2
-rw-r--r--include/asm-i386/mmu_context.h1
-rw-r--r--include/asm-i386/spinlock.h68
-rw-r--r--include/asm-i386/unistd.h2
-rw-r--r--include/asm-m68k/ide.h8
-rw-r--r--include/asm-m68k/mmu_context.h1
-rw-r--r--include/asm-mips/floppy.h112
-rw-r--r--include/asm-mips/ide.h4
-rw-r--r--include/asm-mips/irq.h11
-rw-r--r--include/asm-mips/mc146818rtc.h30
-rw-r--r--include/asm-mips/page.h57
-rw-r--r--include/asm-mips/pgtable.h8
-rw-r--r--include/asm-mips/sgihpc.h27
-rw-r--r--include/asm-mips/spinlock.h4
-rw-r--r--include/asm-mips/unistd.h9
-rw-r--r--include/asm-mips/vector.h54
-rw-r--r--include/asm-ppc/floppy.h1
-rw-r--r--include/asm-ppc/ide.h2
-rw-r--r--include/asm-ppc/mmu_context.h38
-rw-r--r--include/asm-sparc/floppy.h1
-rw-r--r--include/asm-sparc/mmu_context.h7
-rw-r--r--include/asm-sparc64/floppy.h1
-rw-r--r--include/asm-sparc64/ide.h4
-rw-r--r--include/asm-sparc64/mmu_context.h6
-rw-r--r--include/linux/blk.h22
-rw-r--r--include/linux/capability.h154
-rw-r--r--include/linux/coda_proc.h144
-rw-r--r--include/linux/coda_psdev.h2
-rw-r--r--include/linux/coda_sysctl.h10
-rw-r--r--include/linux/dcache.h2
-rw-r--r--include/linux/hdreg.h9
-rw-r--r--include/linux/icmpv6.h5
-rw-r--r--include/linux/ipv6.h22
-rw-r--r--include/linux/lp.h18
-rw-r--r--include/linux/pci.h80
-rw-r--r--include/linux/proc_fs.h19
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/swap.h6
-rw-r--r--include/linux/swapctl.h9
-rw-r--r--include/linux/sysctl.h3
-rw-r--r--include/linux/ufs_fs.h4
-rw-r--r--include/net/ipv6.h8
-rw-r--r--include/net/ndisc.h2
-rw-r--r--include/net/tcp.h2
-rw-r--r--include/scsi/scsi_ioctl.h2
51 files changed, 753 insertions, 256 deletions
diff --git a/include/asm-alpha/floppy.h b/include/asm-alpha/floppy.h
index 7337896fa..39c1e491c 100644
--- a/include/asm-alpha/floppy.h
+++ b/include/asm-alpha/floppy.h
@@ -33,8 +33,6 @@
"floppy", NULL)
#define fd_free_irq(irq) free_irq(irq, NULL);
-#define fd_cacheflush(addr,size) /* nothing */
-
__inline__ void virtual_dma_init(void)
{
/* Nothing to do on an Alpha */
diff --git a/include/asm-alpha/ide.h b/include/asm-alpha/ide.h
index bef186529..e8de11f12 100644
--- a/include/asm-alpha/ide.h
+++ b/include/asm-alpha/ide.h
@@ -19,7 +19,7 @@ typedef unsigned short ide_ioreg_t;
#define MAX_HWIFS 4
#endif
-#define ide_sti() sti()
+#define ide__sti() __sti()
static __inline__ int ide_default_irq(ide_ioreg_t base)
{
diff --git a/include/asm-alpha/mmu_context.h b/include/asm-alpha/mmu_context.h
index 285fafa05..0d4ab6b21 100644
--- a/include/asm-alpha/mmu_context.h
+++ b/include/asm-alpha/mmu_context.h
@@ -109,8 +109,24 @@ extern inline void get_mmu_context(struct task_struct *p)
#endif
}
-#define init_new_context(mm) do { } while(0)
+extern inline void init_new_context(struct mm_struct *mm)
+{
+ mm->context = 0;
+}
+
#define destroy_context(mm) do { } while(0)
+/*
+ * After we have set current->mm to a new value, this activates
+ * the context for the new mm so we see the new mappings.
+ * Ideally this would be an extern inline function, but reload_context
+ * is declared in pgtable.h, which includes this file. :-(
+ */
+#define activate_context(tsk) \
+ do { \
+ get_mmu_context(tsk); \
+ reload_context(tsk); \
+ } while (0)
+
#endif
diff --git a/include/asm-arm/floppy.h b/include/asm-arm/floppy.h
index 0f3857962..e753d579b 100644
--- a/include/asm-arm/floppy.h
+++ b/include/asm-arm/floppy.h
@@ -25,7 +25,6 @@
#define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA, (mode))
#define fd_set_dma_addr(addr) set_dma_addr(FLOPPY_DMA, virt_to_bus((addr)))
#define fd_set_dma_count(len) set_dma_count(FLOPPY_DMA, (len))
-#define fd_cacheflush(addr,sz)
/* Floppy_selects is the list of DOR's to select drive fd
*
diff --git a/include/asm-arm/ide.h b/include/asm-arm/ide.h
index 3710c2911..2ead7b36a 100644
--- a/include/asm-arm/ide.h
+++ b/include/asm-arm/ide.h
@@ -19,7 +19,7 @@ typedef unsigned long ide_ioreg_t;
#define MAX_HWIFS 4
#endif
-#define ide_sti() sti()
+#define ide__sti() __sti()
#include <asm/arch/ide.h>
diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h
index 7325fbaa4..f6e4c3e33 100644
--- a/include/asm-arm/mmu_context.h
+++ b/include/asm-arm/mmu_context.h
@@ -13,5 +13,6 @@
#define init_new_context(mm) do { } while(0)
#define destroy_context(mm) do { } while(0)
+#define activate_context(tsk) do { } while(0)
#endif
diff --git a/include/asm-i386/ide.h b/include/asm-i386/ide.h
index e61802fec..a6d1fc868 100644
--- a/include/asm-i386/ide.h
+++ b/include/asm-i386/ide.h
@@ -19,7 +19,7 @@ typedef unsigned short ide_ioreg_t;
#define MAX_HWIFS 6
#endif
-#define ide_sti() sti()
+#define ide__sti() __sti()
static __inline__ int ide_default_irq(ide_ioreg_t base)
{
diff --git a/include/asm-i386/mmu_context.h b/include/asm-i386/mmu_context.h
index 01b8bfcba..e8b812e2f 100644
--- a/include/asm-i386/mmu_context.h
+++ b/include/asm-i386/mmu_context.h
@@ -8,5 +8,6 @@
#define init_new_context(mm) do { } while(0)
#define destroy_context(mm) do { } while(0)
+#define activate_context(tsk) do { } while(0)
#endif
diff --git a/include/asm-i386/spinlock.h b/include/asm-i386/spinlock.h
index 48c586d6c..e6a42b227 100644
--- a/include/asm-i386/spinlock.h
+++ b/include/asm-i386/spinlock.h
@@ -3,6 +3,10 @@
#ifndef __SMP__
+#define DEBUG_SPINLOCKS 0 /* 0 == no debugging, 1 == maintain lock state, 2 == full debug */
+
+#if (DEBUG_SPINLOCKS < 1)
+
/*
* Your basic spinlocks, allowing only a single CPU anywhere
*/
@@ -11,7 +15,7 @@ typedef struct { } spinlock_t;
#define spin_lock_init(lock) do { } while(0)
#define spin_lock(lock) do { } while(0)
-#define spin_trylock(lock) do { } while(0)
+#define spin_trylock(lock) (1)
#define spin_unlock_wait(lock) do { } while(0)
#define spin_unlock(lock) do { } while(0)
#define spin_lock_irq(lock) cli()
@@ -22,6 +26,52 @@ typedef struct { } spinlock_t;
#define spin_unlock_irqrestore(lock, flags) \
restore_flags(flags)
+#elif (DEBUG_SPINLOCKS < 2)
+
+typedef struct {
+ volatile unsigned int lock;
+} spinlock_t;
+#define SPIN_LOCK_UNLOCKED { 0 }
+
+#define spin_lock_init(x) do { (x)->lock = 0; } while (0)
+#define spin_trylock(lock) (!test_and_set_bit(0,(lock)))
+
+#define spin_lock(x) do { (x)->lock = 1; } while (0)
+#define spin_unlock_wait(x) do { } while (0)
+#define spin_unlock(x) do { (x)->lock = 0; } while (0)
+#define spin_lock_irq(x) do { cli(); spin_lock(x); } while (0)
+#define spin_unlock_irq(x) do { spin_unlock(x); sti(); } while (0)
+
+#define spin_lock_irqsave(x, flags) \
+ do { save_flags(flags); spin_lock_irq(x); } while (0)
+#define spin_unlock_irqrestore(x, flags) \
+ do { spin_unlock(x); restore_flags(flags); } while (0)
+
+#else /* (DEBUG_SPINLOCKS >= 2) */
+
+typedef struct {
+ volatile unsigned int lock;
+ volatile unsigned int babble;
+ const char *module;
+} spinlock_t;
+#define SPIN_LOCK_UNLOCKED { 0, 25, __BASE_FILE__ }
+
+#include <linux/kernel.h>
+
+#define spin_lock_init(x) do { (x)->lock = 0; } while (0)
+#define spin_trylock(lock) (!test_and_set_bit(0,(lock)))
+
+#define spin_lock(x) do {unsigned long __spinflags; save_flags(__spinflags); cli(); if ((x)->lock&&(x)->babble) {printk("%s: spin_lock(%s:%p) already locked\n", __BASE_FILE__, (x)->module, (x));(x)->babble--;} (x)->lock = 1; restore_flags(__spinflags);} while (0)
+#define spin_unlock_wait(x) do {unsigned long __spinflags; save_flags(__spinflags); cli(); if ((x)->lock&&(x)->babble) {printk("%s: spin_unlock_wait(%s:%p) deadlock\n", __BASE_FILE__, (x)->module, (x));(x)->babble--;} restore_flags(__spinflags);} while (0)
+#define spin_unlock(x) do {unsigned long __spinflags; save_flags(__spinflags); cli(); if (!(x)->lock&&(x)->babble) {printk("%s: spin_unlock(%s:%p) not locked\n", __BASE_FILE__, (x)->module, (x));(x)->babble--;} (x)->lock = 0; restore_flags(__spinflags);} while (0)
+#define spin_lock_irq(x) do {cli(); if ((x)->lock&&(x)->babble) {printk("%s: spin_lock_irq(%s:%p) already locked\n", __BASE_FILE__, (x)->module, (x));(x)->babble--;} (x)->lock = 1;} while (0)
+#define spin_unlock_irq(x) do {cli(); if ((x)->lock&&(x)->babble) {printk("%s: spin_lock(%s:%p) already locked\n", __BASE_FILE__, (x)->module, (x));(x)->babble--;} (x)->lock = 1; sti();} while (0)
+
+#define spin_lock_irqsave(x,flags) do {save_flags(flags); cli(); if ((x)->lock&&(x)->babble) {printk("%s: spin_lock_irqsave(%s:%p) already locked\n", __BASE_FILE__, (x)->module, (x));(x)->babble--;} (x)->lock = 1;} while (0)
+#define spin_unlock_irqrestore(x,flags) do {cli(); if (!(x)->lock&&(x)->babble) {printk("%s: spin_unlock_irqrestore(%s:%p) not locked\n", __BASE_FILE__, (x)->module, (x));(x)->babble--;} (x)->lock = 0; restore_flags(flags);} while (0)
+
+#endif /* DEBUG_SPINLOCKS */
+
/*
* Read-write spinlocks, allowing multiple readers
* but only one writer.
@@ -53,13 +103,10 @@ typedef struct { } rwlock_t;
#define write_unlock_irqrestore(lock, flags) \
restore_flags(flags)
-#else
+#else /* __SMP__ */
/*
- * Simple spin lock operations. There are two variants, one clears IRQ's
- * on the local processor, one does not.
- *
- * We make no fairness assumptions. They have a cost.
+ * Your basic spinlocks, allowing only a single CPU anywhere
*/
typedef struct {
@@ -69,6 +116,13 @@ typedef struct {
#define SPIN_LOCK_UNLOCKED { 0 }
#define spin_lock_init(x) do { (x)->lock = 0; } while(0)
+/*
+ * Simple spin lock operations. There are two variants, one clears IRQ's
+ * on the local processor, one does not.
+ *
+ * We make no fairness assumptions. They have a cost.
+ */
+
#define spin_unlock_wait(x) do { barrier(); } while(((volatile spinlock_t *)(x))->lock)
typedef struct { unsigned long a[100]; } __dummy_lock_t;
@@ -176,5 +230,5 @@ typedef struct {
#define write_unlock_irqrestore(lock, flags) \
do { write_unlock(lock); __restore_flags(flags); } while (0)
-#endif /* SMP */
+#endif /* __SMP__ */
#endif /* __ASM_SPINLOCK_H */
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index 3ac10a193..018f6f0f5 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -189,6 +189,8 @@
#define __NR_pwrite 181
#define __NR_chown 182
#define __NR_getcwd 183
+#define __NR_capget 184
+#define __NR_capset 185
/* user-visible error numbers are in the range -1 - -122: see <asm-i386/errno.h> */
diff --git a/include/asm-m68k/ide.h b/include/asm-m68k/ide.h
index 0a0222ac5..a69ef5b18 100644
--- a/include/asm-m68k/ide.h
+++ b/include/asm-m68k/ide.h
@@ -424,17 +424,17 @@ static __inline__ void ide_get_lock (int *ide_lock, void (*handler)(int, void *,
* works. (Roman)
*/
#if defined(CONFIG_ATARI) && !defined(CONFIG_AMIGA)
-#define ide_sti() \
+#define ide__sti() \
do { \
- if (!in_interrupt()) sti(); \
+ if (!in_interrupt()) __sti(); \
} while(0)
#elif defined(CONFIG_ATARI)
-#define ide_sti() \
+#define ide__sti() \
do { \
if (!MACH_IS_ATARI || !in_interrupt()) sti(); \
} while(0)
#else /* !defined(CONFIG_ATARI) */
-#define ide_sti() sti()
+#define ide__sti() __sti()
#endif
#endif /* __KERNEL__ */
diff --git a/include/asm-m68k/mmu_context.h b/include/asm-m68k/mmu_context.h
index 853ce4b71..4850dd404 100644
--- a/include/asm-m68k/mmu_context.h
+++ b/include/asm-m68k/mmu_context.h
@@ -8,5 +8,6 @@
#define init_new_context(mm) do { } while(0)
#define destroy_context(mm) do { } while(0)
+#define activate_context(tsk) do { } while(0)
#endif
diff --git a/include/asm-mips/floppy.h b/include/asm-mips/floppy.h
index d047a68dd..39a68b582 100644
--- a/include/asm-mips/floppy.h
+++ b/include/asm-mips/floppy.h
@@ -1,13 +1,12 @@
-/*
+/* $Id: floppy.h,v 1.4 1997/12/01 18:00:37 ralf Exp $
+ *
* Architecture specific parts of the Floppy driver
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (C) 1995, 1996, 1997 Ralf Baechle
- *
- * $Id: floppy.h,v 1.3 1997/09/07 03:59:02 ralf Exp $
+ * Copyright (C) 1995, 1996, 1997, 1998 Ralf Baechle
*/
#ifndef __ASM_MIPS_FLOPPY_H
#define __ASM_MIPS_FLOPPY_H
@@ -17,72 +16,60 @@
#include <asm/jazz.h>
#include <asm/jazzdma.h>
#include <asm/mipsconfig.h>
-#include <asm/vector.h>
-#define fd_inb(port) feature->fd_inb(port)
-#define fd_outb(value,port) feature->fd_outb(value,port)
-
-#define fd_enable_dma(channel) feature->fd_enable_dma(channel)
-#define fd_disable_dma(channel) feature->fd_disable_dma(channel)
-#define fd_request_dma(channel) feature->fd_request_dma(channel)
-#define fd_free_dma(channel) feature->fd_free_dma(channel)
-#define fd_clear_dma_ff(channel) feature->fd_clear_dma_ff(channel)
-#define fd_set_dma_mode(channel, mode) feature->fd_set_dma_mode(channel, mode)
-#define fd_set_dma_addr(channel, addr) feature->fd_set_dma_addr(channel, \
+struct fd_ops {
+ unsigned char (*fd_inb)(unsigned int port);
+ void (*fd_outb)(unsigned char value, unsigned int port);
+
+ /*
+ * How to access the floppy DMA functions.
+ */
+ void (*fd_enable_dma)(int channel);
+ void (*fd_disable_dma)(int channel);
+ int (*fd_request_dma)(int channel);
+ void (*fd_free_dma)(int channel);
+ void (*fd_clear_dma_ff)(int channel);
+ void (*fd_set_dma_mode)(int channel, char mode);
+ void (*fd_set_dma_addr)(int channel, unsigned int a);
+ void (*fd_set_dma_count)(int channel, unsigned int count);
+ int (*fd_get_dma_residue)(int channel);
+ void (*fd_enable_irq)(int irq);
+ void (*fd_disable_irq)(int irq);
+ unsigned long (*fd_getfdaddr1)(void);
+ unsigned long (*fd_dma_mem_alloc)(unsigned long size);
+ void (*fd_dma_mem_free)(unsigned long addr, unsigned long size);
+ unsigned long (*fd_drive_type)(unsigned long);
+};
+
+extern struct fd_ops *fd_ops;
+
+#define fd_inb(port) fd_ops->fd_inb(port)
+#define fd_outb(value,port) fd_ops->fd_outb(value,port)
+
+#define fd_enable_dma(channel) fd_ops->fd_enable_dma(channel)
+#define fd_disable_dma(channel) fd_ops->fd_disable_dma(channel)
+#define fd_request_dma(channel) fd_ops->fd_request_dma(channel)
+#define fd_free_dma(channel) fd_ops->fd_free_dma(channel)
+#define fd_clear_dma_ff(channel) fd_ops->fd_clear_dma_ff(channel)
+#define fd_set_dma_mode(channel, mode) fd_ops->fd_set_dma_mode(channel, mode)
+#define fd_set_dma_addr(channel, addr) fd_ops->fd_set_dma_addr(channel, \
virt_to_bus(addr))
-#define fd_set_dma_count(channel,count) feature->fd_set_dma_count(channel,count)
-#define fd_get_dma_residue(channel) feature->fd_get_dma_residue(channel)
+#define fd_set_dma_count(channel,count) fd_ops->fd_set_dma_count(channel,count)
+#define fd_get_dma_residue(channel) fd_ops->fd_get_dma_residue(channel)
-#define fd_enable_irq(irq) feature->fd_enable_irq(irq)
-#define fd_disable_irq(irq) feature->fd_disable_irq(irq)
+#define fd_enable_irq(irq) fd_ops->fd_enable_irq(irq)
+#define fd_disable_irq(irq) fd_ops->fd_disable_irq(irq)
#define fd_request_irq(irq) request_irq(irq, floppy_interrupt, \
SA_INTERRUPT \
| SA_SAMPLE_RANDOM, \
"floppy", NULL)
#define fd_free_irq(irq) free_irq(irq, NULL);
+#define fd_dma_mem_alloc(size) fd_ops->fd_dma_mem_alloc(size)
+#define fd_dma_mem_free(mem,size) fd_ops->fd_dma_mem_free(mem,size)
+#define fd_drive_type(n) fd_ops->fd_drive_type(n)
#define MAX_BUFFER_SECTORS 24
-/* Pure 2^n version of get_order */
-extern inline int __get_order(unsigned long size)
-{
- int order;
-
- size = (size-1) >> (PAGE_SHIFT-1);
- order = -1;
- do {
- size >>= 1;
- order++;
- } while (size);
- return order;
-}
-
-extern inline unsigned long mips_dma_mem_alloc(unsigned long size)
-{
- int order = __get_order(size);
- unsigned long mem;
-
- mem = __get_dma_pages(GFP_KERNEL,order);
- if(!mem)
- return 0;
-#ifdef CONFIG_MIPS_JAZZ
- if (mips_machgroup == MACH_GROUP_JAZZ)
- vdma_alloc(PHYSADDR(mem), size);
-#endif
- return mem;
-}
-
-extern inline void mips_dma_mem_free(unsigned long addr, unsigned long size)
-{
-#ifdef CONFIG_MIPS_JAZZ
- if (mips_machgroup == MACH_GROUP_JAZZ)
- vdma_free(PHYSADDR(addr));
-#endif
- free_pages(addr, __get_order(size));
-}
-
-#define fd_dma_mem_alloc(size) mips_dma_mem_alloc(size)
-#define fd_dma_mem_free(mem,size) mips_dma_mem_free(mem,size)
/*
* And on Mips's the CMOS info fails also ...
@@ -90,11 +77,10 @@ extern inline void mips_dma_mem_free(unsigned long addr, unsigned long size)
* FIXME: This information should come from the ARC configuration tree
* or whereever a particular machine has stored this ...
*/
-#define FLOPPY0_TYPE 4 /* this is wrong for the Olli M700, but who cares... */
-#define FLOPPY1_TYPE 0
+#define FLOPPY0_TYPE fd_drive_type(0)
+#define FLOPPY1_TYPE fd_drive_type(1)
-#define FDC1 ((mips_machgroup == MACH_GROUP_JAZZ) ? \
- JAZZ_FDC_BASE : 0x3f0)
+#define FDC1 fd_ops->fd_getfdaddr1();
static int FDC2=-1;
#define N_FDC 1 /* do you *really* want a second controller? */
diff --git a/include/asm-mips/ide.h b/include/asm-mips/ide.h
index 9a775063f..bc2732311 100644
--- a/include/asm-mips/ide.h
+++ b/include/asm-mips/ide.h
@@ -1,4 +1,4 @@
-/* $Id: ide.h,v 1.3 1998/05/03 21:46:15 ralf Exp $
+/* $Id: ide.h,v 1.3 1998/05/07 03:02:49 ralf Exp $
*
* linux/include/asm-mips/ide.h
*
@@ -20,7 +20,7 @@ typedef unsigned short ide_ioreg_t;
#define MAX_HWIFS 6
#endif
-#define ide_sti() sti()
+#define ide__sti() __sti()
struct ide_ops {
int (*ide_default_irq)(ide_ioreg_t base);
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h
index 20b7accd8..ce3f5fdbe 100644
--- a/include/asm-mips/irq.h
+++ b/include/asm-mips/irq.h
@@ -1,13 +1,11 @@
-/*
- * include/asm-mips/irq.h
+/* $Id: irq.h,v 1.4 1998/05/28 03:18:13 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (C) 1994 by Waldorf GMBH
- * written by Ralf Baechle
- *
+ * Copyright (C) 1994 by Waldorf GMBH, written by Ralf Baechle
+ * Copyright (C) 1995, 1996, 1997, 1998 by Ralf Baechle
*/
#ifndef __ASM_MIPS_IRQ_H
#define __ASM_MIPS_IRQ_H
@@ -35,4 +33,7 @@ extern unsigned int local_irq_count[];
#define irq_exit(cpu, irq) (--local_irq_count[cpu])
#endif
+/* Machine specific interrupt initialization */
+extern void (*irq_setup)(void);
+
#endif /* __ASM_MIPS_IRQ_H */
diff --git a/include/asm-mips/mc146818rtc.h b/include/asm-mips/mc146818rtc.h
index 0e2700526..2b455951e 100644
--- a/include/asm-mips/mc146818rtc.h
+++ b/include/asm-mips/mc146818rtc.h
@@ -1,15 +1,20 @@
-/*
+/* $Id: mc146818rtc.h,v 1.3 1998/06/25 20:19:26 ralf Exp $
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
* Machine dependent access functions for RTC registers.
+ *
+ * Copyright (C) 1996, 1997, 1998 Ralf Baechle
*/
#ifndef __ASM_MIPS_MC146818RTC_H
#define __ASM_MIPS_MC146818RTC_H
#include <asm/io.h>
-#include <asm/vector.h>
#ifndef RTC_PORT
#define RTC_PORT(x) (0x70 + (x))
-#define RTC_ALWAYS_BCD 0 /* RTC operates in binary mode */
#endif
/*
@@ -17,10 +22,25 @@
* an ISA port access but the way to access the date register differs ...
*/
#define CMOS_READ(addr) ({ \
-feature->rtc_read_data(addr); \
+rtc_ops->rtc_read_data(addr); \
})
#define CMOS_WRITE(val, addr) ({ \
-feature->rtc_write_data(val, addr); \
+rtc_ops->rtc_write_data(val, addr); \
})
+#define RTC_ALWAYS_BCD \
+rtc_ops->rtc_bcd_mode()
+
+/*
+ * This structure defines how to access various features of
+ * different machine types and how to access them.
+ */
+struct rtc_ops {
+ /* How to access the RTC register in a DS1287. */
+ unsigned char (*rtc_read_data)(unsigned long addr);
+ void (*rtc_write_data)(unsigned char data, unsigned long addr);
+ int (*rtc_bcd_mode)(void);
+};
+
+extern struct rtc_ops *rtc_ops;
#endif /* __ASM_MIPS_MC146818RTC_H */
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index ba42d3baa..eb28c5e21 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -1,11 +1,12 @@
-/*
+/* $Id: page.h,v 1.2 1998/05/09 02:57:49 ralf Exp $
+ *
* Definitions for page handling
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (C) 1994, 1995, 1996 by Ralf Baechle
+ * Copyright (C) 1994 - 1998 by Ralf Baechle
*/
#ifndef __ASM_MIPS_PAGE_H
#define __ASM_MIPS_PAGE_H
@@ -21,6 +22,58 @@
#ifndef __LANGUAGE_ASSEMBLY__
+#ifdef __SMP__
+#define ULOCK_DECLARE extern spinlock_t user_page_lock;
+#else
+#define ULOCK_DECLARE
+#endif
+struct upcache {
+ struct page *list;
+ unsigned long count;
+};
+extern struct upcache user_page_cache[8];
+#define USER_PAGE_WATER 16
+
+extern unsigned long get_user_page_slow(int which);
+extern unsigned long user_page_colours, user_page_order;
+
+#define get_user_page(__vaddr) \
+({ \
+ ULOCK_DECLARE \
+ int which = ((__vaddr) >> PAGE_SHIFT) & user_page_colours; \
+ struct upcache *up = &user_page_cache[which]; \
+ struct page *p; \
+ unsigned long ret; \
+ spin_lock(&user_page_lock); \
+ if((p = up->list) != NULL) { \
+ up->list = p->next; \
+ up->count--; \
+ } \
+ spin_unlock(&user_page_lock); \
+ if(p != NULL) \
+ ret = PAGE_OFFSET+PAGE_SIZE*p->map_nr; \
+ else \
+ ret = get_user_page_slow(which); \
+ ret; \
+})
+
+#define free_user_page(__page, __addr) \
+do { \
+ ULOCK_DECLARE \
+ int which = ((__addr) >> PAGE_SHIFT) & user_page_colours; \
+ struct upcache *up = &user_page_cache[which]; \
+ if(atomic_read(&(__page)->count) == 1 && \
+ up->count < USER_PAGE_WATER) { \
+ spin_lock(&user_page_lock); \
+ (__page)->age = PAGE_INITIAL_AGE; \
+ (__page)->next = up->list; \
+ up->list = (__page); \
+ up->count++; \
+ spin_unlock(&user_page_lock); \
+ } else \
+ free_page(__addr); \
+} while(0)
+
extern void (*clear_page)(unsigned long page);
extern void (*copy_page)(unsigned long to, unsigned long from);
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index dbecc0da9..3d96baec7 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -170,13 +170,13 @@ extern void (*add_wired_entry)(unsigned long entrylo0, unsigned long entrylo1,
extern pte_t __bad_page(void);
extern pte_t *__bad_pagetable(void);
-extern unsigned long __zero_page(void);
-
-extern unsigned long empty_zero_page[1024];
+extern unsigned long empty_zero_page;
+extern unsigned long zero_page_mask;
#define BAD_PAGETABLE __bad_pagetable()
#define BAD_PAGE __bad_page()
-#define ZERO_PAGE ((unsigned long)empty_zero_page)
+#define ZERO_PAGE(__vaddr) \
+ (empty_zero_page + (((unsigned long)(__vaddr)) & zero_page_mask))
/* number of bits that fit into a memory pointer */
#define BITS_PER_PTR (8*sizeof(unsigned long))
diff --git a/include/asm-mips/sgihpc.h b/include/asm-mips/sgihpc.h
index e3c28b495..d4369c545 100644
--- a/include/asm-mips/sgihpc.h
+++ b/include/asm-mips/sgihpc.h
@@ -1,9 +1,11 @@
-/* $Id: sgihpc.h,v 1.7 1996/06/16 07:22:30 dm Exp $
+/* $Id: sgihpc.h,v 1.2 1998/06/25 20:15:04 ralf Exp $
+ *
* sgihpc.h: Various HPC I/O controller defines. The HPC is basically
* the approximate functional equivalent of the Sun SYSIO
* on SGI INDY machines.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * Copyright (C) 1998 Ralf Baechle (ralf@gnu.org)
*/
#ifndef _MIPS_SGIHPC_H
#define _MIPS_SGIHPC_H
@@ -335,6 +337,29 @@ struct hpc_keyb {
#endif
};
+/* Indy RTC */
+
+/* The layout of registers for the INDY Dallas 1286 clock chipset. */
+struct indy_clock {
+ volatile unsigned int hsec;
+ volatile unsigned int sec;
+ volatile unsigned int min;
+ volatile unsigned int malarm;
+ volatile unsigned int hr;
+ volatile unsigned int halarm;
+ volatile unsigned int day;
+ volatile unsigned int dalarm;
+ volatile unsigned int date;
+ volatile unsigned int month;
+ volatile unsigned int year;
+ volatile unsigned int cmd;
+ volatile unsigned int whsec;
+ volatile unsigned int wsec;
+ volatile unsigned int _unused0[50];
+};
+
+#define INDY_CLOCK_REGS (KSEG1ADDR(0x1fbe0000))
+
extern void sgihpc_init(void);
#endif /* !(_MIPS_SGIHPC_H) */
diff --git a/include/asm-mips/spinlock.h b/include/asm-mips/spinlock.h
index 85376edfd..31390a14b 100644
--- a/include/asm-mips/spinlock.h
+++ b/include/asm-mips/spinlock.h
@@ -1,3 +1,5 @@
+/* $Id: spinlock.h,v 1.2 1998/05/07 15:21:41 ralf Exp $
+ */
#ifndef __ASM_MIPS_SPINLOCK_H
#define __ASM_MIPS_SPINLOCK_H
@@ -10,7 +12,7 @@ typedef struct { } spinlock_t;
#define spin_lock_init(lock) do { } while(0)
#define spin_lock(lock) do { } while(0)
-#define spin_trylock(lock) do { } while(0)
+#define spin_trylock(lock) (1)
#define spin_unlock_wait(lock) do { } while(0)
#define spin_unlock(lock) do { } while(0)
#define spin_lock_irq(lock) cli()
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index 7764e8a85..a9640faa5 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -1,11 +1,12 @@
-/*
+/* $Id: unistd.h,v 1.13 1998/05/07 15:21:41 ralf Exp $
+ *
* This file contains the system call numbers.
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (C) 1995, 1996, 1997 by Ralf Baechle
+ * Copyright (C) 1995, 1996, 1997, 1998 by Ralf Baechle
*
* Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto
* the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A
@@ -1191,11 +1192,13 @@
#define __NR_pwrite (__NR_Linux + 201)
#define __NR_chown (__NR_Linux + 202)
#define __NR_getcwd (__NR_Linux + 203)
+#define __NR_capget (__NR_Linux + 204)
+#define __NR_capset (__NR_Linux + 205)
/*
* Offset of the last Linux flavoured syscall
*/
-#define __NR_Linux_syscalls 203
+#define __NR_Linux_syscalls 205
#ifndef __LANGUAGE_ASSEMBLY__
diff --git a/include/asm-mips/vector.h b/include/asm-mips/vector.h
index 5d5d40702..e69de29bb 100644
--- a/include/asm-mips/vector.h
+++ b/include/asm-mips/vector.h
@@ -1,54 +0,0 @@
-/*
- * include/asm-mips/vector.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1995, 1996, 1997 by Ralf Baechle
- */
-#ifndef __ASM_MIPS_VECTOR_H
-#define __ASM_MIPS_VECTOR_H
-
-/*
- * These vector structures are not very good to maintain - they'd probably
- * grow to at leat three times the size - so I'll remove 'em and replace
- * the with lots of ordinary variables.
- */
-extern void (*irq_setup)(void);
-extern asmlinkage void (*fd_cacheflush)(const void *addr, size_t size);
-
-/*
- * This structure defines how to access various features of
- * different machine types and how to access them.
- */
-struct feature {
- /*
- * How to access the floppy controller's ports.
- */
- unsigned char (*fd_inb)(unsigned int port);
- void (*fd_outb)(unsigned char value, unsigned int port);
- /*
- * How to access the floppy DMA functions.
- */
- void (*fd_enable_dma)(int channel);
- void (*fd_disable_dma)(int channel);
- int (*fd_request_dma)(int channel);
- void (*fd_free_dma)(int channel);
- void (*fd_clear_dma_ff)(int channel);
- void (*fd_set_dma_mode)(int channel, char mode);
- void (*fd_set_dma_addr)(int channel, unsigned int a);
- void (*fd_set_dma_count)(int channel, unsigned int count);
- int (*fd_get_dma_residue)(int channel);
- void (*fd_enable_irq)(int irq);
- void (*fd_disable_irq)(int irq);
- /*
- * How to access the RTC register of the DS1287?
- */
- unsigned char (*rtc_read_data)(unsigned long addr);
- void (*rtc_write_data)(unsigned char data, unsigned long addr);
-};
-
-extern struct feature *feature;
-
-#endif /* __ASM_MIPS_VECTOR_H */
diff --git a/include/asm-ppc/floppy.h b/include/asm-ppc/floppy.h
index 580350eb0..eb7269cbc 100644
--- a/include/asm-ppc/floppy.h
+++ b/include/asm-ppc/floppy.h
@@ -25,7 +25,6 @@
#define fd_enable_irq(irq) enable_irq(irq)
#define fd_disable_irq(irq) disable_irq(irq)
-#define fd_cacheflush(addr,size) /* nothing */
#define fd_request_irq() request_irq(irq, floppy_interrupt, \
SA_INTERRUPT \
| SA_SAMPLE_RANDOM, \
diff --git a/include/asm-ppc/ide.h b/include/asm-ppc/ide.h
index efbd4b363..d9e25bace 100644
--- a/include/asm-ppc/ide.h
+++ b/include/asm-ppc/ide.h
@@ -26,7 +26,7 @@
#define SUPPORT_VLB_SYNC 0
-#define ide_sti() sti()
+#define ide__sti() __sti()
typedef unsigned int ide_ioreg_t;
void ide_init_hwif_ports(ide_ioreg_t *p, ide_ioreg_t base, int *irq);
diff --git a/include/asm-ppc/mmu_context.h b/include/asm-ppc/mmu_context.h
index d715f4ca4..0f06f16fe 100644
--- a/include/asm-ppc/mmu_context.h
+++ b/include/asm-ppc/mmu_context.h
@@ -22,9 +22,20 @@
#ifdef CONFIG_8xx
#define NO_CONTEXT 16
#define LAST_CONTEXT 15
+#define MUNGE_CONTEXT(n) (n)
+
#else
+
+/* PPC 6xx, 7xx CPUs */
#define NO_CONTEXT 0
#define LAST_CONTEXT 0xfffff
+
+/*
+ * Allocating context numbers this way tends to spread out
+ * the entries in the hash table better than a simple linear
+ * allocation.
+ */
+#define MUNGE_CONTEXT(n) (((n) * 897) & LAST_CONTEXT)
#endif
extern int next_mmu_context;
@@ -36,17 +47,6 @@ extern void set_context(int context);
#define set_context(context) do { } while (0)
#endif
-#ifndef CONFIG_8xx
-/*
- * Allocating context numbers this way tends to spread out
- * the entries in the hash table better than a simple linear
- * allocation.
- */
-#define MUNGE_CONTEXT(n) (((n) * 897) & LAST_CONTEXT)
-#else
-#define MUNGE_CONTEXT(n) (n)
-#endif
-
/*
* Get a new mmu context for task tsk if necessary.
*/
@@ -57,8 +57,6 @@ do { \
if (next_mmu_context == LAST_CONTEXT) \
mmu_context_overflow(); \
mm->context = MUNGE_CONTEXT(++next_mmu_context);\
- if ( tsk == current ) \
- set_context(mm->context); \
} \
} while (0)
@@ -70,11 +68,17 @@ do { \
/*
* We're finished using the context for an address space.
*/
-#ifdef CONFIG_8xx
#define destroy_context(mm) ((mm)->context = NO_CONTEXT)
-#else
-#define destroy_context(mm) do { } while (0)
-#endif
+
+/*
+ * After we have set current->mm to a new value, this activates
+ * the context for the new mm so we see the new mappings.
+ */
+extern inline void activate_context(struct task_struct *tsk)
+{
+ get_mmu_context(tsk);
+ set_context(tsk->mm->context);
+}
/*
* compute the vsid from the context and segment
diff --git a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h
index e4001b10b..2c57f09d3 100644
--- a/include/asm-sparc/floppy.h
+++ b/include/asm-sparc/floppy.h
@@ -68,7 +68,6 @@ static struct sun_floppy_ops sun_fdops;
#define fd_request_irq(irq) sun_fd_request_irq()
#define fd_free_irq(irq) /* nothing... */
-#define fd_cacheflush(addr, size) /* nothing... */
#if 0 /* P3: added by Alain, these cause a MMU corruption. 19960524 XXX */
#define fd_dma_mem_alloc(size) ((unsigned long) vmalloc(size))
#define fd_dma_mem_free(addr,size) (vfree((void *)(addr)))
diff --git a/include/asm-sparc/mmu_context.h b/include/asm-sparc/mmu_context.h
index d6ac7e922..d73b71f94 100644
--- a/include/asm-sparc/mmu_context.h
+++ b/include/asm-sparc/mmu_context.h
@@ -22,4 +22,11 @@ BTFIXUPDEF_CALL(void, destroy_context, struct mm_struct *)
#define destroy_context(mm) BTFIXUP_CALL(destroy_context)(mm)
+/*
+ * After we have set current->mm to a new value, this activates
+ * the context for the new mm so we see the new mappings.
+ * XXX this presumably needs a sensible implementation - paulus.
+ */
+#define activate_context(tsk) do { } while(0)
+
#endif /* !(__SPARC_MMU_CONTEXT_H) */
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h
index 4ae034a33..ea5208f85 100644
--- a/include/asm-sparc64/floppy.h
+++ b/include/asm-sparc64/floppy.h
@@ -81,7 +81,6 @@ static struct sun_floppy_ops sun_fdops;
#define fd_free_irq(irq) /* nothing... */
#define fd_eject(drive) sun_fdops.fd_eject(drive)
-#define fd_cacheflush(addr, size) /* nothing... */
#if 0 /* P3: added by Alain, these cause a MMU corruption. 19960524 XXX */
#define fd_dma_mem_alloc(size) ((unsigned long) vmalloc(size))
#define fd_dma_mem_free(addr,size) (vfree((void *)(addr)))
diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h
index f72c264c8..acd593303 100644
--- a/include/asm-sparc64/ide.h
+++ b/include/asm-sparc64/ide.h
@@ -15,7 +15,7 @@ typedef unsigned long ide_ioreg_t;
#undef MAX_HWIFS
#define MAX_HWIFS 2
-#define ide_sti() sti()
+#define ide__sti() __sti()
static __inline__ int ide_default_irq(ide_ioreg_t base)
{
@@ -38,7 +38,7 @@ static __inline__ void ide_init_hwif_ports(ide_ioreg_t *p, ide_ioreg_t base, int
for ( ; i < 10; i++)
*p++ = 0;
/* PCI code needs to figure out this. */
- if(irq != NULL)
+ if (irq != NULL)
*irq = 0;
}
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h
index b92481dd5..44209a120 100644
--- a/include/asm-sparc64/mmu_context.h
+++ b/include/asm-sparc64/mmu_context.h
@@ -72,6 +72,12 @@ extern __inline__ void get_mmu_context(struct task_struct *tsk)
: "o4");
}
+/*
+ * After we have set current->mm to a new value, this activates
+ * the context for the new mm so we see the new mappings.
+ */
+#define activate_context(tsk) get_mmu_context(tsk)
+
#endif /* !(__ASSEMBLY__) */
#endif /* !(__SPARC64_MMU_CONTEXT_H) */
diff --git a/include/linux/blk.h b/include/linux/blk.h
index 5101379f4..d7dc45db6 100644
--- a/include/linux/blk.h
+++ b/include/linux/blk.h
@@ -95,7 +95,7 @@ void initrd_init(void);
#endif
#define RO_IOCTLS(dev,where) \
- case BLKROSET: { int __val; if (!suser()) return -EACCES; \
+ case BLKROSET: { int __val; if (!capable(CAP_SYS_ADMIN)) return -EACCES; \
if (get_user(__val, (int *)(where))) return -EFAULT; \
set_device_ro((dev),__val); return 0; } \
case BLKROGET: { int __val = (is_read_only(dev) != 0) ; \
@@ -411,14 +411,20 @@ void ide_end_request(byte uptodate, ide_hwgroup_t *hwgroup);
#ifdef IDE_DRIVER
void ide_end_request(byte uptodate, ide_hwgroup_t *hwgroup) {
- struct request *req = hwgroup->rq;
+ int nsect;
+ struct buffer_head *bh;
+ struct request *req;
+ unsigned long flags;
+
+ spin_lock_irqsave(&io_request_lock,flags);
+ req = hwgroup->rq;
#else
static void end_request(int uptodate) {
- struct request *req = CURRENT;
-#endif /* IDE_DRIVER */
- struct buffer_head * bh;
int nsect;
+ struct buffer_head *bh;
+ struct request *req = CURRENT;
+#endif /* IDE_DRIVER */
req->errors = 0;
if (!uptodate) {
printk("end_request: I/O error, dev %s, sector %lu\n",
@@ -443,6 +449,9 @@ static void end_request(int uptodate) {
printk("end_request: buffer-list destroyed\n");
}
req->buffer = bh->b_data;
+#ifdef IDE_DRIVER
+ spin_unlock_irqrestore(&io_request_lock,flags);
+#endif /* IDE_DRIVER */
return;
}
}
@@ -461,6 +470,9 @@ static void end_request(int uptodate) {
up(req->sem);
req->rq_status = RQ_INACTIVE;
wake_up(&wait_for_request);
+#ifdef IDE_DRIVER
+ spin_unlock_irqrestore(&io_request_lock,flags);
+#endif /* IDE_DRIVER */
}
#endif /* defined(IDE_DRIVER) && !defined(_IDE_C) */
#endif /* ! SCSI_BLK_MAJOR(MAJOR_NR) */
diff --git a/include/linux/capability.h b/include/linux/capability.h
index db737e55f..a0342601f 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -17,19 +17,33 @@
kernel might be somewhat backwards compatible, but don't bet on
it. */
+/* XXX - Note, cap_t, is defined by POSIX to be an "opaque" pointer to
+ a set of three capability sets. The transposition of 3*the
+ following structure to such a composite is better handled in a user
+ library since the draft standard requires the use of malloc/free
+ etc.. */
+
#define _LINUX_CAPABILITY_VERSION 0x19980330
-typedef struct _user_cap_struct {
+typedef struct __user_cap_header_struct {
__u32 version;
- __u32 size;
- __u8 cap[1];
-} *cap_t;
-
+ int pid;
+} *cap_user_header_t;
+
+typedef struct __user_cap_data_struct {
+ __u32 effective;
+ __u32 permitted;
+ __u32 inheritable;
+} *cap_user_data_t;
+
#ifdef __KERNEL__
typedef struct kernel_cap_struct {
- int cap;
+ __u32 cap;
} kernel_cap_t;
+
+#define _USER_CAP_HEADER_SIZE (2*sizeof(__u32))
+#define _KERNEL_CAP_T_SIZE (sizeof(kernel_cap_t))
#endif
@@ -46,13 +60,13 @@ typedef struct kernel_cap_struct {
/* Override all DAC access, including ACL execute access if
[_POSIX_ACL] is defined. Excluding DAC access covered by
- CAP_LINUX_IMMUTABLE */
+ CAP_LINUX_IMMUTABLE. */
#define CAP_DAC_OVERRIDE 1
/* Overrides all DAC restrictions regarding read and search on files
and directories, including ACL restrictions if [_POSIX_ACL] is
- defined. Excluding DAC access covered by CAP_LINUX_IMMUTABLE */
+ defined. Excluding DAC access covered by CAP_LINUX_IMMUTABLE. */
#define CAP_DAC_READ_SEARCH 2
@@ -82,10 +96,13 @@ typedef struct kernel_cap_struct {
#define CAP_KILL 5
/* Allows setgid(2) manipulation */
+/* Allows setgroups(2) */
+/* Allows forged gids on socket credentials passing. */
#define CAP_SETGID 6
-/* Allows setuid(2) manipulation */
+/* Allows set*uid(2) manipulation (including fsuid). */
+/* Allows forged pids on socket credentials passing. */
#define CAP_SETUID 7
@@ -112,9 +129,17 @@ typedef struct kernel_cap_struct {
#define CAP_NET_BROADCAST 11
/* Allow interface configuration */
-/* Allow configuring of firewall stuff */
+/* Allow administration of IP firewall, masquerading and accounting */
/* Allow setting debug option on sockets */
/* Allow modification of routing tables */
+/* Allow setting arbitrary process / process group ownership on
+ sockets */
+/* Allow binding to any address for transparent proxying */
+/* Allow setting TOS (type of service) */
+/* Allow setting promiscuous mode */
+/* Allow clearing driver statistics */
+/* Allow multicasting */
+/* Allow read/write of device-specific registers */
#define CAP_NET_ADMIN 12
@@ -123,7 +148,9 @@ typedef struct kernel_cap_struct {
#define CAP_NET_RAW 13
-/* Allow locking of segments in memory */
+/* Allow locking of shared memory segments */
+/* Allow mlock and mlockall (which doesn't really have anything to do
+ with IPC) */
#define CAP_IPC_LOCK 14
@@ -153,9 +180,42 @@ typedef struct kernel_cap_struct {
/* Allow configuration of the secure attention key */
/* Allow administration of the random device */
-/* Allow device administration */
+/* Allow device administration (mknod)*/
/* Allow examination and configuration of disk quotas */
-/* System Admin functions: mount et al */
+/* Allow configuring the kernel's syslog (printk behaviour) */
+/* Allow sending a signal to any process */
+/* Allow setting the domainname */
+/* Allow setting the hostname */
+/* Allow calling bdflush() */
+/* Allow mount() and umount(), setting up new smb connection */
+/* Allow some autofs root ioctls */
+/* Allow nfsservctl */
+/* Allow VM86_REQUEST_IRQ */
+/* Allow to read/write pci config on alpha */
+/* Allow irix_prctl on mips (setstacksize) */
+/* Allow flushing all cache on m68k (sys_cacheflush) */
+/* Allow removing semaphores */
+/* Used instead of CAP_CHOWN to "chown" IPC message queues, semaphores
+ and shared memory */
+/* Allow locking/unlocking of shared memory segment */
+/* Allow turning swap on/off */
+/* Allow forged pids on socket credentials passing */
+/* Allow setting readahead and flushing buffers on block devices */
+/* Allow setting geometry in floppy driver */
+/* Allow turning DMA on/off in xd driver */
+/* Allow administration of md devices (mostly the above, but some
+ extra ioctls) */
+/* Allow tuning the ide driver */
+/* Allow access to the nvram device */
+/* Allow administration of apm_bios, serial and bttv (TV) device */
+/* Allow manufacturer commands in isdn CAPI support driver */
+/* Allow reading non-standardized portions of pci configuration space */
+/* Allow DDI debug ioctl on sbpcd driver */
+/* Allow setting up serial ports */
+/* Allow sending raw qic-117 commands */
+/* Allow enabling/disabling tagged queuing on SCSI controllers and sending
+ arbitrary SCSI commands */
+/* Allow setting encryption key on loopback filesystem */
#define CAP_SYS_ADMIN 21
@@ -163,19 +223,34 @@ typedef struct kernel_cap_struct {
#define CAP_SYS_BOOT 22
-/* Allow use of renice() on others, and raising of priority */
+/* Allow raising priority and setting priority on other (different
+ UID) processes */
+/* Allow use of FIFO and round-robin (realtime) scheduling on own
+ processes and setting the scheduling algorithm used by another
+ process. */
#define CAP_SYS_NICE 23
-/* Override resource limits */
+/* Override resource limits. Set resource limits. */
+/* Override quota limits. */
+/* Override reserved space on ext2 filesystem */
+/* NOTE: ext2 honors fsuid when checking for resource overrides, so
+ you can override using fsuid too */
+/* Override size restrictions on IPC message queues */
+/* Allow more than 64hz interrupts from the real-time clock */
+/* Override max number of consoles on console allocation */
+/* Override max number of keymaps */
#define CAP_SYS_RESOURCE 24
/* Allow manipulation of system clock */
+/* Allow irix_stime on mips */
+/* Allow setting the real-time clock */
#define CAP_SYS_TIME 25
/* Allow configuration of tty devices */
+/* Allow vhangup() of tty */
#define CAP_SYS_TTY_CONFIG 26
@@ -187,17 +262,48 @@ typedef struct kernel_cap_struct {
#define CAP_EMPTY_SET { 0 }
#define CAP_FULL_SET { ~0 }
+#define CAP_INIT_EFF_SET { ~0 & ~CAP_TO_MASK(CAP_SETPCAP) }
+#define CAP_INIT_INH_SET { ~0 & ~CAP_TO_MASK(CAP_SETPCAP) }
#define CAP_TO_MASK(x) (1 << (x))
-#define cap_raise(c, flag) (c.cap |= CAP_TO_MASK(flag))
-#define cap_lower(c, flag) (c.cap &= ~CAP_TO_MASK(flag))
-#define cap_raised(c, flag) (c.cap & CAP_TO_MASK(flag))
-
-#define cap_isclear(c) (!c.cap)
-
-#define cap_copy(dest,src) do { (dest).cap = (src).cap; } while(0)
-#define cap_clear(c) do { c.cap = 0; } while(0)
-#define cap_set_full(c) do { c.cap = ~0; } while(0)
+#define cap_raise(c, flag) ((c).cap |= CAP_TO_MASK(flag))
+#define cap_lower(c, flag) ((c).cap &= ~CAP_TO_MASK(flag))
+#define cap_raised(c, flag) ((c).cap & CAP_TO_MASK(flag))
+
+static inline kernel_cap_t cap_combine(kernel_cap_t a, kernel_cap_t b)
+{
+ kernel_cap_t dest;
+ dest.cap = a.cap | b.cap;
+ return dest;
+}
+
+static inline kernel_cap_t cap_intersect(kernel_cap_t a, kernel_cap_t b)
+{
+ kernel_cap_t dest;
+ dest.cap = a.cap & b.cap;
+ return dest;
+}
+
+static inline kernel_cap_t cap_drop(kernel_cap_t a, kernel_cap_t drop)
+{
+ kernel_cap_t dest;
+ dest.cap = a.cap & ~drop.cap;
+ return dest;
+}
+
+static inline kernel_cap_t cap_invert(kernel_cap_t c)
+{
+ kernel_cap_t dest;
+ dest.cap = ~c.cap;
+ return dest;
+}
+
+#define cap_isclear(c) (!(c).cap)
+#define cap_issubset(a,set) (!((a).cap & ~(set).cap))
+
+#define cap_clear(c) do { (c).cap = 0; } while(0)
+#define cap_set_full(c) do { (c).cap = ~0; } while(0)
+#define cap_mask(c,mask) do { (c).cap &= (mask).cap; } while(0)
#define cap_is_fs_cap(c) ((c) & CAP_FS_MASK)
diff --git a/include/linux/coda_proc.h b/include/linux/coda_proc.h
new file mode 100644
index 000000000..c86a588ed
--- /dev/null
+++ b/include/linux/coda_proc.h
@@ -0,0 +1,144 @@
+/*
+ * coda_statis.h
+ *
+ * CODA operation statistics
+ *
+ * (c) March, 1998
+ * by Michihiro Kuramochi, Zhenyu Xia and Zhanyong Wan
+ * zhanyong.wan@yale.edu
+ *
+ */
+
+#ifndef _CODA_PROC_H
+#define _CODA_PROC_H
+
+void coda_sysctl_init(void);
+void coda_sysctl_clean(void);
+void coda_upcall_stats(int opcode, unsigned long jiffies);
+
+#include <linux/sysctl.h>
+#include <linux/coda_fs_i.h>
+#include <linux/coda.h>
+
+/* these four files are presented to show the result of the statistics:
+ *
+ * /proc/fs/coda/vfs_stats
+ * upcall_stats
+ * permission_stats
+ * cache_inv_stats
+ *
+ * these four files are presented to reset the statistics to 0:
+ *
+ * /proc/sys/coda/vfs_stats
+ * upcall_stats
+ * permission_stats
+ * cache_inv_stats
+ */
+
+/* VFS operation statistics */
+struct coda_vfs_stats
+{
+ /* file operations */
+ int file_read;
+ int file_write;
+ int file_mmap;
+ int open;
+ int release;
+ int fsync;
+
+ /* dir operations */
+ int readdir;
+
+ /* inode operations */
+ int create;
+ int lookup;
+ int link;
+ int unlink;
+ int symlink;
+ int mkdir;
+ int rmdir;
+ int rename;
+ int permission;
+ int readpage;
+
+ /* symlink operatoins*/
+ int follow_link;
+ int readlink;
+};
+
+struct coda_upcall_stats_entry
+{
+ int count;
+ unsigned long time_sum;
+ unsigned long time_squared_sum;
+};
+
+
+
+/* cache hits for permissions statistics */
+struct coda_permission_stats
+{
+ int count;
+ int hit_count;
+};
+
+/* cache invalidation statistics */
+struct coda_cache_inv_stats
+{
+ int flush;
+ int purge_user;
+ int zap_dir;
+ int zap_file;
+ int zap_vnode;
+ int purge_fid;
+ int replace;
+};
+
+/* these global variables hold the actual statistics data */
+extern struct coda_vfs_stats coda_vfs_stat;
+extern struct coda_permission_stats coda_permission_stat;
+extern struct coda_cache_inv_stats coda_cache_inv_stat;
+
+/* reset statistics to 0 */
+void reset_coda_vfs_stats( void );
+void reset_coda_upcall_stats( void );
+void reset_coda_permission_stats( void );
+void reset_coda_cache_inv_stats( void );
+
+/* some utitlities to make it easier for you to do statistics for time */
+void do_time_stats( struct coda_upcall_stats_entry * pentry,
+ unsigned long jiffy );
+/*
+double get_time_average( const struct coda_upcall_stats_entry * pentry );
+double get_time_std_deviation( const struct coda_upcall_stats_entry * pentry );
+*/
+unsigned long get_time_average( const struct coda_upcall_stats_entry * pentry );
+unsigned long get_time_std_deviation( const struct coda_upcall_stats_entry * pentry );
+
+/* like coda_dointvec, these functions are to be registered in the ctl_table
+ * data structure for /proc/sys/... files
+ */
+int do_reset_coda_vfs_stats( ctl_table * table, int write, struct file * filp,
+ void * buffer, size_t * lenp );
+int do_reset_coda_upcall_stats( ctl_table * table, int write,
+ struct file * filp, void * buffer,
+ size_t * lenp );
+int do_reset_coda_permission_stats( ctl_table * table, int write,
+ struct file * filp, void * buffer,
+ size_t * lenp );
+int do_reset_coda_cache_inv_stats( ctl_table * table, int write,
+ struct file * filp, void * buffer,
+ size_t * lenp );
+
+/* these functions are called to form the content of /proc/fs/coda/... files */
+int coda_vfs_stats_get_info( char * buffer, char ** start, off_t offset,
+ int length, int dummy );
+int coda_upcall_stats_get_info( char * buffer, char ** start, off_t offset,
+ int length, int dummy );
+int coda_permission_stats_get_info( char * buffer, char ** start, off_t offset,
+ int length, int dummy );
+int coda_cache_inv_stats_get_info( char * buffer, char ** start, off_t offset,
+ int length, int dummy );
+
+
+#endif /* _CODA_PROC_H */
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
index 370408e07..73600b8ba 100644
--- a/include/linux/coda_psdev.h
+++ b/include/linux/coda_psdev.h
@@ -94,8 +94,6 @@ int venus_access(struct super_block *sb, struct ViceFid *fid, int mask);
int venus_pioctl(struct super_block *sb, struct ViceFid *fid,
unsigned int cmd, struct PioctlData *data);
int coda_downcall(int opcode, union outputArgs *out, struct super_block *sb);
-int coda_upcall(struct coda_sb_info *mntinfo, int inSize,
- int *outSize, union inputArgs *buffer);
int venus_fsync(struct super_block *sb, struct ViceFid *fid);
diff --git a/include/linux/coda_sysctl.h b/include/linux/coda_sysctl.h
index add670b35..e69de29bb 100644
--- a/include/linux/coda_sysctl.h
+++ b/include/linux/coda_sysctl.h
@@ -1,10 +0,0 @@
-/*
- * Sysctl operations for Coda.
- * Original version: (C) 1996 Peter Braam
- * Rewritten for Linux 2.1: (C) 1997 Carnegie Mellon University
- *
- * Carnegie Mellon encourages users of this code to contribute improvements
- * to the Coda project. Contact Peter Braam <coda@cs.cmu.edu>.
- */
-void coda_sysctl_init(void);
-void coda_sysctl_clean(void);
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index c095f1007..b3424c167 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -131,7 +131,7 @@ extern int d_invalidate(struct dentry *);
/* dcache memory management */
extern int select_dcache(int, int);
-extern void shrink_dcache_memory(void);
+extern void shrink_dcache_memory(int, unsigned int);
extern void check_dcache_memory(void);
extern void free_inode_memory(int); /* defined in fs/inode.c */
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h
index 9be5bd1b1..bb343ac2e 100644
--- a/include/linux/hdreg.h
+++ b/include/linux/hdreg.h
@@ -45,7 +45,7 @@
#define WIN_VERIFY 0x40
#define WIN_FORMAT 0x50
#define WIN_INIT 0x60
-#define WIN_SEEK 0x70
+#define WIN_SEEK 0x70
#define WIN_DIAGNOSE 0x90
#define WIN_SPECIFY 0x91 /* set drive geometry translation */
#define WIN_SETIDLE1 0xE3
@@ -101,12 +101,13 @@ struct hd_geometry {
#define HDIO_GETGEO 0x0301 /* get device geometry */
#define HDIO_GET_UNMASKINTR 0x0302 /* get current unmask setting */
#define HDIO_GET_MULTCOUNT 0x0304 /* get current IDE blockmode setting */
-#define HDIO_GET_IDENTITY 0x0307 /* get IDE identification info */
-#define HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */
-#define HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */
+#define HDIO_OBSOLETE_IDENTITY 0x0307 /* OBSOLETE, DO NOT USE: returns 142 bytes */
+#define HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */
+#define HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */
#define HDIO_GET_NOWERR 0x030a /* get ignore-write-error flag */
#define HDIO_GET_DMA 0x030b /* get use-dma flag */
#define HDIO_GET_NICE 0x030c /* get nice flags */
+#define HDIO_GET_IDENTITY 0x030d /* get IDE identification info */
#define HDIO_DRIVE_CMD 0x031f /* execute a special drive command */
/* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */
diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h
index a582e37b5..fcd6fce28 100644
--- a/include/linux/icmpv6.h
+++ b/include/linux/icmpv6.h
@@ -138,9 +138,12 @@ extern void icmpv6_send(struct sk_buff *skb,
__u32 info,
struct device *dev);
-extern void icmpv6_init(struct net_proto_family *ops);
+extern int icmpv6_init(struct net_proto_family *ops);
extern int icmpv6_err_convert(int type, int code,
int *err);
+extern void icmpv6_cleanup(void);
+extern void icmpv6_param_prob(struct sk_buff *skb,
+ int code, void *pos);
#endif
#endif
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 478c8503c..391352418 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -42,6 +42,24 @@ struct ipv6_rt_hdr {
*/
};
+
+struct ipv6_opt_hdr {
+ __u8 nexthdr;
+ __u8 hdrlen;
+ /*
+ * TLV encoded option data follows.
+ */
+};
+
+#define ipv6_destopt_hdr ipv6_opt_hdr
+#define ipv6_hopopt_hdr ipv6_opt_hdr
+
+#ifdef __KERNEL__
+#define ipv6_optlen(p) (((p)->hdrlen+1) << 3)
+#endif
+
+
+
/*
* routing header type 0 (used in cmsghdr struct)
*/
@@ -95,13 +113,13 @@ struct ipv6_options
/*
* protocol options
- * usualy carried in IPv6 extension headers
+ * usually carried in IPv6 extension headers
*/
struct ipv6_rt_hdr *srcrt; /* Routing Header */
-
};
+
#endif
#endif
diff --git a/include/linux/lp.h b/include/linux/lp.h
index ba2e34f07..b50c6b434 100644
--- a/include/linux/lp.h
+++ b/include/linux/lp.h
@@ -20,11 +20,14 @@
#define LP_EXIST 0x0001
#define LP_SELEC 0x0002
#define LP_BUSY 0x0004
+#define LP_BUSY_BIT_POS 2
#define LP_OFFL 0x0008
#define LP_NOPA 0x0010
#define LP_ERR 0x0020
#define LP_ABORT 0x0040
+#ifdef LP_NEED_CAREFUL
#define LP_CAREFUL 0x0080
+#endif
#define LP_ABORTOPEN 0x0100
/* timeout for each character. This is relative to bus cycles -- it
@@ -67,14 +70,18 @@
or 0 for polling (no IRQ) */
#define LPGETIRQ 0x0606 /* get the current IRQ number */
#define LPWAIT 0x0608 /* corresponds to LP_INIT_WAIT */
+#ifdef LP_NEED_CAREFUL
#define LPCAREFUL 0x0609 /* call with TRUE arg to require out-of-paper, off-
line, and error indicators good on all writes,
FALSE to ignore them. Default is ignore. */
+#endif
#define LPABORTOPEN 0x060a /* call with TRUE arg to abort open() on error,
FALSE to ignore error. Default is ignore. */
#define LPGETSTATUS 0x060b /* return LP_S(minor) */
#define LPRESET 0x060c /* reset printer */
+#ifdef LP_STATS
#define LPGETSTATS 0x060d /* get statistics (struct lp_stats) */
+#endif
#define LPGETFLAGS 0x060e /* get status flags */
/* timeout for printk'ing a timeout, in jiffies (100ths of a second).
@@ -90,11 +97,14 @@
#define LP_WAIT(minor) lp_table[(minor)].wait /* strobe wait */
#define LP_IRQ(minor) lp_table[(minor)].dev->port->irq /* interrupt # */
/* 0 means polled */
+#ifdef LP_STATS
#define LP_STAT(minor) lp_table[(minor)].stats /* statistics area */
+#endif
#define LP_BUFFER_SIZE 256
#define LP_BASE(x) lp_table[(x)].dev->port->base
+#ifdef LP_STATS
struct lp_stats {
unsigned long chars;
unsigned long sleeps;
@@ -103,6 +113,7 @@ struct lp_stats {
unsigned int meanwait;
unsigned int mdev;
};
+#endif
struct lp_struct {
struct pardevice *dev;
@@ -111,10 +122,13 @@ struct lp_struct {
unsigned int time;
unsigned int wait;
char *lp_buffer;
+#ifdef LP_STATS
unsigned int lastcall;
unsigned int runchars;
- unsigned int waittime;
struct lp_stats stats;
+#endif
+ struct wait_queue *wait_q;
+ unsigned int last_error;
};
/*
@@ -160,7 +174,7 @@ struct lp_struct {
*/
#define LP_DELAY 50
-#define LP_POLLING(minor) (lp_table[(minor)].dev->port->irq == PARPORT_IRQ_NONE)
+#define LP_POLLED(minor) (lp_table[(minor)].dev->port->irq == PARPORT_IRQ_NONE)
#define LP_PREEMPTED(minor) (lp_table[(minor)].dev->port->waithead != NULL)
/*
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 77acd8c0f..33e8d80ed 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1,5 +1,5 @@
/*
- * $Id: pci.h,v 1.67 1998/04/16 20:48:33 mj Exp $
+ * $Id: pci.h,v 1.70 1998/05/02 19:20:03 mj Exp $
*
* PCI defines and function prototypes
* Copyright 1994, Drew Eckhardt
@@ -275,6 +275,7 @@
*/
#define PCI_VENDOR_ID_COMPAQ 0x0e11
#define PCI_DEVICE_ID_COMPAQ_1280 0x3033
+#define PCI_DEVICE_ID_COMPAQ_TRIFLEX 0x4000
#define PCI_DEVICE_ID_COMPAQ_SMART2P 0xae10
#define PCI_DEVICE_ID_COMPAQ_NETEL100 0xae32
#define PCI_DEVICE_ID_COMPAQ_NETEL10 0xae34
@@ -303,10 +304,14 @@
#define PCI_DEVICE_ID_ATI_210888CX 0x4358
#define PCI_DEVICE_ID_ATI_215GB 0x4742
#define PCI_DEVICE_ID_ATI_215GD 0x4744
+#define PCI_DEVICE_ID_ATI_215GI 0x4749
#define PCI_DEVICE_ID_ATI_215GP 0x4750
+#define PCI_DEVICE_ID_ATI_215GQ 0x4751
#define PCI_DEVICE_ID_ATI_215GT 0x4754
#define PCI_DEVICE_ID_ATI_215GTB 0x4755
#define PCI_DEVICE_ID_ATI_210888GX 0x4758
+#define PCI_DEVICE_ID_ATI_215LG 0x4c47
+#define PCI_DEVICE_ID_ATI_264LT 0x4c54
#define PCI_DEVICE_ID_ATI_264VT 0x5654
#define PCI_VENDOR_ID_VLSI 0x1004
@@ -376,7 +381,8 @@
#define PCI_DEVICE_ID_IBM_MCA 0x0020
#define PCI_DEVICE_ID_IBM_82351 0x0022
#define PCI_DEVICE_ID_IBM_SERVERAID 0x002e
-#define PCI_DEVICE_ID_IBM_MPEG2 0x007d
+#define PCI_DEVICE_ID_IBM_TR_WAKE 0x003e
+#define PCI_DEVICE_ID_IBM_3780IDSP 0x007d
#define PCI_VENDOR_ID_WD 0x101c
#define PCI_DEVICE_ID_WD_7197 0x3296
@@ -408,6 +414,7 @@
#define PCI_DEVICE_ID_CT_65548 0x00dc
#define PCI_DEVICE_ID_CT_65550 0x00e0
#define PCI_DEVICE_ID_CT_65554 0x00e4
+#define PCI_DEVICE_ID_CT_65555 0x00e5
#define PCI_VENDOR_ID_MIRO 0x1031
#define PCI_DEVICE_ID_MIRO_36050 0x5601
@@ -419,9 +426,11 @@
#define PCI_DEVICE_ID_FD_36C70 0x0000
#define PCI_VENDOR_ID_SI 0x1039
-#define PCI_DEVICE_ID_SI_6201 0x0001
+#define PCI_DEVICE_ID_SI_5591_AGP 0x0001
#define PCI_DEVICE_ID_SI_6202 0x0002
#define PCI_DEVICE_ID_SI_503 0x0008
+#define PCI_DEVICE_ID_SI_ACPI 0x0009
+#define PCI_DEVICE_ID_SI_5597_VGA 0x0200
#define PCI_DEVICE_ID_SI_6205 0x0205
#define PCI_DEVICE_ID_SI_501 0x0406
#define PCI_DEVICE_ID_SI_496 0x0496
@@ -430,6 +439,7 @@
#define PCI_DEVICE_ID_SI_5511 0x5511
#define PCI_DEVICE_ID_SI_5513 0x5513
#define PCI_DEVICE_ID_SI_5571 0x5571
+#define PCI_DEVICE_ID_SI_5591 0x5591
#define PCI_DEVICE_ID_SI_5597 0x5597
#define PCI_DEVICE_ID_SI_7001 0x7001
@@ -493,6 +503,7 @@
#define PCI_VENDOR_ID_N9 0x105d
#define PCI_DEVICE_ID_N9_I128 0x2309
#define PCI_DEVICE_ID_N9_I128_2 0x2339
+#define PCI_DEVICE_ID_N9_I128_T2R 0x493d
#define PCI_VENDOR_ID_UMC 0x1060
#define PCI_DEVICE_ID_UMC_UM8673F 0x0101
@@ -510,6 +521,7 @@
#define PCI_VENDOR_ID_PICOP 0x1066
#define PCI_DEVICE_ID_PICOP_PT86C52X 0x0001
+#define PCI_DEVICE_ID_PICOP_PT80C524 0x8002
#define PCI_VENDOR_ID_APPLE 0x106b
#define PCI_DEVICE_ID_APPLE_BANDIT 0x0001
@@ -538,7 +550,7 @@
#define PCI_VENDOR_ID_CONTAQ 0x1080
#define PCI_DEVICE_ID_CONTAQ_82C599 0x0600
-#define PCI_DEVICE_ID_CONTAQ_82C693 0xC693
+#define PCI_DEVICE_ID_CONTAQ_82C693 0xc693
#define PCI_VENDOR_ID_FOREX 0x1083
@@ -589,7 +601,11 @@
#define PCI_VENDOR_ID_PLX 0x10b5
#define PCI_DEVICE_ID_PLX_9080 0x9080
+#define PCI_VENDOR_ID_MADGE 0x10b6
+#define PCI_DEVICE_ID_MADGE_MK2 0x0002
+
#define PCI_VENDOR_ID_3COM 0x10b7
+#define PCI_DEVICE_ID_3COM_3C339 0x3390
#define PCI_DEVICE_ID_3COM_3C590 0x5900
#define PCI_DEVICE_ID_3COM_3C595TX 0x5950
#define PCI_DEVICE_ID_3COM_3C595T4 0x5951
@@ -597,6 +613,8 @@
#define PCI_DEVICE_ID_3COM_3C900TPO 0x9000
#define PCI_DEVICE_ID_3COM_3C900COMBO 0x9001
#define PCI_DEVICE_ID_3COM_3C905TX 0x9050
+#define PCI_DEVICE_ID_3COM_3C905T4 0x9051
+#define PCI_DEVICE_ID_3COM_3C905B_TX 0x9055
#define PCI_VENDOR_ID_SMC 0x10b8
#define PCI_DEVICE_ID_SMC_EPIC100 0x0005
@@ -618,6 +636,7 @@
#define PCI_DEVICE_ID_AL_M5219 0x5219
#define PCI_DEVICE_ID_AL_M5229 0x5229
#define PCI_DEVICE_ID_AL_M5237 0x5237
+#define PCI_DEVICE_ID_AL_M7101 0x7101
#define PCI_VENDOR_ID_MITSUBISHI 0x10ba
@@ -635,6 +654,10 @@
#define PCI_DEVICE_ID_ASP_ABP940U 0x1300
#define PCI_DEVICE_ID_ASP_ABP940UW 0x2300
+#define PCI_VENDOR_ID_MACRONIX 0x10d9
+#define PCI_DEVICE_ID_MACRONIX_MX98713 0x0512
+#define PCI_DEVICE_ID_MACRONIX_MX987x5 0x0531
+
#define PCI_VENDOR_ID_CERN 0x10dc
#define PCI_DEVICE_ID_CERN_SPSB_PMC 0x0001
#define PCI_DEVICE_ID_CERN_SPSB_PCI 0x0002
@@ -654,6 +677,7 @@
#define PCI_VENDOR_ID_AMCC 0x10e8
#define PCI_DEVICE_ID_AMCC_MYRINET 0x8043
+#define PCI_DEVICE_ID_AMCC_PARASTATION 0x8062
#define PCI_DEVICE_ID_AMCC_S5933 0x807d
#define PCI_DEVICE_ID_AMCC_S5933_HEPC3 0x809c
@@ -664,6 +688,7 @@
#define PCI_VENDOR_ID_REALTEK 0x10ec
#define PCI_DEVICE_ID_REALTEK_8029 0x8029
#define PCI_DEVICE_ID_REALTEK_8129 0x8129
+#define PCI_DEVICE_ID_REALTEK_8139 0x8139
#define PCI_VENDOR_ID_TRUEVISION 0x10fa
#define PCI_DEVICE_ID_TRUEVISION_T1000 0x000c
@@ -686,6 +711,7 @@
#define PCI_DEVICE_ID_VIA_82C595_97 0x1595
#define PCI_DEVICE_ID_VIA_82C586_2 0x3038
#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_VENDOR_ID_VORTEX 0x1119
@@ -734,6 +760,7 @@
#define PCI_DEVICE_ID_IMAGINGTECH_ICPCI 0x0000
#define PCI_VENDOR_ID_PHILIPS 0x1131
+#define PCI_DEVICE_ID_PHILIPS_SAA7145 0x7145
#define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146
#define PCI_VENDOR_ID_CYCLONE 0x113c
@@ -756,6 +783,7 @@
#define PCI_DEVICE_ID_DIGI_CX 0x0006
#define PCI_DEVICE_ID_DIGI_XRJ 0x0009
#define PCI_DEVICE_ID_DIGI_EPCJ 0x000a
+#define PCI_DEVICE_ID_DIGI_XR_920 0x0027
#define PCI_VENDOR_ID_MUTECH 0x1159
#define PCI_DEVICE_ID_MUTECH_MV1000 0x0001
@@ -809,6 +837,9 @@
#define PCI_DEVICE_ID_ZORAN_36057 0x6057
#define PCI_DEVICE_ID_ZORAN_36120 0x6120
+#define PCI_VENDOR_ID_KINETIC 0x11f4
+#define PCI_DEVICE_ID_KINETIC_2915 0x2915
+
#define PCI_VENDOR_ID_COMPEX 0x11f6
#define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112
#define PCI_DEVICE_ID_COMPEX_RL2000 0x1401
@@ -826,7 +857,7 @@
#define PCI_DEVICE_ID_CYCLOM_Z_Hi 0x0201
#define PCI_VENDOR_ID_ESSENTIAL 0x120f
-#define PCI_DEVICE_ID_ROADRUNNER 0x0001
+#define PCI_DEVICE_ID_ESSENTIAL_ROADRUNNER 0x0001
#define PCI_VENDOR_ID_O2 0x1217
#define PCI_DEVICE_ID_O2_6832 0x6832
@@ -838,6 +869,10 @@
#define PCI_VENDOR_ID_SIGMADES 0x1236
#define PCI_DEVICE_ID_SIGMADES_6425 0x6401
+#define PCI_VENDOR_ID_CCUBE 0x123f
+
+#define PCI_VENDOR_ID_DIPIX 0x1246
+
#define PCI_VENDOR_ID_STALLION 0x124d
#define PCI_DEVICE_ID_STALLION_ECHPCI832 0x0000
#define PCI_DEVICE_ID_STALLION_ECHPCI864 0x0002
@@ -850,6 +885,13 @@
#define PCI_DEVICE_ID_OPTIBASE_VPLEXCC 0x2120
#define PCI_DEVICE_ID_OPTIBASE_VQUEST 0x2130
+#define PCI_VENDOR_ID_SATSAGEM 0x1267
+#define PCI_DEVICE_ID_SATSAGEM_PCR2101 0x5352
+#define PCI_DEVICE_ID_SATSAGEM_TELSATTURBO 0x5a4b
+
+#define PCI_VENDOR_ID_HUGHES 0x1273
+#define PCI_DEVICE_ID_HUGHES_DIRECPC 0x0002
+
#define PCI_VENDOR_ID_ENSONIQ 0x1274
#define PCI_DEVICE_ID_ENSONIQ_AUDIOPCI 0x5000
@@ -859,6 +901,9 @@
#define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2
#define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018
+#define PCI_VENDOR_ID_CBOARDS 0x1307
+#define PCI_DEVICE_ID_CBOARDS_DAS1602_16 0x0001
+
#define PCI_VENDOR_ID_SYMPHONY 0x1c1c
#define PCI_DEVICE_ID_SYMPHONY_101 0x0001
@@ -870,6 +915,7 @@
#define PCI_DEVICE_ID_3DLABS_500TX 0x0002
#define PCI_DEVICE_ID_3DLABS_DELTA 0x0003
#define PCI_DEVICE_ID_3DLABS_PERMEDIA 0x0004
+#define PCI_DEVICE_ID_3DLABS_MX 0x0006
#define PCI_VENDOR_ID_AVANCE 0x4005
#define PCI_DEVICE_ID_AVANCE_ALG2064 0x2064
@@ -919,6 +965,7 @@
#define PCI_DEVICE_ID_INTEL_82371MX 0x1234
#define PCI_DEVICE_ID_INTEL_82437MX 0x1235
#define PCI_DEVICE_ID_INTEL_82441 0x1237
+#define PCI_DEVICE_ID_INTEL_82380FB 0x124b
#define PCI_DEVICE_ID_INTEL_82439 0x1250
#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000
#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010
@@ -931,6 +978,9 @@
#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113
#define PCI_DEVICE_ID_INTEL_82443LX_0 0x7180
#define PCI_DEVICE_ID_INTEL_82443LX_1 0x7181
+#define PCI_DEVICE_ID_INTEL_82443BX_0 0x7190
+#define PCI_DEVICE_ID_INTEL_82443BX_1 0x7191
+#define PCI_DEVICE_ID_INTEL_82443BX_2 0x7192
#define PCI_DEVICE_ID_INTEL_P6 0x84c4
#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5
@@ -955,6 +1005,7 @@
#define PCI_DEVICE_ID_ADAPTEC_7882 0x8278
#define PCI_DEVICE_ID_ADAPTEC_7883 0x8378
#define PCI_DEVICE_ID_ADAPTEC_7884 0x8478
+#define PCI_DEVICE_ID_ADAPTEC_1030 0x8b78
#define PCI_VENDOR_ID_ATRONICS 0x907f
#define PCI_DEVICE_ID_ATRONICS_2015 0x2015
@@ -962,6 +1013,9 @@
#define PCI_VENDOR_ID_HOLTEK 0x9412
#define PCI_DEVICE_ID_HOLTEK_6565 0x6565
+#define PCI_VENDOR_ID_TIGERJET 0xe159
+#define PCI_DEVICE_ID_TIGERJET_300 0x0001
+
#define PCI_VENDOR_ID_ARK 0xedd8
#define PCI_DEVICE_ID_ARK_STING 0xa091
#define PCI_DEVICE_ID_ARK_STINGARK 0xa099
@@ -981,6 +1035,8 @@
#ifdef __KERNEL__
+#include <linux/types.h>
+
/*
* Error values that may be returned by the PCI bios.
*/
@@ -1087,13 +1143,13 @@ struct pci_dev *pci_find_class (unsigned int class, struct pci_dev *from);
struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn);
#define pci_present pcibios_present
-#define pci_read_config_byte(dev, where, val) pcibios_read_config_byte(dev->bus->number, dev->devfn, where, val)
-#define pci_read_config_word(dev, where, val) pcibios_read_config_word(dev->bus->number, dev->devfn, where, val)
-#define pci_read_config_dword(dev, where, val) pcibios_read_config_dword(dev->bus->number, dev->devfn, where, val)
-#define pci_write_config_byte(dev, where, val) pcibios_write_config_byte(dev->bus->number, dev->devfn, where, val)
-#define pci_write_config_word(dev, where, val) pcibios_write_config_word(dev->bus->number, dev->devfn, where, val)
-#define pci_write_config_dword(dev, where, val) pcibios_write_config_dword(dev->bus->number, dev->devfn, where, val)
-void pci_set_master(struct pci_dev *);
+int pci_read_config_byte(struct pci_dev *dev, u8 where, u8 *val);
+int pci_read_config_word(struct pci_dev *dev, u8 where, u16 *val);
+int pci_read_config_dword(struct pci_dev *dev, u8 where, u32 *val);
+int pci_write_config_byte(struct pci_dev *dev, u8 where, u8 val);
+int pci_write_config_word(struct pci_dev *dev, u8 where, u16 val);
+int pci_write_config_dword(struct pci_dev *dev, u8 where, u32 val);
+void pci_set_master(struct pci_dev *dev);
#endif /* __KERNEL__ */
#endif /* LINUX_PCI_H */
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index a333cd278..b0d678156 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -51,6 +51,7 @@ enum root_directory_inos {
PROC_PPC_HTAB,
PROC_SOUND,
PROC_MTRR, /* whether enabled or not */
+ PROC_FS
};
enum pid_directory_inos {
@@ -206,6 +207,19 @@ enum bus_directory_inos {
PROC_BUS_LAST
};
+enum fs_directory_inos {
+ PROC_FS_CODA = PROC_MCA_LAST,
+ PROC_FS_LAST
+};
+
+enum fs_coda_directory_inos {
+ PROC_VFS_STATS = PROC_MCA_LAST,
+ PROC_UPCALL_STATS,
+ PROC_PERMISSION_STATS,
+ PROC_CACHE_INV_STATS,
+ PROC_CODA_FS_LAST
+};
+
/* Finally, the dynamically allocatable proc entries are reserved: */
#define PROC_DYNAMIC_FIRST 4096
@@ -366,7 +380,6 @@ extern struct inode_operations proc_dir_inode_operations;
extern struct inode_operations proc_file_inode_operations;
extern struct inode_operations proc_net_inode_operations;
extern struct inode_operations proc_netdir_inode_operations;
-extern struct inode_operations proc_scsi_inode_operations;
extern struct inode_operations proc_openprom_inode_operations;
extern struct inode_operations proc_mem_inode_operations;
extern struct inode_operations proc_sys_inode_operations;
@@ -383,8 +396,6 @@ extern struct inode_operations proc_ringbuf_inode_operations;
extern struct inode_operations proc_omirr_inode_operations;
extern struct inode_operations proc_ppc_htab_inode_operations;
-#endif
-
/*
* generic.c
*/
@@ -403,3 +414,5 @@ extern void proc_tty_unregister_driver(struct tty_driver *driver);
* proc_devtree.c
*/
extern void proc_device_tree_init(void);
+
+#endif /* _LINUX_PROC_FS_H */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index eabe924df..8666a6460 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -354,7 +354,7 @@ struct task_struct {
/* process credentials */ \
/* uid etc */ 0,0,0,0,0,0,0,0, \
/* suppl grps*/ 0, {0,}, \
-/* caps */ CAP_FULL_SET, CAP_FULL_SET, CAP_FULL_SET, \
+/* caps */ CAP_INIT_EFF_SET,CAP_INIT_INH_SET,CAP_FULL_SET, \
/* rlimits */ INIT_RLIMITS, \
/* math */ 0, \
/* comm */ "swapper", \
diff --git a/include/linux/swap.h b/include/linux/swap.h
index c407d7428..19e714c71 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -58,7 +58,7 @@ extern void rw_swap_page_nocache(int, unsigned long, char *);
/* linux/mm/page_alloc.c */
extern void swap_in(struct task_struct *, struct vm_area_struct *,
- pte_t *, unsigned long, int);
+ unsigned long, pte_t *, unsigned long, int);
/* linux/mm/swap_state.c */
@@ -66,8 +66,8 @@ extern void show_swap_cache_info(void);
extern int add_to_swap_cache(struct page *, unsigned long);
extern void swap_duplicate(unsigned long);
extern void swap_after_unlock_page (unsigned long entry);
-extern struct page * read_swap_cache_async(unsigned long, int);
-#define read_swap_cache(entry) read_swap_cache_async(entry, 1);
+extern struct page * read_swap_cache_async(unsigned long, unsigned long, int);
+#define read_swap_cache(entry, addr) read_swap_cache_async(entry, addr, 1);
/* linux/mm/swapfile.c */
extern unsigned int nr_swapfiles;
diff --git a/include/linux/swapctl.h b/include/linux/swapctl.h
index bf787614b..fcc5615f8 100644
--- a/include/linux/swapctl.h
+++ b/include/linux/swapctl.h
@@ -50,6 +50,15 @@ typedef struct freepages_v1
typedef freepages_v1 freepages_t;
extern freepages_t freepages;
+typedef struct pager_daemon_v1
+{
+ unsigned int tries_base;
+ unsigned int tries_min;
+ unsigned int swap_cluster;
+} 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
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 69d785df1..07f72a1a1 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -84,7 +84,8 @@ enum
VM_BDFLUSH, /* struct: Control buffer cache flushing */
VM_OVERCOMMIT_MEMORY, /* Turn off the virtual memory safety limit */
VM_BUFFERMEM, /* struct: Set buffer memory thresholds */
- VM_PAGECACHE /* struct: Set cache memory thresholds */
+ VM_PAGECACHE, /* struct: Set cache memory thresholds */
+ VM_PAGERDAEMON /* struct: Control kswapd behaviour */
};
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index 74cb98295..b59cd5f90 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -255,12 +255,12 @@ struct ufs_superblock {
__s32 fs_contigsumsize;/* size of cluster summary array */
__s32 fs_maxsymlinklen;/* max length of an internal symlink */
__s32 fs_inodefmt; /* format of on-disk inodes */
- __u64 fs_maxfilesize; /* max representable file size */
+ __u32 fs_maxfilesize[2];/* max representable file size */
__u32 fs_qbmask[2]; /* ~usb_bmask */
__u32 fs_qfmask[2]; /* ~usb_fmask */
__s32 fs_state; /* file system state time stamp */
} fs_44;
- } fs_u __attribute__ ((packed));
+ } fs_u;
__s32 fs_postblformat; /* format of positional layout tables */
__s32 fs_nrpos; /* number of rotational positions */
__s32 fs_postbloff; /* (__s16) rotation block list head */
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 1a322a498..c3d2d5895 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -4,7 +4,7 @@
* Authors:
* Pedro Roque <roque@di.fc.ul.pt>
*
- * $Id: ipv6.h,v 1.9 1998/03/08 05:55:20 davem Exp $
+ * $Id: ipv6.h,v 1.10 1998/04/30 16:24:14 freitag Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -108,6 +108,8 @@ struct frag_queue {
struct frag_queue *prev;
__u32 id; /* fragment id */
+ struct in6_addr saddr;
+ struct in6_addr daddr;
struct timer_list timer; /* expire timer */
struct ipv6_frag *fragments;
struct device *dev;
@@ -248,6 +250,10 @@ extern int ipv6opt_srt_tosin(struct ipv6_options *opt,
extern void ipv6opt_free(struct ipv6_options *opt);
+extern struct ipv6_opt_hdr * ipv6_skip_exthdr(struct ipv6_opt_hdr *hdr,
+ u8 *nexthdrp, int len);
+
+
/*
* socket options (ipv6_sockglue.c)
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 754253811..adaf76ef3 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -101,6 +101,8 @@ extern int igmp6_event_report(struct sk_buff *skb,
struct icmp6hdr *hdr,
int len);
+extern void igmp6_cleanup(void);
+
extern __inline__ struct neighbour * ndisc_get_neigh(struct device *dev, struct in6_addr *addr)
{
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 52853f44a..ca1240b8a 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -642,7 +642,7 @@ static __inline__ unsigned int tcp_current_mss(struct sock *sk)
/* PMTU discovery event has occurred. */
sk->mtu = dst->pmtu;
- sk->mss = sk->mtu - mss_distance;
+ mss_now = sk->mss = sk->mtu - mss_distance;
}
if(tp->sack_ok && tp->num_sacks)
diff --git a/include/scsi/scsi_ioctl.h b/include/scsi/scsi_ioctl.h
index 97e20a98a..6ba0dd542 100644
--- a/include/scsi/scsi_ioctl.h
+++ b/include/scsi/scsi_ioctl.h
@@ -5,6 +5,8 @@
#define SCSI_IOCTL_TEST_UNIT_READY 2
#define SCSI_IOCTL_BENCHMARK_COMMAND 3
#define SCSI_IOCTL_SYNC 4 /* Request synchronous parameters */
+#define SCSI_IOCTL_START_UNIT 5
+#define SCSI_IOCTL_STOP_UNIT 6
/* The door lock/unlock constants are compatible with Sun constants for
the cdrom */
#define SCSI_IOCTL_DOORLOCK 0x5380 /* lock the eject mechanism */