summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/div64.h14
-rw-r--r--include/asm-alpha/processor.h10
-rw-r--r--include/asm-alpha/shmparam.h43
-rw-r--r--include/asm-alpha/termios.h1
-rw-r--r--include/asm-arm/arch-arc/memory.h1
-rw-r--r--include/asm-arm/arch-ebsa110/memory.h1
-rw-r--r--include/asm-arm/arch-ebsa285/memory.h2
-rw-r--r--include/asm-arm/arch-nexuspci/memory.h5
-rw-r--r--include/asm-arm/arch-rpc/memory.h5
-rw-r--r--include/asm-arm/arch-rpc/system.h4
-rw-r--r--include/asm-arm/arch-sa1100/memory.h5
-rw-r--r--include/asm-arm/io.h17
-rw-r--r--include/asm-arm/page.h18
-rw-r--r--include/asm-arm/pgtable.h287
-rw-r--r--include/asm-arm/proc-armo/cache.h8
-rw-r--r--include/asm-arm/proc-armo/pgtable.h259
-rw-r--r--include/asm-arm/proc-armo/shmparam.h4
-rw-r--r--include/asm-arm/proc-armv/cache.h7
-rw-r--r--include/asm-arm/proc-armv/pgtable.h285
-rw-r--r--include/asm-arm/proc-armv/shmparam.h4
-rw-r--r--include/asm-arm/processor.h10
-rw-r--r--include/asm-arm/setup.h18
-rw-r--r--include/asm-arm/shmparam.h35
-rw-r--r--include/asm-arm/termios.h1
-rw-r--r--include/asm-i386/div64.h17
-rw-r--r--include/asm-i386/highmem.h96
-rw-r--r--include/asm-i386/io.h7
-rw-r--r--include/asm-i386/kmap_types.h6
-rw-r--r--include/asm-i386/mmx.h4
-rw-r--r--include/asm-i386/page.h3
-rw-r--r--include/asm-i386/pgtable-2level.h2
-rw-r--r--include/asm-i386/pgtable-3level.h7
-rw-r--r--include/asm-i386/pgtable.h9
-rw-r--r--include/asm-i386/processor.h4
-rw-r--r--include/asm-i386/shmparam.h42
-rw-r--r--include/asm-i386/string.h1
-rw-r--r--include/asm-i386/unistd.h3
-rw-r--r--include/asm-m68k/processor.h11
-rw-r--r--include/asm-m68k/shmparam.h45
-rw-r--r--include/asm-m68k/termios.h1
-rw-r--r--include/asm-mips/div64.h20
-rw-r--r--include/asm-mips/dma.h6
-rw-r--r--include/asm-mips/highmem.h11
-rw-r--r--include/asm-mips/io.h5
-rw-r--r--include/asm-mips/offset.h2
-rw-r--r--include/asm-mips/pgtable.h23
-rw-r--r--include/asm-mips/processor.h9
-rw-r--r--include/asm-mips/shmparam.h51
-rw-r--r--include/asm-mips/unistd.h5
-rw-r--r--include/asm-mips64/div64.h20
-rw-r--r--include/asm-mips64/dma.h6
-rw-r--r--include/asm-mips64/highmem.h11
-rw-r--r--include/asm-mips64/io.h18
-rw-r--r--include/asm-mips64/offset.h2
-rw-r--r--include/asm-mips64/pgtable.h21
-rw-r--r--include/asm-mips64/processor.h9
-rw-r--r--include/asm-mips64/shmparam.h48
-rw-r--r--include/asm-mips64/unistd.h8
-rw-r--r--include/asm-ppc/amigaints.h136
-rw-r--r--include/asm-ppc/div64.h10
-rw-r--r--include/asm-ppc/fcntl.h30
-rw-r--r--include/asm-ppc/pgtable.h9
-rw-r--r--include/asm-ppc/processor.h10
-rw-r--r--include/asm-ppc/shmparam.h40
-rw-r--r--include/asm-ppc/system.h2
-rw-r--r--include/asm-ppc/termios.h1
-rw-r--r--include/asm-sh/bitops.h19
-rw-r--r--include/asm-sh/io.h36
-rw-r--r--include/asm-sh/ioctls.h12
-rw-r--r--include/asm-sh/irq.h8
-rw-r--r--include/asm-sh/mmu_context.h44
-rw-r--r--include/asm-sh/page.h11
-rw-r--r--include/asm-sh/pgtable-2level.h4
-rw-r--r--include/asm-sh/pgtable.h23
-rw-r--r--include/asm-sh/processor.h11
-rw-r--r--include/asm-sh/resource.h20
-rw-r--r--include/asm-sh/shmparam.h42
-rw-r--r--include/asm-sh/spinlock.h47
-rw-r--r--include/asm-sh/string.h20
-rw-r--r--include/asm-sh/termios.h1
-rw-r--r--include/asm-sh/uaccess.h22
-rw-r--r--include/asm-sparc/processor.h5
-rw-r--r--include/asm-sparc/shmparam.h40
-rw-r--r--include/asm-sparc/termios.h1
-rw-r--r--include/asm-sparc64/processor.h5
-rw-r--r--include/asm-sparc64/shmparam.h40
-rw-r--r--include/asm-sparc64/termios.h1
-rw-r--r--include/linux/acpi.h184
-rw-r--r--include/linux/apm_bios.h107
-rw-r--r--include/linux/bfs_fs.h91
-rw-r--r--include/linux/bfs_fs_i.h18
-rw-r--r--include/linux/bfs_fs_sb.h33
-rw-r--r--include/linux/blkdev.h11
-rw-r--r--include/linux/bootmem.h1
-rw-r--r--include/linux/cdrom.h34
-rw-r--r--include/linux/concap.h1
-rw-r--r--include/linux/cycx_drv.h14
-rw-r--r--include/linux/fb.h1
-rw-r--r--include/linux/fs.h23
-rw-r--r--include/linux/highmem.h30
-rw-r--r--include/linux/i2o.h87
-rw-r--r--include/linux/ide.h9
-rw-r--r--include/linux/if_arp.h2
-rw-r--r--include/linux/init.h4
-rw-r--r--include/linux/ipc.h4
-rw-r--r--include/linux/isdn.h102
-rw-r--r--include/linux/isdn_compat.h116
-rw-r--r--include/linux/isdn_ppp.h5
-rw-r--r--include/linux/isdnif.h11
-rw-r--r--include/linux/joystick.h2
-rw-r--r--include/linux/kernelcapi.h28
-rw-r--r--include/linux/major.h4
-rw-r--r--include/linux/mm.h44
-rw-r--r--include/linux/module.h1
-rw-r--r--include/linux/msdos_fs_sb.h1
-rw-r--r--include/linux/msg.h6
-rw-r--r--include/linux/nbd.h15
-rw-r--r--include/linux/ncp_fs.h16
-rw-r--r--include/linux/nvram.h1
-rw-r--r--include/linux/pagemap.h44
-rw-r--r--include/linux/parport.h4
-rw-r--r--include/linux/pci.h8
-rw-r--r--include/linux/pci_ids.h5
-rw-r--r--include/linux/proc_fs.h428
-rw-r--r--include/linux/proc_fs_i.h9
-rw-r--r--include/linux/sched.h18
-rw-r--r--include/linux/sem.h15
-rw-r--r--include/linux/serial.h14
-rw-r--r--include/linux/serialP.h12
-rw-r--r--include/linux/shm.h28
-rw-r--r--include/linux/swap.h35
-rw-r--r--include/linux/sysctl.h6
-rw-r--r--include/linux/udf_167.h8
-rw-r--r--include/linux/udf_fs.h4
-rw-r--r--include/linux/videodev.h74
-rw-r--r--include/linux/vmalloc.h1
-rw-r--r--include/linux/wrapper.h2
-rw-r--r--include/net/irda/ircomm_tty.h4
-rw-r--r--include/net/irda/irda.h6
-rw-r--r--include/net/irda/iriap.h18
-rw-r--r--include/net/irda/iriap_event.h31
-rw-r--r--include/net/irda/irlan_common.h4
-rw-r--r--include/net/irda/irmod.h10
-rw-r--r--include/net/irda/irport.h7
-rw-r--r--include/net/irda/smc-ircc.h22
-rw-r--r--include/net/irda/uircc.h125
-rw-r--r--include/net/irda/wrapper.h8
-rw-r--r--include/pcmcia/bulkmem.h4
-rw-r--r--include/pcmcia/bus_ops.h4
-rw-r--r--include/pcmcia/ciscode.h4
-rw-r--r--include/pcmcia/cisreg.h4
-rw-r--r--include/pcmcia/cistpl.h4
-rw-r--r--include/pcmcia/cs.h4
-rw-r--r--include/pcmcia/cs_types.h4
-rw-r--r--include/pcmcia/driver_ops.h4
-rw-r--r--include/pcmcia/ds.h4
-rw-r--r--include/pcmcia/ftl.h4
-rw-r--r--include/pcmcia/mem_op.h4
-rw-r--r--include/pcmcia/memory.h4
-rw-r--r--include/pcmcia/ss.h4
-rw-r--r--include/pcmcia/version.h6
161 files changed, 2056 insertions, 2185 deletions
diff --git a/include/asm-alpha/div64.h b/include/asm-alpha/div64.h
new file mode 100644
index 000000000..6260adb75
--- /dev/null
+++ b/include/asm-alpha/div64.h
@@ -0,0 +1,14 @@
+#ifndef __ALPHA_DIV64
+#define __ALPHA_DIV64
+
+/*
+ * Hey, we're already 64-bit, no
+ * need to play games..
+ */
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) n) % (unsigned) base; \
+ n = ((unsigned long) n) / (unsigned) base; \
+ __res; })
+
+#endif
diff --git a/include/asm-alpha/processor.h b/include/asm-alpha/processor.h
index 92654cd83..9f55ea0c3 100644
--- a/include/asm-alpha/processor.h
+++ b/include/asm-alpha/processor.h
@@ -126,6 +126,16 @@ extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
#define release_segments(mm) do { } while (0)
#define forget_segments() do { } while (0)
+unsigned long get_wchan(struct task_struct *p);
+/*
+* See arch/alpha/kernel/ptrace.c for details.
+*/
+#define PT_REG(reg) (PAGE_SIZE - sizeof(struct pt_regs) \
+ + (long)&((struct pt_regs *)0)->reg)
+#define KSTK_EIP(tsk) \
+ (*(unsigned long *)(PT_REG(pc) + PAGE_SIZE + (unsigned long)(tsk)))
+#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
+
/* NOTE: The task struct and the stack go together! */
#define alloc_task_struct() \
((struct task_struct *) __get_free_pages(GFP_KERNEL,1))
diff --git a/include/asm-alpha/shmparam.h b/include/asm-alpha/shmparam.h
index a9ce7164b..cc901d58a 100644
--- a/include/asm-alpha/shmparam.h
+++ b/include/asm-alpha/shmparam.h
@@ -1,47 +1,6 @@
#ifndef _ASMAXP_SHMPARAM_H
#define _ASMAXP_SHMPARAM_H
-/*
- * Address range for shared memory attaches if no address passed to shmat().
- */
-#define SHM_RANGE_START 0x14000000000
-#define SHM_RANGE_END 0x15000000000
-
-
-/*
- * Format of a swap-entry for shared memory pages currently out in
- * swap space (see also mm/swap.c).
- *
- * SWP_TYPE = SHM_SWP_TYPE
- * SWP_OFFSET is used as follows:
- *
- * bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
- * bits 7..21: index of page within shared memory segment (SHM_IDX)
- * (actually fewer bits get used since SHMMAX is so low)
- */
-
-/*
- * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
- * there is a static array of size SHMMNI.
- */
-#define _SHM_ID_BITS 7
-#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
-
-#define SHM_IDX_SHIFT (_SHM_ID_BITS)
-#define _SHM_IDX_BITS 15
-#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
-
-/*
- * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the Alpha and
- * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
- */
-
-#define SHMMAX 0x3fa000 /* max shared seg size (bytes) */
-#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
-#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */
-#define SHMALL /* max shm system wide (pages) */ \
- (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
-#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
-#define SHMSEG SHMMNI /* max shared segs per process */
+#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
#endif /* _ASMAXP_SHMPARAM_H */
diff --git a/include/asm-alpha/termios.h b/include/asm-alpha/termios.h
index 35e14b49b..2c8b5288a 100644
--- a/include/asm-alpha/termios.h
+++ b/include/asm-alpha/termios.h
@@ -80,6 +80,7 @@ struct termio {
#define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */
#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
#define N_HDLC 13 /* synchronous HDLC */
+#define N_SYNC_PPP 14
#ifdef __KERNEL__
/* eof=^D eol=\0 eol2=\0 erase=del
diff --git a/include/asm-arm/arch-arc/memory.h b/include/asm-arm/arch-arc/memory.h
index 4cc800cea..903e48d72 100644
--- a/include/asm-arm/arch-arc/memory.h
+++ b/include/asm-arm/arch-arc/memory.h
@@ -21,6 +21,7 @@
* Page offset: 32MB
*/
#define PAGE_OFFSET (0x02000000UL)
+#define PHYS_OFFSET (0x02000000UL)
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) vpage
diff --git a/include/asm-arm/arch-ebsa110/memory.h b/include/asm-arm/arch-ebsa110/memory.h
index 81bbb720f..36f899faa 100644
--- a/include/asm-arm/arch-ebsa110/memory.h
+++ b/include/asm-arm/arch-ebsa110/memory.h
@@ -22,6 +22,7 @@
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
+#define PHYS_OFFSET (0x00000000UL)
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
diff --git a/include/asm-arm/arch-ebsa285/memory.h b/include/asm-arm/arch-ebsa285/memory.h
index 25e720489..14ba9d4fd 100644
--- a/include/asm-arm/arch-ebsa285/memory.h
+++ b/include/asm-arm/arch-ebsa285/memory.h
@@ -29,6 +29,7 @@
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
+#define PHYS_OFFSET (0x00000000UL)
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) ((x) - 0xe0000000)
@@ -49,6 +50,7 @@
* Page offset: 1.5GB
*/
#define PAGE_OFFSET (0x60000000UL)
+#define PHYS_OFFSET (0x00000000UL)
#else
diff --git a/include/asm-arm/arch-nexuspci/memory.h b/include/asm-arm/arch-nexuspci/memory.h
index 7b89119aa..3018e8c40 100644
--- a/include/asm-arm/arch-nexuspci/memory.h
+++ b/include/asm-arm/arch-nexuspci/memory.h
@@ -18,12 +18,13 @@
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
+#define PHYS_OFFSET (0x40000000UL)
/*
* On NexusPCI, the DRAM is contiguous
*/
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + 0x40000000)
-#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - 0x40000000)
+#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
+#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
diff --git a/include/asm-arm/arch-rpc/memory.h b/include/asm-arm/arch-rpc/memory.h
index d5a6a4f9f..e5f59abdb 100644
--- a/include/asm-arm/arch-rpc/memory.h
+++ b/include/asm-arm/arch-rpc/memory.h
@@ -24,11 +24,12 @@
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
+#define PHYS_OFFSET (0x10000000UL)
#define __virt_to_phys__is_a_macro
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + 0x10000000)
+#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 - 0x10000000)
+#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
/*
* These are exactly the same on the RiscPC as the
diff --git a/include/asm-arm/arch-rpc/system.h b/include/asm-arm/arch-rpc/system.h
index af4ebc348..c40aadcad 100644
--- a/include/asm-arm/arch-rpc/system.h
+++ b/include/asm-arm/arch-rpc/system.h
@@ -18,7 +18,7 @@ extern __inline__ void arch_reset(char mode)
outb(0, IOMD_ROMCR0);
__asm__ __volatile__(
- "mcr p15, 0, %0, c1, c0, 0\n\t"
- "movs pc, #0"
+ "mcr p15, 0, %0, c1, c0, 0\n\t"
+ "mov pc, #0"
: : "r" (cpu_reset()));
}
diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h
index a49764467..884157c86 100644
--- a/include/asm-arm/arch-sa1100/memory.h
+++ b/include/asm-arm/arch-sa1100/memory.h
@@ -11,12 +11,13 @@
/*
* Task size: 3GB
*/
-#define TASK_SIZE (0xc0000000UL)
+#define TASK_SIZE (0xc0000000UL)
/*
* Page offset: 3GB
*/
-#define PAGE_OFFSET (0xc0000000UL)
+#define PAGE_OFFSET (0xc0000000UL)
+#define PHYS_OFFSET (0x00000000UL)
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index 5f72c4ecd..a726d7afa 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -185,17 +185,16 @@ __IO(l,"",long)
#endif
-#ifndef ARCH_READWRITE
+extern void __readwrite_bug(const char *fn);
-/* for panic */
-#include <linux/kernel.h>
+#ifndef ARCH_READWRITE
-#define readb(p) (panic("readb called, but not implemented"),0)
-#define readw(p) (panic("readw called, but not implemented"),0)
-#define readl(p) (panic("readl called, but not implemented"),0)
-#define writeb(v,p) panic("writeb called, but not implemented")
-#define writew(v,p) panic("writew called, but not implemented")
-#define writel(v,p) panic("writel called, but not implemented")
+#define readb(p) (__readwrite_bug("readb"),0)
+#define readw(p) (__readwrite_bug("readw"),0)
+#define readl(p) (__readwrite_bug("readl"),0)
+#define writeb(v,p) __readwrite_bug("writeb")
+#define writew(v,p) __readwrite_bug("writew")
+#define writel(v,p) __readwrite_bug("writel")
#endif
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h
index 977b2f619..20edac085 100644
--- a/include/asm-arm/page.h
+++ b/include/asm-arm/page.h
@@ -12,7 +12,7 @@
#define STRICT_MM_TYPECHECKS
#define clear_page(page) memzero((void *)(page), PAGE_SIZE)
-extern void copy_page(unsigned long to, unsigned long from);
+extern void copy_page(void *to, void *from);
#ifdef STRICT_MM_TYPECHECKS
/*
@@ -60,22 +60,18 @@ typedef unsigned long pgprot_t;
#ifndef __ASSEMBLY__
-#define BUG() do { \
- printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
- *(int *)0 = 0; \
-} while (0)
+extern void __bug(const char *file, int line, void *data);
-#define PAGE_BUG(page) do { \
- BUG(); \
-} while (0)
+#define BUG() __bug(__FILE__, __LINE__, NULL)
+#define PAGE_BUG(page) __bug(__FILE__, __LINE__, page)
#endif /* !__ASSEMBLY__ */
#include <asm/arch/memory.h>
-#define __pa(x) __virt_to_phys((unsigned long)(x))
-#define __va(x) ((void *)(__phys_to_virt((unsigned long)(x))))
-#define MAP_NR(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> PAGE_SHIFT)
+#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET)
+#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET))
+#define MAP_NR(addr) (__pa(addr) >> PAGE_SHIFT)
#endif
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h
index 1f9d7b175..b9fb442d7 100644
--- a/include/asm-arm/pgtable.h
+++ b/include/asm-arm/pgtable.h
@@ -1,55 +1,155 @@
+/*
+ * linux/include/asm-arm/pgtable.h
+ */
#ifndef _ASMARM_PGTABLE_H
#define _ASMARM_PGTABLE_H
#include <linux/config.h>
-#include <asm/arch/memory.h> /* For TASK_SIZE */
+#include <asm/arch/memory.h>
#include <asm/proc-fns.h>
#include <asm/system.h>
-#include <asm/proc/cache.h>
+
+/*
+ * PMD_SHIFT determines the size of the area a second-level page table can map
+ * PGDIR_SHIFT determines what a third-level page table entry can map
+ */
+#define PMD_SHIFT 20
+#define PGDIR_SHIFT 20
#define LIBRARY_TEXT_START 0x0c000000
-#undef TEST_VERIFY_AREA
+#ifndef __ASSEMBLY__
+extern void __pte_error(const char *file, int line, unsigned long val);
+extern void __pmd_error(const char *file, int line, unsigned long val);
+extern void __pgd_error(const char *file, int line, unsigned long val);
+
+#define pte_ERROR(pte) __pte_error(__FILE__, __LINE__, pte_val(pte))
+#define pmd_ERROR(pmd) __pmd_error(__FILE__, __LINE__, pmd_val(pmd))
+#define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd_val(pgd))
+#endif /* !__ASSEMBLY__ */
+#define PMD_SIZE (1UL << PMD_SHIFT)
+#define PMD_MASK (~(PMD_SIZE-1))
+#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
+#define PGDIR_MASK (~(PGDIR_SIZE-1))
+
+#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
+
+/*
+ * The table below defines the page protection levels that we insert into our
+ * Linux page table version. These get translated into the best that the
+ * architecture can perform. Note that on most ARM hardware:
+ * 1) We cannot do execute protection
+ * 2) If we could do execute protection, then read is implied
+ * 3) write implies read permissions
+ */
+#define __P000 PAGE_NONE
+#define __P001 PAGE_READONLY
+#define __P010 PAGE_COPY
+#define __P011 PAGE_COPY
+#define __P100 PAGE_READONLY
+#define __P101 PAGE_READONLY
+#define __P110 PAGE_COPY
+#define __P111 PAGE_COPY
+
+#define __S000 PAGE_NONE
+#define __S001 PAGE_READONLY
+#define __S010 PAGE_SHARED
+#define __S011 PAGE_SHARED
+#define __S100 PAGE_READONLY
+#define __S101 PAGE_READONLY
+#define __S110 PAGE_SHARED
+#define __S111 PAGE_SHARED
+
+#ifndef __ASSEMBLY__
/*
- * BAD_PAGETABLE is used when we need a bogus page-table, while
- * BAD_PAGE is used for a bogus page.
- *
* ZERO_PAGE is a global shared page that is always zero: used
* for zero-mapped memory areas etc..
*/
-extern pte_t __bad_page(void);
-extern pte_t * __bad_pagetable(void);
-extern unsigned long *empty_zero_page;
+struct page *empty_zero_page;
+#define ZERO_PAGE(vaddr) (empty_zero_page)
+
+/*
+ * Handling allocation failures during page table setup.
+ */
+extern void __handle_bad_pmd(pmd_t *pmd);
+extern void __handle_bad_pmd_kernel(pmd_t *pmd);
+
+#define pte_none(pte) (!pte_val(pte))
+#define pte_clear(ptep) set_pte((ptep), __pte(0))
+#define pte_pagenr(pte) ((unsigned long)(((pte_val(pte) - PHYS_OFFSET) >> PAGE_SHIFT)))
+
+#define pmd_none(pmd) (!pmd_val(pmd))
+#define pmd_clear(pmdp) set_pmd(pmdp, __pmd(0))
+
+/*
+ * Permanent address of a page.
+ */
+#define page_address(page) (PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT))
+#define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT))
+#define pte_page(x) (mem_map + pte_pagenr(x))
+
+/*
+ * The "pgd_xxx()" functions here are trivial for a folded two-level
+ * setup: the pgd is never bad, and a pmd always exists (as it's folded
+ * into the pgd entry)
+ */
+#define pgd_none(pgd) (0)
+#define pgd_bad(pgd) (0)
+#define pgd_present(pgd) (1)
+#define pgd_clear(pgdp)
+
+/*
+ * Conversion functions: convert a page and protection to a page entry,
+ * and a page entry and page directory to the page they refer to.
+ */
+extern __inline__ pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
+{
+ pte_t pte;
+ pte_val(pte) = physpage | pgprot_val(pgprot);
+ return pte;
+}
-#define BAD_PAGETABLE __bad_pagetable()
-#define BAD_PAGE __bad_page()
-#define ZERO_PAGE(vaddr) ((unsigned long) empty_zero_page)
+extern __inline__ pte_t mk_pte(struct page *page, pgprot_t pgprot)
+{
+ pte_t pte;
+ pte_val(pte) = (PHYS_OFFSET + ((page - mem_map) << PAGE_SHIFT)) | pgprot_val(pgprot);
+ return pte;
+}
-/* number of bits that fit into a memory pointer */
-#define BYTES_PER_PTR (sizeof(unsigned long))
-#define BITS_PER_PTR (8*BYTES_PER_PTR)
+#define page_pte_prot(page,prot) mk_pte(page, prot)
+#define page_pte(page) mk_pte(page, __pgprot(0))
-/* to align the pointer to a pointer address */
-#define PTR_MASK (~(sizeof(void*)-1))
+/* to find an entry in a page-table-directory */
+#define __pgd_offset(addr) ((addr) >> PGDIR_SHIFT)
-/* sizeof(void*)==1<<SIZEOF_PTR_LOG2 */
-#define SIZEOF_PTR_LOG2 2
+#define pgd_offset(mm, addr) ((mm)->pgd+__pgd_offset(addr))
-/* to find an entry in a page-table */
-#define PAGE_PTR(address) \
- ((unsigned long)(address)>>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK)
+/* to find an entry in a kernel page-table-directory */
+#define pgd_offset_k(addr) pgd_offset(&init_mm, addr)
-extern void __bad_pmd(pmd_t *pmd);
-extern void __bad_pmd_kernel(pmd_t *pmd);
+/* Find an entry in the second-level page table.. */
+#define pmd_offset(dir, addr) ((pmd_t *)(dir))
+
+/* Find an entry in the third-level page table.. */
+#define __pte_offset(addr) (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
+#define pte_offset(dir, addr) ((pte_t *)pmd_page(*(dir)) + __pte_offset(addr))
+
+/*
+ * Get the cache handling stuff now.
+ */
+#include <asm/proc/cache.h>
/*
* Page table cache stuff
*/
#ifndef CONFIG_NO_PGT_CACHE
-#ifndef __SMP__
+#ifdef __SMP__
+#error Pgtable caches have to be per-CPU, so that no locking is needed.
+#endif /* __SMP__ */
+
extern struct pgtable_cache_struct {
unsigned long *pgd_cache;
unsigned long *pte_cache;
@@ -61,10 +161,6 @@ extern struct pgtable_cache_struct {
#define pte_quicklist (quicklists.pte_cache)
#define pgtable_cache_size (quicklists.pgtable_cache_sz)
-#else /* __SMP__ */
-#error Pgtable caches have to be per-CPU, so that no locking is needed.
-#endif /* __SMP__ */
-
/* used for quicklists */
#define __pgd_next(pgd) (((unsigned long *)pgd)[1])
#define __pte_next(pte) (((unsigned long *)pte)[0])
@@ -73,7 +169,7 @@ extern __inline__ pgd_t *get_pgd_fast(void)
{
unsigned long *ret;
- if((ret = pgd_quicklist) != NULL) {
+ if ((ret = pgd_quicklist) != NULL) {
pgd_quicklist = (unsigned long *)__pgd_next(ret);
ret[1] = ret[2];
clean_cache_area(ret + 1, 4);
@@ -82,10 +178,18 @@ extern __inline__ pgd_t *get_pgd_fast(void)
return (pgd_t *)ret;
}
+extern __inline__ void free_pgd_fast(pgd_t *pgd)
+{
+ __pgd_next(pgd) = (unsigned long) pgd_quicklist;
+ pgd_quicklist = (unsigned long *) pgd;
+ pgtable_cache_size++;
+}
+
/* We don't use pmd cache, so this is a dummy routine */
-extern __inline__ pmd_t *get_pmd_fast(void)
+#define get_pmd_fast() ((pmd_t *)0)
+
+extern __inline__ void free_pmd_fast(pmd_t *pmd)
{
- return (pmd_t *)0;
}
extern __inline__ pte_t *get_pte_fast(void)
@@ -101,17 +205,6 @@ extern __inline__ pte_t *get_pte_fast(void)
return (pte_t *)ret;
}
-extern __inline__ void free_pgd_fast(pgd_t *pgd)
-{
- __pgd_next(pgd) = (unsigned long) pgd_quicklist;
- pgd_quicklist = (unsigned long *) pgd;
- pgtable_cache_size++;
-}
-
-extern __inline__ void free_pmd_fast(pmd_t *pmd)
-{
-}
-
extern __inline__ void free_pte_fast(pte_t *pte)
{
__pte_next(pte) = (unsigned long) pte_quicklist;
@@ -121,9 +214,13 @@ extern __inline__ void free_pte_fast(pte_t *pte)
#else /* CONFIG_NO_PGT_CACHE */
-#define get_pgd_fast() (NULL)
-#define get_pmd_fast() (NULL)
-#define get_pte_fast() (NULL)
+#define pgd_quicklist ((unsigned long *)0)
+#define pmd_quicklist ((unsigned long *)0)
+#define pte_quicklist ((unsigned long *)0)
+
+#define get_pgd_fast() ((pgd_t *)0)
+#define get_pmd_fast() ((pmd_t *)0)
+#define get_pte_fast() ((pte_t *)0)
#define free_pgd_fast(pgd) free_pgd_slow(pgd)
#define free_pmd_fast(pmd) free_pmd_slow(pmd)
@@ -131,8 +228,93 @@ extern __inline__ void free_pte_fast(pte_t *pte)
#endif /* CONFIG_NO_PGT_CACHE */
+extern pgd_t *get_pgd_slow(void);
+extern void free_pgd_slow(pgd_t *pgd);
+
+#define free_pmd_slow(pmd) do { } while (0)
+
+extern pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long addr_preadjusted);
+extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long addr_preadjusted);
+extern void free_pte_slow(pte_t *pte);
+
#include <asm/proc/pgtable.h>
+extern __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot)
+{
+ pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot);
+ return pte;
+}
+
+/*
+ * Allocate and free page tables. The xxx_kernel() versions are
+ * used to allocate a kernel page table - this turns on ASN bits
+ * if any.
+ */
+#define pte_free_kernel(pte) free_pte_fast(pte)
+#define pte_free(pte) free_pte_fast(pte)
+
+#ifndef pte_alloc_kernel
+extern __inline__ pte_t * pte_alloc_kernel(pmd_t *pmd, unsigned long address)
+{
+ address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
+ if (pmd_none(*pmd)) {
+ pte_t *page = (pte_t *) get_pte_fast();
+
+ if (!page)
+ return get_pte_kernel_slow(pmd, address);
+ set_pmd(pmd, mk_kernel_pmd(page));
+ return page + address;
+ }
+ if (pmd_bad(*pmd)) {
+ __handle_bad_pmd_kernel(pmd);
+ return NULL;
+ }
+ return (pte_t *) pmd_page(*pmd) + address;
+}
+#endif
+
+extern __inline__ pte_t *pte_alloc(pmd_t * pmd, unsigned long address)
+{
+ address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
+ if (pmd_none(*pmd)) {
+ pte_t *page = (pte_t *) get_pte_fast();
+
+ if (!page)
+ return get_pte_slow(pmd, address);
+ set_pmd(pmd, mk_user_pmd(page));
+ return page + address;
+ }
+ if (pmd_bad(*pmd)) {
+ __handle_bad_pmd(pmd);
+ return NULL;
+ }
+ return (pte_t *) pmd_page(*pmd) + address;
+}
+
+#define pmd_free_kernel pmd_free
+#define pmd_free(pmd) do { } while (0)
+
+#define pmd_alloc_kernel pmd_alloc
+extern __inline__ pmd_t *pmd_alloc(pgd_t *pgd, unsigned long address)
+{
+ return (pmd_t *) pgd;
+}
+
+#define pgd_free(pgd) free_pgd_fast(pgd)
+
+extern __inline__ pgd_t *pgd_alloc(void)
+{
+ pgd_t *pgd;
+
+ pgd = get_pgd_fast();
+ if (!pgd)
+ pgd = get_pgd_slow();
+
+ return pgd;
+}
+
+extern int do_check_pgt_cache(int, int);
+
extern __inline__ void set_pgdir(unsigned long address, pgd_t entry)
{
struct task_struct * p;
@@ -159,15 +341,16 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
#define update_mmu_cache(vma,address,pte)
-#define SWP_TYPE(entry) (((entry) >> 2) & 0x7f)
-#define SWP_OFFSET(entry) ((entry) >> 9)
-#define SWP_ENTRY(type,offset) (((type) << 2) | ((offset) << 9))
+/*
+ * We support up to 32GB of swap on 4k machines
+ */
+#define SWP_TYPE(entry) (((pte_val(entry)) >> 2) & 0x7f)
+#define SWP_OFFSET(entry) ((pte_val(entry)) >> 9)
+#define SWP_ENTRY(type,offset) __pte((((type) << 2) | ((offset) << 9)))
#define module_map vmalloc
#define module_unmap vfree
-extern int do_check_pgt_cache(int, int);
-
/*
* We rely on GCC optimising this code away for
* architectures which it doesn't apply to. Note
@@ -190,4 +373,6 @@ extern __inline__ int __kern_valid_addr(unsigned long addr)
#define io_remap_page_range remap_page_range
+#endif /* !__ASSEMBLY__ */
+
#endif /* _ASMARM_PGTABLE_H */
diff --git a/include/asm-arm/proc-armo/cache.h b/include/asm-arm/proc-armo/cache.h
index d39b7b79f..cb0aa1975 100644
--- a/include/asm-arm/proc-armo/cache.h
+++ b/include/asm-arm/proc-armo/cache.h
@@ -46,18 +46,18 @@ extern __inline__ void memc_update_mm(struct mm_struct *mm)
}
extern __inline__ void
-memc_update_addr(struct mm_struct *mm, pte_t pte, unsigned long addr)
+memc_update_addr(struct mm_struct *mm, pte_t pte, unsigned long vaddr)
{
- cpu_memc_update_entry(mm->pgd, pte_val(pte), addr);
+ cpu_memc_update_entry(mm->pgd, pte_val(pte), vaddr);
if (mm == current->active_mm)
processor._set_pgd(mm->pgd);
}
extern __inline__ void
-memc_clear(struct mm_struct *mm, unsigned long phys_addr)
+memc_clear(struct mm_struct *mm, struct page *page)
{
- cpu_memc_update_entry(mm->pgd, phys_addr, 0);
+ cpu_memc_update_entry(mm->pgd, page_address(page), 0);
if (mm == current->active_mm)
processor._set_pgd(mm->pgd);
diff --git a/include/asm-arm/proc-armo/pgtable.h b/include/asm-arm/proc-armo/pgtable.h
index be9174ffa..56456e0e1 100644
--- a/include/asm-arm/proc-armo/pgtable.h
+++ b/include/asm-arm/proc-armo/pgtable.h
@@ -9,31 +9,46 @@
#define __ASM_PROC_PGTABLE_H
/*
- * PMD_SHIFT determines the size of the area a second-level page table can map
+ * entries per page directory level: they are two-level, so
+ * we don't really have any PMD directory.
*/
-#define PMD_SHIFT 20
-#define PMD_SIZE (1UL << PMD_SHIFT)
-#define PMD_MASK (~(PMD_SIZE-1))
+#define PTRS_PER_PTE 32
+#define PTRS_PER_PMD 1
+#define PTRS_PER_PGD 32
/*
- * PGDIR_SHIFT determines what a third-level page table entry can map
+ * The vmalloc() routines leaves a hole of 4kB between each vmalloced
+ * area for the same reason. ;)
*/
-#define PGDIR_SHIFT 20
-#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
-#define PGDIR_MASK (~(PGDIR_SIZE-1))
+#define VMALLOC_START 0x01a00000
+#define VMALLOC_VMADDR(x) ((unsigned long)(x))
+#define VMALLOC_END 0x01c00000
-/*
- * entries per page directory level: the arm3 is one-level, so
- * we don't really have any PMD or PTE directory physically.
- */
-#define PTRS_PER_PTE 32
-#define PTRS_PER_PMD 1
-#define PTRS_PER_PGD 32
-#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
+#define _PAGE_TABLE (0x01)
-#define VMALLOC_START 0x01a00000
-#define VMALLOC_VMADDR(x) ((unsigned long)(x))
-#define VMALLOC_END 0x01c00000
+#define pmd_bad(pmd) ((pmd_val(pmd) & 0xfc000002))
+#define set_pmd(pmdp,pmd) ((*(pmdp)) = (pmd))
+
+extern __inline__ pmd_t __mk_pmd(pte_t *ptep, unsigned long prot)
+{
+ unsigned long pte_ptr = (unsigned long)ptep;
+ pmd_t pmd;
+
+ pmd_val(pmd) = __virt_to_phys(pte_ptr) | prot;
+
+ return pmd;
+}
+
+/* these are aliases for the above function */
+#define mk_user_pmd(ptep) __mk_pmd(ptep, _PAGE_TABLE)
+#define mk_kernel_pmd(ptep) __mk_pmd(ptep, _PAGE_TABLE)
+
+extern __inline__ unsigned long pmd_page(pmd_t pmd)
+{
+ return __phys_to_virt(pmd_val(pmd) & ~_PAGE_TABLE);
+}
+
+#define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval))
#define _PAGE_PRESENT 0x01
#define _PAGE_READONLY 0x02
@@ -41,9 +56,6 @@
#define _PAGE_OLD 0x08
#define _PAGE_CLEAN 0x10
-#define _PAGE_TABLE (_PAGE_PRESENT)
-#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_OLD | _PAGE_CLEAN)
-
/* -- present -- -- !dirty -- --- !write --- ---- !user --- */
#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_CLEAN | _PAGE_READONLY | _PAGE_NOT_USER)
#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_CLEAN )
@@ -51,59 +63,19 @@
#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_CLEAN | _PAGE_READONLY )
#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_NOT_USER)
-/*
- * The arm can't do page protection for execute, and considers that the same are read.
- * Also, write permissions imply read permissions. This is the closest we can get..
- */
-#define __P000 PAGE_NONE
-#define __P001 PAGE_READONLY
-#define __P010 PAGE_COPY
-#define __P011 PAGE_COPY
-#define __P100 PAGE_READONLY
-#define __P101 PAGE_READONLY
-#define __P110 PAGE_COPY
-#define __P111 PAGE_COPY
-
-#define __S000 PAGE_NONE
-#define __S001 PAGE_READONLY
-#define __S010 PAGE_SHARED
-#define __S011 PAGE_SHARED
-#define __S100 PAGE_READONLY
-#define __S101 PAGE_READONLY
-#define __S110 PAGE_SHARED
-#define __S111 PAGE_SHARED
-
-extern unsigned long physical_start;
-extern unsigned long physical_end;
+#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_OLD | _PAGE_CLEAN)
-#define pte_none(pte) (!pte_val(pte))
-#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)
-#define pte_clear(ptep) set_pte((ptep), __pte(0))
-
-#define pmd_none(pmd) (!pmd_val(pmd))
-#define pmd_bad(pmd) ((pmd_val(pmd) & 0xfc000002))
-#define pmd_present(pmd) (pmd_val(pmd) & _PAGE_PRESENT)
-#define pmd_clear(pmdp) set_pmd(pmdp, __pmd(0))
-
-/*
- * The "pgd_xxx()" functions here are trivial for a folded two-level
- * setup: the pgd is never bad, and a pmd always exists (as it's folded
- * into the pgd entry)
- */
-#define pgd_none(pgd) (0)
-#define pgd_bad(pgd) (0)
-#define pgd_present(pgd) (1)
-#define pgd_clear(pgdp)
/*
* The following only work if pte_present() is true.
* Undefined behaviour if not..
*/
-extern inline int pte_read(pte_t pte) { return !(pte_val(pte) & _PAGE_NOT_USER); }
-extern inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_READONLY); }
-extern inline int pte_exec(pte_t pte) { return !(pte_val(pte) & _PAGE_NOT_USER); }
-extern inline int pte_dirty(pte_t pte) { return !(pte_val(pte) & _PAGE_CLEAN); }
-extern inline int pte_young(pte_t pte) { return !(pte_val(pte) & _PAGE_OLD); }
+#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)
+#define pte_read(pte) (!(pte_val(pte) & _PAGE_NOT_USER))
+#define pte_write(pte) (!(pte_val(pte) & _PAGE_READONLY))
+#define pte_exec(pte) (!(pte_val(pte) & _PAGE_NOT_USER))
+#define pte_dirty(pte) (!(pte_val(pte) & _PAGE_CLEAN))
+#define pte_young(pte) (!(pte_val(pte) & _PAGE_OLD))
extern inline pte_t pte_nocache(pte_t pte) { return pte; }
extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_READONLY; return pte; }
@@ -118,155 +90,6 @@ extern inline pte_t pte_mkexec(pte_t pte) { pte_val(pte) &= ~_PAGE_NOT_USE
extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) &= ~_PAGE_CLEAN; return pte; }
extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) &= ~_PAGE_OLD; return pte; }
-/*
- * Conversion functions: convert a page and protection to a page entry,
- * and a page entry and page directory to the page they refer to.
- */
-extern __inline__ pte_t mk_pte(unsigned long page, pgprot_t pgprot)
-{
- pte_t pte;
- pte_val(pte) = __virt_to_phys(page) | pgprot_val(pgprot);
- return pte;
-}
-
-/* This takes a physical page address that is used by the remapping functions */
-extern __inline__ pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
-{
- pte_t pte;
- pte_val(pte) = physpage + pgprot_val(pgprot);
- return pte;
-}
-
-extern __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot)
-{
- pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot);
- return pte;
-}
-
-/* Certain architectures need to do special things when pte's
- * within a page table are directly modified. Thus, the following
- * hook is made available.
- */
-#define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval))
-
-extern __inline__ unsigned long pte_page(pte_t pte)
-{
- return __phys_to_virt(pte_val(pte) & PAGE_MASK);
-}
-
-extern __inline__ pmd_t mk_pmd(pte_t *ptep)
-{
- pmd_t pmd;
- pmd_val(pmd) = __virt_to_phys((unsigned long)ptep) | _PAGE_TABLE;
- return pmd;
-}
-
-/* these are aliases for the above function */
-#define mk_user_pmd(ptep) mk_pmd(ptep)
-#define mk_kernel_pmd(ptep) mk_pmd(ptep)
-
-#define set_pmd(pmdp,pmd) ((*(pmdp)) = (pmd))
-
-extern __inline__ unsigned long pmd_page(pmd_t pmd)
-{
- return __phys_to_virt(pmd_val(pmd) & ~_PAGE_TABLE);
-}
-
-/* to find an entry in a kernel page-table-directory */
-#define pgd_offset_k(address) pgd_offset(&init_mm, address)
-
-/* to find an entry in a page-table-directory */
-extern __inline__ pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address)
-{
- return mm->pgd + (address >> PGDIR_SHIFT);
-}
-
-/* Find an entry in the second-level page table.. */
-#define pmd_offset(dir, address) ((pmd_t *)(dir))
-
-/* Find an entry in the third-level page table.. */
-extern __inline__ pte_t * pte_offset(pmd_t *dir, unsigned long address)
-{
- return (pte_t *)pmd_page(*dir) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1));
-}
-
-/*
- * Allocate and free page tables. The xxx_kernel() versions are
- * used to allocate a kernel page table - this turns on ASN bits
- * if any.
- */
-
-extern void free_table(void *table);
-
-/* keep this as an inline so we get type checking */
-extern __inline__ void free_pgd_slow(pgd_t *pgd)
-{
- free_table(pgd);
-}
-
-/* keep this as an inline so we get type checking */
-extern __inline__ void free_pte_slow(pte_t *pte)
-{
- free_table(pte);
-}
-
-extern __inline__ void free_pmd_slow(pmd_t *pmd)
-{
-}
-
-#define pgd_free(pgd) free_pgd_fast(pgd)
-
-extern __inline__ pgd_t *pgd_alloc(void)
-{
- extern pgd_t *get_pgd_slow(void);
- pgd_t *pgd;
-
- pgd = get_pgd_fast();
- if (!pgd)
- pgd = get_pgd_slow();
-
- return pgd;
-}
-
-#define pte_free_kernel(pte) free_pte_fast(pte)
-#define pte_free(pte) free_pte_fast(pte)
-
-extern __inline__ pte_t *pte_alloc(pmd_t * pmd, unsigned long address)
-{
- extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted);
-
- address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
-
- if (pmd_none (*pmd)) {
- pte_t *page = (pte_t *) get_pte_fast();
-
- if (!page)
- return get_pte_slow(pmd, address);
- set_pmd(pmd, mk_pmd(page));
- return page + address;
- }
- if (pmd_bad (*pmd)) {
- __bad_pmd(pmd);
- return NULL;
- }
- return (pte_t *) pmd_page(*pmd) + address;
-}
-
-/*
- * allocating and freeing a pmd is trivial: the 1-entry pmd is
- * inside the pgd, so has no extra memory associated with it.
- */
-extern __inline__ void pmd_free(pmd_t *pmd)
-{
-}
-
-extern __inline__ pmd_t *pmd_alloc(pgd_t *pgd, unsigned long address)
-{
- return (pmd_t *) pgd;
-}
-
-#define pmd_free_kernel pmd_free
-#define pmd_alloc_kernel pmd_alloc
#define pte_alloc_kernel pte_alloc
#endif /* __ASM_PROC_PGTABLE_H */
diff --git a/include/asm-arm/proc-armo/shmparam.h b/include/asm-arm/proc-armo/shmparam.h
index e61096091..e85eadb3f 100644
--- a/include/asm-arm/proc-armo/shmparam.h
+++ b/include/asm-arm/proc-armo/shmparam.h
@@ -9,9 +9,7 @@
#ifndef __ASM_PROC_SHMPARAM_H
#define __ASM_PROC_SHMPARAM_H
-#ifndef SHM_RANGE_START
-#define SHM_RANGE_START 0x00a00000
-#define SHM_RANGE_END 0x00c00000
+#ifndef SHMMAX
#define SHMMAX 0x003fa000
#endif
diff --git a/include/asm-arm/proc-armv/cache.h b/include/asm-arm/proc-armv/cache.h
index 9b79c7747..5e700bfad 100644
--- a/include/asm-arm/proc-armv/cache.h
+++ b/include/asm-arm/proc-armv/cache.h
@@ -54,8 +54,11 @@
* This flushes back any buffered write data. We have to clean the entries
* in the cache for this page. This does not invalidate either I or D caches.
*/
-#define flush_page_to_ram(_page) \
- cpu_flush_ram_page((_page) & PAGE_MASK);
+static __inline__ void flush_page_to_ram(struct page *page)
+{
+ unsigned long virt = page_address(page);
+ cpu_flush_ram_page(virt);
+}
/*
* TLB flushing:
diff --git a/include/asm-arm/proc-armv/pgtable.h b/include/asm-arm/proc-armv/pgtable.h
index d4f416d37..e9260057f 100644
--- a/include/asm-arm/proc-armv/pgtable.h
+++ b/include/asm-arm/proc-armv/pgtable.h
@@ -14,27 +14,12 @@
#include <asm/proc/domain.h>
/*
- * PMD_SHIFT determines the size of the area a second-level page table can map
+ * entries per page directory level: they are two-level, so
+ * we don't really have any PMD directory.
*/
-#define PMD_SHIFT 20
-#define PMD_SIZE (1UL << PMD_SHIFT)
-#define PMD_MASK (~(PMD_SIZE-1))
-
-/*
- * PGDIR_SHIFT determines what a third-level page table entry can map
- */
-#define PGDIR_SHIFT 20
-#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
-#define PGDIR_MASK (~(PGDIR_SIZE-1))
-
-/*
- * entries per page directory level: the sa110 is two-level, so
- * we don't really have any PMD directory physically.
- */
-#define PTRS_PER_PTE 256
-#define PTRS_PER_PMD 1
-#define PTRS_PER_PGD 4096
-#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
+#define PTRS_PER_PTE 256
+#define PTRS_PER_PMD 1
+#define PTRS_PER_PGD 4096
/*
* Just any arbitrary offset to the start of the vmalloc VM area: the
@@ -49,15 +34,6 @@
#define VMALLOC_VMADDR(x) ((unsigned long)(x))
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
-extern unsigned long get_page_2k(int priority);
-extern void free_page_2k(unsigned long page);
-
-/*
- * Allocate and free page tables. The xxx_kernel() versions are
- * used to allocate a kernel page table - this turns on ASN bits
- * if any.
- */
-
/****************
* PMD functions *
****************/
@@ -77,47 +53,15 @@ extern void free_page_2k(unsigned long page);
#define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_USER))
#define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_KERNEL))
-#define pmd_none(pmd) (!pmd_val(pmd))
-#define pmd_clear(pmdp) set_pmd(pmdp, __pmd(0))
#define pmd_bad(pmd) (pmd_val(pmd) & 2)
-#define mk_user_pmd(ptep) __mk_pmd(ptep, _PAGE_USER_TABLE)
-#define mk_kernel_pmd(ptep) __mk_pmd(ptep, _PAGE_KERNEL_TABLE)
#define set_pmd(pmdp,pmd) cpu_set_pmd(pmdp,pmd)
-/* Find an entry in the second-level page table.. */
-#define pmd_offset(dir, address) ((pmd_t *)(dir))
-
-extern __inline__ int pmd_present(pmd_t pmd)
-{
- return ((pmd_val(pmd) + 1) & 2);
-}
-
-extern __inline__ void free_pmd_slow(pmd_t *pmd)
-{
-}
-
-/*
- * allocating and freeing a pmd is trivial: the 1-entry pmd is
- * inside the pgd, so has no extra memory associated with it.
- */
-extern __inline__ void pmd_free(pmd_t *pmd)
-{
-}
-
-extern __inline__ pmd_t *pmd_alloc(pgd_t *pgd, unsigned long address)
-{
- return (pmd_t *) pgd;
-}
-
-#define pmd_free_kernel pmd_free
-#define pmd_alloc_kernel pmd_alloc
-
extern __inline__ pmd_t __mk_pmd(pte_t *ptep, unsigned long prot)
{
unsigned long pte_ptr = (unsigned long)ptep;
pmd_t pmd;
- pte_ptr -= PTRS_PER_PTE * BYTES_PER_PTR;
+ pte_ptr -= PTRS_PER_PTE * sizeof(void *);
/*
* The pmd must be loaded with the physical
@@ -128,13 +72,17 @@ extern __inline__ pmd_t __mk_pmd(pte_t *ptep, unsigned long prot)
return pmd;
}
+/* these are aliases for the above function */
+#define mk_user_pmd(ptep) __mk_pmd(ptep, _PAGE_USER_TABLE)
+#define mk_kernel_pmd(ptep) __mk_pmd(ptep, _PAGE_KERNEL_TABLE)
+
extern __inline__ unsigned long pmd_page(pmd_t pmd)
{
unsigned long ptr;
- ptr = pmd_val(pmd) & ~(PTRS_PER_PTE * BYTES_PER_PTR - 1);
+ ptr = pmd_val(pmd) & ~(PTRS_PER_PTE * sizeof(void *) - 1);
- ptr += PTRS_PER_PTE * BYTES_PER_PTR;
+ ptr += PTRS_PER_PTE * sizeof(void *);
return __phys_to_virt(ptr);
}
@@ -153,48 +101,8 @@ extern __inline__ unsigned long pmd_page(pmd_t pmd)
#define PTE_CACHEABLE 0x0008
#define PTE_BUFFERABLE 0x0004
-#define pte_none(pte) (!pte_val(pte))
-#define pte_clear(ptep) set_pte(ptep, __pte(0))
-
-/*
- * Conversion functions: convert a page and protection to a page entry,
- * and a page entry and page directory to the page they refer to.
- */
-extern __inline__ pte_t mk_pte(unsigned long page, pgprot_t pgprot)
-{
- pte_t pte;
- pte_val(pte) = __virt_to_phys(page) | pgprot_val(pgprot);
- return pte;
-}
-
-/* This takes a physical page address that is used by the remapping functions */
-extern __inline__ pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
-{
- pte_t pte;
- pte_val(pte) = physpage + pgprot_val(pgprot);
- return pte;
-}
-
#define set_pte(ptep, pte) cpu_set_pte(ptep,pte)
-extern __inline__ unsigned long pte_page(pte_t pte)
-{
- return __phys_to_virt(pte_val(pte) & PAGE_MASK);
-}
-
-extern pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long address_preadjusted);
-
-extern __inline__ void free_pte_slow(pte_t *pte)
-{
- free_page_2k((unsigned long)(pte - PTRS_PER_PTE));
-}
-
-#define pte_free_kernel(pte) free_pte_fast(pte)
-#define pte_free(pte) free_pte_fast(pte)
-
-/*###############################################################################
- * New PageTableEntry stuff...
- */
/* We now keep two sets of ptes - the physical and the linux version.
* This gives us many advantages, and allows us greater flexibility.
*
@@ -227,7 +135,6 @@ extern __inline__ void free_pte_slow(pte_t *pte)
*/
#define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG
#define _L_PTE_READ L_PTE_USER | L_PTE_CACHEABLE
-#define _L_PTE_EXEC _L_PTE_READ | L_PTE_EXEC
#define PAGE_NONE __pgprot(_L_PTE_DEFAULT)
#define PAGE_COPY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ | L_PTE_BUFFERABLE)
@@ -235,40 +142,14 @@ extern __inline__ void free_pte_slow(pte_t *pte)
#define PAGE_READONLY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ)
#define PAGE_KERNEL __pgprot(_L_PTE_DEFAULT | L_PTE_CACHEABLE | L_PTE_BUFFERABLE | L_PTE_DIRTY | L_PTE_WRITE)
-#define _PAGE_CHG_MASK (PAGE_MASK | L_PTE_DIRTY | L_PTE_YOUNG)
+#define _PAGE_CHG_MASK (PAGE_MASK | L_PTE_DIRTY | L_PTE_YOUNG)
-/*
- * The table below defines the page protection levels that we insert into our
- * Linux page table version. These get translated into the best that the
- * architecture can perform. Note that on most ARM hardware:
- * 1) We cannot do execute protection
- * 2) If we could do execute protection, then read is implied
- * 3) write implies read permissions
- */
-#define __P000 PAGE_NONE
-#define __P001 PAGE_READONLY
-#define __P010 PAGE_COPY
-#define __P011 PAGE_COPY
-#define __P100 PAGE_READONLY
-#define __P101 PAGE_READONLY
-#define __P110 PAGE_COPY
-#define __P111 PAGE_COPY
-
-#define __S000 PAGE_NONE
-#define __S001 PAGE_READONLY
-#define __S010 PAGE_SHARED
-#define __S011 PAGE_SHARED
-#define __S100 PAGE_READONLY
-#define __S101 PAGE_READONLY
-#define __S110 PAGE_SHARED
-#define __S111 PAGE_SHARED
-
-#define pte_present(pte) (pte_val(pte) & L_PTE_PRESENT)
/*
* The following only work if pte_present() is true.
* Undefined behaviour if not..
*/
+#define pte_present(pte) (pte_val(pte) & L_PTE_PRESENT)
#define pte_read(pte) (pte_val(pte) & L_PTE_USER)
#define pte_write(pte) (pte_val(pte) & L_PTE_WRITE)
#define pte_exec(pte) (pte_val(pte) & L_PTE_EXEC)
@@ -276,130 +157,18 @@ extern __inline__ void free_pte_slow(pte_t *pte)
#define pte_young(pte) (pte_val(pte) & L_PTE_YOUNG)
#define PTE_BIT_FUNC(fn,op) \
-extern inline pte_t fn##(pte_t pte) { pte_val(pte) op##; return pte; }
-
-/*PTE_BIT_FUNC(pte_rdprotect, &= ~L_PTE_USER);*/
-PTE_BIT_FUNC(pte_wrprotect, &= ~L_PTE_WRITE);
-PTE_BIT_FUNC(pte_exprotect, &= ~L_PTE_EXEC);
-PTE_BIT_FUNC(pte_mkclean, &= ~L_PTE_DIRTY);
-PTE_BIT_FUNC(pte_mkold, &= ~L_PTE_YOUNG);
-/*PTE_BIT_FUNC(pte_mkread, |= L_PTE_USER);*/
-PTE_BIT_FUNC(pte_mkwrite, |= L_PTE_WRITE);
-PTE_BIT_FUNC(pte_mkexec, |= L_PTE_EXEC);
-PTE_BIT_FUNC(pte_mkdirty, |= L_PTE_DIRTY);
-PTE_BIT_FUNC(pte_mkyoung, |= L_PTE_YOUNG);
-PTE_BIT_FUNC(pte_nocache, &= ~L_PTE_CACHEABLE);
-
-extern __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot)
-{
- pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot);
- return pte;
-}
-
-/* Find an entry in the third-level page table.. */
-extern __inline__ pte_t * pte_offset(pmd_t * dir, unsigned long address)
-{
- return (pte_t *) pmd_page(*dir) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1));
-}
-
-extern __inline__ pte_t * pte_alloc_kernel(pmd_t *pmd, unsigned long address)
-{
- address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
- if (pmd_none(*pmd)) {
- pte_t *page = (pte_t *) get_pte_fast();
-
- if (!page)
- return get_pte_kernel_slow(pmd, address);
- set_pmd(pmd, mk_kernel_pmd(page));
- return page + address;
- }
- if (pmd_bad(*pmd)) {
- __bad_pmd_kernel(pmd);
- return NULL;
- }
- return (pte_t *) pmd_page(*pmd) + address;
-}
-
-extern __inline__ pte_t * pte_alloc(pmd_t * pmd, unsigned long address)
-{
- extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted);
-
- address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
-
- if (pmd_none(*pmd)) {
- pte_t *page = (pte_t *) get_pte_fast();
-
- if (!page)
- return get_pte_slow(pmd, address);
- set_pmd(pmd, mk_user_pmd(page));
- return page + address;
- }
- if (pmd_bad(*pmd)) {
- __bad_pmd(pmd);
- return NULL;
- }
- return (pte_t *) pmd_page(*pmd) + address;
-}
-
-/*
- * The "pgd_xxx()" functions here are trivial for a folded two-level
- * setup: the pgd is never bad, and a pmd always exists (as it's folded
- * into the pgd entry)
- */
-#define pgd_none(pgd) (0)
-#define pgd_bad(pgd) (0)
-#define pgd_present(pgd) (1)
-#define pgd_clear(pgdp)
-
-/* to find an entry in a kernel page-table-directory */
-#define pgd_offset_k(address) pgd_offset(&init_mm, address)
-
-/* to find an entry in a page-table-directory */
-extern __inline__ pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address)
-{
- return mm->pgd + (address >> PGDIR_SHIFT);
-}
-
-extern __inline__ void free_pgd_slow(pgd_t *pgd)
-{
- do {
- if (pgd) { /* can pgd be NULL? */
- pmd_t *pmd;
- pte_t *pte;
-
- /* pgd is never none and bad - it is
- * detected in the pmd macros.
- */
- pmd = pmd_offset(pgd, 0);
- if (pmd_none(*pmd))
- break;
- if (pmd_bad(*pmd)) {
- printk("free_pgd_slow: bad directory entry %08lx\n", pmd_val(*pmd));
- pmd_clear(pmd);
- break;
- }
-
- pte = pte_offset(pmd, 0);
- pmd_clear(pmd);
- pte_free(pte);
- pmd_free(pmd);
- }
- } while (0);
- free_pages((unsigned long) pgd, 2);
-}
-
-#define pgd_free(pgd) free_pgd_fast(pgd)
-
-extern __inline__ pgd_t *pgd_alloc(void)
-{
- extern pgd_t *get_pgd_slow(void);
- pgd_t *pgd;
-
- pgd = get_pgd_fast();
- if (!pgd)
- pgd = get_pgd_slow();
-
- return pgd;
-}
+extern inline pte_t pte_##fn##(pte_t pte) { pte_val(pte) op##; return pte; }
+
+/*PTE_BIT_FUNC(rdprotect, &= ~L_PTE_USER);*/
+/*PTE_BIT_FUNC(mkread, |= L_PTE_USER);*/
+PTE_BIT_FUNC(wrprotect, &= ~L_PTE_WRITE);
+PTE_BIT_FUNC(mkwrite, |= L_PTE_WRITE);
+PTE_BIT_FUNC(exprotect, &= ~L_PTE_EXEC);
+PTE_BIT_FUNC(mkexec, |= L_PTE_EXEC);
+PTE_BIT_FUNC(mkclean, &= ~L_PTE_DIRTY);
+PTE_BIT_FUNC(mkdirty, |= L_PTE_DIRTY);
+PTE_BIT_FUNC(mkold, &= ~L_PTE_YOUNG);
+PTE_BIT_FUNC(mkyoung, |= L_PTE_YOUNG);
+PTE_BIT_FUNC(nocache, &= ~L_PTE_CACHEABLE);
#endif /* __ASM_PROC_PGTABLE_H */
diff --git a/include/asm-arm/proc-armv/shmparam.h b/include/asm-arm/proc-armv/shmparam.h
index 10e280b6d..664b8deaf 100644
--- a/include/asm-arm/proc-armv/shmparam.h
+++ b/include/asm-arm/proc-armv/shmparam.h
@@ -10,9 +10,7 @@
#ifndef __ASM_PROC_SHMPARAM_H
#define __ASM_PROC_SHMPARAM_H
-#ifndef SHM_RANGE_START
-#define SHM_RANGE_START 0x50000000
-#define SHM_RANGE_END 0x60000000
+#ifndef SHMMAX
#define SHMMAX 0x01000000
#endif
diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h
index 33b98efa1..bac831217 100644
--- a/include/asm-arm/processor.h
+++ b/include/asm-arm/processor.h
@@ -107,6 +107,16 @@ extern void release_thread(struct task_struct *);
#define release_segments(mm) do { } while (0)
#define forget_segments() do { } while (0)
+unsigned long get_wchan(struct task_struct *p);
+
+#ifdef CONFIG_CPU_26
+# define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1022])
+# define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1020])
+#else
+# define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1021])
+# define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1019])
+#endif
+
extern struct task_struct *alloc_task_struct(void);
extern void free_task_struct(struct task_struct *);
diff --git a/include/asm-arm/setup.h b/include/asm-arm/setup.h
index de737ee40..2fe6424b8 100644
--- a/include/asm-arm/setup.h
+++ b/include/asm-arm/setup.h
@@ -16,6 +16,8 @@
* - when adding fields, don't rely on the address until
* a patch from me has been released
* - unused fields should be zero (for future expansion)
+ * - this structure is relatively short-lived - only
+ * guaranteed to contain useful data in setup_arch()
*/
#define COMMAND_LINE_SIZE 1024
@@ -60,4 +62,20 @@ struct param_struct {
char commandline[COMMAND_LINE_SIZE];
};
+/*
+ * Memory map description
+ */
+#define NR_BANKS 4
+
+struct meminfo {
+ int nr_banks;
+ unsigned long end;
+ struct {
+ unsigned long start;
+ unsigned long size;
+ } bank[NR_BANKS];
+};
+
+extern struct meminfo meminfo;
+
#endif
diff --git a/include/asm-arm/shmparam.h b/include/asm-arm/shmparam.h
index 02c9b195f..0b94f747d 100644
--- a/include/asm-arm/shmparam.h
+++ b/include/asm-arm/shmparam.h
@@ -3,39 +3,6 @@
#include <asm/proc/shmparam.h>
-/*
- * Format of a swap-entry for shared memory pages currently out in
- * swap space (see also mm/swap.c).
- *
- * SWP_TYPE = SHM_SWP_TYPE
- * SWP_OFFSET is used as follows:
- *
- * bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
- * bits 7..21: index of page within shared memory segment (SHM_IDX)
- * (actually fewer bits get used since SHMMAX is so low)
- */
-
-/*
- * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
- * there is a static array of size SHMMNI.
- */
-#define _SHM_ID_BITS 7
-#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
-
-#define SHM_IDX_SHIFT (_SHM_ID_BITS)
-#define _SHM_IDX_BITS 15
-#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
-
-/*
- * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
- * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
- */
-
-#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
-#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */
-#define SHMALL /* max shm system wide (pages) */ \
- (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
-#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
-#define SHMSEG SHMMNI /* max shared segs per process */
+#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
#endif /* _ASMARM_SHMPARAM_H */
diff --git a/include/asm-arm/termios.h b/include/asm-arm/termios.h
index df8a343b0..1ccc31eb7 100644
--- a/include/asm-arm/termios.h
+++ b/include/asm-arm/termios.h
@@ -63,6 +63,7 @@ struct termio {
#define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */
#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
#define N_HDLC 13 /* synchronous HDLC */
+#define N_SYNC_PPP 14
#ifdef __KERNEL__
diff --git a/include/asm-i386/div64.h b/include/asm-i386/div64.h
new file mode 100644
index 000000000..ef915df70
--- /dev/null
+++ b/include/asm-i386/div64.h
@@ -0,0 +1,17 @@
+#ifndef __I386_DIV64
+#define __I386_DIV64
+
+#define do_div(n,base) ({ \
+ unsigned long __upper, __low, __high, __mod; \
+ asm("":"=a" (__low), "=d" (__high):"A" (n)); \
+ __upper = __high; \
+ if (__high) { \
+ __upper = __high % (base); \
+ __high = __high / (base); \
+ } \
+ asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (base), "0" (__low), "1" (__upper)); \
+ asm("":"=A" (n):"a" (__low),"d" (__high)); \
+ __mod; \
+})
+
+#endif
diff --git a/include/asm-i386/highmem.h b/include/asm-i386/highmem.h
index bd5564aea..d17d108c7 100644
--- a/include/asm-i386/highmem.h
+++ b/include/asm-i386/highmem.h
@@ -18,7 +18,12 @@
#ifndef _ASM_HIGHMEM_H
#define _ASM_HIGHMEM_H
+#ifdef __KERNEL__
+
#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <asm/kmap_types.h>
+#include <asm/pgtable.h>
/* undef for production */
#define HIGHMEM_DEBUG 1
@@ -28,58 +33,79 @@ extern unsigned long highstart_pfn, highend_pfn;
extern pte_t *kmap_pte;
extern pgprot_t kmap_prot;
+extern pte_t *pkmap_page_table;
extern void kmap_init(void) __init;
-/* kmap helper functions necessary to access the highmem pages in kernel */
-#include <asm/pgtable.h>
-#include <asm/kmap_types.h>
+#define PKMAP_BASE (0xff000000UL)
+
+extern unsigned long FASTCALL(kmap_high(struct page *page));
+extern void FASTCALL(kunmap_high(struct page *page));
-extern inline unsigned long kmap(struct page *page, enum km_type type)
+extern inline unsigned long kmap(struct page *page)
{
+ if (in_interrupt())
+ BUG();
if (page < highmem_start_page)
return page_address(page);
- {
- enum fixed_addresses idx = type+KM_TYPE_NR*smp_processor_id();
- unsigned long vaddr = __fix_to_virt(FIX_KMAP_BEGIN+idx);
-
-#if HIGHMEM_DEBUG
- if (!pte_none(*(kmap_pte-idx)))
- {
- __label__ here;
- here:
- printk(KERN_ERR "not null pte on CPU %d from %p\n",
- smp_processor_id(), &&here);
- }
-#endif
- set_pte(kmap_pte-idx, mk_pte(page, kmap_prot));
- __flush_tlb_one(vaddr);
+ return kmap_high(page);
+}
- return vaddr;
- }
+extern inline void kunmap(struct page *page)
+{
+ if (in_interrupt())
+ BUG();
+ if (page < highmem_start_page)
+ return;
+ kunmap_high(page);
}
-extern inline void kunmap(unsigned long vaddr, enum km_type type)
+/*
+ * The use of kmap_atomic/kunmap_atomic is discouraged - kmap/kunmap
+ * gives a more generic (and caching) interface. But kmap_atomic can
+ * be used in IRQ contexts, so in some (very limited) cases we need
+ * it.
+ */
+extern inline unsigned long kmap_atomic(struct page *page, enum km_type type)
{
+ enum fixed_addresses idx;
+ unsigned long vaddr;
+
+ if (page < highmem_start_page)
+ return page_address(page);
+
+ idx = type + KM_TYPE_NR*smp_processor_id();
+ vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
#if HIGHMEM_DEBUG
- enum fixed_addresses idx = type+KM_TYPE_NR*smp_processor_id();
- if ((vaddr & PAGE_MASK) == __fix_to_virt(FIX_KMAP_BEGIN+idx))
- {
- /* force other mappings to Oops if they'll try to access
- this pte without first remap it */
- pte_clear(kmap_pte-idx);
- __flush_tlb_one(vaddr);
- }
+ if (!pte_none(*(kmap_pte-idx)))
+ BUG();
#endif
+ set_pte(kmap_pte-idx, mk_pte(page, kmap_prot));
+ __flush_tlb_one(vaddr);
+
+ return vaddr;
}
-extern inline void kmap_check(void)
+extern inline void kunmap_atomic(unsigned long vaddr, enum km_type type)
{
#if HIGHMEM_DEBUG
- int idx_base = KM_TYPE_NR*smp_processor_id(), i;
- for (i = idx_base; i < idx_base+KM_TYPE_NR; i++)
- if (!pte_none(*(kmap_pte-i)))
- BUG();
+ enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id();
+
+ if (vaddr < FIXADDR_START) // FIXME
+ return;
+
+ if (vaddr != __fix_to_virt(FIX_KMAP_BEGIN+idx))
+ BUG();
+
+ /*
+ * force other mappings to Oops if they'll try to access
+ * this pte without first remap it
+ */
+ pte_clear(kmap_pte-idx);
+ __flush_tlb_one(vaddr);
#endif
}
+
+#endif /* __KERNEL__ */
+
#endif /* _ASM_HIGHMEM_H */
diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h
index 10c7c72b2..75cfb939b 100644
--- a/include/asm-i386/io.h
+++ b/include/asm-i386/io.h
@@ -103,9 +103,8 @@ __OUTS(l)
#ifdef __KERNEL__
-#include <linux/config.h>
-#include <linux/vmalloc.h>
#include <asm/page.h>
+#include <linux/vmalloc.h>
/*
* Temporary debugging check to catch old code using
@@ -205,11 +204,13 @@ extern void iounmap(void *addr);
#define isa_memcpy_fromio(a,b,c) memcpy_fromio((a),__ISA_IO_base + (b),(c))
#define isa_memcpy_toio(a,b,c) memcpy_toio(__ISA_IO_base + (a),(b),(c))
+
/*
* Again, i386 does not require mem IO specific function.
*/
-#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(b),(c),(d))
+#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(b),(c),(d))
+#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(__ISA_IO_base + (b)),(c),(d))
static inline int check_signature(unsigned long io_addr,
const unsigned char *signature, int length)
diff --git a/include/asm-i386/kmap_types.h b/include/asm-i386/kmap_types.h
index b3f16e29b..d92d81b20 100644
--- a/include/asm-i386/kmap_types.h
+++ b/include/asm-i386/kmap_types.h
@@ -2,9 +2,9 @@
#define _ASM_KMAP_TYPES_H
enum km_type {
- KM_READ,
- KM_WRITE,
- KM_TYPE_NR,
+ KM_BOUNCE_READ,
+ KM_BOUNCE_WRITE,
+ KM_TYPE_NR
};
#endif
diff --git a/include/asm-i386/mmx.h b/include/asm-i386/mmx.h
index 721a8e933..46b71da99 100644
--- a/include/asm-i386/mmx.h
+++ b/include/asm-i386/mmx.h
@@ -8,7 +8,7 @@
#include <linux/types.h>
extern void *_mmx_memcpy(void *to, const void *from, size_t size);
-extern void mmx_clear_page(long page);
-extern void mmx_copy_page(long to, long from);
+extern void mmx_clear_page(void *page);
+extern void mmx_copy_page(void *to, void *from);
#endif
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h
index c7109c721..301db5816 100644
--- a/include/asm-i386/page.h
+++ b/include/asm-i386/page.h
@@ -50,9 +50,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define pgd_val(x) ((x).pgd)
#define pgprot_val(x) ((x).pgprot)
-#define __pte(x) ((pte_t) { (x) } )
-#define __pmd(x) ((pmd_t) { (x) } )
-#define __pgd(x) ((pgd_t) { (x) } )
#define __pgprot(x) ((pgprot_t) { (x) } )
#endif /* !__ASSEMBLY__ */
diff --git a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h
index 02f90e21d..3ca3551d3 100644
--- a/include/asm-i386/pgtable-2level.h
+++ b/include/asm-i386/pgtable-2level.h
@@ -57,6 +57,4 @@ extern inline pmd_t * pmd_alloc(pgd_t *pgd, unsigned long address)
return (pmd_t *) pgd;
}
-#define SWP_ENTRY(type,offset) __pte((((type) << 1) | ((offset) << 8)))
-
#endif /* _I386_PGTABLE_2LEVEL_H */
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h
index 99d718115..d9e813def 100644
--- a/include/asm-i386/pgtable-3level.h
+++ b/include/asm-i386/pgtable-3level.h
@@ -121,11 +121,4 @@ extern inline pmd_t * pmd_alloc(pgd_t *pgd, unsigned long address)
return (pmd_t *)pgd_page(*pgd) + address;
}
-/*
- * Subtle. offset can overflow 32 bits and that's a feature - we can do
- * up to 16 TB swap on PAE. (Not that anyone should need that much
- * swapspace, but who knows?)
- */
-#define SWP_ENTRY(type,offset) __pte((((type) << 1) | ((offset) << 8ULL)))
-
#endif /* _I386_PGTABLE_3LEVEL_H */
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
index fdc7b0107..9138abfc3 100644
--- a/include/asm-i386/pgtable.h
+++ b/include/asm-i386/pgtable.h
@@ -293,7 +293,6 @@ extern inline pte_t mk_pte(struct page *page, pgprot_t pgprot)
extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
{ pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; }
-#define page_pte_prot(page,prot) mk_pte(page, prot)
#define page_pte(page) page_pte_prot(page, __pgprot(0))
#define pmd_page(pmd) \
@@ -495,8 +494,12 @@ extern inline void update_mmu_cache(struct vm_area_struct * vma,
{
}
-#define SWP_TYPE(entry) (((pte_val(entry)) >> 1) & 0x3f)
-#define SWP_OFFSET(entry) ((pte_val(entry)) >> 8)
+/* Encode and de-code a swap entry */
+#define SWP_TYPE(x) (((x).val >> 1) & 0x3f)
+#define SWP_OFFSET(x) ((x).val >> 8)
+#define SWP_ENTRY(type, offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
+#define pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
+#define swp_entry_to_pte(x) ((pte_t) { (x).val })
#define module_map vmalloc
#define module_unmap vfree
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h
index ddd5e165e..878c637f7 100644
--- a/include/asm-i386/processor.h
+++ b/include/asm-i386/processor.h
@@ -406,6 +406,10 @@ extern inline unsigned long thread_saved_pc(struct thread_struct *t)
return ((unsigned long *)t->esp)[3];
}
+unsigned long get_wchan(struct task_struct *p);
+#define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1019])
+#define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1022])
+
#define THREAD_SIZE (2*PAGE_SIZE)
#define alloc_task_struct() ((struct task_struct *) __get_free_pages(GFP_KERNEL,1))
#define free_task_struct(p) free_pages((unsigned long) (p), 1)
diff --git a/include/asm-i386/shmparam.h b/include/asm-i386/shmparam.h
index 64472231f..786243a5b 100644
--- a/include/asm-i386/shmparam.h
+++ b/include/asm-i386/shmparam.h
@@ -1,46 +1,6 @@
#ifndef _ASMI386_SHMPARAM_H
#define _ASMI386_SHMPARAM_H
-/* address range for shared memory attaches if no address passed to shmat() */
-#define SHM_RANGE_START 0x50000000
-#define SHM_RANGE_END 0x60000000
-
-/*
- * Format of a swap-entry for shared memory pages currently out in
- * swap space (see also mm/swap.c).
- *
- * SWP_TYPE = SHM_SWP_TYPE
- * SWP_OFFSET is used as follows:
- *
- * bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
- * bits 7..21: index of page within shared memory segment (SHM_IDX)
- * (actually fewer bits get used since SHMMAX is so low)
- */
-
-/*
- * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
- * there is a static array of size SHMMNI.
- */
-#define _SHM_ID_BITS 7
-#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
-
-#define SHM_IDX_SHIFT (_SHM_ID_BITS)
-#define _SHM_IDX_BITS 15
-#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
-
-/*
- * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
- * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
- */
-
-#define SHMMAX 0x2000000 /* max shared seg size (bytes) */
-/* Try not to change the default shipped SHMMAX - people rely on it */
-
-#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
-#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */
-#define SHMALL /* max shm system wide (pages) */ \
- (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
-#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
-#define SHMSEG SHMMNI /* max shared segs per process */
+#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
#endif /* _ASMI386_SHMPARAM_H */
diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h
index e03928ede..ea2e9f85d 100644
--- a/include/asm-i386/string.h
+++ b/include/asm-i386/string.h
@@ -303,6 +303,7 @@ __asm__ __volatile__( \
#include <asm/system.h>
#include <asm/ptrace.h>
#include <linux/smp.h>
+#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <asm/mmx.h>
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index 9cfc401fa..b3cb91024 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -80,7 +80,7 @@
#define __NR_sigpending 73
#define __NR_sethostname 74
#define __NR_setrlimit 75
-#define __NR_getrlimit 76
+#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */
#define __NR_getrusage 77
#define __NR_gettimeofday 78
#define __NR_settimeofday 79
@@ -195,6 +195,7 @@
#define __NR_getpmsg 188 /* some people actually want streams */
#define __NR_putpmsg 189 /* some people actually want streams */
#define __NR_vfork 190
+#define __NR_ugetrlimit 191 /* SuS compliant getrlimit */
/* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */
diff --git a/include/asm-m68k/processor.h b/include/asm-m68k/processor.h
index 7b6564813..7b7c9e094 100644
--- a/include/asm-m68k/processor.h
+++ b/include/asm-m68k/processor.h
@@ -134,6 +134,17 @@ extern inline unsigned long thread_saved_pc(struct thread_struct *t)
return sw->retpc;
}
+unsigned long get_wchan(struct task_struct *p);
+
+#define KSTK_EIP(tsk) \
+ ({ \
+ unsigned long eip = 0; \
+ if ((tsk)->thread.esp0 > PAGE_SIZE && \
+ MAP_NR((tsk)->thread.esp0) < max_mapnr) \
+ eip = ((struct pt_regs *) (tsk)->thread.esp0)->pc; \
+ eip; })
+#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
+
#define THREAD_SIZE (2*PAGE_SIZE)
/* Allocation and freeing of basic task resources. */
diff --git a/include/asm-m68k/shmparam.h b/include/asm-m68k/shmparam.h
index 2b8640c17..558892a2e 100644
--- a/include/asm-m68k/shmparam.h
+++ b/include/asm-m68k/shmparam.h
@@ -1,49 +1,6 @@
#ifndef _M68K_SHMPARAM_H
#define _M68K_SHMPARAM_H
-/* address range for shared memory attaches if no address passed to shmat() */
-#ifndef CONFIG_SUN3
-#define SHM_RANGE_START 0xC0000000
-#define SHM_RANGE_END 0xD0000000
-#else
-#define SHM_RANGE_START 0x0C000000
-#define SHM_RANGE_END 0x0D000000
-#endif
-
-/*
- * Format of a swap-entry for shared memory pages currently out in
- * swap space (see also mm/swap.c).
- *
- * SWP_TYPE = SHM_SWP_TYPE
- * SWP_OFFSET is used as follows:
- *
- * bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
- * bits 7..21: index of page within shared memory segment (SHM_IDX)
- * (actually fewer bits get used since SHMMAX is so low)
- */
-
-/*
- * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
- * there is a static array of size SHMMNI.
- */
-#define _SHM_ID_BITS 7
-#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
-
-#define SHM_IDX_SHIFT (_SHM_ID_BITS)
-#define _SHM_IDX_BITS 15
-#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
-
-/*
- * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
- * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
- */
-
-#define SHMMAX 0x1000000 /* max shared seg size (bytes) */
-#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
-#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */
-#define SHMALL /* max shm system wide (pages) */ \
- (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
-#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
-#define SHMSEG SHMMNI /* max shared segs per process */
+#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
#endif /* _M68K_SHMPARAM_H */
diff --git a/include/asm-m68k/termios.h b/include/asm-m68k/termios.h
index fcc26bf03..07f6b8585 100644
--- a/include/asm-m68k/termios.h
+++ b/include/asm-m68k/termios.h
@@ -61,6 +61,7 @@ struct termio {
#define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */
#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
#define N_HDLC 13 /* synchronous HDLC */
+#define N_SYNC_PPP 14
#ifdef __KERNEL__
diff --git a/include/asm-mips/div64.h b/include/asm-mips/div64.h
new file mode 100644
index 000000000..58a7b437e
--- /dev/null
+++ b/include/asm-mips/div64.h
@@ -0,0 +1,20 @@
+/* $Id: div64.h,v 1.1 2000/01/28 23:18:43 ralf Exp $
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#ifndef _ASM_DIV64_H
+#define _ASM_DIV64_H
+
+/*
+ * Hey, we're already 64-bit, no
+ * need to play games..
+ */
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) n) % (unsigned) base; \
+ n = ((unsigned long) n) / (unsigned) base; \
+ __res; })
+
+#endif /* _ASM_DIV64_H */
diff --git a/include/asm-mips/dma.h b/include/asm-mips/dma.h
index 0805352df..54e938ef4 100644
--- a/include/asm-mips/dma.h
+++ b/include/asm-mips/dma.h
@@ -1,4 +1,4 @@
-/* $Id: dma.h,v 1.5 1999/10/17 19:55:23 harald Exp $
+/* $Id: dma.h,v 1.6 1999/12/30 14:22:47 raiko Exp $
* linux/include/asm/dma.h: Defines for using and allocating dma channels.
* Written by Hennus Bergman, 1992.
* High DMA channel support & info by Hannu Savolainen
@@ -83,11 +83,7 @@
* Deskstations or Acer PICA but not the much more versatile DMA logic used
* for the local devices on Acer PICA or Magnums.
*/
-#if !defined(CONFIG_SGI_IP22) && !defined(CONFIG_DECSTATION)
#define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x01000000)
-#else
-#define MAX_DMA_ADDRESS (~0UL)
-#endif
/* 8237 DMA controllers */
#define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */
diff --git a/include/asm-mips/highmem.h b/include/asm-mips/highmem.h
index fe6b44516..032acd2ee 100644
--- a/include/asm-mips/highmem.h
+++ b/include/asm-mips/highmem.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: highmem.h,v 1.1 2000/01/27 01:05:37 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -19,9 +19,10 @@ extern unsigned long highstart_pfn, highend_pfn;
extern pte_t *kmap_pte;
extern pgprot_t kmap_prot;
-#define kmap_init() do { } while(0)
-#define kmap(page, type) page_address(page)
-#define kunmap(vaddr, type) do { } while(0)
-#define kmap_check() do { } while(0)
+#define kmap_init() do { } while(0)
+#define kmap(page) page_address(page)
+#define kunmap(page) do { } while(0)
+#define kmap_atomic(page, type) page_address(page)
+#define kunmap_atomic(page, type) do { } while(0)
#endif /* _ASM_HIGHMEM_H */
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h
index 176ea2696..f4d11cec5 100644
--- a/include/asm-mips/io.h
+++ b/include/asm-mips/io.h
@@ -1,4 +1,4 @@
-/* $Id: io.h,v 1.8 2000/01/27 01:05:37 ralf Exp $
+/* $Id: io.h,v 1.9 2000/01/27 23:45:30 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -198,7 +198,8 @@ extern inline void iounmap(void *addr)
* We don't have csum_partial_copy_fromio() yet, so we cheat here and
* just copy it. The net code will then do the checksum later.
*/
-#define eth_io_copy_and_sum(skb,src,len,unused) memcpy_fromio((skb)->data,(src),(len))
+#define eth_io_copy_and_sum(skb,src,len,unused) memcpy_fromio((skb)->data,(src),(len))
+#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(b),(c),(d))
static inline int check_signature(unsigned long io_addr,
const unsigned char *signature, int length)
diff --git a/include/asm-mips/offset.h b/include/asm-mips/offset.h
index ba0b87698..93634b6cf 100644
--- a/include/asm-mips/offset.h
+++ b/include/asm-mips/offset.h
@@ -52,7 +52,7 @@
#define TASK_COUNTER 24
#define TASK_PRIORITY 28
#define TASK_MM 792
-#define TASK_STRUCT_SIZE 864
+#define TASK_STRUCT_SIZE 888
/* MIPS specific thread_struct offsets. */
#define THREAD_REG16 568
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index 66ffa79f2..42ce0bdca 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -1,4 +1,4 @@
-/* $Id: pgtable.h,v 1.25 1999/10/09 00:01:43 ralf Exp $
+/* $Id: pgtable.h,v 1.26 2000/01/27 01:05:37 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -402,7 +402,6 @@ extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot));
}
-#define page_pte_prot(page,prot) mk_pte(page, prot)
#define page_pte(page) page_pte_prot(page, __pgprot(0))
/* to find an entry in a kernel page-table-directory */
@@ -618,22 +617,12 @@ extern pgd_t swapper_pg_dir[1024];
extern void update_mmu_cache(struct vm_area_struct *vma,
unsigned long address, pte_t pte);
-/*
- * Non-present pages: high 24 bits are offset, next 8 bits type,
- * low 32 bits zero.
- */
-extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
-{
- pte_t pte; pte_val(pte) = (type << 1) | (offset << 8);
- return pte;
-}
+#define SWP_TYPE(x) (((x).val >> 1) & 0x3f)
+#define SWP_OFFSET(x) ((x).val >> 8)
+#define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
+#define pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
+#define swp_entry_to_pte(x) ((pte_t) { (x).val })
-/*
- * Kernel with 32 bit address space
- */
-#define SWP_TYPE(entry) ((pte_val(entry) >> 1) & 0x3f)
-#define SWP_OFFSET(entry) (pte_val(entry) >> 8)
-#define SWP_ENTRY(type,offset) mk_swap_pte((type),(offset))
#define module_map vmalloc
#define module_unmap vfree
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h
index e5ba85843..72edafb35 100644
--- a/include/asm-mips/processor.h
+++ b/include/asm-mips/processor.h
@@ -1,4 +1,4 @@
-/* $Id: processor.h,v 1.22 1999/12/04 03:59:12 ralf Exp $
+/* $Id: processor.h,v 1.23 2000/01/27 23:45:30 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -215,6 +215,13 @@ extern inline unsigned long thread_saved_pc(struct thread_struct *t)
current->thread.current_ds = USER_DS; \
} while (0)
+unsigned long get_wchan(struct task_struct *p);
+
+#define __PT_REG(reg) ((long)&((struct pt_regs *)0)->reg - sizeof(struct pt_regs))
+#define __KSTK_TOS(tsk) ((unsigned long)(tsk) + KERNEL_STACK_SIZE - 32)
+#define KSTK_EIP(tsk) (*(unsigned long *)(__KSTK_TOS(tsk) + __PT_REG(cp0_epc)))
+#define KSTK_ESP(tsk) (*(unsigned long *)(__KSTK_TOS(tsk) + __PT_REG(regs[29])))
+
/* Allocation and freeing of basic task resources. */
/*
* NOTE! The task struct and the stack go together
diff --git a/include/asm-mips/shmparam.h b/include/asm-mips/shmparam.h
index b4ed1faaf..966fcfe76 100644
--- a/include/asm-mips/shmparam.h
+++ b/include/asm-mips/shmparam.h
@@ -1,49 +1,12 @@
-#ifndef __ASM_MIPS_SHMPARAM_H
-#define __ASM_MIPS_SHMPARAM_H
-
-/* address range for shared memory attaches if no address passed to shmat() */
-#define SHM_RANGE_START 0x50000000
-#define SHM_RANGE_END 0x60000000
-
-/*
- * Format of a swap-entry for shared memory pages currently out in
- * swap space (see also mm/swap.c).
- *
- * SWP_TYPE = SHM_SWP_TYPE
- * SWP_OFFSET is used as follows:
+/* $Id: shmparam.h,v 1.3 2000/01/28 19:46:32 ralf Exp $
*
- * bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
- * bits 7..21: index of page within shared memory segment (SHM_IDX)
- * (actually fewer bits get used since SHMMAX is so low)
- */
-
-/*
- * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
- * there is a static array of size SHMMNI.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*/
-#define _SHM_ID_BITS 7
-#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
+#ifndef _ASM_SHMPARAM_H
+#define _ASM_SHMPARAM_H
-#define SHM_IDX_SHIFT (_SHM_ID_BITS)
-#define _SHM_IDX_BITS 15
-#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
-
-/*
- * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
- * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
- */
-
-#define SHMMAX 0x2000000 /* max shared seg size (bytes) */
-/* Try not to change the default shipped SHMMAX - people rely on it */
-
-#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
-#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */
-#define SHMALL /* max shm system wide (pages) */ \
- (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
-/*
- * This constant is very large but the ABI in it's wisdom says ...
- */
#define SHMLBA 0x40000 /* attach addr a multiple of this */
-#define SHMSEG SHMMNI /* max shared segs per process */
-#endif /* __ASM_MIPS_SHMPARAM_H */
+#endif /* _ASM_SHMPARAM_H */
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index e25140af3..5b8dbbf28 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -1,4 +1,4 @@
-/* $Id: unistd.h,v 1.15 1999/09/28 22:27:18 ralf Exp $
+/* $Id: unistd.h,v 1.16 1999/10/09 00:01:43 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -1196,11 +1196,12 @@
#define __NR_sendfile (__NR_Linux + 207)
#define __NR_getpmsg (__NR_Linux + 208)
#define __NR_putpmsg (__NR_Linux + 209)
+#define __NR_ugetrlimit (__NR_Linux + 210)
/*
* Offset of the last Linux flavoured syscall
*/
-#define __NR_Linux_syscalls 209
+#define __NR_Linux_syscalls 210
#ifndef _LANGUAGE_ASSEMBLY
diff --git a/include/asm-mips64/div64.h b/include/asm-mips64/div64.h
new file mode 100644
index 000000000..bb15c7ac2
--- /dev/null
+++ b/include/asm-mips64/div64.h
@@ -0,0 +1,20 @@
+/* $Id: div64.h,v 1.1 2000/01/28 23:18:55 ralf Exp $
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#ifndef _ASM_DIV64_H
+#define _ASM_DIV64_H
+
+/*
+ * Hey, we're already 64-bit, no
+ * need to play games..
+ */
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) n) % (unsigned) base; \
+ n = ((unsigned long) n) / (unsigned) base; \
+ __res; })
+
+#endif /* _ASM_DIV64_H */
diff --git a/include/asm-mips64/dma.h b/include/asm-mips64/dma.h
index 00da1fb9f..b109ce0ff 100644
--- a/include/asm-mips64/dma.h
+++ b/include/asm-mips64/dma.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: dma.h,v 1.3 1999/12/04 03:59:12 ralf Exp $
*
* linux/include/asm/dma.h: Defines for using and allocating dma channels.
* Written by Hennus Bergman, 1992.
@@ -84,11 +84,7 @@
* Deskstations or Acer PICA but not the much more versatile DMA logic used
* for the local devices on Acer PICA or Magnums.
*/
-#ifndef CONFIG_SGI_IP22
#define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x01000000)
-#else
-#define MAX_DMA_ADDRESS (~0UL)
-#endif
/* 8237 DMA controllers */
#define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */
diff --git a/include/asm-mips64/highmem.h b/include/asm-mips64/highmem.h
index fe6b44516..032acd2ee 100644
--- a/include/asm-mips64/highmem.h
+++ b/include/asm-mips64/highmem.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: highmem.h,v 1.1 2000/01/27 01:05:37 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -19,9 +19,10 @@ extern unsigned long highstart_pfn, highend_pfn;
extern pte_t *kmap_pte;
extern pgprot_t kmap_prot;
-#define kmap_init() do { } while(0)
-#define kmap(page, type) page_address(page)
-#define kunmap(vaddr, type) do { } while(0)
-#define kmap_check() do { } while(0)
+#define kmap_init() do { } while(0)
+#define kmap(page) page_address(page)
+#define kunmap(page) do { } while(0)
+#define kmap_atomic(page, type) page_address(page)
+#define kunmap_atomic(page, type) do { } while(0)
#endif /* _ASM_HIGHMEM_H */
diff --git a/include/asm-mips64/io.h b/include/asm-mips64/io.h
index be76a8910..382627d5b 100644
--- a/include/asm-mips64/io.h
+++ b/include/asm-mips64/io.h
@@ -1,4 +1,4 @@
-/* $Id: io.h,v 1.5 2000/01/27 01:05:37 ralf Exp $
+/* $Id: io.h,v 1.6 2000/01/27 23:45:30 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -12,14 +12,14 @@
#define _ASM_IO_H
#include <linux/config.h>
+#include <asm/addrspace.h>
+#include <asm/page.h>
/*
* Slowdown I/O port space accesses for antique hardware.
*/
#undef CONF_SLOWDOWN_IO
-#include <asm/addrspace.h>
-
/*
* This file contains the definitions for the MIPS counterpart of the
* x86 in/out instructions. This heap of macros and C results in much
@@ -73,12 +73,12 @@ extern unsigned long mips_io_port_base;
*/
extern inline unsigned long virt_to_phys(volatile void * address)
{
- return PHYSADDR(address);
+ return (unsigned long)address - PAGE_OFFSET;
}
extern inline void * phys_to_virt(unsigned long address)
{
- return (void *)KSEG0ADDR(address);
+ return (void *)(address + PAGE_OFFSET);
}
extern void * ioremap(unsigned long phys_addr, unsigned long size);
@@ -86,15 +86,16 @@ extern void iounmap(void *addr);
/*
* IO bus memory addresses are also 1:1 with the physical address
+ * This simplistic model doesn't hold for the Origin.
*/
extern inline unsigned long virt_to_bus(volatile void * address)
{
- return PHYSADDR(address);
+ return (unsigned long)address - PAGE_OFFSET;
}
extern inline void * bus_to_virt(unsigned long address)
{
- return (void *)KSEG0ADDR(address);
+ return (void *)(address + PAGE_OFFSET);
}
/*
@@ -181,7 +182,8 @@ extern inline void iounmap(void *addr)
* We don't have csum_partial_copy_fromio() yet, so we cheat here and
* just copy it. The net code will then do the checksum later.
*/
-#define eth_io_copy_and_sum(skb,src,len,unused) memcpy_fromio((skb)->data,(src),(len))
+#define eth_io_copy_and_sum(skb,src,len,unused) memcpy_fromio((skb)->data,(src),(len))
+#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(b),(c),(d))
static inline int
check_signature(unsigned long io_addr, const unsigned char *signature,
diff --git a/include/asm-mips64/offset.h b/include/asm-mips64/offset.h
index 8fc30f570..a7711ea2d 100644
--- a/include/asm-mips64/offset.h
+++ b/include/asm-mips64/offset.h
@@ -52,7 +52,7 @@
#define TASK_COUNTER 48
#define TASK_PRIORITY 56
#define TASK_MM 1304
-#define TASK_STRUCT_SIZE 1400
+#define TASK_STRUCT_SIZE 1448
/* MIPS specific thread_struct offsets. */
#define THREAD_REG16 864
diff --git a/include/asm-mips64/pgtable.h b/include/asm-mips64/pgtable.h
index 76ebeb925..f45b89b1f 100644
--- a/include/asm-mips64/pgtable.h
+++ b/include/asm-mips64/pgtable.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: pgtable.h,v 1.5 2000/01/27 01:05:37 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -425,7 +425,6 @@ extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot));
}
-#define page_pte_prot(page,prot) mk_pte(page, prot)
#define page_pte(page) page_pte_prot(page, __pgprot(0))
/* to find an entry in a kernel page-table-directory */
@@ -657,19 +656,11 @@ extern pgd_t swapper_pg_dir[1024];
extern void (*update_mmu_cache)(struct vm_area_struct *vma,
unsigned long address, pte_t pte);
-/*
- * Non-present pages: high 24 bits are offset, next 8 bits type,
- * low 32 bits zero.
- */
-extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
-{
- pte_t pte; pte_val(pte) = (type << 32) | (offset << 40);
- return pte;
-}
-
-#define SWP_TYPE(entry) ((pte_val(entry) >> 32) & 0xff)
-#define SWP_OFFSET(entry) (pte_val(entry) >> 40)
-#define SWP_ENTRY(type,offset) mk_swap_pte((type),(offset))
+#define SWP_TYPE(x) (((x).val >> 32) & 0xff)
+#define SWP_OFFSET(x) ((x).val >> 40)
+#define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 32) | ((offset) << 40) })
+#define pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
+#define swp_entry_to_pte(x) ((pte_t) { (x).val })
#define module_map vmalloc
#define module_unmap vfree
diff --git a/include/asm-mips64/processor.h b/include/asm-mips64/processor.h
index b79dfceb2..188f9cce0 100644
--- a/include/asm-mips64/processor.h
+++ b/include/asm-mips64/processor.h
@@ -1,4 +1,4 @@
-/* $Id: processor.h,v 1.6 2000/01/17 23:32:47 ralf Exp $
+/* $Id: processor.h,v 1.7 2000/01/27 23:45:30 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -221,6 +221,13 @@ extern int (*user_mode)(struct pt_regs *);
current->thread.current_ds = USER_DS; \
} while (0)
+unsigned long get_wchan(struct task_struct *p);
+
+#define __PT_REG(reg) ((long)&((struct pt_regs *)0)->reg - sizeof(struct pt_regs))
+#define __KSTK_TOS(tsk) ((unsigned long)(tsk) + KERNEL_STACK_SIZE - 32)
+#define KSTK_EIP(tsk) (*(unsigned long *)(__KSTK_TOS(tsk) + __PT_REG(cp0_epc)))
+#define KSTK_ESP(tsk) (*(unsigned long *)(__KSTK_TOS(tsk) + __PT_REG(regs[29])))
+
/* Allocation and freeing of basic task resources. */
/*
* NOTE! The task struct and the stack go together
diff --git a/include/asm-mips64/shmparam.h b/include/asm-mips64/shmparam.h
index f20fd19a6..9107b35a7 100644
--- a/include/asm-mips64/shmparam.h
+++ b/include/asm-mips64/shmparam.h
@@ -1,58 +1,12 @@
-/* $Id$
+/* $Id: shmparam.h,v 1.1 1999/08/19 22:56:35 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
- *
- * XXX These are obviously wrong for an 64-bit OS, let's see how we divide
- * the address space later ...
*/
#ifndef _ASM_SHMPARAM_H
#define _ASM_SHMPARAM_H
-/* address range for shared memory attaches if no address passed to shmat() */
-#define SHM_RANGE_START 0x50000000
-#define SHM_RANGE_END 0x60000000
-
-/*
- * Format of a swap-entry for shared memory pages currently out in
- * swap space (see also mm/swap.c).
- *
- * SWP_TYPE = SHM_SWP_TYPE
- * SWP_OFFSET is used as follows:
- *
- * bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
- * bits 7..21: index of page within shared memory segment (SHM_IDX)
- * (actually fewer bits get used since SHMMAX is so low)
- */
-
-/*
- * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
- * there is a static array of size SHMMNI.
- */
-#define _SHM_ID_BITS 7
-#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
-
-#define SHM_IDX_SHIFT (_SHM_ID_BITS)
-#define _SHM_IDX_BITS 15
-#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
-
-/*
- * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
- * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
- */
-
-#define SHMMAX 0x2000000 /* max shared seg size (bytes) */
-/* Try not to change the default shipped SHMMAX - people rely on it */
-
-#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
-#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */
-#define SHMALL /* max shm system wide (pages) */ \
- (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
-/*
- * This constant is very large but the ABI in it's wisdom says ...
- */
#define SHMLBA 0x40000 /* attach addr a multiple of this */
-#define SHMSEG SHMMNI /* max shared segs per process */
#endif /* _ASM_SHMPARAM_H */
diff --git a/include/asm-mips64/unistd.h b/include/asm-mips64/unistd.h
index 71b27faaa..ae9b7123c 100644
--- a/include/asm-mips64/unistd.h
+++ b/include/asm-mips64/unistd.h
@@ -1,4 +1,4 @@
-/* $Id: unistd.h,v 1.5 1999/12/04 03:59:12 ralf Exp $
+/* $Id: unistd.h,v 1.6 2000/01/16 01:44:34 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -1195,11 +1195,12 @@
#define __NR_Linux32_sendfile (__NR_Linux32 + 207)
#define __NR_Linux32_getpmsg (__NR_Linux32 + 208)
#define __NR_Linux32_putpmsg (__NR_Linux32 + 209)
+#define __NR_Linux32_ugetrlimit (__NR_Linux32 + 210)
/*
* Offset of the last Linux o32 flavoured syscall
*/
-#define __NR_Linux32_syscalls 209
+#define __NR_Linux32_syscalls 210
/*
* Linux 64-bit syscalls are in the range from 5000 to 5999.
@@ -1415,11 +1416,12 @@
#define __NR_sendfile (__NR_Linux + 207)
#define __NR_getpmsg (__NR_Linux + 208)
#define __NR_putpmsg (__NR_Linux + 209)
+#define __NR_ugetrlimit (__NR_Linux + 210)
/*
* Offset of the last Linux flavoured syscall
*/
-#define __NR_Linux_syscalls 209
+#define __NR_Linux_syscalls 210
#ifndef _LANGUAGE_ASSEMBLY
diff --git a/include/asm-ppc/amigaints.h b/include/asm-ppc/amigaints.h
index 2de0f46e7..c7a50189e 100644
--- a/include/asm-ppc/amigaints.h
+++ b/include/asm-ppc/amigaints.h
@@ -1 +1,135 @@
-#include <asm-m68k/amigaints.h>
+/*
+** amigaints.h -- Amiga Linux interrupt handling structs and prototypes
+**
+** Copyright 1992 by Greg Harp
+**
+** This file is subject to the terms and conditions of the GNU General Public
+** License. See the file COPYING in the main directory of this archive
+** for more details.
+**
+** Created 10/2/92 by Greg Harp
+*/
+
+#ifndef _ASMm68k_AMIGAINTS_H_
+#define _ASMm68k_AMIGAINTS_H_
+
+/*
+** Amiga Interrupt sources.
+**
+*/
+
+#define AUTO_IRQS (8)
+#define AMI_STD_IRQS (14)
+#define CIA_IRQS (5)
+#define AMI_IRQS (32) /* AUTO_IRQS+AMI_STD_IRQS+2*CIA_IRQS */
+
+/* vertical blanking interrupt */
+#define IRQ_AMIGA_VERTB 0
+
+/* copper interrupt */
+#define IRQ_AMIGA_COPPER 1
+
+/* Audio interrupts */
+#define IRQ_AMIGA_AUD0 2
+#define IRQ_AMIGA_AUD1 3
+#define IRQ_AMIGA_AUD2 4
+#define IRQ_AMIGA_AUD3 5
+
+/* Blitter done interrupt */
+#define IRQ_AMIGA_BLIT 6
+
+/* floppy disk interrupts */
+#define IRQ_AMIGA_DSKSYN 7
+#define IRQ_AMIGA_DSKBLK 8
+
+/* builtin serial port interrupts */
+#define IRQ_AMIGA_RBF 9
+#define IRQ_AMIGA_TBE 10
+
+/* software interrupts */
+#define IRQ_AMIGA_SOFT 11
+
+/* interrupts from external hardware */
+#define IRQ_AMIGA_PORTS 12
+#define IRQ_AMIGA_EXTER 13
+
+/* CIA interrupt sources */
+#define IRQ_AMIGA_CIAA 14
+#define IRQ_AMIGA_CIAA_TA 14
+#define IRQ_AMIGA_CIAA_TB 15
+#define IRQ_AMIGA_CIAA_ALRM 16
+#define IRQ_AMIGA_CIAA_SP 17
+#define IRQ_AMIGA_CIAA_FLG 18
+#define IRQ_AMIGA_CIAB 19
+#define IRQ_AMIGA_CIAB_TA 19
+#define IRQ_AMIGA_CIAB_TB 20
+#define IRQ_AMIGA_CIAB_ALRM 21
+#define IRQ_AMIGA_CIAB_SP 22
+#define IRQ_AMIGA_CIAB_FLG 23
+
+/* auto-vector interrupts */
+#define IRQ_AMIGA_AUTO 24
+#define IRQ_AMIGA_AUTO_0 24 /* This is just a dummy */
+#define IRQ_AMIGA_AUTO_1 25
+#define IRQ_AMIGA_AUTO_2 26
+#define IRQ_AMIGA_AUTO_3 27
+#define IRQ_AMIGA_AUTO_4 28
+#define IRQ_AMIGA_AUTO_5 29
+#define IRQ_AMIGA_AUTO_6 30
+#define IRQ_AMIGA_AUTO_7 31
+
+#define IRQ_FLOPPY IRQ_AMIGA_DSKBLK
+
+/* INTREQR masks */
+#define IRQ1_MASK 0x0007 /* INTREQR mask for IRQ 1 */
+#define IRQ2_MASK 0x0008 /* INTREQR mask for IRQ 2 */
+#define IRQ3_MASK 0x0070 /* INTREQR mask for IRQ 3 */
+#define IRQ4_MASK 0x0780 /* INTREQR mask for IRQ 4 */
+#define IRQ5_MASK 0x1800 /* INTREQR mask for IRQ 5 */
+#define IRQ6_MASK 0x2000 /* INTREQR mask for IRQ 6 */
+#define IRQ7_MASK 0x4000 /* INTREQR mask for IRQ 7 */
+
+#define IF_SETCLR 0x8000 /* set/clr bit */
+#define IF_INTEN 0x4000 /* master interrupt bit in INT* registers */
+#define IF_EXTER 0x2000 /* external level 6 and CIA B interrupt */
+#define IF_DSKSYN 0x1000 /* disk sync interrupt */
+#define IF_RBF 0x0800 /* serial receive buffer full interrupt */
+#define IF_AUD3 0x0400 /* audio channel 3 done interrupt */
+#define IF_AUD2 0x0200 /* audio channel 2 done interrupt */
+#define IF_AUD1 0x0100 /* audio channel 1 done interrupt */
+#define IF_AUD0 0x0080 /* audio channel 0 done interrupt */
+#define IF_BLIT 0x0040 /* blitter done interrupt */
+#define IF_VERTB 0x0020 /* vertical blanking interrupt */
+#define IF_COPER 0x0010 /* copper interrupt */
+#define IF_PORTS 0x0008 /* external level 2 and CIA A interrupt */
+#define IF_SOFT 0x0004 /* software initiated interrupt */
+#define IF_DSKBLK 0x0002 /* diskblock DMA finished */
+#define IF_TBE 0x0001 /* serial transmit buffer empty interrupt */
+
+struct irq_server {
+ unsigned short count, reentrance;
+};
+
+extern void amiga_do_irq(int irq, struct pt_regs *fp);
+extern void amiga_do_irq_list(int irq, struct pt_regs *fp, struct irq_server *server);
+
+/* CIA interrupt control register bits */
+
+#define CIA_ICR_TA 0x01
+#define CIA_ICR_TB 0x02
+#define CIA_ICR_ALRM 0x04
+#define CIA_ICR_SP 0x08
+#define CIA_ICR_FLG 0x10
+#define CIA_ICR_ALL 0x1f
+#define CIA_ICR_SETCLR 0x80
+
+/* to access the interrupt control registers of CIA's use only
+** these functions, they behave exactly like the amiga os routines
+*/
+
+extern struct ciabase ciaa_base, ciab_base;
+
+extern unsigned char cia_set_irq(unsigned int irq, int set);
+extern unsigned char cia_able_irq(unsigned int irq, int enable);
+
+#endif /* asm-m68k/amigaints.h */
diff --git a/include/asm-ppc/div64.h b/include/asm-ppc/div64.h
new file mode 100644
index 000000000..114e6ab34
--- /dev/null
+++ b/include/asm-ppc/div64.h
@@ -0,0 +1,10 @@
+#ifndef __PPC_DIV64
+#define __PPC_DIV64
+
+#define do_div(n,base) ({ \
+int __res; \
+__res = ((unsigned long) n) % (unsigned) base; \
+n = ((unsigned long) n) / (unsigned) base; \
+__res; })
+
+#endif
diff --git a/include/asm-ppc/fcntl.h b/include/asm-ppc/fcntl.h
index a1f3aa7f7..c1b149d47 100644
--- a/include/asm-ppc/fcntl.h
+++ b/include/asm-ppc/fcntl.h
@@ -3,21 +3,23 @@
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
-#define O_CREAT 0100 /* not fcntl */
-#define O_EXCL 0200 /* not fcntl */
-#define O_NOCTTY 0400 /* not fcntl */
-#define O_TRUNC 01000 /* not fcntl */
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
+#define O_ACCMODE 0003
+#define O_RDONLY 00
+#define O_WRONLY 01
+#define O_RDWR 02
+#define O_CREAT 0100 /* not fcntl */
+#define O_EXCL 0200 /* not fcntl */
+#define O_NOCTTY 0400 /* not fcntl */
+#define O_TRUNC 01000 /* not fcntl */
+#define O_APPEND 02000
+#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
-#define O_SYNC 010000
-#define FASYNC 020000 /* fcntl, for BSD compatibility */
-#define O_DIRECTORY 040000 /* must be a directory */
-#define O_NOFOLLOW 0100000 /* don't follow links */
+#define O_SYNC 010000
+#define FASYNC 020000 /* fcntl, for BSD compatibility */
+#define O_DIRECTORY 040000 /* must be a directory */
+#define O_NOFOLLOW 0100000 /* don't follow links */
+#define O_LARGEFILE 0200000
+#define O_DIRECT 0400000 /* direct disk access hint - currently ignored */
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get f_flags */
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
index 673d74397..c62d78c79 100644
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -629,9 +629,12 @@ extern void flush_hash_segments(unsigned low_vsid, unsigned high_vsid);
extern void flush_hash_page(unsigned context, unsigned long va);
-#define SWP_TYPE(entry) (((pte_val(entry)) >> 1) & 0x7f)
-#define SWP_OFFSET(entry) ((pte_val(entry)) >> 8)
-#define SWP_ENTRY(type,offset) __pte(((type) << 1) | ((offset) << 8))
+/* Encode and de-code a swap entry */
+#define SWP_TYPE(entry) (((entry).val >> 1) & 0x3f)
+#define SWP_OFFSET(entry) ((entry).val >> 8)
+#define SWP_ENTRY(type,offset) ((swp_entry_t) { (((type) << 1) | ((offset) << 8)) })
+#define pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
+#define swp_entry_to_pte(x) ((pte_t) { (x).val })
#define module_map vmalloc
#define module_unmap vfree
diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
index 974f78a47..a78c75b4e 100644
--- a/include/asm-ppc/processor.h
+++ b/include/asm-ppc/processor.h
@@ -17,6 +17,7 @@
#define MSR_SF (1<<63)
#define MSR_ISF (1<<61)
#endif /* CONFIG_PPC64 */
+#define MSR_VEC (1<<25) /* Enable AltiVec */
#define MSR_POW (1<<18) /* Enable Power Management */
#define MSR_TGPR (1<<17) /* TLB Update registers in use */
#define MSR_ILE (1<<16) /* Interrupt Little-Endian enable */
@@ -249,6 +250,7 @@ extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
/* Lazy FPU handling on uni-processor */
extern struct task_struct *last_task_used_math;
+extern struct task_struct *last_task_used_altivec;
/*
* this is the minimum allowable io space due to the location
@@ -277,6 +279,9 @@ struct thread_struct {
double fpr[32]; /* Complete floating point set */
unsigned long fpscr_pad; /* fpr ... fpscr must be contiguous */
unsigned long fpscr; /* Floating point status */
+ unsigned long vrf[128];
+ unsigned long vscr;
+ unsigned long vrsave;
};
#define INIT_SP (sizeof(init_stack) + (unsigned long) &init_stack)
@@ -311,6 +316,11 @@ static inline unsigned long thread_saved_pc(struct thread_struct *t)
#define release_segments(mm) do { } while (0)
#define forget_segments() do { } while (0)
+unsigned long get_wchan(struct task_struct *p);
+
+#define KSTK_EIP(tsk) ((tsk)->thread.regs->nip)
+#define KSTK_ESP(tsk) ((tsk)->thread.regs->gpr[1])
+
/*
* NOTE! The task struct and the stack go together
*/
diff --git a/include/asm-ppc/shmparam.h b/include/asm-ppc/shmparam.h
index 3ece6775b..d6250602a 100644
--- a/include/asm-ppc/shmparam.h
+++ b/include/asm-ppc/shmparam.h
@@ -1,44 +1,6 @@
#ifndef _PPC_SHMPARAM_H
#define _PPC_SHMPARAM_H
-/* address range for shared memory attaches if no address passed to shmat() */
-#define SHM_RANGE_START 0x50000000
-#define SHM_RANGE_END 0x60000000
-
-/*
- * Format of a swap-entry for shared memory pages currently out in
- * swap space (see also mm/swap.c).
- *
- * SWP_TYPE = SHM_SWP_TYPE
- * SWP_OFFSET is used as follows:
- *
- * bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
- * bits 7..21: index of page within shared memory segment (SHM_IDX)
- * (actually fewer bits get used since SHMMAX is so low)
- */
-
-/*
- * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
- * there is a static array of size SHMMNI.
- */
-#define _SHM_ID_BITS 7
-#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
-
-#define SHM_IDX_SHIFT (_SHM_ID_BITS)
-#define _SHM_IDX_BITS 15
-#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
-
-/*
- * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
- * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
- */
-
-#define SHMMAX 0x2000000 /* max shared seg size (bytes) */
-#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
-#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */
-#define SHMALL /* max shm system wide (pages) */ \
- (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
-#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
-#define SHMSEG SHMMNI /* max shared segs per process */
+#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
#endif /* _PPC_SHMPARAM_H */
diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h
index 2bf822e33..f6b2013ad 100644
--- a/include/asm-ppc/system.h
+++ b/include/asm-ppc/system.h
@@ -61,6 +61,8 @@ extern void read_rtc_time(void);
extern void pmac_find_display(void);
extern void giveup_fpu(struct task_struct *);
extern void enable_kernel_fp(void);
+extern void giveup_altivec(struct task_struct *);
+extern void load_up_altivec(struct task_struct *);
extern void cvt_fd(float *from, double *to, unsigned long *fpscr);
extern void cvt_df(double *from, float *to, unsigned long *fpscr);
extern int call_rtas(const char *, int, int, unsigned long *, ...);
diff --git a/include/asm-ppc/termios.h b/include/asm-ppc/termios.h
index a234aff15..e74609c13 100644
--- a/include/asm-ppc/termios.h
+++ b/include/asm-ppc/termios.h
@@ -185,6 +185,7 @@ struct termio {
#define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */
#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
#define N_HDLC 13 /* synchronous HDLC */
+#define N_SYNC_PPP 14
#ifdef __KERNEL__
diff --git a/include/asm-sh/bitops.h b/include/asm-sh/bitops.h
index de026bcd2..bf0d00c0a 100644
--- a/include/asm-sh/bitops.h
+++ b/include/asm-sh/bitops.h
@@ -96,7 +96,7 @@ extern __inline__ int test_and_change_bit(int nr, void * addr)
extern __inline__ int test_bit(int nr, const void *addr)
{
- return 1UL & (((const int *) addr)[nr >> 5] >> (nr & 31));
+ return 1UL & (((const unsigned int *) addr)[nr >> 5] >> (nr & 31));
}
extern __inline__ unsigned long ffz(unsigned long word)
@@ -107,8 +107,8 @@ extern __inline__ unsigned long ffz(unsigned long word)
"shlr %1\n\t"
"bt/s 1b\n\t"
" add #1, %0"
- : "=r" (result)
- : "r" (word), "0" (~0L));
+ : "=r" (result), "=r" (word)
+ : "0" (~0L), "1" (word));
return result;
}
@@ -151,10 +151,18 @@ found_middle:
#define find_first_zero_bit(addr, size) \
find_next_zero_bit((addr), (size), 0)
+#ifdef __LITTLE_ENDIAN__
+#define ext2_set_bit(nr, addr) test_and_set_bit((nr), (addr))
+#define ext2_clear_bit(nr, addr) test_and_clear_bit((nr), (addr))
+#define ext2_test_bit(nr, addr) test_bit((nr), (addr))
+#define ext2_find_first_zero_bit(addr, size) find_first_zero_bit((addr), (size))
+#define ext2_find_next_zero_bit(addr, size, offset) \
+ find_next_zero_bit((addr), (size), (offset))
+#else
extern __inline__ int ext2_set_bit(int nr,void * addr)
{
int mask, retval;
- unsigned long flags;
+ unsigned long flags;
unsigned char *ADDR = (unsigned char *) addr;
ADDR += nr >> 3;
@@ -169,7 +177,7 @@ extern __inline__ int ext2_set_bit(int nr,void * addr)
extern __inline__ int ext2_clear_bit(int nr, void * addr)
{
int mask, retval;
- unsigned long flags;
+ unsigned long flags;
unsigned char *ADDR = (unsigned char *) addr;
ADDR += nr >> 3;
@@ -243,6 +251,7 @@ found_first:
found_middle:
return result + ffz(__swab32(tmp));
}
+#endif
/* Bitmap functions for the minix filesystem. */
#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h
index 57f0367b0..dd9205b32 100644
--- a/include/asm-sh/io.h
+++ b/include/asm-sh/io.h
@@ -72,6 +72,24 @@ 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);
@@ -87,6 +105,24 @@ extern __inline__ void outl(unsigned int b, unsigned long addr)
return writel(b,addr);
}
+extern __inline__ void outsb(unsigned long addr, const void *buffer, int count)
+{
+ const unsigned char *buf=buffer;
+ while(count--) outb(*buf++, addr);
+}
+
+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);
+}
+
extern __inline__ unsigned long ctrl_inb(unsigned long addr)
{
return *(volatile unsigned char*)addr;
diff --git a/include/asm-sh/ioctls.h b/include/asm-sh/ioctls.h
index 3905e572c..5d3e2cd24 100644
--- a/include/asm-sh/ioctls.h
+++ b/include/asm-sh/ioctls.h
@@ -10,10 +10,10 @@
#define FIONREAD _IOR('f', 127, int)
#define TIOCINQ FIONREAD
-#define TCGETS _IOR('t', 19, struct termios)
-#define TCSETS _IOW('t', 20, struct termios)
-#define TCSETSW _IOW('t', 21, struct termios)
-#define TCSETSF _IOW('t', 22, struct termios)
+#define TCGETS 0x5401
+#define TCSETS 0x5402
+#define TCSETSW 0x5403
+#define TCSETSF 0x5404
#define TCGETA _IOR('t', 23, struct termio)
#define TCSETA _IOW('t', 24, struct termio)
@@ -84,8 +84,8 @@
#define TIOCSERCONFIG _IO('T', 83) /* 0x5453 */
#define TIOCSERGWILD _IOR('T', 84, int) /* 0x5454 */
#define TIOCSERSWILD _IOW('T', 85, int) /* 0x5455 */
-#define TIOCGLCKTRMIOS _IOR('T', 86, struct termios) /* 0x5456 */
-#define TIOCSLCKTRMIOS _IOW('T', 87, struct termios) /* 0x5457 */
+#define TIOCGLCKTRMIOS 0x5456
+#define TIOCSLCKTRMIOS 0x5457
#define TIOCSERGSTRUCT _IOR('T', 88, struct async_struct) /* 0x5458 */ /* For debugging only */
#define TIOCSERGETLSR _IOR('T', 89, unsigned int) /* 0x5459 */ /* Get line status register */
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h
index a1c06075b..f05fd7ac3 100644
--- a/include/asm-sh/irq.h
+++ b/include/asm-sh/irq.h
@@ -9,10 +9,13 @@
*
*/
+#include <linux/config.h>
+
#define TIMER_IRQ 16 /* Hard-wired */
#define TIMER_IRP_OFFSET 12
#define TIMER_PRIORITY 1
+#if defined(__SH4__)
/*
* 48 = 32+16
*
@@ -21,6 +24,11 @@
*
*/
#define NR_IRQS 48
+#elif defined(CONFIG_CPU_SUBTYPE_SH7708)
+#define NR_IRQS 32
+#elif defined(CONFIG_CPU_SUBTYPE_SH7709)
+#define NR_IRQS 61
+#endif
extern void disable_irq(unsigned int);
extern void disable_irq_nosync(unsigned int);
diff --git a/include/asm-sh/mmu_context.h b/include/asm-sh/mmu_context.h
index aca17690f..e16a7d775 100644
--- a/include/asm-sh/mmu_context.h
+++ b/include/asm-sh/mmu_context.h
@@ -16,10 +16,13 @@
*/
extern unsigned long mmu_context_cache;
-#define MMU_CONTEXT_ASID_MASK 0xff
-#define MMU_CONTEXT_VERSION_MASK 0xffffff00
-#define MMU_CONTEXT_FIRST_VERSION 0x100
-#define NO_CONTEXT 0
+#define MMU_CONTEXT_ASID_MASK 0x000000ff
+#define MMU_CONTEXT_VERSION_MASK 0xffffff00
+#define MMU_CONTEXT_FIRST_VERSION 0x00000100
+#define NO_CONTEXT 0
+
+/* ASID is 8-bit value, so it can't be 0x100 */
+#define MMU_NO_ASID 0x100
extern __inline__ void
get_new_mmu_context(struct mm_struct *mm)
@@ -34,7 +37,7 @@ get_new_mmu_context(struct mm_struct *mm)
flush_tlb_all();
/* Fix version if needed.
Note that we avoid version #0 to distingush NO_CONTEXT. */
- if (!mc)
+ if (!mc)
mmu_context_cache = mc = MMU_CONTEXT_FIRST_VERSION;
}
mm->context = mc;
@@ -71,7 +74,7 @@ extern __inline__ void init_new_context(struct task_struct *tsk,
*/
extern __inline__ void destroy_context(struct mm_struct *mm)
{
- mm->context = NO_CONTEXT;
+ /* Do nothing */
}
/* Other MMU related constants. */
@@ -84,11 +87,11 @@ extern __inline__ void destroy_context(struct mm_struct *mm)
#define MMUCR 0xFFFFFFE0 /* MMU Control Register */
-#define MMU_TLB_ADDRESS_ARRAY 0xF2000000
-#define MMU_PAGE_ASSOC_BIT 0x80
+#define MMU_TLB_ADDRESS_ARRAY 0xF2000000
+#define MMU_PAGE_ASSOC_BIT 0x80
-#define MMU_NTLB_ENTRIES 128 /* for 7708 */
-#define MMU_CONTROL_INIT 0x007 /* SV=0, TF=1, IX=1, AT=1 */
+#define MMU_NTLB_ENTRIES 128 /* for 7708 */
+#define MMU_CONTROL_INIT 0x007 /* SV=0, TF=1, IX=1, AT=1 */
#elif defined(__SH4__)
#define MMU_PTEH 0xFF000000 /* Page table entry register HIGH */
@@ -98,26 +101,26 @@ extern __inline__ void destroy_context(struct mm_struct *mm)
#define MMUCR 0xFF000010 /* MMU Control Register */
-#define MMU_ITLB_ADDRESS_ARRAY 0xF2000000
-#define MMU_UTLB_ADDRESS_ARRAY 0xF6000000
-#define MMU_PAGE_ASSOC_BIT 0x80
+#define MMU_ITLB_ADDRESS_ARRAY 0xF2000000
+#define MMU_UTLB_ADDRESS_ARRAY 0xF6000000
+#define MMU_PAGE_ASSOC_BIT 0x80
-#define MMU_NTLB_ENTRIES 64 /* for 7750 */
-#define MMU_CONTROL_INIT 0x205 /* SQMD=1, SV=0, TI=1, AT=1 */
+#define MMU_NTLB_ENTRIES 64 /* for 7750 */
+#define MMU_CONTROL_INIT 0x205 /* SQMD=1, SV=0, TI=1, AT=1 */
#endif
-extern __inline__ void set_asid (unsigned long asid)
+extern __inline__ void set_asid(unsigned long asid)
{
__asm__ __volatile__ ("mov.l %0,%1"
: /* no output */
: "r" (asid), "m" (__m(MMU_PTEH)));
}
-extern __inline__ unsigned long get_asid (void)
+extern __inline__ unsigned long get_asid(void)
{
unsigned long asid;
- __asm__ __volatile__ ("mov.l %1,%0"
+ __asm__ __volatile__ ("mov.l %1,%0"
: "=r" (asid)
: "m" (__m(MMU_PTEH)));
asid &= MMU_CONTEXT_ASID_MASK;
@@ -143,8 +146,9 @@ extern __inline__ void switch_mm(struct mm_struct *prev,
if (prev != next) {
unsigned long __pgdir = (unsigned long)next->pgd;
- __asm__ __volatile__("mov.l %0,%1": \
- :"r" (__pgdir), "m" (__m(MMU_TTB)));
+ __asm__ __volatile__("mov.l %0,%1"
+ : /* no output */
+ : "r" (__pgdir), "m" (__m(MMU_TTB)));
activate_context(next);
clear_bit(cpu, &prev->cpu_vm_mask);
}
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h
index 228c8d2d8..867c07122 100644
--- a/include/asm-sh/page.h
+++ b/include/asm-sh/page.h
@@ -39,9 +39,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define pgd_val(x) ((x).pgd)
#define pgprot_val(x) ((x).pgprot)
-#define __pte(x) ((pte_t) { (x) } )
-#define __pmd(x) ((pmd_t) { (x) } )
-#define __pgd(x) ((pgd_t) { (x) } )
#define __pgprot(x) ((pgprot_t) { (x) } )
#endif /* !__ASSEMBLY__ */
@@ -56,13 +53,12 @@ typedef struct { unsigned long pgprot; } pgprot_t;
*
* which has the same constant encoded..
*/
-#define __PAGE_OFFSET (0x80000000)
#define __MEMORY_START CONFIG_MEMORY_START
-#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET+__MEMORY_START)
-#define __pa(x) ((unsigned long)(x)-__PAGE_OFFSET)
-#define __va(x) ((void *)((unsigned long)(x)+__PAGE_OFFSET))
+#define PAGE_OFFSET (0x80000000)
+#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
+#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
#define MAP_NR(addr) ((__pa(addr)-__MEMORY_START) >> PAGE_SHIFT)
#ifndef __ASSEMBLY__
@@ -74,7 +70,6 @@ extern int console_loglevel;
*/
#define BUG() do { \
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
- console_loglevel = 0; \
asm volatile("nop"); \
} while (0)
diff --git a/include/asm-sh/pgtable-2level.h b/include/asm-sh/pgtable-2level.h
index ebfa410b3..2ec0bcbcc 100644
--- a/include/asm-sh/pgtable-2level.h
+++ b/include/asm-sh/pgtable-2level.h
@@ -32,7 +32,7 @@
extern inline int pgd_none(pgd_t pgd) { return 0; }
extern inline int pgd_bad(pgd_t pgd) { return 0; }
extern inline int pgd_present(pgd_t pgd) { return 1; }
-#define pgd_clear(xp) do { pgd_val(*(xp)) = 0; } while (0)
+#define pgd_clear(xp) do { } while (0)
#define pgd_page(pgd) \
((unsigned long) __va(pgd_val(pgd) & PAGE_MASK))
@@ -57,6 +57,4 @@ extern inline pmd_t * pmd_alloc(pgd_t *pgd, unsigned long address)
return (pmd_t *) pgd;
}
-#define SWP_ENTRY(type,offset) __pte((((type) << 1) | ((offset) << 8)))
-
#endif /* __ASM_SH_PGTABLE_2LEVEL_H */
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h
index 7ea944afa..97a9a3ad8 100644
--- a/include/asm-sh/pgtable.h
+++ b/include/asm-sh/pgtable.h
@@ -92,7 +92,7 @@ extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page);
#define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS)
#define TWOLEVEL_PGDIR_SHIFT 22
-#define BOOT_USER_PGD_PTRS (__PAGE_OFFSET >> TWOLEVEL_PGDIR_SHIFT)
+#define BOOT_USER_PGD_PTRS (PAGE_OFFSET >> TWOLEVEL_PGDIR_SHIFT)
#define BOOT_KERNEL_PGD_PTRS (1024-BOOT_USER_PGD_PTRS)
#ifndef __ASSEMBLY__
@@ -183,7 +183,7 @@ extern void __handle_bad_pmd_kernel(pmd_t * pmd);
#define pte_none(x) (!pte_val(x))
#define pte_present(x) (pte_val(x) & (_PAGE_PRESENT | _PAGE_PROTNONE))
#define pte_clear(xp) do { pte_val(*(xp)) = 0; } while (0)
-#define pte_pagenr(x) ((unsigned long)((pte_val(x) >> PAGE_SHIFT)))
+#define pte_pagenr(x) ((unsigned long)(((pte_val(x) -__MEMORY_START) >> PAGE_SHIFT)))
#define pmd_none(x) (!pmd_val(x))
#define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
@@ -194,7 +194,7 @@ extern void __handle_bad_pmd_kernel(pmd_t * pmd);
* Permanent address of a page. Obviously must never be
* called on a highmem page.
*/
-#define page_address(page) ({ if (PageHighMem(page)) BUG(); PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT); })
+#define page_address(page) ({ PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT) + __MEMORY_START; })
#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
#define pte_page(x) (mem_map+pte_pagenr(x))
@@ -228,7 +228,7 @@ extern inline pte_t mk_pte(struct page *page, pgprot_t pgprot)
pte_t __pte;
pte_val(__pte) = (page-mem_map)*(unsigned long long)PAGE_SIZE +
- pgprot_val(pgprot);
+ __MEMORY_START + pgprot_val(pgprot);
return __pte;
}
@@ -274,8 +274,13 @@ extern __inline__ pgd_t *get_pgd_slow(void)
pgd_t *ret = (pgd_t *)__get_free_page(GFP_KERNEL);
if (ret) {
+ /* Clear User space */
memset(ret, 0, USER_PTRS_PER_PGD * sizeof(pgd_t));
- memcpy(ret + USER_PTRS_PER_PGD, swapper_pg_dir + USER_PTRS_PER_PGD, (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
+
+ /* XXX: Copy vmalloc-ed space??? */
+ memcpy(ret + USER_PTRS_PER_PGD,
+ swapper_pg_dir + USER_PTRS_PER_PGD,
+ (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
}
return ret;
}
@@ -412,8 +417,12 @@ extern pgd_t swapper_pg_dir[1024];
extern void update_mmu_cache(struct vm_area_struct * vma,
unsigned long address, pte_t pte);
-#define SWP_TYPE(entry) (((pte_val(entry)) >> 1) & 0x3f)
-#define SWP_OFFSET(entry) ((pte_val(entry)) >> 8)
+/* Encode and de-code a swap entry */
+#define SWP_TYPE(x) (((x).val >> 1) & 0x3f)
+#define SWP_OFFSET(x) ((x).val >> 8)
+#define SWP_ENTRY(type, offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
+#define pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
+#define swp_entry_to_pte(x) ((pte_t) { (x).val })
#define module_map vmalloc
#define module_unmap vfree
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h
index 07175eff5..ae8b036c2 100644
--- a/include/asm-sh/processor.h
+++ b/include/asm-sh/processor.h
@@ -189,6 +189,17 @@ extern __inline__ unsigned long thread_saved_pc(struct thread_struct *t)
return t->pc;
}
+static inline unsigned long get_wchan(struct task_struct *p)
+{
+ if (!p || p == current || p->state == TASK_RUNNING)
+ return 0;
+ /* FIXME: here the actual wchan calculation should sit */
+ return 0;
+}
+
+#define KSTK_EIP(tsk) ((tsk)->thread.pc)
+#define KSTK_ESP(tsk) ((tsk)->thread.sp)
+
#define THREAD_SIZE (2*PAGE_SIZE)
extern struct task_struct * alloc_task_struct(void);
extern void free_task_struct(struct task_struct *);
diff --git a/include/asm-sh/resource.h b/include/asm-sh/resource.h
index 5f536d5f8..857c37166 100644
--- a/include/asm-sh/resource.h
+++ b/include/asm-sh/resource.h
@@ -22,16 +22,16 @@
#define INIT_RLIMITS \
{ \
- { LONG_MAX, LONG_MAX }, \
- { LONG_MAX, LONG_MAX }, \
- { LONG_MAX, LONG_MAX }, \
- { _STK_LIM, LONG_MAX }, \
- { 0, LONG_MAX }, \
- { LONG_MAX, LONG_MAX }, \
- { 0, 0 }, \
- { INR_OPEN, INR_OPEN }, \
- { LONG_MAX, LONG_MAX }, \
- { LONG_MAX, LONG_MAX }, \
+ { RLIM_INFINITY, RLIM_INFINITY }, \
+ { RLIM_INFINITY, RLIM_INFINITY }, \
+ { RLIM_INFINITY, RLIM_INFINITY }, \
+ { _STK_LIM, RLIM_INFINITY }, \
+ { 0, RLIM_INFINITY }, \
+ { RLIM_INFINITY, RLIM_INFINITY }, \
+ { 0, 0 }, \
+ { INR_OPEN, INR_OPEN }, \
+ { RLIM_INFINITY, RLIM_INFINITY }, \
+ { RLIM_INFINITY, RLIM_INFINITY }, \
}
#endif /* __KERNEL__ */
diff --git a/include/asm-sh/shmparam.h b/include/asm-sh/shmparam.h
index cf58a95e8..7d3ec7e36 100644
--- a/include/asm-sh/shmparam.h
+++ b/include/asm-sh/shmparam.h
@@ -1,46 +1,6 @@
#ifndef __ASM_SH_SHMPARAM_H
#define __ASM_SH_SHMPARAM_H
-/* address range for shared memory attaches if no address passed to shmat() */
-#define SHM_RANGE_START 0x50000000
-#define SHM_RANGE_END 0x60000000
-
-/*
- * Format of a swap-entry for shared memory pages currently out in
- * swap space (see also mm/swap.c).
- *
- * SWP_TYPE = SHM_SWP_TYPE
- * SWP_OFFSET is used as follows:
- *
- * bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
- * bits 7..21: index of page within shared memory segment (SHM_IDX)
- * (actually fewer bits get used since SHMMAX is so low)
- */
-
-/*
- * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
- * there is a static array of size SHMMNI.
- */
-#define _SHM_ID_BITS 7
-#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
-
-#define SHM_IDX_SHIFT (_SHM_ID_BITS)
-#define _SHM_IDX_BITS 15
-#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
-
-/*
- * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
- * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
- */
-
-#define SHMMAX 0x2000000 /* max shared seg size (bytes) */
-/* Try not to change the default shipped SHMMAX - people rely on it */
-
-#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
-#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */
-#define SHMALL /* max shm system wide (pages) */ \
- (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
-#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
-#define SHMSEG SHMMNI /* max shared segs per process */
+#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
#endif /* __ASM_SH_SHMPARAM_H */
diff --git a/include/asm-sh/spinlock.h b/include/asm-sh/spinlock.h
index 8db187a29..16f70ffd7 100644
--- a/include/asm-sh/spinlock.h
+++ b/include/asm-sh/spinlock.h
@@ -1,53 +1,6 @@
#ifndef __ASM_SH_SPINLOCK_H
#define __ASM_SH_SPINLOCK_H
-#ifndef __SMP__
-
-typedef struct { } spinlock_t;
-#define SPIN_LOCK_UNLOCKED { }
-
-#define spin_lock_init(lock) do { } while(0)
-#define spin_lock(lock) do { } while(0)
-#define spin_trylock(lock) (1)
-#define spin_unlock_wait(lock) do { } while(0)
-#define spin_unlock(lock) do { } while(0)
-#define spin_lock_irq(lock) cli()
-#define spin_unlock_irq(lock) sti()
-
-#define spin_lock_irqsave(lock, flags) save_and_cli(flags)
-#define spin_unlock_irqrestore(lock, flags) restore_flags(flags)
-
-/*
- * Read-write spinlocks, allowing multiple readers
- * but only one writer.
- *
- * NOTE! it is quite common to have readers in interrupts
- * but no interrupt writers. For those circumstances we
- * can "mix" irq-safe locks - any writer needs to get a
- * irq-safe write-lock, but readers can get non-irqsafe
- * read-locks.
- */
-typedef struct { } rwlock_t;
-#define RW_LOCK_UNLOCKED (rwlock_t) { }
-
-#define read_lock(lock) do { } while(0)
-#define read_unlock(lock) do { } while(0)
-#define write_lock(lock) do { } while(0)
-#define write_unlock(lock) do { } while(0)
-#define read_lock_irq(lock) cli()
-#define read_unlock_irq(lock) sti()
-#define write_lock_irq(lock) cli()
-#define write_unlock_irq(lock) sti()
-
-#define read_lock_irqsave(lock, flags) save_and_cli(flags)
-#define read_unlock_irqrestore(lock, flags) restore_flags(flags)
-#define write_lock_irqsave(lock, flags) save_and_cli(flags)
-#define write_unlock_irqrestore(lock, flags) restore_flags(flags)
-
-#else
-
#error "No SMP on SH"
-#endif /* SMP */
-
#endif /* __ASM_SH_SPINLOCK_H */
diff --git a/include/asm-sh/string.h b/include/asm-sh/string.h
index 56ea9d8e8..bcff30489 100644
--- a/include/asm-sh/string.h
+++ b/include/asm-sh/string.h
@@ -120,24 +120,6 @@ extern void *memchr(const void *__s, int __c, size_t __n);
#define __HAVE_ARCH_BCOPY
#define __HAVE_ARCH_MEMSCAN
-extern __inline__ void *memscan(void *__addr, int __c, size_t __size)
-{
- register char *__end;
- unsigned long __dummy;
-
- __asm__("mov #0,%2\n"
- "1:\n\t"
- "cmp/eq %0,%1\n\t"
- "bt 2f\n\t"
- "cmp/eq %5,%2\n\t"
- "bf/s 1b\n\t"
- " mov.b @%0+,%2\n\t"
- "add #-1,%0\n\t"
- "2:"
- : "=r" (__addr), "=r" (__end), "=&z" (__dummy)
- : "0" (__addr), "1" ((char *)__addr + __size), "r" (__c));
-
- return __addr;
-}
+#define memscan memchr
#endif /* __ASM_SH_STRING_H */
diff --git a/include/asm-sh/termios.h b/include/asm-sh/termios.h
index f579c57a6..4e334d49a 100644
--- a/include/asm-sh/termios.h
+++ b/include/asm-sh/termios.h
@@ -53,6 +53,7 @@ struct termio {
#define N_IRDA 11 /* Linux IR - http://www.cs.uit.no/~dagb/irda/irda.html */
#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
#define N_HDLC 13 /* synchronous HDLC */
+#define N_SYNC_PPP 14
#ifdef __KERNEL__
diff --git a/include/asm-sh/uaccess.h b/include/asm-sh/uaccess.h
index 4d888da0a..b64de2cd5 100644
--- a/include/asm-sh/uaccess.h
+++ b/include/asm-sh/uaccess.h
@@ -1,4 +1,4 @@
-/* $Id: uaccess.h,v 1.3 1999/10/12 14:46:20 gniibe Exp $
+/* $Id: uaccess.h,v 1.6 1999/10/29 13:10:44 gniibe Exp $
*
* User space memory access functions
*
@@ -392,16 +392,14 @@ extern __inline__ long __strnlen_user(const char *__s, long __n)
unsigned long __dummy;
__asm__ __volatile__(
- "mov #-1,%1\n"
- "9:\n\t"
+ "9:\n"
"cmp/eq %4,%0\n\t"
- "bt 5f\n\t"
- "cmp/eq #0,%1\n\t"
- "bf/s 9b\n\t"
+ "bt 2f\n"
"1:\t"
- " mov.b @%0+,%1\n\t"
- "5:\t"
- "sub %3,%0\n"
+ "mov.b @(%0,%3),%1\n\t"
+ "tst %1,%1\n\t"
+ "bf/s 9b\n\t"
+ " add #1,%0\n"
"2:\n"
".section .fixup,\"ax\"\n"
"3:\n\t"
@@ -415,14 +413,14 @@ extern __inline__ long __strnlen_user(const char *__s, long __n)
" .balign 4\n"
" .long 1b,3b\n"
".previous"
- : "=&r" (res), "=&z" (__dummy)
- : "0" (__s), "r" (__s), "r" (__s+__n), "i" (-EFAULT));
+ : "=z" (res), "=&r" (__dummy)
+ : "0" (0), "r" (__s), "r" (__n), "i" (-EFAULT));
return res;
}
extern __inline__ long strnlen_user(const char *s, long n)
{
- if(!access_ok(VERIFY_READ, s, n))
+ if (!__addr_ok(s))
return 0;
else
return __strnlen_user(s, n);
diff --git a/include/asm-sparc/processor.h b/include/asm-sparc/processor.h
index 81739b0a5..b9ed8b804 100644
--- a/include/asm-sparc/processor.h
+++ b/include/asm-sparc/processor.h
@@ -161,6 +161,11 @@ extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
#define release_segments(mm) do { } while (0)
#define forget_segments() do { } while (0)
+unsigned long get_wchan(struct task_struct *p);
+
+#define KSTK_EIP(tsk) ((tsk)->thread.kregs->pc)
+#define KSTK_ESP(tsk) ((tsk)->thread.kregs->u_regs[UREG_FP])
+
#ifdef __KERNEL__
#define THREAD_SIZE (2*PAGE_SIZE)
diff --git a/include/asm-sparc/shmparam.h b/include/asm-sparc/shmparam.h
index 174984e11..2956107c1 100644
--- a/include/asm-sparc/shmparam.h
+++ b/include/asm-sparc/shmparam.h
@@ -2,44 +2,6 @@
#ifndef _ASMSPARC_SHMPARAM_H
#define _ASMSPARC_SHMPARAM_H
-/* address range for shared memory attaches if no address passed to shmat() */
-#define SHM_RANGE_START 0x10000000
-#define SHM_RANGE_END 0x20000000
-
-/*
- * Format of a swap-entry for shared memory pages currently out in
- * swap space (see also mm/swap.c).
- *
- * SWP_TYPE = SHM_SWP_TYPE
- * SWP_OFFSET is used as follows:
- *
- * bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
- * bits 7..21: index of page within shared memory segment (SHM_IDX)
- * (actually fewer bits get used since SHMMAX is so low)
- */
-
-/*
- * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
- * there is a static array of size SHMMNI.
- */
-#define _SHM_ID_BITS 7
-#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
-
-#define SHM_IDX_SHIFT (_SHM_ID_BITS)
-#define _SHM_IDX_BITS 15
-#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
-
-/*
- * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
- * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
- */
-
-#define SHMMAX 0x1000000 /* max shared seg size (bytes) */
-#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
-#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */
-#define SHMALL /* max shm system wide (pages) */ \
- (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
-#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
-#define SHMSEG SHMMNI /* max shared segs per process */
+#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
#endif /* _ASMSPARC_SHMPARAM_H */
diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h
index b24f9a324..8e09fd99c 100644
--- a/include/asm-sparc/termios.h
+++ b/include/asm-sparc/termios.h
@@ -69,6 +69,7 @@ struct winsize {
#define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */
#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
#define N_HDLC 13 /* synchronous HDLC */
+#define N_SYNC_PPP 14
#ifdef __KERNEL__
diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h
index d5074144d..35c54dd1a 100644
--- a/include/asm-sparc64/processor.h
+++ b/include/asm-sparc64/processor.h
@@ -209,6 +209,11 @@ extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
#define release_segments(mm) do { } while (0)
#define forget_segments() do { } while (0)
+unsigned long get_wchan(struct task_struct *p);
+
+#define KSTK_EIP(tsk) ((tsk)->thread.kregs->tpc)
+#define KSTK_ESP(tsk) ((tsk)->thread.kregs->u_regs[UREG_FP])
+
#ifdef __KERNEL__
#define THREAD_SIZE (2*PAGE_SIZE)
/* Allocation and freeing of task_struct and kernel stack. */
diff --git a/include/asm-sparc64/shmparam.h b/include/asm-sparc64/shmparam.h
index 1179fd258..e39a5752c 100644
--- a/include/asm-sparc64/shmparam.h
+++ b/include/asm-sparc64/shmparam.h
@@ -2,46 +2,6 @@
#ifndef _ASMSPARC64_SHMPARAM_H
#define _ASMSPARC64_SHMPARAM_H
-/* XXX Redo most of this... */
-
-/* address range for shared memory attaches if no address passed to shmat() */
-#define SHM_RANGE_START 0x10000000
-#define SHM_RANGE_END 0x20000000
-
-/*
- * Format of a swap-entry for shared memory pages currently out in
- * swap space (see also mm/swap.c).
- *
- * SWP_TYPE = SHM_SWP_TYPE
- * SWP_OFFSET is used as follows:
- *
- * bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
- * bits 7..21: index of page within shared memory segment (SHM_IDX)
- * (actually fewer bits get used since SHMMAX is so low)
- */
-
-/*
- * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
- * there is a static array of size SHMMNI.
- */
-#define _SHM_ID_BITS 7
-#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
-
-#define SHM_IDX_SHIFT (_SHM_ID_BITS)
-#define _SHM_IDX_BITS 15
-#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
-
-/*
- * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
- * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
- */
-
-#define SHMMAX 0x1000000 /* max shared seg size (bytes) */
-#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
-#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */
-#define SHMALL /* max shm system wide (pages) */ \
- (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
#define SHMLBA (PAGE_SIZE<<1) /* attach addr a multiple of this */
-#define SHMSEG SHMMNI /* max shared segs per process */
#endif /* _ASMSPARC64_SHMPARAM_H */
diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h
index 3f77c8dbf..953b5bdd3 100644
--- a/include/asm-sparc64/termios.h
+++ b/include/asm-sparc64/termios.h
@@ -69,6 +69,7 @@ struct winsize {
#define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */
#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
#define N_HDLC 13 /* synchronous HDLC */
+#define N_SYNC_PPP 14
#ifdef __KERNEL__
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 5b53842be..138831b4a 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -24,6 +24,158 @@
#include <linux/types.h>
#include <linux/ioctl.h>
+#ifdef __KERNEL__
+
+#include <linux/sched.h>
+#include <linux/wait.h>
+
+/*
+ * Device types
+ */
+enum
+{
+ ACPI_SYS_DEV, /* system device (fan, KB controller, ...) */
+ ACPI_PCI_DEV, /* generic PCI device */
+ ACPI_PCI_BUS, /* PCI bus */
+ ACPI_ISA_DEV, /* generic ISA device */
+ ACPI_ISA_BUS, /* ISA bus */
+ ACPI_USB_DEV, /* generic USB device */
+ ACPI_USB_HUB, /* USB hub device */
+ ACPI_USB_CTRL, /* USB controller */
+ ACPI_SCSI_DEV, /* generic SCSI device */
+ ACPI_SCSI_CTRL, /* SCSI controller */
+};
+
+typedef int acpi_dev_t;
+
+/*
+ * Device addresses
+ */
+#define ACPI_PCI_ADR(dev) ((dev)->bus->number << 16 | (dev)->devfn)
+
+/*
+ * HID (PnP) values
+ */
+enum
+{
+ ACPI_UNKNOWN_HID = 0x00000000, /* generic */
+ ACPI_KBC_HID = 0x41d00303, /* keyboard controller */
+ ACPI_COM_HID = 0x41d00500, /* serial port */
+ ACPI_FDC_HID = 0x41d00700, /* floppy controller */
+ ACPI_VGA_HID = 0x41d00900, /* VGA controller */
+ ACPI_ISA_HID = 0x41d00a00, /* ISA bus */
+ ACPI_EISA_HID = 0x41d00a01, /* EISA bus */
+ ACPI_PCI_HID = 0x41d00a03, /* PCI bus */
+};
+
+typedef int acpi_hid_t;
+
+/*
+ * Device states
+ */
+enum
+{
+ ACPI_D0, /* fully-on */
+ ACPI_D1, /* partial-on */
+ ACPI_D2, /* partial-on */
+ ACPI_D3, /* fully-off */
+};
+
+typedef int acpi_dstate_t;
+
+struct acpi_dev;
+
+/*
+ * Device state transition function
+ */
+typedef int (*acpi_transition)(struct acpi_dev *dev, acpi_dstate_t state);
+
+/*
+ * Static device information
+ */
+struct acpi_dev_info
+{
+ acpi_dev_t type; /* device type */
+ acpi_hid_t hid; /* PnP identifier */
+ acpi_transition transition; /* state transition callback */
+
+ /* other information like D-states supported,
+ * D-state latencies, and in-rush current needs
+ * will go here
+ */
+};
+
+/*
+ * Dynamic device information
+ */
+struct acpi_dev
+{
+ struct acpi_dev_info info; /* static device info */
+ unsigned long adr; /* bus address or unique id */
+ acpi_dstate_t state; /* current D-state */
+ unsigned long accessed; /* last access time */
+ unsigned long idle; /* last idle time */
+ struct list_head entry; /* linked list entry */
+};
+
+#ifdef CONFIG_ACPI
+
+extern wait_queue_head_t acpi_idle_wait;
+
+/*
+ * Register a device with the ACPI subsystem
+ */
+struct acpi_dev *acpi_register(struct acpi_dev_info *info, unsigned long adr);
+
+/*
+ * Unregister a device with ACPI
+ */
+void acpi_unregister(struct acpi_dev *dev);
+
+/*
+ * Update device access time and wake up device, if necessary
+ */
+extern inline void acpi_access(struct acpi_dev *dev)
+{
+ extern void acpi_wakeup(struct acpi_dev*);
+ if (dev) {
+ if (dev->state != ACPI_D0)
+ acpi_wakeup(dev);
+ dev->accessed = jiffies;
+ }
+}
+
+/*
+ * Identify device as currently being idle
+ */
+extern inline void acpi_dev_idle(struct acpi_dev *dev)
+{
+ if (dev) {
+ dev->idle = jiffies;
+ if (waitqueue_active(&acpi_idle_wait))
+ wake_up(&acpi_idle_wait);
+ }
+}
+
+#else /* CONFIG_ACPI */
+
+extern inline struct acpi_dev*
+acpi_register(struct acpi_dev_info *info, unsigned long adr)
+{
+ return 0;
+}
+
+extern inline void acpi_unregister(struct acpi_dev *dev) {}
+extern inline void acpi_access(struct acpi_dev *dev) {}
+extern inline void acpi_dev_idle(struct acpi_dev *dev) {}
+
+#endif /* CONFIG_ACPI */
+
+extern void (*acpi_idle)(void);
+extern void (*acpi_power_off)(void);
+
+#endif /* __KERNEL__ */
+
/* RSDP location */
#define ACPI_BIOS_ROM_BASE (0x0e0000)
#define ACPI_BIOS_ROM_END (0x100000)
@@ -34,6 +186,7 @@
#define ACPI_RSDT_SIG 0x54445352 /* 'RSDT' */
#define ACPI_FACP_SIG 0x50434146 /* 'FACP' */
#define ACPI_DSDT_SIG 0x54445344 /* 'DSDT' */
+#define ACPI_FACS_SIG 0x53434146 /* 'FACS' */
/* PM1_STS/EN flags */
#define ACPI_TMR 0x0001
@@ -53,6 +206,9 @@
#define ACPI_SLP_TYP2 0x1000
#define ACPI_SLP_EN 0x2000
+#define ACPI_SLP_TYP_MASK 0x1c00
+#define ACPI_SLP_TYP_SHIFT 10
+
/* PM_TMR masks */
#define ACPI_TMR_MASK 0x00ffffff
#define ACPI_TMR_HZ 3580000 /* 3.58 MHz */
@@ -82,13 +238,16 @@
#define ACPI_TMR_VAL_EXT 0x00000100
#define ACPI_DCK_CAP 0x00000200
+/* FACS flags */
+#define ACPI_S4BIOS 0x00000001
+
struct acpi_rsdp {
__u32 signature[2];
__u8 checksum;
__u8 oem[6];
__u8 reserved;
__u32 rsdt;
-};
+} __attribute__ ((packed));
struct acpi_table {
__u32 signature;
@@ -100,7 +259,7 @@ struct acpi_table {
__u32 oem_rev;
__u32 creator;
__u32 creator_rev;
-};
+} __attribute__ ((packed));
struct acpi_facp {
struct acpi_table hdr;
@@ -143,7 +302,16 @@ struct acpi_facp {
__u8 reserved5;
__u8 reserved6;
__u32 flags;
-};
+} __attribute__ ((packed));
+
+struct acpi_facs {
+ __u32 signature;
+ __u32 length;
+ __u32 hw_signature;
+ __u32 fw_wake_vector;
+ __u32 global_lock;
+ __u32 flags;
+} __attribute__ ((packed));
/*
* Sysctl declarations
@@ -166,8 +334,12 @@ enum
ACPI_P_LVL3,
ACPI_P_LVL2_LAT,
ACPI_P_LVL3_LAT,
+ ACPI_S5_SLP_TYP,
};
+#define ACPI_P_LVL_DISABLED 0x80
+#define ACPI_SLP_TYP_DISABLED (~0UL)
+
/*
* PIIX4-specific ACPI info (for systems with PIIX4 but no ACPI tables)
*/
@@ -205,10 +377,4 @@ enum
#define ACPI_PIIX4_PMREGMISC 0x80
#define ACPI_PIIX4_PMIOSE 0x01
-#ifdef __KERNEL__
-
-extern void (*acpi_idle)(void);
-
-#endif
-
#endif /* _LINUX_ACPI_H */
diff --git a/include/linux/apm_bios.h b/include/linux/apm_bios.h
index a9015d35a..14de8251d 100644
--- a/include/linux/apm_bios.h
+++ b/include/linux/apm_bios.h
@@ -3,7 +3,7 @@
/*
* Include file for the interface to an APM BIOS
- * Copyright 1994-1998 Stephen Rothwell (Stephen.Rothwell@canb.auug.org.au)
+ * Copyright 1994-1999 Stephen Rothwell (sfr@linuxcare.com)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -46,6 +46,51 @@ struct apm_bios_info {
#define APM_BIOS_DISENGAGED 0x0010
/*
+ * The APM function codes
+ */
+#define APM_FUNC_INST_CHECK 0x5300
+#define APM_FUNC_REAL_CONN 0x5301
+#define APM_FUNC_16BIT_CONN 0x5302
+#define APM_FUNC_32BIT_CONN 0x5303
+#define APM_FUNC_DISCONN 0x5304
+#define APM_FUNC_IDLE 0x5305
+#define APM_FUNC_BUSY 0x5306
+#define APM_FUNC_SET_STATE 0x5307
+#define APM_FUNC_ENABLE_PM 0x5308
+#define APM_FUNC_RESTORE_BIOS 0x5309
+#define APM_FUNC_GET_STATUS 0x530a
+#define APM_FUNC_GET_EVENT 0x530b
+#define APM_FUNC_GET_STATE 0x530c
+#define APM_FUNC_ENABLE_DEV_PM 0x530d
+#define APM_FUNC_VERSION 0x530e
+#define APM_FUNC_ENGAGE_PM 0x530f
+#define APM_FUNC_GET_CAP 0x5310
+#define APM_FUNC_RESUME_TIMER 0x5311
+#define APM_FUNC_RESUME_ON_RING 0x5312
+#define APM_FUNC_TIMER 0x5313
+
+/*
+ * Function code for APM_FUNC_RESUME_TIMER
+ */
+#define APM_FUNC_DISABLE_TIMER 0
+#define APM_FUNC_GET_TIMER 1
+#define APM_FUNC_SET_TIMER 2
+
+/*
+ * Function code for APM_FUNC_RESUME_ON_RING
+ */
+#define APM_FUNC_DISABLE_RING 0
+#define APM_FUNC_ENABLE_RING 1
+#define APM_FUNC_GET_RING 2
+
+/*
+ * Function code for APM_FUNC_TIMER_STATUS
+ */
+#define APM_FUNC_TIMER_DISABLE 0
+#define APM_FUNC_TIMER_ENABLE 1
+#define APM_FUNC_TIMER_GET 2
+
+/*
* Maximum number of events stored
*/
#define APM_MAX_EVENTS 20
@@ -79,7 +124,6 @@ extern struct apm_bios_info apm_bios_info;
extern int apm_register_callback(int (*callback)(apm_event_t));
extern void apm_unregister_callback(int (*callback)(apm_event_t));
-extern void apm_power_off(void);
extern int apm_display_blank(void);
extern int apm_display_unblank(void);
@@ -94,6 +138,14 @@ extern int apm_display_unblank(void);
#define APM_STATE_OFF 0x0003
#define APM_STATE_BUSY 0x0004
#define APM_STATE_REJECT 0x0005
+#define APM_STATE_OEM_SYS 0x0020
+#define APM_STATE_OEM_DEV 0x0040
+
+#define APM_STATE_DISABLE 0x0000
+#define APM_STATE_ENABLE 0x0001
+
+#define APM_STATE_DISENGAGE 0x0000
+#define APM_STATE_ENGAGE 0x0001
/*
* Events (results of Get PM Event)
@@ -109,7 +161,7 @@ extern int apm_display_unblank(void);
#define APM_USER_STANDBY 0x0009
#define APM_USER_SUSPEND 0x000a
#define APM_STANDBY_RESUME 0x000b
-#define APM_CAPABILITY_CHANGE 0x000c
+#define APM_CAPABILITY_CHANGE 0x000c
/*
* Error codes
@@ -125,13 +177,58 @@ extern int apm_display_unblank(void);
#define APM_BAD_DEVICE 0x09
#define APM_BAD_PARAM 0x0a
#define APM_NOT_ENGAGED 0x0b
-#define APM_BAD_FUNCTION 0x0c
+#define APM_BAD_FUNCTION 0x0c
#define APM_RESUME_DISABLED 0x0d
+#define APM_NO_ERROR 0x53
#define APM_BAD_STATE 0x60
#define APM_NO_EVENTS 0x80
#define APM_NOT_PRESENT 0x86
-/* ioctl operations */
+/*
+ * APM Device IDs
+ */
+#define APM_DEVICE_BIOS 0x0000
+#define APM_DEVICE_ALL 0x0001
+#define APM_DEVICE_DISPLAY 0x0100
+#define APM_DEVICE_STORAGE 0x0200
+#define APM_DEVICE_PARALLEL 0x0300
+#define APM_DEVICE_SERIAL 0x0400
+#define APM_DEVICE_NETWORK 0x0500
+#define APM_DEVICE_PCMCIA 0x0600
+#define APM_DEVICE_BATTERY 0x8000
+#define APM_DEVICE_OEM 0xe000
+#define APM_DEVICE_OLD_ALL 0xffff
+#define APM_DEVICE_CLASS 0x00ff
+#define APM_DEVICE_MASK 0xff00
+
+#ifdef __KERNEL__
+/*
+ * This is the "All Devices" ID communicated to the BIOS
+ */
+#define APM_DEVICE_BALL ((apm_bios_info.version > 0x0100) ? \
+ APM_DEVICE_ALL : APM_DEVICE_OLD_ALL)
+#endif
+
+/*
+ * Battery status
+ */
+#define APM_MAX_BATTERIES 2
+
+/*
+ * APM defined capability bit flags
+ */
+#define APM_CAP_GLOBAL_STANDBY 0x0001
+#define APM_CAP_GLOBAL_SUSPEND 0x0002
+#define APM_CAP_RESUME_STANDBY_TIMER 0x0004 /* Timer resume from standby */
+#define APM_CAP_RESUME_SUSPEND_TIMER 0x0008 /* Timer resume from suspend */
+#define APM_CAP_RESUME_STANDBY_RING 0x0010 /* Resume on Ring fr standby */
+#define APM_CAP_RESUME_SUSPEND_RING 0x0020 /* Resume on Ring fr suspend */
+#define APM_CAP_RESUME_STANDBY_PCMCIA 0x0040 /* Resume on PCMCIA Ring */
+#define APM_CAP_RESUME_SUSPEND_PCMCIA 0x0080 /* Resume on PCMCIA Ring */
+
+/*
+ * ioctl operations
+ */
#include <linux/ioctl.h>
#define APM_IOC_STANDBY _IO('A', 1)
diff --git a/include/linux/bfs_fs.h b/include/linux/bfs_fs.h
new file mode 100644
index 000000000..880ac7f0b
--- /dev/null
+++ b/include/linux/bfs_fs.h
@@ -0,0 +1,91 @@
+/*
+ * include/linux/bfs_fs.h - BFS data structures on disk.
+ * Copyright (C) 1999 Tigran Aivazian <tigran@ocston.org>
+ */
+
+#ifndef _LINUX_BFS_FS_H
+#define _LINUX_BFS_FS_H
+
+#define BFS_BSIZE_BITS 9
+#define BFS_BSIZE (1<<BFS_BSIZE_BITS)
+
+#define BFS_MAGIC 0x1BADFACE
+#define BFS_ROOT_INO 2
+#define BFS_INODES_PER_BLOCK 8
+
+/* SVR4 vnode type values (bfs_inode->i_vtype) */
+#define BFS_VDIR 2
+#define BFS_VREG 1
+
+/* BFS inode layout on disk */
+struct bfs_inode {
+ __u16 i_ino;
+ __u16 i_unused;
+ __u32 i_sblock;
+ __u32 i_eblock;
+ __u32 i_eoffset;
+ __u32 i_vtype;
+ __u32 i_mode;
+ __s32 i_uid;
+ __s32 i_gid;
+ __u32 i_nlink;
+ __u32 i_atime;
+ __u32 i_mtime;
+ __u32 i_ctime;
+ __u32 i_padding[4];
+};
+
+#define BFS_NAMELEN 14
+#define BFS_DIRENT_SIZE 16
+#define BFS_DIRS_PER_BLOCK 32
+
+struct bfs_dirent {
+ __u16 ino;
+ char name[BFS_NAMELEN];
+};
+
+/* BFS superblock layout on disk */
+struct bfs_super_block {
+ __u32 s_magic;
+ __u32 s_start;
+ __u32 s_end;
+ __s32 s_from;
+ __s32 s_to;
+ __s32 s_bfrom;
+ __s32 s_bto;
+ char s_fsname[6];
+ char s_volume[6];
+ __u32 s_padding[118];
+};
+
+#define BFS_NZFILESIZE(ip) \
+ (((ip)->i_eoffset + 1) - (ip)->i_sblock * BFS_BSIZE)
+
+#define BFS_FILESIZE(ip) \
+ ((ip)->i_sblock == 0 ? 0 : BFS_NZFILESIZE(ip))
+
+#define BFS_FILEBLOCKS(ip) \
+ ((ip)->i_sblock == 0 ? 0 : ((ip)->i_eblock + 1) - (ip)->i_sblock)
+
+#define BFS_OFF2INO(offset) \
+ ((((offset) - BFS_BSIZE) / sizeof(struct bfs_inode)) + BFS_ROOT_INO)
+
+#define BFS_INO2OFF(ino) \
+ ((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE)
+
+#define BFS_UNCLEAN(bfs_sb, sb) \
+ ((bfs_sb->s_from != -1) && (bfs_sb->s_to != -1) && !(sb->s_flags & MS_RDONLY))
+
+#ifdef __KERNEL__
+
+/* inode.c */
+extern int init_bfs_fs(void);
+
+/* file.c */
+extern struct inode_operations bfs_file_inops;
+
+/* dir.c */
+extern struct inode_operations bfs_dir_inops;
+
+#endif /* __KERNEL__ */
+#endif /* _LINUX_BFS_FS_H */
diff --git a/include/linux/bfs_fs_i.h b/include/linux/bfs_fs_i.h
new file mode 100644
index 000000000..647352882
--- /dev/null
+++ b/include/linux/bfs_fs_i.h
@@ -0,0 +1,18 @@
+/*
+ * include/linux/bfs_fs_i.h
+ * Copyright (C) 1999 Tigran Aivazian <tigran@ocston.org>
+ */
+
+#ifndef _LINUX_BFS_FS_I
+#define _LINUX_BFS_FS_I
+
+/*
+ * BFS file system in-core inode info
+ */
+struct bfs_inode_info {
+ unsigned long i_dsk_ino; /* inode number from the disk, can be 0 */
+ unsigned long i_sblock;
+ unsigned long i_eblock;
+};
+
+#endif /* _LINUX_BFS_FS_I */
diff --git a/include/linux/bfs_fs_sb.h b/include/linux/bfs_fs_sb.h
new file mode 100644
index 000000000..f0f54d606
--- /dev/null
+++ b/include/linux/bfs_fs_sb.h
@@ -0,0 +1,33 @@
+/*
+ * include/linux/bfs_fs_sb.h
+ * Copyright (C) 1999 Tigran Aivazian <tigran@ocston.org>
+ */
+
+#ifndef _LINUX_BFS_FS_SB
+#define _LINUX_BFS_FS_SB
+
+/*
+ * BFS block map entry, an array of these is kept in bfs_sb_info.
+ */
+ struct bfs_bmap {
+ unsigned long start, end;
+ };
+
+/*
+ * BFS file system in-core superblock info
+ */
+struct bfs_sb_info {
+ unsigned long si_blocks;
+ unsigned long si_freeb;
+ unsigned long si_freei;
+ unsigned long si_lf_ioff;
+ unsigned long si_lf_sblk;
+ unsigned long si_lf_eblk;
+ unsigned long si_lasti;
+ struct bfs_bmap * si_bmap;
+ char * si_imap;
+ struct buffer_head * si_sbh; /* buffer header w/superblock */
+ struct bfs_super_block * si_bfs_sb; /* superblock in si_sbh->b_data */
+};
+
+#endif /* _LINUX_BFS_FS_SB */
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index d3aa602c9..0567e080e 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -83,12 +83,9 @@ extern int * max_segments[MAX_BLKDEV];
#define MAX_SEGMENTS MAX_SECTORS
#define PageAlignSize(size) (((size) + PAGE_SIZE -1) & PAGE_MASK)
-#if 0 /* small readahead */
-#define MAX_READAHEAD PageAlignSize(4096*7)
-#define MIN_READAHEAD PageAlignSize(4096*2)
-#else /* large readahead */
-#define MAX_READAHEAD PageAlignSize(4096*31)
-#define MIN_READAHEAD PageAlignSize(4096*3)
-#endif
+
+/* read-ahead in pages.. */
+#define MAX_READAHEAD 31
+#define MIN_READAHEAD 3
#endif
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index a0727169e..c789e769c 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -1,7 +1,6 @@
#ifndef _LINUX_BOOTMEM_H
#define _LINUX_BOOTMEM_H
-#include <linux/config.h>
#include <asm/pgtable.h>
#include <asm/dma.h>
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h
index bfcce8e71..9331f9a2d 100644
--- a/include/linux/cdrom.h
+++ b/include/linux/cdrom.h
@@ -482,17 +482,17 @@ struct cdrom_generic_command
/* Mode page codes for mode sense/set */
-#define GPMODE_R_W_ERROR_PAGE 0x1
-#define GPMODE_WRITE_PARMS_PAGE 0x5
-#define GPMODE_AUDIO_CTL_PAGE 0xe
-#define GPMODE_POWER_PAGE 0x1a
-#define GPMODE_FAULT_FAIL_PAGE 0x1c
-#define GPMODE_TO_PROTECT_PAGE 0x1d
-#define GPMODE_CAPABILITIES_PAGE 0x2a
-#define GPMODE_ALL_PAGES 0x3f
+#define GPMODE_R_W_ERROR_PAGE 0x01
+#define GPMODE_WRITE_PARMS_PAGE 0x05
+#define GPMODE_AUDIO_CTL_PAGE 0x0e
+#define GPMODE_POWER_PAGE 0x1a
+#define GPMODE_FAULT_FAIL_PAGE 0x1c
+#define GPMODE_TO_PROTECT_PAGE 0x1d
+#define GPMODE_CAPABILITIES_PAGE 0x2a
+#define GPMODE_ALL_PAGES 0x3f
/* Not in Mt. Fuji, but in ATAPI 2.6 -- depricated now in favor
* of MODE_SENSE_POWER_PAGE */
-#define GPMODE_CDROM_PAGE 0x0d
+#define GPMODE_CDROM_PAGE 0x0d
@@ -505,18 +505,18 @@ struct cdrom_generic_command
struct dvd_layer {
__u8 book_version : 4;
- __u8 book_type : 4;
+ __u8 book_type : 4;
__u8 min_rate : 4;
- __u8 disc_size : 4;
- __u8 layer_type : 4;
- __u8 track_path : 1;
+ __u8 disc_size : 4;
+ __u8 layer_type : 4;
+ __u8 track_path : 1;
__u8 nlayers : 2;
__u8 track_density : 4;
__u8 linear_density : 4;
__u8 bca : 1;
- __u8 start_sector;
- __u8 end_sector;
- __u8 end_sector_l0;
+ __u32 start_sector;
+ __u32 end_sector;
+ __u32 end_sector_l0;
};
struct dvd_physical {
@@ -536,7 +536,7 @@ struct dvd_copyright {
struct dvd_disckey {
__u8 type;
- unsigned agid : 2;
+ unsigned agid : 2;
__u8 value[2048];
};
diff --git a/include/linux/concap.h b/include/linux/concap.h
index a0743ec14..79d642288 100644
--- a/include/linux/concap.h
+++ b/include/linux/concap.h
@@ -5,7 +5,6 @@
#ifdef __KERNEL__
#include <linux/skbuff.h>
#include <linux/netdevice.h>
-#include <linux/isdn_compat.h>
/* Stuff to support encapsulation protocols genericly. The encapsulation
protocol is processed at the uppermost layer of the network interface.
diff --git a/include/linux/cycx_drv.h b/include/linux/cycx_drv.h
index ebbe91850..b38cfe77f 100644
--- a/include/linux/cycx_drv.h
+++ b/include/linux/cycx_drv.h
@@ -11,13 +11,14 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
* ============================================================================
+* 1999/10/23 acme cycxhw_t cleanup
* 1999/01/03 acme more judicious use of data types...
* uclong, ucchar, etc deleted, the u8, u16, u32
* types are the portable way to go.
* 1999/01/03 acme judicious use of data types... u16, u32, etc
-* Dec 26, 1998 Arnaldo FIXED_BUFFERS, CONF_OFFSET,
+* 1998/12/26 acme FIXED_BUFFERS, CONF_OFFSET,
* removal of cy_read{bwl}
-* Aug 08, 1998 Arnaldo Initial version.
+* 1998/08/08 acme Initial version.
*/
#ifndef _CYCX_DRV_H
#define _CYCX_DRV_H
@@ -43,22 +44,19 @@
/* Adapter hardware configuration. Pointer to this structure is passed to all
* APIs. */
typedef struct cycxhw {
- u32 type; /* adapter type */
u32 fwid; /* firmware ID */
int irq; /* interrupt request level */
u32 dpmbase; /* dual-port memory base */
u32 dpmsize; /* dual-port memory size */
- u32 pclk; /* CPU clock rate, kHz */
- u32 memory; /* memory size */
u32 reserved[5];
} cycxhw_t;
/* Function Prototypes */
extern int cycx_setup (cycxhw_t *hw, void *sfm, u32 len);
-extern int cycx_down (cycxhw_t *hw);
-extern int cycx_inten (cycxhw_t *hw);
-extern int cycx_intr (cycxhw_t *hw);
extern int cycx_peek (cycxhw_t *hw, u32 addr, void *buf, u32 len);
extern int cycx_poke (cycxhw_t *hw, u32 addr, void *buf, u32 len);
extern int cycx_exec (u32 addr);
+
+extern void cycx_inten (cycxhw_t *hw);
+extern void cycx_intr (cycxhw_t *hw);
#endif /* _CYCX_DRV_H */
diff --git a/include/linux/fb.h b/include/linux/fb.h
index fb8e0bc96..8c008b8de 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -83,6 +83,7 @@
#define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */
#define FB_ACCEL_CT_6555x 30 /* C&T 6555x */
#define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */
+#define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */
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 58fc251ac..348cf02e2 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -48,7 +48,7 @@ struct poll_table_struct;
extern int max_files, nr_files, nr_free_files;
extern int max_super_blocks, nr_super_blocks;
-#define NR_FILE 4096 /* this can well be larger on a larger system */
+#define NR_FILE 8192 /* this can well be larger on a larger system */
#define NR_RESERVED_FILES 10 /* reserved for root */
#define NR_SUPER 256
@@ -224,7 +224,8 @@ struct buffer_head {
struct buffer_head *b_reqnext; /* request queue */
struct buffer_head **b_pprev; /* doubly linked list of hash-queue */
- char *b_data; /* pointer to data block (1024 bytes) */
+ char * b_data; /* pointer to data block (512 byte) */
+ struct page *b_page; /* the page this bh is mapped to */
void (*b_end_io)(struct buffer_head *bh, int uptodate); /* I/O completion */
void *b_dev_id;
@@ -246,8 +247,11 @@ void init_buffer(struct buffer_head *, bh_end_io_t *, void *);
#define buffer_new(bh) __buffer_state(bh,New)
#define buffer_protected(bh) __buffer_state(bh,Protected)
-#define buffer_page(bh) (mem_map + MAP_NR((bh)->b_data))
-#define touch_buffer(bh) set_bit(PG_referenced, &buffer_page(bh)->flags)
+#define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK)
+
+extern void set_bh_page(struct buffer_head *bh, struct page *page, unsigned int offset);
+
+#define touch_buffer(bh) set_bit(PG_referenced, &bh->b_page->flags)
#include <linux/pipe_fs_i.h>
#include <linux/minix_fs_i.h>
@@ -268,8 +272,10 @@ void init_buffer(struct buffer_head *, bh_end_io_t *, void *);
#include <linux/hfs_fs_i.h>
#include <linux/adfs_fs_i.h>
#include <linux/qnx4_fs_i.h>
+#include <linux/bfs_fs_i.h>
#include <linux/udf_fs_i.h>
#include <linux/ncp_fs_i.h>
+#include <linux/proc_fs_i.h>
/*
* Attribute flags. These should be or-ed together to figure out what
@@ -301,7 +307,7 @@ struct iattr {
umode_t ia_mode;
uid_t ia_uid;
gid_t ia_gid;
- off_t ia_size;
+ loff_t ia_size;
time_t ia_atime;
time_t ia_mtime;
time_t ia_ctime;
@@ -346,7 +352,7 @@ struct inode {
uid_t i_uid;
gid_t i_gid;
kdev_t i_rdev;
- off_t i_size;
+ loff_t i_size;
time_t i_atime;
time_t i_mtime;
time_t i_ctime;
@@ -391,8 +397,10 @@ struct inode {
struct hfs_inode_info hfs_i;
struct adfs_inode_info adfs_i;
struct qnx4_inode_info qnx4_i;
+ struct bfs_inode_info bfs_i;
struct udf_inode_info udf_i;
struct ncp_inode_info ncpfs_i;
+ struct proc_inode_info proc_i;
struct socket socket_i;
void *generic_ip;
} u;
@@ -522,6 +530,7 @@ extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
#include <linux/hfs_fs_sb.h>
#include <linux/adfs_fs_sb.h>
#include <linux/qnx4_fs_sb.h>
+#include <linux/bfs_fs_sb.h>
#include <linux/udf_fs_sb.h>
#include <linux/ncp_fs_sb.h>
@@ -568,6 +577,7 @@ struct super_block {
struct hfs_sb_info hfs_sb;
struct adfs_sb_info adfs_sb;
struct qnx4_sb_info qnx4_sb;
+ struct bfs_sb_info bfs_sb;
struct udf_sb_info udf_sb;
struct ncp_sb_info ncpfs_sb;
void *generic_sbp;
@@ -929,6 +939,7 @@ extern void set_blocksize(kdev_t, int);
extern unsigned int get_hardblocksize(kdev_t);
extern struct buffer_head * bread(kdev_t, int, int);
extern struct buffer_head * breada(kdev_t, int, int, unsigned int, unsigned int);
+extern void wakeup_bdflush(int wait);
extern int brw_page(int, struct page *, kdev_t, int [], int);
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index 3879d1e61..4e8e98224 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -2,6 +2,7 @@
#define _LINUX_HIGHMEM_H
#include <linux/config.h>
+#include <linux/pagemap.h>
#include <asm/pgtable.h>
#ifdef CONFIG_HIGHMEM
@@ -12,18 +13,19 @@ extern struct page *highmem_start_page;
/* declarations for linux/mm/highmem.c */
extern unsigned long highmem_mapnr;
-extern unsigned long nr_free_highpages;
+FASTCALL(unsigned int nr_free_highpages(void));
extern struct page * prepare_highmem_swapout(struct page *);
extern struct page * replace_with_highmem(struct page *);
+extern struct buffer_head * create_bounce(int rw, struct buffer_head * bh_orig);
#else /* CONFIG_HIGHMEM */
+extern inline unsigned int nr_free_highpages(void) { return 0; }
#define prepare_highmem_swapout(page) page
#define replace_with_highmem(page) page
-#define kmap(page, type) page_address(page)
-#define kunmap(vaddr, type) do { } while (0)
-#define nr_free_highpages 0UL
+#define kmap(page) page_address(page)
+#define kunmap(page) do { } while (0)
#endif /* CONFIG_HIGHMEM */
@@ -32,9 +34,9 @@ extern inline void clear_highpage(struct page *page)
{
unsigned long kaddr;
- kaddr = kmap(page, KM_WRITE);
+ kaddr = kmap(page);
clear_page((void *)kaddr);
- kunmap(kaddr, KM_WRITE);
+ kunmap(page);
}
extern inline void memclear_highpage(struct page *page, unsigned int offset, unsigned int size)
@@ -43,9 +45,9 @@ extern inline void memclear_highpage(struct page *page, unsigned int offset, uns
if (offset + size > PAGE_SIZE)
BUG();
- kaddr = kmap(page, KM_WRITE);
+ kaddr = kmap(page);
memset((void *)(kaddr + offset), 0, size);
- kunmap(kaddr, KM_WRITE);
+ kunmap(page);
}
/*
@@ -57,21 +59,21 @@ extern inline void memclear_highpage_flush(struct page *page, unsigned int offse
if (offset + size > PAGE_SIZE)
BUG();
- kaddr = kmap(page, KM_WRITE);
+ kaddr = kmap(page);
memset((void *)(kaddr + offset), 0, size);
flush_page_to_ram(page);
- kunmap(kaddr, KM_WRITE);
+ kunmap(page);
}
extern inline void copy_highpage(struct page *to, struct page *from)
{
unsigned long vfrom, vto;
- vfrom = kmap(from, KM_READ);
- vto = kmap(to, KM_WRITE);
+ vfrom = kmap(from);
+ vto = kmap(to);
copy_page((void *)vto, (void *)vfrom);
- kunmap(vfrom, KM_READ);
- kunmap(vto, KM_WRITE);
+ kunmap(from);
+ kunmap(to);
}
#endif /* _LINUX_HIGHMEM_H */
diff --git a/include/linux/i2o.h b/include/linux/i2o.h
index 9ddcb7bb8..01140c30a 100644
--- a/include/linux/i2o.h
+++ b/include/linux/i2o.h
@@ -100,40 +100,40 @@ typedef struct _i2o_pci_bus {
u8 reserved;
u16 PciVendorID;
u16 PciDeviceID;
-} i2o_pci_bus, *pi2o_pci_bus;
+} i2o_pci_bus;
typedef struct _i2o_local_bus {
u16 LbBaseIOPort;
u16 reserved;
u32 LbBaseMemoryAddress;
-} i2o_local_bus, *pi2o_local_bus;
+} i2o_local_bus;
typedef struct _i2o_isa_bus {
u16 IsaBaseIOPort;
u8 CSN;
u8 reserved;
u32 IsaBaseMemoryAddress;
-} i2o_isa_bus, *pi2o_isa_bus;
+} i2o_isa_bus;
typedef struct _i2o_eisa_bus_info {
u16 EisaBaseIOPort;
u8 reserved;
u8 EisaSlotNumber;
u32 EisaBaseMemoryAddress;
-} i2o_eisa_bus, *pi2o_eisa_bus;
+} i2o_eisa_bus;
typedef struct _i2o_mca_bus {
u16 McaBaseIOPort;
u8 reserved;
u8 McaSlotNumber;
u32 McaBaseMemoryAddress;
-} i2o_mca_bus, *pi2o_mca_bus;
+} i2o_mca_bus;
typedef struct _i2o_other_bus {
u16 BaseIOPort;
u16 reserved;
u32 BaseMemoryAddress;
-} i2o_other_bus, *pi2o_other_bus;
+} i2o_other_bus;
typedef struct _i2o_hrt_entry {
u32 adapter_id;
@@ -149,7 +149,7 @@ typedef struct _i2o_hrt_entry {
i2o_mca_bus mca_bus;
i2o_other_bus other_bus;
} bus;
-} i2o_hrt_entry, *pi2o_hrt_entry;
+} i2o_hrt_entry;
typedef struct _i2o_hrt {
u16 num_entries;
@@ -157,7 +157,7 @@ typedef struct _i2o_hrt {
u8 hrt_version;
u32 change_ind;
i2o_hrt_entry hrt_entry[1];
-} i2o_hrt, *pi2o_hrt;
+} i2o_hrt;
typedef struct _i2o_lct_entry {
u32 entry_size:16;
@@ -174,7 +174,7 @@ typedef struct _i2o_lct_entry {
u32 bios_info:8;
u8 identity_tag[8];
u32 event_capabilities;
-} i2o_lct_entry, *pi2o_lct_entry;
+} i2o_lct_entry;
typedef struct _i2o_lct {
u32 table_size:16;
@@ -183,7 +183,7 @@ typedef struct _i2o_lct {
u32 iop_flags;
u32 current_change_ind;
i2o_lct_entry lct_entry[1];
-} i2o_lct, *pi2o_lct;
+} i2o_lct;
typedef struct _i2o_status_block {
u16 org_id;
@@ -199,6 +199,7 @@ typedef struct _i2o_status_block {
u8 init_code;
u8 reserved2;
u32 max_inbound_frames;
+ u32 cur_inbound_frames;
u32 max_outbound_frames;
char product_id[24];
u32 expected_lct_size;
@@ -211,9 +212,38 @@ typedef struct _i2o_status_block {
u32 current_io_base;
u32 reserved3:24;
u32 cmd_status:8;
-} i2o_status_block, *pi2o_status_block;
+} i2o_status_block;
-
+/* Event indicator mask flags */
+#define I2O_EVT_IND_STATE_CHANGE 0x80000000
+#define I2O_EVT_IND_GENERAL_WARNING 0x40000000
+#define I2O_EVT_IND_CONFIGURATION_FLAG 0x20000000
+#define I2O_EVT_IND_LOCK_RELEASE 0x10000000
+#define I2O_EVT_IND_CAPABILITY_CHANGE 0x08000000
+#define I2O_EVT_IND_DEVICE_RESET 0x04000000
+#define I2O_EVT_IND_EVT_MASK_MODIFIED 0x02000000
+#define I2O_EVT_IND_FIELD_MODIFIED 0x01000000
+#define I2O_EVT_IND_VENDOR_EVT 0x00800000
+#define I2O_EVT_IND_DEVICE_STATE 0x00400000
+
+/* Event data for generic events */
+#define I2O_EVT_STATE_CHANGE_NORMAL 0x00
+#define I2O_EVT_STATE_CHANGE_SUSPENDED 0x01
+#define I2O_EVT_STATE_CHANGE_RESTART 0x02
+#define I2O_EVT_STATE_CHANGE_NA_RECOVER 0x03
+#define I2O_EVT_STATE_CHANGE_NA_NO_RECOVER 0x04
+#define I2O_EVT_STATE_CHANGE_QUIESCE_REQUEST 0x05
+#define I2O_EVT_STATE_CHANGE_FAILED 0x10
+#define I2O_EVT_STATE_CHANGE_FAULTED 0x11
+
+#define I2O_EVT_GEN_WARNING_NORMAL 0x00
+#define I2O_EVT_GEN_WARNING_ERROR_THRESHOLD 0x01
+#define I2O_EVT_GEN_WARNING_MEDIA_FAULT 0x02
+
+#define I2O_EVT_CAPABILITY_OTHER 0x01
+#define I2O_EVT_CAPABILITY_CHANGED 0x02
+
+#define I2O_EVT_SENSOR_STATE_CHANGED 0x01
#ifdef __KERNEL__ /* ioctl stuff only thing exported to users */
@@ -246,7 +276,7 @@ struct i2o_message
struct i2o_device
{
- pi2o_lct_entry lct_data;/* Device LCT information */
+ i2o_lct_entry *lct_data;/* Device LCT information */
u32 flags;
int i2oversion; /* I2O version supported. Actually there
* should be high and low version */
@@ -286,6 +316,7 @@ struct i2o_controller
char name[16];
int unit;
int type;
+ int enabled;
#define I2O_TYPE_PCI 0x01 /* PCI I2O controller */
@@ -297,9 +328,9 @@ struct i2o_controller
volatile u32 *reply_port;
volatile u32 *irq_mask; /* Interrupt port */
- pi2o_status_block status_block; /* IOP status block */
- pi2o_lct lct;
- pi2o_hrt hrt;
+ i2o_status_block *status_block; /* IOP status block */
+ i2o_lct *lct;
+ i2o_hrt *hrt;
u32 mem_offset; /* MFA offset */
u32 mem_phys; /* MFA physical */
@@ -463,22 +494,22 @@ extern int i2o_release_device(struct i2o_device *, struct i2o_handler *, u32);
extern int i2o_post_this(struct i2o_controller *, u32 *, int);
extern int i2o_post_wait(struct i2o_controller *, u32 *, int, int);
-extern int i2o_issue_claim(struct i2o_controller *, int, int, int, int *, u32);
extern int i2o_issue_params(int, struct i2o_controller *, int, void *,
int, void *, int);
-extern int i2o_query_scalar(struct i2o_controller *, int, int, int,
- void *, int);
-extern int i2o_set_scalar(struct i2o_controller *, int, int, int,
- void *, int);
+extern int i2o_query_scalar(struct i2o_controller *, int, int, int, void *, int);
+extern int i2o_set_scalar(struct i2o_controller *, int, int, int, void *, int);
-extern int i2o_query_table(int, struct i2o_controller *, int, int, int,
- void *, int, void *, int);
+extern int i2o_query_table(int, struct i2o_controller *, int, int, int, void *,
+ int, void *, int);
extern int i2o_clear_table(struct i2o_controller *, int, int);
-extern int i2o_row_add_table(struct i2o_controller *, int, int, int,
- void *, int);
-extern int i2o_row_delete_table(struct i2o_controller *, int, int, int,
- void *, int);
+extern int i2o_row_add_table(struct i2o_controller *, int, int, int, void *,
+ int);
+extern int i2o_row_delete_table(struct i2o_controller *, int, int, int, void *,
+ int);
+
+extern int i2o_event_register(struct i2o_controller *, int, int, u32);
+extern int i2o_event_ack(struct i2o_controller *, int, int, u32, void *, int);
extern void i2o_run_queue(struct i2o_controller *);
extern void i2o_report_status(const char *, const char *, u32 *);
@@ -614,7 +645,7 @@ extern const char *i2o_get_class_name(int);
#define I2O_CMD_UTIL_PARAMS_GET 0x06
#define I2O_CMD_UTIL_PARAMS_SET 0x05
#define I2O_CMD_UTIL_EVT_REGISTER 0x13
-#define I2O_CMD_UTIL_ACK 0x14
+#define I2O_CMD_UTIL_EVT_ACK 0x14
#define I2O_CMD_UTIL_CONFIG_DIALOG 0x10
#define I2O_CMD_UTIL_DEVICE_RESERVE 0x0D
#define I2O_CMD_UTIL_DEVICE_RELEASE 0x0F
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 4af0cd253..10cfa1605 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -403,6 +403,12 @@ typedef struct hwif_s {
*/
typedef void (ide_handler_t)(ide_drive_t *);
+/*
+ * when ide_timer_expiry fires, invoke a handler of this type
+ * to decide what to do.
+ */
+typedef int (ide_expiry_t)(ide_drive_t *);
+
typedef struct hwgroup_s {
spinlock_t spinlock; /* protects "busy" and "handler" */
ide_handler_t *handler;/* irq handler, if active */
@@ -413,6 +419,7 @@ typedef struct hwgroup_s {
struct timer_list timer; /* failsafe timer */
struct request wrq; /* local copy of current write rq */
unsigned long poll_timeout; /* timeout value during long polls */
+ ide_expiry_t *expiry; /* queried upon timeouts */
} ide_hwgroup_t;
/*
@@ -584,7 +591,7 @@ void atapi_output_bytes (ide_drive_t *drive, void *buffer, unsigned int bytecoun
* This is used on exit from the driver, to designate the next irq handler
* and also to start the safety timer.
*/
-void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler);
+void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry);
/*
* Error reporting, in human readable form (luxurious, but a memory hog).
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index 23e0777ae..18873a97f 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -13,6 +13,7 @@
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
* Florian La Roche,
* Jonathan Layes <layes@loran.com>
+ * Arnaldo Carvalho de Melo <acme@conectiva.com.br> ARPHRD_HWX25
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -47,6 +48,7 @@
#define ARPHRD_ADAPT 264
#define ARPHRD_ROSE 270
#define ARPHRD_X25 271 /* CCITT X.25 */
+#define ARPHRD_HWX25 272 /* Boards with X.25 in firmware */
#define ARPHRD_PPP 512
#define ARPHRD_HDLC 513 /* (Cisco) HDLC */
#define ARPHRD_LAPB 516 /* LAPB */
diff --git a/include/linux/init.h b/include/linux/init.h
index 15fb273ec..5659036c7 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -103,6 +103,8 @@ extern struct kernel_param __setup_start, __setup_end;
#define module_exit(x) void cleanup_module(void) { x(); }
#endif
+#define __setup(str,func) /* nothing */
+
#endif
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
@@ -111,4 +113,4 @@ extern struct kernel_param __setup_start, __setup_end;
#define __initlocaldata
#endif
-#endif
+#endif /* _LINUX_INIT_H */
diff --git a/include/linux/ipc.h b/include/linux/ipc.h
index 851ff4cef..56bcb9780 100644
--- a/include/linux/ipc.h
+++ b/include/linux/ipc.h
@@ -38,10 +38,12 @@ struct ipc_perm
#ifdef __KERNEL__
-/* special shmsegs[id], msgque[id] or semary[id] values */
+/* special shmsegs[id] values */
#define IPC_UNUSED ((void *) -1)
#define IPC_NOID ((void *) -2) /* being allocated/destroyed */
+#define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */
+
#endif /* __KERNEL__ */
#endif /* _LINUX_IPC_H */
diff --git a/include/linux/isdn.h b/include/linux/isdn.h
index d1d7350b1..b73358b68 100644
--- a/include/linux/isdn.h
+++ b/include/linux/isdn.h
@@ -1,8 +1,8 @@
-/* $Id: isdn.h,v 1.71 1999/08/23 15:54:22 keil Exp $
+/* $Id: isdn.h,v 1.81 1999/10/27 21:21:18 detabc Exp $
*
* Main header for the Linux ISDN subsystem (linklevel).
*
- * Copyright 1994,95,96 by Fritz Elfert (fritz@wuemaus.franken.de)
+ * Copyright 1994,95,96 by Fritz Elfert (fritz@isdn4linux.de)
* Copyright 1995,96 by Thinking Objects Software GmbH Wuerzburg
* Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
*
@@ -21,6 +21,51 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdn.h,v $
+ * Revision 1.81 1999/10/27 21:21:18 detabc
+ * Added support for building logically-bind-group's per interface.
+ * usefull for outgoing call's with more then one isdn-card.
+ *
+ * Switchable support to dont reset the hangup-timeout for
+ * receive frames. Most part's of the timru-rules for receiving frames
+ * are now obsolete. If the input- or forwarding-firewall deny
+ * the frame, the line will be not hold open.
+ *
+ * Revision 1.80 1999/10/26 21:09:29 armin
+ * New bufferlen for phonenumber only with kernel 2.3.x
+ *
+ * Revision 1.79 1999/10/16 17:52:38 keil
+ * Changing the MSN length need new data versions
+ *
+ * Revision 1.78 1999/10/08 18:59:33 armin
+ * Bugfix of too small MSN buffer and checking phone number
+ * in isdn_tty_getdial()
+ *
+ * Revision 1.77 1999/09/23 22:22:42 detabc
+ * added tcp-keepalive-detect with local response (ipv4 only)
+ * added host-only-interface support
+ * (source ipaddr == interface ipaddr) (ipv4 only)
+ * ok with kernel 2.3.18 and 2.2.12
+ *
+ * Revision 1.76 1999/09/14 10:16:21 keil
+ * change ABC include
+ *
+ * Revision 1.75 1999/09/13 23:25:17 he
+ * serialized xmitting frames from isdn_ppp and BSENT statcallb
+ *
+ * Revision 1.74 1999/09/12 16:19:39 detabc
+ * added abc features
+ * low cost routing for net-interfaces (only the HL side).
+ * need more implementation in the isdnlog-utility
+ * udp info support (first part).
+ * different EAZ on outgoing call's.
+ * more checks on D-Channel callbacks (double use of channels).
+ * tested and running with kernel 2.3.17
+ *
+ * Revision 1.73 1999/09/06 07:29:36 fritz
+ * Changed my mail-address.
+ *
+ * Revision 1.72 1999/09/04 22:20:19 detabc
+ *
* Revision 1.71 1999/08/23 15:54:22 keil
* more backported changes from kernel 2.3.14
*
@@ -250,7 +295,6 @@
#ifndef isdn_h
#define isdn_h
-#include <linux/isdn_compat.h>
#include <linux/config.h>
#include <linux/ioctl.h>
@@ -279,6 +323,18 @@
#define ISDN_MINOR_PPPMAX (128 + (ISDN_MAX_CHANNELS-1))
#define ISDN_MINOR_STATUS 255
+#undef CONFIG_ISDN_WITH_ABC_CALLB
+#undef CONFIG_ISDN_WITH_ABC_UDP_CHECK
+#undef CONFIG_ISDN_WITH_ABC_UDP_CHECK_HANGUP
+#undef CONFIG_ISDN_WITH_ABC_UDP_CHECK_DIAL
+#undef CONFIG_ISDN_WITH_ABC_OUTGOING_EAZ
+#undef CONFIG_ISDN_WITH_ABC_LCR_SUPPORT
+#undef CONFIG_ISDN_WITH_ABC_IPV4_TCP_KEEPALIVE
+#undef CONFIG_ISDN_WITH_ABC_IPV4_DYNADDR
+#undef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
+#undef CONFIG_ISDN_WITH_ABC_ICALL_BIND
+
+
/* New ioctl-codes */
#define IIOCNETAIF _IO('I',1)
#define IIOCNETDIF _IO('I',2)
@@ -302,6 +358,7 @@
#define IIOCNETDIL _IO('I',20)
#define IIOCGETCPS _IO('I',21)
#define IIOCGETDVR _IO('I',22)
+#define IIOCNETLCR _IO('I',23) /* dwabc ioctl for LCR from isdnlog */
#define IIOCNETALN _IO('I',32)
#define IIOCNETDLN _IO('I',33)
@@ -335,10 +392,15 @@
#define ISDN_USAGE_OUTGOING 128 /* This bit is set, if channel is outgoing */
#define ISDN_MODEM_ANZREG 24 /* Number of Modem-Registers */
-#define ISDN_MSNLEN 20
#define ISDN_LMSNLEN 255 /* Length of tty's Listen-MSN string */
#define ISDN_CMSGLEN 50 /* Length of CONNECT-Message to add for Modem */
+#define ISDN_MSNLEN 32
+#define NET_DV 0x06 /* Data version for isdn_net_ioctl_cfg */
+#define TTY_DV 0x06 /* Data version for iprofd etc. */
+
+#define INF_DV 0x01 /* Data version for /dev/isdninfo */
+
typedef struct {
char drvid[25];
unsigned long arg;
@@ -356,10 +418,6 @@ typedef struct {
int outgoing;
} isdn_net_ioctl_phone;
-#define NET_DV 0x05 /* Data version for isdn_net_ioctl_cfg */
-#define TTY_DV 0x05 /* Data version for iprofd etc. */
-#define INF_DV 0x01 /* Data version for /dev/isdninfo */
-
typedef struct {
char name[10]; /* Name of interface */
char master[10]; /* Name of Master for Bundling */
@@ -438,7 +496,6 @@ typedef struct {
#include <linux/isdnif.h>
-
#define ISDN_DRVIOCTL_MASK 0x7f /* Mask for Device-ioctl */
/* Until now unused */
@@ -504,12 +561,6 @@ typedef struct {
#define ISDN_NET_CALLBACK 0x04 /* activate callback */
#define ISDN_NET_CBHUP 0x08 /* hangup before callback */
#define ISDN_NET_CBOUT 0x10 /* remote machine does callback */
-#if 0
-/* Unused??? */
-#define ISDN_NET_CLONE 0x08 /* clone a tmp interface when called */
-#define ISDN_NET_TMP 0x10 /* tmp interface until getting an IP */
-#define ISDN_NET_DYNAMIC 0x20 /* this link is dynamically allocated */
-#endif
#define ISDN_NET_MAGIC 0x49344C02 /* for paranoia-checking */
@@ -591,7 +642,7 @@ typedef struct isdn_net_local_s {
struct isdn_net_local_s *last; /* Ptr to last link in bundle */
struct isdn_net_dev_s *netdev; /* Ptr to netdev */
struct sk_buff *first_skb; /* Ptr to skb that triggers dialing */
- struct sk_buff *sav_skb; /* Ptr to skb, rejected by LL-driver*/
+ struct sk_buff *volatile sav_skb; /* Ptr to skb, rejected by LL-driver*/
/* Ptr to orig. hard_header_cache */
int (*org_hhc)(
struct neighbour *neigh,
@@ -743,12 +794,7 @@ typedef struct modem_info {
atemu emu; /* AT-emulator data */
struct termios normal_termios; /* For saving termios structs */
struct termios callout_termios;
-#ifdef COMPAT_HAS_NEW_WAITQ
wait_queue_head_t open_wait, close_wait;
-#else
- struct wait_queue *open_wait;
- struct wait_queue *close_wait;
-#endif
struct semaphore write_sem;
} modem_info;
@@ -826,11 +872,7 @@ typedef struct {
ulong flags; /* Misc driver Flags */
int locks; /* Number of locks for this driver */
int channels; /* Number of channels */
-#ifdef COMPAT_HAS_NEW_WAITQ
wait_queue_head_t st_waitq; /* Wait-Queue for status-read's */
-#else
- struct wait_queue *st_waitq; /* Wait-Queue for status-read's */
-#endif
int maxbufsize; /* Maximum Buffersize supported */
unsigned long pktcount; /* Until now: unused */
int stavail; /* Chars avail on Status-device */
@@ -841,13 +883,8 @@ typedef struct {
unsigned long DLEflag; /* Flags: Insert DLE at next read */
#endif
struct sk_buff_head *rpqueue; /* Pointers to start of Rcv-Queue */
-#ifdef COMPAT_HAS_NEW_WAITQ
wait_queue_head_t *rcv_waitq; /* Wait-Queues for B-Channel-Reads */
wait_queue_head_t *snd_waitq; /* Wait-Queue for B-Channel-Send's */
-#else
- struct wait_queue **rcv_waitq; /* Wait-Queues for B-Channel-Reads */
- struct wait_queue **snd_waitq; /* Wait-Queue for B-Channel-Send's */
-#endif
char msn2eaz[10][ISDN_MSNLEN]; /* Mapping-Table MSN->EAZ */
} driver;
@@ -863,11 +900,7 @@ typedef struct isdn_devt {
/* see ISDN_TIMER_..defines */
int global_flags;
infostruct *infochain; /* List of open info-devs. */
-#ifdef COMPAT_HAS_NEW_WAITQ
wait_queue_head_t info_waitq; /* Wait-Queue for isdninfo */
-#else
- struct wait_queue *info_waitq; /* Wait-Queue for isdninfo */
-#endif
struct timer_list timer; /* Misc.-function Timer */
int chanmap[ISDN_MAX_CHANNELS];/* Map minor->device-channel */
int drvmap[ISDN_MAX_CHANNELS]; /* Map minor->driver-index */
@@ -894,6 +927,7 @@ typedef struct isdn_devt {
extern isdn_dev *dev;
+
/* Utility-Macros */
#define MIN(a,b) ((a<b)?a:b)
#define MAX(a,b) ((a>b)?a:b)
diff --git a/include/linux/isdn_compat.h b/include/linux/isdn_compat.h
deleted file mode 100644
index 7750f6303..000000000
--- a/include/linux/isdn_compat.h
+++ /dev/null
@@ -1,116 +0,0 @@
-#ifdef __KERNEL__
-/* Compatibility for various Linux kernel versions */
-
-#ifndef _LINUX_ISDN_COMPAT_H
-#define _LINUX_ISDN_COMPAT_H
-
-#ifndef LINUX_VERSION_CODE
-#include <linux/version.h>
-#endif
-
-#ifndef KERNEL_VERSION
-#define KERNEL_VERSION(x,y,z) (((x)<<16)+((y)<<8)+(z))
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0)
-#include <linux/mm.h>
-
-#define ioremap vremap
-#define ioremap_nocache vremap
-#define iounmap vfree
-
-static inline unsigned long copy_from_user(void *to, const void *from, unsigned long n)
-{
- int i;
- if ((i = verify_area(VERIFY_READ, from, n)) != 0)
- return i;
- memcpy_fromfs(to, from, n);
- return 0;
-}
-
-static inline unsigned long copy_to_user(void *to, const void *from, unsigned long n)
-{
- int i;
- if ((i = verify_area(VERIFY_WRITE, to, n)) != 0)
- return i;
- memcpy_tofs(to, from, n);
- return 0;
-}
-
-#define GET_USER(x, addr) ( x = get_user(addr) )
-#ifdef __alpha__ /* needed for 2.0.x with alpha-patches */
-#define RWTYPE long
-#define LSTYPE long
-#define RWARG unsigned long
-#else
-#define RWTYPE int
-#define LSTYPE int
-#define RWARG int
-#endif
-#define LSARG off_t
-#else
-#include <asm/uaccess.h>
-#define GET_USER get_user
-#define PUT_USER put_user
-#define RWTYPE long
-#define LSTYPE long long
-#define RWARG unsigned long
-#define LSARG long long
-#endif /* LINUX_VERSION_CODE */
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,15)
-#define SET_SKB_FREE(x) ( x->free = 1 )
-#define idev_kfree_skb(a,b) dev_kfree_skb(a,b)
-#else
-#define SET_SKB_FREE(x)
-#define idev_kfree_skb(a,b) dev_kfree_skb(a)
-#endif
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,18)
-#define COMPAT_HAS_NEW_SYMTAB
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,31)
-#define CLOSETYPE void
-#define CLOSEVAL
-#else
-#define CLOSETYPE int
-#define CLOSEVAL (0)
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,37)
-#define test_and_clear_bit clear_bit
-#define test_and_set_bit set_bit
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,81)
-#define kstat_irqs( PAR ) kstat.interrupts[PAR]
-#endif
-
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,91)
-#define COMPAT_HAS_NEW_PCI
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13)
-#define get_pcibase(ps, nr) ps->base_address[nr]
-#else
-#define get_pcibase(ps, nr) ps->resource[nr].start
-#endif
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,127)
-#define schedule_timeout(a) current->timeout = jiffies + (a); schedule ();
-#endif
-
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,0)
-#define COMPAT_HAS_NEW_WAITQ
-#endif
-
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,12)
-#define COMPAT_HAS_NEW_SETUP
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,14)
-#define net_device device
-#endif
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_ISDN_COMPAT_H */
diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h
index 9ca7dc7cd..6ba3086ab 100644
--- a/include/linux/isdn_ppp.h
+++ b/include/linux/isdn_ppp.h
@@ -4,7 +4,6 @@
#define _LINUX_ISDN_PPP_H
#include <linux/config.h>
-#include <linux/isdn_compat.h>
#define CALLTYPE_INCOMING 0x1
#define CALLTYPE_OUTGOING 0x2
@@ -207,11 +206,7 @@ struct ippp_struct {
struct ippp_buf_queue rq[NUM_RCV_BUFFS]; /* packet queue for isdn_ppp_read() */
struct ippp_buf_queue *first; /* pointer to (current) first packet */
struct ippp_buf_queue *last; /* pointer to (current) last used packet in queue */
-#ifdef COMPAT_HAS_NEW_WAITQ
wait_queue_head_t wq;
-#else
- struct wait_queue *wq;
-#endif
struct task_struct *tk;
unsigned int mpppcfg;
unsigned int pppcfg;
diff --git a/include/linux/isdnif.h b/include/linux/isdnif.h
index 06206eb91..07e3b826d 100644
--- a/include/linux/isdnif.h
+++ b/include/linux/isdnif.h
@@ -1,10 +1,10 @@
-/* $Id: isdnif.h,v 1.30 1999/08/23 15:54:29 keil Exp $
+/* $Id: isdnif.h,v 1.32 1999/10/11 22:03:00 keil Exp $
*
* Linux ISDN subsystem
*
* Definition of the interface between the subsystem and its low-level drivers.
*
- * Copyright 1994,95,96 by Fritz Elfert (fritz@wuemaus.franken.de)
+ * Copyright 1994,95,96 by Fritz Elfert (fritz@isdn4linux.de)
* Copyright 1995,96 Thinking Objects Software GmbH Wuerzburg
*
* This program is free software; you can redistribute it and/or modify
@@ -22,6 +22,12 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdnif.h,v $
+ * Revision 1.32 1999/10/11 22:03:00 keil
+ * COMPAT_NEED_UACCESS (no include in isdn_compat.h)
+ *
+ * Revision 1.31 1999/09/06 07:29:36 fritz
+ * Changed my mail-address.
+ *
* Revision 1.30 1999/08/23 15:54:29 keil
* more backported changes from kernel 2.3.14
*
@@ -138,7 +144,6 @@
#define isdnif_h
#include <linux/config.h>
-#include <linux/isdn_compat.h>
/*
* Values for general protocol-selection
diff --git a/include/linux/joystick.h b/include/linux/joystick.h
index ce6923de5..0aa715cb3 100644
--- a/include/linux/joystick.h
+++ b/include/linux/joystick.h
@@ -23,7 +23,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Should you need to contact me, the author, you can do so either by
- * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
+ * e-mail - mail your message to <vojtech@suse.cz>, or by paper mail:
* Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic
*/
diff --git a/include/linux/kernelcapi.h b/include/linux/kernelcapi.h
index 7b212be05..5778d2ebb 100644
--- a/include/linux/kernelcapi.h
+++ b/include/linux/kernelcapi.h
@@ -1,11 +1,15 @@
/*
- * $Id: kernelcapi.h,v 1.3 1999/07/01 15:26:56 calle Exp $
+ * $Id: kernelcapi.h,v 1.4 1999/09/10 17:24:19 calle Exp $
*
* Kernel CAPI 2.0 Interface for Linux
*
* (c) Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: kernelcapi.h,v $
+ * Revision 1.4 1999/09/10 17:24:19 calle
+ * Changes for proposed standard for CAPI2.0:
+ * - AK148 "Linux Exention"
+ *
* Revision 1.3 1999/07/01 15:26:56 calle
* complete new version (I love it):
* + new hardware independed "capi_driver" interface that will make it easy to:
@@ -70,19 +74,19 @@ typedef struct kcapi_flagdef {
#ifdef __KERNEL__
struct capi_interface {
- int (*capi_installed) (void);
+ __u16 (*capi_isinstalled) (void);
- __u16(*capi_register) (capi_register_params * rparam, __u16 * applidp);
- __u16(*capi_release) (__u16 applid);
- __u16(*capi_put_message) (__u16 applid, struct sk_buff * msg);
- __u16(*capi_get_message) (__u16 applid, struct sk_buff ** msgp);
- __u16(*capi_set_signal) (__u16 applid,
+ __u16 (*capi_register) (capi_register_params * rparam, __u16 * applidp);
+ __u16 (*capi_release) (__u16 applid);
+ __u16 (*capi_put_message) (__u16 applid, struct sk_buff * msg);
+ __u16 (*capi_get_message) (__u16 applid, struct sk_buff ** msgp);
+ __u16 (*capi_set_signal) (__u16 applid,
void (*signal) (__u16 applid, __u32 param),
__u32 param);
- __u16(*capi_get_manufacturer) (__u16 contr, __u8 buf[CAPI_MANUFACTURER_LEN]);
- __u16(*capi_get_version) (__u16 contr, struct capi_version * verp);
- __u16(*capi_get_serial) (__u16 contr, __u8 serial[CAPI_SERIAL_LEN]);
- __u16(*capi_get_profile) (__u16 contr, struct capi_profile * profp);
+ __u16 (*capi_get_manufacturer) (__u32 contr, __u8 buf[CAPI_MANUFACTURER_LEN]);
+ __u16 (*capi_get_version) (__u32 contr, struct capi_version * verp);
+ __u16(*capi_get_serial) (__u32 contr, __u8 serial[CAPI_SERIAL_LEN]);
+ __u16(*capi_get_profile) (__u32 contr, struct capi_profile * profp);
/*
* to init controllers, data is always in user memory
@@ -96,7 +100,7 @@ struct capi_interface {
struct capi_interface_user {
char name[20];
- void (*callback) (unsigned int cmd, __u16 contr, void *data);
+ void (*callback) (unsigned int cmd, __u32 contr, void *data);
/* internal */
struct capi_interface_user *next;
};
diff --git a/include/linux/major.h b/include/linux/major.h
index dfca27dc5..847697b4d 100644
--- a/include/linux/major.h
+++ b/include/linux/major.h
@@ -120,6 +120,10 @@
#define RTF_MAJOR 150
#define RAW_MAJOR 162
+#define USB_ACM_MAJOR 166
+#define USB_ACM_AUX_MAJOR 167
+#define USB_CHAR_MAJOR 180
+
#define UNIX98_PTY_MASTER_MAJOR 128
#define UNIX98_PTY_MAJOR_COUNT 8
#define UNIX98_PTY_SLAVE_MAJOR (UNIX98_PTY_MASTER_MAJOR+UNIX98_PTY_MAJOR_COUNT)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 1f23dac1c..b53688676 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -56,7 +56,7 @@ struct vm_area_struct {
struct vm_area_struct **vm_pprev_share;
struct vm_operations_struct * vm_ops;
- unsigned long vm_offset;
+ unsigned long vm_pgoff; /* offset in PAGE_SIZE units, *not* PAGE_CACHE_SIZE */
struct file * vm_file;
void * vm_private_data; /* was vm_pte (shared mem) */
};
@@ -110,6 +110,15 @@ struct vm_operations_struct {
};
/*
+ * A swap entry has to fit into a "unsigned long", as
+ * the entry is hidden in the "index" field of the
+ * swapper address space.
+ */
+typedef struct {
+ unsigned long val;
+} swp_entry_t;
+
+/*
* Try to keep the most commonly accessed fields in single cache lines
* here (16 bytes or greater). This ordering should be particularly
* beneficial on 32-bit processors.
@@ -121,7 +130,7 @@ typedef struct page {
/* these must be first (free area handling) */
struct list_head list;
struct address_space *mapping;
- unsigned long offset;
+ unsigned long index;
struct page *next_hash;
atomic_t count;
unsigned long flags; /* atomic flags, some possibly updated asynchronously */
@@ -129,6 +138,7 @@ typedef struct page {
wait_queue_head_t wait;
struct page **pprev_hash;
struct buffer_head * buffers;
+ unsigned long virtual; /* nonzero if kmapped */
} mem_map_t;
#define get_page(p) atomic_inc(&(p)->count)
@@ -193,6 +203,12 @@ typedef struct page {
#define SetPageReserved(page) set_bit(PG_reserved, &(page)->flags)
#define ClearPageReserved(page) clear_bit(PG_reserved, &(page)->flags)
+/*
+ * Error return values for the *_nopage functions
+ */
+#define NOPAGE_SIGBUS (NULL)
+#define NOPAGE_OOM ((struct page *) (-1))
+
/*
* Various page->flags bits:
@@ -270,12 +286,16 @@ extern mem_map_t * mem_map;
* This is timing-critical - most of the time in getting a new page
* goes to clearing the page. If you want a page without the clearing
* overhead, just use __get_free_page() directly..
+ *
+ * We have two allocation namespaces - the *get*page*() variants
+ * return virtual kernel addresses to the allocated page(s), the
+ * alloc_page*() variants return 'struct page *'.
*/
-extern struct page * __get_pages(int gfp_mask, unsigned long order);
#define __get_free_page(gfp_mask) __get_free_pages((gfp_mask),0)
#define __get_dma_pages(gfp_mask, order) __get_free_pages((gfp_mask) | GFP_DMA,(order))
-extern unsigned long FASTCALL(__get_free_pages(int gfp_mask, unsigned long gfp_order));
-extern struct page * get_free_highpage(int gfp_mask);
+extern unsigned long FASTCALL(__get_free_pages(int gfp_mask, unsigned long order));
+extern struct page * FASTCALL(alloc_pages(int gfp_mask, unsigned long order));
+#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
extern inline unsigned long get_zeroed_page(int gfp_mask)
{
@@ -320,12 +340,12 @@ extern int pgt_cache_water[2];
extern int check_pgt_cache(void);
extern void paging_init(void);
-extern void free_area_init(unsigned long);
+extern void free_area_init(unsigned int * zones_size);
extern void mem_init(void);
extern void show_mem(void);
extern void oom(struct task_struct * tsk);
extern void si_meminfo(struct sysinfo * val);
-extern void swapin_readahead(pte_t);
+extern void swapin_readahead(swp_entry_t);
/* mmap.c */
extern void vma_init(void);
@@ -398,15 +418,15 @@ static inline int expand_stack(struct vm_area_struct * vma, unsigned long addres
unsigned long grow;
address &= PAGE_MASK;
- grow = vma->vm_start - address;
+ grow = (vma->vm_start - address) >> PAGE_SHIFT;
if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur ||
- (vma->vm_mm->total_vm << PAGE_SHIFT) + grow > current->rlim[RLIMIT_AS].rlim_cur)
+ ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) > current->rlim[RLIMIT_AS].rlim_cur)
return -ENOMEM;
vma->vm_start = address;
- vma->vm_offset -= grow;
- vma->vm_mm->total_vm += grow >> PAGE_SHIFT;
+ vma->vm_pgoff -= grow;
+ vma->vm_mm->total_vm += grow;
if (vma->vm_flags & VM_LOCKED)
- vma->vm_mm->locked_vm += grow >> PAGE_SHIFT;
+ vma->vm_mm->locked_vm += grow;
return 0;
}
diff --git a/include/linux/module.h b/include/linux/module.h
index e0b655aab..a0fc64c88 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -8,6 +8,7 @@
#define _LINUX_MODULE_H
#include <linux/config.h>
+#include <linux/spinlock.h>
#ifdef __GENKSYMS__
# define _set_ver(sym) sym
diff --git a/include/linux/msdos_fs_sb.h b/include/linux/msdos_fs_sb.h
index 7abd87148..93053c6b6 100644
--- a/include/linux/msdos_fs_sb.h
+++ b/include/linux/msdos_fs_sb.h
@@ -34,6 +34,7 @@ struct vfat_unicode {
struct msdos_sb_info {
unsigned short cluster_size; /* sectors/cluster */
+ unsigned short cluster_bits; /* sectors/cluster */
unsigned char fats,fat_bits; /* number of FATs, FAT bits (12 or 16) */
unsigned short fat_start;
unsigned long fat_length; /* FAT start & length (sec.) */
diff --git a/include/linux/msg.h b/include/linux/msg.h
index 2d42361b1..b3284bfa1 100644
--- a/include/linux/msg.h
+++ b/include/linux/msg.h
@@ -45,9 +45,9 @@ struct msginfo {
unsigned short msgseg;
};
-#define MSGMNI 128 /* <= 32768 */ /* max # of msg queue identifiers */
-#define MSGMAX 4056 /* <= 4056 (?)*/ /* max size of message (bytes) */
-#define MSGMNB 16384 /* <= MAX_INT */ /* default max size of a message queue */
+#define MSGMNI 128 /* <= IPCMNI */ /* max # of msg queue identifiers */
+#define MSGMAX 8192 /* <= INT_MAX */ /* max size of message (bytes) */
+#define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */
/* unused */
#define MSGPOOL (MSGMNI*MSGMNB/1024) /* size in kilobytes of message pool */
diff --git a/include/linux/nbd.h b/include/linux/nbd.h
index c2c0431f4..934e87398 100644
--- a/include/linux/nbd.h
+++ b/include/linux/nbd.h
@@ -1,3 +1,9 @@
+/*
+ * 1999 Copyright (C) Pavel Machek, pavel@ucw.cz. This code is GPL.
+ * 1999/11/04 Copyright (C) 1999 VMware, Inc. (Regis "HPReg" Duchesne)
+ * Made nbd_end_request() use the io_request_lock
+ */
+
#ifndef LINUX_NBD_H
#define LINUX_NBD_H
@@ -27,12 +33,19 @@ extern int requests_out;
static void
nbd_end_request(struct request *req)
{
+ unsigned long flags;
+
#ifdef PARANOIA
requests_out++;
#endif
+ spin_lock_irqsave(&io_request_lock, flags);
if (end_that_request_first( req, !req->errors, "nbd" ))
- return;
+ goto out;
end_that_request_last( req );
+
+out:
+ spin_unlock_irqrestore(&io_request_lock, flags);
+ return;
}
#define MAX_NBD 128
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h
index 1be68cfb5..11acbd7b7 100644
--- a/include/linux/ncp_fs.h
+++ b/include/linux/ncp_fs.h
@@ -136,18 +136,28 @@ struct ncp_nls_ioctl
#include <linux/config.h>
+/* undef because public define in umsdos_fs.h (ncp_fs.h isn't public) */
+#undef PRINTK
+/* define because it is easy to change PRINTK to {*}PRINTK */
+#define PRINTK(format, args...) printk(KERN_DEBUG format , ## args)
+
#undef NCPFS_PARANOIA
+#ifdef NCPFS_PARANOIA
+#define PPRINTK(format, args...) PRINTK(format , ## args)
+#else
+#define PPRINTK(format, args...)
+#endif
+
#ifndef DEBUG_NCP
#define DEBUG_NCP 0
#endif
#if DEBUG_NCP > 0
-#define DPRINTK(format, args...) printk(format , ## args)
+#define DPRINTK(format, args...) PRINTK(format , ## args)
#else
#define DPRINTK(format, args...)
#endif
-
#if DEBUG_NCP > 1
-#define DDPRINTK(format, args...) printk(format , ## args)
+#define DDPRINTK(format, args...) PRINTK(format , ## args)
#else
#define DDPRINTK(format, args...)
#endif
diff --git a/include/linux/nvram.h b/include/linux/nvram.h
index 9e05db191..a2e270d64 100644
--- a/include/linux/nvram.h
+++ b/include/linux/nvram.h
@@ -12,7 +12,6 @@ extern unsigned char nvram_read_byte( int i );
extern void nvram_write_byte( unsigned char c, int i );
extern int nvram_check_checksum( void );
extern void nvram_set_checksum( void );
-extern int nvram_init( void );
#endif
#endif /* _LINUX_NVRAM_H */
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index de5514574..66b558627 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -1,8 +1,6 @@
#ifndef _LINUX_PAGEMAP_H
#define _LINUX_PAGEMAP_H
-#include <asm/system.h>
-
/*
* Page-mapping primitive inline functions
*
@@ -11,17 +9,10 @@
#include <linux/mm.h>
#include <linux/fs.h>
-#include <linux/highmem.h>
#include <linux/list.h>
-extern inline pte_t get_pagecache_pte(struct page *page)
-{
- /*
- * the pagecache is still machineword sized. The rest of the VM
- * can deal with arbitrary sized ptes.
- */
- return __pte(page->offset);
-}
+#include <asm/system.h>
+#include <asm/pgtable.h>
/*
* The page cache can done in larger chunks than
@@ -36,7 +27,7 @@ extern inline pte_t get_pagecache_pte(struct page *page)
#define PAGE_CACHE_MASK PAGE_MASK
#define PAGE_CACHE_ALIGN(addr) (((addr)+PAGE_CACHE_SIZE-1)&PAGE_CACHE_MASK)
-#define page_cache_alloc() __get_pages(GFP_USER, 0)
+#define page_cache_alloc() alloc_pages(GFP_HIGHUSER, 0)
#define page_cache_free(x) __free_page(x)
#define page_cache_release(x) __free_page(x)
@@ -57,43 +48,42 @@ extern void page_cache_init(unsigned long);
/*
* We use a power-of-two hash table to avoid a modulus,
* and get a reasonable hash by knowing roughly how the
- * inode pointer and offsets are distributed (ie, we
+ * inode pointer and indexes are distributed (ie, we
* roughly know which bits are "significant")
*
* For the time being it will work for struct address_space too (most of
* them sitting inside the inodes). We might want to change it later.
*/
-extern inline unsigned long _page_hashfn(struct address_space * mapping, unsigned long offset)
+extern inline unsigned long _page_hashfn(struct address_space * mapping, unsigned long index)
{
#define i (((unsigned long) mapping)/(sizeof(struct inode) & ~ (sizeof(struct inode) - 1)))
-#define o (offset >> PAGE_SHIFT)
#define s(x) ((x)+((x)>>PAGE_HASH_BITS))
- return s(i+o) & (PAGE_HASH_SIZE-1);
+ return s(i+index) & (PAGE_HASH_SIZE-1);
#undef i
#undef o
#undef s
}
-#define page_hash(mapping,offset) (page_hash_table+_page_hashfn(mapping,offset))
+#define page_hash(mapping,index) (page_hash_table+_page_hashfn(mapping,index))
extern struct page * __find_get_page (struct address_space *mapping,
- unsigned long offset, struct page **hash);
-#define find_get_page(mapping, offset) \
- __find_get_page(mapping, offset, page_hash(mapping, offset))
+ unsigned long index, struct page **hash);
+#define find_get_page(mapping, index) \
+ __find_get_page(mapping, index, page_hash(mapping, index))
extern struct page * __find_lock_page (struct address_space * mapping,
- unsigned long offset, struct page **hash);
+ unsigned long index, struct page **hash);
extern void lock_page(struct page *page);
-#define find_lock_page(mapping, offset) \
- __find_lock_page(mapping, offset, page_hash(mapping, offset))
+#define find_lock_page(mapping, index) \
+ __find_lock_page(mapping, index, page_hash(mapping, index))
extern void __add_page_to_hash_queue(struct page * page, struct page **p);
-extern void add_to_page_cache(struct page * page, struct address_space *mapping, unsigned long offset);
-extern int add_to_page_cache_unique(struct page * page, struct address_space *mapping, unsigned long offset, struct page **hash);
+extern void add_to_page_cache(struct page * page, struct address_space *mapping, unsigned long index);
+extern int add_to_page_cache_unique(struct page * page, struct address_space *mapping, unsigned long index, struct page **hash);
-extern inline void add_page_to_hash_queue(struct page * page, struct inode * inode, unsigned long offset)
+extern inline void add_page_to_hash_queue(struct page * page, struct inode * inode, unsigned long index)
{
- __add_page_to_hash_queue(page, page_hash(&inode->i_data,offset));
+ __add_page_to_hash_queue(page, page_hash(&inode->i_data,index));
}
extern inline void add_page_to_inode_queue(struct address_space *mapping, struct page * page)
diff --git a/include/linux/parport.h b/include/linux/parport.h
index b663548f6..8a1e97501 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -422,6 +422,10 @@ extern int parport_wait_event (struct parport *, long timeout);
extern int parport_wait_peripheral (struct parport *port,
unsigned char mask,
unsigned char val);
+extern int parport_poll_peripheral (struct parport *port,
+ unsigned char mask,
+ unsigned char val,
+ int usec);
/* For architectural drivers */
extern void parport_ieee1284_wakeup (struct parport *port);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index a71f4c1be..96a9dd076 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -438,7 +438,6 @@ int pcibios_find_device (unsigned short vendor, unsigned short dev_id,
void pci_init(void);
struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata);
-int get_pci_list(char *buf);
int pci_proc_attach_device(struct pci_dev *dev);
int pci_proc_detach_device(struct pci_dev *dev);
void pci_name_device(struct pci_dev *dev);
@@ -490,8 +489,9 @@ struct pci_simple_probe_entry {
void *dev_data; /* driver-private, entry-specific data */
};
-int pci_simple_probe (struct pci_simple_probe_entry *list, size_t match_limit,
- pci_simple_probe_callback cb, void *drvr_data);
+int pci_simple_probe (const struct pci_simple_probe_entry *list,
+ size_t match_limit, pci_simple_probe_callback cb,
+ void *drvr_data);
@@ -530,7 +530,7 @@ unsigned int ss_vendor, unsigned int ss_device, struct pci_dev *from)
extern inline void pci_set_master(struct pci_dev *dev) { }
extern inline int pci_enable_device(struct pci_dev *dev) { return 0; }
-extern inline int pci_simple_probe (struct pci_simple_probe_entry *list, size_t match_limit,
+extern inline int pci_simple_probe (const struct pci_simple_probe_entry *list, size_t match_limit,
pci_simple_probe_callback cb, void *drvr_data)
{ return 0; }
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index e4bca6807..3015837a3 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -598,6 +598,7 @@
#define PCI_DEVICE_ID_INTERG_1680 0x1680
#define PCI_DEVICE_ID_INTERG_1682 0x1682
#define PCI_DEVICE_ID_INTERG_2000 0x2000
+#define PCI_DEVICE_ID_INTERG_2010 0x2010
#define PCI_VENDOR_ID_REALTEK 0x10ec
#define PCI_DEVICE_ID_REALTEK_8029 0x8029
@@ -930,6 +931,7 @@
#define PCI_DEVICE_ID_LAVA_PARALLEL 0x8000
#define PCI_DEVICE_ID_LAVA_DUAL_PAR_A 0x8002 /* The Lava Dual Parallel is */
#define PCI_DEVICE_ID_LAVA_DUAL_PAR_B 0x8003 /* two PCI devices on a card */
+#define PCI_DEVICE_ID_LAVA_BOCA_IOPPAR 0x8800
#define PCI_VENDOR_ID_PANACOM 0x14d4
#define PCI_DEVICE_ID_PANACOM_QUADMODEM 0x0400
@@ -947,6 +949,9 @@
#define PCI_DEVICE_ID_3DLABS_DELTA 0x0003
#define PCI_DEVICE_ID_3DLABS_PERMEDIA 0x0004
#define PCI_DEVICE_ID_3DLABS_MX 0x0006
+#define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007
+#define PCI_DEVICE_ID_3DLABS_GAMMA 0x0008
+#define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009
#define PCI_VENDOR_ID_AVANCE 0x4005
#define PCI_DEVICE_ID_AVANCE_ALG2064 0x2064
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 35f730151..d0e57016f 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -9,256 +9,17 @@
*/
/*
- * We always define these enumerators
+ * Offset of the first process in the /proc root directory..
*/
+#define FIRST_PROCESS_ENTRY 256
-enum root_directory_inos {
- PROC_ROOT_INO = 1,
- PROC_LOADAVG,
- PROC_UPTIME,
- PROC_MEMINFO,
- PROC_KMSG,
- PROC_VERSION,
- PROC_CPUINFO,
- PROC_PCI,
- PROC_MCA,
- PROC_NUBUS,
- PROC_MAC_VIA,
- PROC_SELF, /* will change inode # */
- PROC_NET,
- PROC_SCSI,
- PROC_MALLOC,
- PROC_KCORE,
- PROC_MODULES,
- PROC_STAT,
- PROC_DEVICES,
- PROC_PARTITIONS,
- PROC_INTERRUPTS,
- PROC_FILESYSTEMS,
- PROC_KSYMS,
- PROC_DMA,
- PROC_IOPORTS,
- PROC_MEMORY,
- PROC_PROFILE, /* whether enabled or not */
- PROC_CMDLINE,
- PROC_SYS,
- PROC_MTAB,
- PROC_SWAP,
- PROC_MD,
- PROC_RTC,
- PROC_LOCKS,
- PROC_HARDWARE,
- PROC_SLABINFO,
- PROC_PARPORT,
- PROC_PPC_HTAB,
- PROC_STRAM,
- PROC_SOUND,
- PROC_MTRR, /* whether enabled or not */
- PROC_FS,
- PROC_SYSVIPC,
- PROC_DRIVER,
-};
-
-enum pid_directory_inos {
- PROC_PID_INO = 2,
- PROC_PID_STATUS,
- PROC_PID_MEM,
- PROC_PID_CWD,
- PROC_PID_ROOT,
- PROC_PID_EXE,
- PROC_PID_FD,
- PROC_PID_ENVIRON,
- PROC_PID_CMDLINE,
- PROC_PID_STAT,
- PROC_PID_STATM,
- PROC_PID_MAPS,
-#if CONFIG_AP1000
- PROC_PID_RINGBUF,
-#endif
- PROC_PID_CPU,
-};
-
-enum pid_subdirectory_inos {
- PROC_PID_FD_DIR = 0x8000, /* 0x8000-0xffff */
-};
-
-enum net_directory_inos {
- PROC_NET_UNIX = 128,
- PROC_NET_ARP,
- PROC_NET_ROUTE,
- PROC_NET_DEV,
- PROC_NET_RAW,
- PROC_NET_RAW6,
- PROC_NET_TCP,
- PROC_NET_TCP6,
- PROC_NET_UDP,
- PROC_NET_UDP6,
- PROC_NET_SNMP,
- PROC_NET_RARP,
- PROC_NET_IGMP,
- PROC_NET_IPMR_VIF,
- PROC_NET_IPMR_MFC,
- PROC_NET_IPFWFWD,
- PROC_NET_IPFWIN,
- PROC_NET_IPFWOUT,
- PROC_NET_IPACCT,
- PROC_NET_IPMSQHST,
- PROC_NET_WIRELESS,
- PROC_NET_IPX_INTERFACE,
- PROC_NET_IPX_ROUTE,
- PROC_NET_IPX,
- PROC_NET_ATALK,
- PROC_NET_AT_ROUTE,
- PROC_NET_ATIF,
- PROC_NET_AX25_ROUTE,
- PROC_NET_AX25,
- PROC_NET_AX25_CALLS,
- PROC_NET_BMAC,
- PROC_NET_NR_NODES,
- PROC_NET_NR_NEIGH,
- PROC_NET_NR,
- PROC_NET_SOCKSTAT,
- PROC_NET_SOCKSTAT6,
- PROC_NET_RTCACHE,
- PROC_NET_AX25_BPQETHER,
- PROC_NET_IP_MASQ_APP,
- PROC_NET_RT6,
- PROC_NET_SNMP6,
- PROC_NET_RT6_STATS,
- PROC_NET_NDISC,
- PROC_NET_STRIP_STATUS,
- PROC_NET_STRIP_TRACE,
- PROC_NET_Z8530,
- PROC_NET_RS_NODES,
- PROC_NET_RS_NEIGH,
- PROC_NET_RS_ROUTES,
- PROC_NET_RS,
- PROC_NET_CL2LLC,
- PROC_NET_X25_ROUTES,
- PROC_NET_X25,
- PROC_NET_TR_RIF,
- PROC_NET_DN_DEV,
- PROC_NET_DN_ADJ,
- PROC_NET_DN_ROUTE,
- PROC_NET_DN_CACHE,
- PROC_NET_DN_SKT,
- PROC_NET_DN_FW_CHAINS,
- PROC_NET_DN_FW_CHAIN_NAMES,
- PROC_NET_DN_RAW,
- PROC_NET_NETSTAT,
- PROC_NET_IPFW_CHAINS,
- PROC_NET_IPFW_CHAIN_NAMES,
- PROC_NET_AT_AARP,
- PROC_NET_BRIDGE,
- PROC_NET_LAST
-};
-enum scsi_directory_inos {
- PROC_SCSI_SCSI = 256,
- PROC_SCSI_ADVANSYS,
- PROC_SCSI_PCI2000,
- PROC_SCSI_PCI2220I,
- PROC_SCSI_PSI240I,
- PROC_SCSI_EATA,
- PROC_SCSI_EATA_PIO,
- PROC_SCSI_AHA152X,
- PROC_SCSI_AHA1542,
- PROC_SCSI_AHA1740,
- PROC_SCSI_AIC7XXX,
- PROC_SCSI_BUSLOGIC,
- PROC_SCSI_U14_34F,
- PROC_SCSI_FDOMAIN,
- PROC_SCSI_GDTH,
- PROC_SCSI_GENERIC_NCR5380,
- PROC_SCSI_IN2000,
- PROC_SCSI_PAS16,
- PROC_SCSI_QLOGICFAS,
- PROC_SCSI_QLOGICISP,
- PROC_SCSI_QLOGICFC,
- PROC_SCSI_SEAGATE,
- PROC_SCSI_T128,
- PROC_SCSI_NCR53C7xx,
- PROC_SCSI_SYM53C8XX,
- PROC_SCSI_NCR53C8XX,
- PROC_SCSI_ULTRASTOR,
- PROC_SCSI_7000FASST,
- PROC_SCSI_IBMMCA,
- PROC_SCSI_FD_MCS,
- PROC_SCSI_EATA2X,
- PROC_SCSI_DC390T,
- PROC_SCSI_AM53C974,
- PROC_SCSI_SSC,
- PROC_SCSI_NCR53C406A,
- PROC_SCSI_SYM53C416,
- PROC_SCSI_MEGARAID,
- PROC_SCSI_PPA,
- PROC_SCSI_ATP870U,
- PROC_SCSI_ESP,
- PROC_SCSI_QLOGICPTI,
- PROC_SCSI_AMIGA7XX,
- PROC_SCSI_MVME147,
- PROC_SCSI_MVME16x,
- PROC_SCSI_BVME6000,
- PROC_SCSI_SIM710,
- PROC_SCSI_A3000,
- PROC_SCSI_A2091,
- PROC_SCSI_GVP11,
- PROC_SCSI_ATARI,
- PROC_SCSI_MAC,
- PROC_SCSI_IDESCSI,
- PROC_SCSI_SGIWD93,
- PROC_SCSI_MESH,
- PROC_SCSI_53C94,
- PROC_SCSI_PLUTO,
- PROC_SCSI_INI9100U,
- PROC_SCSI_INIA100,
- PROC_SCSI_IPH5526_FC,
- PROC_SCSI_FCAL,
- PROC_SCSI_I2O,
- PROC_SCSI_USB_SCSI,
- PROC_SCSI_SCSI_DEBUG,
- PROC_SCSI_NOT_PRESENT,
- PROC_SCSI_FILE, /* I'm assuming here that we */
- PROC_SCSI_LAST = (PROC_SCSI_FILE + 16) /* won't ever see more than */
-}; /* 16 HBAs in one machine */
-
-enum mca_directory_inos {
- PROC_MCA_MACHINE = (PROC_SCSI_LAST+1),
- PROC_MCA_REGISTERS,
- PROC_MCA_VIDEO,
- PROC_MCA_SCSI,
- PROC_MCA_SLOT, /* the 8 adapter slots */
- PROC_MCA_LAST = (PROC_MCA_SLOT + 8)
-};
-
-enum bus_directory_inos {
- PROC_BUS_PCI = PROC_MCA_LAST,
- PROC_BUS_PCI_DEVICES,
- PROC_BUS_ZORRO,
- PROC_BUS_ZORRO_DEVICES,
- PROC_BUS_ECARD_DEVICES,
- PROC_BUS_NUBUS,
- PROC_BUS_NUBUS_DEVICES,
- PROC_BUS_LAST
-};
-
-enum fs_directory_inos {
- PROC_FS_CODA = PROC_BUS_LAST,
- PROC_FS_LAST
-};
-
-enum fs_coda_directory_inos {
- PROC_VFS_STATS = PROC_FS_LAST,
- PROC_UPCALL_STATS,
- PROC_PERMISSION_STATS,
- PROC_CACHE_INV_STATS,
- PROC_CODA_FS_LAST
-};
+/*
+ * We always define these enumerators
+ */
-enum sysvipc_directory_inos {
- PROC_SYSVIPC_SHM = PROC_CODA_FS_LAST,
- PROC_SYSVIPC_SEM,
- PROC_SYSVIPC_MSG
+enum {
+ PROC_ROOT_INO = 1,
};
/* Finally, the dynamically allocatable proc entries are reserved: */
@@ -284,10 +45,16 @@ enum sysvipc_directory_inos {
* /proc file has a parent, but "subdir" is NULL for all
* non-directory entries).
*
- * "get_info" is called at "read", while "fill_inode" is used to
- * fill in file type/protection/owner information specific to the
- * particular /proc file.
+ * "get_info" is called at "read", while "owner" is used to protect module
+ * from unloading while proc_dir_entry is in use
*/
+
+typedef int (read_proc_t)(char *page, char **start, off_t off,
+ int count, int *eof, void *data);
+typedef int (write_proc_t)(struct file *file, const char *buffer,
+ unsigned long count, void *data);
+typedef int (get_info_t)(char *, char **, off_t, int, int);
+
struct proc_dir_entry {
unsigned short low_ino;
unsigned short namelen;
@@ -298,106 +65,49 @@ struct proc_dir_entry {
gid_t gid;
unsigned long size;
struct inode_operations * ops;
- int (*get_info)(char *, char **, off_t, int, int);
- void (*fill_inode)(struct inode *, int);
+ get_info_t *get_info;
+ struct module *owner;
struct proc_dir_entry *next, *parent, *subdir;
void *data;
- int (*read_proc)(char *page, char **start, off_t off,
- int count, int *eof, void *data);
- int (*write_proc)(struct file *file, const char *buffer,
- unsigned long count, void *data);
+ read_proc_t *read_proc;
+ write_proc_t *write_proc;
int (*readlink_proc)(struct proc_dir_entry *de, char *page);
unsigned int count; /* use count */
int deleted; /* delete flag */
};
-typedef int (read_proc_t)(char *page, char **start, off_t off,
- int count, int *eof, void *data);
-typedef int (write_proc_t)(struct file *file, const char *buffer,
- unsigned long count, void *data);
-
-extern int (* dispatch_scsi_info_ptr) (int ino, char *buffer, char **start,
- off_t offset, int length, int inout);
+#define PROC_INODE_PROPER(inode) ((inode)->i_ino & ~0xffff)
+#define PROC_INODE_OPENPROM(inode) \
+ ((inode->i_ino >= PROC_OPENPROM_FIRST) \
+ && (inode->i_ino < PROC_OPENPROM_FIRST + PROC_NOPENPROM))
#ifdef CONFIG_PROC_FS
extern struct proc_dir_entry proc_root;
-extern struct proc_dir_entry proc_root_fs;
+extern struct proc_dir_entry *proc_root_fs;
extern struct proc_dir_entry *proc_net;
-extern struct proc_dir_entry *proc_scsi;
extern struct proc_dir_entry proc_sys;
extern struct proc_dir_entry proc_openprom;
-extern struct proc_dir_entry proc_pid;
-extern struct proc_dir_entry proc_pid_fd;
-extern struct proc_dir_entry proc_mca;
+extern struct proc_dir_entry *proc_mca;
extern struct proc_dir_entry *proc_bus;
-extern struct proc_dir_entry *proc_sysvipc;
-extern struct proc_dir_entry proc_root_driver;
-
-extern struct inode_operations proc_scsi_inode_operations;
+extern struct proc_dir_entry *proc_root_driver;
+extern struct proc_dir_entry proc_root_kcore;
extern void proc_root_init(void);
-extern void proc_base_init(void);
+extern void proc_misc_init(void);
+
+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 int proc_unregister(struct proc_dir_entry *, int);
-/*
- * generic.c
- */
extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
- struct proc_dir_entry *parent);
+ struct proc_dir_entry *parent);
extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
-
-/*
- * inlined /proc helper functions
- */
-
-static inline int proc_net_register(struct proc_dir_entry * x)
-{
- return proc_register(proc_net, x);
-}
-
-static inline int proc_net_unregister(int x)
-{
- return proc_unregister(proc_net, x);
-}
-
-static inline int proc_scsi_register(struct proc_dir_entry *driver,
- struct proc_dir_entry *x)
-{
- x->ops = &proc_scsi_inode_operations;
- if(x->low_ino < PROC_SCSI_FILE){
- return(proc_register(proc_scsi, x));
- }else{
- return(proc_register(driver, x));
- }
-}
-
-static inline int proc_scsi_unregister(struct proc_dir_entry *driver, int x)
-{
- extern void scsi_init_free(char *ptr, unsigned int size);
-
- if(x < PROC_SCSI_FILE)
- return(proc_unregister(proc_scsi, x));
- else {
- struct proc_dir_entry **p = &driver->subdir, *dp;
- int ret;
-
- while ((dp = *p) != NULL) {
- if (dp->low_ino == x)
- break;
- p = &dp->next;
- }
- ret = proc_unregister(driver, x);
- scsi_init_free((char *) dp, sizeof(struct proc_dir_entry) + 4);
- return(ret);
- }
-}
-
-
/*
* retrieve the proc_dir_entry associated with /proc/driver/$module_name
*/
@@ -406,7 +116,7 @@ struct proc_dir_entry *proc_driver_find (const char *module_name)
{
struct proc_dir_entry *p;
- p = proc_root_driver.subdir;
+ p = proc_root_driver->subdir;
while (p != NULL) {
if (strcmp (p->name, module_name) == 0)
return p;
@@ -422,7 +132,7 @@ struct proc_dir_entry *proc_driver_find (const char *module_name)
*/
extern inline int proc_driver_unregister(const char *module_name)
{
- remove_proc_entry (module_name, &proc_root_driver);
+ remove_proc_entry (module_name, proc_root_driver);
return 0;
}
@@ -434,13 +144,11 @@ extern inline int proc_driver_register(const char *module_name)
{
struct proc_dir_entry *p;
- p = create_proc_entry (module_name, S_IFDIR, &proc_root_driver);
+ p = create_proc_entry (module_name, S_IFDIR, proc_root_driver);
return (p == NULL) ? -1 : 0;
}
-
-
extern struct super_block *proc_super_blocks;
extern struct dentry_operations proc_dentry_operations;
extern struct super_block *proc_read_super(struct super_block *,void *,int);
@@ -449,7 +157,6 @@ extern struct inode * proc_get_inode(struct super_block *, int, struct proc_dir_
extern int proc_statfs(struct super_block *, struct statfs *, int);
extern void proc_read_inode(struct inode *);
extern void proc_write_inode(struct inode *);
-extern int proc_permission(struct inode *, int);
extern int proc_match(int, const char *,struct proc_dir_entry *);
@@ -483,24 +190,16 @@ extern int proc_openprom_unregdev(struct openpromfs_dev *);
extern struct inode_operations proc_dir_inode_operations;
extern struct inode_operations proc_file_inode_operations;
-extern struct inode_operations proc_net_inode_operations;
-extern struct inode_operations proc_netdir_inode_operations;
extern struct inode_operations proc_openprom_inode_operations;
-extern struct inode_operations proc_mem_inode_operations;
extern struct inode_operations proc_sys_inode_operations;
-extern struct inode_operations proc_array_inode_operations;
-extern struct inode_operations proc_arraylong_inode_operations;
extern struct inode_operations proc_kcore_inode_operations;
extern struct inode_operations proc_profile_inode_operations;
extern struct inode_operations proc_kmsg_inode_operations;
-extern struct inode_operations proc_link_inode_operations;
-extern struct inode_operations proc_fd_inode_operations;
#if CONFIG_AP1000
extern struct inode_operations proc_ringbuf_inode_operations;
#endif
extern struct inode_operations proc_omirr_inode_operations;
extern struct inode_operations proc_ppc_htab_inode_operations;
-extern struct inode_operations proc_sysvipc_inode_operations;
/*
* proc_tty.c
@@ -514,23 +213,58 @@ extern void proc_tty_unregister_driver(struct tty_driver *driver);
*/
extern void proc_device_tree_init(void);
+extern inline struct proc_dir_entry *create_proc_read_entry(const char *name,
+ mode_t mode, struct proc_dir_entry *base,
+ read_proc_t *read_proc, void * data)
+{
+ struct proc_dir_entry *res=create_proc_entry(name,mode,base);
+ if (res) {
+ res->read_proc=read_proc;
+ res->data=data;
+ }
+ return res;
+}
+
+extern inline struct proc_dir_entry *create_proc_info_entry(const char *name,
+ mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
+{
+ struct proc_dir_entry *res=create_proc_entry(name,mode,base);
+ if (res) res->get_info=get_info;
+ return res;
+}
+
+extern inline struct proc_dir_entry *proc_net_create(const char *name,
+ mode_t mode, get_info_t *get_info)
+{
+ return create_proc_info_entry(name,mode,proc_net,get_info);
+}
+
+extern inline void proc_net_remove(const char *name)
+{
+ remove_proc_entry(name,proc_net);
+}
+
#else
extern inline int proc_register(struct proc_dir_entry *a, struct proc_dir_entry *b) { return 0; }
extern inline int proc_unregister(struct proc_dir_entry *a, int b) { return 0; }
-extern inline int proc_net_register(struct proc_dir_entry *a) { return 0; }
-extern inline int proc_net_unregister(int x) { return 0; }
-extern inline int proc_scsi_register(struct proc_dir_entry *b, struct proc_dir_entry *c) { return 0; }
-extern inline int proc_scsi_unregister(struct proc_dir_entry *a, int x) { 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) {}
-extern inline struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
- struct proc_dir_entry *parent)
-{
- return NULL;
-}
+extern inline struct proc_dir_entry *create_proc_entry(const char *name,
+ mode_t mode, struct proc_dir_entry *parent) { return NULL; }
extern inline void remove_proc_entry(const char *name, struct proc_dir_entry *parent) {};
+extern inline struct proc_dir_entry *create_proc_read_entry(const char *name,
+ mode_t mode, struct proc_dir_entry *base,
+ int (*read_proc)(char *, char **, off_t, int, int *, void *),
+ void * data) { return NULL; }
+extern inline struct proc_dir_entry *create_proc_info_entry(const char *name,
+ mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
+ { return NULL; }
+
extern inline void proc_tty_register_driver(struct tty_driver *driver) {};
extern inline void proc_tty_unregister_driver(struct tty_driver *driver) {};
diff --git a/include/linux/proc_fs_i.h b/include/linux/proc_fs_i.h
new file mode 100644
index 000000000..5060d08fc
--- /dev/null
+++ b/include/linux/proc_fs_i.h
@@ -0,0 +1,9 @@
+struct proc_inode_info {
+ struct task_struct *task;
+ int type;
+ union {
+ struct dentry *(*proc_get_link)(struct inode *);
+ int (*proc_read)(struct task_struct *task, char *page);
+ } op;
+ struct file *file;
+};
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c198260e0..26ef161ec 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -361,6 +361,8 @@ struct task_struct {
/* Thread group tracking */
u32 parent_exec_id;
u32 self_exec_id;
+/* Protection of fields allocatio/deallocation */
+ struct semaphore exit_sem;
};
/*
@@ -427,6 +429,7 @@ struct task_struct {
/* mm */ NULL, &init_mm, \
/* signals */ SPIN_LOCK_UNLOCKED, &init_signals, {{0}}, {{0}}, NULL, &init_task.sigqueue, 0, 0, \
/* exec cts */ 0,0, \
+/* exit_sem */ __MUTEX_INITIALIZER(name.exit_sem), \
}
#ifndef INIT_TASK_SIZE
@@ -839,6 +842,21 @@ extern inline void unhash_process(struct task_struct *p)
write_unlock_irq(&tasklist_lock);
}
+static inline int task_lock(struct task_struct *p)
+{
+ down(&p->exit_sem);
+ if (p->p_pptr)
+ return 1;
+ /* He's dead, Jim. You take his wallet, I'll take tricoder... */
+ up(&p->exit_sem);
+ return 0;
+}
+
+static inline void task_unlock(struct task_struct *p)
+{
+ up(&p->exit_sem);
+}
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/linux/sem.h b/include/linux/sem.h
index 6f6677a64..234d4eebf 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -60,11 +60,11 @@ struct seminfo {
int semaem;
};
-#define SEMMNI 128 /* ? max # of semaphore identifiers */
-#define SEMMSL 32 /* <= 512 max num of semaphores per id */
-#define SEMMNS (SEMMNI*SEMMSL) /* ? max # of semaphores in system */
-#define SEMOPM 32 /* ~ 100 max num of ops per semop call */
-#define SEMVMX 32767 /* semaphore maximum value */
+#define SEMMNI 128 /* <= IPCMNI max # of semaphore identifiers */
+#define SEMMSL 250 /* <= 8 000 max num of semaphores per id */
+#define SEMMNS (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */
+#define SEMOPM 32 /* <= 1 000 max num of ops per semop call */
+#define SEMVMX 32767 /* <= 32767 semaphore maximum value */
/* unused */
#define SEMUME SEMOPM /* max num of undo entries per process */
@@ -81,15 +81,16 @@ struct sem {
int sempid; /* pid of last operation */
};
-/* One queue for each semaphore set in the system. */
+/* One queue for each sleeping process in the system. */
struct sem_queue {
struct sem_queue * next; /* next entry in the queue */
struct sem_queue ** prev; /* previous entry in the queue, *(q->prev) == q */
- wait_queue_head_t sleeper; /* sleeping process */
+ struct task_struct* sleeper; /* this process */
struct sem_undo * undo; /* undo structure */
int pid; /* process id of requesting process */
int status; /* completion status of operation */
struct semid_ds * sma; /* semaphore array for operations */
+ int id; /* internal sem id */
struct sembuf * sops; /* array of pending operations */
int nsops; /* number of operations */
int alter; /* operation will alter semaphore */
diff --git a/include/linux/serial.h b/include/linux/serial.h
index 3cc56b08f..7149f5b35 100644
--- a/include/linux/serial.h
+++ b/include/linux/serial.h
@@ -37,6 +37,20 @@ struct serial_struct {
#define ASYNC_CLOSING_WAIT_NONE 65535
/*
+ * The size of the serial xmit buffer is 1 page, or 4096 bytes
+ */
+#define SERIAL_XMIT_SIZE 4096
+
+/*
+ * Counters of the input lines (CTS, DSR, RI, CD) interrupts
+ */
+struct async_icount {
+ __u32 cts, dsr, rng, dcd, tx, rx;
+ __u32 frame, parity, overrun, brk;
+ __u32 buf_overrun;
+};
+
+/*
* These are the supported serial types.
*/
#define PORT_UNKNOWN 0
diff --git a/include/linux/serialP.h b/include/linux/serialP.h
index 9f8af3dec..11643f8a0 100644
--- a/include/linux/serialP.h
+++ b/include/linux/serialP.h
@@ -24,14 +24,6 @@
#include <linux/tqueue.h>
#include <linux/wait.h>
-/*
- * Counters of the input lines (CTS, DSR, RI, CD) interrupts
- */
-struct async_icount {
- __u32 cts, dsr, rng, dcd, tx, rx;
- __u32 frame, parity, overrun, brk;
- __u32 buf_overrun;
-};
struct serial_state {
int magic;
@@ -107,10 +99,6 @@ struct async_struct {
#define SERIAL_MAGIC 0x5301
#define SSTATE_MAGIC 0x5302
-/*
- * The size of the serial xmit buffer is 1 page, or 4096 bytes
- */
-#define SERIAL_XMIT_SIZE 4096
/*
* Events are used to schedule things to happen at timer-interrupt
diff --git a/include/linux/shm.h b/include/linux/shm.h
index 6ba237e92..909adb12e 100644
--- a/include/linux/shm.h
+++ b/include/linux/shm.h
@@ -3,11 +3,22 @@
#include <linux/ipc.h>
+/*
+ * SHMMAX, SHMMNI and SHMALL are upper limits are defaults which can
+ * be increased by sysctl
+ */
+
+#define SHMMAX 0x2000000 /* max shared seg size (bytes) */
+#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
+#define SHMMNI 128 /* max num of segs system wide */
+#define SHMALL (SHMMAX/PAGE_SIZE*SHMMNI) /* max shm system wide (pages) */
+#define SHMSEG SHMMNI /* max shared segs per process */
+
#include <asm/shmparam.h>
struct shmid_ds {
struct ipc_perm shm_perm; /* operation perms */
- int shm_segsz; /* size of segment (bytes) */
+ size_t shm_segsz; /* size of segment (bytes) */
__kernel_time_t shm_atime; /* last attach time */
__kernel_time_t shm_dtime; /* last detach time */
__kernel_time_t shm_ctime; /* last change time */
@@ -19,15 +30,6 @@ struct shmid_ds {
void *shm_unused3; /* unused */
};
-struct shmid_kernel
-{
- struct shmid_ds u;
- /* the following are private */
- unsigned long shm_npages; /* size of segment (pages) */
- pte_t *shm_pages; /* array of ptrs to frames -> SHMMAX */
- struct vm_area_struct *attaches; /* descriptors for attaches */
-};
-
/* permission flag for shmget */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
@@ -46,7 +48,7 @@ struct shmid_kernel
#define SHM_INFO 14
struct shminfo {
- int shmmax;
+ size_t shmmax;
int shmmin;
int shmmni;
int shmseg;
@@ -68,11 +70,11 @@ struct shm_info {
#define SHM_DEST 01000 /* segment will be destroyed on last detach */
#define SHM_LOCKED 02000 /* segment will not be swapped */
-asmlinkage long sys_shmget (key_t key, int size, int flag);
+asmlinkage long sys_shmget (key_t key, size_t size, int flag);
asmlinkage long sys_shmat (int shmid, char *shmaddr, int shmflg, unsigned long *addr);
asmlinkage long sys_shmdt (char *shmaddr);
asmlinkage long sys_shmctl (int shmid, int cmd, struct shmid_ds *buf);
-extern void shm_unuse(pte_t entry, struct page *page);
+extern void shm_unuse(swp_entry_t entry, struct page *page);
#endif /* __KERNEL__ */
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 0e186d76b..8e9e72989 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -61,7 +61,9 @@ struct swap_info_struct {
};
extern int nr_swap_pages;
-extern int nr_free_pages;
+FASTCALL(unsigned int nr_free_pages(void));
+FASTCALL(unsigned int nr_free_buffer_pages(void));
+FASTCALL(unsigned int nr_free_highpages(void));
extern int nr_lru_pages;
extern struct list_head lru_cache;
extern atomic_t nr_async_pages;
@@ -85,20 +87,20 @@ extern int try_to_free_pages(unsigned int gfp_mask);
/* linux/mm/page_io.c */
extern void rw_swap_page(int, struct page *, int);
-extern void rw_swap_page_nolock(int, pte_t, char *, int);
+extern void rw_swap_page_nolock(int, swp_entry_t, char *, int);
/* linux/mm/page_alloc.c */
/* linux/mm/swap_state.c */
extern void show_swap_cache_info(void);
-extern void add_to_swap_cache(struct page *, pte_t);
-extern int swap_duplicate(pte_t);
+extern void add_to_swap_cache(struct page *, swp_entry_t);
+extern int swap_duplicate(swp_entry_t);
extern int swap_check_entry(unsigned long);
-struct page * lookup_swap_cache(pte_t);
-extern struct page * read_swap_cache_async(pte_t, int);
+extern struct page * lookup_swap_cache(swp_entry_t);
+extern struct page * read_swap_cache_async(swp_entry_t, int);
#define read_swap_cache(entry) read_swap_cache_async(entry, 1);
extern int swap_count(struct page *);
-extern pte_t acquire_swap_entry(struct page *page);
+extern swp_entry_t acquire_swap_entry(struct page *page);
/*
* Make these inline later once they are working properly.
@@ -111,9 +113,11 @@ extern void free_page_and_swap_cache(struct page *page);
extern unsigned int nr_swapfiles;
extern struct swap_info_struct swap_info[];
extern int is_swap_partition(kdev_t);
-void si_swapinfo(struct sysinfo *);
-pte_t get_swap_page(void);
-extern void swap_free(pte_t);
+extern void si_swapinfo(struct sysinfo *);
+extern swp_entry_t __get_swap_page(unsigned short);
+#define get_swap_page() __get_swap_page(1)
+extern void __swap_free(swp_entry_t, unsigned short);
+#define swap_free(entry) __swap_free((entry), 1)
struct swap_list_t {
int head; /* head of priority-ordered swapfile list */
int next; /* swapfile to be used next */
@@ -122,17 +126,6 @@ extern struct swap_list_t swap_list;
asmlinkage long sys_swapoff(const char *);
asmlinkage long sys_swapon(const char *, int);
-/*
- * vm_ops not present page codes for shared memory.
- *
- * Will go away eventually..
- */
-#define SHM_SWP_TYPE 0x20
-
-/*
- * swap cache stuff (in linux/mm/swap_state.c)
- */
-
#define SWAP_CACHE_INFO
#ifdef SWAP_CACHE_INFO
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 0e1e65a70..ce76c926d 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -102,9 +102,11 @@ enum
KERN_MSGMNB=36, /* int: Maximum message queue size */
KERN_MSGPOOL=37, /* int: Maximum system message pool size */
KERN_SYSRQ=38, /* int: Sysreq enable */
- KERN_MAX_THREADS=39, /* int: Maximum nr of threads in the system */
+ KERN_MAX_THREADS=39, /* int: Maximum nr of threads in the system */
KERN_RANDOM=40, /* Random driver */
- KERN_SHMALL=41 /* int: Maximum size of shared memory */
+ KERN_SHMALL=41, /* int: Maximum size of shared memory */
+ KERN_MSGMNI=42, /* int: msg queue identifiers */
+ KERN_SEM=43 /* int: sysv semaphore limits */
};
diff --git a/include/linux/udf_167.h b/include/linux/udf_167.h
index 0fe77d0ef..ee09bd9ad 100644
--- a/include/linux/udf_167.h
+++ b/include/linux/udf_167.h
@@ -54,15 +54,23 @@
#ifdef __KERNEL__
#include <linux/types.h>
#define Uint8 __u8
+#define Sint8 __s8
#define Uint16 __u16
+#define Sint16 __s16
#define Uint32 __u32
+#define Sint32 __s32
#define Uint64 __u64
+#define Sint64 __s64
typedef Uint8 dstring;
#else
#define Uint8 unsigned char
+#define Sint8 char
#define Uint16 unsigned short
+#define Sint16 short
#define Uint32 unsigned int
+#define Sint32 int
#define Uint64 unsigned long long
+#define Sint64 long long
typedef Uint8 dstring;
#endif
diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h
index 890c5e00b..9c0b764a2 100644
--- a/include/linux/udf_fs.h
+++ b/include/linux/udf_fs.h
@@ -30,8 +30,8 @@
#define UDF_DEFAULT_PREALLOC_BLOCKS 8
#define UDF_DEFAULT_PREALLOC_DIR_BLOCKS 0
-#define UDFFS_DATE "99/09/02"
-#define UDFFS_VERSION "0.8.9"
+#define UDFFS_DATE "99/10/29"
+#define UDFFS_VERSION "0.8.9.3"
#define UDFFS_DEBUG
#ifdef UDFFS_DEBUG
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index bff574aac..f58bf97dd 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -55,6 +55,10 @@ extern void video_unregister_device(struct video_device *);
#define VID_TYPE_SCALES 128 /* Scalable */
#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
+#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
+#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
+#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
+#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
struct video_capability
{
@@ -230,6 +234,36 @@ struct video_unit
int teletext; /* Teletext minor */
};
+/* video_info is biased towards hardware mpeg encode/decode */
+/* but it could apply generically to any hardware compressor/decompressor */
+struct video_info
+{
+ __u32 frame_count; /* frames output since decode/encode began */
+ __u32 h_size; /* current unscaled horizontal size */
+ __u32 v_size; /* current unscaled veritcal size */
+ __u32 smpte_timecode; /* current SMPTE timecode (for current GOP) */
+ __u32 picture_type; /* current picture type */
+ __u32 temporal_reference; /* current temporal reference */
+ __u8 user_data[256]; /* user data last found in compressed stream */
+ /* user_data[0] contains user data flags, user_data[1] has count */
+};
+
+/* generic structure for setting playback modes */
+struct video_play_mode
+{
+ int mode;
+ int p1;
+ int p2;
+};
+
+/* for loading microcode / fpga programming */
+struct video_code
+{
+ char loadwhat[16]; /* name or tag of file being passed */
+ int datasize;
+ __u8 *data;
+};
+
#define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */
#define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */
#define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */
@@ -253,9 +287,47 @@ struct video_unit
#define VIDIOCGUNIT _IOR('v', 21, struct video_unit) /* Get attached units */
#define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get frame buffer */
#define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set frame buffer - root only */
+#define VIDIOCSPLAYMODE _IOW('v',24, struct video_play_mode) /* Set output video mode/feature */
+#define VIDIOCSWRITEMODE _IOW('v',25, int) /* Set write mode */
+#define VIDIOCGPLAYINFO _IOR('v',26, struct video_info) /* Get current playback info from hardware */
+#define VIDIOCSMICROCODE _IOW('v',27, struct video_code) /* Load microcode into hardware */
#define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */
+/* VIDIOCSWRITEMODE */
+#define VID_WRITE_MPEG_AUD 0
+#define VID_WRITE_MPEG_VID 1
+#define VID_WRITE_OSD 2
+#define VID_WRITE_TTX 3
+#define VID_WRITE_CC 4
+#define VID_WRITE_MJPEG 5
+
+/* VIDIOCSPLAYMODE */
+#define VID_PLAY_VID_OUT_MODE 0
+ /* p1: = VIDEO_MODE_PAL, VIDEO_MODE_NTSC, etc ... */
+#define VID_PLAY_GENLOCK 1
+ /* p1: 0 = OFF, 1 = ON */
+ /* p2: GENLOCK FINE DELAY value */
+#define VID_PLAY_NORMAL 2
+#define VID_PLAY_PAUSE 3
+#define VID_PLAY_SINGLE_FRAME 4
+#define VID_PLAY_FAST_FORWARD 5
+#define VID_PLAY_SLOW_MOTION 6
+#define VID_PLAY_IMMEDIATE_NORMAL 7
+#define VID_PLAY_SWITCH_CHANNELS 8
+#define VID_PLAY_FREEZE_FRAME 9
+#define VID_PLAY_STILL_MODE 10
+#define VID_PLAY_MASTER_MODE 11
+ /* p1: see below */
+#define VID_PLAY_MASTER_NONE 1
+#define VID_PLAY_MASTER_VIDEO 2
+#define VID_PLAY_MASTER_AUDIO 3
+#define VID_PLAY_ACTIVE_SCANLINES 12
+ /* p1 = first active; p2 = last active */
+#define VID_PLAY_RESET 13
+#define VID_PLAY_END_MARK 14
+
+
#define VID_HARDWARE_BT848 1
#define VID_HARDWARE_QCAM_BW 2
@@ -276,7 +348,7 @@ struct video_unit
#define VID_HARDWARE_BROADWAY 17 /* Broadway project */
#define VID_HARDWARE_GEMTEK 18
#define VID_HARDWARE_TYPHOON 19
-#define VID_HARDWARE_VINO 20 /* Reserved for SGI Indy Vino */
+#define VID_HARDWARE_VINO 20 /* SGI Indy Vino */
#define VID_HARDWARE_CADET 21 /* Cadet radio */
#define VID_HARDWARE_TRUST 22 /* Trust FM Radio */
#define VID_HARDWARE_TERRATEC 23 /* TerraTec ActiveRadio */
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 0ddee5b36..0aba8360c 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -24,5 +24,6 @@ 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);
+extern struct vm_struct * vmlist;
#endif
diff --git a/include/linux/wrapper.h b/include/linux/wrapper.h
index d8a73117b..bc719bfc5 100644
--- a/include/linux/wrapper.h
+++ b/include/linux/wrapper.h
@@ -28,7 +28,7 @@
#define vma_set_inode(v,i) v->vm_inode = i
#define vma_get_flags(v) v->vm_flags
-#define vma_get_offset(v) v->vm_offset
+#define vma_get_pgoff(v) v->vm_pgoff
#define vma_get_start(v) v->vm_start
#define vma_get_end(v) v->vm_end
#define vma_get_page_prot(v) v->vm_page_prot
diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h
index 96cc04056..44b53bcd6 100644
--- a/include/net/irda/ircomm_tty.h
+++ b/include/net/irda/ircomm_tty.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sun Jun 6 23:24:22 1999
- * Modified at: Tue Oct 5 12:01:07 1999
+ * Modified at: Sun Oct 31 19:50:35 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1999 Dag Brattli, All Rights Reserved.
@@ -76,6 +76,8 @@ struct ircomm_tty_cb {
__u32 max_data_size;
__u32 max_header_size;
+ struct iriap_cb *iriap;
+
struct ias_object* obj;
int skey;
int ckey;
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h
index 402cc0791..e3af20884 100644
--- a/include/net/irda/irda.h
+++ b/include/net/irda/irda.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Tue Dec 9 21:13:12 1997
- * Modified at: Tue Oct 19 21:12:54 1999
+ * Modified at: Sun Oct 31 14:45:20 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved.
@@ -116,7 +116,6 @@ struct irda_sock {
__u32 saddr; /* my local address */
__u32 daddr; /* peer address */
- struct ias_object *ias_obj;
struct tsap_cb *tsap; /* TSAP used by this connection */
__u8 dtsap_sel; /* remote TSAP address */
__u8 stsap_sel; /* local TSAP address */
@@ -133,6 +132,9 @@ struct irda_sock {
__u32 ckey; /* IrLMP client handle */
__u32 skey; /* IrLMP service handle */
+ struct ias_object *ias_obj;
+ struct iriap_cb *iriap;
+
int nslots; /* Number of slots to use for discovery */
int errno;
diff --git a/include/net/irda/iriap.h b/include/net/irda/iriap.h
index 9b3629fcf..dedd444bf 100644
--- a/include/net/irda/iriap.h
+++ b/include/net/irda/iriap.h
@@ -6,10 +6,11 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Thu Aug 21 00:02:07 1997
- * Modified at: Tue Oct 5 10:05:33 1999
+ * Modified at: Sun Oct 31 15:51:32 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
- * Copyright (c) 1997, 1999 Dag Brattli <dagb@cs.uit.no>, All Rights Reserved.
+ * Copyright (c) 1997-1999 Dag Brattli <dagb@cs.uit.no>,
+ * All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -79,7 +80,7 @@ struct iriap_cb {
IRIAP_STATE r_connect_state;
CONFIRM_CALLBACK confirm;
- void *priv;
+ void *priv; /* Used to identify client */
__u8 max_header_size;
@@ -88,9 +89,14 @@ struct iriap_cb {
int iriap_init(void);
void iriap_cleanup(void);
-void iriap_getvaluebyclass_request(char *name, char *attr,
- __u32 saddr, __u32 daddr,
- CONFIRM_CALLBACK callback, void *priv);
+
+struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv,
+ CONFIRM_CALLBACK callback);
+void iriap_close(struct iriap_cb *self);
+
+int iriap_getvaluebyclass_request(struct iriap_cb *self,
+ __u32 saddr, __u32 daddr,
+ char *name, char *attr);
void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb);
void iriap_send_ack( struct iriap_cb *self);
diff --git a/include/net/irda/iriap_event.h b/include/net/irda/iriap_event.h
index e99f319a3..4ca3d2071 100644
--- a/include/net/irda/iriap_event.h
+++ b/include/net/irda/iriap_event.h
@@ -6,10 +6,10 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Mon Aug 4 20:40:53 1997
- * Modified at: Fri Sep 4 13:19:28 1998
+ * Modified at: Sun Oct 31 22:02:54 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
- * Copyright (c) 1998 Dag Brattli <dagb@cs.uit.no>, All Rights Reserved.
+ * Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -65,20 +65,21 @@ typedef enum {
IAP_LM_CONNECT_CONFIRM,
} IRIAP_EVENT;
-void iriap_next_client_state ( struct iriap_cb *self, IRIAP_STATE state);
-void iriap_next_call_state ( struct iriap_cb *self, IRIAP_STATE state);
-void iriap_next_server_state ( struct iriap_cb *self, IRIAP_STATE state);
-void iriap_next_r_connect_state( struct iriap_cb *self, IRIAP_STATE state);
+void iriap_next_client_state (struct iriap_cb *self, IRIAP_STATE state);
+void iriap_next_call_state (struct iriap_cb *self, IRIAP_STATE state);
+void iriap_next_server_state (struct iriap_cb *self, IRIAP_STATE state);
+void iriap_next_r_connect_state(struct iriap_cb *self, IRIAP_STATE state);
-void iriap_do_client_event( struct iriap_cb *self, IRIAP_EVENT event,
- struct sk_buff *skb);
-void iriap_do_call_event ( struct iriap_cb *self, IRIAP_EVENT event,
- struct sk_buff *skb);
+void iriap_do_client_event(struct iriap_cb *self, IRIAP_EVENT event,
+ struct sk_buff *skb);
+void iriap_do_call_event (struct iriap_cb *self, IRIAP_EVENT event,
+ struct sk_buff *skb);
-void iriap_do_server_event ( struct iriap_cb *self, IRIAP_EVENT event,
- struct sk_buff *skb);
-void iriap_do_r_connect_event( struct iriap_cb *self, IRIAP_EVENT event,
- struct sk_buff *skb);
+void iriap_do_server_event (struct iriap_cb *self, IRIAP_EVENT event,
+ struct sk_buff *skb);
+void iriap_do_r_connect_event(struct iriap_cb *self, IRIAP_EVENT event,
+ struct sk_buff *skb);
+
+#endif /* IRIAP_FSM_H */
-#endif
diff --git a/include/net/irda/irlan_common.h b/include/net/irda/irlan_common.h
index 01c364ea2..67cc761c8 100644
--- a/include/net/irda/irlan_common.h
+++ b/include/net/irda/irlan_common.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sun Aug 31 20:14:37 1997
- * Modified at: Tue Oct 5 11:35:42 1999
+ * Modified at: Sun Oct 31 19:41:24 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>,
@@ -127,6 +127,8 @@ struct irlan_client_cb {
int tx_busy;
struct sk_buff_head txq; /* Transmit control queue */
+ struct iriap_cb *iriap;
+
struct timer_list kick_timer;
};
diff --git a/include/net/irda/irmod.h b/include/net/irda/irmod.h
index ca5338edc..64a0a2272 100644
--- a/include/net/irda/irmod.h
+++ b/include/net/irda/irmod.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Mon Dec 15 13:58:52 1997
- * Modified at: Tue Oct 5 10:26:46 1999
+ * Modified at: Sun Oct 31 20:01:17 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved.
@@ -42,10 +42,10 @@ typedef enum {
EVENT_REQUEST_MODULE,
EVENT_IRLAN_START,
EVENT_IRLAN_STOP,
- EVENT_IRLPT_START,
- EVENT_IRLPT_STOP,
- EVENT_IROBEX_START,
- EVENT_IROBEX_STOP,
+ EVENT_IRLPT_START, /* Obsolete */
+ EVENT_IRLPT_STOP, /* Obsolete */
+ EVENT_IROBEX_START, /* Obsolete */
+ EVENT_IROBEX_STOP, /* Obsolete */
EVENT_IRDA_STOP,
EVENT_NEED_PROCESS_CONTEXT,
} IRMGR_EVENT;
diff --git a/include/net/irda/irport.h b/include/net/irda/irport.h
index 789c4fce6..d02bc92b0 100644
--- a/include/net/irda/irport.h
+++ b/include/net/irda/irport.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sun Aug 3 13:49:59 1997
- * Modified at: Mon Oct 18 12:55:07 1999
+ * Modified at: Sat Oct 30 19:54:07 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1997, 1998-1999 Dag Brattli <dagb@cs.uit.no>
@@ -51,13 +51,9 @@
#define FRAME_MAX_SIZE 2048
struct irport_cb {
- queue_t q; /* Must be first */
- magic_t magic;
-
struct net_device *netdev; /* Yes! we are some kind of netdevice */
struct net_device_stats stats;
- struct tty_struct *tty;
struct irlap_cb *irlap; /* The link layer we are binded to */
struct chipio_t io; /* IrDA controller information */
@@ -78,6 +74,7 @@ void irport_start(struct irport_cb *self, int iobase);
void irport_stop(struct irport_cb *self, int iobase);
int irport_probe(int iobase);
+void __irport_change_speed(struct irport_cb *self, __u32 speed);
void irport_interrupt(int irq, void *dev_id, struct pt_regs *regs);
int irport_hard_xmit(struct sk_buff *skb, struct net_device *dev);
diff --git a/include/net/irda/smc-ircc.h b/include/net/irda/smc-ircc.h
index 2c5cbf4fd..0bb336b93 100644
--- a/include/net/irda/smc-ircc.h
+++ b/include/net/irda/smc-ircc.h
@@ -1,6 +1,6 @@
/*********************************************************************
*
- * Filename: smc.h
+ * Filename: smc-ircc.h
* Version:
* Description:
* Status: Experimental.
@@ -21,6 +21,8 @@
*
********************************************************************/
+#include <net/irda/irport.h>
+
#ifndef SMC_IRCC_H
#define SMC_IRCC_H
@@ -149,12 +151,26 @@ struct st_fifo {
/* Private data for each instance */
struct ircc_cb {
+ struct net_device *netdev; /* Yes! we are some kind of netdevice */
+ struct net_device_stats stats;
+
+ struct irlap_cb *irlap; /* The link layer we are binded to */
+
+ struct chipio_t io; /* IrDA controller information */
+ struct iobuff_t tx_buff; /* Transmit buffer */
+ struct iobuff_t rx_buff; /* Receive buffer */
+ struct qos_info qos; /* QoS capabilities for this device */
+
+ struct irport_cb irport;
+
+ __u32 flags; /* Interface flags */
+
struct st_fifo st_fifo;
int tx_buff_offsets[10]; /* Offsets between frames in tx_buff */
- int tx_len; /* Number of frames in tx_buff */
+ int tx_len; /* Number of frames in tx_buff */
+
- struct irda_device idev;
};
#endif
diff --git a/include/net/irda/uircc.h b/include/net/irda/uircc.h
deleted file mode 100644
index 1a2bd6c00..000000000
--- a/include/net/irda/uircc.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*********************************************************************
- *
- * Filename: uircc.h
- * Version: 0.1
- * Description: Driver for the Sharp Universal Infrared
- * Communications Controller (UIRCC)
- * Status: Experimental.
- * Author: Dag Brattli <dagb@cs.uit.no>
- * Created at: Sat Dec 26 11:00:49 1998
- * Modified at: Thu Mar 11 01:37:20 1999
- * Modified by: Dag Brattli <dagb@cs.uit.no>
- *
- * Copyright (c) 1998 Dag Brattli, All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * Neither Dag Brattli nor University of Tromsų admit liability nor
- * provide warranty for any of this software. This material is
- * provided "AS-IS" and at no charge.
- *
- ********************************************************************/
-
-#ifndef UIRCC_H
-#define UIRCC_H
-
-/* Control registers (write only) */
-#define UIRCC_CR0 0x00 /* Control register 0 */
-#define UIRCC_CR0_XMIT_RST 0x20 /* Transmit reset */
-#define UIRCC_CR0_RECV_RST 0x10 /* Receive reset */
-#define UIRCC_CR0_TMR_RST 0x08 /* Timer reset */
-#define UIRCC_CR0_SYS_RST 0x04 /* System reset */
-#define UIRCC_CR0_CARR_RST 0x02 /* Carrier latch reset */
-#define UIRCC_CR0_CNT_SWT 0x01 /* Transmit/receive length counter reset */
-
-#define UIRCC_CR1 0x01 /* Transmit/receive mode setting register */
-#define UIRCC_CR1_RX_DMA 0x80 /* Rx DMA mode */
-#define UIRCC_CR1_TX_DMA 0x20 /* Tx DMA mode */
-#define UIRCC_CR1_DMA_BRST 0x10 /* DMA burst mode */
-#define UIRCC_CR1_MUST_SET 0x0c /* Must be set */
-
-#define UIRCC_CR2 0x02 /* Interrupt mask register */
-#define UIRCC_CR2_RECV_OVR 0x40 /* Receive overrun error */
-#define UIRCC_CR2_RECV_FRM 0x20 /* Receive frame error */
-#define UIRCC_CR2_RECV_END 0x10 /* Receive end */
-#define UIRCC_CR2_TMR_OUT 0x08 /* Timer time-out */
-#define UIRCC_CR2_XMIT_UNR 0x04 /* Transmit under-run error */
-#define UIRCC_CR2_XMIT_END 0x01 /* Transmit end */
-#define UIRCC_CR2_RECV_MASK 0x70
-#define UIRCC_CR2_XMIT_MASK 0x05
-
-#define UIRCC_CR3 0x03 /* Transmit/receive control */
-#define UIRCC_CR3_XMIT_EN 0x80 /* Transmit enable */
-#define UIRCC_CR3_TX_CRC_EN 0x40 /* Transmit UIRCC_CRC enable */
-#define UIRCC_CR3_RECV_EN 0x20 /* Receive enable */
-#define UIRCC_CR3_RX_CRC_EN 0x10 /* Receive CRC enable */
-#define UIRCC_CR3_ADDR_CMP 0x08 /* Address comparison enable */
-#define UIRCC_CR3_MCAST_EN 0x04 /* Multicast enable */
-
-#define UIRCC_CR4 0x04 /* Transmit data length low byte */
-#define UIRCC_CR5 0x05 /* Transmit data length high byte */
-#define UIRCC_CR6 0x06 /* Transmit data writing low byte */
-#define UIRCC_CR7 0x07 /* Transmit data writing high byte */
-
-#define UIRCC_CR8 0x08 /* Self pole address */
-
-#define UIRCC_CR9 0x09 /* System control 1 */
-
-#define UIRCC_CR10 0x0a /* Modem selection */
-#define UIRCC_CR10_SIR 0x22 /* Set SIR mode */
-#define UIRCC_CR10_FIR 0x88 /* Set FIR mode */
-
-#define UIRCC_CR11 0x0b /* System control 2 (same as SR11) */
-#define UIRCC_CR11_TMR_EN 0x08
-
-#define UIRCC_CR12 0x0c /* Timer counter initial value (low byte) */
-#define UIRCC_CR13 0x0d /* Timer counter initial value (high byte) */
-#define UIRCC_CR15 0x0f
-
-/* Status registers (read only) */
-#define UIRCC_SR0 0x00 /* Transmit/receive status register */
-#define UIRCC_SR0_RX_RDY 0x80 /* Received data ready */
-#define UIRCC_SR0_RX_OVR 0x40 /* Receive overrun error */
-#define UIRCC_SR0_RX_CRCFRM 0x20 /* Receive CRC or framing error */
-
-#define UIRCC_SR2 0x02 /* Interrupt mask status */
-
-#define UIRCC_SR3 0x03 /* Interrupt factor register */
-#define UIRCC_SR3_RX_OVR_ER 0x40 /* Receive overrun error */
-#define UIRCC_SR3_RX_FRM_ER 0x20 /* Receive frameing error */
-#define UIRCC_SR3_RX_EOF 0x10 /* Receive end of frame */
-#define UIRCC_SR3_TMR_OUT 0x08 /* Timer timeout */
-#define UIRCC_SR3_TXUR 0x04 /* Transmit underrun */
-#define UIRCC_SR3_TX_DONE 0x01 /* Transmit all sent */
-
-#define UIRCC_SR4 0x04 /* TX/RX data length counter low byte */
-#define UIRCC_SR5 0x05 /* TX/RX data length counter high byte */
-
-#define UIRCC_SR8 0x08 /* Chip version */
-
-#define UIRCC_SR9 0x09 /* System status 1 */
-
-#define UIRCC_SR10 0x0a /* Modem select status */
-#define UIRCC_SR11 0x0b
-#define UIRCC_SR12 0x0c /* Timer counter status (low byte) */
-#define UIRCC_SR13 0x0d /* Timer counter status (high byte) */
-#define UIRCC_SR15 0x0f
-
-#include <net/irda/irda_device.h>
-
-/* Private data for each instance */
-struct uircc_cb {
- struct net_device idev;
-
- __u8 cr3; /* Copy of register sr3 */
-};
-
-#define CR3_SET
-
-#endif
-
-
-
diff --git a/include/net/irda/wrapper.h b/include/net/irda/wrapper.h
index 2b29d4c42..d4cfbbc52 100644
--- a/include/net/irda/wrapper.h
+++ b/include/net/irda/wrapper.h
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Mon Aug 4 20:40:53 1997
- * Modified at: Thu Oct 7 11:40:25 1999
+ * Modified at: Sat Oct 30 16:29:01 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>,
@@ -52,7 +52,9 @@ enum {
/* Proto definitions */
int async_wrap_skb(struct sk_buff *skb, __u8 *tx_buff, int buffsize);
-int async_bump(struct net_device *dev, __u8 *buf, int len);
-int async_unwrap_char(struct net_device *dev, struct iobuff_t *buf, __u8 byte);
+void async_bump(struct net_device *dev, struct net_device_stats *stats,
+ __u8 *buf, int len);
+void async_unwrap_char(struct net_device *dev, struct net_device_stats *stats,
+ struct iobuff_t *buf, __u8 byte);
#endif
diff --git a/include/pcmcia/bulkmem.h b/include/pcmcia/bulkmem.h
index 634693c4d..09f0a4ddd 100644
--- a/include/pcmcia/bulkmem.h
+++ b/include/pcmcia/bulkmem.h
@@ -1,7 +1,7 @@
/*
* Definitions for bulk memory services
*
- * bulkmem.h 1.10 1999/08/28 04:12:33
+ * bulkmem.h 1.11 1999/10/25 20:23:16
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -14,7 +14,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
- * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
+ * <dhinds@pcmcia.sourceforge.org>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
diff --git a/include/pcmcia/bus_ops.h b/include/pcmcia/bus_ops.h
index 867ad832c..bdbd34312 100644
--- a/include/pcmcia/bus_ops.h
+++ b/include/pcmcia/bus_ops.h
@@ -1,5 +1,5 @@
/*
- * bus_ops.h 1.7 1999/09/10 06:22:33
+ * bus_ops.h 1.8 1999/10/25 20:23:16
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
- * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
+ * <dhinds@pcmcia.sourceforge.org>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
diff --git a/include/pcmcia/ciscode.h b/include/pcmcia/ciscode.h
index 32915c167..904fba0b8 100644
--- a/include/pcmcia/ciscode.h
+++ b/include/pcmcia/ciscode.h
@@ -1,5 +1,5 @@
/*
- * ciscode.h 1.38 1999/08/28 04:12:32
+ * ciscode.h 1.39 1999/10/25 20:23:17
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
- * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
+ * <dhinds@pcmcia.sourceforge.org>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
diff --git a/include/pcmcia/cisreg.h b/include/pcmcia/cisreg.h
index 16c3dee31..20373545c 100644
--- a/include/pcmcia/cisreg.h
+++ b/include/pcmcia/cisreg.h
@@ -1,5 +1,5 @@
/*
- * cisreg.h 1.13 1999/08/28 04:12:32
+ * cisreg.h 1.14 1999/10/25 20:23:17
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
- * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
+ * <dhinds@pcmcia.sourceforge.org>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
diff --git a/include/pcmcia/cistpl.h b/include/pcmcia/cistpl.h
index 200665387..9ab70257c 100644
--- a/include/pcmcia/cistpl.h
+++ b/include/pcmcia/cistpl.h
@@ -1,5 +1,5 @@
/*
- * cistpl.h 1.30 1999/08/28 04:12:32
+ * cistpl.h 1.31 1999/10/25 20:23:17
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
- * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
+ * <dhinds@pcmcia.sourceforge.org>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h
index f8e6b9705..bd9968630 100644
--- a/include/pcmcia/cs.h
+++ b/include/pcmcia/cs.h
@@ -1,5 +1,5 @@
/*
- * cs.h 1.68 1999/10/20 18:59:32
+ * cs.h 1.69 1999/10/25 20:23:17
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
- * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
+ * <dhinds@pcmcia.sourceforge.org>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
diff --git a/include/pcmcia/cs_types.h b/include/pcmcia/cs_types.h
index 5e2a688a0..63f56430e 100644
--- a/include/pcmcia/cs_types.h
+++ b/include/pcmcia/cs_types.h
@@ -1,5 +1,5 @@
/*
- * cs_types.h 1.15 1999/08/28 04:12:32
+ * cs_types.h 1.16 1999/10/25 20:23:17
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
- * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
+ * <dhinds@pcmcia.sourceforge.org>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
diff --git a/include/pcmcia/driver_ops.h b/include/pcmcia/driver_ops.h
index 88bcaa9dd..337076a24 100644
--- a/include/pcmcia/driver_ops.h
+++ b/include/pcmcia/driver_ops.h
@@ -1,5 +1,5 @@
/*
- * driver_ops.h 1.13 1999/08/28 04:12:33
+ * driver_ops.h 1.14 1999/10/25 20:23:17
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
- * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
+ * <dhinds@pcmcia.sourceforge.org>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index 2663780b5..ddb271ec9 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -1,5 +1,5 @@
/*
- * ds.h 1.54 1999/09/03 16:44:49
+ * ds.h 1.55 1999/10/25 20:23:17
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
- * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
+ * <dhinds@pcmcia.sourceforge.org>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
diff --git a/include/pcmcia/ftl.h b/include/pcmcia/ftl.h
index 8bf70a5b8..0fb527845 100644
--- a/include/pcmcia/ftl.h
+++ b/include/pcmcia/ftl.h
@@ -1,5 +1,5 @@
/*
- * ftl.h 1.6 1999/08/28 04:12:33
+ * ftl.h 1.7 1999/10/25 20:23:17
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
- * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
+ * <dhinds@pcmcia.sourceforge.org>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
diff --git a/include/pcmcia/mem_op.h b/include/pcmcia/mem_op.h
index 8e8e0df79..38101ab10 100644
--- a/include/pcmcia/mem_op.h
+++ b/include/pcmcia/mem_op.h
@@ -1,5 +1,5 @@
/*
- * mem_op.h 1.11 1999/09/15 07:14:03
+ * mem_op.h 1.12 1999/10/25 20:23:17
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
- * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
+ * <dhinds@pcmcia.sourceforge.org>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
diff --git a/include/pcmcia/memory.h b/include/pcmcia/memory.h
index 8324ac4f6..5c0cdb69f 100644
--- a/include/pcmcia/memory.h
+++ b/include/pcmcia/memory.h
@@ -1,5 +1,5 @@
/*
- * memory.h 1.5 1999/08/28 04:12:33
+ * memory.h 1.6 1999/10/25 20:23:17
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
- * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
+ * <dhinds@pcmcia.sourceforge.org>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h
index e39477e2e..6912cd5c8 100644
--- a/include/pcmcia/ss.h
+++ b/include/pcmcia/ss.h
@@ -1,5 +1,5 @@
/*
- * ss.h 1.24 1999/08/28 04:12:33
+ * ss.h 1.25 1999/10/25 20:23:17
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
@@ -12,7 +12,7 @@
* limitations under the License.
*
* The initial developer of the original code is David A. Hinds
- * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
+ * <dhinds@pcmcia.sourceforge.org>. Portions created by David A. Hinds
* are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
*
* Alternatively, the contents of this file may be used under the
diff --git a/include/pcmcia/version.h b/include/pcmcia/version.h
index bb0b27e40..2a3cd2523 100644
--- a/include/pcmcia/version.h
+++ b/include/pcmcia/version.h
@@ -1,4 +1,4 @@
-/* version.h 1.74 1999/09/29 20:41:44 (David Hinds) */
+/* version.h 1.76 1999/10/26 18:55:56 (David Hinds) */
-#define CS_RELEASE "3.1.2"
-#define CS_RELEASE_CODE 0x3102
+#define CS_RELEASE "3.1.4"
+#define CS_RELEASE_CODE 0x3104