diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-24 00:25:02 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-24 00:25:02 -0400 |
commit | c1d9728ecc5b560465df3c0c0d3b3825c2710b40 (patch) | |
tree | d0abb5c923a7a3eca2d4b2c3e1964bf484870909 /include | |
parent | 165415f700b0c77fa1f8db6198f48582639adf78 (diff) | |
parent | 87e807b6c461bbd449496a4c3ab78ab164a4ba97 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'include')
124 files changed, 1618 insertions, 456 deletions
diff --git a/include/asm-alpha/compiler.h b/include/asm-alpha/compiler.h index 399c33b7be51..0a4a8b40dfcd 100644 --- a/include/asm-alpha/compiler.h +++ b/include/asm-alpha/compiler.h | |||
@@ -98,6 +98,9 @@ | |||
98 | #undef inline | 98 | #undef inline |
99 | #undef __inline__ | 99 | #undef __inline__ |
100 | #undef __inline | 100 | #undef __inline |
101 | 101 | #if __GNUC__ == 3 && __GNUC_MINOR__ >= 1 || __GNUC__ > 3 | |
102 | #undef __always_inline | ||
103 | #define __always_inline inline __attribute__((always_inline)) | ||
104 | #endif | ||
102 | 105 | ||
103 | #endif /* __ALPHA_COMPILER_H */ | 106 | #endif /* __ALPHA_COMPILER_H */ |
diff --git a/include/asm-alpha/futex.h b/include/asm-alpha/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-alpha/futex.h +++ b/include/asm-alpha/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h index 22b53e369f59..8393bf374b2b 100644 --- a/include/asm-alpha/pgtable.h +++ b/include/asm-alpha/pgtable.h | |||
@@ -339,13 +339,6 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) | |||
339 | #define kern_addr_valid(addr) (1) | 339 | #define kern_addr_valid(addr) (1) |
340 | #endif | 340 | #endif |
341 | 341 | ||
342 | #define io_remap_page_range(vma, start, busaddr, size, prot) \ | ||
343 | ({ \ | ||
344 | void *va = (void __force *)ioremap(busaddr, size); \ | ||
345 | unsigned long pfn = virt_to_phys(va) >> PAGE_SHIFT; \ | ||
346 | remap_pfn_range(vma, start, pfn, size, prot); \ | ||
347 | }) | ||
348 | |||
349 | #define io_remap_pfn_range(vma, start, pfn, size, prot) \ | 342 | #define io_remap_pfn_range(vma, start, pfn, size, prot) \ |
350 | remap_pfn_range(vma, start, pfn, size, prot) | 343 | remap_pfn_range(vma, start, pfn, size, prot) |
351 | 344 | ||
diff --git a/include/asm-arm/arch-aaec2000/memory.h b/include/asm-arm/arch-aaec2000/memory.h index 681b6a6171a1..79c90813bc3e 100644 --- a/include/asm-arm/arch-aaec2000/memory.h +++ b/include/asm-arm/arch-aaec2000/memory.h | |||
@@ -64,10 +64,6 @@ | |||
64 | #define NODE_MAX_MEM_SHIFT 26 | 64 | #define NODE_MAX_MEM_SHIFT 26 |
65 | #define NODE_MAX_MEM_SIZE (1 << NODE_MAX_MEM_SHIFT) | 65 | #define NODE_MAX_MEM_SIZE (1 << NODE_MAX_MEM_SHIFT) |
66 | 66 | ||
67 | #else | ||
68 | |||
69 | #define PFN_TO_NID(addr) (0) | ||
70 | |||
71 | #endif /* CONFIG_DISCONTIGMEM */ | 67 | #endif /* CONFIG_DISCONTIGMEM */ |
72 | 68 | ||
73 | #endif /* __ASM_ARCH_MEMORY_H */ | 69 | #endif /* __ASM_ARCH_MEMORY_H */ |
diff --git a/include/asm-arm/arch-iop3xx/memory.h b/include/asm-arm/arch-iop3xx/memory.h index dc4735cb0c10..45351f5cd904 100644 --- a/include/asm-arm/arch-iop3xx/memory.h +++ b/include/asm-arm/arch-iop3xx/memory.h | |||
@@ -36,6 +36,4 @@ | |||
36 | 36 | ||
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #define PFN_TO_NID(addr) (0) | ||
40 | |||
41 | #endif | 39 | #endif |
diff --git a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h index 75623f81ef75..32aece069869 100644 --- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h +++ b/include/asm-arm/arch-ixp2000/ixp2000-regs.h | |||
@@ -370,8 +370,6 @@ | |||
370 | #define GLOBAL_REG_BASE (IXP2000_GLOBAL_REG_VIRT_BASE + 0x0a00) | 370 | #define GLOBAL_REG_BASE (IXP2000_GLOBAL_REG_VIRT_BASE + 0x0a00) |
371 | #define GLOBAL_REG(x) (volatile unsigned long*)(GLOBAL_REG_BASE | (x)) | 371 | #define GLOBAL_REG(x) (volatile unsigned long*)(GLOBAL_REG_BASE | (x)) |
372 | 372 | ||
373 | #define IXP2000_PROD_ID GLOBAL_REG(0x00) | ||
374 | |||
375 | #define IXP2000_MAJ_PROD_TYPE_MASK 0x001F0000 | 373 | #define IXP2000_MAJ_PROD_TYPE_MASK 0x001F0000 |
376 | #define IXP2000_MAJ_PROD_TYPE_IXP2000 0x00000000 | 374 | #define IXP2000_MAJ_PROD_TYPE_IXP2000 0x00000000 |
377 | #define IXP2000_MIN_PROD_TYPE_MASK 0x0000FF00 | 375 | #define IXP2000_MIN_PROD_TYPE_MASK 0x0000FF00 |
diff --git a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h index c0caf3e3e6fd..abdcf51bd283 100644 --- a/include/asm-arm/arch-ixp2000/platform.h +++ b/include/asm-arm/arch-ixp2000/platform.h | |||
@@ -31,20 +31,24 @@ | |||
31 | 31 | ||
32 | #include <asm/system.h> /* Pickup local_irq_ functions */ | 32 | #include <asm/system.h> /* Pickup local_irq_ functions */ |
33 | 33 | ||
34 | static inline void ixp2000_reg_write(volatile unsigned long *reg, unsigned long val) | 34 | static inline void ixp2000_reg_write(volatile void *reg, unsigned long val) |
35 | { | 35 | { |
36 | volatile unsigned long dummy; | 36 | unsigned long dummy; |
37 | unsigned long flags; | 37 | unsigned long flags; |
38 | 38 | ||
39 | local_irq_save(flags); | 39 | local_irq_save(flags); |
40 | *reg = val; | 40 | *((volatile unsigned long *)reg) = val; |
41 | barrier(); | 41 | barrier(); |
42 | dummy = *reg; | 42 | dummy = *((volatile unsigned long *)reg); |
43 | local_irq_restore(flags); | 43 | local_irq_restore(flags); |
44 | } | 44 | } |
45 | #else | 45 | #else |
46 | #define ixp2000_reg_write(reg, val) (*reg = val) | 46 | static inline void ixp2000_reg_write(volatile void *reg, unsigned long val) |
47 | { | ||
48 | *((volatile unsigned long *)reg) = val; | ||
49 | } | ||
47 | #endif /* IXDP2400 || IXDP2401 */ | 50 | #endif /* IXDP2400 || IXDP2401 */ |
51 | #define ixp2000_reg_read(reg) (*((volatile unsigned long *)reg)) | ||
48 | 52 | ||
49 | /* | 53 | /* |
50 | * Boards may multiplex different devices on the 2nd channel of | 54 | * Boards may multiplex different devices on the 2nd channel of |
@@ -84,7 +88,7 @@ void ixp2000_release_slowport(struct slowport_cfg *); | |||
84 | */ | 88 | */ |
85 | static inline unsigned ixp2000_has_broken_slowport(void) | 89 | static inline unsigned ixp2000_has_broken_slowport(void) |
86 | { | 90 | { |
87 | unsigned long id = *IXP2000_PROD_ID; | 91 | unsigned long id = *IXP2000_PRODUCT_ID; |
88 | unsigned long id_prod = id & (IXP2000_MAJ_PROD_TYPE_MASK | | 92 | unsigned long id_prod = id & (IXP2000_MAJ_PROD_TYPE_MASK | |
89 | IXP2000_MIN_PROD_TYPE_MASK); | 93 | IXP2000_MIN_PROD_TYPE_MASK); |
90 | return (((id_prod == | 94 | return (((id_prod == |
diff --git a/include/asm-arm/arch-lh7a40x/memory.h b/include/asm-arm/arch-lh7a40x/memory.h index 7e2fea372663..c650e6feb9d5 100644 --- a/include/asm-arm/arch-lh7a40x/memory.h +++ b/include/asm-arm/arch-lh7a40x/memory.h | |||
@@ -85,10 +85,6 @@ | |||
85 | (((unsigned long)(addr) & 0x01ffffff) >> PAGE_SHIFT) | 85 | (((unsigned long)(addr) & 0x01ffffff) >> PAGE_SHIFT) |
86 | # endif | 86 | # endif |
87 | 87 | ||
88 | #else | ||
89 | |||
90 | # define PFN_TO_NID(addr) (0) | ||
91 | |||
92 | #endif | 88 | #endif |
93 | 89 | ||
94 | #endif | 90 | #endif |
diff --git a/include/asm-arm/arch-omap/memory.h b/include/asm-arm/arch-omap/memory.h index 84f81e315a25..ef32d61eec7a 100644 --- a/include/asm-arm/arch-omap/memory.h +++ b/include/asm-arm/arch-omap/memory.h | |||
@@ -86,6 +86,5 @@ | |||
86 | 86 | ||
87 | #endif /* CONFIG_ARCH_OMAP1510 */ | 87 | #endif /* CONFIG_ARCH_OMAP1510 */ |
88 | 88 | ||
89 | #define PHYS_TO_NID(addr) (0) | ||
90 | #endif | 89 | #endif |
91 | 90 | ||
diff --git a/include/asm-arm/arch-pxa/akita.h b/include/asm-arm/arch-pxa/akita.h new file mode 100644 index 000000000000..4a1fbcfccc39 --- /dev/null +++ b/include/asm-arm/arch-pxa/akita.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Hardware specific definitions for SL-C1000 (Akita) | ||
3 | * | ||
4 | * Copyright (c) 2005 Richard Purdie | ||
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 | |||
12 | /* Akita IO Expander GPIOs */ | ||
13 | |||
14 | #define AKITA_IOEXP_RESERVED_7 (1 << 7) | ||
15 | #define AKITA_IOEXP_IR_ON (1 << 6) | ||
16 | #define AKITA_IOEXP_AKIN_PULLUP (1 << 5) | ||
17 | #define AKITA_IOEXP_BACKLIGHT_CONT (1 << 4) | ||
18 | #define AKITA_IOEXP_BACKLIGHT_ON (1 << 3) | ||
19 | #define AKITA_IOEXP_MIC_BIAS (1 << 2) | ||
20 | #define AKITA_IOEXP_RESERVED_1 (1 << 1) | ||
21 | #define AKITA_IOEXP_RESERVED_0 (1 << 0) | ||
22 | |||
23 | /* Direction Bitfield 0=output 1=input */ | ||
24 | #define AKITA_IOEXP_IO_DIR 0 | ||
25 | /* Default Values */ | ||
26 | #define AKITA_IOEXP_IO_OUT (AKITA_IOEXP_IR_ON | AKITA_IOEXP_AKIN_PULLUP) | ||
27 | |||
28 | void akita_set_ioexp(struct device *dev, unsigned char bitmask); | ||
29 | void akita_reset_ioexp(struct device *dev, unsigned char bitmask); | ||
30 | |||
diff --git a/include/asm-arm/arch-pxa/corgi.h b/include/asm-arm/arch-pxa/corgi.h index 4b7aa0b8391e..e554caa0d18b 100644 --- a/include/asm-arm/arch-pxa/corgi.h +++ b/include/asm-arm/arch-pxa/corgi.h | |||
@@ -106,17 +106,5 @@ extern struct platform_device corgiscoop_device; | |||
106 | extern struct platform_device corgissp_device; | 106 | extern struct platform_device corgissp_device; |
107 | extern struct platform_device corgifb_device; | 107 | extern struct platform_device corgifb_device; |
108 | 108 | ||
109 | /* | ||
110 | * External Functions | ||
111 | */ | ||
112 | extern unsigned long corgi_ssp_ads7846_putget(unsigned long); | ||
113 | extern unsigned long corgi_ssp_ads7846_get(void); | ||
114 | extern void corgi_ssp_ads7846_put(unsigned long data); | ||
115 | extern void corgi_ssp_ads7846_lock(void); | ||
116 | extern void corgi_ssp_ads7846_unlock(void); | ||
117 | extern void corgi_ssp_lcdtg_send (unsigned char adrs, unsigned char data); | ||
118 | extern void corgi_ssp_blduty_set(int duty); | ||
119 | extern int corgi_ssp_max1111_get(unsigned long data); | ||
120 | |||
121 | #endif /* __ASM_ARCH_CORGI_H */ | 109 | #endif /* __ASM_ARCH_CORGI_H */ |
122 | 110 | ||
diff --git a/include/asm-arm/arch-pxa/memory.h b/include/asm-arm/arch-pxa/memory.h index 217a80b820ff..58bad9748b5c 100644 --- a/include/asm-arm/arch-pxa/memory.h +++ b/include/asm-arm/arch-pxa/memory.h | |||
@@ -67,10 +67,6 @@ | |||
67 | #define LOCAL_MAP_NR(addr) \ | 67 | #define LOCAL_MAP_NR(addr) \ |
68 | (((unsigned long)(addr) & 0x03ffffff) >> PAGE_SHIFT) | 68 | (((unsigned long)(addr) & 0x03ffffff) >> PAGE_SHIFT) |
69 | 69 | ||
70 | #else | ||
71 | |||
72 | #define PFN_TO_NID(addr) (0) | ||
73 | |||
74 | #endif | 70 | #endif |
75 | 71 | ||
76 | #endif | 72 | #endif |
diff --git a/include/asm-arm/arch-pxa/poodle.h b/include/asm-arm/arch-pxa/poodle.h index 58bda9d571a5..6b5ac5144e70 100644 --- a/include/asm-arm/arch-pxa/poodle.h +++ b/include/asm-arm/arch-pxa/poodle.h | |||
@@ -37,24 +37,25 @@ | |||
37 | #define POODLE_GPIO_nSD_DETECT (9) | 37 | #define POODLE_GPIO_nSD_DETECT (9) |
38 | #define POODLE_GPIO_MAIN_BAT_LOW (13) | 38 | #define POODLE_GPIO_MAIN_BAT_LOW (13) |
39 | #define POODLE_GPIO_BAT_COVER (13) | 39 | #define POODLE_GPIO_BAT_COVER (13) |
40 | #define POODLE_GPIO_USB_PULLUP (20) | ||
40 | #define POODLE_GPIO_ADC_TEMP_ON (21) | 41 | #define POODLE_GPIO_ADC_TEMP_ON (21) |
41 | #define POODLE_GPIO_BYPASS_ON (36) | 42 | #define POODLE_GPIO_BYPASS_ON (36) |
42 | #define POODLE_GPIO_CHRG_ON (38) | 43 | #define POODLE_GPIO_CHRG_ON (38) |
43 | #define POODLE_GPIO_CHRG_FULL (16) | 44 | #define POODLE_GPIO_CHRG_FULL (16) |
44 | 45 | ||
45 | /* PXA GPIOs */ | 46 | /* PXA GPIOs */ |
46 | #define POODLE_IRQ_GPIO_ON_KEY IRQ_GPIO0 | 47 | #define POODLE_IRQ_GPIO_ON_KEY IRQ_GPIO(0) |
47 | #define POODLE_IRQ_GPIO_AC_IN IRQ_GPIO1 | 48 | #define POODLE_IRQ_GPIO_AC_IN IRQ_GPIO(1) |
48 | #define POODLE_IRQ_GPIO_HP_IN IRQ_GPIO4 | 49 | #define POODLE_IRQ_GPIO_HP_IN IRQ_GPIO(4) |
49 | #define POODLE_IRQ_GPIO_CO IRQ_GPIO16 | 50 | #define POODLE_IRQ_GPIO_CO IRQ_GPIO(16) |
50 | #define POODLE_IRQ_GPIO_TP_INT IRQ_GPIO5 | 51 | #define POODLE_IRQ_GPIO_TP_INT IRQ_GPIO(5) |
51 | #define POODLE_IRQ_GPIO_WAKEUP IRQ_GPIO11 | 52 | #define POODLE_IRQ_GPIO_WAKEUP IRQ_GPIO(11) |
52 | #define POODLE_IRQ_GPIO_GA_INT IRQ_GPIO10 | 53 | #define POODLE_IRQ_GPIO_GA_INT IRQ_GPIO(10) |
53 | #define POODLE_IRQ_GPIO_CF_IRQ IRQ_GPIO17 | 54 | #define POODLE_IRQ_GPIO_CF_IRQ IRQ_GPIO(17) |
54 | #define POODLE_IRQ_GPIO_CF_CD IRQ_GPIO14 | 55 | #define POODLE_IRQ_GPIO_CF_CD IRQ_GPIO(14) |
55 | #define POODLE_IRQ_GPIO_nSD_INT IRQ_GPIO8 | 56 | #define POODLE_IRQ_GPIO_nSD_INT IRQ_GPIO(8) |
56 | #define POODLE_IRQ_GPIO_nSD_DETECT IRQ_GPIO9 | 57 | #define POODLE_IRQ_GPIO_nSD_DETECT IRQ_GPIO(9) |
57 | #define POODLE_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO13 | 58 | #define POODLE_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO(13) |
58 | 59 | ||
59 | /* SCOOP GPIOs */ | 60 | /* SCOOP GPIOs */ |
60 | #define POODLE_SCOOP_CHARGE_ON SCOOP_GPCR_PA11 | 61 | #define POODLE_SCOOP_CHARGE_ON SCOOP_GPCR_PA11 |
diff --git a/include/asm-arm/arch-pxa/sharpsl.h b/include/asm-arm/arch-pxa/sharpsl.h new file mode 100644 index 000000000000..311f2bb5386a --- /dev/null +++ b/include/asm-arm/arch-pxa/sharpsl.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * SharpSL SSP Driver | ||
3 | */ | ||
4 | |||
5 | unsigned long corgi_ssp_ads7846_putget(unsigned long); | ||
6 | unsigned long corgi_ssp_ads7846_get(void); | ||
7 | void corgi_ssp_ads7846_put(unsigned long data); | ||
8 | void corgi_ssp_ads7846_lock(void); | ||
9 | void corgi_ssp_ads7846_unlock(void); | ||
10 | void corgi_ssp_lcdtg_send (unsigned char adrs, unsigned char data); | ||
11 | void corgi_ssp_blduty_set(int duty); | ||
12 | int corgi_ssp_max1111_get(unsigned long data); | ||
13 | |||
14 | /* | ||
15 | * SharpSL Touchscreen Driver | ||
16 | */ | ||
17 | |||
18 | struct corgits_machinfo { | ||
19 | unsigned long (*get_hsync_len)(void); | ||
20 | void (*put_hsync)(void); | ||
21 | void (*wait_hsync)(void); | ||
22 | }; | ||
23 | |||
24 | /* | ||
25 | * SharpSL Backlight | ||
26 | */ | ||
27 | |||
28 | struct corgibl_machinfo { | ||
29 | int max_intensity; | ||
30 | void (*set_bl_intensity)(int intensity); | ||
31 | }; | ||
32 | |||
diff --git a/include/asm-arm/arch-pxa/spitz.h b/include/asm-arm/arch-pxa/spitz.h new file mode 100644 index 000000000000..62e1fe4d025f --- /dev/null +++ b/include/asm-arm/arch-pxa/spitz.h | |||
@@ -0,0 +1,158 @@ | |||
1 | /* | ||
2 | * Hardware specific definitions for SL-Cx000 series of PDAs | ||
3 | * | ||
4 | * Copyright (c) 2005 Alexander Wykes | ||
5 | * Copyright (c) 2005 Richard Purdie | ||
6 | * | ||
7 | * Based on Sharp's 2.4 kernel patches | ||
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_SPITZ_H | ||
15 | #define __ASM_ARCH_SPITZ_H 1 | ||
16 | #endif | ||
17 | |||
18 | /* Spitz/Akita GPIOs */ | ||
19 | |||
20 | #define SPITZ_GPIO_KEY_INT (0) /* Key Interrupt */ | ||
21 | #define SPITZ_GPIO_RESET (1) | ||
22 | #define SPITZ_GPIO_nSD_DETECT (9) | ||
23 | #define SPITZ_GPIO_TP_INT (11) /* Touch Panel interrupt */ | ||
24 | #define SPITZ_GPIO_AK_INT (13) /* Remote Control */ | ||
25 | #define SPITZ_GPIO_ADS7846_CS (14) | ||
26 | #define SPITZ_GPIO_SYNC (16) | ||
27 | #define SPITZ_GPIO_MAX1111_CS (20) | ||
28 | #define SPITZ_GPIO_FATAL_BAT (21) | ||
29 | #define SPITZ_GPIO_HSYNC (22) | ||
30 | #define SPITZ_GPIO_nSD_CLK (32) | ||
31 | #define SPITZ_GPIO_USB_DEVICE (35) | ||
32 | #define SPITZ_GPIO_USB_HOST (37) | ||
33 | #define SPITZ_GPIO_USB_CONNECT (41) | ||
34 | #define SPITZ_GPIO_LCDCON_CS (53) | ||
35 | #define SPITZ_GPIO_nPCE (54) | ||
36 | #define SPITZ_GPIO_nSD_WP (81) | ||
37 | #define SPITZ_GPIO_ON_RESET (89) | ||
38 | #define SPITZ_GPIO_BAT_COVER (90) | ||
39 | #define SPITZ_GPIO_CF_CD (94) | ||
40 | #define SPITZ_GPIO_ON_KEY (95) | ||
41 | #define SPITZ_GPIO_SWA (97) | ||
42 | #define SPITZ_GPIO_SWB (96) | ||
43 | #define SPITZ_GPIO_CHRG_FULL (101) | ||
44 | #define SPITZ_GPIO_CO (101) | ||
45 | #define SPITZ_GPIO_CF_IRQ (105) | ||
46 | #define SPITZ_GPIO_AC_IN (115) | ||
47 | #define SPITZ_GPIO_HP_IN (116) | ||
48 | |||
49 | /* Spitz Only GPIOs */ | ||
50 | |||
51 | #define SPITZ_GPIO_CF2_IRQ (106) /* CF slot1 Ready */ | ||
52 | #define SPITZ_GPIO_CF2_CD (93) | ||
53 | |||
54 | |||
55 | /* Spitz/Akita Keyboard Definitions */ | ||
56 | |||
57 | #define SPITZ_KEY_STROBE_NUM (11) | ||
58 | #define SPITZ_KEY_SENSE_NUM (7) | ||
59 | #define SPITZ_GPIO_G0_STROBE_BIT 0x0f800000 | ||
60 | #define SPITZ_GPIO_G1_STROBE_BIT 0x00100000 | ||
61 | #define SPITZ_GPIO_G2_STROBE_BIT 0x01000000 | ||
62 | #define SPITZ_GPIO_G3_STROBE_BIT 0x00041880 | ||
63 | #define SPITZ_GPIO_G0_SENSE_BIT 0x00021000 | ||
64 | #define SPITZ_GPIO_G1_SENSE_BIT 0x000000d4 | ||
65 | #define SPITZ_GPIO_G2_SENSE_BIT 0x08000000 | ||
66 | #define SPITZ_GPIO_G3_SENSE_BIT 0x00000000 | ||
67 | |||
68 | #define SPITZ_GPIO_KEY_STROBE0 88 | ||
69 | #define SPITZ_GPIO_KEY_STROBE1 23 | ||
70 | #define SPITZ_GPIO_KEY_STROBE2 24 | ||
71 | #define SPITZ_GPIO_KEY_STROBE3 25 | ||
72 | #define SPITZ_GPIO_KEY_STROBE4 26 | ||
73 | #define SPITZ_GPIO_KEY_STROBE5 27 | ||
74 | #define SPITZ_GPIO_KEY_STROBE6 52 | ||
75 | #define SPITZ_GPIO_KEY_STROBE7 103 | ||
76 | #define SPITZ_GPIO_KEY_STROBE8 107 | ||
77 | #define SPITZ_GPIO_KEY_STROBE9 108 | ||
78 | #define SPITZ_GPIO_KEY_STROBE10 114 | ||
79 | |||
80 | #define SPITZ_GPIO_KEY_SENSE0 12 | ||
81 | #define SPITZ_GPIO_KEY_SENSE1 17 | ||
82 | #define SPITZ_GPIO_KEY_SENSE2 91 | ||
83 | #define SPITZ_GPIO_KEY_SENSE3 34 | ||
84 | #define SPITZ_GPIO_KEY_SENSE4 36 | ||
85 | #define SPITZ_GPIO_KEY_SENSE5 38 | ||
86 | #define SPITZ_GPIO_KEY_SENSE6 39 | ||
87 | |||
88 | |||
89 | /* Spitz Scoop Device (No. 1) GPIOs */ | ||
90 | /* Suspend States in comments */ | ||
91 | #define SPITZ_SCP_LED_GREEN SCOOP_GPCR_PA11 /* Keep */ | ||
92 | #define SPITZ_SCP_JK_B SCOOP_GPCR_PA12 /* Keep */ | ||
93 | #define SPITZ_SCP_CHRG_ON SCOOP_GPCR_PA13 /* Keep */ | ||
94 | #define SPITZ_SCP_MUTE_L SCOOP_GPCR_PA14 /* Low */ | ||
95 | #define SPITZ_SCP_MUTE_R SCOOP_GPCR_PA15 /* Low */ | ||
96 | #define SPITZ_SCP_CF_POWER SCOOP_GPCR_PA16 /* Keep */ | ||
97 | #define SPITZ_SCP_LED_ORANGE SCOOP_GPCR_PA17 /* Keep */ | ||
98 | #define SPITZ_SCP_JK_A SCOOP_GPCR_PA18 /* Low */ | ||
99 | #define SPITZ_SCP_ADC_TEMP_ON SCOOP_GPCR_PA19 /* Low */ | ||
100 | |||
101 | #define SPITZ_SCP_IO_DIR (SPITZ_SCP_LED_GREEN | SPITZ_SCP_JK_B | SPITZ_SCP_CHRG_ON | \ | ||
102 | SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_LED_ORANGE | \ | ||
103 | SPITZ_SCP_CF_POWER | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON) | ||
104 | #define SPITZ_SCP_IO_OUT (SPITZ_SCP_CHRG_ON | SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R) | ||
105 | #define SPITZ_SCP_SUS_CLR (SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON) | ||
106 | #define SPITZ_SCP_SUS_SET 0 | ||
107 | |||
108 | /* Spitz Scoop Device (No. 2) GPIOs */ | ||
109 | /* Suspend States in comments */ | ||
110 | #define SPITZ_SCP2_IR_ON SCOOP_GPCR_PA11 /* High */ | ||
111 | #define SPITZ_SCP2_AKIN_PULLUP SCOOP_GPCR_PA12 /* Keep */ | ||
112 | #define SPITZ_SCP2_RESERVED_1 SCOOP_GPCR_PA13 /* High */ | ||
113 | #define SPITZ_SCP2_RESERVED_2 SCOOP_GPCR_PA14 /* Low */ | ||
114 | #define SPITZ_SCP2_RESERVED_3 SCOOP_GPCR_PA15 /* Low */ | ||
115 | #define SPITZ_SCP2_RESERVED_4 SCOOP_GPCR_PA16 /* Low */ | ||
116 | #define SPITZ_SCP2_BACKLIGHT_CONT SCOOP_GPCR_PA17 /* Low */ | ||
117 | #define SPITZ_SCP2_BACKLIGHT_ON SCOOP_GPCR_PA18 /* Low */ | ||
118 | #define SPITZ_SCP2_MIC_BIAS SCOOP_GPCR_PA19 /* Low */ | ||
119 | |||
120 | #define SPITZ_SCP2_IO_DIR (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1 | \ | ||
121 | SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \ | ||
122 | SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS) | ||
123 | |||
124 | #define SPITZ_SCP2_IO_OUT (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1) | ||
125 | #define SPITZ_SCP2_SUS_CLR (SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \ | ||
126 | SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS) | ||
127 | #define SPITZ_SCP2_SUS_SET (SPITZ_SCP2_IR_ON | SPITZ_SCP2_RESERVED_1) | ||
128 | |||
129 | |||
130 | /* Spitz IRQ Definitions */ | ||
131 | |||
132 | #define SPITZ_IRQ_GPIO_KEY_INT IRQ_GPIO(SPITZ_GPIO_KEY_INT) | ||
133 | #define SPITZ_IRQ_GPIO_AC_IN IRQ_GPIO(SPITZ_GPIO_AC_IN) | ||
134 | #define SPITZ_IRQ_GPIO_AK_INT IRQ_GPIO(SPITZ_GPIO_AK_INT) | ||
135 | #define SPITZ_IRQ_GPIO_HP_IN IRQ_GPIO(SPITZ_GPIO_HP_IN) | ||
136 | #define SPITZ_IRQ_GPIO_TP_INT IRQ_GPIO(SPITZ_GPIO_TP_INT) | ||
137 | #define SPITZ_IRQ_GPIO_SYNC IRQ_GPIO(SPITZ_GPIO_SYNC) | ||
138 | #define SPITZ_IRQ_GPIO_ON_KEY IRQ_GPIO(SPITZ_GPIO_ON_KEY) | ||
139 | #define SPITZ_IRQ_GPIO_SWA IRQ_GPIO(SPITZ_GPIO_SWA) | ||
140 | #define SPITZ_IRQ_GPIO_SWB IRQ_GPIO(SPITZ_GPIO_SWB) | ||
141 | #define SPITZ_IRQ_GPIO_BAT_COVER IRQ_GPIO(SPITZ_GPIO_BAT_COVER) | ||
142 | #define SPITZ_IRQ_GPIO_FATAL_BAT IRQ_GPIO(SPITZ_GPIO_FATAL_BAT) | ||
143 | #define SPITZ_IRQ_GPIO_CO IRQ_GPIO(SPITZ_GPIO_CO) | ||
144 | #define SPITZ_IRQ_GPIO_CF_IRQ IRQ_GPIO(SPITZ_GPIO_CF_IRQ) | ||
145 | #define SPITZ_IRQ_GPIO_CF_CD IRQ_GPIO(SPITZ_GPIO_CF_CD) | ||
146 | #define SPITZ_IRQ_GPIO_CF2_IRQ IRQ_GPIO(SPITZ_GPIO_CF2_IRQ) | ||
147 | #define SPITZ_IRQ_GPIO_nSD_INT IRQ_GPIO(SPITZ_GPIO_nSD_INT) | ||
148 | #define SPITZ_IRQ_GPIO_nSD_DETECT IRQ_GPIO(SPITZ_GPIO_nSD_DETECT) | ||
149 | |||
150 | /* | ||
151 | * Shared data structures | ||
152 | */ | ||
153 | extern struct platform_device spitzscoop_device; | ||
154 | extern struct platform_device spitzscoop2_device; | ||
155 | extern struct platform_device spitzssp_device; | ||
156 | extern struct sharpsl_charger_machinfo spitz_pm_machinfo; | ||
157 | |||
158 | extern void spitz_lcd_power(int on); | ||
diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h index 32d3d5bde34d..8743ff5c1b23 100644 --- a/include/asm-arm/arch-sa1100/memory.h +++ b/include/asm-arm/arch-sa1100/memory.h | |||
@@ -99,10 +99,6 @@ __arch_adjust_zones(int node, unsigned long *size, unsigned long *holes) | |||
99 | #define LOCAL_MAP_NR(addr) \ | 99 | #define LOCAL_MAP_NR(addr) \ |
100 | (((unsigned long)(addr) & 0x07ffffff) >> PAGE_SHIFT) | 100 | (((unsigned long)(addr) & 0x07ffffff) >> PAGE_SHIFT) |
101 | 101 | ||
102 | #else | ||
103 | |||
104 | #define PFN_TO_NID(addr) (0) | ||
105 | |||
106 | #endif | 102 | #endif |
107 | 103 | ||
108 | #endif | 104 | #endif |
diff --git a/include/asm-arm/futex.h b/include/asm-arm/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-arm/futex.h +++ b/include/asm-arm/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-arm/hardware/arm_twd.h b/include/asm-arm/hardware/arm_twd.h new file mode 100644 index 000000000000..131d5b40e072 --- /dev/null +++ b/include/asm-arm/hardware/arm_twd.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef __ASM_HARDWARE_TWD_H | ||
2 | #define __ASM_HARDWARE_TWD_H | ||
3 | |||
4 | #define TWD_TIMER_LOAD 0x00 | ||
5 | #define TWD_TIMER_COUNTER 0x04 | ||
6 | #define TWD_TIMER_CONTROL 0x08 | ||
7 | #define TWD_TIMER_INTSTAT 0x0C | ||
8 | |||
9 | #define TWD_WDOG_LOAD 0x20 | ||
10 | #define TWD_WDOG_COUNTER 0x24 | ||
11 | #define TWD_WDOG_CONTROL 0x28 | ||
12 | #define TWD_WDOG_INTSTAT 0x2C | ||
13 | #define TWD_WDOG_RESETSTAT 0x30 | ||
14 | #define TWD_WDOG_DISABLE 0x34 | ||
15 | |||
16 | #endif | ||
diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h index 56c6bf4ab0c3..4fa95084a8c0 100644 --- a/include/asm-arm/mach/arch.h +++ b/include/asm-arm/mach/arch.h | |||
@@ -50,7 +50,7 @@ struct machine_desc { | |||
50 | */ | 50 | */ |
51 | #define MACHINE_START(_type,_name) \ | 51 | #define MACHINE_START(_type,_name) \ |
52 | const struct machine_desc __mach_desc_##_type \ | 52 | const struct machine_desc __mach_desc_##_type \ |
53 | __attribute__((__section__(".arch.info"))) = { \ | 53 | __attribute__((__section__(".arch.info.init"))) = { \ |
54 | .nr = MACH_TYPE_##_type, \ | 54 | .nr = MACH_TYPE_##_type, \ |
55 | .name = _name, | 55 | .name = _name, |
56 | 56 | ||
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index e47bea7d1723..a8a933a775db 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h | |||
@@ -160,12 +160,25 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
160 | #define page_to_pfn(page) \ | 160 | #define page_to_pfn(page) \ |
161 | (( (page) - page_zone(page)->zone_mem_map) \ | 161 | (( (page) - page_zone(page)->zone_mem_map) \ |
162 | + page_zone(page)->zone_start_pfn) | 162 | + page_zone(page)->zone_start_pfn) |
163 | |||
163 | #define pfn_to_page(pfn) \ | 164 | #define pfn_to_page(pfn) \ |
164 | (PFN_TO_MAPBASE(pfn) + LOCAL_MAP_NR((pfn) << PAGE_SHIFT)) | 165 | (PFN_TO_MAPBASE(pfn) + LOCAL_MAP_NR((pfn) << PAGE_SHIFT)) |
165 | #define pfn_valid(pfn) (PFN_TO_NID(pfn) < MAX_NUMNODES) | 166 | |
167 | #define pfn_valid(pfn) \ | ||
168 | ({ \ | ||
169 | unsigned int nid = PFN_TO_NID(pfn); \ | ||
170 | int valid = nid < MAX_NUMNODES; \ | ||
171 | if (valid) { \ | ||
172 | pg_data_t *node = NODE_DATA(nid); \ | ||
173 | valid = (pfn - node->node_start_pfn) < \ | ||
174 | node->node_spanned_pages; \ | ||
175 | } \ | ||
176 | valid; \ | ||
177 | }) | ||
166 | 178 | ||
167 | #define virt_to_page(kaddr) \ | 179 | #define virt_to_page(kaddr) \ |
168 | (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr)) | 180 | (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr)) |
181 | |||
169 | #define virt_addr_valid(kaddr) (KVADDR_TO_NID(kaddr) < MAX_NUMNODES) | 182 | #define virt_addr_valid(kaddr) (KVADDR_TO_NID(kaddr) < MAX_NUMNODES) |
170 | 183 | ||
171 | /* | 184 | /* |
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 478c49b56e18..366bafbdfbb1 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
@@ -445,12 +445,9 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | |||
445 | #define HAVE_ARCH_UNMAPPED_AREA | 445 | #define HAVE_ARCH_UNMAPPED_AREA |
446 | 446 | ||
447 | /* | 447 | /* |
448 | * remap a physical address `phys' of size `size' with page protection `prot' | 448 | * remap a physical page `pfn' of size `size' with page protection `prot' |
449 | * into virtual address `from' | 449 | * into virtual address `from' |
450 | */ | 450 | */ |
451 | #define io_remap_page_range(vma,from,phys,size,prot) \ | ||
452 | remap_pfn_range(vma, from, (phys) >> PAGE_SHIFT, size, prot) | ||
453 | |||
454 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ | 451 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ |
455 | remap_pfn_range(vma, from, pfn, size, prot) | 452 | remap_pfn_range(vma, from, pfn, size, prot) |
456 | 453 | ||
diff --git a/include/asm-arm/setup.h b/include/asm-arm/setup.h index adcbd79762bf..ea3ed2465233 100644 --- a/include/asm-arm/setup.h +++ b/include/asm-arm/setup.h | |||
@@ -171,7 +171,7 @@ struct tagtable { | |||
171 | int (*parse)(const struct tag *); | 171 | int (*parse)(const struct tag *); |
172 | }; | 172 | }; |
173 | 173 | ||
174 | #define __tag __attribute_used__ __attribute__((__section__(".taglist"))) | 174 | #define __tag __attribute_used__ __attribute__((__section__(".taglist.init"))) |
175 | #define __tagtable(tag, fn) \ | 175 | #define __tagtable(tag, fn) \ |
176 | static struct tagtable __tagtable_##fn __tag = { tag, fn } | 176 | static struct tagtable __tagtable_##fn __tag = { tag, fn } |
177 | 177 | ||
@@ -213,6 +213,6 @@ struct early_params { | |||
213 | 213 | ||
214 | #define __early_param(name,fn) \ | 214 | #define __early_param(name,fn) \ |
215 | static struct early_params __early_##fn __attribute_used__ \ | 215 | static struct early_params __early_##fn __attribute_used__ \ |
216 | __attribute__((__section__("__early_param"))) = { name, fn } | 216 | __attribute__((__section__(".early_param.init"))) = { name, fn } |
217 | 217 | ||
218 | #endif | 218 | #endif |
diff --git a/include/asm-arm26/futex.h b/include/asm-arm26/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-arm26/futex.h +++ b/include/asm-arm26/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h index 4a0a00da425f..f602cf572411 100644 --- a/include/asm-arm26/pgtable.h +++ b/include/asm-arm26/pgtable.h | |||
@@ -294,12 +294,9 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) | |||
294 | #include <asm-generic/pgtable.h> | 294 | #include <asm-generic/pgtable.h> |
295 | 295 | ||
296 | /* | 296 | /* |
297 | * remap a physical address `phys' of size `size' with page protection `prot' | 297 | * remap a physical page `pfn' of size `size' with page protection `prot' |
298 | * into virtual address `from' | 298 | * into virtual address `from' |
299 | */ | 299 | */ |
300 | #define io_remap_page_range(vma,from,phys,size,prot) \ | ||
301 | remap_pfn_range(vma, from, (phys) >> PAGE_SHIFT, size, prot) | ||
302 | |||
303 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ | 300 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ |
304 | remap_pfn_range(vma, from, pfn, size, prot) | 301 | remap_pfn_range(vma, from, pfn, size, prot) |
305 | 302 | ||
diff --git a/include/asm-cris/futex.h b/include/asm-cris/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-cris/futex.h +++ b/include/asm-cris/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-frv/futex.h b/include/asm-frv/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-frv/futex.h +++ b/include/asm-frv/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h index d0a9c2f9c13e..473fb4bb6329 100644 --- a/include/asm-frv/pgtable.h +++ b/include/asm-frv/pgtable.h | |||
@@ -500,9 +500,6 @@ static inline int pte_file(pte_t pte) | |||
500 | #define PageSkip(page) (0) | 500 | #define PageSkip(page) (0) |
501 | #define kern_addr_valid(addr) (1) | 501 | #define kern_addr_valid(addr) (1) |
502 | 502 | ||
503 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
504 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
505 | |||
506 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 503 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
507 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 504 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
508 | 505 | ||
diff --git a/include/asm-h8300/futex.h b/include/asm-h8300/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-h8300/futex.h +++ b/include/asm-h8300/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-h8300/pgtable.h b/include/asm-h8300/pgtable.h index 69076eb31476..f6e296fc1297 100644 --- a/include/asm-h8300/pgtable.h +++ b/include/asm-h8300/pgtable.h | |||
@@ -52,8 +52,6 @@ extern int is_in_rom(unsigned long); | |||
52 | * No page table caches to initialise | 52 | * No page table caches to initialise |
53 | */ | 53 | */ |
54 | #define pgtable_cache_init() do { } while (0) | 54 | #define pgtable_cache_init() do { } while (0) |
55 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
56 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
57 | 55 | ||
58 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 56 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
59 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 57 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
diff --git a/include/asm-i386/futex.h b/include/asm-i386/futex.h index 44b9db806474..e7a271d39309 100644 --- a/include/asm-i386/futex.h +++ b/include/asm-i386/futex.h | |||
@@ -61,7 +61,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
61 | if (op == FUTEX_OP_SET) | 61 | if (op == FUTEX_OP_SET) |
62 | __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg); | 62 | __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg); |
63 | else { | 63 | else { |
64 | #ifndef CONFIG_X86_BSWAP | 64 | #if !defined(CONFIG_X86_BSWAP) && !defined(CONFIG_UML) |
65 | if (boot_cpu_data.x86 == 3) | 65 | if (boot_cpu_data.x86 == 3) |
66 | ret = -ENOSYS; | 66 | ret = -ENOSYS; |
67 | else | 67 | else |
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 47bc1ffa3d4c..d101ac414f07 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -431,9 +431,6 @@ extern void noexec_setup(const char *str); | |||
431 | #define kern_addr_valid(addr) (1) | 431 | #define kern_addr_valid(addr) (1) |
432 | #endif /* CONFIG_FLATMEM */ | 432 | #endif /* CONFIG_FLATMEM */ |
433 | 433 | ||
434 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
435 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
436 | |||
437 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 434 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
438 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 435 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
439 | 436 | ||
diff --git a/include/asm-ia64/futex.h b/include/asm-ia64/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-ia64/futex.h +++ b/include/asm-ia64/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-ia64/mca.h b/include/asm-ia64/mca.h index 97a28b8b2ddd..c7d9c9ed38ba 100644 --- a/include/asm-ia64/mca.h +++ b/include/asm-ia64/mca.h | |||
@@ -80,7 +80,12 @@ struct ia64_sal_os_state { | |||
80 | u64 sal_ra; /* Return address in SAL, physical */ | 80 | u64 sal_ra; /* Return address in SAL, physical */ |
81 | u64 sal_gp; /* GP of the SAL - physical */ | 81 | u64 sal_gp; /* GP of the SAL - physical */ |
82 | pal_min_state_area_t *pal_min_state; /* from R17. physical in asm, virtual in C */ | 82 | pal_min_state_area_t *pal_min_state; /* from R17. physical in asm, virtual in C */ |
83 | /* Previous values of IA64_KR(CURRENT) and IA64_KR(CURRENT_STACK). | ||
84 | * Note: if the MCA/INIT recovery code wants to resume to a new context | ||
85 | * then it must change these values to reflect the new kernel stack. | ||
86 | */ | ||
83 | u64 prev_IA64_KR_CURRENT; /* previous value of IA64_KR(CURRENT) */ | 87 | u64 prev_IA64_KR_CURRENT; /* previous value of IA64_KR(CURRENT) */ |
88 | u64 prev_IA64_KR_CURRENT_STACK; | ||
84 | struct task_struct *prev_task; /* previous task, NULL if it is not useful */ | 89 | struct task_struct *prev_task; /* previous task, NULL if it is not useful */ |
85 | /* Some interrupt registers are not saved in minstate, pt_regs or | 90 | /* Some interrupt registers are not saved in minstate, pt_regs or |
86 | * switch_stack. Because MCA/INIT can occur when interrupts are | 91 | * switch_stack. Because MCA/INIT can occur when interrupts are |
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index 2e34c06e6777..3339c7b55a6f 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h | |||
@@ -443,10 +443,6 @@ extern void paging_init (void); | |||
443 | #define pte_to_pgoff(pte) ((pte_val(pte) << 1) >> 3) | 443 | #define pte_to_pgoff(pte) ((pte_val(pte) << 1) >> 3) |
444 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 2) | _PAGE_FILE }) | 444 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 2) | _PAGE_FILE }) |
445 | 445 | ||
446 | /* XXX is this right? */ | ||
447 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
448 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
449 | |||
450 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 446 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
451 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 447 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
452 | 448 | ||
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h index fc544929ac34..a79d1a7ecc77 100644 --- a/include/asm-ia64/ptrace.h +++ b/include/asm-ia64/ptrace.h | |||
@@ -57,7 +57,9 @@ | |||
57 | #include <linux/config.h> | 57 | #include <linux/config.h> |
58 | 58 | ||
59 | #include <asm/fpu.h> | 59 | #include <asm/fpu.h> |
60 | #ifndef ASM_OFFSETS_C | ||
60 | #include <asm/asm-offsets.h> | 61 | #include <asm/asm-offsets.h> |
62 | #endif | ||
61 | 63 | ||
62 | /* | 64 | /* |
63 | * Base-2 logarithm of number of pages to allocate per task structure | 65 | * Base-2 logarithm of number of pages to allocate per task structure |
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h index cf4a950a0f4f..171b2207bde4 100644 --- a/include/asm-ia64/thread_info.h +++ b/include/asm-ia64/thread_info.h | |||
@@ -5,7 +5,9 @@ | |||
5 | #ifndef _ASM_IA64_THREAD_INFO_H | 5 | #ifndef _ASM_IA64_THREAD_INFO_H |
6 | #define _ASM_IA64_THREAD_INFO_H | 6 | #define _ASM_IA64_THREAD_INFO_H |
7 | 7 | ||
8 | #ifndef ASM_OFFSETS_C | ||
8 | #include <asm/asm-offsets.h> | 9 | #include <asm/asm-offsets.h> |
10 | #endif | ||
9 | #include <asm/processor.h> | 11 | #include <asm/processor.h> |
10 | #include <asm/ptrace.h> | 12 | #include <asm/ptrace.h> |
11 | 13 | ||
@@ -51,9 +53,14 @@ struct thread_info { | |||
51 | }, \ | 53 | }, \ |
52 | } | 54 | } |
53 | 55 | ||
56 | #ifndef ASM_OFFSETS_C | ||
54 | /* how to get the thread information struct from C */ | 57 | /* how to get the thread information struct from C */ |
55 | #define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE)) | 58 | #define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE)) |
56 | #define alloc_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) | 59 | #define alloc_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) |
60 | #else | ||
61 | #define current_thread_info() ((struct thread_info *) 0) | ||
62 | #define alloc_thread_info(tsk) ((struct thread_info *) 0) | ||
63 | #endif | ||
57 | #define free_thread_info(ti) /* nothing */ | 64 | #define free_thread_info(ti) /* nothing */ |
58 | 65 | ||
59 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR | 66 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR |
diff --git a/include/asm-m32r/futex.h b/include/asm-m32r/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-m32r/futex.h +++ b/include/asm-m32r/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h index da805e970844..388e5ee9fa27 100644 --- a/include/asm-m32r/pgtable.h +++ b/include/asm-m32r/pgtable.h | |||
@@ -378,9 +378,6 @@ static inline void pmd_set(pmd_t * pmdp, pte_t * ptep) | |||
378 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ | 378 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ |
379 | #define kern_addr_valid(addr) (1) | 379 | #define kern_addr_valid(addr) (1) |
380 | 380 | ||
381 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
382 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
383 | |||
384 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 381 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
385 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 382 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
386 | 383 | ||
diff --git a/include/asm-m68k/futex.h b/include/asm-m68k/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-m68k/futex.h +++ b/include/asm-m68k/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h index 0c87fc84f7a4..add129e93fd7 100644 --- a/include/asm-m68k/pgtable.h +++ b/include/asm-m68k/pgtable.h | |||
@@ -141,9 +141,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, | |||
141 | 141 | ||
142 | #define kern_addr_valid(addr) (1) | 142 | #define kern_addr_valid(addr) (1) |
143 | 143 | ||
144 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
145 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
146 | |||
147 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 144 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
148 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 145 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
149 | 146 | ||
diff --git a/include/asm-m68knommu/futex.h b/include/asm-m68knommu/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-m68knommu/futex.h +++ b/include/asm-m68knommu/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-m68knommu/pgtable.h b/include/asm-m68knommu/pgtable.h index e2a69fffa370..00893055e6c2 100644 --- a/include/asm-m68knommu/pgtable.h +++ b/include/asm-m68knommu/pgtable.h | |||
@@ -56,8 +56,6 @@ extern int is_in_rom(unsigned long); | |||
56 | * No page table caches to initialise. | 56 | * No page table caches to initialise. |
57 | */ | 57 | */ |
58 | #define pgtable_cache_init() do { } while (0) | 58 | #define pgtable_cache_init() do { } while (0) |
59 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
60 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
61 | 59 | ||
62 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 60 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
63 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 61 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index dbe13da0bdad..cbd1672c94cb 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -358,16 +358,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, | |||
358 | extern phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size); | 358 | extern phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size); |
359 | extern int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned long pfn, unsigned long size, pgprot_t prot); | 359 | extern int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned long pfn, unsigned long size, pgprot_t prot); |
360 | 360 | ||
361 | static inline int io_remap_page_range(struct vm_area_struct *vma, | ||
362 | unsigned long vaddr, | ||
363 | unsigned long paddr, | ||
364 | unsigned long size, | ||
365 | pgprot_t prot) | ||
366 | { | ||
367 | phys_t phys_addr_high = fixup_bigphys_addr(paddr, size); | ||
368 | return remap_pfn_range(vma, vaddr, phys_addr_high >> PAGE_SHIFT, size, prot); | ||
369 | } | ||
370 | |||
371 | static inline int io_remap_pfn_range(struct vm_area_struct *vma, | 361 | static inline int io_remap_pfn_range(struct vm_area_struct *vma, |
372 | unsigned long vaddr, | 362 | unsigned long vaddr, |
373 | unsigned long pfn, | 363 | unsigned long pfn, |
@@ -378,8 +368,6 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma, | |||
378 | return remap_pfn_range(vma, vaddr, pfn, size, prot); | 368 | return remap_pfn_range(vma, vaddr, pfn, size, prot); |
379 | } | 369 | } |
380 | #else | 370 | #else |
381 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
382 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
383 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 371 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
384 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 372 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
385 | #endif | 373 | #endif |
diff --git a/include/asm-parisc/futex.h b/include/asm-parisc/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-parisc/futex.h +++ b/include/asm-parisc/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index f001bb01e38f..820c6e712cd7 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h | |||
@@ -498,9 +498,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
498 | 498 | ||
499 | #endif /* !__ASSEMBLY__ */ | 499 | #endif /* !__ASSEMBLY__ */ |
500 | 500 | ||
501 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
502 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
503 | |||
504 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 501 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
505 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 502 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
506 | 503 | ||
diff --git a/include/asm-ppc/futex.h b/include/asm-ppc/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-ppc/futex.h +++ b/include/asm-ppc/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-ppc/irq.h b/include/asm-ppc/irq.h index 55752474d0d9..bd9674807f05 100644 --- a/include/asm-ppc/irq.h +++ b/include/asm-ppc/irq.h | |||
@@ -138,6 +138,16 @@ irq_canonicalize(int irq) | |||
138 | #define SIU_IRQ7 (14) | 138 | #define SIU_IRQ7 (14) |
139 | #define SIU_LEVEL7 (15) | 139 | #define SIU_LEVEL7 (15) |
140 | 140 | ||
141 | #define MPC8xx_INT_FEC1 SIU_LEVEL1 | ||
142 | #define MPC8xx_INT_FEC2 SIU_LEVEL3 | ||
143 | |||
144 | #define MPC8xx_INT_SCC1 (CPM_IRQ_OFFSET + CPMVEC_SCC1) | ||
145 | #define MPC8xx_INT_SCC2 (CPM_IRQ_OFFSET + CPMVEC_SCC2) | ||
146 | #define MPC8xx_INT_SCC3 (CPM_IRQ_OFFSET + CPMVEC_SCC3) | ||
147 | #define MPC8xx_INT_SCC4 (CPM_IRQ_OFFSET + CPMVEC_SCC4) | ||
148 | #define MPC8xx_INT_SMC1 (CPM_IRQ_OFFSET + CPMVEC_SMC1) | ||
149 | #define MPC8xx_INT_SMC2 (CPM_IRQ_OFFSET + CPMVEC_SMC2) | ||
150 | |||
141 | /* The internal interrupts we can configure as we see fit. | 151 | /* The internal interrupts we can configure as we see fit. |
142 | * My personal preference is CPM at level 2, which puts it above the | 152 | * My personal preference is CPM at level 2, which puts it above the |
143 | * MBX PCI/ISA/IDE interrupts. | 153 | * MBX PCI/ISA/IDE interrupts. |
diff --git a/include/asm-ppc/macio.h b/include/asm-ppc/macio.h index a481b772d154..b553dd4b139e 100644 --- a/include/asm-ppc/macio.h +++ b/include/asm-ppc/macio.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __MACIO_ASIC_H__ | 1 | #ifndef __MACIO_ASIC_H__ |
2 | #define __MACIO_ASIC_H__ | 2 | #define __MACIO_ASIC_H__ |
3 | 3 | ||
4 | #include <linux/mod_devicetable.h> | ||
5 | #include <asm/of_device.h> | 4 | #include <asm/of_device.h> |
6 | 5 | ||
7 | extern struct bus_type macio_bus_type; | 6 | extern struct bus_type macio_bus_type; |
diff --git a/include/asm-ppc/mpc8xx.h b/include/asm-ppc/mpc8xx.h index dc8e59896050..208a2e11daee 100644 --- a/include/asm-ppc/mpc8xx.h +++ b/include/asm-ppc/mpc8xx.h | |||
@@ -97,6 +97,22 @@ extern unsigned char __res[]; | |||
97 | 97 | ||
98 | struct pt_regs; | 98 | struct pt_regs; |
99 | 99 | ||
100 | enum ppc_sys_devices { | ||
101 | MPC8xx_CPM_FEC1, | ||
102 | MPC8xx_CPM_FEC2, | ||
103 | MPC8xx_CPM_I2C, | ||
104 | MPC8xx_CPM_SCC1, | ||
105 | MPC8xx_CPM_SCC2, | ||
106 | MPC8xx_CPM_SCC3, | ||
107 | MPC8xx_CPM_SCC4, | ||
108 | MPC8xx_CPM_SPI, | ||
109 | MPC8xx_CPM_MCC1, | ||
110 | MPC8xx_CPM_MCC2, | ||
111 | MPC8xx_CPM_SMC1, | ||
112 | MPC8xx_CPM_SMC2, | ||
113 | MPC8xx_CPM_USB, | ||
114 | }; | ||
115 | |||
100 | #endif /* !__ASSEMBLY__ */ | 116 | #endif /* !__ASSEMBLY__ */ |
101 | #endif /* CONFIG_8xx */ | 117 | #endif /* CONFIG_8xx */ |
102 | #endif /* __CONFIG_8xx_DEFS */ | 118 | #endif /* __CONFIG_8xx_DEFS */ |
diff --git a/include/asm-ppc/mv64x60.h b/include/asm-ppc/mv64x60.h index 835930d6faa1..75c2ffa26b26 100644 --- a/include/asm-ppc/mv64x60.h +++ b/include/asm-ppc/mv64x60.h | |||
@@ -119,6 +119,14 @@ extern spinlock_t mv64x60_lock; | |||
119 | 119 | ||
120 | #define MV64x60_64BIT_WIN_COUNT 24 | 120 | #define MV64x60_64BIT_WIN_COUNT 24 |
121 | 121 | ||
122 | /* Watchdog Platform Device, Driver Data */ | ||
123 | #define MV64x60_WDT_NAME "wdt" | ||
124 | |||
125 | struct mv64x60_wdt_pdata { | ||
126 | int timeout; /* watchdog expiry in seconds, default 10 */ | ||
127 | int bus_clk; /* bus clock in MHz, default 133 */ | ||
128 | }; | ||
129 | |||
122 | /* | 130 | /* |
123 | * Define a structure that's used to pass in config information to the | 131 | * Define a structure that's used to pass in config information to the |
124 | * core routines. | 132 | * core routines. |
diff --git a/include/asm-ppc/of_device.h b/include/asm-ppc/of_device.h index 4b264cfd3998..575bce418f80 100644 --- a/include/asm-ppc/of_device.h +++ b/include/asm-ppc/of_device.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __OF_DEVICE_H__ | 2 | #define __OF_DEVICE_H__ |
3 | 3 | ||
4 | #include <linux/device.h> | 4 | #include <linux/device.h> |
5 | #include <linux/mod_devicetable.h> | ||
5 | #include <asm/prom.h> | 6 | #include <asm/prom.h> |
6 | 7 | ||
7 | /* | 8 | /* |
@@ -55,7 +56,9 @@ extern int of_register_driver(struct of_platform_driver *drv); | |||
55 | extern void of_unregister_driver(struct of_platform_driver *drv); | 56 | extern void of_unregister_driver(struct of_platform_driver *drv); |
56 | extern int of_device_register(struct of_device *ofdev); | 57 | extern int of_device_register(struct of_device *ofdev); |
57 | extern void of_device_unregister(struct of_device *ofdev); | 58 | extern void of_device_unregister(struct of_device *ofdev); |
58 | extern struct of_device *of_platform_device_create(struct device_node *np, const char *bus_id); | 59 | extern struct of_device *of_platform_device_create(struct device_node *np, |
60 | const char *bus_id, | ||
61 | struct device *parent); | ||
59 | extern void of_release_dev(struct device *dev); | 62 | extern void of_release_dev(struct device *dev); |
60 | 63 | ||
61 | #endif /* __OF_DEVICE_H__ */ | 64 | #endif /* __OF_DEVICE_H__ */ |
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index 92f30b28b252..eee601bb9ada 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h | |||
@@ -812,15 +812,6 @@ extern void kernel_set_cachemode (unsigned long address, unsigned long size, | |||
812 | #ifdef CONFIG_PHYS_64BIT | 812 | #ifdef CONFIG_PHYS_64BIT |
813 | extern int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | 813 | extern int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, |
814 | unsigned long paddr, unsigned long size, pgprot_t prot); | 814 | unsigned long paddr, unsigned long size, pgprot_t prot); |
815 | static inline int io_remap_page_range(struct vm_area_struct *vma, | ||
816 | unsigned long vaddr, | ||
817 | unsigned long paddr, | ||
818 | unsigned long size, | ||
819 | pgprot_t prot) | ||
820 | { | ||
821 | phys_addr_t paddr64 = fixup_bigphys_addr(paddr, size); | ||
822 | return remap_pfn_range(vma, vaddr, paddr64 >> PAGE_SHIFT, size, prot); | ||
823 | } | ||
824 | 815 | ||
825 | static inline int io_remap_pfn_range(struct vm_area_struct *vma, | 816 | static inline int io_remap_pfn_range(struct vm_area_struct *vma, |
826 | unsigned long vaddr, | 817 | unsigned long vaddr, |
@@ -832,8 +823,6 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma, | |||
832 | return remap_pfn_range(vma, vaddr, paddr64 >> PAGE_SHIFT, size, prot); | 823 | return remap_pfn_range(vma, vaddr, paddr64 >> PAGE_SHIFT, size, prot); |
833 | } | 824 | } |
834 | #else | 825 | #else |
835 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
836 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
837 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 826 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
838 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 827 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
839 | #endif | 828 | #endif |
diff --git a/include/asm-ppc/ppc_sys.h b/include/asm-ppc/ppc_sys.h index 048f7c8596ee..549f44843c5e 100644 --- a/include/asm-ppc/ppc_sys.h +++ b/include/asm-ppc/ppc_sys.h | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <asm/mpc83xx.h> | 27 | #include <asm/mpc83xx.h> |
28 | #elif defined(CONFIG_85xx) | 28 | #elif defined(CONFIG_85xx) |
29 | #include <asm/mpc85xx.h> | 29 | #include <asm/mpc85xx.h> |
30 | #elif defined(CONFIG_8xx) | ||
31 | #include <asm/mpc8xx.h> | ||
30 | #elif defined(CONFIG_PPC_MPC52xx) | 32 | #elif defined(CONFIG_PPC_MPC52xx) |
31 | #include <asm/mpc52xx.h> | 33 | #include <asm/mpc52xx.h> |
32 | #elif defined(CONFIG_MPC10X_BRIDGE) | 34 | #elif defined(CONFIG_MPC10X_BRIDGE) |
diff --git a/include/asm-ppc/segment.h b/include/asm-ppc/segment.h deleted file mode 100644 index 0f2f7428d437..000000000000 --- a/include/asm-ppc/segment.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm/uaccess.h> | ||
diff --git a/include/asm-ppc/tlbflush.h b/include/asm-ppc/tlbflush.h index 9850f53f54b0..9afee4ffc835 100644 --- a/include/asm-ppc/tlbflush.h +++ b/include/asm-ppc/tlbflush.h | |||
@@ -72,7 +72,7 @@ static inline void flush_tlb_page(struct vm_area_struct *vma, | |||
72 | static inline void flush_tlb_page_nohash(struct vm_area_struct *vma, | 72 | static inline void flush_tlb_page_nohash(struct vm_area_struct *vma, |
73 | unsigned long vmaddr) | 73 | unsigned long vmaddr) |
74 | { _tlbie(vmaddr); } | 74 | { _tlbie(vmaddr); } |
75 | static inline void flush_tlb_range(struct mm_struct *mm, | 75 | static inline void flush_tlb_range(struct vm_area_struct *vma, |
76 | unsigned long start, unsigned long end) | 76 | unsigned long start, unsigned long end) |
77 | { __tlbia(); } | 77 | { __tlbia(); } |
78 | static inline void flush_tlb_kernel_range(unsigned long start, | 78 | static inline void flush_tlb_kernel_range(unsigned long start, |
diff --git a/include/asm-ppc64/smu.h b/include/asm-ppc64/smu.h index 10b4397af9aa..dee8eefe47bc 100644 --- a/include/asm-ppc64/smu.h +++ b/include/asm-ppc64/smu.h | |||
@@ -1,22 +1,379 @@ | |||
1 | #ifndef _SMU_H | ||
2 | #define _SMU_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * Definitions for talking to the SMU chip in newer G5 PowerMacs | 5 | * Definitions for talking to the SMU chip in newer G5 PowerMacs |
3 | */ | 6 | */ |
4 | 7 | ||
5 | #include <linux/config.h> | 8 | #include <linux/config.h> |
9 | #include <linux/list.h> | ||
10 | |||
11 | /* | ||
12 | * Known SMU commands | ||
13 | * | ||
14 | * Most of what is below comes from looking at the Open Firmware driver, | ||
15 | * though this is still incomplete and could use better documentation here | ||
16 | * or there... | ||
17 | */ | ||
18 | |||
19 | |||
20 | /* | ||
21 | * Partition info commands | ||
22 | * | ||
23 | * I do not know what those are for at this point | ||
24 | */ | ||
25 | #define SMU_CMD_PARTITION_COMMAND 0x3e | ||
26 | |||
27 | |||
28 | /* | ||
29 | * Fan control | ||
30 | * | ||
31 | * This is a "mux" for fan control commands, first byte is the | ||
32 | * "sub" command. | ||
33 | */ | ||
34 | #define SMU_CMD_FAN_COMMAND 0x4a | ||
35 | |||
36 | |||
37 | /* | ||
38 | * Battery access | ||
39 | * | ||
40 | * Same command number as the PMU, could it be same syntax ? | ||
41 | */ | ||
42 | #define SMU_CMD_BATTERY_COMMAND 0x6f | ||
43 | #define SMU_CMD_GET_BATTERY_INFO 0x00 | ||
44 | |||
45 | /* | ||
46 | * Real time clock control | ||
47 | * | ||
48 | * This is a "mux", first data byte contains the "sub" command. | ||
49 | * The "RTC" part of the SMU controls the date, time, powerup | ||
50 | * timer, but also a PRAM | ||
51 | * | ||
52 | * Dates are in BCD format on 7 bytes: | ||
53 | * [sec] [min] [hour] [weekday] [month day] [month] [year] | ||
54 | * with month being 1 based and year minus 100 | ||
55 | */ | ||
56 | #define SMU_CMD_RTC_COMMAND 0x8e | ||
57 | #define SMU_CMD_RTC_SET_PWRUP_TIMER 0x00 /* i: 7 bytes date */ | ||
58 | #define SMU_CMD_RTC_GET_PWRUP_TIMER 0x01 /* o: 7 bytes date */ | ||
59 | #define SMU_CMD_RTC_STOP_PWRUP_TIMER 0x02 | ||
60 | #define SMU_CMD_RTC_SET_PRAM_BYTE_ACC 0x20 /* i: 1 byte (address?) */ | ||
61 | #define SMU_CMD_RTC_SET_PRAM_AUTOINC 0x21 /* i: 1 byte (data?) */ | ||
62 | #define SMU_CMD_RTC_SET_PRAM_LO_BYTES 0x22 /* i: 10 bytes */ | ||
63 | #define SMU_CMD_RTC_SET_PRAM_HI_BYTES 0x23 /* i: 10 bytes */ | ||
64 | #define SMU_CMD_RTC_GET_PRAM_BYTE 0x28 /* i: 1 bytes (address?) */ | ||
65 | #define SMU_CMD_RTC_GET_PRAM_LO_BYTES 0x29 /* o: 10 bytes */ | ||
66 | #define SMU_CMD_RTC_GET_PRAM_HI_BYTES 0x2a /* o: 10 bytes */ | ||
67 | #define SMU_CMD_RTC_SET_DATETIME 0x80 /* i: 7 bytes date */ | ||
68 | #define SMU_CMD_RTC_GET_DATETIME 0x81 /* o: 7 bytes date */ | ||
69 | |||
70 | /* | ||
71 | * i2c commands | ||
72 | * | ||
73 | * To issue an i2c command, first is to send a parameter block to the | ||
74 | * the SMU. This is a command of type 0x9a with 9 bytes of header | ||
75 | * eventually followed by data for a write: | ||
76 | * | ||
77 | * 0: bus number (from device-tree usually, SMU has lots of busses !) | ||
78 | * 1: transfer type/format (see below) | ||
79 | * 2: device address. For combined and combined4 type transfers, this | ||
80 | * is the "write" version of the address (bit 0x01 cleared) | ||
81 | * 3: subaddress length (0..3) | ||
82 | * 4: subaddress byte 0 (or only byte for subaddress length 1) | ||
83 | * 5: subaddress byte 1 | ||
84 | * 6: subaddress byte 2 | ||
85 | * 7: combined address (device address for combined mode data phase) | ||
86 | * 8: data length | ||
87 | * | ||
88 | * The transfer types are the same good old Apple ones it seems, | ||
89 | * that is: | ||
90 | * - 0x00: Simple transfer | ||
91 | * - 0x01: Subaddress transfer (addr write + data tx, no restart) | ||
92 | * - 0x02: Combined transfer (addr write + restart + data tx) | ||
93 | * | ||
94 | * This is then followed by actual data for a write. | ||
95 | * | ||
96 | * At this point, the OF driver seems to have a limitation on transfer | ||
97 | * sizes of 0xd bytes on reads and 0x5 bytes on writes. I do not know | ||
98 | * wether this is just an OF limit due to some temporary buffer size | ||
99 | * or if this is an SMU imposed limit. This driver has the same limitation | ||
100 | * for now as I use a 0x10 bytes temporary buffer as well | ||
101 | * | ||
102 | * Once that is completed, a response is expected from the SMU. This is | ||
103 | * obtained via a command of type 0x9a with a length of 1 byte containing | ||
104 | * 0 as the data byte. OF also fills the rest of the data buffer with 0xff's | ||
105 | * though I can't tell yet if this is actually necessary. Once this command | ||
106 | * is complete, at this point, all I can tell is what OF does. OF tests | ||
107 | * byte 0 of the reply: | ||
108 | * - on read, 0xfe or 0xfc : bus is busy, wait (see below) or nak ? | ||
109 | * - on read, 0x00 or 0x01 : reply is in buffer (after the byte 0) | ||
110 | * - on write, < 0 -> failure (immediate exit) | ||
111 | * - else, OF just exists (without error, weird) | ||
112 | * | ||
113 | * So on read, there is this wait-for-busy thing when getting a 0xfc or | ||
114 | * 0xfe result. OF does a loop of up to 64 retries, waiting 20ms and | ||
115 | * doing the above again until either the retries expire or the result | ||
116 | * is no longer 0xfe or 0xfc | ||
117 | * | ||
118 | * The Darwin I2C driver is less subtle though. On any non-success status | ||
119 | * from the response command, it waits 5ms and tries again up to 20 times, | ||
120 | * it doesn't differenciate between fatal errors or "busy" status. | ||
121 | * | ||
122 | * This driver provides an asynchronous paramblock based i2c command | ||
123 | * interface to be used either directly by low level code or by a higher | ||
124 | * level driver interfacing to the linux i2c layer. The current | ||
125 | * implementation of this relies on working timers & timer interrupts | ||
126 | * though, so be careful of calling context for now. This may be "fixed" | ||
127 | * in the future by adding a polling facility. | ||
128 | */ | ||
129 | #define SMU_CMD_I2C_COMMAND 0x9a | ||
130 | /* transfer types */ | ||
131 | #define SMU_I2C_TRANSFER_SIMPLE 0x00 | ||
132 | #define SMU_I2C_TRANSFER_STDSUB 0x01 | ||
133 | #define SMU_I2C_TRANSFER_COMBINED 0x02 | ||
134 | |||
135 | /* | ||
136 | * Power supply control | ||
137 | * | ||
138 | * The "sub" command is an ASCII string in the data, the | ||
139 | * data lenght is that of the string. | ||
140 | * | ||
141 | * The VSLEW command can be used to get or set the voltage slewing. | ||
142 | * - lenght 5 (only "VSLEW") : it returns "DONE" and 3 bytes of | ||
143 | * reply at data offset 6, 7 and 8. | ||
144 | * - lenght 8 ("VSLEWxyz") has 3 additional bytes appended, and is | ||
145 | * used to set the voltage slewing point. The SMU replies with "DONE" | ||
146 | * I yet have to figure out their exact meaning of those 3 bytes in | ||
147 | * both cases. | ||
148 | * | ||
149 | */ | ||
150 | #define SMU_CMD_POWER_COMMAND 0xaa | ||
151 | #define SMU_CMD_POWER_RESTART "RESTART" | ||
152 | #define SMU_CMD_POWER_SHUTDOWN "SHUTDOWN" | ||
153 | #define SMU_CMD_POWER_VOLTAGE_SLEW "VSLEW" | ||
154 | |||
155 | /* Misc commands | ||
156 | * | ||
157 | * This command seem to be a grab bag of various things | ||
158 | */ | ||
159 | #define SMU_CMD_MISC_df_COMMAND 0xdf | ||
160 | #define SMU_CMD_MISC_df_SET_DISPLAY_LIT 0x02 /* i: 1 byte */ | ||
161 | #define SMU_CMD_MISC_df_NMI_OPTION 0x04 | ||
162 | |||
163 | /* | ||
164 | * Version info commands | ||
165 | * | ||
166 | * I haven't quite tried to figure out how these work | ||
167 | */ | ||
168 | #define SMU_CMD_VERSION_COMMAND 0xea | ||
169 | |||
170 | |||
171 | /* | ||
172 | * Misc commands | ||
173 | * | ||
174 | * This command seem to be a grab bag of various things | ||
175 | */ | ||
176 | #define SMU_CMD_MISC_ee_COMMAND 0xee | ||
177 | #define SMU_CMD_MISC_ee_GET_DATABLOCK_REC 0x02 | ||
178 | #define SMU_CMD_MISC_ee_LEDS_CTRL 0x04 /* i: 00 (00,01) [00] */ | ||
179 | #define SMU_CMD_MISC_ee_GET_DATA 0x05 /* i: 00 , o: ?? */ | ||
180 | |||
181 | |||
182 | |||
183 | /* | ||
184 | * - Kernel side interface - | ||
185 | */ | ||
186 | |||
187 | #ifdef __KERNEL__ | ||
188 | |||
189 | /* | ||
190 | * Asynchronous SMU commands | ||
191 | * | ||
192 | * Fill up this structure and submit it via smu_queue_command(), | ||
193 | * and get notified by the optional done() callback, or because | ||
194 | * status becomes != 1 | ||
195 | */ | ||
196 | |||
197 | struct smu_cmd; | ||
198 | |||
199 | struct smu_cmd | ||
200 | { | ||
201 | /* public */ | ||
202 | u8 cmd; /* command */ | ||
203 | int data_len; /* data len */ | ||
204 | int reply_len; /* reply len */ | ||
205 | void *data_buf; /* data buffer */ | ||
206 | void *reply_buf; /* reply buffer */ | ||
207 | int status; /* command status */ | ||
208 | void (*done)(struct smu_cmd *cmd, void *misc); | ||
209 | void *misc; | ||
210 | |||
211 | /* private */ | ||
212 | struct list_head link; | ||
213 | }; | ||
214 | |||
215 | /* | ||
216 | * Queues an SMU command, all fields have to be initialized | ||
217 | */ | ||
218 | extern int smu_queue_cmd(struct smu_cmd *cmd); | ||
219 | |||
220 | /* | ||
221 | * Simple command wrapper. This structure embeds a small buffer | ||
222 | * to ease sending simple SMU commands from the stack | ||
223 | */ | ||
224 | struct smu_simple_cmd | ||
225 | { | ||
226 | struct smu_cmd cmd; | ||
227 | u8 buffer[16]; | ||
228 | }; | ||
229 | |||
230 | /* | ||
231 | * Queues a simple command. All fields will be initialized by that | ||
232 | * function | ||
233 | */ | ||
234 | extern int smu_queue_simple(struct smu_simple_cmd *scmd, u8 command, | ||
235 | unsigned int data_len, | ||
236 | void (*done)(struct smu_cmd *cmd, void *misc), | ||
237 | void *misc, | ||
238 | ...); | ||
239 | |||
240 | /* | ||
241 | * Completion helper. Pass it to smu_queue_simple or as 'done' | ||
242 | * member to smu_queue_cmd, it will call complete() on the struct | ||
243 | * completion passed in the "misc" argument | ||
244 | */ | ||
245 | extern void smu_done_complete(struct smu_cmd *cmd, void *misc); | ||
6 | 246 | ||
7 | /* | 247 | /* |
8 | * Basic routines for use by architecture. To be extended as | 248 | * Synchronous helpers. Will spin-wait for completion of a command |
9 | * we understand more of the chip | 249 | */ |
250 | extern void smu_spinwait_cmd(struct smu_cmd *cmd); | ||
251 | |||
252 | static inline void smu_spinwait_simple(struct smu_simple_cmd *scmd) | ||
253 | { | ||
254 | smu_spinwait_cmd(&scmd->cmd); | ||
255 | } | ||
256 | |||
257 | /* | ||
258 | * Poll routine to call if blocked with irqs off | ||
259 | */ | ||
260 | extern void smu_poll(void); | ||
261 | |||
262 | |||
263 | /* | ||
264 | * Init routine, presence check.... | ||
10 | */ | 265 | */ |
11 | extern int smu_init(void); | 266 | extern int smu_init(void); |
12 | extern int smu_present(void); | 267 | extern int smu_present(void); |
268 | struct of_device; | ||
269 | extern struct of_device *smu_get_ofdev(void); | ||
270 | |||
271 | |||
272 | /* | ||
273 | * Common command wrappers | ||
274 | */ | ||
13 | extern void smu_shutdown(void); | 275 | extern void smu_shutdown(void); |
14 | extern void smu_restart(void); | 276 | extern void smu_restart(void); |
15 | extern int smu_get_rtc_time(struct rtc_time *time); | 277 | struct rtc_time; |
16 | extern int smu_set_rtc_time(struct rtc_time *time); | 278 | extern int smu_get_rtc_time(struct rtc_time *time, int spinwait); |
279 | extern int smu_set_rtc_time(struct rtc_time *time, int spinwait); | ||
17 | 280 | ||
18 | /* | 281 | /* |
19 | * SMU command buffer absolute address, exported by pmac_setup, | 282 | * SMU command buffer absolute address, exported by pmac_setup, |
20 | * this is allocated very early during boot. | 283 | * this is allocated very early during boot. |
21 | */ | 284 | */ |
22 | extern unsigned long smu_cmdbuf_abs; | 285 | extern unsigned long smu_cmdbuf_abs; |
286 | |||
287 | |||
288 | /* | ||
289 | * Kenrel asynchronous i2c interface | ||
290 | */ | ||
291 | |||
292 | /* SMU i2c header, exactly matches i2c header on wire */ | ||
293 | struct smu_i2c_param | ||
294 | { | ||
295 | u8 bus; /* SMU bus ID (from device tree) */ | ||
296 | u8 type; /* i2c transfer type */ | ||
297 | u8 devaddr; /* device address (includes direction) */ | ||
298 | u8 sublen; /* subaddress length */ | ||
299 | u8 subaddr[3]; /* subaddress */ | ||
300 | u8 caddr; /* combined address, filled by SMU driver */ | ||
301 | u8 datalen; /* length of transfer */ | ||
302 | u8 data[7]; /* data */ | ||
303 | }; | ||
304 | |||
305 | #define SMU_I2C_READ_MAX 0x0d | ||
306 | #define SMU_I2C_WRITE_MAX 0x05 | ||
307 | |||
308 | struct smu_i2c_cmd | ||
309 | { | ||
310 | /* public */ | ||
311 | struct smu_i2c_param info; | ||
312 | void (*done)(struct smu_i2c_cmd *cmd, void *misc); | ||
313 | void *misc; | ||
314 | int status; /* 1 = pending, 0 = ok, <0 = fail */ | ||
315 | |||
316 | /* private */ | ||
317 | struct smu_cmd scmd; | ||
318 | int read; | ||
319 | int stage; | ||
320 | int retries; | ||
321 | u8 pdata[0x10]; | ||
322 | struct list_head link; | ||
323 | }; | ||
324 | |||
325 | /* | ||
326 | * Call this to queue an i2c command to the SMU. You must fill info, | ||
327 | * including info.data for a write, done and misc. | ||
328 | * For now, no polling interface is provided so you have to use completion | ||
329 | * callback. | ||
330 | */ | ||
331 | extern int smu_queue_i2c(struct smu_i2c_cmd *cmd); | ||
332 | |||
333 | |||
334 | #endif /* __KERNEL__ */ | ||
335 | |||
336 | /* | ||
337 | * - Userland interface - | ||
338 | */ | ||
339 | |||
340 | /* | ||
341 | * A given instance of the device can be configured for 2 different | ||
342 | * things at the moment: | ||
343 | * | ||
344 | * - sending SMU commands (default at open() time) | ||
345 | * - receiving SMU events (not yet implemented) | ||
346 | * | ||
347 | * Commands are written with write() of a command block. They can be | ||
348 | * "driver" commands (for example to switch to event reception mode) | ||
349 | * or real SMU commands. They are made of a header followed by command | ||
350 | * data if any. | ||
351 | * | ||
352 | * For SMU commands (not for driver commands), you can then read() back | ||
353 | * a reply. The reader will be blocked or not depending on how the device | ||
354 | * file is opened. poll() isn't implemented yet. The reply will consist | ||
355 | * of a header as well, followed by the reply data if any. You should | ||
356 | * always provide a buffer large enough for the maximum reply data, I | ||
357 | * recommand one page. | ||
358 | * | ||
359 | * It is illegal to send SMU commands through a file descriptor configured | ||
360 | * for events reception | ||
361 | * | ||
362 | */ | ||
363 | struct smu_user_cmd_hdr | ||
364 | { | ||
365 | __u32 cmdtype; | ||
366 | #define SMU_CMDTYPE_SMU 0 /* SMU command */ | ||
367 | #define SMU_CMDTYPE_WANTS_EVENTS 1 /* switch fd to events mode */ | ||
368 | |||
369 | __u8 cmd; /* SMU command byte */ | ||
370 | __u32 data_len; /* Lenght of data following */ | ||
371 | }; | ||
372 | |||
373 | struct smu_user_reply_hdr | ||
374 | { | ||
375 | __u32 status; /* Command status */ | ||
376 | __u32 reply_len; /* Lenght of data follwing */ | ||
377 | }; | ||
378 | |||
379 | #endif /* _SMU_H */ | ||
diff --git a/include/asm-s390/futex.h b/include/asm-s390/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-s390/futex.h +++ b/include/asm-s390/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-sh/futex.h b/include/asm-sh/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-sh/futex.h +++ b/include/asm-sh/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index ecb909572d3f..0f4bcaae61bd 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h | |||
@@ -277,9 +277,6 @@ typedef pte_t *pte_addr_t; | |||
277 | 277 | ||
278 | #define kern_addr_valid(addr) (1) | 278 | #define kern_addr_valid(addr) (1) |
279 | 279 | ||
280 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
281 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
282 | |||
283 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 280 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
284 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 281 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
285 | 282 | ||
diff --git a/include/asm-sh64/futex.h b/include/asm-sh64/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-sh64/futex.h +++ b/include/asm-sh64/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-sh64/pgtable.h b/include/asm-sh64/pgtable.h index 78ac6be2d9ef..51db4307bfaf 100644 --- a/include/asm-sh64/pgtable.h +++ b/include/asm-sh64/pgtable.h | |||
@@ -482,9 +482,6 @@ extern void update_mmu_cache(struct vm_area_struct * vma, | |||
482 | #define PageSkip(page) (0) | 482 | #define PageSkip(page) (0) |
483 | #define kern_addr_valid(addr) (1) | 483 | #define kern_addr_valid(addr) (1) |
484 | 484 | ||
485 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
486 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
487 | |||
488 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 485 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
489 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 486 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
490 | 487 | ||
diff --git a/include/asm-sparc/futex.h b/include/asm-sparc/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-sparc/futex.h +++ b/include/asm-sparc/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-sparc64/cacheflush.h b/include/asm-sparc64/cacheflush.h index 51b26e81d828..ededd2659eab 100644 --- a/include/asm-sparc64/cacheflush.h +++ b/include/asm-sparc64/cacheflush.h | |||
@@ -4,13 +4,6 @@ | |||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <asm/page.h> | 5 | #include <asm/page.h> |
6 | 6 | ||
7 | /* Flushing for D-cache alias handling is only needed if | ||
8 | * the page size is smaller than 16K. | ||
9 | */ | ||
10 | #if PAGE_SHIFT < 14 | ||
11 | #define DCACHE_ALIASING_POSSIBLE | ||
12 | #endif | ||
13 | |||
14 | #ifndef __ASSEMBLY__ | 7 | #ifndef __ASSEMBLY__ |
15 | 8 | ||
16 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
diff --git a/include/asm-sparc64/futex.h b/include/asm-sparc64/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-sparc64/futex.h +++ b/include/asm-sparc64/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h index 4c1098474c73..c393f815b0be 100644 --- a/include/asm-sparc64/ide.h +++ b/include/asm-sparc64/ide.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <asm/spitfire.h> | 16 | #include <asm/spitfire.h> |
17 | #include <asm/cacheflush.h> | 17 | #include <asm/cacheflush.h> |
18 | #include <asm/page.h> | ||
18 | 19 | ||
19 | #ifndef MAX_HWIFS | 20 | #ifndef MAX_HWIFS |
20 | # ifdef CONFIG_BLK_DEV_IDEPCI | 21 | # ifdef CONFIG_BLK_DEV_IDEPCI |
diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index c9f8ef208ea5..7f8d764abc47 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h | |||
@@ -21,6 +21,13 @@ | |||
21 | #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) | 21 | #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) |
22 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 22 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
23 | 23 | ||
24 | /* Flushing for D-cache alias handling is only needed if | ||
25 | * the page size is smaller than 16K. | ||
26 | */ | ||
27 | #if PAGE_SHIFT < 14 | ||
28 | #define DCACHE_ALIASING_POSSIBLE | ||
29 | #endif | ||
30 | |||
24 | #ifdef __KERNEL__ | 31 | #ifdef __KERNEL__ |
25 | 32 | ||
26 | #ifndef __ASSEMBLY__ | 33 | #ifndef __ASSEMBLY__ |
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h index b9b1914aae63..a96067cca963 100644 --- a/include/asm-sparc64/pgalloc.h +++ b/include/asm-sparc64/pgalloc.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/spitfire.h> | 10 | #include <asm/spitfire.h> |
11 | #include <asm/cpudata.h> | 11 | #include <asm/cpudata.h> |
12 | #include <asm/cacheflush.h> | 12 | #include <asm/cacheflush.h> |
13 | #include <asm/page.h> | ||
13 | 14 | ||
14 | /* Page table allocation/freeing. */ | 15 | /* Page table allocation/freeing. */ |
15 | #ifdef CONFIG_SMP | 16 | #ifdef CONFIG_SMP |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index a2b4f5ed4625..a297f6144f0f 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -24,21 +24,23 @@ | |||
24 | #include <asm/processor.h> | 24 | #include <asm/processor.h> |
25 | #include <asm/const.h> | 25 | #include <asm/const.h> |
26 | 26 | ||
27 | /* The kernel image occupies 0x4000000 to 0x1000000 (4MB --> 16MB). | 27 | /* The kernel image occupies 0x4000000 to 0x1000000 (4MB --> 32MB). |
28 | * The page copy blockops use 0x1000000 to 0x18000000 (16MB --> 24MB). | 28 | * The page copy blockops can use 0x2000000 to 0x10000000. |
29 | * The PROM resides in an area spanning 0xf0000000 to 0x100000000. | 29 | * The PROM resides in an area spanning 0xf0000000 to 0x100000000. |
30 | * The vmalloc area spans 0x140000000 to 0x200000000. | 30 | * The vmalloc area spans 0x100000000 to 0x200000000. |
31 | * Since modules need to be in the lowest 32-bits of the address space, | ||
32 | * we place them right before the OBP area from 0x10000000 to 0xf0000000. | ||
31 | * There is a single static kernel PMD which maps from 0x0 to address | 33 | * There is a single static kernel PMD which maps from 0x0 to address |
32 | * 0x400000000. | 34 | * 0x400000000. |
33 | */ | 35 | */ |
34 | #define TLBTEMP_BASE _AC(0x0000000001000000,UL) | 36 | #define TLBTEMP_BASE _AC(0x0000000002000000,UL) |
35 | #define MODULES_VADDR _AC(0x0000000002000000,UL) | 37 | #define MODULES_VADDR _AC(0x0000000010000000,UL) |
36 | #define MODULES_LEN _AC(0x000000007e000000,UL) | 38 | #define MODULES_LEN _AC(0x00000000e0000000,UL) |
37 | #define MODULES_END _AC(0x0000000080000000,UL) | 39 | #define MODULES_END _AC(0x00000000f0000000,UL) |
38 | #define VMALLOC_START _AC(0x0000000140000000,UL) | ||
39 | #define VMALLOC_END _AC(0x0000000200000000,UL) | ||
40 | #define LOW_OBP_ADDRESS _AC(0x00000000f0000000,UL) | 40 | #define LOW_OBP_ADDRESS _AC(0x00000000f0000000,UL) |
41 | #define HI_OBP_ADDRESS _AC(0x0000000100000000,UL) | 41 | #define HI_OBP_ADDRESS _AC(0x0000000100000000,UL) |
42 | #define VMALLOC_START _AC(0x0000000100000000,UL) | ||
43 | #define VMALLOC_END _AC(0x0000000200000000,UL) | ||
42 | 44 | ||
43 | /* XXX All of this needs to be rethought so we can take advantage | 45 | /* XXX All of this needs to be rethought so we can take advantage |
44 | * XXX cheetah's full 64-bit virtual address space, ie. no more hole | 46 | * XXX cheetah's full 64-bit virtual address space, ie. no more hole |
diff --git a/include/asm-um/futex.h b/include/asm-um/futex.h index 2cac5ecd9d00..142ee2d8e0fd 100644 --- a/include/asm-um/futex.h +++ b/include/asm-um/futex.h | |||
@@ -1,53 +1,12 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef __UM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define __UM_FUTEX_H |
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | 3 | ||
6 | #include <linux/futex.h> | 4 | #include <linux/futex.h> |
7 | #include <asm/errno.h> | 5 | #include <asm/errno.h> |
6 | #include <asm/system.h> | ||
7 | #include <asm/processor.h> | ||
8 | #include <asm/uaccess.h> | 8 | #include <asm/uaccess.h> |
9 | 9 | ||
10 | static inline int | 10 | #include "asm/arch/futex.h" |
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret, tem; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | 11 | ||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 12 | #endif |
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index ed06170e0edd..616d02b57ea9 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h | |||
@@ -346,7 +346,6 @@ static inline void set_pte(pte_t *pteptr, pte_t pteval) | |||
346 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 346 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
347 | { | 347 | { |
348 | pte_set_val(pte, (pte_val(pte) & _PAGE_CHG_MASK), newprot); | 348 | pte_set_val(pte, (pte_val(pte) & _PAGE_CHG_MASK), newprot); |
349 | if(pte_present(pte)) pte = pte_mknewpage(pte_mknewprot(pte)); | ||
350 | return pte; | 349 | return pte; |
351 | } | 350 | } |
352 | 351 | ||
diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h index b2fc94fbc2d9..2d242360c3d6 100644 --- a/include/asm-um/processor-generic.h +++ b/include/asm-um/processor-generic.h | |||
@@ -21,6 +21,7 @@ struct thread_struct { | |||
21 | * copy_thread) to mark that we are begin called from userspace (fork / | 21 | * copy_thread) to mark that we are begin called from userspace (fork / |
22 | * vfork / clone), and reset to 0 after. It is left to 0 when called | 22 | * vfork / clone), and reset to 0 after. It is left to 0 when called |
23 | * from kernelspace (i.e. kernel_thread() or fork_idle(), as of 2.6.11). */ | 23 | * from kernelspace (i.e. kernel_thread() or fork_idle(), as of 2.6.11). */ |
24 | struct task_struct *saved_task; | ||
24 | int forking; | 25 | int forking; |
25 | int nsyscalls; | 26 | int nsyscalls; |
26 | struct pt_regs regs; | 27 | struct pt_regs regs; |
diff --git a/include/asm-um/system-i386.h b/include/asm-um/system-i386.h index ea8381de3cc9..c436263e67ba 100644 --- a/include/asm-um/system-i386.h +++ b/include/asm-um/system-i386.h | |||
@@ -3,6 +3,4 @@ | |||
3 | 3 | ||
4 | #include "asm/system-generic.h" | 4 | #include "asm/system-generic.h" |
5 | 5 | ||
6 | #define __HAVE_ARCH_CMPXCHG 1 | ||
7 | |||
8 | #endif | 6 | #endif |
diff --git a/include/asm-v850/futex.h b/include/asm-v850/futex.h index 2cac5ecd9d00..9feff4ce1424 100644 --- a/include/asm-v850/futex.h +++ b/include/asm-v850/futex.h | |||
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
14 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
15 | int oparg = (encoded_op << 8) >> 20; | 15 | int oparg = (encoded_op << 8) >> 20; |
16 | int cmparg = (encoded_op << 20) >> 20; | 16 | int cmparg = (encoded_op << 20) >> 20; |
17 | int oldval = 0, ret, tem; | 17 | int oldval = 0, ret; |
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
19 | oparg = 1 << oparg; | 19 | oparg = 1 << oparg; |
20 | 20 | ||
diff --git a/include/asm-x86_64/desc.h b/include/asm-x86_64/desc.h index 594e610f4a1e..68ac3c62fe3d 100644 --- a/include/asm-x86_64/desc.h +++ b/include/asm-x86_64/desc.h | |||
@@ -8,6 +8,8 @@ | |||
8 | #ifndef __ASSEMBLY__ | 8 | #ifndef __ASSEMBLY__ |
9 | 9 | ||
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/smp.h> | ||
12 | |||
11 | #include <asm/segment.h> | 13 | #include <asm/segment.h> |
12 | #include <asm/mmu.h> | 14 | #include <asm/mmu.h> |
13 | 15 | ||
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 1dc110ba82d6..2cb483516459 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -421,9 +421,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
421 | 421 | ||
422 | extern int kern_addr_valid(unsigned long addr); | 422 | extern int kern_addr_valid(unsigned long addr); |
423 | 423 | ||
424 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
425 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
426 | |||
427 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 424 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
428 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 425 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
429 | 426 | ||
diff --git a/include/asm-xtensa/atomic.h b/include/asm-xtensa/atomic.h index 24f86f0e43cf..12b5732dc6e5 100644 --- a/include/asm-xtensa/atomic.h +++ b/include/asm-xtensa/atomic.h | |||
@@ -22,7 +22,7 @@ typedef struct { volatile int counter; } atomic_t; | |||
22 | #include <asm/processor.h> | 22 | #include <asm/processor.h> |
23 | #include <asm/system.h> | 23 | #include <asm/system.h> |
24 | 24 | ||
25 | #define ATOMIC_INIT(i) ( (atomic_t) { (i) } ) | 25 | #define ATOMIC_INIT(i) { (i) } |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * This Xtensa implementation assumes that the right mechanism | 28 | * This Xtensa implementation assumes that the right mechanism |
diff --git a/include/asm-xtensa/bitops.h b/include/asm-xtensa/bitops.h index d395ef226c32..e76ee889e21d 100644 --- a/include/asm-xtensa/bitops.h +++ b/include/asm-xtensa/bitops.h | |||
@@ -174,7 +174,7 @@ static __inline__ int test_bit(int nr, const volatile void *addr) | |||
174 | return 1UL & (((const volatile unsigned int *)addr)[nr>>5] >> (nr&31)); | 174 | return 1UL & (((const volatile unsigned int *)addr)[nr>>5] >> (nr&31)); |
175 | } | 175 | } |
176 | 176 | ||
177 | #if XCHAL_HAVE_NSAU | 177 | #if XCHAL_HAVE_NSA |
178 | 178 | ||
179 | static __inline__ int __cntlz (unsigned long x) | 179 | static __inline__ int __cntlz (unsigned long x) |
180 | { | 180 | { |
diff --git a/include/asm-xtensa/hardirq.h b/include/asm-xtensa/hardirq.h index e07c76c36b95..aa9c1adf68d7 100644 --- a/include/asm-xtensa/hardirq.h +++ b/include/asm-xtensa/hardirq.h | |||
@@ -23,6 +23,7 @@ typedef struct { | |||
23 | unsigned int __nmi_count; /* arch dependent */ | 23 | unsigned int __nmi_count; /* arch dependent */ |
24 | } ____cacheline_aligned irq_cpustat_t; | 24 | } ____cacheline_aligned irq_cpustat_t; |
25 | 25 | ||
26 | void ack_bad_irq(unsigned int irq); | ||
26 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | 27 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ |
27 | 28 | ||
28 | #endif /* _XTENSA_HARDIRQ_H */ | 29 | #endif /* _XTENSA_HARDIRQ_H */ |
diff --git a/include/asm-xtensa/pgtable.h b/include/asm-xtensa/pgtable.h index 883ebc2d75d6..987e3b802313 100644 --- a/include/asm-xtensa/pgtable.h +++ b/include/asm-xtensa/pgtable.h | |||
@@ -441,11 +441,11 @@ extern void update_mmu_cache(struct vm_area_struct * vma, | |||
441 | unsigned long address, pte_t pte); | 441 | unsigned long address, pte_t pte); |
442 | 442 | ||
443 | /* | 443 | /* |
444 | * remap a physical address `phys' of size `size' with page protection `prot' | 444 | * remap a physical page `pfn' of size `size' with page protection `prot' |
445 | * into virtual address `from' | 445 | * into virtual address `from' |
446 | */ | 446 | */ |
447 | #define io_remap_page_range(vma,from,phys,size,prot) \ | 447 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ |
448 | remap_pfn_range(vma, from, (phys) >> PAGE_SHIFT, size, prot) | 448 | remap_pfn_range(vma, from, pfn, size, prot) |
449 | 449 | ||
450 | 450 | ||
451 | /* No page table caches to init */ | 451 | /* No page table caches to init */ |
diff --git a/include/asm-xtensa/semaphore.h b/include/asm-xtensa/semaphore.h index db740b8bc6f0..09e89ab3eb61 100644 --- a/include/asm-xtensa/semaphore.h +++ b/include/asm-xtensa/semaphore.h | |||
@@ -20,28 +20,19 @@ struct semaphore { | |||
20 | atomic_t count; | 20 | atomic_t count; |
21 | int sleepers; | 21 | int sleepers; |
22 | wait_queue_head_t wait; | 22 | wait_queue_head_t wait; |
23 | #if WAITQUEUE_DEBUG | ||
24 | long __magic; | ||
25 | #endif | ||
26 | }; | 23 | }; |
27 | 24 | ||
28 | #if WAITQUEUE_DEBUG | 25 | #define __SEMAPHORE_INITIALIZER(name,n) \ |
29 | # define __SEM_DEBUG_INIT(name) \ | 26 | { \ |
30 | , (int)&(name).__magic | 27 | .count = ATOMIC_INIT(n), \ |
31 | #else | 28 | .sleepers = 0, \ |
32 | # define __SEM_DEBUG_INIT(name) | 29 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
33 | #endif | 30 | } |
34 | |||
35 | #define __SEMAPHORE_INITIALIZER(name,count) \ | ||
36 | { ATOMIC_INIT(count), \ | ||
37 | 0, \ | ||
38 | __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | ||
39 | __SEM_DEBUG_INIT(name) } | ||
40 | 31 | ||
41 | #define __MUTEX_INITIALIZER(name) \ | 32 | #define __MUTEX_INITIALIZER(name) \ |
42 | __SEMAPHORE_INITIALIZER(name, 1) | 33 | __SEMAPHORE_INITIALIZER(name, 1) |
43 | 34 | ||
44 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 35 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
45 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 36 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
46 | 37 | ||
47 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) | 38 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) |
@@ -49,17 +40,8 @@ struct semaphore { | |||
49 | 40 | ||
50 | static inline void sema_init (struct semaphore *sem, int val) | 41 | static inline void sema_init (struct semaphore *sem, int val) |
51 | { | 42 | { |
52 | /* | ||
53 | * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); | ||
54 | * | ||
55 | * i'd rather use the more flexible initialization above, but sadly | ||
56 | * GCC 2.7.2.3 emits a bogus warning. EGCS doesnt. Oh well. | ||
57 | */ | ||
58 | atomic_set(&sem->count, val); | 43 | atomic_set(&sem->count, val); |
59 | init_waitqueue_head(&sem->wait); | 44 | init_waitqueue_head(&sem->wait); |
60 | #if WAITQUEUE_DEBUG | ||
61 | sem->__magic = (int)&sem->__magic; | ||
62 | #endif | ||
63 | } | 45 | } |
64 | 46 | ||
65 | static inline void init_MUTEX (struct semaphore *sem) | 47 | static inline void init_MUTEX (struct semaphore *sem) |
@@ -81,9 +63,7 @@ extern spinlock_t semaphore_wake_lock; | |||
81 | 63 | ||
82 | static inline void down(struct semaphore * sem) | 64 | static inline void down(struct semaphore * sem) |
83 | { | 65 | { |
84 | #if WAITQUEUE_DEBUG | 66 | might_sleep(); |
85 | CHECK_MAGIC(sem->__magic); | ||
86 | #endif | ||
87 | 67 | ||
88 | if (atomic_sub_return(1, &sem->count) < 0) | 68 | if (atomic_sub_return(1, &sem->count) < 0) |
89 | __down(sem); | 69 | __down(sem); |
@@ -92,9 +72,8 @@ static inline void down(struct semaphore * sem) | |||
92 | static inline int down_interruptible(struct semaphore * sem) | 72 | static inline int down_interruptible(struct semaphore * sem) |
93 | { | 73 | { |
94 | int ret = 0; | 74 | int ret = 0; |
95 | #if WAITQUEUE_DEBUG | 75 | |
96 | CHECK_MAGIC(sem->__magic); | 76 | might_sleep(); |
97 | #endif | ||
98 | 77 | ||
99 | if (atomic_sub_return(1, &sem->count) < 0) | 78 | if (atomic_sub_return(1, &sem->count) < 0) |
100 | ret = __down_interruptible(sem); | 79 | ret = __down_interruptible(sem); |
@@ -104,9 +83,6 @@ static inline int down_interruptible(struct semaphore * sem) | |||
104 | static inline int down_trylock(struct semaphore * sem) | 83 | static inline int down_trylock(struct semaphore * sem) |
105 | { | 84 | { |
106 | int ret = 0; | 85 | int ret = 0; |
107 | #if WAITQUEUE_DEBUG | ||
108 | CHECK_MAGIC(sem->__magic); | ||
109 | #endif | ||
110 | 86 | ||
111 | if (atomic_sub_return(1, &sem->count) < 0) | 87 | if (atomic_sub_return(1, &sem->count) < 0) |
112 | ret = __down_trylock(sem); | 88 | ret = __down_trylock(sem); |
@@ -119,9 +95,6 @@ static inline int down_trylock(struct semaphore * sem) | |||
119 | */ | 95 | */ |
120 | static inline void up(struct semaphore * sem) | 96 | static inline void up(struct semaphore * sem) |
121 | { | 97 | { |
122 | #if WAITQUEUE_DEBUG | ||
123 | CHECK_MAGIC(sem->__magic); | ||
124 | #endif | ||
125 | if (atomic_add_return(1, &sem->count) <= 0) | 98 | if (atomic_add_return(1, &sem->count) <= 0) |
126 | __up(sem); | 99 | __up(sem); |
127 | } | 100 | } |
diff --git a/include/asm-xtensa/system.h b/include/asm-xtensa/system.h index f09393232e5e..9284867f1cb9 100644 --- a/include/asm-xtensa/system.h +++ b/include/asm-xtensa/system.h | |||
@@ -189,20 +189,6 @@ static inline unsigned long xchg_u32(volatile int * m, unsigned long val) | |||
189 | 189 | ||
190 | #define tas(ptr) (xchg((ptr),1)) | 190 | #define tas(ptr) (xchg((ptr),1)) |
191 | 191 | ||
192 | #if ( __XCC__ == 1 ) | ||
193 | |||
194 | /* xt-xcc processes __inline__ differently than xt-gcc and decides to | ||
195 | * insert an out-of-line copy of function __xchg. This presents the | ||
196 | * unresolved symbol at link time of __xchg_called_with_bad_pointer, | ||
197 | * even though such a function would never be called at run-time. | ||
198 | * xt-gcc always inlines __xchg, and optimizes away the undefined | ||
199 | * bad_pointer function. | ||
200 | */ | ||
201 | |||
202 | #define xchg(ptr,x) xchg_u32(ptr,x) | ||
203 | |||
204 | #else /* assume xt-gcc */ | ||
205 | |||
206 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 192 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
207 | 193 | ||
208 | /* | 194 | /* |
@@ -224,8 +210,6 @@ __xchg(unsigned long x, volatile void * ptr, int size) | |||
224 | return x; | 210 | return x; |
225 | } | 211 | } |
226 | 212 | ||
227 | #endif | ||
228 | |||
229 | extern void set_except_vector(int n, void *addr); | 213 | extern void set_except_vector(int n, void *addr); |
230 | 214 | ||
231 | static inline void spill_registers(void) | 215 | static inline void spill_registers(void) |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 68aba0c02e49..b2a2509bd7ea 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -51,7 +51,8 @@ | |||
51 | #define AUDIT_WATCH_LIST 1009 /* List all file/dir watches */ | 51 | #define AUDIT_WATCH_LIST 1009 /* List all file/dir watches */ |
52 | #define AUDIT_SIGNAL_INFO 1010 /* Get info about sender of signal to auditd */ | 52 | #define AUDIT_SIGNAL_INFO 1010 /* Get info about sender of signal to auditd */ |
53 | 53 | ||
54 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages uninteresting to kernel */ | 54 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ |
55 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ | ||
55 | #define AUDIT_LAST_USER_MSG 1199 | 56 | #define AUDIT_LAST_USER_MSG 1199 |
56 | 57 | ||
57 | #define AUDIT_DAEMON_START 1200 /* Daemon startup record */ | 58 | #define AUDIT_DAEMON_START 1200 /* Daemon startup record */ |
@@ -75,10 +76,15 @@ | |||
75 | #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ | 76 | #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ |
76 | 77 | ||
77 | /* Rule flags */ | 78 | /* Rule flags */ |
78 | #define AUDIT_PER_TASK 0x01 /* Apply rule at task creation (not syscall) */ | 79 | #define AUDIT_FILTER_USER 0x00 /* Apply rule to user-generated messages */ |
79 | #define AUDIT_AT_ENTRY 0x02 /* Apply rule at syscall entry */ | 80 | #define AUDIT_FILTER_TASK 0x01 /* Apply rule at task creation (not syscall) */ |
80 | #define AUDIT_AT_EXIT 0x04 /* Apply rule at syscall exit */ | 81 | #define AUDIT_FILTER_ENTRY 0x02 /* Apply rule at syscall entry */ |
81 | #define AUDIT_PREPEND 0x10 /* Prepend to front of list */ | 82 | #define AUDIT_FILTER_WATCH 0x03 /* Apply rule to file system watches */ |
83 | #define AUDIT_FILTER_EXIT 0x04 /* Apply rule at syscall exit */ | ||
84 | |||
85 | #define AUDIT_NR_FILTERS 5 | ||
86 | |||
87 | #define AUDIT_FILTER_PREPEND 0x10 /* Prepend to front of list */ | ||
82 | 88 | ||
83 | /* Rule actions */ | 89 | /* Rule actions */ |
84 | #define AUDIT_NEVER 0 /* Do not build context if rule matches */ | 90 | #define AUDIT_NEVER 0 /* Do not build context if rule matches */ |
@@ -199,6 +205,7 @@ struct audit_sig_info { | |||
199 | struct audit_buffer; | 205 | struct audit_buffer; |
200 | struct audit_context; | 206 | struct audit_context; |
201 | struct inode; | 207 | struct inode; |
208 | struct netlink_skb_parms; | ||
202 | 209 | ||
203 | #define AUDITSC_INVALID 0 | 210 | #define AUDITSC_INVALID 0 |
204 | #define AUDITSC_SUCCESS 1 | 211 | #define AUDITSC_SUCCESS 1 |
@@ -215,7 +222,7 @@ extern void audit_syscall_entry(struct task_struct *task, int arch, | |||
215 | extern void audit_syscall_exit(struct task_struct *task, int failed, long return_code); | 222 | extern void audit_syscall_exit(struct task_struct *task, int failed, long return_code); |
216 | extern void audit_getname(const char *name); | 223 | extern void audit_getname(const char *name); |
217 | extern void audit_putname(const char *name); | 224 | extern void audit_putname(const char *name); |
218 | extern void audit_inode(const char *name, const struct inode *inode); | 225 | extern void audit_inode(const char *name, const struct inode *inode, unsigned flags); |
219 | 226 | ||
220 | /* Private API (for audit.c only) */ | 227 | /* Private API (for audit.c only) */ |
221 | extern int audit_receive_filter(int type, int pid, int uid, int seq, | 228 | extern int audit_receive_filter(int type, int pid, int uid, int seq, |
@@ -230,6 +237,7 @@ extern int audit_socketcall(int nargs, unsigned long *args); | |||
230 | extern int audit_sockaddr(int len, void *addr); | 237 | extern int audit_sockaddr(int len, void *addr); |
231 | extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt); | 238 | extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt); |
232 | extern void audit_signal_info(int sig, struct task_struct *t); | 239 | extern void audit_signal_info(int sig, struct task_struct *t); |
240 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); | ||
233 | #else | 241 | #else |
234 | #define audit_alloc(t) ({ 0; }) | 242 | #define audit_alloc(t) ({ 0; }) |
235 | #define audit_free(t) do { ; } while (0) | 243 | #define audit_free(t) do { ; } while (0) |
@@ -237,7 +245,7 @@ extern void audit_signal_info(int sig, struct task_struct *t); | |||
237 | #define audit_syscall_exit(t,f,r) do { ; } while (0) | 245 | #define audit_syscall_exit(t,f,r) do { ; } while (0) |
238 | #define audit_getname(n) do { ; } while (0) | 246 | #define audit_getname(n) do { ; } while (0) |
239 | #define audit_putname(n) do { ; } while (0) | 247 | #define audit_putname(n) do { ; } while (0) |
240 | #define audit_inode(n,i) do { ; } while (0) | 248 | #define audit_inode(n,i,f) do { ; } while (0) |
241 | #define audit_receive_filter(t,p,u,s,d,l) ({ -EOPNOTSUPP; }) | 249 | #define audit_receive_filter(t,p,u,s,d,l) ({ -EOPNOTSUPP; }) |
242 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) | 250 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) |
243 | #define audit_get_loginuid(c) ({ -1; }) | 251 | #define audit_get_loginuid(c) ({ -1; }) |
@@ -246,16 +254,17 @@ extern void audit_signal_info(int sig, struct task_struct *t); | |||
246 | #define audit_sockaddr(len, addr) ({ 0; }) | 254 | #define audit_sockaddr(len, addr) ({ 0; }) |
247 | #define audit_avc_path(dentry, mnt) ({ 0; }) | 255 | #define audit_avc_path(dentry, mnt) ({ 0; }) |
248 | #define audit_signal_info(s,t) do { ; } while (0) | 256 | #define audit_signal_info(s,t) do { ; } while (0) |
257 | #define audit_filter_user(cb,t) ({ 1; }) | ||
249 | #endif | 258 | #endif |
250 | 259 | ||
251 | #ifdef CONFIG_AUDIT | 260 | #ifdef CONFIG_AUDIT |
252 | /* These are defined in audit.c */ | 261 | /* These are defined in audit.c */ |
253 | /* Public API */ | 262 | /* Public API */ |
254 | extern void audit_log(struct audit_context *ctx, int type, | 263 | extern void audit_log(struct audit_context *ctx, int gfp_mask, |
255 | const char *fmt, ...) | 264 | int type, const char *fmt, ...) |
256 | __attribute__((format(printf,3,4))); | 265 | __attribute__((format(printf,4,5))); |
257 | 266 | ||
258 | extern struct audit_buffer *audit_log_start(struct audit_context *ctx,int type); | 267 | extern struct audit_buffer *audit_log_start(struct audit_context *ctx, int gfp_mask, int type); |
259 | extern void audit_log_format(struct audit_buffer *ab, | 268 | extern void audit_log_format(struct audit_buffer *ab, |
260 | const char *fmt, ...) | 269 | const char *fmt, ...) |
261 | __attribute__((format(printf,2,3))); | 270 | __attribute__((format(printf,2,3))); |
@@ -274,9 +283,10 @@ extern void audit_send_reply(int pid, int seq, int type, | |||
274 | int done, int multi, | 283 | int done, int multi, |
275 | void *payload, int size); | 284 | void *payload, int size); |
276 | extern void audit_log_lost(const char *message); | 285 | extern void audit_log_lost(const char *message); |
286 | extern struct semaphore audit_netlink_sem; | ||
277 | #else | 287 | #else |
278 | #define audit_log(c,t,f,...) do { ; } while (0) | 288 | #define audit_log(c,g,t,f,...) do { ; } while (0) |
279 | #define audit_log_start(c,t) ({ NULL; }) | 289 | #define audit_log_start(c,g,t) ({ NULL; }) |
280 | #define audit_log_vformat(b,f,a) do { ; } while (0) | 290 | #define audit_log_vformat(b,f,a) do { ; } while (0) |
281 | #define audit_log_format(b,f,...) do { ; } while (0) | 291 | #define audit_log_format(b,f,...) do { ; } while (0) |
282 | #define audit_log_end(b) do { ; } while (0) | 292 | #define audit_log_end(b) do { ; } while (0) |
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h index 5fde6f4d6c1e..04bd756efc67 100644 --- a/include/linux/byteorder/generic.h +++ b/include/linux/byteorder/generic.h | |||
@@ -5,6 +5,10 @@ | |||
5 | * linux/byteorder_generic.h | 5 | * linux/byteorder_generic.h |
6 | * Generic Byte-reordering support | 6 | * Generic Byte-reordering support |
7 | * | 7 | * |
8 | * The "... p" macros, like le64_to_cpup, can be used with pointers | ||
9 | * to unaligned data, but there will be a performance penalty on | ||
10 | * some architectures. Use get_unaligned for unaligned data. | ||
11 | * | ||
8 | * Francois-Rene Rideau <fare@tunes.org> 19970707 | 12 | * Francois-Rene Rideau <fare@tunes.org> 19970707 |
9 | * gathered all the good ideas from all asm-foo/byteorder.h into one file, | 13 | * gathered all the good ideas from all asm-foo/byteorder.h into one file, |
10 | * cleaned them up. | 14 | * cleaned them up. |
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 8bf4bacb5051..71fab4311e92 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -4,16 +4,6 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <asm/byteorder.h> | 5 | #include <asm/byteorder.h> |
6 | 6 | ||
7 | /* Structure describing an Internet (DCCP) socket address. */ | ||
8 | struct sockaddr_dccp { | ||
9 | __u16 sdccp_family; /* Address family */ | ||
10 | __u16 sdccp_port; /* Port number */ | ||
11 | __u32 sdccp_addr; /* Internet address */ | ||
12 | __u32 sdccp_service; /* Service */ | ||
13 | /* Pad to size of `struct sockaddr': 16 bytes . */ | ||
14 | __u32 sdccp_pad; | ||
15 | }; | ||
16 | |||
17 | /** | 7 | /** |
18 | * struct dccp_hdr - generic part of DCCP packet header | 8 | * struct dccp_hdr - generic part of DCCP packet header |
19 | * | 9 | * |
@@ -188,6 +178,11 @@ enum { | |||
188 | 178 | ||
189 | /* DCCP socket options */ | 179 | /* DCCP socket options */ |
190 | #define DCCP_SOCKOPT_PACKET_SIZE 1 | 180 | #define DCCP_SOCKOPT_PACKET_SIZE 1 |
181 | #define DCCP_SOCKOPT_SERVICE 2 | ||
182 | #define DCCP_SOCKOPT_CCID_RX_INFO 128 | ||
183 | #define DCCP_SOCKOPT_CCID_TX_INFO 192 | ||
184 | |||
185 | #define DCCP_SERVICE_LIST_MAX_LEN 32 | ||
191 | 186 | ||
192 | #ifdef __KERNEL__ | 187 | #ifdef __KERNEL__ |
193 | 188 | ||
@@ -337,7 +332,8 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb) | |||
337 | */ | 332 | */ |
338 | struct dccp_options { | 333 | struct dccp_options { |
339 | __u64 dccpo_sequence_window; | 334 | __u64 dccpo_sequence_window; |
340 | __u8 dccpo_ccid; | 335 | __u8 dccpo_rx_ccid; |
336 | __u8 dccpo_tx_ccid; | ||
341 | __u8 dccpo_send_ack_vector; | 337 | __u8 dccpo_send_ack_vector; |
342 | __u8 dccpo_send_ndp_count; | 338 | __u8 dccpo_send_ndp_count; |
343 | }; | 339 | }; |
@@ -360,14 +356,8 @@ static inline struct dccp_request_sock *dccp_rsk(const struct request_sock *req) | |||
360 | 356 | ||
361 | extern struct inet_timewait_death_row dccp_death_row; | 357 | extern struct inet_timewait_death_row dccp_death_row; |
362 | 358 | ||
363 | /* Read about the ECN nonce to see why it is 253 */ | ||
364 | #define DCCP_MAX_ACK_VECTOR_LEN 253 | ||
365 | |||
366 | struct dccp_options_received { | 359 | struct dccp_options_received { |
367 | u32 dccpor_ndp:24, | 360 | u32 dccpor_ndp; /* only 24 bits */ |
368 | dccpor_ack_vector_len:8; | ||
369 | u32 dccpor_ack_vector_idx:10; | ||
370 | /* 22 bits hole, try to pack */ | ||
371 | u32 dccpor_timestamp; | 361 | u32 dccpor_timestamp; |
372 | u32 dccpor_timestamp_echo; | 362 | u32 dccpor_timestamp_echo; |
373 | u32 dccpor_elapsed_time; | 363 | u32 dccpor_elapsed_time; |
@@ -382,6 +372,27 @@ enum dccp_role { | |||
382 | DCCP_ROLE_SERVER, | 372 | DCCP_ROLE_SERVER, |
383 | }; | 373 | }; |
384 | 374 | ||
375 | struct dccp_service_list { | ||
376 | __u32 dccpsl_nr; | ||
377 | __u32 dccpsl_list[0]; | ||
378 | }; | ||
379 | |||
380 | #define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1) | ||
381 | |||
382 | static inline int dccp_list_has_service(const struct dccp_service_list *sl, | ||
383 | const u32 service) | ||
384 | { | ||
385 | if (likely(sl != NULL)) { | ||
386 | u32 i = sl->dccpsl_nr; | ||
387 | while (i--) | ||
388 | if (sl->dccpsl_list[i] == service) | ||
389 | return 1; | ||
390 | } | ||
391 | return 0; | ||
392 | } | ||
393 | |||
394 | struct dccp_ackvec; | ||
395 | |||
385 | /** | 396 | /** |
386 | * struct dccp_sock - DCCP socket state | 397 | * struct dccp_sock - DCCP socket state |
387 | * | 398 | * |
@@ -402,7 +413,7 @@ enum dccp_role { | |||
402 | * @dccps_packet_size - Set thru setsockopt | 413 | * @dccps_packet_size - Set thru setsockopt |
403 | * @dccps_role - Role of this sock, one of %dccp_role | 414 | * @dccps_role - Role of this sock, one of %dccp_role |
404 | * @dccps_ndp_count - number of Non Data Packets since last data packet | 415 | * @dccps_ndp_count - number of Non Data Packets since last data packet |
405 | * @dccps_hc_rx_ackpkts - receiver half connection acked packets | 416 | * @dccps_hc_rx_ackvec - rx half connection ack vector |
406 | */ | 417 | */ |
407 | struct dccp_sock { | 418 | struct dccp_sock { |
408 | /* inet_connection_sock has to be the first member of dccp_sock */ | 419 | /* inet_connection_sock has to be the first member of dccp_sock */ |
@@ -417,7 +428,8 @@ struct dccp_sock { | |||
417 | __u64 dccps_gss; | 428 | __u64 dccps_gss; |
418 | __u64 dccps_gsr; | 429 | __u64 dccps_gsr; |
419 | __u64 dccps_gar; | 430 | __u64 dccps_gar; |
420 | unsigned long dccps_service; | 431 | __u32 dccps_service; |
432 | struct dccp_service_list *dccps_service_list; | ||
421 | struct timeval dccps_timestamp_time; | 433 | struct timeval dccps_timestamp_time; |
422 | __u32 dccps_timestamp_echo; | 434 | __u32 dccps_timestamp_echo; |
423 | __u32 dccps_packet_size; | 435 | __u32 dccps_packet_size; |
@@ -426,7 +438,7 @@ struct dccp_sock { | |||
426 | __u32 dccps_pmtu_cookie; | 438 | __u32 dccps_pmtu_cookie; |
427 | __u32 dccps_mss_cache; | 439 | __u32 dccps_mss_cache; |
428 | struct dccp_options dccps_options; | 440 | struct dccp_options dccps_options; |
429 | struct dccp_ackpkts *dccps_hc_rx_ackpkts; | 441 | struct dccp_ackvec *dccps_hc_rx_ackvec; |
430 | void *dccps_hc_rx_ccid_private; | 442 | void *dccps_hc_rx_ccid_private; |
431 | void *dccps_hc_tx_ccid_private; | 443 | void *dccps_hc_tx_ccid_private; |
432 | struct ccid *dccps_hc_rx_ccid; | 444 | struct ccid *dccps_hc_rx_ccid; |
@@ -443,6 +455,11 @@ static inline struct dccp_sock *dccp_sk(const struct sock *sk) | |||
443 | return (struct dccp_sock *)sk; | 455 | return (struct dccp_sock *)sk; |
444 | } | 456 | } |
445 | 457 | ||
458 | static inline int dccp_service_not_initialized(const struct sock *sk) | ||
459 | { | ||
460 | return dccp_sk(sk)->dccps_service == DCCP_SERVICE_INVALID_VALUE; | ||
461 | } | ||
462 | |||
446 | static inline const char *dccp_role(const struct sock *sk) | 463 | static inline const char *dccp_role(const struct sock *sk) |
447 | { | 464 | { |
448 | switch (dccp_sk(sk)->dccps_role) { | 465 | switch (dccp_sk(sk)->dccps_role) { |
diff --git a/include/linux/device.h b/include/linux/device.h index 06e5d42f2c7b..95d607a48f06 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -317,6 +317,11 @@ dev_set_drvdata (struct device *dev, void *data) | |||
317 | dev->driver_data = data; | 317 | dev->driver_data = data; |
318 | } | 318 | } |
319 | 319 | ||
320 | static inline int device_is_registered(struct device *dev) | ||
321 | { | ||
322 | return klist_node_attached(&dev->knode_bus); | ||
323 | } | ||
324 | |||
320 | /* | 325 | /* |
321 | * High level routines for use by the bus drivers | 326 | * High level routines for use by the bus drivers |
322 | */ | 327 | */ |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 82e39cd0c4fb..c698055266d0 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -619,7 +619,7 @@ struct fb_tilemap { | |||
619 | __u32 height; /* height of each tile in scanlines */ | 619 | __u32 height; /* height of each tile in scanlines */ |
620 | __u32 depth; /* color depth of each tile */ | 620 | __u32 depth; /* color depth of each tile */ |
621 | __u32 length; /* number of tiles in the map */ | 621 | __u32 length; /* number of tiles in the map */ |
622 | __u8 *data; /* actual tile map: a bitmap array, packed | 622 | const __u8 *data; /* actual tile map: a bitmap array, packed |
623 | to the nearest byte */ | 623 | to the nearest byte */ |
624 | }; | 624 | }; |
625 | 625 | ||
diff --git a/include/linux/font.h b/include/linux/font.h index 8fc80a7d78ac..53b129f07f6f 100644 --- a/include/linux/font.h +++ b/include/linux/font.h | |||
@@ -15,9 +15,9 @@ | |||
15 | 15 | ||
16 | struct font_desc { | 16 | struct font_desc { |
17 | int idx; | 17 | int idx; |
18 | char *name; | 18 | const char *name; |
19 | int width, height; | 19 | int width, height; |
20 | void *data; | 20 | const void *data; |
21 | int pref; | 21 | int pref; |
22 | }; | 22 | }; |
23 | 23 | ||
@@ -32,7 +32,7 @@ struct font_desc { | |||
32 | #define ACORN8x8_IDX 8 | 32 | #define ACORN8x8_IDX 8 |
33 | #define MINI4x6_IDX 9 | 33 | #define MINI4x6_IDX 9 |
34 | 34 | ||
35 | extern struct font_desc font_vga_8x8, | 35 | extern const struct font_desc font_vga_8x8, |
36 | font_vga_8x16, | 36 | font_vga_8x16, |
37 | font_pearl_8x8, | 37 | font_pearl_8x8, |
38 | font_vga_6x11, | 38 | font_vga_6x11, |
@@ -45,11 +45,11 @@ extern struct font_desc font_vga_8x8, | |||
45 | 45 | ||
46 | /* Find a font with a specific name */ | 46 | /* Find a font with a specific name */ |
47 | 47 | ||
48 | extern struct font_desc *find_font(char *name); | 48 | extern const struct font_desc *find_font(const char *name); |
49 | 49 | ||
50 | /* Get the default font for a specific screen size */ | 50 | /* Get the default font for a specific screen size */ |
51 | 51 | ||
52 | extern struct font_desc *get_default_font(int xres, int yres); | 52 | extern const struct font_desc *get_default_font(int xres, int yres); |
53 | 53 | ||
54 | /* Max. length for the name of a predefined font */ | 54 | /* Max. length for the name of a predefined font */ |
55 | #define MAX_FONT_NAME 32 | 55 | #define MAX_FONT_NAME 32 |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index be35332b67e6..3d49a305bf88 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -230,11 +230,6 @@ struct i2c_adapter { | |||
230 | struct device dev; /* the adapter device */ | 230 | struct device dev; /* the adapter device */ |
231 | struct class_device class_dev; /* the class device */ | 231 | struct class_device class_dev; /* the class device */ |
232 | 232 | ||
233 | #ifdef CONFIG_PROC_FS | ||
234 | /* No need to set this when you initialize the adapter */ | ||
235 | int inode; | ||
236 | #endif /* def CONFIG_PROC_FS */ | ||
237 | |||
238 | int nr; | 233 | int nr; |
239 | struct list_head clients; | 234 | struct list_head clients; |
240 | struct list_head list; | 235 | struct list_head list; |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 17d0c0d40b0e..eef0876d8307 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -42,8 +42,8 @@ struct hlist_node; | |||
42 | struct vlan_ethhdr { | 42 | struct vlan_ethhdr { |
43 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ | 43 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ |
44 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ | 44 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ |
45 | unsigned short h_vlan_proto; /* Should always be 0x8100 */ | 45 | __be16 h_vlan_proto; /* Should always be 0x8100 */ |
46 | unsigned short h_vlan_TCI; /* Encapsulates priority and VLAN ID */ | 46 | __be16 h_vlan_TCI; /* Encapsulates priority and VLAN ID */ |
47 | unsigned short h_vlan_encapsulated_proto; /* packet type ID field (or len) */ | 47 | unsigned short h_vlan_encapsulated_proto; /* packet type ID field (or len) */ |
48 | }; | 48 | }; |
49 | 49 | ||
@@ -55,8 +55,8 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | struct vlan_hdr { | 57 | struct vlan_hdr { |
58 | unsigned short h_vlan_TCI; /* Encapsulates priority and VLAN ID */ | 58 | __be16 h_vlan_TCI; /* Encapsulates priority and VLAN ID */ |
59 | unsigned short h_vlan_encapsulated_proto; /* packet type ID field (or len) */ | 59 | __be16 h_vlan_encapsulated_proto; /* packet type ID field (or len) */ |
60 | }; | 60 | }; |
61 | 61 | ||
62 | #define VLAN_VID_MASK 0xfff | 62 | #define VLAN_VID_MASK 0xfff |
diff --git a/include/linux/joystick.h b/include/linux/joystick.h index 06b9af77eb7f..5fd20ddd7ae3 100644 --- a/include/linux/joystick.h +++ b/include/linux/joystick.h | |||
@@ -111,29 +111,30 @@ struct js_corr { | |||
111 | #define JS_SET_ALL 8 | 111 | #define JS_SET_ALL 8 |
112 | 112 | ||
113 | struct JS_DATA_TYPE { | 113 | struct JS_DATA_TYPE { |
114 | __s32 buttons; | 114 | int32_t buttons; |
115 | __s32 x; | 115 | int32_t x; |
116 | __s32 y; | 116 | int32_t y; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | struct JS_DATA_SAVE_TYPE_32 { | 119 | struct JS_DATA_SAVE_TYPE_32 { |
120 | __s32 JS_TIMEOUT; | 120 | int32_t JS_TIMEOUT; |
121 | __s32 BUSY; | 121 | int32_t BUSY; |
122 | __s32 JS_EXPIRETIME; | 122 | int32_t JS_EXPIRETIME; |
123 | __s32 JS_TIMELIMIT; | 123 | int32_t JS_TIMELIMIT; |
124 | struct JS_DATA_TYPE JS_SAVE; | 124 | struct JS_DATA_TYPE JS_SAVE; |
125 | struct JS_DATA_TYPE JS_CORR; | 125 | struct JS_DATA_TYPE JS_CORR; |
126 | }; | 126 | }; |
127 | 127 | ||
128 | struct JS_DATA_SAVE_TYPE_64 { | 128 | struct JS_DATA_SAVE_TYPE_64 { |
129 | __s32 JS_TIMEOUT; | 129 | int32_t JS_TIMEOUT; |
130 | __s32 BUSY; | 130 | int32_t BUSY; |
131 | __s64 JS_EXPIRETIME; | 131 | int64_t JS_EXPIRETIME; |
132 | __s64 JS_TIMELIMIT; | 132 | int64_t JS_TIMELIMIT; |
133 | struct JS_DATA_TYPE JS_SAVE; | 133 | struct JS_DATA_TYPE JS_SAVE; |
134 | struct JS_DATA_TYPE JS_CORR; | 134 | struct JS_DATA_TYPE JS_CORR; |
135 | }; | 135 | }; |
136 | 136 | ||
137 | #ifdef __KERNEL__ | ||
137 | #if BITS_PER_LONG == 64 | 138 | #if BITS_PER_LONG == 64 |
138 | #define JS_DATA_SAVE_TYPE JS_DATA_SAVE_TYPE_64 | 139 | #define JS_DATA_SAVE_TYPE JS_DATA_SAVE_TYPE_64 |
139 | #elif BITS_PER_LONG == 32 | 140 | #elif BITS_PER_LONG == 32 |
@@ -141,5 +142,6 @@ struct JS_DATA_SAVE_TYPE_64 { | |||
141 | #else | 142 | #else |
142 | #error Unexpected BITS_PER_LONG | 143 | #error Unexpected BITS_PER_LONG |
143 | #endif | 144 | #endif |
145 | #endif | ||
144 | 146 | ||
145 | #endif /* _LINUX_JOYSTICK_H */ | 147 | #endif /* _LINUX_JOYSTICK_H */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 687ba8c9973d..4367ce4db52a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -307,8 +307,8 @@ struct sysinfo { | |||
307 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ | 307 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ |
308 | }; | 308 | }; |
309 | 309 | ||
310 | extern void BUILD_BUG(void); | 310 | /* Force a compilation error if condition is false */ |
311 | #define BUILD_BUG_ON(condition) do { if (condition) BUILD_BUG(); } while(0) | 311 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
312 | 312 | ||
313 | #ifdef CONFIG_SYSCTL | 313 | #ifdef CONFIG_SYSCTL |
314 | extern int randomize_va_space; | 314 | extern int randomize_va_space; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 022105c745fc..ceee1fc42c60 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -393,6 +393,7 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i | |||
393 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 393 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
394 | #endif /* CONFIG_PCI */ | 394 | #endif /* CONFIG_PCI */ |
395 | extern int ata_device_add(struct ata_probe_ent *ent); | 395 | extern int ata_device_add(struct ata_probe_ent *ent); |
396 | extern void ata_host_set_remove(struct ata_host_set *host_set); | ||
396 | extern int ata_scsi_detect(Scsi_Host_Template *sht); | 397 | extern int ata_scsi_detect(Scsi_Host_Template *sht); |
397 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 398 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
398 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 399 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 82d7024f0765..097b3a3c693d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -136,6 +136,7 @@ extern unsigned int kobjsize(const void *objp); | |||
136 | #define VM_EXEC 0x00000004 | 136 | #define VM_EXEC 0x00000004 |
137 | #define VM_SHARED 0x00000008 | 137 | #define VM_SHARED 0x00000008 |
138 | 138 | ||
139 | /* mprotect() hardcodes VM_MAYREAD >> 4 == VM_READ, and so for r/w/x bits. */ | ||
139 | #define VM_MAYREAD 0x00000010 /* limits for mprotect() etc */ | 140 | #define VM_MAYREAD 0x00000010 /* limits for mprotect() etc */ |
140 | #define VM_MAYWRITE 0x00000020 | 141 | #define VM_MAYWRITE 0x00000020 |
141 | #define VM_MAYEXEC 0x00000040 | 142 | #define VM_MAYEXEC 0x00000040 |
@@ -350,7 +351,8 @@ static inline void put_page(struct page *page) | |||
350 | * only one copy in memory, at most, normally. | 351 | * only one copy in memory, at most, normally. |
351 | * | 352 | * |
352 | * For the non-reserved pages, page_count(page) denotes a reference count. | 353 | * For the non-reserved pages, page_count(page) denotes a reference count. |
353 | * page_count() == 0 means the page is free. | 354 | * page_count() == 0 means the page is free. page->lru is then used for |
355 | * freelist management in the buddy allocator. | ||
354 | * page_count() == 1 means the page is used for exactly one purpose | 356 | * page_count() == 1 means the page is used for exactly one purpose |
355 | * (e.g. a private data page of one process). | 357 | * (e.g. a private data page of one process). |
356 | * | 358 | * |
@@ -376,10 +378,8 @@ static inline void put_page(struct page *page) | |||
376 | * attaches, plus 1 if `private' contains something, plus one for | 378 | * attaches, plus 1 if `private' contains something, plus one for |
377 | * the page cache itself. | 379 | * the page cache itself. |
378 | * | 380 | * |
379 | * All pages belonging to an inode are in these doubly linked lists: | 381 | * Instead of keeping dirty/clean pages in per address-space lists, we instead |
380 | * mapping->clean_pages, mapping->dirty_pages and mapping->locked_pages; | 382 | * now tag pages as dirty/under writeback in the radix tree. |
381 | * using the page->list list_head. These fields are also used for | ||
382 | * freelist managemet (when page_count()==0). | ||
383 | * | 383 | * |
384 | * There is also a per-mapping radix tree mapping index to the page | 384 | * There is also a per-mapping radix tree mapping index to the page |
385 | * in memory if present. The tree is rooted at mapping->root. | 385 | * in memory if present. The tree is rooted at mapping->root. |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index 7e033e9271a8..4ced38736813 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h | |||
@@ -133,11 +133,13 @@ enum ip_conntrack_expect_events { | |||
133 | 133 | ||
134 | #include <linux/netfilter_ipv4/ip_conntrack_tcp.h> | 134 | #include <linux/netfilter_ipv4/ip_conntrack_tcp.h> |
135 | #include <linux/netfilter_ipv4/ip_conntrack_icmp.h> | 135 | #include <linux/netfilter_ipv4/ip_conntrack_icmp.h> |
136 | #include <linux/netfilter_ipv4/ip_conntrack_proto_gre.h> | ||
136 | #include <linux/netfilter_ipv4/ip_conntrack_sctp.h> | 137 | #include <linux/netfilter_ipv4/ip_conntrack_sctp.h> |
137 | 138 | ||
138 | /* per conntrack: protocol private data */ | 139 | /* per conntrack: protocol private data */ |
139 | union ip_conntrack_proto { | 140 | union ip_conntrack_proto { |
140 | /* insert conntrack proto private data here */ | 141 | /* insert conntrack proto private data here */ |
142 | struct ip_ct_gre gre; | ||
141 | struct ip_ct_sctp sctp; | 143 | struct ip_ct_sctp sctp; |
142 | struct ip_ct_tcp tcp; | 144 | struct ip_ct_tcp tcp; |
143 | struct ip_ct_icmp icmp; | 145 | struct ip_ct_icmp icmp; |
@@ -148,6 +150,7 @@ union ip_conntrack_expect_proto { | |||
148 | }; | 150 | }; |
149 | 151 | ||
150 | /* Add protocol helper include file here */ | 152 | /* Add protocol helper include file here */ |
153 | #include <linux/netfilter_ipv4/ip_conntrack_pptp.h> | ||
151 | #include <linux/netfilter_ipv4/ip_conntrack_amanda.h> | 154 | #include <linux/netfilter_ipv4/ip_conntrack_amanda.h> |
152 | #include <linux/netfilter_ipv4/ip_conntrack_ftp.h> | 155 | #include <linux/netfilter_ipv4/ip_conntrack_ftp.h> |
153 | #include <linux/netfilter_ipv4/ip_conntrack_irc.h> | 156 | #include <linux/netfilter_ipv4/ip_conntrack_irc.h> |
@@ -155,12 +158,20 @@ union ip_conntrack_expect_proto { | |||
155 | /* per conntrack: application helper private data */ | 158 | /* per conntrack: application helper private data */ |
156 | union ip_conntrack_help { | 159 | union ip_conntrack_help { |
157 | /* insert conntrack helper private data (master) here */ | 160 | /* insert conntrack helper private data (master) here */ |
161 | struct ip_ct_pptp_master ct_pptp_info; | ||
158 | struct ip_ct_ftp_master ct_ftp_info; | 162 | struct ip_ct_ftp_master ct_ftp_info; |
159 | struct ip_ct_irc_master ct_irc_info; | 163 | struct ip_ct_irc_master ct_irc_info; |
160 | }; | 164 | }; |
161 | 165 | ||
162 | #ifdef CONFIG_IP_NF_NAT_NEEDED | 166 | #ifdef CONFIG_IP_NF_NAT_NEEDED |
163 | #include <linux/netfilter_ipv4/ip_nat.h> | 167 | #include <linux/netfilter_ipv4/ip_nat.h> |
168 | #include <linux/netfilter_ipv4/ip_nat_pptp.h> | ||
169 | |||
170 | /* per conntrack: nat application helper private data */ | ||
171 | union ip_conntrack_nat_help { | ||
172 | /* insert nat helper private data here */ | ||
173 | struct ip_nat_pptp nat_pptp_info; | ||
174 | }; | ||
164 | #endif | 175 | #endif |
165 | 176 | ||
166 | #include <linux/types.h> | 177 | #include <linux/types.h> |
@@ -223,6 +234,7 @@ struct ip_conntrack | |||
223 | #ifdef CONFIG_IP_NF_NAT_NEEDED | 234 | #ifdef CONFIG_IP_NF_NAT_NEEDED |
224 | struct { | 235 | struct { |
225 | struct ip_nat_info info; | 236 | struct ip_nat_info info; |
237 | union ip_conntrack_nat_help help; | ||
226 | #if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \ | 238 | #if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \ |
227 | defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE) | 239 | defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE) |
228 | int masq_index; | 240 | int masq_index; |
@@ -320,11 +332,28 @@ extern void need_ip_conntrack(void); | |||
320 | extern int invert_tuplepr(struct ip_conntrack_tuple *inverse, | 332 | extern int invert_tuplepr(struct ip_conntrack_tuple *inverse, |
321 | const struct ip_conntrack_tuple *orig); | 333 | const struct ip_conntrack_tuple *orig); |
322 | 334 | ||
335 | extern void __ip_ct_refresh_acct(struct ip_conntrack *ct, | ||
336 | enum ip_conntrack_info ctinfo, | ||
337 | const struct sk_buff *skb, | ||
338 | unsigned long extra_jiffies, | ||
339 | int do_acct); | ||
340 | |||
341 | /* Refresh conntrack for this many jiffies and do accounting */ | ||
342 | static inline void ip_ct_refresh_acct(struct ip_conntrack *ct, | ||
343 | enum ip_conntrack_info ctinfo, | ||
344 | const struct sk_buff *skb, | ||
345 | unsigned long extra_jiffies) | ||
346 | { | ||
347 | __ip_ct_refresh_acct(ct, ctinfo, skb, extra_jiffies, 1); | ||
348 | } | ||
349 | |||
323 | /* Refresh conntrack for this many jiffies */ | 350 | /* Refresh conntrack for this many jiffies */ |
324 | extern void ip_ct_refresh_acct(struct ip_conntrack *ct, | 351 | static inline void ip_ct_refresh(struct ip_conntrack *ct, |
325 | enum ip_conntrack_info ctinfo, | 352 | const struct sk_buff *skb, |
326 | const struct sk_buff *skb, | 353 | unsigned long extra_jiffies) |
327 | unsigned long extra_jiffies); | 354 | { |
355 | __ip_ct_refresh_acct(ct, 0, skb, extra_jiffies, 0); | ||
356 | } | ||
328 | 357 | ||
329 | /* These are for NAT. Icky. */ | 358 | /* These are for NAT. Icky. */ |
330 | /* Update TCP window tracking data when NAT mangles the packet */ | 359 | /* Update TCP window tracking data when NAT mangles the packet */ |
@@ -372,7 +401,7 @@ extern struct ip_conntrack_expect * | |||
372 | __ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple); | 401 | __ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple); |
373 | 402 | ||
374 | extern struct ip_conntrack_expect * | 403 | extern struct ip_conntrack_expect * |
375 | ip_conntrack_expect_find_get(const struct ip_conntrack_tuple *tuple); | 404 | ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple); |
376 | 405 | ||
377 | extern struct ip_conntrack_tuple_hash * | 406 | extern struct ip_conntrack_tuple_hash * |
378 | __ip_conntrack_find(const struct ip_conntrack_tuple *tuple, | 407 | __ip_conntrack_find(const struct ip_conntrack_tuple *tuple, |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_pptp.h b/include/linux/netfilter_ipv4/ip_conntrack_pptp.h new file mode 100644 index 000000000000..816144c75de0 --- /dev/null +++ b/include/linux/netfilter_ipv4/ip_conntrack_pptp.h | |||
@@ -0,0 +1,325 @@ | |||
1 | /* PPTP constants and structs */ | ||
2 | #ifndef _CONNTRACK_PPTP_H | ||
3 | #define _CONNTRACK_PPTP_H | ||
4 | |||
5 | /* state of the control session */ | ||
6 | enum pptp_ctrlsess_state { | ||
7 | PPTP_SESSION_NONE, /* no session present */ | ||
8 | PPTP_SESSION_ERROR, /* some session error */ | ||
9 | PPTP_SESSION_STOPREQ, /* stop_sess request seen */ | ||
10 | PPTP_SESSION_REQUESTED, /* start_sess request seen */ | ||
11 | PPTP_SESSION_CONFIRMED, /* session established */ | ||
12 | }; | ||
13 | |||
14 | /* state of the call inside the control session */ | ||
15 | enum pptp_ctrlcall_state { | ||
16 | PPTP_CALL_NONE, | ||
17 | PPTP_CALL_ERROR, | ||
18 | PPTP_CALL_OUT_REQ, | ||
19 | PPTP_CALL_OUT_CONF, | ||
20 | PPTP_CALL_IN_REQ, | ||
21 | PPTP_CALL_IN_REP, | ||
22 | PPTP_CALL_IN_CONF, | ||
23 | PPTP_CALL_CLEAR_REQ, | ||
24 | }; | ||
25 | |||
26 | |||
27 | /* conntrack private data */ | ||
28 | struct ip_ct_pptp_master { | ||
29 | enum pptp_ctrlsess_state sstate; /* session state */ | ||
30 | |||
31 | /* everything below is going to be per-expectation in newnat, | ||
32 | * since there could be more than one call within one session */ | ||
33 | enum pptp_ctrlcall_state cstate; /* call state */ | ||
34 | u_int16_t pac_call_id; /* call id of PAC, host byte order */ | ||
35 | u_int16_t pns_call_id; /* call id of PNS, host byte order */ | ||
36 | |||
37 | /* in pre-2.6.11 this used to be per-expect. Now it is per-conntrack | ||
38 | * and therefore imposes a fixed limit on the number of maps */ | ||
39 | struct ip_ct_gre_keymap *keymap_orig, *keymap_reply; | ||
40 | }; | ||
41 | |||
42 | /* conntrack_expect private member */ | ||
43 | struct ip_ct_pptp_expect { | ||
44 | enum pptp_ctrlcall_state cstate; /* call state */ | ||
45 | u_int16_t pac_call_id; /* call id of PAC */ | ||
46 | u_int16_t pns_call_id; /* call id of PNS */ | ||
47 | }; | ||
48 | |||
49 | |||
50 | #ifdef __KERNEL__ | ||
51 | |||
52 | #define IP_CONNTR_PPTP PPTP_CONTROL_PORT | ||
53 | |||
54 | #define PPTP_CONTROL_PORT 1723 | ||
55 | |||
56 | #define PPTP_PACKET_CONTROL 1 | ||
57 | #define PPTP_PACKET_MGMT 2 | ||
58 | |||
59 | #define PPTP_MAGIC_COOKIE 0x1a2b3c4d | ||
60 | |||
61 | struct pptp_pkt_hdr { | ||
62 | __u16 packetLength; | ||
63 | __be16 packetType; | ||
64 | __be32 magicCookie; | ||
65 | }; | ||
66 | |||
67 | /* PptpControlMessageType values */ | ||
68 | #define PPTP_START_SESSION_REQUEST 1 | ||
69 | #define PPTP_START_SESSION_REPLY 2 | ||
70 | #define PPTP_STOP_SESSION_REQUEST 3 | ||
71 | #define PPTP_STOP_SESSION_REPLY 4 | ||
72 | #define PPTP_ECHO_REQUEST 5 | ||
73 | #define PPTP_ECHO_REPLY 6 | ||
74 | #define PPTP_OUT_CALL_REQUEST 7 | ||
75 | #define PPTP_OUT_CALL_REPLY 8 | ||
76 | #define PPTP_IN_CALL_REQUEST 9 | ||
77 | #define PPTP_IN_CALL_REPLY 10 | ||
78 | #define PPTP_IN_CALL_CONNECT 11 | ||
79 | #define PPTP_CALL_CLEAR_REQUEST 12 | ||
80 | #define PPTP_CALL_DISCONNECT_NOTIFY 13 | ||
81 | #define PPTP_WAN_ERROR_NOTIFY 14 | ||
82 | #define PPTP_SET_LINK_INFO 15 | ||
83 | |||
84 | #define PPTP_MSG_MAX 15 | ||
85 | |||
86 | /* PptpGeneralError values */ | ||
87 | #define PPTP_ERROR_CODE_NONE 0 | ||
88 | #define PPTP_NOT_CONNECTED 1 | ||
89 | #define PPTP_BAD_FORMAT 2 | ||
90 | #define PPTP_BAD_VALUE 3 | ||
91 | #define PPTP_NO_RESOURCE 4 | ||
92 | #define PPTP_BAD_CALLID 5 | ||
93 | #define PPTP_REMOVE_DEVICE_ERROR 6 | ||
94 | |||
95 | struct PptpControlHeader { | ||
96 | __be16 messageType; | ||
97 | __u16 reserved; | ||
98 | }; | ||
99 | |||
100 | /* FramingCapability Bitmap Values */ | ||
101 | #define PPTP_FRAME_CAP_ASYNC 0x1 | ||
102 | #define PPTP_FRAME_CAP_SYNC 0x2 | ||
103 | |||
104 | /* BearerCapability Bitmap Values */ | ||
105 | #define PPTP_BEARER_CAP_ANALOG 0x1 | ||
106 | #define PPTP_BEARER_CAP_DIGITAL 0x2 | ||
107 | |||
108 | struct PptpStartSessionRequest { | ||
109 | __be16 protocolVersion; | ||
110 | __u8 reserved1; | ||
111 | __u8 reserved2; | ||
112 | __be32 framingCapability; | ||
113 | __be32 bearerCapability; | ||
114 | __be16 maxChannels; | ||
115 | __be16 firmwareRevision; | ||
116 | __u8 hostName[64]; | ||
117 | __u8 vendorString[64]; | ||
118 | }; | ||
119 | |||
120 | /* PptpStartSessionResultCode Values */ | ||
121 | #define PPTP_START_OK 1 | ||
122 | #define PPTP_START_GENERAL_ERROR 2 | ||
123 | #define PPTP_START_ALREADY_CONNECTED 3 | ||
124 | #define PPTP_START_NOT_AUTHORIZED 4 | ||
125 | #define PPTP_START_UNKNOWN_PROTOCOL 5 | ||
126 | |||
127 | struct PptpStartSessionReply { | ||
128 | __be16 protocolVersion; | ||
129 | __u8 resultCode; | ||
130 | __u8 generalErrorCode; | ||
131 | __be32 framingCapability; | ||
132 | __be32 bearerCapability; | ||
133 | __be16 maxChannels; | ||
134 | __be16 firmwareRevision; | ||
135 | __u8 hostName[64]; | ||
136 | __u8 vendorString[64]; | ||
137 | }; | ||
138 | |||
139 | /* PptpStopReasons */ | ||
140 | #define PPTP_STOP_NONE 1 | ||
141 | #define PPTP_STOP_PROTOCOL 2 | ||
142 | #define PPTP_STOP_LOCAL_SHUTDOWN 3 | ||
143 | |||
144 | struct PptpStopSessionRequest { | ||
145 | __u8 reason; | ||
146 | }; | ||
147 | |||
148 | /* PptpStopSessionResultCode */ | ||
149 | #define PPTP_STOP_OK 1 | ||
150 | #define PPTP_STOP_GENERAL_ERROR 2 | ||
151 | |||
152 | struct PptpStopSessionReply { | ||
153 | __u8 resultCode; | ||
154 | __u8 generalErrorCode; | ||
155 | }; | ||
156 | |||
157 | struct PptpEchoRequest { | ||
158 | __be32 identNumber; | ||
159 | }; | ||
160 | |||
161 | /* PptpEchoReplyResultCode */ | ||
162 | #define PPTP_ECHO_OK 1 | ||
163 | #define PPTP_ECHO_GENERAL_ERROR 2 | ||
164 | |||
165 | struct PptpEchoReply { | ||
166 | __be32 identNumber; | ||
167 | __u8 resultCode; | ||
168 | __u8 generalErrorCode; | ||
169 | __u16 reserved; | ||
170 | }; | ||
171 | |||
172 | /* PptpFramingType */ | ||
173 | #define PPTP_ASYNC_FRAMING 1 | ||
174 | #define PPTP_SYNC_FRAMING 2 | ||
175 | #define PPTP_DONT_CARE_FRAMING 3 | ||
176 | |||
177 | /* PptpCallBearerType */ | ||
178 | #define PPTP_ANALOG_TYPE 1 | ||
179 | #define PPTP_DIGITAL_TYPE 2 | ||
180 | #define PPTP_DONT_CARE_BEARER_TYPE 3 | ||
181 | |||
182 | struct PptpOutCallRequest { | ||
183 | __be16 callID; | ||
184 | __be16 callSerialNumber; | ||
185 | __be32 minBPS; | ||
186 | __be32 maxBPS; | ||
187 | __be32 bearerType; | ||
188 | __be32 framingType; | ||
189 | __be16 packetWindow; | ||
190 | __be16 packetProcDelay; | ||
191 | __u16 reserved1; | ||
192 | __be16 phoneNumberLength; | ||
193 | __u16 reserved2; | ||
194 | __u8 phoneNumber[64]; | ||
195 | __u8 subAddress[64]; | ||
196 | }; | ||
197 | |||
198 | /* PptpCallResultCode */ | ||
199 | #define PPTP_OUTCALL_CONNECT 1 | ||
200 | #define PPTP_OUTCALL_GENERAL_ERROR 2 | ||
201 | #define PPTP_OUTCALL_NO_CARRIER 3 | ||
202 | #define PPTP_OUTCALL_BUSY 4 | ||
203 | #define PPTP_OUTCALL_NO_DIAL_TONE 5 | ||
204 | #define PPTP_OUTCALL_TIMEOUT 6 | ||
205 | #define PPTP_OUTCALL_DONT_ACCEPT 7 | ||
206 | |||
207 | struct PptpOutCallReply { | ||
208 | __be16 callID; | ||
209 | __be16 peersCallID; | ||
210 | __u8 resultCode; | ||
211 | __u8 generalErrorCode; | ||
212 | __be16 causeCode; | ||
213 | __be32 connectSpeed; | ||
214 | __be16 packetWindow; | ||
215 | __be16 packetProcDelay; | ||
216 | __be32 physChannelID; | ||
217 | }; | ||
218 | |||
219 | struct PptpInCallRequest { | ||
220 | __be16 callID; | ||
221 | __be16 callSerialNumber; | ||
222 | __be32 callBearerType; | ||
223 | __be32 physChannelID; | ||
224 | __be16 dialedNumberLength; | ||
225 | __be16 dialingNumberLength; | ||
226 | __u8 dialedNumber[64]; | ||
227 | __u8 dialingNumber[64]; | ||
228 | __u8 subAddress[64]; | ||
229 | }; | ||
230 | |||
231 | /* PptpInCallResultCode */ | ||
232 | #define PPTP_INCALL_ACCEPT 1 | ||
233 | #define PPTP_INCALL_GENERAL_ERROR 2 | ||
234 | #define PPTP_INCALL_DONT_ACCEPT 3 | ||
235 | |||
236 | struct PptpInCallReply { | ||
237 | __be16 callID; | ||
238 | __be16 peersCallID; | ||
239 | __u8 resultCode; | ||
240 | __u8 generalErrorCode; | ||
241 | __be16 packetWindow; | ||
242 | __be16 packetProcDelay; | ||
243 | __u16 reserved; | ||
244 | }; | ||
245 | |||
246 | struct PptpInCallConnected { | ||
247 | __be16 peersCallID; | ||
248 | __u16 reserved; | ||
249 | __be32 connectSpeed; | ||
250 | __be16 packetWindow; | ||
251 | __be16 packetProcDelay; | ||
252 | __be32 callFramingType; | ||
253 | }; | ||
254 | |||
255 | struct PptpClearCallRequest { | ||
256 | __be16 callID; | ||
257 | __u16 reserved; | ||
258 | }; | ||
259 | |||
260 | struct PptpCallDisconnectNotify { | ||
261 | __be16 callID; | ||
262 | __u8 resultCode; | ||
263 | __u8 generalErrorCode; | ||
264 | __be16 causeCode; | ||
265 | __u16 reserved; | ||
266 | __u8 callStatistics[128]; | ||
267 | }; | ||
268 | |||
269 | struct PptpWanErrorNotify { | ||
270 | __be16 peersCallID; | ||
271 | __u16 reserved; | ||
272 | __be32 crcErrors; | ||
273 | __be32 framingErrors; | ||
274 | __be32 hardwareOverRuns; | ||
275 | __be32 bufferOverRuns; | ||
276 | __be32 timeoutErrors; | ||
277 | __be32 alignmentErrors; | ||
278 | }; | ||
279 | |||
280 | struct PptpSetLinkInfo { | ||
281 | __be16 peersCallID; | ||
282 | __u16 reserved; | ||
283 | __be32 sendAccm; | ||
284 | __be32 recvAccm; | ||
285 | }; | ||
286 | |||
287 | union pptp_ctrl_union { | ||
288 | struct PptpStartSessionRequest sreq; | ||
289 | struct PptpStartSessionReply srep; | ||
290 | struct PptpStopSessionRequest streq; | ||
291 | struct PptpStopSessionReply strep; | ||
292 | struct PptpOutCallRequest ocreq; | ||
293 | struct PptpOutCallReply ocack; | ||
294 | struct PptpInCallRequest icreq; | ||
295 | struct PptpInCallReply icack; | ||
296 | struct PptpInCallConnected iccon; | ||
297 | struct PptpClearCallRequest clrreq; | ||
298 | struct PptpCallDisconnectNotify disc; | ||
299 | struct PptpWanErrorNotify wanerr; | ||
300 | struct PptpSetLinkInfo setlink; | ||
301 | }; | ||
302 | |||
303 | extern int | ||
304 | (*ip_nat_pptp_hook_outbound)(struct sk_buff **pskb, | ||
305 | struct ip_conntrack *ct, | ||
306 | enum ip_conntrack_info ctinfo, | ||
307 | struct PptpControlHeader *ctlh, | ||
308 | union pptp_ctrl_union *pptpReq); | ||
309 | |||
310 | extern int | ||
311 | (*ip_nat_pptp_hook_inbound)(struct sk_buff **pskb, | ||
312 | struct ip_conntrack *ct, | ||
313 | enum ip_conntrack_info ctinfo, | ||
314 | struct PptpControlHeader *ctlh, | ||
315 | union pptp_ctrl_union *pptpReq); | ||
316 | |||
317 | extern int | ||
318 | (*ip_nat_pptp_hook_exp_gre)(struct ip_conntrack_expect *exp_orig, | ||
319 | struct ip_conntrack_expect *exp_reply); | ||
320 | |||
321 | extern void | ||
322 | (*ip_nat_pptp_hook_expectfn)(struct ip_conntrack *ct, | ||
323 | struct ip_conntrack_expect *exp); | ||
324 | #endif /* __KERNEL__ */ | ||
325 | #endif /* _CONNTRACK_PPTP_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_proto_gre.h b/include/linux/netfilter_ipv4/ip_conntrack_proto_gre.h new file mode 100644 index 000000000000..8d090ef82f5f --- /dev/null +++ b/include/linux/netfilter_ipv4/ip_conntrack_proto_gre.h | |||
@@ -0,0 +1,114 @@ | |||
1 | #ifndef _CONNTRACK_PROTO_GRE_H | ||
2 | #define _CONNTRACK_PROTO_GRE_H | ||
3 | #include <asm/byteorder.h> | ||
4 | |||
5 | /* GRE PROTOCOL HEADER */ | ||
6 | |||
7 | /* GRE Version field */ | ||
8 | #define GRE_VERSION_1701 0x0 | ||
9 | #define GRE_VERSION_PPTP 0x1 | ||
10 | |||
11 | /* GRE Protocol field */ | ||
12 | #define GRE_PROTOCOL_PPTP 0x880B | ||
13 | |||
14 | /* GRE Flags */ | ||
15 | #define GRE_FLAG_C 0x80 | ||
16 | #define GRE_FLAG_R 0x40 | ||
17 | #define GRE_FLAG_K 0x20 | ||
18 | #define GRE_FLAG_S 0x10 | ||
19 | #define GRE_FLAG_A 0x80 | ||
20 | |||
21 | #define GRE_IS_C(f) ((f)&GRE_FLAG_C) | ||
22 | #define GRE_IS_R(f) ((f)&GRE_FLAG_R) | ||
23 | #define GRE_IS_K(f) ((f)&GRE_FLAG_K) | ||
24 | #define GRE_IS_S(f) ((f)&GRE_FLAG_S) | ||
25 | #define GRE_IS_A(f) ((f)&GRE_FLAG_A) | ||
26 | |||
27 | /* GRE is a mess: Four different standards */ | ||
28 | struct gre_hdr { | ||
29 | #if defined(__LITTLE_ENDIAN_BITFIELD) | ||
30 | __u16 rec:3, | ||
31 | srr:1, | ||
32 | seq:1, | ||
33 | key:1, | ||
34 | routing:1, | ||
35 | csum:1, | ||
36 | version:3, | ||
37 | reserved:4, | ||
38 | ack:1; | ||
39 | #elif defined(__BIG_ENDIAN_BITFIELD) | ||
40 | __u16 csum:1, | ||
41 | routing:1, | ||
42 | key:1, | ||
43 | seq:1, | ||
44 | srr:1, | ||
45 | rec:3, | ||
46 | ack:1, | ||
47 | reserved:4, | ||
48 | version:3; | ||
49 | #else | ||
50 | #error "Adjust your <asm/byteorder.h> defines" | ||
51 | #endif | ||
52 | __u16 protocol; | ||
53 | }; | ||
54 | |||
55 | /* modified GRE header for PPTP */ | ||
56 | struct gre_hdr_pptp { | ||
57 | __u8 flags; /* bitfield */ | ||
58 | __u8 version; /* should be GRE_VERSION_PPTP */ | ||
59 | __u16 protocol; /* should be GRE_PROTOCOL_PPTP */ | ||
60 | __u16 payload_len; /* size of ppp payload, not inc. gre header */ | ||
61 | __u16 call_id; /* peer's call_id for this session */ | ||
62 | __u32 seq; /* sequence number. Present if S==1 */ | ||
63 | __u32 ack; /* seq number of highest packet recieved by */ | ||
64 | /* sender in this session */ | ||
65 | }; | ||
66 | |||
67 | |||
68 | /* this is part of ip_conntrack */ | ||
69 | struct ip_ct_gre { | ||
70 | unsigned int stream_timeout; | ||
71 | unsigned int timeout; | ||
72 | }; | ||
73 | |||
74 | #ifdef __KERNEL__ | ||
75 | struct ip_conntrack_expect; | ||
76 | struct ip_conntrack; | ||
77 | |||
78 | /* structure for original <-> reply keymap */ | ||
79 | struct ip_ct_gre_keymap { | ||
80 | struct list_head list; | ||
81 | |||
82 | struct ip_conntrack_tuple tuple; | ||
83 | }; | ||
84 | |||
85 | /* add new tuple->key_reply pair to keymap */ | ||
86 | int ip_ct_gre_keymap_add(struct ip_conntrack *ct, | ||
87 | struct ip_conntrack_tuple *t, | ||
88 | int reply); | ||
89 | |||
90 | /* delete keymap entries */ | ||
91 | void ip_ct_gre_keymap_destroy(struct ip_conntrack *ct); | ||
92 | |||
93 | |||
94 | /* get pointer to gre key, if present */ | ||
95 | static inline u_int32_t *gre_key(struct gre_hdr *greh) | ||
96 | { | ||
97 | if (!greh->key) | ||
98 | return NULL; | ||
99 | if (greh->csum || greh->routing) | ||
100 | return (u_int32_t *) (greh+sizeof(*greh)+4); | ||
101 | return (u_int32_t *) (greh+sizeof(*greh)); | ||
102 | } | ||
103 | |||
104 | /* get pointer ot gre csum, if present */ | ||
105 | static inline u_int16_t *gre_csum(struct gre_hdr *greh) | ||
106 | { | ||
107 | if (!greh->csum) | ||
108 | return NULL; | ||
109 | return (u_int16_t *) (greh+sizeof(*greh)); | ||
110 | } | ||
111 | |||
112 | #endif /* __KERNEL__ */ | ||
113 | |||
114 | #endif /* _CONNTRACK_PROTO_GRE_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h index c33f0b5e0d0a..20e43f018b7c 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h | |||
@@ -17,7 +17,7 @@ union ip_conntrack_manip_proto | |||
17 | u_int16_t all; | 17 | u_int16_t all; |
18 | 18 | ||
19 | struct { | 19 | struct { |
20 | u_int16_t port; | 20 | __be16 port; |
21 | } tcp; | 21 | } tcp; |
22 | struct { | 22 | struct { |
23 | u_int16_t port; | 23 | u_int16_t port; |
@@ -28,6 +28,9 @@ union ip_conntrack_manip_proto | |||
28 | struct { | 28 | struct { |
29 | u_int16_t port; | 29 | u_int16_t port; |
30 | } sctp; | 30 | } sctp; |
31 | struct { | ||
32 | __be16 key; /* key is 32bit, pptp only uses 16 */ | ||
33 | } gre; | ||
31 | }; | 34 | }; |
32 | 35 | ||
33 | /* The manipulable part of the tuple. */ | 36 | /* The manipulable part of the tuple. */ |
@@ -61,6 +64,10 @@ struct ip_conntrack_tuple | |||
61 | struct { | 64 | struct { |
62 | u_int16_t port; | 65 | u_int16_t port; |
63 | } sctp; | 66 | } sctp; |
67 | struct { | ||
68 | __be16 key; /* key is 32bit, | ||
69 | * pptp only uses 16 */ | ||
70 | } gre; | ||
64 | } u; | 71 | } u; |
65 | 72 | ||
66 | /* The protocol. */ | 73 | /* The protocol. */ |
diff --git a/include/linux/netfilter_ipv4/ip_nat_pptp.h b/include/linux/netfilter_ipv4/ip_nat_pptp.h new file mode 100644 index 000000000000..eaf66c2e8f93 --- /dev/null +++ b/include/linux/netfilter_ipv4/ip_nat_pptp.h | |||
@@ -0,0 +1,11 @@ | |||
1 | /* PPTP constants and structs */ | ||
2 | #ifndef _NAT_PPTP_H | ||
3 | #define _NAT_PPTP_H | ||
4 | |||
5 | /* conntrack private data */ | ||
6 | struct ip_nat_pptp { | ||
7 | u_int16_t pns_call_id; /* NAT'ed PNS call id */ | ||
8 | u_int16_t pac_call_id; /* NAT'ed PAC call id */ | ||
9 | }; | ||
10 | |||
11 | #endif /* _NAT_PPTP_H */ | ||
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 58c72a52dc65..59f70b34e029 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -455,6 +455,9 @@ extern unsigned int ip6t_do_table(struct sk_buff **pskb, | |||
455 | 455 | ||
456 | /* Check for an extension */ | 456 | /* Check for an extension */ |
457 | extern int ip6t_ext_hdr(u8 nexthdr); | 457 | extern int ip6t_ext_hdr(u8 nexthdr); |
458 | /* find specified header and get offset to it */ | ||
459 | extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, | ||
460 | u8 target); | ||
458 | 461 | ||
459 | #define IP6T_ALIGN(s) (((s) + (__alignof__(struct ip6t_entry)-1)) & ~(__alignof__(struct ip6t_entry)-1)) | 462 | #define IP6T_ALIGN(s) (((s) + (__alignof__(struct ip6t_entry)-1)) & ~(__alignof__(struct ip6t_entry)-1)) |
460 | 463 | ||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 7bbd25970c9e..bdebdc564506 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #define NETLINK_IP6_FW 13 | 20 | #define NETLINK_IP6_FW 13 |
21 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ | 21 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ |
22 | #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ | 22 | #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ |
23 | #define NETLINK_GENERIC 16 | ||
23 | 24 | ||
24 | #define MAX_LINKS 32 | 25 | #define MAX_LINKS 32 |
25 | 26 | ||
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index 4d24d65c0e88..8903688890ce 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h | |||
@@ -438,17 +438,22 @@ extern int nfsd4_process_open1(struct nfsd4_open *open); | |||
438 | extern int nfsd4_process_open2(struct svc_rqst *rqstp, | 438 | extern int nfsd4_process_open2(struct svc_rqst *rqstp, |
439 | struct svc_fh *current_fh, struct nfsd4_open *open); | 439 | struct svc_fh *current_fh, struct nfsd4_open *open); |
440 | extern int nfsd4_open_confirm(struct svc_rqst *rqstp, | 440 | extern int nfsd4_open_confirm(struct svc_rqst *rqstp, |
441 | struct svc_fh *current_fh, struct nfsd4_open_confirm *oc); | 441 | struct svc_fh *current_fh, struct nfsd4_open_confirm *oc, |
442 | struct nfs4_stateowner **); | ||
442 | extern int nfsd4_close(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 443 | extern int nfsd4_close(struct svc_rqst *rqstp, struct svc_fh *current_fh, |
443 | struct nfsd4_close *close); | 444 | struct nfsd4_close *close, |
445 | struct nfs4_stateowner **replay_owner); | ||
444 | extern int nfsd4_open_downgrade(struct svc_rqst *rqstp, | 446 | extern int nfsd4_open_downgrade(struct svc_rqst *rqstp, |
445 | struct svc_fh *current_fh, struct nfsd4_open_downgrade *od); | 447 | struct svc_fh *current_fh, struct nfsd4_open_downgrade *od, |
448 | struct nfs4_stateowner **replay_owner); | ||
446 | extern int nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 449 | extern int nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, |
447 | struct nfsd4_lock *lock); | 450 | struct nfsd4_lock *lock, |
451 | struct nfs4_stateowner **replay_owner); | ||
448 | extern int nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 452 | extern int nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, |
449 | struct nfsd4_lockt *lockt); | 453 | struct nfsd4_lockt *lockt); |
450 | extern int nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 454 | extern int nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, |
451 | struct nfsd4_locku *locku); | 455 | struct nfsd4_locku *locku, |
456 | struct nfs4_stateowner **replay_owner); | ||
452 | extern int | 457 | extern int |
453 | nfsd4_release_lockowner(struct svc_rqst *rqstp, | 458 | nfsd4_release_lockowner(struct svc_rqst *rqstp, |
454 | struct nfsd4_release_lockowner *rlockowner); | 459 | struct nfsd4_release_lockowner *rlockowner); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index ee0ab7a5f91b..b86a4b77007e 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -447,6 +447,10 @@ | |||
447 | #define PCI_DEVICE_ID_CIRRUS_7542 0x1200 | 447 | #define PCI_DEVICE_ID_CIRRUS_7542 0x1200 |
448 | #define PCI_DEVICE_ID_CIRRUS_7543 0x1202 | 448 | #define PCI_DEVICE_ID_CIRRUS_7543 0x1202 |
449 | #define PCI_DEVICE_ID_CIRRUS_7541 0x1204 | 449 | #define PCI_DEVICE_ID_CIRRUS_7541 0x1204 |
450 | #define PCI_DEVICE_ID_CIRRUS_4610 0x6001 | ||
451 | #define PCI_DEVICE_ID_CIRRUS_4612 0x6003 | ||
452 | #define PCI_DEVICE_ID_CIRRUS_4615 0x6004 | ||
453 | #define PCI_DEVICE_ID_CIRRUS_4281 0x6005 | ||
450 | 454 | ||
451 | #define PCI_VENDOR_ID_IBM 0x1014 | 455 | #define PCI_VENDOR_ID_IBM 0x1014 |
452 | #define PCI_DEVICE_ID_IBM_FIRE_CORAL 0x000a | 456 | #define PCI_DEVICE_ID_IBM_FIRE_CORAL 0x000a |
@@ -487,6 +491,7 @@ | |||
487 | #define PCI_DEVICE_ID_AMI_MEGARAID2 0x9060 | 491 | #define PCI_DEVICE_ID_AMI_MEGARAID2 0x9060 |
488 | 492 | ||
489 | #define PCI_VENDOR_ID_AMD 0x1022 | 493 | #define PCI_VENDOR_ID_AMD 0x1022 |
494 | #define PCI_DEVICE_ID_AMD_K8_NB 0x1100 | ||
490 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 | 495 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 |
491 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 | 496 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 |
492 | #define PCI_DEVICE_ID_AMD_SCSI 0x2020 | 497 | #define PCI_DEVICE_ID_AMD_SCSI 0x2020 |
@@ -682,7 +687,9 @@ | |||
682 | #define PCI_DEVICE_ID_SI_6326 0x6326 | 687 | #define PCI_DEVICE_ID_SI_6326 0x6326 |
683 | #define PCI_DEVICE_ID_SI_7001 0x7001 | 688 | #define PCI_DEVICE_ID_SI_7001 0x7001 |
684 | #define PCI_DEVICE_ID_SI_7012 0x7012 | 689 | #define PCI_DEVICE_ID_SI_7012 0x7012 |
690 | #define PCI_DEVICE_ID_SI_7013 0x7013 | ||
685 | #define PCI_DEVICE_ID_SI_7016 0x7016 | 691 | #define PCI_DEVICE_ID_SI_7016 0x7016 |
692 | #define PCI_DEVICE_ID_SI_7018 0x7018 | ||
686 | 693 | ||
687 | #define PCI_VENDOR_ID_HP 0x103c | 694 | #define PCI_VENDOR_ID_HP 0x103c |
688 | #define PCI_DEVICE_ID_HP_VISUALIZE_EG 0x1005 | 695 | #define PCI_DEVICE_ID_HP_VISUALIZE_EG 0x1005 |
@@ -713,10 +720,12 @@ | |||
713 | #define PCI_DEVICE_ID_HP_DIVA_EVEREST 0x1282 | 720 | #define PCI_DEVICE_ID_HP_DIVA_EVEREST 0x1282 |
714 | #define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290 | 721 | #define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290 |
715 | #define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301 | 722 | #define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301 |
723 | #define PCI_DEVICE_ID_HP_CISS 0x3210 | ||
716 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 | 724 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 |
717 | #define PCI_DEVICE_ID_HP_CISSB 0x3222 | 725 | #define PCI_DEVICE_ID_HP_CISSB 0x3222 |
718 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 | ||
719 | #define PCI_DEVICE_ID_HP_CISSC 0x3230 | 726 | #define PCI_DEVICE_ID_HP_CISSC 0x3230 |
727 | #define PCI_DEVICE_ID_HP_CISSD 0x3238 | ||
728 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 | ||
720 | 729 | ||
721 | #define PCI_VENDOR_ID_PCTECH 0x1042 | 730 | #define PCI_VENDOR_ID_PCTECH 0x1042 |
722 | #define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 | 731 | #define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 |
@@ -991,6 +1000,7 @@ | |||
991 | #define PCI_DEVICE_ID_BROOKTREE_849A 0x0351 | 1000 | #define PCI_DEVICE_ID_BROOKTREE_849A 0x0351 |
992 | #define PCI_DEVICE_ID_BROOKTREE_878_1 0x036e | 1001 | #define PCI_DEVICE_ID_BROOKTREE_878_1 0x036e |
993 | #define PCI_DEVICE_ID_BROOKTREE_878 0x0878 | 1002 | #define PCI_DEVICE_ID_BROOKTREE_878 0x0878 |
1003 | #define PCI_DEVICE_ID_BROOKTREE_879 0x0879 | ||
994 | #define PCI_DEVICE_ID_BROOKTREE_8474 0x8474 | 1004 | #define PCI_DEVICE_ID_BROOKTREE_8474 0x8474 |
995 | 1005 | ||
996 | #define PCI_VENDOR_ID_SIERRA 0x10a8 | 1006 | #define PCI_VENDOR_ID_SIERRA 0x10a8 |
@@ -1109,6 +1119,9 @@ | |||
1109 | #define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2160 0x0004 | 1119 | #define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2160 0x0004 |
1110 | #define PCI_DEVICE_ID_NEOMAGIC_MAGICMEDIA_256AV 0x0005 | 1120 | #define PCI_DEVICE_ID_NEOMAGIC_MAGICMEDIA_256AV 0x0005 |
1111 | #define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128ZVPLUS 0x0083 | 1121 | #define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128ZVPLUS 0x0083 |
1122 | #define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005 | ||
1123 | #define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006 | ||
1124 | #define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016 | ||
1112 | 1125 | ||
1113 | #define PCI_VENDOR_ID_ASP 0x10cd | 1126 | #define PCI_VENDOR_ID_ASP 0x10cd |
1114 | #define PCI_DEVICE_ID_ASP_ABP940 0x1200 | 1127 | #define PCI_DEVICE_ID_ASP_ABP940 0x1200 |
@@ -1155,10 +1168,13 @@ | |||
1155 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064 | 1168 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064 |
1156 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 | 1169 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 |
1157 | #define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066 | 1170 | #define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066 |
1171 | #define PCI_DEVICE_ID_NVIDIA_MCP2_MODEM 0x0069 | ||
1158 | #define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a | 1172 | #define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a |
1159 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS 0x0084 | 1173 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS 0x0084 |
1160 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085 | 1174 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085 |
1161 | #define PCI_DEVICE_ID_NVIDIA_NVENET_4 0x0086 | 1175 | #define PCI_DEVICE_ID_NVIDIA_NVENET_4 0x0086 |
1176 | #define PCI_DEVICE_ID_NVIDIA_MCP2S_MODEM 0x0089 | ||
1177 | #define PCI_DEVICE_ID_NVIDIA_CK8_AUDIO 0x008a | ||
1162 | #define PCI_DEVICE_ID_NVIDIA_NVENET_5 0x008c | 1178 | #define PCI_DEVICE_ID_NVIDIA_NVENET_5 0x008c |
1163 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e | 1179 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e |
1164 | #define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 | 1180 | #define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 |
@@ -1173,6 +1189,7 @@ | |||
1173 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4 | 1189 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4 |
1174 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5 | 1190 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5 |
1175 | #define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6 | 1191 | #define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6 |
1192 | #define PCI_DEVICE_ID_NVIDIA_MCP3_MODEM 0x00d9 | ||
1176 | #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da | 1193 | #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da |
1177 | #define PCI_DEVICE_ID_NVIDIA_NVENET_7 0x00df | 1194 | #define PCI_DEVICE_ID_NVIDIA_NVENET_7 0x00df |
1178 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1 | 1195 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1 |
@@ -1180,6 +1197,7 @@ | |||
1180 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS 0x00e4 | 1197 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS 0x00e4 |
1181 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5 | 1198 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5 |
1182 | #define PCI_DEVICE_ID_NVIDIA_NVENET_6 0x00e6 | 1199 | #define PCI_DEVICE_ID_NVIDIA_NVENET_6 0x00e6 |
1200 | #define PCI_DEVICE_ID_NVIDIA_CK8S_AUDIO 0x00ea | ||
1183 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee | 1201 | #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee |
1184 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 | 1202 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 |
1185 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101 | 1203 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101 |
@@ -1230,6 +1248,7 @@ | |||
1230 | #define PCI_DEVICE_ID_NVIDIA_MCP1_AUDIO 0x01b1 | 1248 | #define PCI_DEVICE_ID_NVIDIA_MCP1_AUDIO 0x01b1 |
1231 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_SMBUS 0x01b4 | 1249 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_SMBUS 0x01b4 |
1232 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc | 1250 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc |
1251 | #define PCI_DEVICE_ID_NVIDIA_MCP1_MODEM 0x01c1 | ||
1233 | #define PCI_DEVICE_ID_NVIDIA_NVENET_1 0x01c3 | 1252 | #define PCI_DEVICE_ID_NVIDIA_NVENET_1 0x01c3 |
1234 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2 0x01e0 | 1253 | #define PCI_DEVICE_ID_NVIDIA_NFORCE2 0x01e0 |
1235 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200 | 1254 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200 |
@@ -1249,7 +1268,8 @@ | |||
1249 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 | 1268 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 |
1250 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 | 1269 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 |
1251 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E | 1270 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E |
1252 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x036F | 1271 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E |
1272 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F | ||
1253 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 | 1273 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 |
1254 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 | 1274 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 |
1255 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B | 1275 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B |
@@ -1334,6 +1354,13 @@ | |||
1334 | #define PCI_DEVICE_ID_REALTEK_8169 0x8169 | 1354 | #define PCI_DEVICE_ID_REALTEK_8169 0x8169 |
1335 | 1355 | ||
1336 | #define PCI_VENDOR_ID_XILINX 0x10ee | 1356 | #define PCI_VENDOR_ID_XILINX 0x10ee |
1357 | #define PCI_DEVICE_ID_RME_DIGI96 0x3fc0 | ||
1358 | #define PCI_DEVICE_ID_RME_DIGI96_8 0x3fc1 | ||
1359 | #define PCI_DEVICE_ID_RME_DIGI96_8_PRO 0x3fc2 | ||
1360 | #define PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST 0x3fc3 | ||
1361 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL 0x3fc4 | ||
1362 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP 0x3fc5 | ||
1363 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI 0x3fc6 | ||
1337 | #define PCI_DEVICE_ID_TURBOPAM 0x4020 | 1364 | #define PCI_DEVICE_ID_TURBOPAM 0x4020 |
1338 | 1365 | ||
1339 | #define PCI_VENDOR_ID_TRUEVISION 0x10fa | 1366 | #define PCI_VENDOR_ID_TRUEVISION 0x10fa |
@@ -1809,6 +1836,14 @@ | |||
1809 | #define PCI_DEVICE_ID_ESS_ESS1968 0x1968 | 1836 | #define PCI_DEVICE_ID_ESS_ESS1968 0x1968 |
1810 | #define PCI_DEVICE_ID_ESS_AUDIOPCI 0x1969 | 1837 | #define PCI_DEVICE_ID_ESS_AUDIOPCI 0x1969 |
1811 | #define PCI_DEVICE_ID_ESS_ESS1978 0x1978 | 1838 | #define PCI_DEVICE_ID_ESS_ESS1978 0x1978 |
1839 | #define PCI_DEVICE_ID_ESS_ALLEGRO_1 0x1988 | ||
1840 | #define PCI_DEVICE_ID_ESS_ALLEGRO 0x1989 | ||
1841 | #define PCI_DEVICE_ID_ESS_CANYON3D_2LE 0x1990 | ||
1842 | #define PCI_DEVICE_ID_ESS_CANYON3D_2 0x1992 | ||
1843 | #define PCI_DEVICE_ID_ESS_MAESTRO3 0x1998 | ||
1844 | #define PCI_DEVICE_ID_ESS_MAESTRO3_1 0x1999 | ||
1845 | #define PCI_DEVICE_ID_ESS_MAESTRO3_HW 0x199a | ||
1846 | #define PCI_DEVICE_ID_ESS_MAESTRO3_2 0x199b | ||
1812 | 1847 | ||
1813 | #define PCI_VENDOR_ID_SATSAGEM 0x1267 | 1848 | #define PCI_VENDOR_ID_SATSAGEM 0x1267 |
1814 | #define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 | 1849 | #define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 |
@@ -1968,6 +2003,9 @@ | |||
1968 | #define PCI_DEVICE_ID_LMC_SSI 0x0005 | 2003 | #define PCI_DEVICE_ID_LMC_SSI 0x0005 |
1969 | #define PCI_DEVICE_ID_LMC_T1 0x0006 | 2004 | #define PCI_DEVICE_ID_LMC_T1 0x0006 |
1970 | 2005 | ||
2006 | #define PCI_VENDOR_ID_MARIAN 0x1382 | ||
2007 | #define PCI_DEVICE_ID_MARIAN_PRODIF_PLUS 0x2048 | ||
2008 | |||
1971 | #define PCI_VENDOR_ID_NETGEAR 0x1385 | 2009 | #define PCI_VENDOR_ID_NETGEAR 0x1385 |
1972 | #define PCI_DEVICE_ID_NETGEAR_GA620 0x620a | 2010 | #define PCI_DEVICE_ID_NETGEAR_GA620 0x620a |
1973 | #define PCI_DEVICE_ID_NETGEAR_GA622 0x622a | 2011 | #define PCI_DEVICE_ID_NETGEAR_GA622 0x622a |
@@ -2056,6 +2094,10 @@ | |||
2056 | #define PCI_VENDOR_ID_TIMEDIA 0x1409 | 2094 | #define PCI_VENDOR_ID_TIMEDIA 0x1409 |
2057 | #define PCI_DEVICE_ID_TIMEDIA_1889 0x7168 | 2095 | #define PCI_DEVICE_ID_TIMEDIA_1889 0x7168 |
2058 | 2096 | ||
2097 | #define PCI_VENDOR_ID_ICE 0x1412 | ||
2098 | #define PCI_DEVICE_ID_ICE_1712 0x1712 | ||
2099 | #define PCI_DEVICE_ID_VT1724 0x1724 | ||
2100 | |||
2059 | #define PCI_VENDOR_ID_OXSEMI 0x1415 | 2101 | #define PCI_VENDOR_ID_OXSEMI 0x1415 |
2060 | #define PCI_DEVICE_ID_OXSEMI_12PCI840 0x8403 | 2102 | #define PCI_DEVICE_ID_OXSEMI_12PCI840 0x8403 |
2061 | #define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501 | 2103 | #define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501 |
@@ -2212,6 +2254,9 @@ | |||
2212 | 2254 | ||
2213 | #define PCI_VENDOR_ID_INFINICON 0x1820 | 2255 | #define PCI_VENDOR_ID_INFINICON 0x1820 |
2214 | 2256 | ||
2257 | #define PCI_VENDOR_ID_SITECOM 0x182d | ||
2258 | #define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069 | ||
2259 | |||
2215 | #define PCI_VENDOR_ID_TOPSPIN 0x1867 | 2260 | #define PCI_VENDOR_ID_TOPSPIN 0x1867 |
2216 | 2261 | ||
2217 | #define PCI_VENDOR_ID_TDI 0x192E | 2262 | #define PCI_VENDOR_ID_TDI 0x192E |
@@ -2536,6 +2581,7 @@ | |||
2536 | #define PCI_DEVICE_ID_INTEL_82443BX_1 0x7191 | 2581 | #define PCI_DEVICE_ID_INTEL_82443BX_1 0x7191 |
2537 | #define PCI_DEVICE_ID_INTEL_82443BX_2 0x7192 | 2582 | #define PCI_DEVICE_ID_INTEL_82443BX_2 0x7192 |
2538 | #define PCI_DEVICE_ID_INTEL_440MX 0x7195 | 2583 | #define PCI_DEVICE_ID_INTEL_440MX 0x7195 |
2584 | #define PCI_DEVICE_ID_INTEL_440MX_6 0x7196 | ||
2539 | #define PCI_DEVICE_ID_INTEL_82443MX_0 0x7198 | 2585 | #define PCI_DEVICE_ID_INTEL_82443MX_0 0x7198 |
2540 | #define PCI_DEVICE_ID_INTEL_82443MX_1 0x7199 | 2586 | #define PCI_DEVICE_ID_INTEL_82443MX_1 0x7199 |
2541 | #define PCI_DEVICE_ID_INTEL_82443MX_2 0x719a | 2587 | #define PCI_DEVICE_ID_INTEL_82443MX_2 0x719a |
@@ -2642,6 +2688,11 @@ | |||
2642 | #define PCI_VENDOR_ID_TTTECH 0x0357 | 2688 | #define PCI_VENDOR_ID_TTTECH 0x0357 |
2643 | #define PCI_DEVICE_ID_TTTECH_MC322 0x000A | 2689 | #define PCI_DEVICE_ID_TTTECH_MC322 0x000A |
2644 | 2690 | ||
2691 | #define PCI_VENDOR_ID_XILINX_RME 0xea60 | ||
2692 | #define PCI_DEVICE_ID_RME_DIGI32 0x9896 | ||
2693 | #define PCI_DEVICE_ID_RME_DIGI32_PRO 0x9897 | ||
2694 | #define PCI_DEVICE_ID_RME_DIGI32_8 0x9898 | ||
2695 | |||
2645 | #define PCI_VENDOR_ID_ARK 0xedd8 | 2696 | #define PCI_VENDOR_ID_ARK 0xedd8 |
2646 | #define PCI_DEVICE_ID_ARK_STING 0xa091 | 2697 | #define PCI_DEVICE_ID_ARK_STING 0xa091 |
2647 | #define PCI_DEVICE_ID_ARK_STINGARK 0xa099 | 2698 | #define PCI_DEVICE_ID_ARK_STINGARK 0xa099 |
diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index 4b32bce9a289..2c177e4c8f22 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h | |||
@@ -166,6 +166,9 @@ struct packet_iosched | |||
166 | /* | 166 | /* |
167 | * 32 buffers of 2048 bytes | 167 | * 32 buffers of 2048 bytes |
168 | */ | 168 | */ |
169 | #if (PAGE_SIZE % CD_FRAMESIZE) != 0 | ||
170 | #error "PAGE_SIZE must be a multiple of CD_FRAMESIZE" | ||
171 | #endif | ||
169 | #define PACKET_MAX_SIZE 32 | 172 | #define PACKET_MAX_SIZE 32 |
170 | #define PAGES_PER_PACKET (PACKET_MAX_SIZE * CD_FRAMESIZE / PAGE_SIZE) | 173 | #define PAGES_PER_PACKET (PACKET_MAX_SIZE * CD_FRAMESIZE / PAGE_SIZE) |
171 | #define PACKET_MAX_SECTORS (PACKET_MAX_SIZE * CD_FRAMESIZE >> 9) | 174 | #define PACKET_MAX_SECTORS (PACKET_MAX_SIZE * CD_FRAMESIZE >> 9) |
diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 3b3266ff1a95..7ab2cdb83ef0 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h | |||
@@ -59,6 +59,10 @@ extern void machine_crash_shutdown(struct pt_regs *); | |||
59 | * Architecture independent implemenations of sys_reboot commands. | 59 | * Architecture independent implemenations of sys_reboot commands. |
60 | */ | 60 | */ |
61 | 61 | ||
62 | extern void kernel_restart_prepare(char *cmd); | ||
63 | extern void kernel_halt_prepare(void); | ||
64 | extern void kernel_power_off_prepare(void); | ||
65 | |||
62 | extern void kernel_restart(char *cmd); | 66 | extern void kernel_restart(char *cmd); |
63 | extern void kernel_halt(void); | 67 | extern void kernel_halt(void); |
64 | extern void kernel_power_off(void); | 68 | extern void kernel_power_off(void); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 38c8654aaa96..49e617fa0f66 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -121,6 +121,17 @@ extern unsigned long nr_iowait(void); | |||
121 | #define set_task_state(tsk, state_value) \ | 121 | #define set_task_state(tsk, state_value) \ |
122 | set_mb((tsk)->state, (state_value)) | 122 | set_mb((tsk)->state, (state_value)) |
123 | 123 | ||
124 | /* | ||
125 | * set_current_state() includes a barrier so that the write of current->state | ||
126 | * is correctly serialised wrt the caller's subsequent test of whether to | ||
127 | * actually sleep: | ||
128 | * | ||
129 | * set_current_state(TASK_UNINTERRUPTIBLE); | ||
130 | * if (do_i_need_to_sleep()) | ||
131 | * schedule(); | ||
132 | * | ||
133 | * If the caller does not need such serialisation then use __set_current_state() | ||
134 | */ | ||
124 | #define __set_current_state(state_value) \ | 135 | #define __set_current_state(state_value) \ |
125 | do { current->state = (state_value); } while (0) | 136 | do { current->state = (state_value); } while (0) |
126 | #define set_current_state(state_value) \ | 137 | #define set_current_state(state_value) \ |
diff --git a/include/linux/security.h b/include/linux/security.h index 55b02e1c73f4..0e43460d374e 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1907,6 +1907,11 @@ extern int register_security (struct security_operations *ops); | |||
1907 | extern int unregister_security (struct security_operations *ops); | 1907 | extern int unregister_security (struct security_operations *ops); |
1908 | extern int mod_reg_security (const char *name, struct security_operations *ops); | 1908 | extern int mod_reg_security (const char *name, struct security_operations *ops); |
1909 | extern int mod_unreg_security (const char *name, struct security_operations *ops); | 1909 | extern int mod_unreg_security (const char *name, struct security_operations *ops); |
1910 | extern struct dentry *securityfs_create_file(const char *name, mode_t mode, | ||
1911 | struct dentry *parent, void *data, | ||
1912 | struct file_operations *fops); | ||
1913 | extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent); | ||
1914 | extern void securityfs_remove(struct dentry *dentry); | ||
1910 | 1915 | ||
1911 | 1916 | ||
1912 | #else /* CONFIG_SECURITY */ | 1917 | #else /* CONFIG_SECURITY */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 425f58c8ea4a..a6f03e473737 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -508,5 +508,7 @@ asmlinkage long sys_keyctl(int cmd, unsigned long arg2, unsigned long arg3, | |||
508 | 508 | ||
509 | asmlinkage long sys_ioprio_set(int which, int who, int ioprio); | 509 | asmlinkage long sys_ioprio_set(int which, int who, int ioprio); |
510 | asmlinkage long sys_ioprio_get(int which, int who); | 510 | asmlinkage long sys_ioprio_get(int which, int who); |
511 | asmlinkage long sys_set_mempolicy(int mode, unsigned long __user *nmask, | ||
512 | unsigned long maxnode); | ||
511 | 513 | ||
512 | #endif | 514 | #endif |
diff --git a/include/linux/tfrc.h b/include/linux/tfrc.h new file mode 100644 index 000000000000..7dab7831c3cb --- /dev/null +++ b/include/linux/tfrc.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #ifndef _LINUX_TFRC_H_ | ||
2 | #define _LINUX_TFRC_H_ | ||
3 | /* | ||
4 | * include/linux/tfrc.h | ||
5 | * | ||
6 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. | ||
7 | * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz> | ||
8 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> | ||
9 | * Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | */ | ||
16 | |||
17 | #include <linux/types.h> | ||
18 | |||
19 | struct tfrc_rx_info { | ||
20 | __u32 tfrcrx_x_recv; | ||
21 | __u32 tfrcrx_rtt; | ||
22 | __u32 tfrcrx_p; | ||
23 | }; | ||
24 | |||
25 | struct tfrc_tx_info { | ||
26 | __u32 tfrctx_x; | ||
27 | __u32 tfrctx_x_recv; | ||
28 | __u32 tfrctx_x_calc; | ||
29 | __u32 tfrctx_rtt; | ||
30 | __u32 tfrctx_p; | ||
31 | __u32 tfrctx_rto; | ||
32 | __u32 tfrctx_ipi; | ||
33 | }; | ||
34 | |||
35 | #endif /* _LINUX_TFRC_H_ */ | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index f623a33b9abe..89a055761bed 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -60,12 +60,17 @@ enum v4l2_field { | |||
60 | (field) == V4L2_FIELD_SEQ_BT) | 60 | (field) == V4L2_FIELD_SEQ_BT) |
61 | 61 | ||
62 | enum v4l2_buf_type { | 62 | enum v4l2_buf_type { |
63 | V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, | 63 | V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, |
64 | V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, | 64 | V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, |
65 | V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, | 65 | V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, |
66 | V4L2_BUF_TYPE_VBI_CAPTURE = 4, | 66 | V4L2_BUF_TYPE_VBI_CAPTURE = 4, |
67 | V4L2_BUF_TYPE_VBI_OUTPUT = 5, | 67 | V4L2_BUF_TYPE_VBI_OUTPUT = 5, |
68 | V4L2_BUF_TYPE_PRIVATE = 0x80, | 68 | #if 1 |
69 | /* Experimental Sliced VBI */ | ||
70 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, | ||
71 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, | ||
72 | #endif | ||
73 | V4L2_BUF_TYPE_PRIVATE = 0x80, | ||
69 | }; | 74 | }; |
70 | 75 | ||
71 | enum v4l2_ctrl_type { | 76 | enum v4l2_ctrl_type { |
@@ -149,20 +154,24 @@ struct v4l2_capability | |||
149 | }; | 154 | }; |
150 | 155 | ||
151 | /* Values for 'capabilities' field */ | 156 | /* Values for 'capabilities' field */ |
152 | #define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */ | 157 | #define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */ |
153 | #define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */ | 158 | #define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */ |
154 | #define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ | 159 | #define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ |
155 | #define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a VBI capture device */ | 160 | #define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ |
156 | #define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a VBI output device */ | 161 | #define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ |
157 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ | 162 | #if 1 |
163 | #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ | ||
164 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ | ||
165 | #endif | ||
166 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ | ||
158 | 167 | ||
159 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ | 168 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ |
160 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ | 169 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ |
161 | #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ | 170 | #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ |
162 | 171 | ||
163 | #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ | 172 | #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ |
164 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ | 173 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ |
165 | #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ | 174 | #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ |
166 | 175 | ||
167 | /* | 176 | /* |
168 | * V I D E O I M A G E F O R M A T | 177 | * V I D E O I M A G E F O R M A T |
@@ -809,6 +818,8 @@ struct v4l2_audioout | |||
809 | * Data services API by Michael Schimek | 818 | * Data services API by Michael Schimek |
810 | */ | 819 | */ |
811 | 820 | ||
821 | /* Raw VBI */ | ||
822 | |||
812 | struct v4l2_vbi_format | 823 | struct v4l2_vbi_format |
813 | { | 824 | { |
814 | __u32 sampling_rate; /* in 1 Hz */ | 825 | __u32 sampling_rate; /* in 1 Hz */ |
@@ -825,6 +836,54 @@ struct v4l2_vbi_format | |||
825 | #define V4L2_VBI_UNSYNC (1<< 0) | 836 | #define V4L2_VBI_UNSYNC (1<< 0) |
826 | #define V4L2_VBI_INTERLACED (1<< 1) | 837 | #define V4L2_VBI_INTERLACED (1<< 1) |
827 | 838 | ||
839 | #if 1 | ||
840 | /* Sliced VBI | ||
841 | * | ||
842 | * This implements is a proposal V4L2 API to allow SLICED VBI | ||
843 | * required for some hardware encoders. It should change without | ||
844 | * notice in the definitive implementation. | ||
845 | */ | ||
846 | |||
847 | struct v4l2_sliced_vbi_format | ||
848 | { | ||
849 | __u16 service_set; | ||
850 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field | ||
851 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field | ||
852 | (equals frame lines 313-336 for 625 line video | ||
853 | standards, 263-286 for 525 line standards) */ | ||
854 | __u16 service_lines[2][24]; | ||
855 | __u32 io_size; | ||
856 | __u32 reserved[2]; /* must be zero */ | ||
857 | }; | ||
858 | |||
859 | #define V4L2_SLICED_TELETEXT_B (0x0001) | ||
860 | #define V4L2_SLICED_VPS (0x0400) | ||
861 | #define V4L2_SLICED_CAPTION_525 (0x1000) | ||
862 | #define V4L2_SLICED_WSS_625 (0x4000) | ||
863 | |||
864 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) | ||
865 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) | ||
866 | |||
867 | struct v4l2_sliced_vbi_cap | ||
868 | { | ||
869 | __u16 service_set; | ||
870 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field | ||
871 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field | ||
872 | (equals frame lines 313-336 for 625 line video | ||
873 | standards, 263-286 for 525 line standards) */ | ||
874 | __u16 service_lines[2][24]; | ||
875 | __u32 reserved[4]; /* must be 0 */ | ||
876 | }; | ||
877 | |||
878 | struct v4l2_sliced_vbi_data | ||
879 | { | ||
880 | __u32 id; | ||
881 | __u32 field; /* 0: first field, 1: second field */ | ||
882 | __u32 line; /* 1-23 */ | ||
883 | __u32 reserved; /* must be 0 */ | ||
884 | __u8 data[48]; | ||
885 | }; | ||
886 | #endif | ||
828 | 887 | ||
829 | /* | 888 | /* |
830 | * A G G R E G A T E S T R U C T U R E S | 889 | * A G G R E G A T E S T R U C T U R E S |
@@ -837,10 +896,13 @@ struct v4l2_format | |||
837 | enum v4l2_buf_type type; | 896 | enum v4l2_buf_type type; |
838 | union | 897 | union |
839 | { | 898 | { |
840 | struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE | 899 | struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE |
841 | struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY | 900 | struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY |
842 | struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE | 901 | struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE |
843 | __u8 raw_data[200]; // user-defined | 902 | #if 1 |
903 | struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE | ||
904 | #endif | ||
905 | __u8 raw_data[200]; // user-defined | ||
844 | } fmt; | 906 | } fmt; |
845 | }; | 907 | }; |
846 | 908 | ||
@@ -916,6 +978,9 @@ struct v4l2_streamparm | |||
916 | #define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout) | 978 | #define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout) |
917 | #define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority) | 979 | #define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority) |
918 | #define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority) | 980 | #define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority) |
981 | #if 1 | ||
982 | #define VIDIOC_G_SLICED_VBI_CAP _IOR ('V', 69, struct v4l2_sliced_vbi_cap) | ||
983 | #endif | ||
919 | 984 | ||
920 | /* for compatibility, will go away some day */ | 985 | /* for compatibility, will go away some day */ |
921 | #define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int) | 986 | #define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int) |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 371e7d3f2e6f..fa2d12b0579b 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -463,6 +463,17 @@ struct inquiry_info_with_rssi_and_pscan_mode { | |||
463 | __s8 rssi; | 463 | __s8 rssi; |
464 | } __attribute__ ((packed)); | 464 | } __attribute__ ((packed)); |
465 | 465 | ||
466 | #define HCI_EV_EXTENDED_INQUIRY_RESULT 0x2F | ||
467 | struct extended_inquiry_info { | ||
468 | bdaddr_t bdaddr; | ||
469 | __u8 pscan_rep_mode; | ||
470 | __u8 pscan_period_mode; | ||
471 | __u8 dev_class[3]; | ||
472 | __u16 clock_offset; | ||
473 | __s8 rssi; | ||
474 | __u8 data[240]; | ||
475 | } __attribute__ ((packed)); | ||
476 | |||
466 | #define HCI_EV_CONN_COMPLETE 0x03 | 477 | #define HCI_EV_CONN_COMPLETE 0x03 |
467 | struct hci_ev_conn_complete { | 478 | struct hci_ev_conn_complete { |
468 | __u8 status; | 479 | __u8 status; |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index e426641c519f..06b4235aa016 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -84,6 +84,7 @@ | |||
84 | #define IP_VS_CONN_F_IN_SEQ 0x0400 /* must do input seq adjust */ | 84 | #define IP_VS_CONN_F_IN_SEQ 0x0400 /* must do input seq adjust */ |
85 | #define IP_VS_CONN_F_SEQ_MASK 0x0600 /* in/out sequence mask */ | 85 | #define IP_VS_CONN_F_SEQ_MASK 0x0600 /* in/out sequence mask */ |
86 | #define IP_VS_CONN_F_NO_CPORT 0x0800 /* no client port set yet */ | 86 | #define IP_VS_CONN_F_NO_CPORT 0x0800 /* no client port set yet */ |
87 | #define IP_VS_CONN_F_TEMPLATE 0x1000 /* template, not connection */ | ||
87 | 88 | ||
88 | /* Move it to better place one day, for now keep it unique */ | 89 | /* Move it to better place one day, for now keep it unique */ |
89 | #define NFC_IPVS_PROPERTY 0x10000 | 90 | #define NFC_IPVS_PROPERTY 0x10000 |
@@ -739,6 +740,8 @@ enum { | |||
739 | 740 | ||
740 | extern struct ip_vs_conn *ip_vs_conn_in_get | 741 | extern struct ip_vs_conn *ip_vs_conn_in_get |
741 | (int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port); | 742 | (int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port); |
743 | extern struct ip_vs_conn *ip_vs_ct_in_get | ||
744 | (int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port); | ||
742 | extern struct ip_vs_conn *ip_vs_conn_out_get | 745 | extern struct ip_vs_conn *ip_vs_conn_out_get |
743 | (int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port); | 746 | (int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port); |
744 | 747 | ||
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h index 53184a38fdf6..0e293fe733b0 100644 --- a/include/rdma/ib_mad.h +++ b/include/rdma/ib_mad.h | |||
@@ -108,6 +108,13 @@ | |||
108 | #define IB_QP1_QKEY 0x80010000 | 108 | #define IB_QP1_QKEY 0x80010000 |
109 | #define IB_QP_SET_QKEY 0x80000000 | 109 | #define IB_QP_SET_QKEY 0x80000000 |
110 | 110 | ||
111 | enum { | ||
112 | IB_MGMT_MAD_DATA = 232, | ||
113 | IB_MGMT_RMPP_DATA = 220, | ||
114 | IB_MGMT_VENDOR_DATA = 216, | ||
115 | IB_MGMT_SA_DATA = 200 | ||
116 | }; | ||
117 | |||
111 | struct ib_mad_hdr { | 118 | struct ib_mad_hdr { |
112 | u8 base_version; | 119 | u8 base_version; |
113 | u8 mgmt_class; | 120 | u8 mgmt_class; |
@@ -149,20 +156,20 @@ struct ib_sa_hdr { | |||
149 | 156 | ||
150 | struct ib_mad { | 157 | struct ib_mad { |
151 | struct ib_mad_hdr mad_hdr; | 158 | struct ib_mad_hdr mad_hdr; |
152 | u8 data[232]; | 159 | u8 data[IB_MGMT_MAD_DATA]; |
153 | }; | 160 | }; |
154 | 161 | ||
155 | struct ib_rmpp_mad { | 162 | struct ib_rmpp_mad { |
156 | struct ib_mad_hdr mad_hdr; | 163 | struct ib_mad_hdr mad_hdr; |
157 | struct ib_rmpp_hdr rmpp_hdr; | 164 | struct ib_rmpp_hdr rmpp_hdr; |
158 | u8 data[220]; | 165 | u8 data[IB_MGMT_RMPP_DATA]; |
159 | }; | 166 | }; |
160 | 167 | ||
161 | struct ib_sa_mad { | 168 | struct ib_sa_mad { |
162 | struct ib_mad_hdr mad_hdr; | 169 | struct ib_mad_hdr mad_hdr; |
163 | struct ib_rmpp_hdr rmpp_hdr; | 170 | struct ib_rmpp_hdr rmpp_hdr; |
164 | struct ib_sa_hdr sa_hdr; | 171 | struct ib_sa_hdr sa_hdr; |
165 | u8 data[200]; | 172 | u8 data[IB_MGMT_SA_DATA]; |
166 | } __attribute__ ((packed)); | 173 | } __attribute__ ((packed)); |
167 | 174 | ||
168 | struct ib_vendor_mad { | 175 | struct ib_vendor_mad { |
@@ -170,7 +177,7 @@ struct ib_vendor_mad { | |||
170 | struct ib_rmpp_hdr rmpp_hdr; | 177 | struct ib_rmpp_hdr rmpp_hdr; |
171 | u8 reserved; | 178 | u8 reserved; |
172 | u8 oui[3]; | 179 | u8 oui[3]; |
173 | u8 data[216]; | 180 | u8 data[IB_MGMT_VENDOR_DATA]; |
174 | }; | 181 | }; |
175 | 182 | ||
176 | struct ib_class_port_info | 183 | struct ib_class_port_info |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 916144be208b..69313ba7505b 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -439,6 +439,8 @@ enum scsi_host_state { | |||
439 | SHOST_CANCEL, | 439 | SHOST_CANCEL, |
440 | SHOST_DEL, | 440 | SHOST_DEL, |
441 | SHOST_RECOVERY, | 441 | SHOST_RECOVERY, |
442 | SHOST_CANCEL_RECOVERY, | ||
443 | SHOST_DEL_RECOVERY, | ||
442 | }; | 444 | }; |
443 | 445 | ||
444 | struct Scsi_Host { | 446 | struct Scsi_Host { |
@@ -465,8 +467,6 @@ struct Scsi_Host { | |||
465 | 467 | ||
466 | struct list_head eh_cmd_q; | 468 | struct list_head eh_cmd_q; |
467 | struct task_struct * ehandler; /* Error recovery thread. */ | 469 | struct task_struct * ehandler; /* Error recovery thread. */ |
468 | struct semaphore * eh_wait; /* The error recovery thread waits | ||
469 | on this. */ | ||
470 | struct semaphore * eh_action; /* Wait for specific actions on the | 470 | struct semaphore * eh_action; /* Wait for specific actions on the |
471 | host. */ | 471 | host. */ |
472 | unsigned int eh_active:1; /* Indicates the eh thread is awake and active if | 472 | unsigned int eh_active:1; /* Indicates the eh thread is awake and active if |
@@ -621,6 +621,13 @@ static inline struct Scsi_Host *dev_to_shost(struct device *dev) | |||
621 | return container_of(dev, struct Scsi_Host, shost_gendev); | 621 | return container_of(dev, struct Scsi_Host, shost_gendev); |
622 | } | 622 | } |
623 | 623 | ||
624 | static inline int scsi_host_in_recovery(struct Scsi_Host *shost) | ||
625 | { | ||
626 | return shost->shost_state == SHOST_RECOVERY || | ||
627 | shost->shost_state == SHOST_CANCEL_RECOVERY || | ||
628 | shost->shost_state == SHOST_DEL_RECOVERY; | ||
629 | } | ||
630 | |||
624 | extern int scsi_queue_work(struct Scsi_Host *, struct work_struct *); | 631 | extern int scsi_queue_work(struct Scsi_Host *, struct work_struct *); |
625 | extern void scsi_flush_work(struct Scsi_Host *); | 632 | extern void scsi_flush_work(struct Scsi_Host *); |
626 | 633 | ||
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 115db056dc6b..b0d445437372 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
@@ -103,8 +103,8 @@ enum fc_port_state { | |||
103 | incapable of reporting */ | 103 | incapable of reporting */ |
104 | #define FC_PORTSPEED_1GBIT 1 | 104 | #define FC_PORTSPEED_1GBIT 1 |
105 | #define FC_PORTSPEED_2GBIT 2 | 105 | #define FC_PORTSPEED_2GBIT 2 |
106 | #define FC_PORTSPEED_10GBIT 4 | 106 | #define FC_PORTSPEED_4GBIT 4 |
107 | #define FC_PORTSPEED_4GBIT 8 | 107 | #define FC_PORTSPEED_10GBIT 8 |
108 | #define FC_PORTSPEED_NOT_NEGOTIATED (1 << 15) /* Speed not established */ | 108 | #define FC_PORTSPEED_NOT_NEGOTIATED (1 << 15) /* Speed not established */ |
109 | 109 | ||
110 | /* | 110 | /* |
diff --git a/include/sound/core.h b/include/sound/core.h index 3dc41fd5c54d..26160adcdffc 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -168,6 +168,9 @@ struct _snd_card { | |||
168 | wait_queue_head_t shutdown_sleep; | 168 | wait_queue_head_t shutdown_sleep; |
169 | struct work_struct free_workq; /* for free in workqueue */ | 169 | struct work_struct free_workq; /* for free in workqueue */ |
170 | struct device *dev; | 170 | struct device *dev; |
171 | #ifdef CONFIG_SND_GENERIC_DRIVER | ||
172 | struct snd_generic_device *generic_dev; | ||
173 | #endif | ||
171 | 174 | ||
172 | #ifdef CONFIG_PM | 175 | #ifdef CONFIG_PM |
173 | int (*pm_suspend)(snd_card_t *card, pm_message_t state); | 176 | int (*pm_suspend)(snd_card_t *card, pm_message_t state); |
@@ -176,9 +179,6 @@ struct _snd_card { | |||
176 | unsigned int power_state; /* power state */ | 179 | unsigned int power_state; /* power state */ |
177 | struct semaphore power_lock; /* power lock */ | 180 | struct semaphore power_lock; /* power lock */ |
178 | wait_queue_head_t power_sleep; | 181 | wait_queue_head_t power_sleep; |
179 | #ifdef CONFIG_SND_GENERIC_PM | ||
180 | struct snd_generic_device *pm_dev; /* for ISA */ | ||
181 | #endif | ||
182 | #endif | 182 | #endif |
183 | 183 | ||
184 | #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) | 184 | #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) |
@@ -348,6 +348,8 @@ int snd_card_file_remove(snd_card_t *card, struct file *file); | |||
348 | #ifndef snd_card_set_dev | 348 | #ifndef snd_card_set_dev |
349 | #define snd_card_set_dev(card,devptr) ((card)->dev = (devptr)) | 349 | #define snd_card_set_dev(card,devptr) ((card)->dev = (devptr)) |
350 | #endif | 350 | #endif |
351 | /* register a generic device (for ISA, etc) */ | ||
352 | int snd_card_set_generic_dev(snd_card_t *card); | ||
351 | 353 | ||
352 | /* device.c */ | 354 | /* device.c */ |
353 | 355 | ||
diff --git a/include/sound/cs46xx.h b/include/sound/cs46xx.h index 9b94510eda60..b0c0e192eb56 100644 --- a/include/sound/cs46xx.h +++ b/include/sound/cs46xx.h | |||
@@ -29,19 +29,6 @@ | |||
29 | #include "ac97_codec.h" | 29 | #include "ac97_codec.h" |
30 | #include "cs46xx_dsp_spos.h" | 30 | #include "cs46xx_dsp_spos.h" |
31 | 31 | ||
32 | #ifndef PCI_VENDOR_ID_CIRRUS | ||
33 | #define PCI_VENDOR_ID_CIRRUS 0x1013 | ||
34 | #endif | ||
35 | #ifndef PCI_DEVICE_ID_CIRRUS_4610 | ||
36 | #define PCI_DEVICE_ID_CIRRUS_4610 0x6001 | ||
37 | #endif | ||
38 | #ifndef PCI_DEVICE_ID_CIRRUS_4612 | ||
39 | #define PCI_DEVICE_ID_CIRRUS_4612 0x6003 | ||
40 | #endif | ||
41 | #ifndef PCI_DEVICE_ID_CIRRUS_4615 | ||
42 | #define PCI_DEVICE_ID_CIRRUS_4615 0x6004 | ||
43 | #endif | ||
44 | |||
45 | /* | 32 | /* |
46 | * Direct registers | 33 | * Direct registers |
47 | */ | 34 | */ |
@@ -1715,7 +1702,6 @@ struct _snd_cs46xx { | |||
1715 | void (*active_ctrl)(cs46xx_t *, int); | 1702 | void (*active_ctrl)(cs46xx_t *, int); |
1716 | void (*mixer_init)(cs46xx_t *); | 1703 | void (*mixer_init)(cs46xx_t *); |
1717 | 1704 | ||
1718 | struct pci_dev *acpi_dev; | ||
1719 | int acpi_port; | 1705 | int acpi_port; |
1720 | snd_kcontrol_t *eapd_switch; /* for amplifier hack */ | 1706 | snd_kcontrol_t *eapd_switch; /* for amplifier hack */ |
1721 | int accept_valid; /* accept mmap valid (for OSS) */ | 1707 | int accept_valid; /* accept mmap valid (for OSS) */ |
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 4e3993dfcefe..67bf3f18e96a 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h | |||
@@ -35,13 +35,6 @@ | |||
35 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
36 | #include <asm/io.h> | 36 | #include <asm/io.h> |
37 | 37 | ||
38 | #ifndef PCI_VENDOR_ID_CREATIVE | ||
39 | #define PCI_VENDOR_ID_CREATIVE 0x1102 | ||
40 | #endif | ||
41 | #ifndef PCI_DEVICE_ID_CREATIVE_EMU10K1 | ||
42 | #define PCI_DEVICE_ID_CREATIVE_EMU10K1 0x0002 | ||
43 | #endif | ||
44 | |||
45 | /* ------------------- DEFINES -------------------- */ | 38 | /* ------------------- DEFINES -------------------- */ |
46 | 39 | ||
47 | #define EMUPAGESIZE 4096 | 40 | #define EMUPAGESIZE 4096 |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index d6361dab0370..2b23a5967071 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -903,13 +903,16 @@ int snd_pcm_format_unsigned(snd_pcm_format_t format); | |||
903 | int snd_pcm_format_linear(snd_pcm_format_t format); | 903 | int snd_pcm_format_linear(snd_pcm_format_t format); |
904 | int snd_pcm_format_little_endian(snd_pcm_format_t format); | 904 | int snd_pcm_format_little_endian(snd_pcm_format_t format); |
905 | int snd_pcm_format_big_endian(snd_pcm_format_t format); | 905 | int snd_pcm_format_big_endian(snd_pcm_format_t format); |
906 | /* | 906 | #if 0 /* just for DocBook */ |
907 | /** | ||
907 | * snd_pcm_format_cpu_endian - Check the PCM format is CPU-endian | 908 | * snd_pcm_format_cpu_endian - Check the PCM format is CPU-endian |
908 | * @format: the format to check | 909 | * @format: the format to check |
909 | * | 910 | * |
910 | * Returns 1 if the given PCM format is CPU-endian, 0 if | 911 | * Returns 1 if the given PCM format is CPU-endian, 0 if |
911 | * opposite, or a negative error code if endian not specified. | 912 | * opposite, or a negative error code if endian not specified. |
912 | */ | 913 | */ |
914 | int snd_pcm_format_cpu_endian(snd_pcm_format_t format); | ||
915 | #endif /* DocBook */ | ||
913 | #ifdef SNDRV_LITTLE_ENDIAN | 916 | #ifdef SNDRV_LITTLE_ENDIAN |
914 | #define snd_pcm_format_cpu_endian(format) snd_pcm_format_little_endian(format) | 917 | #define snd_pcm_format_cpu_endian(format) snd_pcm_format_little_endian(format) |
915 | #else | 918 | #else |
diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h index 518728536bc6..0b67c9d105af 100644 --- a/include/sound/pcm_oss.h +++ b/include/sound/pcm_oss.h | |||
@@ -32,7 +32,8 @@ struct _snd_pcm_oss_setup { | |||
32 | block:1, | 32 | block:1, |
33 | nonblock:1, | 33 | nonblock:1, |
34 | partialfrag:1, | 34 | partialfrag:1, |
35 | nosilence:1; | 35 | nosilence:1, |
36 | buggyptr:1; | ||
36 | unsigned int periods; | 37 | unsigned int periods; |
37 | unsigned int period_size; | 38 | unsigned int period_size; |
38 | snd_pcm_oss_setup_t *next; | 39 | snd_pcm_oss_setup_t *next; |
diff --git a/include/sound/trident.h b/include/sound/trident.h index f5254ec36e6a..a408d3925050 100644 --- a/include/sound/trident.h +++ b/include/sound/trident.h | |||
@@ -33,23 +33,6 @@ | |||
33 | //#include "ainstr_gf1.h" | 33 | //#include "ainstr_gf1.h" |
34 | #include "ainstr_simple.h" | 34 | #include "ainstr_simple.h" |
35 | 35 | ||
36 | #ifndef PCI_VENDOR_ID_TRIDENT | ||
37 | #define PCI_VENDOR_ID_TRIDENT 0x1023 | ||
38 | #endif | ||
39 | #ifndef PCI_DEVICE_ID_TRIDENT_4DWAVE_DX | ||
40 | #define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX 0x2000 | ||
41 | #endif | ||
42 | #ifndef PCI_DEVICE_ID_TRIDENT_4DWAVE_NX | ||
43 | #define PCI_DEVICE_ID_TRIDENT_4DWAVE_NX 0x2001 | ||
44 | #endif | ||
45 | |||
46 | #ifndef PCI_VENDOR_ID_SI | ||
47 | #define PCI_VENDOR_ID_SI 0x1039 | ||
48 | #endif | ||
49 | #ifndef PCI_DEVICE_ID_SI_7018 | ||
50 | #define PCI_DEVICE_ID_SI_7018 0x7018 | ||
51 | #endif | ||
52 | |||
53 | #define TRIDENT_DEVICE_ID_DX ((PCI_VENDOR_ID_TRIDENT<<16)|PCI_DEVICE_ID_TRIDENT_4DWAVE_DX) | 36 | #define TRIDENT_DEVICE_ID_DX ((PCI_VENDOR_ID_TRIDENT<<16)|PCI_DEVICE_ID_TRIDENT_4DWAVE_DX) |
54 | #define TRIDENT_DEVICE_ID_NX ((PCI_VENDOR_ID_TRIDENT<<16)|PCI_DEVICE_ID_TRIDENT_4DWAVE_NX) | 37 | #define TRIDENT_DEVICE_ID_NX ((PCI_VENDOR_ID_TRIDENT<<16)|PCI_DEVICE_ID_TRIDENT_4DWAVE_NX) |
55 | #define TRIDENT_DEVICE_ID_SI7018 ((PCI_VENDOR_ID_SI<<16)|PCI_DEVICE_ID_SI_7018) | 38 | #define TRIDENT_DEVICE_ID_SI7018 ((PCI_VENDOR_ID_SI<<16)|PCI_DEVICE_ID_SI_7018) |
diff --git a/include/sound/version.h b/include/sound/version.h index 8d19bfabb7e0..ee32af20dba9 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h. Generated by configure. */ | 1 | /* include/version.h. Generated by configure. */ |
2 | #define CONFIG_SND_VERSION "1.0.10rc1" | 2 | #define CONFIG_SND_VERSION "1.0.10rc1" |
3 | #define CONFIG_SND_DATE " (Tue Aug 30 05:31:08 2005 UTC)" | 3 | #define CONFIG_SND_DATE " (Mon Sep 12 08:13:09 2005 UTC)" |
diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h index 9a3c1e6c820a..c3bccbfd8d4c 100644 --- a/include/sound/ymfpci.h +++ b/include/sound/ymfpci.h | |||
@@ -28,28 +28,6 @@ | |||
28 | #include "timer.h" | 28 | #include "timer.h" |
29 | #include <linux/gameport.h> | 29 | #include <linux/gameport.h> |
30 | 30 | ||
31 | #ifndef PCI_VENDOR_ID_YAMAHA | ||
32 | #define PCI_VENDOR_ID_YAMAHA 0x1073 | ||
33 | #endif | ||
34 | #ifndef PCI_DEVICE_ID_YAMAHA_724 | ||
35 | #define PCI_DEVICE_ID_YAMAHA_724 0x0004 | ||
36 | #endif | ||
37 | #ifndef PCI_DEVICE_ID_YAMAHA_724F | ||
38 | #define PCI_DEVICE_ID_YAMAHA_724F 0x000d | ||
39 | #endif | ||
40 | #ifndef PCI_DEVICE_ID_YAMAHA_740 | ||
41 | #define PCI_DEVICE_ID_YAMAHA_740 0x000a | ||
42 | #endif | ||
43 | #ifndef PCI_DEVICE_ID_YAMAHA_740C | ||
44 | #define PCI_DEVICE_ID_YAMAHA_740C 0x000c | ||
45 | #endif | ||
46 | #ifndef PCI_DEVICE_ID_YAMAHA_744 | ||
47 | #define PCI_DEVICE_ID_YAMAHA_744 0x0010 | ||
48 | #endif | ||
49 | #ifndef PCI_DEVICE_ID_YAMAHA_754 | ||
50 | #define PCI_DEVICE_ID_YAMAHA_754 0x0012 | ||
51 | #endif | ||
52 | |||
53 | /* | 31 | /* |
54 | * Direct registers | 32 | * Direct registers |
55 | */ | 33 | */ |
diff --git a/include/video/pm3fb.h b/include/video/pm3fb.h index 8d3cef5d87a2..6f4ea808cf74 100644 --- a/include/video/pm3fb.h +++ b/include/video/pm3fb.h | |||
@@ -1142,9 +1142,6 @@ | |||
1142 | /* do we want accelerated console */ | 1142 | /* do we want accelerated console */ |
1143 | #define PM3FB_USE_ACCEL 1 | 1143 | #define PM3FB_USE_ACCEL 1 |
1144 | 1144 | ||
1145 | /* useful ? */ | ||
1146 | #define CHAR_IS_NUM(a) ((((a) >= '0') && ((a) <= '9')) ? 1 : 0) | ||
1147 | |||
1148 | /* for driver debugging ONLY */ | 1145 | /* for driver debugging ONLY */ |
1149 | /* 0 = assert only, 1 = error, 2 = info, 3+ = verbose */ | 1146 | /* 0 = assert only, 1 = error, 2 = info, 3+ = verbose */ |
1150 | /* define PM3FB_MASTER_DEBUG 1 */ | 1147 | /* define PM3FB_MASTER_DEBUG 1 */ |
diff --git a/include/video/w100fb.h b/include/video/w100fb.h index e6da2d7ded8c..677d40326796 100644 --- a/include/video/w100fb.h +++ b/include/video/w100fb.h | |||
@@ -19,6 +19,7 @@ struct w100fb_par; | |||
19 | 19 | ||
20 | unsigned long w100fb_gpio_read(int port); | 20 | unsigned long w100fb_gpio_read(int port); |
21 | void w100fb_gpio_write(int port, unsigned long value); | 21 | void w100fb_gpio_write(int port, unsigned long value); |
22 | unsigned long w100fb_get_hsynclen(struct device *dev); | ||
22 | 23 | ||
23 | /* LCD Specific Routines and Config */ | 24 | /* LCD Specific Routines and Config */ |
24 | struct w100_tg_info { | 25 | struct w100_tg_info { |