diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2004-06-21 11:46:13 +0100 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2004-06-21 11:46:13 +0100 |
| commit | bde83043a7e018b08d808ca933962be4678ec5cb (patch) | |
| tree | 7ad914ed75f5d02383143b1354a793611668cd14 /include | |
| parent | cfeac312b3960ac26ed085860ee10b531ad65aa5 (diff) | |
| parent | 9a85e04ec3e527234d8a2210e6ba04d7af9a4298 (diff) | |
Merge cantab.net:/home/src/bklinux-2.6
into cantab.net:/home/src/ntfs-2.6
Diffstat (limited to 'include')
94 files changed, 851 insertions, 1008 deletions
diff --git a/include/asm-alpha/fcntl.h b/include/asm-alpha/fcntl.h index ad40d002f006..6b7d6c1649ce 100644 --- a/include/asm-alpha/fcntl.h +++ b/include/asm-alpha/fcntl.h @@ -21,6 +21,7 @@ #define O_NOFOLLOW 0200000 /* don't follow links */ #define O_LARGEFILE 0400000 /* will be set by the kernel on every open */ #define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */ +#define O_NOATIME 04000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/asm-arm/arch-nexuspci/dma.h b/include/asm-arm/arch-nexuspci/dma.h deleted file mode 100644 index dee1ea2175c4..000000000000 --- a/include/asm-arm/arch-nexuspci/dma.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * linux/include/asm-arm/arch-nexuspci/dma.h - * - * Architecture DMA routines - * - * Copyright (C) 1998, 1999 Philip Blundell - */ - -/* - * 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. - */ - -/* - * This is the maximum DMA address that can be DMAd to. - */ -#define MAX_DMA_ADDRESS 0xffffffff -#define MAX_DMA_CHANNELS 0 diff --git a/include/asm-arm/arch-nexuspci/hardware.h b/include/asm-arm/arch-nexuspci/hardware.h deleted file mode 100644 index 303dc2c974ba..000000000000 --- a/include/asm-arm/arch-nexuspci/hardware.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * linux/include/asm-arm/arch-nexuspci/hardware.h - * - * Copyright (C) 1998, 1999, 2000 FutureTV Labs Ltd. - * - * This file contains the hardware definitions of the FTV PCI card. - */ - -/* - * 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. - */ - -#ifndef __ASM_ARCH_HARDWARE_H -#define __ASM_ARCH_HARDWARE_H - -/* Logical Physical - * 0xffe00000 0x20000000 INTCONT - * 0xffd00000 0x30000000 Status - * 0xffc00000 0x60000000 PLX registers - * 0xfe000000 0xC0000000 PCI I/O - * 0xfd000000 0x70000000 cache flush - * 0xfc000000 0x80000000 PCI/ISA memory - * 0xe0000000 0x10000000 SCC2691 DUART - */ - -/* - * Mapping areas - */ -#define INTCONT_BASE 0xffe00000 -#define STATUS_BASE 0xffd00000 -#define PLX_BASE 0xffc00000 -#define PCIO_BASE 0xfe000000 -#define FLUSH_BASE 0xfd000000 -#define DUART_BASE 0xe0000000 -#define PCIMEM_BASE 0xfc000000 - -#define PLX_IO_START 0xC0000000 -#define PLX_MEM_START 0x80000000 -#define PLX_START 0x60000000 -#define STATUS_START 0x30000000 -#define INTCONT_START 0x20000000 -#define DUART_START 0x10000000 - -/* - * RAM definitions - */ -#define RAM_BASE 0x40000000 -#define FLUSH_BASE_PHYS 0x70000000 - -/* - * Miscellaneous INTCONT bits - */ -#define INTCONT_FIQ_PLX 0x00 -#define INTCONT_FIQ_D 0x02 -#define INTCONT_FIQ_C 0x04 -#define INTCONT_FIQ_B 0x06 -#define INTCONT_FIQ_A 0x08 -#define INTCONT_FIQ_SYSERR 0x0a -#define INTCONT_IRQ_DUART 0x0c -#define INTCONT_IRQ_PLX 0x0e -#define INTCONT_IRQ_D 0x10 -#define INTCONT_IRQ_C 0x12 -#define INTCONT_IRQ_B 0x14 -#define INTCONT_IRQ_A 0x16 -#define INTCONT_IRQ_SYSERR 0x1e - -#define INTCONT_WATCHDOG 0x18 -#define INTCONT_LED 0x1a -#define INTCONT_PCI_RESET 0x1c - -#define UNCACHEABLE_ADDR STATUS_BASE - -#endif diff --git a/include/asm-arm/arch-nexuspci/io.h b/include/asm-arm/arch-nexuspci/io.h deleted file mode 100644 index 181bdb5988df..000000000000 --- a/include/asm-arm/arch-nexuspci/io.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * linux/include/asm-arm/arch-nexuspci/io.h - * - * Copyright (C) 1997-1999 Russell King - * Copyright (C) 2000 FutureTV Labs Ltd. - */ -#ifndef __ASM_ARM_ARCH_IO_H -#define __ASM_ARM_ARCH_IO_H - -#define IO_SPACE_LIMIT 0xffff - -/* - * Translation of various region addresses to virtual addresses - */ -#define __io(a) (PCIO_BASE + (a)) -#if 1 -#define __mem_pci(a) ((unsigned long)(a)) -#define __mem_isa(a) (PCIMEM_BASE + (unsigned long)(a)) -#else - -static inline unsigned long ___mem_pci(unsigned long a) -{ - /* PCI addresses must have been ioremapped */ - if (a <= 0xc0000000 || a >= 0xe0000000) - *((int *)0) = 0; - return a; -} - -static inline unsigned long ___mem_isa(unsigned long a) -{ - BUG_ON(a >= 16*1048576); - return PCIMEM_BASE + a; -} -#define __mem_pci(a) ___mem_pci((unsigned long)(a)) -#define __mem_isa(a) ___mem_isa((unsigned long)(a)) -#endif - -/* - * ioremap support - validate a PCI memory address, - * and convert a PCI memory address to a physical - * address for the page tables. - */ -#define iomem_valid_addr(iomem,sz) \ - ((iomem) < 0x80000000 && (iomem) + (sz) <= 0x80000000) -#define iomem_to_phys(iomem) ((iomem) + PLX_MEM_START) - -#define __arch_ioremap(off,sz,nocache) \ - ({ \ - unsigned long _off = (off), _size = (sz); \ - void *_ret = (void *)0; \ - if (iomem_valid_addr(_off, _size)) \ - _ret = __ioremap(iomem_to_phys(_off),_size,0); \ - _ret; \ - }) - -#define __arch_iounmap __iounmap - -#endif diff --git a/include/asm-arm/arch-nexuspci/irqs.h b/include/asm-arm/arch-nexuspci/irqs.h deleted file mode 100644 index 006c14b96b36..000000000000 --- a/include/asm-arm/arch-nexuspci/irqs.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * linux/include/asm-arm/arch-nexuspci/irqs.h - * - * Copyright (C) 1997, 1998, 2000 Philip Blundell - */ - -/* - * 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. - */ - -/* - * The hardware is capable of routing any interrupt source (except the - * DUART) to either IRQ or FIQ. We ignore FIQ and use IRQ exclusively - * for simplicity. - */ - -#define IRQ_DUART 0 -#define IRQ_PLX 1 -#define IRQ_PCI_D 2 -#define IRQ_PCI_C 3 -#define IRQ_PCI_B 4 -#define IRQ_PCI_A 5 -#define IRQ_SYSERR 6 /* only from IOSLAVE rev B */ - -#define FIRST_IRQ IRQ_DUART -#define LAST_IRQ IRQ_SYSERR - -/* timer is part of the DUART */ -#define IRQ_TIMER IRQ_DUART - -#define irq_canonicalize(i) (i) diff --git a/include/asm-arm/arch-nexuspci/memory.h b/include/asm-arm/arch-nexuspci/memory.h deleted file mode 100644 index 85d7c45055f7..000000000000 --- a/include/asm-arm/arch-nexuspci/memory.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * linux/include/asm-arm/arch-nexuspci/memory.h - * - * Copyright (c) 1997, 1998, 2000 FutureTV Labs Ltd. - * Copyright (c) 1999 Russell King - * - */ -#ifndef __ASM_ARCH_MEMORY_H -#define __ASM_ARCH_MEMORY_H - -/* - * Physical DRAM offset. - */ -#define PHYS_OFFSET (0x40000000UL) -#define BUS_OFFSET (0xe0000000UL) - -/* - * On the PCI bus the DRAM appears at address 0xe0000000 - */ -#define __virt_to_bus(x) ((unsigned long)(x) - PAGE_OFFSET + BUS_OFFSET) -#define __bus_to_virt(x) ((unsigned long)(x) + PAGE_OFFSET - BUS_OFFSET) - -#endif diff --git a/include/asm-arm/arch-nexuspci/param.h b/include/asm-arm/arch-nexuspci/param.h deleted file mode 100644 index d57753d8f1b8..000000000000 --- a/include/asm-arm/arch-nexuspci/param.h +++ /dev/null @@ -1,3 +0,0 @@ -/* - * linux/include/asm-arm/arch-nexuspci/param.h - */ diff --git a/include/asm-arm/arch-nexuspci/system.h b/include/asm-arm/arch-nexuspci/system.h deleted file mode 100644 index 824a1d7ad403..000000000000 --- a/include/asm-arm/arch-nexuspci/system.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * linux/include/asm-arm/arch-nexuspci/system.h - * - * Copyright (c) 1996, 97, 98, 99, 2000 FutureTV Labs Ltd. - */ - -/* - * 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. - */ - -#ifndef __ASM_ARCH_SYSTEM_H -#define __ASM_ARCH_SYSTEM_H - -static inline void arch_idle(void) -{ - cpu_do_idle(); -} - -#define arch_reset(mode) do { } while (0) - -#endif diff --git a/include/asm-arm/arch-nexuspci/time.h b/include/asm-arm/arch-nexuspci/time.h deleted file mode 100644 index c0fd0cdc9cb0..000000000000 --- a/include/asm-arm/arch-nexuspci/time.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * linux/include/asm-arm/arch-nexuspci/time.h - * - * Copyright (c) 1997, 1998, 1999, 2000 FutureTV Labs Ltd. - * - * The FTV PCI card has no real-time clock. We get timer ticks from the - * SCC chip. - */ - -/* - * 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. - */ - -static irqreturn_t -timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - static int count = 25; - unsigned char stat = __raw_readb(DUART_BASE + 0x14); - if (!(stat & 0x10)) - return; /* Not for us */ - - /* Reset counter */ - __raw_writeb(0x90, DUART_BASE + 8); - - if (--count == 0) { - static int state = 1; - state ^= 1; - __raw_writeb(0x1a + state, INTCONT_BASE); - __raw_writeb(0x18 + state, INTCONT_BASE); - count = 50; - } - - /* Wait for slow rise time */ - __raw_readb(DUART_BASE + 0x14); - __raw_readb(DUART_BASE + 0x14); - __raw_readb(DUART_BASE + 0x14); - __raw_readb(DUART_BASE + 0x14); - __raw_readb(DUART_BASE + 0x14); - __raw_readb(DUART_BASE + 0x14); - - do_timer(regs); - - return IRQ_HANDLED; -} - -void __init time_init(void) -{ - int tick = 3686400 / 16 / 2 / 100; - - __raw_writeb(tick & 0xff, DUART_BASE + 0x1c); - __raw_writeb(tick >> 8, DUART_BASE + 0x18); - __raw_writeb(0x80, DUART_BASE + 8); - __raw_writeb(0x10, DUART_BASE + 0x14); - - timer_irq.handler = timer_interrupt; - timer_irq.flags = SA_SHIRQ; - - setup_irq(IRQ_TIMER, &timer_irq); -} diff --git a/include/asm-arm/arch-nexuspci/timex.h b/include/asm-arm/arch-nexuspci/timex.h deleted file mode 100644 index 63d4e2cd1938..000000000000 --- a/include/asm-arm/arch-nexuspci/timex.h +++ /dev/null @@ -1,8 +0,0 @@ -/* - * linux/include/asm-arm/arch-nexuspci/timex.h - * - * NexusPCI StrongARM card timex specifications - * - * Copyright (C) 1998 Philip Blundell - */ - diff --git a/include/asm-arm/arch-nexuspci/uncompress.h b/include/asm-arm/arch-nexuspci/uncompress.h deleted file mode 100644 index dd697a92466c..000000000000 --- a/include/asm-arm/arch-nexuspci/uncompress.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * linux/include/asm-arm/arch-nexuspci/uncompress.h - * - * Copyright (C) 1998, 1999, 2000 Philip Blundell - */ - -/* - * 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. - */ - -#include <asm/hardware.h> -#include <asm/io.h> - -/* - * Write a character to the UART - */ -void _ll_write_char(char c) -{ - while (!(__raw_readb(DUART_START + 0x4) & 0x4)) - ; - __raw_writeb(c, DUART_START + 0xc); -} - -/* - * This does not append a newline - */ -static void puts(const char *s) -{ - while (*s) { - if (*s == '\n') - _ll_write_char('\r'); - _ll_write_char(*(s++)); - } -} - -/* - * Set up for decompression - */ -static void arch_decomp_setup(void) -{ - /* LED off */ - __raw_writel(INTCONT_LED, INTCONT_START); - - /* Set up SCC */ - __raw_writeb(42, DUART_START + 8); - __raw_writeb(48, DUART_START + 8); - __raw_writeb(16, DUART_START + 8); - __raw_writeb(0x93, DUART_START); - __raw_writeb(0x17, DUART_START); - __raw_writeb(0xbb, DUART_START + 4); - __raw_writeb(0x78, DUART_START + 16); - __raw_writeb(0xa0, DUART_START + 8); - __raw_writeb(5, DUART_START + 8); -} - -/* - * Stroke the watchdog so we don't get reset during decompression. - */ -static inline void arch_decomp_wdog(void) -{ - __raw_writel(INTCONT_WATCHDOG, INTCONT_START); - __raw_writel(INTCONT_WATCHDOG | 1, INTCONT_START); -} diff --git a/include/asm-arm/arch-nexuspci/vmalloc.h b/include/asm-arm/arch-nexuspci/vmalloc.h deleted file mode 100644 index 7e93df2307fc..000000000000 --- a/include/asm-arm/arch-nexuspci/vmalloc.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * linux/include/asm-arm/arch-nexuspci/vmalloc.h - */ - -/* - * Just any arbitrary offset to the start of the vmalloc VM area: the - * current 8MB value just means that there will be a 8MB "hole" after the - * physical memory until the kernel virtual memory starts. That means that - * any out-of-bounds memory accesses will hopefully be caught. - * The vmalloc() routines leaves a hole of 4kB between each vmalloced - * area for the same reason. ;) - */ -#define VMALLOC_OFFSET (8*1024*1024) -#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_END (PAGE_OFFSET + 0x20000000) diff --git a/include/asm-arm/arch-omap/memory.h b/include/asm-arm/arch-omap/memory.h index 106af7555813..4f9e8c842d6d 100644 --- a/include/asm-arm/arch-omap/memory.h +++ b/include/asm-arm/arch-omap/memory.h @@ -57,12 +57,28 @@ /* * OMAP-1510 bus address is translated into a Local Bus address if the - * OMAP bus type is lbus. See dmadev_uses_omap_lbus(). + * OMAP bus type is lbus. We do the address translation based on the + * device overriding the defaults used in the dma-mapping API. */ #ifdef CONFIG_ARCH_OMAP1510 -#define bus_to_lbus(x) ((x) + (OMAP1510_LB_OFFSET - PHYS_OFFSET)) -#define lbus_to_bus(x) ((x) - (OMAP1510_LB_OFFSET - PHYS_OFFSET)) -#endif + +#define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET) +#define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) +#define is_lbus_device(dev) (cpu_is_omap1510() && dev->coherent_dma_mask == 0x0fffffff) + +#define __arch_page_to_dma(dev, page) ({is_lbus_device(dev) ? \ + (dma_addr_t)virt_to_lbus(page_address(page)) : \ + (dma_addr_t)__virt_to_bus(page_address(page));}) + +#define __arch_dma_to_virt(dev, addr) ({is_lbus_device(dev) ? \ + lbus_to_virt(addr) : \ + __bus_to_virt(addr);}) + +#define __arch_virt_to_dma(dev, addr) ({is_lbus_device(dev) ? \ + virt_to_lbus(addr) : \ + __virt_to_bus(addr);}) + +#endif /* CONFIG_ARCH_OMAP1510 */ #define PHYS_TO_NID(addr) (0) #endif diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h index ffd2fa2eb502..127fc1af12c0 100644 --- a/include/asm-arm/arch-pxa/hardware.h +++ b/include/asm-arm/arch-pxa/hardware.h @@ -83,6 +83,11 @@ typedef struct { volatile u32 offset[4096]; } __regbase; extern void pxa_gpio_mode( int gpio_mode ); /* + * Routine to enable or disable CKEN + */ +extern void pxa_set_cken(int clock, int enable); + +/* * return current memory and LCD clock frequency in units of 10kHz */ extern unsigned int get_memclk_frequency_10khz(void); diff --git a/include/asm-arm/arch-tbox/dma.h b/include/asm-arm/arch-tbox/dma.h deleted file mode 100644 index 1d5d39175671..000000000000 --- a/include/asm-arm/arch-tbox/dma.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * linux/include/asm-arm/arch-tbox/dma.h - * - * Architecture DMA routines. We have to contend with the bizarre DMA - * machine built into the Tbox hardware. - * - * Copyright (C) 1998 Philip Blundell - */ - -/* - * 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. - */ - -/* - * DMA channel definitions. Some of these are physically strange but - * we sort it out inside dma.c so the user never has to care. The - * exception is the double-buffering which we can't really abstract - * away sensibly. - */ -#define DMA_VIDEO 0 -#define DMA_MPEG_B 1 -#define DMA_AUDIO_B 2 -#define DMA_ASHRX_B 3 -#define DMA_ASHTX 4 -#define DMA_MPEG 5 -#define DMA_AUDIO 6 -#define DMA_ASHRX 7 - -#define MAX_DMA_CHANNELS 0 /* XXX */ - -/* - * This is the maximum DMA address that can be DMAd to. - */ -#define MAX_DMA_ADDRESS 0xffffffff diff --git a/include/asm-arm/arch-tbox/hardware.h b/include/asm-arm/arch-tbox/hardware.h deleted file mode 100644 index 9aa3f4508b46..000000000000 --- a/include/asm-arm/arch-tbox/hardware.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * linux/include/asm-arm/arch-tbox/hardware.h - * - * Copyright (C) 1998, 1999, 2000 Philip Blundell - * Copyright (C) 2000 FutureTV Labs Ltd - * - * This file contains the hardware definitions of the Tbox - */ - -/* - * 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. - */ - -#ifndef __ASM_ARCH_HARDWARE_H -#define __ASM_ARCH_HARDWARE_H - -/* Logical Physical - * 0xfff00000 0x00100000 I/O - * 0xfff00000 0x00100000 Expansion CS0 - * 0xfff10000 0x00110000 DMA - * 0xfff20000 0x00120000 C-Cube - * 0xfff30000 0x00130000 FPGA 1 - * 0xfff40000 0x00140000 UART 2 - * 0xfff50000 0x00150000 UART 1 - * 0xfff60000 0x00160000 CS8900 - * 0xfff70000 0x00170000 INTCONT - * 0xfff80000 0x00180000 RAMDAC - * 0xfff90000 0x00190000 Control 0 - * 0xfffa0000 0x001a0000 Control 1 - * 0xfffb0000 0x001b0000 Control 2 - * 0xfffc0000 0x001c0000 FPGA 2 - * 0xfffd0000 0x001d0000 INTRESET - * 0xfffe0000 0x001e0000 C-Cube DMA throttle - * 0xffff0000 0x001f0000 Expansion CS1 - * 0xffe00000 0x82000000 cache flush - */ - -/* - * Mapping areas - */ -#define IO_BASE 0xfff00000 -#define IO_START 0x00100000 -#define FLUSH_BASE 0xffe00000 - -#define INTCONT 0xfff70000 - -#define FPGA1CONT 0xffff3000 - -/* - * RAM definitions - */ -#define RAM_BASE 0x80000000 -#define FLUSH_BASE_PHYS 0x82000000 - -#define UNCACHEABLE_ADDR INTCONT - -#endif diff --git a/include/asm-arm/arch-tbox/io.h b/include/asm-arm/arch-tbox/io.h deleted file mode 100644 index 869798595c94..000000000000 --- a/include/asm-arm/arch-tbox/io.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * linux/include/asm-arm/arch-tbox/io.h - * - * Copyright (C) 1996-1999 Russell King - * Copyright (C) 1998, 1999 Philip Blundell - * - */ -#ifndef __ASM_ARM_ARCH_IO_H -#define __ASM_ARM_ARCH_IO_H - -#define IO_SPACE_LIMIT 0xffffffff - -#define __io(_x) ((_x) << 2) - -/* - * Generic virtual read/write - */ -static inline unsigned int __arch_getw(unsigned long a) -{ - unsigned int value; - __asm__ __volatile__("ldr%?h %0, [%1, #0] @ getw" - : "=&r" (value) - : "r" (a)); - return value; -} - -static inline void __arch_putw(unsigned int value, unsigned long a) -{ - __asm__ __volatile__("str%?h %0, [%1, #0] @ putw" - : : "r" (value), "r" (a)); -} - -/* Idem, for devices on the upper byte lanes */ -#define inb_u(p) __arch_getb(__io_pc(p) + 2) -#define inw_u(p) __arch_getw(__io_pc(p) + 2) - -#define outb_u(v,p) __arch_putb(v,__io_pc(p) + 2) -#define outw_u(v,p) __arch_putw(v,__io_pc(p) + 2) - -#endif diff --git a/include/asm-arm/arch-tbox/irqs.h b/include/asm-arm/arch-tbox/irqs.h deleted file mode 100644 index 1ee5eba6ea9d..000000000000 --- a/include/asm-arm/arch-tbox/irqs.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * linux/include/asm-arm/arch-tbox/irqs.h - * - * Copyright (C) 1998, 2000 Philip Blundell - */ - -/* - * 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. - */ - -#define IRQ_MPEGDMA 0 -#define IRQ_ASHTX 1 -#define IRQ_ASHRX 2 -#define IRQ_VSYNC 3 -#define IRQ_HSYNC 4 -#define IRQ_MPEG 5 -#define IRQ_UART2 6 -#define IRQ_UART1 7 -#define IRQ_ETHERNET 8 -#define IRQ_TIMER 9 -#define IRQ_AUDIODMA 10 -/* bit 11 used for video field ident */ -#define IRQ_EXPMODCS0 12 -#define IRQ_EXPMODCS1 13 - -#define irq_canonicalize(i) (i) diff --git a/include/asm-arm/arch-tbox/memory.h b/include/asm-arm/arch-tbox/memory.h deleted file mode 100644 index a20479487c9d..000000000000 --- a/include/asm-arm/arch-tbox/memory.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * linux/include/asm-arm/arch-tbox/memory.h - * - * Copyright (c) 1996-1999 Russell King. - * Copyright (c) 1998-1999 Phil Blundell - */ -#ifndef __ASM_ARCH_MEMORY_H -#define __ASM_ARCH_MEMORY_H - -/* - * Physical DRAM offset. - */ -#define PHYS_OFFSET (0x80000000UL) - -/* - * Bus view is the same as physical view - */ -#define __virt_to_bus(x) __virt_to_phys(x) -#define __bus_to_virt(x) __phys_to_virt(x) - -#endif diff --git a/include/asm-arm/arch-tbox/param.h b/include/asm-arm/arch-tbox/param.h deleted file mode 100644 index 4b47fe32b7c6..000000000000 --- a/include/asm-arm/arch-tbox/param.h +++ /dev/null @@ -1,4 +0,0 @@ -/* - * linux/include/asm-arm/arch-tbox/param.h - */ -#define __KERNEL_HZ 1000 diff --git a/include/asm-arm/arch-tbox/serial.h b/include/asm-arm/arch-tbox/serial.h deleted file mode 100644 index 7e4aff996fd8..000000000000 --- a/include/asm-arm/arch-tbox/serial.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * linux/include/asm-arm/arch-tbox/serial.h - * - * Copyright (c) 1996 Russell King. - * Copyright (c) 1998 Phil Blundell - * - * Changelog: - * 15-10-1996 RMK Created - * 09-06-1998 PJB tbox version - */ -#ifndef __ASM_ARCH_SERIAL_H -#define __ASM_ARCH_SERIAL_H - -/* - * This assumes you have a 1.8432 MHz clock for your UART. - * - * It'd be nice if someone built a serial card with a 24.576 MHz - * clock, since the 16550A is capable of handling a top speed of 1.5 - * megabits/second; but this requires the faster clock. - */ -#define BASE_BAUD (1843200 / 16) - -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) - - /* UART CLK PORT IRQ FLAGS */ -#define STD_SERIAL_PORT_DEFNS \ - { 0, BASE_BAUD, 0xffff4000 >> 2, 6, STD_COM_FLAGS }, /* ttyS0 */ \ - { 0, BASE_BAUD, 0xffff5000 >> 2, 7, STD_COM_FLAGS }, /* ttyS1 */ - -#define EXTRA_SERIAL_PORT_DEFNS - -#endif diff --git a/include/asm-arm/arch-tbox/system.h b/include/asm-arm/arch-tbox/system.h deleted file mode 100644 index da2cb88acb0c..000000000000 --- a/include/asm-arm/arch-tbox/system.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * linux/include/asm-arm/arch-tbox/system.h - * - * Copyright (c) 1996-1999 Russell King. - */ -#ifndef __ASM_ARCH_SYSTEM_H -#define __ASM_ARCH_SYSTEM_H - -static inline void arch_idle(void) -{ - cpu_do_idle(); -} - -#define arch_reset(mode) do { } while (0) - -#endif diff --git a/include/asm-arm/arch-tbox/time.h b/include/asm-arm/arch-tbox/time.h deleted file mode 100644 index 461787189e1e..000000000000 --- a/include/asm-arm/arch-tbox/time.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * linux/include/asm-arm/arch-tbox/time.h - * - * Copyright (c) 1997, 1999 Phil Blundell. - * Copyright (c) 2000 FutureTV Labs Ltd - * - * Tbox has no real-time clock -- we get millisecond ticks to update - * our soft copy. - */ - -/* - * 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. - */ - -#include <asm/io.h> -#include <asm/hardware.h> - -#define update_rtc() - -static irqreturn_t -timer_interrupt (int irq, void *dev_id, struct pt_regs *regs) -{ - /* Clear irq */ - __raw_writel(1, FPGA1CONT + 0xc); - __raw_writel(0, FPGA1CONT + 0xc); - - do_timer(regs); - - return IRQ_HANDLED; -} - -void __init time_init(void) -{ - timer_irq.handler = timer_interrupt; - setup_irq(IRQ_TIMER, &timer_irq); -} diff --git a/include/asm-arm/arch-tbox/timex.h b/include/asm-arm/arch-tbox/timex.h deleted file mode 100644 index c5489cd66ce7..000000000000 --- a/include/asm-arm/arch-tbox/timex.h +++ /dev/null @@ -1,8 +0,0 @@ -/* - * linux/include/asm-arm/arch-tbox/timex.h - * - * Tbox timex specifications - * - * Copyright (C) 1999 Philip Blundell - */ - diff --git a/include/asm-arm/arch-tbox/uncompress.h b/include/asm-arm/arch-tbox/uncompress.h deleted file mode 100644 index 17a5034e7812..000000000000 --- a/include/asm-arm/arch-tbox/uncompress.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * linux/include/asm-arm/arch-nexuspci/uncompress.h - * from linux/include/asm-arm/arch-ebsa110/uncompress.h - * - * Copyright (C) 1996,1997,1998 Russell King - * Copyright (C) 1998, 1999 Phil Blundell - */ - -#include <asm/io.h> - -#define UARTBASE 0x00400000 - -/* - * This does not append a newline - */ -static void puts(const char *s) -{ - while (*s) - { - char c = *(s++); - while (!(__raw_readb(UARTBASE + 0x14) & 0x20)); - __raw_writeb(c, UARTBASE); - if (c == 10) { - while (!(__raw_readb(UARTBASE + 0x14) & 0x20)); - __raw_writeb(13, UARTBASE); - } - } -} - -/* - * nothing to do - */ -#define arch_decomp_setup() - -/* - * Stroke the watchdog so we don't get reset during decompression. - */ -#define arch_decomp_wdog() \ - do { \ - __raw_writel(1, 0xa00000); \ - __raw_writel(0, 0xa00000); \ - } while (0) diff --git a/include/asm-arm/arch-tbox/vmalloc.h b/include/asm-arm/arch-tbox/vmalloc.h deleted file mode 100644 index da4a5c04f193..000000000000 --- a/include/asm-arm/arch-tbox/vmalloc.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * linux/include/asm-arm/arch-tbox/vmalloc.h - */ - -/* - * Just any arbitrary offset to the start of the vmalloc VM area: the - * current 8MB value just means that there will be a 8MB "hole" after the - * physical memory until the kernel virtual memory starts. That means that - * any out-of-bounds memory accesses will hopefully be caught. - * The vmalloc() routines leaves a hole of 4kB between each vmalloced - * area for the same reason. ;) - */ -#define VMALLOC_OFFSET (8*1024*1024) -#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_END (PAGE_OFFSET + 0x10000000) diff --git a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h index 011c539c7449..b8750631dd09 100644 --- a/include/asm-arm/dma-mapping.h +++ b/include/asm-arm/dma-mapping.h @@ -124,7 +124,7 @@ dma_map_single(struct device *dev, void *cpu_addr, size_t size, enum dma_data_direction dir) { consistent_sync(cpu_addr, size, dir); - return __virt_to_bus((unsigned long)cpu_addr); + return virt_to_dma(dev, (unsigned long)cpu_addr); } #else extern dma_addr_t dma_map_single(struct device *,void *, size_t, enum dma_data_direction); @@ -231,7 +231,7 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, for (i = 0; i < nents; i++, sg++) { char *virt; - sg->dma_address = page_to_bus(sg->page) + sg->offset; + sg->dma_address = page_to_dma(dev, sg->page) + sg->offset; virt = page_address(sg->page) + sg->offset; consistent_sync(virt, sg->length, dir); } @@ -288,14 +288,14 @@ static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size, enum dma_data_direction dir) { - consistent_sync((void *)__bus_to_virt(handle), size, dir); + consistent_sync((void *)dma_to_virt(dev, handle), size, dir); } static inline void dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size, enum dma_data_direction dir) { - consistent_sync((void *)__bus_to_virt(handle), size, dir); + consistent_sync((void *)dma_to_virt(dev, handle), size, dir); } #else extern void dma_sync_single_for_cpu(struct device*, dma_addr_t, size_t, enum dma_data_direction); diff --git a/include/asm-arm/fcntl.h b/include/asm-arm/fcntl.h index da2861ca37b0..485b6bdf4d7a 100644 --- a/include/asm-arm/fcntl.h +++ b/include/asm-arm/fcntl.h @@ -20,6 +20,7 @@ #define O_NOFOLLOW 0100000 /* don't follow links */ #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ #define O_LARGEFILE 0400000 +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index 75da0b9c4960..91dee4da45ce 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h @@ -159,9 +159,18 @@ static inline void *phys_to_virt(unsigned long x) #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) /* + * Optional device DMA address remapping. Do _not_ use directly! * We should really eliminate virt_to_bus() here - it's deprecated. */ -#define page_to_bus(page) (virt_to_bus(page_address(page))) +#ifndef __arch_page_to_dma +#define page_to_dma(dev, page) ((dma_addr_t)__virt_to_bus(page_address(page))) +#define dma_to_virt(dev, addr) (__bus_to_virt(addr)) +#define virt_to_dma(dev, addr) (__virt_to_bus(addr)) +#else +#define page_to_dma(dev, page) (__arch_page_to_dma(dev, page)) +#define dma_to_virt(dev, addr) (__arch_dma_to_virt(dev, addr)) +#define virt_to_dma(dev, addr) (__arch_virt_to_dma(dev, addr)) +#endif #endif diff --git a/include/asm-arm26/fcntl.h b/include/asm-arm26/fcntl.h index da2861ca37b0..485b6bdf4d7a 100644 --- a/include/asm-arm26/fcntl.h +++ b/include/asm-arm26/fcntl.h @@ -20,6 +20,7 @@ #define O_NOFOLLOW 0100000 /* don't follow links */ #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ #define O_LARGEFILE 0400000 +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/asm-cris/fcntl.h b/include/asm-cris/fcntl.h index a68e2886e0c1..61c563242b51 100644 --- a/include/asm-cris/fcntl.h +++ b/include/asm-cris/fcntl.h @@ -22,6 +22,7 @@ #define O_LARGEFILE 0100000 #define O_DIRECTORY 0200000 /* must be a directory */ #define O_NOFOLLOW 0400000 /* don't follow links */ +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get f_flags */ diff --git a/include/asm-h8300/fcntl.h b/include/asm-h8300/fcntl.h index a7e7ac01d0d7..355350a57bf9 100644 --- a/include/asm-h8300/fcntl.h +++ b/include/asm-h8300/fcntl.h @@ -20,6 +20,7 @@ #define O_NOFOLLOW 0100000 /* don't follow links */ #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ #define O_LARGEFILE 0400000 +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/asm-i386/fcntl.h b/include/asm-i386/fcntl.h index 41e3c4d9144e..511cde94a3ed 100644 --- a/include/asm-i386/fcntl.h +++ b/include/asm-i386/fcntl.h @@ -20,6 +20,7 @@ #define O_LARGEFILE 0100000 #define O_DIRECTORY 0200000 /* must be a directory */ #define O_NOFOLLOW 0400000 /* don't follow links */ +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/asm-i386/mach-default/setup_arch_post.h b/include/asm-i386/mach-default/setup_arch_post.h index 43b3b2d1fa11..2fc4888721f6 100644 --- a/include/asm-i386/mach-default/setup_arch_post.h +++ b/include/asm-i386/mach-default/setup_arch_post.h @@ -6,7 +6,7 @@ * use of all of the static functions. **/ -static inline char * __init machine_specific_memory_setup(void) +static char * __init machine_specific_memory_setup(void) { char *who; diff --git a/include/asm-i386/mach-visws/setup_arch_post.h b/include/asm-i386/mach-visws/setup_arch_post.h index 2857daf5af40..cdbd895a54b1 100644 --- a/include/asm-i386/mach-visws/setup_arch_post.h +++ b/include/asm-i386/mach-visws/setup_arch_post.h @@ -10,7 +10,7 @@ unsigned long sgivwfb_mem_size; long long mem_size __initdata = 0; -static inline char * __init machine_specific_memory_setup(void) +static char * __init machine_specific_memory_setup(void) { long long gfx_mem_size = 8 * MB; diff --git a/include/asm-i386/mach-voyager/setup_arch_post.h b/include/asm-i386/mach-voyager/setup_arch_post.h index 4c7cef49b8b2..f6f6c2cbc75c 100644 --- a/include/asm-i386/mach-voyager/setup_arch_post.h +++ b/include/asm-i386/mach-voyager/setup_arch_post.h @@ -3,7 +3,7 @@ * This is included late in kernel/setup.c so that it can make use of all of * the static functions. */ -static inline char * __init machine_specific_memory_setup(void) +static char * __init machine_specific_memory_setup(void) { char *who; diff --git a/include/asm-ia64/fcntl.h b/include/asm-ia64/fcntl.h index 697dd0bc0a8e..d193981bb1d8 100644 --- a/include/asm-ia64/fcntl.h +++ b/include/asm-ia64/fcntl.h @@ -28,6 +28,7 @@ #define O_LARGEFILE 0100000 #define O_DIRECTORY 0200000 /* must be a directory */ #define O_NOFOLLOW 0400000 /* don't follow links */ +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/asm-ia64/gcc_intrin.h b/include/asm-ia64/gcc_intrin.h index d3d94e85c8eb..7d2b1e4cd0f9 100644 --- a/include/asm-ia64/gcc_intrin.h +++ b/include/asm-ia64/gcc_intrin.h @@ -489,10 +489,16 @@ register unsigned long ia64_r13 asm ("r13") __attribute_used__; #define ia64_ptce(addr) asm volatile ("ptc.e %0" :: "r"(addr)) #define ia64_ptcga(addr, size) \ - asm volatile ("ptc.ga %0,%1" :: "r"(addr), "r"(size) : "memory") +do { \ + asm volatile ("ptc.ga %0,%1" :: "r"(addr), "r"(size) : "memory"); \ + ia64_dv_serialize_data(); \ +} while (0) -#define ia64_ptcl(addr, size) \ - asm volatile ("ptc.l %0,%1" :: "r"(addr), "r"(size) : "memory") +#define ia64_ptcl(addr, size) \ +do { \ + asm volatile ("ptc.l %0,%1" :: "r"(addr), "r"(size) : "memory"); \ + ia64_dv_serialize_data(); \ +} while (0) #define ia64_ptri(addr, size) \ asm volatile ("ptr.i %0,%1" :: "r"(addr), "r"(size) : "memory") @@ -581,7 +587,7 @@ register unsigned long ia64_r13 asm ("r13") __attribute_used__; #define ia64_intrin_local_irq_restore(x) \ do { \ - asm volatile (" cmp.ne p6,p7=%0,r0;;" \ + asm volatile (";; cmp.ne p6,p7=%0,r0;;" \ "(p6) ssm psr.i;" \ "(p7) rsm psr.i;;" \ "(p6) srlz.d" \ diff --git a/include/asm-ia64/ia32.h b/include/asm-ia64/ia32.h index 75dd0d334b99..4fa4b8e12000 100644 --- a/include/asm-ia64/ia32.h +++ b/include/asm-ia64/ia32.h @@ -6,7 +6,8 @@ #include <asm/ptrace.h> #include <asm/signal.h> -#define IA32_NR_syscalls 283 /* length of syscall table */ +#define IA32_NR_syscalls 283 /* length of syscall table */ +#define IA32_PAGE_SHIFT 12 /* 4KB pages */ #ifndef __ASSEMBLY__ @@ -24,6 +25,13 @@ extern int ia32_clone_tls (struct task_struct *child, struct pt_regs *childregs) /* Declare this unconditionally, so we don't get warnings for unreachable code. */ extern int ia32_setup_frame1 (int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set, struct pt_regs *regs); +#if PAGE_SHIFT > IA32_PAGE_SHIFT +extern int ia32_copy_partial_page_list (struct task_struct *, unsigned long); +extern void ia32_drop_partial_page_list (struct task_struct *); +#else +# define ia32_copy_partial_page_list(a1, a2) 0 +# define ia32_drop_partial_page_list(a1) do { ; } while (0) +#endif #endif /* !__ASSEMBLY__ */ diff --git a/include/asm-ia64/irq.h b/include/asm-ia64/irq.h index 5d930fdc0bea..bd07d11d9f37 100644 --- a/include/asm-ia64/irq.h +++ b/include/asm-ia64/irq.h @@ -30,6 +30,12 @@ extern void disable_irq_nosync (unsigned int); extern void enable_irq (unsigned int); extern void set_irq_affinity_info (unsigned int irq, int dest, int redir); +#ifdef CONFIG_SMP +extern void move_irq(int irq); +#else +#define move_irq(irq) +#endif + struct irqaction; struct pt_regs; int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index 8d727c6b7836..c30329a308b4 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h @@ -297,11 +297,7 @@ ia64_phys_addr_valid (unsigned long addr) * works bypasses the caches, but does allow for consecutive writes to * be combined into single (but larger) write transactions. */ -#ifdef CONFIG_MCKINLEY_A0_SPECIFIC -# define pgprot_writecombine(prot) prot -#else -# define pgprot_writecombine(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_WC) -#endif +#define pgprot_writecombine(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_WC) static inline unsigned long pgd_index (unsigned long address) diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h index 05e9913e03b8..dec7d3fb1ba7 100644 --- a/include/asm-ia64/processor.h +++ b/include/asm-ia64/processor.h @@ -230,6 +230,7 @@ struct desc_struct { #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8) +struct partial_page_list; #endif struct thread_struct { @@ -251,6 +252,7 @@ struct thread_struct { __u64 fdr; /* IA32 fp except. data reg */ __u64 old_k1; /* old value of ar.k1 */ __u64 old_iob; /* old IOBase value */ + struct partial_page_list *ppl; /* partial page list for 4K page size issue */ /* cached TLS descriptors. */ struct desc_struct tls_array[GDT_ENTRY_TLS_ENTRIES]; @@ -260,7 +262,8 @@ struct thread_struct { .fir = 0, \ .fdr = 0, \ .old_k1 = 0, \ - .old_iob = 0, + .old_iob = 0, \ + .ppl = 0, #else # define INIT_THREAD_IA32 #endif /* CONFIG_IA32_SUPPORT */ diff --git a/include/asm-ia64/sn/module.h b/include/asm-ia64/sn/module.h index b7c7dd2aba2b..172f459fc01e 100644 --- a/include/asm-ia64/sn/module.h +++ b/include/asm-ia64/sn/module.h @@ -180,7 +180,7 @@ struct module_s { }; /* module.c */ -extern module_t *modules[MODULE_MAX]; /* Indexed by cmoduleid_t */ +extern module_t *sn_modules[MODULE_MAX]; /* Indexed by cmoduleid_t */ extern int nummodules; extern module_t *module_lookup(moduleid_t id); diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index 0c2343152136..cc063429344f 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h @@ -33,6 +33,7 @@ #define SN_SAL_NO_FAULT_ZONE_VIRTUAL 0x02000010 #define SN_SAL_NO_FAULT_ZONE_PHYSICAL 0x02000011 #define SN_SAL_PRINT_ERROR 0x02000012 +#define SN_SAL_SET_ERROR_HANDLING_FEATURES 0x0200001a // reentrant #define SN_SAL_CONSOLE_PUTC 0x02000021 #define SN_SAL_CONSOLE_GETC 0x02000022 #define SN_SAL_CONSOLE_PUTS 0x02000023 @@ -92,6 +93,19 @@ #define SALRET_INVALID_ARG -2 #define SALRET_ERROR -3 +/* + * SN_SAL_SET_ERROR_HANDLING_FEATURES bit settings + */ +enum +{ + /* if "rz always" is set, have the mca slaves call os_init_slave */ + SN_SAL_EHF_MCA_SLV_TO_OS_INIT_SLV=0, + /* do not rz on tlb checks, even if "rz always" is set */ + SN_SAL_EHF_NO_RZ_TLBC, + /* do not rz on PIO reads to I/O space, even if "rz always" is set */ + SN_SAL_EHF_NO_RZ_IO_READ, +}; + /** * sn_sal_rev_major - get the major SGI SAL revision number @@ -670,4 +684,24 @@ ia64_sn_sysctl_iobrick_pci_op(nasid_t n, u64 connection_type, return 0; } +/* + * Tell the prom how the OS wants to handle specific error features. + * It takes an array of 7 u64. + */ +static inline u64 +ia64_sn_set_error_handling_features(const u64 *feature_bits) +{ + struct ia64_sal_retval rv = {0, 0, 0, 0}; + + SAL_CALL_REENTRANT(rv, SN_SAL_SET_ERROR_HANDLING_FEATURES, + feature_bits[0], + feature_bits[1], + feature_bits[2], + feature_bits[3], + feature_bits[4], + feature_bits[5], + feature_bits[6]); + return rv.status; +} + #endif /* _ASM_IA64_SN_SN_SAL_H */ diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 57c7db10a42e..83b2c1bc0ffe 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h @@ -171,7 +171,7 @@ do { \ # define local_irq_restore(x) __local_irq_restore(x) #endif /* !CONFIG_IA64_DEBUG_IRQ */ -#define local_irq_enable() ({ ia64_ssm(IA64_PSR_I); ia64_srlz_d(); }) +#define local_irq_enable() ({ ia64_stop(); ia64_ssm(IA64_PSR_I); ia64_srlz_d(); }) #define local_save_flags(flags) ({ ia64_stop(); (flags) = ia64_getreg(_IA64_REG_PSR); }) #define irqs_disabled() \ diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index ca3c7b958b1e..d46f47f9707e 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h @@ -266,6 +266,8 @@ #define NR_syscalls 256 /* length of syscall table */ +#define __ARCH_WANT_SYS_RT_SIGACTION + #ifdef CONFIG_IA32_SUPPORT # define __ARCH_WANT_SYS_FADVISE64 # define __ARCH_WANT_SYS_GETPGRP @@ -275,7 +277,6 @@ # define __ARCH_WANT_SYS_OLDUMOUNT # define __ARCH_WANT_SYS_SIGPENDING # define __ARCH_WANT_SYS_SIGPROCMASK -# define __ARCH_WANT_SYS_RT_SIGACTION #endif #if !defined(__ASSEMBLY__) && !defined(ASSEMBLER) diff --git a/include/asm-m68k/atomic.h b/include/asm-m68k/atomic.h index d7ef37661179..3f867738062a 100644 --- a/include/asm-m68k/atomic.h +++ b/include/asm-m68k/atomic.h @@ -1,6 +1,8 @@ #ifndef __ARCH_M68K_ATOMIC__ #define __ARCH_M68K_ATOMIC__ +#include <asm/system.h> /* local_irq_XXX() */ + /* * Atomic operations that C can't guarantee us. Useful for * resource counting etc.. @@ -16,38 +18,124 @@ typedef struct { int counter; } atomic_t; #define atomic_read(v) ((v)->counter) #define atomic_set(v, i) (((v)->counter) = i) -static __inline__ void atomic_add(int i, atomic_t *v) +static inline void atomic_add(int i, atomic_t *v) +{ + __asm__ __volatile__("addl %1,%0" : "+m" (*v) : "id" (i)); +} + +static inline void atomic_sub(int i, atomic_t *v) +{ + __asm__ __volatile__("subl %1,%0" : "+m" (*v) : "id" (i)); +} + +static inline void atomic_inc(atomic_t *v) +{ + __asm__ __volatile__("addql #1,%0" : "+m" (*v)); +} + +static inline void atomic_dec(atomic_t *v) +{ + __asm__ __volatile__("subql #1,%0" : "+m" (*v)); +} + +static inline int atomic_dec_and_test(atomic_t *v) +{ + char c; + __asm__ __volatile__("subql #1,%1; seq %0" : "=d" (c), "+m" (*v)); + return c != 0; +} + +static inline int atomic_inc_and_test(atomic_t *v) +{ + char c; + __asm__ __volatile__("addql #1,%1; seq %0" : "=d" (c), "+m" (*v)); + return c != 0; +} + +#ifdef CONFIG_RMW_INSNS +static inline int atomic_add_return(int i, atomic_t *v) { - __asm__ __volatile__("addl %1,%0" : "=m" (*v) : "id" (i), "0" (*v)); + int t, tmp; + + __asm__ __volatile__( + "1: movel %2,%1\n" + " addl %3,%1\n" + " casl %2,%1,%0\n" + " jne 1b" + : "+m" (*v), "=&d" (t), "=&d" (tmp) + : "g" (i), "2" (atomic_read(v))); + return t; } -static __inline__ void atomic_sub(int i, atomic_t *v) +static inline int atomic_sub_return(int i, atomic_t *v) { - __asm__ __volatile__("subl %1,%0" : "=m" (*v) : "id" (i), "0" (*v)); + int t, tmp; + + __asm__ __volatile__( + "1: movel %2,%1\n" + " subl %3,%1\n" + " casl %2,%1,%0\n" + " jne 1b" + : "+m" (*v), "=&d" (t), "=&d" (tmp) + : "g" (i), "2" (atomic_read(v))); + return t; +} +#else /* !CONFIG_RMW_INSNS */ +static inline int atomic_add_return(int i, atomic_t * v) +{ + unsigned long flags; + int t; + + local_irq_save(flags); + t = atomic_read(v); + t += i; + atomic_set(v, t); + local_irq_restore(flags); + + return t; } -static __inline__ void atomic_inc(volatile atomic_t *v) +static inline int atomic_sub_return(int i, atomic_t * v) { - __asm__ __volatile__("addql #1,%0" : "=m" (*v): "0" (*v)); + unsigned long flags; + int t; + + local_irq_save(flags); + t = atomic_read(v); + t -= i; + atomic_set(v, t); + local_irq_restore(flags); + + return t; } +#endif /* !CONFIG_RMW_INSNS */ + +#define atomic_dec_return(v) atomic_sub_return(1, (v)) +#define atomic_inc_return(v) atomic_add_return(1, (v)) -static __inline__ void atomic_dec(volatile atomic_t *v) +static inline int atomic_sub_and_test(int i, atomic_t *v) { - __asm__ __volatile__("subql #1,%0" : "=m" (*v): "0" (*v)); + char c; + __asm__ __volatile__("subl %2,%1; seq %0" : "=d" (c), "+m" (*v): "g" (i)); + return c != 0; } -static __inline__ int atomic_dec_and_test(volatile atomic_t *v) +static inline int atomic_add_negative(int i, atomic_t *v) { char c; - __asm__ __volatile__("subql #1,%1; seq %0" : "=d" (c), "=m" (*v): "1" (*v)); + __asm__ __volatile__("addl %2,%1; smi %0" : "=d" (c), "+m" (*v): "g" (i)); return c != 0; } -#define atomic_clear_mask(mask, v) \ - __asm__ __volatile__("andl %1,%0" : "=m" (*v) : "id" (~(mask)),"0"(*v)) +static inline void atomic_clear_mask(unsigned long mask, unsigned long *v) +{ + __asm__ __volatile__("andl %1,%0" : "+m" (*v) : "id" (~(mask))); +} -#define atomic_set_mask(mask, v) \ - __asm__ __volatile__("orl %1,%0" : "=m" (*v) : "id" (mask),"0"(*v)) +static inline void atomic_set_mask(unsigned long mask, unsigned long *v) +{ + __asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask)); +} /* Atomic operations are already serializing */ #define smp_mb__before_atomic_dec() barrier() diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h index ec1e32ecb914..05ccc865d77b 100644 --- a/include/asm-m68k/bitops.h +++ b/include/asm-m68k/bitops.h @@ -23,25 +23,24 @@ #define __test_and_set_bit(nr,vaddr) test_and_set_bit(nr,vaddr) -static inline int __constant_test_and_set_bit(int nr, - volatile unsigned long *vaddr) +static inline int __constant_test_and_set_bit(int nr, unsigned long *vaddr) { + char *p = (char *)vaddr + (nr ^ 31) / 8; char retval; __asm__ __volatile__ ("bset %2,%1; sne %0" - : "=d" (retval), "+m" (((volatile char *)vaddr)[(nr^31) >> 3]) - : "di" (nr & 7)); + : "=d" (retval), "+m" (*p) + : "di" (nr & 7)); return retval; } -static inline int __generic_test_and_set_bit(int nr, - volatile unsigned long *vaddr) +static inline int __generic_test_and_set_bit(int nr, unsigned long *vaddr) { char retval; - __asm__ __volatile__ ("bfset %2@{%1:#1}; sne %0" - : "=d" (retval) : "d" (nr^31), "a" (vaddr) : "memory"); + __asm__ __volatile__ ("bfset %2{%1:#1}; sne %0" + : "=d" (retval) : "d" (nr^31), "o" (*vaddr) : "memory"); return retval; } @@ -53,16 +52,17 @@ static inline int __generic_test_and_set_bit(int nr, #define __set_bit(nr,vaddr) set_bit(nr,vaddr) -static inline void __constant_set_bit(int nr, volatile unsigned long *vaddr) +static inline void __constant_set_bit(int nr, unsigned long *vaddr) { + char *p = (char *)vaddr + (nr ^ 31) / 8; __asm__ __volatile__ ("bset %1,%0" - : "+m" (((volatile char *)vaddr)[(nr^31) >> 3]) : "di" (nr & 7)); + : "+m" (*p) : "di" (nr & 7)); } -static inline void __generic_set_bit(int nr, volatile unsigned long *vaddr) +static inline void __generic_set_bit(int nr, unsigned long *vaddr) { - __asm__ __volatile__ ("bfset %1@{%0:#1}" - : : "d" (nr^31), "a" (vaddr) : "memory"); + __asm__ __volatile__ ("bfset %1{%0:#1}" + : : "d" (nr^31), "o" (*vaddr) : "memory"); } #define test_and_clear_bit(nr,vaddr) \ @@ -72,25 +72,24 @@ static inline void __generic_set_bit(int nr, volatile unsigned long *vaddr) #define __test_and_clear_bit(nr,vaddr) test_and_clear_bit(nr,vaddr) -static inline int __constant_test_and_clear_bit(int nr, - volatile unsigned long *vaddr) +static inline int __constant_test_and_clear_bit(int nr, unsigned long *vaddr) { + char *p = (char *)vaddr + (nr ^ 31) / 8; char retval; __asm__ __volatile__ ("bclr %2,%1; sne %0" - : "=d" (retval), "+m" (((volatile char *)vaddr)[(nr^31) >> 3]) - : "di" (nr & 7)); + : "=d" (retval), "+m" (*p) + : "di" (nr & 7)); return retval; } -static inline int __generic_test_and_clear_bit(int nr, - volatile unsigned long *vaddr) +static inline int __generic_test_and_clear_bit(int nr, unsigned long *vaddr) { char retval; - __asm__ __volatile__ ("bfclr %2@{%1:#1}; sne %0" - : "=d" (retval) : "d" (nr^31), "a" (vaddr) : "memory"); + __asm__ __volatile__ ("bfclr %2{%1:#1}; sne %0" + : "=d" (retval) : "d" (nr^31), "o" (*vaddr) : "memory"); return retval; } @@ -107,16 +106,17 @@ static inline int __generic_test_and_clear_bit(int nr, __generic_clear_bit(nr, vaddr)) #define __clear_bit(nr,vaddr) clear_bit(nr,vaddr) -static inline void __constant_clear_bit(int nr, volatile unsigned long *vaddr) +static inline void __constant_clear_bit(int nr, unsigned long *vaddr) { + char *p = (char *)vaddr + (nr ^ 31) / 8; __asm__ __volatile__ ("bclr %1,%0" - : "+m" (((volatile char *)vaddr)[(nr^31) >> 3]) : "di" (nr & 7)); + : "+m" (*p) : "di" (nr & 7)); } -static inline void __generic_clear_bit(int nr, volatile unsigned long *vaddr) +static inline void __generic_clear_bit(int nr, unsigned long *vaddr) { - __asm__ __volatile__ ("bfclr %1@{%0:#1}" - : : "d" (nr^31), "a" (vaddr) : "memory"); + __asm__ __volatile__ ("bfclr %1{%0:#1}" + : : "d" (nr^31), "o" (*vaddr) : "memory"); } #define test_and_change_bit(nr,vaddr) \ @@ -127,25 +127,24 @@ static inline void __generic_clear_bit(int nr, volatile unsigned long *vaddr) #define __test_and_change_bit(nr,vaddr) test_and_change_bit(nr,vaddr) #define __change_bit(nr,vaddr) change_bit(nr,vaddr) -static inline int __constant_test_and_change_bit(int nr, - volatile unsigned long *vaddr) +static inline int __constant_test_and_change_bit(int nr, unsigned long *vaddr) { + char *p = (char *)vaddr + (nr ^ 31) / 8; char retval; __asm__ __volatile__ ("bchg %2,%1; sne %0" - : "=d" (retval), "+m" (((volatile char *)vaddr)[(nr^31) >> 3]) - : "di" (nr & 7)); + : "=d" (retval), "+m" (*p) + : "di" (nr & 7)); return retval; } -static inline int __generic_test_and_change_bit(int nr, - volatile unsigned long *vaddr) +static inline int __generic_test_and_change_bit(int nr, unsigned long *vaddr) { char retval; - __asm__ __volatile__ ("bfchg %2@{%1:#1}; sne %0" - : "=d" (retval) : "d" (nr^31), "a" (vaddr) : "memory"); + __asm__ __volatile__ ("bfchg %2{%1:#1}; sne %0" + : "=d" (retval) : "d" (nr^31), "o" (*vaddr) : "memory"); return retval; } @@ -155,21 +154,22 @@ static inline int __generic_test_and_change_bit(int nr, __constant_change_bit(nr, vaddr) : \ __generic_change_bit(nr, vaddr)) -static inline void __constant_change_bit(int nr, volatile unsigned long *vaddr) +static inline void __constant_change_bit(int nr, unsigned long *vaddr) { + char *p = (char *)vaddr + (nr ^ 31) / 8; __asm__ __volatile__ ("bchg %1,%0" - : "+m" (((volatile char *)vaddr)[(nr^31) >> 3]) : "di" (nr & 7)); + : "+m" (*p) : "di" (nr & 7)); } -static inline void __generic_change_bit(int nr, volatile unsigned long *vaddr) +static inline void __generic_change_bit(int nr, unsigned long *vaddr) { - __asm__ __volatile__ ("bfchg %1@{%0:#1}" - : : "d" (nr^31), "a" (vaddr) : "memory"); + __asm__ __volatile__ ("bfchg %1{%0:#1}" + : : "d" (nr^31), "o" (*vaddr) : "memory"); } -static inline int test_bit(int nr, const volatile unsigned long *vaddr) +static inline int test_bit(int nr, const unsigned long *vaddr) { - return ((1UL << (nr & 31)) & (((const volatile unsigned long *) vaddr)[nr >> 5])) != 0; + return (vaddr[nr >> 5] & (1UL << (nr & 31))) != 0; } static inline int find_first_zero_bit(const unsigned long *vaddr, @@ -364,76 +364,27 @@ static inline int minix_find_first_zero_bit(const void *vaddr, unsigned size) return ((p - addr) << 4) + (res ^ 31); } -static inline int minix_test_and_set_bit(int nr, volatile void *vaddr) -{ - char retval; - - __asm__ __volatile__ ("bfset %2{%1:#1}; sne %0" - : "=d" (retval) : "d" (nr^15), "m" (*(volatile char *)vaddr) : "memory"); - - return retval; -} - -#define minix_set_bit(nr,addr) ((void)minix_test_and_set_bit(nr,addr)) +#define minix_test_and_set_bit(nr, addr) test_and_set_bit((nr) ^ 16, (unsigned long *)(addr)) +#define minix_set_bit(nr,addr) set_bit((nr) ^ 16, (unsigned long *)(addr)) +#define minix_test_and_clear_bit(nr, addr) test_and_clear_bit((nr) ^ 16, (unsigned long *)(addr)) -static inline int minix_test_and_clear_bit(int nr, volatile void *vaddr) +static inline int minix_test_bit(int nr, const void *vaddr) { - char retval; - - __asm__ __volatile__ ("bfclr %2{%1:#1}; sne %0" - : "=d" (retval) : "d" (nr^15), "m" (*(volatile char *) vaddr) : "memory"); - - return retval; -} - -static inline int minix_test_bit(int nr, const volatile void *vaddr) -{ - return ((1U << (nr & 15)) & (((const volatile unsigned short *) vaddr)[nr >> 4])) != 0; + const unsigned short *p = vaddr; + return (p[nr >> 4] & (1U << (nr & 15))) != 0; } /* Bitmap functions for the ext2 filesystem. */ -static inline int ext2_set_bit(int nr, volatile void *vaddr) -{ - char retval; - - __asm__ __volatile__ ("bfset %2{%1,#1}; sne %0" - : "=d" (retval) : "d" (nr^7), "m" (*(volatile char *) vaddr) : "memory"); - - return retval; -} - -static inline int ext2_clear_bit(int nr, volatile void *vaddr) -{ - char retval; - - __asm__ __volatile__ ("bfclr %2{%1,#1}; sne %0" - : "=d" (retval) : "d" (nr^7), "m" (*(volatile char *) vaddr) : "memory"); - - return retval; -} +#define ext2_set_bit(nr, addr) test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) +#define ext2_set_bit_atomic(lock, nr, addr) test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) +#define ext2_clear_bit(nr, addr) test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) +#define ext2_clear_bit_atomic(lock, nr, addr) test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) -#define ext2_set_bit_atomic(lock, nr, addr) \ - ({ \ - int ret; \ - spin_lock(lock); \ - ret = ext2_set_bit((nr), (addr)); \ - spin_unlock(lock); \ - ret; \ - }) - -#define ext2_clear_bit_atomic(lock, nr, addr) \ - ({ \ - int ret; \ - spin_lock(lock); \ - ret = ext2_clear_bit((nr), (addr)); \ - spin_unlock(lock); \ - ret; \ - }) - -static inline int ext2_test_bit(int nr, const volatile void *vaddr) +static inline int ext2_test_bit(int nr, const void *vaddr) { - return ((1U << (nr & 7)) & (((const volatile unsigned char *) vaddr)[nr >> 3])) != 0; + const unsigned char *p = vaddr; + return (p[nr >> 3] & (1U << (nr & 7))) != 0; } static inline int ext2_find_first_zero_bit(const void *vaddr, unsigned size) diff --git a/include/asm-m68k/fcntl.h b/include/asm-m68k/fcntl.h index c0b273f68f05..0d4212983a33 100644 --- a/include/asm-m68k/fcntl.h +++ b/include/asm-m68k/fcntl.h @@ -20,6 +20,7 @@ #define O_NOFOLLOW 0100000 /* don't follow links */ #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ #define O_LARGEFILE 0400000 +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/asm-m68k/io.h b/include/asm-m68k/io.h index aa6fffff2084..d32a489f4800 100644 --- a/include/asm-m68k/io.h +++ b/include/asm-m68k/io.h @@ -120,7 +120,7 @@ extern int isa_sex; * be compiled in so the case statement will be optimised away */ -static inline u8 *isa_itb(long addr) +static inline u8 *isa_itb(unsigned long addr) { switch(ISA_TYPE) { @@ -136,7 +136,7 @@ static inline u8 *isa_itb(long addr) default: return 0; /* avoid warnings, just in case */ } } -static inline u16 *isa_itw(long addr) +static inline u16 *isa_itw(unsigned long addr) { switch(ISA_TYPE) { @@ -152,7 +152,7 @@ static inline u16 *isa_itw(long addr) default: return 0; /* avoid warnings, just in case */ } } -static inline u8 *isa_mtb(long addr) +static inline u8 *isa_mtb(unsigned long addr) { switch(ISA_TYPE) { @@ -168,7 +168,7 @@ static inline u8 *isa_mtb(long addr) default: return 0; /* avoid warnings, just in case */ } } -static inline u16 *isa_mtw(long addr) +static inline u16 *isa_mtw(unsigned long addr) { switch(ISA_TYPE) { @@ -191,10 +191,14 @@ static inline u16 *isa_mtw(long addr) #define isa_outb(val,port) out_8(isa_itb(port),(val)) #define isa_outw(val,port) (ISA_SEX ? out_be16(isa_itw(port),(val)) : out_le16(isa_itw(port),(val))) -#define isa_readb(p) in_8(isa_mtb(p)) -#define isa_readw(p) (ISA_SEX ? in_be16(isa_mtw(p)) : in_le16(isa_mtw(p))) -#define isa_writeb(val,p) out_8(isa_mtb(p),(val)) -#define isa_writew(val,p) (ISA_SEX ? out_be16(isa_mtw(p),(val)) : out_le16(isa_mtw(p),(val))) +#define isa_readb(p) in_8(isa_mtb((unsigned long)(p))) +#define isa_readw(p) \ + (ISA_SEX ? in_be16(isa_mtw((unsigned long)(p))) \ + : in_le16(isa_mtw((unsigned long)(p)))) +#define isa_writeb(val,p) out_8(isa_mtb((unsigned long)(p)),(val)) +#define isa_writew(val,p) \ + (ISA_SEX ? out_be16(isa_mtw((unsigned long)(p)),(val)) \ + : out_le16(isa_mtw((unsigned long)(p)),(val))) static inline void isa_delay(void) { @@ -215,17 +219,21 @@ static inline void isa_delay(void) #define isa_inb_p(p) ({u8 v=isa_inb(p);isa_delay();v;}) #define isa_outb_p(v,p) ({isa_outb((v),(p));isa_delay();}) +#define isa_inw_p(p) ({u16 v=isa_inw(p);isa_delay();v;}) +#define isa_outw_p(v,p) ({isa_outw((v),(p));isa_delay();}) +#define isa_inl_p(p) ({u32 v=isa_inl(p);isa_delay();v;}) +#define isa_outl_p(v,p) ({isa_outl((v),(p));isa_delay();}) -#define isa_insb(port, buf, nr) raw_insb(isa_itb(port), (buf), (nr)) -#define isa_outsb(port, buf, nr) raw_outsb(isa_itb(port), (buf), (nr)) +#define isa_insb(port, buf, nr) raw_insb(isa_itb(port), (u8 *)(buf), (nr)) +#define isa_outsb(port, buf, nr) raw_outsb(isa_itb(port), (u8 *)(buf), (nr)) #define isa_insw(port, buf, nr) \ - (ISA_SEX ? raw_insw(isa_itw(port), (buf), (nr)) : \ - raw_insw_swapw(isa_itw(port), (buf), (nr))) + (ISA_SEX ? raw_insw(isa_itw(port), (u16 *)(buf), (nr)) : \ + raw_insw_swapw(isa_itw(port), (u16 *)(buf), (nr))) #define isa_outsw(port, buf, nr) \ - (ISA_SEX ? raw_outsw(isa_itw(port), (buf), (nr)) : \ - raw_outsw_swapw(isa_itw(port), (buf), (nr))) + (ISA_SEX ? raw_outsw(isa_itw(port), (u16 *)(buf), (nr)) : \ + raw_outsw_swapw(isa_itw(port), (u16 *)(buf), (nr))) #endif /* CONFIG_ISA */ @@ -235,9 +243,13 @@ static inline void isa_delay(void) #define outb isa_outb #define outb_p isa_outb_p #define inw isa_inw +#define inw_p isa_inw_p #define outw isa_outw +#define outw_p isa_outw_p #define inl isa_inw +#define inl_p isa_inw_p #define outl isa_outw +#define outl_p isa_outw_p #define insb isa_insb #define insw isa_insw #define outsb isa_outsb @@ -281,10 +293,16 @@ static inline void isa_delay(void) #define inb(port) ((port)<1024 ? isa_inb(port) : in_8(port)) #define inb_p(port) ((port)<1024 ? isa_inb_p(port) : in_8(port)) #define inw(port) ((port)<1024 ? isa_inw(port) : in_le16(port)) +#define inw_p(port) ((port)<1024 ? isa_inw_p(port) : in_le16(port)) +#define inl(port) ((port)<1024 ? isa_inl(port) : in_le32(port)) +#define inl_p(port) ((port)<1024 ? isa_inl_p(port) : in_le32(port)) #define outb(val,port) ((port)<1024 ? isa_outb((val),(port)) : out_8((port),(val))) #define outb_p(val,port) ((port)<1024 ? isa_outb_p((val),(port)) : out_8((port),(val))) #define outw(val,port) ((port)<1024 ? isa_outw((val),(port)) : out_le16((port),(val))) +#define outw_p(val,port) ((port)<1024 ? isa_outw_p((val),(port)) : out_le16((port),(val))) +#define outl(val,port) ((port)<1024 ? isa_outl((val),(port)) : out_le32((port),(val))) +#define outl_p(val,port) ((port)<1024 ? isa_outl_p((val),(port)) : out_le32((port),(val))) #endif #endif /* CONFIG_PCI */ diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h index 6b7d6a040b49..99a516709210 100644 --- a/include/asm-m68k/page.h +++ b/include/asm-m68k/page.h @@ -52,15 +52,13 @@ static inline void copy_page(void *to, void *from) static inline void clear_page(void *page) { - unsigned long data, tmp; - void *sp = page; + unsigned long tmp; + unsigned long *sp = page; - data = 0; - - *((unsigned long *)(page))++ = 0; - *((unsigned long *)(page))++ = 0; - *((unsigned long *)(page))++ = 0; - *((unsigned long *)(page))++ = 0; + *sp++ = 0; + *sp++ = 0; + *sp++ = 0; + *sp++ = 0; __asm__ __volatile__("1:\t" ".chip 68040\n\t" @@ -69,8 +67,8 @@ static inline void clear_page(void *page) "subqw #8,%2\n\t" "subqw #8,%2\n\t" "dbra %1,1b\n\t" - : "=a" (page), "=d" (tmp) - : "a" (sp), "0" (page), + : "=a" (sp), "=d" (tmp) + : "a" (page), "0" (sp), "1" ((PAGE_SIZE - 16) / 16 - 1)); } diff --git a/include/asm-m68k/string.h b/include/asm-m68k/string.h index 7ea5dc8e78db..44def078132a 100644 --- a/include/asm-m68k/string.h +++ b/include/asm-m68k/string.h @@ -290,9 +290,7 @@ static inline void * __memset_g(void * s, int c, size_t count) static inline void * __memset_page(void * s,int c,size_t count) { unsigned long data, tmp; - void *xs, *sp; - - xs = sp = s; + void *xs = s; c = c & 255; data = c | (c << 8); @@ -303,10 +301,11 @@ static inline void * __memset_page(void * s,int c,size_t count) if (((unsigned long) s) & 0x0f) __memset_g(s, c, count); else{ - *((unsigned long *)(s))++ = data; - *((unsigned long *)(s))++ = data; - *((unsigned long *)(s))++ = data; - *((unsigned long *)(s))++ = data; + unsigned long *sp = s; + *sp++ = data; + *sp++ = data; + *sp++ = data; + *sp++ = data; __asm__ __volatile__("1:\t" ".chip 68040\n\t" @@ -315,8 +314,8 @@ static inline void * __memset_page(void * s,int c,size_t count) "subqw #8,%2\n\t" "subqw #8,%2\n\t" "dbra %1,1b\n\t" - : "=a" (s), "=d" (tmp) - : "a" (sp), "0" (s), "1" ((count - 16) / 16 - 1) + : "=a" (sp), "=d" (tmp) + : "a" (s), "0" (sp), "1" ((count - 16) / 16 - 1) ); } diff --git a/include/asm-m68k/ucontext.h b/include/asm-m68k/ucontext.h index fb6d732ad7b2..e4e22669edc0 100644 --- a/include/asm-m68k/ucontext.h +++ b/include/asm-m68k/ucontext.h @@ -6,10 +6,8 @@ typedef int greg_t; typedef greg_t gregset_t[NGREG]; typedef struct fpregset { - int f_pcr; - int f_psr; - int f_fpiaddr; - int f_fpregs[8][3]; + int f_fpcntl[3]; + int f_fpregs[8*3]; } fpregset_t; struct mcontext { diff --git a/include/asm-mips/fcntl.h b/include/asm-mips/fcntl.h index e2b9c0a2537b..2436392e7990 100644 --- a/include/asm-mips/fcntl.h +++ b/include/asm-mips/fcntl.h @@ -26,6 +26,7 @@ #define O_DIRECT 0x8000 /* direct disk access hint */ #define O_DIRECTORY 0x10000 /* must be a directory */ #define O_NOFOLLOW 0x20000 /* don't follow links */ +#define O_NOATIME 0x40000 #define O_NDELAY O_NONBLOCK diff --git a/include/asm-parisc/fcntl.h b/include/asm-parisc/fcntl.h index 01fe48b0ba9d..def35230716a 100644 --- a/include/asm-parisc/fcntl.h +++ b/include/asm-parisc/fcntl.h @@ -19,6 +19,7 @@ #define O_NOCTTY 00400000 /* not fcntl */ #define O_DSYNC 01000000 /* HPUX only */ #define O_RSYNC 02000000 /* HPUX only */ +#define O_NOATIME 04000000 #define FASYNC 00020000 /* fcntl, for BSD compatibility */ #define O_DIRECT 00040000 /* direct disk access hint - currently ignored */ diff --git a/include/asm-ppc/fcntl.h b/include/asm-ppc/fcntl.h index 27ae7d2f6af2..5e28e41fb29f 100644 --- a/include/asm-ppc/fcntl.h +++ b/include/asm-ppc/fcntl.h @@ -20,6 +20,7 @@ #define O_NOFOLLOW 0100000 /* don't follow links */ #define O_LARGEFILE 0200000 #define O_DIRECT 0400000 /* direct disk access hint */ +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/asm-ppc64/eeh.h b/include/asm-ppc64/eeh.h index 928dc5e39df5..3ca700cb04bc 100644 --- a/include/asm-ppc64/eeh.h +++ b/include/asm-ppc64/eeh.h @@ -55,6 +55,7 @@ void __init pci_addr_cache_build(void); * device (including config space i/o). Call eeh_add_device_late * to finish the eeh setup for this device. */ +struct device_node; void eeh_add_device_early(struct device_node *); void eeh_add_device_late(struct pci_dev *); diff --git a/include/asm-ppc64/fcntl.h b/include/asm-ppc64/fcntl.h index 1ef83570b4e4..842560d50656 100644 --- a/include/asm-ppc64/fcntl.h +++ b/include/asm-ppc64/fcntl.h @@ -27,6 +27,7 @@ #define O_NOFOLLOW 0100000 /* don't follow links */ #define O_LARGEFILE 0200000 #define O_DIRECT 0400000 /* direct disk access hint */ +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/asm-ppc64/system.h b/include/asm-ppc64/system.h index 8d8a6f89c740..67ac484a14cd 100644 --- a/include/asm-ppc64/system.h +++ b/include/asm-ppc64/system.h @@ -112,13 +112,21 @@ extern int _get_PVR(void); extern void giveup_fpu(struct task_struct *); extern void disable_kernel_fp(void); extern void flush_fp_to_thread(struct task_struct *); -extern void flush_altivec_to_thread(struct task_struct *); extern void enable_kernel_fp(void); extern void giveup_altivec(struct task_struct *); extern void disable_kernel_altivec(void); extern void enable_kernel_altivec(void); extern void cvt_fd(float *from, double *to, unsigned long *fpscr); extern void cvt_df(double *from, float *to, unsigned long *fpscr); + +#ifdef CONFIG_ALTIVEC +extern void flush_altivec_to_thread(struct task_struct *); +#else +static inline void flush_altivec_to_thread(struct task_struct *t) +{ +} +#endif + extern int abs(int); extern struct task_struct *__switch_to(struct task_struct *, diff --git a/include/asm-s390/fcntl.h b/include/asm-s390/fcntl.h index 307c01b45213..48f692b45732 100644 --- a/include/asm-s390/fcntl.h +++ b/include/asm-s390/fcntl.h @@ -27,6 +27,7 @@ #define O_LARGEFILE 0100000 #define O_DIRECTORY 0200000 /* must be a directory */ #define O_NOFOLLOW 0400000 /* don't follow links */ +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/asm-sh/fcntl.h b/include/asm-sh/fcntl.h index 21e39b7cc05a..0b3ae524e34c 100644 --- a/include/asm-sh/fcntl.h +++ b/include/asm-sh/fcntl.h @@ -20,6 +20,7 @@ #define O_LARGEFILE 0100000 #define O_DIRECTORY 0200000 /* must be a directory */ #define O_NOFOLLOW 0400000 /* don't follow links */ +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/asm-sparc/fcntl.h b/include/asm-sparc/fcntl.h index aa64cfc1df2e..df9c75d41d68 100644 --- a/include/asm-sparc/fcntl.h +++ b/include/asm-sparc/fcntl.h @@ -21,6 +21,7 @@ #define O_NOFOLLOW 0x20000 /* don't follow links */ #define O_LARGEFILE 0x40000 #define O_DIRECT 0x100000 /* direct disk access hint */ +#define O_NOATIME 0x200000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h index 0999d6d525c1..e36def0d0d80 100644 --- a/include/asm-sparc64/fcntl.h +++ b/include/asm-sparc64/fcntl.h @@ -21,6 +21,7 @@ #define O_NOFOLLOW 0x20000 /* don't follow links */ #define O_LARGEFILE 0x40000 #define O_DIRECT 0x100000 /* direct disk access hint */ +#define O_NOATIME 0x200000 #define F_DUPFD 0 /* dup */ diff --git a/include/asm-v850/fcntl.h b/include/asm-v850/fcntl.h index 42e358ff0752..31d4b5961221 100644 --- a/include/asm-v850/fcntl.h +++ b/include/asm-v850/fcntl.h @@ -20,6 +20,7 @@ #define O_NOFOLLOW 0100000 /* don't follow links */ #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ #define O_LARGEFILE 0400000 +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/asm-x86_64/fcntl.h b/include/asm-x86_64/fcntl.h index aabf1a30a3b9..4411f221c037 100644 --- a/include/asm-x86_64/fcntl.h +++ b/include/asm-x86_64/fcntl.h @@ -20,6 +20,7 @@ #define O_LARGEFILE 0100000 #define O_DIRECTORY 0200000 /* must be a directory */ #define O_NOFOLLOW 0400000 /* don't follow links */ +#define O_NOATIME 01000000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ diff --git a/include/linux/affs_fs.h b/include/linux/affs_fs.h index c849309b1131..5ba9d6205dc0 100644 --- a/include/linux/affs_fs.h +++ b/include/linux/affs_fs.h @@ -36,7 +36,8 @@ extern u32 affs_count_free_bits(u32 blocksize, const void *data); extern u32 affs_count_free_blocks(struct super_block *s); extern void affs_free_block(struct super_block *sb, u32 block); extern u32 affs_alloc_block(struct inode *inode, u32 goal); -extern int affs_init_bitmap(struct super_block *sb); +extern int affs_init_bitmap(struct super_block *sb, int *flags); +extern void affs_free_bitmap(struct super_block *sb); /* namei.c */ diff --git a/include/linux/affs_fs_sb.h b/include/linux/affs_fs_sb.h index d2f86715cf1c..d722befe1ced 100644 --- a/include/linux/affs_fs_sb.h +++ b/include/linux/affs_fs_sb.h @@ -47,7 +47,6 @@ struct affs_sb_info { #define SF_OFS 0x0200 /* Old filesystem */ #define SF_PREFIX 0x0400 /* Buffer for prefix is allocated */ #define SF_VERBOSE 0x0800 /* Talk about fs when mounting */ -#define SF_READONLY 0x1000 /* Don't allow to remount rw */ /* short cut to get to the affs specific sb data */ static inline struct affs_sb_info *AFFS_SB(struct super_block *sb) diff --git a/include/linux/bio.h b/include/linux/bio.h index c4dd287dd1c8..601531cf4976 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -25,6 +25,15 @@ /* Platforms may set this to teach the BIO layer about IOMMU hardware. */ #include <asm/io.h> + +#if defined(BIO_VMERGE_MAX_SIZE) && defined(BIO_VMERGE_BOUNDARY) +#define BIOVEC_VIRT_START_SIZE(x) (bvec_to_phys(x) & (BIO_VMERGE_BOUNDARY - 1)) +#define BIOVEC_VIRT_OVERSIZE(x) ((x) > BIO_VMERGE_MAX_SIZE) +#else +#define BIOVEC_VIRT_START_SIZE(x) 0 +#define BIOVEC_VIRT_OVERSIZE(x) 0 +#endif + #ifndef BIO_VMERGE_BOUNDARY #define BIO_VMERGE_BOUNDARY 0 #endif @@ -81,6 +90,15 @@ struct bio { unsigned short bi_hw_segments; unsigned int bi_size; /* residual I/O count */ + + /* + * To keep track of the max hw size, we account for the + * sizes of the first and last virtually mergeable segments + * in this bio + */ + unsigned int bi_hw_front_size; + unsigned int bi_hw_back_size; + unsigned int bi_max_vecs; /* max bvl_vecs we can hold */ struct bio_vec *bi_io_vec; /* the actual vec list */ diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 6902724691d2..e038f9a3d0ef 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h @@ -67,4 +67,12 @@ extern void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0) #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ +extern void *__init alloc_large_system_hash(const char *tablename, + unsigned long bucketsize, + unsigned long numentries, + int scale, + int consider_highmem, + unsigned int *_hash_shift, + unsigned int *_hash_mask); + #endif /* _LINUX_BOOTMEM_H */ diff --git a/include/linux/dmi.h b/include/linux/dmi.h new file mode 100644 index 000000000000..d2bcf556088b --- /dev/null +++ b/include/linux/dmi.h @@ -0,0 +1,47 @@ +#ifndef __DMI_H__ +#define __DMI_H__ + +enum dmi_field { + DMI_NONE, + DMI_BIOS_VENDOR, + DMI_BIOS_VERSION, + DMI_BIOS_DATE, + DMI_SYS_VENDOR, + DMI_PRODUCT_NAME, + DMI_PRODUCT_VERSION, + DMI_BOARD_VENDOR, + DMI_BOARD_NAME, + DMI_BOARD_VERSION, + DMI_STRING_MAX, +}; + +/* + * DMI callbacks for problem boards + */ +struct dmi_strmatch { + u8 slot; + char *substr; +}; + +struct dmi_system_id { + int (*callback)(struct dmi_system_id *); + char *ident; + struct dmi_strmatch matches[4]; + void *driver_data; +}; + +#define DMI_MATCH(a,b) { a, b } + +#if defined(CONFIG_X86) && !defined(CONFIG_X86_64) + +extern int dmi_check_system(struct dmi_system_id *list); +extern char * dmi_get_system_info(int field); + +#else + +static inline int dmi_check_system(struct dmi_system_id *list) { return 0; } +static inline char * dmi_get_system_info(int field) { return NULL; } + +#endif + +#endif /* __DMI_H__ */ diff --git a/include/linux/ds1286.h b/include/linux/ds1286.h new file mode 100644 index 000000000000..d8989860e4ce --- /dev/null +++ b/include/linux/ds1286.h @@ -0,0 +1,54 @@ +/* + * Copyright (C) 1998, 1999, 2003 Ralf Baechle + * + * 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 __LINUX_DS1286_H +#define __LINUX_DS1286_H + +#include <asm/ds1286.h> + +/********************************************************************** + * register summary + **********************************************************************/ +#define RTC_HUNDREDTH_SECOND 0 +#define RTC_SECONDS 1 +#define RTC_MINUTES 2 +#define RTC_MINUTES_ALARM 3 +#define RTC_HOURS 4 +#define RTC_HOURS_ALARM 5 +#define RTC_DAY 6 +#define RTC_DAY_ALARM 7 +#define RTC_DATE 8 +#define RTC_MONTH 9 +#define RTC_YEAR 10 +#define RTC_CMD 11 +#define RTC_WHSEC 12 +#define RTC_WSEC 13 +#define RTC_UNUSED 14 + +/* RTC_*_alarm is always true if 2 MSBs are set */ +# define RTC_ALARM_DONT_CARE 0xC0 + + +/* + * Bits in the month register + */ +#define RTC_EOSC 0x80 +#define RTC_ESQW 0x40 + +/* + * Bits in the Command register + */ +#define RTC_TDF 0x01 +#define RTC_WAF 0x02 +#define RTC_TDM 0x04 +#define RTC_WAM 0x08 +#define RTC_PU_LVL 0x10 +#define RTC_IBH_LO 0x20 +#define RTC_IPSW 0x40 +#define RTC_TE 0x80 + +#endif /* __LINUX_DS1286_H */ diff --git a/include/linux/errqueue.h b/include/linux/errqueue.h index 0d87e62ec9e7..174582fedb8b 100644 --- a/include/linux/errqueue.h +++ b/include/linux/errqueue.h @@ -22,6 +22,10 @@ struct sock_extended_err #ifdef __KERNEL__ #include <linux/config.h> +#include <net/ip.h> +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) +#include <linux/ipv6.h> +#endif #define SKB_EXT_ERR(skb) ((struct sock_exterr_skb *) ((skb)->cb)) diff --git a/include/linux/fs.h b/include/linux/fs.h index 10a69a544045..88337ed4f4f2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -214,15 +214,17 @@ extern int leases_enable, dir_notify_enable, lease_break_time; #include <linux/list.h> #include <linux/radix-tree.h> #include <linux/audit.h> +#include <linux/init.h> #include <asm/semaphore.h> #include <asm/byteorder.h> /* Used to be a macro which just called the function, now just a function */ extern void update_atime (struct inode *); -extern void inode_init(unsigned long); -extern void mnt_init(unsigned long); -extern void files_init(unsigned long); +extern void __init inode_init(unsigned long); +extern void __init inode_init_early(void); +extern void __init mnt_init(unsigned long); +extern void __init files_init(unsigned long); struct buffer_head; typedef int (get_block_t)(struct inode *inode, sector_t iblock, @@ -977,7 +979,8 @@ static inline void touch_atime(struct vfsmount *mnt, struct dentry *dentry) static inline void file_accessed(struct file *file) { - touch_atime(file->f_vfsmnt, file->f_dentry); + if (!(file->f_flags & O_NOATIME)) + touch_atime(file->f_vfsmnt, file->f_dentry); } int sync_inode(struct inode *inode, struct writeback_control *wbc); @@ -1199,7 +1202,8 @@ extern int filp_close(struct file *, fl_owner_t id); extern char * getname(const char __user *); /* fs/dcache.c */ -extern void vfs_caches_init(unsigned long); +extern void __init vfs_caches_init_early(void); +extern void __init vfs_caches_init(unsigned long); #define __getname() kmem_cache_alloc(names_cachep, SLAB_KERNEL) #define __putname(name) kmem_cache_free(names_cachep, (void *)(name)) diff --git a/include/linux/idr.h b/include/linux/idr.h index 8e2618e3f334..f41128683d65 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h @@ -1,5 +1,5 @@ /* - * include/linux/id.h + * include/linux/idr.h * * 2002-10-18 written by Jim Houston jim.houston@ccur.com * Copyright (C) 2002 by Concurrent Computer Corporation diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 67da15c2e1e3..9eb023020b44 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -92,6 +92,15 @@ asmlinkage int printk(const char * fmt, ...) unsigned long int_sqrt(unsigned long); +static inline int __attribute_pure__ long_log2(unsigned long x) +{ + int r = 0; + for (x >>= 1; x > 0; x >>= 1) + r++; + return r; +} + + extern int printk_ratelimit(void); extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index f1e1a727acb2..373a13ba6f3f 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -20,6 +20,18 @@ #define MAX_ORDER CONFIG_FORCE_MAX_ZONEORDER #endif +/* + * system hash table size limits + * - on large memory machines, we may want to allocate a bigger hash than that + * permitted by MAX_ORDER, so we allocate with the bootmem allocator, and are + * limited to this size + */ +#if MAX_ORDER > 14 +#define MAX_SYS_HASH_TABLE_ORDER MAX_ORDER +#else +#define MAX_SYS_HASH_TABLE_ORDER 14 +#endif + struct free_area { struct list_head free_list; unsigned long *map; diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a55f97a34035..97758cd8f50e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -405,6 +405,7 @@ struct net_device #define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */ #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ #define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */ +#define NETIF_F_LLTX 4096 /* LockLess TX */ /* Called after device is detached from network. */ void (*uninit)(struct net_device *dev); diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index b20c79258825..83f9668653ca 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h @@ -10,6 +10,7 @@ #include <linux/wait.h> #include <linux/list.h> #endif +#include <linux/compiler.h> /* Responses from hook functions. */ #define NF_DROP 0 diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index 78c4f7142267..d6a7188b525c 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h @@ -16,7 +16,7 @@ #include <linux/if_arp.h> #include <linux/skbuff.h> #endif - +#include <linux/compiler.h> #include <linux/netfilter_arp.h> #define ARPT_FUNCTION_MAXNAMELEN 30 diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index f43f1dddebc4..dccc68052c88 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h @@ -22,6 +22,7 @@ #include <linux/ip.h> #include <linux/skbuff.h> #endif +#include <linux/compiler.h> #include <linux/netfilter_ipv4.h> #define IPT_FUNCTION_MAXNAMELEN 30 @@ -336,8 +337,8 @@ ipt_get_target(struct ipt_entry *e) /* * Main firewall chains definitions and global var's definitions. */ -static DECLARE_MUTEX(ipt_mutex); #ifdef __KERNEL__ +static DECLARE_MUTEX(ipt_mutex); #include <linux/init.h> extern void ipt_init(void) __init; diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index a0995271934a..f9983d16cc1c 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h @@ -22,6 +22,7 @@ #include <linux/ipv6.h> #include <linux/skbuff.h> #endif +#include <linux/compiler.h> #include <linux/netfilter_ipv6.h> #define IP6T_FUNCTION_MAXNAMELEN 30 @@ -106,7 +107,9 @@ struct ip6t_counters u_int64_t pcnt, bcnt; /* Packet and byte counters */ }; +#ifdef __KERNEL__ static DECLARE_MUTEX(ip6t_mutex); +#endif /* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */ #define IP6T_F_PROTO 0x01 /* Set if rule cares about upper diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index c0af91ff4b1e..1b33d607f276 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -27,6 +27,7 @@ #include <linux/highmem.h> #include <linux/poll.h> #include <linux/net.h> +#include <net/checksum.h> #define HAVE_ALLOC_SKB /* For the drivers to know */ #define HAVE_ALIGNABLE_SKB /* Ditto 8) */ @@ -995,6 +996,39 @@ static inline struct sk_buff *skb_padto(struct sk_buff *skb, unsigned int len) return skb_pad(skb, len-size); } +static inline int skb_add_data(struct sk_buff *skb, + char __user *from, int copy) +{ + const int off = skb->len; + + if (skb->ip_summed == CHECKSUM_NONE) { + int err = 0; + unsigned int csum = csum_and_copy_from_user(from, + skb_put(skb, copy), + copy, 0, &err); + if (!err) { + skb->csum = csum_block_add(skb->csum, csum, off); + return 0; + } + } else if (!copy_from_user(skb_put(skb, copy), from, copy)) + return 0; + + __skb_trim(skb, off); + return -EFAULT; +} + +static inline int skb_can_coalesce(struct sk_buff *skb, int i, + struct page *page, int off) +{ + if (i) { + struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[i - 1]; + + return page == frag->page && + off == frag->page_offset + frag->size; + } + return 0; +} + /** * skb_linearize - convert paged skb to linear one * @skb: buffer to linarize @@ -1058,6 +1092,8 @@ extern unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, u8 *to, int len, unsigned int csum); extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); +extern void skb_split(struct sk_buff *skb, + struct sk_buff *skb1, const u32 len); extern void skb_init(void); extern void skb_add_mtu(int mtu); diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index a4ab8e826bbe..ab8727d92739 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -207,6 +207,9 @@ struct v4l2_pix_format #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ +/* see http://www.siliconimaging.com/RGB%20Bayer.htm */ +#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ + /* compressed formats */ #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G') /* JFIF JPEG */ @@ -383,8 +386,8 @@ struct v4l2_buffer unsigned long userptr; } m; __u32 length; - - __u32 reserved[2]; + __u32 input; + __u32 reserved; }; /* Flags for 'flags' field */ @@ -395,6 +398,7 @@ struct v4l2_buffer #define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ #define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ #define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ +#define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ /* * O V E R L A Y P R E V I E W @@ -526,12 +530,13 @@ typedef __u64 v4l2_std_id; V4L2_STD_PAL_I) #define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\ V4L2_STD_NTSC_M_JP) +#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\ + V4L2_STD_SECAM_K |\ + V4L2_STD_SECAM_K1) #define V4L2_STD_SECAM (V4L2_STD_SECAM_B |\ - V4L2_STD_SECAM_D |\ V4L2_STD_SECAM_G |\ V4L2_STD_SECAM_H |\ - V4L2_STD_SECAM_K |\ - V4L2_STD_SECAM_K1 |\ + V4L2_STD_SECAM_DK |\ V4L2_STD_SECAM_L) #define V4L2_STD_525_60 (V4L2_STD_PAL_M |\ @@ -541,6 +546,8 @@ typedef __u64 v4l2_std_id; V4L2_STD_PAL_N |\ V4L2_STD_PAL_Nc |\ V4L2_STD_SECAM) +#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ + V4L2_STD_ATSC_16_VSB) #define V4L2_STD_UNKNOWN 0 #define V4L2_STD_ALL (V4L2_STD_525_60 |\ diff --git a/include/linux/wait.h b/include/linux/wait.h index 52edb1786b14..4a9f996bb6cc 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -200,7 +200,36 @@ do { \ __wait_event_interruptible_timeout(wq, condition, __ret); \ __ret; \ }) - + +#define __wait_event_interruptible_exclusive(wq, condition, ret) \ +do { \ + wait_queue_t __wait; \ + init_waitqueue_entry(&__wait, current); \ + \ + add_wait_queue_exclusive(&wq, &__wait); \ + for (;;) { \ + set_current_state(TASK_INTERRUPTIBLE); \ + if (condition) \ + break; \ + if (!signal_pending(current)) { \ + schedule(); \ + continue; \ + } \ + ret = -ERESTARTSYS; \ + break; \ + } \ + current->state = TASK_RUNNING; \ + remove_wait_queue(&wq, &__wait); \ +} while (0) + +#define wait_event_interruptible_exclusive(wq, condition) \ +({ \ + int __ret = 0; \ + if (!(condition)) \ + __wait_event_interruptible_exclusive(wq, condition, __ret);\ + __ret; \ +}) + /* * Must be called with the spinlock in the wait_queue_head_t held. */ diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 42206f88ff25..569f74839529 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h @@ -27,7 +27,7 @@ #define IR_TYPE_OTHER 99 #define IR_KEYTAB_TYPE u32 -#define IR_KEYTAB_SIZE 64 // enougth for rc5, probably need more some day ... +#define IR_KEYTAB_SIZE 128 // enougth for rc5, probably need more some day ... #define IR_KEYCODE(tab,code) (((unsigned)code < IR_KEYTAB_SIZE) \ ? tab[code] : KEY_RESERVED) diff --git a/include/media/ovcamchip.h b/include/media/ovcamchip.h new file mode 100644 index 000000000000..cb7c0aa96f22 --- /dev/null +++ b/include/media/ovcamchip.h @@ -0,0 +1,104 @@ +/* OmniVision* camera chip driver API + * + * Copyright (c) 1999-2004 Mark McClelland + * + * 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. NO WARRANTY OF ANY KIND is expressed or implied. + * + * * OmniVision is a trademark of OmniVision Technologies, Inc. This driver + * is not sponsored or developed by them. + */ + +#ifndef __LINUX_OVCAMCHIP_H +#define __LINUX_OVCAMCHIP_H + +#include <linux/videodev.h> +#include <linux/i2c.h> + +/* Remove these once they are officially defined */ +#ifndef I2C_DRIVERID_OVCAMCHIP + #define I2C_DRIVERID_OVCAMCHIP 0xf00f +#endif +#ifndef I2C_HW_SMBUS_OV511 + #define I2C_HW_SMBUS_OV511 0xfe +#endif +#ifndef I2C_HW_SMBUS_OV518 + #define I2C_HW_SMBUS_OV518 0xff +#endif +#ifndef I2C_HW_SMBUS_OVFX2 + #define I2C_HW_SMBUS_OVFX2 0xfd +#endif + +/* --------------------------------- */ +/* ENUMERATIONS */ +/* --------------------------------- */ + +/* Controls */ +enum { + OVCAMCHIP_CID_CONT, /* Contrast */ + OVCAMCHIP_CID_BRIGHT, /* Brightness */ + OVCAMCHIP_CID_SAT, /* Saturation */ + OVCAMCHIP_CID_HUE, /* Hue */ + OVCAMCHIP_CID_EXP, /* Exposure */ + OVCAMCHIP_CID_FREQ, /* Light frequency */ + OVCAMCHIP_CID_BANDFILT, /* Banding filter */ + OVCAMCHIP_CID_AUTOBRIGHT, /* Auto brightness */ + OVCAMCHIP_CID_AUTOEXP, /* Auto exposure */ + OVCAMCHIP_CID_BACKLIGHT, /* Back light compensation */ + OVCAMCHIP_CID_MIRROR, /* Mirror horizontally */ +}; + +/* Chip types */ +#define NUM_CC_TYPES 9 +enum { + CC_UNKNOWN, + CC_OV76BE, + CC_OV7610, + CC_OV7620, + CC_OV7620AE, + CC_OV6620, + CC_OV6630, + CC_OV6630AE, + CC_OV6630AF, +}; + +/* --------------------------------- */ +/* I2C ADDRESSES */ +/* --------------------------------- */ + +#define OV7xx0_SID (0x42 >> 1) +#define OV6xx0_SID (0xC0 >> 1) + +/* --------------------------------- */ +/* API */ +/* --------------------------------- */ + +struct ovcamchip_control { + __u32 id; + __s32 value; +}; + +struct ovcamchip_window { + int x; + int y; + int width; + int height; + int format; + int quarter; /* Scale width and height down 2x */ + + /* This stuff will be removed eventually */ + int clockdiv; /* Clock divisor setting */ +}; + +/* Commands */ +#define OVCAMCHIP_CMD_Q_SUBTYPE _IOR (0x88, 0x00, int) +#define OVCAMCHIP_CMD_INITIALIZE _IOW (0x88, 0x01, int) +/* You must call OVCAMCHIP_CMD_INITIALIZE before any of commands below! */ +#define OVCAMCHIP_CMD_S_CTRL _IOW (0x88, 0x02, struct ovcamchip_control) +#define OVCAMCHIP_CMD_G_CTRL _IOWR (0x88, 0x03, struct ovcamchip_control) +#define OVCAMCHIP_CMD_S_MODE _IOW (0x88, 0x04, struct ovcamchip_window) +#define OVCAMCHIP_MAX_CMD _IO (0x88, 0x3f) + +#endif diff --git a/include/media/video-buf.h b/include/media/video-buf.h index 41e9e58c434e..17b2ae290f13 100644 --- a/include/media/video-buf.h +++ b/include/media/video-buf.h @@ -18,6 +18,8 @@ #include <linux/videodev.h> +#define UNSET (-1U) + /* --------------------------------------------------------------------- */ /* @@ -34,8 +36,6 @@ struct scatterlist* videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages); */ struct scatterlist* videobuf_pages_to_sg(struct page **pages, int nr_pages, int offset); -int videobuf_lock(struct page **pages, int nr_pages); -int videobuf_unlock(struct page **pages, int nr_pages); /* --------------------------------------------------------------------- */ @@ -59,6 +59,8 @@ int videobuf_unlock(struct page **pages, int nr_pages); */ struct videobuf_dmabuf { + u32 magic; + /* for userland buffer */ int offset; struct page **pages; @@ -76,6 +78,7 @@ struct videobuf_dmabuf { int direction; }; +void videobuf_dma_init(struct videobuf_dmabuf *dma); int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction, unsigned long data, unsigned long size); int videobuf_dma_init_kernel(struct videobuf_dmabuf *dma, int direction, @@ -134,12 +137,14 @@ enum videobuf_state { struct videobuf_buffer { unsigned int i; + u32 magic; /* info about the buffer */ unsigned int width; unsigned int height; unsigned int bytesperline; /* use only if != 0 */ unsigned long size; + unsigned int input; enum v4l2_field field; enum videobuf_state state; struct videobuf_dmabuf dma; @@ -174,9 +179,10 @@ struct videobuf_queue { struct pci_dev *pci; enum v4l2_buf_type type; + unsigned int inputs; /* for V4L2_BUF_FLAG_INPUT */ unsigned int msize; enum v4l2_field field; - enum v4l2_field last; /* for field=V4L2_FIELD_ALTERNATE */ + enum v4l2_field last; /* for field=V4L2_FIELD_ALTERNATE */ struct videobuf_buffer *bufs[VIDEO_MAX_FRAME]; struct videobuf_queue_ops *ops; diff --git a/include/net/checksum.h b/include/net/checksum.h index cd3c52a594e4..43f40235114e 100644 --- a/include/net/checksum.h +++ b/include/net/checksum.h @@ -16,83 +16,15 @@ * 2 of the License, or (at your option) any later version. */ -/* - * Fixes: - * - * Ralf Baechle : generic ipv6 checksum - * <ralf@waldorf-gmbh.de> - */ - #ifndef _CHECKSUM_H #define _CHECKSUM_H +#include <linux/errno.h> #include <asm/types.h> #include <asm/byteorder.h> -#include <net/ip.h> -#include <linux/in6.h> #include <asm/uaccess.h> #include <asm/checksum.h> -#ifndef _HAVE_ARCH_IPV6_CSUM - -static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, - struct in6_addr *daddr, - __u16 len, - unsigned short proto, - unsigned int csum) -{ - - int carry; - __u32 ulen; - __u32 uproto; - - csum += saddr->s6_addr32[0]; - carry = (csum < saddr->s6_addr32[0]); - csum += carry; - - csum += saddr->s6_addr32[1]; - carry = (csum < saddr->s6_addr32[1]); - csum += carry; - - csum += saddr->s6_addr32[2]; - carry = (csum < saddr->s6_addr32[2]); - csum += carry; - - csum += saddr->s6_addr32[3]; - carry = (csum < saddr->s6_addr32[3]); - csum += carry; - - csum += daddr->s6_addr32[0]; - carry = (csum < daddr->s6_addr32[0]); - csum += carry; - - csum += daddr->s6_addr32[1]; - carry = (csum < daddr->s6_addr32[1]); - csum += carry; - - csum += daddr->s6_addr32[2]; - carry = (csum < daddr->s6_addr32[2]); - csum += carry; - - csum += daddr->s6_addr32[3]; - carry = (csum < daddr->s6_addr32[3]); - csum += carry; - - ulen = htonl((__u32) len); - csum += ulen; - carry = (csum < ulen); - csum += carry; - - uproto = htonl(proto); - csum += uproto; - carry = (csum < uproto); - csum += carry; - - return csum_fold(csum); -} - -#endif - #ifndef _HAVE_ARCH_COPY_AND_CSUM_FROM_USER static inline unsigned int csum_and_copy_from_user (const char __user *src, char *dst, diff --git a/include/net/ip.h b/include/net/ip.h index 5a683ccd4cb0..d36a3b230819 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -37,7 +37,7 @@ #include <net/snmp.h> #endif -#include <net/sock.h> /* struct sock */ +struct sock; struct inet_skb_parm { diff --git a/include/net/ip6_checksum.h b/include/net/ip6_checksum.h new file mode 100644 index 000000000000..3dfc885bdf25 --- /dev/null +++ b/include/net/ip6_checksum.h @@ -0,0 +1,94 @@ +/* + * INET An implementation of the TCP/IP protocol suite for the LINUX + * operating system. INET is implemented using the BSD Socket + * interface as the means of communication with the user level. + * + * Checksumming functions for IPv6 + * + * Authors: Jorge Cwik, <jorge@laser.satlink.net> + * Arnt Gulbrandsen, <agulbra@nvg.unit.no> + * Borrows very liberally from tcp.c and ip.c, see those + * files for more names. + * + * 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. + */ + +/* + * Fixes: + * + * Ralf Baechle : generic ipv6 checksum + * <ralf@waldorf-gmbh.de> + */ + +#ifndef _CHECKSUM_IPV6_H +#define _CHECKSUM_IPV6_H + +#include <asm/types.h> +#include <asm/byteorder.h> +#include <net/ip.h> +#include <asm/checksum.h> +#include <linux/in6.h> + +#ifndef _HAVE_ARCH_IPV6_CSUM + +static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, + struct in6_addr *daddr, + __u16 len, + unsigned short proto, + unsigned int csum) +{ + + int carry; + __u32 ulen; + __u32 uproto; + + csum += saddr->s6_addr32[0]; + carry = (csum < saddr->s6_addr32[0]); + csum += carry; + + csum += saddr->s6_addr32[1]; + carry = (csum < saddr->s6_addr32[1]); + csum += carry; + + csum += saddr->s6_addr32[2]; + carry = (csum < saddr->s6_addr32[2]); + csum += carry; + + csum += saddr->s6_addr32[3]; + carry = (csum < saddr->s6_addr32[3]); + csum += carry; + + csum += daddr->s6_addr32[0]; + carry = (csum < daddr->s6_addr32[0]); + csum += carry; + + csum += daddr->s6_addr32[1]; + carry = (csum < daddr->s6_addr32[1]); + csum += carry; + + csum += daddr->s6_addr32[2]; + carry = (csum < daddr->s6_addr32[2]); + csum += carry; + + csum += daddr->s6_addr32[3]; + carry = (csum < daddr->s6_addr32[3]); + csum += carry; + + ulen = htonl((__u32) len); + csum += ulen; + carry = (csum < ulen); + csum += carry; + + uproto = htonl(proto); + csum += uproto; + carry = (csum < uproto); + csum += carry; + + return csum_fold(csum); +} + +#endif +#endif diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 80661d855fd8..d8960a01df42 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -11,6 +11,7 @@ #include <linux/netdevice.h> #include <linux/types.h> #include <linux/pkt_sched.h> +#include <linux/rcupdate.h> #include <net/pkt_cls.h> #ifdef CONFIG_X86_TSC @@ -92,6 +93,7 @@ struct Qdisc struct net_device *dev; struct tc_stats stats; + struct rcu_head q_rcu; int (*reshape_fail)(struct sk_buff *skb, struct Qdisc *q); /* This field is deprecated, but it is still used by CBQ diff --git a/include/net/sock.h b/include/net/sock.h index 38b90c8ab25f..0ee6ccddca40 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -53,6 +53,7 @@ #include <asm/atomic.h> #include <net/dst.h> +#include <net/checksum.h> /* * This structure really needs to be cleaned up. @@ -428,6 +429,11 @@ static inline int sk_stream_wspace(struct sock *sk) extern void sk_stream_write_space(struct sock *sk); +static inline int sk_stream_memory_free(struct sock *sk) +{ + return sk->sk_wmem_queued < sk->sk_sndbuf; +} + /* The per-socket spinlock must be held here. */ #define sk_add_backlog(__sk, __skb) \ do { if (!(__sk)->sk_backlog.tail) { \ @@ -923,6 +929,29 @@ static inline void sk_charge_skb(struct sock *sk, struct sk_buff *skb) sk->sk_forward_alloc -= skb->truesize; } +static inline int skb_copy_to_page(struct sock *sk, char __user *from, + struct sk_buff *skb, struct page *page, + int off, int copy) +{ + if (skb->ip_summed == CHECKSUM_NONE) { + int err = 0; + unsigned int csum = csum_and_copy_from_user(from, + page_address(page) + off, + copy, 0, &err); + if (err) + return err; + skb->csum = csum_block_add(skb->csum, csum, skb->len); + } else if (copy_from_user(page_address(page) + off, from, copy)) + return -EFAULT; + + skb->len += copy; + skb->data_len += copy; + skb->truesize += copy; + sk->sk_wmem_queued += copy; + sk->sk_forward_alloc -= copy; + return 0; +} + /* * Queue a received datagram if it will fit. Stream and sequenced * protocols can't normally use this as they need to fit buffers in diff --git a/include/net/tcp.h b/include/net/tcp.h index 52f27edef69e..3a323cd1e79f 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -33,6 +33,7 @@ #include <net/checksum.h> #include <net/sock.h> #include <net/snmp.h> +#include <net/ip.h> #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) #include <linux/ipv6.h> #endif diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 64704968507f..c36a3aed38c2 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -497,10 +497,6 @@ xfrm_selector_match(struct xfrm_selector *sel, struct flowi *fl, return 0; } -/* placeholder until xfrm6_tunnel.c is written */ -static inline int xfrm6_tunnel_check_size(struct sk_buff *skb) -{ return 0; } - /* A struct encoding bundle of transformations to apply to some set of flow. * * dst->child points to the next element of bundle. @@ -783,6 +779,12 @@ struct xfrm_tunnel { void (*err_handler)(struct sk_buff *skb, void *info); }; +struct xfrm6_tunnel { + int (*handler)(struct sk_buff **pskb, unsigned int *nhoffp); + void (*err_handler)(struct sk_buff *skb, struct inet6_skb_parm *opt, + int type, int code, int offset, __u32 info); +}; + extern void xfrm_init(void); extern void xfrm4_init(void); extern void xfrm4_fini(void); @@ -793,6 +795,8 @@ extern void xfrm4_state_init(void); extern void xfrm4_state_fini(void); extern void xfrm6_state_init(void); extern void xfrm6_state_fini(void); +extern void xfrm6_tunnel_init(void); +extern void xfrm6_tunnel_fini(void); extern int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*), void *); extern struct xfrm_state *xfrm_state_alloc(void); @@ -812,12 +816,18 @@ extern void xfrm_state_flush(u8 proto); extern int xfrm_replay_check(struct xfrm_state *x, u32 seq); extern void xfrm_replay_advance(struct xfrm_state *x, u32 seq); extern int xfrm_check_selectors(struct xfrm_state **x, int n, struct flowi *fl); -extern int xfrm_check_output(struct xfrm_state *x, struct sk_buff *skb, unsigned short family); +extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb); extern int xfrm4_rcv(struct sk_buff *skb); extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); extern int xfrm4_tunnel_check_size(struct sk_buff *skb); extern int xfrm6_rcv(struct sk_buff **pskb, unsigned int *nhoffp); +extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler); +extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler); +extern int xfrm6_tunnel_check_size(struct sk_buff *skb); +extern u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr); +extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr); +extern u32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr); #ifdef CONFIG_XFRM extern int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type); |
