summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/parport.h51
-rw-r--r--include/asm-arm/arch-cl7500/system.h2
-rw-r--r--include/asm-arm/arch-ebsa285/time.h7
-rw-r--r--include/asm-arm/parport.h58
-rw-r--r--include/asm-arm/procinfo.h6
-rw-r--r--include/asm-arm/ptrace.h5
-rw-r--r--include/asm-arm/system.h100
-rw-r--r--include/asm-i386/mca_dma.h76
-rw-r--r--include/asm-i386/mman.h6
-rw-r--r--include/asm-i386/parport.h41
-rw-r--r--include/asm-i386/unistd.h3
-rw-r--r--include/asm-mips/mman.h6
-rw-r--r--include/asm-mips/parport.h49
-rw-r--r--include/asm-mips/sgialib.h7
-rw-r--r--include/asm-mips/unistd.h6
-rw-r--r--include/asm-mips64/mman.h8
-rw-r--r--include/asm-mips64/parport.h51
-rw-r--r--include/asm-mips64/unistd.h10
-rw-r--r--include/asm-sparc/ide.h2
-rw-r--r--include/asm-sparc/vaddrs.h6
-rw-r--r--include/asm-sparc64/parport.h16
-rw-r--r--include/linux/affs_fs.h1
-rw-r--r--include/linux/bfs_fs.h3
-rw-r--r--include/linux/blk.h14
-rw-r--r--include/linux/blkdev.h14
-rw-r--r--include/linux/compatmac.h163
-rw-r--r--include/linux/efs_fs.h6
-rw-r--r--include/linux/elevator.h124
-rw-r--r--include/linux/fb.h9
-rw-r--r--include/linux/fs.h3
-rw-r--r--include/linux/generic_serial.h105
-rw-r--r--include/linux/hfs_fs.h1
-rw-r--r--include/linux/hpfs_fs.h5
-rw-r--r--include/linux/if_ppp.h10
-rw-r--r--include/linux/iso_fs.h1
-rw-r--r--include/linux/kmod.h2
-rw-r--r--include/linux/minix_fs.h1
-rw-r--r--include/linux/mm.h13
-rw-r--r--include/linux/mmzone.h31
-rw-r--r--include/linux/msdos_fs.h9
-rw-r--r--include/linux/ncp_fs.h1
-rw-r--r--include/linux/nls.h35
-rw-r--r--include/linux/ntfs_fs.h4
-rw-r--r--include/linux/pci.h3
-rw-r--r--include/linux/personality.h2
-rw-r--r--include/linux/ppp_channel.h39
-rw-r--r--include/linux/ppp_defs.h5
-rw-r--r--include/linux/proc_fs.h1
-rw-r--r--include/linux/qnx4_fs.h1
-rw-r--r--include/linux/romfs_fs.h1
-rw-r--r--include/linux/smb_fs.h1
-rw-r--r--include/linux/swap.h3
-rw-r--r--include/linux/sysv_fs.h1
-rw-r--r--include/linux/telephony.h10
-rw-r--r--include/linux/tty.h1
-rw-r--r--include/linux/udf_fs.h1
-rw-r--r--include/linux/ufs_fs.h1
-rw-r--r--include/linux/umsdos_fs.h1
-rw-r--r--include/linux/usb.h46
59 files changed, 771 insertions, 417 deletions
diff --git a/include/asm-alpha/parport.h b/include/asm-alpha/parport.h
index d1099fd8c..c5ee7cbb2 100644
--- a/include/asm-alpha/parport.h
+++ b/include/asm-alpha/parport.h
@@ -1,7 +1,7 @@
/*
* parport.h: platform-specific PC-style parport initialisation
*
- * Copyright (C) 1999 Tim Waugh <tim@cyberelk.demon.co.uk>
+ * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
*
* This file should only be included by drivers/parport/parport_pc.c.
*/
@@ -9,53 +9,10 @@
#ifndef _ASM_AXP_PARPORT_H
#define _ASM_AXP_PARPORT_H 1
-#include <linux/config.h>
-
-/* Maximum number of ports to support. It is useless to set this greater
- than PARPORT_MAX (in <linux/parport.h>). */
-#define PARPORT_PC_MAX_PORTS 8
-
-/* If parport_cs (PCMCIA) is managing ports for us, we'll need the
- * probing routines forever; otherwise we can lose them at boot time. */
-#ifdef CONFIG_PARPORT_PC_PCMCIA
-#define __maybe_initdata
-#define __maybe_init
-#else
-#define __maybe_initdata __initdata
-#define __maybe_init __init
-#endif
-
-static int __maybe_init parport_pc_init_pci(int irq, int dma);
-
-static int user_specified __maybe_initdata = 0;
-int __init
-parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
+static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
+static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
{
- int count = 0, i = 0;
-
- if (io && *io) {
- /* Only probe the ports we were given. */
- user_specified = 1;
- do {
- if (!*io_hi) *io_hi = 0x400 + *io;
- if (parport_pc_probe_port(*(io++), *(io_hi++),
- *(irq++), *(dma++), NULL))
- count++;
- } while (*io && (++i < PARPORT_PC_MAX_PORTS));
- } else {
- count += parport_pc_init_superio ();
-
- /* Probe all the likely ports. */
- if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL))
- count++;
- if (parport_pc_probe_port(0x378, 0x778, irq[0], dma[0], NULL))
- count++;
- if (parport_pc_probe_port(0x278, 0x678, irq[0], dma[0], NULL))
- count++;
- count += parport_pc_init_pci (irq[0], dma[0]);
- }
-
- return count;
+ return parport_pc_find_isa_ports (autoirq, autodma);
}
#endif /* !(_ASM_AXP_PARPORT_H) */
diff --git a/include/asm-arm/arch-cl7500/system.h b/include/asm-arm/arch-cl7500/system.h
index 24b64ede3..6daffc785 100644
--- a/include/asm-arm/arch-cl7500/system.h
+++ b/include/asm-arm/arch-cl7500/system.h
@@ -23,6 +23,4 @@
#define arch_power_off() do { } while (0)
-#define arch_power_off() do { } while (0)
-
#endif
diff --git a/include/asm-arm/arch-ebsa285/time.h b/include/asm-arm/arch-ebsa285/time.h
index b10bdd324..a837d8b0f 100644
--- a/include/asm-arm/arch-ebsa285/time.h
+++ b/include/asm-arm/arch-ebsa285/time.h
@@ -203,7 +203,8 @@ extern __inline__ void setup_timer(void)
{
int irq;
- if (machine_is_co285())
+ if (machine_is_co285() ||
+ machine_is_personal_server())
/*
* Add-in 21285s shouldn't access the RTC
*/
@@ -247,7 +248,9 @@ extern __inline__ void setup_timer(void)
rtc_base = 0;
}
- if (machine_is_ebsa285() || machine_is_co285()) {
+ if (machine_is_ebsa285() ||
+ machine_is_co285() ||
+ machine_is_personal_server()) {
gettimeoffset = timer1_gettimeoffset;
*CSR_TIMER1_CLR = 0;
diff --git a/include/asm-arm/parport.h b/include/asm-arm/parport.h
index 0f6c12151..bab49ad3a 100644
--- a/include/asm-arm/parport.h
+++ b/include/asm-arm/parport.h
@@ -1,7 +1,7 @@
/*
* parport.h: ARM-specific parport initialisation
*
- * Copyright (C) 1999 Tim Waugh <tim@cyberelk.demon.co.uk>
+ * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
*
* This file should only be included by drivers/parport/parport_pc.c.
*/
@@ -9,60 +9,10 @@
#ifndef __ASMARM_PARPORT_H
#define __ASMARM_PARPORT_H
-#include <linux/config.h>
-
-/* Maximum number of ports to support. It is useless to set this greater
- than PARPORT_MAX (in <linux/parport.h>). */
-#define PARPORT_PC_MAX_PORTS 8
-
-/* If parport_cs (PCMCIA) is managing ports for us, we'll need the
- * probing routines forever; otherwise we can lose them at boot time. */
-#ifdef CONFIG_PARPORT_PC_PCMCIA
-#define __maybe_initdata
-#define __maybe_init
-#else
-#define __maybe_initdata __initdata
-#define __maybe_init __init
-#endif
-
-static int __maybe_init parport_pc_init_pci(int irq, int dma);
-static int __devinit parport_pc_init_superio(void);
-
-static int user_specified __maybe_initdata = 0;
-
-
-int __init
-parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
+static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
+static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
{
- int count = 0, i = 0;
-
- if (io && *io) {
- /* Only probe the ports we were given. */
- user_specified = 1;
- do {
- if (!*io_hi) *io_hi = 0x400 + *io;
- if (parport_pc_probe_port(*(io++), *(io_hi++),
- *(irq++), *(dma++), NULL))
- count++;
- } while (*io && (++i < PARPORT_PC_MAX_PORTS));
- } else {
-#ifdef CONFIG_PCI
- count += parport_pc_init_superio ();
-#endif
-
- /* Probe all the likely ports. */
- if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL))
- count++;
- if (parport_pc_probe_port(0x378, 0x778, irq[0], dma[0], NULL))
- count++;
- if (parport_pc_probe_port(0x278, 0x678, irq[0], dma[0], NULL))
- count++;
-#ifdef CONFIG_PCI
- count += parport_pc_init_pci (irq[0], dma[0]);
-#endif
- }
-
- return count;
+ return parport_pc_find_isa_ports (autoirq, autodma);
}
#endif /* !(_ASMARM_PARPORT_H) */
diff --git a/include/asm-arm/procinfo.h b/include/asm-arm/procinfo.h
index 511a78005..0e6fcd87f 100644
--- a/include/asm-arm/procinfo.h
+++ b/include/asm-arm/procinfo.h
@@ -18,8 +18,10 @@ struct proc_info_item {
/*
* Note! struct processor is always defined if we're
* using MULTI_CPU, otherwise this entry is unused,
- * but still exists. NOTE! This structure is used
- * by assembler code! Check:
+ * but still exists.
+ *
+ * NOTE! The following structure is defined by assembly
+ * language, NOT C code. For more information, check:
* arch/arm/mm/proc-*.S and arch/arm/kernel/head-armv.S
*/
struct proc_info_list {
diff --git a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h
index 0b4714211..961363cc7 100644
--- a/include/asm-arm/ptrace.h
+++ b/include/asm-arm/ptrace.h
@@ -3,6 +3,11 @@
#include <asm/proc/ptrace.h>
+#define PTRACE_GETREGS 12
+#define PTRACE_SETREGS 13
+#define PTRACE_GETFPREGS 14
+#define PTRACE_SETFPREGS 15
+
#ifndef __ASSEMBLY__
#define pc_pointer(v) \
((v) & ~PCMASK)
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index a0daf6edf..a43117330 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -16,22 +16,23 @@ extern unsigned int system_serial_high;
extern unsigned int __machine_arch_type;
/* see arch/arm/kernel/setup.c for a description of these */
-#define MACH_TYPE_EBSA110 0
-#define MACH_TYPE_RISCPC 1
-#define MACH_TYPE_NEXUSPCI 3
-#define MACH_TYPE_EBSA285 4
-#define MACH_TYPE_NETWINDER 5
-#define MACH_TYPE_CATS 6
-#define MACH_TYPE_TBOX 7
-#define MACH_TYPE_CO285 8
-#define MACH_TYPE_CLPS7110 9
-#define MACH_TYPE_ARCHIMEDES 10
-#define MACH_TYPE_A5K 11
-#define MACH_TYPE_ETOILE 12
-#define MACH_TYPE_LACIE_NAS 13
-#define MACH_TYPE_CLPS7500 14
-#define MACH_TYPE_SHARK 15
-#define MACH_TYPE_SA1100 16
+#define MACH_TYPE_EBSA110 0
+#define MACH_TYPE_RISCPC 1
+#define MACH_TYPE_NEXUSPCI 3
+#define MACH_TYPE_EBSA285 4
+#define MACH_TYPE_NETWINDER 5
+#define MACH_TYPE_CATS 6
+#define MACH_TYPE_TBOX 7
+#define MACH_TYPE_CO285 8
+#define MACH_TYPE_CLPS7110 9
+#define MACH_TYPE_ARCHIMEDES 10
+#define MACH_TYPE_A5K 11
+#define MACH_TYPE_ETOILE 12
+#define MACH_TYPE_LACIE_NAS 13
+#define MACH_TYPE_CLPS7500 14
+#define MACH_TYPE_SHARK 15
+#define MACH_TYPE_SA1100 16
+#define MACH_TYPE_PERSONAL_SERVER 17
/*
* Sort out a definition for machine_arch_type
@@ -41,6 +42,11 @@ extern unsigned int __machine_arch_type;
* 2. If two or more architectures are selected, then the selected
* machine_is_xxx() are variable, and the unselected machine_is_xxx()
* are constant zero.
+ *
+ * In general, you should use machine_is_xxxx() in your code, not:
+ * - switch (machine_arch_type) { }
+ * - if (machine_arch_type = xxxx)
+ * - __machine_arch_type
*/
#ifdef CONFIG_ARCH_EBSA110
# ifdef machine_arch_type
@@ -114,6 +120,54 @@ extern unsigned int __machine_arch_type;
# define machine_is_co285() (0)
#endif
+#ifdef CONFIG_ARCH_ARC
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_ARCHIMEDES
+# endif
+# define machine_is_arc() (machine_arch_type == MACH_TYPE_ARCHIMEDES)
+#else
+# define machine_is_arc() (0)
+#endif
+
+#ifdef CONFIG_ARCH_A5K
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_A5K
+# endif
+# define machine_is_a5k() (machine_arch_type == MACH_TYPE_A5K)
+#else
+# define machine_is_a5k() (0)
+#endif
+
+#ifdef CONFIG_ARCH_CLPS7500
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_CLPS7500
+# endif
+# define machine_is_clps7500() (machine_arch_type == MACH_TYPE_CLPS7500)
+#else
+# define machine_is_clps7500() (0)
+#endif
+
+#ifdef CONFIG_ARCH_SHARK
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_SHARK
+# endif
+# define machine_is_shark() (machine_arch_type == MACH_TYPE_SHARK)
+#else
+# define machine_is_shark() (0)
+#endif
+
#ifdef CONFIG_ARCH_SA1100
# ifdef machine_arch_type
# undef machine_arch_type
@@ -121,11 +175,23 @@ extern unsigned int __machine_arch_type;
# else
# define machine_arch_type MACH_TYPE_SA1100
# endif
-# define machine_is_sa1100() (machine_arch_type == MACH_TYPE_SA1100
+# define machine_is_sa1100() (machine_arch_type == MACH_TYPE_SA1100)
#else
# define machine_is_sa1100() (0)
#endif
+#ifdef CONFIG_PERSONAL_SERVER
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_PERSONAL_SERVER
+# endif
+# define machine_is_personal_server() (machine_arch_type == MACH_TYPE_PERSONAL_SERVER)
+#else
+# define machine_is_personal_server() (0)
+#endif
+
#ifndef machine_arch_type
#define machine_arch_type __machine_arch_type
#endif
diff --git a/include/asm-i386/mca_dma.h b/include/asm-i386/mca_dma.h
index 791152f3d..fb42da38d 100644
--- a/include/asm-i386/mca_dma.h
+++ b/include/asm-i386/mca_dma.h
@@ -55,17 +55,41 @@
#define MCA_DMA_MODE_16 0x40 /* 16 bit xfers */
+/**
+ * mca_enable_dma - channel to enable DMA on
+ * @dmanr: DMA channel
+ *
+ * Enable the MCA bus DMA on a channel. This can be called from
+ * IRQ context.
+ */
static __inline__ void mca_enable_dma(unsigned int dmanr)
{
outb(MCA_DMA_FN_RESET_MASK | dmanr, MCA_DMA_REG_FN);
}
+/**
+ * mca_disble_dma - channel to disable DMA on
+ * @dmanr: DMA channel
+ *
+ * Enable the MCA bus DMA on a channel. This can be called from
+ * IRQ context.
+ */
+
static __inline__ void mca_disable_dma(unsigned int dmanr)
{
outb(MCA_DMA_FN_MASK | dmanr, MCA_DMA_REG_FN);
}
+/**
+ * mca_set_dma_addr - load a 24bit DMA address
+ * @dmanr: DMA channel
+ * @a: 24bit bus address
+ *
+ * Load the address register in the DMA controller. This has a 24bit
+ * limitation (16Mb).
+ */
+
static __inline__ void mca_set_dma_addr(unsigned int dmanr, unsigned int a)
{
outb(MCA_DMA_FN_SET_ADDR | dmanr, MCA_DMA_REG_FN);
@@ -74,6 +98,14 @@ static __inline__ void mca_set_dma_addr(unsigned int dmanr, unsigned int a)
outb((a >> 16) & 0xff, MCA_DMA_REG_EXE);
}
+/**
+ * mca_get_dma_addr - load a 24bit DMA address
+ * @dmanr: DMA channel
+ *
+ * Read the address register in the DMA controller. This has a 24bit
+ * limitation (16Mb). The return is a bus address.
+ */
+
static __inline__ unsigned int mca_get_dma_addr(unsigned int dmanr)
{
unsigned int addr;
@@ -86,6 +118,15 @@ static __inline__ unsigned int mca_get_dma_addr(unsigned int dmanr)
return addr;
}
+/**
+ * mca_set_dma_count - load a 16bit transfer count
+ * @dmanr: DMA channel
+ * @count: count
+ *
+ * Set the DMA count for this channel. This can be up to 64Kbytes.
+ * Setting a count of zero will not do what you expect.
+ */
+
static __inline__ void mca_set_dma_count(unsigned int dmanr, unsigned int count)
{
count--; /* transfers one more than count -- correct for this */
@@ -95,6 +136,14 @@ static __inline__ void mca_set_dma_count(unsigned int dmanr, unsigned int count)
outb((count >> 8) & 0xff, MCA_DMA_REG_EXE);
}
+/**
+ * mca_get_dma_residue - get the remaining bytes to transfer
+ * @dmanr: DMA channel
+ *
+ * This function returns the number of bytes left to transfer
+ * on this DMA channel.
+ */
+
static __inline__ unsigned int mca_get_dma_residue(unsigned int dmanr)
{
unsigned short count;
@@ -106,6 +155,15 @@ static __inline__ unsigned int mca_get_dma_residue(unsigned int dmanr)
return count;
}
+/**
+ * mca_set_dma_io - set the port for an I/O transfer
+ * @dmanr: DMA channel
+ * @io_addr: an I/O port number
+ *
+ * Unlike the ISA bus DMA controllers the DMA on MCA bus can transfer
+ * with an I/O port target.
+ */
+
static __inline__ void mca_set_dma_io(unsigned int dmanr, unsigned int io_addr)
{
/*
@@ -117,6 +175,24 @@ static __inline__ void mca_set_dma_io(unsigned int dmanr, unsigned int io_addr)
outb((io_addr >> 8) & 0xff, MCA_DMA_REG_EXE);
}
+/**
+ * mca_set_dma_mode - set the DMA mode
+ * @dmanr: DMA channel
+ * @mode: The mode to set
+ *
+ * The DMA controller supports several modes. The mode values you can
+ * set are
+ *
+ * MCA_DMA_MODE_READ when reading from the DMA device.
+ *
+ * MCA_DMA_MODE_WRITE to writing to the DMA device.
+ *
+ * MCA_DMA_MODE_IO to do DMA to or from an I/O port.
+ *
+ * MCA_DMA_MODE_16 to do 16bit transfers.
+ *
+ */
+
static __inline__ void mca_set_dma_mode(unsigned int dmanr, unsigned int mode)
{
outb(MCA_DMA_FN_SET_MODE | dmanr, MCA_DMA_REG_FN);
diff --git a/include/asm-i386/mman.h b/include/asm-i386/mman.h
index c5bd25f73..f953c436c 100644
--- a/include/asm-i386/mman.h
+++ b/include/asm-i386/mman.h
@@ -25,6 +25,12 @@
#define MCL_CURRENT 1 /* lock all current mappings */
#define MCL_FUTURE 2 /* lock all future mappings */
+#define MADV_NORMAL 0x0 /* default page-in behavior */
+#define MADV_RANDOM 0x1 /* page-in minimum required */
+#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */
+#define MADV_WILLNEED 0x3 /* pre-fault pages */
+#define MADV_DONTNEED 0x4 /* discard these pages */
+
/* compatibility flags */
#define MAP_ANON MAP_ANONYMOUS
#define MAP_FILE 0
diff --git a/include/asm-i386/parport.h b/include/asm-i386/parport.h
index 2f7e8d295..fa0e321e4 100644
--- a/include/asm-i386/parport.h
+++ b/include/asm-i386/parport.h
@@ -1,7 +1,7 @@
/*
* parport.h: ia32-specific parport initialisation
*
- * Copyright (C) 1999 Tim Waugh <tim@cyberelk.demon.co.uk>
+ * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
*
* This file should only be included by drivers/parport/parport_pc.c.
*/
@@ -9,43 +9,10 @@
#ifndef _ASM_I386_PARPORT_H
#define _ASM_I386_PARPORT_H 1
-/* Maximum number of ports to support. It is useless to set this greater
- than PARPORT_MAX (in <linux/parport.h>). */
-#define PARPORT_PC_MAX_PORTS 8
-
-static int parport_pc_init_pci(int irq, int dma);
-static int parport_pc_init_superio(void);
-
-static int user_specified __devinitdata = 0;
-int __init
-parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
+static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
+static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
{
- int count = 0, i = 0;
-
- if (io && *io) {
- /* Only probe the ports we were given. */
- user_specified = 1;
- do {
- if (!*io_hi) *io_hi = 0x400 + *io;
- if (parport_pc_probe_port(*(io++), *(io_hi++),
- *(irq++), *(dma++), NULL))
- count++;
- } while (*io && (++i < PARPORT_PC_MAX_PORTS));
- } else {
- count += parport_pc_init_superio ();
-
- if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL))
- count++;
- if (parport_pc_probe_port(0x378, 0x778, irq[0], dma[0], NULL))
- count++;
- if (parport_pc_probe_port(0x278, 0x678, irq[0], dma[0], NULL))
- count++;
-
- /* probe for other PCI parallel devices */
- count += parport_pc_init_pci (irq[0], dma[0]);
- }
-
- return count;
+ return parport_pc_find_isa_ports (autoirq, autodma);
}
#endif /* !(_ASM_I386_PARPORT_H) */
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index 6ec03679f..36f4e3176 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -222,6 +222,9 @@
#define __NR_setfsuid32 215
#define __NR_setfsgid32 216
#define __NR_pivot_root 217
+#define __NR_mincore 218
+#define __NR_madvise 219
+#define __NR_madvise1 219 /* delete when C lib stub is removed */
/* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */
diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h
index e408affff..64dd2c674 100644
--- a/include/asm-mips/mman.h
+++ b/include/asm-mips/mman.h
@@ -56,6 +56,12 @@
#define MCL_CURRENT 1 /* lock all current mappings */
#define MCL_FUTURE 2 /* lock all future mappings */
+#define MADV_NORMAL 0x0 /* default page-in behavior */
+#define MADV_RANDOM 0x1 /* page-in minimum required */
+#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */
+#define MADV_WILLNEED 0x3 /* pre-fault pages */
+#define MADV_DONTNEED 0x4 /* discard these pages */
+
/* compatibility flags */
#define MAP_ANON MAP_ANONYMOUS
#define MAP_FILE 0
diff --git a/include/asm-mips/parport.h b/include/asm-mips/parport.h
index 9ca9b628f..159e2345d 100644
--- a/include/asm-mips/parport.h
+++ b/include/asm-mips/parport.h
@@ -1,51 +1,16 @@
-/* $Id: parport.h,v 1.3 2000/03/02 02:37:13 ralf Exp $
+/* $Id$
*
- * parport.h: ia32-specific parport initialisation
- *
- * Copyright (C) 1999 Tim Waugh <tim@cyberelk.demon.co.uk>
+ * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
*
* This file should only be included by drivers/parport/parport_pc.c.
*/
#ifndef _ASM_PARPORT_H
-#define _ASM_PARPORT_H 1
-
-/* Maximum number of ports to support. It is useless to set this greater
- than PARPORT_MAX (in <linux/parport.h>). */
-#define PARPORT_PC_MAX_PORTS 8
-
-static int parport_pc_init_pci(int irq, int dma);
-static int parport_pc_init_superio(void);
+#define _ASM_PARPORT_H
-static int user_specified __devinitdata = 0;
-int __init
-parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
+static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
+static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
{
- int count = 0, i = 0;
-
- if (io && *io) {
- /* Only probe the ports we were given. */
- user_specified = 1;
- do {
- if (!*io_hi) *io_hi = 0x400 + *io;
- if (parport_pc_probe_port(*(io++), *(io_hi++),
- *(irq++), *(dma++), NULL))
- count++;
- } while (*io && (++i < PARPORT_PC_MAX_PORTS));
- } else {
- count += parport_pc_init_superio ();
-
- if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL))
- count++;
- if (parport_pc_probe_port(0x378, 0x778, irq[0], dma[0], NULL))
- count++;
- if (parport_pc_probe_port(0x278, 0x678, irq[0], dma[0], NULL))
- count++;
-
- /* probe for other PCI parallel devices */
- count += parport_pc_init_pci (irq[0], dma[0]);
- }
-
- return count;
+ return parport_pc_find_isa_ports (autoirq, autodma);
}
-#endif /* !(_ASM_PARPORT_H) */
+#endif /* _ASM_PARPORT_H */
diff --git a/include/asm-mips/sgialib.h b/include/asm-mips/sgialib.h
index c383fa6b6..42a390e89 100644
--- a/include/asm-mips/sgialib.h
+++ b/include/asm-mips/sgialib.h
@@ -1,4 +1,4 @@
-/* $Id: sgialib.h,v 1.3 1998/10/18 13:53:35 tsbogend Exp $
+/* $Id: sgialib.h,v 1.4 1999/02/25 20:55:07 tsbogend Exp $
* sgialib.h: SGI ARCS firmware interface library for the Linux kernel.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
@@ -17,10 +17,11 @@ extern char **prom_argv, **prom_envp;
extern int prom_flags;
#define PROM_FLAG_ARCS 1
-/* Init the PROM library and it's internal data structures. Called
+/*
+ * Init the PROM library and it's internal data structures. Called
* at boot time from head.S before start_kernel is invoked.
*/
-extern int prom_init(int argc, char **argv, char **envp);
+extern int prom_init(int argc, char **argv, char **envp, int *prom_vec);
/* Simple char-by-char console I/O. */
extern void prom_putchar(char c);
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index c07c5154a..8ce76977a 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -1,4 +1,4 @@
-/* $Id: unistd.h,v 1.19 2000/02/05 06:47:37 ralf Exp $
+/* $Id: unistd.h,v 1.20 2000/02/18 00:24:48 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
@@ -1203,11 +1203,13 @@
#define __NR_lstat64 (__NR_Linux + 214)
#define __NR_fstat64 (__NR_Linux + 215)
#define __NR_pivot_root (__NR_Linux + 216)
+#define __NR_mincore (__NR_Linux + 217)
+#define __NR_madvise (__NR_Linux + 218)
/*
* Offset of the last Linux flavoured syscall
*/
-#define __NR_Linux_syscalls 216
+#define __NR_Linux_syscalls 218
#ifndef _LANGUAGE_ASSEMBLY
diff --git a/include/asm-mips64/mman.h b/include/asm-mips64/mman.h
index edeaad87e..a7cba2bae 100644
--- a/include/asm-mips64/mman.h
+++ b/include/asm-mips64/mman.h
@@ -1,4 +1,4 @@
-/* $Id: mman.h,v 1.2 2000/02/04 23:09:08 ralf Exp $
+/* $Id: mman.h,v 1.3 2000/02/04 23:12:27 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
@@ -55,6 +55,12 @@
#define MCL_CURRENT 1 /* lock all current mappings */
#define MCL_FUTURE 2 /* lock all future mappings */
+#define MADV_NORMAL 0x0 /* default page-in behavior */
+#define MADV_RANDOM 0x1 /* page-in minimum required */
+#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */
+#define MADV_WILLNEED 0x3 /* pre-fault pages */
+#define MADV_DONTNEED 0x4 /* discard these pages */
+
/* compatibility flags */
#define MAP_ANON MAP_ANONYMOUS
#define MAP_FILE 0
diff --git a/include/asm-mips64/parport.h b/include/asm-mips64/parport.h
index 57683df44..159e2345d 100644
--- a/include/asm-mips64/parport.h
+++ b/include/asm-mips64/parport.h
@@ -1,53 +1,16 @@
-/* $Id: parport.h,v 1.2 2000/02/18 00:24:48 ralf Exp $
+/* $Id$
*
- * parport.h: ia32-specific parport initialisation
- *
- * Copyright (C) 1999 Tim Waugh <tim@cyberelk.demon.co.uk>
+ * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
*
* This file should only be included by drivers/parport/parport_pc.c.
*/
#ifndef _ASM_PARPORT_H
-#define _ASM_PARPORT_H 1
-
-#include <linux/config.h>
-
-/* Maximum number of ports to support. It is useless to set this greater
- than PARPORT_MAX (in <linux/parport.h>). */
-#define PARPORT_PC_MAX_PORTS 8
-
-static int parport_pc_init_pci(int irq, int dma);
-static int parport_pc_init_superio(void);
+#define _ASM_PARPORT_H
-static int user_specified __devinitdata = 0;
-int __init
-parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
+static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
+static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
{
- int count = 0, i = 0;
-
- if (io && *io) {
- /* Only probe the ports we were given. */
- user_specified = 1;
- do {
- if (!*io_hi) *io_hi = 0x400 + *io;
- if (parport_pc_probe_port(*(io++), *(io_hi++),
- *(irq++), *(dma++), NULL))
- count++;
- } while (*io && (++i < PARPORT_PC_MAX_PORTS));
- } else {
- count += parport_pc_init_superio ();
-
- if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL))
- count++;
- if (parport_pc_probe_port(0x378, 0x778, irq[0], dma[0], NULL))
- count++;
- if (parport_pc_probe_port(0x278, 0x678, irq[0], dma[0], NULL))
- count++;
-
- /* probe for other PCI parallel devices */
- count += parport_pc_init_pci (irq[0], dma[0]);
- }
-
- return count;
+ return parport_pc_find_isa_ports (autoirq, autodma);
}
-#endif /* !(_ASM_PARPORT_H) */
+#endif /* _ASM_PARPORT_H */
diff --git a/include/asm-mips64/unistd.h b/include/asm-mips64/unistd.h
index 0308f3bf3..38c62a456 100644
--- a/include/asm-mips64/unistd.h
+++ b/include/asm-mips64/unistd.h
@@ -1,4 +1,4 @@
-/* $Id: unistd.h,v 1.9 2000/02/05 06:47:37 ralf Exp $
+/* $Id: unistd.h,v 1.10 2000/02/18 00:24:49 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
@@ -1202,11 +1202,13 @@
#define __NR_Linux32_lstat64 (__NR_Linux32 + 214)
#define __NR_Linux32_fstat64 (__NR_Linux32 + 215)
#define __NR_Linux32_root_pivot (__NR_Linux32 + 216)
+#define __NR_Linux32_mincore (__NR_Linux32 + 217)
+#define __NR_Linux32_madvise (__NR_Linux32 + 218)
/*
* Offset of the last Linux o32 flavoured syscall
*/
-#define __NR_Linux32_syscalls 216
+#define __NR_Linux32_syscalls 218
/*
* Linux 64-bit syscalls are in the range from 5000 to 5999.
@@ -1423,11 +1425,13 @@
#define __NR_getpmsg (__NR_Linux + 208)
#define __NR_putpmsg (__NR_Linux + 209)
#define __NR_root_pivot (__NR_Linux + 210)
+#define __NR_mincore (__NR_Linux + 211)
+#define __NR_madvise (__NR_Linux + 212)
/*
* Offset of the last Linux flavoured syscall
*/
-#define __NR_Linux_syscalls 210
+#define __NR_Linux_syscalls 212
#ifndef _LANGUAGE_ASSEMBLY
diff --git a/include/asm-sparc/ide.h b/include/asm-sparc/ide.h
index 3a4ac776a..25451ae0e 100644
--- a/include/asm-sparc/ide.h
+++ b/include/asm-sparc/ide.h
@@ -1,4 +1,4 @@
-/* $Id: ide.h,v 1.3 2000/03/10 04:46:47 davem Exp $
+/* $Id: ide.h,v 1.4 2000/03/12 03:56:12 davem Exp $
* ide.h: SPARC PCI specific IDE glue.
*
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/vaddrs.h b/include/asm-sparc/vaddrs.h
index 7f5c464a4..1c76a9b9d 100644
--- a/include/asm-sparc/vaddrs.h
+++ b/include/asm-sparc/vaddrs.h
@@ -1,4 +1,4 @@
-/* $Id: vaddrs.h,v 1.22 1999/04/20 13:22:55 anton Exp $ */
+/* $Id: vaddrs.h,v 1.23 2000/03/12 04:10:46 davem Exp $ */
#ifndef _SPARC_VADDRS_H
#define _SPARC_VADDRS_H
@@ -20,8 +20,8 @@
#define IOBASE_LEN 0x00300000 /* Length of the IO area */
#define IOBASE_END 0xfe300000
#define DVMA_VADDR 0xfff00000 /* Base area of the DVMA on suns */
-#define DVMA_LEN 0x00040000 /* Size of the DVMA address space */
-#define DVMA_END 0xfff40000
+#define DVMA_LEN 0x000c0000 /* Size of the DVMA address space */
+#define DVMA_END 0xfffc0000
/* IOMMU Mapping area, must be on a 16MB boundary! Note this
* doesn't count the DVMA areas, the prom lives between the
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h
index 259c755d5..dac004a6b 100644
--- a/include/asm-sparc64/parport.h
+++ b/include/asm-sparc64/parport.h
@@ -11,14 +11,6 @@
#include <asm/ebus.h>
#include <asm/ns87303.h>
-#ifdef CONFIG_PARPORT_PC_PCMCIA
-#define __maybe_init
-#define __maybe_initdata
-#else
-#define __maybe_init __init
-#define __maybe_initdata __initdata
-#endif
-
#define PARPORT_PC_MAX_PORTS PARPORT_MAX
static struct linux_ebus_dma *sparc_ebus_dmas[PARPORT_PC_MAX_PORTS];
@@ -108,12 +100,7 @@ get_dma_residue(unsigned int dmanr)
return res;
}
-static int __maybe_init parport_pc_init_pci(int irq, int dma);
-
-static int user_specified __initdata = 0;
-
-int __init
-parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
+static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
{
struct linux_ebus *ebus;
struct linux_ebus_device *edev;
@@ -155,7 +142,6 @@ parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
}
}
- count += parport_pc_init_pci(PARPORT_IRQ_AUTO, PARPORT_DMA_NONE);
return count;
}
diff --git a/include/linux/affs_fs.h b/include/linux/affs_fs.h
index ab3b8c078..60af0d40c 100644
--- a/include/linux/affs_fs.h
+++ b/include/linux/affs_fs.h
@@ -89,7 +89,6 @@ extern void affs_write_inode(struct inode *inode);
/* super.c */
extern int affs_fs(void);
-extern int init_affs_fs(void);
/* file.c */
diff --git a/include/linux/bfs_fs.h b/include/linux/bfs_fs.h
index 9525293cb..afe274a4c 100644
--- a/include/linux/bfs_fs.h
+++ b/include/linux/bfs_fs.h
@@ -78,9 +78,6 @@ struct bfs_super_block {
#ifdef __KERNEL__
-/* inode.c */
-extern int init_bfs_fs(void);
-
/* file.c */
extern struct inode_operations bfs_file_inops;
extern struct file_operations bfs_file_operations;
diff --git a/include/linux/blk.h b/include/linux/blk.h
index 1a818c4fd..f06443c04 100644
--- a/include/linux/blk.h
+++ b/include/linux/blk.h
@@ -18,17 +18,7 @@ extern spinlock_t io_request_lock;
* NOTE that writes may use only the low 2/3 of these: reads
* take precedence.
*/
-#define NR_REQUEST 128
-
-/*
- * This is used in the elevator algorithm. We don't prioritise reads
- * over writes any more --- although reads are more time-critical than
- * writes, by treating them equally we increase filesystem throughput.
- * This turns out to give better overall performance. -- sct
- */
-#define IN_ORDER(s1,s2) \
-((s1)->rq_dev < (s2)->rq_dev || (((s1)->rq_dev == (s2)->rq_dev && \
-(s1)->sector < (s2)->sector)))
+#define NR_REQUEST 256
/*
* Initialization functions.
@@ -102,7 +92,7 @@ extern inline void blkdev_dequeue_request(struct request * req)
{
if (req->cmd == READ)
req->q->elevator.read_pendings--;
- req->q->nr_segments -= req->nr_segments;
+ req->q->elevator.nr_segments -= req->nr_segments;
req->q = NULL;
}
list_del(&req->queue);
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 166528473..8a05bdca2 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -43,6 +43,8 @@ struct request {
request_queue_t * q;
};
+#include <linux/elevator.h>
+
typedef int (merge_request_fn) (request_queue_t *q,
struct request *req,
struct buffer_head *bh,
@@ -57,21 +59,11 @@ typedef int (make_request_fn) (request_queue_t *q, int rw, struct buffer_head *b
typedef void (plug_device_fn) (request_queue_t *q, kdev_t device);
typedef void (unplug_device_fn) (void *q);
-typedef struct elevator_s
-{
- int sequence;
- int read_latency;
- int write_latency;
- int max_bomb_segments;
- int read_pendings;
-} elevator_t;
-
struct request_queue
{
struct list_head queue_head;
/* together with queue_head for cacheline sharing */
elevator_t elevator;
- unsigned int nr_segments;
request_fn_proc * request_fn;
merge_request_fn * back_merge_fn;
@@ -164,8 +156,6 @@ extern int * max_segments[MAX_BLKDEV];
#define MAX_READAHEAD 31
#define MIN_READAHEAD 3
-#define ELEVATOR_DEFAULTS ((elevator_t) { 0, NR_REQUEST>>1, NR_REQUEST<<5, 4, 0, })
-
#define blkdev_entry_to_request(entry) list_entry((entry), struct request, queue)
#define blkdev_entry_next_request(entry) blkdev_entry_to_request((entry)->next)
#define blkdev_entry_prev_request(entry) blkdev_entry_to_request((entry)->prev)
diff --git a/include/linux/compatmac.h b/include/linux/compatmac.h
new file mode 100644
index 000000000..07d8356d0
--- /dev/null
+++ b/include/linux/compatmac.h
@@ -0,0 +1,163 @@
+ /*
+ * This header tries to allow you to write 2.3-compatible drivers,
+ * but (using this header) still allows you to run them on 2.2 and
+ * 2.0 kernels.
+ *
+ * Sometimes, a #define replaces a "construct" that older kernels
+ * had. For example,
+ *
+ * DECLARE_MUTEX(name);
+ *
+ * replaces the older
+ *
+ * struct semaphore name = MUTEX;
+ *
+ * This file then declares the DECLARE_MUTEX macro to compile into the
+ * older version.
+ *
+ * In some cases, a macro or function changes the number of arguments.
+ * In that case, there is nothing we can do except define an access
+ * macro that provides the same functionality on both versions of Linux.
+ *
+ * This is the case for example with the "get_user" macro 2.0 kernels use:
+ *
+ * a = get_user (b);
+ *
+ * while newer kernels use
+ *
+ * get_user (a,b);
+ *
+ * This is unfortunate. We therefore define "Get_user (a,b)" which looks
+ * almost the same as the 2.2+ construct, and translates into the
+ * appropriate sequence for earlier constructs.
+ *
+ * Supported by this file are the 2.0 kernels, 2.2 kernels, and the
+ * most recent 2.3 kernel. 2.3 support will be dropped as soon when 2.4
+ * comes out. 2.0 support may someday be dropped. But then again, maybe
+ * not.
+ *
+ * I'll try to maintain this, provided that Linus agrees with the setup.
+ * Feel free to mail updates or suggestions.
+ *
+ * -- R.E.Wolff@BitWizard.nl
+ *
+ */
+
+#ifndef COMPATMAC_H
+#define COMPATMAC_H
+
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < 0x020100 /* Less than 2.1.0 */
+#define TWO_ZERO
+#else
+#if LINUX_VERSION_CODE < 0x020200 /* less than 2.2.x */
+#warning "Please use a 2.2.x kernel. "
+#else
+#if LINUX_VERSION_CODE < 0x020300 /* less than 2.3.x */
+#define TWO_TWO
+#else
+#define TWO_THREE
+#endif
+#endif
+#endif
+
+#ifdef TWO_ZERO
+
+/* Here is the section that makes the 2.2 compatible driver source
+ work for 2.0 too! We mostly try to adopt the "new thingies" from 2.2,
+ and provide for compatibility stuff here if possible. */
+
+/* Some 200 days (on intel) */
+#define MAX_SCHEDULE_TIMEOUT ((long)(~0UL>>1))
+
+#include <linux/bios32.h>
+
+#define Get_user(a,b) a = get_user(b)
+#define Put_user(a,b) 0,put_user(a,b)
+#define copy_to_user(a,b,c) memcpy_tofs(a,b,c)
+
+static inline int copy_from_user(void *to,const void *from, int c)
+{
+ memcpy_fromfs(to, from, c);
+ return 0;
+}
+
+#define pci_present pcibios_present
+#define pci_read_config_word pcibios_read_config_word
+#define pci_read_config_dword pcibios_read_config_dword
+
+static inline unsigned char get_irq (unsigned char bus, unsigned char fn)
+{
+ unsigned char t;
+ pcibios_read_config_byte (bus, fn, PCI_INTERRUPT_LINE, &t);
+ return t;
+}
+
+static inline void *ioremap(unsigned long base, long length)
+{
+ if (base < 0x100000) return (void *)base;
+ return vremap (base, length);
+}
+
+#define my_iounmap(x, b) (((long)x<0x100000)?0:vfree ((void*)x))
+
+#define capable(x) suser()
+
+#define queue_task queue_task_irq_off
+#define tty_flip_buffer_push(tty) queue_task(&tty->flip.tqueue, &tq_timer)
+#define signal_pending(current) (current->signal & ~current->blocked)
+#define schedule_timeout(to) do {current->timeout = jiffies + (to);schedule ();} while (0)
+#define time_after(t1,t2) (((long)t1-t2) > 0)
+
+
+#define test_and_set_bit(nr, addr) set_bit(nr, addr)
+#define test_and_clear_bit(nr, addr) clear_bit(nr, addr)
+
+/* Not yet implemented on 2.0 */
+#define ASYNC_SPD_SHI -1
+#define ASYNC_SPD_WARP -1
+
+
+/* Ugly hack: the driver_name doesn't exist in 2.0.x . So we define it
+ to the "name" field that does exist. As long as the assignments are
+ done in the right order, there is nothing to worry about. */
+#define driver_name name
+
+/* Should be in a header somewhere. They are in tty.h on 2.2 */
+#define TTY_HW_COOK_OUT 14 /* Flag to tell ntty what we can handle */
+#define TTY_HW_COOK_IN 15 /* in hardware - output and input */
+
+/* The return type of a "close" routine. */
+#define INT void
+#define NO_ERROR /* Nothing */
+
+#else
+
+/* The 2.2.x compatibility section. */
+#include <asm/uaccess.h>
+
+
+#define Get_user(a,b) get_user(a,b)
+#define Put_user(a,b) put_user(a,b)
+#define get_irq(pdev) pdev->irq
+
+#define INT int
+#define NO_ERROR 0
+
+#define my_iounmap(x,b) (iounmap((char *)(b)))
+
+#endif
+
+#ifndef TWO_THREE
+/* These are new in 2.3. The source now uses 2.3 syntax, and here is
+ the compatibility define... */
+#define wait_queue_head_t struct wait_queue *
+#define DECLARE_MUTEX(name) struct semaphore name = MUTEX
+#define DECLARE_WAITQUEUE(wait, current) \
+ struct wait_queue wait = { current, NULL }
+
+#endif
+
+
+#endif
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h
index cc23e2e0c..ae049ed2f 100644
--- a/include/linux/efs_fs.h
+++ b/include/linux/efs_fs.h
@@ -49,10 +49,7 @@ extern struct inode_operations efs_dir_inode_operations;
extern struct file_operations efs_dir_operations;
extern struct address_space_operations efs_symlink_aops;
-extern int init_module(void);
-extern void cleanup_module(void);
extern struct super_block *efs_read_super(struct super_block *, void *, int);
-extern void efs_put_super(struct super_block *);
extern int efs_statfs(struct super_block *, struct statfs *);
extern void efs_read_inode(struct inode *);
@@ -61,7 +58,4 @@ extern efs_block_t efs_map_block(struct inode *, efs_block_t);
extern struct dentry *efs_lookup(struct inode *, struct dentry *);
extern int efs_bmap(struct inode *, int);
-extern int init_efs_fs(void);
-
#endif /* __EFS_FS_H__ */
-
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
new file mode 100644
index 000000000..748a9834c
--- /dev/null
+++ b/include/linux/elevator.h
@@ -0,0 +1,124 @@
+#ifndef _LINUX_ELEVATOR_H
+#define _LINUX_ELEVATOR_H
+
+#define ELEVATOR_DEBUG
+
+struct elevator_s;
+typedef struct elevator_s elevator_t;
+
+typedef void (elevator_fn) (struct request *, elevator_t *,
+ struct list_head *,
+ struct list_head *, int);
+
+struct elevator_s
+{
+ int sequence;
+
+ int read_latency;
+ int write_latency;
+ int max_bomb_segments;
+
+ unsigned int nr_segments;
+ int read_pendings;
+
+ elevator_fn * elevator_fn;
+};
+
+#define ELEVATOR_DEFAULTS \
+((elevator_t) { \
+ 0, /* sequence */ \
+ \
+ 128, /* read_latency */ \
+ 8192, /* write_latency */ \
+ 4, /* max_bomb_segments */ \
+ \
+ 0, /* nr_segments */ \
+ 0, /* read_pendings */ \
+ \
+ elevator_default, /* elevator_fn */ \
+ })
+
+
+typedef struct blkelv_ioctl_arg_s {
+ void * queue_ID;
+ int read_latency;
+ int write_latency;
+ int max_bomb_segments;
+} blkelv_ioctl_arg_t;
+
+#define BLKELVGET _IO(0x12,106)
+#define BLKELVSET _IO(0x12,107)
+
+extern int blkelvget_ioctl(elevator_t *, blkelv_ioctl_arg_t *);
+extern int blkelvset_ioctl(elevator_t *, const blkelv_ioctl_arg_t *);
+
+
+extern void elevator_init(elevator_t *);
+
+#ifdef ELEVATOR_DEBUG
+extern void elevator_debug(request_queue_t *, kdev_t);
+#else
+#define elevator_debug(a,b) do { } while(0)
+#endif
+
+#define elevator_sequence_after(a,b) ((int)((b)-(a)) < 0)
+#define elevator_sequence_before(a,b) elevator_sequence_after(b,a)
+#define elevator_sequence_after_eq(a,b) ((int)((b)-(a)) <= 0)
+#define elevator_sequence_before_eq(a,b) elevator_sequence_after_eq(b,a)
+
+/*
+ * This is used in the elevator algorithm. We don't prioritise reads
+ * over writes any more --- although reads are more time-critical than
+ * writes, by treating them equally we increase filesystem throughput.
+ * This turns out to give better overall performance. -- sct
+ */
+#define IN_ORDER(s1,s2) \
+ ((((s1)->rq_dev == (s2)->rq_dev && \
+ (s1)->sector < (s2)->sector)) || \
+ (s1)->rq_dev < (s2)->rq_dev)
+
+static inline void elevator_merge_requests(elevator_t * e, struct request * req, struct request * next)
+{
+ if (elevator_sequence_before(next->elevator_sequence, req->elevator_sequence))
+ req->elevator_sequence = next->elevator_sequence;
+ if (req->cmd == READ)
+ e->read_pendings--;
+
+}
+
+static inline int elevator_sequence(elevator_t * e, int latency)
+{
+ return latency + e->sequence;
+}
+
+#define elevator_merge_before(q, req, lat) __elevator_merge((q), (req), (lat), 0)
+#define elevator_merge_after(q, req, lat) __elevator_merge((q), (req), (lat), 1)
+static inline void __elevator_merge(elevator_t * elevator, struct request * req, int latency, int after)
+{
+ int sequence = elevator_sequence(elevator, latency);
+ if (after)
+ sequence -= req->nr_segments;
+ if (elevator_sequence_before(sequence, req->elevator_sequence))
+ req->elevator_sequence = sequence;
+}
+
+static inline void elevator_account_request(elevator_t * elevator, struct request * req)
+{
+ elevator->sequence++;
+ if (req->cmd == READ)
+ elevator->read_pendings++;
+ elevator->nr_segments++;
+}
+
+static inline int elevator_request_latency(elevator_t * elevator, int rw)
+{
+ int latency;
+
+ latency = elevator->read_latency;
+ if (rw != READ)
+ latency = elevator->write_latency;
+
+ return latency;
+}
+
+#endif
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 43bf69f86..d763e4ba8 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -232,7 +232,7 @@ struct fb_vblank {
#ifdef __KERNEL__
-#if 1 /* to go away in 2.4.0 */
+#if 1 /* to go away in 2.5.0 */
extern int GET_FB_IDX(kdev_t rdev);
#else
#define GET_FB_IDX(node) (MINOR(node))
@@ -283,15 +283,12 @@ struct fb_ops {
int (*fb_rasterimg)(struct fb_info *info, int start);
};
-/* fb_info flags */
-#define FBINFO_FLAG_MODULE 1 /* Low-level driver is a module */
-#define FBINFO_FLAG_OPEN 2 /* Has this been open already ? */
-
struct fb_info {
char modename[40]; /* default video mode */
kdev_t node;
int flags;
- int count; /* How many using the hardware */
+ int open; /* Has this been open already ? */
+#define FBINFO_FLAG_MODULE 1 /* Low-level driver is a module */
struct fb_var_screeninfo var; /* Current var */
struct fb_fix_screeninfo fix; /* Current fix */
struct fb_monspecs monspecs; /* Current Monitor specs */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 0d472ec6e..bd37850b7 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -160,6 +160,8 @@ extern int max_super_blocks, nr_super_blocks;
#define BLKSSZGET _IO(0x12,104)/* get block device sector size */
#if 0
#define BLKPG _IO(0x12,105)/* See blkpg.h */
+#define BLKELVGET _IO(0x12,106)/* elevator get */
+#define BLKELVSET _IO(0x12,107)/* elevator set */
/* This was here just to show that the number is taken -
probably all these _IO(0x12,*) ioctls should be moved to blkpg.h. */
#endif
@@ -758,6 +760,7 @@ static inline int vfs_statfs(struct super_block *sb, struct statfs *buf)
if (!sb->s_op || !sb->s_op->statfs)
return -ENOSYS;
memset(buf, 0xff, sizeof(struct statfs));
+ buf->f_blocks = 0; /* Darn GNU df... */
return sb->s_op->statfs(sb, buf);
}
diff --git a/include/linux/generic_serial.h b/include/linux/generic_serial.h
new file mode 100644
index 000000000..c90f838a4
--- /dev/null
+++ b/include/linux/generic_serial.h
@@ -0,0 +1,105 @@
+/*
+ * generic_serial.h
+ *
+ * Copyright (C) 1998 R.E.Wolff@BitWizard.nl
+ *
+ * written for the SX serial driver.
+ * Contains the code that should be shared over all the serial drivers.
+ *
+ * Version 0.1 -- December, 1998.
+ */
+
+#ifndef GENERIC_SERIAL_H
+#define GENERIC_SERIAL_H
+
+
+
+
+struct real_driver {
+ void (*disable_tx_interrupts) (void *);
+ void (*enable_tx_interrupts) (void *);
+ void (*disable_rx_interrupts) (void *);
+ void (*enable_rx_interrupts) (void *);
+ int (*get_CD) (void *);
+ void (*shutdown_port) (void*);
+ int (*set_real_termios) (void*);
+ int (*chars_in_buffer) (void*);
+ void (*close) (void*);
+ void (*hungup) (void*);
+ void (*getserial) (void*, struct serial_struct *sp);
+};
+
+
+
+struct gs_port {
+ int magic;
+ unsigned char *xmit_buf;
+ int xmit_head;
+ int xmit_tail;
+ int xmit_cnt;
+ /* struct semaphore port_write_sem; */
+ int flags;
+ struct termios normal_termios;
+ struct termios callout_termios;
+ wait_queue_head_t open_wait;
+ wait_queue_head_t close_wait;
+ long session;
+ long pgrp;
+ int count;
+ int blocked_open;
+ struct tty_struct *tty;
+ int event;
+ unsigned short closing_wait;
+ int close_delay;
+ struct real_driver *rd;
+ int wakeup_chars;
+ int baud_base;
+ int baud;
+ int custom_divisor;
+};
+
+
+/* Flags */
+/* Warning: serial.h defines some ASYNC_ flags, they say they are "only"
+ used in serial.c, but they are also used in all other serial drivers.
+ Make sure they don't clash with these here... */
+#define GS_TX_INTEN 0x00800000
+#define GS_RX_INTEN 0x00400000
+#define GS_ACTIVE 0x00200000
+
+
+
+#define GS_TYPE_NORMAL 1
+#define GS_TYPE_CALLOUT 2
+
+
+#define GS_DEBUG_FLUSH 0x00000001
+#define GS_DEBUG_BTR 0x00000002
+#define GS_DEBUG_TERMIOS 0x00000004
+#define GS_DEBUG_STUFF 0x00000008
+#define GS_DEBUG_CLOSE 0x00000010
+#define GS_DEBUG_FLOW 0x00000020
+
+
+void gs_put_char(struct tty_struct *tty, unsigned char ch);
+int gs_write(struct tty_struct *tty, int from_user,
+ const unsigned char *buf, int count);
+int gs_write_room(struct tty_struct *tty);
+int gs_chars_in_buffer(struct tty_struct *tty);
+void gs_flush_buffer(struct tty_struct *tty);
+void gs_flush_chars(struct tty_struct *tty);
+void gs_stop(struct tty_struct *tty);
+void gs_start(struct tty_struct *tty);
+void gs_hangup(struct tty_struct *tty);
+void gs_do_softint(void *private_);
+int block_til_ready(void *port, struct file *filp);
+void gs_close(struct tty_struct *tty, struct file *filp);
+void gs_set_termios (struct tty_struct * tty,
+ struct termios * old_termios);
+int gs_init_port(struct gs_port *port);
+int gs_setserial(struct gs_port *port, struct serial_struct *sp);
+void gs_getserial(struct gs_port *port, struct serial_struct *sp);
+
+extern int gs_debug;
+
+#endif
diff --git a/include/linux/hfs_fs.h b/include/linux/hfs_fs.h
index 3c3913943..65392fc39 100644
--- a/include/linux/hfs_fs.h
+++ b/include/linux/hfs_fs.h
@@ -302,7 +302,6 @@ extern void hfs_sngl_ifill(struct inode *, ino_t, const int);
/* super.c */
extern struct super_block *hfs_read_super(struct super_block *,void *,int);
-extern int init_hfs_fs(void);
/* trans.c */
extern void hfs_colon2mac(struct hfs_name *, const char *, int);
diff --git a/include/linux/hpfs_fs.h b/include/linux/hpfs_fs.h
index 2b7926aba..a5028dd94 100644
--- a/include/linux/hpfs_fs.h
+++ b/include/linux/hpfs_fs.h
@@ -5,9 +5,4 @@
#define HPFS_SUPER_MAGIC 0xf995e849
-/* The entry point for a VFS */
-
-extern struct super_block *hpfs_read_super (struct super_block *, void *, int);
-extern int init_hpfs_fs(void);
-
#endif
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h
index 18a265d18..f5d80a778 100644
--- a/include/linux/if_ppp.h
+++ b/include/linux/if_ppp.h
@@ -21,7 +21,7 @@
*/
/*
- * ==FILEVERSION 990806==
+ * ==FILEVERSION 20000115==
*
* NOTE TO MAINTAINERS:
* If you modify this file at all, please set the above date.
@@ -60,8 +60,10 @@
#define SC_ENABLE_IP 0x00000100 /* IP packets may be exchanged */
#define SC_LOOP_TRAFFIC 0x00000200 /* send traffic to pppd */
#define SC_MULTILINK 0x00000400 /* do multilink encapsulation */
+#define SC_MP_SHORTSEQ 0x00000800 /* use short MP sequence numbers */
#define SC_COMP_RUN 0x00001000 /* compressor has been inited */
#define SC_DECOMP_RUN 0x00002000 /* decompressor has been inited */
+#define SC_MP_XSHORTSEQ 0x00004000 /* transmit short MP seq numbers */
#define SC_DEBUG 0x00010000 /* enable debug messages */
#define SC_LOG_INPKT 0x00020000 /* log contents of good pkts recvd */
#define SC_LOG_OUTPKT 0x00040000 /* log contents of pkts sent */
@@ -133,7 +135,11 @@ struct ifpppcstatsreq {
#define PPPIOCGIDLE _IOR('t', 63, struct ppp_idle) /* get idle time */
#define PPPIOCNEWUNIT _IOWR('t', 62, int) /* create new ppp unit */
#define PPPIOCATTACH _IOW('t', 61, int) /* attach to ppp unit */
-#define PPPIOCDETACH _IOW('t', 60, int) /* detach from ppp unit */
+#define PPPIOCDETACH _IOW('t', 60, int) /* detach from ppp unit/chan */
+#define PPPIOCSMRRU _IOW('t', 59, int) /* set multilink MRU */
+#define PPPIOCCONNECT _IOW('t', 58, int) /* connect channel to unit */
+#define PPPIOCDISCONN _IO('t', 57) /* disconnect channel */
+#define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */
#define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0)
#define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */
diff --git a/include/linux/iso_fs.h b/include/linux/iso_fs.h
index 47fab8914..63543da77 100644
--- a/include/linux/iso_fs.h
+++ b/include/linux/iso_fs.h
@@ -186,7 +186,6 @@ int get_acorn_filename(struct iso_directory_record *, char *, struct inode *);
extern struct dentry *isofs_lookup(struct inode *, struct dentry *);
extern int isofs_get_block(struct inode *, long, struct buffer_head *, int);
extern int isofs_bmap(struct inode *, int);
-extern int init_iso9660_fs(void);
extern int isofs_lookup_grandparent(struct inode *, int);
extern struct inode_operations isofs_dir_inode_operations;
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index f42566696..4e880c937 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -10,7 +10,7 @@ extern int request_module(const char * name);
extern int exec_usermodehelper(char *program_path, char *argv[], char *envp[]);
#else
static inline int request_module(const char * name) { return -ENOSYS; }
-extern inline int exec_usermodehelper(char *program_path, char *argv[], char *envp[])
+static inline int exec_usermodehelper(char *program_path, char *argv[], char *envp[])
{
return -EACCES;
}
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h
index 6f63a54c4..1eca767b4 100644
--- a/include/linux/minix_fs.h
+++ b/include/linux/minix_fs.h
@@ -100,7 +100,6 @@ extern struct buffer_head * minix_getblk(struct inode *, int, int);
extern struct buffer_head * minix_bread(struct inode *, int, int);
extern void minix_truncate(struct inode *);
-extern int init_minix_fs(void);
extern int minix_sync_inode(struct inode *);
extern int minix_sync_file(struct file *, struct dentry *);
diff --git a/include/linux/mm.h b/include/linux/mm.h
index bcf872ade..cb3a4f42f 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -60,6 +60,7 @@ struct vm_area_struct {
struct vm_operations_struct * vm_ops;
unsigned long vm_pgoff; /* offset in PAGE_SIZE units, *not* PAGE_CACHE_SIZE */
struct file * vm_file;
+ unsigned long vm_raend;
void * vm_private_data; /* was vm_pte (shared mem) */
};
@@ -83,10 +84,19 @@ struct vm_area_struct {
#define VM_EXECUTABLE 0x00001000
#define VM_LOCKED 0x00002000
-#define VM_IO 0x00004000 /* Memory mapped I/O or similar */
+#define VM_IO 0x00004000 /* Memory mapped I/O or similar */
+
+#define VM_SEQ_READ 0x00008000 /* App will access data sequentially */
+#define VM_RAND_READ 0x00010000 /* App will not benefit from clustered reads */
#define VM_STACK_FLAGS 0x00000177
+#define VM_READHINTMASK (VM_SEQ_READ | VM_RAND_READ)
+#define VM_ClearReadHint(v) (v)->vm_flags &= ~VM_READHINTMASK
+#define VM_NormalReadHint(v) (!((v)->vm_flags & VM_READHINTMASK))
+#define VM_SequentialReadHint(v) ((v)->vm_flags & VM_SEQ_READ)
+#define VM_RandomReadHint(v) ((v)->vm_flags & VM_RAND_READ)
+
/*
* mapping from the currently active vm_flags protection bits (the
* low four bits) to a page protection mask..
@@ -105,7 +115,6 @@ struct vm_operations_struct {
void (*unmap)(struct vm_area_struct *area, unsigned long, size_t);
void (*protect)(struct vm_area_struct *area, unsigned long, size_t, unsigned int newprot);
int (*sync)(struct vm_area_struct *area, unsigned long, size_t, unsigned int flags);
- void (*advise)(struct vm_area_struct *area, unsigned long, size_t, unsigned int advise);
struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int write_access);
struct page * (*wppage)(struct vm_area_struct * area, unsigned long address, struct page * page);
int (*swapout)(struct page *, struct file *);
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 17a64200e..82d3e62f4 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -15,8 +15,8 @@
#define MAX_ORDER 10
typedef struct free_area_struct {
- struct list_head free_list;
- unsigned int * map;
+ struct list_head free_list;
+ unsigned int *map;
} free_area_t;
struct pglist_data;
@@ -25,30 +25,31 @@ typedef struct zone_struct {
/*
* Commonly accessed fields:
*/
- spinlock_t lock;
- unsigned long offset;
- unsigned long free_pages;
- char low_on_memory;
- char zone_wake_kswapd;
- unsigned long pages_min, pages_low, pages_high;
+ spinlock_t lock;
+ unsigned long offset;
+ unsigned long free_pages;
+ char low_on_memory;
+ char zone_wake_kswapd;
+ unsigned long pages_min, pages_low, pages_high;
+ struct list_head lru_cache;
/*
* free areas of different sizes
*/
- free_area_t free_area[MAX_ORDER];
+ free_area_t free_area[MAX_ORDER];
/*
* rarely used fields:
*/
- char * name;
- unsigned long size;
+ char *name;
+ unsigned long size;
/*
* Discontig memory support fields.
*/
- struct pglist_data *zone_pgdat;
- unsigned long zone_start_paddr;
- unsigned long zone_start_mapnr;
- struct page * zone_mem_map;
+ struct pglist_data *zone_pgdat;
+ unsigned long zone_start_paddr;
+ unsigned long zone_start_mapnr;
+ struct page *zone_mem_map;
} zone_t;
#define ZONE_DMA 0
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index ce7837f1d..adcfb751d 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -272,14 +272,6 @@ extern ssize_t fat_file_read(struct file *, char *, size_t, loff_t *);
extern ssize_t fat_file_write(struct file *, const char *, size_t, loff_t *);
extern void fat_truncate(struct inode *inode);
-/* vfat.c */
-extern int init_vfat_fs(void);
-
-
-/* msdosfs_syms.c */
-extern int init_msdos_fs(void);
-extern struct file_system_type msdos_fs_type;
-
/* msdos.c */
extern struct super_block *msdos_read_super(struct super_block *sb,void *data, int silent);
@@ -294,7 +286,6 @@ extern int msdos_rename(struct inode *old_dir,struct dentry *old_dentry,
struct inode *new_dir,struct dentry *new_dentry);
/* nls.c */
-extern int init_fat_nls(void);
extern struct fat_nls_table *fat_load_nls(int codepage);
/* tables.c */
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h
index b028f984c..87dfef8cb 100644
--- a/include/linux/ncp_fs.h
+++ b/include/linux/ncp_fs.h
@@ -228,7 +228,6 @@ struct super_block *ncp_read_super(struct super_block *, void *, int);
struct inode *ncp_iget(struct super_block *, struct ncp_entry_info *);
void ncp_update_inode(struct inode *, struct ncp_entry_info *);
void ncp_update_inode2(struct inode *, struct ncp_entry_info *);
-extern int init_ncp_fs(void);
/* linux/fs/ncpfs/dir.c */
extern struct inode_operations ncp_dir_inode_operations;
diff --git a/include/linux/nls.h b/include/linux/nls.h
index 9e39d3cd4..62f52e740 100644
--- a/include/linux/nls.h
+++ b/include/linux/nls.h
@@ -1,3 +1,5 @@
+#include <linux/init.h>
+
struct nls_unicode {
unsigned char uni1;
unsigned char uni2;
@@ -9,16 +11,13 @@ struct nls_table {
struct nls_unicode *charset2uni;
unsigned char *charset2lower;
unsigned char *charset2upper;
- void (*inc_use_count) (void);
- void (*dec_use_count) (void);
+ struct module *owner;
struct nls_table *next;
};
/* nls.c */
-extern int init_nls(void);
extern int register_nls(struct nls_table *);
extern int unregister_nls(struct nls_table *);
-extern struct nls_table *find_nls(char *);
extern struct nls_table *load_nls(char *);
extern void unload_nls(struct nls_table *);
extern struct nls_table *load_nls_default(void);
@@ -27,31 +26,3 @@ extern int utf8_mbtowc(__u16 *, const __u8 *, int);
extern int utf8_mbstowcs(__u16 *, const __u8 *, int);
extern int utf8_wctomb(__u8 *, __u16, int);
extern int utf8_wcstombs(__u8 *, const __u16 *, int);
-
-extern int init_nls_iso8859_1(void);
-extern int init_nls_iso8859_2(void);
-extern int init_nls_iso8859_3(void);
-extern int init_nls_iso8859_4(void);
-extern int init_nls_iso8859_5(void);
-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);
-extern int init_nls_cp850(void);
-extern int init_nls_cp852(void);
-extern int init_nls_cp855(void);
-extern int init_nls_cp857(void);
-extern int init_nls_cp860(void);
-extern int init_nls_cp861(void);
-extern int init_nls_cp862(void);
-extern int init_nls_cp863(void);
-extern int init_nls_cp864(void);
-extern int init_nls_cp865(void);
-extern int init_nls_cp866(void);
-extern int init_nls_cp869(void);
-extern int init_nls_cp874(void);
-extern int init_nls_koi8_r(void);
diff --git a/include/linux/ntfs_fs.h b/include/linux/ntfs_fs.h
index acbfc2939..7b30dd7b0 100644
--- a/include/linux/ntfs_fs.h
+++ b/include/linux/ntfs_fs.h
@@ -1,7 +1,3 @@
#ifndef _LINUX_NTFS_FS_H
#define _LINUX_NTFS_FS_H
-
-int init_ntfs_fs(void);
-
#endif
-
diff --git a/include/linux/pci.h b/include/linux/pci.h
index d32ff4828..413def0a9 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -577,6 +577,9 @@ unsigned int ss_vendor, unsigned int ss_device, const struct pci_dev *from)
extern inline void pci_set_master(struct pci_dev *dev) { }
extern inline int pci_enable_device(struct pci_dev *dev) { return -EIO; }
extern inline int pci_module_init(struct pci_driver *drv) { return -ENODEV; }
+extern inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;}
+extern inline int pci_register_driver(struct pci_driver *drv) { return 0;}
+extern inline void pci_unregister_driver(struct pci_driver *drv) { }
#else
diff --git a/include/linux/personality.h b/include/linux/personality.h
index 31a42d62c..7607cf6ff 100644
--- a/include/linux/personality.h
+++ b/include/linux/personality.h
@@ -54,6 +54,8 @@ extern struct exec_domain default_exec_domain;
extern struct exec_domain *lookup_exec_domain(unsigned long personality);
extern int register_exec_domain(struct exec_domain *it);
extern int unregister_exec_domain(struct exec_domain *it);
+#define put_exec_domain(it) \
+ if (it && it->module) __MOD_DEC_USE_COUNT(it->module);
asmlinkage long sys_personality(unsigned long personality);
#endif /* _PERSONALITY_H */
diff --git a/include/linux/ppp_channel.h b/include/linux/ppp_channel.h
index d1f9dd66c..fdcfb8f75 100644
--- a/include/linux/ppp_channel.h
+++ b/include/linux/ppp_channel.h
@@ -16,11 +16,9 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * ==FILEVERSION 990909==
+ * ==FILEVERSION 20000225==
*/
-/* $Id: ppp_channel.h,v 1.3 2000/01/31 01:42:48 davem Exp $ */
-
#include <linux/list.h>
#include <linux/skbuff.h>
@@ -30,18 +28,19 @@ struct ppp_channel_ops {
/* Send a packet (or multilink fragment) on this channel.
Returns 1 if it was accepted, 0 if not. */
int (*start_xmit)(struct ppp_channel *, struct sk_buff *);
-
+ /* Handle an ioctl call that has come in via /dev/ppp. */
+ int (*ioctl)(struct ppp_channel *, unsigned int, unsigned long);
};
struct ppp_channel {
void *private; /* channel private data */
struct ppp_channel_ops *ops; /* operations for this channel */
- int xmit_qlen; /* length of transmit queue (bytes) */
- int speed; /* transfer rate (bytes/second) */
- int latency; /* overhead time in milliseconds */
+ int mtu; /* max transmit packet size */
int hdrlen; /* amount of headroom channel needs */
- struct list_head list; /* link in list of channels per unit */
void *ppp; /* opaque to channel */
+ /* the following are not used at present */
+ int speed; /* transfer rate (bytes/second) */
+ int latency; /* overhead time in milliseconds */
};
#ifdef __KERNEL__
@@ -57,10 +56,32 @@ extern void ppp_input(struct ppp_channel *, struct sk_buff *);
extern void ppp_input_error(struct ppp_channel *, int code);
/* Attach a channel to a given PPP unit. */
-extern int ppp_register_channel(struct ppp_channel *, int unit);
+extern int ppp_register_channel(struct ppp_channel *);
/* Detach a channel from its PPP unit (e.g. on hangup). */
extern void ppp_unregister_channel(struct ppp_channel *);
+/* Get the channel number for a channel */
+extern int ppp_channel_index(struct ppp_channel *);
+
+/*
+ * SMP locking notes:
+ * The channel code must ensure that when it calls ppp_unregister_channel,
+ * nothing is executing in any of the procedures above, for that
+ * channel. The generic layer will ensure that nothing is executing
+ * in the start_xmit and ioctl routines for the channel by the time
+ * that ppp_unregister_channel returns.
+ */
+
+/* The following are temporary compatibility stuff */
+ssize_t ppp_channel_read(struct ppp_channel *chan, struct file *file,
+ char *buf, size_t count);
+ssize_t ppp_channel_write(struct ppp_channel *chan, const char *buf,
+ size_t count);
+unsigned int ppp_channel_poll(struct ppp_channel *chan, struct file *file,
+ poll_table *wait);
+int ppp_channel_ioctl(struct ppp_channel *chan, unsigned int cmd,
+ unsigned long arg);
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/linux/ppp_defs.h b/include/linux/ppp_defs.h
index c506c90ab..a6eafea09 100644
--- a/include/linux/ppp_defs.h
+++ b/include/linux/ppp_defs.h
@@ -28,7 +28,7 @@
*/
/*
- * ==FILEVERSION 990114==
+ * ==FILEVERSION 20000114==
*
* NOTE TO MAINTAINERS:
* If you modify this file at all, please set the above date.
@@ -70,12 +70,15 @@
#define PPP_IPX 0x2b /* IPX protocol */
#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */
#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */
+#define PPP_MP 0x3d /* Multilink protocol */
#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */
+#define PPP_COMPFRAG 0xfb /* fragment compressed below bundle */
#define PPP_COMP 0xfd /* compressed packet */
#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_CCPFRAG 0x80fb /* CCP at link level (below MP bundle) */
#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 f5927109a..f92195a3e 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -98,7 +98,6 @@ extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
extern struct super_block *proc_super_blocks;
extern struct super_block *proc_read_super(struct super_block *,void *,int);
-extern int init_proc_fs(void);
extern struct inode * proc_get_inode(struct super_block *, int, struct proc_dir_entry *);
extern int proc_match(int, const char *,struct proc_dir_entry *);
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h
index 4e68ee5a6..ad5ca5543 100644
--- a/include/linux/qnx4_fs.h
+++ b/include/linux/qnx4_fs.h
@@ -104,7 +104,6 @@ extern unsigned long qnx4_block_map(struct inode *inode, long iblock);
extern struct buffer_head *qnx4_getblk(struct inode *, int, int);
extern struct buffer_head *qnx4_bread(struct inode *, int, int);
-extern int init_qnx4_fs(void);
extern int qnx4_create(struct inode *dir, struct dentry *dentry, int mode);
extern struct inode_operations qnx4_file_inode_operations;
extern struct inode_operations qnx4_dir_inode_operations;
diff --git a/include/linux/romfs_fs.h b/include/linux/romfs_fs.h
index 844e22f99..8f452cbd4 100644
--- a/include/linux/romfs_fs.h
+++ b/include/linux/romfs_fs.h
@@ -56,7 +56,6 @@ struct romfs_inode {
#ifdef __KERNEL__
/* Not much now */
-extern int init_romfs_fs(void);
#endif /* __KERNEL__ */
#endif
diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h
index d11573ca5..5df1ef295 100644
--- a/include/linux/smb_fs.h
+++ b/include/linux/smb_fs.h
@@ -120,7 +120,6 @@ int smb_revalidate_inode(struct dentry *);
int smb_notify_change(struct dentry *, struct iattr *);
unsigned long smb_invent_inos(unsigned long);
struct inode *smb_iget(struct super_block *, struct smb_fattr *);
-extern int init_smb_fs(void);
/* linux/fs/smbfs/proc.c */
__u32 smb_len(unsigned char *);
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 2e7e27e25..d79fd68ef 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -67,7 +67,6 @@ FASTCALL(unsigned int nr_free_pages(void));
FASTCALL(unsigned int nr_free_buffer_pages(void));
FASTCALL(unsigned int nr_free_highpages(void));
extern int nr_lru_pages;
-extern struct list_head lru_cache;
extern atomic_t nr_async_pages;
extern struct address_space swapper_space;
extern atomic_t page_cache_size;
@@ -167,7 +166,7 @@ extern spinlock_t pagemap_lru_lock;
#define lru_cache_add(page) \
do { \
spin_lock(&pagemap_lru_lock); \
- list_add(&(page)->lru, &lru_cache); \
+ list_add(&(page)->lru, &page->zone->lru_cache); \
nr_lru_pages++; \
spin_unlock(&pagemap_lru_lock); \
} while (0)
diff --git a/include/linux/sysv_fs.h b/include/linux/sysv_fs.h
index 9e177c3d4..d9c2557e5 100644
--- a/include/linux/sysv_fs.h
+++ b/include/linux/sysv_fs.h
@@ -377,7 +377,6 @@ extern unsigned long sysv_count_free_blocks(struct super_block *sb);
extern struct buffer_head * sysv_file_bread(struct inode *, int, int);
extern void sysv_truncate(struct inode *);
-extern int init_sysv_fs(void);
extern void sysv_write_inode(struct inode *);
extern int sysv_sync_inode(struct inode *);
extern int sysv_sync_file(struct file *, struct dentry *);
diff --git a/include/linux/telephony.h b/include/linux/telephony.h
index 082b885f1..c3e4c5573 100644
--- a/include/linux/telephony.h
+++ b/include/linux/telephony.h
@@ -158,6 +158,16 @@ typedef enum {
WSS = 12
} phone_codec;
+struct phone_codec_data
+{
+ phone_codec type;
+ unsigned short buf_min, buf_opt, buf_max;
+};
+
+#define PHONE_QUERY_CODEC _IOWR ('q', 0xA7, struct phone_codec_data *)
+#define PHONE_PSTN_LINETEST _IO ('q', 0xA8)
+
+
/******************************************************************************
*
* The exception structure allows us to multiplex multiple events onto the
diff --git a/include/linux/tty.h b/include/linux/tty.h
index df7b3fe7c..48b7e0819 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -305,6 +305,7 @@ struct tty_struct {
unsigned long canon_head;
unsigned int canon_column;
struct semaphore atomic_read;
+ spinlock_t read_lock;
};
/* tty magic number */
diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h
index 47980eaaf..4f842ac30 100644
--- a/include/linux/udf_fs.h
+++ b/include/linux/udf_fs.h
@@ -60,7 +60,6 @@
/*
* Function prototypes (all other prototypes included in udfdecl.h)
*/
-extern int init_udf_fs(void);
#endif /* __KERNEL__ */
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index d7c14cd74..631791186 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -546,7 +546,6 @@ extern struct file_system_type ufs_fs_type;
extern void ufs_warning (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));
extern void ufs_error (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));
extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));
-extern int init_ufs_fs(void);
extern void ufs_write_super (struct super_block *);
/* symlink.c */
diff --git a/include/linux/umsdos_fs.h b/include/linux/umsdos_fs.h
index 6f113d28c..8dcb93719 100644
--- a/include/linux/umsdos_fs.h
+++ b/include/linux/umsdos_fs.h
@@ -177,7 +177,6 @@ extern struct inode_operations umsdos_dir_inode_operations;
extern struct inode_operations umsdos_rdir_inode_operations;
extern struct file_operations umsdos_dir_operations;
extern struct file_operations umsdos_rdir_operations;
-extern int init_umsdos_fs (void);
#include <linux/umsdos_fs.p>
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 69f0189aa..8326fb791 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -364,16 +364,20 @@ struct usb_driver {
*/
typedef int (*usb_device_irq)(int, void *, int, void *);
-/* --------------------------------------------------------------------------*
- * New USB Structures *
- * --------------------------------------------------------------------------*/
+/* -------------------------------------------------------------------------------------*
+ * New USB Structures *
+ * -------------------------------------------------------------------------------------*/
-#define USB_DISABLE_SPD 1
-#define USB_ISO_ASAP 2
-#define USB_URB_EARLY_COMPLETE 4
-#define USB_ASYNC_UNLINK 8
-typedef struct {
+#define USB_DISABLE_SPD 0x0001
+#define USB_ISO_ASAP 0x0002
+#define USB_URB_EARLY_COMPLETE 0x0004
+#define USB_ASYNC_UNLINK 0x0008
+#define USB_QUEUE_BULK 0x0010
+#define USB_TIMEOUT_KILLED 0x1000 // only set by HCD!
+
+typedef struct
+{
unsigned int offset;
unsigned int length; // expected length
unsigned int actual_length;
@@ -402,6 +406,7 @@ typedef struct urb
int number_of_packets; // number of packets in this request (iso/irq only)
int interval; // polling interval (irq only)
int error_count; // number of errors in this transfer (iso only)
+ int timeout; // timeout (in jiffies)
//
void *context; // context for completion routine
usb_complete_t complete; // pointer to completion routine
@@ -445,6 +450,31 @@ typedef struct urb
(a)->start_frame=-1;\
} while (0)
+#define FILL_CONTROL_URB_TO(a,aa,b,c,d,e,f,g,h) \
+ do {\
+ spin_lock_init(&(a)->lock);\
+ (a)->dev=aa;\
+ (a)->pipe=b;\
+ (a)->setup_packet=c;\
+ (a)->transfer_buffer=d;\
+ (a)->transfer_buffer_length=e;\
+ (a)->complete=f;\
+ (a)->context=g;\
+ (a)->timeout=h;\
+ } while (0)
+
+#define FILL_BULK_URB_TO(a,aa,b,c,d,e,f,g) \
+ do {\
+ spin_lock_init(&(a)->lock);\
+ (a)->dev=aa;\
+ (a)->pipe=b;\
+ (a)->transfer_buffer=c;\
+ (a)->transfer_buffer_length=d;\
+ (a)->complete=e;\
+ (a)->context=f;\
+ (a)->timeout=g;\
+ } while (0)
+
purb_t usb_alloc_urb(int iso_packets);
void usb_free_urb (purb_t purb);
int usb_submit_urb(purb_t purb);