aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-04-12 16:54:43 -0400
committerJeff Garzik <jeff@garzik.org>2006-04-12 16:54:43 -0400
commita890b15c0990cc8d686edcc85f5fccde71ad5ce9 (patch)
tree73162355b58283a2531f13fbbf663809f95c1483 /include
parent79fa1b677be3a985cc66b9218a4dd09818f1051b (diff)
parent26ec634c31a11a003040e10b4d650495158632fd (diff)
Merge branch 'upstream'
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/numnodes.h7
-rw-r--r--include/asm-arm/arch-cl7500/hardware.h4
-rw-r--r--include/asm-arm/arch-cl7500/memory.h6
-rw-r--r--include/asm-arm/arch-ebsa110/debug-macro.S2
-rw-r--r--include/asm-arm/arch-ebsa110/hardware.h3
-rw-r--r--include/asm-arm/arch-ebsa110/memory.h6
-rw-r--r--include/asm-arm/arch-ebsa110/uncompress.h2
-rw-r--r--include/asm-arm/arch-ebsa285/hardware.h7
-rw-r--r--include/asm-arm/arch-ebsa285/memory.h12
-rw-r--r--include/asm-arm/arch-ixp23xx/debug-macro.S3
-rw-r--r--include/asm-arm/arch-l7200/hardware.h3
-rw-r--r--include/asm-arm/arch-l7200/memory.h6
-rw-r--r--include/asm-arm/arch-lh7a40x/memory.h2
-rw-r--r--include/asm-arm/arch-rpc/hardware.h3
-rw-r--r--include/asm-arm/arch-rpc/memory.h6
-rw-r--r--include/asm-arm/arch-s3c2410/leds-gpio.h28
-rw-r--r--include/asm-arm/arch-sa1100/hardware.h4
-rw-r--r--include/asm-arm/arch-sa1100/memory.h7
-rw-r--r--include/asm-arm/arch-shark/hardware.h6
-rw-r--r--include/asm-arm/arch-shark/memory.h6
-rw-r--r--include/asm-arm/fpstate.h2
-rw-r--r--include/asm-arm/memory.h8
-rw-r--r--include/asm-arm/numnodes.h26
-rw-r--r--include/asm-arm/vfpmacros.h8
-rw-r--r--include/asm-cris/system.h1
-rw-r--r--include/asm-cris/unistd.h2
-rw-r--r--include/asm-frv/system.h2
-rw-r--r--include/asm-frv/unistd.h2
-rw-r--r--include/asm-h8300/system.h2
-rw-r--r--include/asm-h8300/unistd.h2
-rw-r--r--include/asm-i386/apic.h2
-rw-r--r--include/asm-i386/e820.h4
-rw-r--r--include/asm-i386/hpet.h1
-rw-r--r--include/asm-i386/mpspec.h1
-rw-r--r--include/asm-i386/numnodes.h18
-rw-r--r--include/asm-i386/unistd.h6
-rw-r--r--include/asm-ia64/acpi-ext.h11
-rw-r--r--include/asm-ia64/kdebug.h2
-rw-r--r--include/asm-ia64/mca.h5
-rw-r--r--include/asm-ia64/mutex.h2
-rw-r--r--include/asm-ia64/numnodes.h20
-rw-r--r--include/asm-ia64/unistd.h5
-rw-r--r--include/asm-ia64/vga.h2
-rw-r--r--include/asm-m32r/numnodes.h15
-rw-r--r--include/asm-m32r/smp.h3
-rw-r--r--include/asm-m32r/system.h4
-rw-r--r--include/asm-m32r/uaccess.h266
-rw-r--r--include/asm-m32r/unistd.h2
-rw-r--r--include/asm-mips/numnodes.h7
-rw-r--r--include/asm-parisc/numnodes.h7
-rw-r--r--include/asm-powerpc/numnodes.h9
-rw-r--r--include/asm-s390/atomic.h2
-rw-r--r--include/asm-s390/ebcdic.h12
-rw-r--r--include/asm-sh/numnodes.h7
-rw-r--r--include/asm-sh/unistd.h2
-rw-r--r--include/asm-sh64/unistd.h2
-rw-r--r--include/asm-sparc/vga.h33
-rw-r--r--include/asm-sparc64/percpu.h2
-rw-r--r--include/asm-um/ptrace-i386.h3
-rw-r--r--include/asm-v850/system.h2
-rw-r--r--include/asm-x86_64/e820.h3
-rw-r--r--include/asm-x86_64/hpet.h2
-rw-r--r--include/asm-x86_64/ia32_unistd.h2
-rw-r--r--include/asm-x86_64/io.h2
-rw-r--r--include/asm-x86_64/mce.h7
-rw-r--r--include/asm-x86_64/numa.h3
-rw-r--r--include/asm-x86_64/numnodes.h12
-rw-r--r--include/asm-x86_64/timex.h2
-rw-r--r--include/asm-xtensa/system.h2
-rw-r--r--include/linux/bootmem.h1
-rw-r--r--include/linux/dma-mapping.h2
-rw-r--r--include/linux/fs.h19
-rw-r--r--include/linux/gfp.h2
-rw-r--r--include/linux/init.h3
-rw-r--r--include/linux/jiffies.h6
-rw-r--r--include/linux/kernel.h2
-rw-r--r--include/linux/leds.h51
-rw-r--r--include/linux/libata.h21
-rw-r--r--include/linux/memory_hotplug.h14
-rw-r--r--include/linux/mm.h5
-rw-r--r--include/linux/netfilter.h42
-rw-r--r--include/linux/netfilter_ipv4.h2
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_h323.h52
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h98
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h938
-rw-r--r--include/linux/netfilter_ipv6.h3
-rw-r--r--include/linux/numa.h8
-rw-r--r--include/linux/page-flags.h24
-rw-r--r--include/linux/pipe_fs_i.h18
-rw-r--r--include/linux/proc_fs.h2
-rw-r--r--include/linux/raid/md_p.h2
-rw-r--r--include/linux/sched.h11
-rw-r--r--include/linux/screen_info.h3
-rw-r--r--include/linux/seqlock.h4
-rw-r--r--include/linux/string.h17
-rw-r--r--include/linux/sunrpc/svc.h9
-rw-r--r--include/linux/swap.h1
-rw-r--r--include/linux/syscalls.h9
-rw-r--r--include/linux/tty_flip.h25
-rw-r--r--include/linux/vermagic.h7
-rw-r--r--include/net/inet6_hashtables.h70
-rw-r--r--include/net/ip.h1
-rw-r--r--include/net/x25device.h1
-rw-r--r--include/scsi/scsi_host.h1
-rw-r--r--include/scsi/scsi_transport.h5
105 files changed, 1599 insertions, 550 deletions
diff --git a/include/asm-alpha/numnodes.h b/include/asm-alpha/numnodes.h
deleted file mode 100644
index cd425827e4f3..000000000000
--- a/include/asm-alpha/numnodes.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _ASM_MAX_NUMNODES_H
2#define _ASM_MAX_NUMNODES_H
3
4/* Max 128 Nodes - Marvel */
5#define NODES_SHIFT 7
6
7#endif /* _ASM_MAX_NUMNODES_H */
diff --git a/include/asm-arm/arch-cl7500/hardware.h b/include/asm-arm/arch-cl7500/hardware.h
index 2339b764f69f..1adfd18e6154 100644
--- a/include/asm-arm/arch-cl7500/hardware.h
+++ b/include/asm-arm/arch-cl7500/hardware.h
@@ -53,16 +53,12 @@
53#define SCREEN_END 0xdfc00000 53#define SCREEN_END 0xdfc00000
54#define SCREEN_BASE 0xdf800000 54#define SCREEN_BASE 0xdf800000
55 55
56#define FLUSH_BASE 0xdf000000
57
58#define VIDC_BASE (void __iomem *)0xe0400000 56#define VIDC_BASE (void __iomem *)0xe0400000
59#define IOMD_BASE IOMEM(0xe0200000) 57#define IOMD_BASE IOMEM(0xe0200000)
60#define IOC_BASE IOMEM(0xe0200000) 58#define IOC_BASE IOMEM(0xe0200000)
61#define FLOPPYDMA_BASE IOMEM(0xe002a000) 59#define FLOPPYDMA_BASE IOMEM(0xe002a000)
62#define PCIO_BASE IOMEM(0xe0010000) 60#define PCIO_BASE IOMEM(0xe0010000)
63 61
64#define FLUSH_BASE_PHYS 0x00000000 /* ROM */
65
66#define vidc_writel(val) __raw_writel(val, VIDC_BASE) 62#define vidc_writel(val) __raw_writel(val, VIDC_BASE)
67 63
68/* in/out bias for the ISA slot region */ 64/* in/out bias for the ISA slot region */
diff --git a/include/asm-arm/arch-cl7500/memory.h b/include/asm-arm/arch-cl7500/memory.h
index 34f40a6cec30..3178140e24ca 100644
--- a/include/asm-arm/arch-cl7500/memory.h
+++ b/include/asm-arm/arch-cl7500/memory.h
@@ -26,4 +26,10 @@
26#define __virt_to_bus(x) __virt_to_phys(x) 26#define __virt_to_bus(x) __virt_to_phys(x)
27#define __bus_to_virt(x) __phys_to_virt(x) 27#define __bus_to_virt(x) __phys_to_virt(x)
28 28
29/*
30 * Cache flushing area - ROM
31 */
32#define FLUSH_BASE_PHYS 0x00000000
33#define FLUSH_BASE 0xdf000000
34
29#endif 35#endif
diff --git a/include/asm-arm/arch-ebsa110/debug-macro.S b/include/asm-arm/arch-ebsa110/debug-macro.S
index f61cadabe0ec..9213bfe4831d 100644
--- a/include/asm-arm/arch-ebsa110/debug-macro.S
+++ b/include/asm-arm/arch-ebsa110/debug-macro.S
@@ -18,4 +18,4 @@
18 18
19#define UART_SHIFT 2 19#define UART_SHIFT 2
20#define FLOW_CONTROL 20#define FLOW_CONTROL
21#include <asm/hardware/debug-8250.h> 21#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-ebsa110/hardware.h b/include/asm-arm/arch-ebsa110/hardware.h
index 4e41c2358f4e..3ce864def41e 100644
--- a/include/asm-arm/arch-ebsa110/hardware.h
+++ b/include/asm-arm/arch-ebsa110/hardware.h
@@ -57,9 +57,6 @@
57/* 57/*
58 * RAM definitions 58 * RAM definitions
59 */ 59 */
60#define FLUSH_BASE_PHYS 0x40000000
61#define FLUSH_BASE 0xdf000000
62
63#define UNCACHEABLE_ADDR 0xff000000 /* IRQ_STAT */ 60#define UNCACHEABLE_ADDR 0xff000000 /* IRQ_STAT */
64 61
65#endif 62#endif
diff --git a/include/asm-arm/arch-ebsa110/memory.h b/include/asm-arm/arch-ebsa110/memory.h
index 02f144520c10..c7c500e176d0 100644
--- a/include/asm-arm/arch-ebsa110/memory.h
+++ b/include/asm-arm/arch-ebsa110/memory.h
@@ -28,4 +28,10 @@
28#define __virt_to_bus(x) (x) 28#define __virt_to_bus(x) (x)
29#define __bus_to_virt(x) (x) 29#define __bus_to_virt(x) (x)
30 30
31/*
32 * Cache flushing area - SRAM
33 */
34#define FLUSH_BASE_PHYS 0x40000000
35#define FLUSH_BASE 0xdf000000
36
31#endif 37#endif
diff --git a/include/asm-arm/arch-ebsa110/uncompress.h b/include/asm-arm/arch-ebsa110/uncompress.h
index 66b19c7fd908..ae5b775eb0b7 100644
--- a/include/asm-arm/arch-ebsa110/uncompress.h
+++ b/include/asm-arm/arch-ebsa110/uncompress.h
@@ -10,7 +10,7 @@
10 10
11#include <linux/serial_reg.h> 11#include <linux/serial_reg.h>
12 12
13#define SERIAL_BASE ((unsigned char *)0xfe000be0) 13#define SERIAL_BASE ((unsigned char *)0xf0000be0)
14 14
15/* 15/*
16 * This does not append a newline 16 * This does not append a newline
diff --git a/include/asm-arm/arch-ebsa285/hardware.h b/include/asm-arm/arch-ebsa285/hardware.h
index 2ef2200f108c..ec51fe92483b 100644
--- a/include/asm-arm/arch-ebsa285/hardware.h
+++ b/include/asm-arm/arch-ebsa285/hardware.h
@@ -48,9 +48,6 @@
48#define PCICFG0_SIZE 0x01000000 48#define PCICFG0_SIZE 0x01000000
49#define PCICFG0_BASE 0xfa000000 49#define PCICFG0_BASE 0xfa000000
50 50
51#define FLUSH_SIZE 0x00100000
52#define FLUSH_BASE 0xf9000000
53
54#define PCIMEM_SIZE 0x01000000 51#define PCIMEM_SIZE 0x01000000
55#define PCIMEM_BASE 0xf0000000 52#define PCIMEM_BASE 0xf0000000
56 53
@@ -61,9 +58,6 @@
61#define PCIMEM_SIZE 0x80000000 58#define PCIMEM_SIZE 0x80000000
62#define PCIMEM_BASE 0x80000000 59#define PCIMEM_BASE 0x80000000
63 60
64#define FLUSH_SIZE 0x00100000
65#define FLUSH_BASE 0x7e000000
66
67#define WFLUSH_SIZE 0x01000000 61#define WFLUSH_SIZE 0x01000000
68#define WFLUSH_BASE 0x7d000000 62#define WFLUSH_BASE 0x7d000000
69 63
@@ -94,7 +88,6 @@
94#define XBUS_SWITCH_J17_11 ((*XBUS_SWITCH) & (1 << 5)) 88#define XBUS_SWITCH_J17_11 ((*XBUS_SWITCH) & (1 << 5))
95#define XBUS_SWITCH_J17_9 ((*XBUS_SWITCH) & (1 << 6)) 89#define XBUS_SWITCH_J17_9 ((*XBUS_SWITCH) & (1 << 6))
96 90
97#define FLUSH_BASE_PHYS 0x50000000
98#define UNCACHEABLE_ADDR (ARMCSR_BASE + 0x108) 91#define UNCACHEABLE_ADDR (ARMCSR_BASE + 0x108)
99 92
100 93
diff --git a/include/asm-arm/arch-ebsa285/memory.h b/include/asm-arm/arch-ebsa285/memory.h
index 09e335cd687d..99181ffc7e27 100644
--- a/include/asm-arm/arch-ebsa285/memory.h
+++ b/include/asm-arm/arch-ebsa285/memory.h
@@ -49,12 +49,22 @@ extern unsigned long __bus_to_virt(unsigned long);
49#define TASK_SIZE UL(0xbf000000) 49#define TASK_SIZE UL(0xbf000000)
50#define PAGE_OFFSET UL(0xc0000000) 50#define PAGE_OFFSET UL(0xc0000000)
51 51
52/*
53 * Cache flushing area.
54 */
55#define FLUSH_BASE 0xf9000000
56
52#elif defined(CONFIG_ARCH_CO285) 57#elif defined(CONFIG_ARCH_CO285)
53 58
54/* Task size and page offset at 1.5GB */ 59/* Task size and page offset at 1.5GB */
55#define TASK_SIZE UL(0x5f000000) 60#define TASK_SIZE UL(0x5f000000)
56#define PAGE_OFFSET UL(0x60000000) 61#define PAGE_OFFSET UL(0x60000000)
57 62
63/*
64 * Cache flushing area.
65 */
66#define FLUSH_BASE 0x7e000000
67
58#else 68#else
59 69
60#error "Undefined footbridge architecture" 70#error "Undefined footbridge architecture"
@@ -72,4 +82,6 @@ extern unsigned long __bus_to_virt(unsigned long);
72 */ 82 */
73#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3) 83#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
74 84
85#define FLUSH_BASE_PHYS 0x50000000
86
75#endif 87#endif
diff --git a/include/asm-arm/arch-ixp23xx/debug-macro.S b/include/asm-arm/arch-ixp23xx/debug-macro.S
index eb99fd69fd24..2b25e640247d 100644
--- a/include/asm-arm/arch-ixp23xx/debug-macro.S
+++ b/include/asm-arm/arch-ixp23xx/debug-macro.S
@@ -17,6 +17,9 @@
17 tst \rx, #1 @ mmu enabled? 17 tst \rx, #1 @ mmu enabled?
18 ldreq \rx, =IXP23XX_PERIPHERAL_PHYS @ physical 18 ldreq \rx, =IXP23XX_PERIPHERAL_PHYS @ physical
19 ldrne \rx, =IXP23XX_PERIPHERAL_VIRT @ virtual 19 ldrne \rx, =IXP23XX_PERIPHERAL_VIRT @ virtual
20#ifdef __ARMEB__
21 orr \rx, \rx, #0x00000003
22#endif
20 .endm 23 .endm
21 24
22#define UART_SHIFT 2 25#define UART_SHIFT 2
diff --git a/include/asm-arm/arch-l7200/hardware.h b/include/asm-arm/arch-l7200/hardware.h
index b755079befab..2ab43f3a4a8d 100644
--- a/include/asm-arm/arch-l7200/hardware.h
+++ b/include/asm-arm/arch-l7200/hardware.h
@@ -52,9 +52,6 @@
52#define ISA_SIZE 0x20000000 52#define ISA_SIZE 0x20000000
53#define ISA_BASE 0xe0000000 53#define ISA_BASE 0xe0000000
54 54
55#define FLUSH_BASE_PHYS 0x40000000 /* ROM */
56#define FLUSH_BASE 0xdf000000
57
58#define PCIO_BASE IO_BASE 55#define PCIO_BASE IO_BASE
59 56
60#endif 57#endif
diff --git a/include/asm-arm/arch-l7200/memory.h b/include/asm-arm/arch-l7200/memory.h
index 9e50a171f78a..402df637e740 100644
--- a/include/asm-arm/arch-l7200/memory.h
+++ b/include/asm-arm/arch-l7200/memory.h
@@ -20,4 +20,10 @@
20#define __virt_to_bus(x) __virt_to_phys(x) 20#define __virt_to_bus(x) __virt_to_phys(x)
21#define __bus_to_virt(x) __phys_to_virt(x) 21#define __bus_to_virt(x) __phys_to_virt(x)
22 22
23/*
24 * Cache flushing area - ROM
25 */
26#define FLUSH_BASE_PHYS 0x40000000
27#define FLUSH_BASE 0xdf000000
28
23#endif 29#endif
diff --git a/include/asm-arm/arch-lh7a40x/memory.h b/include/asm-arm/arch-lh7a40x/memory.h
index c92bcb837629..9f1a58cbf407 100644
--- a/include/asm-arm/arch-lh7a40x/memory.h
+++ b/include/asm-arm/arch-lh7a40x/memory.h
@@ -31,8 +31,6 @@
31 31
32#ifdef CONFIG_DISCONTIGMEM 32#ifdef CONFIG_DISCONTIGMEM
33 33
34#define NODES_SHIFT 4 /* Up to 16 nodes */
35
36/* 34/*
37 * Given a kernel address, find the home node of the underlying memory. 35 * Given a kernel address, find the home node of the underlying memory.
38 */ 36 */
diff --git a/include/asm-arm/arch-rpc/hardware.h b/include/asm-arm/arch-rpc/hardware.h
index 9d7f87375aa7..7480f4e8d974 100644
--- a/include/asm-arm/arch-rpc/hardware.h
+++ b/include/asm-arm/arch-rpc/hardware.h
@@ -46,7 +46,6 @@
46#define SCREEN_END 0xdfc00000 46#define SCREEN_END 0xdfc00000
47#define SCREEN_BASE 0xdf800000 47#define SCREEN_BASE 0xdf800000
48 48
49#define FLUSH_BASE 0xdf000000
50#define UNCACHEABLE_ADDR 0xdf010000 49#define UNCACHEABLE_ADDR 0xdf010000
51 50
52/* 51/*
@@ -59,8 +58,6 @@
59#define PCIO_BASE IOMEM(0xe0010000) 58#define PCIO_BASE IOMEM(0xe0010000)
60#define FLOPPYDMA_BASE IOMEM(0xe002a000) 59#define FLOPPYDMA_BASE IOMEM(0xe002a000)
61 60
62#define FLUSH_BASE_PHYS 0x00000000 /* ROM */
63
64#define vidc_writel(val) __raw_writel(val, VIDC_BASE) 61#define vidc_writel(val) __raw_writel(val, VIDC_BASE)
65 62
66#define IO_EC_EASI_BASE 0x81400000 63#define IO_EC_EASI_BASE 0x81400000
diff --git a/include/asm-arm/arch-rpc/memory.h b/include/asm-arm/arch-rpc/memory.h
index 0592cb3f0c74..303c424ce673 100644
--- a/include/asm-arm/arch-rpc/memory.h
+++ b/include/asm-arm/arch-rpc/memory.h
@@ -30,4 +30,10 @@
30#define __virt_to_bus(x) __virt_to_phys(x) 30#define __virt_to_bus(x) __virt_to_phys(x)
31#define __bus_to_virt(x) __phys_to_virt(x) 31#define __bus_to_virt(x) __phys_to_virt(x)
32 32
33/*
34 * Cache flushing area - ROM
35 */
36#define FLUSH_BASE_PHYS 0x00000000
37#define FLUSH_BASE 0xdf000000
38
33#endif 39#endif
diff --git a/include/asm-arm/arch-s3c2410/leds-gpio.h b/include/asm-arm/arch-s3c2410/leds-gpio.h
new file mode 100644
index 000000000000..f07ed040622b
--- /dev/null
+++ b/include/asm-arm/arch-s3c2410/leds-gpio.h
@@ -0,0 +1,28 @@
1/* linux/include/asm-arm/arch-s3c2410/leds-gpio.h
2 *
3 * (c) 2006 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C24XX - LEDs GPIO connector
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_LEDSGPIO_H
15#define __ASM_ARCH_LEDSGPIO_H "leds-gpio.h"
16
17#define S3C24XX_LEDF_ACTLOW (1<<0) /* LED is on when GPIO low */
18#define S3C24XX_LEDF_TRISTATE (1<<1) /* tristate to turn off */
19
20struct s3c24xx_led_platdata {
21 unsigned int gpio;
22 unsigned int flags;
23
24 char *name;
25 char *def_trigger;
26};
27
28#endif /* __ASM_ARCH_LEDSGPIO_H */
diff --git a/include/asm-arm/arch-sa1100/hardware.h b/include/asm-arm/arch-sa1100/hardware.h
index 28711aaa4968..ee008a5484f3 100644
--- a/include/asm-arm/arch-sa1100/hardware.h
+++ b/include/asm-arm/arch-sa1100/hardware.h
@@ -14,10 +14,6 @@
14 14
15#include <linux/config.h> 15#include <linux/config.h>
16 16
17/* Flushing areas */
18#define FLUSH_BASE_PHYS 0xe0000000 /* SA1100 zero bank */
19#define FLUSH_BASE 0xf5000000
20#define FLUSH_BASE_MINICACHE 0xf5800000
21#define UNCACHEABLE_ADDR 0xfa050000 17#define UNCACHEABLE_ADDR 0xfa050000
22 18
23 19
diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h
index 018a9f0e3986..a29fac1387ca 100644
--- a/include/asm-arm/arch-sa1100/memory.h
+++ b/include/asm-arm/arch-sa1100/memory.h
@@ -91,4 +91,11 @@ void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes);
91 91
92#endif 92#endif
93 93
94/*
95 * Cache flushing area - SA1100 zero bank
96 */
97#define FLUSH_BASE_PHYS 0xe0000000
98#define FLUSH_BASE 0xf5000000
99#define FLUSH_BASE_MINICACHE 0xf5100000
100
94#endif 101#endif
diff --git a/include/asm-arm/arch-shark/hardware.h b/include/asm-arm/arch-shark/hardware.h
index 4d35f8c154c3..ecba45260898 100644
--- a/include/asm-arm/arch-shark/hardware.h
+++ b/include/asm-arm/arch-shark/hardware.h
@@ -17,11 +17,6 @@
17 */ 17 */
18#define IO_BASE 0xe0000000 18#define IO_BASE 0xe0000000
19 19
20/*
21 * RAM definitions
22 */
23#define FLUSH_BASE_PHYS 0x80000000
24
25#else 20#else
26 21
27#define IO_BASE 0 22#define IO_BASE 0
@@ -33,7 +28,6 @@
33#define ROMCARD_SIZE 0x08000000 28#define ROMCARD_SIZE 0x08000000
34#define ROMCARD_START 0x10000000 29#define ROMCARD_START 0x10000000
35 30
36#define FLUSH_BASE 0xdf000000
37#define PCIO_BASE 0xe0000000 31#define PCIO_BASE 0xe0000000
38 32
39 33
diff --git a/include/asm-arm/arch-shark/memory.h b/include/asm-arm/arch-shark/memory.h
index 95a29b4bc5d0..6968d6103ea0 100644
--- a/include/asm-arm/arch-shark/memory.h
+++ b/include/asm-arm/arch-shark/memory.h
@@ -39,4 +39,10 @@ static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsig
39#define __virt_to_bus(x) __virt_to_phys(x) 39#define __virt_to_bus(x) __virt_to_phys(x)
40#define __bus_to_virt(x) __phys_to_virt(x) 40#define __bus_to_virt(x) __phys_to_virt(x)
41 41
42/*
43 * Cache flushing area
44 */
45#define FLUSH_BASE_PHYS 0x80000000
46#define FLUSH_BASE 0xdf000000
47
42#endif 48#endif
diff --git a/include/asm-arm/fpstate.h b/include/asm-arm/fpstate.h
index 6246bf83627d..52bae088a185 100644
--- a/include/asm-arm/fpstate.h
+++ b/include/asm-arm/fpstate.h
@@ -26,7 +26,9 @@
26 26
27struct vfp_hard_struct { 27struct vfp_hard_struct {
28 __u64 fpregs[16]; 28 __u64 fpregs[16];
29#if __LINUX_ARM_ARCH__ < 6
29 __u32 fpmx_state; 30 __u32 fpmx_state;
31#endif
30 __u32 fpexc; 32 __u32 fpexc;
31 __u32 fpscr; 33 __u32 fpscr;
32 /* 34 /*
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h
index 2b3cf69b3ed9..209289407595 100644
--- a/include/asm-arm/memory.h
+++ b/include/asm-arm/memory.h
@@ -172,10 +172,10 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
172 * virt_addr_valid(k) indicates whether a virtual address is valid 172 * virt_addr_valid(k) indicates whether a virtual address is valid
173 */ 173 */
174#ifndef CONFIG_DISCONTIGMEM 174#ifndef CONFIG_DISCONTIGMEM
175#define ARCH_PFN_OFFSET (PHYS_PFN_OFFSET) 175#define ARCH_PFN_OFFSET PHYS_PFN_OFFSET
176#define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) 176#define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
177 177
178#define virt_to_page(kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)) 178#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
179#define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) 179#define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory)
180 180
181#define PHYS_TO_NID(addr) (0) 181#define PHYS_TO_NID(addr) (0)
@@ -187,8 +187,8 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
187 * around in memory. 187 * around in memory.
188 */ 188 */
189#include <linux/numa.h> 189#include <linux/numa.h>
190#define arch_pfn_to_nid(pfn) (PFN_TO_NID(pfn)) 190#define arch_pfn_to_nid(pfn) PFN_TO_NID(pfn)
191#define arch_local_page_offset(pfn, nid) (LOCAL_MAP_NR((pfn) << PAGE_OFFSET)) 191#define arch_local_page_offset(pfn, nid) LOCAL_MAP_NR((pfn) << PAGE_SHIFT)
192 192
193#define pfn_valid(pfn) \ 193#define pfn_valid(pfn) \
194 ({ \ 194 ({ \
diff --git a/include/asm-arm/numnodes.h b/include/asm-arm/numnodes.h
deleted file mode 100644
index 8df36818ebc9..000000000000
--- a/include/asm-arm/numnodes.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * linux/include/asm-arm/numnodes.h
3 *
4 * Copyright (C) 2002 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11/* This declaration for the size of the NUMA (CONFIG_DISCONTIGMEM)
12 * memory node table is the default.
13 *
14 * A good place to override this value is include/asm/arch/memory.h.
15 */
16
17#ifndef __ASM_ARM_NUMNODES_H
18#define __ASM_ARM_NUMNODES_H
19
20#include <asm/memory.h>
21
22#ifndef NODES_SHIFT
23# define NODES_SHIFT 2 /* Normally, Max 4 Nodes */
24#endif
25
26#endif
diff --git a/include/asm-arm/vfpmacros.h b/include/asm-arm/vfpmacros.h
index 15bd6e74c9cf..27fe028b4e72 100644
--- a/include/asm-arm/vfpmacros.h
+++ b/include/asm-arm/vfpmacros.h
@@ -16,10 +16,18 @@
16 16
17 @ read all the working registers back into the VFP 17 @ read all the working registers back into the VFP
18 .macro VFPFLDMIA, base 18 .macro VFPFLDMIA, base
19#if __LINUX_ARM_ARCH__ < 6
19 LDC p11, cr0, [\base],#33*4 @ FLDMIAX \base!, {d0-d15} 20 LDC p11, cr0, [\base],#33*4 @ FLDMIAX \base!, {d0-d15}
21#else
22 LDC p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d0-d15}
23#endif
20 .endm 24 .endm
21 25
22 @ write all the working registers out of the VFP 26 @ write all the working registers out of the VFP
23 .macro VFPFSTMIA, base 27 .macro VFPFSTMIA, base
28#if __LINUX_ARM_ARCH__ < 6
24 STC p11, cr0, [\base],#33*4 @ FSTMIAX \base!, {d0-d15} 29 STC p11, cr0, [\base],#33*4 @ FSTMIAX \base!, {d0-d15}
30#else
31 STC p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d0-d15}
32#endif
25 .endm 33 .endm
diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h
index 1d63c2aa8ec2..b1c593b6dbff 100644
--- a/include/asm-cris/system.h
+++ b/include/asm-cris/system.h
@@ -8,7 +8,6 @@
8 */ 8 */
9 9
10extern struct task_struct *resume(struct task_struct *prev, struct task_struct *next, int); 10extern struct task_struct *resume(struct task_struct *prev, struct task_struct *next, int);
11#define prepare_to_switch() do { } while(0)
12#define switch_to(prev,next,last) last = resume(prev,next, \ 11#define switch_to(prev,next,last) last = resume(prev,next, \
13 (int)&((struct task_struct *)0)->thread) 12 (int)&((struct task_struct *)0)->thread)
14 13
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h
index 2627bbdf8a11..bb2dfe480213 100644
--- a/include/asm-cris/unistd.h
+++ b/include/asm-cris/unistd.h
@@ -288,7 +288,7 @@
288#define __NR_mq_timedreceive (__NR_mq_open+3) 288#define __NR_mq_timedreceive (__NR_mq_open+3)
289#define __NR_mq_notify (__NR_mq_open+4) 289#define __NR_mq_notify (__NR_mq_open+4)
290#define __NR_mq_getsetattr (__NR_mq_open+5) 290#define __NR_mq_getsetattr (__NR_mq_open+5)
291#define __NR_sys_kexec_load 283 291#define __NR_kexec_load 283
292#define __NR_waitid 284 292#define __NR_waitid 284
293/* #define __NR_sys_setaltroot 285 */ 293/* #define __NR_sys_setaltroot 285 */
294#define __NR_add_key 286 294#define __NR_add_key 286
diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h
index f72ff0c4dc0b..1734ed91bcdc 100644
--- a/include/asm-frv/system.h
+++ b/include/asm-frv/system.h
@@ -18,8 +18,6 @@
18 18
19struct thread_struct; 19struct thread_struct;
20 20
21#define prepare_to_switch() do { } while(0)
22
23/* 21/*
24 * switch_to(prev, next) should switch from task `prev' to `next' 22 * switch_to(prev, next) should switch from task `prev' to `next'
25 * `prev' will never be the same as `next'. 23 * `prev' will never be the same as `next'.
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h
index 322531caa484..2662a3e12dc4 100644
--- a/include/asm-frv/unistd.h
+++ b/include/asm-frv/unistd.h
@@ -289,7 +289,7 @@
289#define __NR_mq_timedreceive (__NR_mq_open+3) 289#define __NR_mq_timedreceive (__NR_mq_open+3)
290#define __NR_mq_notify (__NR_mq_open+4) 290#define __NR_mq_notify (__NR_mq_open+4)
291#define __NR_mq_getsetattr (__NR_mq_open+5) 291#define __NR_mq_getsetattr (__NR_mq_open+5)
292#define __NR_sys_kexec_load 283 292#define __NR_kexec_load 283
293#define __NR_waitid 284 293#define __NR_waitid 284
294/* #define __NR_sys_setaltroot 285 */ 294/* #define __NR_sys_setaltroot 285 */
295#define __NR_add_key 286 295#define __NR_add_key 286
diff --git a/include/asm-h8300/system.h b/include/asm-h8300/system.h
index dfe96c7121cf..8e81cf665e75 100644
--- a/include/asm-h8300/system.h
+++ b/include/asm-h8300/system.h
@@ -4,8 +4,6 @@
4#include <linux/config.h> /* get configuration macros */ 4#include <linux/config.h> /* get configuration macros */
5#include <linux/linkage.h> 5#include <linux/linkage.h>
6 6
7#define prepare_to_switch() do { } while(0)
8
9/* 7/*
10 * switch_to(n) should switch tasks to task ptr, first checking that 8 * switch_to(n) should switch tasks to task ptr, first checking that
11 * ptr isn't the current task, in which case it does nothing. This 9 * ptr isn't the current task, in which case it does nothing. This
diff --git a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h
index 56a4a5686c88..adb05159379b 100644
--- a/include/asm-h8300/unistd.h
+++ b/include/asm-h8300/unistd.h
@@ -285,7 +285,7 @@
285#define __NR_mq_timedreceive (__NR_mq_open+3) 285#define __NR_mq_timedreceive (__NR_mq_open+3)
286#define __NR_mq_notify (__NR_mq_open+4) 286#define __NR_mq_notify (__NR_mq_open+4)
287#define __NR_mq_getsetattr (__NR_mq_open+5) 287#define __NR_mq_getsetattr (__NR_mq_open+5)
288#define __NR_sys_kexec_load 283 288#define __NR_kexec_load 283
289#define __NR_waitid 284 289#define __NR_waitid 284
290/* #define __NR_sys_setaltroot 285 */ 290/* #define __NR_sys_setaltroot 285 */
291#define __NR_add_key 286 291#define __NR_add_key 286
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h
index ff9ac8d19eb2..288233fd77d7 100644
--- a/include/asm-i386/apic.h
+++ b/include/asm-i386/apic.h
@@ -139,6 +139,8 @@ void switch_ipi_to_APIC_timer(void *cpumask);
139 139
140extern int timer_over_8254; 140extern int timer_over_8254;
141 141
142extern int modern_apic(void);
143
142#else /* !CONFIG_X86_LOCAL_APIC */ 144#else /* !CONFIG_X86_LOCAL_APIC */
143static inline void lapic_shutdown(void) { } 145static inline void lapic_shutdown(void) { }
144 146
diff --git a/include/asm-i386/e820.h b/include/asm-i386/e820.h
index edf65be21a92..ca82acb8cb1f 100644
--- a/include/asm-i386/e820.h
+++ b/include/asm-i386/e820.h
@@ -35,6 +35,10 @@ struct e820map {
35}; 35};
36 36
37extern struct e820map e820; 37extern struct e820map e820;
38
39extern int e820_all_mapped(unsigned long start, unsigned long end,
40 unsigned type);
41
38#endif/*!__ASSEMBLY__*/ 42#endif/*!__ASSEMBLY__*/
39 43
40#endif/*__E820_HEADER*/ 44#endif/*__E820_HEADER*/
diff --git a/include/asm-i386/hpet.h b/include/asm-i386/hpet.h
index 16ef9f996e3f..7f1a8a6ee32f 100644
--- a/include/asm-i386/hpet.h
+++ b/include/asm-i386/hpet.h
@@ -89,6 +89,7 @@
89 * then 32 bit HPET counter wrapsaround in less than 0.5 sec. 89 * then 32 bit HPET counter wrapsaround in less than 0.5 sec.
90 */ 90 */
91#define HPET_MIN_PERIOD (100000UL) 91#define HPET_MIN_PERIOD (100000UL)
92#define HPET_TICK_RATE (HZ * 100000UL)
92 93
93extern unsigned long hpet_tick; /* hpet clks count per tick */ 94extern unsigned long hpet_tick; /* hpet clks count per tick */
94extern unsigned long hpet_address; /* hpet memory map physical address */ 95extern unsigned long hpet_address; /* hpet memory map physical address */
diff --git a/include/asm-i386/mpspec.h b/include/asm-i386/mpspec.h
index 62113d3bfdc2..770bf6da8c3d 100644
--- a/include/asm-i386/mpspec.h
+++ b/include/asm-i386/mpspec.h
@@ -18,7 +18,6 @@ extern void find_smp_config (void);
18extern void get_smp_config (void); 18extern void get_smp_config (void);
19extern int nr_ioapics; 19extern int nr_ioapics;
20extern int apic_version [MAX_APICS]; 20extern int apic_version [MAX_APICS];
21extern int mp_bus_id_to_type [MAX_MP_BUSSES];
22extern int mp_irq_entries; 21extern int mp_irq_entries;
23extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES]; 22extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES];
24extern int mpc_default_type; 23extern int mpc_default_type;
diff --git a/include/asm-i386/numnodes.h b/include/asm-i386/numnodes.h
deleted file mode 100644
index a61f38c8176f..000000000000
--- a/include/asm-i386/numnodes.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#ifndef _ASM_MAX_NUMNODES_H
2#define _ASM_MAX_NUMNODES_H
3
4#include <linux/config.h>
5
6#ifdef CONFIG_X86_NUMAQ
7
8/* Max 16 Nodes */
9#define NODES_SHIFT 4
10
11#elif defined(CONFIG_ACPI_SRAT)
12
13/* Max 8 Nodes */
14#define NODES_SHIFT 3
15
16#endif /* CONFIG_X86_NUMAQ */
17
18#endif /* _ASM_MAX_NUMNODES_H */
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index 2e7f3e257fdd..6a8dd83c350f 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -288,7 +288,7 @@
288#define __NR_mq_timedreceive (__NR_mq_open+3) 288#define __NR_mq_timedreceive (__NR_mq_open+3)
289#define __NR_mq_notify (__NR_mq_open+4) 289#define __NR_mq_notify (__NR_mq_open+4)
290#define __NR_mq_getsetattr (__NR_mq_open+5) 290#define __NR_mq_getsetattr (__NR_mq_open+5)
291#define __NR_sys_kexec_load 283 291#define __NR_kexec_load 283
292#define __NR_waitid 284 292#define __NR_waitid 284
293/* #define __NR_sys_setaltroot 285 */ 293/* #define __NR_sys_setaltroot 285 */
294#define __NR_add_key 286 294#define __NR_add_key 286
@@ -318,8 +318,8 @@
318#define __NR_unshare 310 318#define __NR_unshare 310
319#define __NR_set_robust_list 311 319#define __NR_set_robust_list 311
320#define __NR_get_robust_list 312 320#define __NR_get_robust_list 312
321#define __NR_sys_splice 313 321#define __NR_splice 313
322#define __NR_sys_sync_file_range 314 322#define __NR_sync_file_range 314
323 323
324#define NR_syscalls 315 324#define NR_syscalls 315
325 325
diff --git a/include/asm-ia64/acpi-ext.h b/include/asm-ia64/acpi-ext.h
index 56d2ddc97b30..734d137dda6e 100644
--- a/include/asm-ia64/acpi-ext.h
+++ b/include/asm-ia64/acpi-ext.h
@@ -1,12 +1,15 @@
1/* 1/*
2 * ia64/platform/hp/common/hp_acpi.h 2 * (c) Copyright 2003, 2006 Hewlett-Packard Development Company, L.P.
3 * Alex Williamson <alex.williamson@hp.com>
4 * Bjorn Helgaas <bjorn.helgaas@hp.com>
3 * 5 *
4 * Copyright (C) 2003 Hewlett-Packard 6 * This program is free software; you can redistribute it and/or modify
5 * Copyright (C) Alex Williamson 7 * it under the terms of the GNU General Public License version 2 as
6 * Copyright (C) Bjorn Helgaas 8 * published by the Free Software Foundation.
7 * 9 *
8 * Vendor specific extensions to ACPI. 10 * Vendor specific extensions to ACPI.
9 */ 11 */
12
10#ifndef _ASM_IA64_ACPI_EXT_H 13#ifndef _ASM_IA64_ACPI_EXT_H
11#define _ASM_IA64_ACPI_EXT_H 14#define _ASM_IA64_ACPI_EXT_H
12 15
diff --git a/include/asm-ia64/kdebug.h b/include/asm-ia64/kdebug.h
index 218c458ab60c..c195a9ad1255 100644
--- a/include/asm-ia64/kdebug.h
+++ b/include/asm-ia64/kdebug.h
@@ -58,6 +58,8 @@ enum die_val {
58 DIE_MCA_RENDZVOUS_ENTER, 58 DIE_MCA_RENDZVOUS_ENTER,
59 DIE_MCA_RENDZVOUS_PROCESS, 59 DIE_MCA_RENDZVOUS_PROCESS,
60 DIE_MCA_RENDZVOUS_LEAVE, 60 DIE_MCA_RENDZVOUS_LEAVE,
61 DIE_MCA_NEW_TIMEOUT,
62 DIE_INIT_ENTER,
61 DIE_INIT_MONARCH_ENTER, 63 DIE_INIT_MONARCH_ENTER,
62 DIE_INIT_MONARCH_PROCESS, 64 DIE_INIT_MONARCH_PROCESS,
63 DIE_INIT_MONARCH_LEAVE, 65 DIE_INIT_MONARCH_LEAVE,
diff --git a/include/asm-ia64/mca.h b/include/asm-ia64/mca.h
index bfbbb8da79c7..9c5389b7e623 100644
--- a/include/asm-ia64/mca.h
+++ b/include/asm-ia64/mca.h
@@ -148,6 +148,11 @@ extern int ia64_reg_MCA_extension(int (*fn)(void *, struct ia64_sal_os_state *)
148extern void ia64_unreg_MCA_extension(void); 148extern void ia64_unreg_MCA_extension(void);
149extern u64 ia64_get_rnat(u64 *); 149extern u64 ia64_get_rnat(u64 *);
150 150
151struct ia64_mca_notify_die {
152 struct ia64_sal_os_state *sos;
153 int *monarch_cpu;
154};
155
151#else /* __ASSEMBLY__ */ 156#else /* __ASSEMBLY__ */
152 157
153#define IA64_MCA_CORRECTED 0x0 /* Error has been corrected by OS_MCA */ 158#define IA64_MCA_CORRECTED 0x0 /* Error has been corrected by OS_MCA */
diff --git a/include/asm-ia64/mutex.h b/include/asm-ia64/mutex.h
index 5a3224f6af38..bed73a643a56 100644
--- a/include/asm-ia64/mutex.h
+++ b/include/asm-ia64/mutex.h
@@ -84,7 +84,7 @@ __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *))
84static inline int 84static inline int
85__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) 85__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
86{ 86{
87 if (likely(cmpxchg_acq(count, 1, 0)) == 1) 87 if (cmpxchg_acq(count, 1, 0) == 1)
88 return 1; 88 return 1;
89 return 0; 89 return 0;
90} 90}
diff --git a/include/asm-ia64/numnodes.h b/include/asm-ia64/numnodes.h
deleted file mode 100644
index e9d356f549d9..000000000000
--- a/include/asm-ia64/numnodes.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef _ASM_MAX_NUMNODES_H
2#define _ASM_MAX_NUMNODES_H
3
4#ifdef CONFIG_IA64_DIG
5/* Max 8 Nodes */
6# define NODES_SHIFT 3
7#elif defined(CONFIG_IA64_HP_ZX1) || defined(CONFIG_IA64_HP_ZX1_SWIOTLB)
8/* Max 32 Nodes */
9# define NODES_SHIFT 5
10#elif defined(CONFIG_IA64_SGI_SN2) || defined(CONFIG_IA64_GENERIC)
11# if CONFIG_IA64_NR_NODES == 256
12# define NODES_SHIFT 8
13# elif CONFIG_IA64_NR_NODES <= 512
14# define NODES_SHIFT 9
15# elif CONFIG_IA64_NR_NODES <= 1024
16# define NODES_SHIFT 10
17# endif
18#endif
19
20#endif /* _ASM_MAX_NUMNODES_H */
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h
index 36070c1014d8..1c749acca021 100644
--- a/include/asm-ia64/unistd.h
+++ b/include/asm-ia64/unistd.h
@@ -286,12 +286,15 @@
286/* 1294, 1295 reserved for pselect/ppoll */ 286/* 1294, 1295 reserved for pselect/ppoll */
287#define __NR_unshare 1296 287#define __NR_unshare 1296
288#define __NR_splice 1297 288#define __NR_splice 1297
289#define __NR_set_robust_list 1298
290#define __NR_get_robust_list 1299
291#define __NR_sync_file_range 1300
289 292
290#ifdef __KERNEL__ 293#ifdef __KERNEL__
291 294
292#include <linux/config.h> 295#include <linux/config.h>
293 296
294#define NR_syscalls 274 /* length of syscall table */ 297#define NR_syscalls 277 /* length of syscall table */
295 298
296#define __ARCH_WANT_SYS_RT_SIGACTION 299#define __ARCH_WANT_SYS_RT_SIGACTION
297 300
diff --git a/include/asm-ia64/vga.h b/include/asm-ia64/vga.h
index bc3349ffc505..091177cda223 100644
--- a/include/asm-ia64/vga.h
+++ b/include/asm-ia64/vga.h
@@ -17,7 +17,7 @@
17extern unsigned long vga_console_iobase; 17extern unsigned long vga_console_iobase;
18extern unsigned long vga_console_membase; 18extern unsigned long vga_console_membase;
19 19
20#define VGA_MAP_MEM(x) ((unsigned long) ioremap(vga_console_membase + (x), 0)) 20#define VGA_MAP_MEM(x) ((unsigned long) ioremap_nocache(vga_console_membase + (x), 0))
21 21
22#define vga_readb(x) (*(x)) 22#define vga_readb(x) (*(x))
23#define vga_writeb(x,y) (*(y) = (x)) 23#define vga_writeb(x,y) (*(y) = (x))
diff --git a/include/asm-m32r/numnodes.h b/include/asm-m32r/numnodes.h
deleted file mode 100644
index 479a39d49f83..000000000000
--- a/include/asm-m32r/numnodes.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef _ASM_NUMNODES_H_
2#define _ASM_NUMNODES_H_
3
4#include <linux/config.h>
5
6#ifdef CONFIG_DISCONTIGMEM
7
8#if defined(CONFIG_CHIP_M32700)
9#define NODES_SHIFT 1 /* Max 2 Nodes */
10#endif /* CONFIG_CHIP_M32700 */
11
12#endif /* CONFIG_DISCONTIGMEM */
13
14#endif /* _ASM_NUMNODES_H_ */
15
diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h
index 7885b7df84a2..1184293e5712 100644
--- a/include/asm-m32r/smp.h
+++ b/include/asm-m32r/smp.h
@@ -67,7 +67,8 @@ extern volatile int cpu_2_physid[NR_CPUS];
67#define raw_smp_processor_id() (current_thread_info()->cpu) 67#define raw_smp_processor_id() (current_thread_info()->cpu)
68 68
69extern cpumask_t cpu_callout_map; 69extern cpumask_t cpu_callout_map;
70#define cpu_possible_map cpu_callout_map 70extern cpumask_t cpu_possible_map;
71extern cpumask_t cpu_present_map;
71 72
72static __inline__ int hard_smp_processor_id(void) 73static __inline__ int hard_smp_processor_id(void)
73{ 74{
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h
index d6a2c613be68..c5ab5da56d21 100644
--- a/include/asm-m32r/system.h
+++ b/include/asm-m32r/system.h
@@ -22,10 +22,6 @@
22 * `next' and `prev' should be struct task_struct, but it isn't always defined 22 * `next' and `prev' should be struct task_struct, but it isn't always defined
23 */ 23 */
24 24
25#ifndef CONFIG_SMP
26#define prepare_to_switch() do { } while(0)
27#endif /* not CONFIG_SMP */
28
29#define switch_to(prev, next, last) do { \ 25#define switch_to(prev, next, last) do { \
30 register unsigned long arg0 __asm__ ("r0") = (unsigned long)prev; \ 26 register unsigned long arg0 __asm__ ("r0") = (unsigned long)prev; \
31 register unsigned long arg1 __asm__ ("r1") = (unsigned long)next; \ 27 register unsigned long arg1 __asm__ ("r1") = (unsigned long)next; \
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h
index e8ae61956a51..819cc28a94f7 100644
--- a/include/asm-m32r/uaccess.h
+++ b/include/asm-m32r/uaccess.h
@@ -5,17 +5,9 @@
5 * linux/include/asm-m32r/uaccess.h 5 * linux/include/asm-m32r/uaccess.h
6 * 6 *
7 * M32R version. 7 * M32R version.
8 * Copyright (C) 2004 Hirokazu Takata <takata at linux-m32r.org> 8 * Copyright (C) 2004, 2006 Hirokazu Takata <takata at linux-m32r.org>
9 */ 9 */
10 10
11#undef UACCESS_DEBUG
12
13#ifdef UACCESS_DEBUG
14#define UAPRINTK(args...) printk(args)
15#else
16#define UAPRINTK(args...)
17#endif /* UACCESS_DEBUG */
18
19/* 11/*
20 * User space memory access functions 12 * User space memory access functions
21 */ 13 */
@@ -38,27 +30,29 @@
38#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) 30#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
39 31
40#ifdef CONFIG_MMU 32#ifdef CONFIG_MMU
33
41#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) 34#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF)
42#define USER_DS MAKE_MM_SEG(PAGE_OFFSET) 35#define USER_DS MAKE_MM_SEG(PAGE_OFFSET)
43#else
44#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF)
45#define USER_DS MAKE_MM_SEG(0xFFFFFFFF)
46#endif /* CONFIG_MMU */
47
48#define get_ds() (KERNEL_DS) 36#define get_ds() (KERNEL_DS)
49#ifdef CONFIG_MMU
50#define get_fs() (current_thread_info()->addr_limit) 37#define get_fs() (current_thread_info()->addr_limit)
51#define set_fs(x) (current_thread_info()->addr_limit = (x)) 38#define set_fs(x) (current_thread_info()->addr_limit = (x))
52#else 39
40#else /* not CONFIG_MMU */
41
42#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF)
43#define USER_DS MAKE_MM_SEG(0xFFFFFFFF)
44#define get_ds() (KERNEL_DS)
45
53static inline mm_segment_t get_fs(void) 46static inline mm_segment_t get_fs(void)
54{ 47{
55 return USER_DS; 48 return USER_DS;
56} 49}
57 50
58static inline void set_fs(mm_segment_t s) 51static inline void set_fs(mm_segment_t s)
59{ 52{
60} 53}
61#endif /* CONFIG_MMU */ 54
55#endif /* not CONFIG_MMU */
62 56
63#define segment_eq(a,b) ((a).seg == (b).seg) 57#define segment_eq(a,b) ((a).seg == (b).seg)
64 58
@@ -83,9 +77,9 @@ static inline void set_fs(mm_segment_t s)
83 " subx %0, %0\n" \ 77 " subx %0, %0\n" \
84 " cmpu %4, %1\n" \ 78 " cmpu %4, %1\n" \
85 " subx %0, %5\n" \ 79 " subx %0, %5\n" \
86 : "=&r"(flag), "=r"(sum) \ 80 : "=&r" (flag), "=r" (sum) \
87 : "1"(addr), "r"((int)(size)), \ 81 : "1" (addr), "r" ((int)(size)), \
88 "r"(current_thread_info()->addr_limit.seg), "r"(0) \ 82 "r" (current_thread_info()->addr_limit.seg), "r" (0) \
89 : "cbit" ); \ 83 : "cbit" ); \
90 flag; }) 84 flag; })
91 85
@@ -113,10 +107,10 @@ static inline void set_fs(mm_segment_t s)
113#else 107#else
114static inline int access_ok(int type, const void *addr, unsigned long size) 108static inline int access_ok(int type, const void *addr, unsigned long size)
115{ 109{
116 extern unsigned long memory_start, memory_end; 110 extern unsigned long memory_start, memory_end;
117 unsigned long val = (unsigned long)addr; 111 unsigned long val = (unsigned long)addr;
118 112
119 return ((val >= memory_start) && ((val + size) < memory_end)); 113 return ((val >= memory_start) && ((val + size) < memory_end));
120} 114}
121#endif /* CONFIG_MMU */ 115#endif /* CONFIG_MMU */
122 116
@@ -155,39 +149,6 @@ extern int fixup_exception(struct pt_regs *regs);
155 * accesses to the same area of user memory). 149 * accesses to the same area of user memory).
156 */ 150 */
157 151
158extern void __get_user_1(void);
159extern void __get_user_2(void);
160extern void __get_user_4(void);
161
162#ifndef MODULE
163#define __get_user_x(size,ret,x,ptr) \
164 __asm__ __volatile__( \
165 " mv r0, %0\n" \
166 " mv r1, %1\n" \
167 " bl __get_user_" #size "\n" \
168 " mv %0, r0\n" \
169 " mv %1, r1\n" \
170 : "=r"(ret), "=r"(x) \
171 : "0"(ptr) \
172 : "r0", "r1", "r14" )
173#else /* MODULE */
174/*
175 * Use "jl" instead of "bl" for MODULE
176 */
177#define __get_user_x(size,ret,x,ptr) \
178 __asm__ __volatile__( \
179 " mv r0, %0\n" \
180 " mv r1, %1\n" \
181 " seth lr, #high(__get_user_" #size ")\n" \
182 " or3 lr, lr, #low(__get_user_" #size ")\n" \
183 " jl lr\n" \
184 " mv %0, r0\n" \
185 " mv %1, r1\n" \
186 : "=r"(ret), "=r"(x) \
187 : "0"(ptr) \
188 : "r0", "r1", "r14" )
189#endif
190
191/* Careful: we have to cast the result to the type of the pointer for sign 152/* Careful: we have to cast the result to the type of the pointer for sign
192 reasons */ 153 reasons */
193/** 154/**
@@ -208,20 +169,7 @@ extern void __get_user_4(void);
208 * On error, the variable @x is set to zero. 169 * On error, the variable @x is set to zero.
209 */ 170 */
210#define get_user(x,ptr) \ 171#define get_user(x,ptr) \
211({ int __ret_gu; \ 172 __get_user_check((x),(ptr),sizeof(*(ptr)))
212 unsigned long __val_gu; \
213 __chk_user_ptr(ptr); \
214 switch(sizeof (*(ptr))) { \
215 case 1: __get_user_x(1,__ret_gu,__val_gu,ptr); break; \
216 case 2: __get_user_x(2,__ret_gu,__val_gu,ptr); break; \
217 case 4: __get_user_x(4,__ret_gu,__val_gu,ptr); break; \
218 default: __get_user_x(X,__ret_gu,__val_gu,ptr); break; \
219 } \
220 (x) = (__typeof__(*(ptr)))__val_gu; \
221 __ret_gu; \
222})
223
224extern void __put_user_bad(void);
225 173
226/** 174/**
227 * put_user: - Write a simple value into user space. 175 * put_user: - Write a simple value into user space.
@@ -240,8 +188,7 @@ extern void __put_user_bad(void);
240 * Returns zero on success, or -EFAULT on error. 188 * Returns zero on success, or -EFAULT on error.
241 */ 189 */
242#define put_user(x,ptr) \ 190#define put_user(x,ptr) \
243 __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) 191 __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
244
245 192
246/** 193/**
247 * __get_user: - Get a simple variable from user space, with less checking. 194 * __get_user: - Get a simple variable from user space, with less checking.
@@ -264,8 +211,64 @@ extern void __put_user_bad(void);
264 * On error, the variable @x is set to zero. 211 * On error, the variable @x is set to zero.
265 */ 212 */
266#define __get_user(x,ptr) \ 213#define __get_user(x,ptr) \
267 __get_user_nocheck((x),(ptr),sizeof(*(ptr))) 214 __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
268 215
216#define __get_user_nocheck(x,ptr,size) \
217({ \
218 long __gu_err = 0; \
219 unsigned long __gu_val; \
220 might_sleep(); \
221 __get_user_size(__gu_val,(ptr),(size),__gu_err); \
222 (x) = (__typeof__(*(ptr)))__gu_val; \
223 __gu_err; \
224})
225
226#define __get_user_check(x,ptr,size) \
227({ \
228 long __gu_err = -EFAULT; \
229 unsigned long __gu_val = 0; \
230 const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
231 might_sleep(); \
232 if (access_ok(VERIFY_READ,__gu_addr,size)) \
233 __get_user_size(__gu_val,__gu_addr,(size),__gu_err); \
234 (x) = (__typeof__(*(ptr)))__gu_val; \
235 __gu_err; \
236})
237
238extern long __get_user_bad(void);
239
240#define __get_user_size(x,ptr,size,retval) \
241do { \
242 retval = 0; \
243 __chk_user_ptr(ptr); \
244 switch (size) { \
245 case 1: __get_user_asm(x,ptr,retval,"ub"); break; \
246 case 2: __get_user_asm(x,ptr,retval,"uh"); break; \
247 case 4: __get_user_asm(x,ptr,retval,""); break; \
248 default: (x) = __get_user_bad(); \
249 } \
250} while (0)
251
252#define __get_user_asm(x, addr, err, itype) \
253 __asm__ __volatile__( \
254 " .fillinsn\n" \
255 "1: ld"itype" %1,@%2\n" \
256 " .fillinsn\n" \
257 "2:\n" \
258 ".section .fixup,\"ax\"\n" \
259 " .balign 4\n" \
260 "3: ldi %0,%3\n" \
261 " seth r14,#high(2b)\n" \
262 " or3 r14,r14,#low(2b)\n" \
263 " jmp r14\n" \
264 ".previous\n" \
265 ".section __ex_table,\"a\"\n" \
266 " .balign 4\n" \
267 " .long 1b,3b\n" \
268 ".previous" \
269 : "=&r" (err), "=&r" (x) \
270 : "r" (addr), "i" (-EFAULT), "0" (err) \
271 : "r14", "memory")
269 272
270/** 273/**
271 * __put_user: - Write a simple value into user space, with less checking. 274 * __put_user: - Write a simple value into user space, with less checking.
@@ -287,11 +290,13 @@ extern void __put_user_bad(void);
287 * Returns zero on success, or -EFAULT on error. 290 * Returns zero on success, or -EFAULT on error.
288 */ 291 */
289#define __put_user(x,ptr) \ 292#define __put_user(x,ptr) \
290 __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) 293 __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
294
291 295
292#define __put_user_nocheck(x,ptr,size) \ 296#define __put_user_nocheck(x,ptr,size) \
293({ \ 297({ \
294 long __pu_err; \ 298 long __pu_err; \
299 might_sleep(); \
295 __put_user_size((x),(ptr),(size),__pu_err); \ 300 __put_user_size((x),(ptr),(size),__pu_err); \
296 __pu_err; \ 301 __pu_err; \
297}) 302})
@@ -308,28 +313,28 @@ extern void __put_user_bad(void);
308}) 313})
309 314
310#if defined(__LITTLE_ENDIAN__) 315#if defined(__LITTLE_ENDIAN__)
311#define __put_user_u64(x, addr, err) \ 316#define __put_user_u64(x, addr, err) \
312 __asm__ __volatile__( \ 317 __asm__ __volatile__( \
313 " .fillinsn\n" \ 318 " .fillinsn\n" \
314 "1: st %L1,@%2\n" \ 319 "1: st %L1,@%2\n" \
315 " .fillinsn\n" \ 320 " .fillinsn\n" \
316 "2: st %H1,@(4,%2)\n" \ 321 "2: st %H1,@(4,%2)\n" \
317 " .fillinsn\n" \ 322 " .fillinsn\n" \
318 "3:\n" \ 323 "3:\n" \
319 ".section .fixup,\"ax\"\n" \ 324 ".section .fixup,\"ax\"\n" \
320 " .balign 4\n" \ 325 " .balign 4\n" \
321 "4: ldi %0,%3\n" \ 326 "4: ldi %0,%3\n" \
322 " seth r14,#high(3b)\n" \ 327 " seth r14,#high(3b)\n" \
323 " or3 r14,r14,#low(3b)\n" \ 328 " or3 r14,r14,#low(3b)\n" \
324 " jmp r14\n" \ 329 " jmp r14\n" \
325 ".previous\n" \ 330 ".previous\n" \
326 ".section __ex_table,\"a\"\n" \ 331 ".section __ex_table,\"a\"\n" \
327 " .balign 4\n" \ 332 " .balign 4\n" \
328 " .long 1b,4b\n" \ 333 " .long 1b,4b\n" \
329 " .long 2b,4b\n" \ 334 " .long 2b,4b\n" \
330 ".previous" \ 335 ".previous" \
331 : "=&r"(err) \ 336 : "=&r" (err) \
332 : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ 337 : "r" (x), "r" (addr), "i" (-EFAULT), "0" (err) \
333 : "r14", "memory") 338 : "r14", "memory")
334 339
335#elif defined(__BIG_ENDIAN__) 340#elif defined(__BIG_ENDIAN__)
@@ -353,13 +358,15 @@ extern void __put_user_bad(void);
353 " .long 1b,4b\n" \ 358 " .long 1b,4b\n" \
354 " .long 2b,4b\n" \ 359 " .long 2b,4b\n" \
355 ".previous" \ 360 ".previous" \
356 : "=&r"(err) \ 361 : "=&r" (err) \
357 : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ 362 : "r" (x), "r" (addr), "i" (-EFAULT), "0" (err) \
358 : "r14", "memory") 363 : "r14", "memory")
359#else 364#else
360#error no endian defined 365#error no endian defined
361#endif 366#endif
362 367
368extern void __put_user_bad(void);
369
363#define __put_user_size(x,ptr,size,retval) \ 370#define __put_user_size(x,ptr,size,retval) \
364do { \ 371do { \
365 retval = 0; \ 372 retval = 0; \
@@ -398,52 +405,8 @@ struct __large_struct { unsigned long buf[100]; };
398 " .balign 4\n" \ 405 " .balign 4\n" \
399 " .long 1b,3b\n" \ 406 " .long 1b,3b\n" \
400 ".previous" \ 407 ".previous" \
401 : "=&r"(err) \ 408 : "=&r" (err) \
402 : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ 409 : "r" (x), "r" (addr), "i" (-EFAULT), "0" (err) \
403 : "r14", "memory")
404
405#define __get_user_nocheck(x,ptr,size) \
406({ \
407 long __gu_err; \
408 unsigned long __gu_val; \
409 __get_user_size(__gu_val,(ptr),(size),__gu_err); \
410 (x) = (__typeof__(*(ptr)))__gu_val; \
411 __gu_err; \
412})
413
414extern long __get_user_bad(void);
415
416#define __get_user_size(x,ptr,size,retval) \
417do { \
418 retval = 0; \
419 __chk_user_ptr(ptr); \
420 switch (size) { \
421 case 1: __get_user_asm(x,ptr,retval,"ub"); break; \
422 case 2: __get_user_asm(x,ptr,retval,"uh"); break; \
423 case 4: __get_user_asm(x,ptr,retval,""); break; \
424 default: (x) = __get_user_bad(); \
425 } \
426} while (0)
427
428#define __get_user_asm(x, addr, err, itype) \
429 __asm__ __volatile__( \
430 " .fillinsn\n" \
431 "1: ld"itype" %1,@%2\n" \
432 " .fillinsn\n" \
433 "2:\n" \
434 ".section .fixup,\"ax\"\n" \
435 " .balign 4\n" \
436 "3: ldi %0,%3\n" \
437 " seth r14,#high(2b)\n" \
438 " or3 r14,r14,#low(2b)\n" \
439 " jmp r14\n" \
440 ".previous\n" \
441 ".section __ex_table,\"a\"\n" \
442 " .balign 4\n" \
443 " .long 1b,3b\n" \
444 ".previous" \
445 : "=&r"(err), "=&r"(x) \
446 : "r"(addr), "i"(-EFAULT), "0"(err) \
447 : "r14", "memory") 410 : "r14", "memory")
448 411
449/* 412/*
@@ -453,7 +416,6 @@ do { \
453 * anything, so this is accurate. 416 * anything, so this is accurate.
454 */ 417 */
455 418
456
457/* 419/*
458 * Copy To/From Userspace 420 * Copy To/From Userspace
459 */ 421 */
@@ -511,8 +473,9 @@ do { \
511 " .long 2b,9b\n" \ 473 " .long 2b,9b\n" \
512 " .long 3b,9b\n" \ 474 " .long 3b,9b\n" \
513 ".previous\n" \ 475 ".previous\n" \
514 : "=&r"(__dst), "=&r"(__src), "=&r"(size), "=&r"(__c) \ 476 : "=&r" (__dst), "=&r" (__src), "=&r" (size), \
515 : "0"(to), "1"(from), "2"(size), "3"(size / 4) \ 477 "=&r" (__c) \
478 : "0" (to), "1" (from), "2" (size), "3" (size / 4) \
516 : "r14", "memory"); \ 479 : "r14", "memory"); \
517} while (0) 480} while (0)
518 481
@@ -573,8 +536,9 @@ do { \
573 " .long 2b,7b\n" \ 536 " .long 2b,7b\n" \
574 " .long 3b,7b\n" \ 537 " .long 3b,7b\n" \
575 ".previous\n" \ 538 ".previous\n" \
576 : "=&r"(__dst), "=&r"(__src), "=&r"(size), "=&r"(__c) \ 539 : "=&r" (__dst), "=&r" (__src), "=&r" (size), \
577 : "0"(to), "1"(from), "2"(size), "3"(size / 4) \ 540 "=&r" (__c) \
541 : "0" (to), "1" (from), "2" (size), "3" (size / 4) \
578 : "r14", "memory"); \ 542 : "r14", "memory"); \
579} while (0) 543} while (0)
580 544
@@ -676,7 +640,7 @@ unsigned long __generic_copy_from_user(void *, const void __user *, unsigned lon
676#define copy_from_user(to,from,n) \ 640#define copy_from_user(to,from,n) \
677({ \ 641({ \
678 might_sleep(); \ 642 might_sleep(); \
679__generic_copy_from_user((to),(from),(n)); \ 643 __generic_copy_from_user((to),(from),(n)); \
680}) 644})
681 645
682long __must_check strncpy_from_user(char *dst, const char __user *src, 646long __must_check strncpy_from_user(char *dst, const char __user *src,
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h
index 39be87ca2a5a..be0eb014c3b0 100644
--- a/include/asm-m32r/unistd.h
+++ b/include/asm-m32r/unistd.h
@@ -292,7 +292,7 @@
292#define __NR_mq_timedreceive (__NR_mq_open+3) 292#define __NR_mq_timedreceive (__NR_mq_open+3)
293#define __NR_mq_notify (__NR_mq_open+4) 293#define __NR_mq_notify (__NR_mq_open+4)
294#define __NR_mq_getsetattr (__NR_mq_open+5) 294#define __NR_mq_getsetattr (__NR_mq_open+5)
295#define __NR_sys_kexec_load 283 295#define __NR_kexec_load 283
296#define __NR_waitid 284 296#define __NR_waitid 284
297 297
298#define NR_syscalls 285 298#define NR_syscalls 285
diff --git a/include/asm-mips/numnodes.h b/include/asm-mips/numnodes.h
deleted file mode 100644
index 4f00c16ceeb0..000000000000
--- a/include/asm-mips/numnodes.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _ASM_MAX_NUMNODES_H
2#define _ASM_MAX_NUMNODES_H
3
4/* Max 128 Nodes */
5#define NODES_SHIFT 6
6
7#endif /* _ASM_MAX_NUMNODES_H */
diff --git a/include/asm-parisc/numnodes.h b/include/asm-parisc/numnodes.h
deleted file mode 100644
index 6c67651efd1c..000000000000
--- a/include/asm-parisc/numnodes.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _ASM_MAX_NUMNODES_H
2#define _ASM_MAX_NUMNODES_H
3
4/* Max 8 Nodes */
5#define NODES_SHIFT 3
6
7#endif /* _ASM_MAX_NUMNODES_H */
diff --git a/include/asm-powerpc/numnodes.h b/include/asm-powerpc/numnodes.h
deleted file mode 100644
index e138edae09dd..000000000000
--- a/include/asm-powerpc/numnodes.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef _ASM_POWERPC_MAX_NUMNODES_H
2#define _ASM_POWERPC_MAX_NUMNODES_H
3#ifdef __KERNEL__
4
5/* Max 16 Nodes */
6#define NODES_SHIFT 4
7
8#endif /* __KERNEL__ */
9#endif /* _ASM_POWERPC_MAX_NUMNODES_H */
diff --git a/include/asm-s390/atomic.h b/include/asm-s390/atomic.h
index de1d9926aa60..399bf02894dd 100644
--- a/include/asm-s390/atomic.h
+++ b/include/asm-s390/atomic.h
@@ -1,6 +1,8 @@
1#ifndef __ARCH_S390_ATOMIC__ 1#ifndef __ARCH_S390_ATOMIC__
2#define __ARCH_S390_ATOMIC__ 2#define __ARCH_S390_ATOMIC__
3 3
4#include <linux/compiler.h>
5
4/* 6/*
5 * include/asm-s390/atomic.h 7 * include/asm-s390/atomic.h
6 * 8 *
diff --git a/include/asm-s390/ebcdic.h b/include/asm-s390/ebcdic.h
index 4cbc336e4d60..15fd2eda6c90 100644
--- a/include/asm-s390/ebcdic.h
+++ b/include/asm-s390/ebcdic.h
@@ -14,12 +14,12 @@
14#include <types.h> 14#include <types.h>
15#endif 15#endif
16 16
17extern __u8 _ascebc_500[]; /* ASCII -> EBCDIC 500 conversion table */ 17extern __u8 _ascebc_500[256]; /* ASCII -> EBCDIC 500 conversion table */
18extern __u8 _ebcasc_500[]; /* EBCDIC 500 -> ASCII conversion table */ 18extern __u8 _ebcasc_500[256]; /* EBCDIC 500 -> ASCII conversion table */
19extern __u8 _ascebc[]; /* ASCII -> EBCDIC conversion table */ 19extern __u8 _ascebc[256]; /* ASCII -> EBCDIC conversion table */
20extern __u8 _ebcasc[]; /* EBCDIC -> ASCII conversion table */ 20extern __u8 _ebcasc[256]; /* EBCDIC -> ASCII conversion table */
21extern __u8 _ebc_tolower[]; /* EBCDIC -> lowercase */ 21extern __u8 _ebc_tolower[256]; /* EBCDIC -> lowercase */
22extern __u8 _ebc_toupper[]; /* EBCDIC -> uppercase */ 22extern __u8 _ebc_toupper[256]; /* EBCDIC -> uppercase */
23 23
24static inline void 24static inline void
25codepage_convert(const __u8 *codepage, volatile __u8 * addr, unsigned long nr) 25codepage_convert(const __u8 *codepage, volatile __u8 * addr, unsigned long nr)
diff --git a/include/asm-sh/numnodes.h b/include/asm-sh/numnodes.h
deleted file mode 100644
index f73e85b72ecb..000000000000
--- a/include/asm-sh/numnodes.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _ASM_MAX_NUMNODES_H
2#define _ASM_MAX_NUMNODES_H
3
4/* Max 2 Nodes */
5#define NODES_SHIFT 1
6
7#endif /* _ASM_MAX_NUMNODES_H */
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h
index f2c8e14d1fd9..05520cebda12 100644
--- a/include/asm-sh/unistd.h
+++ b/include/asm-sh/unistd.h
@@ -290,7 +290,7 @@
290#define __NR_mq_timedreceive (__NR_mq_open+3) 290#define __NR_mq_timedreceive (__NR_mq_open+3)
291#define __NR_mq_notify (__NR_mq_open+4) 291#define __NR_mq_notify (__NR_mq_open+4)
292#define __NR_mq_getsetattr (__NR_mq_open+5) 292#define __NR_mq_getsetattr (__NR_mq_open+5)
293#define __NR_sys_kexec_load 283 293#define __NR_kexec_load 283
294#define __NR_waitid 284 294#define __NR_waitid 284
295#define __NR_add_key 285 295#define __NR_add_key 285
296#define __NR_request_key 286 296#define __NR_request_key 286
diff --git a/include/asm-sh64/unistd.h b/include/asm-sh64/unistd.h
index 2a1cfa404ea4..1f8f394ae371 100644
--- a/include/asm-sh64/unistd.h
+++ b/include/asm-sh64/unistd.h
@@ -333,7 +333,7 @@
333#define __NR_mq_timedreceive (__NR_mq_open+3) 333#define __NR_mq_timedreceive (__NR_mq_open+3)
334#define __NR_mq_notify (__NR_mq_open+4) 334#define __NR_mq_notify (__NR_mq_open+4)
335#define __NR_mq_getsetattr (__NR_mq_open+5) 335#define __NR_mq_getsetattr (__NR_mq_open+5)
336#define __NR_sys_kexec_load 311 336#define __NR_kexec_load 311
337#define __NR_waitid 312 337#define __NR_waitid 312
338#define __NR_add_key 313 338#define __NR_add_key 313
339#define __NR_request_key 314 339#define __NR_request_key 314
diff --git a/include/asm-sparc/vga.h b/include/asm-sparc/vga.h
new file mode 100644
index 000000000000..c69d5b2ba19a
--- /dev/null
+++ b/include/asm-sparc/vga.h
@@ -0,0 +1,33 @@
1/*
2 * Access to VGA videoram
3 *
4 * (c) 1998 Martin Mares <mj@ucw.cz>
5 */
6
7#ifndef _LINUX_ASM_VGA_H_
8#define _LINUX_ASM_VGA_H_
9
10#include <asm/types.h>
11
12#define VT_BUF_HAVE_RW
13
14#undef scr_writew
15#undef scr_readw
16
17static inline void scr_writew(u16 val, u16 *addr)
18{
19 BUG_ON((long) addr >= 0);
20
21 *addr = val;
22}
23
24static inline u16 scr_readw(const u16 *addr)
25{
26 BUG_ON((long) addr >= 0);
27
28 return *addr;
29}
30
31#define VGA_MAP_MEM(x,s) (x)
32
33#endif
diff --git a/include/asm-sparc64/percpu.h b/include/asm-sparc64/percpu.h
index 82032e159a76..baef13b58952 100644
--- a/include/asm-sparc64/percpu.h
+++ b/include/asm-sparc64/percpu.h
@@ -26,7 +26,7 @@ register unsigned long __local_per_cpu_offset asm("g5");
26#define percpu_modcopy(pcpudst, src, size) \ 26#define percpu_modcopy(pcpudst, src, size) \
27do { \ 27do { \
28 unsigned int __i; \ 28 unsigned int __i; \
29 for_each_cpu(__i) \ 29 for_each_possible_cpu(__i) \
30 memcpy((pcpudst)+__per_cpu_offset(__i), \ 30 memcpy((pcpudst)+__per_cpu_offset(__i), \
31 (src), (size)); \ 31 (src), (size)); \
32} while (0) 32} while (0)
diff --git a/include/asm-um/ptrace-i386.h b/include/asm-um/ptrace-i386.h
index 30656c962d74..6e2528bb0083 100644
--- a/include/asm-um/ptrace-i386.h
+++ b/include/asm-um/ptrace-i386.h
@@ -56,6 +56,9 @@ extern int do_get_thread_area_tt(struct user_desc *info);
56extern int arch_switch_tls_skas(struct task_struct *from, struct task_struct *to); 56extern int arch_switch_tls_skas(struct task_struct *from, struct task_struct *to);
57extern int arch_switch_tls_tt(struct task_struct *from, struct task_struct *to); 57extern int arch_switch_tls_tt(struct task_struct *from, struct task_struct *to);
58 58
59extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to);
60extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to);
61
59static inline int do_get_thread_area(struct user_desc *info) 62static inline int do_get_thread_area(struct user_desc *info)
60{ 63{
61 return CHOOSE_MODE_PROC(do_get_thread_area_tt, do_get_thread_area_skas, info); 64 return CHOOSE_MODE_PROC(do_get_thread_area_tt, do_get_thread_area_skas, info);
diff --git a/include/asm-v850/system.h b/include/asm-v850/system.h
index 107decbd6e6c..7091af4b7866 100644
--- a/include/asm-v850/system.h
+++ b/include/asm-v850/system.h
@@ -18,8 +18,6 @@
18#include <asm/ptrace.h> 18#include <asm/ptrace.h>
19 19
20 20
21#define prepare_to_switch() do { } while (0)
22
23/* 21/*
24 * switch_to(n) should switch tasks to task ptr, first checking that 22 * switch_to(n) should switch tasks to task ptr, first checking that
25 * ptr isn't the current task, in which case it does nothing. 23 * ptr isn't the current task, in which case it does nothing.
diff --git a/include/asm-x86_64/e820.h b/include/asm-x86_64/e820.h
index 8dcc32665240..93b51df51687 100644
--- a/include/asm-x86_64/e820.h
+++ b/include/asm-x86_64/e820.h
@@ -47,7 +47,8 @@ extern void contig_e820_setup(void);
47extern unsigned long e820_end_of_ram(void); 47extern unsigned long e820_end_of_ram(void);
48extern void e820_reserve_resources(void); 48extern void e820_reserve_resources(void);
49extern void e820_print_map(char *who); 49extern void e820_print_map(char *who);
50extern int e820_mapped(unsigned long start, unsigned long end, unsigned type); 50extern int e820_any_mapped(unsigned long start, unsigned long end, unsigned type);
51extern int e820_all_mapped(unsigned long start, unsigned long end, unsigned type);
51 52
52extern void e820_bootmem_free(pg_data_t *pgdat, unsigned long start,unsigned long end); 53extern void e820_bootmem_free(pg_data_t *pgdat, unsigned long start,unsigned long end);
53extern void e820_setup_gap(void); 54extern void e820_setup_gap(void);
diff --git a/include/asm-x86_64/hpet.h b/include/asm-x86_64/hpet.h
index 08b75c15269a..18ff7ee9e774 100644
--- a/include/asm-x86_64/hpet.h
+++ b/include/asm-x86_64/hpet.h
@@ -51,6 +51,8 @@
51 51
52#define HPET_TN_ROUTE_SHIFT 9 52#define HPET_TN_ROUTE_SHIFT 9
53 53
54#define HPET_TICK_RATE (HZ * 100000UL)
55
54extern int is_hpet_enabled(void); 56extern int is_hpet_enabled(void);
55extern int hpet_rtc_timer_init(void); 57extern int hpet_rtc_timer_init(void);
56extern int oem_force_hpet_timer(void); 58extern int oem_force_hpet_timer(void);
diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h
index eeb2bcd635de..b4f4b172b15a 100644
--- a/include/asm-x86_64/ia32_unistd.h
+++ b/include/asm-x86_64/ia32_unistd.h
@@ -317,6 +317,4 @@
317#define __NR_ia32_ppoll 309 317#define __NR_ia32_ppoll 309
318#define __NR_ia32_unshare 310 318#define __NR_ia32_unshare 310
319 319
320#define IA32_NR_syscalls 315 /* must be > than biggest syscall! */
321
322#endif /* _ASM_X86_64_IA32_UNISTD_H_ */ 320#endif /* _ASM_X86_64_IA32_UNISTD_H_ */
diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h
index cafdfb37f0d8..a05da8a50bfd 100644
--- a/include/asm-x86_64/io.h
+++ b/include/asm-x86_64/io.h
@@ -177,7 +177,7 @@ static inline __u16 __readw(const volatile void __iomem *addr)
177{ 177{
178 return *(__force volatile __u16 *)addr; 178 return *(__force volatile __u16 *)addr;
179} 179}
180static inline __u32 __readl(const volatile void __iomem *addr) 180static __always_inline __u32 __readl(const volatile void __iomem *addr)
181{ 181{
182 return *(__force volatile __u32 *)addr; 182 return *(__force volatile __u32 *)addr;
183} 183}
diff --git a/include/asm-x86_64/mce.h b/include/asm-x86_64/mce.h
index 5d298b799a9f..7229785094e3 100644
--- a/include/asm-x86_64/mce.h
+++ b/include/asm-x86_64/mce.h
@@ -70,6 +70,9 @@ struct mce_log {
70#define MCE_THRESHOLD_BASE MCE_EXTENDED_BANK + 1 /* MCE_AMD */ 70#define MCE_THRESHOLD_BASE MCE_EXTENDED_BANK + 1 /* MCE_AMD */
71#define MCE_THRESHOLD_DRAM_ECC MCE_THRESHOLD_BASE + 4 71#define MCE_THRESHOLD_DRAM_ECC MCE_THRESHOLD_BASE + 4
72 72
73#ifdef __KERNEL__
74#include <asm/atomic.h>
75
73void mce_log(struct mce *m); 76void mce_log(struct mce *m);
74#ifdef CONFIG_X86_MCE_INTEL 77#ifdef CONFIG_X86_MCE_INTEL
75void mce_intel_feature_init(struct cpuinfo_x86 *c); 78void mce_intel_feature_init(struct cpuinfo_x86 *c);
@@ -87,4 +90,8 @@ static inline void mce_amd_feature_init(struct cpuinfo_x86 *c)
87} 90}
88#endif 91#endif
89 92
93extern atomic_t mce_entry;
94
95#endif
96
90#endif 97#endif
diff --git a/include/asm-x86_64/numa.h b/include/asm-x86_64/numa.h
index f6cbb4cbb5a3..1cc92fe02503 100644
--- a/include/asm-x86_64/numa.h
+++ b/include/asm-x86_64/numa.h
@@ -2,7 +2,6 @@
2#define _ASM_X8664_NUMA_H 1 2#define _ASM_X8664_NUMA_H 1
3 3
4#include <linux/nodemask.h> 4#include <linux/nodemask.h>
5#include <asm/numnodes.h>
6 5
7struct bootnode { 6struct bootnode {
8 u64 start,end; 7 u64 start,end;
@@ -18,6 +17,8 @@ extern void numa_init_array(void);
18extern int numa_off; 17extern int numa_off;
19 18
20extern void numa_set_node(int cpu, int node); 19extern void numa_set_node(int cpu, int node);
20extern void srat_reserve_add_area(int nodeid);
21extern int hotadd_percent;
21 22
22extern unsigned char apicid_to_node[256]; 23extern unsigned char apicid_to_node[256];
23#ifdef CONFIG_NUMA 24#ifdef CONFIG_NUMA
diff --git a/include/asm-x86_64/numnodes.h b/include/asm-x86_64/numnodes.h
deleted file mode 100644
index 32be16b8ae96..000000000000
--- a/include/asm-x86_64/numnodes.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASM_X8664_NUMNODES_H
2#define _ASM_X8664_NUMNODES_H 1
3
4#include <linux/config.h>
5
6#ifdef CONFIG_NUMA
7#define NODES_SHIFT 6
8#else
9#define NODES_SHIFT 0
10#endif
11
12#endif
diff --git a/include/asm-x86_64/timex.h b/include/asm-x86_64/timex.h
index f18443fcdf04..b9e5320b7625 100644
--- a/include/asm-x86_64/timex.h
+++ b/include/asm-x86_64/timex.h
@@ -33,7 +33,7 @@ static __always_inline cycles_t get_cycles_sync(void)
33 unsigned eax; 33 unsigned eax;
34 /* Don't do an additional sync on CPUs where we know 34 /* Don't do an additional sync on CPUs where we know
35 RDTSC is already synchronous. */ 35 RDTSC is already synchronous. */
36 alternative_io(ASM_NOP2, "cpuid", X86_FEATURE_SYNC_RDTSC, 36 alternative_io("cpuid", ASM_NOP2, X86_FEATURE_SYNC_RDTSC,
37 "=a" (eax), "0" (1) : "ebx","ecx","edx","memory"); 37 "=a" (eax), "0" (1) : "ebx","ecx","edx","memory");
38 rdtscll(ret); 38 rdtscll(ret);
39 return ret; 39 return ret;
diff --git a/include/asm-xtensa/system.h b/include/asm-xtensa/system.h
index 9284867f1cb9..b29f7ae6a08a 100644
--- a/include/asm-xtensa/system.h
+++ b/include/asm-xtensa/system.h
@@ -111,8 +111,6 @@ extern void *_switch_to(void *last, void *next);
111 111
112#endif /* __ASSEMBLY__ */ 112#endif /* __ASSEMBLY__ */
113 113
114#define prepare_to_switch() do { } while(0)
115
116#define switch_to(prev,next,last) \ 114#define switch_to(prev,next,last) \
117do { \ 115do { \
118 clear_cpenable(); \ 116 clear_cpenable(); \
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index de3eb8d8ae26..da2d107fe2cf 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -45,6 +45,7 @@ extern unsigned long __init bootmem_bootmap_pages (unsigned long);
45extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend); 45extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend);
46extern void __init free_bootmem (unsigned long addr, unsigned long size); 46extern void __init free_bootmem (unsigned long addr, unsigned long size);
47extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal); 47extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal);
48extern void * __init __alloc_bootmem_nopanic (unsigned long size, unsigned long align, unsigned long goal);
48extern void * __init __alloc_bootmem_low(unsigned long size, 49extern void * __init __alloc_bootmem_low(unsigned long size,
49 unsigned long align, 50 unsigned long align,
50 unsigned long goal); 51 unsigned long goal);
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 9b4751aecc23..ff61817082fa 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -21,7 +21,7 @@ enum dma_data_direction {
21#define DMA_30BIT_MASK 0x000000003fffffffULL 21#define DMA_30BIT_MASK 0x000000003fffffffULL
22#define DMA_29BIT_MASK 0x000000001fffffffULL 22#define DMA_29BIT_MASK 0x000000001fffffffULL
23#define DMA_28BIT_MASK 0x000000000fffffffULL 23#define DMA_28BIT_MASK 0x000000000fffffffULL
24#define DMA_24BIT_MASK 0x0000000000ffffffULL 24#define DMA_24BIT_MASK 0x0000000000ffffffULL
25 25
26#include <asm/dma-mapping.h> 26#include <asm/dma-mapping.h>
27 27
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 1e9ebaba07b7..162c6e57307a 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -762,7 +762,7 @@ extern int fcntl_getlease(struct file *filp);
762#define SYNC_FILE_RANGE_WRITE 2 762#define SYNC_FILE_RANGE_WRITE 2
763#define SYNC_FILE_RANGE_WAIT_AFTER 4 763#define SYNC_FILE_RANGE_WAIT_AFTER 4
764extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte, 764extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte,
765 int flags); 765 unsigned int flags);
766 766
767/* fs/locks.c */ 767/* fs/locks.c */
768extern void locks_init_lock(struct file_lock *); 768extern void locks_init_lock(struct file_lock *);
@@ -1039,8 +1039,8 @@ struct file_operations {
1039 int (*check_flags)(int); 1039 int (*check_flags)(int);
1040 int (*dir_notify)(struct file *filp, unsigned long arg); 1040 int (*dir_notify)(struct file *filp, unsigned long arg);
1041 int (*flock) (struct file *, int, struct file_lock *); 1041 int (*flock) (struct file *, int, struct file_lock *);
1042 ssize_t (*splice_write)(struct inode *, struct file *, size_t, unsigned int); 1042 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int);
1043 ssize_t (*splice_read)(struct file *, struct inode *, size_t, unsigned int); 1043 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int);
1044}; 1044};
1045 1045
1046struct inode_operations { 1046struct inode_operations {
@@ -1611,8 +1611,17 @@ extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor
1611extern void do_generic_mapping_read(struct address_space *mapping, 1611extern void do_generic_mapping_read(struct address_space *mapping,
1612 struct file_ra_state *, struct file *, 1612 struct file_ra_state *, struct file *,
1613 loff_t *, read_descriptor_t *, read_actor_t); 1613 loff_t *, read_descriptor_t *, read_actor_t);
1614extern ssize_t generic_file_splice_read(struct file *, struct inode *, size_t, unsigned int); 1614
1615extern ssize_t generic_file_splice_write(struct inode *, struct file *, size_t, unsigned int); 1615/* fs/splice.c */
1616extern ssize_t generic_file_splice_read(struct file *,
1617 struct pipe_inode_info *, size_t, unsigned int);
1618extern ssize_t generic_file_splice_write(struct pipe_inode_info *,
1619 struct file *, size_t, unsigned int);
1620extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe,
1621 struct file *out, size_t len, unsigned int flags);
1622extern long do_splice_direct(struct file *in, struct file *out,
1623 size_t len, unsigned int flags);
1624
1616extern void 1625extern void
1617file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); 1626file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
1618extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, 1627extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov,
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 7851e6b520cf..3ac452945a7d 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -57,6 +57,8 @@ struct vm_area_struct;
57 __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ 57 __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \
58 __GFP_NOMEMALLOC|__GFP_HARDWALL) 58 __GFP_NOMEMALLOC|__GFP_HARDWALL)
59 59
60/* This equals 0, but use constants in case they ever change */
61#define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH)
60/* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */ 62/* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */
61#define GFP_ATOMIC (__GFP_HIGH) 63#define GFP_ATOMIC (__GFP_HIGH)
62#define GFP_NOIO (__GFP_WAIT) 64#define GFP_NOIO (__GFP_WAIT)
diff --git a/include/linux/init.h b/include/linux/init.h
index ed0ac7c39fdc..93dcbe1abb4c 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -245,7 +245,8 @@ void __init parse_early_param(void);
245#define __cpuexitdata __exitdata 245#define __cpuexitdata __exitdata
246#endif 246#endif
247 247
248#ifdef CONFIG_MEMORY_HOTPLUG 248#if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) \
249 || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE)
249#define __meminit 250#define __meminit
250#define __meminitdata 251#define __meminitdata
251#define __memexit 252#define __memexit
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index 99905e180532..043376920f51 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -36,6 +36,8 @@
36/* LATCH is used in the interval timer and ftape setup. */ 36/* LATCH is used in the interval timer and ftape setup. */
37#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ 37#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */
38 38
39#define LATCH_HPET ((HPET_TICK_RATE + HZ/2) / HZ)
40
39/* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, the we can 41/* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, the we can
40 * improve accuracy by shifting LSH bits, hence calculating: 42 * improve accuracy by shifting LSH bits, hence calculating:
41 * (NOM << LSH) / DEN 43 * (NOM << LSH) / DEN
@@ -51,9 +53,13 @@
51/* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ 53/* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */
52#define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) 54#define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8))
53 55
56#define ACTHZ_HPET (SH_DIV (HPET_TICK_RATE, LATCH_HPET, 8))
57
54/* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */ 58/* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */
55#define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8)) 59#define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8))
56 60
61#define TICK_NSEC_HPET (SH_DIV(1000000UL * 1000, ACTHZ_HPET, 8))
62
57/* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ 63/* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */
58#define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) 64#define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ)
59 65
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index a3720f973ea5..e1bd0842f6a1 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -176,7 +176,7 @@ static inline void console_verbose(void)
176 176
177extern void bust_spinlocks(int yes); 177extern void bust_spinlocks(int yes);
178extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ 178extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */
179extern __deprecated_for_modules int panic_timeout; 179extern int panic_timeout;
180extern int panic_on_oops; 180extern int panic_on_oops;
181extern int tainted; 181extern int tainted;
182extern const char *print_tainted(void); 182extern const char *print_tainted(void);
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 4617e75903b0..dc23c7c639f3 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -19,39 +19,38 @@ struct class_device;
19 */ 19 */
20 20
21enum led_brightness { 21enum led_brightness {
22 LED_OFF = 0, 22 LED_OFF = 0,
23 LED_HALF = 127, 23 LED_HALF = 127,
24 LED_FULL = 255, 24 LED_FULL = 255,
25}; 25};
26 26
27struct led_classdev { 27struct led_classdev {
28 const char *name; 28 const char *name;
29 int brightness; 29 int brightness;
30 int flags; 30 int flags;
31#define LED_SUSPENDED (1 << 0)
32 31
33 /* A function to set the brightness of the led */ 32#define LED_SUSPENDED (1 << 0)
34 void (*brightness_set)(struct led_classdev *led_cdev,
35 enum led_brightness brightness);
36 33
37 struct class_device *class_dev; 34 /* Set LED brightness level */
38 /* LED Device linked list */ 35 void (*brightness_set)(struct led_classdev *led_cdev,
39 struct list_head node; 36 enum led_brightness brightness);
37
38 struct class_device *class_dev;
39 struct list_head node; /* LED Device list */
40 char *default_trigger; /* Trigger to use */
40 41
41 /* Trigger data */
42 char *default_trigger;
43#ifdef CONFIG_LEDS_TRIGGERS 42#ifdef CONFIG_LEDS_TRIGGERS
44 rwlock_t trigger_lock;
45 /* Protects the trigger data below */ 43 /* Protects the trigger data below */
44 rwlock_t trigger_lock;
46 45
47 struct led_trigger *trigger; 46 struct led_trigger *trigger;
48 struct list_head trig_list; 47 struct list_head trig_list;
49 void *trigger_data; 48 void *trigger_data;
50#endif 49#endif
51}; 50};
52 51
53extern int led_classdev_register(struct device *parent, 52extern int led_classdev_register(struct device *parent,
54 struct led_classdev *led_cdev); 53 struct led_classdev *led_cdev);
55extern void led_classdev_unregister(struct led_classdev *led_cdev); 54extern void led_classdev_unregister(struct led_classdev *led_cdev);
56extern void led_classdev_suspend(struct led_classdev *led_cdev); 55extern void led_classdev_suspend(struct led_classdev *led_cdev);
57extern void led_classdev_resume(struct led_classdev *led_cdev); 56extern void led_classdev_resume(struct led_classdev *led_cdev);
@@ -65,16 +64,16 @@ extern void led_classdev_resume(struct led_classdev *led_cdev);
65 64
66struct led_trigger { 65struct led_trigger {
67 /* Trigger Properties */ 66 /* Trigger Properties */
68 const char *name; 67 const char *name;
69 void (*activate)(struct led_classdev *led_cdev); 68 void (*activate)(struct led_classdev *led_cdev);
70 void (*deactivate)(struct led_classdev *led_cdev); 69 void (*deactivate)(struct led_classdev *led_cdev);
71 70
72 /* LEDs under control by this trigger (for simple triggers) */ 71 /* LEDs under control by this trigger (for simple triggers) */
73 rwlock_t leddev_list_lock; 72 rwlock_t leddev_list_lock;
74 struct list_head led_cdevs; 73 struct list_head led_cdevs;
75 74
76 /* Link to next registered trigger */ 75 /* Link to next registered trigger */
77 struct list_head next_trig; 76 struct list_head next_trig;
78}; 77};
79 78
80/* Registration functions for complex triggers */ 79/* Registration functions for complex triggers */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 44d074ff7789..bf86ee474533 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -33,6 +33,7 @@
33#include <asm/io.h> 33#include <asm/io.h>
34#include <linux/ata.h> 34#include <linux/ata.h>
35#include <linux/workqueue.h> 35#include <linux/workqueue.h>
36#include <scsi/scsi_host.h>
36 37
37/* 38/*
38 * compile-time options: to be removed as soon as all the drivers are 39 * compile-time options: to be removed as soon as all the drivers are
@@ -248,7 +249,7 @@ struct ata_queued_cmd;
248/* typedefs */ 249/* typedefs */
249typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); 250typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc);
250typedef void (*ata_probeinit_fn_t)(struct ata_port *); 251typedef void (*ata_probeinit_fn_t)(struct ata_port *);
251typedef int (*ata_reset_fn_t)(struct ata_port *, int, unsigned int *); 252typedef int (*ata_reset_fn_t)(struct ata_port *, unsigned int *);
252typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *); 253typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *);
253 254
254struct ata_ioports { 255struct ata_ioports {
@@ -499,15 +500,14 @@ extern void ata_port_probe(struct ata_port *);
499extern void __sata_phy_reset(struct ata_port *ap); 500extern void __sata_phy_reset(struct ata_port *ap);
500extern void sata_phy_reset(struct ata_port *ap); 501extern void sata_phy_reset(struct ata_port *ap);
501extern void ata_bus_reset(struct ata_port *ap); 502extern void ata_bus_reset(struct ata_port *ap);
503extern int ata_set_sata_spd(struct ata_port *ap);
502extern int ata_drive_probe_reset(struct ata_port *ap, 504extern int ata_drive_probe_reset(struct ata_port *ap,
503 ata_probeinit_fn_t probeinit, 505 ata_probeinit_fn_t probeinit,
504 ata_reset_fn_t softreset, ata_reset_fn_t hardreset, 506 ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
505 ata_postreset_fn_t postreset, unsigned int *classes); 507 ata_postreset_fn_t postreset, unsigned int *classes);
506extern void ata_std_probeinit(struct ata_port *ap); 508extern void ata_std_probeinit(struct ata_port *ap);
507extern int ata_std_softreset(struct ata_port *ap, int verbose, 509extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes);
508 unsigned int *classes); 510extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class);
509extern int sata_std_hardreset(struct ata_port *ap, int verbose,
510 unsigned int *class);
511extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); 511extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes);
512extern int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev, 512extern int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev,
513 int post_reset); 513 int post_reset);
@@ -526,6 +526,8 @@ extern void ata_host_set_remove(struct ata_host_set *host_set);
526extern int ata_scsi_detect(struct scsi_host_template *sht); 526extern int ata_scsi_detect(struct scsi_host_template *sht);
527extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); 527extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
528extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); 528extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
529extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
530extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
529extern int ata_scsi_release(struct Scsi_Host *host); 531extern int ata_scsi_release(struct Scsi_Host *host);
530extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); 532extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc);
531extern int ata_scsi_device_resume(struct scsi_device *); 533extern int ata_scsi_device_resume(struct scsi_device *);
@@ -538,6 +540,9 @@ extern unsigned int ata_busy_sleep(struct ata_port *ap,
538 unsigned long timeout); 540 unsigned long timeout);
539extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *), 541extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *),
540 void *data, unsigned long delay); 542 void *data, unsigned long delay);
543extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val,
544 unsigned long interval_msec,
545 unsigned long timeout_msec);
541 546
542/* 547/*
543 * Default driver ops implementations 548 * Default driver ops implementations
@@ -631,7 +636,6 @@ extern unsigned long ata_pci_default_filter(const struct ata_port *, struct ata_
631/* 636/*
632 * EH 637 * EH
633 */ 638 */
634extern int ata_scsi_error(struct Scsi_Host *host);
635extern void ata_eng_timeout(struct ata_port *ap); 639extern void ata_eng_timeout(struct ata_port *ap);
636extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); 640extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
637extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); 641extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
@@ -972,4 +976,9 @@ static inline void ata_pad_free(struct ata_port *ap, struct device *dev)
972 dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); 976 dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma);
973} 977}
974 978
979static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)
980{
981 return (struct ata_port *) &host->hostdata[0];
982}
983
975#endif /* __LINUX_LIBATA_H__ */ 984#endif /* __LINUX_LIBATA_H__ */
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 968b1aa3732c..4ca3e6ad03ec 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -58,8 +58,6 @@ extern int add_one_highpage(struct page *page, int pfn, int bad_ppro);
58/* need some defines for these for archs that don't support it */ 58/* need some defines for these for archs that don't support it */
59extern void online_page(struct page *page); 59extern void online_page(struct page *page);
60/* VM interface that may be used by firmware interface */ 60/* VM interface that may be used by firmware interface */
61extern int add_memory(u64 start, u64 size);
62extern int remove_memory(u64 start, u64 size);
63extern int online_pages(unsigned long, unsigned long); 61extern int online_pages(unsigned long, unsigned long);
64 62
65/* reasonably generic interface to expand the physical pages in a zone */ 63/* reasonably generic interface to expand the physical pages in a zone */
@@ -92,11 +90,6 @@ static inline int mhp_notimplemented(const char *func)
92 return -ENOSYS; 90 return -ENOSYS;
93} 91}
94 92
95static inline int __add_pages(struct zone *zone, unsigned long start_pfn,
96 unsigned long nr_pages)
97{
98 return mhp_notimplemented(__FUNCTION__);
99}
100#endif /* ! CONFIG_MEMORY_HOTPLUG */ 93#endif /* ! CONFIG_MEMORY_HOTPLUG */
101static inline int __remove_pages(struct zone *zone, unsigned long start_pfn, 94static inline int __remove_pages(struct zone *zone, unsigned long start_pfn,
102 unsigned long nr_pages) 95 unsigned long nr_pages)
@@ -105,4 +98,11 @@ static inline int __remove_pages(struct zone *zone, unsigned long start_pfn,
105 dump_stack(); 98 dump_stack();
106 return -ENOSYS; 99 return -ENOSYS;
107} 100}
101
102#if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) \
103 || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE)
104extern int add_memory(u64 start, u64 size);
105extern int remove_memory(u64 start, u64 size);
106#endif
107
108#endif /* __LINUX_MEMORY_HOTPLUG_H */ 108#endif /* __LINUX_MEMORY_HOTPLUG_H */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 6aa016f1d3ae..1154684209a4 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -229,10 +229,9 @@ struct page {
229 unsigned long private; /* Mapping-private opaque data: 229 unsigned long private; /* Mapping-private opaque data:
230 * usually used for buffer_heads 230 * usually used for buffer_heads
231 * if PagePrivate set; used for 231 * if PagePrivate set; used for
232 * swp_entry_t if PageSwapCache. 232 * swp_entry_t if PageSwapCache;
233 * When page is free, this
234 * indicates order in the buddy 233 * indicates order in the buddy
235 * system. 234 * system if PG_buddy is set.
236 */ 235 */
237 struct address_space *mapping; /* If low bit clear, points to 236 struct address_space *mapping; /* If low bit clear, points to
238 * inode address_space, or NULL. 237 * inode address_space, or NULL.
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 412e52ca9720..b31a9bca9361 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -110,6 +110,8 @@ struct nf_info
110/* Function to register/unregister hook points. */ 110/* Function to register/unregister hook points. */
111int nf_register_hook(struct nf_hook_ops *reg); 111int nf_register_hook(struct nf_hook_ops *reg);
112void nf_unregister_hook(struct nf_hook_ops *reg); 112void nf_unregister_hook(struct nf_hook_ops *reg);
113int nf_register_hooks(struct nf_hook_ops *reg, unsigned int n);
114void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n);
113 115
114/* Functions to register get/setsockopt ranges (non-inclusive). You 116/* Functions to register get/setsockopt ranges (non-inclusive). You
115 need to check permissions yourself! */ 117 need to check permissions yourself! */
@@ -281,16 +283,42 @@ extern void nf_invalidate_cache(int pf);
281 Returns true or false. */ 283 Returns true or false. */
282extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len); 284extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len);
283 285
284struct nf_queue_rerouter { 286struct nf_afinfo {
285 void (*save)(const struct sk_buff *skb, struct nf_info *info); 287 unsigned short family;
286 int (*reroute)(struct sk_buff **skb, const struct nf_info *info); 288 unsigned int (*checksum)(struct sk_buff *skb, unsigned int hook,
287 int rer_size; 289 unsigned int dataoff, u_int8_t protocol);
290 void (*saveroute)(const struct sk_buff *skb,
291 struct nf_info *info);
292 int (*reroute)(struct sk_buff **skb,
293 const struct nf_info *info);
294 int route_key_size;
288}; 295};
289 296
290#define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info)) 297extern struct nf_afinfo *nf_afinfo[];
298static inline struct nf_afinfo *nf_get_afinfo(unsigned short family)
299{
300 return rcu_dereference(nf_afinfo[family]);
301}
302
303static inline unsigned int
304nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff,
305 u_int8_t protocol, unsigned short family)
306{
307 struct nf_afinfo *afinfo;
308 unsigned int csum = 0;
309
310 rcu_read_lock();
311 afinfo = nf_get_afinfo(family);
312 if (afinfo)
313 csum = afinfo->checksum(skb, hook, dataoff, protocol);
314 rcu_read_unlock();
315 return csum;
316}
291 317
292extern int nf_register_queue_rerouter(int pf, struct nf_queue_rerouter *rer); 318extern int nf_register_afinfo(struct nf_afinfo *afinfo);
293extern int nf_unregister_queue_rerouter(int pf); 319extern void nf_unregister_afinfo(struct nf_afinfo *afinfo);
320
321#define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info))
294 322
295#include <net/flow.h> 323#include <net/flow.h>
296extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); 324extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *);
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h
index 43c09d790b83..85301c5e8d24 100644
--- a/include/linux/netfilter_ipv4.h
+++ b/include/linux/netfilter_ipv4.h
@@ -80,6 +80,8 @@ enum nf_ip_hook_priorities {
80#ifdef __KERNEL__ 80#ifdef __KERNEL__
81extern int ip_route_me_harder(struct sk_buff **pskb); 81extern int ip_route_me_harder(struct sk_buff **pskb);
82extern int ip_xfrm_me_harder(struct sk_buff **pskb); 82extern int ip_xfrm_me_harder(struct sk_buff **pskb);
83extern unsigned int nf_ip_checksum(struct sk_buff *skb, unsigned int hook,
84 unsigned int dataoff, u_int8_t protocol);
83#endif /*__KERNEL__*/ 85#endif /*__KERNEL__*/
84 86
85#endif /*__LINUX_IP_NETFILTER_H*/ 87#endif /*__LINUX_IP_NETFILTER_H*/
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_h323.h b/include/linux/netfilter_ipv4/ip_conntrack_h323.h
index 0987cea53840..eace86bd2adb 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack_h323.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack_h323.h
@@ -3,6 +3,8 @@
3 3
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
6#include <linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h>
7
6#define RAS_PORT 1719 8#define RAS_PORT 1719
7#define Q931_PORT 1720 9#define Q931_PORT 1720
8#define H323_RTP_CHANNEL_MAX 4 /* Audio, video, FAX and other */ 10#define H323_RTP_CHANNEL_MAX 4 /* Audio, video, FAX and other */
@@ -25,6 +27,56 @@ struct ip_ct_h323_master {
25 }; 27 };
26}; 28};
27 29
30struct ip_conntrack_expect;
31
32extern int get_h225_addr(unsigned char *data, TransportAddress * addr,
33 u_int32_t * ip, u_int16_t * port);
34extern void ip_conntrack_h245_expect(struct ip_conntrack *new,
35 struct ip_conntrack_expect *this);
36extern void ip_conntrack_q931_expect(struct ip_conntrack *new,
37 struct ip_conntrack_expect *this);
38extern int (*set_h245_addr_hook) (struct sk_buff ** pskb,
39 unsigned char **data, int dataoff,
40 H245_TransportAddress * addr,
41 u_int32_t ip, u_int16_t port);
42extern int (*set_h225_addr_hook) (struct sk_buff ** pskb,
43 unsigned char **data, int dataoff,
44 TransportAddress * addr,
45 u_int32_t ip, u_int16_t port);
46extern int (*set_sig_addr_hook) (struct sk_buff ** pskb,
47 struct ip_conntrack * ct,
48 enum ip_conntrack_info ctinfo,
49 unsigned char **data,
50 TransportAddress * addr, int count);
51extern int (*set_ras_addr_hook) (struct sk_buff ** pskb,
52 struct ip_conntrack * ct,
53 enum ip_conntrack_info ctinfo,
54 unsigned char **data,
55 TransportAddress * addr, int count);
56extern int (*nat_rtp_rtcp_hook) (struct sk_buff ** pskb,
57 struct ip_conntrack * ct,
58 enum ip_conntrack_info ctinfo,
59 unsigned char **data, int dataoff,
60 H245_TransportAddress * addr,
61 u_int16_t port, u_int16_t rtp_port,
62 struct ip_conntrack_expect * rtp_exp,
63 struct ip_conntrack_expect * rtcp_exp);
64extern int (*nat_t120_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct,
65 enum ip_conntrack_info ctinfo,
66 unsigned char **data, int dataoff,
67 H245_TransportAddress * addr, u_int16_t port,
68 struct ip_conntrack_expect * exp);
69extern int (*nat_h245_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct,
70 enum ip_conntrack_info ctinfo,
71 unsigned char **data, int dataoff,
72 TransportAddress * addr, u_int16_t port,
73 struct ip_conntrack_expect * exp);
74extern int (*nat_q931_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct,
75 enum ip_conntrack_info ctinfo,
76 unsigned char **data, TransportAddress * addr,
77 int idx, u_int16_t port,
78 struct ip_conntrack_expect * exp);
79
28#endif 80#endif
29 81
30#endif 82#endif
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h
new file mode 100644
index 000000000000..0bd828081c0c
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h
@@ -0,0 +1,98 @@
1/****************************************************************************
2 * ip_conntrack_helper_h323_asn1.h - BER and PER decoding library for H.323
3 * conntrack/NAT module.
4 *
5 * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@hotmail.com>
6 *
7 * This source code is licensed under General Public License version 2.
8 *
9 *
10 * This library is based on H.225 version 4, H.235 version 2 and H.245
11 * version 7. It is extremely optimized to decode only the absolutely
12 * necessary objects in a signal for Linux kernel NAT module use, so don't
13 * expect it to be a full ASN.1 library.
14 *
15 * Features:
16 *
17 * 1. Small. The total size of code plus data is less than 20 KB (IA32).
18 * 2. Fast. Decoding Netmeeting's Setup signal 1 million times on a PIII 866
19 * takes only 3.9 seconds.
20 * 3. No memory allocation. It uses a static object. No need to initialize or
21 * cleanup.
22 * 4. Thread safe.
23 * 5. Support embedded architectures that has no misaligned memory access
24 * support.
25 *
26 * Limitations:
27 *
28 * 1. At most 30 faststart entries. Actually this is limited by ethernet's MTU.
29 * If a Setup signal contains more than 30 faststart, the packet size will
30 * very likely exceed the MTU size, then the TPKT will be fragmented. I
31 * don't know how to handle this in a Netfilter module. Anybody can help?
32 * Although I think 30 is enough for most of the cases.
33 * 2. IPv4 addresses only.
34 *
35 ****************************************************************************/
36
37#ifndef _IP_CONNTRACK_HELPER_H323_ASN1_H_
38#define _IP_CONNTRACK_HELPER_H323_ASN1_H_
39
40/*****************************************************************************
41 * H.323 Types
42 ****************************************************************************/
43#include "ip_conntrack_helper_h323_types.h"
44
45typedef struct {
46 enum {
47 Q931_NationalEscape = 0x00,
48 Q931_Alerting = 0x01,
49 Q931_CallProceeding = 0x02,
50 Q931_Connect = 0x07,
51 Q931_ConnectAck = 0x0F,
52 Q931_Progress = 0x03,
53 Q931_Setup = 0x05,
54 Q931_SetupAck = 0x0D,
55 Q931_Resume = 0x26,
56 Q931_ResumeAck = 0x2E,
57 Q931_ResumeReject = 0x22,
58 Q931_Suspend = 0x25,
59 Q931_SuspendAck = 0x2D,
60 Q931_SuspendReject = 0x21,
61 Q931_UserInformation = 0x20,
62 Q931_Disconnect = 0x45,
63 Q931_Release = 0x4D,
64 Q931_ReleaseComplete = 0x5A,
65 Q931_Restart = 0x46,
66 Q931_RestartAck = 0x4E,
67 Q931_Segment = 0x60,
68 Q931_CongestionCtrl = 0x79,
69 Q931_Information = 0x7B,
70 Q931_Notify = 0x6E,
71 Q931_Status = 0x7D,
72 Q931_StatusEnquiry = 0x75,
73 Q931_Facility = 0x62
74 } MessageType;
75 H323_UserInformation UUIE;
76} Q931;
77
78/*****************************************************************************
79 * Decode Functions Return Codes
80 ****************************************************************************/
81
82#define H323_ERROR_NONE 0 /* Decoded successfully */
83#define H323_ERROR_STOP 1 /* Decoding stopped, not really an error */
84#define H323_ERROR_BOUND -1
85#define H323_ERROR_RANGE -2
86
87
88/*****************************************************************************
89 * Decode Functions
90 ****************************************************************************/
91
92int DecodeRasMessage(unsigned char *buf, size_t sz, RasMessage * ras);
93int DecodeQ931(unsigned char *buf, size_t sz, Q931 * q931);
94int DecodeMultimediaSystemControlMessage(unsigned char *buf, size_t sz,
95 MultimediaSystemControlMessage *
96 mscm);
97
98#endif
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h
new file mode 100644
index 000000000000..cc98f7aa5abe
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h
@@ -0,0 +1,938 @@
1/* Generated by Jing Min Zhao's ASN.1 parser, Mar 15 2006
2 *
3 * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net>
4 *
5 * This source code is licensed under General Public License version 2.
6 */
7
8typedef struct TransportAddress_ipAddress { /* SEQUENCE */
9 int options; /* No use */
10 unsigned ip;
11} TransportAddress_ipAddress;
12
13typedef struct TransportAddress { /* CHOICE */
14 enum {
15 eTransportAddress_ipAddress,
16 eTransportAddress_ipSourceRoute,
17 eTransportAddress_ipxAddress,
18 eTransportAddress_ip6Address,
19 eTransportAddress_netBios,
20 eTransportAddress_nsap,
21 eTransportAddress_nonStandardAddress,
22 } choice;
23 union {
24 TransportAddress_ipAddress ipAddress;
25 };
26} TransportAddress;
27
28typedef struct DataProtocolCapability { /* CHOICE */
29 enum {
30 eDataProtocolCapability_nonStandard,
31 eDataProtocolCapability_v14buffered,
32 eDataProtocolCapability_v42lapm,
33 eDataProtocolCapability_hdlcFrameTunnelling,
34 eDataProtocolCapability_h310SeparateVCStack,
35 eDataProtocolCapability_h310SingleVCStack,
36 eDataProtocolCapability_transparent,
37 eDataProtocolCapability_segmentationAndReassembly,
38 eDataProtocolCapability_hdlcFrameTunnelingwSAR,
39 eDataProtocolCapability_v120,
40 eDataProtocolCapability_separateLANStack,
41 eDataProtocolCapability_v76wCompression,
42 eDataProtocolCapability_tcp,
43 eDataProtocolCapability_udp,
44 } choice;
45} DataProtocolCapability;
46
47typedef struct DataApplicationCapability_application { /* CHOICE */
48 enum {
49 eDataApplicationCapability_application_nonStandard,
50 eDataApplicationCapability_application_t120,
51 eDataApplicationCapability_application_dsm_cc,
52 eDataApplicationCapability_application_userData,
53 eDataApplicationCapability_application_t84,
54 eDataApplicationCapability_application_t434,
55 eDataApplicationCapability_application_h224,
56 eDataApplicationCapability_application_nlpid,
57 eDataApplicationCapability_application_dsvdControl,
58 eDataApplicationCapability_application_h222DataPartitioning,
59 eDataApplicationCapability_application_t30fax,
60 eDataApplicationCapability_application_t140,
61 eDataApplicationCapability_application_t38fax,
62 eDataApplicationCapability_application_genericDataCapability,
63 } choice;
64 union {
65 DataProtocolCapability t120;
66 };
67} DataApplicationCapability_application;
68
69typedef struct DataApplicationCapability { /* SEQUENCE */
70 int options; /* No use */
71 DataApplicationCapability_application application;
72} DataApplicationCapability;
73
74typedef struct DataType { /* CHOICE */
75 enum {
76 eDataType_nonStandard,
77 eDataType_nullData,
78 eDataType_videoData,
79 eDataType_audioData,
80 eDataType_data,
81 eDataType_encryptionData,
82 eDataType_h235Control,
83 eDataType_h235Media,
84 eDataType_multiplexedStream,
85 } choice;
86 union {
87 DataApplicationCapability data;
88 };
89} DataType;
90
91typedef struct UnicastAddress_iPAddress { /* SEQUENCE */
92 int options; /* No use */
93 unsigned network;
94} UnicastAddress_iPAddress;
95
96typedef struct UnicastAddress { /* CHOICE */
97 enum {
98 eUnicastAddress_iPAddress,
99 eUnicastAddress_iPXAddress,
100 eUnicastAddress_iP6Address,
101 eUnicastAddress_netBios,
102 eUnicastAddress_iPSourceRouteAddress,
103 eUnicastAddress_nsap,
104 eUnicastAddress_nonStandardAddress,
105 } choice;
106 union {
107 UnicastAddress_iPAddress iPAddress;
108 };
109} UnicastAddress;
110
111typedef struct H245_TransportAddress { /* CHOICE */
112 enum {
113 eH245_TransportAddress_unicastAddress,
114 eH245_TransportAddress_multicastAddress,
115 } choice;
116 union {
117 UnicastAddress unicastAddress;
118 };
119} H245_TransportAddress;
120
121typedef struct H2250LogicalChannelParameters { /* SEQUENCE */
122 enum {
123 eH2250LogicalChannelParameters_nonStandard = (1 << 31),
124 eH2250LogicalChannelParameters_associatedSessionID =
125 (1 << 30),
126 eH2250LogicalChannelParameters_mediaChannel = (1 << 29),
127 eH2250LogicalChannelParameters_mediaGuaranteedDelivery =
128 (1 << 28),
129 eH2250LogicalChannelParameters_mediaControlChannel =
130 (1 << 27),
131 eH2250LogicalChannelParameters_mediaControlGuaranteedDelivery
132 = (1 << 26),
133 eH2250LogicalChannelParameters_silenceSuppression = (1 << 25),
134 eH2250LogicalChannelParameters_destination = (1 << 24),
135 eH2250LogicalChannelParameters_dynamicRTPPayloadType =
136 (1 << 23),
137 eH2250LogicalChannelParameters_mediaPacketization = (1 << 22),
138 eH2250LogicalChannelParameters_transportCapability =
139 (1 << 21),
140 eH2250LogicalChannelParameters_redundancyEncoding = (1 << 20),
141 eH2250LogicalChannelParameters_source = (1 << 19),
142 } options;
143 H245_TransportAddress mediaChannel;
144 H245_TransportAddress mediaControlChannel;
145} H2250LogicalChannelParameters;
146
147typedef struct OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters { /* CHOICE */
148 enum {
149 eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h222LogicalChannelParameters,
150 eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h223LogicalChannelParameters,
151 eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_v76LogicalChannelParameters,
152 eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters,
153 eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_none,
154 } choice;
155 union {
156 H2250LogicalChannelParameters h2250LogicalChannelParameters;
157 };
158} OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters;
159
160typedef struct OpenLogicalChannel_forwardLogicalChannelParameters { /* SEQUENCE */
161 enum {
162 eOpenLogicalChannel_forwardLogicalChannelParameters_portNumber
163 = (1 << 31),
164 eOpenLogicalChannel_forwardLogicalChannelParameters_forwardLogicalChannelDependency
165 = (1 << 30),
166 eOpenLogicalChannel_forwardLogicalChannelParameters_replacementFor
167 = (1 << 29),
168 } options;
169 DataType dataType;
170 OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters
171 multiplexParameters;
172} OpenLogicalChannel_forwardLogicalChannelParameters;
173
174typedef struct OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters { /* CHOICE */
175 enum {
176 eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h223LogicalChannelParameters,
177 eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_v76LogicalChannelParameters,
178 eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters,
179 } choice;
180 union {
181 H2250LogicalChannelParameters h2250LogicalChannelParameters;
182 };
183} OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters;
184
185typedef struct OpenLogicalChannel_reverseLogicalChannelParameters { /* SEQUENCE */
186 enum {
187 eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters
188 = (1 << 31),
189 eOpenLogicalChannel_reverseLogicalChannelParameters_reverseLogicalChannelDependency
190 = (1 << 30),
191 eOpenLogicalChannel_reverseLogicalChannelParameters_replacementFor
192 = (1 << 29),
193 } options;
194 OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters
195 multiplexParameters;
196} OpenLogicalChannel_reverseLogicalChannelParameters;
197
198typedef struct NetworkAccessParameters_networkAddress { /* CHOICE */
199 enum {
200 eNetworkAccessParameters_networkAddress_q2931Address,
201 eNetworkAccessParameters_networkAddress_e164Address,
202 eNetworkAccessParameters_networkAddress_localAreaAddress,
203 } choice;
204 union {
205 H245_TransportAddress localAreaAddress;
206 };
207} NetworkAccessParameters_networkAddress;
208
209typedef struct NetworkAccessParameters { /* SEQUENCE */
210 enum {
211 eNetworkAccessParameters_distribution = (1 << 31),
212 eNetworkAccessParameters_externalReference = (1 << 30),
213 eNetworkAccessParameters_t120SetupProcedure = (1 << 29),
214 } options;
215 NetworkAccessParameters_networkAddress networkAddress;
216} NetworkAccessParameters;
217
218typedef struct OpenLogicalChannel { /* SEQUENCE */
219 enum {
220 eOpenLogicalChannel_reverseLogicalChannelParameters =
221 (1 << 31),
222 eOpenLogicalChannel_separateStack = (1 << 30),
223 eOpenLogicalChannel_encryptionSync = (1 << 29),
224 } options;
225 OpenLogicalChannel_forwardLogicalChannelParameters
226 forwardLogicalChannelParameters;
227 OpenLogicalChannel_reverseLogicalChannelParameters
228 reverseLogicalChannelParameters;
229 NetworkAccessParameters separateStack;
230} OpenLogicalChannel;
231
232typedef struct Setup_UUIE_fastStart { /* SEQUENCE OF */
233 int count;
234 OpenLogicalChannel item[30];
235} Setup_UUIE_fastStart;
236
237typedef struct Setup_UUIE { /* SEQUENCE */
238 enum {
239 eSetup_UUIE_h245Address = (1 << 31),
240 eSetup_UUIE_sourceAddress = (1 << 30),
241 eSetup_UUIE_destinationAddress = (1 << 29),
242 eSetup_UUIE_destCallSignalAddress = (1 << 28),
243 eSetup_UUIE_destExtraCallInfo = (1 << 27),
244 eSetup_UUIE_destExtraCRV = (1 << 26),
245 eSetup_UUIE_callServices = (1 << 25),
246 eSetup_UUIE_sourceCallSignalAddress = (1 << 24),
247 eSetup_UUIE_remoteExtensionAddress = (1 << 23),
248 eSetup_UUIE_callIdentifier = (1 << 22),
249 eSetup_UUIE_h245SecurityCapability = (1 << 21),
250 eSetup_UUIE_tokens = (1 << 20),
251 eSetup_UUIE_cryptoTokens = (1 << 19),
252 eSetup_UUIE_fastStart = (1 << 18),
253 eSetup_UUIE_mediaWaitForConnect = (1 << 17),
254 eSetup_UUIE_canOverlapSend = (1 << 16),
255 eSetup_UUIE_endpointIdentifier = (1 << 15),
256 eSetup_UUIE_multipleCalls = (1 << 14),
257 eSetup_UUIE_maintainConnection = (1 << 13),
258 eSetup_UUIE_connectionParameters = (1 << 12),
259 eSetup_UUIE_language = (1 << 11),
260 eSetup_UUIE_presentationIndicator = (1 << 10),
261 eSetup_UUIE_screeningIndicator = (1 << 9),
262 eSetup_UUIE_serviceControl = (1 << 8),
263 eSetup_UUIE_symmetricOperationRequired = (1 << 7),
264 eSetup_UUIE_capacity = (1 << 6),
265 eSetup_UUIE_circuitInfo = (1 << 5),
266 eSetup_UUIE_desiredProtocols = (1 << 4),
267 eSetup_UUIE_neededFeatures = (1 << 3),
268 eSetup_UUIE_desiredFeatures = (1 << 2),
269 eSetup_UUIE_supportedFeatures = (1 << 1),
270 eSetup_UUIE_parallelH245Control = (1 << 0),
271 } options;
272 TransportAddress h245Address;
273 TransportAddress destCallSignalAddress;
274 TransportAddress sourceCallSignalAddress;
275 Setup_UUIE_fastStart fastStart;
276} Setup_UUIE;
277
278typedef struct CallProceeding_UUIE_fastStart { /* SEQUENCE OF */
279 int count;
280 OpenLogicalChannel item[30];
281} CallProceeding_UUIE_fastStart;
282
283typedef struct CallProceeding_UUIE { /* SEQUENCE */
284 enum {
285 eCallProceeding_UUIE_h245Address = (1 << 31),
286 eCallProceeding_UUIE_callIdentifier = (1 << 30),
287 eCallProceeding_UUIE_h245SecurityMode = (1 << 29),
288 eCallProceeding_UUIE_tokens = (1 << 28),
289 eCallProceeding_UUIE_cryptoTokens = (1 << 27),
290 eCallProceeding_UUIE_fastStart = (1 << 26),
291 eCallProceeding_UUIE_multipleCalls = (1 << 25),
292 eCallProceeding_UUIE_maintainConnection = (1 << 24),
293 eCallProceeding_UUIE_fastConnectRefused = (1 << 23),
294 eCallProceeding_UUIE_featureSet = (1 << 22),
295 } options;
296 TransportAddress h245Address;
297 CallProceeding_UUIE_fastStart fastStart;
298} CallProceeding_UUIE;
299
300typedef struct Connect_UUIE_fastStart { /* SEQUENCE OF */
301 int count;
302 OpenLogicalChannel item[30];
303} Connect_UUIE_fastStart;
304
305typedef struct Connect_UUIE { /* SEQUENCE */
306 enum {
307 eConnect_UUIE_h245Address = (1 << 31),
308 eConnect_UUIE_callIdentifier = (1 << 30),
309 eConnect_UUIE_h245SecurityMode = (1 << 29),
310 eConnect_UUIE_tokens = (1 << 28),
311 eConnect_UUIE_cryptoTokens = (1 << 27),
312 eConnect_UUIE_fastStart = (1 << 26),
313 eConnect_UUIE_multipleCalls = (1 << 25),
314 eConnect_UUIE_maintainConnection = (1 << 24),
315 eConnect_UUIE_language = (1 << 23),
316 eConnect_UUIE_connectedAddress = (1 << 22),
317 eConnect_UUIE_presentationIndicator = (1 << 21),
318 eConnect_UUIE_screeningIndicator = (1 << 20),
319 eConnect_UUIE_fastConnectRefused = (1 << 19),
320 eConnect_UUIE_serviceControl = (1 << 18),
321 eConnect_UUIE_capacity = (1 << 17),
322 eConnect_UUIE_featureSet = (1 << 16),
323 } options;
324 TransportAddress h245Address;
325 Connect_UUIE_fastStart fastStart;
326} Connect_UUIE;
327
328typedef struct Alerting_UUIE_fastStart { /* SEQUENCE OF */
329 int count;
330 OpenLogicalChannel item[30];
331} Alerting_UUIE_fastStart;
332
333typedef struct Alerting_UUIE { /* SEQUENCE */
334 enum {
335 eAlerting_UUIE_h245Address = (1 << 31),
336 eAlerting_UUIE_callIdentifier = (1 << 30),
337 eAlerting_UUIE_h245SecurityMode = (1 << 29),
338 eAlerting_UUIE_tokens = (1 << 28),
339 eAlerting_UUIE_cryptoTokens = (1 << 27),
340 eAlerting_UUIE_fastStart = (1 << 26),
341 eAlerting_UUIE_multipleCalls = (1 << 25),
342 eAlerting_UUIE_maintainConnection = (1 << 24),
343 eAlerting_UUIE_alertingAddress = (1 << 23),
344 eAlerting_UUIE_presentationIndicator = (1 << 22),
345 eAlerting_UUIE_screeningIndicator = (1 << 21),
346 eAlerting_UUIE_fastConnectRefused = (1 << 20),
347 eAlerting_UUIE_serviceControl = (1 << 19),
348 eAlerting_UUIE_capacity = (1 << 18),
349 eAlerting_UUIE_featureSet = (1 << 17),
350 } options;
351 TransportAddress h245Address;
352 Alerting_UUIE_fastStart fastStart;
353} Alerting_UUIE;
354
355typedef struct Information_UUIE_fastStart { /* SEQUENCE OF */
356 int count;
357 OpenLogicalChannel item[30];
358} Information_UUIE_fastStart;
359
360typedef struct Information_UUIE { /* SEQUENCE */
361 enum {
362 eInformation_UUIE_callIdentifier = (1 << 31),
363 eInformation_UUIE_tokens = (1 << 30),
364 eInformation_UUIE_cryptoTokens = (1 << 29),
365 eInformation_UUIE_fastStart = (1 << 28),
366 eInformation_UUIE_fastConnectRefused = (1 << 27),
367 eInformation_UUIE_circuitInfo = (1 << 26),
368 } options;
369 Information_UUIE_fastStart fastStart;
370} Information_UUIE;
371
372typedef struct FacilityReason { /* CHOICE */
373 enum {
374 eFacilityReason_routeCallToGatekeeper,
375 eFacilityReason_callForwarded,
376 eFacilityReason_routeCallToMC,
377 eFacilityReason_undefinedReason,
378 eFacilityReason_conferenceListChoice,
379 eFacilityReason_startH245,
380 eFacilityReason_noH245,
381 eFacilityReason_newTokens,
382 eFacilityReason_featureSetUpdate,
383 eFacilityReason_forwardedElements,
384 eFacilityReason_transportedInformation,
385 } choice;
386} FacilityReason;
387
388typedef struct Facility_UUIE_fastStart { /* SEQUENCE OF */
389 int count;
390 OpenLogicalChannel item[30];
391} Facility_UUIE_fastStart;
392
393typedef struct Facility_UUIE { /* SEQUENCE */
394 enum {
395 eFacility_UUIE_alternativeAddress = (1 << 31),
396 eFacility_UUIE_alternativeAliasAddress = (1 << 30),
397 eFacility_UUIE_conferenceID = (1 << 29),
398 eFacility_UUIE_callIdentifier = (1 << 28),
399 eFacility_UUIE_destExtraCallInfo = (1 << 27),
400 eFacility_UUIE_remoteExtensionAddress = (1 << 26),
401 eFacility_UUIE_tokens = (1 << 25),
402 eFacility_UUIE_cryptoTokens = (1 << 24),
403 eFacility_UUIE_conferences = (1 << 23),
404 eFacility_UUIE_h245Address = (1 << 22),
405 eFacility_UUIE_fastStart = (1 << 21),
406 eFacility_UUIE_multipleCalls = (1 << 20),
407 eFacility_UUIE_maintainConnection = (1 << 19),
408 eFacility_UUIE_fastConnectRefused = (1 << 18),
409 eFacility_UUIE_serviceControl = (1 << 17),
410 eFacility_UUIE_circuitInfo = (1 << 16),
411 eFacility_UUIE_featureSet = (1 << 15),
412 eFacility_UUIE_destinationInfo = (1 << 14),
413 eFacility_UUIE_h245SecurityMode = (1 << 13),
414 } options;
415 FacilityReason reason;
416 TransportAddress h245Address;
417 Facility_UUIE_fastStart fastStart;
418} Facility_UUIE;
419
420typedef struct Progress_UUIE_fastStart { /* SEQUENCE OF */
421 int count;
422 OpenLogicalChannel item[30];
423} Progress_UUIE_fastStart;
424
425typedef struct Progress_UUIE { /* SEQUENCE */
426 enum {
427 eProgress_UUIE_h245Address = (1 << 31),
428 eProgress_UUIE_h245SecurityMode = (1 << 30),
429 eProgress_UUIE_tokens = (1 << 29),
430 eProgress_UUIE_cryptoTokens = (1 << 28),
431 eProgress_UUIE_fastStart = (1 << 27),
432 eProgress_UUIE_multipleCalls = (1 << 26),
433 eProgress_UUIE_maintainConnection = (1 << 25),
434 eProgress_UUIE_fastConnectRefused = (1 << 24),
435 } options;
436 TransportAddress h245Address;
437 Progress_UUIE_fastStart fastStart;
438} Progress_UUIE;
439
440typedef struct H323_UU_PDU_h323_message_body { /* CHOICE */
441 enum {
442 eH323_UU_PDU_h323_message_body_setup,
443 eH323_UU_PDU_h323_message_body_callProceeding,
444 eH323_UU_PDU_h323_message_body_connect,
445 eH323_UU_PDU_h323_message_body_alerting,
446 eH323_UU_PDU_h323_message_body_information,
447 eH323_UU_PDU_h323_message_body_releaseComplete,
448 eH323_UU_PDU_h323_message_body_facility,
449 eH323_UU_PDU_h323_message_body_progress,
450 eH323_UU_PDU_h323_message_body_empty,
451 eH323_UU_PDU_h323_message_body_status,
452 eH323_UU_PDU_h323_message_body_statusInquiry,
453 eH323_UU_PDU_h323_message_body_setupAcknowledge,
454 eH323_UU_PDU_h323_message_body_notify,
455 } choice;
456 union {
457 Setup_UUIE setup;
458 CallProceeding_UUIE callProceeding;
459 Connect_UUIE connect;
460 Alerting_UUIE alerting;
461 Information_UUIE information;
462 Facility_UUIE facility;
463 Progress_UUIE progress;
464 };
465} H323_UU_PDU_h323_message_body;
466
467typedef struct RequestMessage { /* CHOICE */
468 enum {
469 eRequestMessage_nonStandard,
470 eRequestMessage_masterSlaveDetermination,
471 eRequestMessage_terminalCapabilitySet,
472 eRequestMessage_openLogicalChannel,
473 eRequestMessage_closeLogicalChannel,
474 eRequestMessage_requestChannelClose,
475 eRequestMessage_multiplexEntrySend,
476 eRequestMessage_requestMultiplexEntry,
477 eRequestMessage_requestMode,
478 eRequestMessage_roundTripDelayRequest,
479 eRequestMessage_maintenanceLoopRequest,
480 eRequestMessage_communicationModeRequest,
481 eRequestMessage_conferenceRequest,
482 eRequestMessage_multilinkRequest,
483 eRequestMessage_logicalChannelRateRequest,
484 } choice;
485 union {
486 OpenLogicalChannel openLogicalChannel;
487 };
488} RequestMessage;
489
490typedef struct OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters { /* CHOICE */
491 enum {
492 eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters_h222LogicalChannelParameters,
493 eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters,
494 } choice;
495 union {
496 H2250LogicalChannelParameters h2250LogicalChannelParameters;
497 };
498} OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters;
499
500typedef struct OpenLogicalChannelAck_reverseLogicalChannelParameters { /* SEQUENCE */
501 enum {
502 eOpenLogicalChannelAck_reverseLogicalChannelParameters_portNumber
503 = (1 << 31),
504 eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters
505 = (1 << 30),
506 eOpenLogicalChannelAck_reverseLogicalChannelParameters_replacementFor
507 = (1 << 29),
508 } options;
509 OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters
510 multiplexParameters;
511} OpenLogicalChannelAck_reverseLogicalChannelParameters;
512
513typedef struct H2250LogicalChannelAckParameters { /* SEQUENCE */
514 enum {
515 eH2250LogicalChannelAckParameters_nonStandard = (1 << 31),
516 eH2250LogicalChannelAckParameters_sessionID = (1 << 30),
517 eH2250LogicalChannelAckParameters_mediaChannel = (1 << 29),
518 eH2250LogicalChannelAckParameters_mediaControlChannel =
519 (1 << 28),
520 eH2250LogicalChannelAckParameters_dynamicRTPPayloadType =
521 (1 << 27),
522 eH2250LogicalChannelAckParameters_flowControlToZero =
523 (1 << 26),
524 eH2250LogicalChannelAckParameters_portNumber = (1 << 25),
525 } options;
526 H245_TransportAddress mediaChannel;
527 H245_TransportAddress mediaControlChannel;
528} H2250LogicalChannelAckParameters;
529
530typedef struct OpenLogicalChannelAck_forwardMultiplexAckParameters { /* CHOICE */
531 enum {
532 eOpenLogicalChannelAck_forwardMultiplexAckParameters_h2250LogicalChannelAckParameters,
533 } choice;
534 union {
535 H2250LogicalChannelAckParameters
536 h2250LogicalChannelAckParameters;
537 };
538} OpenLogicalChannelAck_forwardMultiplexAckParameters;
539
540typedef struct OpenLogicalChannelAck { /* SEQUENCE */
541 enum {
542 eOpenLogicalChannelAck_reverseLogicalChannelParameters =
543 (1 << 31),
544 eOpenLogicalChannelAck_separateStack = (1 << 30),
545 eOpenLogicalChannelAck_forwardMultiplexAckParameters =
546 (1 << 29),
547 eOpenLogicalChannelAck_encryptionSync = (1 << 28),
548 } options;
549 OpenLogicalChannelAck_reverseLogicalChannelParameters
550 reverseLogicalChannelParameters;
551 OpenLogicalChannelAck_forwardMultiplexAckParameters
552 forwardMultiplexAckParameters;
553} OpenLogicalChannelAck;
554
555typedef struct ResponseMessage { /* CHOICE */
556 enum {
557 eResponseMessage_nonStandard,
558 eResponseMessage_masterSlaveDeterminationAck,
559 eResponseMessage_masterSlaveDeterminationReject,
560 eResponseMessage_terminalCapabilitySetAck,
561 eResponseMessage_terminalCapabilitySetReject,
562 eResponseMessage_openLogicalChannelAck,
563 eResponseMessage_openLogicalChannelReject,
564 eResponseMessage_closeLogicalChannelAck,
565 eResponseMessage_requestChannelCloseAck,
566 eResponseMessage_requestChannelCloseReject,
567 eResponseMessage_multiplexEntrySendAck,
568 eResponseMessage_multiplexEntrySendReject,
569 eResponseMessage_requestMultiplexEntryAck,
570 eResponseMessage_requestMultiplexEntryReject,
571 eResponseMessage_requestModeAck,
572 eResponseMessage_requestModeReject,
573 eResponseMessage_roundTripDelayResponse,
574 eResponseMessage_maintenanceLoopAck,
575 eResponseMessage_maintenanceLoopReject,
576 eResponseMessage_communicationModeResponse,
577 eResponseMessage_conferenceResponse,
578 eResponseMessage_multilinkResponse,
579 eResponseMessage_logicalChannelRateAcknowledge,
580 eResponseMessage_logicalChannelRateReject,
581 } choice;
582 union {
583 OpenLogicalChannelAck openLogicalChannelAck;
584 };
585} ResponseMessage;
586
587typedef struct MultimediaSystemControlMessage { /* CHOICE */
588 enum {
589 eMultimediaSystemControlMessage_request,
590 eMultimediaSystemControlMessage_response,
591 eMultimediaSystemControlMessage_command,
592 eMultimediaSystemControlMessage_indication,
593 } choice;
594 union {
595 RequestMessage request;
596 ResponseMessage response;
597 };
598} MultimediaSystemControlMessage;
599
600typedef struct H323_UU_PDU_h245Control { /* SEQUENCE OF */
601 int count;
602 MultimediaSystemControlMessage item[4];
603} H323_UU_PDU_h245Control;
604
605typedef struct H323_UU_PDU { /* SEQUENCE */
606 enum {
607 eH323_UU_PDU_nonStandardData = (1 << 31),
608 eH323_UU_PDU_h4501SupplementaryService = (1 << 30),
609 eH323_UU_PDU_h245Tunneling = (1 << 29),
610 eH323_UU_PDU_h245Control = (1 << 28),
611 eH323_UU_PDU_nonStandardControl = (1 << 27),
612 eH323_UU_PDU_callLinkage = (1 << 26),
613 eH323_UU_PDU_tunnelledSignallingMessage = (1 << 25),
614 eH323_UU_PDU_provisionalRespToH245Tunneling = (1 << 24),
615 eH323_UU_PDU_stimulusControl = (1 << 23),
616 eH323_UU_PDU_genericData = (1 << 22),
617 } options;
618 H323_UU_PDU_h323_message_body h323_message_body;
619 H323_UU_PDU_h245Control h245Control;
620} H323_UU_PDU;
621
622typedef struct H323_UserInformation { /* SEQUENCE */
623 enum {
624 eH323_UserInformation_user_data = (1 << 31),
625 } options;
626 H323_UU_PDU h323_uu_pdu;
627} H323_UserInformation;
628
629typedef struct GatekeeperRequest { /* SEQUENCE */
630 enum {
631 eGatekeeperRequest_nonStandardData = (1 << 31),
632 eGatekeeperRequest_gatekeeperIdentifier = (1 << 30),
633 eGatekeeperRequest_callServices = (1 << 29),
634 eGatekeeperRequest_endpointAlias = (1 << 28),
635 eGatekeeperRequest_alternateEndpoints = (1 << 27),
636 eGatekeeperRequest_tokens = (1 << 26),
637 eGatekeeperRequest_cryptoTokens = (1 << 25),
638 eGatekeeperRequest_authenticationCapability = (1 << 24),
639 eGatekeeperRequest_algorithmOIDs = (1 << 23),
640 eGatekeeperRequest_integrity = (1 << 22),
641 eGatekeeperRequest_integrityCheckValue = (1 << 21),
642 eGatekeeperRequest_supportsAltGK = (1 << 20),
643 eGatekeeperRequest_featureSet = (1 << 19),
644 eGatekeeperRequest_genericData = (1 << 18),
645 } options;
646 TransportAddress rasAddress;
647} GatekeeperRequest;
648
649typedef struct GatekeeperConfirm { /* SEQUENCE */
650 enum {
651 eGatekeeperConfirm_nonStandardData = (1 << 31),
652 eGatekeeperConfirm_gatekeeperIdentifier = (1 << 30),
653 eGatekeeperConfirm_alternateGatekeeper = (1 << 29),
654 eGatekeeperConfirm_authenticationMode = (1 << 28),
655 eGatekeeperConfirm_tokens = (1 << 27),
656 eGatekeeperConfirm_cryptoTokens = (1 << 26),
657 eGatekeeperConfirm_algorithmOID = (1 << 25),
658 eGatekeeperConfirm_integrity = (1 << 24),
659 eGatekeeperConfirm_integrityCheckValue = (1 << 23),
660 eGatekeeperConfirm_featureSet = (1 << 22),
661 eGatekeeperConfirm_genericData = (1 << 21),
662 } options;
663 TransportAddress rasAddress;
664} GatekeeperConfirm;
665
666typedef struct RegistrationRequest_callSignalAddress { /* SEQUENCE OF */
667 int count;
668 TransportAddress item[10];
669} RegistrationRequest_callSignalAddress;
670
671typedef struct RegistrationRequest_rasAddress { /* SEQUENCE OF */
672 int count;
673 TransportAddress item[10];
674} RegistrationRequest_rasAddress;
675
676typedef struct RegistrationRequest { /* SEQUENCE */
677 enum {
678 eRegistrationRequest_nonStandardData = (1 << 31),
679 eRegistrationRequest_terminalAlias = (1 << 30),
680 eRegistrationRequest_gatekeeperIdentifier = (1 << 29),
681 eRegistrationRequest_alternateEndpoints = (1 << 28),
682 eRegistrationRequest_timeToLive = (1 << 27),
683 eRegistrationRequest_tokens = (1 << 26),
684 eRegistrationRequest_cryptoTokens = (1 << 25),
685 eRegistrationRequest_integrityCheckValue = (1 << 24),
686 eRegistrationRequest_keepAlive = (1 << 23),
687 eRegistrationRequest_endpointIdentifier = (1 << 22),
688 eRegistrationRequest_willSupplyUUIEs = (1 << 21),
689 eRegistrationRequest_maintainConnection = (1 << 20),
690 eRegistrationRequest_alternateTransportAddresses = (1 << 19),
691 eRegistrationRequest_additiveRegistration = (1 << 18),
692 eRegistrationRequest_terminalAliasPattern = (1 << 17),
693 eRegistrationRequest_supportsAltGK = (1 << 16),
694 eRegistrationRequest_usageReportingCapability = (1 << 15),
695 eRegistrationRequest_multipleCalls = (1 << 14),
696 eRegistrationRequest_supportedH248Packages = (1 << 13),
697 eRegistrationRequest_callCreditCapability = (1 << 12),
698 eRegistrationRequest_capacityReportingCapability = (1 << 11),
699 eRegistrationRequest_capacity = (1 << 10),
700 eRegistrationRequest_featureSet = (1 << 9),
701 eRegistrationRequest_genericData = (1 << 8),
702 } options;
703 RegistrationRequest_callSignalAddress callSignalAddress;
704 RegistrationRequest_rasAddress rasAddress;
705 unsigned timeToLive;
706} RegistrationRequest;
707
708typedef struct RegistrationConfirm_callSignalAddress { /* SEQUENCE OF */
709 int count;
710 TransportAddress item[10];
711} RegistrationConfirm_callSignalAddress;
712
713typedef struct RegistrationConfirm { /* SEQUENCE */
714 enum {
715 eRegistrationConfirm_nonStandardData = (1 << 31),
716 eRegistrationConfirm_terminalAlias = (1 << 30),
717 eRegistrationConfirm_gatekeeperIdentifier = (1 << 29),
718 eRegistrationConfirm_alternateGatekeeper = (1 << 28),
719 eRegistrationConfirm_timeToLive = (1 << 27),
720 eRegistrationConfirm_tokens = (1 << 26),
721 eRegistrationConfirm_cryptoTokens = (1 << 25),
722 eRegistrationConfirm_integrityCheckValue = (1 << 24),
723 eRegistrationConfirm_willRespondToIRR = (1 << 23),
724 eRegistrationConfirm_preGrantedARQ = (1 << 22),
725 eRegistrationConfirm_maintainConnection = (1 << 21),
726 eRegistrationConfirm_serviceControl = (1 << 20),
727 eRegistrationConfirm_supportsAdditiveRegistration = (1 << 19),
728 eRegistrationConfirm_terminalAliasPattern = (1 << 18),
729 eRegistrationConfirm_supportedPrefixes = (1 << 17),
730 eRegistrationConfirm_usageSpec = (1 << 16),
731 eRegistrationConfirm_featureServerAlias = (1 << 15),
732 eRegistrationConfirm_capacityReportingSpec = (1 << 14),
733 eRegistrationConfirm_featureSet = (1 << 13),
734 eRegistrationConfirm_genericData = (1 << 12),
735 } options;
736 RegistrationConfirm_callSignalAddress callSignalAddress;
737 unsigned timeToLive;
738} RegistrationConfirm;
739
740typedef struct UnregistrationRequest_callSignalAddress { /* SEQUENCE OF */
741 int count;
742 TransportAddress item[10];
743} UnregistrationRequest_callSignalAddress;
744
745typedef struct UnregistrationRequest { /* SEQUENCE */
746 enum {
747 eUnregistrationRequest_endpointAlias = (1 << 31),
748 eUnregistrationRequest_nonStandardData = (1 << 30),
749 eUnregistrationRequest_endpointIdentifier = (1 << 29),
750 eUnregistrationRequest_alternateEndpoints = (1 << 28),
751 eUnregistrationRequest_gatekeeperIdentifier = (1 << 27),
752 eUnregistrationRequest_tokens = (1 << 26),
753 eUnregistrationRequest_cryptoTokens = (1 << 25),
754 eUnregistrationRequest_integrityCheckValue = (1 << 24),
755 eUnregistrationRequest_reason = (1 << 23),
756 eUnregistrationRequest_endpointAliasPattern = (1 << 22),
757 eUnregistrationRequest_supportedPrefixes = (1 << 21),
758 eUnregistrationRequest_alternateGatekeeper = (1 << 20),
759 eUnregistrationRequest_genericData = (1 << 19),
760 } options;
761 UnregistrationRequest_callSignalAddress callSignalAddress;
762} UnregistrationRequest;
763
764typedef struct AdmissionRequest { /* SEQUENCE */
765 enum {
766 eAdmissionRequest_callModel = (1 << 31),
767 eAdmissionRequest_destinationInfo = (1 << 30),
768 eAdmissionRequest_destCallSignalAddress = (1 << 29),
769 eAdmissionRequest_destExtraCallInfo = (1 << 28),
770 eAdmissionRequest_srcCallSignalAddress = (1 << 27),
771 eAdmissionRequest_nonStandardData = (1 << 26),
772 eAdmissionRequest_callServices = (1 << 25),
773 eAdmissionRequest_canMapAlias = (1 << 24),
774 eAdmissionRequest_callIdentifier = (1 << 23),
775 eAdmissionRequest_srcAlternatives = (1 << 22),
776 eAdmissionRequest_destAlternatives = (1 << 21),
777 eAdmissionRequest_gatekeeperIdentifier = (1 << 20),
778 eAdmissionRequest_tokens = (1 << 19),
779 eAdmissionRequest_cryptoTokens = (1 << 18),
780 eAdmissionRequest_integrityCheckValue = (1 << 17),
781 eAdmissionRequest_transportQOS = (1 << 16),
782 eAdmissionRequest_willSupplyUUIEs = (1 << 15),
783 eAdmissionRequest_callLinkage = (1 << 14),
784 eAdmissionRequest_gatewayDataRate = (1 << 13),
785 eAdmissionRequest_capacity = (1 << 12),
786 eAdmissionRequest_circuitInfo = (1 << 11),
787 eAdmissionRequest_desiredProtocols = (1 << 10),
788 eAdmissionRequest_desiredTunnelledProtocol = (1 << 9),
789 eAdmissionRequest_featureSet = (1 << 8),
790 eAdmissionRequest_genericData = (1 << 7),
791 } options;
792 TransportAddress destCallSignalAddress;
793 TransportAddress srcCallSignalAddress;
794} AdmissionRequest;
795
796typedef struct AdmissionConfirm { /* SEQUENCE */
797 enum {
798 eAdmissionConfirm_irrFrequency = (1 << 31),
799 eAdmissionConfirm_nonStandardData = (1 << 30),
800 eAdmissionConfirm_destinationInfo = (1 << 29),
801 eAdmissionConfirm_destExtraCallInfo = (1 << 28),
802 eAdmissionConfirm_destinationType = (1 << 27),
803 eAdmissionConfirm_remoteExtensionAddress = (1 << 26),
804 eAdmissionConfirm_alternateEndpoints = (1 << 25),
805 eAdmissionConfirm_tokens = (1 << 24),
806 eAdmissionConfirm_cryptoTokens = (1 << 23),
807 eAdmissionConfirm_integrityCheckValue = (1 << 22),
808 eAdmissionConfirm_transportQOS = (1 << 21),
809 eAdmissionConfirm_willRespondToIRR = (1 << 20),
810 eAdmissionConfirm_uuiesRequested = (1 << 19),
811 eAdmissionConfirm_language = (1 << 18),
812 eAdmissionConfirm_alternateTransportAddresses = (1 << 17),
813 eAdmissionConfirm_useSpecifiedTransport = (1 << 16),
814 eAdmissionConfirm_circuitInfo = (1 << 15),
815 eAdmissionConfirm_usageSpec = (1 << 14),
816 eAdmissionConfirm_supportedProtocols = (1 << 13),
817 eAdmissionConfirm_serviceControl = (1 << 12),
818 eAdmissionConfirm_multipleCalls = (1 << 11),
819 eAdmissionConfirm_featureSet = (1 << 10),
820 eAdmissionConfirm_genericData = (1 << 9),
821 } options;
822 TransportAddress destCallSignalAddress;
823} AdmissionConfirm;
824
825typedef struct LocationRequest { /* SEQUENCE */
826 enum {
827 eLocationRequest_endpointIdentifier = (1 << 31),
828 eLocationRequest_nonStandardData = (1 << 30),
829 eLocationRequest_sourceInfo = (1 << 29),
830 eLocationRequest_canMapAlias = (1 << 28),
831 eLocationRequest_gatekeeperIdentifier = (1 << 27),
832 eLocationRequest_tokens = (1 << 26),
833 eLocationRequest_cryptoTokens = (1 << 25),
834 eLocationRequest_integrityCheckValue = (1 << 24),
835 eLocationRequest_desiredProtocols = (1 << 23),
836 eLocationRequest_desiredTunnelledProtocol = (1 << 22),
837 eLocationRequest_featureSet = (1 << 21),
838 eLocationRequest_genericData = (1 << 20),
839 eLocationRequest_hopCount = (1 << 19),
840 eLocationRequest_circuitInfo = (1 << 18),
841 } options;
842 TransportAddress replyAddress;
843} LocationRequest;
844
845typedef struct LocationConfirm { /* SEQUENCE */
846 enum {
847 eLocationConfirm_nonStandardData = (1 << 31),
848 eLocationConfirm_destinationInfo = (1 << 30),
849 eLocationConfirm_destExtraCallInfo = (1 << 29),
850 eLocationConfirm_destinationType = (1 << 28),
851 eLocationConfirm_remoteExtensionAddress = (1 << 27),
852 eLocationConfirm_alternateEndpoints = (1 << 26),
853 eLocationConfirm_tokens = (1 << 25),
854 eLocationConfirm_cryptoTokens = (1 << 24),
855 eLocationConfirm_integrityCheckValue = (1 << 23),
856 eLocationConfirm_alternateTransportAddresses = (1 << 22),
857 eLocationConfirm_supportedProtocols = (1 << 21),
858 eLocationConfirm_multipleCalls = (1 << 20),
859 eLocationConfirm_featureSet = (1 << 19),
860 eLocationConfirm_genericData = (1 << 18),
861 eLocationConfirm_circuitInfo = (1 << 17),
862 eLocationConfirm_serviceControl = (1 << 16),
863 } options;
864 TransportAddress callSignalAddress;
865 TransportAddress rasAddress;
866} LocationConfirm;
867
868typedef struct InfoRequestResponse_callSignalAddress { /* SEQUENCE OF */
869 int count;
870 TransportAddress item[10];
871} InfoRequestResponse_callSignalAddress;
872
873typedef struct InfoRequestResponse { /* SEQUENCE */
874 enum {
875 eInfoRequestResponse_nonStandardData = (1 << 31),
876 eInfoRequestResponse_endpointAlias = (1 << 30),
877 eInfoRequestResponse_perCallInfo = (1 << 29),
878 eInfoRequestResponse_tokens = (1 << 28),
879 eInfoRequestResponse_cryptoTokens = (1 << 27),
880 eInfoRequestResponse_integrityCheckValue = (1 << 26),
881 eInfoRequestResponse_needResponse = (1 << 25),
882 eInfoRequestResponse_capacity = (1 << 24),
883 eInfoRequestResponse_irrStatus = (1 << 23),
884 eInfoRequestResponse_unsolicited = (1 << 22),
885 eInfoRequestResponse_genericData = (1 << 21),
886 } options;
887 TransportAddress rasAddress;
888 InfoRequestResponse_callSignalAddress callSignalAddress;
889} InfoRequestResponse;
890
891typedef struct RasMessage { /* CHOICE */
892 enum {
893 eRasMessage_gatekeeperRequest,
894 eRasMessage_gatekeeperConfirm,
895 eRasMessage_gatekeeperReject,
896 eRasMessage_registrationRequest,
897 eRasMessage_registrationConfirm,
898 eRasMessage_registrationReject,
899 eRasMessage_unregistrationRequest,
900 eRasMessage_unregistrationConfirm,
901 eRasMessage_unregistrationReject,
902 eRasMessage_admissionRequest,
903 eRasMessage_admissionConfirm,
904 eRasMessage_admissionReject,
905 eRasMessage_bandwidthRequest,
906 eRasMessage_bandwidthConfirm,
907 eRasMessage_bandwidthReject,
908 eRasMessage_disengageRequest,
909 eRasMessage_disengageConfirm,
910 eRasMessage_disengageReject,
911 eRasMessage_locationRequest,
912 eRasMessage_locationConfirm,
913 eRasMessage_locationReject,
914 eRasMessage_infoRequest,
915 eRasMessage_infoRequestResponse,
916 eRasMessage_nonStandardMessage,
917 eRasMessage_unknownMessageResponse,
918 eRasMessage_requestInProgress,
919 eRasMessage_resourcesAvailableIndicate,
920 eRasMessage_resourcesAvailableConfirm,
921 eRasMessage_infoRequestAck,
922 eRasMessage_infoRequestNak,
923 eRasMessage_serviceControlIndication,
924 eRasMessage_serviceControlResponse,
925 } choice;
926 union {
927 GatekeeperRequest gatekeeperRequest;
928 GatekeeperConfirm gatekeeperConfirm;
929 RegistrationRequest registrationRequest;
930 RegistrationConfirm registrationConfirm;
931 UnregistrationRequest unregistrationRequest;
932 AdmissionRequest admissionRequest;
933 AdmissionConfirm admissionConfirm;
934 LocationRequest locationRequest;
935 LocationConfirm locationConfirm;
936 InfoRequestResponse infoRequestResponse;
937 };
938} RasMessage;
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
index 14f2bd010884..52a7b9e76428 100644
--- a/include/linux/netfilter_ipv6.h
+++ b/include/linux/netfilter_ipv6.h
@@ -73,6 +73,9 @@ enum nf_ip6_hook_priorities {
73}; 73};
74 74
75#ifdef CONFIG_NETFILTER 75#ifdef CONFIG_NETFILTER
76extern unsigned int nf_ip6_checksum(struct sk_buff *skb, unsigned int hook,
77 unsigned int dataoff, u_int8_t protocol);
78
76extern int ipv6_netfilter_init(void); 79extern int ipv6_netfilter_init(void);
77extern void ipv6_netfilter_fini(void); 80extern void ipv6_netfilter_fini(void);
78#else /* CONFIG_NETFILTER */ 81#else /* CONFIG_NETFILTER */
diff --git a/include/linux/numa.h b/include/linux/numa.h
index f0c539bd3cfc..e481feb1bfd8 100644
--- a/include/linux/numa.h
+++ b/include/linux/numa.h
@@ -3,11 +3,9 @@
3 3
4#include <linux/config.h> 4#include <linux/config.h>
5 5
6#ifndef CONFIG_FLATMEM 6#ifdef CONFIG_NODES_SHIFT
7#include <asm/numnodes.h> 7#define NODES_SHIFT CONFIG_NODES_SHIFT
8#endif 8#else
9
10#ifndef NODES_SHIFT
11#define NODES_SHIFT 0 9#define NODES_SHIFT 0
12#endif 10#endif
13 11
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 9ea629c02a4b..d276a4e2f825 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -48,8 +48,20 @@
48 48
49/* 49/*
50 * Don't use the *_dontuse flags. Use the macros. Otherwise you'll break 50 * Don't use the *_dontuse flags. Use the macros. Otherwise you'll break
51 * locked- and dirty-page accounting. The top eight bits of page->flags are 51 * locked- and dirty-page accounting.
52 * used for page->zone, so putting flag bits there doesn't work. 52 *
53 * The page flags field is split into two parts, the main flags area
54 * which extends from the low bits upwards, and the fields area which
55 * extends from the high bits downwards.
56 *
57 * | FIELD | ... | FLAGS |
58 * N-1 ^ 0
59 * (N-FLAGS_RESERVED)
60 *
61 * The fields area is reserved for fields mapping zone, node and SPARSEMEM
62 * section. The boundry between these two areas is defined by
63 * FLAGS_RESERVED which defines the width of the fields section
64 * (see linux/mmzone.h). New flags must _not_ overlap with this area.
53 */ 65 */
54#define PG_locked 0 /* Page is locked. Don't touch. */ 66#define PG_locked 0 /* Page is locked. Don't touch. */
55#define PG_error 1 67#define PG_error 1
@@ -74,7 +86,9 @@
74#define PG_mappedtodisk 16 /* Has blocks allocated on-disk */ 86#define PG_mappedtodisk 16 /* Has blocks allocated on-disk */
75#define PG_reclaim 17 /* To be reclaimed asap */ 87#define PG_reclaim 17 /* To be reclaimed asap */
76#define PG_nosave_free 18 /* Free, should not be written */ 88#define PG_nosave_free 18 /* Free, should not be written */
77#define PG_uncached 19 /* Page has been mapped as uncached */ 89#define PG_buddy 19 /* Page is free, on buddy lists */
90
91#define PG_uncached 20 /* Page has been mapped as uncached */
78 92
79/* 93/*
80 * Global page accounting. One instance per CPU. Only unsigned longs are 94 * Global page accounting. One instance per CPU. Only unsigned longs are
@@ -317,6 +331,10 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta);
317#define SetPageNosaveFree(page) set_bit(PG_nosave_free, &(page)->flags) 331#define SetPageNosaveFree(page) set_bit(PG_nosave_free, &(page)->flags)
318#define ClearPageNosaveFree(page) clear_bit(PG_nosave_free, &(page)->flags) 332#define ClearPageNosaveFree(page) clear_bit(PG_nosave_free, &(page)->flags)
319 333
334#define PageBuddy(page) test_bit(PG_buddy, &(page)->flags)
335#define __SetPageBuddy(page) __set_bit(PG_buddy, &(page)->flags)
336#define __ClearPageBuddy(page) __clear_bit(PG_buddy, &(page)->flags)
337
320#define PageMappedToDisk(page) test_bit(PG_mappedtodisk, &(page)->flags) 338#define PageMappedToDisk(page) test_bit(PG_mappedtodisk, &(page)->flags)
321#define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags) 339#define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags)
322#define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags) 340#define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags)
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index ec384958d509..123a7c24bc72 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -36,27 +36,19 @@ struct pipe_inode_info {
36 unsigned int w_counter; 36 unsigned int w_counter;
37 struct fasync_struct *fasync_readers; 37 struct fasync_struct *fasync_readers;
38 struct fasync_struct *fasync_writers; 38 struct fasync_struct *fasync_writers;
39 struct inode *inode;
39}; 40};
40 41
41/* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual 42/* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual
42 memory allocation, whereas PIPE_BUF makes atomicity guarantees. */ 43 memory allocation, whereas PIPE_BUF makes atomicity guarantees. */
43#define PIPE_SIZE PAGE_SIZE 44#define PIPE_SIZE PAGE_SIZE
44 45
45#define PIPE_MUTEX(inode) (&(inode).i_mutex)
46#define PIPE_WAIT(inode) (&(inode).i_pipe->wait)
47#define PIPE_READERS(inode) ((inode).i_pipe->readers)
48#define PIPE_WRITERS(inode) ((inode).i_pipe->writers)
49#define PIPE_WAITING_WRITERS(inode) ((inode).i_pipe->waiting_writers)
50#define PIPE_RCOUNTER(inode) ((inode).i_pipe->r_counter)
51#define PIPE_WCOUNTER(inode) ((inode).i_pipe->w_counter)
52#define PIPE_FASYNC_READERS(inode) (&((inode).i_pipe->fasync_readers))
53#define PIPE_FASYNC_WRITERS(inode) (&((inode).i_pipe->fasync_writers))
54
55/* Drop the inode semaphore and wait for a pipe event, atomically */ 46/* Drop the inode semaphore and wait for a pipe event, atomically */
56void pipe_wait(struct inode * inode); 47void pipe_wait(struct pipe_inode_info *pipe);
57 48
58struct inode* pipe_new(struct inode* inode); 49struct pipe_inode_info * alloc_pipe_info(struct inode * inode);
59void free_pipe_info(struct inode* inode); 50void free_pipe_info(struct inode * inode);
51void __free_pipe_info(struct pipe_inode_info *);
60 52
61/* 53/*
62 * splice is tied to pipes as a transport (at least for now), so we'll just 54 * splice is tied to pipes as a transport (at least for now), so we'll just
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 135871df9911..4b47a0253425 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -79,7 +79,7 @@ struct kcore_list {
79struct vmcore { 79struct vmcore {
80 struct list_head list; 80 struct list_head list;
81 unsigned long long paddr; 81 unsigned long long paddr;
82 unsigned long size; 82 unsigned long long size;
83 loff_t offset; 83 loff_t offset;
84}; 84};
85 85
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h
index 774e1acfb8c4..f1fbae7e390e 100644
--- a/include/linux/raid/md_p.h
+++ b/include/linux/raid/md_p.h
@@ -227,8 +227,8 @@ struct mdp_superblock_1 {
227 */ 227 */
228 228
229 /* These are only valid with feature bit '4' */ 229 /* These are only valid with feature bit '4' */
230 __u64 reshape_position; /* next address in array-space for reshape */
231 __u32 new_level; /* new level we are reshaping to */ 230 __u32 new_level; /* new level we are reshaping to */
231 __u64 reshape_position; /* next address in array-space for reshape */
232 __u32 delta_disks; /* change in number of raid_disks */ 232 __u32 delta_disks; /* change in number of raid_disks */
233 __u32 new_layout; /* new layout */ 233 __u32 new_layout; /* new layout */
234 __u32 new_chunk; /* new chunk size (bytes) */ 234 __u32 new_chunk; /* new chunk size (bytes) */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 541f4828f5e7..e3539c14e47e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -684,6 +684,7 @@ static inline void prefetch_stack(struct task_struct *t) { }
684 684
685struct audit_context; /* See audit.c */ 685struct audit_context; /* See audit.c */
686struct mempolicy; 686struct mempolicy;
687struct pipe_inode_info;
687 688
688enum sleep_type { 689enum sleep_type {
689 SLEEP_NORMAL, 690 SLEEP_NORMAL,
@@ -882,6 +883,11 @@ struct task_struct {
882 883
883 atomic_t fs_excl; /* holding fs exclusive resources */ 884 atomic_t fs_excl; /* holding fs exclusive resources */
884 struct rcu_head rcu; 885 struct rcu_head rcu;
886
887 /*
888 * cache last used pipe for splice
889 */
890 struct pipe_inode_info *splice_pipe;
885}; 891};
886 892
887static inline pid_t process_group(struct task_struct *tsk) 893static inline pid_t process_group(struct task_struct *tsk)
@@ -1203,9 +1209,10 @@ extern void wait_task_inactive(task_t * p);
1203#define while_each_thread(g, t) \ 1209#define while_each_thread(g, t) \
1204 while ((t = next_thread(t)) != g) 1210 while ((t = next_thread(t)) != g)
1205 1211
1206#define thread_group_leader(p) (p->pid == p->tgid) 1212/* de_thread depends on thread_group_leader not being a pid based check */
1213#define thread_group_leader(p) (p == p->group_leader)
1207 1214
1208static inline task_t *next_thread(task_t *p) 1215static inline task_t *next_thread(const task_t *p)
1209{ 1216{
1210 return list_entry(rcu_dereference(p->thread_group.next), 1217 return list_entry(rcu_dereference(p->thread_group.next),
1211 task_t, thread_group); 1218 task_t, thread_group);
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
index 6336987dae62..2925e66a6732 100644
--- a/include/linux/screen_info.h
+++ b/include/linux/screen_info.h
@@ -41,7 +41,8 @@ struct screen_info {
41 u16 vesapm_off; /* 0x30 */ 41 u16 vesapm_off; /* 0x30 */
42 u16 pages; /* 0x32 */ 42 u16 pages; /* 0x32 */
43 u16 vesa_attributes; /* 0x34 */ 43 u16 vesa_attributes; /* 0x34 */
44 /* 0x36 -- 0x3f reserved for future expansion */ 44 u32 capabilities; /* 0x36 */
45 /* 0x3a -- 0x3f reserved for future expansion */
45}; 46};
46 47
47extern struct screen_info screen_info; 48extern struct screen_info screen_info;
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index fca9b0fb5b4e..5a095572881d 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -73,7 +73,7 @@ static inline int write_tryseqlock(seqlock_t *sl)
73} 73}
74 74
75/* Start of read calculation -- fetch last complete writer token */ 75/* Start of read calculation -- fetch last complete writer token */
76static inline unsigned read_seqbegin(const seqlock_t *sl) 76static __always_inline unsigned read_seqbegin(const seqlock_t *sl)
77{ 77{
78 unsigned ret = sl->sequence; 78 unsigned ret = sl->sequence;
79 smp_rmb(); 79 smp_rmb();
@@ -88,7 +88,7 @@ static inline unsigned read_seqbegin(const seqlock_t *sl)
88 * 88 *
89 * Using xor saves one conditional branch. 89 * Using xor saves one conditional branch.
90 */ 90 */
91static inline int read_seqretry(const seqlock_t *sl, unsigned iv) 91static __always_inline int read_seqretry(const seqlock_t *sl, unsigned iv)
92{ 92{
93 smp_rmb(); 93 smp_rmb();
94 return (iv & 1) | (sl->sequence ^ iv); 94 return (iv & 1) | (sl->sequence ^ iv);
diff --git a/include/linux/string.h b/include/linux/string.h
index dee221429ad0..c61306da8c52 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -13,11 +13,6 @@
13extern "C" { 13extern "C" {
14#endif 14#endif
15 15
16extern char * strpbrk(const char *,const char *);
17extern char * strsep(char **,const char *);
18extern __kernel_size_t strspn(const char *,const char *);
19extern __kernel_size_t strcspn(const char *,const char *);
20
21extern char *strndup_user(const char __user *, long); 16extern char *strndup_user(const char __user *, long);
22 17
23/* 18/*
@@ -70,6 +65,18 @@ extern __kernel_size_t strlen(const char *);
70#ifndef __HAVE_ARCH_STRNLEN 65#ifndef __HAVE_ARCH_STRNLEN
71extern __kernel_size_t strnlen(const char *,__kernel_size_t); 66extern __kernel_size_t strnlen(const char *,__kernel_size_t);
72#endif 67#endif
68#ifndef __HAVE_ARCH_STRPBRK
69extern char * strpbrk(const char *,const char *);
70#endif
71#ifndef __HAVE_ARCH_STRSEP
72extern char * strsep(char **,const char *);
73#endif
74#ifndef __HAVE_ARCH_STRSPN
75extern __kernel_size_t strspn(const char *,const char *);
76#endif
77#ifndef __HAVE_ARCH_STRCSPN
78extern __kernel_size_t strcspn(const char *,const char *);
79#endif
73 80
74#ifndef __HAVE_ARCH_MEMSET 81#ifndef __HAVE_ARCH_MEMSET
75extern void * memset(void *,int,__kernel_size_t); 82extern void * memset(void *,int,__kernel_size_t);
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 50cab2a09f28..503564384545 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -197,15 +197,16 @@ svc_take_res_page(struct svc_rqst *rqstp)
197 return rqstp->rq_respages[rqstp->rq_resused++]; 197 return rqstp->rq_respages[rqstp->rq_resused++];
198} 198}
199 199
200static inline int svc_take_page(struct svc_rqst *rqstp) 200static inline void svc_take_page(struct svc_rqst *rqstp)
201{ 201{
202 if (rqstp->rq_arghi <= rqstp->rq_argused) 202 if (rqstp->rq_arghi <= rqstp->rq_argused) {
203 return -ENOMEM; 203 WARN_ON(1);
204 return;
205 }
204 rqstp->rq_arghi--; 206 rqstp->rq_arghi--;
205 rqstp->rq_respages[rqstp->rq_resused] = 207 rqstp->rq_respages[rqstp->rq_resused] =
206 rqstp->rq_argpages[rqstp->rq_arghi]; 208 rqstp->rq_argpages[rqstp->rq_arghi];
207 rqstp->rq_resused++; 209 rqstp->rq_resused++;
208 return 0;
209} 210}
210 211
211static inline void svc_pushback_allpages(struct svc_rqst *rqstp) 212static inline void svc_pushback_allpages(struct svc_rqst *rqstp)
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 54eac8a39a4c..5b1fdf1cff4f 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -155,6 +155,7 @@ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *
155/* linux/mm/page_alloc.c */ 155/* linux/mm/page_alloc.c */
156extern unsigned long totalram_pages; 156extern unsigned long totalram_pages;
157extern unsigned long totalhigh_pages; 157extern unsigned long totalhigh_pages;
158extern unsigned long totalreserve_pages;
158extern long nr_swap_pages; 159extern long nr_swap_pages;
159extern unsigned int nr_free_pages(void); 160extern unsigned int nr_free_pages(void);
160extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat); 161extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat);
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 5717147596b6..f001bad28d9a 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -569,9 +569,12 @@ asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename,
569asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, 569asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
570 int flags, int mode); 570 int flags, int mode);
571asmlinkage long sys_unshare(unsigned long unshare_flags); 571asmlinkage long sys_unshare(unsigned long unshare_flags);
572asmlinkage long sys_splice(int fdin, int fdout, size_t len, 572
573 unsigned int flags); 573asmlinkage long sys_splice(int fd_in, loff_t __user *off_in,
574 int fd_out, loff_t __user *off_out,
575 size_t len, unsigned int flags);
576
574asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, 577asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes,
575 int flags); 578 unsigned int flags);
576 579
577#endif 580#endif
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h
index 0976a163b459..31548303ee37 100644
--- a/include/linux/tty_flip.h
+++ b/include/linux/tty_flip.h
@@ -6,9 +6,10 @@ extern int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *c
6extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size); 6extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size);
7extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size); 7extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size);
8extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size); 8extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size);
9void tty_schedule_flip(struct tty_struct *tty);
9 10
10static inline int tty_insert_flip_char(struct tty_struct *tty, 11static inline int tty_insert_flip_char(struct tty_struct *tty,
11 unsigned char ch, char flag) 12 unsigned char ch, char flag)
12{ 13{
13 struct tty_buffer *tb = tty->buf.tail; 14 struct tty_buffer *tb = tty->buf.tail;
14 if (tb && tb->active && tb->used < tb->size) { 15 if (tb && tb->active && tb->used < tb->size) {
@@ -19,26 +20,4 @@ static inline int tty_insert_flip_char(struct tty_struct *tty,
19 return tty_insert_flip_string_flags(tty, &ch, &flag, 1); 20 return tty_insert_flip_string_flags(tty, &ch, &flag, 1);
20} 21}
21 22
22static inline void tty_schedule_flip(struct tty_struct *tty)
23{
24 unsigned long flags;
25 spin_lock_irqsave(&tty->buf.lock, flags);
26 if (tty->buf.tail != NULL) {
27 tty->buf.tail->active = 0;
28 tty->buf.tail->commit = tty->buf.tail->used;
29 }
30 spin_unlock_irqrestore(&tty->buf.lock, flags);
31 schedule_delayed_work(&tty->buf.work, 1);
32}
33
34#undef _INLINE_
35
36
37#endif /* _LINUX_TTY_FLIP_H */ 23#endif /* _LINUX_TTY_FLIP_H */
38
39
40
41
42
43
44
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h
index fadc535e2925..dc7c621e4647 100644
--- a/include/linux/vermagic.h
+++ b/include/linux/vermagic.h
@@ -12,6 +12,11 @@
12#else 12#else
13#define MODULE_VERMAGIC_PREEMPT "" 13#define MODULE_VERMAGIC_PREEMPT ""
14#endif 14#endif
15#ifdef CONFIG_MODULE_UNLOAD
16#define MODULE_VERMAGIC_MODULE_UNLOAD "mod_unload "
17#else
18#define MODULE_VERMAGIC_MODULE_UNLOAD ""
19#endif
15#ifndef MODULE_ARCH_VERMAGIC 20#ifndef MODULE_ARCH_VERMAGIC
16#define MODULE_ARCH_VERMAGIC "" 21#define MODULE_ARCH_VERMAGIC ""
17#endif 22#endif
@@ -19,5 +24,5 @@
19#define VERMAGIC_STRING \ 24#define VERMAGIC_STRING \
20 UTS_RELEASE " " \ 25 UTS_RELEASE " " \
21 MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ 26 MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
22 MODULE_ARCH_VERMAGIC \ 27 MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC \
23 "gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__) 28 "gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__)
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h
index 25f708ff020e..59f0c83d55a2 100644
--- a/include/net/inet6_hashtables.h
+++ b/include/net/inet6_hashtables.h
@@ -48,31 +48,7 @@ static inline int inet6_sk_ehashfn(const struct sock *sk)
48 return inet6_ehashfn(laddr, lport, faddr, fport); 48 return inet6_ehashfn(laddr, lport, faddr, fport);
49} 49}
50 50
51static inline void __inet6_hash(struct inet_hashinfo *hashinfo, 51extern void __inet6_hash(struct inet_hashinfo *hashinfo, struct sock *sk);
52 struct sock *sk)
53{
54 struct hlist_head *list;
55 rwlock_t *lock;
56
57 BUG_TRAP(sk_unhashed(sk));
58
59 if (sk->sk_state == TCP_LISTEN) {
60 list = &hashinfo->listening_hash[inet_sk_listen_hashfn(sk)];
61 lock = &hashinfo->lhash_lock;
62 inet_listen_wlock(hashinfo);
63 } else {
64 unsigned int hash;
65 sk->sk_hash = hash = inet6_sk_ehashfn(sk);
66 hash &= (hashinfo->ehash_size - 1);
67 list = &hashinfo->ehash[hash].chain;
68 lock = &hashinfo->ehash[hash].lock;
69 write_lock(lock);
70 }
71
72 __sk_add_node(sk, list);
73 sock_prot_inc_use(sk->sk_prot);
74 write_unlock(lock);
75}
76 52
77/* 53/*
78 * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so 54 * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so
@@ -80,52 +56,12 @@ static inline void __inet6_hash(struct inet_hashinfo *hashinfo,
80 * 56 *
81 * The sockhash lock must be held as a reader here. 57 * The sockhash lock must be held as a reader here.
82 */ 58 */
83static inline struct sock * 59extern struct sock *__inet6_lookup_established(struct inet_hashinfo *hashinfo,
84 __inet6_lookup_established(struct inet_hashinfo *hashinfo,
85 const struct in6_addr *saddr, 60 const struct in6_addr *saddr,
86 const u16 sport, 61 const u16 sport,
87 const struct in6_addr *daddr, 62 const struct in6_addr *daddr,
88 const u16 hnum, 63 const u16 hnum,
89 const int dif) 64 const int dif);
90{
91 struct sock *sk;
92 const struct hlist_node *node;
93 const __u32 ports = INET_COMBINED_PORTS(sport, hnum);
94 /* Optimize here for direct hit, only listening connections can
95 * have wildcards anyways.
96 */
97 unsigned int hash = inet6_ehashfn(daddr, hnum, saddr, sport);
98 struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash);
99
100 prefetch(head->chain.first);
101 read_lock(&head->lock);
102 sk_for_each(sk, node, &head->chain) {
103 /* For IPV6 do the cheaper port and family tests first. */
104 if (INET6_MATCH(sk, hash, saddr, daddr, ports, dif))
105 goto hit; /* You sunk my battleship! */
106 }
107 /* Must check for a TIME_WAIT'er before going to listener hash. */
108 sk_for_each(sk, node, &(head + hashinfo->ehash_size)->chain) {
109 const struct inet_timewait_sock *tw = inet_twsk(sk);
110
111 if(*((__u32 *)&(tw->tw_dport)) == ports &&
112 sk->sk_family == PF_INET6) {
113 const struct inet6_timewait_sock *tw6 = inet6_twsk(sk);
114
115 if (ipv6_addr_equal(&tw6->tw_v6_daddr, saddr) &&
116 ipv6_addr_equal(&tw6->tw_v6_rcv_saddr, daddr) &&
117 (!sk->sk_bound_dev_if || sk->sk_bound_dev_if == dif))
118 goto hit;
119 }
120 }
121 read_unlock(&head->lock);
122 return NULL;
123
124hit:
125 sock_hold(sk);
126 read_unlock(&head->lock);
127 return sk;
128}
129 65
130extern struct sock *inet6_lookup_listener(struct inet_hashinfo *hashinfo, 66extern struct sock *inet6_lookup_listener(struct inet_hashinfo *hashinfo,
131 const struct in6_addr *daddr, 67 const struct in6_addr *daddr,
diff --git a/include/net/ip.h b/include/net/ip.h
index 8fe6156ca9b0..3d2e5ca62a5a 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -95,6 +95,7 @@ extern int ip_local_deliver(struct sk_buff *skb);
95extern int ip_mr_input(struct sk_buff *skb); 95extern int ip_mr_input(struct sk_buff *skb);
96extern int ip_output(struct sk_buff *skb); 96extern int ip_output(struct sk_buff *skb);
97extern int ip_mc_output(struct sk_buff *skb); 97extern int ip_mc_output(struct sk_buff *skb);
98extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *));
98extern int ip_do_nat(struct sk_buff *skb); 99extern int ip_do_nat(struct sk_buff *skb);
99extern void ip_send_check(struct iphdr *ip); 100extern void ip_send_check(struct iphdr *ip);
100extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok); 101extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok);
diff --git a/include/net/x25device.h b/include/net/x25device.h
index 1a318374faef..1d10c879f7e2 100644
--- a/include/net/x25device.h
+++ b/include/net/x25device.h
@@ -8,6 +8,7 @@
8static inline __be16 x25_type_trans(struct sk_buff *skb, struct net_device *dev) 8static inline __be16 x25_type_trans(struct sk_buff *skb, struct net_device *dev)
9{ 9{
10 skb->mac.raw = skb->data; 10 skb->mac.raw = skb->data;
11 skb->dev = dev;
11 skb->pkt_type = PACKET_HOST; 12 skb->pkt_type = PACKET_HOST;
12 13
13 return htons(ETH_P_X25); 14 return htons(ETH_P_X25);
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index dc6862d09e53..de6ce541a046 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -140,7 +140,6 @@ struct scsi_host_template {
140 * 140 *
141 * Status: REQUIRED (at least one of them) 141 * Status: REQUIRED (at least one of them)
142 */ 142 */
143 int (* eh_strategy_handler)(struct Scsi_Host *);
144 int (* eh_abort_handler)(struct scsi_cmnd *); 143 int (* eh_abort_handler)(struct scsi_cmnd *);
145 int (* eh_device_reset_handler)(struct scsi_cmnd *); 144 int (* eh_device_reset_handler)(struct scsi_cmnd *);
146 int (* eh_bus_reset_handler)(struct scsi_cmnd *); 145 int (* eh_bus_reset_handler)(struct scsi_cmnd *);
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h
index b3657f111937..cca1d4926d2a 100644
--- a/include/scsi/scsi_transport.h
+++ b/include/scsi/scsi_transport.h
@@ -50,6 +50,11 @@ struct scsi_transport_template {
50 unsigned int create_work_queue : 1; 50 unsigned int create_work_queue : 1;
51 51
52 /* 52 /*
53 * Allows a transport to override the default error handler.
54 */
55 void (* eh_strategy_handler)(struct Scsi_Host *);
56
57 /*
53 * This is an optional routine that allows the transport to become 58 * This is an optional routine that allows the transport to become
54 * involved when a scsi io timer fires. The return value tells the 59 * involved when a scsi io timer fires. The return value tells the
55 * timer routine how to finish the io timeout handling: 60 * timer routine how to finish the io timeout handling: