summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/ide.h3
-rw-r--r--include/asm-arm/arch-ebsa285/irq.h13
-rw-r--r--include/asm-arm/arch-l7200/dma.h23
-rw-r--r--include/asm-arm/arch-l7200/hardware.h49
-rw-r--r--include/asm-arm/arch-l7200/ide.h27
-rw-r--r--include/asm-arm/arch-l7200/io.h210
-rw-r--r--include/asm-arm/arch-l7200/irq.h66
-rw-r--r--include/asm-arm/arch-l7200/irqs.h45
-rw-r--r--include/asm-arm/arch-l7200/memory.h44
-rw-r--r--include/asm-arm/arch-l7200/param.h23
-rw-r--r--include/asm-arm/arch-l7200/processor.h27
-rw-r--r--include/asm-arm/arch-l7200/serial_l7200.h101
-rw-r--r--include/asm-arm/arch-l7200/system.h30
-rw-r--r--include/asm-arm/arch-l7200/time.h68
-rw-r--r--include/asm-arm/arch-l7200/timex.h20
-rw-r--r--include/asm-arm/arch-l7200/uncompress.h19
-rw-r--r--include/asm-arm/arch-l7200/vmalloc.h16
-rw-r--r--include/asm-arm/hardirq.h14
-rw-r--r--include/asm-arm/proc-armo/semaphore.h75
-rw-r--r--include/asm-arm/proc-armv/locks.h64
-rw-r--r--include/asm-arm/softirq.h8
-rw-r--r--include/asm-arm/string.h8
-rw-r--r--include/asm-arm/unistd.h4
-rw-r--r--include/asm-i386/apicdef.h3
-rw-r--r--include/asm-i386/hw_irq.h36
-rw-r--r--include/asm-i386/ide.h1
-rw-r--r--include/asm-i386/uaccess.h22
-rw-r--r--include/asm-ia64/ide.h1
-rw-r--r--include/asm-ppc/bitops.h2
-rw-r--r--include/asm-ppc/cpm_8260.h19
-rw-r--r--include/asm-ppc/init.h6
-rw-r--r--include/asm-ppc/page.h3
-rw-r--r--include/asm-ppc/siginfo.h2
-rw-r--r--include/asm-ppc/string.h10
-rw-r--r--include/asm-sh/cache.h4
-rw-r--r--include/asm-sh/checksum.h37
-rw-r--r--include/asm-sh/hitachi_se.h53
-rw-r--r--include/asm-sh/ide.h11
-rw-r--r--include/asm-sh/io.h116
-rw-r--r--include/asm-sh/irq.h72
-rw-r--r--include/asm-sh/pgtable.h6
-rw-r--r--include/asm-sh/smc37c93x.h190
-rw-r--r--include/asm-sh/system.h24
-rw-r--r--include/asm-sh/unistd.h6
-rw-r--r--include/asm-sparc/bitops.h2
-rw-r--r--include/asm-sparc/ide.h5
-rw-r--r--include/asm-sparc/irq.h2
-rw-r--r--include/asm-sparc/pgalloc.h2
-rw-r--r--include/asm-sparc/system.h2
-rw-r--r--include/asm-sparc/winmacro.h2
-rw-r--r--include/asm-sparc64/delay.h2
-rw-r--r--include/asm-sparc64/ide.h5
-rw-r--r--include/asm-sparc64/irq.h2
-rw-r--r--include/asm-sparc64/oplib.h2
-rw-r--r--include/asm-sparc64/processor.h2
-rw-r--r--include/asm-sparc64/system.h2
-rw-r--r--include/asm-sparc64/timer.h2
-rw-r--r--include/asm-sparc64/unistd.h6
-rw-r--r--include/linux/coda.h6
-rw-r--r--include/linux/dcache.h9
-rw-r--r--include/linux/elevator.h8
-rw-r--r--include/linux/fb.h3
-rw-r--r--include/linux/fs.h9
-rw-r--r--include/linux/hdreg.h15
-rw-r--r--include/linux/hdsmart.h205
-rw-r--r--include/linux/ide.h52
-rw-r--r--include/linux/if_pppox.h5
-rw-r--r--include/linux/lvm.h6
-rw-r--r--include/linux/mount.h1
-rw-r--r--include/linux/netfilter_ipv6.h10
-rw-r--r--include/linux/netfilter_ipv6/ip6_tables.h452
-rw-r--r--include/linux/nfs_fs.h13
-rw-r--r--include/linux/nfs_mount.h7
-rw-r--r--include/linux/nfs_page.h2
-rw-r--r--include/linux/nfs_xdr.h9
-rw-r--r--include/linux/pci_ids.h22
-rw-r--r--include/linux/proc_fs.h3
-rw-r--r--include/linux/smb_fs.h1
-rw-r--r--include/linux/smb_fs_i.h1
-rw-r--r--include/linux/sunrpc/auth.h5
-rw-r--r--include/linux/umsdos_fs.p8
-rw-r--r--include/linux/usbdevice_fs.h2
-rw-r--r--include/linux/vmalloc.h50
-rw-r--r--include/linux/wait.h2
-rw-r--r--include/linux/wrapper.h1
-rw-r--r--include/net/slhc.h6
86 files changed, 1992 insertions, 540 deletions
diff --git a/include/asm-alpha/ide.h b/include/asm-alpha/ide.h
index ecb696099..f142fc6dc 100644
--- a/include/asm-alpha/ide.h
+++ b/include/asm-alpha/ide.h
@@ -74,7 +74,8 @@ static __inline__ void ide_init_default_hwifs(void)
int index;
for (index = 0; index < MAX_HWIFS; index++) {
- ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, 0);
+ memset(&hw, 0, sizeof(hw_regs_t));
+ ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL);
}
diff --git a/include/asm-arm/arch-ebsa285/irq.h b/include/asm-arm/arch-ebsa285/irq.h
index 9dcfa9480..134729f34 100644
--- a/include/asm-arm/arch-ebsa285/irq.h
+++ b/include/asm-arm/arch-ebsa285/irq.h
@@ -44,19 +44,8 @@ static int isa_irq = -1;
static inline int fixup_irq(unsigned int irq)
{
#ifdef CONFIG_HOST_FOOTBRIDGE
- if (irq == isa_irq) {
+ if (irq == isa_irq)
irq = *(unsigned char *)PCIIACK_BASE;
-
- /*
- * The NetWinder appears to randomly give wrong interrupt
- * numbers from time to time. When it does, map them to
- * the unused IRQ 13
- */
- if (irq >= NR_IRQS) {
- printk(KERN_ERR "Strange interrupt %d?\n", irq);
- irq = _ISA_IRQ(13);
- }
- }
#endif
return irq;
diff --git a/include/asm-arm/arch-l7200/dma.h b/include/asm-arm/arch-l7200/dma.h
new file mode 100644
index 000000000..be68279f7
--- /dev/null
+++ b/include/asm-arm/arch-l7200/dma.h
@@ -0,0 +1,23 @@
+#ifndef __ASM_ARCH_DMA_H
+#define __ASM_ARCH_DMA_H
+
+/*
+ * This is the maximum DMA address that can be DMAd to.
+ * There should not be more than (0xd0000000 - 0xc0000000)
+ * bytes of RAM.
+ */
+#define MAX_DMA_ADDRESS 0xd0000000
+#define MAX_DMA_CHANNELS 8
+
+#define DMA_0 0
+#define DMA_1 1
+#define DMA_2 2
+#define DMA_3 3
+#define DMA_S0 4
+#define DMA_S1 5
+#define DMA_VIRTUAL_FLOPPY 6
+#define DMA_VIRTUAL_SOUND 7
+
+#define DMA_FLOPPY DMA_VIRTUAL_FLOPPY
+
+#endif
diff --git a/include/asm-arm/arch-l7200/hardware.h b/include/asm-arm/arch-l7200/hardware.h
new file mode 100644
index 000000000..d800cbc8d
--- /dev/null
+++ b/include/asm-arm/arch-l7200/hardware.h
@@ -0,0 +1,49 @@
+/*
+ * linux/include/asm-arm/arch-l7200/hardware.h
+ *
+ * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
+ * Steve Hill (sjhill@cotw.com)
+ *
+ * This file contains the hardware definitions for the
+ * LinkUp Systems L7200 SOC development board.
+ *
+ * Changelog:
+ * 02-01-2000 RS Created L7200 version, derived from rpc code
+ * 03-21-2000 SJH Cleaned up file
+ * 04-21-2000 RS Changed mapping of I/O in virtual space
+ * 04-25-2000 SJH Removed unused symbols and such
+ * 05-05-2000 SJH Complete rewrite
+ */
+#ifndef __ASM_ARCH_HARDWARE_H
+#define __ASM_ARCH_HARDWARE_H
+
+/* Hardware addresses of major areas.
+ * *_START is the physical address
+ * *_SIZE is the size of the region
+ * *_BASE is the virtual address
+ */
+#define RAM_START 0xf0000000
+#define RAM_SIZE 0x02000000
+#define RAM_BASE 0xc0000000
+
+#define IO_START 0x80000000 /* I/O */
+#define IO_SIZE 0x01000000
+#define IO_BASE 0xd0000000
+
+#define IO_START_2 0x90000000 /* I/O */
+#define IO_SIZE_2 0x01000000
+#define IO_BASE_2 0xd1000000
+
+#define ISA_START 0x20000000 /* ISA */
+#define ISA_SIZE 0x20000000
+#define ISA_BASE 0xe0000000
+
+#define FLUSH_BASE_PHYS 0x40000000 /* ROM */
+#define FLUSH_BASE 0xdf000000
+
+#define PARAMS_BASE (PAGE_OFFSET + 0x0100)
+#define Z_PARAMS_BASE (RAM_START + PARAMS_OFFSET)
+
+#define PCIO_BASE IO_BASE
+
+#endif
diff --git a/include/asm-arm/arch-l7200/ide.h b/include/asm-arm/arch-l7200/ide.h
new file mode 100644
index 000000000..0cfcf3aac
--- /dev/null
+++ b/include/asm-arm/arch-l7200/ide.h
@@ -0,0 +1,27 @@
+/*
+ * linux/include/asm-arm/arch-l7200/ide.h
+ *
+ * Copyright (c) 2000 Steve Hill (sjhill@cotw.com)
+ *
+ * Changelog:
+ * 29-03-2000 SJH Created file placeholder
+ */
+#include <asm/irq.h>
+
+/*
+ * Set up a hw structure for a specified data port, control port and IRQ.
+ * This should follow whatever the default interface uses.
+ */
+static __inline__ void
+ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq)
+{
+}
+
+/*
+ * This registers the standard ports for this architecture with the IDE
+ * driver.
+ */
+static __inline__ void
+ide_init_default_hwifs(void)
+{
+}
diff --git a/include/asm-arm/arch-l7200/io.h b/include/asm-arm/arch-l7200/io.h
new file mode 100644
index 000000000..787b62108
--- /dev/null
+++ b/include/asm-arm/arch-l7200/io.h
@@ -0,0 +1,210 @@
+/*
+ * linux/include/asm-arm/arch-l7200/io.h
+ *
+ * Copyright (C) 2000 Steven Hill (sjhill@cotw.com)
+ *
+ * Modifications:
+ * 21-03-2000 SJH Created from linux/include/asm-arm/arch-nexuspci/io.h
+ */
+#ifndef __ASM_ARM_ARCH_IO_H
+#define __ASM_ARM_ARCH_IO_H
+
+#include <asm/arch/hardware.h>
+
+#define IO_SPACE_LIMIT 0xffffffff
+
+/*
+ * We use two different types of addressing - PC style addresses, and ARM
+ * addresses. PC style accesses the PC hardware with the normal PC IO
+ * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+
+ * and are translated to the start of IO. Note that all addresses are
+ * shifted left!
+ */
+#define __PORT_PCIO(x) (!((x) & 0x80000000))
+
+/*
+ * Dynamic IO functions.
+ */
+
+extern __inline__ void __outb (unsigned int value, unsigned int port)
+{
+ unsigned long temp;
+ __asm__ __volatile__(
+ "tst %2, #0x80000000\n\t"
+ "mov %0, %4\n\t"
+ "addeq %0, %0, %3\n\t"
+ "strb %1, [%0, %2, lsl #2] @ outb"
+ : "=&r" (temp)
+ : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
+ : "cc");
+}
+
+extern __inline__ void __outw (unsigned int value, unsigned int port)
+{
+ unsigned long temp;
+ __asm__ __volatile__(
+ "tst %2, #0x80000000\n\t"
+ "mov %0, %4\n\t"
+ "addeq %0, %0, %3\n\t"
+ "str %1, [%0, %2, lsl #2] @ outw"
+ : "=&r" (temp)
+ : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
+ : "cc");
+}
+
+extern __inline__ void __outl (unsigned int value, unsigned int port)
+{
+ unsigned long temp;
+ __asm__ __volatile__(
+ "tst %2, #0x80000000\n\t"
+ "mov %0, %4\n\t"
+ "addeq %0, %0, %3\n\t"
+ "str %1, [%0, %2, lsl #2] @ outl"
+ : "=&r" (temp)
+ : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
+ : "cc");
+}
+
+#define DECLARE_DYN_IN(sz,fnsuffix,instr) \
+extern __inline__ unsigned sz __in##fnsuffix (unsigned int port) \
+{ \
+ unsigned long temp, value; \
+ __asm__ __volatile__( \
+ "tst %2, #0x80000000\n\t" \
+ "mov %0, %4\n\t" \
+ "addeq %0, %0, %3\n\t" \
+ "ldr" ##instr## " %1, [%0, %2, lsl #2] @ in"###fnsuffix \
+ : "=&r" (temp), "=r" (value) \
+ : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \
+ : "cc"); \
+ return (unsigned sz)value; \
+}
+
+extern __inline__ unsigned int __ioaddr (unsigned int port) \
+{ \
+ if (__PORT_PCIO(port)) \
+ return (unsigned int)(PCIO_BASE + (port << 2)); \
+ else \
+ return (unsigned int)(IO_BASE + (port << 2)); \
+}
+
+#define DECLARE_IO(sz,fnsuffix,instr) \
+ DECLARE_DYN_IN(sz,fnsuffix,instr)
+
+DECLARE_IO(char,b,"b")
+DECLARE_IO(short,w,"")
+DECLARE_IO(int,l,"")
+
+#undef DECLARE_IO
+#undef DECLARE_DYN_IN
+
+/*
+ * Constant address IO functions
+ *
+ * These have to be macros for the 'J' constraint to work -
+ * +/-4096 immediate operand.
+ */
+#define __outbc(value,port) \
+({ \
+ if (__PORT_PCIO((port))) \
+ __asm__ __volatile__( \
+ "strb %0, [%1, %2] @ outbc" \
+ : : "r" (value), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
+ else \
+ __asm__ __volatile__( \
+ "strb %0, [%1, %2] @ outbc" \
+ : : "r" (value), "r" (IO_BASE), "r" ((port) << 2)); \
+})
+
+#define __inbc(port) \
+({ \
+ unsigned char result; \
+ if (__PORT_PCIO((port))) \
+ __asm__ __volatile__( \
+ "ldrb %0, [%1, %2] @ inbc" \
+ : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
+ else \
+ __asm__ __volatile__( \
+ "ldrb %0, [%1, %2] @ inbc" \
+ : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
+ result; \
+})
+
+#define __outwc(value,port) \
+({ \
+ unsigned long v = value; \
+ if (__PORT_PCIO((port))) \
+ __asm__ __volatile__( \
+ "str %0, [%1, %2] @ outwc" \
+ : : "r" (v|v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
+ else \
+ __asm__ __volatile__( \
+ "str %0, [%1, %2] @ outwc" \
+ : : "r" (v|v<<16), "r" (IO_BASE), "r" ((port) << 2)); \
+})
+
+#define __inwc(port) \
+({ \
+ unsigned short result; \
+ if (__PORT_PCIO((port))) \
+ __asm__ __volatile__( \
+ "ldr %0, [%1, %2] @ inwc" \
+ : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
+ else \
+ __asm__ __volatile__( \
+ "ldr %0, [%1, %2] @ inwc" \
+ : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
+ result & 0xffff; \
+})
+
+#define __outlc(value,port) \
+({ \
+ unsigned long v = value; \
+ if (__PORT_PCIO((port))) \
+ __asm__ __volatile__( \
+ "str %0, [%1, %2] @ outlc" \
+ : : "r" (v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
+ else \
+ __asm__ __volatile__( \
+ "str %0, [%1, %2] @ outlc" \
+ : : "r" (v), "r" (IO_BASE), "r" ((port) << 2)); \
+})
+
+#define __inlc(port) \
+({ \
+ unsigned long result; \
+ if (__PORT_PCIO((port))) \
+ __asm__ __volatile__( \
+ "ldr %0, [%1, %2] @ inlc" \
+ : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
+ else \
+ __asm__ __volatile__( \
+ "ldr %0, [%1, %2] @ inlc" \
+ : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
+ result; \
+})
+
+#define __ioaddrc(port) \
+ (__PORT_PCIO((port)) ? PCIO_BASE + ((port) << 2) : IO_BASE + ((port) << 2))
+
+#define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p))
+#define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p))
+#define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p))
+#define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
+#define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
+#define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
+#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
+
+/*
+ * Translated address IO functions
+ *
+ * IO address has already been translated to a virtual address
+ */
+#define outb_t(v,p) (*(volatile unsigned char *)(p) = (v))
+#define inb_t(p) (*(volatile unsigned char *)(p))
+#define outw_t(v,p) (*(volatile unsigned int *)(p) = (v))
+#define inw_t(p) (*(volatile unsigned int *)(p))
+#define outl_t(v,p) (*(volatile unsigned long *)(p) = (v))
+#define inl_t(p) (*(volatile unsigned long *)(p))
+
+#endif
diff --git a/include/asm-arm/arch-l7200/irq.h b/include/asm-arm/arch-l7200/irq.h
new file mode 100644
index 000000000..58b61664f
--- /dev/null
+++ b/include/asm-arm/arch-l7200/irq.h
@@ -0,0 +1,66 @@
+/*
+ * include/asm-arm/arch-l7200/irq.h
+ *
+ * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.ne
+ * Steve Hill (sjhill@cotw.com)
+ *
+ * Changelog:
+ * 01-02-2000 RS Created l7200 version, derived from ebsa110 code
+ * 04-15-2000 RS Made dependent on hardware.h
+ * 05-05-2000 SJH Complete rewrite
+ */
+
+/*
+ * IRQ base register
+ */
+#define IRQ_BASE (IO_BASE_2 + 0x1000)
+
+/*
+ * Normal IRQ registers
+ */
+#define IRQ_STATUS (*(volatile unsigned long *) (IRQ_BASE + 0x000))
+#define IRQ_RAWSTATUS (*(volatile unsigned long *) (IRQ_BASE + 0x004))
+#define IRQ_ENABLE (*(volatile unsigned long *) (IRQ_BASE + 0x008))
+#define IRQ_ENABLECLEAR (*(volatile unsigned long *) (IRQ_BASE + 0x00c))
+#define IRQ_SOFT (*(volatile unsigned long *) (IRQ_BASE + 0x010))
+#define IRQ_SOURCESEL (*(volatile unsigned long *) (IRQ_BASE + 0x018))
+
+/*
+ * Fast IRQ registers
+ */
+#define FIQ_STATUS (*(volatile unsigned long *) (IRQ_BASE + 0x100))
+#define FIQ_RAWSTATUS (*(volatile unsigned long *) (IRQ_BASE + 0x104))
+#define FIQ_ENABLE (*(volatile unsigned long *) (IRQ_BASE + 0x108))
+#define FIQ_ENABLECLEAR (*(volatile unsigned long *) (IRQ_BASE + 0x10c))
+#define FIQ_SOFT (*(volatile unsigned long *) (IRQ_BASE + 0x110))
+#define FIQ_SOURCESEL (*(volatile unsigned long *) (IRQ_BASE + 0x118))
+
+#define fixup_irq(x) (x)
+
+static void l7200_mask_irq(unsigned int irq)
+{
+ IRQ_ENABLECLEAR = 1 << irq;
+}
+
+static void l7200_unmask_irq(unsigned int irq)
+{
+ IRQ_ENABLE = 1 << irq;
+}
+
+static __inline__ void irq_init_irq(void)
+{
+ int irq;
+
+ IRQ_ENABLECLEAR = 0xffffffff; /* clear all interrupt enables */
+ FIQ_ENABLECLEAR = 0xffffffff; /* clear all fast interrupt enables */
+
+ for (irq = 0; irq < NR_IRQS; irq++) {
+ irq_desc[irq].valid = 1;
+ irq_desc[irq].probe_ok = 1;
+ irq_desc[irq].mask_ack = l7200_mask_irq;
+ irq_desc[irq].mask = l7200_mask_irq;
+ irq_desc[irq].unmask = l7200_unmask_irq;
+ }
+
+ init_FIQ();
+}
diff --git a/include/asm-arm/arch-l7200/irqs.h b/include/asm-arm/arch-l7200/irqs.h
new file mode 100644
index 000000000..175efa1bd
--- /dev/null
+++ b/include/asm-arm/arch-l7200/irqs.h
@@ -0,0 +1,45 @@
+/*
+ * include/asm-arm/arch-l7200/irqs.h
+ *
+ * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
+ * Steve Hill (sjhill@cotw.com)
+ *
+ * Changelog:
+ * 01-02-2000 RS Create l7200 version
+ * 03-28-2000 SJH Removed unused interrupt
+ */
+
+#define NR_IRQS 32
+
+#define IRQ_STWDOG 0 /* Watchdog timer */
+#define IRQ_PROG 1 /* Programmable interrupt */
+#define IRQ_DEBUG_RX 2 /* Comm Rx debug */
+#define IRQ_DEBUG_TX 3 /* Comm Tx debug */
+#define IRQ_GCTC1 4 /* Timer 1 */
+#define IRQ_GCTC2 5 /* Timer 2 */
+#define IRQ_DMA 6 /* DMA controller */
+#define IRQ_CLCD 7 /* Color LCD controller */
+#define IRQ_SM_RX 8 /* Smart card */
+#define IRQ_SM_TX 9 /* Smart cart */
+#define IRQ_SM_RST 10 /* Smart card */
+#define IRQ_SIB 11 /* Serial Interface Bus */
+#define IRQ_MMC 12 /* MultiMediaCard */
+#define IRQ_SSP1 13 /* Synchronous Serial Port 1 */
+#define IRQ_SSP2 14 /* Synchronous Serial Port 1 */
+#define IRQ_SPI 15 /* SPI slave */
+#define IRQ_UART_1 16 /* UART 1 */
+#define IRQ_UART_2 17 /* UART 2 */
+#define IRQ_IRDA 18 /* IRDA */
+#define IRQ_RTC_TICK 19 /* Real Time Clock tick */
+#define IRQ_RTC_ALARM 20 /* Real Time Clock alarm */
+#define IRQ_GPIO 21 /* General Purpose IO */
+#define IRQ_GPIO_DMA 22 /* General Purpose IO, DMA */
+#define IRQ_M2M 23 /* Memory to memory DMA */
+#define IRQ_RESERVED 24 /* RESERVED, don't use */
+#define IRQ_INTF 25 /* External active low interrupt */
+#define IRQ_INT0 26 /* External active low interrupt */
+#define IRQ_INT1 27 /* External active low interrupt */
+#define IRQ_INT2 28 /* External active low interrupt */
+#define IRQ_INT3 29 /* External active low interrupt */
+#define IRQ_BAT_LO 30 /* Low batery or external power */
+#define IRQ_MEDIA_CHG 31 /* Media change interrupt */
diff --git a/include/asm-arm/arch-l7200/memory.h b/include/asm-arm/arch-l7200/memory.h
new file mode 100644
index 000000000..f2aaabd5c
--- /dev/null
+++ b/include/asm-arm/arch-l7200/memory.h
@@ -0,0 +1,44 @@
+/*
+ * linux/include/asm-arm/arch-l7200/memory.h
+ *
+ * Copyright (c) 2000 Steven Hill (sjhill@cotw.com)
+ * Copyright (c) 2000 Rob Scott (rscott@mtrob.fdns.net)
+ *
+ * Changelog:
+ * 03-13-2000 SJH Created
+ * 04-13-2000 RS Changed bus macros for new addr
+ * 05-03-2000 SJH Removed bus macros and fixed virt_to_phys macro
+ */
+#ifndef __ASM_ARCH_MMU_H
+#define __ASM_ARCH_MMU_H
+
+/*
+ * Task size: 3GB
+ */
+#define TASK_SIZE (0xc0000000UL)
+#define TASK_SIZE_26 (0x04000000UL)
+
+/*
+ * Page offset: 3GB
+ */
+#define PAGE_OFFSET (0xc0000000UL)
+
+/*
+ * Physical DRAM offset on the L7200 SDB.
+ */
+#define PHYS_OFFSET (0xf0000000UL)
+
+/*
+ * The DRAM is contiguous.
+ */
+#define __virt_to_phys__is_a_macro
+#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
+#define __phys_to_virt__is_a_macro
+#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
+
+#define __virt_to_bus__is_a_macro
+#define __virt_to_bus(x) __virt_to_phys(x)
+#define __bus_to_virt__is_a_macro
+#define __bus_to_virt(x) __phys_to_virt(x)
+
+#endif
diff --git a/include/asm-arm/arch-l7200/param.h b/include/asm-arm/arch-l7200/param.h
new file mode 100644
index 000000000..5cd0bcc78
--- /dev/null
+++ b/include/asm-arm/arch-l7200/param.h
@@ -0,0 +1,23 @@
+/*
+ * linux/include/asm-arm/arch-l7200/param.h
+ *
+ * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
+ * Steve Hill (sjhill@cotw.com)
+ *
+ * This file contains the hardware definitions for the
+ * LinkUp Systems L7200 SOC development board.
+ *
+ * Changelog:
+ * 04-21-2000 RS Created L7200 version
+ * 04-25-2000 SJH Cleaned up file
+ * 05-03-2000 SJH Change comments and rate
+ */
+#ifndef __ASM_ARCH_PARAM_H
+#define __ASM_ARCH_PARAM_H
+
+/*
+ * See 'time.h' for how the RTC HZ rate is set
+ */
+#define HZ 128
+
+#endif
diff --git a/include/asm-arm/arch-l7200/processor.h b/include/asm-arm/arch-l7200/processor.h
new file mode 100644
index 000000000..ee4b4b2ca
--- /dev/null
+++ b/include/asm-arm/arch-l7200/processor.h
@@ -0,0 +1,27 @@
+/*
+ * linux/include/asm-arm/arch-l7200/processor.h
+ *
+ * Copyright (c) 2000 Steven Hill (sjhill@cotw.com)
+ *
+ * Changelog:
+ * 03-21-2000 SJH Created
+ * 05-03-2000 SJH Comment cleaning
+ */
+
+#ifndef __ASM_ARCH_PROCESSOR_H
+#define __ASM_ARCH_PROCESSOR_H
+
+/*
+ * Bus types
+ */
+#define EISA_bus 0
+#define EISA_bus__is_a_macro /* for versions in ksyms.c */
+#define MCA_bus 0
+#define MCA_bus__is_a_macro /* for versions in ksyms.c */
+
+/* This decides where the kernel will search for a free chunk of vm
+ * space during mmap's.
+ */
+#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+
+#endif
diff --git a/include/asm-arm/arch-l7200/serial_l7200.h b/include/asm-arm/arch-l7200/serial_l7200.h
new file mode 100644
index 000000000..238c595d9
--- /dev/null
+++ b/include/asm-arm/arch-l7200/serial_l7200.h
@@ -0,0 +1,101 @@
+/*
+ * linux/include/asm-arm/arch-l7200/serial_l7200.h
+ *
+ * Copyright (c) 2000 Steven Hill (sjhill@cotw.com)
+ *
+ * Changelog:
+ * 05-09-2000 SJH Created
+ */
+#ifndef __ASM_ARCH_SERIAL_L7200_H
+#define __ASM_ARCH_SERIAL_L7200_H
+
+#include <asm/arch/memory.h>
+
+/*
+ * This assumes you have a 3.6864 MHz clock for your UART.
+ */
+#define BASE_BAUD 3686400
+
+/*
+ * UART base register addresses
+ */
+#define UART1_BASE (IO_BASE + 0x00044000)
+#define UART2_BASE (IO_BASE + 0x00045000)
+
+/*
+ * UART register offsets
+ */
+#define UARTDR 0x00 /* Tx/Rx data */
+#define RXSTAT 0x04 /* Rx status */
+#define H_UBRLCR 0x08 /* mode register high */
+#define M_UBRLCR 0x0C /* mode reg mid (MSB of buad)*/
+#define L_UBRLCR 0x10 /* mode reg low (LSB of baud)*/
+#define UARTCON 0x14 /* control register */
+#define UARTFLG 0x18 /* flag register */
+#define UARTINTSTAT 0x1C /* FIFO IRQ status register */
+#define UARTINTMASK 0x20 /* FIFO IRQ mask register */
+
+/*
+ * UART baud rate register values
+ */
+#define BR_110 0x827
+#define BR_1200 0x06e
+#define BR_2400 0x05f
+#define BR_4800 0x02f
+#define BR_9600 0x017
+#define BR_14400 0x00f
+#define BR_19200 0x00b
+#define BR_38400 0x005
+#define BR_57600 0x003
+#define BR_76800 0x002
+#define BR_115200 0x001
+
+/*
+ * Receiver status register (RXSTAT) mask values
+ */
+#define RXSTAT_NO_ERR 0x00 /* No error */
+#define RXSTAT_FRM_ERR 0x01 /* Framing error */
+#define RXSTAT_PAR_ERR 0x02 /* Parity error */
+#define RXSTAT_OVR_ERR 0x04 /* Overrun error */
+
+/*
+ * High byte of UART bit rate and line control register (H_UBRLCR) values
+ */
+#define UBRLCR_BRK 0x01 /* generate break on tx */
+#define UBRLCR_PEN 0x02 /* enable parity */
+#define UBRLCR_PDIS 0x00 /* disable parity */
+#define UBRLCR_EVEN 0x04 /* 1= even parity,0 = odd parity */
+#define UBRLCR_STP2 0x08 /* transmit 2 stop bits */
+#define UBRLCR_FIFO 0x10 /* enable FIFO */
+#define UBRLCR_LEN5 0x60 /* word length5 */
+#define UBRLCR_LEN6 0x40 /* word length6 */
+#define UBRLCR_LEN7 0x20 /* word length7 */
+#define UBRLCR_LEN8 0x00 /* word length8 */
+
+/*
+ * UART control register (UARTCON) values
+ */
+#define UARTCON_UARTEN 0x01 /* Enable UART */
+#define UARTCON_DMAONERR 0x08 /* Mask RxDmaRq when errors occur */
+
+/*
+ * UART flag register (UARTFLG) mask values
+ */
+#define UARTFLG_UTXFF 0x20 /* Transmit FIFO full */
+#define UARTFLG_URXFE 0x10 /* Receiver FIFO empty */
+#define UARTFLG_UBUSY 0x08 /* Transmitter busy */
+#define UARTFLG_DCD 0x04 /* Data carrier detect */
+#define UARTFLG_DSR 0x02 /* Data set ready */
+#define UARTFLG_CTS 0x01 /* Clear to send */
+
+/*
+ * UART interrupt status/clear registers (UARTINTSTAT/CLR) values
+ */
+#define UART_TXINT 0x01 /* TX interrupt */
+#define UART_RXINT 0x02 /* RX interrupt */
+#define UART_RXERRINT 0x04 /* RX error interrupt */
+#define UART_MSINT 0x08 /* Modem Status interrupt */
+#define UART_UDINT 0x10 /* UART Disabled interrupt */
+#define UART_ALLIRQS 0x1f /* All interrupts */
+
+#endif
diff --git a/include/asm-arm/arch-l7200/system.h b/include/asm-arm/arch-l7200/system.h
new file mode 100644
index 000000000..c3bbe3773
--- /dev/null
+++ b/include/asm-arm/arch-l7200/system.h
@@ -0,0 +1,30 @@
+/*
+ * linux/include/asm-arm/arch-l7200/system.h
+ *
+ * Copyright (c) 2000 Steven Hill (sjhill@cotw.com)
+ *
+ * Changelog
+ * 03-21-2000 SJH Created
+ * 04-26-2000 SJH Fixed functions
+ * 05-03-2000 SJH Removed usage of obsolete 'iomd.h'
+ */
+#ifndef __ASM_ARCH_SYSTEM_H
+#define __ASM_ARCH_SYSTEM_H
+
+extern __inline__ void arch_idle(void)
+{
+ while (!current->need_resched && !hlt_counter)
+ { };
+/* outb(0, IOMD_SUSMODE);*/
+}
+
+#define arch_power_off() do { } while (0)
+
+extern inline void arch_reset(char mode)
+{
+ if (mode == 's') {
+ cpu_reset(0);
+ }
+}
+
+#endif
diff --git a/include/asm-arm/arch-l7200/time.h b/include/asm-arm/arch-l7200/time.h
new file mode 100644
index 000000000..077735e21
--- /dev/null
+++ b/include/asm-arm/arch-l7200/time.h
@@ -0,0 +1,68 @@
+/*
+ * linux/include/asm-arm/arch-l7200/time.h
+ *
+ * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
+ * Steve Hill (sjhill@cotw.com)
+ *
+ * Changelog:
+ * 01-02-2000 RS Created l7200 version, derived from rpc code
+ * 05-03-2000 SJH Complete rewrite
+ */
+#ifndef _ASM_ARCH_TIME_H
+#define _ASM_ARCH_TIME_H
+
+#include <asm/arch/irqs.h>
+
+/*
+ * RTC base register address
+ */
+#define RTC_BASE (IO_BASE_2 + 0x2000)
+
+/*
+ * RTC registers
+ */
+#define RTC_RTCDR (*(volatile unsigned char *) (RTC_BASE + 0x000))
+#define RTC_RTCMR (*(volatile unsigned char *) (RTC_BASE + 0x004))
+#define RTC_RTCS (*(volatile unsigned char *) (RTC_BASE + 0x008))
+#define RTC_RTCC (*(volatile unsigned char *) (RTC_BASE + 0x008))
+#define RTC_RTCDV (*(volatile unsigned char *) (RTC_BASE + 0x00c))
+#define RTC_RTCCR (*(volatile unsigned char *) (RTC_BASE + 0x010))
+
+/*
+ * RTCCR register values
+ */
+#define RTC_RATE_32 0x00 /* 32 Hz tick */
+#define RTC_RATE_64 0x10 /* 64 Hz tick */
+#define RTC_RATE_128 0x20 /* 128 Hz tick */
+#define RTC_RATE_256 0x30 /* 256 Hz tick */
+#define RTC_EN_ALARM 0x01 /* Enable alarm */
+#define RTC_EN_TIC 0x04 /* Enable counter */
+#define RTC_EN_STWDOG 0x08 /* Enable watchdog */
+
+/*
+ * Handler for timer interrupt
+ */
+static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+ do_timer(regs);
+ do_profile(regs);
+ RTC_RTCC = 0; /* Clear interrupt */
+}
+
+/*
+ * Set up timer interrupt, and return the current time in seconds.
+ */
+extern __inline__ void setup_timer(void)
+{
+ xtime.tv_sec = RTC_RTCDR;
+
+ RTC_RTCC = 0; /* Clear interrupt */
+
+ timer_irq.handler = timer_interrupt;
+
+ setup_arm_irq(IRQ_RTC_TICK, &timer_irq);
+
+ RTC_RTCCR = RTC_RATE_128 | RTC_EN_TIC; /* Set rate and enable timer */
+}
+
+#endif
diff --git a/include/asm-arm/arch-l7200/timex.h b/include/asm-arm/arch-l7200/timex.h
new file mode 100644
index 000000000..3c3202620
--- /dev/null
+++ b/include/asm-arm/arch-l7200/timex.h
@@ -0,0 +1,20 @@
+/*
+ * linux/include/asm-arm/arch-l7200/timex.h
+ *
+ * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
+ * Steve Hill (sjhill@cotw.com)
+ *
+ * 04-21-2000 RS Created file
+ * 05-03-2000 SJH Tick rate was wrong
+ *
+ */
+
+/*
+ * On the ARM720T, clock ticks are set to 128 Hz.
+ *
+ * NOTE: The actual RTC value is set in 'time.h' which
+ * must be changed when choosing a different tick
+ * rate. The value of HZ in 'param.h' must also
+ * be changed to match below.
+ */
+#define CLOCK_TICK_RATE 128
diff --git a/include/asm-arm/arch-l7200/uncompress.h b/include/asm-arm/arch-l7200/uncompress.h
new file mode 100644
index 000000000..d2e56455b
--- /dev/null
+++ b/include/asm-arm/arch-l7200/uncompress.h
@@ -0,0 +1,19 @@
+/*
+ * linux/include/asm-arm/arch-l7200/uncompress.h
+ *
+ * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
+ */
+
+static __inline__ void putc(char c)
+{
+}
+
+static void puts(const char *s)
+{
+}
+
+static __inline__ void arch_decomp_setup(void)
+{
+}
+
+#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-l7200/vmalloc.h b/include/asm-arm/arch-l7200/vmalloc.h
new file mode 100644
index 000000000..04fa07e7c
--- /dev/null
+++ b/include/asm-arm/arch-l7200/vmalloc.h
@@ -0,0 +1,16 @@
+/*
+ * linux/include/asm-arm/arch-l7200/vmalloc.h
+ */
+
+/*
+ * Just any arbitrary offset to the start of the vmalloc VM area: the
+ * current 8MB value just means that there will be a 8MB "hole" after the
+ * physical memory until the kernel virtual memory starts. That means that
+ * any out-of-bounds memory accesses will hopefully be caught.
+ * The vmalloc() routines leaves a hole of 4kB between each vmalloced
+ * area for the same reason. ;)
+ */
+#define VMALLOC_OFFSET (8*1024*1024)
+#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
+#define VMALLOC_VMADDR(x) ((unsigned long)(x))
+#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/include/asm-arm/hardirq.h b/include/asm-arm/hardirq.h
index 77a36a2a4..c12ed91e3 100644
--- a/include/asm-arm/hardirq.h
+++ b/include/asm-arm/hardirq.h
@@ -5,23 +5,27 @@
#include <linux/threads.h>
extern unsigned int local_irq_count[NR_CPUS];
+extern unsigned int local_bh_count[NR_CPUS];
+
+#define local_irq_count(cpu) (local_irq_count[(cpu)])
+#define local_bh_count(cpu) (local_bh_count[(cpu)])
/*
* Are we in an interrupt context? Either doing bottom half
* or hardware interrupt processing?
*/
#define in_interrupt() ({ const int __cpu = smp_processor_id(); \
- (local_irq_count[__cpu] + local_bh_count[__cpu] != 0); })
+ (local_irq_count(__cpu) + local_bh_count(__cpu) != 0); })
-#define in_irq() (local_irq_count[smp_processor_id()] != 0)
+#define in_irq() (local_irq_count(smp_processor_id()) != 0)
#ifndef CONFIG_SMP
-#define hardirq_trylock(cpu) (local_irq_count[cpu] == 0)
+#define hardirq_trylock(cpu) (local_irq_count(cpu) == 0)
#define hardirq_endlock(cpu) do { } while (0)
-#define hardirq_enter(cpu) (local_irq_count[cpu]++)
-#define hardirq_exit(cpu) (local_irq_count[cpu]--)
+#define irq_enter(cpu,irq) (local_irq_count(cpu)++)
+#define irq_exit(cpu,irq) (local_irq_count(cpu)--)
#define synchronize_irq() do { } while (0)
diff --git a/include/asm-arm/proc-armo/semaphore.h b/include/asm-arm/proc-armo/semaphore.h
deleted file mode 100644
index 6926fad12..000000000
--- a/include/asm-arm/proc-armo/semaphore.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * linux/include/asm-arm/proc-armo/locks.h
- *
- * Copyright (C) 2000 Russell King
- *
- * Interrupt safe locking assembler.
- */
-#ifndef __ASM_PROC_LOCKS_H
-#define __ASM_PROC_LOCKS_H
-
-#define __down_op(ptr,fail) \
- ({ \
- __asm__ __volatile__ ( \
- "@ atomic down operation\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
-" teqp lr, #0\n" \
-" ldr lr, [%0]\n" \
-" and r0, r0, #0x0c000003\n" \
-" subs lr, lr, #1\n" \
-" str lr, [%0]\n" \
-" orrmi r0, r0, #0x80000000 @ set N\n" \
-" teqp r0, #0\n" \
-" movmi r0, %0\n" \
- blmi " SYMBOL_NAME_STR(fail) \
- : \
- : "r" (ptr) \
- : "r0", "lr", "cc"); \
- })
-
-#define __down_op_ret(ptr,fail) \
- ({ \
- unsigned int result; \
- __asm__ __volatile__ ( \
-" @ down_op_ret\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
-" teqp lr, #0\n" \
-" ldr lr, [%1]\m" \
-" and r0, r0, #0x0c000003\n" \
-" subs lr, lr, #1\n" \
-" str lr, [%1]\n" \
-" orrmi r0, r0, #0x80000000 @ set N\n" \
-" teqp r0, #0\n" \
-" movmi r0, %1\n" \
-" movpl r0, #0\n" \
-" blmi " SYMBOL_NAME_STR(fail) "\n" \
-" mov %0, r0" \
- : "=&r" (result) \
- : "r" (ptr) \
- : "r0", "lr", "cc"); \
- result; \
- })
-
-#define __up_op(ptr,wake) \
- ({ \
- __asm__ __volatile__ ( \
- "@ up_op\n" \
- mov r0, pc\n" \
- orr lr, r0, #0x08000000\n" \
- teqp lr, #0\n" \
- ldr lr, [%0]\n" \
- and r0, r0, #0x0c000003\n" \
- adds lr, lr, #1\n" \
- str lr, [%0]\n" \
- orrle r0, r0, #0x80000000 @ set N\n" \
- teqp r0, #0\n" \
- movmi r0, %0\n" \
- blmi " SYMBOL_NAME_STR(wake) \
- : \
- : "r" (ptr) \
- : "r0", "lr", "cc"); \
- })
-
-#endif
diff --git a/include/asm-arm/proc-armv/locks.h b/include/asm-arm/proc-armv/locks.h
index c1cfded3e..0a0391fae 100644
--- a/include/asm-arm/proc-armv/locks.h
+++ b/include/asm-arm/proc-armv/locks.h
@@ -12,18 +12,18 @@
({ \
__asm__ __volatile__( \
"@ down_op\n" \
-" mrs r0, cpsr\n" \
-" orr lr, r0, #128\n" \
+" mrs ip, cpsr\n" \
+" orr lr, ip, #128\n" \
" msr cpsr_c, lr\n" \
" ldr lr, [%0]\n" \
" subs lr, lr, %1\n" \
" str lr, [%0]\n" \
-" msr cpsr_c, r0\n" \
-" movmi r0, %0\n" \
+" msr cpsr_c, ip\n" \
+" movmi ip, %0\n" \
" blmi " SYMBOL_NAME_STR(fail) \
: \
: "r" (ptr), "I" (1) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
#define __down_op_ret(ptr,fail) \
@@ -31,20 +31,20 @@
unsigned int ret; \
__asm__ __volatile__( \
"@ down_op_ret\n" \
-" mrs r0, cpsr\n" \
-" orr lr, r0, #128\n" \
+" mrs ip, cpsr\n" \
+" orr lr, ip, #128\n" \
" msr cpsr_c, lr\n" \
" ldr lr, [%1]\n" \
" subs lr, lr, %2\n" \
" str lr, [%1]\n" \
-" msr cpsr_c, r0\n" \
-" movmi r0, %1\n" \
-" movpl r0, #0\n" \
+" msr cpsr_c, ip\n" \
+" movmi ip, %1\n" \
+" movpl ip, #0\n" \
" blmi " SYMBOL_NAME_STR(fail) "\n" \
-" mov %0, r0" \
+" mov %0, ip" \
: "=&r" (ret) \
: "r" (ptr), "I" (1) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
ret; \
})
@@ -52,18 +52,18 @@
({ \
__asm__ __volatile__( \
"@ up_op\n" \
-" mrs r0, cpsr\n" \
-" orr lr, r0, #128\n" \
+" mrs ip, cpsr\n" \
+" orr lr, ip, #128\n" \
" msr cpsr_c, lr\n" \
" ldr lr, [%0]\n" \
" adds lr, lr, %1\n" \
" str lr, [%0]\n" \
-" msr cpsr_c, r0\n" \
-" movle r0, %0\n" \
+" msr cpsr_c, ip\n" \
+" movle ip, %0\n" \
" blle " SYMBOL_NAME_STR(wake) \
: \
: "r" (ptr), "I" (1) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
/*
@@ -78,36 +78,36 @@
({ \
__asm__ __volatile__( \
"@ down_op_write\n" \
-" mrs r0, cpsr\n" \
-" orr lr, r0, #128\n" \
+" mrs ip, cpsr\n" \
+" orr lr, ip, #128\n" \
" msr cpsr_c, lr\n" \
" ldr lr, [%0]\n" \
" subs lr, lr, %1\n" \
" str lr, [%0]\n" \
-" msr cpsr_c, r0\n" \
-" movne r0, %0\n" \
+" msr cpsr_c, ip\n" \
+" movne ip, %0\n" \
" blne " SYMBOL_NAME_STR(fail) \
: \
: "r" (ptr), "I" (RW_LOCK_BIAS) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
#define __up_op_write(ptr,wake) \
({ \
__asm__ __volatile__( \
"@ up_op_read\n" \
-" mrs r0, cpsr\n" \
-" orr lr, r0, #128\n" \
+" mrs ip, cpsr\n" \
+" orr lr, ip, #128\n" \
" msr cpsr_c, lr\n" \
" ldr lr, [%0]\n" \
" adds lr, lr, %1\n" \
" str lr, [%0]\n" \
-" msr cpsr_c, r0\n" \
-" movcs r0, %0\n" \
+" msr cpsr_c, ip\n" \
+" movcs ip, %0\n" \
" blcs " SYMBOL_NAME_STR(wake) \
: \
: "r" (ptr), "I" (RW_LOCK_BIAS) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
#define __down_op_read(ptr,fail) \
@@ -117,18 +117,18 @@
({ \
__asm__ __volatile__( \
"@ up_op_read\n" \
-" mrs r0, cpsr\n" \
-" orr lr, r0, #128\n" \
+" mrs ip, cpsr\n" \
+" orr lr, ip, #128\n" \
" msr cpsr_c, lr\n" \
" ldr lr, [%0]\n" \
" adds lr, lr, %1\n" \
" str lr, [%0]\n" \
-" msr cpsr_c, r0\n" \
-" moveq r0, %0\n" \
+" msr cpsr_c, ip\n" \
+" moveq ip, %0\n" \
" bleq " SYMBOL_NAME_STR(wake) \
: \
: "r" (ptr), "I" (1) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
#endif
diff --git a/include/asm-arm/softirq.h b/include/asm-arm/softirq.h
index f98754813..01e0d73d1 100644
--- a/include/asm-arm/softirq.h
+++ b/include/asm-arm/softirq.h
@@ -4,14 +4,12 @@
#include <asm/atomic.h>
#include <asm/hardirq.h>
-extern unsigned int local_bh_count[NR_CPUS];
-
-#define cpu_bh_disable(cpu) do { local_bh_count[(cpu)]++; barrier(); } while (0)
-#define cpu_bh_enable(cpu) do { barrier(); local_bh_count[(cpu)]--; } while (0)
+#define cpu_bh_disable(cpu) do { local_bh_count(cpu)++; barrier(); } while (0)
+#define cpu_bh_enable(cpu) do { barrier(); local_bh_count(cpu)--; } while (0)
#define local_bh_disable() cpu_bh_disable(smp_processor_id())
#define local_bh_enable() cpu_bh_enable(smp_processor_id())
-#define in_softirq() (local_bh_count[smp_processor_id()] != 0)
+#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
#endif /* __ASM_SOFTIRQ_H */
diff --git a/include/asm-arm/string.h b/include/asm-arm/string.h
index dfe4cd9ac..2a8ab1624 100644
--- a/include/asm-arm/string.h
+++ b/include/asm-arm/string.h
@@ -13,12 +13,17 @@ extern char * strrchr(const char * s, int c);
extern char * strchr(const char * s, int c);
#define __HAVE_ARCH_MEMCPY
+extern void * memcpy(void *, const void *, __kernel_size_t);
+
#define __HAVE_ARCH_MEMMOVE
+extern void * memmove(void *, const void *, __kernel_size_t);
+
#define __HAVE_ARCH_MEMCHR
-extern void * memchr(const void *cs, int c, size_t count);
+extern void * memchr(const void *, int, __kernel_size_t);
#define __HAVE_ARCH_MEMZERO
#define __HAVE_ARCH_MEMSET
+extern void * memset(void *, int, __kernel_size_t);
extern void __memzero(void *ptr, __kernel_size_t n);
@@ -36,4 +41,3 @@ extern void __memzero(void *ptr, __kernel_size_t n);
#define memzero(p,n) ({ if ((n) != 0) __memzero((p),(n)); (p); })
#endif
-
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h
index ca6da3e13..9755af1ab 100644
--- a/include/asm-arm/unistd.h
+++ b/include/asm-arm/unistd.h
@@ -65,7 +65,7 @@
#define __NR_mpx (__NR_SYSCALL_BASE+ 56)
#define __NR_setpgid (__NR_SYSCALL_BASE+ 57)
#define __NR_ulimit (__NR_SYSCALL_BASE+ 58)
-#define __NR_oldolduname (__NR_SYSCALL_BASE+ 59)
+
#define __NR_umask (__NR_SYSCALL_BASE+ 60)
#define __NR_chroot (__NR_SYSCALL_BASE+ 61)
#define __NR_ustat (__NR_SYSCALL_BASE+ 62)
@@ -115,7 +115,7 @@
#define __NR_stat (__NR_SYSCALL_BASE+106)
#define __NR_lstat (__NR_SYSCALL_BASE+107)
#define __NR_fstat (__NR_SYSCALL_BASE+108)
-#define __NR_olduname (__NR_SYSCALL_BASE+109)
+
#define __NR_iopl (__NR_SYSCALL_BASE+110)
#define __NR_vhangup (__NR_SYSCALL_BASE+111)
#define __NR_idle (__NR_SYSCALL_BASE+112)
diff --git a/include/asm-i386/apicdef.h b/include/asm-i386/apicdef.h
index 2f0e2d3c3..d8a210952 100644
--- a/include/asm-i386/apicdef.h
+++ b/include/asm-i386/apicdef.h
@@ -7,7 +7,8 @@
* Alan Cox <Alan.Cox@linux.org>, 1995.
* Ingo Molnar <mingo@redhat.com>, 1999, 2000
*/
-#define APIC_PHYS_BASE 0xfee00000 /* IA s/w dev Vol 3, Section 7.4 */
+
+#define APIC_DEFAULT_PHYS_BASE 0xfee00000
#define APIC_ID 0x20
#define GET_APIC_ID(x) (((x)>>24)&0x0F)
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h
index 413a98c55..0c883af9d 100644
--- a/include/asm-i386/hw_irq.h
+++ b/include/asm-i386/hw_irq.h
@@ -28,36 +28,34 @@
*/
/*
- * Special IRQ vectors used by the SMP architecture, 0x30-0x4f
+ * Special IRQ vectors used by the SMP architecture, 0xf0-0xff
*
* some of the following vectors are 'rare', they are merged
* into a single vector (CALL_FUNCTION_VECTOR) to save vector space.
* TLB, reschedule and local APIC vectors are performance-critical.
+ *
+ * Vectors 0xf0-0xfa are free (reserved for future Linux use).
*/
-#define INVALIDATE_TLB_VECTOR 0x30
-#define LOCAL_TIMER_VECTOR 0x31
-#define RESCHEDULE_VECTOR 0x40
-
-/* 'rare' vectors: */
-#define CALL_FUNCTION_VECTOR 0x41
+#define SPURIOUS_APIC_VECTOR 0xff
+#define ERROR_APIC_VECTOR 0xfe
+#define INVALIDATE_TLB_VECTOR 0xfd
+#define RESCHEDULE_VECTOR 0xfc
+#define CALL_FUNCTION_VECTOR 0xfb
/*
- * These IRQs should never really happen on perfect hardware running
- * a perfect kernel, but we nevertheless print a message to catch the
- * rest ;) Subtle, the APIC architecture mandates the spurious vector
- * to have bits 0-3 set to 1. Note that these vectors do not occur
- * normally, so we violate the 'only 2 vectors per priority level'
- * rule here.
+ * Local APIC timer IRQ vector is on a different priority level,
+ * to work around the 'lost local interrupt if more than 2 IRQ
+ * sources per level' errata.
*/
-#define SPURIOUS_APIC_VECTOR 0x3f
-#define ERROR_APIC_VECTOR 0x43
+#define LOCAL_TIMER_VECTOR 0xef
/*
- * First APIC vector available to drivers: (vectors 0x51-0xfe)
- * we start at 0x51 to spread out vectors between priority levels
- * evenly. (note that 0x80 is the syscall vector)
+ * First APIC vector available to drivers: (vectors 0x30-0xee)
+ * we start at 0x31 to spread out vectors evenly between priority
+ * levels. (0x80 is the syscall vector)
*/
-#define IRQ0_TRAP_VECTOR 0x51
+#define FIRST_DEVICE_VECTOR 0x31
+#define FIRST_SYSTEM_VECTOR 0xef
extern int irq_vector[NR_IRQS];
#define IO_APIC_VECTOR(irq) irq_vector[irq]
diff --git a/include/asm-i386/ide.h b/include/asm-i386/ide.h
index 886eebb91..25ec3b594 100644
--- a/include/asm-i386/ide.h
+++ b/include/asm-i386/ide.h
@@ -78,6 +78,7 @@ static __inline__ void ide_init_default_hwifs(void)
int index;
for(index = 0; index < MAX_HWIFS; index++) {
+ memset(&hw, 0, sizeof(hw_regs_t));
ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL);
diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h
index 2e3081a5c..3f3bc50f4 100644
--- a/include/asm-i386/uaccess.h
+++ b/include/asm-i386/uaccess.h
@@ -135,16 +135,8 @@ extern void __put_user_bad(void);
:"0" (ptr),"d" (x) \
:"cx")
-#define put_user(x,ptr) \
-({ int __ret_pu; \
- switch(sizeof (*(ptr))) { \
- case 1: __put_user_x(1,__ret_pu,(__typeof__(*(ptr)))(x),ptr); break; \
- case 2: __put_user_x(2,__ret_pu,(__typeof__(*(ptr)))(x),ptr); break; \
- case 4: __put_user_x(4,__ret_pu,(__typeof__(*(ptr)))(x),ptr); break; \
- default: __put_user_x(X,__ret_pu,x,ptr); break; \
- } \
- __ret_pu; \
-})
+#define put_user(x,ptr) \
+ __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
#define __get_user(x,ptr) \
__get_user_nocheck((x),(ptr),sizeof(*(ptr)))
@@ -158,6 +150,16 @@ extern void __put_user_bad(void);
__pu_err; \
})
+
+#define __put_user_check(x,ptr,size) \
+({ \
+ long __pu_err = -EFAULT; \
+ __typeof__(*(ptr)) *__pu_addr = (ptr); \
+ if (access_ok(VERIFY_WRITE,__pu_addr,size)) \
+ __put_user_size((x),__pu_addr,(size),__pu_err); \
+ __pu_err; \
+})
+
#define __put_user_size(x,ptr,size,retval) \
do { \
retval = 0; \
diff --git a/include/asm-ia64/ide.h b/include/asm-ia64/ide.h
index 4ea799861..1b473c252 100644
--- a/include/asm-ia64/ide.h
+++ b/include/asm-ia64/ide.h
@@ -84,6 +84,7 @@ ide_init_default_hwifs (void)
int index;
for(index = 0; index < MAX_HWIFS; index++) {
+ memset(&hw, 0, sizeof(hw_regs_t));
ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL);
diff --git a/include/asm-ppc/bitops.h b/include/asm-ppc/bitops.h
index d5506a348..f62ad151f 100644
--- a/include/asm-ppc/bitops.h
+++ b/include/asm-ppc/bitops.h
@@ -7,7 +7,6 @@
#define _PPC_BITOPS_H
#include <linux/config.h>
-#include <asm/system.h>
#include <asm/byteorder.h>
extern void set_bit(int nr, volatile void *addr);
@@ -278,3 +277,4 @@ found_middle:
#define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size)
#endif /* _PPC_BITOPS_H */
+
diff --git a/include/asm-ppc/cpm_8260.h b/include/asm-ppc/cpm_8260.h
index c479f87d2..5f500d5c3 100644
--- a/include/asm-ppc/cpm_8260.h
+++ b/include/asm-ppc/cpm_8260.h
@@ -124,6 +124,14 @@ typedef struct cpm_buf_desc {
#define BD_SC_OV ((ushort)0x0002) /* Overrun */
#define BD_SC_CD ((ushort)0x0001) /* ?? */
+/* Function code bits, usually generic to devices.
+*/
+#define CPMFCR_GBL ((u_char)0x20) /* Set memory snooping */
+#define CPMFCR_EB ((u_char)0x10) /* Set big endian byte order */
+#define CPMFCR_TC2 ((u_char)0x04) /* Transfer code 2 value */
+#define CPMFCR_DTB ((u_char)0x02) /* Use local bus for data when set */
+#define CPMFCR_BDB ((u_char)0x01) /* Use local bus for BD when set */
+
/* Parameter RAM offsets from the base.
*/
#define PROFF_SCC1 ((uint)0x8000)
@@ -184,13 +192,6 @@ typedef struct smc_uart {
uint smc_stmp; /* SDMA Temp */
} smc_uart_t;
-/* Function code bits.
-*/
-#define SMC_GBL ((u_char)0x20) /* Set memory snooping */
-#define SMC_EB ((u_char)0x10) /* Set big endian byte order */
-#define SMC_TC2 ((u_char)0x04) /* Transfer code 2 value */
-#define SMC_DTB ((u_char)0x02) /* Use local bus when set */
-
/* SMC uart mode register (Internal memory map).
*/
#define SMCMR_REN ((ushort)0x0001)
@@ -337,10 +338,6 @@ typedef struct scc_param {
uint scc_tcrc; /* Internal */
} sccp_t;
-/* Function code bits.
-*/
-#define SCC_EB ((u_char)0x10) /* Set big endian byte order */
-
/* CPM Ethernet through SCC1.
*/
typedef struct scc_enet {
diff --git a/include/asm-ppc/init.h b/include/asm-ppc/init.h
index 106e57c1a..a25f6015e 100644
--- a/include/asm-ppc/init.h
+++ b/include/asm-ppc/init.h
@@ -16,6 +16,12 @@
__argprep __prep; \
__argprep
+#define __chrp __attribute__ ((__section__ (".text.chrp")))
+#define __chrpdata __attribute__ ((__section__ (".data.chrp")))
+#define __chrpfunc(__argchrp) \
+ __argchrp __chrp; \
+ __argchrp
+
#define __apus __attribute__ ((__section__ (".text.apus")))
#define __apusdata __attribute__ ((__section__ (".data.apus")))
#define __apusfunc(__argapus) \
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h
index e069f8b15..a4f6b0a4b 100644
--- a/include/asm-ppc/page.h
+++ b/include/asm-ppc/page.h
@@ -1,4 +1,7 @@
#include <linux/config.h>
+#ifndef __ASSEMBLY__
+#include <asm/system.h> /* for xmon definition */
+#endif /* ndef __ASSEMBLY__ */
#ifndef _PPC_PAGE_H
#define _PPC_PAGE_H
diff --git a/include/asm-ppc/siginfo.h b/include/asm-ppc/siginfo.h
index 58e4b22e9..2561510f6 100644
--- a/include/asm-ppc/siginfo.h
+++ b/include/asm-ppc/siginfo.h
@@ -122,7 +122,7 @@ typedef struct siginfo {
* SIGSEGV si_codes
*/
#define SEGV_MAPERR 1 /* address not mapped to object */
-#define SRGV_ACCERR 2 /* invalid permissions for mapped object */
+#define SEGV_ACCERR 2 /* invalid permissions for mapped object */
#define NSIGSEGV 2
/*
diff --git a/include/asm-ppc/string.h b/include/asm-ppc/string.h
index e0158a215..d912a6b5f 100644
--- a/include/asm-ppc/string.h
+++ b/include/asm-ppc/string.h
@@ -15,5 +15,15 @@
extern int strcasecmp(const char *, const char *);
extern int strncasecmp(const char *, const char *, int);
+extern char * strcpy(char *,const char *);
+extern char * strncpy(char *,const char *, __kernel_size_t);
+extern __kernel_size_t strlen(const char *);
+extern int strcmp(const char *,const char *);
+extern char * strcat(char *, const char *);
+extern void * memset(void *,int,__kernel_size_t);
+extern void * memcpy(void *,const void *,__kernel_size_t);
+extern void * memmove(void *,const void *,__kernel_size_t);
+extern int memcmp(const void *,const void *,__kernel_size_t);
+extern void * memchr(const void *,int,__kernel_size_t);
#endif
diff --git a/include/asm-sh/cache.h b/include/asm-sh/cache.h
index 17108905d..df6d51225 100644
--- a/include/asm-sh/cache.h
+++ b/include/asm-sh/cache.h
@@ -14,8 +14,4 @@
#define L1_CACHE_BYTES 32
#endif
-extern void cache_flush_area(unsigned long start, unsigned long end);
-extern void cache_purge_area(unsigned long start, unsigned long end);
-extern void cache_wback_area(unsigned long start, unsigned long end);
-
#endif /* __ASM_SH_CACHE_H */
diff --git a/include/asm-sh/checksum.h b/include/asm-sh/checksum.h
index 846e64509..6e1a728bf 100644
--- a/include/asm-sh/checksum.h
+++ b/include/asm-sh/checksum.h
@@ -72,16 +72,16 @@ unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum);
static __inline__ unsigned int csum_fold(unsigned int sum)
{
unsigned int __dummy;
- __asm__("clrt\n\t"
- "mov %0, %1\n\t"
- "shll16 %0\n\t"
- "addc %0, %1\n\t"
- "movt %0\n\t"
- "shlr16 %1\n\t"
- "add %1, %0"
+ __asm__("swap.w %0, %1\n\t"
+ "extu.w %0, %0\n\t"
+ "extu.w %1, %1\n\t"
+ "add %1, %0\n\t"
+ "swap.w %0, %1\n\t"
+ "add %1, %0\n\t"
+ "not %0, %0\n\t"
: "=r" (sum), "=&r" (__dummy)
: "0" (sum));
- return ~sum;
+ return sum;
}
/*
@@ -93,31 +93,26 @@ static __inline__ unsigned int csum_fold(unsigned int sum)
*/
static __inline__ unsigned short ip_fast_csum(unsigned char * iph, unsigned int ihl)
{
- unsigned int sum, __dummy;
+ unsigned int sum, __dummy0, __dummy1;
__asm__ __volatile__(
"mov.l @%1+, %0\n\t"
- "add #-4, %2\n\t"
- "clrt\n\t"
"mov.l @%1+, %3\n\t"
- "addc %3, %0\n\t"
- "mov.l @%1+, %3\n\t"
- "addc %3, %0\n\t"
- "mov.l @%1+, %3\n\t"
- "addc %3, %0\n"
+ "add #-2, %2\n\t"
+ "clrt\n\t"
"1:\t"
- "mov.l @%1+, %3\n\t"
"addc %3, %0\n\t"
- "movt %3\n\t"
+ "movt %4\n\t"
+ "mov.l @%1+, %3\n\t"
"dt %2\n\t"
"bf/s 1b\n\t"
- " cmp/eq #1, %3\n\t"
- "mov #0, %3\n\t"
+ " cmp/eq #1, %4\n\t"
"addc %3, %0\n\t"
+ "addc %2, %0" /* Here %2 is 0, add carry-bit */
/* Since the input registers which are loaded with iph and ihl
are modified, we must also specify them as outputs, or gcc
will assume they contain their original values. */
- : "=r" (sum), "=r" (iph), "=r" (ihl), "=&z" (__dummy)
+ : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1)
: "1" (iph), "2" (ihl));
return csum_fold(sum);
diff --git a/include/asm-sh/hitachi_se.h b/include/asm-sh/hitachi_se.h
new file mode 100644
index 000000000..282bbce8f
--- /dev/null
+++ b/include/asm-sh/hitachi_se.h
@@ -0,0 +1,53 @@
+#ifndef __ASM_SH_HITACHI_SE_H
+#define __ASM_SH_HITACHI_SE_H
+
+/*
+ * linux/include/asm-sh/hitachi_se.h
+ *
+ * Copyright (C) 2000 Kazumoto Kojima
+ *
+ * Hitachi SolutionEngine support
+ */
+
+/* Box specific addresses. */
+
+#define PA_ROM 0x00000000 /* EPROM */
+#define PA_ROM_SIZE 0x00400000 /* EPROM size 4M byte */
+#define PA_FROM 0x01000000 /* EPROM */
+#define PA_FROM_SIZE 0x00400000 /* EPROM size 4M byte */
+#define PA_EXT1 0x04000000
+#define PA_EXT1_SIZE 0x04000000
+#define PA_EXT2 0x08000000
+#define PA_EXT2_SIZE 0x04000000
+#define PA_SDRAM 0x0c000000
+#define PA_SDRAM_SIZE 0x04000000
+
+#define PA_EXT4 0x12000000
+#define PA_EXT4_SIZE 0x02000000
+#define PA_EXT5 0x14000000
+#define PA_EXT5_SIZE 0x04000000
+#define PA_PCIC 0x18000000 /* MR-SHPC-01 PCMCIA */
+
+#define PA_83902 0xb0000000 /* DP83902A */
+#define PA_83902_IF 0xb0040000 /* DP83902A remote io port */
+#define PA_83902_RST 0xb0080000 /* DP83902A reset port */
+
+#define PA_SUPERIO 0xb0400000 /* SMC37C935A super io chip */
+#define PA_DIPSW0 0xb0800000 /* Dip switch 5,6 */
+#define PA_DIPSW1 0xb0800002 /* Dip switch 7,8 */
+#define PA_LED 0xb0c00000 /* LED */
+#define PA_BCR 0xb1400000 /* FPGA */
+
+#define PA_MRSHPC 0xb83fffe0 /* MR-SHPC-01 PCMCIA controler */
+
+#define BCR_ILCRA (PA_BCR + 0)
+#define BCR_ILCRB (PA_BCR + 2)
+#define BCR_ILCRC (PA_BCR + 4)
+#define BCR_ILCRD (PA_BCR + 6)
+#define BCR_ILCRE (PA_BCR + 8)
+#define BCR_ILCRF (PA_BCR + 10)
+#define BCR_ILCRG (PA_BCR + 12)
+
+#define IRQ_STNIC 10
+
+#endif /* __ASM_SH_HITACHI_SE_H */
diff --git a/include/asm-sh/ide.h b/include/asm-sh/ide.h
index 95a385596..ec82befa2 100644
--- a/include/asm-sh/ide.h
+++ b/include/asm-sh/ide.h
@@ -17,7 +17,7 @@
#include <linux/config.h>
#ifndef MAX_HWIFS
-#define MAX_HWIFS 1 /* XXX: For my board -- gniibe */
+#define MAX_HWIFS 1
#endif
#define ide__sti() __sti()
@@ -25,8 +25,8 @@
static __inline__ int ide_default_irq(ide_ioreg_t base)
{
switch (base) {
- case 0xba0001f0: return 14;
- case 0xba000170: return 14;
+ case 0x01f0: return 14;
+ case 0x0170: return 15;
default:
return 0;
}
@@ -36,9 +36,9 @@ static __inline__ ide_ioreg_t ide_default_io_base(int index)
{
switch (index) {
case 0:
- return 0xba0001f0;
+ return 0x01f0;
case 1:
- return 0xba000170;
+ return 0x0170;
default:
return 0;
}
@@ -69,6 +69,7 @@ static __inline__ void ide_init_default_hwifs(void)
int index;
for(index = 0; index < MAX_HWIFS; index++) {
+ memset(&hw, 0, sizeof(hw_regs_t));
ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL);
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h
index 5a7b0468b..c6de2a42a 100644
--- a/include/asm-sh/io.h
+++ b/include/asm-sh/io.h
@@ -14,9 +14,6 @@
#include <asm/cache.h>
-#define inb_p inb
-#define outb_p outb
-
#define inw_p inw
#define outw_p outw
@@ -53,103 +50,62 @@ extern __inline__ void writel(unsigned int b, unsigned long addr)
*(volatile unsigned long*)addr = b;
}
-extern __inline__ unsigned long inb_local(unsigned long addr)
-{
- return readb(addr);
-}
-
-extern __inline__ void outb_local(unsigned char b, unsigned long addr)
-{
- return writeb(b,addr);
-}
-
-extern __inline__ unsigned long inb(unsigned long addr)
-{
- return readb(addr);
-}
-
-extern __inline__ unsigned long inw(unsigned long addr)
-{
- return readw(addr);
-}
-
-extern __inline__ unsigned long inl(unsigned long addr)
-{
- return readl(addr);
-}
-
-extern __inline__ void insb(unsigned long addr, void *buffer, int count)
-{
- unsigned char *buf=buffer;
- while(count--) *buf++=inb(addr);
-}
-
-extern __inline__ void insw(unsigned long addr, void *buffer, int count)
-{
- unsigned short *buf=buffer;
- while(count--) *buf++=inw(addr);
-}
-
-extern __inline__ void insl(unsigned long addr, void *buffer, int count)
-{
- unsigned long *buf=buffer;
- while(count--) *buf++=inl(addr);
-}
-
-extern __inline__ void outb(unsigned char b, unsigned long addr)
-{
- return writeb(b,addr);
-}
-
-extern __inline__ void outw(unsigned short b, unsigned long addr)
-{
- return writew(b,addr);
-}
-
-extern __inline__ void outl(unsigned int b, unsigned long addr)
-{
- return writel(b,addr);
-}
+extern unsigned long inb(unsigned int port);
+extern unsigned long inb_p(unsigned int port);
+extern unsigned long inw(unsigned int port);
+extern unsigned long inl(unsigned int port);
+extern void insb(unsigned int port, void *addr, unsigned long count);
+extern void insw(unsigned int port, void *addr, unsigned long count);
+extern void insl(unsigned int port, void *addr, unsigned long count);
-extern __inline__ void outsb(unsigned long addr, const void *buffer, int count)
-{
- const unsigned char *buf=buffer;
- while(count--) outb(*buf++, addr);
-}
+extern void outb(unsigned long value, unsigned int port);
+extern void outb_p(unsigned long value, unsigned int port);
+extern void outw(unsigned long value, unsigned int port);
+extern void outl(unsigned long value, unsigned int port);
+extern void outsb(unsigned int port, const void *addr, unsigned long count);
+extern void outsw(unsigned int port, const void *addr, unsigned long count);
+extern void outsl(unsigned int port, const void *addr, unsigned long count);
-extern __inline__ void outsw(unsigned long addr, const void *buffer, int count)
-{
- const unsigned short *buf=buffer;
- while(count--) outw(*buf++, addr);
-}
-
-extern __inline__ void outsl(unsigned long addr, const void *buffer, int count)
-{
- const unsigned long *buf=buffer;
- while(count--) outl(*buf++, addr);
-}
+/*
+ * If the platform has PC-like I/O, this function gives us the address
+ * from the offset.
+ */
+extern unsigned long sh_isa_slot(unsigned long offset);
+
+#define isa_readb(a) readb(sh_isa_slot(a))
+#define isa_readw(a) readw(sh_isa_slot(a))
+#define isa_readl(a) readl(sh_isa_slot(a))
+#define isa_writeb(b,a) writeb(b,sh_isa_slot(a))
+#define isa_writew(w,a) writew(w,sh_isa_slot(a))
+#define isa_writel(l,a) writel(l,sh_isa_slot(a))
+#define isa_memset_io(a,b,c) \
+ memset((void *)(sh_isa_slot((unsigned long)a)),(b),(c))
+#define isa_memcpy_fromio(a,b,c) \
+ memcpy((a),(void *)(sh_isa_slot((unsigned long)(b))),(c))
+#define isa_memcpy_toio(a,b,c) \
+ memcpy((void *)(sh_isa_slot((unsigned long)(a))),(b),(c))
#define ctrl_in(addr) *(addr)
#define ctrl_out(data,addr) *(addr) = (data)
extern __inline__ unsigned long ctrl_inb(unsigned long addr)
{
- return *(volatile unsigned char*)addr;
+ return *(volatile unsigned char*)addr;
}
extern __inline__ unsigned long ctrl_inw(unsigned long addr)
{
- return *(volatile unsigned short*)addr;
+ return *(volatile unsigned short*)addr;
}
extern __inline__ unsigned long ctrl_inl(unsigned long addr)
{
- return *(volatile unsigned long*)addr;
+ return *(volatile unsigned long*)addr;
}
extern __inline__ void ctrl_outb(unsigned char b, unsigned long addr)
{
- *(volatile unsigned char*)addr = b;
+ *(volatile unsigned char*)addr = b;
}
extern __inline__ void ctrl_outw(unsigned short b, unsigned long addr)
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h
index ab492fa5b..d013f35fc 100644
--- a/include/asm-sh/irq.h
+++ b/include/asm-sh/irq.h
@@ -5,15 +5,31 @@
*
* linux/include/asm-sh/irq.h
*
- * Copyright (C) 1999 Niibe Yutaka
+ * Copyright (C) 1999 Niibe Yutaka & Takeshi Yaegashi
+ * Copyright (C) 2000 Kazumoto Kojima
*
*/
#include <linux/config.h>
-#define TIMER_IRQ 16 /* Hard-wired */
-#define TIMER_IPR_OFFSET 12
-#define TIMER_PRIORITY 2
+#if defined(__sh3__)
+#define INTC_IPRA 0xfffffee2UL
+#define INTC_IPRB 0xfffffee4UL
+#elif defined(__SH4__)
+#define INTC_IPRA 0xffd00004UL
+#define INTC_IPRB 0xffd00008UL
+#define INTC_IPRC 0xffd0000cUL
+#endif
+
+#define TIMER_IRQ 16
+#define TIMER_IPR_ADDR INTC_IPRA
+#define TIMER_IPR_POS 3
+#define TIMER_PRIORITY 2
+
+#define RTC_IRQ 22
+#define RTC_IPR_ADDR INTC_IPRA
+#define RTC_IPR_POS 0
+#define RTC_PRIORITY TIMER_PRIORITY
#if defined(__SH4__)
/*
@@ -37,8 +53,52 @@ extern void enable_irq(unsigned int);
/*
* Function for "on chip support modules".
*/
-extern void set_ipr_data(unsigned int irq, int offset, int priority);
-extern void make_onChip_irq(unsigned int irq);
+extern void set_ipr_data(unsigned int irq, unsigned int addr,
+ int pos, int priority);
+extern void make_ipr_irq(unsigned int irq);
extern void make_imask_irq(unsigned int irq);
+#if defined(CONFIG_CPU_SUBTYPE_SH7709)
+#define INTC_IRR0 0xa4000004UL
+#define INTC_IRR1 0xa4000006UL
+#define INTC_IRR2 0xa4000008UL
+
+#define INTC_ICR0 0xfffffee0UL
+#define INTC_ICR1 0xa4000010UL
+#define INTC_ICR2 0xa4000012UL
+#define INTC_INTER 0xa4000014UL
+
+#define INTC_IPRC 0xa4000016UL
+#define INTC_IPRD 0xa4000018UL
+#define INTC_IPRE 0xa400001aUL
+
+#define IRQ0_IRQ 32
+#define IRQ1_IRQ 33
+#define IRQ2_IRQ 34
+#define IRQ3_IRQ 35
+#define IRQ4_IRQ 36
+#define IRQ5_IRQ 37
+
+#define IRQ0_IRP_ADDR INTC_IPRC
+#define IRQ1_IRP_ADDR INTC_IPRC
+#define IRQ2_IRP_ADDR INTC_IPRC
+#define IRQ3_IRP_ADDR INTC_IPRC
+#define IRQ4_IRP_ADDR INTC_IPRD
+#define IRQ5_IRP_ADDR INTC_IPRD
+
+#define IRQ0_IRP_POS 0
+#define IRQ1_IRP_POS 1
+#define IRQ2_IRP_POS 2
+#define IRQ3_IRP_POS 3
+#define IRQ4_IRP_POS 0
+#define IRQ5_IRP_POS 1
+
+#define IRQ0_PRIORITY 1
+#define IRQ1_PRIORITY 1
+#define IRQ2_PRIORITY 1
+#define IRQ3_PRIORITY 1
+#define IRQ4_PRIORITY 1
+#define IRQ5_PRIORITY 1
+#endif
+
#endif /* __ASM_SH_IRQ_H */
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h
index ca6fffbca..f39d88aaa 100644
--- a/include/asm-sh/pgtable.h
+++ b/include/asm-sh/pgtable.h
@@ -22,7 +22,10 @@ extern void paging_init(void);
* - flush_cache_mm(mm) flushes the specified mm context's cache lines
* - flush_cache_page(mm, vmaddr) flushes a single page
* - flush_cache_range(mm, start, end) flushes a range of pages
+ *
* - flush_page_to_ram(page) write back kernel page to ram
+ * - flush_icache_range(start, end) flushes(invalidates) a range for icache
+ * - flush_icache_page(vma, pg) flushes(invalidates) a page for icache
*
* Caches are indexed (effectively) by physical address on SH-3, so
* we don't need them.
@@ -43,8 +46,7 @@ extern void flush_cache_mm(struct mm_struct *mm);
extern void flush_cache_range(struct mm_struct *mm, unsigned long start,
unsigned long end);
extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr);
-extern void __flush_page_to_ram(unsigned long page_va);
-#define flush_page_to_ram(page) __flush_page_to_ram(page_address(page))
+extern void flush_page_to_ram(struct page *page);
extern void flush_icache_range(unsigned long start, unsigned long end);
extern void flush_icache_page(struct vm_area_struct *vma, struct page *pg);
#endif
diff --git a/include/asm-sh/smc37c93x.h b/include/asm-sh/smc37c93x.h
new file mode 100644
index 000000000..585da2a8f
--- /dev/null
+++ b/include/asm-sh/smc37c93x.h
@@ -0,0 +1,190 @@
+#ifndef __ASM_SH_SMC37C93X_H
+#define __ASM_SH_SMC37C93X_H
+
+/*
+ * linux/include/asm-sh/smc37c93x.h
+ *
+ * Copyright (C) 2000 Kazumoto Kojima
+ *
+ * SMSC 37C93x Super IO Chip support
+ */
+
+/* Default base I/O address */
+#define FDC_PRIMARY_BASE 0x3f0
+#define IDE1_PRIMARY_BASE 0x1f0
+#define IDE1_SECONDARY_BASE 0x170
+#define PARPORT_PRIMARY_BASE 0x378
+#define COM1_PRIMARY_BASE 0x2f8
+#define COM2_PRIMARY_BASE 0x3f8
+#define RTC_PRIMARY_BASE 0x070
+#define KBC_PRIMARY_BASE 0x060
+#define AUXIO_PRIMARY_BASE 0x000 /* XXX */
+
+/* Logical device number */
+#define LDN_FDC 0
+#define LDN_IDE1 1
+#define LDN_IDE2 2
+#define LDN_PARPORT 3
+#define LDN_COM1 4
+#define LDN_COM2 5
+#define LDN_RTC 6
+#define LDN_KBC 7
+#define LDN_AUXIO 8
+
+/* Configuration port and key */
+#define CONFIG_PORT 0x3f0
+#define INDEX_PORT CONFIG_PORT
+#define DATA_PORT 0x3f1
+#define CONFIG_ENTER 0x55
+#define CONFIG_EXIT 0xaa
+
+/* Configuration index */
+#define CURRENT_LDN_INDEX 0x07
+#define POWER_CONTROL_INDEX 0x22
+#define ACTIVATE_INDEX 0x30
+#define IO_BASE_HI_INDEX 0x60
+#define IO_BASE_LO_INDEX 0x61
+#define IRQ_SELECT_INDEX 0x70
+#define DMA_SELECT_INDEX 0x74
+
+#define GPIO46_INDEX 0xc6
+#define GPIO47_INDEX 0xc7
+
+/* UART stuff. Only for debugging. */
+/* UART Register */
+
+#define UART_RBR 0x0 /* Receiver Buffer Register (Read Only) */
+#define UART_THR 0x0 /* Transmitter Holding Register (Write Only) */
+#define UART_IER 0x2 /* Interrupt Enable Register */
+#define UART_IIR 0x4 /* Interrupt Ident Register (Read Only) */
+#define UART_FCR 0x4 /* FIFO Control Register (Write Only) */
+#define UART_LCR 0x6 /* Line Control Register */
+#define UART_MCR 0x8 /* MODEM Control Register */
+#define UART_LSR 0xa /* Line Status Register */
+#define UART_MSR 0xc /* MODEM Status Register */
+#define UART_SCR 0xe /* Scratch Register */
+#define UART_DLL 0x0 /* Divisor Latch (LS) */
+#define UART_DLM 0x2 /* Divisor Latch (MS) */
+
+#ifndef __ASSEMBLY__
+typedef struct uart_reg {
+ volatile __u16 rbr;
+ volatile __u16 ier;
+ volatile __u16 iir;
+ volatile __u16 lcr;
+ volatile __u16 mcr;
+ volatile __u16 lsr;
+ volatile __u16 msr;
+ volatile __u16 scr;
+} uart_reg;
+#endif /* ! __ASSEMBLY__ */
+
+/* Alias for Write Only Register */
+
+#define thr rbr
+#define tcr iir
+
+/* Alias for Divisor Latch Register */
+
+#define dll rbr
+#define dlm ier
+#define fcr iir
+
+/* Interrupt Enable Register */
+
+#define IER_ERDAI 0x0100 /* Enable Received Data Available Interrupt */
+#define IER_ETHREI 0x0200 /* Enable Transmitter Holding Register Empty Interrupt */
+#define IER_ELSI 0x0400 /* Enable Receiver Line Status Interrupt */
+#define IER_EMSI 0x0800 /* Enable MODEM Status Interrupt */
+
+/* Interrupt Ident Register */
+
+#define IIR_IP 0x0100 /* "0" if Interrupt Pending */
+#define IIR_IIB0 0x0200 /* Interrupt ID Bit 0 */
+#define IIR_IIB1 0x0400 /* Interrupt ID Bit 1 */
+#define IIR_IIB2 0x0800 /* Interrupt ID Bit 2 */
+#define IIR_FIFO 0xc000 /* FIFOs enabled */
+
+/* FIFO Control Register */
+
+#define FCR_FEN 0x0100 /* FIFO enable */
+#define FCR_RFRES 0x0200 /* Receiver FIFO reset */
+#define FCR_TFRES 0x0400 /* Transmitter FIFO reset */
+#define FCR_DMA 0x0800 /* DMA mode select */
+#define FCR_RTL 0x4000 /* Receiver triger (LSB) */
+#define FCR_RTM 0x8000 /* Receiver triger (MSB) */
+
+/* Line Control Register */
+
+#define LCR_WLS0 0x0100 /* Word Length Select Bit 0 */
+#define LCR_WLS1 0x0200 /* Word Length Select Bit 1 */
+#define LCR_STB 0x0400 /* Number of Stop Bits */
+#define LCR_PEN 0x0800 /* Parity Enable */
+#define LCR_EPS 0x1000 /* Even Parity Select */
+#define LCR_SP 0x2000 /* Stick Parity */
+#define LCR_SB 0x4000 /* Set Break */
+#define LCR_DLAB 0x8000 /* Divisor Latch Access Bit */
+
+/* MODEM Control Register */
+
+#define MCR_DTR 0x0100 /* Data Terminal Ready */
+#define MCR_RTS 0x0200 /* Request to Send */
+#define MCR_OUT1 0x0400 /* Out 1 */
+#define MCR_IRQEN 0x0800 /* IRQ Enable */
+#define MCR_LOOP 0x1000 /* Loop */
+
+/* Line Status Register */
+
+#define LSR_DR 0x0100 /* Data Ready */
+#define LSR_OE 0x0200 /* Overrun Error */
+#define LSR_PE 0x0400 /* Parity Error */
+#define LSR_FE 0x0800 /* Framing Error */
+#define LSR_BI 0x1000 /* Break Interrupt */
+#define LSR_THRE 0x2000 /* Transmitter Holding Register Empty */
+#define LSR_TEMT 0x4000 /* Transmitter Empty */
+#define LSR_FIFOE 0x8000 /* Receiver FIFO error */
+
+/* MODEM Status Register */
+
+#define MSR_DCTS 0x0100 /* Delta Clear to Send */
+#define MSR_DDSR 0x0200 /* Delta Data Set Ready */
+#define MSR_TERI 0x0400 /* Trailing Edge Ring Indicator */
+#define MSR_DDCD 0x0800 /* Delta Data Carrier Detect */
+#define MSR_CTS 0x1000 /* Clear to Send */
+#define MSR_DSR 0x2000 /* Data Set Ready */
+#define MSR_RI 0x4000 /* Ring Indicator */
+#define MSR_DCD 0x8000 /* Data Carrier Detect */
+
+/* Baud Rate Divisor */
+
+#define UART_CLK (1843200) /* 1.8432 MHz */
+#define UART_BAUD(x) (UART_CLK / (16 * (x)))
+
+/* RTC register definition */
+#define RTC_SECONDS 0
+#define RTC_SECONDS_ALARM 1
+#define RTC_MINUTES 2
+#define RTC_MINUTES_ALARM 3
+#define RTC_HOURS 4
+#define RTC_HOURS_ALARM 5
+#define RTC_DAY_OF_WEEK 6
+#define RTC_DAY_OF_MONTH 7
+#define RTC_MONTH 8
+#define RTC_YEAR 9
+#define RTC_FREQ_SELECT 10
+# define RTC_UIP 0x80
+# define RTC_DIV_CTL 0x70
+/* This RTC can work under 32.768KHz clock only. */
+# define RTC_OSC_ENABLE 0x20
+# define RTC_OSC_DISABLE 0x00
+#define RTC_CONTROL 11
+# define RTC_SET 0x80
+# define RTC_PIE 0x40
+# define RTC_AIE 0x20
+# define RTC_UIE 0x10
+# define RTC_SQWE 0x08
+# define RTC_DM_BINARY 0x04
+# define RTC_24H 0x02
+# define RTC_DST_EN 0x01
+
+#endif /* __ASM_SH_SMC37C93X_H */
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h
index ab5383e0a..3bb876274 100644
--- a/include/asm-sh/system.h
+++ b/include/asm-sh/system.h
@@ -165,18 +165,18 @@ do { \
/*
* Back to P1 area.
*/
-#define back_to_P1() \
-do { \
- unsigned long __dummy; \
- __asm__ __volatile__( \
- "nop;nop;nop;nop;nop;nop\n\t" \
- "mov.l 1f, %0\n\t" \
- "jmp @%0\n\t" \
- " nop\n\t" \
- ".balign 4\n" \
- "1: .long 2f\n" \
- "2:" \
- : "=&r" (__dummy)); \
+#define back_to_P1() \
+do { \
+ unsigned long __dummy; \
+ __asm__ __volatile__( \
+ "nop;nop;nop;nop;nop;nop;nop\n\t" \
+ "mov.l 1f, %0\n\t" \
+ "jmp @%0\n\t" \
+ " nop\n\t" \
+ ".balign 4\n" \
+ "1: .long 2f\n" \
+ "2:" \
+ : "=&r" (__dummy)); \
} while (0)
/* For spinlocks etc */
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h
index f927716b2..0594308fe 100644
--- a/include/asm-sh/unistd.h
+++ b/include/asm-sh/unistd.h
@@ -314,16 +314,16 @@ __syscall_return(type,__sc0); \
#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
{ \
-register long __sc0 __asm__ ("$r3") = __NR_##name; \
+register long __sc3 __asm__ ("$r3") = __NR_##name; \
register long __sc4 __asm__ ("$r4") = (long) arg1; \
register long __sc5 __asm__ ("$r5") = (long) arg2; \
register long __sc6 __asm__ ("$r6") = (long) arg3; \
register long __sc7 __asm__ ("$r7") = (long) arg4; \
-register long __sc2 __asm__ ("$r0") = (long) arg5; \
+register long __sc0 __asm__ ("$r0") = (long) arg5; \
__asm__ __volatile__ ("trapa #0x15" \
: "=z" (__sc0) \
: "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7), \
- "r" (__sc7), "r" (__sc2) \
+ "r" (__sc3) \
: "memory" ); \
__syscall_return(type,__sc0); \
}
diff --git a/include/asm-sparc/bitops.h b/include/asm-sparc/bitops.h
index 09a08baa2..b2c8acfff 100644
--- a/include/asm-sparc/bitops.h
+++ b/include/asm-sparc/bitops.h
@@ -1,4 +1,4 @@
-/* $Id: bitops.h,v 1.55 2000/02/09 03:28:32 davem Exp $
+/* $Id: bitops.h,v 1.56 2000/05/09 17:40:15 davem Exp $
* bitops.h: Bit string operations on the Sparc.
*
* Copyright 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/ide.h b/include/asm-sparc/ide.h
index 25451ae0e..79b0e47a1 100644
--- a/include/asm-sparc/ide.h
+++ b/include/asm-sparc/ide.h
@@ -1,4 +1,4 @@
-/* $Id: ide.h,v 1.4 2000/03/12 03:56:12 davem Exp $
+/* $Id: ide.h,v 1.5 2000/05/22 07:29:43 davem Exp $
* ide.h: SPARC PCI specific IDE glue.
*
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
@@ -65,7 +65,8 @@ static __inline__ void ide_init_default_hwifs(void)
int index;
for (index = 0; index < MAX_HWIFS; index++) {
- ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, 0);
+ memset(&hw, 0, sizeof(hw_regs_t));
+ ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL);
}
diff --git a/include/asm-sparc/irq.h b/include/asm-sparc/irq.h
index 1f40557b4..512a8e818 100644
--- a/include/asm-sparc/irq.h
+++ b/include/asm-sparc/irq.h
@@ -1,4 +1,4 @@
-/* $Id: irq.h,v 1.28 2000/01/22 06:06:58 zaitcev Exp $
+/* $Id: irq.h,v 1.29 2000/05/09 17:40:15 davem Exp $
* irq.h: IRQ registers on the Sparc.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/pgalloc.h b/include/asm-sparc/pgalloc.h
index 7a2b81beb..c0850c9a9 100644
--- a/include/asm-sparc/pgalloc.h
+++ b/include/asm-sparc/pgalloc.h
@@ -1,4 +1,4 @@
-/* $Id: pgalloc.h,v 1.3 2000/02/03 10:13:31 jj Exp $ */
+/* $Id: pgalloc.h,v 1.4 2000/05/09 17:40:15 davem Exp $ */
#ifndef _SPARC_PGALLOC_H
#define _SPARC_PGALLOC_H
diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h
index 00e33e3bf..69cc06de2 100644
--- a/include/asm-sparc/system.h
+++ b/include/asm-sparc/system.h
@@ -1,4 +1,4 @@
-/* $Id: system.h,v 1.81 2000/02/28 04:00:44 anton Exp $ */
+/* $Id: system.h,v 1.82 2000/05/09 17:40:15 davem Exp $ */
#include <linux/config.h>
#ifndef __SPARC_SYSTEM_H
diff --git a/include/asm-sparc/winmacro.h b/include/asm-sparc/winmacro.h
index e76082257..619f5e944 100644
--- a/include/asm-sparc/winmacro.h
+++ b/include/asm-sparc/winmacro.h
@@ -1,4 +1,4 @@
-/* $Id: winmacro.h,v 1.21 1999/08/14 03:52:13 anton Exp $
+/* $Id: winmacro.h,v 1.22 2000/05/09 17:40:15 davem Exp $
* winmacro.h: Window loading-unloading macros.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/delay.h b/include/asm-sparc64/delay.h
index 4a9bfdb1c..1dc636453 100644
--- a/include/asm-sparc64/delay.h
+++ b/include/asm-sparc64/delay.h
@@ -1,4 +1,4 @@
-/* $Id: delay.h,v 1.8 2000/04/13 04:45:59 davem Exp $
+/* $Id: delay.h,v 1.9 2000/05/09 17:40:15 davem Exp $
* delay.h: Linux delay routines on the V9.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu).
diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h
index 385baa7a4..471ee71a0 100644
--- a/include/asm-sparc64/ide.h
+++ b/include/asm-sparc64/ide.h
@@ -1,4 +1,4 @@
-/* $Id: ide.h,v 1.17 1999/12/15 22:18:49 davem Exp $
+/* $Id: ide.h,v 1.18 2000/05/22 07:29:43 davem Exp $
* ide.h: Ultra/PCI specific IDE glue.
*
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
@@ -59,7 +59,8 @@ static __inline__ void ide_init_default_hwifs(void)
int index;
for (index = 0; index < MAX_HWIFS; index++) {
- ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, 0);
+ memset(&hw, 0, sizeof(hw_regs_t));
+ ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL);
}
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h
index cff5236ed..111ad568b 100644
--- a/include/asm-sparc64/irq.h
+++ b/include/asm-sparc64/irq.h
@@ -1,4 +1,4 @@
-/* $Id: irq.h,v 1.17 1999/09/21 14:39:41 davem Exp $
+/* $Id: irq.h,v 1.18 2000/05/09 17:40:15 davem Exp $
* irq.h: IRQ registers on the 64-bit Sparc.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/oplib.h b/include/asm-sparc64/oplib.h
index 963ce73e4..cf6cbc589 100644
--- a/include/asm-sparc64/oplib.h
+++ b/include/asm-sparc64/oplib.h
@@ -1,4 +1,4 @@
-/* $Id: oplib.h,v 1.12 1999/11/19 05:53:12 davem Exp $
+/* $Id: oplib.h,v 1.13 2000/05/09 17:40:15 davem Exp $
* oplib.h: Describes the interface and available routines in the
* Linux Prom library.
*
diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h
index b731a18aa..b7b124a56 100644
--- a/include/asm-sparc64/processor.h
+++ b/include/asm-sparc64/processor.h
@@ -1,4 +1,4 @@
-/* $Id: processor.h,v 1.63 2000/03/27 10:38:57 davem Exp $
+/* $Id: processor.h,v 1.64 2000/05/09 17:40:15 davem Exp $
* include/asm-sparc64/processor.h
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h
index 895cd74df..00303c239 100644
--- a/include/asm-sparc64/system.h
+++ b/include/asm-sparc64/system.h
@@ -1,4 +1,4 @@
-/* $Id: system.h,v 1.58 2000/05/05 18:47:41 davem Exp $ */
+/* $Id: system.h,v 1.59 2000/05/09 17:40:15 davem Exp $ */
#ifndef __SPARC64_SYSTEM_H
#define __SPARC64_SYSTEM_H
diff --git a/include/asm-sparc64/timer.h b/include/asm-sparc64/timer.h
index 8eb30d7d8..4aa85bede 100644
--- a/include/asm-sparc64/timer.h
+++ b/include/asm-sparc64/timer.h
@@ -1,4 +1,4 @@
-/* $Id: timer.h,v 1.2 1998/03/15 17:23:52 ecd Exp $
+/* $Id: timer.h,v 1.3 2000/05/09 17:40:15 davem Exp $
* timer.h: System timer definitions for sun5.
*
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h
index abf6c09eb..c7fd4cd19 100644
--- a/include/asm-sparc64/unistd.h
+++ b/include/asm-sparc64/unistd.h
@@ -1,4 +1,4 @@
-/* $Id: unistd.h,v 1.42 2000/01/29 17:57:26 jj Exp $ */
+/* $Id: unistd.h,v 1.44 2000/05/16 16:42:33 jj Exp $ */
#ifndef _SPARC64_UNISTD_H
#define _SPARC64_UNISTD_H
@@ -246,7 +246,9 @@
#define __NR_setfsuid 228 /* Linux Specific */
#define __NR_setfsgid 229 /* Linux Specific */
#define __NR__newselect 230 /* Linux Specific */
-#define __NR_time 231 /* Linux Specific */
+#ifdef __KERNEL__
+#define __NR_time 231 /* Linux sparc32 */
+#endif
/* #define __NR_oldstat 232 Linux Specific */
#define __NR_stime 233 /* Linux Specific */
/* #define __NR_oldfstat 234 Linux Specific */
diff --git a/include/linux/coda.h b/include/linux/coda.h
index 6e1a939be..cbd042242 100644
--- a/include/linux/coda.h
+++ b/include/linux/coda.h
@@ -61,8 +61,9 @@ Mellon the rights to redistribute these changes without encumbrance.
-/* Catch new _KERNEL defn for NetBSD */
-#ifdef __NetBSD__
+/* Catch new _KERNEL defn for NetBSD and DJGPP/__CYGWIN32__ */
+#if defined(__NetBSD__) || \
+ ((defined(DJGPP) || defined(__CYGWIN32__)) && !defined(KERNEL))
#include <sys/types.h>
#endif
@@ -91,7 +92,6 @@ struct timespec {
long ts_nsec;
};
#else /* DJGPP but not KERNEL */
-#include <sys/types.h>
#include <sys/time.h>
typedef unsigned long long u_quad_t;
#endif /* !KERNEL */
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 7eccee7b9..12bbfbdc1 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -80,7 +80,7 @@ struct dentry_operations {
int (*d_revalidate)(struct dentry *, int);
int (*d_hash) (struct dentry *, struct qstr *);
int (*d_compare) (struct dentry *, struct qstr *, struct qstr *);
- void (*d_delete)(struct dentry *);
+ int (*d_delete)(struct dentry *);
void (*d_release)(struct dentry *);
void (*d_iput)(struct dentry *, struct inode *);
};
@@ -160,8 +160,11 @@ extern void prune_icache(int);
/* only used at mount-time */
extern struct dentry * d_alloc_root(struct inode *);
-/* test whether root is busy without destroying dcache */
-extern int d_active_refs(struct dentry *);
+/* <clickety>-<click> the ramfs-type tree */
+extern void d_genocide(struct dentry *);
+
+extern struct dentry *d_find_alias(struct inode *);
+extern void d_prune_aliases(struct inode *);
/* test whether we have any submounts in a subdir tree */
extern int have_submounts(struct dentry *);
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 748a9834c..88d3770b9 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -22,6 +22,8 @@ struct elevator_s
int read_pendings;
elevator_fn * elevator_fn;
+
+ unsigned int queue_ID;
};
#define ELEVATOR_DEFAULTS \
@@ -40,14 +42,14 @@ struct elevator_s
typedef struct blkelv_ioctl_arg_s {
- void * queue_ID;
+ int 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)
+#define BLKELVGET _IOR(0x12,106,sizeof(blkelv_ioctl_arg_t))
+#define BLKELVSET _IOW(0x12,107,sizeof(blkelv_ioctl_arg_t))
extern int blkelvget_ioctl(elevator_t *, blkelv_ioctl_arg_t *);
extern int blkelvset_ioctl(elevator_t *, const blkelv_ioctl_arg_t *);
diff --git a/include/linux/fb.h b/include/linux/fb.h
index f2bc40f4d..733f7fb00 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -25,6 +25,8 @@
#define FBIOPUT_CON2FBMAP 0x4610
#define FBIOBLANK 0x4611 /* arg: 0 or vesa level + 1 */
#define FBIOGET_VBLANK _IOR('F', 0x12, struct fb_vblank)
+#define FBIO_ALLOC 0x4613
+#define FBIO_FREE 0x4614
#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
#define FB_TYPE_PLANES 1 /* Non interleaved planes */
@@ -85,6 +87,7 @@
#define FB_ACCEL_IGS_CYBER2000 33 /* CyberPro 2000 */
#define FB_ACCEL_IGS_CYBER2010 34 /* CyberPro 2010 */
#define FB_ACCEL_IGS_CYBER5000 35 /* CyberPro 5000 */
+#define FB_ACCEL_SIS_GLAMOUR 36 /* SiS 300/630/540 */
struct fb_fix_screeninfo {
char id[16]; /* identification string eg "TT Builtin" */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 4eb593aba..d147dfe1c 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -165,8 +165,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 */
+#define BLKELVGET _IOR(0x12,106,sizeof(blkelv_ioctl_arg_t))/* elevator get */
+#define BLKELVSET _IOW(0x12,107,sizeof(blkelv_ioctl_arg_t))/* 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
@@ -794,6 +794,8 @@ extern int unregister_filesystem(struct file_system_type *);
extern struct vfsmount *kern_mount(struct file_system_type *);
extern void kern_umount(struct vfsmount *);
extern int may_umount(struct vfsmount *);
+extern long do_mount(char *, char *, char *, unsigned long, void *);
+
extern int vfs_statfs(struct super_block *, struct statfs *);
@@ -900,7 +902,7 @@ extern struct file_operations rdwr_pipe_fops;
extern int fs_may_remount_ro(struct super_block *);
-extern int try_to_free_buffers(struct page *);
+extern int try_to_free_buffers(struct page *, int);
extern void refile_buffer(struct buffer_head * buf);
#define BUF_CLEAN 0
@@ -1116,6 +1118,7 @@ extern int page_follow_link(struct dentry *, struct nameidata *);
extern struct inode_operations page_symlink_inode_operations;
extern int vfs_readdir(struct file *, filldir_t, void *);
+extern int dcache_readdir(struct file *, void *, filldir_t);
extern struct super_block *get_super(kdev_t);
struct super_block *get_empty_super(void);
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h
index e28f6bfff..e229fa2b4 100644
--- a/include/linux/hdreg.h
+++ b/include/linux/hdreg.h
@@ -181,6 +181,8 @@ struct hd_geometry {
#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_AEB 0x031e
+#define HDIO_DRIVE_TASK 0x031e
#define HDIO_DRIVE_CMD 0x031f /* execute a special drive command */
/* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */
@@ -207,7 +209,6 @@ struct hd_big_geometry {
#define HDIO_GETGEO_BIG 0x0330 /* */
#define HDIO_GETGEO_BIG_RAW 0x0331 /* */
-
#define __NEW_HD_DRIVE_ID
/* structure returned by HDIO_GET_IDENTITY, as per ANSI ATA2 rev.2f spec */
struct hd_driveid {
@@ -272,7 +273,7 @@ struct hd_driveid {
unsigned short CurAPMvalues; /* current APM values */
unsigned short word92; /* reserved (word 92) */
unsigned short hw_config; /* hardware config */
- unsigned short words94_125[31];/* reserved words 94-125 */
+ unsigned short words94_125[32];/* reserved words 94-125 */
unsigned short last_lun; /* reserved (word 126) */
unsigned short word127; /* reserved (word 127) */
unsigned short dlf; /* device lock function
@@ -293,8 +294,10 @@ struct hd_driveid {
* 1 read-look-ahead
* 0 write cache
*/
- unsigned short words130_159[30];/* reserved vendor words 130-159 */
- unsigned short words160_255[96];/* reserved words 160-255 */
+ unsigned short words130_155[26];/* reserved vendor words 130-155 */
+ unsigned short word156;
+ unsigned short words157_159[3];/* reserved vendor words 157-159 */
+ unsigned short words160_255[95];/* reserved words 160-255 */
};
/*
@@ -314,10 +317,6 @@ struct hd_driveid {
*/
#include <linux/config.h>
-#ifdef CONFIG_BLK_DEV_HD
-void hd_setup(char *, int *);
-#endif /* CONFIG_BLK_DEV_HD */
-
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
int ide_register(int io_port, int ctl_port, int irq);
void ide_unregister(unsigned int);
diff --git a/include/linux/hdsmart.h b/include/linux/hdsmart.h
index 509b591d2..7974a47fe 100644
--- a/include/linux/hdsmart.h
+++ b/include/linux/hdsmart.h
@@ -17,123 +17,108 @@
#ifndef _LINUX_HDSMART_H
#define _LINUX_HDSMART_H
+#define OFFLINE_FULL_SCAN 0
+#define SHORT_SELF_TEST 1
+#define EXTEND_SELF_TEST 2
+#define SHORT_CAPTIVE_SELF_TEST 129
+#define EXTEND_CAPTIVE_SELF_TEST 130
+
/* smart_attribute is the vendor specific in SFF-8035 spec */
-struct ata_smart_attribute {
- unsigned char id;
- unsigned short status_flag;
- unsigned char normalized;
- unsigned char worse_normal;
- unsigned char raw[6];
- unsigned char reserv;
-} __attribute__ ((packed));
+typedef struct ata_smart_attribute_s {
+ unsigned char id;
+ unsigned short status_flag;
+ unsigned char normalized;
+ unsigned char worse_normal;
+ unsigned char raw[6];
+ unsigned char reserv;
+} __attribute__ ((packed)) ata_smart_attribute_t;
/* smart_values is format of the read drive Atrribute command */
-struct ata_smart_values {
- unsigned short revnumber;
- struct ata_smart_attribute vendor_attributes [30];
- unsigned char offline_data_collection_status;
- unsigned char self_test_exec_status;
- unsigned short total_time_to_complete_off_line;
- unsigned char vendor_specific_366;
- unsigned char offline_data_collection_capability;
- unsigned short smart_capability;
- unsigned char errorlog_capability;
- unsigned char vendor_specific_371;
- unsigned char short_test_completion_time;
- unsigned char extend_test_completion_time;
- unsigned char reserved_374_385 [12];
- unsigned char vendor_specific_386_509 [125];
- unsigned char chksum;
-} __attribute__ ((packed));
+typedef struct ata_smart_values_s {
+ unsigned short revnumber;
+ ata_smart_attribute_t vendor_attributes [30];
+ unsigned char offline_data_collection_status;
+ unsigned char self_test_exec_status;
+ unsigned short total_time_to_complete_off_line;
+ unsigned char vendor_specific_366;
+ unsigned char offline_data_collection_capability;
+ unsigned short smart_capability;
+ unsigned char errorlog_capability;
+ unsigned char vendor_specific_371;
+ unsigned char short_test_completion_time;
+ unsigned char extend_test_completion_time;
+ unsigned char reserved_374_385 [12];
+ unsigned char vendor_specific_386_509 [125];
+ unsigned char chksum;
+} __attribute__ ((packed)) ata_smart_values_t;
/* Smart Threshold data structures */
/* Vendor attribute of SMART Threshold */
-struct ata_smart_threshold_entry {
- unsigned char id;
- unsigned char normalized_threshold;
- unsigned char reserved[10];
-} __attribute__ ((packed));
+typedef struct ata_smart_threshold_entry_s {
+ unsigned char id;
+ unsigned char normalized_threshold;
+ unsigned char reserved[10];
+} __attribute__ ((packed)) ata_smart_threshold_entry_t;
/* Format of Read SMART THreshold Command */
-struct ata_smart_thresholds {
- unsigned short revnumber;
- struct ata_smart_threshold_entry thres_entries[30];
- unsigned char reserved[149];
- unsigned char chksum;
-} __attribute__ ((packed));
-
-struct ata_smart_errorlog_command_struct {
- unsigned char devicecontrolreg;
- unsigned char featuresreg;
- unsigned char sector_count;
- unsigned char sector_number;
- unsigned char cylinder_low;
- unsigned char cylinder_high;
- unsigned char drive_head;
- unsigned char commandreg;
- unsigned int timestamp;
-} __attribute__ ((packed));
-
-struct ata_smart_errorlog_error_struct {
- unsigned char error_condition;
- unsigned char extended_error[14];
- unsigned char state;
- unsigned short timestamp;
-} __attribute__ ((packed));
-
-struct ata_smart_errorlog_struct {
- struct ata_smart_errorlog_command_struct commands[6];
- struct ata_smart_errorlog_error_struct error_struct;
-} __attribute__ ((packed));
-
-struct ata_smart_errorlog {
- unsigned char revnumber;
- unsigned char error_log_pointer;
- struct ata_smart_errorlog_struct errorlog_struct[5];
- unsigned short ata_error_count;
- unsigned short non_fatal_count;
- unsigned short drive_timeout_count;
- unsigned char reserved[53];
-} __attribute__ ((packed));
-
-struct ata_smart_selftestlog_struct {
- unsigned char selftestnumber;
- unsigned char selfteststatus;
- unsigned short timestamp;
- unsigned char selftestfailurecheckpoint;
- unsigned int lbafirstfailure;
- unsigned char vendorspecific[15];
-} __attribute__ ((packed));
-
-struct ata_smart_selftestlog {
- unsigned short revnumber;
- struct ata_smart_selftestlog_struct selftest_struct[21];
- unsigned char vendorspecific[2];
- unsigned char mostrecenttest;
- unsigned char resevered[2];
- unsigned char chksum;
-} __attribute__ ((packed));
-
-#if !defined(__KERNEL__) || defined(_IDE_DISK_C)
-/* smartctl version number */
-#define VERSION_MAJOR 1
-#define VERSION_MINOR 2
-
-/* Number of ata device to scan */
-int numdevices;
-
-/* how often SMART is checks in seconds */
-int checktime = 1800;
-
-typedef struct atadevices_s {
- int fd;
- char devicename[14];
- int selftest;
- struct hd_driveid drive;
- struct ata_smart_values smartval;
- struct ata_smart_thresholds smartthres;
-} atadevices_t;
-
-#endif /* !defined(__KERNEL__) || defined(_IDE_DISK_C) */
+typedef struct ata_smart_thresholds_s {
+ unsigned short revnumber;
+ ata_smart_threshold_entry_t thres_entries[30];
+ unsigned char reserved[149];
+ unsigned char chksum;
+} __attribute__ ((packed)) ata_smart_thresholds_t;
+
+typedef struct ata_smart_errorlog_command_struct_s {
+ unsigned char devicecontrolreg;
+ unsigned char featuresreg;
+ unsigned char sector_count;
+ unsigned char sector_number;
+ unsigned char cylinder_low;
+ unsigned char cylinder_high;
+ unsigned char drive_head;
+ unsigned char commandreg;
+ unsigned int timestamp;
+} __attribute__ ((packed)) ata_smart_errorlog_command_struct_t;
+
+typedef struct ata_smart_errorlog_error_struct_s {
+ unsigned char error_condition;
+ unsigned char extended_error[14];
+ unsigned char state;
+ unsigned short timestamp;
+} __attribute__ ((packed)) ata_smart_errorlog_error_struct_t;
+
+typedef struct ata_smart_errorlog_struct_s {
+ ata_smart_errorlog_command_struct_t commands[6];
+ ata_smart_errorlog_error_struct_t error_struct;
+} __attribute__ ((packed)) ata_smart_errorlog_struct_t;
+
+typedef struct ata_smart_errorlog_s {
+ unsigned char revnumber;
+ unsigned char error_log_pointer;
+ ata_smart_errorlog_struct_t errorlog_struct[5];
+ unsigned short ata_error_count;
+ unsigned short non_fatal_count;
+ unsigned short drive_timeout_count;
+ unsigned char reserved[53];
+ unsigned char chksum;
+} __attribute__ ((packed)) ata_smart_errorlog_t;
+
+typedef struct ata_smart_selftestlog_struct_s {
+ unsigned char selftestnumber;
+ unsigned char selfteststatus;
+ unsigned short timestamp;
+ unsigned char selftestfailurecheckpoint;
+ unsigned int lbafirstfailure;
+ unsigned char vendorspecific[15];
+} __attribute__ ((packed)) ata_smart_selftestlog_struct_t;
+
+typedef struct ata_smart_selftestlog_s {
+ unsigned short revnumber;
+ ata_smart_selftestlog_struct_t selftest_struct[21];
+ unsigned char vendorspecific[2];
+ unsigned char mostrecenttest;
+ unsigned char resevered[2];
+ unsigned char chksum;
+} __attribute__ ((packed)) ata_smart_selftestlog_t;
#endif /* _LINUX_HDSMART_H */
diff --git a/include/linux/ide.h b/include/linux/ide.h
index ea395aaa8..8804c9777 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -64,6 +64,12 @@ void cmd640_dump_regs (void);
#define IDE_DRIVE_CMD 99 /* (magic) undef to reduce kernel size*/
/*
+ * IDE_DRIVE_TASK is used to implement many features needed for raw tasks
+ */
+#define IDE_DRIVE_TASK 98
+#define IDE_DRIVE_CMD_AEB 98
+
+/*
* "No user-serviceable parts" beyond this point :)
*****************************************************************************/
@@ -302,6 +308,10 @@ typedef struct ide_drive_s {
char driver_req[10]; /* requests specific driver */
int last_lun; /* last logical unit */
int forced_lun; /* if hdxlun was given at boot */
+ int lun; /* logical unit */
+ byte init_speed; /* transfer rate set at boot */
+ byte current_speed; /* current transfer rate set */
+ byte dn; /* now wide spread use */
} ide_drive_t;
/*
@@ -336,7 +346,8 @@ typedef int (ide_dmaproc_t)(ide_dma_action_t, ide_drive_t *);
* support all possible PIO settings. They may silently ignore
* or round values as they see fit.
*/
-typedef void (ide_tuneproc_t)(ide_drive_t *, byte);
+typedef void (ide_tuneproc_t) (ide_drive_t *, byte);
+typedef int (ide_speedproc_t) (ide_drive_t *, byte);
/*
* This is used to provide support for strange interfaces
@@ -374,6 +385,7 @@ typedef struct hwif_s {
ide_drive_t drives[MAX_DRIVES]; /* drive info */
struct gendisk *gd; /* gendisk structure */
ide_tuneproc_t *tuneproc; /* routine to tune PIO mode for drives */
+ ide_speedproc_t *speedproc; /* routine to retune DMA modes for drives */
ide_selectproc_t *selectproc; /* tweaks hardware to select drive */
ide_resetproc_t *resetproc; /* routine to reset controller after a disk reset */
ide_dmaproc_t *dmaproc; /* dma read/write/abort routine */
@@ -409,6 +421,7 @@ typedef struct hwif_s {
unsigned long last_time; /* time when previous rq was done */
#endif
byte straight8; /* Alan's straight 8 check */
+ void *hwif_data; /* extra hwif data */
} ide_hwif_t;
/*
@@ -728,14 +741,16 @@ void ide_end_drive_cmd (ide_drive_t *drive, byte stat, byte err);
* Issue ATA command and wait for completion.
*/
int ide_wait_cmd (ide_drive_t *drive, int cmd, int nsect, int feature, int sectors, byte *buf);
+int ide_wait_cmd_task (ide_drive_t *drive, byte *buf);
void ide_delay_50ms (void);
int system_bus_clock(void);
+byte ide_auto_reduce_xfer (ide_drive_t *drive);
int ide_driveid_update (ide_drive_t *drive);
-int ide_ata66_check (ide_drive_t *drive, int cmd, int nsect, int feature);
+int ide_ata66_check (ide_drive_t *drive, byte cmd, byte nsect, byte feature);
int ide_config_drive_speed (ide_drive_t *drive, byte speed);
-int set_transfer (ide_drive_t *drive, int cmd, int nsect, int feature);
+int set_transfer (ide_drive_t *drive, byte cmd, byte nsect, byte feature);
/*
* ide_system_bus_speed() returns what we think is the system VESA/PCI
@@ -769,37 +784,10 @@ request_queue_t *ide_get_queue (kdev_t dev);
*/
int drive_is_flashcard (ide_drive_t *drive);
-int ide_spin_wait_hwgroup(ide_drive_t *drive, unsigned long *flags);
+int ide_spin_wait_hwgroup (ide_drive_t *drive);
void ide_timer_expiry (unsigned long data);
void ide_intr (int irq, void *dev_id, struct pt_regs *regs);
-void do_ide0_request (request_queue_t * q);
-#if MAX_HWIFS > 1
-void do_ide1_request (request_queue_t * q);
-#endif
-#if MAX_HWIFS > 2
-void do_ide2_request (request_queue_t * q);
-#endif
-#if MAX_HWIFS > 3
-void do_ide3_request (request_queue_t * q);
-#endif
-#if MAX_HWIFS > 4
-void do_ide4_request (request_queue_t * q);
-#endif
-#if MAX_HWIFS > 5
-void do_ide5_request (request_queue_t * q);
-#endif
-#if MAX_HWIFS > 6
-void do_ide6_request (request_queue_t * q);
-#endif
-#if MAX_HWIFS > 7
-void do_ide7_request (request_queue_t * q);
-#endif
-#if MAX_HWIFS > 8
-void do_ide8_request (request_queue_t * q);
-#endif
-#if MAX_HWIFS > 9
-void do_ide9_request (request_queue_t * q);
-#endif
+void do_ide_request (request_queue_t * q);
void ide_init_subdrivers (void);
#ifndef _IDE_C
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
index 873a7d9d6..0129c67b9 100644
--- a/include/linux/if_pppox.h
+++ b/include/linux/if_pppox.h
@@ -16,12 +16,13 @@
#ifndef __LINUX_IF_PPPOX_H
#define __LINUX_IF_PPPOX_H
-#include <linux/if_ether.h>
-#include <linux/if.h>
#include <asm/types.h>
#include <asm/byteorder.h>
+
#ifdef __KERNEL__
+#include <linux/if_ether.h>
+#include <linux/if.h>
#include <linux/netdevice.h>
#include <linux/sched.h>
#include <asm/semaphore.h>
diff --git a/include/linux/lvm.h b/include/linux/lvm.h
index 703d8f72e..7afbc1178 100644
--- a/include/linux/lvm.h
+++ b/include/linux/lvm.h
@@ -83,11 +83,13 @@
#include <linux/version.h>
#ifndef __KERNEL__
+#define ____NOT_KERNEL____
#define __KERNEL__
+#endif
#include <linux/kdev_t.h>
+#ifdef ____NOT_KERNEL____
+#undef ____NOT_KERNEL____
#undef __KERNEL__
-#else
-#include <linux/kdev_t.h>
#endif
#include <linux/major.h>
diff --git a/include/linux/mount.h b/include/linux/mount.h
index fcec95647..61ab19b1f 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -28,6 +28,7 @@ struct vfsmount
char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
char *mnt_dirname; /* Name of directory mounted on */
struct list_head mnt_list;
+ uid_t mnt_owner;
};
static inline struct vfsmount *mntget(struct vfsmount *mnt)
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
index be5ea2afa..aa1ad6f0f 100644
--- a/include/linux/netfilter_ipv6.h
+++ b/include/linux/netfilter_ipv6.h
@@ -54,4 +54,14 @@
#define NF_IP6_NUMHOOKS 5
+enum nf_ip_hook_priorities {
+ NF_IP6_PRI_FIRST = INT_MIN,
+ NF_IP6_PRI_CONNTRACK = -200,
+ NF_IP6_PRI_MANGLE = -150,
+ NF_IP6_PRI_NAT_DST = -100,
+ NF_IP6_PRI_FILTER = 0,
+ NF_IP6_PRI_NAT_SRC = 100,
+ NF_IP6_PRI_LAST = INT_MAX,
+};
+
#endif /*__LINUX_IP6_NETFILTER_H*/
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h
new file mode 100644
index 000000000..f3617397c
--- /dev/null
+++ b/include/linux/netfilter_ipv6/ip6_tables.h
@@ -0,0 +1,452 @@
+/*
+ * 25-Jul-1998 Major changes to allow for ip chain table
+ *
+ * 3-Jan-2000 Named tables to allow packet selection for different uses.
+ */
+
+/*
+ * Format of an IP6 firewall descriptor
+ *
+ * src, dst, src_mask, dst_mask are always stored in network byte order.
+ * flags are stored in host byte order (of course).
+ * Port numbers are stored in HOST byte order.
+ */
+
+#ifndef _IP6_TABLES_H
+#define _IP6_TABLES_H
+
+#ifdef __KERNEL__
+#include <linux/if.h>
+#include <linux/types.h>
+#include <linux/in6.h>
+#include <linux/ipv6.h>
+#include <linux/skbuff.h>
+#endif
+#include <linux/netfilter_ipv6.h>
+
+#define IP6T_FUNCTION_MAXNAMELEN 30
+#define IP6T_TABLE_MAXNAMELEN 32
+
+/* Yes, Virginia, you have to zero the padding. */
+struct ip6t_ip6 {
+ /* Source and destination IP6 addr */
+ struct in6_addr src, dst;
+ /* Mask for src and dest IP6 addr */
+ struct in6_addr smsk, dmsk;
+ char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
+ unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
+
+ /* ARGH, HopByHop uses 0, so can't do 0 = ANY,
+ instead IP6T_F_NOPROTO must be set */
+ u_int16_t proto;
+ /* TOS to match iff flags & IP6T_F_TOS */
+ u_int8_t tos;
+
+ /* Flags word */
+ u_int8_t flags;
+ /* Inverse flags */
+ u_int8_t invflags;
+};
+
+/* FIXME: If alignment in kernel different from userspace? --RR */
+struct ip6t_entry_match
+{
+ union {
+ struct {
+ u_int16_t match_size;
+
+ /* Used by userspace */
+ char name[IP6T_FUNCTION_MAXNAMELEN];
+ } user;
+ struct {
+ u_int16_t match_size;
+
+ /* Used inside the kernel */
+ struct ip6t_match *match;
+ } kernel;
+
+ /* Total length */
+ u_int16_t match_size;
+ } u;
+
+ unsigned char data[0];
+};
+
+struct ip6t_entry_target
+{
+ union {
+ struct {
+ u_int16_t target_size;
+
+ /* Used by userspace */
+ char name[IP6T_FUNCTION_MAXNAMELEN];
+ } user;
+ struct {
+ u_int16_t target_size;
+
+ /* Used inside the kernel */
+ struct ip6t_target *target;
+ } kernel;
+
+ /* Total length */
+ u_int16_t target_size;
+ } u;
+
+ unsigned char data[0];
+};
+
+struct ip6t_standard_target
+{
+ struct ip6t_entry_target target;
+ int verdict;
+};
+
+struct ip6t_counters
+{
+ u_int64_t pcnt, bcnt; /* Packet and byte counters */
+};
+
+/* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */
+#define IP6T_F_PROTO 0x01 /* Set if rule cares about upper
+ protocols */
+#define IP6T_F_TOS 0x02 /* Match the TOS. */
+#define IP6T_F_MASK 0x03 /* All possible flag bits mask. */
+
+/* Values for "inv" field in struct ip6t_ip6. */
+#define IP6T_INV_VIA_IN 0x01 /* Invert the sense of IN IFACE. */
+#define IP6T_INV_VIA_OUT 0x02 /* Invert the sense of OUT IFACE */
+#define IP6T_INV_TOS 0x04 /* Invert the sense of TOS. */
+#define IP6T_INV_SRCIP 0x08 /* Invert the sense of SRC IP. */
+#define IP6T_INV_DSTIP 0x10 /* Invert the sense of DST OP. */
+#define IP6T_INV_FRAG 0x20 /* Invert the sense of FRAG. */
+#define IP6T_INV_PROTO 0x40 /* Invert the sense of PROTO. */
+#define IP6T_INV_MASK 0x7F /* All possible flag bits mask. */
+
+/* This structure defines each of the firewall rules. Consists of 3
+ parts which are 1) general IP header stuff 2) match specific
+ stuff 3) the target to perform if the rule matches */
+struct ip6t_entry
+{
+ struct ip6t_ip6 ipv6;
+
+ /* Mark with fields that we care about. */
+ unsigned int nfcache;
+
+ /* Size of ipt_entry + matches */
+ u_int16_t target_offset;
+ /* Size of ipt_entry + matches + target */
+ u_int16_t next_offset;
+
+ /* Back pointer */
+ unsigned int comefrom;
+
+ /* Packet and byte counters. */
+ struct ip6t_counters counters;
+
+ /* The matches (if any), then the target. */
+ unsigned char elems[0];
+};
+
+/*
+ * New IP firewall options for [gs]etsockopt at the RAW IP level.
+ * Unlike BSD Linux inherits IP options so you don't have to use
+ * a raw socket for this. Instead we check rights in the calls. */
+#define IP6T_BASE_CTL 64 /* base for firewall socket options */
+
+#define IP6T_SO_SET_REPLACE (IP6T_BASE_CTL)
+#define IP6T_SO_SET_ADD_COUNTERS (IP6T_BASE_CTL + 1)
+#define IP6T_SO_SET_MAX IP6T_SO_SET_ADD_COUNTERS
+
+#define IP6T_SO_GET_INFO (IP6T_BASE_CTL)
+#define IP6T_SO_GET_ENTRIES (IP6T_BASE_CTL + 1)
+#define IP6T_SO_GET_MAX IP6T_SO_GET_ENTRIES
+
+/* CONTINUE verdict for targets */
+#define IP6T_CONTINUE 0xFFFFFFFF
+
+/* For standard target */
+#define IP6T_RETURN (-NF_MAX_VERDICT - 1)
+
+/* TCP matching stuff */
+struct ip6t_tcp
+{
+ u_int16_t spts[2]; /* Source port range. */
+ u_int16_t dpts[2]; /* Destination port range. */
+ u_int8_t option; /* TCP Option iff non-zero*/
+ u_int8_t flg_mask; /* TCP flags mask byte */
+ u_int8_t flg_cmp; /* TCP flags compare byte */
+ u_int8_t invflags; /* Inverse flags */
+};
+
+/* Values for "inv" field in struct ipt_tcp. */
+#define IP6T_TCP_INV_SRCPT 0x01 /* Invert the sense of source ports. */
+#define IP6T_TCP_INV_DSTPT 0x02 /* Invert the sense of dest ports. */
+#define IP6T_TCP_INV_FLAGS 0x04 /* Invert the sense of TCP flags. */
+#define IP6T_TCP_INV_OPTION 0x08 /* Invert the sense of option test. */
+#define IP6T_TCP_INV_MASK 0x0F /* All possible flags. */
+
+/* UDP matching stuff */
+struct ip6t_udp
+{
+ u_int16_t spts[2]; /* Source port range. */
+ u_int16_t dpts[2]; /* Destination port range. */
+ u_int8_t invflags; /* Inverse flags */
+};
+
+/* Values for "invflags" field in struct ipt_udp. */
+#define IP6T_UDP_INV_SRCPT 0x01 /* Invert the sense of source ports. */
+#define IP6T_UDP_INV_DSTPT 0x02 /* Invert the sense of dest ports. */
+#define IP6T_UDP_INV_MASK 0x03 /* All possible flags. */
+
+/* ICMP matching stuff */
+struct ip6t_icmp
+{
+ u_int8_t type; /* type to match */
+ u_int8_t code[2]; /* range of code */
+ u_int8_t invflags; /* Inverse flags */
+};
+
+/* Values for "inv" field for struct ipt_icmp. */
+#define IP6T_ICMP_INV 0x01 /* Invert the sense of type/code test */
+
+/* The argument to IP6T_SO_GET_INFO */
+struct ip6t_getinfo
+{
+ /* Which table: caller fills this in. */
+ char name[IP6T_TABLE_MAXNAMELEN];
+
+ /* Kernel fills these in. */
+ /* Which hook entry points are valid: bitmask */
+ unsigned int valid_hooks;
+
+ /* Hook entry points: one per netfilter hook. */
+ unsigned int hook_entry[NF_IP6_NUMHOOKS];
+
+ /* Underflow points. */
+ unsigned int underflow[NF_IP6_NUMHOOKS];
+
+ /* Number of entries */
+ unsigned int num_entries;
+
+ /* Size of entries. */
+ unsigned int size;
+};
+
+/* The argument to IP6T_SO_SET_REPLACE. */
+struct ip6t_replace
+{
+ /* Which table. */
+ char name[IP6T_TABLE_MAXNAMELEN];
+
+ /* Which hook entry points are valid: bitmask. You can't
+ change this. */
+ unsigned int valid_hooks;
+
+ /* Number of entries */
+ unsigned int num_entries;
+
+ /* Total size of new entries */
+ unsigned int size;
+
+ /* Hook entry points. */
+ unsigned int hook_entry[NF_IP6_NUMHOOKS];
+
+ /* Underflow points. */
+ unsigned int underflow[NF_IP6_NUMHOOKS];
+
+ /* Information about old entries: */
+ /* Number of counters (must be equal to current number of entries). */
+ unsigned int num_counters;
+ /* The old entries' counters. */
+ struct ip6t_counters *counters;
+
+ /* The entries (hang off end: not really an array). */
+ struct ip6t_entry entries[0];
+};
+
+/* The argument to IP6T_SO_ADD_COUNTERS. */
+struct ip6t_counters_info
+{
+ /* Which table. */
+ char name[IP6T_TABLE_MAXNAMELEN];
+
+ unsigned int num_counters;
+
+ /* The counters (actually `number' of these). */
+ struct ip6t_counters counters[0];
+};
+
+/* The argument to IP6T_SO_GET_ENTRIES. */
+struct ip6t_get_entries
+{
+ /* Which table: user fills this in. */
+ char name[IP6T_TABLE_MAXNAMELEN];
+
+ /* User fills this in: total entry size. */
+ unsigned int size;
+
+ /* The entries. */
+ unsigned char entries[0];
+};
+
+/* Standard return verdict, or do jump. */
+#define IP6T_STANDARD_TARGET ""
+/* Error verdict. */
+#define IP6T_ERROR_TARGET "ERROR"
+
+/* Helper functions */
+extern __inline__ struct ip6t_entry_target *
+ip6t_get_target(struct ip6t_entry *e)
+{
+ return (void *)e + e->target_offset;
+}
+
+/* fn returns 0 to continue iteration */
+#define IP6T_MATCH_ITERATE(e, fn, args...) \
+({ \
+ unsigned int __i; \
+ int __ret = 0; \
+ struct ip6t_entry_match *__m; \
+ \
+ for (__i = sizeof(struct ip6t_entry); \
+ __i < (e)->target_offset; \
+ __i += __m->u.match_size) { \
+ __m = (void *)(e) + __i; \
+ \
+ __ret = fn(__m , ## args); \
+ if (__ret != 0) \
+ break; \
+ } \
+ __ret; \
+})
+
+/* fn returns 0 to continue iteration */
+#define IP6T_ENTRY_ITERATE(entries, size, fn, args...) \
+({ \
+ unsigned int __i; \
+ int __ret = 0; \
+ struct ip6t_entry *__e; \
+ \
+ for (__i = 0; __i < (size); __i += __e->next_offset) { \
+ __e = (void *)(entries) + __i; \
+ \
+ __ret = fn(__e , ## args); \
+ if (__ret != 0) \
+ break; \
+ } \
+ __ret; \
+})
+
+/*
+ * Main firewall chains definitions and global var's definitions.
+ */
+
+#ifdef __KERNEL__
+
+#include <linux/init.h>
+extern void ip6t_init(void) __init;
+
+struct ip6t_match
+{
+ struct list_head list;
+
+ const char name[IP6T_FUNCTION_MAXNAMELEN];
+
+ /* Return true or false: return FALSE and set *hotdrop = 1 to
+ force immediate packet drop. */
+ int (*match)(const struct sk_buff *skb,
+ const struct net_device *in,
+ const struct net_device *out,
+ const void *matchinfo,
+ int offset,
+ const void *hdr,
+ u_int16_t datalen,
+ int *hotdrop);
+
+ /* Called when user tries to insert an entry of this type. */
+ /* Should return true or false. */
+ int (*checkentry)(const char *tablename,
+ const struct ip6t_ip6 *ip,
+ void *matchinfo,
+ unsigned int matchinfosize,
+ unsigned int hook_mask);
+
+ /* Called when entry of this type deleted. */
+ void (*destroy)(void *matchinfo, unsigned int matchinfosize);
+
+ /* Set this to THIS_MODULE if you are a module, otherwise NULL */
+ struct module *me;
+};
+
+/* Registration hooks for targets. */
+struct ip6t_target
+{
+ struct list_head list;
+
+ const char name[IP6T_FUNCTION_MAXNAMELEN];
+
+ /* Returns verdict. */
+ unsigned int (*target)(struct sk_buff **pskb,
+ unsigned int hooknum,
+ const struct net_device *in,
+ const struct net_device *out,
+ const void *targinfo,
+ void *userdata);
+
+ /* Called when user tries to insert an entry of this type:
+ hook_mask is a bitmask of hooks from which it can be
+ called. */
+ /* Should return true or false. */
+ int (*checkentry)(const char *tablename,
+ const struct ip6t_entry *e,
+ void *targinfo,
+ unsigned int targinfosize,
+ unsigned int hook_mask);
+
+ /* Called when entry of this type deleted. */
+ void (*destroy)(void *targinfo, unsigned int targinfosize);
+
+ /* Set this to THIS_MODULE if you are a module, otherwise NULL */
+ struct module *me;
+};
+
+extern int ip6t_register_target(struct ip6t_target *target);
+extern void ip6t_unregister_target(struct ip6t_target *target);
+
+extern int ip6t_register_match(struct ip6t_match *match);
+extern void ip6t_unregister_match(struct ip6t_match *match);
+
+/* Furniture shopping... */
+struct ip6t_table
+{
+ struct list_head list;
+
+ /* A unique name... */
+ char name[IP6T_TABLE_MAXNAMELEN];
+
+ /* Seed table: copied in register_table */
+ struct ip6t_replace *table;
+
+ /* What hooks you will enter on */
+ unsigned int valid_hooks;
+
+ /* Lock for the curtain */
+ rwlock_t lock;
+
+ /* Man behind the curtain... */
+ struct ip6t_table_info *private;
+};
+
+extern int ip6t_register_table(struct ip6t_table *table);
+extern void ip6t_unregister_table(struct ip6t_table *table);
+extern unsigned int ip6t_do_table(struct sk_buff **pskb,
+ unsigned int hook,
+ const struct net_device *in,
+ const struct net_device *out,
+ struct ip6t_table *table,
+ void *userdata);
+
+#define IP6T_ALIGN(s) (((s) + (__alignof__(struct ip6t_entry)-1)) & ~(__alignof__(struct ip6t_entry)-1))
+
+#endif /*__KERNEL__*/
+#endif /* _IP6_TABLES_H */
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 0c84b76c4..ddd0563a5 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -15,6 +15,7 @@
#include <linux/pagemap.h>
#include <linux/sunrpc/debug.h>
+#include <linux/sunrpc/auth.h>
#include <linux/nfs.h>
#include <linux/nfs2.h>
@@ -98,7 +99,6 @@ do { \
/* Inode Flags */
#define NFS_USE_READDIRPLUS(inode) ((NFS_FLAGS(inode) & NFS_INO_ADVISE_RDPLUS) ? 1 : 0)
-#define NFS_MONOTONE_COOKIES(inode) ((NFS_SERVER(inode)->flags & NFS_NONMONOTONE_COOKIES) ? 0 : 1)
/*
* These are the default flags for swap requests
@@ -155,6 +155,17 @@ extern struct inode_operations nfs_file_inode_operations;
extern struct file_operations nfs_file_operations;
extern struct address_space_operations nfs_file_aops;
+static __inline__ struct rpc_cred *
+nfs_file_cred(struct file *file)
+{
+ struct rpc_cred *cred = (struct rpc_cred *)(file->private_data);
+#ifdef RPC_DEBUG
+ if (cred && cred->cr_magic != RPCAUTH_CRED_MAGIC)
+ BUG();
+#endif
+ return cred;
+}
+
/*
* linux/fs/nfs/dir.c
*/
diff --git a/include/linux/nfs_mount.h b/include/linux/nfs_mount.h
index 8e11ef368..7b7df5b06 100644
--- a/include/linux/nfs_mount.h
+++ b/include/linux/nfs_mount.h
@@ -54,11 +54,4 @@ struct nfs_mount_data {
#define NFS_MOUNT_NONLM 0x0200 /* 3 */
#define NFS_MOUNT_FLAGMASK 0xFFFF
-/*
- * Private flags - not to be set by mount program
- */
-#ifdef __KERNEL__
-#define NFS_NONMONOTONE_COOKIES 0x00010000
-#endif /* __KERNEL__ */
-
#endif
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index 475fced7c..5f6572b22 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -40,7 +40,7 @@ struct nfs_page {
#define NFS_WBACK_BUSY(req) ((req)->wb_flags & PG_BUSY)
-extern struct nfs_page *nfs_create_request(struct dentry *dentry,
+extern struct nfs_page *nfs_create_request(struct file *file,
struct page *page,
unsigned int offset,
unsigned int count);
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index eca3e1b2d..63c3e1c7b 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -106,7 +106,6 @@ struct nfs_writeres {
* Argument struct for decode_entry function
*/
struct nfs_entry {
- struct page * page;
__u64 ino;
__u64 cookie,
prev_cookie;
@@ -115,8 +114,6 @@ struct nfs_entry {
int eof;
struct nfs_fh fh;
struct nfs_fattr fattr;
- unsigned long offset,
- prev;
};
/*
@@ -326,10 +323,10 @@ struct nfs_rpc_ops {
struct nfs_fh *, struct nfs_fattr *);
int (*access) (struct dentry *, int , int);
int (*readlink)(struct dentry *, void *, unsigned int);
- int (*read) (struct dentry *, struct nfs_fattr *,
+ int (*read) (struct file *, struct nfs_fattr *,
int, loff_t, unsigned int,
void *buffer, int *eofp);
- int (*write) (struct dentry *, struct nfs_fattr *,
+ int (*write) (struct file *, struct nfs_fattr *,
int, loff_t, unsigned int,
void *buffer, struct nfs_writeverf *verfp);
int (*commit) (struct dentry *, struct nfs_fattr *,
@@ -346,7 +343,7 @@ struct nfs_rpc_ops {
int (*mkdir) (struct dentry *, struct qstr *, struct iattr *,
struct nfs_fh *, struct nfs_fattr *);
int (*rmdir) (struct dentry *, struct qstr *);
- int (*readdir) (struct dentry *, u64 cookie, void *, unsigned int,
+ int (*readdir) (struct file *, u64 cookie, void *, unsigned int,
int);
int (*mknod) (struct dentry *, struct qstr *, struct iattr *,
dev_t, struct nfs_fh *, struct nfs_fattr *);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index bfdf6c03a..499afe2d6 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -790,9 +790,12 @@
#define PCI_DEVICE_ID_RENDITION_VERITE 0x0001
#define PCI_DEVICE_ID_RENDITION_VERITE2100 0x2000
-#define PCI_VENDOR_ID_RCC 0x1166
-#define PCI_DEVICE_ID_RCC_HE 0x0008
-#define PCI_DEVICE_ID_RCC_LE 0x0009
+#define PCI_VENDOR_ID_SERVERWORKS 0x1166
+#define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008
+#define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009
+#define PCI_DEVICE_ID_SERVERWORKS_CIOB30 0x0010
+#define PCI_DEVICE_ID_SERVERWORKS_CMIC_HE 0x0011
+#define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201
#define PCI_VENDOR_ID_TOSHIBA 0x1179
#define PCI_DEVICE_ID_TOSHIBA_601 0x0601
@@ -1176,7 +1179,15 @@
#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_82440MX_1 0x7194
+#define PCI_DEVICE_ID_INTEL_82443MX_0 0x7198
+#define PCI_DEVICE_ID_INTEL_82443MX_1 0x7199
+#define PCI_DEVICE_ID_INTEL_82443MX_2 0x719a
+#define PCI_DEVICE_ID_INTEL_82443MX_3 0x719b
+#define PCI_DEVICE_ID_INTEL_82372FB_0 0x7600
#define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601
+#define PCI_DEVICE_ID_INTEL_82372FB_2 0x7602
+#define PCI_DEVICE_ID_INTEL_82372FB_3 0x7603
#define PCI_DEVICE_ID_INTEL_82454GX 0x84c4
#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5
#define PCI_DEVICE_ID_INTEL_82451NX 0x84ca
@@ -1254,4 +1265,7 @@
#define PCI_DEVICE_ID_ARK_STINGARK 0xa099
#define PCI_DEVICE_ID_ARK_2000MT 0xa0a1
-
+#define PCI_VENDOR_ID_SIS 0x1039
+#define PCI_DEVICE_ID_SIS_300 0x0300
+#define PCI_DEVICE_ID_SIS_540 0x5300
+#define PCI_DEVICE_ID_SIS_630 0x6300
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index b7621b293..d0487c3df 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -90,8 +90,6 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry);
void proc_pid_delete_inode(struct inode *inode);
int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
-extern int proc_register(struct proc_dir_entry *, struct proc_dir_entry *);
-
extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
struct proc_dir_entry *parent);
extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
@@ -167,7 +165,6 @@ extern inline void proc_net_remove(const char *name)
#else
-extern inline int proc_register(struct proc_dir_entry *a, struct proc_dir_entry *b) { return 0; }
extern inline struct proc_dir_entry *proc_net_create(const char *name, mode_t mode,
get_info_t *get_info) {return NULL;}
extern inline void proc_net_remove(const char *name) {}
diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h
index 5df1ef295..9eb6c28bd 100644
--- a/include/linux/smb_fs.h
+++ b/include/linux/smb_fs.h
@@ -130,7 +130,6 @@ int smb_get_wsize(struct smb_sb_info *);
int smb_newconn(struct smb_sb_info *, struct smb_conn_opt *);
int smb_errno(struct smb_sb_info *);
int smb_close(struct inode *);
-void smb_close_dentry(struct dentry *);
int smb_close_fileid(struct dentry *, __u16);
int smb_open(struct dentry *, int);
int smb_proc_read(struct dentry *, off_t, int, char *);
diff --git a/include/linux/smb_fs_i.h b/include/linux/smb_fs_i.h
index 4aea02c3c..8dca9066b 100644
--- a/include/linux/smb_fs_i.h
+++ b/include/linux/smb_fs_i.h
@@ -29,6 +29,7 @@ struct smb_inode_info {
__u16 cache_valid; /* dircache valid? */
unsigned long oldmtime; /* last time refreshed */
unsigned long closed; /* timestamp when closed */
+ unsigned openers; /* number of fileid users */
};
#endif
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index d106c881a..242be9730 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -25,6 +25,9 @@ struct rpc_cred {
unsigned long cr_expire; /* when to gc */
unsigned short cr_count; /* ref count */
unsigned short cr_flags; /* various flags */
+#ifdef RPC_DEBUG
+ unsigned long cr_magic; /* 0x0f4aa4f0 */
+#endif
uid_t cr_uid;
@@ -34,6 +37,8 @@ struct rpc_cred {
#define RPCAUTH_CRED_UPTODATE 0x0002
#define RPCAUTH_CRED_DEAD 0x0004
+#define RPCAUTH_CRED_MAGIC 0x0f4aa4f0
+
/*
* Client authentication handle
*/
diff --git a/include/linux/umsdos_fs.p b/include/linux/umsdos_fs.p
index de436f0e8..76436a479 100644
--- a/include/linux/umsdos_fs.p
+++ b/include/linux/umsdos_fs.p
@@ -108,11 +108,3 @@ int UMSDOS_rename (struct inode *old_dir,
/* rdir.c 22/03/95 03.31.42 */
struct dentry *umsdos_rlookup_x (struct inode *dir, struct dentry *dentry, int nopseudo);
struct dentry *UMSDOS_rlookup (struct inode *dir, struct dentry *dentry);
-
-/* symlink.c 23/01/95 03.38.30 */
-
-/* check.c */
-void checkd_inode (struct inode *inode);
-void check_inode (struct inode *inode);
-void check_dentry (struct dentry *dentry);
-void check_dentry_path (struct dentry *dentry, const char *desc);
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h
index 95eaa937a..7fa98fcb5 100644
--- a/include/linux/usbdevice_fs.h
+++ b/include/linux/usbdevice_fs.h
@@ -31,6 +31,8 @@
#ifndef _LINUX_USBDEVICE_FS_H
#define _LINUX_USBDEVICE_FS_H
+#include <linux/types.h>
+
/* --------------------------------------------------------------------- */
#define USBDEVICE_SUPER_MAGIC 0x9fa2
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index d360d41bc..bba1e159e 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -3,6 +3,7 @@
#include <linux/sched.h>
#include <linux/mm.h>
+#include <linux/spinlock.h>
#include <asm/pgtable.h>
@@ -17,16 +18,49 @@ struct vm_struct {
struct vm_struct * next;
};
-struct vm_struct * get_vm_area(unsigned long size, unsigned long flags);
-void vfree(void * addr);
-void * vmalloc_prot(unsigned long size, pgprot_t prot);
-void * vmalloc_uncached(unsigned long size);
-extern void * vmalloc(unsigned long size);
+extern struct vm_struct * get_vm_area (unsigned long size, unsigned long flags);
+extern void vfree(void * addr);
+extern void * __vmalloc (unsigned long size, int gfp_mask, pgprot_t prot);
+extern long vread(char *buf, char *addr, unsigned long count);
+extern void vmfree_area_pages(unsigned long address, unsigned long size);
+extern int vmalloc_area_pages(unsigned long address, unsigned long size,
+ int gfp_mask, pgprot_t prot);
+extern struct vm_struct * vmlist;
+
+
+/*
+ * Allocate any pages
+ */
+
+static inline void * vmalloc (unsigned long size)
+{
+ return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
+}
+
+/*
+ * Allocate ISA addressable pages for broke crap
+ */
+
+static inline void * vmalloc_dma (unsigned long size)
+{
+ return __vmalloc(size, GFP_KERNEL|GFP_DMA, PAGE_KERNEL);
+}
+
+/*
+ * vmalloc 32bit PA addressable pages - eg for PCI 32bit devices
+ */
+
+static inline void * vmalloc_32(unsigned long size)
+{
+ return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL);
+}
-long vread(char *buf, char *addr, unsigned long count);
-void vmfree_area_pages(unsigned long address, unsigned long size);
-int vmalloc_area_pages(unsigned long address, unsigned long size, pgprot_t prot);
+/*
+ * vmlist_lock is a read-write spinlock that protects vmlist
+ * Used in mm/vmalloc.c (get_vm_area() and vfree()) and fs/proc/kcore.c.
+ */
+extern rwlock_t vmlist_lock;
extern struct vm_struct * vmlist;
#endif
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 6d8f5dae6..6ac1f0e88 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -27,7 +27,7 @@
extern int printk(const char *fmt, ...);
#define WQ_BUG() do { \
printk("wq bug, forcing oops.\n"); \
- *(int*)0 = 0; \
+ BUG(); \
} while (0)
#define CHECK_MAGIC(x) if (x != (long)&(x)) \
diff --git a/include/linux/wrapper.h b/include/linux/wrapper.h
index bc719bfc5..bcfaff073 100644
--- a/include/linux/wrapper.h
+++ b/include/linux/wrapper.h
@@ -5,7 +5,6 @@
#define inode_handle struct inode
#define select_table_handle select_table
#define vm_area_handle struct vm_area_struct
-#define file_operation_handle file_operations
#define connect_wrapper(x) 0
#define current_got_fatal_signal() (signal_pending(current))
diff --git a/include/net/slhc.h b/include/net/slhc.h
deleted file mode 100644
index c7b39db55..000000000
--- a/include/net/slhc.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __NET_SLHC_H
-#define __NET_SLHC_H
-
-extern void slhc_install(void);
-
-#endif