diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-02-13 00:57:21 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-02-13 00:57:21 -0500 |
commit | 54c66f6d781e03dc0b23956234963c4911e6d1c0 (patch) | |
tree | 40619a66ae6d8703a57bf681d087ffeabbffd346 /include | |
parent | 8ce0a7df6e6117d8814e976d4b7ce6a6b2c9cf93 (diff) | |
parent | 17e0e27020d028a790d97699aff85a43af5be472 (diff) |
Merge branch 'master' into 85xx
Diffstat (limited to 'include')
326 files changed, 5052 insertions, 2060 deletions
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h index 5d15af2457..24bdcc8b63 100644 --- a/include/asm-alpha/io.h +++ b/include/asm-alpha/io.h | |||
@@ -525,15 +525,6 @@ extern void outsw (unsigned long port, const void *src, unsigned long count); | |||
525 | extern void outsl (unsigned long port, const void *src, unsigned long count); | 525 | extern void outsl (unsigned long port, const void *src, unsigned long count); |
526 | 526 | ||
527 | /* | 527 | /* |
528 | * XXX - We don't have csum_partial_copy_fromio() yet, so we cheat here and | ||
529 | * just copy it. The net code will then do the checksum later. Presently | ||
530 | * only used by some shared memory 8390 Ethernet cards anyway. | ||
531 | */ | ||
532 | |||
533 | #define eth_io_copy_and_sum(skb,src,len,unused) \ | ||
534 | memcpy_fromio((skb)->data,src,len) | ||
535 | |||
536 | /* | ||
537 | * The Alpha Jensen hardware for some rather strange reason puts | 528 | * The Alpha Jensen hardware for some rather strange reason puts |
538 | * the RTC clock at 0x170 instead of 0x70. Probably due to some | 529 | * the RTC clock at 0x170 instead of 0x70. Probably due to some |
539 | * misguided idea about using 0x70 for NMI stuff. | 530 | * misguided idea about using 0x70 for NMI stuff. |
diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h index 5f24c755f5..90d7c35d28 100644 --- a/include/asm-alpha/mman.h +++ b/include/asm-alpha/mman.h | |||
@@ -49,7 +49,6 @@ | |||
49 | #define MADV_DOFORK 11 /* do inherit across fork */ | 49 | #define MADV_DOFORK 11 /* do inherit across fork */ |
50 | 50 | ||
51 | /* compatibility flags */ | 51 | /* compatibility flags */ |
52 | #define MAP_ANON MAP_ANONYMOUS | ||
53 | #define MAP_FILE 0 | 52 | #define MAP_FILE 0 |
54 | 53 | ||
55 | #endif /* __ALPHA_MMAN_H__ */ | 54 | #endif /* __ALPHA_MMAN_H__ */ |
diff --git a/include/asm-alpha/percpu.h b/include/asm-alpha/percpu.h index 48348fe34c..651ebb141b 100644 --- a/include/asm-alpha/percpu.h +++ b/include/asm-alpha/percpu.h | |||
@@ -1,6 +1,20 @@ | |||
1 | #ifndef __ALPHA_PERCPU_H | 1 | #ifndef __ALPHA_PERCPU_H |
2 | #define __ALPHA_PERCPU_H | 2 | #define __ALPHA_PERCPU_H |
3 | 3 | ||
4 | /* | ||
5 | * Increase the per cpu area for Alpha so that | ||
6 | * modules using percpu area can load. | ||
7 | */ | ||
8 | #ifdef CONFIG_MODULES | ||
9 | # define PERCPU_MODULE_RESERVE 8192 | ||
10 | #else | ||
11 | # define PERCPU_MODULE_RESERVE 0 | ||
12 | #endif | ||
13 | |||
14 | #define PERCPU_ENOUGH_ROOM \ | ||
15 | (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \ | ||
16 | PERCPU_MODULE_RESERVE) | ||
17 | |||
4 | #include <asm-generic/percpu.h> | 18 | #include <asm-generic/percpu.h> |
5 | 19 | ||
6 | #endif /* __ALPHA_PERCPU_H */ | 20 | #endif /* __ALPHA_PERCPU_H */ |
diff --git a/include/asm-alpha/termios.h b/include/asm-alpha/termios.h index 1cfd27f0ad..39e492c3bf 100644 --- a/include/asm-alpha/termios.h +++ b/include/asm-alpha/termios.h | |||
@@ -66,24 +66,6 @@ struct termio { | |||
66 | #define _VEOL2 6 | 66 | #define _VEOL2 6 |
67 | #define _VSWTC 7 | 67 | #define _VSWTC 7 |
68 | 68 | ||
69 | /* line disciplines */ | ||
70 | #define N_TTY 0 | ||
71 | #define N_SLIP 1 | ||
72 | #define N_MOUSE 2 | ||
73 | #define N_PPP 3 | ||
74 | #define N_STRIP 4 | ||
75 | #define N_AX25 5 | ||
76 | #define N_X25 6 /* X.25 async */ | ||
77 | #define N_6PACK 7 | ||
78 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
79 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
80 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
81 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
82 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
83 | #define N_HDLC 13 /* synchronous HDLC */ | ||
84 | #define N_SYNC_PPP 14 | ||
85 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
86 | |||
87 | #ifdef __KERNEL__ | 69 | #ifdef __KERNEL__ |
88 | /* eof=^D eol=\0 eol2=\0 erase=del | 70 | /* eof=^D eol=\0 eol2=\0 erase=del |
89 | werase=^W kill=^U reprint=^R sxtc=\0 | 71 | werase=^W kill=^U reprint=^R sxtc=\0 |
diff --git a/include/asm-arm/arch-at91rm9200/gpio.h b/include/asm-arm/arch-at91rm9200/gpio.h index a011d27876..e09d6528fa 100644 --- a/include/asm-arm/arch-at91rm9200/gpio.h +++ b/include/asm-arm/arch-at91rm9200/gpio.h | |||
@@ -179,6 +179,7 @@ | |||
179 | 179 | ||
180 | #ifndef __ASSEMBLY__ | 180 | #ifndef __ASSEMBLY__ |
181 | /* setup setup routines, called from board init or driver probe() */ | 181 | /* setup setup routines, called from board init or driver probe() */ |
182 | extern int __init_or_module at91_set_GPIO_periph(unsigned pin, int use_pullup); | ||
182 | extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup); | 183 | extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup); |
183 | extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup); | 184 | extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup); |
184 | extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup); | 185 | extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup); |
@@ -193,7 +194,50 @@ extern int at91_get_gpio_value(unsigned pin); | |||
193 | /* callable only from core power-management code */ | 194 | /* callable only from core power-management code */ |
194 | extern void at91_gpio_suspend(void); | 195 | extern void at91_gpio_suspend(void); |
195 | extern void at91_gpio_resume(void); | 196 | extern void at91_gpio_resume(void); |
196 | #endif | ||
197 | 197 | ||
198 | #endif | 198 | /*-------------------------------------------------------------------------*/ |
199 | |||
200 | /* wrappers for "new style" GPIO calls. the old AT91-specfic ones should | ||
201 | * eventually be removed (along with this errno.h inclusion), and the | ||
202 | * gpio request/free calls should probably be implemented. | ||
203 | */ | ||
204 | |||
205 | #include <asm/errno.h> | ||
206 | |||
207 | static inline int gpio_request(unsigned gpio, const char *label) | ||
208 | { | ||
209 | return 0; | ||
210 | } | ||
211 | |||
212 | static inline void gpio_free(unsigned gpio) | ||
213 | { | ||
214 | } | ||
215 | |||
216 | extern int gpio_direction_input(unsigned gpio); | ||
217 | extern int gpio_direction_output(unsigned gpio); | ||
199 | 218 | ||
219 | static inline int gpio_get_value(unsigned gpio) | ||
220 | { | ||
221 | return at91_get_gpio_value(gpio); | ||
222 | } | ||
223 | |||
224 | static inline void gpio_set_value(unsigned gpio, int value) | ||
225 | { | ||
226 | at91_set_gpio_value(gpio, value); | ||
227 | } | ||
228 | |||
229 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
230 | |||
231 | static inline int gpio_to_irq(unsigned gpio) | ||
232 | { | ||
233 | return gpio; | ||
234 | } | ||
235 | |||
236 | static inline int irq_to_gpio(unsigned irq) | ||
237 | { | ||
238 | return irq; | ||
239 | } | ||
240 | |||
241 | #endif /* __ASSEMBLY__ */ | ||
242 | |||
243 | #endif | ||
diff --git a/include/asm-arm/arch-imx/spi_imx.h b/include/asm-arm/arch-imx/spi_imx.h new file mode 100644 index 0000000000..2165449e97 --- /dev/null +++ b/include/asm-arm/arch-imx/spi_imx.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-imx/spi_imx.h | ||
3 | * | ||
4 | * Copyright (C) 2006 SWAPP | ||
5 | * Andrea Paterniani <a.paterniani@swapp-eng.it> | ||
6 | * | ||
7 | * Initial version inspired by: | ||
8 | * linux-2.6.17-rc3-mm1/include/asm-arm/arch-pxa/pxa2xx_spi.h | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
23 | */ | ||
24 | |||
25 | #ifndef SPI_IMX_H_ | ||
26 | #define SPI_IMX_H_ | ||
27 | |||
28 | |||
29 | /*-------------------------------------------------------------------------*/ | ||
30 | /** | ||
31 | * struct spi_imx_master - device.platform_data for SPI controller devices. | ||
32 | * @num_chipselect: chipselects are used to distinguish individual | ||
33 | * SPI slaves, and are numbered from zero to num_chipselects - 1. | ||
34 | * each slave has a chipselect signal, but it's common that not | ||
35 | * every chipselect is connected to a slave. | ||
36 | * @enable_dma: if true enables DMA driven transfers. | ||
37 | */ | ||
38 | struct spi_imx_master { | ||
39 | u8 num_chipselect; | ||
40 | u8 enable_dma:1; | ||
41 | }; | ||
42 | /*-------------------------------------------------------------------------*/ | ||
43 | |||
44 | |||
45 | /*-------------------------------------------------------------------------*/ | ||
46 | /** | ||
47 | * struct spi_imx_chip - spi_board_info.controller_data for SPI | ||
48 | * slave devices, copied to spi_device.controller_data. | ||
49 | * @enable_loopback : used for test purpouse to internally connect RX and TX | ||
50 | * sections. | ||
51 | * @enable_dma : enables dma transfer (provided that controller driver has | ||
52 | * dma enabled too). | ||
53 | * @ins_ss_pulse : enable /SS pulse insertion between SPI burst. | ||
54 | * @bclk_wait : number of bclk waits between each bits_per_word SPI burst. | ||
55 | * @cs_control : function pointer to board-specific function to assert/deassert | ||
56 | * I/O port to control HW generation of devices chip-select. | ||
57 | */ | ||
58 | struct spi_imx_chip { | ||
59 | u8 enable_loopback:1; | ||
60 | u8 enable_dma:1; | ||
61 | u8 ins_ss_pulse:1; | ||
62 | u16 bclk_wait:15; | ||
63 | void (*cs_control)(u32 control); | ||
64 | }; | ||
65 | |||
66 | /* Chip-select state */ | ||
67 | #define SPI_CS_ASSERT (1 << 0) | ||
68 | #define SPI_CS_DEASSERT (1 << 1) | ||
69 | /*-------------------------------------------------------------------------*/ | ||
70 | |||
71 | |||
72 | #endif /* SPI_IMX_H_*/ | ||
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index 0d517267fb..b7b5414d93 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
@@ -238,9 +238,6 @@ __ixp4xx_readsl(const volatile void __iomem *bus_addr, u32 *vaddr, u32 count) | |||
238 | #define memcpy_fromio(a,c,l) _memcpy_fromio((a),(c),(l)) | 238 | #define memcpy_fromio(a,c,l) _memcpy_fromio((a),(c),(l)) |
239 | #define memcpy_toio(c,a,l) _memcpy_toio((c),(a),(l)) | 239 | #define memcpy_toio(c,a,l) _memcpy_toio((c),(a),(l)) |
240 | 240 | ||
241 | #define eth_io_copy_and_sum(s,c,l,b) \ | ||
242 | eth_copy_and_sum((s),__mem_pci(c),(l),(b)) | ||
243 | |||
244 | static inline int | 241 | static inline int |
245 | check_signature(const unsigned char __iomem *bus_addr, const unsigned char *signature, | 242 | check_signature(const unsigned char __iomem *bus_addr, const unsigned char *signature, |
246 | int length) | 243 | int length) |
diff --git a/include/asm-arm/arch-omap/gpio.h b/include/asm-arm/arch-omap/gpio.h index f486b72070..3762a6ae6a 100644 --- a/include/asm-arm/arch-omap/gpio.h +++ b/include/asm-arm/arch-omap/gpio.h | |||
@@ -76,4 +76,70 @@ extern void omap_set_gpio_direction(int gpio, int is_input); | |||
76 | extern void omap_set_gpio_dataout(int gpio, int enable); | 76 | extern void omap_set_gpio_dataout(int gpio, int enable); |
77 | extern int omap_get_gpio_datain(int gpio); | 77 | extern int omap_get_gpio_datain(int gpio); |
78 | 78 | ||
79 | /*-------------------------------------------------------------------------*/ | ||
80 | |||
81 | /* wrappers for "new style" GPIO calls. the old OMAP-specfic ones should | ||
82 | * eventually be removed (along with this errno.h inclusion), and maybe | ||
83 | * gpios should put MPUIOs last too. | ||
84 | */ | ||
85 | |||
86 | #include <asm/errno.h> | ||
87 | |||
88 | static inline int gpio_request(unsigned gpio, const char *label) | ||
89 | { | ||
90 | return omap_request_gpio(gpio); | ||
91 | } | ||
92 | |||
93 | static inline void gpio_free(unsigned gpio) | ||
94 | { | ||
95 | omap_free_gpio(gpio); | ||
96 | } | ||
97 | |||
98 | static inline int __gpio_set_direction(unsigned gpio, int is_input) | ||
99 | { | ||
100 | if (cpu_class_is_omap2()) { | ||
101 | if (gpio > OMAP_MAX_GPIO_LINES) | ||
102 | return -EINVAL; | ||
103 | } else { | ||
104 | if (gpio > (OMAP_MAX_GPIO_LINES + 16 /* MPUIO */)) | ||
105 | return -EINVAL; | ||
106 | } | ||
107 | omap_set_gpio_direction(gpio, is_input); | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static inline int gpio_direction_input(unsigned gpio) | ||
112 | { | ||
113 | return __gpio_set_direction(gpio, 1); | ||
114 | } | ||
115 | |||
116 | static inline int gpio_direction_output(unsigned gpio) | ||
117 | { | ||
118 | return __gpio_set_direction(gpio, 0); | ||
119 | } | ||
120 | |||
121 | static inline int gpio_get_value(unsigned gpio) | ||
122 | { | ||
123 | return omap_get_gpio_datain(gpio); | ||
124 | } | ||
125 | |||
126 | static inline void gpio_set_value(unsigned gpio, int value) | ||
127 | { | ||
128 | omap_set_gpio_dataout(gpio, value); | ||
129 | } | ||
130 | |||
131 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
132 | |||
133 | static inline int gpio_to_irq(unsigned gpio) | ||
134 | { | ||
135 | return OMAP_GPIO_IRQ(gpio); | ||
136 | } | ||
137 | |||
138 | static inline int irq_to_gpio(unsigned irq) | ||
139 | { | ||
140 | if (cpu_class_is_omap1() && (irq < (IH_MPUIO_BASE + 16))) | ||
141 | return (irq - IH_MPUIO_BASE) + OMAP_MAX_GPIO_LINES; | ||
142 | return irq - IH_GPIO_BASE; | ||
143 | } | ||
144 | |||
79 | #endif | 145 | #endif |
diff --git a/include/asm-arm/arch-pxa/gpio.h b/include/asm-arm/arch-pxa/gpio.h new file mode 100644 index 0000000000..e67c238210 --- /dev/null +++ b/include/asm-arm/arch-pxa/gpio.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pxa/gpio.h | ||
3 | * | ||
4 | * PXA GPIO wrappers for arch-neutral GPIO calls | ||
5 | * | ||
6 | * Written by Philipp Zabel <philipp.zabel@gmail.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #ifndef __ASM_ARCH_PXA_GPIO_H | ||
25 | #define __ASM_ARCH_PXA_GPIO_H | ||
26 | |||
27 | #include <asm/arch/pxa-regs.h> | ||
28 | #include <asm/arch/irqs.h> | ||
29 | #include <asm/arch/hardware.h> | ||
30 | |||
31 | #include <asm/errno.h> | ||
32 | |||
33 | static inline int gpio_request(unsigned gpio, const char *label) | ||
34 | { | ||
35 | return 0; | ||
36 | } | ||
37 | |||
38 | static inline void gpio_free(unsigned gpio) | ||
39 | { | ||
40 | return; | ||
41 | } | ||
42 | |||
43 | static inline int gpio_direction_input(unsigned gpio) | ||
44 | { | ||
45 | if (gpio > PXA_LAST_GPIO) | ||
46 | return -EINVAL; | ||
47 | pxa_gpio_mode(gpio | GPIO_IN); | ||
48 | } | ||
49 | |||
50 | static inline int gpio_direction_output(unsigned gpio) | ||
51 | { | ||
52 | if (gpio > PXA_LAST_GPIO) | ||
53 | return -EINVAL; | ||
54 | pxa_gpio_mode(gpio | GPIO_OUT); | ||
55 | } | ||
56 | |||
57 | /* REVISIT these macros are correct, but suffer code explosion | ||
58 | * for non-constant parameters. Provide out-line versions too. | ||
59 | */ | ||
60 | #define gpio_get_value(gpio) \ | ||
61 | (GPLR(gpio) & GPIO_bit(gpio)) | ||
62 | |||
63 | #define gpio_set_value(gpio,value) \ | ||
64 | ((value) ? (GPSR(gpio) = GPIO_bit(gpio)):(GPCR(gpio) = GPIO_bit(gpio))) | ||
65 | |||
66 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
67 | |||
68 | #define gpio_to_irq(gpio) IRQ_GPIO(gpio) | ||
69 | #define irq_to_gpio(irq) IRQ_TO_GPIO(irq) | ||
70 | |||
71 | |||
72 | #endif | ||
diff --git a/include/asm-arm/arch-s3c2410/gpio.h b/include/asm-arm/arch-s3c2410/gpio.h new file mode 100644 index 0000000000..67b8b9ab22 --- /dev/null +++ b/include/asm-arm/arch-s3c2410/gpio.h | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pxa/gpio.h | ||
3 | * | ||
4 | * S3C2400 GPIO wrappers for arch-neutral GPIO calls | ||
5 | * | ||
6 | * Written by Philipp Zabel <philipp.zabel@gmail.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #ifndef __ASM_ARCH_PXA_GPIO_H | ||
25 | #define __ASM_ARCH_PXA_GPIO_H | ||
26 | |||
27 | #include <asm/arch/pxa-regs.h> | ||
28 | #include <asm/arch/irqs.h> | ||
29 | #include <asm/arch/hardware.h> | ||
30 | |||
31 | #include <asm/errno.h> | ||
32 | |||
33 | static inline int gpio_request(unsigned gpio, const char *label) | ||
34 | { | ||
35 | return 0; | ||
36 | } | ||
37 | |||
38 | static inline void gpio_free(unsigned gpio) | ||
39 | { | ||
40 | return; | ||
41 | } | ||
42 | |||
43 | static inline int gpio_direction_input(unsigned gpio) | ||
44 | { | ||
45 | s3c2410_gpio_cfgpin(gpio, S3C2410_GPIO_INPUT); | ||
46 | return 0; | ||
47 | } | ||
48 | |||
49 | static inline int gpio_direction_output(unsigned gpio) | ||
50 | { | ||
51 | s3c2410_gpio_cfgpin(gpio, S3C2410_GPIO_OUTPUT); | ||
52 | return 0; | ||
53 | } | ||
54 | |||
55 | #define gpio_get_value(gpio) s3c2410_gpio_getpin(gpio) | ||
56 | #define gpio_set_value(gpio,value) s3c2410_gpio_setpin(gpio, value) | ||
57 | |||
58 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
59 | |||
60 | /* FIXME or maybe s3c2400_gpio_getirq() ... */ | ||
61 | #define gpio_to_irq(gpio) s3c2410_gpio_getirq(gpio) | ||
62 | |||
63 | /* FIXME implement irq_to_gpio() */ | ||
64 | |||
65 | #endif | ||
diff --git a/include/asm-arm/arch-sa1100/gpio.h b/include/asm-arm/arch-sa1100/gpio.h new file mode 100644 index 0000000000..a331fe3f6e --- /dev/null +++ b/include/asm-arm/arch-sa1100/gpio.h | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pxa/gpio.h | ||
3 | * | ||
4 | * SA1100 GPIO wrappers for arch-neutral GPIO calls | ||
5 | * | ||
6 | * Written by Philipp Zabel <philipp.zabel@gmail.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #ifndef __ASM_ARCH_SA1100_GPIO_H | ||
25 | #define __ASM_ARCH_SA1100_GPIO_H | ||
26 | |||
27 | #include <asm/arch/SA-1100.h> | ||
28 | #include <asm/arch/irqs.h> | ||
29 | #include <asm/arch/hardware.h> | ||
30 | |||
31 | #include <asm/errno.h> | ||
32 | |||
33 | static inline int gpio_request(unsigned gpio, const char *label) | ||
34 | { | ||
35 | return 0; | ||
36 | } | ||
37 | |||
38 | static inline void gpio_free(unsigned gpio) | ||
39 | { | ||
40 | return; | ||
41 | } | ||
42 | |||
43 | static inline int gpio_direction_input(unsigned gpio) | ||
44 | { | ||
45 | if (gpio > GPIO_MAX) | ||
46 | return -EINVAL; | ||
47 | GPDR = (GPDR_In << gpio) 0 | ||
48 | } | ||
49 | |||
50 | static inline int gpio_direction_output(unsigned gpio) | ||
51 | { | ||
52 | if (gpio > GPIO_MAX) | ||
53 | return -EINVAL; | ||
54 | GPDR = (GPDR_Out << gpio) 0 | ||
55 | } | ||
56 | |||
57 | #define gpio_get_value(gpio) \ | ||
58 | (GPLR & GPIO_GPIO(gpio)) | ||
59 | |||
60 | #define gpio_set_value(gpio,value) \ | ||
61 | ((value) ? (GPSR = GPIO_GPIO(gpio)) : (GPCR(gpio) = GPIO_GPIO(gpio))) | ||
62 | |||
63 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
64 | |||
65 | static inline unsigned gpio_to_irq(unsigned gpio) | ||
66 | { | ||
67 | if (gpio < 11) | ||
68 | return IRQ_GPIO0 + gpio; | ||
69 | else | ||
70 | return IRQ_GPIO11 - 11 + gpio; | ||
71 | } | ||
72 | |||
73 | static inline unsigned irq_to_gpio(unsigned irq) | ||
74 | { | ||
75 | if (irq < IRQ_GPIO11_27) | ||
76 | return irq - IRQ_GPIO0; | ||
77 | else | ||
78 | return irq - IRQ_GPIO11 + 11; | ||
79 | } | ||
80 | |||
81 | #endif | ||
diff --git a/include/asm-arm/gpio.h b/include/asm-arm/gpio.h new file mode 100644 index 0000000000..fff4f800ee --- /dev/null +++ b/include/asm-arm/gpio.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef _ARCH_ARM_GPIO_H | ||
2 | #define _ARCH_ARM_GPIO_H | ||
3 | |||
4 | /* not all ARM platforms necessarily support this API ... */ | ||
5 | #include <asm/arch/gpio.h> | ||
6 | |||
7 | #endif /* _ARCH_ARM_GPIO_H */ | ||
diff --git a/include/asm-arm/hardware/gpio_keys.h b/include/asm-arm/hardware/gpio_keys.h new file mode 100644 index 0000000000..2b217c7b93 --- /dev/null +++ b/include/asm-arm/hardware/gpio_keys.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef _GPIO_KEYS_H | ||
2 | #define _GPIO_KEYS_H | ||
3 | |||
4 | struct gpio_keys_button { | ||
5 | /* Configuration parameters */ | ||
6 | int keycode; | ||
7 | int gpio; | ||
8 | int active_low; | ||
9 | char *desc; | ||
10 | }; | ||
11 | |||
12 | struct gpio_keys_platform_data { | ||
13 | struct gpio_keys_button *buttons; | ||
14 | int nbuttons; | ||
15 | }; | ||
16 | |||
17 | #endif | ||
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index 288f76b166..5f60b42209 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h | |||
@@ -182,9 +182,6 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
182 | #define memcpy_fromio(a,c,l) _memcpy_fromio((a),__mem_pci(c),(l)) | 182 | #define memcpy_fromio(a,c,l) _memcpy_fromio((a),__mem_pci(c),(l)) |
183 | #define memcpy_toio(c,a,l) _memcpy_toio(__mem_pci(c),(a),(l)) | 183 | #define memcpy_toio(c,a,l) _memcpy_toio(__mem_pci(c),(a),(l)) |
184 | 184 | ||
185 | #define eth_io_copy_and_sum(s,c,l,b) \ | ||
186 | eth_copy_and_sum((s),__mem_pci(c),(l),(b)) | ||
187 | |||
188 | #elif !defined(readb) | 185 | #elif !defined(readb) |
189 | 186 | ||
190 | #define readb(c) (__readwrite_bug("readb"),0) | 187 | #define readb(c) (__readwrite_bug("readb"),0) |
@@ -194,8 +191,6 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
194 | #define writew(v,c) __readwrite_bug("writew") | 191 | #define writew(v,c) __readwrite_bug("writew") |
195 | #define writel(v,c) __readwrite_bug("writel") | 192 | #define writel(v,c) __readwrite_bug("writel") |
196 | 193 | ||
197 | #define eth_io_copy_and_sum(s,c,l,b) __readwrite_bug("eth_io_copy_and_sum") | ||
198 | |||
199 | #define check_signature(io,sig,len) (0) | 194 | #define check_signature(io,sig,len) (0) |
200 | 195 | ||
201 | #endif /* __mem_pci */ | 196 | #endif /* __mem_pci */ |
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index 861092fbaa..800ba5254d 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h | |||
@@ -85,7 +85,6 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) | |||
85 | * Write locks are easy - we just set bit 31. When unlocking, we can | 85 | * Write locks are easy - we just set bit 31. When unlocking, we can |
86 | * just write zero since the lock is exclusively held. | 86 | * just write zero since the lock is exclusively held. |
87 | */ | 87 | */ |
88 | #define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0) | ||
89 | 88 | ||
90 | static inline void __raw_write_lock(raw_rwlock_t *rw) | 89 | static inline void __raw_write_lock(raw_rwlock_t *rw) |
91 | { | 90 | { |
diff --git a/include/asm-arm/termios.h b/include/asm-arm/termios.h index 7b8f5e8ae0..329c324c40 100644 --- a/include/asm-arm/termios.h +++ b/include/asm-arm/termios.h | |||
@@ -49,24 +49,6 @@ struct termio { | |||
49 | 49 | ||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
51 | 51 | ||
52 | /* line disciplines */ | ||
53 | #define N_TTY 0 | ||
54 | #define N_SLIP 1 | ||
55 | #define N_MOUSE 2 | ||
56 | #define N_PPP 3 | ||
57 | #define N_STRIP 4 | ||
58 | #define N_AX25 5 | ||
59 | #define N_X25 6 /* X.25 async */ | ||
60 | #define N_6PACK 7 | ||
61 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
62 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
63 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
64 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
65 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
66 | #define N_HDLC 13 /* synchronous HDLC */ | ||
67 | #define N_SYNC_PPP 14 | ||
68 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
69 | |||
70 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
71 | 53 | ||
72 | /* | 54 | /* |
diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h index 5f420a0149..c92df95880 100644 --- a/include/asm-arm/uaccess.h +++ b/include/asm-arm/uaccess.h | |||
@@ -76,10 +76,10 @@ static inline void set_fs(mm_segment_t fs) | |||
76 | 76 | ||
77 | /* We use 33-bit arithmetic here... */ | 77 | /* We use 33-bit arithmetic here... */ |
78 | #define __range_ok(addr,size) ({ \ | 78 | #define __range_ok(addr,size) ({ \ |
79 | unsigned long flag, sum; \ | 79 | unsigned long flag, roksum; \ |
80 | __chk_user_ptr(addr); \ | 80 | __chk_user_ptr(addr); \ |
81 | __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ | 81 | __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ |
82 | : "=&r" (flag), "=&r" (sum) \ | 82 | : "=&r" (flag), "=&r" (roksum) \ |
83 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ | 83 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ |
84 | : "cc"); \ | 84 | : "cc"); \ |
85 | flag; }) | 85 | flag; }) |
diff --git a/include/asm-arm26/termios.h b/include/asm-arm26/termios.h index 7b8f5e8ae0..329c324c40 100644 --- a/include/asm-arm26/termios.h +++ b/include/asm-arm26/termios.h | |||
@@ -49,24 +49,6 @@ struct termio { | |||
49 | 49 | ||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
51 | 51 | ||
52 | /* line disciplines */ | ||
53 | #define N_TTY 0 | ||
54 | #define N_SLIP 1 | ||
55 | #define N_MOUSE 2 | ||
56 | #define N_PPP 3 | ||
57 | #define N_STRIP 4 | ||
58 | #define N_AX25 5 | ||
59 | #define N_X25 6 /* X.25 async */ | ||
60 | #define N_6PACK 7 | ||
61 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
62 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
63 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
64 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
65 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
66 | #define N_HDLC 13 /* synchronous HDLC */ | ||
67 | #define N_SYNC_PPP 14 | ||
68 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
69 | |||
70 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
71 | 53 | ||
72 | /* | 54 | /* |
diff --git a/include/asm-arm26/uaccess-asm.h b/include/asm-arm26/uaccess-asm.h index 19f798e338..ade76ec029 100644 --- a/include/asm-arm26/uaccess-asm.h +++ b/include/asm-arm26/uaccess-asm.h | |||
@@ -34,9 +34,9 @@ static inline void set_fs (mm_segment_t fs) | |||
34 | } | 34 | } |
35 | 35 | ||
36 | #define __range_ok(addr,size) ({ \ | 36 | #define __range_ok(addr,size) ({ \ |
37 | unsigned long flag, sum; \ | 37 | unsigned long flag, roksum; \ |
38 | __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \ | 38 | __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \ |
39 | : "=&r" (flag), "=&r" (sum) \ | 39 | : "=&r" (flag), "=&r" (roksum) \ |
40 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ | 40 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ |
41 | : "cc"); \ | 41 | : "cc"); \ |
42 | flag; }) | 42 | flag; }) |
diff --git a/include/asm-avr32/arch-at32ap/at32ap7000.h b/include/asm-avr32/arch-at32ap/at32ap7000.h index ba85e04553..3914d7b94f 100644 --- a/include/asm-avr32/arch-at32ap/at32ap7000.h +++ b/include/asm-avr32/arch-at32ap/at32ap7000.h | |||
@@ -24,10 +24,12 @@ | |||
24 | #define GPIO_PIOB_BASE (GPIO_PIOA_BASE + 32) | 24 | #define GPIO_PIOB_BASE (GPIO_PIOA_BASE + 32) |
25 | #define GPIO_PIOC_BASE (GPIO_PIOB_BASE + 32) | 25 | #define GPIO_PIOC_BASE (GPIO_PIOB_BASE + 32) |
26 | #define GPIO_PIOD_BASE (GPIO_PIOC_BASE + 32) | 26 | #define GPIO_PIOD_BASE (GPIO_PIOC_BASE + 32) |
27 | #define GPIO_PIOE_BASE (GPIO_PIOD_BASE + 32) | ||
27 | 28 | ||
28 | #define GPIO_PIN_PA(N) (GPIO_PIOA_BASE + (N)) | 29 | #define GPIO_PIN_PA(N) (GPIO_PIOA_BASE + (N)) |
29 | #define GPIO_PIN_PB(N) (GPIO_PIOB_BASE + (N)) | 30 | #define GPIO_PIN_PB(N) (GPIO_PIOB_BASE + (N)) |
30 | #define GPIO_PIN_PC(N) (GPIO_PIOC_BASE + (N)) | 31 | #define GPIO_PIN_PC(N) (GPIO_PIOC_BASE + (N)) |
31 | #define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N)) | 32 | #define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N)) |
33 | #define GPIO_PIN_PE(N) (GPIO_PIOE_BASE + (N)) | ||
32 | 34 | ||
33 | #endif /* __ASM_ARCH_AT32AP7000_H__ */ | 35 | #endif /* __ASM_ARCH_AT32AP7000_H__ */ |
diff --git a/include/asm-avr32/arch-at32ap/gpio.h b/include/asm-avr32/arch-at32ap/gpio.h new file mode 100644 index 0000000000..fcb756bdaa --- /dev/null +++ b/include/asm-avr32/arch-at32ap/gpio.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef __ASM_AVR32_ARCH_GPIO_H | ||
2 | #define __ASM_AVR32_ARCH_GPIO_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | #include <asm/irq.h> | ||
6 | |||
7 | |||
8 | /* Arch-neutral GPIO API */ | ||
9 | int __must_check gpio_request(unsigned int gpio, const char *label); | ||
10 | void gpio_free(unsigned int gpio); | ||
11 | |||
12 | int gpio_direction_input(unsigned int gpio); | ||
13 | int gpio_direction_output(unsigned int gpio); | ||
14 | int gpio_get_value(unsigned int gpio); | ||
15 | void gpio_set_value(unsigned int gpio, int value); | ||
16 | |||
17 | static inline int gpio_to_irq(unsigned int gpio) | ||
18 | { | ||
19 | return gpio + GPIO_IRQ_BASE; | ||
20 | } | ||
21 | |||
22 | static inline int irq_to_gpio(unsigned int irq) | ||
23 | { | ||
24 | return irq - GPIO_IRQ_BASE; | ||
25 | } | ||
26 | |||
27 | #endif /* __ASM_AVR32_ARCH_GPIO_H */ | ||
diff --git a/include/asm-avr32/arch-at32ap/irq.h b/include/asm-avr32/arch-at32ap/irq.h new file mode 100644 index 0000000000..5adffab9a5 --- /dev/null +++ b/include/asm-avr32/arch-at32ap/irq.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef __ASM_AVR32_ARCH_IRQ_H | ||
2 | #define __ASM_AVR32_ARCH_IRQ_H | ||
3 | |||
4 | #define EIM_IRQ_BASE NR_INTERNAL_IRQS | ||
5 | #define NR_EIM_IRQS 32 | ||
6 | |||
7 | #define AT32_EXTINT(n) (EIM_IRQ_BASE + (n)) | ||
8 | |||
9 | #define GPIO_IRQ_BASE (EIM_IRQ_BASE + NR_EIM_IRQS) | ||
10 | #define NR_GPIO_IRQS (5 * 32) | ||
11 | |||
12 | #define NR_IRQS (GPIO_IRQ_BASE + NR_GPIO_IRQS) | ||
13 | |||
14 | #endif /* __ASM_AVR32_ARCH_IRQ_H */ | ||
diff --git a/include/asm-avr32/arch-at32ap/portmux.h b/include/asm-avr32/arch-at32ap/portmux.h index 83c6905713..9930871dec 100644 --- a/include/asm-avr32/arch-at32ap/portmux.h +++ b/include/asm-avr32/arch-at32ap/portmux.h | |||
@@ -15,12 +15,14 @@ | |||
15 | * | 15 | * |
16 | * The following flags determine the initial state of the pin. | 16 | * The following flags determine the initial state of the pin. |
17 | */ | 17 | */ |
18 | #define AT32_GPIOF_PULLUP 0x00000001 /* Enable pull-up */ | 18 | #define AT32_GPIOF_PULLUP 0x00000001 /* (not-OUT) Enable pull-up */ |
19 | #define AT32_GPIOF_OUTPUT 0x00000002 /* Enable output driver */ | 19 | #define AT32_GPIOF_OUTPUT 0x00000002 /* (OUT) Enable output driver */ |
20 | #define AT32_GPIOF_HIGH 0x00000004 /* Set output high */ | 20 | #define AT32_GPIOF_HIGH 0x00000004 /* (OUT) Set output high */ |
21 | #define AT32_GPIOF_DEGLITCH 0x00000008 /* (IN) Filter glitches */ | ||
21 | 22 | ||
22 | void at32_select_periph(unsigned int pin, unsigned int periph, | 23 | void at32_select_periph(unsigned int pin, unsigned int periph, |
23 | unsigned long flags); | 24 | unsigned long flags); |
24 | void at32_select_gpio(unsigned int pin, unsigned long flags); | 25 | void at32_select_gpio(unsigned int pin, unsigned long flags); |
26 | void at32_reserve_pin(unsigned int pin); | ||
25 | 27 | ||
26 | #endif /* __ASM_ARCH_PORTMUX_H__ */ | 28 | #endif /* __ASM_ARCH_PORTMUX_H__ */ |
diff --git a/include/asm-avr32/checksum.h b/include/asm-avr32/checksum.h index af9d53f0f5..4ddbfd2486 100644 --- a/include/asm-avr32/checksum.h +++ b/include/asm-avr32/checksum.h | |||
@@ -38,7 +38,7 @@ __wsum csum_partial_copy_generic(const void *src, void *dst, int len, | |||
38 | * passed in an incorrect kernel address to one of these functions. | 38 | * passed in an incorrect kernel address to one of these functions. |
39 | * | 39 | * |
40 | * If you use these functions directly please don't forget the | 40 | * If you use these functions directly please don't forget the |
41 | * verify_area(). | 41 | * access_ok(). |
42 | */ | 42 | */ |
43 | static inline | 43 | static inline |
44 | __wsum csum_partial_copy_nocheck(const void *src, void *dst, | 44 | __wsum csum_partial_copy_nocheck(const void *src, void *dst, |
diff --git a/include/asm-avr32/dma-mapping.h b/include/asm-avr32/dma-mapping.h index 5c01e27f0b..115813e48f 100644 --- a/include/asm-avr32/dma-mapping.h +++ b/include/asm-avr32/dma-mapping.h | |||
@@ -32,6 +32,14 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask) | |||
32 | return 0; | 32 | return 0; |
33 | } | 33 | } |
34 | 34 | ||
35 | /* | ||
36 | * dma_map_single can't fail as it is implemented now. | ||
37 | */ | ||
38 | static inline int dma_mapping_error(dma_addr_t addr) | ||
39 | { | ||
40 | return 0; | ||
41 | } | ||
42 | |||
35 | /** | 43 | /** |
36 | * dma_alloc_coherent - allocate consistent memory for DMA | 44 | * dma_alloc_coherent - allocate consistent memory for DMA |
37 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices | 45 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices |
diff --git a/include/asm-avr32/gpio.h b/include/asm-avr32/gpio.h new file mode 100644 index 0000000000..19e8ccc77d --- /dev/null +++ b/include/asm-avr32/gpio.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_AVR32_GPIO_H | ||
2 | #define __ASM_AVR32_GPIO_H | ||
3 | |||
4 | #include <asm/arch/gpio.h> | ||
5 | |||
6 | #endif /* __ASM_AVR32_GPIO_H */ | ||
diff --git a/include/asm-avr32/irq.h b/include/asm-avr32/irq.h index f7e725707d..83e6549d77 100644 --- a/include/asm-avr32/irq.h +++ b/include/asm-avr32/irq.h | |||
@@ -2,8 +2,12 @@ | |||
2 | #define __ASM_AVR32_IRQ_H | 2 | #define __ASM_AVR32_IRQ_H |
3 | 3 | ||
4 | #define NR_INTERNAL_IRQS 64 | 4 | #define NR_INTERNAL_IRQS 64 |
5 | #define NR_EXTERNAL_IRQS 64 | 5 | |
6 | #define NR_IRQS (NR_INTERNAL_IRQS + NR_EXTERNAL_IRQS) | 6 | #include <asm/arch/irq.h> |
7 | |||
8 | #ifndef NR_IRQS | ||
9 | #define NR_IRQS (NR_INTERNAL_IRQS) | ||
10 | #endif | ||
7 | 11 | ||
8 | #define irq_canonicalize(i) (i) | 12 | #define irq_canonicalize(i) (i) |
9 | 13 | ||
diff --git a/include/asm-avr32/posix_types.h b/include/asm-avr32/posix_types.h index 2831b039b3..9e255b9996 100644 --- a/include/asm-avr32/posix_types.h +++ b/include/asm-avr32/posix_types.h | |||
@@ -23,7 +23,7 @@ typedef unsigned short __kernel_ipc_pid_t; | |||
23 | typedef unsigned int __kernel_uid_t; | 23 | typedef unsigned int __kernel_uid_t; |
24 | typedef unsigned int __kernel_gid_t; | 24 | typedef unsigned int __kernel_gid_t; |
25 | typedef unsigned long __kernel_size_t; | 25 | typedef unsigned long __kernel_size_t; |
26 | typedef int __kernel_ssize_t; | 26 | typedef long __kernel_ssize_t; |
27 | typedef int __kernel_ptrdiff_t; | 27 | typedef int __kernel_ptrdiff_t; |
28 | typedef long __kernel_time_t; | 28 | typedef long __kernel_time_t; |
29 | typedef long __kernel_suseconds_t; | 29 | typedef long __kernel_suseconds_t; |
diff --git a/include/asm-avr32/termios.h b/include/asm-avr32/termios.h index 615bc0639e..0152aba351 100644 --- a/include/asm-avr32/termios.h +++ b/include/asm-avr32/termios.h | |||
@@ -46,24 +46,6 @@ struct termio { | |||
46 | 46 | ||
47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
48 | 48 | ||
49 | /* line disciplines */ | ||
50 | #define N_TTY 0 | ||
51 | #define N_SLIP 1 | ||
52 | #define N_MOUSE 2 | ||
53 | #define N_PPP 3 | ||
54 | #define N_STRIP 4 | ||
55 | #define N_AX25 5 | ||
56 | #define N_X25 6 /* X.25 async */ | ||
57 | #define N_6PACK 7 | ||
58 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
59 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
60 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
61 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
62 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
63 | #define N_HDLC 13 /* synchronous HDLC */ | ||
64 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
65 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
66 | |||
67 | #ifdef __KERNEL__ | 49 | #ifdef __KERNEL__ |
68 | /* intr=^C quit=^\ erase=del kill=^U | 50 | /* intr=^C quit=^\ erase=del kill=^U |
69 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | 51 | eof=^D vtime=\0 vmin=\1 sxtc=\0 |
diff --git a/include/asm-avr32/uaccess.h b/include/asm-avr32/uaccess.h index 821deb5a9d..74a679e909 100644 --- a/include/asm-avr32/uaccess.h +++ b/include/asm-avr32/uaccess.h | |||
@@ -68,12 +68,6 @@ static inline void set_fs(mm_segment_t s) | |||
68 | 68 | ||
69 | #define access_ok(type, addr, size) (likely(__range_ok(addr, size) == 0)) | 69 | #define access_ok(type, addr, size) (likely(__range_ok(addr, size) == 0)) |
70 | 70 | ||
71 | static inline int | ||
72 | verify_area(int type, const void __user *addr, unsigned long size) | ||
73 | { | ||
74 | return access_ok(type, addr, size) ? 0 : -EFAULT; | ||
75 | } | ||
76 | |||
77 | /* Generic arbitrary sized copy. Return the number of bytes NOT copied */ | 71 | /* Generic arbitrary sized copy. Return the number of bytes NOT copied */ |
78 | extern __kernel_size_t __copy_user(void *to, const void *from, | 72 | extern __kernel_size_t __copy_user(void *to, const void *from, |
79 | __kernel_size_t n); | 73 | __kernel_size_t n); |
diff --git a/include/asm-cris/io.h b/include/asm-cris/io.h index 716c69bc58..d196dd6b2d 100644 --- a/include/asm-cris/io.h +++ b/include/asm-cris/io.h | |||
@@ -121,11 +121,6 @@ static inline void writel(unsigned int b, volatile void __iomem *addr) | |||
121 | #define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) | 121 | #define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) |
122 | #define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) | 122 | #define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) |
123 | 123 | ||
124 | /* | ||
125 | * Again, CRIS does not require mem IO specific function. | ||
126 | */ | ||
127 | |||
128 | #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(b),(c),(d)) | ||
129 | 124 | ||
130 | /* The following is junk needed for the arch-independent code but which | 125 | /* The following is junk needed for the arch-independent code but which |
131 | * we never use in the CRIS port | 126 | * we never use in the CRIS port |
diff --git a/include/asm-cris/semaphore-helper.h b/include/asm-cris/semaphore-helper.h index a8e1e6cb7c..27bfeca1b9 100644 --- a/include/asm-cris/semaphore-helper.h +++ b/include/asm-cris/semaphore-helper.h | |||
@@ -30,8 +30,7 @@ static inline int waking_non_zero(struct semaphore *sem) | |||
30 | unsigned long flags; | 30 | unsigned long flags; |
31 | int ret = 0; | 31 | int ret = 0; |
32 | 32 | ||
33 | local_save_flags(flags); | 33 | local_irq_save(flags); |
34 | local_irq_disable(); | ||
35 | if (read(&sem->waking) > 0) { | 34 | if (read(&sem->waking) > 0) { |
36 | dec(&sem->waking); | 35 | dec(&sem->waking); |
37 | ret = 1; | 36 | ret = 1; |
@@ -46,8 +45,7 @@ static inline int waking_non_zero_interruptible(struct semaphore *sem, | |||
46 | int ret = 0; | 45 | int ret = 0; |
47 | unsigned long flags; | 46 | unsigned long flags; |
48 | 47 | ||
49 | local_save_flags(flags); | 48 | local_irq_save(flags); |
50 | local_irq_disable(); | ||
51 | if (read(&sem->waking) > 0) { | 49 | if (read(&sem->waking) > 0) { |
52 | dec(&sem->waking); | 50 | dec(&sem->waking); |
53 | ret = 1; | 51 | ret = 1; |
@@ -64,8 +62,7 @@ static inline int waking_non_zero_trylock(struct semaphore *sem) | |||
64 | int ret = 1; | 62 | int ret = 1; |
65 | unsigned long flags; | 63 | unsigned long flags; |
66 | 64 | ||
67 | local_save_flags(flags); | 65 | local_irq_save(flags); |
68 | local_irq_disable(); | ||
69 | if (read(&sem->waking) <= 0) | 66 | if (read(&sem->waking) <= 0) |
70 | inc(&sem->count); | 67 | inc(&sem->count); |
71 | else { | 68 | else { |
diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h index b869f6161a..fea0e8d57c 100644 --- a/include/asm-cris/system.h +++ b/include/asm-cris/system.h | |||
@@ -44,8 +44,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
44 | /* since Etrax doesn't have any atomic xchg instructions, we need to disable | 44 | /* since Etrax doesn't have any atomic xchg instructions, we need to disable |
45 | irq's (if enabled) and do it with move.d's */ | 45 | irq's (if enabled) and do it with move.d's */ |
46 | unsigned long flags,temp; | 46 | unsigned long flags,temp; |
47 | local_save_flags(flags); /* save flags, including irq enable bit */ | 47 | local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */ |
48 | local_irq_disable(); /* shut off irq's */ | ||
49 | switch (size) { | 48 | switch (size) { |
50 | case 1: | 49 | case 1: |
51 | *((unsigned char *)&temp) = x; | 50 | *((unsigned char *)&temp) = x; |
diff --git a/include/asm-cris/termios.h b/include/asm-cris/termios.h index 5ce1023c5d..c9dbd4d433 100644 --- a/include/asm-cris/termios.h +++ b/include/asm-cris/termios.h | |||
@@ -40,24 +40,6 @@ struct termio { | |||
40 | 40 | ||
41 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 41 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
42 | 42 | ||
43 | /* line disciplines */ | ||
44 | #define N_TTY 0 | ||
45 | #define N_SLIP 1 | ||
46 | #define N_MOUSE 2 | ||
47 | #define N_PPP 3 | ||
48 | #define N_STRIP 4 | ||
49 | #define N_AX25 5 | ||
50 | #define N_X25 6 /* X.25 async */ | ||
51 | #define N_6PACK 7 | ||
52 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
53 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
54 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
55 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
56 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
57 | #define N_HDLC 13 /* synchronous HDLC */ | ||
58 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
59 | #define N_BT 15 /* bluetooth */ | ||
60 | |||
61 | #ifdef __KERNEL__ | 43 | #ifdef __KERNEL__ |
62 | 44 | ||
63 | /* intr=^C quit=^\ erase=del kill=^U | 45 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-frv/termios.h b/include/asm-frv/termios.h index 8840cf95e8..a62fb58723 100644 --- a/include/asm-frv/termios.h +++ b/include/asm-frv/termios.h | |||
@@ -51,24 +51,6 @@ struct termio { | |||
51 | 51 | ||
52 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 52 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
53 | 53 | ||
54 | /* line disciplines */ | ||
55 | #define N_TTY 0 | ||
56 | #define N_SLIP 1 | ||
57 | #define N_MOUSE 2 | ||
58 | #define N_PPP 3 | ||
59 | #define N_STRIP 4 | ||
60 | #define N_AX25 5 | ||
61 | #define N_X25 6 /* X.25 async */ | ||
62 | #define N_6PACK 7 | ||
63 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
64 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
65 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
66 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
67 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
68 | #define N_HDLC 13 /* synchronous HDLC */ | ||
69 | #define N_SYNC_PPP 14 | ||
70 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
71 | |||
72 | #ifdef __KERNEL__ | 54 | #ifdef __KERNEL__ |
73 | #include <asm-generic/termios.h> | 55 | #include <asm-generic/termios.h> |
74 | #endif | 56 | #endif |
diff --git a/include/asm-generic/dma-mapping-broken.h b/include/asm-generic/dma-mapping-broken.h index a7f1a55ce6..29413d3d46 100644 --- a/include/asm-generic/dma-mapping-broken.h +++ b/include/asm-generic/dma-mapping-broken.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | /* This is used for archs that do not support DMA */ | 4 | /* This is used for archs that do not support DMA */ |
5 | 5 | ||
6 | |||
7 | static inline void * | 6 | static inline void * |
8 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | 7 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, |
9 | gfp_t flag) | 8 | gfp_t flag) |
@@ -19,4 +18,7 @@ dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | |||
19 | BUG(); | 18 | BUG(); |
20 | } | 19 | } |
21 | 20 | ||
21 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | ||
22 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | ||
23 | |||
22 | #endif /* _ASM_GENERIC_DMA_MAPPING_H */ | 24 | #endif /* _ASM_GENERIC_DMA_MAPPING_H */ |
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h new file mode 100644 index 0000000000..2d0aab1d86 --- /dev/null +++ b/include/asm-generic/gpio.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef _ASM_GENERIC_GPIO_H | ||
2 | #define _ASM_GENERIC_GPIO_H | ||
3 | |||
4 | /* platforms that don't directly support access to GPIOs through I2C, SPI, | ||
5 | * or other blocking infrastructure can use these wrappers. | ||
6 | */ | ||
7 | |||
8 | static inline int gpio_cansleep(unsigned gpio) | ||
9 | { | ||
10 | return 0; | ||
11 | } | ||
12 | |||
13 | static inline int gpio_get_value_cansleep(unsigned gpio) | ||
14 | { | ||
15 | might_sleep(); | ||
16 | return gpio_get_value(gpio); | ||
17 | } | ||
18 | |||
19 | static inline void gpio_set_value_cansleep(unsigned gpio, int value) | ||
20 | { | ||
21 | might_sleep(); | ||
22 | gpio_set_value(gpio, value); | ||
23 | } | ||
24 | |||
25 | #endif /* _ASM_GENERIC_GPIO_H */ | ||
diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h index 8078cbd2c0..30d8d33491 100644 --- a/include/asm-generic/memory_model.h +++ b/include/asm-generic/memory_model.h | |||
@@ -54,7 +54,7 @@ | |||
54 | #define __page_to_pfn(pg) \ | 54 | #define __page_to_pfn(pg) \ |
55 | ({ struct page *__pg = (pg); \ | 55 | ({ struct page *__pg = (pg); \ |
56 | int __sec = page_to_section(__pg); \ | 56 | int __sec = page_to_section(__pg); \ |
57 | __pg - __section_mem_map_addr(__nr_to_section(__sec)); \ | 57 | (unsigned long)(__pg - __section_mem_map_addr(__nr_to_section(__sec))); \ |
58 | }) | 58 | }) |
59 | 59 | ||
60 | #define __pfn_to_page(pfn) \ | 60 | #define __pfn_to_page(pfn) \ |
diff --git a/include/asm-generic/mman.h b/include/asm-generic/mman.h index 3b41d2bb70..5e3dde2ee5 100644 --- a/include/asm-generic/mman.h +++ b/include/asm-generic/mman.h | |||
@@ -36,7 +36,6 @@ | |||
36 | #define MADV_DOFORK 11 /* do inherit across fork */ | 36 | #define MADV_DOFORK 11 /* do inherit across fork */ |
37 | 37 | ||
38 | /* compatibility flags */ | 38 | /* compatibility flags */ |
39 | #define MAP_ANON MAP_ANONYMOUS | ||
40 | #define MAP_FILE 0 | 39 | #define MAP_FILE 0 |
41 | 40 | ||
42 | #endif | 41 | #endif |
diff --git a/include/asm-h8300/termios.h b/include/asm-h8300/termios.h index e2319f992a..fb2925d08c 100644 --- a/include/asm-h8300/termios.h +++ b/include/asm-h8300/termios.h | |||
@@ -49,24 +49,6 @@ struct termio { | |||
49 | 49 | ||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
51 | 51 | ||
52 | /* line disciplines */ | ||
53 | #define N_TTY 0 | ||
54 | #define N_SLIP 1 | ||
55 | #define N_MOUSE 2 | ||
56 | #define N_PPP 3 | ||
57 | #define N_STRIP 4 | ||
58 | #define N_AX25 5 | ||
59 | #define N_X25 6 /* X.25 async */ | ||
60 | #define N_6PACK 7 | ||
61 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
62 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
63 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
64 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
65 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
66 | #define N_HDLC 13 /* synchronous HDLC */ | ||
67 | #define N_SYNC_PPP 14 | ||
68 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
69 | |||
70 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
71 | 53 | ||
72 | /* | 54 | /* |
diff --git a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h index c57441bb29..4dd2723313 100644 --- a/include/asm-i386/atomic.h +++ b/include/asm-i386/atomic.h | |||
@@ -211,12 +211,12 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v) | |||
211 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | 211 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) |
212 | 212 | ||
213 | /** | 213 | /** |
214 | * atomic_add_unless - add unless the number is a given value | 214 | * atomic_add_unless - add unless the number is already a given value |
215 | * @v: pointer of type atomic_t | 215 | * @v: pointer of type atomic_t |
216 | * @a: the amount to add to v... | 216 | * @a: the amount to add to v... |
217 | * @u: ...unless v is equal to u. | 217 | * @u: ...unless v is equal to u. |
218 | * | 218 | * |
219 | * Atomically adds @a to @v, so long as it was not @u. | 219 | * Atomically adds @a to @v, so long as @v was not already @u. |
220 | * Returns non-zero if @v was not @u, and zero otherwise. | 220 | * Returns non-zero if @v was not @u, and zero otherwise. |
221 | */ | 221 | */ |
222 | #define atomic_add_unless(v, a, u) \ | 222 | #define atomic_add_unless(v, a, u) \ |
diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h index 1c780fa1e7..273b506293 100644 --- a/include/asm-i386/bitops.h +++ b/include/asm-i386/bitops.h | |||
@@ -371,7 +371,7 @@ static inline unsigned long ffz(unsigned long word) | |||
371 | * | 371 | * |
372 | * This is defined the same way as | 372 | * This is defined the same way as |
373 | * the libc and compiler builtin ffs routines, therefore | 373 | * the libc and compiler builtin ffs routines, therefore |
374 | * differs in spirit from the above ffz (man ffs). | 374 | * differs in spirit from the above ffz() (man ffs). |
375 | */ | 375 | */ |
376 | static inline int ffs(int x) | 376 | static inline int ffs(int x) |
377 | { | 377 | { |
@@ -388,7 +388,7 @@ static inline int ffs(int x) | |||
388 | * fls - find last bit set | 388 | * fls - find last bit set |
389 | * @x: the word to search | 389 | * @x: the word to search |
390 | * | 390 | * |
391 | * This is defined the same way as ffs. | 391 | * This is defined the same way as ffs(). |
392 | */ | 392 | */ |
393 | static inline int fls(int x) | 393 | static inline int fls(int x) |
394 | { | 394 | { |
diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h index 86ff5e83be..59fe616933 100644 --- a/include/asm-i386/io.h +++ b/include/asm-i386/io.h | |||
@@ -219,12 +219,6 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int | |||
219 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) | 219 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) |
220 | 220 | ||
221 | /* | 221 | /* |
222 | * Again, i386 does not require mem IO specific function. | ||
223 | */ | ||
224 | |||
225 | #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(b),(c),(d)) | ||
226 | |||
227 | /* | ||
228 | * Cache management | 222 | * Cache management |
229 | * | 223 | * |
230 | * This needed for two cases | 224 | * This needed for two cases |
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h index 67659dbaf1..76316275d6 100644 --- a/include/asm-i386/setup.h +++ b/include/asm-i386/setup.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #ifndef _i386_SETUP_H | 6 | #ifndef _i386_SETUP_H |
7 | #define _i386_SETUP_H | 7 | #define _i386_SETUP_H |
8 | 8 | ||
9 | #define COMMAND_LINE_SIZE 256 | 9 | #define COMMAND_LINE_SIZE 2048 |
10 | 10 | ||
11 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
12 | #include <linux/pfn.h> | 12 | #include <linux/pfn.h> |
diff --git a/include/asm-i386/termios.h b/include/asm-i386/termios.h index 03f548536d..7c99678a8f 100644 --- a/include/asm-i386/termios.h +++ b/include/asm-i386/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | #include <linux/module.h> | 43 | #include <linux/module.h> |
62 | 44 | ||
diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index eef5133b9c..70829ae3ad 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h | |||
@@ -54,10 +54,10 @@ extern struct movsl_mask { | |||
54 | * This needs 33-bit arithmetic. We have a carry... | 54 | * This needs 33-bit arithmetic. We have a carry... |
55 | */ | 55 | */ |
56 | #define __range_ok(addr,size) ({ \ | 56 | #define __range_ok(addr,size) ({ \ |
57 | unsigned long flag,sum; \ | 57 | unsigned long flag,roksum; \ |
58 | __chk_user_ptr(addr); \ | 58 | __chk_user_ptr(addr); \ |
59 | asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ | 59 | asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ |
60 | :"=&r" (flag), "=r" (sum) \ | 60 | :"=&r" (flag), "=r" (roksum) \ |
61 | :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \ | 61 | :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \ |
62 | flag; }) | 62 | flag; }) |
63 | 63 | ||
diff --git a/include/asm-ia64/setup.h b/include/asm-ia64/setup.h index ea29b57aff..4399a44355 100644 --- a/include/asm-ia64/setup.h +++ b/include/asm-ia64/setup.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #ifndef __IA64_SETUP_H | 1 | #ifndef __IA64_SETUP_H |
2 | #define __IA64_SETUP_H | 2 | #define __IA64_SETUP_H |
3 | 3 | ||
4 | #define COMMAND_LINE_SIZE 512 | 4 | #define COMMAND_LINE_SIZE 2048 |
5 | 5 | ||
6 | #endif | 6 | #endif |
diff --git a/include/asm-ia64/termios.h b/include/asm-ia64/termios.h index 42c9569324..08750c2d36 100644 --- a/include/asm-ia64/termios.h +++ b/include/asm-ia64/termios.h | |||
@@ -46,24 +46,6 @@ struct termio { | |||
46 | 46 | ||
47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
48 | 48 | ||
49 | /* line disciplines */ | ||
50 | #define N_TTY 0 | ||
51 | #define N_SLIP 1 | ||
52 | #define N_MOUSE 2 | ||
53 | #define N_PPP 3 | ||
54 | #define N_STRIP 4 | ||
55 | #define N_AX25 5 | ||
56 | #define N_X25 6 /* X.25 async */ | ||
57 | #define N_6PACK 7 | ||
58 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
59 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
60 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
61 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
62 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS msgs */ | ||
63 | #define N_HDLC 13 /* synchronous HDLC */ | ||
64 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
65 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
66 | |||
67 | # ifdef __KERNEL__ | 49 | # ifdef __KERNEL__ |
68 | 50 | ||
69 | /* intr=^C quit=^\ erase=del kill=^U | 51 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-m32r/a.out.h b/include/asm-m32r/a.out.h index 4619ba5c37..9a4a5d2016 100644 --- a/include/asm-m32r/a.out.h +++ b/include/asm-m32r/a.out.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_A_OUT_H | 1 | #ifndef _ASM_M32R_A_OUT_H |
2 | #define _ASM_M32R_A_OUT_H | 2 | #define _ASM_M32R_A_OUT_H |
3 | 3 | ||
4 | /* orig : i386 2.4.18 */ | ||
5 | |||
6 | struct exec | 4 | struct exec |
7 | { | 5 | { |
8 | unsigned long a_info; /* Use macros N_MAGIC, etc for access */ | 6 | unsigned long a_info; /* Use macros N_MAGIC, etc for access */ |
diff --git a/include/asm-m32r/addrspace.h b/include/asm-m32r/addrspace.h index 06a83dc946..81782c122d 100644 --- a/include/asm-m32r/addrspace.h +++ b/include/asm-m32r/addrspace.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id$ */ | ||
2 | /* | 1 | /* |
3 | * This file is subject to the terms and conditions of the GNU General Public | 2 | * This file is subject to the terms and conditions of the GNU General Public |
4 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
diff --git a/include/asm-m32r/bugs.h b/include/asm-m32r/bugs.h index 9a56f661bd..f77214eff1 100644 --- a/include/asm-m32r/bugs.h +++ b/include/asm-m32r/bugs.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_BUGS_H | 1 | #ifndef _ASM_M32R_BUGS_H |
2 | #define _ASM_M32R_BUGS_H | 2 | #define _ASM_M32R_BUGS_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * This is included by init/main.c to check for architecture-dependent bugs. | 5 | * This is included by init/main.c to check for architecture-dependent bugs. |
8 | * | 6 | * |
diff --git a/include/asm-m32r/byteorder.h b/include/asm-m32r/byteorder.h index 3c0b9a2e03..10b2c1d116 100644 --- a/include/asm-m32r/byteorder.h +++ b/include/asm-m32r/byteorder.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_BYTEORDER_H | 1 | #ifndef _ASM_M32R_BYTEORDER_H |
2 | #define _ASM_M32R_BYTEORDER_H | 2 | #define _ASM_M32R_BYTEORDER_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm/types.h> | 4 | #include <asm/types.h> |
7 | 5 | ||
8 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | 6 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) |
diff --git a/include/asm-m32r/cache.h b/include/asm-m32r/cache.h index 9c2b2d9998..40b3ee9819 100644 --- a/include/asm-m32r/cache.h +++ b/include/asm-m32r/cache.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_CACHE_H | 1 | #ifndef _ASM_M32R_CACHE_H |
2 | #define _ASM_M32R_CACHE_H | 2 | #define _ASM_M32R_CACHE_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* L1 cache line size */ | 4 | /* L1 cache line size */ |
7 | #define L1_CACHE_SHIFT 4 | 5 | #define L1_CACHE_SHIFT 4 |
8 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 6 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
diff --git a/include/asm-m32r/cacheflush.h b/include/asm-m32r/cacheflush.h index 56961a9511..78587c9581 100644 --- a/include/asm-m32r/cacheflush.h +++ b/include/asm-m32r/cacheflush.h | |||
@@ -67,4 +67,3 @@ do { \ | |||
67 | memcpy(dst, src, len) | 67 | memcpy(dst, src, len) |
68 | 68 | ||
69 | #endif /* _ASM_M32R_CACHEFLUSH_H */ | 69 | #endif /* _ASM_M32R_CACHEFLUSH_H */ |
70 | |||
diff --git a/include/asm-m32r/current.h b/include/asm-m32r/current.h index c19d927ff2..7859d864f2 100644 --- a/include/asm-m32r/current.h +++ b/include/asm-m32r/current.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_CURRENT_H | 1 | #ifndef _ASM_M32R_CURRENT_H |
2 | #define _ASM_M32R_CURRENT_H | 2 | #define _ASM_M32R_CURRENT_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <linux/thread_info.h> | 4 | #include <linux/thread_info.h> |
7 | 5 | ||
8 | struct task_struct; | 6 | struct task_struct; |
@@ -15,4 +13,3 @@ static __inline__ struct task_struct *get_current(void) | |||
15 | #define current (get_current()) | 13 | #define current (get_current()) |
16 | 14 | ||
17 | #endif /* _ASM_M32R_CURRENT_H */ | 15 | #endif /* _ASM_M32R_CURRENT_H */ |
18 | |||
diff --git a/include/asm-m32r/delay.h b/include/asm-m32r/delay.h index f285eaee7d..164448d238 100644 --- a/include/asm-m32r/delay.h +++ b/include/asm-m32r/delay.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_DELAY_H | 1 | #ifndef _ASM_M32R_DELAY_H |
2 | #define _ASM_M32R_DELAY_H | 2 | #define _ASM_M32R_DELAY_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * Copyright (C) 1993 Linus Torvalds | 5 | * Copyright (C) 1993 Linus Torvalds |
8 | * | 6 | * |
diff --git a/include/asm-m32r/dma.h b/include/asm-m32r/dma.h index 7263b013b6..52f6a22dd2 100644 --- a/include/asm-m32r/dma.h +++ b/include/asm-m32r/dma.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_DMA_H | 1 | #ifndef _ASM_M32R_DMA_H |
2 | #define _ASM_M32R_DMA_H | 2 | #define _ASM_M32R_DMA_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm/io.h> | 4 | #include <asm/io.h> |
7 | 5 | ||
8 | /* | 6 | /* |
diff --git a/include/asm-m32r/errno.h b/include/asm-m32r/errno.h index 7a98520194..777149262a 100644 --- a/include/asm-m32r/errno.h +++ b/include/asm-m32r/errno.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_ERRNO_H | 1 | #ifndef _ASM_M32R_ERRNO_H |
2 | #define _ASM_M32R_ERRNO_H | 2 | #define _ASM_M32R_ERRNO_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm-generic/errno.h> | 4 | #include <asm-generic/errno.h> |
7 | 5 | ||
8 | #endif /* _ASM_M32R_ERRNO_H */ | 6 | #endif /* _ASM_M32R_ERRNO_H */ |
9 | |||
diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h index c82ebe8f25..4672a49e87 100644 --- a/include/asm-m32r/ide.h +++ b/include/asm-m32r/ide.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_IDE_H | 1 | #ifndef _ASM_M32R_IDE_H |
2 | #define _ASM_M32R_IDE_H | 2 | #define _ASM_M32R_IDE_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * linux/include/asm-m32r/ide.h | 5 | * linux/include/asm-m32r/ide.h |
8 | * | 6 | * |
@@ -15,6 +13,7 @@ | |||
15 | 13 | ||
16 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
17 | 15 | ||
16 | #include <asm/m32r.h> | ||
18 | 17 | ||
19 | #ifndef MAX_HWIFS | 18 | #ifndef MAX_HWIFS |
20 | # ifdef CONFIG_BLK_DEV_IDEPCI | 19 | # ifdef CONFIG_BLK_DEV_IDEPCI |
@@ -24,9 +23,6 @@ | |||
24 | # endif | 23 | # endif |
25 | #endif | 24 | #endif |
26 | 25 | ||
27 | #include <asm/m32r.h> | ||
28 | |||
29 | |||
30 | #define IDE_ARCH_OBSOLETE_DEFAULTS | 26 | #define IDE_ARCH_OBSOLETE_DEFAULTS |
31 | 27 | ||
32 | static __inline__ int ide_default_irq(unsigned long base) | 28 | static __inline__ int ide_default_irq(unsigned long base) |
diff --git a/include/asm-m32r/ioctls.h b/include/asm-m32r/ioctls.h index b350829224..d23cfc4573 100644 --- a/include/asm-m32r/ioctls.h +++ b/include/asm-m32r/ioctls.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef __ARCH_M32R_IOCTLS_H__ | 1 | #ifndef __ARCH_M32R_IOCTLS_H__ |
2 | #define __ARCH_M32R_IOCTLS_H__ | 2 | #define __ARCH_M32R_IOCTLS_H__ |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.5.67 */ | ||
7 | |||
8 | #include <asm/ioctl.h> | 4 | #include <asm/ioctl.h> |
9 | 5 | ||
10 | /* 0x54 is just a magic number to make these relatively unique ('T') */ | 6 | /* 0x54 is just a magic number to make these relatively unique ('T') */ |
@@ -85,4 +81,3 @@ | |||
85 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 81 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
86 | 82 | ||
87 | #endif /* __ARCH_M32R_IOCTLS_H__ */ | 83 | #endif /* __ARCH_M32R_IOCTLS_H__ */ |
88 | |||
diff --git a/include/asm-m32r/ipcbuf.h b/include/asm-m32r/ipcbuf.h index 7c77fb0b14..8d2d7c8ffd 100644 --- a/include/asm-m32r/ipcbuf.h +++ b/include/asm-m32r/ipcbuf.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_IPCBUF_H | 1 | #ifndef _ASM_M32R_IPCBUF_H |
2 | #define _ASM_M32R_IPCBUF_H | 2 | #define _ASM_M32R_IPCBUF_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * The ipc64_perm structure for m32r architecture. | 5 | * The ipc64_perm structure for m32r architecture. |
10 | * Note extra padding because this structure is passed back and forth | 6 | * Note extra padding because this structure is passed back and forth |
diff --git a/include/asm-m32r/kmap_types.h b/include/asm-m32r/kmap_types.h index 0524d89edb..fa94dc6410 100644 --- a/include/asm-m32r/kmap_types.h +++ b/include/asm-m32r/kmap_types.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef __M32R_KMAP_TYPES_H | 1 | #ifndef __M32R_KMAP_TYPES_H |
2 | #define __M32R_KMAP_TYPES_H | 2 | #define __M32R_KMAP_TYPES_H |
3 | 3 | ||
4 | /* Dummy header just to define km_type. */ | ||
5 | |||
6 | |||
7 | #ifdef CONFIG_DEBUG_HIGHMEM | 4 | #ifdef CONFIG_DEBUG_HIGHMEM |
8 | # define D(n) __KM_FENCE_##n , | 5 | # define D(n) __KM_FENCE_##n , |
9 | #else | 6 | #else |
@@ -30,4 +27,3 @@ D(13) KM_TYPE_NR | |||
30 | #undef D | 27 | #undef D |
31 | 28 | ||
32 | #endif /* __M32R_KMAP_TYPES_H */ | 29 | #endif /* __M32R_KMAP_TYPES_H */ |
33 | |||
diff --git a/include/asm-m32r/m32104ut/m32104ut_pld.h b/include/asm-m32r/m32104ut/m32104ut_pld.h index cbdbc58914..2dc89d68b6 100644 --- a/include/asm-m32r/m32104ut/m32104ut_pld.h +++ b/include/asm-m32r/m32104ut/m32104ut_pld.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _M32104UT_M32104UT_PLD_H | ||
2 | #define _M32104UT_M32104UT_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/m32104ut/m32104ut_pld.h | 5 | * include/asm-m32r/m32104ut/m32104ut_pld.h |
3 | * | 6 | * |
@@ -12,10 +15,6 @@ | |||
12 | * this archive for more details. | 15 | * this archive for more details. |
13 | */ | 16 | */ |
14 | 17 | ||
15 | #ifndef _M32104UT_M32104UT_PLD_H | ||
16 | #define _M32104UT_M32104UT_PLD_H | ||
17 | |||
18 | |||
19 | #if defined(CONFIG_PLAT_M32104UT) | 18 | #if defined(CONFIG_PLAT_M32104UT) |
20 | #define PLD_PLAT_BASE 0x02c00000 | 19 | #define PLD_PLAT_BASE 0x02c00000 |
21 | #else | 20 | #else |
@@ -35,7 +34,7 @@ | |||
35 | #define __reg8 | 34 | #define __reg8 |
36 | #define __reg16 | 35 | #define __reg16 |
37 | #define __reg32 | 36 | #define __reg32 |
38 | #endif /* __ASSEMBLY__ */ | 37 | #endif /* __ASSEMBLY__ */ |
39 | 38 | ||
40 | /* CFC */ | 39 | /* CFC */ |
41 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 40 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -159,4 +158,4 @@ | |||
159 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) | 158 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) |
160 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) | 159 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) |
161 | 160 | ||
162 | #endif /* _M32104UT_M32104UT_PLD_H */ | 161 | #endif /* _M32104UT_M32104UT_PLD_H */ |
diff --git a/include/asm-m32r/m32700ut/m32700ut_lan.h b/include/asm-m32r/m32700ut/m32700ut_lan.h index f1e47ae1f8..aae810a4fb 100644 --- a/include/asm-m32r/m32700ut/m32700ut_lan.h +++ b/include/asm-m32r/m32700ut/m32700ut_lan.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _M32700UT_M32700UT_LAN_H | ||
2 | #define _M32700UT_M32700UT_LAN_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/m32700ut/m32700ut_lan.h | 5 | * include/asm-m32r/m32700ut/m32700ut_lan.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id$ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _M32700UT_M32700UT_LAN_H | ||
16 | #define _M32700UT_M32700UT_LAN_H | ||
17 | |||
18 | |||
19 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
20 | /* | 17 | /* |
21 | * C functions use non-cache address. | 18 | * C functions use non-cache address. |
@@ -23,7 +20,7 @@ | |||
23 | #define M32700UT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) | 20 | #define M32700UT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) |
24 | #else | 21 | #else |
25 | #define M32700UT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) | 22 | #define M32700UT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) |
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
27 | 24 | ||
28 | /* ICU | 25 | /* ICU |
29 | * ICUISTS: status register | 26 | * ICUISTS: status register |
@@ -103,4 +100,4 @@ | |||
103 | #define PLDI2CSTS_BB 0x00000010 | 100 | #define PLDI2CSTS_BB 0x00000010 |
104 | #define PLDI2CSTS_NOACK 0x00000001 /* 0:ack, 1:noack */ | 101 | #define PLDI2CSTS_NOACK 0x00000001 /* 0:ack, 1:noack */ |
105 | 102 | ||
106 | #endif /* _M32700UT_M32700UT_LAN_H */ | 103 | #endif /* _M32700UT_M32700UT_LAN_H */ |
diff --git a/include/asm-m32r/m32700ut/m32700ut_lcd.h b/include/asm-m32r/m32700ut/m32700ut_lcd.h index e41c4aa48b..4c24890797 100644 --- a/include/asm-m32r/m32700ut/m32700ut_lcd.h +++ b/include/asm-m32r/m32700ut/m32700ut_lcd.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _M32700UT_M32700UT_LCD_H | ||
2 | #define _M32700UT_M32700UT_LCD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/m32700ut/m32700ut_lcd.h | 5 | * include/asm-m32r/m32700ut/m32700ut_lcd.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id$ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _M32700UT_M32700UT_LCD_H | ||
16 | #define _M32700UT_M32700UT_LCD_H | ||
17 | |||
18 | |||
19 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
20 | /* | 17 | /* |
21 | * C functions use non-cache address. | 18 | * C functions use non-cache address. |
@@ -23,7 +20,7 @@ | |||
23 | #define M32700UT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) | 20 | #define M32700UT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) |
24 | #else | 21 | #else |
25 | #define M32700UT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) | 22 | #define M32700UT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) |
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
27 | 24 | ||
28 | /* | 25 | /* |
29 | * ICU | 26 | * ICU |
@@ -55,4 +52,4 @@ | |||
55 | #define M32700UT_LCD_ICUCR19 __reg16(M32700UT_LCD_BASE + 0x300036) | 52 | #define M32700UT_LCD_ICUCR19 __reg16(M32700UT_LCD_BASE + 0x300036) |
56 | #define M32700UT_LCD_ICUCR21 __reg16(M32700UT_LCD_BASE + 0x30003a) | 53 | #define M32700UT_LCD_ICUCR21 __reg16(M32700UT_LCD_BASE + 0x30003a) |
57 | 54 | ||
58 | #endif /* _M32700UT_M32700UT_LCD_H */ | 55 | #endif /* _M32700UT_M32700UT_LCD_H */ |
diff --git a/include/asm-m32r/m32700ut/m32700ut_pld.h b/include/asm-m32r/m32700ut/m32700ut_pld.h index a48c22c978..d39121279a 100644 --- a/include/asm-m32r/m32700ut/m32700ut_pld.h +++ b/include/asm-m32r/m32700ut/m32700ut_pld.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _M32700UT_M32700UT_PLD_H | ||
2 | #define _M32700UT_M32700UT_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/m32700ut/m32700ut_pld.h | 5 | * include/asm-m32r/m32700ut/m32700ut_pld.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id$ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _M32700UT_M32700UT_PLD_H | ||
16 | #define _M32700UT_M32700UT_PLD_H | ||
17 | |||
18 | |||
19 | #if defined(CONFIG_PLAT_M32700UT_Alpha) | 16 | #if defined(CONFIG_PLAT_M32700UT_Alpha) |
20 | #define PLD_PLAT_BASE 0x08c00000 | 17 | #define PLD_PLAT_BASE 0x08c00000 |
21 | #elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_USRV) | 18 | #elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_USRV) |
@@ -37,7 +34,7 @@ | |||
37 | #define __reg8 | 34 | #define __reg8 |
38 | #define __reg16 | 35 | #define __reg16 |
39 | #define __reg32 | 36 | #define __reg32 |
40 | #endif /* __ASSEMBLY__ */ | 37 | #endif /* __ASSEMBLY__ */ |
41 | 38 | ||
42 | /* CFC */ | 39 | /* CFC */ |
43 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 40 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -261,4 +258,4 @@ | |||
261 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) | 258 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) |
262 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) | 259 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) |
263 | 260 | ||
264 | #endif /* _M32700UT_M32700UT_PLD.H */ | 261 | #endif /* _M32700UT_M32700UT_PLD.H */ |
diff --git a/include/asm-m32r/mappi2/mappi2_pld.h b/include/asm-m32r/mappi2/mappi2_pld.h index 56a2b12f2b..2624c9db72 100644 --- a/include/asm-m32r/mappi2/mappi2_pld.h +++ b/include/asm-m32r/mappi2/mappi2_pld.h | |||
@@ -1,18 +1,17 @@ | |||
1 | #ifndef _MAPPI2_PLD_H | ||
2 | #define _MAPPI2_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/mappi2/mappi2_pld.h | 5 | * include/asm-m32r/mappi2/mappi2_pld.h |
3 | * | 6 | * |
4 | * Definitions for Extended IO Logic on MAPPI2 board. | 7 | * Definitions for Extended IO Logic on MAPPI2 board. |
5 | * based on m32700ut_pld.h by | 8 | * based on m32700ut_pld.h |
6 | * | 9 | * |
7 | * This file is subject to the terms and conditions of the GNU General | 10 | * This file is subject to the terms and conditions of the GNU General |
8 | * Public License. See the file "COPYING" in the main directory of | 11 | * Public License. See the file "COPYING" in the main directory of |
9 | * this archive for more details. | 12 | * this archive for more details. |
10 | * | ||
11 | */ | 13 | */ |
12 | 14 | ||
13 | #ifndef _MAPPI2_PLD_H | ||
14 | #define _MAPPI2_PLD_H | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | 15 | #ifndef __ASSEMBLY__ |
17 | /* FIXME: | 16 | /* FIXME: |
18 | * Some C functions use non-cache address, so can't define non-cache address. | 17 | * Some C functions use non-cache address, so can't define non-cache address. |
@@ -26,7 +25,7 @@ | |||
26 | #define __reg8 | 25 | #define __reg8 |
27 | #define __reg16 | 26 | #define __reg16 |
28 | #define __reg32 | 27 | #define __reg32 |
29 | #endif /* __ASSEMBLY__ */ | 28 | #endif /* __ASSEMBLY__ */ |
30 | 29 | ||
31 | /* CFC */ | 30 | /* CFC */ |
32 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 31 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -148,4 +147,4 @@ | |||
148 | 147 | ||
149 | #endif | 148 | #endif |
150 | 149 | ||
151 | #endif /* _MAPPI2_PLD.H */ | 150 | #endif /* _MAPPI2_PLD.H */ |
diff --git a/include/asm-m32r/mappi3/mappi3_pld.h b/include/asm-m32r/mappi3/mappi3_pld.h index 92f10defae..451c40ee70 100644 --- a/include/asm-m32r/mappi3/mappi3_pld.h +++ b/include/asm-m32r/mappi3/mappi3_pld.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _MAPPI3_PLD_H | ||
2 | #define _MAPPI3_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/mappi3/mappi3_pld.h | 5 | * include/asm-m32r/mappi3/mappi3_pld.h |
3 | * | 6 | * |
@@ -7,12 +10,8 @@ | |||
7 | * This file is subject to the terms and conditions of the GNU General | 10 | * This file is subject to the terms and conditions of the GNU General |
8 | * Public License. See the file "COPYING" in the main directory of | 11 | * Public License. See the file "COPYING" in the main directory of |
9 | * this archive for more details. | 12 | * this archive for more details. |
10 | * | ||
11 | */ | 13 | */ |
12 | 14 | ||
13 | #ifndef _MAPPI3_PLD_H | ||
14 | #define _MAPPI3_PLD_H | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | 15 | #ifndef __ASSEMBLY__ |
17 | /* FIXME: | 16 | /* FIXME: |
18 | * Some C functions use non-cache address, so can't define non-cache address. | 17 | * Some C functions use non-cache address, so can't define non-cache address. |
@@ -26,7 +25,7 @@ | |||
26 | #define __reg8 | 25 | #define __reg8 |
27 | #define __reg16 | 26 | #define __reg16 |
28 | #define __reg32 | 27 | #define __reg32 |
29 | #endif /* __ASSEMBLY__ */ | 28 | #endif /* __ASSEMBLY__ */ |
30 | 29 | ||
31 | /* CFC */ | 30 | /* CFC */ |
32 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 31 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -140,4 +139,4 @@ | |||
140 | /* Reset Control */ | 139 | /* Reset Control */ |
141 | #define PLD_REBOOT __reg16(PLD_BASE + 0x38000) | 140 | #define PLD_REBOOT __reg16(PLD_BASE + 0x38000) |
142 | 141 | ||
143 | #endif /* _MAPPI3_PLD.H */ | 142 | #endif /* _MAPPI3_PLD.H */ |
diff --git a/include/asm-m32r/mc146818rtc.h b/include/asm-m32r/mc146818rtc.h index 755601d053..aa1b7bf84f 100644 --- a/include/asm-m32r/mc146818rtc.h +++ b/include/asm-m32r/mc146818rtc.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #include <asm/io.h> | 7 | #include <asm/io.h> |
8 | 8 | ||
9 | #ifndef RTC_PORT | 9 | #ifndef RTC_PORT |
10 | // #define RTC_PORT(x) (0x70 + (x)) | ||
11 | #define RTC_PORT(x) ((x)) | 10 | #define RTC_PORT(x) ((x)) |
12 | #define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ | 11 | #define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ |
13 | #endif | 12 | #endif |
@@ -26,7 +25,5 @@ outb_p((val),RTC_PORT(1)); \ | |||
26 | }) | 25 | }) |
27 | 26 | ||
28 | #define RTC_IRQ 8 | 27 | #define RTC_IRQ 8 |
29 | #if 0 | ||
30 | #endif | ||
31 | 28 | ||
32 | #endif /* _ASM_MC146818RTC_H */ | 29 | #endif /* _ASM_MC146818RTC_H */ |
diff --git a/include/asm-m32r/mman.h b/include/asm-m32r/mman.h index 695a860c02..516a8973b1 100644 --- a/include/asm-m32r/mman.h +++ b/include/asm-m32r/mman.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/mman.h> | 4 | #include <asm-generic/mman.h> |
5 | 5 | ||
6 | /* orig : i386 2.6.0-test6 */ | ||
7 | |||
8 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
9 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
10 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 8 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
diff --git a/include/asm-m32r/mmu.h b/include/asm-m32r/mmu.h index cf3f6d78ac..d9bd724479 100644 --- a/include/asm-m32r/mmu.h +++ b/include/asm-m32r/mmu.h | |||
@@ -1,13 +1,14 @@ | |||
1 | #ifndef _ASM_M32R_MMU_H | 1 | #ifndef _ASM_M32R_MMU_H |
2 | #define _ASM_M32R_MMU_H | 2 | #define _ASM_M32R_MMU_H |
3 | 3 | ||
4 | |||
5 | #if !defined(CONFIG_MMU) | 4 | #if !defined(CONFIG_MMU) |
5 | |||
6 | typedef struct { | 6 | typedef struct { |
7 | struct vm_list_struct *vmlist; | 7 | struct vm_list_struct *vmlist; |
8 | unsigned long end_brk; | 8 | unsigned long end_brk; |
9 | } mm_context_t; | 9 | } mm_context_t; |
10 | #else | 10 | |
11 | #else /* CONFIG_MMU */ | ||
11 | 12 | ||
12 | /* Default "unsigned long" context */ | 13 | /* Default "unsigned long" context */ |
13 | #ifndef CONFIG_SMP | 14 | #ifndef CONFIG_SMP |
@@ -16,5 +17,6 @@ typedef unsigned long mm_context_t; | |||
16 | typedef unsigned long mm_context_t[NR_CPUS]; | 17 | typedef unsigned long mm_context_t[NR_CPUS]; |
17 | #endif | 18 | #endif |
18 | 19 | ||
19 | #endif /* CONFIG_MMU */ | 20 | #endif /* CONFIG_MMU */ |
20 | #endif /* _ASM_M32R_MMU_H */ | 21 | |
22 | #endif /* _ASM_M32R_MMU_H */ | ||
diff --git a/include/asm-m32r/mmu_context.h b/include/asm-m32r/mmu_context.h index 542302eb6b..1f40d4a0ac 100644 --- a/include/asm-m32r/mmu_context.h +++ b/include/asm-m32r/mmu_context.h | |||
@@ -1,9 +1,7 @@ | |||
1 | #ifndef _ASM_M32R_MMU_CONTEXT_H | 1 | #ifndef _ASM_M32R_MMU_CONTEXT_H |
2 | #define _ASM_M32R_MMU_CONTEXT_H | 2 | #define _ASM_M32R_MMU_CONTEXT_H |
3 | |||
4 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
5 | 4 | ||
6 | |||
7 | #include <asm/m32r.h> | 5 | #include <asm/m32r.h> |
8 | 6 | ||
9 | #define MMU_CONTEXT_ASID_MASK (0x000000FF) | 7 | #define MMU_CONTEXT_ASID_MASK (0x000000FF) |
@@ -11,7 +9,6 @@ | |||
11 | #define MMU_CONTEXT_FIRST_VERSION (0x00000100) | 9 | #define MMU_CONTEXT_FIRST_VERSION (0x00000100) |
12 | #define NO_CONTEXT (0x00000000) | 10 | #define NO_CONTEXT (0x00000000) |
13 | 11 | ||
14 | |||
15 | #ifndef __ASSEMBLY__ | 12 | #ifndef __ASSEMBLY__ |
16 | 13 | ||
17 | #include <asm/atomic.h> | 14 | #include <asm/atomic.h> |
@@ -147,7 +144,7 @@ static inline void switch_mm(struct mm_struct *prev, | |||
147 | #define activate_mm(prev, next) \ | 144 | #define activate_mm(prev, next) \ |
148 | switch_mm((prev), (next), NULL) | 145 | switch_mm((prev), (next), NULL) |
149 | 146 | ||
150 | #else | 147 | #else /* not CONFIG_MMU */ |
151 | #define get_mmu_context(mm) do { } while (0) | 148 | #define get_mmu_context(mm) do { } while (0) |
152 | #define init_new_context(tsk,mm) (0) | 149 | #define init_new_context(tsk,mm) (0) |
153 | #define destroy_context(mm) do { } while (0) | 150 | #define destroy_context(mm) do { } while (0) |
@@ -158,11 +155,9 @@ static inline void switch_mm(struct mm_struct *prev, | |||
158 | #define deactivate_mm(mm,tsk) do { } while (0) | 155 | #define deactivate_mm(mm,tsk) do { } while (0) |
159 | #define activate_mm(prev,next) do { } while (0) | 156 | #define activate_mm(prev,next) do { } while (0) |
160 | #define enter_lazy_tlb(mm,tsk) do { } while (0) | 157 | #define enter_lazy_tlb(mm,tsk) do { } while (0) |
161 | #endif /* CONFIG_MMU */ | 158 | #endif /* not CONFIG_MMU */ |
162 | |||
163 | 159 | ||
164 | #endif /* not __ASSEMBLY__ */ | 160 | #endif /* not __ASSEMBLY__ */ |
165 | 161 | ||
166 | #endif /* __KERNEL__ */ | 162 | #endif /* __KERNEL__ */ |
167 | |||
168 | #endif /* _ASM_M32R_MMU_CONTEXT_H */ | 163 | #endif /* _ASM_M32R_MMU_CONTEXT_H */ |
diff --git a/include/asm-m32r/module.h b/include/asm-m32r/module.h index 3f2541c92a..eb73ee0112 100644 --- a/include/asm-m32r/module.h +++ b/include/asm-m32r/module.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_MODULE_H | 1 | #ifndef _ASM_M32R_MODULE_H |
2 | #define _ASM_M32R_MODULE_H | 2 | #define _ASM_M32R_MODULE_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | struct mod_arch_specific { }; | 4 | struct mod_arch_specific { }; |
7 | 5 | ||
8 | #define Elf_Shdr Elf32_Shdr | 6 | #define Elf_Shdr Elf32_Shdr |
@@ -10,4 +8,3 @@ struct mod_arch_specific { }; | |||
10 | #define Elf_Ehdr Elf32_Ehdr | 8 | #define Elf_Ehdr Elf32_Ehdr |
11 | 9 | ||
12 | #endif /* _ASM_M32R_MODULE_H */ | 10 | #endif /* _ASM_M32R_MODULE_H */ |
13 | |||
diff --git a/include/asm-m32r/msgbuf.h b/include/asm-m32r/msgbuf.h index 852ff52af4..0d5a877b81 100644 --- a/include/asm-m32r/msgbuf.h +++ b/include/asm-m32r/msgbuf.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_MSGBUF_H | 1 | #ifndef _ASM_M32R_MSGBUF_H |
2 | #define _ASM_M32R_MSGBUF_H | 2 | #define _ASM_M32R_MSGBUF_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * The msqid64_ds structure for m32r architecture. | 5 | * The msqid64_ds structure for m32r architecture. |
10 | * Note extra padding because this structure is passed back and forth | 6 | * Note extra padding because this structure is passed back and forth |
diff --git a/include/asm-m32r/namei.h b/include/asm-m32r/namei.h index 7172d3d2e2..210f8056b8 100644 --- a/include/asm-m32r/namei.h +++ b/include/asm-m32r/namei.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_NAMEI_H | 1 | #ifndef _ASM_M32R_NAMEI_H |
2 | #define _ASM_M32R_NAMEI_H | 2 | #define _ASM_M32R_NAMEI_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * linux/include/asm-m32r/namei.h | 5 | * linux/include/asm-m32r/namei.h |
10 | * | 6 | * |
diff --git a/include/asm-m32r/opsput/opsput_lan.h b/include/asm-m32r/opsput/opsput_lan.h index f53e10187c..a5f18dd1ab 100644 --- a/include/asm-m32r/opsput/opsput_lan.h +++ b/include/asm-m32r/opsput/opsput_lan.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _OPSPUT_OPSPUT_LAN_H | ||
2 | #define _OPSPUT_OPSPUT_LAN_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/opsput/opsput_lan.h | 5 | * include/asm-m32r/opsput/opsput_lan.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id: opsput_lan.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _OPSPUT_OPSPUT_LAN_H | ||
16 | #define _OPSPUT_OPSPUT_LAN_H | ||
17 | |||
18 | |||
19 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
20 | /* | 17 | /* |
21 | * C functions use non-cache address. | 18 | * C functions use non-cache address. |
@@ -23,7 +20,7 @@ | |||
23 | #define OPSPUT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) | 20 | #define OPSPUT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) |
24 | #else | 21 | #else |
25 | #define OPSPUT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) | 22 | #define OPSPUT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) |
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
27 | 24 | ||
28 | /* ICU | 25 | /* ICU |
29 | * ICUISTS: status register | 26 | * ICUISTS: status register |
@@ -52,4 +49,4 @@ | |||
52 | #define OPSPUT_LAN_ICUCR1 __reg16(OPSPUT_LAN_BASE + 0xc0010) | 49 | #define OPSPUT_LAN_ICUCR1 __reg16(OPSPUT_LAN_BASE + 0xc0010) |
53 | #define OPSPUT_LAN_ICUCR3 __reg16(OPSPUT_LAN_BASE + 0xc0014) | 50 | #define OPSPUT_LAN_ICUCR3 __reg16(OPSPUT_LAN_BASE + 0xc0014) |
54 | 51 | ||
55 | #endif /* _OPSPUT_OPSPUT_LAN_H */ | 52 | #endif /* _OPSPUT_OPSPUT_LAN_H */ |
diff --git a/include/asm-m32r/opsput/opsput_lcd.h b/include/asm-m32r/opsput/opsput_lcd.h index 99f296e1b6..369c9f0832 100644 --- a/include/asm-m32r/opsput/opsput_lcd.h +++ b/include/asm-m32r/opsput/opsput_lcd.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _OPSPUT_OPSPUT_LCD_H | ||
2 | #define _OPSPUT_OPSPUT_LCD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/opsput/opsput_lcd.h | 5 | * include/asm-m32r/opsput/opsput_lcd.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id: opsput_lcd.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _OPSPUT_OPSPUT_LCD_H | ||
16 | #define _OPSPUT_OPSPUT_LCD_H | ||
17 | |||
18 | |||
19 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
20 | /* | 17 | /* |
21 | * C functions use non-cache address. | 18 | * C functions use non-cache address. |
@@ -23,7 +20,7 @@ | |||
23 | #define OPSPUT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) | 20 | #define OPSPUT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) |
24 | #else | 21 | #else |
25 | #define OPSPUT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) | 22 | #define OPSPUT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) |
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
27 | 24 | ||
28 | /* | 25 | /* |
29 | * ICU | 26 | * ICU |
@@ -55,4 +52,4 @@ | |||
55 | #define OPSPUT_LCD_ICUCR19 __reg16(OPSPUT_LCD_BASE + 0x300036) | 52 | #define OPSPUT_LCD_ICUCR19 __reg16(OPSPUT_LCD_BASE + 0x300036) |
56 | #define OPSPUT_LCD_ICUCR21 __reg16(OPSPUT_LCD_BASE + 0x30003a) | 53 | #define OPSPUT_LCD_ICUCR21 __reg16(OPSPUT_LCD_BASE + 0x30003a) |
57 | 54 | ||
58 | #endif /* _OPSPUT_OPSPUT_LCD_H */ | 55 | #endif /* _OPSPUT_OPSPUT_LCD_H */ |
diff --git a/include/asm-m32r/opsput/opsput_pld.h b/include/asm-m32r/opsput/opsput_pld.h index a8d6452076..3f11ea1aac 100644 --- a/include/asm-m32r/opsput/opsput_pld.h +++ b/include/asm-m32r/opsput/opsput_pld.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _OPSPUT_OPSPUT_PLD_H | ||
2 | #define _OPSPUT_OPSPUT_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/opsput/opsput_pld.h | 5 | * include/asm-m32r/opsput/opsput_pld.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id: opsput_pld.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _OPSPUT_OPSPUT_PLD_H | ||
16 | #define _OPSPUT_OPSPUT_PLD_H | ||
17 | |||
18 | |||
19 | #define PLD_PLAT_BASE 0x1cc00000 | 16 | #define PLD_PLAT_BASE 0x1cc00000 |
20 | 17 | ||
21 | #ifndef __ASSEMBLY__ | 18 | #ifndef __ASSEMBLY__ |
@@ -31,7 +28,7 @@ | |||
31 | #define __reg8 | 28 | #define __reg8 |
32 | #define __reg16 | 29 | #define __reg16 |
33 | #define __reg32 | 30 | #define __reg32 |
34 | #endif /* __ASSEMBLY__ */ | 31 | #endif /* __ASSEMBLY__ */ |
35 | 32 | ||
36 | /* CFC */ | 33 | /* CFC */ |
37 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 34 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -255,4 +252,4 @@ | |||
255 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) | 252 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) |
256 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) | 253 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) |
257 | 254 | ||
258 | #endif /* _OPSPUT_OPSPUT_PLD.H */ | 255 | #endif /* _OPSPUT_OPSPUT_PLD.H */ |
diff --git a/include/asm-m32r/page.h b/include/asm-m32r/page.h index 404a4c2400..6f6ecf7d14 100644 --- a/include/asm-m32r/page.h +++ b/include/asm-m32r/page.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_PAGE_H | 1 | #ifndef _ASM_M32R_PAGE_H |
2 | #define _ASM_M32R_PAGE_H | 2 | #define _ASM_M32R_PAGE_H |
3 | 3 | ||
4 | |||
5 | /* PAGE_SHIFT determines the page size */ | 4 | /* PAGE_SHIFT determines the page size */ |
6 | #define PAGE_SHIFT 12 | 5 | #define PAGE_SHIFT 12 |
7 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | 6 | #define PAGE_SIZE (1UL << PAGE_SHIFT) |
@@ -57,9 +56,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
57 | * and CONFIG_HIGHMEM64G options in the kernel configuration. | 56 | * and CONFIG_HIGHMEM64G options in the kernel configuration. |
58 | */ | 57 | */ |
59 | 58 | ||
60 | |||
61 | /* This handles the memory map.. */ | ||
62 | |||
63 | #define __MEMORY_START CONFIG_MEMORY_START | 59 | #define __MEMORY_START CONFIG_MEMORY_START |
64 | #define __MEMORY_SIZE CONFIG_MEMORY_SIZE | 60 | #define __MEMORY_SIZE CONFIG_MEMORY_SIZE |
65 | 61 | ||
@@ -92,4 +88,3 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
92 | 88 | ||
93 | #endif /* __KERNEL__ */ | 89 | #endif /* __KERNEL__ */ |
94 | #endif /* _ASM_M32R_PAGE_H */ | 90 | #endif /* _ASM_M32R_PAGE_H */ |
95 | |||
diff --git a/include/asm-m32r/param.h b/include/asm-m32r/param.h index 750b938ccb..3e14026e39 100644 --- a/include/asm-m32r/param.h +++ b/include/asm-m32r/param.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_PARAM_H | 1 | #ifndef _ASM_M32R_PARAM_H |
2 | #define _ASM_M32R_PARAM_H | 2 | #define _ASM_M32R_PARAM_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.5.67 */ | ||
7 | |||
8 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
9 | # define HZ 100 /* Internal kernel timer frequency */ | 5 | # define HZ 100 /* Internal kernel timer frequency */ |
10 | # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ | 6 | # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ |
diff --git a/include/asm-m32r/pci.h b/include/asm-m32r/pci.h index 00d7b6f39a..fe785d167d 100644 --- a/include/asm-m32r/pci.h +++ b/include/asm-m32r/pci.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_PCI_H | 1 | #ifndef _ASM_M32R_PCI_H |
2 | #define _ASM_M32R_PCI_H | 2 | #define _ASM_M32R_PCI_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm-generic/pci.h> | 4 | #include <asm-generic/pci.h> |
7 | 5 | ||
8 | #define PCI_DMA_BUS_IS_PHYS (1) | 6 | #define PCI_DMA_BUS_IS_PHYS (1) |
diff --git a/include/asm-m32r/pgalloc.h b/include/asm-m32r/pgalloc.h index e09a86c3ca..943ba63c1e 100644 --- a/include/asm-m32r/pgalloc.h +++ b/include/asm-m32r/pgalloc.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_PGALLOC_H | 1 | #ifndef _ASM_M32R_PGALLOC_H |
2 | #define _ASM_M32R_PGALLOC_H | 2 | #define _ASM_M32R_PGALLOC_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
7 | 5 | ||
8 | #include <asm/io.h> | 6 | #include <asm/io.h> |
@@ -74,4 +72,3 @@ static __inline__ void pte_free(struct page *pte) | |||
74 | #define check_pgt_cache() do { } while (0) | 72 | #define check_pgt_cache() do { } while (0) |
75 | 73 | ||
76 | #endif /* _ASM_M32R_PGALLOC_H */ | 74 | #endif /* _ASM_M32R_PGALLOC_H */ |
77 | |||
diff --git a/include/asm-m32r/pgtable-2level.h b/include/asm-m32r/pgtable-2level.h index 84152760e0..750925726a 100644 --- a/include/asm-m32r/pgtable-2level.h +++ b/include/asm-m32r/pgtable-2level.h | |||
@@ -1,9 +1,7 @@ | |||
1 | #ifndef _ASM_M32R_PGTABLE_2LEVEL_H | 1 | #ifndef _ASM_M32R_PGTABLE_2LEVEL_H |
2 | #define _ASM_M32R_PGTABLE_2LEVEL_H | 2 | #define _ASM_M32R_PGTABLE_2LEVEL_H |
3 | |||
4 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
5 | 4 | ||
6 | |||
7 | /* | 5 | /* |
8 | * traditional M32R two-level paging structure: | 6 | * traditional M32R two-level paging structure: |
9 | */ | 7 | */ |
@@ -77,5 +75,4 @@ static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address) | |||
77 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE }) | 75 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE }) |
78 | 76 | ||
79 | #endif /* __KERNEL__ */ | 77 | #endif /* __KERNEL__ */ |
80 | |||
81 | #endif /* _ASM_M32R_PGTABLE_2LEVEL_H */ | 78 | #endif /* _ASM_M32R_PGTABLE_2LEVEL_H */ |
diff --git a/include/asm-m32r/posix_types.h b/include/asm-m32r/posix_types.h index 47e7e85a3d..1caac65d20 100644 --- a/include/asm-m32r/posix_types.h +++ b/include/asm-m32r/posix_types.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_POSIX_TYPES_H | 1 | #ifndef _ASM_M32R_POSIX_TYPES_H |
2 | #define _ASM_M32R_POSIX_TYPES_H | 2 | #define _ASM_M32R_POSIX_TYPES_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386, sh 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * This file is generally used by user-level software, so you need to | 5 | * This file is generally used by user-level software, so you need to |
10 | * be a little careful about namespace pollution etc. Also, we cannot | 6 | * be a little careful about namespace pollution etc. Also, we cannot |
diff --git a/include/asm-m32r/rtc.h b/include/asm-m32r/rtc.h index 6b2b837c59..0340633f3f 100644 --- a/include/asm-m32r/rtc.h +++ b/include/asm-m32r/rtc.h | |||
@@ -1,10 +1,6 @@ | |||
1 | /* $Id: rtc.h,v 1.1.1.1 2004/03/25 04:29:22 hitoshiy Exp $ */ | ||
2 | |||
3 | #ifndef __RTC_H__ | 1 | #ifndef __RTC_H__ |
4 | #define __RTC_H__ | 2 | #define __RTC_H__ |
5 | 3 | ||
6 | |||
7 | |||
8 | /* Dallas DS1302 clock/calendar register numbers. */ | 4 | /* Dallas DS1302 clock/calendar register numbers. */ |
9 | # define RTC_SECONDS 0 | 5 | # define RTC_SECONDS 0 |
10 | # define RTC_MINUTES 1 | 6 | # define RTC_MINUTES 1 |
diff --git a/include/asm-m32r/scatterlist.h b/include/asm-m32r/scatterlist.h index 09a10e43bf..c2de96cb69 100644 --- a/include/asm-m32r/scatterlist.h +++ b/include/asm-m32r/scatterlist.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SCATTERLIST_H | 1 | #ifndef _ASM_M32R_SCATTERLIST_H |
2 | #define _ASM_M32R_SCATTERLIST_H | 2 | #define _ASM_M32R_SCATTERLIST_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | struct scatterlist { | 4 | struct scatterlist { |
7 | char * address; /* Location data is to be transferred to, NULL for | 5 | char * address; /* Location data is to be transferred to, NULL for |
8 | * highmem page */ | 6 | * highmem page */ |
diff --git a/include/asm-m32r/sections.h b/include/asm-m32r/sections.h index 6b969e53b8..5e5d21c490 100644 --- a/include/asm-m32r/sections.h +++ b/include/asm-m32r/sections.h | |||
@@ -5,4 +5,3 @@ | |||
5 | #include <asm-generic/sections.h> | 5 | #include <asm-generic/sections.h> |
6 | 6 | ||
7 | #endif /* _M32R_SECTIONS_H */ | 7 | #endif /* _M32R_SECTIONS_H */ |
8 | |||
diff --git a/include/asm-m32r/segment.h b/include/asm-m32r/segment.h index e45db68e6c..42b11aeb32 100644 --- a/include/asm-m32r/segment.h +++ b/include/asm-m32r/segment.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SEGMENT_H | 1 | #ifndef _ASM_M32R_SEGMENT_H |
2 | #define _ASM_M32R_SEGMENT_H | 2 | #define _ASM_M32R_SEGMENT_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 (2.4.18) */ | ||
7 | |||
8 | #define __KERNEL_CS 0x10 | 4 | #define __KERNEL_CS 0x10 |
9 | #define __KERNEL_DS 0x18 | 5 | #define __KERNEL_DS 0x18 |
10 | 6 | ||
diff --git a/include/asm-m32r/sembuf.h b/include/asm-m32r/sembuf.h index e69018e6ff..c9873d6890 100644 --- a/include/asm-m32r/sembuf.h +++ b/include/asm-m32r/sembuf.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SEMBUF_H | 1 | #ifndef _ASM_M32R_SEMBUF_H |
2 | #define _ASM_M32R_SEMBUF_H | 2 | #define _ASM_M32R_SEMBUF_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * The semid64_ds structure for m32r architecture. | 5 | * The semid64_ds structure for m32r architecture. |
10 | * Note extra padding because this structure is passed back and forth | 6 | * Note extra padding because this structure is passed back and forth |
diff --git a/include/asm-m32r/setup.h b/include/asm-m32r/setup.h index 6a0b32202d..c637ab9923 100644 --- a/include/asm-m32r/setup.h +++ b/include/asm-m32r/setup.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SETUP_H | ||
2 | #define _ASM_M32R_SETUP_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * This is set up by the setup-routine at boot-time | 5 | * This is set up by the setup-routine at boot-time |
3 | */ | 6 | */ |
@@ -32,3 +35,4 @@ extern unsigned long memory_end; | |||
32 | 35 | ||
33 | #endif /* __KERNEL__ */ | 36 | #endif /* __KERNEL__ */ |
34 | 37 | ||
38 | #endif /* _ASM_M32R_SETUP_H */ | ||
diff --git a/include/asm-m32r/shmbuf.h b/include/asm-m32r/shmbuf.h index b84e897fa8..b0cdf0aa7d 100644 --- a/include/asm-m32r/shmbuf.h +++ b/include/asm-m32r/shmbuf.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SHMBUF_H | 1 | #ifndef _ASM_M32R_SHMBUF_H |
2 | #define _ASM_M32R_SHMBUF_H | 2 | #define _ASM_M32R_SHMBUF_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * The shmid64_ds structure for M32R architecture. | 5 | * The shmid64_ds structure for M32R architecture. |
10 | * Note extra padding because this structure is passed back and forth | 6 | * Note extra padding because this structure is passed back and forth |
diff --git a/include/asm-m32r/shmparam.h b/include/asm-m32r/shmparam.h index db0019ba95..35986d81a5 100644 --- a/include/asm-m32r/shmparam.h +++ b/include/asm-m32r/shmparam.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SHMPARAM_H | 1 | #ifndef _ASM_M32R_SHMPARAM_H |
2 | #define _ASM_M32R_SHMPARAM_H | 2 | #define _ASM_M32R_SHMPARAM_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ | 4 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ |
7 | 5 | ||
8 | #endif /* _ASM_M32R_SHMPARAM_H */ | 6 | #endif /* _ASM_M32R_SHMPARAM_H */ |
diff --git a/include/asm-m32r/sigcontext.h b/include/asm-m32r/sigcontext.h index 62537dc4de..da4a9c36d0 100644 --- a/include/asm-m32r/sigcontext.h +++ b/include/asm-m32r/sigcontext.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SIGCONTEXT_H | 1 | #ifndef _ASM_M32R_SIGCONTEXT_H |
2 | #define _ASM_M32R_SIGCONTEXT_H | 2 | #define _ASM_M32R_SIGCONTEXT_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | |||
7 | struct sigcontext { | 4 | struct sigcontext { |
8 | /* CPU registers */ | 5 | /* CPU registers */ |
9 | /* Saved main processor registers. */ | 6 | /* Saved main processor registers. */ |
diff --git a/include/asm-m32r/siginfo.h b/include/asm-m32r/siginfo.h index 482202f2e7..7d9cd9ebfd 100644 --- a/include/asm-m32r/siginfo.h +++ b/include/asm-m32r/siginfo.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _M32R_SIGINFO_H | 1 | #ifndef _M32R_SIGINFO_H |
2 | #define _M32R_SIGINFO_H | 2 | #define _M32R_SIGINFO_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm-generic/siginfo.h> | 4 | #include <asm-generic/siginfo.h> |
7 | 5 | ||
8 | #endif /* _M32R_SIGINFO_H */ | 6 | #endif /* _M32R_SIGINFO_H */ |
diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h index 65423bed32..937258686b 100644 --- a/include/asm-m32r/signal.h +++ b/include/asm-m32r/signal.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SIGNAL_H | 1 | #ifndef _ASM_M32R_SIGNAL_H |
2 | #define _ASM_M32R_SIGNAL_H | 2 | #define _ASM_M32R_SIGNAL_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | #include <linux/types.h> | 4 | #include <linux/types.h> |
9 | #include <linux/time.h> | 5 | #include <linux/time.h> |
10 | #include <linux/compiler.h> | 6 | #include <linux/compiler.h> |
diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h index 650d2558c3..abd937ac52 100644 --- a/include/asm-m32r/smp.h +++ b/include/asm-m32r/smp.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SMP_H | 1 | #ifndef _ASM_M32R_SMP_H |
2 | #define _ASM_M32R_SMP_H | 2 | #define _ASM_M32R_SMP_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | |||
7 | #ifdef CONFIG_SMP | 4 | #ifdef CONFIG_SMP |
8 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLY__ |
9 | 6 | ||
diff --git a/include/asm-m32r/sockios.h b/include/asm-m32r/sockios.h index 147a118442..f89962e231 100644 --- a/include/asm-m32r/sockios.h +++ b/include/asm-m32r/sockios.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SOCKIOS_H | 1 | #ifndef _ASM_M32R_SOCKIOS_H |
2 | #define _ASM_M32R_SOCKIOS_H | 2 | #define _ASM_M32R_SOCKIOS_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* Socket-level I/O control calls. */ | 4 | /* Socket-level I/O control calls. */ |
7 | #define FIOSETOWN 0x8901 | 5 | #define FIOSETOWN 0x8901 |
8 | #define SIOCSPGRP 0x8902 | 6 | #define SIOCSPGRP 0x8902 |
diff --git a/include/asm-m32r/spinlock_types.h b/include/asm-m32r/spinlock_types.h index 7e9941c45f..83f52105c0 100644 --- a/include/asm-m32r/spinlock_types.h +++ b/include/asm-m32r/spinlock_types.h | |||
@@ -20,4 +20,4 @@ typedef struct { | |||
20 | 20 | ||
21 | #define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } | 21 | #define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } |
22 | 22 | ||
23 | #endif | 23 | #endif /* _ASM_M32R_SPINLOCK_TYPES_H */ |
diff --git a/include/asm-m32r/stat.h b/include/asm-m32r/stat.h index 05748fef4c..da4518f82d 100644 --- a/include/asm-m32r/stat.h +++ b/include/asm-m32r/stat.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_STAT_H | 1 | #ifndef _ASM_M32R_STAT_H |
2 | #define _ASM_M32R_STAT_H | 2 | #define _ASM_M32R_STAT_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | #include <asm/byteorder.h> | 4 | #include <asm/byteorder.h> |
9 | 5 | ||
10 | struct __old_kernel_stat { | 6 | struct __old_kernel_stat { |
diff --git a/include/asm-m32r/string.h b/include/asm-m32r/string.h index cb54bcc2e6..e61e2b0bfc 100644 --- a/include/asm-m32r/string.h +++ b/include/asm-m32r/string.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_STRING_H | 1 | #ifndef _ASM_M32R_STRING_H |
2 | #define _ASM_M32R_STRING_H | 2 | #define _ASM_M32R_STRING_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #define __HAVE_ARCH_STRLEN | 4 | #define __HAVE_ARCH_STRLEN |
7 | extern size_t strlen(const char * s); | 5 | extern size_t strlen(const char * s); |
8 | 6 | ||
diff --git a/include/asm-m32r/syscall.h b/include/asm-m32r/syscall.h index d8d4b2c7a7..25f316f2b7 100644 --- a/include/asm-m32r/syscall.h +++ b/include/asm-m32r/syscall.h | |||
@@ -1,11 +1,8 @@ | |||
1 | #ifndef _ASM_M32R_SYSCALL_H | 1 | #ifndef _ASM_M32R_SYSCALL_H |
2 | #define _ASM_M32R_SYSCALL_H | 2 | #define _ASM_M32R_SYSCALL_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* Definitions for the system call vector. */ | 4 | /* Definitions for the system call vector. */ |
7 | #define SYSCALL_VECTOR "2" | 5 | #define SYSCALL_VECTOR "2" |
8 | #define SYSCALL_VECTOR_ADDRESS "0xa0" | 6 | #define SYSCALL_VECTOR_ADDRESS "0xa0" |
9 | 7 | ||
10 | #endif /* _ASM_M32R_SYSCALL_H */ | 8 | #endif /* _ASM_M32R_SYSCALL_H */ |
11 | |||
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 4ce0619f69..99ee09889f 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h | |||
@@ -339,4 +339,4 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
339 | 339 | ||
340 | #define arch_align_stack(x) (x) | 340 | #define arch_align_stack(x) (x) |
341 | 341 | ||
342 | #endif /* _ASM_M32R_SYSTEM_H */ | 342 | #endif /* _ASM_M32R_SYSTEM_H */ |
diff --git a/include/asm-m32r/termbits.h b/include/asm-m32r/termbits.h index faf2bd0504..e402641dfb 100644 --- a/include/asm-m32r/termbits.h +++ b/include/asm-m32r/termbits.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_TERMBITS_H | 1 | #ifndef _ASM_M32R_TERMBITS_H |
2 | #define _ASM_M32R_TERMBITS_H | 2 | #define _ASM_M32R_TERMBITS_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <linux/posix_types.h> | 4 | #include <linux/posix_types.h> |
7 | 5 | ||
8 | typedef unsigned char cc_t; | 6 | typedef unsigned char cc_t; |
@@ -184,4 +182,4 @@ struct ktermios { | |||
184 | #define TCSADRAIN 1 | 182 | #define TCSADRAIN 1 |
185 | #define TCSAFLUSH 2 | 183 | #define TCSAFLUSH 2 |
186 | 184 | ||
187 | #endif /* _ASM_M32R_TERMBITS_H */ | 185 | #endif /* _ASM_M32R_TERMBITS_H */ |
diff --git a/include/asm-m32r/termios.h b/include/asm-m32r/termios.h index fc99d2e178..4943dd8db4 100644 --- a/include/asm-m32r/termios.h +++ b/include/asm-m32r/termios.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _M32R_TERMIOS_H | 1 | #ifndef _M32R_TERMIOS_H |
2 | #define _M32R_TERMIOS_H | 2 | #define _M32R_TERMIOS_H |
3 | 3 | ||
4 | /* orig : i386 2.6.0-test5 */ | ||
5 | |||
6 | #include <asm/termbits.h> | 4 | #include <asm/termbits.h> |
7 | #include <asm/ioctls.h> | 5 | #include <asm/ioctls.h> |
8 | 6 | ||
@@ -41,24 +39,6 @@ struct termio { | |||
41 | 39 | ||
42 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
43 | 41 | ||
44 | /* line disciplines */ | ||
45 | #define N_TTY 0 | ||
46 | #define N_SLIP 1 | ||
47 | #define N_MOUSE 2 | ||
48 | #define N_PPP 3 | ||
49 | #define N_STRIP 4 | ||
50 | #define N_AX25 5 | ||
51 | #define N_X25 6 /* X.25 async */ | ||
52 | #define N_6PACK 7 | ||
53 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
54 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
55 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
56 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
57 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
58 | #define N_HDLC 13 /* synchronous HDLC */ | ||
59 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
60 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
61 | |||
62 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
63 | #include <linux/module.h> | 43 | #include <linux/module.h> |
64 | 44 | ||
diff --git a/include/asm-m32r/timex.h b/include/asm-m32r/timex.h index 019441c1d7..bb9fe4feb1 100644 --- a/include/asm-m32r/timex.h +++ b/include/asm-m32r/timex.h | |||
@@ -1,15 +1,12 @@ | |||
1 | #ifndef _ASM_M32R_TIMEX_H | 1 | #ifndef _ASM_M32R_TIMEX_H |
2 | #define _ASM_M32R_TIMEX_H | 2 | #define _ASM_M32R_TIMEX_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * linux/include/asm-m32r/timex.h | 5 | * linux/include/asm-m32r/timex.h |
8 | * | 6 | * |
9 | * m32r architecture timex specifications | 7 | * m32r architecture timex specifications |
10 | */ | 8 | */ |
11 | 9 | ||
12 | |||
13 | #define CLOCK_TICK_RATE (CONFIG_BUS_CLOCK / CONFIG_TIMER_DIVIDE) | 10 | #define CLOCK_TICK_RATE (CONFIG_BUS_CLOCK / CONFIG_TIMER_DIVIDE) |
14 | #define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */ | 11 | #define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */ |
15 | 12 | ||
diff --git a/include/asm-m32r/tlbflush.h b/include/asm-m32r/tlbflush.h index ae44949605..3d37ac002b 100644 --- a/include/asm-m32r/tlbflush.h +++ b/include/asm-m32r/tlbflush.h | |||
@@ -98,4 +98,3 @@ static __inline__ void __flush_tlb_all(void) | |||
98 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); | 98 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); |
99 | 99 | ||
100 | #endif /* _ASM_M32R_TLBFLUSH_H */ | 100 | #endif /* _ASM_M32R_TLBFLUSH_H */ |
101 | |||
diff --git a/include/asm-m32r/types.h b/include/asm-m32r/types.h index fcf24c64c3..27d3eb539c 100644 --- a/include/asm-m32r/types.h +++ b/include/asm-m32r/types.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | 5 | ||
6 | /* $Id$ */ | ||
7 | |||
8 | /* orig : i386 2.4.18 */ | ||
9 | |||
10 | typedef unsigned short umode_t; | 6 | typedef unsigned short umode_t; |
11 | 7 | ||
12 | /* | 8 | /* |
@@ -59,4 +55,4 @@ typedef u64 dma64_addr_t; | |||
59 | 55 | ||
60 | #endif /* __KERNEL__ */ | 56 | #endif /* __KERNEL__ */ |
61 | 57 | ||
62 | #endif /* _ASM_M32R_TYPES_H */ | 58 | #endif /* _ASM_M32R_TYPES_H */ |
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h index 26e978c7e3..bd8c83765a 100644 --- a/include/asm-m32r/uaccess.h +++ b/include/asm-m32r/uaccess.h | |||
@@ -68,7 +68,7 @@ static inline void set_fs(mm_segment_t s) | |||
68 | * This needs 33-bit arithmetic. We have a carry... | 68 | * This needs 33-bit arithmetic. We have a carry... |
69 | */ | 69 | */ |
70 | #define __range_ok(addr,size) ({ \ | 70 | #define __range_ok(addr,size) ({ \ |
71 | unsigned long flag, sum; \ | 71 | unsigned long flag, roksum; \ |
72 | __chk_user_ptr(addr); \ | 72 | __chk_user_ptr(addr); \ |
73 | asm ( \ | 73 | asm ( \ |
74 | " cmpu %1, %1 ; clear cbit\n" \ | 74 | " cmpu %1, %1 ; clear cbit\n" \ |
@@ -76,7 +76,7 @@ static inline void set_fs(mm_segment_t s) | |||
76 | " subx %0, %0\n" \ | 76 | " subx %0, %0\n" \ |
77 | " cmpu %4, %1\n" \ | 77 | " cmpu %4, %1\n" \ |
78 | " subx %0, %5\n" \ | 78 | " subx %0, %5\n" \ |
79 | : "=&r" (flag), "=r" (sum) \ | 79 | : "=&r" (flag), "=r" (roksum) \ |
80 | : "1" (addr), "r" ((int)(size)), \ | 80 | : "1" (addr), "r" ((int)(size)), \ |
81 | "r" (current_thread_info()->addr_limit.seg), "r" (0) \ | 81 | "r" (current_thread_info()->addr_limit.seg), "r" (0) \ |
82 | : "cbit" ); \ | 82 | : "cbit" ); \ |
diff --git a/include/asm-m32r/ucontext.h b/include/asm-m32r/ucontext.h index 2de709a5c5..09324741ee 100644 --- a/include/asm-m32r/ucontext.h +++ b/include/asm-m32r/ucontext.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_UCONTEXT_H | 1 | #ifndef _ASM_M32R_UCONTEXT_H |
2 | #define _ASM_M32R_UCONTEXT_H | 2 | #define _ASM_M32R_UCONTEXT_H |
3 | 3 | ||
4 | /* orig : i386 2.4.18 */ | ||
5 | |||
6 | struct ucontext { | 4 | struct ucontext { |
7 | unsigned long uc_flags; | 5 | unsigned long uc_flags; |
8 | struct ucontext *uc_link; | 6 | struct ucontext *uc_link; |
diff --git a/include/asm-m32r/unaligned.h b/include/asm-m32r/unaligned.h index 3aef9ac8d3..fccc180c39 100644 --- a/include/asm-m32r/unaligned.h +++ b/include/asm-m32r/unaligned.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_UNALIGNED_H | 1 | #ifndef _ASM_M32R_UNALIGNED_H |
2 | #define _ASM_M32R_UNALIGNED_H | 2 | #define _ASM_M32R_UNALIGNED_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : generic 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * For the benefit of those who are trying to port Linux to another | 5 | * For the benefit of those who are trying to port Linux to another |
10 | * architecture, here are some C-language equivalents. | 6 | * architecture, here are some C-language equivalents. |
@@ -12,7 +8,6 @@ | |||
12 | 8 | ||
13 | #include <asm/string.h> | 9 | #include <asm/string.h> |
14 | 10 | ||
15 | |||
16 | #define get_unaligned(ptr) \ | 11 | #define get_unaligned(ptr) \ |
17 | ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) | 12 | ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) |
18 | 13 | ||
@@ -21,5 +16,4 @@ | |||
21 | memmove((ptr), &__tmp, sizeof(*(ptr))); \ | 16 | memmove((ptr), &__tmp, sizeof(*(ptr))); \ |
22 | (void)0; }) | 17 | (void)0; }) |
23 | 18 | ||
24 | 19 | #endif /* _ASM_M32R_UNALIGNED_H */ | |
25 | #endif /* _ASM_M32R_UNALIGNED_H */ | ||
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index 5b66bd3c6e..cbbd53762e 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_UNISTD_H | 1 | #ifndef _ASM_M32R_UNISTD_H |
2 | #define _ASM_M32R_UNISTD_H | 2 | #define _ASM_M32R_UNISTD_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * This file contains the system call numbers. | 5 | * This file contains the system call numbers. |
8 | */ | 6 | */ |
diff --git a/include/asm-m32r/user.h b/include/asm-m32r/user.h index 1ad4ded848..035258d713 100644 --- a/include/asm-m32r/user.h +++ b/include/asm-m32r/user.h | |||
@@ -1,12 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_USER_H | 1 | #ifndef _ASM_M32R_USER_H |
2 | #define _ASM_M32R_USER_H | 2 | #define _ASM_M32R_USER_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : sh 2.4.18 | ||
7 | * mod : remove fpu registers | ||
8 | */ | ||
9 | |||
10 | #include <linux/types.h> | 4 | #include <linux/types.h> |
11 | #include <asm/ptrace.h> | 5 | #include <asm/ptrace.h> |
12 | #include <asm/page.h> | 6 | #include <asm/page.h> |
diff --git a/include/asm-m32r/vga.h b/include/asm-m32r/vga.h index 533163447c..a1b63061c0 100644 --- a/include/asm-m32r/vga.h +++ b/include/asm-m32r/vga.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_VGA_H | 1 | #ifndef _ASM_M32R_VGA_H |
2 | #define _ASM_M32R_VGA_H | 2 | #define _ASM_M32R_VGA_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * Access to VGA videoram | 5 | * Access to VGA videoram |
8 | * | 6 | * |
@@ -19,4 +17,4 @@ | |||
19 | #define vga_readb(x) (*(x)) | 17 | #define vga_readb(x) (*(x)) |
20 | #define vga_writeb(x,y) (*(y) = (x)) | 18 | #define vga_writeb(x,y) (*(y) = (x)) |
21 | 19 | ||
22 | #endif /* _ASM_M32R_VGA_H */ | 20 | #endif /* _ASM_M32R_VGA_H */ |
diff --git a/include/asm-m32r/xor.h b/include/asm-m32r/xor.h index fd960dc9bf..6d525259df 100644 --- a/include/asm-m32r/xor.h +++ b/include/asm-m32r/xor.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_XOR_H | 1 | #ifndef _ASM_M32R_XOR_H |
2 | #define _ASM_M32R_XOR_H | 2 | #define _ASM_M32R_XOR_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm-generic/xor.h> | 4 | #include <asm-generic/xor.h> |
7 | 5 | ||
8 | #endif /* _ASM_M32R_XOR_H */ | 6 | #endif /* _ASM_M32R_XOR_H */ |
diff --git a/include/asm-m68k/math-emu.h b/include/asm-m68k/math-emu.h index 7ac6259b68..ddfab96403 100644 --- a/include/asm-m68k/math-emu.h +++ b/include/asm-m68k/math-emu.h | |||
@@ -226,6 +226,21 @@ extern unsigned int fp_debugprint; | |||
226 | .previous | 226 | .previous |
227 | .endm | 227 | .endm |
228 | 228 | ||
229 | /* work around binutils idiocy */ | ||
230 | old_gas=-1 | ||
231 | .irp gas_ident.x .x | ||
232 | old_gas=old_gas+1 | ||
233 | .endr | ||
234 | .if !old_gas | ||
235 | .irp m b,w,l | ||
236 | .macro getuser.\m src,dest,label,addr | ||
237 | getuser .\m,\src,\dest,\label,\addr | ||
238 | .endm | ||
239 | .macro putuser.\m src,dest,label,addr | ||
240 | putuser .\m,\src,\dest,\label,\addr | ||
241 | .endm | ||
242 | .endr | ||
243 | .endif | ||
229 | 244 | ||
230 | .macro movestack nr,arg1,arg2,arg3,arg4,arg5 | 245 | .macro movestack nr,arg1,arg2,arg3,arg4,arg5 |
231 | .if \nr | 246 | .if \nr |
diff --git a/include/asm-m68k/termios.h b/include/asm-m68k/termios.h index 857f0c9a91..00edabd761 100644 --- a/include/asm-m68k/termios.h +++ b/include/asm-m68k/termios.h | |||
@@ -49,24 +49,6 @@ struct termio { | |||
49 | 49 | ||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
51 | 51 | ||
52 | /* line disciplines */ | ||
53 | #define N_TTY 0 | ||
54 | #define N_SLIP 1 | ||
55 | #define N_MOUSE 2 | ||
56 | #define N_PPP 3 | ||
57 | #define N_STRIP 4 | ||
58 | #define N_AX25 5 | ||
59 | #define N_X25 6 /* X.25 async */ | ||
60 | #define N_6PACK 7 | ||
61 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
62 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
63 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
64 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
65 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
66 | #define N_HDLC 13 /* synchronous HDLC */ | ||
67 | #define N_SYNC_PPP 14 | ||
68 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
69 | |||
70 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
71 | 53 | ||
72 | /* | 54 | /* |
diff --git a/include/asm-m68k/user.h b/include/asm-m68k/user.h index d7c0b109bd..8c56ccab48 100644 --- a/include/asm-m68k/user.h +++ b/include/asm-m68k/user.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _M68K_USER_H | 1 | #ifndef _M68K_USER_H |
2 | #define _M68K_USER_H | 2 | #define _M68K_USER_H |
3 | 3 | ||
4 | #include <asm/page.h> | ||
5 | |||
6 | /* Core file format: The core file is written in such a way that gdb | 4 | /* Core file format: The core file is written in such a way that gdb |
7 | can understand it and provide useful information to the user (under | 5 | can understand it and provide useful information to the user (under |
8 | linux we use the 'trad-core' bfd). There are quite a number of | 6 | linux we use the 'trad-core' bfd). There are quite a number of |
diff --git a/include/asm-m68knommu/bitops.h b/include/asm-m68knommu/bitops.h index d7fa7d9c0e..7d6075d9b5 100644 --- a/include/asm-m68knommu/bitops.h +++ b/include/asm-m68knommu/bitops.h | |||
@@ -7,7 +7,6 @@ | |||
7 | 7 | ||
8 | #include <linux/compiler.h> | 8 | #include <linux/compiler.h> |
9 | #include <asm/byteorder.h> /* swab32 */ | 9 | #include <asm/byteorder.h> /* swab32 */ |
10 | #include <asm/system.h> /* save_flags */ | ||
11 | 10 | ||
12 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
13 | 12 | ||
diff --git a/include/asm-mips/apm.h b/include/asm-mips/apm.h deleted file mode 100644 index 4b99ffc115..0000000000 --- a/include/asm-mips/apm.h +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | /* -*- linux-c -*- | ||
2 | * | ||
3 | * (C) 2003 zecke@handhelds.org | ||
4 | * | ||
5 | * GPL version 2 | ||
6 | * | ||
7 | * based on arch/arm/kernel/apm.c | ||
8 | * factor out the information needed by architectures to provide | ||
9 | * apm status | ||
10 | * | ||
11 | * | ||
12 | */ | ||
13 | #ifndef MIPS_ASM_SA1100_APM_H | ||
14 | #define MIPS_ASM_SA1100_APM_H | ||
15 | |||
16 | #include <linux/apm_bios.h> | ||
17 | |||
18 | /* | ||
19 | * This structure gets filled in by the machine specific 'get_power_status' | ||
20 | * implementation. Any fields which are not set default to a safe value. | ||
21 | */ | ||
22 | struct apm_power_info { | ||
23 | unsigned char ac_line_status; | ||
24 | #define APM_AC_OFFLINE 0 | ||
25 | #define APM_AC_ONLINE 1 | ||
26 | #define APM_AC_BACKUP 2 | ||
27 | #define APM_AC_UNKNOWN 0xff | ||
28 | |||
29 | unsigned char battery_status; | ||
30 | #define APM_BATTERY_STATUS_HIGH 0 | ||
31 | #define APM_BATTERY_STATUS_LOW 1 | ||
32 | #define APM_BATTERY_STATUS_CRITICAL 2 | ||
33 | #define APM_BATTERY_STATUS_CHARGING 3 | ||
34 | #define APM_BATTERY_STATUS_NOT_PRESENT 4 | ||
35 | #define APM_BATTERY_STATUS_UNKNOWN 0xff | ||
36 | |||
37 | unsigned char battery_flag; | ||
38 | #define APM_BATTERY_FLAG_HIGH (1 << 0) | ||
39 | #define APM_BATTERY_FLAG_LOW (1 << 1) | ||
40 | #define APM_BATTERY_FLAG_CRITICAL (1 << 2) | ||
41 | #define APM_BATTERY_FLAG_CHARGING (1 << 3) | ||
42 | #define APM_BATTERY_FLAG_NOT_PRESENT (1 << 7) | ||
43 | #define APM_BATTERY_FLAG_UNKNOWN 0xff | ||
44 | |||
45 | int battery_life; | ||
46 | int time; | ||
47 | int units; | ||
48 | #define APM_UNITS_MINS 0 | ||
49 | #define APM_UNITS_SECS 1 | ||
50 | #define APM_UNITS_UNKNOWN -1 | ||
51 | |||
52 | }; | ||
53 | |||
54 | /* | ||
55 | * This allows machines to provide their own "apm get power status" function. | ||
56 | */ | ||
57 | extern void (*apm_get_power_status)(struct apm_power_info *); | ||
58 | |||
59 | /* | ||
60 | * Queue an event (APM_SYS_SUSPEND or APM_CRITICAL_SUSPEND) | ||
61 | */ | ||
62 | void apm_queue_event(apm_event_t event); | ||
63 | |||
64 | #endif | ||
diff --git a/include/asm-mips/dec/system.h b/include/asm-mips/dec/system.h index 78af51fbc7..b2afaccd68 100644 --- a/include/asm-mips/dec/system.h +++ b/include/asm-mips/dec/system.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Generic DECstation/DECsystem bits. | 4 | * Generic DECstation/DECsystem bits. |
5 | * | 5 | * |
6 | * Copyright (C) 2005 Maciej W. Rozycki | 6 | * Copyright (C) 2005, 2006 Maciej W. Rozycki |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 9 | * modify it under the terms of the GNU General Public License |
@@ -14,5 +14,6 @@ | |||
14 | #define __ASM_DEC_SYSTEM_H | 14 | #define __ASM_DEC_SYSTEM_H |
15 | 15 | ||
16 | extern unsigned long dec_kn_slot_base, dec_kn_slot_size; | 16 | extern unsigned long dec_kn_slot_base, dec_kn_slot_size; |
17 | extern int dec_tc_bus; | ||
17 | 18 | ||
18 | #endif /* __ASM_DEC_SYSTEM_H */ | 19 | #endif /* __ASM_DEC_SYSTEM_H */ |
diff --git a/include/asm-mips/dec/tc.h b/include/asm-mips/dec/tc.h deleted file mode 100644 index 9cb51f24d4..0000000000 --- a/include/asm-mips/dec/tc.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * Interface to the TURBOchannel related routines | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (c) 1998 Harald Koerfgen | ||
9 | */ | ||
10 | #ifndef __ASM_DEC_TC_H | ||
11 | #define __ASM_DEC_TC_H | ||
12 | |||
13 | /* | ||
14 | * Search for a TURBOchannel Option Module | ||
15 | * with a certain name. Returns slot number | ||
16 | * of the first card not in use or -ENODEV | ||
17 | * if none found. | ||
18 | */ | ||
19 | extern int search_tc_card(const char *); | ||
20 | /* | ||
21 | * Marks the card in slot as used | ||
22 | */ | ||
23 | extern void claim_tc_card(int); | ||
24 | /* | ||
25 | * Marks the card in slot as free | ||
26 | */ | ||
27 | extern void release_tc_card(int); | ||
28 | /* | ||
29 | * Return base address of card in slot | ||
30 | */ | ||
31 | extern unsigned long get_tc_base_addr(int); | ||
32 | /* | ||
33 | * Return interrupt number of slot | ||
34 | */ | ||
35 | extern unsigned long get_tc_irq_nr(int); | ||
36 | /* | ||
37 | * Return TURBOchannel clock frequency in Hz | ||
38 | */ | ||
39 | extern unsigned long get_tc_speed(void); | ||
40 | |||
41 | #endif /* __ASM_DEC_TC_H */ | ||
diff --git a/include/asm-mips/dec/tcinfo.h b/include/asm-mips/dec/tcinfo.h deleted file mode 100644 index cc23509ee7..0000000000 --- a/include/asm-mips/dec/tcinfo.h +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Various TURBOchannel related stuff | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Information obtained through the get_tcinfo prom call | ||
9 | * created from: | ||
10 | * | ||
11 | * TURBOchannel Firmware Specification | ||
12 | * | ||
13 | * EK-TCAAD-FS-004 | ||
14 | * from Digital Equipment Corporation | ||
15 | * | ||
16 | * Copyright (c) 1998 Harald Koerfgen | ||
17 | */ | ||
18 | |||
19 | typedef struct { | ||
20 | int revision; | ||
21 | int clk_period; | ||
22 | int slot_size; | ||
23 | int io_timeout; | ||
24 | int dma_range; | ||
25 | int max_dma_burst; | ||
26 | int parity; | ||
27 | int reserved[4]; | ||
28 | } tcinfo; | ||
29 | |||
30 | #define MAX_SLOT 7 | ||
31 | |||
32 | typedef struct { | ||
33 | unsigned long base_addr; | ||
34 | unsigned char name[9]; | ||
35 | unsigned char vendor[9]; | ||
36 | unsigned char firmware[9]; | ||
37 | int interrupt; | ||
38 | int flags; | ||
39 | } slot_info; | ||
40 | |||
41 | /* | ||
42 | * Values for flags | ||
43 | */ | ||
44 | #define FREE 1<<0 | ||
45 | #define IN_USE 1<<1 | ||
46 | |||
47 | |||
diff --git a/include/asm-mips/dec/tcmodule.h b/include/asm-mips/dec/tcmodule.h deleted file mode 100644 index 6268e8915d..0000000000 --- a/include/asm-mips/dec/tcmodule.h +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Offsets for the ROM header locations for | ||
7 | * TURBOchannel cards | ||
8 | * | ||
9 | * created from: | ||
10 | * | ||
11 | * TURBOchannel Firmware Specification | ||
12 | * | ||
13 | * EK-TCAAD-FS-004 | ||
14 | * from Digital Equipment Corporation | ||
15 | * | ||
16 | * Jan.1998 Harald Koerfgen | ||
17 | */ | ||
18 | #ifndef __ASM_DEC_TCMODULE_H | ||
19 | #define __ASM_DEC_TCMODULE_H | ||
20 | |||
21 | #define OLDCARD 0x3c0000 | ||
22 | #define NEWCARD 0x000000 | ||
23 | |||
24 | #define TC_ROM_WIDTH 0x3e0 | ||
25 | #define TC_ROM_STRIDE 0x3e4 | ||
26 | #define TC_ROM_SIZE 0x3e8 | ||
27 | #define TC_SLOT_SIZE 0x3ec | ||
28 | #define TC_PATTERN0 0x3f0 | ||
29 | #define TC_PATTERN1 0x3f4 | ||
30 | #define TC_PATTERN2 0x3f8 | ||
31 | #define TC_PATTERN3 0x3fc | ||
32 | #define TC_FIRM_VER 0x400 | ||
33 | #define TC_VENDOR 0x420 | ||
34 | #define TC_MODULE 0x440 | ||
35 | #define TC_FIRM_TYPE 0x460 | ||
36 | #define TC_FLAGS 0x470 | ||
37 | #define TC_ROM_OBJECTS 0x480 | ||
38 | |||
39 | #endif /* __ASM_DEC_TCMODULE_H */ | ||
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index 67f0810789..b6a2eb8166 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
@@ -556,12 +556,6 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | |||
556 | #define __ISA_IO_base ((char *)(isa_slot_offset)) | 556 | #define __ISA_IO_base ((char *)(isa_slot_offset)) |
557 | 557 | ||
558 | /* | 558 | /* |
559 | * We don't have csum_partial_copy_fromio() yet, so we cheat here and | ||
560 | * just copy it. The net code will then do the checksum later. | ||
561 | */ | ||
562 | #define eth_io_copy_and_sum(skb,src,len,unused) memcpy_fromio((skb)->data,(src),(len)) | ||
563 | |||
564 | /* | ||
565 | * The caches on some architectures aren't dma-coherent and have need to | 559 | * The caches on some architectures aren't dma-coherent and have need to |
566 | * handle this in software. There are three types of operations that | 560 | * handle this in software. There are three types of operations that |
567 | * can be applied to dma buffers. | 561 | * can be applied to dma buffers. |
diff --git a/include/asm-mips/mips_mt.h b/include/asm-mips/mips_mt.h index c31a312b97..fdfff0b8ce 100644 --- a/include/asm-mips/mips_mt.h +++ b/include/asm-mips/mips_mt.h | |||
@@ -12,4 +12,7 @@ extern unsigned long mt_fpemul_threshold; | |||
12 | extern void mips_mt_regdump(unsigned long previous_mvpcontrol_value); | 12 | extern void mips_mt_regdump(unsigned long previous_mvpcontrol_value); |
13 | extern void mips_mt_set_cpuoptions(void); | 13 | extern void mips_mt_set_cpuoptions(void); |
14 | 14 | ||
15 | struct class; | ||
16 | extern struct class *mt_class; | ||
17 | |||
15 | #endif /* __ASM_MIPS_MT_H */ | 18 | #endif /* __ASM_MIPS_MT_H */ |
diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h index 046cf686be..e4d6f1fb1c 100644 --- a/include/asm-mips/mman.h +++ b/include/asm-mips/mman.h | |||
@@ -72,7 +72,6 @@ | |||
72 | #define MADV_DOFORK 11 /* do inherit across fork */ | 72 | #define MADV_DOFORK 11 /* do inherit across fork */ |
73 | 73 | ||
74 | /* compatibility flags */ | 74 | /* compatibility flags */ |
75 | #define MAP_ANON MAP_ANONYMOUS | ||
76 | #define MAP_FILE 0 | 75 | #define MAP_FILE 0 |
77 | 76 | ||
78 | #endif /* _ASM_MMAN_H */ | 77 | #endif /* _ASM_MMAN_H */ |
diff --git a/include/asm-mips/sigcontext.h b/include/asm-mips/sigcontext.h index cefa657dd0..3c175a7e43 100644 --- a/include/asm-mips/sigcontext.h +++ b/include/asm-mips/sigcontext.h | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | struct sigcontext { | 20 | struct sigcontext { |
21 | unsigned int sc_regmask; /* Unused */ | 21 | unsigned int sc_regmask; /* Unused */ |
22 | unsigned int sc_status; | 22 | unsigned int sc_status; /* Unused */ |
23 | unsigned long long sc_pc; | 23 | unsigned long long sc_pc; |
24 | unsigned long long sc_regs[32]; | 24 | unsigned long long sc_regs[32]; |
25 | unsigned long long sc_fpregs[32]; | 25 | unsigned long long sc_fpregs[32]; |
@@ -76,7 +76,7 @@ struct sigcontext { | |||
76 | 76 | ||
77 | struct sigcontext32 { | 77 | struct sigcontext32 { |
78 | __u32 sc_regmask; /* Unused */ | 78 | __u32 sc_regmask; /* Unused */ |
79 | __u32 sc_status; | 79 | __u32 sc_status; /* Unused */ |
80 | __u64 sc_pc; | 80 | __u64 sc_pc; |
81 | __u64 sc_regs[32]; | 81 | __u64 sc_regs[32]; |
82 | __u64 sc_fpregs[32]; | 82 | __u64 sc_fpregs[32]; |
diff --git a/include/asm-mips/termios.h b/include/asm-mips/termios.h index 4906204d34..2ce07f4be3 100644 --- a/include/asm-mips/termios.h +++ b/include/asm-mips/termios.h | |||
@@ -87,24 +87,6 @@ struct termio { | |||
87 | #define TIOCM_OUT2 0x4000 | 87 | #define TIOCM_OUT2 0x4000 |
88 | #define TIOCM_LOOP 0x8000 | 88 | #define TIOCM_LOOP 0x8000 |
89 | 89 | ||
90 | /* line disciplines */ | ||
91 | #define N_TTY 0 | ||
92 | #define N_SLIP 1 | ||
93 | #define N_MOUSE 2 | ||
94 | #define N_PPP 3 | ||
95 | #define N_STRIP 4 | ||
96 | #define N_AX25 5 | ||
97 | #define N_X25 6 /* X.25 async */ | ||
98 | #define N_6PACK 7 | ||
99 | #define N_MASC 8 /* Reserved fo Mobitex module <kaz@cafe.net> */ | ||
100 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
101 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
102 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
103 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
104 | #define N_HDLC 13 /* synchronous HDLC */ | ||
105 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
106 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
107 | |||
108 | #ifdef __KERNEL__ | 90 | #ifdef __KERNEL__ |
109 | 91 | ||
110 | #include <linux/string.h> | 92 | #include <linux/string.h> |
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index c12ebc53ef..825fcbd9ea 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h | |||
@@ -265,8 +265,6 @@ do { \ | |||
265 | */ | 265 | */ |
266 | #define __get_user_asm_ll32(val, addr) \ | 266 | #define __get_user_asm_ll32(val, addr) \ |
267 | { \ | 267 | { \ |
268 | unsigned long long __gu_tmp; \ | ||
269 | \ | ||
270 | __asm__ __volatile__( \ | 268 | __asm__ __volatile__( \ |
271 | "1: lw %1, (%3) \n" \ | 269 | "1: lw %1, (%3) \n" \ |
272 | "2: lw %D1, 4(%3) \n" \ | 270 | "2: lw %D1, 4(%3) \n" \ |
@@ -281,9 +279,8 @@ do { \ | |||
281 | " " __UA_ADDR " 1b, 4b \n" \ | 279 | " " __UA_ADDR " 1b, 4b \n" \ |
282 | " " __UA_ADDR " 2b, 4b \n" \ | 280 | " " __UA_ADDR " 2b, 4b \n" \ |
283 | " .previous \n" \ | 281 | " .previous \n" \ |
284 | : "=r" (__gu_err), "=&r" (__gu_tmp) \ | 282 | : "=r" (__gu_err), "=&r" (val) \ |
285 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ | 283 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ |
286 | (val) = (__typeof__(*(addr))) __gu_tmp; \ | ||
287 | } | 284 | } |
288 | 285 | ||
289 | /* | 286 | /* |
diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index c1963ce19d..ca46e7cc09 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h | |||
@@ -191,15 +191,6 @@ void memset_io(volatile void __iomem *addr, unsigned char val, int count); | |||
191 | void memcpy_fromio(void *dst, const volatile void __iomem *src, int count); | 191 | void memcpy_fromio(void *dst, const volatile void __iomem *src, int count); |
192 | void memcpy_toio(volatile void __iomem *dst, const void *src, int count); | 192 | void memcpy_toio(volatile void __iomem *dst, const void *src, int count); |
193 | 193 | ||
194 | /* | ||
195 | * XXX - We don't have csum_partial_copy_fromio() yet, so we cheat here and | ||
196 | * just copy it. The net code will then do the checksum later. Presently | ||
197 | * only used by some shared memory 8390 Ethernet cards anyway. | ||
198 | */ | ||
199 | |||
200 | #define eth_io_copy_and_sum(skb,src,len,unused) \ | ||
201 | memcpy_fromio((skb)->data,(src),(len)) | ||
202 | |||
203 | /* Port-space IO */ | 194 | /* Port-space IO */ |
204 | 195 | ||
205 | #define inb_p inb | 196 | #define inb_p inb |
diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h index 0ef15ee0f1..defe752cc9 100644 --- a/include/asm-parisc/mman.h +++ b/include/asm-parisc/mman.h | |||
@@ -55,7 +55,6 @@ | |||
55 | #define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ | 55 | #define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ |
56 | 56 | ||
57 | /* compatibility flags */ | 57 | /* compatibility flags */ |
58 | #define MAP_ANON MAP_ANONYMOUS | ||
59 | #define MAP_FILE 0 | 58 | #define MAP_FILE 0 |
60 | #define MAP_VARIABLE 0 | 59 | #define MAP_VARIABLE 0 |
61 | 60 | ||
diff --git a/include/asm-parisc/termios.h b/include/asm-parisc/termios.h index 6965e8f6c3..5345b34204 100644 --- a/include/asm-parisc/termios.h +++ b/include/asm-parisc/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | 43 | ||
62 | /* intr=^C quit=^\ erase=del kill=^U | 44 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild index 703970fb0e..4869513b87 100644 --- a/include/asm-powerpc/Kbuild +++ b/include/asm-powerpc/Kbuild | |||
@@ -23,6 +23,7 @@ header-y += linkage.h | |||
23 | header-y += resource.h | 23 | header-y += resource.h |
24 | header-y += sigcontext.h | 24 | header-y += sigcontext.h |
25 | header-y += statfs.h | 25 | header-y += statfs.h |
26 | header-y += ps3fb.h | ||
26 | 27 | ||
27 | unifdef-y += a.out.h | 28 | unifdef-y += a.out.h |
28 | unifdef-y += asm-compat.h | 29 | unifdef-y += asm-compat.h |
diff --git a/include/asm-powerpc/floppy.h b/include/asm-powerpc/floppy.h index fd242a2233..a0f14eea1d 100644 --- a/include/asm-powerpc/floppy.h +++ b/include/asm-powerpc/floppy.h | |||
@@ -17,28 +17,115 @@ | |||
17 | #define fd_outb(value,port) outb_p(value,port) | 17 | #define fd_outb(value,port) outb_p(value,port) |
18 | 18 | ||
19 | #define fd_enable_dma() enable_dma(FLOPPY_DMA) | 19 | #define fd_enable_dma() enable_dma(FLOPPY_DMA) |
20 | #define fd_disable_dma() disable_dma(FLOPPY_DMA) | 20 | #define fd_disable_dma() fd_ops->_disable_dma(FLOPPY_DMA) |
21 | #define fd_request_dma() request_dma(FLOPPY_DMA, "floppy") | 21 | #define fd_free_dma() fd_ops->_free_dma(FLOPPY_DMA) |
22 | #define fd_free_dma() free_dma(FLOPPY_DMA) | ||
23 | #define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA) | 22 | #define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA) |
24 | #define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA, mode) | 23 | #define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA, mode) |
25 | #define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA, count) | 24 | #define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA, count) |
25 | #define fd_get_dma_residue() fd_ops->_get_dma_residue(FLOPPY_DMA) | ||
26 | #define fd_enable_irq() enable_irq(FLOPPY_IRQ) | 26 | #define fd_enable_irq() enable_irq(FLOPPY_IRQ) |
27 | #define fd_disable_irq() disable_irq(FLOPPY_IRQ) | 27 | #define fd_disable_irq() disable_irq(FLOPPY_IRQ) |
28 | #define fd_cacheflush(addr,size) /* nothing */ | 28 | #define fd_cacheflush(addr,size) /* nothing */ |
29 | #define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \ | ||
30 | IRQF_DISABLED, "floppy", NULL) | ||
31 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); | 29 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); |
32 | 30 | ||
33 | #ifdef CONFIG_PCI | ||
34 | |||
35 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
36 | #include <asm/ppc-pci.h> /* for ppc64_isabridge_dev */ | 32 | #include <asm/ppc-pci.h> /* for ppc64_isabridge_dev */ |
37 | 33 | ||
38 | #define fd_dma_setup(addr,size,mode,io) powerpc_fd_dma_setup(addr,size,mode,io) | 34 | #define fd_dma_setup(addr,size,mode,io) fd_ops->_dma_setup(addr,size,mode,io) |
35 | |||
36 | static int fd_request_dma(void); | ||
37 | |||
38 | struct fd_dma_ops { | ||
39 | void (*_disable_dma)(unsigned int dmanr); | ||
40 | void (*_free_dma)(unsigned int dmanr); | ||
41 | int (*_get_dma_residue)(unsigned int dummy); | ||
42 | int (*_dma_setup)(char *addr, unsigned long size, int mode, int io); | ||
43 | }; | ||
44 | |||
45 | static int virtual_dma_count; | ||
46 | static int virtual_dma_residue; | ||
47 | static char *virtual_dma_addr; | ||
48 | static int virtual_dma_mode; | ||
49 | static int doing_vdma; | ||
50 | static struct fd_dma_ops *fd_ops; | ||
51 | |||
52 | static irqreturn_t floppy_hardint(int irq, void *dev_id) | ||
53 | { | ||
54 | unsigned char st; | ||
55 | int lcount; | ||
56 | char *lptr; | ||
57 | |||
58 | if (!doing_vdma) | ||
59 | return floppy_interrupt(irq, dev_id); | ||
60 | |||
61 | |||
62 | st = 1; | ||
63 | for (lcount=virtual_dma_count, lptr=virtual_dma_addr; | ||
64 | lcount; lcount--, lptr++) { | ||
65 | st=inb(virtual_dma_port+4) & 0xa0 ; | ||
66 | if (st != 0xa0) | ||
67 | break; | ||
68 | if (virtual_dma_mode) | ||
69 | outb_p(*lptr, virtual_dma_port+5); | ||
70 | else | ||
71 | *lptr = inb_p(virtual_dma_port+5); | ||
72 | } | ||
73 | virtual_dma_count = lcount; | ||
74 | virtual_dma_addr = lptr; | ||
75 | st = inb(virtual_dma_port+4); | ||
76 | |||
77 | if (st == 0x20) | ||
78 | return IRQ_HANDLED; | ||
79 | if (!(st & 0x20)) { | ||
80 | virtual_dma_residue += virtual_dma_count; | ||
81 | virtual_dma_count=0; | ||
82 | doing_vdma = 0; | ||
83 | floppy_interrupt(irq, dev_id); | ||
84 | return IRQ_HANDLED; | ||
85 | } | ||
86 | return IRQ_HANDLED; | ||
87 | } | ||
39 | 88 | ||
40 | static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size, | 89 | static void vdma_disable_dma(unsigned int dummy) |
41 | int mode, int io) | 90 | { |
91 | doing_vdma = 0; | ||
92 | virtual_dma_residue += virtual_dma_count; | ||
93 | virtual_dma_count=0; | ||
94 | } | ||
95 | |||
96 | static void vdma_nop(unsigned int dummy) | ||
97 | { | ||
98 | } | ||
99 | |||
100 | |||
101 | static int vdma_get_dma_residue(unsigned int dummy) | ||
102 | { | ||
103 | return virtual_dma_count + virtual_dma_residue; | ||
104 | } | ||
105 | |||
106 | |||
107 | static int fd_request_irq(void) | ||
108 | { | ||
109 | if (can_use_virtual_dma) | ||
110 | return request_irq(FLOPPY_IRQ, floppy_hardint, | ||
111 | IRQF_DISABLED, "floppy", NULL); | ||
112 | else | ||
113 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | ||
114 | IRQF_DISABLED, "floppy", NULL); | ||
115 | } | ||
116 | |||
117 | static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) | ||
118 | { | ||
119 | doing_vdma = 1; | ||
120 | virtual_dma_port = io; | ||
121 | virtual_dma_mode = (mode == DMA_MODE_WRITE); | ||
122 | virtual_dma_addr = addr; | ||
123 | virtual_dma_count = size; | ||
124 | virtual_dma_residue = 0; | ||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | ||
42 | { | 129 | { |
43 | static unsigned long prev_size; | 130 | static unsigned long prev_size; |
44 | static dma_addr_t bus_addr = 0; | 131 | static dma_addr_t bus_addr = 0; |
@@ -46,6 +133,7 @@ static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size, | |||
46 | static int prev_dir; | 133 | static int prev_dir; |
47 | int dir; | 134 | int dir; |
48 | 135 | ||
136 | doing_vdma = 0; | ||
49 | dir = (mode == DMA_MODE_READ) ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE; | 137 | dir = (mode == DMA_MODE_READ) ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE; |
50 | 138 | ||
51 | if (bus_addr | 139 | if (bus_addr |
@@ -74,11 +162,32 @@ static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size, | |||
74 | return 0; | 162 | return 0; |
75 | } | 163 | } |
76 | 164 | ||
77 | #endif /* CONFIG_PCI */ | 165 | static struct fd_dma_ops real_dma_ops = |
166 | { | ||
167 | ._disable_dma = disable_dma, | ||
168 | ._free_dma = free_dma, | ||
169 | ._get_dma_residue = get_dma_residue, | ||
170 | ._dma_setup = hard_dma_setup | ||
171 | }; | ||
172 | |||
173 | static struct fd_dma_ops virt_dma_ops = | ||
174 | { | ||
175 | ._disable_dma = vdma_disable_dma, | ||
176 | ._free_dma = vdma_nop, | ||
177 | ._get_dma_residue = vdma_get_dma_residue, | ||
178 | ._dma_setup = vdma_dma_setup | ||
179 | }; | ||
78 | 180 | ||
79 | __inline__ void virtual_dma_init(void) | 181 | static int fd_request_dma() |
80 | { | 182 | { |
81 | /* Nothing to do on PowerPC */ | 183 | if (can_use_virtual_dma & 1) { |
184 | fd_ops = &virt_dma_ops; | ||
185 | return 0; | ||
186 | } | ||
187 | else { | ||
188 | fd_ops = &real_dma_ops; | ||
189 | return request_dma(FLOPPY_DMA, "floppy"); | ||
190 | } | ||
82 | } | 191 | } |
83 | 192 | ||
84 | static int FDC1 = 0x3f0; | 193 | static int FDC1 = 0x3f0; |
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h index 4f5a1e01fd..e5982ad465 100644 --- a/include/asm-powerpc/ps3.h +++ b/include/asm-powerpc/ps3.h | |||
@@ -388,4 +388,13 @@ struct ps3_vuart_port_device { | |||
388 | 388 | ||
389 | int ps3_vuart_port_device_register(struct ps3_vuart_port_device *dev); | 389 | int ps3_vuart_port_device_register(struct ps3_vuart_port_device *dev); |
390 | 390 | ||
391 | struct ps3_prealloc { | ||
392 | const char *name; | ||
393 | void *address; | ||
394 | unsigned long size; | ||
395 | unsigned long align; | ||
396 | }; | ||
397 | |||
398 | extern struct ps3_prealloc ps3fb_videomemory; | ||
399 | |||
391 | #endif | 400 | #endif |
diff --git a/include/asm-powerpc/ps3av.h b/include/asm-powerpc/ps3av.h new file mode 100644 index 0000000000..43e90ea961 --- /dev/null +++ b/include/asm-powerpc/ps3av.h | |||
@@ -0,0 +1,738 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Sony Computer Entertainment Inc. | ||
3 | * Copyright 2006, 2007 Sony Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License as published | ||
7 | * by the Free Software Foundation; version 2 of the License. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, but | ||
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | * General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | */ | ||
18 | #ifndef _ASM_POWERPC_PS3AV_H_ | ||
19 | #define _ASM_POWERPC_PS3AV_H_ | ||
20 | |||
21 | #include <linux/mutex.h> | ||
22 | |||
23 | /** command for ioctl() **/ | ||
24 | #define PS3AV_VERSION 0x205 /* version of ps3av command */ | ||
25 | |||
26 | #define PS3AV_CID_AV_INIT 0x00000001 | ||
27 | #define PS3AV_CID_AV_FIN 0x00000002 | ||
28 | #define PS3AV_CID_AV_GET_HW_CONF 0x00000003 | ||
29 | #define PS3AV_CID_AV_GET_MONITOR_INFO 0x00000004 | ||
30 | #define PS3AV_CID_AV_ENABLE_EVENT 0x00000006 | ||
31 | #define PS3AV_CID_AV_DISABLE_EVENT 0x00000007 | ||
32 | #define PS3AV_CID_AV_TV_MUTE 0x0000000a | ||
33 | |||
34 | #define PS3AV_CID_AV_VIDEO_CS 0x00010001 | ||
35 | #define PS3AV_CID_AV_VIDEO_MUTE 0x00010002 | ||
36 | #define PS3AV_CID_AV_VIDEO_DISABLE_SIG 0x00010003 | ||
37 | #define PS3AV_CID_AV_AUDIO_PARAM 0x00020001 | ||
38 | #define PS3AV_CID_AV_AUDIO_MUTE 0x00020002 | ||
39 | #define PS3AV_CID_AV_HDMI_MODE 0x00040001 | ||
40 | |||
41 | #define PS3AV_CID_VIDEO_INIT 0x01000001 | ||
42 | #define PS3AV_CID_VIDEO_MODE 0x01000002 | ||
43 | #define PS3AV_CID_VIDEO_FORMAT 0x01000004 | ||
44 | #define PS3AV_CID_VIDEO_PITCH 0x01000005 | ||
45 | |||
46 | #define PS3AV_CID_AUDIO_INIT 0x02000001 | ||
47 | #define PS3AV_CID_AUDIO_MODE 0x02000002 | ||
48 | #define PS3AV_CID_AUDIO_MUTE 0x02000003 | ||
49 | #define PS3AV_CID_AUDIO_ACTIVE 0x02000004 | ||
50 | #define PS3AV_CID_AUDIO_INACTIVE 0x02000005 | ||
51 | #define PS3AV_CID_AUDIO_SPDIF_BIT 0x02000006 | ||
52 | #define PS3AV_CID_AUDIO_CTRL 0x02000007 | ||
53 | |||
54 | #define PS3AV_CID_EVENT_UNPLUGGED 0x10000001 | ||
55 | #define PS3AV_CID_EVENT_PLUGGED 0x10000002 | ||
56 | #define PS3AV_CID_EVENT_HDCP_DONE 0x10000003 | ||
57 | #define PS3AV_CID_EVENT_HDCP_FAIL 0x10000004 | ||
58 | #define PS3AV_CID_EVENT_HDCP_AUTH 0x10000005 | ||
59 | #define PS3AV_CID_EVENT_HDCP_ERROR 0x10000006 | ||
60 | |||
61 | #define PS3AV_CID_AVB_PARAM 0x04000001 | ||
62 | |||
63 | /* max backend ports */ | ||
64 | #define PS3AV_HDMI_MAX 2 /* HDMI_0 HDMI_1 */ | ||
65 | #define PS3AV_AVMULTI_MAX 1 /* AVMULTI_0 */ | ||
66 | #define PS3AV_AV_PORT_MAX (PS3AV_HDMI_MAX + PS3AV_AVMULTI_MAX) | ||
67 | #define PS3AV_OPT_PORT_MAX 1 /* SPDIF0 */ | ||
68 | #define PS3AV_HEAD_MAX 2 /* HEAD_A HEAD_B */ | ||
69 | |||
70 | /* num of pkt for PS3AV_CID_AVB_PARAM */ | ||
71 | #define PS3AV_AVB_NUM_VIDEO PS3AV_HEAD_MAX | ||
72 | #define PS3AV_AVB_NUM_AUDIO 0 /* not supported */ | ||
73 | #define PS3AV_AVB_NUM_AV_VIDEO PS3AV_AV_PORT_MAX | ||
74 | #define PS3AV_AVB_NUM_AV_AUDIO PS3AV_HDMI_MAX | ||
75 | |||
76 | #define PS3AV_MUTE_PORT_MAX 1 /* num of ports in mute pkt */ | ||
77 | |||
78 | /* event_bit */ | ||
79 | #define PS3AV_CMD_EVENT_BIT_UNPLUGGED (1 << 0) | ||
80 | #define PS3AV_CMD_EVENT_BIT_PLUGGED (1 << 1) | ||
81 | #define PS3AV_CMD_EVENT_BIT_HDCP_DONE (1 << 2) | ||
82 | #define PS3AV_CMD_EVENT_BIT_HDCP_FAIL (1 << 3) | ||
83 | #define PS3AV_CMD_EVENT_BIT_HDCP_REAUTH (1 << 4) | ||
84 | #define PS3AV_CMD_EVENT_BIT_HDCP_TOPOLOGY (1 << 5) | ||
85 | |||
86 | /* common params */ | ||
87 | /* mute */ | ||
88 | #define PS3AV_CMD_MUTE_OFF 0x0000 | ||
89 | #define PS3AV_CMD_MUTE_ON 0x0001 | ||
90 | /* avport */ | ||
91 | #define PS3AV_CMD_AVPORT_HDMI_0 0x0000 | ||
92 | #define PS3AV_CMD_AVPORT_HDMI_1 0x0001 | ||
93 | #define PS3AV_CMD_AVPORT_AVMULTI_0 0x0010 | ||
94 | #define PS3AV_CMD_AVPORT_SPDIF_0 0x0020 | ||
95 | #define PS3AV_CMD_AVPORT_SPDIF_1 0x0021 | ||
96 | |||
97 | /* for av backend */ | ||
98 | /* av_mclk */ | ||
99 | #define PS3AV_CMD_AV_MCLK_128 0x0000 | ||
100 | #define PS3AV_CMD_AV_MCLK_256 0x0001 | ||
101 | #define PS3AV_CMD_AV_MCLK_512 0x0003 | ||
102 | /* av_inputlen */ | ||
103 | #define PS3AV_CMD_AV_INPUTLEN_16 0x02 | ||
104 | #define PS3AV_CMD_AV_INPUTLEN_20 0x0a | ||
105 | #define PS3AV_CMD_AV_INPUTLEN_24 0x0b | ||
106 | /* alayout */ | ||
107 | #define PS3AV_CMD_AV_LAYOUT_32 (1 << 0) | ||
108 | #define PS3AV_CMD_AV_LAYOUT_44 (1 << 1) | ||
109 | #define PS3AV_CMD_AV_LAYOUT_48 (1 << 2) | ||
110 | #define PS3AV_CMD_AV_LAYOUT_88 (1 << 3) | ||
111 | #define PS3AV_CMD_AV_LAYOUT_96 (1 << 4) | ||
112 | #define PS3AV_CMD_AV_LAYOUT_176 (1 << 5) | ||
113 | #define PS3AV_CMD_AV_LAYOUT_192 (1 << 6) | ||
114 | /* hdmi_mode */ | ||
115 | #define PS3AV_CMD_AV_HDMI_MODE_NORMAL 0xff | ||
116 | #define PS3AV_CMD_AV_HDMI_HDCP_OFF 0x01 | ||
117 | #define PS3AV_CMD_AV_HDMI_EDID_PASS 0x80 | ||
118 | #define PS3AV_CMD_AV_HDMI_DVI 0x40 | ||
119 | |||
120 | /* for video module */ | ||
121 | /* video_head */ | ||
122 | #define PS3AV_CMD_VIDEO_HEAD_A 0x0000 | ||
123 | #define PS3AV_CMD_VIDEO_HEAD_B 0x0001 | ||
124 | /* video_cs_out video_cs_in */ | ||
125 | #define PS3AV_CMD_VIDEO_CS_NONE 0x0000 | ||
126 | #define PS3AV_CMD_VIDEO_CS_RGB_8 0x0001 | ||
127 | #define PS3AV_CMD_VIDEO_CS_YUV444_8 0x0002 | ||
128 | #define PS3AV_CMD_VIDEO_CS_YUV422_8 0x0003 | ||
129 | #define PS3AV_CMD_VIDEO_CS_XVYCC_8 0x0004 | ||
130 | #define PS3AV_CMD_VIDEO_CS_RGB_10 0x0005 | ||
131 | #define PS3AV_CMD_VIDEO_CS_YUV444_10 0x0006 | ||
132 | #define PS3AV_CMD_VIDEO_CS_YUV422_10 0x0007 | ||
133 | #define PS3AV_CMD_VIDEO_CS_XVYCC_10 0x0008 | ||
134 | #define PS3AV_CMD_VIDEO_CS_RGB_12 0x0009 | ||
135 | #define PS3AV_CMD_VIDEO_CS_YUV444_12 0x000a | ||
136 | #define PS3AV_CMD_VIDEO_CS_YUV422_12 0x000b | ||
137 | #define PS3AV_CMD_VIDEO_CS_XVYCC_12 0x000c | ||
138 | /* video_vid */ | ||
139 | #define PS3AV_CMD_VIDEO_VID_NONE 0x0000 | ||
140 | #define PS3AV_CMD_VIDEO_VID_480I 0x0001 | ||
141 | #define PS3AV_CMD_VIDEO_VID_576I 0x0003 | ||
142 | #define PS3AV_CMD_VIDEO_VID_480P 0x0005 | ||
143 | #define PS3AV_CMD_VIDEO_VID_576P 0x0006 | ||
144 | #define PS3AV_CMD_VIDEO_VID_1080I_60HZ 0x0007 | ||
145 | #define PS3AV_CMD_VIDEO_VID_1080I_50HZ 0x0008 | ||
146 | #define PS3AV_CMD_VIDEO_VID_720P_60HZ 0x0009 | ||
147 | #define PS3AV_CMD_VIDEO_VID_720P_50HZ 0x000a | ||
148 | #define PS3AV_CMD_VIDEO_VID_1080P_60HZ 0x000b | ||
149 | #define PS3AV_CMD_VIDEO_VID_1080P_50HZ 0x000c | ||
150 | #define PS3AV_CMD_VIDEO_VID_WXGA 0x000d | ||
151 | #define PS3AV_CMD_VIDEO_VID_SXGA 0x000e | ||
152 | #define PS3AV_CMD_VIDEO_VID_WUXGA 0x000f | ||
153 | #define PS3AV_CMD_VIDEO_VID_480I_A 0x0010 | ||
154 | /* video_format */ | ||
155 | #define PS3AV_CMD_VIDEO_FORMAT_BLACK 0x0000 | ||
156 | #define PS3AV_CMD_VIDEO_FORMAT_ARGB_8BIT 0x0007 | ||
157 | /* video_order */ | ||
158 | #define PS3AV_CMD_VIDEO_ORDER_RGB 0x0000 | ||
159 | #define PS3AV_CMD_VIDEO_ORDER_BGR 0x0001 | ||
160 | /* video_fmt */ | ||
161 | #define PS3AV_CMD_VIDEO_FMT_X8R8G8B8 0x0000 | ||
162 | /* video_out_format */ | ||
163 | #define PS3AV_CMD_VIDEO_OUT_FORMAT_RGB_12BIT 0x0000 | ||
164 | /* video_sync */ | ||
165 | #define PS3AV_CMD_VIDEO_SYNC_VSYNC 0x0001 | ||
166 | #define PS3AV_CMD_VIDEO_SYNC_CSYNC 0x0004 | ||
167 | #define PS3AV_CMD_VIDEO_SYNC_HSYNC 0x0010 | ||
168 | |||
169 | /* for audio module */ | ||
170 | /* num_of_ch */ | ||
171 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_2 0x0000 | ||
172 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_3 0x0001 | ||
173 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_4 0x0002 | ||
174 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_5 0x0003 | ||
175 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_6 0x0004 | ||
176 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_7 0x0005 | ||
177 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_8 0x0006 | ||
178 | /* audio_fs */ | ||
179 | #define PS3AV_CMD_AUDIO_FS_32K 0x0001 | ||
180 | #define PS3AV_CMD_AUDIO_FS_44K 0x0002 | ||
181 | #define PS3AV_CMD_AUDIO_FS_48K 0x0003 | ||
182 | #define PS3AV_CMD_AUDIO_FS_88K 0x0004 | ||
183 | #define PS3AV_CMD_AUDIO_FS_96K 0x0005 | ||
184 | #define PS3AV_CMD_AUDIO_FS_176K 0x0006 | ||
185 | #define PS3AV_CMD_AUDIO_FS_192K 0x0007 | ||
186 | /* audio_word_bits */ | ||
187 | #define PS3AV_CMD_AUDIO_WORD_BITS_16 0x0001 | ||
188 | #define PS3AV_CMD_AUDIO_WORD_BITS_20 0x0002 | ||
189 | #define PS3AV_CMD_AUDIO_WORD_BITS_24 0x0003 | ||
190 | /* audio_format */ | ||
191 | #define PS3AV_CMD_AUDIO_FORMAT_PCM 0x0001 | ||
192 | #define PS3AV_CMD_AUDIO_FORMAT_BITSTREAM 0x00ff | ||
193 | /* audio_source */ | ||
194 | #define PS3AV_CMD_AUDIO_SOURCE_SERIAL 0x0000 | ||
195 | #define PS3AV_CMD_AUDIO_SOURCE_SPDIF 0x0001 | ||
196 | /* audio_swap */ | ||
197 | #define PS3AV_CMD_AUDIO_SWAP_0 0x0000 | ||
198 | #define PS3AV_CMD_AUDIO_SWAP_1 0x0000 | ||
199 | /* audio_map */ | ||
200 | #define PS3AV_CMD_AUDIO_MAP_OUTPUT_0 0x0000 | ||
201 | #define PS3AV_CMD_AUDIO_MAP_OUTPUT_1 0x0001 | ||
202 | #define PS3AV_CMD_AUDIO_MAP_OUTPUT_2 0x0002 | ||
203 | #define PS3AV_CMD_AUDIO_MAP_OUTPUT_3 0x0003 | ||
204 | /* audio_layout */ | ||
205 | #define PS3AV_CMD_AUDIO_LAYOUT_2CH 0x0000 | ||
206 | #define PS3AV_CMD_AUDIO_LAYOUT_6CH 0x000b /* LREClr */ | ||
207 | #define PS3AV_CMD_AUDIO_LAYOUT_8CH 0x001f /* LREClrXY */ | ||
208 | /* audio_downmix */ | ||
209 | #define PS3AV_CMD_AUDIO_DOWNMIX_PERMITTED 0x0000 | ||
210 | #define PS3AV_CMD_AUDIO_DOWNMIX_PROHIBITED 0x0001 | ||
211 | |||
212 | /* audio_port */ | ||
213 | #define PS3AV_CMD_AUDIO_PORT_HDMI_0 ( 1 << 0 ) | ||
214 | #define PS3AV_CMD_AUDIO_PORT_HDMI_1 ( 1 << 1 ) | ||
215 | #define PS3AV_CMD_AUDIO_PORT_AVMULTI_0 ( 1 << 10 ) | ||
216 | #define PS3AV_CMD_AUDIO_PORT_SPDIF_0 ( 1 << 20 ) | ||
217 | #define PS3AV_CMD_AUDIO_PORT_SPDIF_1 ( 1 << 21 ) | ||
218 | |||
219 | /* audio_ctrl_id */ | ||
220 | #define PS3AV_CMD_AUDIO_CTRL_ID_DAC_RESET 0x0000 | ||
221 | #define PS3AV_CMD_AUDIO_CTRL_ID_DAC_DE_EMPHASIS 0x0001 | ||
222 | #define PS3AV_CMD_AUDIO_CTRL_ID_AVCLK 0x0002 | ||
223 | /* audio_ctrl_data[0] reset */ | ||
224 | #define PS3AV_CMD_AUDIO_CTRL_RESET_NEGATE 0x0000 | ||
225 | #define PS3AV_CMD_AUDIO_CTRL_RESET_ASSERT 0x0001 | ||
226 | /* audio_ctrl_data[0] de-emphasis */ | ||
227 | #define PS3AV_CMD_AUDIO_CTRL_DE_EMPHASIS_OFF 0x0000 | ||
228 | #define PS3AV_CMD_AUDIO_CTRL_DE_EMPHASIS_ON 0x0001 | ||
229 | /* audio_ctrl_data[0] avclk */ | ||
230 | #define PS3AV_CMD_AUDIO_CTRL_AVCLK_22 0x0000 | ||
231 | #define PS3AV_CMD_AUDIO_CTRL_AVCLK_18 0x0001 | ||
232 | |||
233 | /* av_vid */ | ||
234 | /* do not use these params directly, use vid_video2av */ | ||
235 | #define PS3AV_CMD_AV_VID_480I 0x0000 | ||
236 | #define PS3AV_CMD_AV_VID_480P 0x0001 | ||
237 | #define PS3AV_CMD_AV_VID_720P_60HZ 0x0002 | ||
238 | #define PS3AV_CMD_AV_VID_1080I_60HZ 0x0003 | ||
239 | #define PS3AV_CMD_AV_VID_1080P_60HZ 0x0004 | ||
240 | #define PS3AV_CMD_AV_VID_576I 0x0005 | ||
241 | #define PS3AV_CMD_AV_VID_576P 0x0006 | ||
242 | #define PS3AV_CMD_AV_VID_720P_50HZ 0x0007 | ||
243 | #define PS3AV_CMD_AV_VID_1080I_50HZ 0x0008 | ||
244 | #define PS3AV_CMD_AV_VID_1080P_50HZ 0x0009 | ||
245 | #define PS3AV_CMD_AV_VID_WXGA 0x000a | ||
246 | #define PS3AV_CMD_AV_VID_SXGA 0x000b | ||
247 | #define PS3AV_CMD_AV_VID_WUXGA 0x000c | ||
248 | /* av_cs_out av_cs_in */ | ||
249 | /* use cs_video2av() */ | ||
250 | #define PS3AV_CMD_AV_CS_RGB_8 0x0000 | ||
251 | #define PS3AV_CMD_AV_CS_YUV444_8 0x0001 | ||
252 | #define PS3AV_CMD_AV_CS_YUV422_8 0x0002 | ||
253 | #define PS3AV_CMD_AV_CS_XVYCC_8 0x0003 | ||
254 | #define PS3AV_CMD_AV_CS_RGB_10 0x0004 | ||
255 | #define PS3AV_CMD_AV_CS_YUV444_10 0x0005 | ||
256 | #define PS3AV_CMD_AV_CS_YUV422_10 0x0006 | ||
257 | #define PS3AV_CMD_AV_CS_XVYCC_10 0x0007 | ||
258 | #define PS3AV_CMD_AV_CS_RGB_12 0x0008 | ||
259 | #define PS3AV_CMD_AV_CS_YUV444_12 0x0009 | ||
260 | #define PS3AV_CMD_AV_CS_YUV422_12 0x000a | ||
261 | #define PS3AV_CMD_AV_CS_XVYCC_12 0x000b | ||
262 | #define PS3AV_CMD_AV_CS_8 0x0000 | ||
263 | #define PS3AV_CMD_AV_CS_10 0x0001 | ||
264 | #define PS3AV_CMD_AV_CS_12 0x0002 | ||
265 | /* dither */ | ||
266 | #define PS3AV_CMD_AV_DITHER_OFF 0x0000 | ||
267 | #define PS3AV_CMD_AV_DITHER_ON 0x0001 | ||
268 | #define PS3AV_CMD_AV_DITHER_8BIT 0x0000 | ||
269 | #define PS3AV_CMD_AV_DITHER_10BIT 0x0002 | ||
270 | #define PS3AV_CMD_AV_DITHER_12BIT 0x0004 | ||
271 | /* super_white */ | ||
272 | #define PS3AV_CMD_AV_SUPER_WHITE_OFF 0x0000 | ||
273 | #define PS3AV_CMD_AV_SUPER_WHITE_ON 0x0001 | ||
274 | /* aspect */ | ||
275 | #define PS3AV_CMD_AV_ASPECT_16_9 0x0000 | ||
276 | #define PS3AV_CMD_AV_ASPECT_4_3 0x0001 | ||
277 | /* video_cs_cnv() */ | ||
278 | #define PS3AV_CMD_VIDEO_CS_RGB 0x0001 | ||
279 | #define PS3AV_CMD_VIDEO_CS_YUV422 0x0002 | ||
280 | #define PS3AV_CMD_VIDEO_CS_YUV444 0x0003 | ||
281 | |||
282 | /* for automode */ | ||
283 | #define PS3AV_RESBIT_720x480P 0x0003 /* 0x0001 | 0x0002 */ | ||
284 | #define PS3AV_RESBIT_720x576P 0x0003 /* 0x0001 | 0x0002 */ | ||
285 | #define PS3AV_RESBIT_1280x720P 0x0004 | ||
286 | #define PS3AV_RESBIT_1920x1080I 0x0008 | ||
287 | #define PS3AV_RESBIT_1920x1080P 0x4000 | ||
288 | #define PS3AV_RES_MASK_60 (PS3AV_RESBIT_720x480P \ | ||
289 | | PS3AV_RESBIT_1280x720P \ | ||
290 | | PS3AV_RESBIT_1920x1080I \ | ||
291 | | PS3AV_RESBIT_1920x1080P) | ||
292 | #define PS3AV_RES_MASK_50 (PS3AV_RESBIT_720x576P \ | ||
293 | | PS3AV_RESBIT_1280x720P \ | ||
294 | | PS3AV_RESBIT_1920x1080I \ | ||
295 | | PS3AV_RESBIT_1920x1080P) | ||
296 | |||
297 | #define PS3AV_MONITOR_TYPE_HDMI 1 /* HDMI */ | ||
298 | #define PS3AV_MONITOR_TYPE_DVI 2 /* DVI */ | ||
299 | #define PS3AV_DEFAULT_HDMI_VID_REG_60 PS3AV_CMD_VIDEO_VID_480P | ||
300 | #define PS3AV_DEFAULT_AVMULTI_VID_REG_60 PS3AV_CMD_VIDEO_VID_480I | ||
301 | #define PS3AV_DEFAULT_HDMI_VID_REG_50 PS3AV_CMD_VIDEO_VID_576P | ||
302 | #define PS3AV_DEFAULT_AVMULTI_VID_REG_50 PS3AV_CMD_VIDEO_VID_576I | ||
303 | #define PS3AV_DEFAULT_DVI_VID PS3AV_CMD_VIDEO_VID_480P | ||
304 | |||
305 | #define PS3AV_REGION_60 0x01 | ||
306 | #define PS3AV_REGION_50 0x02 | ||
307 | #define PS3AV_REGION_RGB 0x10 | ||
308 | |||
309 | #define get_status(buf) (((__u32 *)buf)[2]) | ||
310 | #define PS3AV_HDR_SIZE 4 /* version + size */ | ||
311 | |||
312 | /* for video mode */ | ||
313 | #define PS3AV_MODE_MASK 0x000F | ||
314 | #define PS3AV_MODE_HDCP_OFF 0x1000 /* Retail PS3 product doesn't support this */ | ||
315 | #define PS3AV_MODE_DITHER 0x0800 | ||
316 | #define PS3AV_MODE_FULL 0x0080 | ||
317 | #define PS3AV_MODE_DVI 0x0040 | ||
318 | #define PS3AV_MODE_RGB 0x0020 | ||
319 | |||
320 | |||
321 | /** command packet structure **/ | ||
322 | struct ps3av_send_hdr { | ||
323 | u16 version; | ||
324 | u16 size; /* size of command packet */ | ||
325 | u32 cid; /* command id */ | ||
326 | }; | ||
327 | |||
328 | struct ps3av_reply_hdr { | ||
329 | u16 version; | ||
330 | u16 size; | ||
331 | u32 cid; | ||
332 | u32 status; | ||
333 | }; | ||
334 | |||
335 | /* backend: initialization */ | ||
336 | struct ps3av_pkt_av_init { | ||
337 | struct ps3av_send_hdr send_hdr; | ||
338 | u32 event_bit; | ||
339 | }; | ||
340 | |||
341 | /* backend: finalize */ | ||
342 | struct ps3av_pkt_av_fin { | ||
343 | struct ps3av_send_hdr send_hdr; | ||
344 | /* recv */ | ||
345 | u32 reserved; | ||
346 | }; | ||
347 | |||
348 | /* backend: get port */ | ||
349 | struct ps3av_pkt_av_get_hw_conf { | ||
350 | struct ps3av_send_hdr send_hdr; | ||
351 | /* recv */ | ||
352 | u32 status; | ||
353 | u16 num_of_hdmi; /* out: number of hdmi */ | ||
354 | u16 num_of_avmulti; /* out: number of avmulti */ | ||
355 | u16 num_of_spdif; /* out: number of hdmi */ | ||
356 | u16 reserved; | ||
357 | }; | ||
358 | |||
359 | /* backend: get monitor info */ | ||
360 | struct ps3av_info_resolution { | ||
361 | u32 res_bits; | ||
362 | u32 native; | ||
363 | }; | ||
364 | |||
365 | struct ps3av_info_cs { | ||
366 | u8 rgb; | ||
367 | u8 yuv444; | ||
368 | u8 yuv422; | ||
369 | u8 reserved; | ||
370 | }; | ||
371 | |||
372 | struct ps3av_info_color { | ||
373 | u16 red_x; | ||
374 | u16 red_y; | ||
375 | u16 green_x; | ||
376 | u16 green_y; | ||
377 | u16 blue_x; | ||
378 | u16 blue_y; | ||
379 | u16 white_x; | ||
380 | u16 white_y; | ||
381 | u32 gamma; | ||
382 | }; | ||
383 | |||
384 | struct ps3av_info_audio { | ||
385 | u8 type; | ||
386 | u8 max_num_of_ch; | ||
387 | u8 fs; | ||
388 | u8 sbit; | ||
389 | }; | ||
390 | |||
391 | struct ps3av_info_monitor { | ||
392 | u8 avport; | ||
393 | u8 monitor_id[10]; | ||
394 | u8 monitor_type; | ||
395 | u8 monitor_name[16]; | ||
396 | struct ps3av_info_resolution res_60; | ||
397 | struct ps3av_info_resolution res_50; | ||
398 | struct ps3av_info_resolution res_other; | ||
399 | struct ps3av_info_resolution res_vesa; | ||
400 | struct ps3av_info_cs cs; | ||
401 | struct ps3av_info_color color; | ||
402 | u8 supported_ai; | ||
403 | u8 speaker_info; | ||
404 | u8 num_of_audio_block; | ||
405 | struct ps3av_info_audio audio[0]; /* 0 or more audio blocks */ | ||
406 | u8 reserved[169]; | ||
407 | } __attribute__ ((packed)); | ||
408 | |||
409 | struct ps3av_pkt_av_get_monitor_info { | ||
410 | struct ps3av_send_hdr send_hdr; | ||
411 | u16 avport; /* in: avport */ | ||
412 | u16 reserved; | ||
413 | /* recv */ | ||
414 | struct ps3av_info_monitor info; /* out: monitor info */ | ||
415 | }; | ||
416 | |||
417 | /* backend: enable/disable event */ | ||
418 | struct ps3av_pkt_av_event { | ||
419 | struct ps3av_send_hdr send_hdr; | ||
420 | u32 event_bit; /* in */ | ||
421 | }; | ||
422 | |||
423 | /* backend: video cs param */ | ||
424 | struct ps3av_pkt_av_video_cs { | ||
425 | struct ps3av_send_hdr send_hdr; | ||
426 | u16 avport; /* in: avport */ | ||
427 | u16 av_vid; /* in: video resolution */ | ||
428 | u16 av_cs_out; /* in: output color space */ | ||
429 | u16 av_cs_in; /* in: input color space */ | ||
430 | u8 dither; /* in: dither bit length */ | ||
431 | u8 bitlen_out; /* in: bit length */ | ||
432 | u8 super_white; /* in: super white */ | ||
433 | u8 aspect; /* in: aspect ratio */ | ||
434 | }; | ||
435 | |||
436 | /* backend: video mute */ | ||
437 | struct ps3av_av_mute { | ||
438 | u16 avport; /* in: avport */ | ||
439 | u16 mute; /* in: mute on/off */ | ||
440 | }; | ||
441 | |||
442 | struct ps3av_pkt_av_video_mute { | ||
443 | struct ps3av_send_hdr send_hdr; | ||
444 | struct ps3av_av_mute mute[PS3AV_MUTE_PORT_MAX]; | ||
445 | }; | ||
446 | |||
447 | /* backend: video disable signal */ | ||
448 | struct ps3av_pkt_av_video_disable_sig { | ||
449 | struct ps3av_send_hdr send_hdr; | ||
450 | u16 avport; /* in: avport */ | ||
451 | u16 reserved; | ||
452 | }; | ||
453 | |||
454 | /* backend: audio param */ | ||
455 | struct ps3av_audio_info_frame { | ||
456 | struct pb1_bit { | ||
457 | u8 ct:4; | ||
458 | u8 rsv:1; | ||
459 | u8 cc:3; | ||
460 | } pb1; | ||
461 | struct pb2_bit { | ||
462 | u8 rsv:3; | ||
463 | u8 sf:3; | ||
464 | u8 ss:2; | ||
465 | } pb2; | ||
466 | u8 pb3; | ||
467 | u8 pb4; | ||
468 | struct pb5_bit { | ||
469 | u8 dm:1; | ||
470 | u8 lsv:4; | ||
471 | u8 rsv:3; | ||
472 | } pb5; | ||
473 | }; | ||
474 | |||
475 | struct ps3av_pkt_av_audio_param { | ||
476 | struct ps3av_send_hdr send_hdr; | ||
477 | u16 avport; /* in: avport */ | ||
478 | u16 reserved; | ||
479 | u8 mclk; /* in: audio mclk */ | ||
480 | u8 ns[3]; /* in: audio ns val */ | ||
481 | u8 enable; /* in: audio enable */ | ||
482 | u8 swaplr; /* in: audio swap */ | ||
483 | u8 fifomap; /* in: audio fifomap */ | ||
484 | u8 inputctrl; /* in: audio input ctrl */ | ||
485 | u8 inputlen; /* in: sample bit size */ | ||
486 | u8 layout; /* in: speaker layout param */ | ||
487 | struct ps3av_audio_info_frame info; /* in: info */ | ||
488 | u8 chstat[5]; /* in: ch stat */ | ||
489 | }; | ||
490 | |||
491 | /* backend: audio_mute */ | ||
492 | struct ps3av_pkt_av_audio_mute { | ||
493 | struct ps3av_send_hdr send_hdr; | ||
494 | struct ps3av_av_mute mute[PS3AV_MUTE_PORT_MAX]; | ||
495 | }; | ||
496 | |||
497 | /* backend: hdmi_mode */ | ||
498 | struct ps3av_pkt_av_hdmi_mode { | ||
499 | struct ps3av_send_hdr send_hdr; | ||
500 | u8 mode; /* in: hdmi_mode */ | ||
501 | u8 reserved0; | ||
502 | u8 reserved1; | ||
503 | u8 reserved2; | ||
504 | }; | ||
505 | |||
506 | /* backend: tv_mute */ | ||
507 | struct ps3av_pkt_av_tv_mute { | ||
508 | struct ps3av_send_hdr send_hdr; | ||
509 | u16 avport; /* in: avport HDMI only */ | ||
510 | u16 mute; /* in: mute */ | ||
511 | }; | ||
512 | |||
513 | /* video: initialize */ | ||
514 | struct ps3av_pkt_video_init { | ||
515 | struct ps3av_send_hdr send_hdr; | ||
516 | /* recv */ | ||
517 | u32 reserved; | ||
518 | }; | ||
519 | |||
520 | /* video: mode setting */ | ||
521 | struct ps3av_pkt_video_mode { | ||
522 | struct ps3av_send_hdr send_hdr; | ||
523 | u32 video_head; /* in: head */ | ||
524 | u32 reserved; | ||
525 | u32 video_vid; /* in: video resolution */ | ||
526 | u16 reserved1; | ||
527 | u16 width; /* in: width in pixel */ | ||
528 | u16 reserved2; | ||
529 | u16 height; /* in: height in pixel */ | ||
530 | u32 pitch; /* in: line size in byte */ | ||
531 | u32 video_out_format; /* in: out format */ | ||
532 | u32 video_format; /* in: input frame buffer format */ | ||
533 | u8 reserved3; | ||
534 | u8 reserved4; | ||
535 | u16 video_order; /* in: input RGB order */ | ||
536 | u32 reserved5; | ||
537 | }; | ||
538 | |||
539 | /* video: format */ | ||
540 | struct ps3av_pkt_video_format { | ||
541 | struct ps3av_send_hdr send_hdr; | ||
542 | u32 video_head; /* in: head */ | ||
543 | u32 video_format; /* in: frame buffer format */ | ||
544 | u16 reserved; | ||
545 | u16 video_order; /* in: input RGB order */ | ||
546 | }; | ||
547 | |||
548 | /* video: pitch */ | ||
549 | struct ps3av_pkt_video_pitch { | ||
550 | u16 version; | ||
551 | u16 size; /* size of command packet */ | ||
552 | u32 cid; /* command id */ | ||
553 | u32 video_head; /* in: head */ | ||
554 | u32 pitch; /* in: line size in byte */ | ||
555 | }; | ||
556 | |||
557 | /* audio: initialize */ | ||
558 | struct ps3av_pkt_audio_init { | ||
559 | struct ps3av_send_hdr send_hdr; | ||
560 | /* recv */ | ||
561 | u32 reserved; | ||
562 | }; | ||
563 | |||
564 | /* audio: mode setting */ | ||
565 | struct ps3av_pkt_audio_mode { | ||
566 | struct ps3av_send_hdr send_hdr; | ||
567 | u8 avport; /* in: avport */ | ||
568 | u8 reserved0[3]; | ||
569 | u32 mask; /* in: mask */ | ||
570 | u32 audio_num_of_ch; /* in: number of ch */ | ||
571 | u32 audio_fs; /* in: sampling freq */ | ||
572 | u32 audio_word_bits; /* in: sample bit size */ | ||
573 | u32 audio_format; /* in: audio output format */ | ||
574 | u32 audio_source; /* in: audio source */ | ||
575 | u8 audio_enable[4]; /* in: audio enable */ | ||
576 | u8 audio_swap[4]; /* in: audio swap */ | ||
577 | u8 audio_map[4]; /* in: audio map */ | ||
578 | u32 audio_layout; /* in: speaker layout */ | ||
579 | u32 audio_downmix; /* in: audio downmix permission */ | ||
580 | u32 audio_downmix_level; | ||
581 | u8 audio_cs_info[8]; /* in: IEC channel status */ | ||
582 | }; | ||
583 | |||
584 | /* audio: mute */ | ||
585 | struct ps3av_audio_mute { | ||
586 | u8 avport; /* in: opt_port optical */ | ||
587 | u8 reserved[3]; | ||
588 | u32 mute; /* in: mute */ | ||
589 | }; | ||
590 | |||
591 | struct ps3av_pkt_audio_mute { | ||
592 | struct ps3av_send_hdr send_hdr; | ||
593 | struct ps3av_audio_mute mute[PS3AV_OPT_PORT_MAX]; | ||
594 | }; | ||
595 | |||
596 | /* audio: active/inactive */ | ||
597 | struct ps3av_pkt_audio_active { | ||
598 | struct ps3av_send_hdr send_hdr; | ||
599 | u32 audio_port; /* in: audio active/inactive port */ | ||
600 | }; | ||
601 | |||
602 | /* audio: SPDIF user bit */ | ||
603 | struct ps3av_pkt_audio_spdif_bit { | ||
604 | u16 version; | ||
605 | u16 size; /* size of command packet */ | ||
606 | u32 cid; /* command id */ | ||
607 | u8 avport; /* in: avport SPDIF only */ | ||
608 | u8 reserved[3]; | ||
609 | u32 audio_port; /* in: SPDIF only */ | ||
610 | u32 spdif_bit_data[12]; /* in: user bit data */ | ||
611 | }; | ||
612 | |||
613 | /* audio: audio control */ | ||
614 | struct ps3av_pkt_audio_ctrl { | ||
615 | u16 version; | ||
616 | u16 size; /* size of command packet */ | ||
617 | u32 cid; /* command id */ | ||
618 | u32 audio_ctrl_id; /* in: control id */ | ||
619 | u32 audio_ctrl_data[4]; /* in: control data */ | ||
620 | }; | ||
621 | |||
622 | /* avb:param */ | ||
623 | #define PS3AV_PKT_AVB_PARAM_MAX_BUF_SIZE \ | ||
624 | (PS3AV_AVB_NUM_VIDEO*sizeof(struct ps3av_pkt_video_mode) + \ | ||
625 | PS3AV_AVB_NUM_AUDIO*sizeof(struct ps3av_pkt_audio_mode) + \ | ||
626 | PS3AV_AVB_NUM_AV_VIDEO*sizeof(struct ps3av_pkt_av_video_cs) + \ | ||
627 | PS3AV_AVB_NUM_AV_AUDIO*sizeof(struct ps3av_pkt_av_audio_param)) | ||
628 | |||
629 | struct ps3av_pkt_avb_param { | ||
630 | struct ps3av_send_hdr send_hdr; | ||
631 | u16 num_of_video_pkt; | ||
632 | u16 num_of_audio_pkt; | ||
633 | u16 num_of_av_video_pkt; | ||
634 | u16 num_of_av_audio_pkt; | ||
635 | /* | ||
636 | * The actual buffer layout depends on the fields above: | ||
637 | * | ||
638 | * struct ps3av_pkt_video_mode video[num_of_video_pkt]; | ||
639 | * struct ps3av_pkt_audio_mode audio[num_of_audio_pkt]; | ||
640 | * struct ps3av_pkt_av_video_cs av_video[num_of_av_video_pkt]; | ||
641 | * struct ps3av_pkt_av_audio_param av_audio[num_of_av_audio_pkt]; | ||
642 | */ | ||
643 | u8 buf[PS3AV_PKT_AVB_PARAM_MAX_BUF_SIZE]; | ||
644 | }; | ||
645 | |||
646 | struct ps3av { | ||
647 | int available; | ||
648 | struct semaphore sem; | ||
649 | struct semaphore ping; | ||
650 | struct semaphore pong; | ||
651 | struct mutex mutex; | ||
652 | int open_count; | ||
653 | struct ps3_vuart_port_device *dev; | ||
654 | |||
655 | int region; | ||
656 | struct ps3av_pkt_av_get_hw_conf av_hw_conf; | ||
657 | u32 av_port[PS3AV_AV_PORT_MAX + PS3AV_OPT_PORT_MAX]; | ||
658 | u32 opt_port[PS3AV_OPT_PORT_MAX]; | ||
659 | u32 head[PS3AV_HEAD_MAX]; | ||
660 | u32 audio_port; | ||
661 | int ps3av_mode; | ||
662 | int ps3av_mode_old; | ||
663 | }; | ||
664 | |||
665 | /** command status **/ | ||
666 | #define PS3AV_STATUS_SUCCESS 0x0000 /* success */ | ||
667 | #define PS3AV_STATUS_RECEIVE_VUART_ERROR 0x0001 /* receive vuart error */ | ||
668 | #define PS3AV_STATUS_SYSCON_COMMUNICATE_FAIL 0x0002 /* syscon communication error */ | ||
669 | #define PS3AV_STATUS_INVALID_COMMAND 0x0003 /* obsolete invalid CID */ | ||
670 | #define PS3AV_STATUS_INVALID_PORT 0x0004 /* invalid port number */ | ||
671 | #define PS3AV_STATUS_INVALID_VID 0x0005 /* invalid video format */ | ||
672 | #define PS3AV_STATUS_INVALID_COLOR_SPACE 0x0006 /* invalid video colose space */ | ||
673 | #define PS3AV_STATUS_INVALID_FS 0x0007 /* invalid audio sampling freq */ | ||
674 | #define PS3AV_STATUS_INVALID_AUDIO_CH 0x0008 /* invalid audio channel number */ | ||
675 | #define PS3AV_STATUS_UNSUPPORTED_VERSION 0x0009 /* version mismatch */ | ||
676 | #define PS3AV_STATUS_INVALID_SAMPLE_SIZE 0x000a /* invalid audio sample bit size */ | ||
677 | #define PS3AV_STATUS_FAILURE 0x000b /* other failures */ | ||
678 | #define PS3AV_STATUS_UNSUPPORTED_COMMAND 0x000c /* unsupported cid */ | ||
679 | #define PS3AV_STATUS_BUFFER_OVERFLOW 0x000d /* write buffer overflow */ | ||
680 | #define PS3AV_STATUS_INVALID_VIDEO_PARAM 0x000e /* invalid video param */ | ||
681 | #define PS3AV_STATUS_NO_SEL 0x000f /* not exist selector */ | ||
682 | #define PS3AV_STATUS_INVALID_AV_PARAM 0x0010 /* invalid backend param */ | ||
683 | #define PS3AV_STATUS_INVALID_AUDIO_PARAM 0x0011 /* invalid audio param */ | ||
684 | #define PS3AV_STATUS_UNSUPPORTED_HDMI_MODE 0x0012 /* unsupported hdmi mode */ | ||
685 | #define PS3AV_STATUS_NO_SYNC_HEAD 0x0013 /* sync head failed */ | ||
686 | |||
687 | extern void ps3av_set_hdr(u32, u16, struct ps3av_send_hdr *); | ||
688 | extern int ps3av_do_pkt(u32, u16, size_t, struct ps3av_send_hdr *); | ||
689 | |||
690 | extern int ps3av_cmd_init(void); | ||
691 | extern int ps3av_cmd_fin(void); | ||
692 | extern int ps3av_cmd_av_video_mute(int, u32 *, u32); | ||
693 | extern int ps3av_cmd_av_video_disable_sig(u32); | ||
694 | extern int ps3av_cmd_av_tv_mute(u32, u32); | ||
695 | extern int ps3av_cmd_enable_event(void); | ||
696 | extern int ps3av_cmd_av_hdmi_mode(u8); | ||
697 | extern u32 ps3av_cmd_set_av_video_cs(void *, u32, int, int, int, u32); | ||
698 | extern u32 ps3av_cmd_set_video_mode(void *, u32, int, int, u32); | ||
699 | extern int ps3av_cmd_video_format_black(u32, u32, u32); | ||
700 | extern int ps3av_cmd_av_audio_mute(int, u32 *, u32); | ||
701 | extern u32 ps3av_cmd_set_av_audio_param(void *, u32, | ||
702 | const struct ps3av_pkt_audio_mode *, | ||
703 | u32); | ||
704 | extern void ps3av_cmd_set_audio_mode(struct ps3av_pkt_audio_mode *, u32, u32, | ||
705 | u32, u32, u32, u32); | ||
706 | extern int ps3av_cmd_audio_mode(struct ps3av_pkt_audio_mode *); | ||
707 | extern int ps3av_cmd_audio_mute(int, u32 *, u32); | ||
708 | extern int ps3av_cmd_audio_active(int, u32); | ||
709 | extern int ps3av_cmd_avb_param(struct ps3av_pkt_avb_param *, u32); | ||
710 | extern int ps3av_cmd_av_get_hw_conf(struct ps3av_pkt_av_get_hw_conf *); | ||
711 | #ifdef PS3AV_DEBUG | ||
712 | extern void ps3av_cmd_av_hw_conf_dump(const struct ps3av_pkt_av_get_hw_conf *); | ||
713 | extern void ps3av_cmd_av_monitor_info_dump(const struct ps3av_pkt_av_get_monitor_info *); | ||
714 | #else | ||
715 | static inline void ps3av_cmd_av_hw_conf_dump(const struct ps3av_pkt_av_get_hw_conf *hw_conf) {} | ||
716 | static inline void ps3av_cmd_av_monitor_info_dump(const struct ps3av_pkt_av_get_monitor_info *monitor_info) {} | ||
717 | #endif | ||
718 | extern int ps3av_cmd_video_get_monitor_info(struct ps3av_pkt_av_get_monitor_info *, | ||
719 | u32); | ||
720 | |||
721 | extern int ps3av_vuart_write(struct ps3_vuart_port_device *dev, | ||
722 | const void *buf, unsigned long size); | ||
723 | extern int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf, | ||
724 | unsigned long size, int timeout); | ||
725 | |||
726 | extern int ps3av_set_video_mode(u32, int); | ||
727 | extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32); | ||
728 | extern int ps3av_set_mode(u32, int); | ||
729 | extern int ps3av_get_mode(void); | ||
730 | extern int ps3av_get_scanmode(int); | ||
731 | extern int ps3av_get_refresh_rate(int); | ||
732 | extern int ps3av_video_mode2res(u32, u32 *, u32 *); | ||
733 | extern int ps3av_video_mute(int); | ||
734 | extern int ps3av_audio_mute(int); | ||
735 | extern int ps3av_dev_open(void); | ||
736 | extern int ps3av_dev_close(void); | ||
737 | |||
738 | #endif /* _ASM_POWERPC_PS3AV_H_ */ | ||
diff --git a/include/asm-powerpc/ps3fb.h b/include/asm-powerpc/ps3fb.h new file mode 100644 index 0000000000..ad81cf4319 --- /dev/null +++ b/include/asm-powerpc/ps3fb.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Sony Computer Entertainment Inc. | ||
3 | * Copyright 2006, 2007 Sony Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License as published | ||
7 | * by the Free Software Foundation; version 2 of the License. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, but | ||
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | * General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef _ASM_POWERPC_PS3FB_H_ | ||
20 | #define _ASM_POWERPC_PS3FB_H_ | ||
21 | |||
22 | #include <linux/ioctl.h> | ||
23 | |||
24 | /* ioctl */ | ||
25 | #define PS3FB_IOCTL_SETMODE _IOW('r', 1, int) /* set video mode */ | ||
26 | #define PS3FB_IOCTL_GETMODE _IOR('r', 2, int) /* get video mode */ | ||
27 | #define PS3FB_IOCTL_SCREENINFO _IOR('r', 3, int) /* get screen info */ | ||
28 | #define PS3FB_IOCTL_ON _IO('r', 4) /* use IOCTL_FSEL */ | ||
29 | #define PS3FB_IOCTL_OFF _IO('r', 5) /* return to normal-flip */ | ||
30 | #define PS3FB_IOCTL_FSEL _IOW('r', 6, int) /* blit and flip request */ | ||
31 | |||
32 | #ifndef FBIO_WAITFORVSYNC | ||
33 | #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) /* wait for vsync */ | ||
34 | #endif | ||
35 | |||
36 | struct ps3fb_ioctl_res { | ||
37 | __u32 xres; /* frame buffer x_size */ | ||
38 | __u32 yres; /* frame buffer y_size */ | ||
39 | __u32 xoff; /* margine x */ | ||
40 | __u32 yoff; /* margine y */ | ||
41 | __u32 num_frames; /* num of frame buffers */ | ||
42 | }; | ||
43 | |||
44 | #ifdef __KERNEL__ | ||
45 | |||
46 | #ifdef CONFIG_FB_PS3 | ||
47 | extern void ps3fb_flip_ctl(int on); | ||
48 | extern void ps3fb_cleanup(void); | ||
49 | #else | ||
50 | static inline void ps3fb_flip_ctl(int on) {} | ||
51 | static inline void ps3fb_cleanup(void) {} | ||
52 | #endif | ||
53 | |||
54 | #endif /* __KERNEL__ */ | ||
55 | |||
56 | #endif /* _ASM_POWERPC_PS3FB_H_ */ | ||
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h index 97b4354841..418e5c7e97 100644 --- a/include/asm-powerpc/systbl.h +++ b/include/asm-powerpc/systbl.h | |||
@@ -305,3 +305,4 @@ SYSCALL_SPU(faccessat) | |||
305 | COMPAT_SYS_SPU(get_robust_list) | 305 | COMPAT_SYS_SPU(get_robust_list) |
306 | COMPAT_SYS_SPU(set_robust_list) | 306 | COMPAT_SYS_SPU(set_robust_list) |
307 | COMPAT_SYS(move_pages) | 307 | COMPAT_SYS(move_pages) |
308 | SYSCALL_SPU(getcpu) | ||
diff --git a/include/asm-powerpc/termios.h b/include/asm-powerpc/termios.h index 7f80a019b6..2c14fea07c 100644 --- a/include/asm-powerpc/termios.h +++ b/include/asm-powerpc/termios.h | |||
@@ -71,24 +71,6 @@ struct termio { | |||
71 | #define _VEOL2 8 | 71 | #define _VEOL2 8 |
72 | #define _VSWTC 9 | 72 | #define _VSWTC 9 |
73 | 73 | ||
74 | /* line disciplines */ | ||
75 | #define N_TTY 0 | ||
76 | #define N_SLIP 1 | ||
77 | #define N_MOUSE 2 | ||
78 | #define N_PPP 3 | ||
79 | #define N_STRIP 4 | ||
80 | #define N_AX25 5 | ||
81 | #define N_X25 6 /* X.25 async */ | ||
82 | #define N_6PACK 7 | ||
83 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
84 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
85 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
86 | #define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */ | ||
87 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
88 | #define N_HDLC 13 /* synchronous HDLC */ | ||
89 | #define N_SYNC_PPP 14 | ||
90 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
91 | |||
92 | #ifdef __KERNEL__ | 74 | #ifdef __KERNEL__ |
93 | /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ | 75 | /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ |
94 | #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" | 76 | #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" |
diff --git a/include/asm-powerpc/ucc_slow.h b/include/asm-powerpc/ucc_slow.h index ca93bc9923..1babad99c7 100644 --- a/include/asm-powerpc/ucc_slow.h +++ b/include/asm-powerpc/ucc_slow.h | |||
@@ -150,7 +150,7 @@ struct ucc_slow_info { | |||
150 | int ucc_num; | 150 | int ucc_num; |
151 | enum qe_clock rx_clock; | 151 | enum qe_clock rx_clock; |
152 | enum qe_clock tx_clock; | 152 | enum qe_clock tx_clock; |
153 | struct ucc_slow *us_regs; | 153 | struct ucc_slow *regs; |
154 | int irq; | 154 | int irq; |
155 | u16 uccm_mask; | 155 | u16 uccm_mask; |
156 | int data_mem_part; | 156 | int data_mem_part; |
diff --git a/include/asm-powerpc/vdso.h b/include/asm-powerpc/vdso.h index b9f9118b16..26fc449bd9 100644 --- a/include/asm-powerpc/vdso.h +++ b/include/asm-powerpc/vdso.h | |||
@@ -18,16 +18,11 @@ | |||
18 | 18 | ||
19 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
20 | 20 | ||
21 | extern unsigned int vdso64_pages; | ||
22 | extern unsigned int vdso32_pages; | ||
23 | |||
24 | /* Offsets relative to thread->vdso_base */ | 21 | /* Offsets relative to thread->vdso_base */ |
25 | extern unsigned long vdso64_rt_sigtramp; | 22 | extern unsigned long vdso64_rt_sigtramp; |
26 | extern unsigned long vdso32_sigtramp; | 23 | extern unsigned long vdso32_sigtramp; |
27 | extern unsigned long vdso32_rt_sigtramp; | 24 | extern unsigned long vdso32_rt_sigtramp; |
28 | 25 | ||
29 | extern void vdso_init(void); | ||
30 | |||
31 | #else /* __ASSEMBLY__ */ | 26 | #else /* __ASSEMBLY__ */ |
32 | 27 | ||
33 | #ifdef __VDSO64__ | 28 | #ifdef __VDSO64__ |
diff --git a/include/asm-ppc/ibm4xx.h b/include/asm-ppc/ibm4xx.h index 7a64ede53b..92fd02d7b1 100644 --- a/include/asm-ppc/ibm4xx.h +++ b/include/asm-ppc/ibm4xx.h | |||
@@ -109,6 +109,10 @@ void ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
109 | #include <platforms/4xx/ocotea.h> | 109 | #include <platforms/4xx/ocotea.h> |
110 | #endif | 110 | #endif |
111 | 111 | ||
112 | #if defined(CONFIG_TAISHAN) | ||
113 | #include <platforms/4xx/taishan.h> | ||
114 | #endif | ||
115 | |||
112 | #ifndef __ASSEMBLY__ | 116 | #ifndef __ASSEMBLY__ |
113 | #ifdef CONFIG_40x | 117 | #ifdef CONFIG_40x |
114 | /* | 118 | /* |
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h index ccf1a9bb2e..95d590423c 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h | |||
@@ -358,8 +358,6 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int | |||
358 | } | 358 | } |
359 | #endif | 359 | #endif |
360 | 360 | ||
361 | #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(void __iomem *)(b),(c),(d)) | ||
362 | |||
363 | /* | 361 | /* |
364 | * Map in an area of physical address space, for accessing | 362 | * Map in an area of physical address space, for accessing |
365 | * I/O devices etc. | 363 | * I/O devices etc. |
diff --git a/include/asm-s390/ccwdev.h b/include/asm-s390/ccwdev.h index 58c70acffc..cfc81533b9 100644 --- a/include/asm-s390/ccwdev.h +++ b/include/asm-s390/ccwdev.h | |||
@@ -110,7 +110,9 @@ extern void ccw_driver_unregister (struct ccw_driver *driver); | |||
110 | 110 | ||
111 | struct ccw1; | 111 | struct ccw1; |
112 | 112 | ||
113 | extern int ccw_device_set_options_mask(struct ccw_device *, unsigned long); | ||
113 | extern int ccw_device_set_options(struct ccw_device *, unsigned long); | 114 | extern int ccw_device_set_options(struct ccw_device *, unsigned long); |
115 | extern void ccw_device_clear_options(struct ccw_device *, unsigned long); | ||
114 | 116 | ||
115 | /* Allow for i/o completion notification after primary interrupt status. */ | 117 | /* Allow for i/o completion notification after primary interrupt status. */ |
116 | #define CCWDEV_EARLY_NOTIFICATION 0x0001 | 118 | #define CCWDEV_EARLY_NOTIFICATION 0x0001 |
diff --git a/include/asm-s390/io.h b/include/asm-s390/io.h index a4c2d550da..b7ff6afc3c 100644 --- a/include/asm-s390/io.h +++ b/include/asm-s390/io.h | |||
@@ -13,13 +13,10 @@ | |||
13 | 13 | ||
14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | 15 | ||
16 | #include <linux/vmalloc.h> | ||
17 | #include <asm/page.h> | 16 | #include <asm/page.h> |
18 | 17 | ||
19 | #define IO_SPACE_LIMIT 0xffffffff | 18 | #define IO_SPACE_LIMIT 0xffffffff |
20 | 19 | ||
21 | #define __io_virt(x) ((void *)(PAGE_OFFSET | (unsigned long)(x))) | ||
22 | |||
23 | /* | 20 | /* |
24 | * Change virtual addresses to physical addresses and vv. | 21 | * Change virtual addresses to physical addresses and vv. |
25 | * These are pretty trivial | 22 | * These are pretty trivial |
@@ -38,75 +35,9 @@ static inline unsigned long virt_to_phys(volatile void * address) | |||
38 | 35 | ||
39 | static inline void * phys_to_virt(unsigned long address) | 36 | static inline void * phys_to_virt(unsigned long address) |
40 | { | 37 | { |
41 | return __io_virt(address); | 38 | return (void *) address; |
42 | } | ||
43 | |||
44 | extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); | ||
45 | |||
46 | static inline void * ioremap (unsigned long offset, unsigned long size) | ||
47 | { | ||
48 | return __ioremap(offset, size, 0); | ||
49 | } | ||
50 | |||
51 | /* | ||
52 | * This one maps high address device memory and turns off caching for that area. | ||
53 | * it's useful if some control registers are in such an area and write combining | ||
54 | * or read caching is not desirable: | ||
55 | */ | ||
56 | static inline void * ioremap_nocache (unsigned long offset, unsigned long size) | ||
57 | { | ||
58 | return __ioremap(offset, size, 0); | ||
59 | } | 39 | } |
60 | 40 | ||
61 | extern void iounmap(void *addr); | ||
62 | |||
63 | /* | ||
64 | * IO bus memory addresses are also 1:1 with the physical address | ||
65 | */ | ||
66 | #define virt_to_bus virt_to_phys | ||
67 | #define bus_to_virt phys_to_virt | ||
68 | |||
69 | /* | ||
70 | * readX/writeX() are used to access memory mapped devices. On some | ||
71 | * architectures the memory mapped IO stuff needs to be accessed | ||
72 | * differently. | ||
73 | */ | ||
74 | |||
75 | #define readb(addr) (*(volatile unsigned char *) __io_virt(addr)) | ||
76 | #define readw(addr) (*(volatile unsigned short *) __io_virt(addr)) | ||
77 | #define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) | ||
78 | #define readq(addr) (*(volatile unsigned long long *) __io_virt(addr)) | ||
79 | |||
80 | #define readb_relaxed(addr) readb(addr) | ||
81 | #define readw_relaxed(addr) readw(addr) | ||
82 | #define readl_relaxed(addr) readl(addr) | ||
83 | #define readq_relaxed(addr) readq(addr) | ||
84 | #define __raw_readb readb | ||
85 | #define __raw_readw readw | ||
86 | #define __raw_readl readl | ||
87 | #define __raw_readq readq | ||
88 | |||
89 | #define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b)) | ||
90 | #define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b)) | ||
91 | #define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) | ||
92 | #define writeq(b,addr) (*(volatile unsigned long long *) __io_virt(addr) = (b)) | ||
93 | #define __raw_writeb writeb | ||
94 | #define __raw_writew writew | ||
95 | #define __raw_writel writel | ||
96 | #define __raw_writeq writeq | ||
97 | |||
98 | #define memset_io(a,b,c) memset(__io_virt(a),(b),(c)) | ||
99 | #define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c)) | ||
100 | #define memcpy_toio(a,b,c) memcpy(__io_virt(a),(b),(c)) | ||
101 | |||
102 | #define inb_p(addr) readb(addr) | ||
103 | #define inb(addr) readb(addr) | ||
104 | |||
105 | #define outb(x,addr) ((void) writeb(x,addr)) | ||
106 | #define outb_p(x,addr) outb(x,addr) | ||
107 | |||
108 | #define mmiowb() do { } while (0) | ||
109 | |||
110 | /* | 41 | /* |
111 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | 42 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem |
112 | * access | 43 | * access |
diff --git a/include/asm-s390/termios.h b/include/asm-s390/termios.h index 62b23caf37..a3480e25eb 100644 --- a/include/asm-s390/termios.h +++ b/include/asm-s390/termios.h | |||
@@ -47,24 +47,6 @@ struct termio { | |||
47 | 47 | ||
48 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 48 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
49 | 49 | ||
50 | /* line disciplines */ | ||
51 | #define N_TTY 0 | ||
52 | #define N_SLIP 1 | ||
53 | #define N_MOUSE 2 | ||
54 | #define N_PPP 3 | ||
55 | #define N_STRIP 4 | ||
56 | #define N_AX25 5 | ||
57 | #define N_X25 6 /* X.25 async */ | ||
58 | #define N_6PACK 7 | ||
59 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
60 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
61 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
62 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
63 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
64 | #define N_HDLC 13 /* synchronous HDLC */ | ||
65 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
66 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
67 | |||
68 | #ifdef __KERNEL__ | 50 | #ifdef __KERNEL__ |
69 | 51 | ||
70 | /* intr=^C quit=^\ erase=del kill=^U | 52 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-sh/apm.h b/include/asm-sh/apm.h deleted file mode 100644 index 8b091e9365..0000000000 --- a/include/asm-sh/apm.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2006 (c) Andriy Skulysh <askulysh@gmail.com> | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #ifndef __ASM_SH_APM_H | ||
11 | #define __ASM_SH_APM_H | ||
12 | |||
13 | #define APM_AC_OFFLINE 0 | ||
14 | #define APM_AC_ONLINE 1 | ||
15 | #define APM_AC_BACKUP 2 | ||
16 | #define APM_AC_UNKNOWN 0xff | ||
17 | |||
18 | #define APM_BATTERY_STATUS_HIGH 0 | ||
19 | #define APM_BATTERY_STATUS_LOW 1 | ||
20 | #define APM_BATTERY_STATUS_CRITICAL 2 | ||
21 | #define APM_BATTERY_STATUS_CHARGING 3 | ||
22 | #define APM_BATTERY_STATUS_NOT_PRESENT 4 | ||
23 | #define APM_BATTERY_STATUS_UNKNOWN 0xff | ||
24 | |||
25 | #define APM_BATTERY_LIFE_UNKNOWN 0xFFFF | ||
26 | #define APM_BATTERY_LIFE_MINUTES 0x8000 | ||
27 | #define APM_BATTERY_LIFE_VALUE_MASK 0x7FFF | ||
28 | |||
29 | #define APM_BATTERY_FLAG_HIGH (1 << 0) | ||
30 | #define APM_BATTERY_FLAG_LOW (1 << 1) | ||
31 | #define APM_BATTERY_FLAG_CRITICAL (1 << 2) | ||
32 | #define APM_BATTERY_FLAG_CHARGING (1 << 3) | ||
33 | #define APM_BATTERY_FLAG_NOT_PRESENT (1 << 7) | ||
34 | #define APM_BATTERY_FLAG_UNKNOWN 0xff | ||
35 | |||
36 | #define APM_UNITS_MINS 0 | ||
37 | #define APM_UNITS_SECS 1 | ||
38 | #define APM_UNITS_UNKNOWN -1 | ||
39 | |||
40 | |||
41 | extern int (*apm_get_info)(char *buf, char **start, off_t fpos, int length); | ||
42 | extern int apm_suspended; | ||
43 | |||
44 | void apm_queue_event(apm_event_t event); | ||
45 | |||
46 | #endif | ||
diff --git a/include/asm-sh/termios.h b/include/asm-sh/termios.h index 44edfd4714..e7c8f86ef8 100644 --- a/include/asm-sh/termios.h +++ b/include/asm-sh/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | 43 | ||
62 | /* intr=^C quit=^\ erase=del kill=^U | 44 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-sh64/termios.h b/include/asm-sh64/termios.h index 4a9c7fb411..dc44e6ed3a 100644 --- a/include/asm-sh64/termios.h +++ b/include/asm-sh64/termios.h | |||
@@ -50,24 +50,6 @@ struct termio { | |||
50 | 50 | ||
51 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 51 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
52 | 52 | ||
53 | /* line disciplines */ | ||
54 | #define N_TTY 0 | ||
55 | #define N_SLIP 1 | ||
56 | #define N_MOUSE 2 | ||
57 | #define N_PPP 3 | ||
58 | #define N_STRIP 4 | ||
59 | #define N_AX25 5 | ||
60 | #define N_X25 6 /* X.25 async */ | ||
61 | #define N_6PACK 7 | ||
62 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
63 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
64 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
65 | #define N_IRDA 11 /* Linux IR - http://www.cs.uit.no/~dagb/irda/irda.html */ | ||
66 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
67 | #define N_HDLC 13 /* synchronous HDLC */ | ||
68 | #define N_SYNC_PPP 14 | ||
69 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
70 | |||
71 | #ifdef __KERNEL__ | 53 | #ifdef __KERNEL__ |
72 | 54 | ||
73 | /* intr=^C quit=^\ erase=del kill=^U | 55 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h index cab0b851b8..c23e74a0ea 100644 --- a/include/asm-sparc/io.h +++ b/include/asm-sparc/io.h | |||
@@ -256,6 +256,35 @@ extern void iounmap(volatile void __iomem *addr); | |||
256 | #define iowrite16(val,X) writew(val,X) | 256 | #define iowrite16(val,X) writew(val,X) |
257 | #define iowrite32(val,X) writel(val,X) | 257 | #define iowrite32(val,X) writel(val,X) |
258 | 258 | ||
259 | static inline void ioread8_rep(void __iomem *port, void *buf, unsigned long count) | ||
260 | { | ||
261 | insb((unsigned long __force)port, buf, count); | ||
262 | } | ||
263 | static inline void ioread16_rep(void __iomem *port, void *buf, unsigned long count) | ||
264 | { | ||
265 | insw((unsigned long __force)port, buf, count); | ||
266 | } | ||
267 | |||
268 | static inline void ioread32_rep(void __iomem *port, void *buf, unsigned long count) | ||
269 | { | ||
270 | insl((unsigned long __force)port, buf, count); | ||
271 | } | ||
272 | |||
273 | static inline void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count) | ||
274 | { | ||
275 | outsb((unsigned long __force)port, buf, count); | ||
276 | } | ||
277 | |||
278 | static inline void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count) | ||
279 | { | ||
280 | outsw((unsigned long __force)port, buf, count); | ||
281 | } | ||
282 | |||
283 | static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count) | ||
284 | { | ||
285 | outsl((unsigned long __force)port, buf, count); | ||
286 | } | ||
287 | |||
259 | /* Create a virtual mapping cookie for an IO port range */ | 288 | /* Create a virtual mapping cookie for an IO port range */ |
260 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); | 289 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); |
261 | extern void ioport_unmap(void __iomem *); | 290 | extern void ioport_unmap(void __iomem *); |
diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h index d05f83c809..d767f206ab 100644 --- a/include/asm-sparc/termios.h +++ b/include/asm-sparc/termios.h | |||
@@ -45,24 +45,6 @@ struct winsize { | |||
45 | unsigned short ws_ypixel; | 45 | unsigned short ws_ypixel; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* line disciplines */ | ||
49 | #define N_TTY 0 | ||
50 | #define N_SLIP 1 | ||
51 | #define N_MOUSE 2 | ||
52 | #define N_PPP 3 | ||
53 | #define N_STRIP 4 | ||
54 | #define N_AX25 5 | ||
55 | #define N_X25 6 | ||
56 | #define N_6PACK 7 | ||
57 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
58 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
59 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
60 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
61 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
62 | #define N_HDLC 13 /* synchronous HDLC */ | ||
63 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
64 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
65 | |||
66 | #ifdef __KERNEL__ | 48 | #ifdef __KERNEL__ |
67 | #include <linux/module.h> | 49 | #include <linux/module.h> |
68 | 50 | ||
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index 905e59b4a7..5d233b42fe 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h | |||
@@ -46,6 +46,10 @@ extern void irq_install_pre_handler(int virt_irq, | |||
46 | #define irq_canonicalize(irq) (irq) | 46 | #define irq_canonicalize(irq) (irq) |
47 | extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap); | 47 | extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap); |
48 | extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino); | 48 | extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino); |
49 | extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, | ||
50 | unsigned int msi_devino_start, | ||
51 | unsigned int msi_devino_end); | ||
52 | extern void sun4v_destroy_msi(unsigned int virt_irq); | ||
49 | extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); | 53 | extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); |
50 | 54 | ||
51 | static __inline__ void set_softint(unsigned long bits) | 55 | static __inline__ void set_softint(unsigned long bits) |
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h index dcfa762935..7a246d8a18 100644 --- a/include/asm-sparc64/pbm.h +++ b/include/asm-sparc64/pbm.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
12 | #include <linux/ioport.h> | 12 | #include <linux/ioport.h> |
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/msi.h> | ||
14 | 15 | ||
15 | #include <asm/io.h> | 16 | #include <asm/io.h> |
16 | #include <asm/page.h> | 17 | #include <asm/page.h> |
@@ -177,6 +178,24 @@ struct pci_pbm_info { | |||
177 | int is_66mhz_capable; | 178 | int is_66mhz_capable; |
178 | int all_devs_66mhz; | 179 | int all_devs_66mhz; |
179 | 180 | ||
181 | #ifdef CONFIG_PCI_MSI | ||
182 | /* MSI info. */ | ||
183 | u32 msiq_num; | ||
184 | u32 msiq_ent_count; | ||
185 | u32 msiq_first; | ||
186 | u32 msiq_first_devino; | ||
187 | u32 msi_num; | ||
188 | u32 msi_first; | ||
189 | u32 msi_data_mask; | ||
190 | u32 msix_data_width; | ||
191 | u64 msi32_start; | ||
192 | u64 msi64_start; | ||
193 | u32 msi32_len; | ||
194 | u32 msi64_len; | ||
195 | void *msi_queues; | ||
196 | unsigned long *msi_bitmap; | ||
197 | #endif /* !(CONFIG_PCI_MSI) */ | ||
198 | |||
180 | /* This PBM's streaming buffer. */ | 199 | /* This PBM's streaming buffer. */ |
181 | struct pci_strbuf stc; | 200 | struct pci_strbuf stc; |
182 | 201 | ||
@@ -213,6 +232,12 @@ struct pci_controller_info { | |||
213 | void (*base_address_update)(struct pci_dev *, int); | 232 | void (*base_address_update)(struct pci_dev *, int); |
214 | void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *); | 233 | void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *); |
215 | 234 | ||
235 | #ifdef CONFIG_PCI_MSI | ||
236 | int (*setup_msi_irq)(unsigned int *virt_irq_p, struct pci_dev *pdev, | ||
237 | struct msi_desc *entry); | ||
238 | void (*teardown_msi_irq)(unsigned int virt_irq, struct pci_dev *pdev); | ||
239 | #endif | ||
240 | |||
216 | /* Now things for the actual PCI bus probes. */ | 241 | /* Now things for the actual PCI bus probes. */ |
217 | struct pci_ops *pci_ops; | 242 | struct pci_ops *pci_ops; |
218 | unsigned int pci_first_busno; | 243 | unsigned int pci_first_busno; |
@@ -231,6 +256,9 @@ struct pcidev_cookie { | |||
231 | int num_prom_regs; | 256 | int num_prom_regs; |
232 | struct linux_prom_pci_registers prom_assignments[PROMREG_MAX]; | 257 | struct linux_prom_pci_registers prom_assignments[PROMREG_MAX]; |
233 | int num_prom_assignments; | 258 | int num_prom_assignments; |
259 | #ifdef CONFIG_PCI_MSI | ||
260 | unsigned int msi_num; | ||
261 | #endif | ||
234 | }; | 262 | }; |
235 | 263 | ||
236 | /* Currently these are the same across all PCI controllers | 264 | /* Currently these are the same across all PCI controllers |
diff --git a/include/asm-sparc64/setup.h b/include/asm-sparc64/setup.h index b356ee2cda..5053df3cec 100644 --- a/include/asm-sparc64/setup.h +++ b/include/asm-sparc64/setup.h | |||
@@ -5,6 +5,6 @@ | |||
5 | #ifndef _SPARC64_SETUP_H | 5 | #ifndef _SPARC64_SETUP_H |
6 | #define _SPARC64_SETUP_H | 6 | #define _SPARC64_SETUP_H |
7 | 7 | ||
8 | #define COMMAND_LINE_SIZE 256 | 8 | #define COMMAND_LINE_SIZE 2048 |
9 | 9 | ||
10 | #endif /* _SPARC64_SETUP_H */ | 10 | #endif /* _SPARC64_SETUP_H */ |
diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h index ee26a071c6..f05d390993 100644 --- a/include/asm-sparc64/termios.h +++ b/include/asm-sparc64/termios.h | |||
@@ -45,24 +45,6 @@ struct winsize { | |||
45 | unsigned short ws_ypixel; | 45 | unsigned short ws_ypixel; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* line disciplines */ | ||
49 | #define N_TTY 0 | ||
50 | #define N_SLIP 1 | ||
51 | #define N_MOUSE 2 | ||
52 | #define N_PPP 3 | ||
53 | #define N_STRIP 4 | ||
54 | #define N_AX25 5 | ||
55 | #define N_X25 6 | ||
56 | #define N_6PACK 7 | ||
57 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
58 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
59 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
60 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
61 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
62 | #define N_HDLC 13 /* synchronous HDLC */ | ||
63 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
64 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
65 | |||
66 | #ifdef __KERNEL__ | 48 | #ifdef __KERNEL__ |
67 | #include <linux/module.h> | 49 | #include <linux/module.h> |
68 | 50 | ||
diff --git a/include/asm-um/elf-ppc.h b/include/asm-um/elf-ppc.h index 99711134e4..d3b90b7ac3 100644 --- a/include/asm-um/elf-ppc.h +++ b/include/asm-um/elf-ppc.h | |||
@@ -11,7 +11,7 @@ extern long elf_aux_hwcap; | |||
11 | 11 | ||
12 | #define elf_check_arch(x) (1) | 12 | #define elf_check_arch(x) (1) |
13 | 13 | ||
14 | #ifdef CONFIG_64_BIT | 14 | #ifdef CONFIG_64BIT |
15 | #define ELF_CLASS ELFCLASS64 | 15 | #define ELF_CLASS ELFCLASS64 |
16 | #else | 16 | #else |
17 | #define ELF_CLASS ELFCLASS32 | 17 | #define ELF_CLASS ELFCLASS32 |
diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h index 10609af376..31c2d4d685 100644 --- a/include/asm-um/processor-x86_64.h +++ b/include/asm-um/processor-x86_64.h | |||
@@ -13,6 +13,7 @@ | |||
13 | struct arch_thread { | 13 | struct arch_thread { |
14 | unsigned long debugregs[8]; | 14 | unsigned long debugregs[8]; |
15 | int debugregs_seq; | 15 | int debugregs_seq; |
16 | unsigned long fs; | ||
16 | struct faultinfo faultinfo; | 17 | struct faultinfo faultinfo; |
17 | }; | 18 | }; |
18 | 19 | ||
@@ -25,8 +26,9 @@ extern inline void rep_nop(void) | |||
25 | #define cpu_relax() rep_nop() | 26 | #define cpu_relax() rep_nop() |
26 | 27 | ||
27 | #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ | 28 | #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ |
28 | .debugregs_seq = 0, \ | 29 | .debugregs_seq = 0, \ |
29 | .faultinfo = { 0, 0, 0 } } | 30 | .fs = 0, \ |
31 | .faultinfo = { 0, 0, 0 } } | ||
30 | 32 | ||
31 | static inline void arch_flush_thread(struct arch_thread *thread) | 33 | static inline void arch_flush_thread(struct arch_thread *thread) |
32 | { | 34 | { |
diff --git a/include/asm-um/ptrace-x86_64.h b/include/asm-um/ptrace-x86_64.h index 03b4af4ac0..bf61d17de3 100644 --- a/include/asm-um/ptrace-x86_64.h +++ b/include/asm-um/ptrace-x86_64.h | |||
@@ -81,9 +81,10 @@ static inline void arch_switch_to_tt(struct task_struct *from, | |||
81 | { | 81 | { |
82 | } | 82 | } |
83 | 83 | ||
84 | static inline void arch_switch_to_skas(struct task_struct *from, | 84 | extern void arch_switch_to_skas(struct task_struct *from, |
85 | struct task_struct *to) | 85 | struct task_struct *to); |
86 | { | 86 | |
87 | } | 87 | extern long arch_prctl_skas(struct task_struct *task, int code, |
88 | unsigned long __user *addr); | ||
88 | 89 | ||
89 | #endif | 90 | #endif |
diff --git a/include/asm-v850/termios.h b/include/asm-v850/termios.h index 79e97b5980..c2c2b1d587 100644 --- a/include/asm-v850/termios.h +++ b/include/asm-v850/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | 43 | ||
62 | /* intr=^C quit=^\ erase=del kill=^U | 44 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-x86_64/bootsetup.h b/include/asm-x86_64/bootsetup.h index b829f7b534..7b1c3ad155 100644 --- a/include/asm-x86_64/bootsetup.h +++ b/include/asm-x86_64/bootsetup.h | |||
@@ -31,7 +31,7 @@ extern char x86_boot_params[BOOT_PARAM_SIZE]; | |||
31 | #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF)) | 31 | #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF)) |
32 | #define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF)) | 32 | #define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF)) |
33 | #define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF)) | 33 | #define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF)) |
34 | #define COMMAND_LINE saved_command_line | 34 | #define COMMAND_LINE boot_command_line |
35 | 35 | ||
36 | #define RAMDISK_IMAGE_START_MASK 0x07FF | 36 | #define RAMDISK_IMAGE_START_MASK 0x07FF |
37 | #define RAMDISK_PROMPT_FLAG 0x8000 | 37 | #define RAMDISK_PROMPT_FLAG 0x8000 |
diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h index 6ee9fadaaa..f5d84bb7c9 100644 --- a/include/asm-x86_64/io.h +++ b/include/asm-x86_64/io.h | |||
@@ -248,12 +248,6 @@ void memset_io(volatile void __iomem *a, int b, size_t c); | |||
248 | */ | 248 | */ |
249 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) | 249 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) |
250 | 250 | ||
251 | /* | ||
252 | * Again, x86-64 does not require mem IO specific function. | ||
253 | */ | ||
254 | |||
255 | #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d)) | ||
256 | |||
257 | /* Nothing to do */ | 251 | /* Nothing to do */ |
258 | 252 | ||
259 | #define dma_cache_inv(_start,_size) do { } while (0) | 253 | #define dma_cache_inv(_start,_size) do { } while (0) |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index 6d324b8389..a6d2ff5c69 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
@@ -81,7 +81,6 @@ extern void swap_low_mappings(void); | |||
81 | extern void __show_regs(struct pt_regs * regs); | 81 | extern void __show_regs(struct pt_regs * regs); |
82 | extern void show_regs(struct pt_regs * regs); | 82 | extern void show_regs(struct pt_regs * regs); |
83 | 83 | ||
84 | extern char *syscall32_page; | ||
85 | extern void syscall32_cpu_init(void); | 84 | extern void syscall32_cpu_init(void); |
86 | 85 | ||
87 | extern void setup_node_bootmem(int nodeid, unsigned long start, unsigned long end); | 86 | extern void setup_node_bootmem(int nodeid, unsigned long start, unsigned long end); |
diff --git a/include/asm-x86_64/setup.h b/include/asm-x86_64/setup.h index 985d4e3c79..eaeff73d6c 100644 --- a/include/asm-x86_64/setup.h +++ b/include/asm-x86_64/setup.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #ifndef _x8664_SETUP_H | 1 | #ifndef _x8664_SETUP_H |
2 | #define _x8664_SETUP_H | 2 | #define _x8664_SETUP_H |
3 | 3 | ||
4 | #define COMMAND_LINE_SIZE 256 | 4 | #define COMMAND_LINE_SIZE 2048 |
5 | 5 | ||
6 | #endif | 6 | #endif |
diff --git a/include/asm-x86_64/termios.h b/include/asm-x86_64/termios.h index 443b225537..35ee59b783 100644 --- a/include/asm-x86_64/termios.h +++ b/include/asm-x86_64/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | 43 | ||
62 | /* intr=^C quit=^\ erase=del kill=^U | 44 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h index c0eac51984..8079e29c14 100644 --- a/include/asm-x86_64/uaccess.h +++ b/include/asm-x86_64/uaccess.h | |||
@@ -37,11 +37,11 @@ | |||
37 | * Uhhuh, this needs 65-bit arithmetic. We have a carry.. | 37 | * Uhhuh, this needs 65-bit arithmetic. We have a carry.. |
38 | */ | 38 | */ |
39 | #define __range_not_ok(addr,size) ({ \ | 39 | #define __range_not_ok(addr,size) ({ \ |
40 | unsigned long flag,sum; \ | 40 | unsigned long flag,roksum; \ |
41 | __chk_user_ptr(addr); \ | 41 | __chk_user_ptr(addr); \ |
42 | asm("# range_ok\n\r" \ | 42 | asm("# range_ok\n\r" \ |
43 | "addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0" \ | 43 | "addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0" \ |
44 | :"=&r" (flag), "=r" (sum) \ | 44 | :"=&r" (flag), "=r" (roksum) \ |
45 | :"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \ | 45 | :"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \ |
46 | flag; }) | 46 | flag; }) |
47 | 47 | ||
diff --git a/include/asm-xtensa/mman.h b/include/asm-xtensa/mman.h index ba394cbb48..9b92620c8a 100644 --- a/include/asm-xtensa/mman.h +++ b/include/asm-xtensa/mman.h | |||
@@ -79,7 +79,6 @@ | |||
79 | #define MADV_DOFORK 11 /* do inherit across fork */ | 79 | #define MADV_DOFORK 11 /* do inherit across fork */ |
80 | 80 | ||
81 | /* compatibility flags */ | 81 | /* compatibility flags */ |
82 | #define MAP_ANON MAP_ANONYMOUS | ||
83 | #define MAP_FILE 0 | 82 | #define MAP_FILE 0 |
84 | 83 | ||
85 | #endif /* _XTENSA_MMAN_H */ | 84 | #endif /* _XTENSA_MMAN_H */ |
diff --git a/include/asm-xtensa/termios.h b/include/asm-xtensa/termios.h index 83c6aed1d1..f14b42c8da 100644 --- a/include/asm-xtensa/termios.h +++ b/include/asm-xtensa/termios.h | |||
@@ -52,25 +52,6 @@ struct termio { | |||
52 | 52 | ||
53 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 53 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
54 | 54 | ||
55 | /* Line disciplines */ | ||
56 | |||
57 | #define N_TTY 0 | ||
58 | #define N_SLIP 1 | ||
59 | #define N_MOUSE 2 | ||
60 | #define N_PPP 3 | ||
61 | #define N_STRIP 4 | ||
62 | #define N_AX25 5 | ||
63 | #define N_X25 6 /* X.25 async */ | ||
64 | #define N_6PACK 7 | ||
65 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
66 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
67 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
68 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
69 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
70 | #define N_HDLC 13 /* synchronous HDLC */ | ||
71 | #define N_SYNC_PPP 14 | ||
72 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
73 | |||
74 | #ifdef __KERNEL__ | 55 | #ifdef __KERNEL__ |
75 | 56 | ||
76 | /* intr=^C quit=^\ erase=del kill=^U | 57 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index 5748aecdb4..4e05e93ff6 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h | |||
@@ -18,8 +18,8 @@ struct module; | |||
18 | struct seq_file; | 18 | struct seq_file; |
19 | 19 | ||
20 | struct crypto_type { | 20 | struct crypto_type { |
21 | unsigned int (*ctxsize)(struct crypto_alg *alg); | 21 | unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask); |
22 | int (*init)(struct crypto_tfm *tfm); | 22 | int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask); |
23 | void (*exit)(struct crypto_tfm *tfm); | 23 | void (*exit)(struct crypto_tfm *tfm); |
24 | void (*show)(struct seq_file *m, struct crypto_alg *alg); | 24 | void (*show)(struct seq_file *m, struct crypto_alg *alg); |
25 | }; | 25 | }; |
@@ -93,7 +93,8 @@ struct crypto_template *crypto_lookup_template(const char *name); | |||
93 | int crypto_init_spawn(struct crypto_spawn *spawn, struct crypto_alg *alg, | 93 | int crypto_init_spawn(struct crypto_spawn *spawn, struct crypto_alg *alg, |
94 | struct crypto_instance *inst); | 94 | struct crypto_instance *inst); |
95 | void crypto_drop_spawn(struct crypto_spawn *spawn); | 95 | void crypto_drop_spawn(struct crypto_spawn *spawn); |
96 | struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn); | 96 | struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn, u32 type, |
97 | u32 mask); | ||
97 | 98 | ||
98 | struct crypto_alg *crypto_get_attr_alg(void *param, unsigned int len, | 99 | struct crypto_alg *crypto_get_attr_alg(void *param, unsigned int len, |
99 | u32 type, u32 mask); | 100 | u32 type, u32 mask); |
@@ -132,11 +133,28 @@ static inline void *crypto_blkcipher_ctx_aligned(struct crypto_blkcipher *tfm) | |||
132 | return crypto_tfm_ctx_aligned(&tfm->base); | 133 | return crypto_tfm_ctx_aligned(&tfm->base); |
133 | } | 134 | } |
134 | 135 | ||
136 | static inline struct crypto_cipher *crypto_spawn_cipher( | ||
137 | struct crypto_spawn *spawn) | ||
138 | { | ||
139 | u32 type = CRYPTO_ALG_TYPE_CIPHER; | ||
140 | u32 mask = CRYPTO_ALG_TYPE_MASK; | ||
141 | |||
142 | return __crypto_cipher_cast(crypto_spawn_tfm(spawn, type, mask)); | ||
143 | } | ||
144 | |||
135 | static inline struct cipher_alg *crypto_cipher_alg(struct crypto_cipher *tfm) | 145 | static inline struct cipher_alg *crypto_cipher_alg(struct crypto_cipher *tfm) |
136 | { | 146 | { |
137 | return &crypto_cipher_tfm(tfm)->__crt_alg->cra_cipher; | 147 | return &crypto_cipher_tfm(tfm)->__crt_alg->cra_cipher; |
138 | } | 148 | } |
139 | 149 | ||
150 | static inline struct crypto_hash *crypto_spawn_hash(struct crypto_spawn *spawn) | ||
151 | { | ||
152 | u32 type = CRYPTO_ALG_TYPE_HASH; | ||
153 | u32 mask = CRYPTO_ALG_TYPE_HASH_MASK; | ||
154 | |||
155 | return __crypto_hash_cast(crypto_spawn_tfm(spawn, type, mask)); | ||
156 | } | ||
157 | |||
140 | static inline void *crypto_hash_ctx_aligned(struct crypto_hash *tfm) | 158 | static inline void *crypto_hash_ctx_aligned(struct crypto_hash *tfm) |
141 | { | 159 | { |
142 | return crypto_tfm_ctx_aligned(&tfm->base); | 160 | return crypto_tfm_ctx_aligned(&tfm->base); |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 683513e310..e81e301a4d 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -156,7 +156,6 @@ header-y += video_encoder.h | |||
156 | header-y += videotext.h | 156 | header-y += videotext.h |
157 | header-y += vt.h | 157 | header-y += vt.h |
158 | header-y += wireless.h | 158 | header-y += wireless.h |
159 | header-y += xattr.h | ||
160 | header-y += x25.h | 159 | header-y += x25.h |
161 | 160 | ||
162 | unifdef-y += acct.h | 161 | unifdef-y += acct.h |
@@ -324,6 +323,7 @@ unifdef-y += tty.h | |||
324 | unifdef-y += types.h | 323 | unifdef-y += types.h |
325 | unifdef-y += udf_fs_i.h | 324 | unifdef-y += udf_fs_i.h |
326 | unifdef-y += udp.h | 325 | unifdef-y += udp.h |
326 | unifdef-y += ufs_fs.h | ||
327 | unifdef-y += uinput.h | 327 | unifdef-y += uinput.h |
328 | unifdef-y += uio.h | 328 | unifdef-y += uio.h |
329 | unifdef-y += unistd.h | 329 | unifdef-y += unistd.h |
@@ -336,6 +336,7 @@ unifdef-y += wait.h | |||
336 | unifdef-y += wanrouter.h | 336 | unifdef-y += wanrouter.h |
337 | unifdef-y += watchdog.h | 337 | unifdef-y += watchdog.h |
338 | unifdef-y += wireless.h | 338 | unifdef-y += wireless.h |
339 | unifdef-y += xattr.h | ||
339 | unifdef-y += xfrm.h | 340 | unifdef-y += xfrm.h |
340 | 341 | ||
341 | objhdr-y += version.h | 342 | objhdr-y += version.h |
diff --git a/include/asm-arm/apm.h b/include/linux/apm-emulation.h index d09113b37e..e6d800358d 100644 --- a/include/asm-arm/apm.h +++ b/include/linux/apm-emulation.h | |||
@@ -7,11 +7,9 @@ | |||
7 | * based on arch/arm/kernel/apm.c | 7 | * based on arch/arm/kernel/apm.c |
8 | * factor out the information needed by architectures to provide | 8 | * factor out the information needed by architectures to provide |
9 | * apm status | 9 | * apm status |
10 | * | ||
11 | * | ||
12 | */ | 10 | */ |
13 | #ifndef ARM_ASM_SA1100_APM_H | 11 | #ifndef __LINUX_APM_EMULATION_H |
14 | #define ARM_ASM_SA1100_APM_H | 12 | #define __LINUX_APM_EMULATION_H |
15 | 13 | ||
16 | #include <linux/apm_bios.h> | 14 | #include <linux/apm_bios.h> |
17 | 15 | ||
@@ -61,4 +59,4 @@ extern void (*apm_get_power_status)(struct apm_power_info *); | |||
61 | */ | 59 | */ |
62 | void apm_queue_event(apm_event_t event); | 60 | void apm_queue_event(apm_event_t event); |
63 | 61 | ||
64 | #endif | 62 | #endif /* __LINUX_APM_EMULATION_H */ |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 1df941648a..18e401ff7e 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -44,9 +44,9 @@ enum { | |||
44 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ | 44 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ |
45 | 45 | ||
46 | ATA_ID_WORDS = 256, | 46 | ATA_ID_WORDS = 256, |
47 | ATA_ID_SERNO_OFS = 10, | 47 | ATA_ID_SERNO = 10, |
48 | ATA_ID_FW_REV_OFS = 23, | 48 | ATA_ID_FW_REV = 23, |
49 | ATA_ID_PROD_OFS = 27, | 49 | ATA_ID_PROD = 27, |
50 | ATA_ID_OLD_PIO_MODES = 51, | 50 | ATA_ID_OLD_PIO_MODES = 51, |
51 | ATA_ID_FIELD_VALID = 53, | 51 | ATA_ID_FIELD_VALID = 53, |
52 | ATA_ID_MWDMA_MODES = 63, | 52 | ATA_ID_MWDMA_MODES = 63, |
@@ -58,8 +58,11 @@ enum { | |||
58 | ATA_ID_MAJOR_VER = 80, | 58 | ATA_ID_MAJOR_VER = 80, |
59 | ATA_ID_PIO4 = (1 << 1), | 59 | ATA_ID_PIO4 = (1 << 1), |
60 | 60 | ||
61 | ATA_ID_SERNO_LEN = 20, | ||
62 | ATA_ID_FW_REV_LEN = 8, | ||
63 | ATA_ID_PROD_LEN = 40, | ||
64 | |||
61 | ATA_PCI_CTL_OFS = 2, | 65 | ATA_PCI_CTL_OFS = 2, |
62 | ATA_SERNO_LEN = 20, | ||
63 | ATA_UDMA0 = (1 << 0), | 66 | ATA_UDMA0 = (1 << 0), |
64 | ATA_UDMA1 = ATA_UDMA0 | (1 << 1), | 67 | ATA_UDMA1 = ATA_UDMA0 | (1 << 1), |
65 | ATA_UDMA2 = ATA_UDMA1 | (1 << 2), | 68 | ATA_UDMA2 = ATA_UDMA1 | (1 << 2), |
@@ -296,6 +299,8 @@ struct ata_taskfile { | |||
296 | #define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1) | 299 | #define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1) |
297 | #define ata_id_removeable(id) ((id)[0] & (1 << 7)) | 300 | #define ata_id_removeable(id) ((id)[0] & (1 << 7)) |
298 | #define ata_id_has_dword_io(id) ((id)[50] & (1 << 0)) | 301 | #define ata_id_has_dword_io(id) ((id)[50] & (1 << 0)) |
302 | #define ata_id_iordy_disable(id) ((id)[49] & (1 << 10)) | ||
303 | #define ata_id_has_iordy(id) ((id)[49] & (1 << 9)) | ||
299 | #define ata_id_u32(id,n) \ | 304 | #define ata_id_u32(id,n) \ |
300 | (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) | 305 | (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) |
301 | #define ata_id_u64(id,n) \ | 306 | #define ata_id_u64(id,n) \ |
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index 75b8baca08..d12984ddaa 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h | |||
@@ -182,7 +182,7 @@ extern rwlock_t atalk_interfaces_lock; | |||
182 | 182 | ||
183 | extern struct atalk_route atrtr_default; | 183 | extern struct atalk_route atrtr_default; |
184 | 184 | ||
185 | extern struct file_operations atalk_seq_arp_fops; | 185 | extern const struct file_operations atalk_seq_arp_fops; |
186 | 186 | ||
187 | extern int sysctl_aarp_expiry_time; | 187 | extern int sysctl_aarp_expiry_time; |
188 | extern int sysctl_aarp_tick_time; | 188 | extern int sysctl_aarp_tick_time; |
diff --git a/include/linux/atmarp.h b/include/linux/atmarp.h index ee108f9e9c..231f4bdec7 100644 --- a/include/linux/atmarp.h +++ b/include/linux/atmarp.h | |||
@@ -6,9 +6,7 @@ | |||
6 | #ifndef _LINUX_ATMARP_H | 6 | #ifndef _LINUX_ATMARP_H |
7 | #define _LINUX_ATMARP_H | 7 | #define _LINUX_ATMARP_H |
8 | 8 | ||
9 | #ifdef __KERNEL__ | ||
10 | #include <linux/types.h> | 9 | #include <linux/types.h> |
11 | #endif | ||
12 | #include <linux/atmapi.h> | 10 | #include <linux/atmapi.h> |
13 | #include <linux/atmioc.h> | 11 | #include <linux/atmioc.h> |
14 | 12 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 36a6eacefe..83dcd8c0e9 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -82,7 +82,6 @@ struct cfq_io_context { | |||
82 | 82 | ||
83 | unsigned long last_end_request; | 83 | unsigned long last_end_request; |
84 | sector_t last_request_pos; | 84 | sector_t last_request_pos; |
85 | unsigned long last_queue; | ||
86 | 85 | ||
87 | unsigned long ttime_total; | 86 | unsigned long ttime_total; |
88 | unsigned long ttime_samples; | 87 | unsigned long ttime_samples; |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 5d9fb0e941..dd27b1c722 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -34,6 +34,7 @@ enum bh_state_bits { | |||
34 | BH_Write_EIO, /* I/O error on write */ | 34 | BH_Write_EIO, /* I/O error on write */ |
35 | BH_Ordered, /* ordered write */ | 35 | BH_Ordered, /* ordered write */ |
36 | BH_Eopnotsupp, /* operation not supported (barrier) */ | 36 | BH_Eopnotsupp, /* operation not supported (barrier) */ |
37 | BH_Unwritten, /* Buffer is allocated on disk but not written */ | ||
37 | 38 | ||
38 | BH_PrivateStart,/* not a state bit, but the first bit available | 39 | BH_PrivateStart,/* not a state bit, but the first bit available |
39 | * for private allocation by other entities | 40 | * for private allocation by other entities |
@@ -126,6 +127,7 @@ BUFFER_FNS(Boundary, boundary) | |||
126 | BUFFER_FNS(Write_EIO, write_io_error) | 127 | BUFFER_FNS(Write_EIO, write_io_error) |
127 | BUFFER_FNS(Ordered, ordered) | 128 | BUFFER_FNS(Ordered, ordered) |
128 | BUFFER_FNS(Eopnotsupp, eopnotsupp) | 129 | BUFFER_FNS(Eopnotsupp, eopnotsupp) |
130 | BUFFER_FNS(Unwritten, unwritten) | ||
129 | 131 | ||
130 | #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) | 132 | #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) |
131 | #define touch_buffer(bh) mark_page_accessed(bh->b_page) | 133 | #define touch_buffer(bh) mark_page_accessed(bh->b_page) |
@@ -172,12 +174,14 @@ struct super_block *freeze_bdev(struct block_device *); | |||
172 | void thaw_bdev(struct block_device *, struct super_block *); | 174 | void thaw_bdev(struct block_device *, struct super_block *); |
173 | int fsync_super(struct super_block *); | 175 | int fsync_super(struct super_block *); |
174 | int fsync_no_super(struct block_device *); | 176 | int fsync_no_super(struct block_device *); |
175 | struct buffer_head *__find_get_block(struct block_device *, sector_t, int); | 177 | struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, |
176 | struct buffer_head * __getblk(struct block_device *, sector_t, int); | 178 | unsigned size); |
179 | struct buffer_head *__getblk(struct block_device *bdev, sector_t block, | ||
180 | unsigned size); | ||
177 | void __brelse(struct buffer_head *); | 181 | void __brelse(struct buffer_head *); |
178 | void __bforget(struct buffer_head *); | 182 | void __bforget(struct buffer_head *); |
179 | void __breadahead(struct block_device *, sector_t block, int size); | 183 | void __breadahead(struct block_device *, sector_t block, unsigned int size); |
180 | struct buffer_head *__bread(struct block_device *, sector_t block, int size); | 184 | struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size); |
181 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); | 185 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); |
182 | void free_buffer_head(struct buffer_head * bh); | 186 | void free_buffer_head(struct buffer_head * bh); |
183 | void FASTCALL(unlock_buffer(struct buffer_head *bh)); | 187 | void FASTCALL(unlock_buffer(struct buffer_head *bh)); |
diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild index 56499ab9e3..79bedddfd9 100644 --- a/include/linux/byteorder/Kbuild +++ b/include/linux/byteorder/Kbuild | |||
@@ -1,7 +1,5 @@ | |||
1 | header-y += big_endian.h | 1 | header-y += big_endian.h |
2 | header-y += little_endian.h | 2 | header-y += little_endian.h |
3 | header-y += pdp_endian.h | ||
4 | 3 | ||
5 | unifdef-y += generic.h | 4 | unifdef-y += generic.h |
6 | unifdef-y += swabb.h | ||
7 | unifdef-y += swab.h | 5 | unifdef-y += swab.h |
diff --git a/include/linux/byteorder/pdp_endian.h b/include/linux/byteorder/pdp_endian.h deleted file mode 100644 index 618631cbc6..0000000000 --- a/include/linux/byteorder/pdp_endian.h +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | #ifndef _LINUX_BYTEORDER_PDP_ENDIAN_H | ||
2 | #define _LINUX_BYTEORDER_PDP_ENDIAN_H | ||
3 | |||
4 | /* | ||
5 | * Could have been named NUXI-endian, but we use the same name as in glibc. | ||
6 | * hopefully only the PDP and its evolutions (old VAXen in compatibility mode) | ||
7 | * should ever use this braindead byteorder. | ||
8 | * This file *should* work, but has not been tested. | ||
9 | * | ||
10 | * little-endian is 1234; big-endian is 4321; nuxi/pdp-endian is 3412 | ||
11 | * | ||
12 | * I thought vaxen were NUXI-endian, but was told they were correct-endian | ||
13 | * (little-endian), though indeed there existed NUXI-endian machines | ||
14 | * (DEC PDP-11 and old VAXen in compatibility mode). | ||
15 | * This makes this file a bit useless, but as a proof-of-concept. | ||
16 | * | ||
17 | * But what does a __u64 look like: is it 34127856 or 78563412 ??? | ||
18 | * I don't dare imagine! Hence, no 64-bit byteorder support yet. | ||
19 | * Hopefully, there 64-bit pdp-endian support shouldn't ever be required. | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifndef __PDP_ENDIAN | ||
24 | #define __PDP_ENDIAN 3412 | ||
25 | #endif | ||
26 | #ifndef __PDP_ENDIAN_BITFIELD | ||
27 | #define __PDP_ENDIAN_BITFIELD | ||
28 | #endif | ||
29 | |||
30 | #include <linux/byteorder/swab.h> | ||
31 | #include <linux/byteorder/swabb.h> | ||
32 | |||
33 | #define __constant_htonl(x) ___constant_swahb32((x)) | ||
34 | #define __constant_ntohl(x) ___constant_swahb32((x)) | ||
35 | #define __constant_htons(x) ___constant_swab16((x)) | ||
36 | #define __constant_ntohs(x) ___constant_swab16((x)) | ||
37 | #define __constant_cpu_to_le64(x) I DON'T KNOW | ||
38 | #define __constant_le64_to_cpu(x) I DON'T KNOW | ||
39 | #define __constant_cpu_to_le32(x) ___constant_swahw32((x)) | ||
40 | #define __constant_le32_to_cpu(x) ___constant_swahw32((x)) | ||
41 | #define __constant_cpu_to_le16(x) ((__u16)(x) | ||
42 | #define __constant_le16_to_cpu(x) ((__u16)(x) | ||
43 | #define __constant_cpu_to_be64(x) I DON'T KNOW | ||
44 | #define __constant_be64_to_cpu(x) I DON'T KNOW | ||
45 | #define __constant_cpu_to_be32(x) ___constant_swahb32((x)) | ||
46 | #define __constant_be32_to_cpu(x) ___constant_swahb32((x)) | ||
47 | #define __constant_cpu_to_be16(x) ___constant_swab16((x)) | ||
48 | #define __constant_be16_to_cpu(x) ___constant_swab16((x)) | ||
49 | #define __cpu_to_le64(x) I DON'T KNOW | ||
50 | #define __le64_to_cpu(x) I DON'T KNOW | ||
51 | #define __cpu_to_le32(x) ___swahw32((x)) | ||
52 | #define __le32_to_cpu(x) ___swahw32((x)) | ||
53 | #define __cpu_to_le16(x) ((__u16)(x) | ||
54 | #define __le16_to_cpu(x) ((__u16)(x) | ||
55 | #define __cpu_to_be64(x) I DON'T KNOW | ||
56 | #define __be64_to_cpu(x) I DON'T KNOW | ||
57 | #define __cpu_to_be32(x) __swahb32((x)) | ||
58 | #define __be32_to_cpu(x) __swahb32((x)) | ||
59 | #define __cpu_to_be16(x) __swab16((x)) | ||
60 | #define __be16_to_cpu(x) __swab16((x)) | ||
61 | #define __cpu_to_le64p(x) I DON'T KNOW | ||
62 | #define __le64_to_cpup(x) I DON'T KNOW | ||
63 | #define __cpu_to_le32p(x) ___swahw32p((x)) | ||
64 | #define __le32_to_cpup(x) ___swahw32p((x)) | ||
65 | #define __cpu_to_le16p(x) (*(__u16*)(x)) | ||
66 | #define __le16_to_cpup(x) (*(__u16*)(x)) | ||
67 | #define __cpu_to_be64p(x) I DON'T KNOW | ||
68 | #define __be64_to_cpup(x) I DON'T KNOW | ||
69 | #define __cpu_to_be32p(x) __swahb32p((x)) | ||
70 | #define __be32_to_cpup(x) __swahb32p((x)) | ||
71 | #define __cpu_to_be16p(x) __swab16p((x)) | ||
72 | #define __be16_to_cpup(x) __swab16p((x)) | ||
73 | #define __cpu_to_le64s(x) I DON'T KNOW | ||
74 | #define __le64_to_cpus(x) I DON'T KNOW | ||
75 | #define __cpu_to_le32s(x) ___swahw32s((x)) | ||
76 | #define __le32_to_cpus(x) ___swahw32s((x)) | ||
77 | #define __cpu_to_le16s(x) do {} while (0) | ||
78 | #define __le16_to_cpus(x) do {} while (0) | ||
79 | #define __cpu_to_be64s(x) I DON'T KNOW | ||
80 | #define __be64_to_cpus(x) I DON'T KNOW | ||
81 | #define __cpu_to_be32s(x) __swahb32s((x)) | ||
82 | #define __be32_to_cpus(x) __swahb32s((x)) | ||
83 | #define __cpu_to_be16s(x) __swab16s((x)) | ||
84 | #define __be16_to_cpus(x) __swab16s((x)) | ||
85 | |||
86 | #include <linux/byteorder/generic.h> | ||
87 | |||
88 | #endif /* _LINUX_BYTEORDER_PDP_ENDIAN_H */ | ||
diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h index ae5e5f914b..8c780c7d77 100644 --- a/include/linux/byteorder/swabb.h +++ b/include/linux/byteorder/swabb.h | |||
@@ -25,6 +25,8 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/types.h> | ||
29 | |||
28 | #define ___swahw32(x) \ | 30 | #define ___swahw32(x) \ |
29 | ({ \ | 31 | ({ \ |
30 | __u32 __x = (x); \ | 32 | __u32 __x = (x); \ |
@@ -77,19 +79,14 @@ | |||
77 | /* | 79 | /* |
78 | * Allow constant folding | 80 | * Allow constant folding |
79 | */ | 81 | */ |
80 | #if defined(__GNUC__) && defined(__OPTIMIZE__) | 82 | #define __swahw32(x) \ |
81 | # define __swahw32(x) \ | ||
82 | (__builtin_constant_p((__u32)(x)) ? \ | 83 | (__builtin_constant_p((__u32)(x)) ? \ |
83 | ___swahw32((x)) : \ | 84 | ___swahw32((x)) : \ |
84 | __fswahw32((x))) | 85 | __fswahw32((x))) |
85 | # define __swahb32(x) \ | 86 | #define __swahb32(x) \ |
86 | (__builtin_constant_p((__u32)(x)) ? \ | 87 | (__builtin_constant_p((__u32)(x)) ? \ |
87 | ___swahb32((x)) : \ | 88 | ___swahb32((x)) : \ |
88 | __fswahb32((x))) | 89 | __fswahb32((x))) |
89 | #else | ||
90 | # define __swahw32(x) __fswahw32(x) | ||
91 | # define __swahb32(x) __fswahb32(x) | ||
92 | #endif /* OPTIMIZE */ | ||
93 | 90 | ||
94 | 91 | ||
95 | static inline __u32 __fswahw32(__u32 x) | 92 | static inline __u32 __fswahw32(__u32 x) |
@@ -128,13 +125,11 @@ static inline void __swahb32s(__u32 *addr) | |||
128 | */ | 125 | */ |
129 | #endif /* __BYTEORDER_HAS_U64__ */ | 126 | #endif /* __BYTEORDER_HAS_U64__ */ |
130 | 127 | ||
131 | #if defined(__KERNEL__) | ||
132 | #define swahw32 __swahw32 | 128 | #define swahw32 __swahw32 |
133 | #define swahb32 __swahb32 | 129 | #define swahb32 __swahb32 |
134 | #define swahw32p __swahw32p | 130 | #define swahw32p __swahw32p |
135 | #define swahb32p __swahb32p | 131 | #define swahb32p __swahb32p |
136 | #define swahw32s __swahw32s | 132 | #define swahw32s __swahw32s |
137 | #define swahb32s __swahb32s | 133 | #define swahb32s __swahb32s |
138 | #endif | ||
139 | 134 | ||
140 | #endif /* _LINUX_BYTEORDER_SWABB_H */ | 135 | #endif /* _LINUX_BYTEORDER_SWABB_H */ |
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h new file mode 100644 index 0000000000..0bc45e69da --- /dev/null +++ b/include/linux/cfag12864b.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * Filename: cfag12864b.h | ||
3 | * Version: 0.1.0 | ||
4 | * Description: cfag12864b LCD driver header | ||
5 | * License: GPLv2 | ||
6 | * | ||
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
8 | * Date: 2006-10-12 | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef _CFAG12864B_H_ | ||
26 | #define _CFAG12864B_H_ | ||
27 | |||
28 | #define CFAG12864B_WIDTH (128) | ||
29 | #define CFAG12864B_HEIGHT (64) | ||
30 | #define CFAG12864B_CONTROLLERS (2) | ||
31 | #define CFAG12864B_PAGES (8) | ||
32 | #define CFAG12864B_ADDRESSES (64) | ||
33 | #define CFAG12864B_SIZE ((CFAG12864B_CONTROLLERS) * \ | ||
34 | (CFAG12864B_PAGES) * \ | ||
35 | (CFAG12864B_ADDRESSES)) | ||
36 | |||
37 | /* | ||
38 | * The driver will blit this buffer to the LCD | ||
39 | * | ||
40 | * Its size is CFAG12864B_SIZE. | ||
41 | */ | ||
42 | extern unsigned char * cfag12864b_buffer; | ||
43 | |||
44 | /* | ||
45 | * Get the refresh rate of the LCD | ||
46 | * | ||
47 | * Returns the refresh rate (hertzs). | ||
48 | */ | ||
49 | extern unsigned int cfag12864b_getrate(void); | ||
50 | |||
51 | /* | ||
52 | * Enable refreshing | ||
53 | * | ||
54 | * Returns 0 if successful (anyone was using it), | ||
55 | * or != 0 if failed (someone is using it). | ||
56 | */ | ||
57 | extern unsigned char cfag12864b_enable(void); | ||
58 | |||
59 | /* | ||
60 | * Disable refreshing | ||
61 | * | ||
62 | * You should call this only when you finish using the LCD. | ||
63 | */ | ||
64 | extern void cfag12864b_disable(void); | ||
65 | |||
66 | /* | ||
67 | * Is enabled refreshing? (is anyone using the module?) | ||
68 | * | ||
69 | * Returns 0 if refreshing is not enabled (anyone is using it), | ||
70 | * or != 0 if refreshing is enabled (someone is using it). | ||
71 | * | ||
72 | * Useful for buffer read-only modules. | ||
73 | */ | ||
74 | extern unsigned char cfag12864b_isenabled(void); | ||
75 | |||
76 | #endif /* _CFAG12864B_H_ */ | ||
77 | |||
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h index 4c2632a8d3..e4ac016ad2 100644 --- a/include/linux/coda_linux.h +++ b/include/linux/coda_linux.h | |||
@@ -23,9 +23,9 @@ | |||
23 | #include <linux/coda_fs_i.h> | 23 | #include <linux/coda_fs_i.h> |
24 | 24 | ||
25 | /* operations */ | 25 | /* operations */ |
26 | extern struct inode_operations coda_dir_inode_operations; | 26 | extern const struct inode_operations coda_dir_inode_operations; |
27 | extern struct inode_operations coda_file_inode_operations; | 27 | extern const struct inode_operations coda_file_inode_operations; |
28 | extern struct inode_operations coda_ioctl_inode_operations; | 28 | extern const struct inode_operations coda_ioctl_inode_operations; |
29 | 29 | ||
30 | extern const struct address_space_operations coda_file_aops; | 30 | extern const struct address_space_operations coda_file_aops; |
31 | extern const struct address_space_operations coda_symlink_aops; | 31 | extern const struct address_space_operations coda_symlink_aops; |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 6e1c44a935..9008eabb9c 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -27,6 +27,13 @@ | |||
27 | #define __inline__ __inline__ __attribute__((always_inline)) | 27 | #define __inline__ __inline__ __attribute__((always_inline)) |
28 | #define __inline __inline __attribute__((always_inline)) | 28 | #define __inline __inline __attribute__((always_inline)) |
29 | #define __deprecated __attribute__((deprecated)) | 29 | #define __deprecated __attribute__((deprecated)) |
30 | #define __packed __attribute__((packed)) | ||
31 | #define __weak __attribute__((weak)) | ||
32 | #define __naked __attribute__((naked)) | ||
33 | #define __noreturn __attribute__((noreturn)) | ||
34 | #define __pure __attribute__((pure)) | ||
35 | #define __aligned(x) __attribute__((aligned(x))) | ||
36 | #define __printf(a,b) __attribute__((format(printf,a,b))) | ||
30 | #define noinline __attribute__((noinline)) | 37 | #define noinline __attribute__((noinline)) |
31 | #define __attribute_pure__ __attribute__((pure)) | 38 | #define __attribute_pure__ __attribute__((pure)) |
32 | #define __attribute_const__ __attribute__((__const__)) | 39 | #define __attribute_const__ __attribute__((__const__)) |
diff --git a/include/linux/console.h b/include/linux/console.h index 7d0420274d..de25ee3b79 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -21,6 +21,7 @@ struct vc_data; | |||
21 | struct console_font_op; | 21 | struct console_font_op; |
22 | struct console_font; | 22 | struct console_font; |
23 | struct module; | 23 | struct module; |
24 | struct tty_struct; | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * this is what the terminal answers to a ESC-Z or csi0c query. | 27 | * this is what the terminal answers to a ESC-Z or csi0c query. |
@@ -132,6 +133,9 @@ static inline void resume_console(void) {} | |||
132 | int mda_console_init(void); | 133 | int mda_console_init(void); |
133 | void prom_con_init(void); | 134 | void prom_con_init(void); |
134 | 135 | ||
136 | void vcs_make_sysfs(struct tty_struct *tty); | ||
137 | void vcs_remove_sysfs(struct tty_struct *tty); | ||
138 | |||
135 | /* Some debug stub to catch some of the obvious races in the VT code */ | 139 | /* Some debug stub to catch some of the obvious races in the VT code */ |
136 | #if 1 | 140 | #if 1 |
137 | #define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) | 141 | #define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) |
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index ed6c0fee1a..a86162b26c 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/wait.h> | 12 | #include <linux/wait.h> |
13 | #include <linux/vt.h> | 13 | #include <linux/vt.h> |
14 | #include <linux/workqueue.h> | ||
14 | 15 | ||
15 | struct vt_struct; | 16 | struct vt_struct; |
16 | 17 | ||
@@ -103,6 +104,7 @@ struct vc_data { | |||
103 | 104 | ||
104 | struct vc { | 105 | struct vc { |
105 | struct vc_data *d; | 106 | struct vc_data *d; |
107 | struct work_struct SAK_work; | ||
106 | 108 | ||
107 | /* might add scrmem, vt_struct, kbd at some time, | 109 | /* might add scrmem, vt_struct, kbd at some time, |
108 | to have everything in one place - the disadvantage | 110 | to have everything in one place - the disadvantage |
@@ -110,6 +112,7 @@ struct vc { | |||
110 | }; | 112 | }; |
111 | 113 | ||
112 | extern struct vc vc_cons [MAX_NR_CONSOLES]; | 114 | extern struct vc vc_cons [MAX_NR_CONSOLES]; |
115 | extern void vc_SAK(struct work_struct *work); | ||
113 | 116 | ||
114 | #define CUR_DEF 0 | 117 | #define CUR_DEF 0 |
115 | #define CUR_NONE 1 | 118 | #define CUR_NONE 1 |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index bfb520212d..769ddc6df4 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -49,10 +49,20 @@ struct notifier_block; | |||
49 | 49 | ||
50 | #ifdef CONFIG_SMP | 50 | #ifdef CONFIG_SMP |
51 | /* Need to know about CPUs going up/down? */ | 51 | /* Need to know about CPUs going up/down? */ |
52 | extern int register_cpu_notifier(struct notifier_block *nb); | ||
53 | #ifdef CONFIG_HOTPLUG_CPU | 52 | #ifdef CONFIG_HOTPLUG_CPU |
53 | extern int register_cpu_notifier(struct notifier_block *nb); | ||
54 | extern void unregister_cpu_notifier(struct notifier_block *nb); | 54 | extern void unregister_cpu_notifier(struct notifier_block *nb); |
55 | #else | 55 | #else |
56 | |||
57 | #ifndef MODULE | ||
58 | extern int register_cpu_notifier(struct notifier_block *nb); | ||
59 | #else | ||
60 | static inline int register_cpu_notifier(struct notifier_block *nb) | ||
61 | { | ||
62 | return 0; | ||
63 | } | ||
64 | #endif | ||
65 | |||
56 | static inline void unregister_cpu_notifier(struct notifier_block *nb) | 66 | static inline void unregister_cpu_notifier(struct notifier_block *nb) |
57 | { | 67 | { |
58 | } | 68 | } |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index fd404416f3..826b15e914 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -55,7 +55,7 @@ extern int cpuset_excl_nodes_overlap(const struct task_struct *p); | |||
55 | extern int cpuset_memory_pressure_enabled; | 55 | extern int cpuset_memory_pressure_enabled; |
56 | extern void __cpuset_memory_pressure_bump(void); | 56 | extern void __cpuset_memory_pressure_bump(void); |
57 | 57 | ||
58 | extern struct file_operations proc_cpuset_operations; | 58 | extern const struct file_operations proc_cpuset_operations; |
59 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); | 59 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); |
60 | 60 | ||
61 | extern void cpuset_lock(void); | 61 | extern void cpuset_lock(void); |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 4aa9046601..779aa78ee6 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -51,15 +51,9 @@ | |||
51 | /* | 51 | /* |
52 | * Transform masks and values (for crt_flags). | 52 | * Transform masks and values (for crt_flags). |
53 | */ | 53 | */ |
54 | #define CRYPTO_TFM_MODE_MASK 0x000000ff | ||
55 | #define CRYPTO_TFM_REQ_MASK 0x000fff00 | 54 | #define CRYPTO_TFM_REQ_MASK 0x000fff00 |
56 | #define CRYPTO_TFM_RES_MASK 0xfff00000 | 55 | #define CRYPTO_TFM_RES_MASK 0xfff00000 |
57 | 56 | ||
58 | #define CRYPTO_TFM_MODE_ECB 0x00000001 | ||
59 | #define CRYPTO_TFM_MODE_CBC 0x00000002 | ||
60 | #define CRYPTO_TFM_MODE_CFB 0x00000004 | ||
61 | #define CRYPTO_TFM_MODE_CTR 0x00000008 | ||
62 | |||
63 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 | 57 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 |
64 | #define CRYPTO_TFM_REQ_MAY_SLEEP 0x00000200 | 58 | #define CRYPTO_TFM_REQ_MAY_SLEEP 0x00000200 |
65 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 | 59 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 |
@@ -71,12 +65,8 @@ | |||
71 | /* | 65 | /* |
72 | * Miscellaneous stuff. | 66 | * Miscellaneous stuff. |
73 | */ | 67 | */ |
74 | #define CRYPTO_UNSPEC 0 | ||
75 | #define CRYPTO_MAX_ALG_NAME 64 | 68 | #define CRYPTO_MAX_ALG_NAME 64 |
76 | 69 | ||
77 | #define CRYPTO_DIR_ENCRYPT 1 | ||
78 | #define CRYPTO_DIR_DECRYPT 0 | ||
79 | |||
80 | /* | 70 | /* |
81 | * The macro CRYPTO_MINALIGN_ATTR (along with the void * type in the actual | 71 | * The macro CRYPTO_MINALIGN_ATTR (along with the void * type in the actual |
82 | * declaration) is used to ensure that the crypto_tfm context structure is | 72 | * declaration) is used to ensure that the crypto_tfm context structure is |
@@ -148,19 +138,6 @@ struct cipher_alg { | |||
148 | unsigned int keylen); | 138 | unsigned int keylen); |
149 | void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); | 139 | void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
150 | void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); | 140 | void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
151 | |||
152 | unsigned int (*cia_encrypt_ecb)(const struct cipher_desc *desc, | ||
153 | u8 *dst, const u8 *src, | ||
154 | unsigned int nbytes) __deprecated; | ||
155 | unsigned int (*cia_decrypt_ecb)(const struct cipher_desc *desc, | ||
156 | u8 *dst, const u8 *src, | ||
157 | unsigned int nbytes) __deprecated; | ||
158 | unsigned int (*cia_encrypt_cbc)(const struct cipher_desc *desc, | ||
159 | u8 *dst, const u8 *src, | ||
160 | unsigned int nbytes) __deprecated; | ||
161 | unsigned int (*cia_decrypt_cbc)(const struct cipher_desc *desc, | ||
162 | u8 *dst, const u8 *src, | ||
163 | unsigned int nbytes) __deprecated; | ||
164 | }; | 141 | }; |
165 | 142 | ||
166 | struct digest_alg { | 143 | struct digest_alg { |
@@ -243,11 +220,6 @@ int crypto_unregister_alg(struct crypto_alg *alg); | |||
243 | #ifdef CONFIG_CRYPTO | 220 | #ifdef CONFIG_CRYPTO |
244 | int crypto_has_alg(const char *name, u32 type, u32 mask); | 221 | int crypto_has_alg(const char *name, u32 type, u32 mask); |
245 | #else | 222 | #else |
246 | static inline int crypto_alg_available(const char *name, u32 flags) | ||
247 | { | ||
248 | return 0; | ||
249 | } | ||
250 | |||
251 | static inline int crypto_has_alg(const char *name, u32 type, u32 mask) | 223 | static inline int crypto_has_alg(const char *name, u32 type, u32 mask) |
252 | { | 224 | { |
253 | return 0; | 225 | return 0; |
@@ -339,13 +311,18 @@ struct crypto_tfm { | |||
339 | void *__crt_ctx[] CRYPTO_MINALIGN_ATTR; | 311 | void *__crt_ctx[] CRYPTO_MINALIGN_ATTR; |
340 | }; | 312 | }; |
341 | 313 | ||
342 | #define crypto_cipher crypto_tfm | ||
343 | #define crypto_comp crypto_tfm | ||
344 | |||
345 | struct crypto_blkcipher { | 314 | struct crypto_blkcipher { |
346 | struct crypto_tfm base; | 315 | struct crypto_tfm base; |
347 | }; | 316 | }; |
348 | 317 | ||
318 | struct crypto_cipher { | ||
319 | struct crypto_tfm base; | ||
320 | }; | ||
321 | |||
322 | struct crypto_comp { | ||
323 | struct crypto_tfm base; | ||
324 | }; | ||
325 | |||
349 | struct crypto_hash { | 326 | struct crypto_hash { |
350 | struct crypto_tfm base; | 327 | struct crypto_tfm base; |
351 | }; | 328 | }; |
@@ -395,40 +372,11 @@ static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) | |||
395 | return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK; | 372 | return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK; |
396 | } | 373 | } |
397 | 374 | ||
398 | static unsigned int crypto_tfm_alg_min_keysize(struct crypto_tfm *tfm) | ||
399 | __deprecated; | ||
400 | static inline unsigned int crypto_tfm_alg_min_keysize(struct crypto_tfm *tfm) | ||
401 | { | ||
402 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
403 | return tfm->__crt_alg->cra_cipher.cia_min_keysize; | ||
404 | } | ||
405 | |||
406 | static unsigned int crypto_tfm_alg_max_keysize(struct crypto_tfm *tfm) | ||
407 | __deprecated; | ||
408 | static inline unsigned int crypto_tfm_alg_max_keysize(struct crypto_tfm *tfm) | ||
409 | { | ||
410 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
411 | return tfm->__crt_alg->cra_cipher.cia_max_keysize; | ||
412 | } | ||
413 | |||
414 | static unsigned int crypto_tfm_alg_ivsize(struct crypto_tfm *tfm) __deprecated; | ||
415 | static inline unsigned int crypto_tfm_alg_ivsize(struct crypto_tfm *tfm) | ||
416 | { | ||
417 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
418 | return tfm->crt_cipher.cit_ivsize; | ||
419 | } | ||
420 | |||
421 | static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm) | 375 | static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm) |
422 | { | 376 | { |
423 | return tfm->__crt_alg->cra_blocksize; | 377 | return tfm->__crt_alg->cra_blocksize; |
424 | } | 378 | } |
425 | 379 | ||
426 | static inline unsigned int crypto_tfm_alg_digestsize(struct crypto_tfm *tfm) | ||
427 | { | ||
428 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST); | ||
429 | return tfm->__crt_alg->cra_digest.dia_digestsize; | ||
430 | } | ||
431 | |||
432 | static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm) | 380 | static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm) |
433 | { | 381 | { |
434 | return tfm->__crt_alg->cra_alignmask; | 382 | return tfm->__crt_alg->cra_alignmask; |
@@ -633,7 +581,7 @@ static inline struct crypto_cipher *crypto_alloc_cipher(const char *alg_name, | |||
633 | 581 | ||
634 | static inline struct crypto_tfm *crypto_cipher_tfm(struct crypto_cipher *tfm) | 582 | static inline struct crypto_tfm *crypto_cipher_tfm(struct crypto_cipher *tfm) |
635 | { | 583 | { |
636 | return tfm; | 584 | return &tfm->base; |
637 | } | 585 | } |
638 | 586 | ||
639 | static inline void crypto_free_cipher(struct crypto_cipher *tfm) | 587 | static inline void crypto_free_cipher(struct crypto_cipher *tfm) |
@@ -809,76 +757,6 @@ static inline int crypto_hash_setkey(struct crypto_hash *hash, | |||
809 | return crypto_hash_crt(hash)->setkey(hash, key, keylen); | 757 | return crypto_hash_crt(hash)->setkey(hash, key, keylen); |
810 | } | 758 | } |
811 | 759 | ||
812 | static int crypto_cipher_encrypt(struct crypto_tfm *tfm, | ||
813 | struct scatterlist *dst, | ||
814 | struct scatterlist *src, | ||
815 | unsigned int nbytes) __deprecated; | ||
816 | static inline int crypto_cipher_encrypt(struct crypto_tfm *tfm, | ||
817 | struct scatterlist *dst, | ||
818 | struct scatterlist *src, | ||
819 | unsigned int nbytes) | ||
820 | { | ||
821 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
822 | return tfm->crt_cipher.cit_encrypt(tfm, dst, src, nbytes); | ||
823 | } | ||
824 | |||
825 | static int crypto_cipher_encrypt_iv(struct crypto_tfm *tfm, | ||
826 | struct scatterlist *dst, | ||
827 | struct scatterlist *src, | ||
828 | unsigned int nbytes, u8 *iv) __deprecated; | ||
829 | static inline int crypto_cipher_encrypt_iv(struct crypto_tfm *tfm, | ||
830 | struct scatterlist *dst, | ||
831 | struct scatterlist *src, | ||
832 | unsigned int nbytes, u8 *iv) | ||
833 | { | ||
834 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
835 | return tfm->crt_cipher.cit_encrypt_iv(tfm, dst, src, nbytes, iv); | ||
836 | } | ||
837 | |||
838 | static int crypto_cipher_decrypt(struct crypto_tfm *tfm, | ||
839 | struct scatterlist *dst, | ||
840 | struct scatterlist *src, | ||
841 | unsigned int nbytes) __deprecated; | ||
842 | static inline int crypto_cipher_decrypt(struct crypto_tfm *tfm, | ||
843 | struct scatterlist *dst, | ||
844 | struct scatterlist *src, | ||
845 | unsigned int nbytes) | ||
846 | { | ||
847 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
848 | return tfm->crt_cipher.cit_decrypt(tfm, dst, src, nbytes); | ||
849 | } | ||
850 | |||
851 | static int crypto_cipher_decrypt_iv(struct crypto_tfm *tfm, | ||
852 | struct scatterlist *dst, | ||
853 | struct scatterlist *src, | ||
854 | unsigned int nbytes, u8 *iv) __deprecated; | ||
855 | static inline int crypto_cipher_decrypt_iv(struct crypto_tfm *tfm, | ||
856 | struct scatterlist *dst, | ||
857 | struct scatterlist *src, | ||
858 | unsigned int nbytes, u8 *iv) | ||
859 | { | ||
860 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
861 | return tfm->crt_cipher.cit_decrypt_iv(tfm, dst, src, nbytes, iv); | ||
862 | } | ||
863 | |||
864 | static void crypto_cipher_set_iv(struct crypto_tfm *tfm, | ||
865 | const u8 *src, unsigned int len) __deprecated; | ||
866 | static inline void crypto_cipher_set_iv(struct crypto_tfm *tfm, | ||
867 | const u8 *src, unsigned int len) | ||
868 | { | ||
869 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
870 | memcpy(tfm->crt_cipher.cit_iv, src, len); | ||
871 | } | ||
872 | |||
873 | static void crypto_cipher_get_iv(struct crypto_tfm *tfm, | ||
874 | u8 *dst, unsigned int len) __deprecated; | ||
875 | static inline void crypto_cipher_get_iv(struct crypto_tfm *tfm, | ||
876 | u8 *dst, unsigned int len) | ||
877 | { | ||
878 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
879 | memcpy(dst, tfm->crt_cipher.cit_iv, len); | ||
880 | } | ||
881 | |||
882 | static inline struct crypto_comp *__crypto_comp_cast(struct crypto_tfm *tfm) | 760 | static inline struct crypto_comp *__crypto_comp_cast(struct crypto_tfm *tfm) |
883 | { | 761 | { |
884 | return (struct crypto_comp *)tfm; | 762 | return (struct crypto_comp *)tfm; |
@@ -903,7 +781,7 @@ static inline struct crypto_comp *crypto_alloc_comp(const char *alg_name, | |||
903 | 781 | ||
904 | static inline struct crypto_tfm *crypto_comp_tfm(struct crypto_comp *tfm) | 782 | static inline struct crypto_tfm *crypto_comp_tfm(struct crypto_comp *tfm) |
905 | { | 783 | { |
906 | return tfm; | 784 | return &tfm->base; |
907 | } | 785 | } |
908 | 786 | ||
909 | static inline void crypto_free_comp(struct crypto_comp *tfm) | 787 | static inline void crypto_free_comp(struct crypto_comp *tfm) |
@@ -934,14 +812,16 @@ static inline int crypto_comp_compress(struct crypto_comp *tfm, | |||
934 | const u8 *src, unsigned int slen, | 812 | const u8 *src, unsigned int slen, |
935 | u8 *dst, unsigned int *dlen) | 813 | u8 *dst, unsigned int *dlen) |
936 | { | 814 | { |
937 | return crypto_comp_crt(tfm)->cot_compress(tfm, src, slen, dst, dlen); | 815 | return crypto_comp_crt(tfm)->cot_compress(crypto_comp_tfm(tfm), |
816 | src, slen, dst, dlen); | ||
938 | } | 817 | } |
939 | 818 | ||
940 | static inline int crypto_comp_decompress(struct crypto_comp *tfm, | 819 | static inline int crypto_comp_decompress(struct crypto_comp *tfm, |
941 | const u8 *src, unsigned int slen, | 820 | const u8 *src, unsigned int slen, |
942 | u8 *dst, unsigned int *dlen) | 821 | u8 *dst, unsigned int *dlen) |
943 | { | 822 | { |
944 | return crypto_comp_crt(tfm)->cot_decompress(tfm, src, slen, dst, dlen); | 823 | return crypto_comp_crt(tfm)->cot_decompress(crypto_comp_tfm(tfm), |
824 | src, slen, dst, dlen); | ||
945 | } | 825 | } |
946 | 826 | ||
947 | #endif /* _LINUX_CRYPTO_H */ | 827 | #endif /* _LINUX_CRYPTO_H */ |
diff --git a/include/linux/device.h b/include/linux/device.h index 5ca1cdba56..26e4692f2d 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -354,6 +354,41 @@ extern int __must_check device_create_bin_file(struct device *dev, | |||
354 | struct bin_attribute *attr); | 354 | struct bin_attribute *attr); |
355 | extern void device_remove_bin_file(struct device *dev, | 355 | extern void device_remove_bin_file(struct device *dev, |
356 | struct bin_attribute *attr); | 356 | struct bin_attribute *attr); |
357 | |||
358 | /* device resource management */ | ||
359 | typedef void (*dr_release_t)(struct device *dev, void *res); | ||
360 | typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data); | ||
361 | |||
362 | #ifdef CONFIG_DEBUG_DEVRES | ||
363 | extern void * __devres_alloc(dr_release_t release, size_t size, gfp_t gfp, | ||
364 | const char *name); | ||
365 | #define devres_alloc(release, size, gfp) \ | ||
366 | __devres_alloc(release, size, gfp, #release) | ||
367 | #else | ||
368 | extern void * devres_alloc(dr_release_t release, size_t size, gfp_t gfp); | ||
369 | #endif | ||
370 | extern void devres_free(void *res); | ||
371 | extern void devres_add(struct device *dev, void *res); | ||
372 | extern void * devres_find(struct device *dev, dr_release_t release, | ||
373 | dr_match_t match, void *match_data); | ||
374 | extern void * devres_get(struct device *dev, void *new_res, | ||
375 | dr_match_t match, void *match_data); | ||
376 | extern void * devres_remove(struct device *dev, dr_release_t release, | ||
377 | dr_match_t match, void *match_data); | ||
378 | extern int devres_destroy(struct device *dev, dr_release_t release, | ||
379 | dr_match_t match, void *match_data); | ||
380 | |||
381 | /* devres group */ | ||
382 | extern void * __must_check devres_open_group(struct device *dev, void *id, | ||
383 | gfp_t gfp); | ||
384 | extern void devres_close_group(struct device *dev, void *id); | ||
385 | extern void devres_remove_group(struct device *dev, void *id); | ||
386 | extern int devres_release_group(struct device *dev, void *id); | ||
387 | |||
388 | /* managed kzalloc/kfree for device drivers, no kmalloc, always use kzalloc */ | ||
389 | extern void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp); | ||
390 | extern void devm_kfree(struct device *dev, void *p); | ||
391 | |||
357 | struct device { | 392 | struct device { |
358 | struct klist klist_children; | 393 | struct klist klist_children; |
359 | struct klist_node knode_parent; /* node in sibling list */ | 394 | struct klist_node knode_parent; /* node in sibling list */ |
@@ -397,6 +432,9 @@ struct device { | |||
397 | /* arch specific additions */ | 432 | /* arch specific additions */ |
398 | struct dev_archdata archdata; | 433 | struct dev_archdata archdata; |
399 | 434 | ||
435 | spinlock_t devres_lock; | ||
436 | struct list_head devres_head; | ||
437 | |||
400 | /* class_device migration path */ | 438 | /* class_device migration path */ |
401 | struct list_head node; | 439 | struct list_head node; |
402 | struct class *class; | 440 | struct class *class; |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index ff203c465f..9a663c6db1 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -66,6 +66,33 @@ dma_mark_declared_memory_occupied(struct device *dev, | |||
66 | } | 66 | } |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | #endif | 69 | /* |
70 | * Managed DMA API | ||
71 | */ | ||
72 | extern void *dmam_alloc_coherent(struct device *dev, size_t size, | ||
73 | dma_addr_t *dma_handle, gfp_t gfp); | ||
74 | extern void dmam_free_coherent(struct device *dev, size_t size, void *vaddr, | ||
75 | dma_addr_t dma_handle); | ||
76 | extern void *dmam_alloc_noncoherent(struct device *dev, size_t size, | ||
77 | dma_addr_t *dma_handle, gfp_t gfp); | ||
78 | extern void dmam_free_noncoherent(struct device *dev, size_t size, void *vaddr, | ||
79 | dma_addr_t dma_handle); | ||
80 | #ifdef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | ||
81 | extern int dmam_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | ||
82 | dma_addr_t device_addr, size_t size, | ||
83 | int flags); | ||
84 | extern void dmam_release_declared_memory(struct device *dev); | ||
85 | #else /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */ | ||
86 | static inline int dmam_declare_coherent_memory(struct device *dev, | ||
87 | dma_addr_t bus_addr, dma_addr_t device_addr, | ||
88 | size_t size, gfp_t gfp) | ||
89 | { | ||
90 | return 0; | ||
91 | } | ||
70 | 92 | ||
93 | static inline void dmam_release_declared_memory(struct device *dev) | ||
94 | { | ||
95 | } | ||
96 | #endif /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */ | ||
71 | 97 | ||
98 | #endif | ||
diff --git a/include/linux/dmapool.h b/include/linux/dmapool.h index 76f12f46db..022e34fcbd 100644 --- a/include/linux/dmapool.h +++ b/include/linux/dmapool.h | |||
@@ -24,5 +24,12 @@ void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags, | |||
24 | 24 | ||
25 | void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr); | 25 | void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr); |
26 | 26 | ||
27 | /* | ||
28 | * Managed DMA pool | ||
29 | */ | ||
30 | struct dma_pool *dmam_pool_create(const char *name, struct device *dev, | ||
31 | size_t size, size_t align, size_t allocation); | ||
32 | void dmam_pool_destroy(struct dma_pool *pool); | ||
33 | |||
27 | #endif | 34 | #endif |
28 | 35 | ||
diff --git a/include/linux/dn.h b/include/linux/dn.h index 10b6a6fd58..02bba040fc 100644 --- a/include/linux/dn.h +++ b/include/linux/dn.h | |||
@@ -113,7 +113,7 @@ struct accessdata_dn | |||
113 | * DECnet logical link information structure | 113 | * DECnet logical link information structure |
114 | */ | 114 | */ |
115 | struct linkinfo_dn { | 115 | struct linkinfo_dn { |
116 | __le16 idn_segsize; /* Segment size for link */ | 116 | __u16 idn_segsize; /* Segment size for link */ |
117 | __u8 idn_linkstate; /* Logical link state */ | 117 | __u8 idn_linkstate; /* Logical link state */ |
118 | }; | 118 | }; |
119 | 119 | ||
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h index 278ef44958..dfed8009eb 100644 --- a/include/linux/efs_fs.h +++ b/include/linux/efs_fs.h | |||
@@ -36,7 +36,7 @@ static inline struct efs_sb_info *SUPER_INFO(struct super_block *sb) | |||
36 | 36 | ||
37 | struct statfs; | 37 | struct statfs; |
38 | 38 | ||
39 | extern struct inode_operations efs_dir_inode_operations; | 39 | extern const struct inode_operations efs_dir_inode_operations; |
40 | extern const struct file_operations efs_dir_operations; | 40 | extern const struct file_operations efs_dir_operations; |
41 | extern const struct address_space_operations efs_symlink_aops; | 41 | extern const struct address_space_operations efs_symlink_aops; |
42 | 42 | ||
diff --git a/include/linux/eisa.h b/include/linux/eisa.h index 1ff7c13925..fe806b6f03 100644 --- a/include/linux/eisa.h +++ b/include/linux/eisa.h | |||
@@ -61,10 +61,20 @@ struct eisa_driver { | |||
61 | 61 | ||
62 | #define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver) | 62 | #define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver) |
63 | 63 | ||
64 | /* These external functions are only available when EISA support is enabled. */ | ||
65 | #ifdef CONFIG_EISA | ||
66 | |||
64 | extern struct bus_type eisa_bus_type; | 67 | extern struct bus_type eisa_bus_type; |
65 | int eisa_driver_register (struct eisa_driver *edrv); | 68 | int eisa_driver_register (struct eisa_driver *edrv); |
66 | void eisa_driver_unregister (struct eisa_driver *edrv); | 69 | void eisa_driver_unregister (struct eisa_driver *edrv); |
67 | 70 | ||
71 | #else /* !CONFIG_EISA */ | ||
72 | |||
73 | static inline int eisa_driver_register (struct eisa_driver *edrv) { return 0; } | ||
74 | static inline void eisa_driver_unregister (struct eisa_driver *edrv) { } | ||
75 | |||
76 | #endif /* !CONFIG_EISA */ | ||
77 | |||
68 | /* Mimics pci.h... */ | 78 | /* Mimics pci.h... */ |
69 | static inline void *eisa_get_drvdata (struct eisa_device *edev) | 79 | static inline void *eisa_get_drvdata (struct eisa_device *edev) |
70 | { | 80 | { |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 11cca1bdc0..4eb18ac510 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -868,16 +868,16 @@ do { \ | |||
868 | extern const struct file_operations ext3_dir_operations; | 868 | extern const struct file_operations ext3_dir_operations; |
869 | 869 | ||
870 | /* file.c */ | 870 | /* file.c */ |
871 | extern struct inode_operations ext3_file_inode_operations; | 871 | extern const struct inode_operations ext3_file_inode_operations; |
872 | extern const struct file_operations ext3_file_operations; | 872 | extern const struct file_operations ext3_file_operations; |
873 | 873 | ||
874 | /* namei.c */ | 874 | /* namei.c */ |
875 | extern struct inode_operations ext3_dir_inode_operations; | 875 | extern const struct inode_operations ext3_dir_inode_operations; |
876 | extern struct inode_operations ext3_special_inode_operations; | 876 | extern const struct inode_operations ext3_special_inode_operations; |
877 | 877 | ||
878 | /* symlink.c */ | 878 | /* symlink.c */ |
879 | extern struct inode_operations ext3_symlink_inode_operations; | 879 | extern const struct inode_operations ext3_symlink_inode_operations; |
880 | extern struct inode_operations ext3_fast_symlink_inode_operations; | 880 | extern const struct inode_operations ext3_fast_symlink_inode_operations; |
881 | 881 | ||
882 | 882 | ||
883 | #endif /* __KERNEL__ */ | 883 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h index 498503ee61..54c576d414 100644 --- a/include/linux/ext4_fs.h +++ b/include/linux/ext4_fs.h | |||
@@ -955,16 +955,16 @@ do { \ | |||
955 | extern const struct file_operations ext4_dir_operations; | 955 | extern const struct file_operations ext4_dir_operations; |
956 | 956 | ||
957 | /* file.c */ | 957 | /* file.c */ |
958 | extern struct inode_operations ext4_file_inode_operations; | 958 | extern const struct inode_operations ext4_file_inode_operations; |
959 | extern const struct file_operations ext4_file_operations; | 959 | extern const struct file_operations ext4_file_operations; |
960 | 960 | ||
961 | /* namei.c */ | 961 | /* namei.c */ |
962 | extern struct inode_operations ext4_dir_inode_operations; | 962 | extern const struct inode_operations ext4_dir_inode_operations; |
963 | extern struct inode_operations ext4_special_inode_operations; | 963 | extern const struct inode_operations ext4_special_inode_operations; |
964 | 964 | ||
965 | /* symlink.c */ | 965 | /* symlink.c */ |
966 | extern struct inode_operations ext4_symlink_inode_operations; | 966 | extern const struct inode_operations ext4_symlink_inode_operations; |
967 | extern struct inode_operations ext4_fast_symlink_inode_operations; | 967 | extern const struct inode_operations ext4_fast_symlink_inode_operations; |
968 | 968 | ||
969 | /* extents.c */ | 969 | /* extents.c */ |
970 | extern int ext4_ext_tree_init(handle_t *handle, struct inode *); | 970 | extern int ext4_ext_tree_init(handle_t *handle, struct inode *); |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 64177ec9a0..a78e25683f 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -49,6 +49,13 @@ | |||
49 | #define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ | 49 | #define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ |
50 | #define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ | 50 | #define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ |
51 | #define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ | 51 | #define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ |
52 | #define FB_AUX_TEXT_SVGA_GROUP 8 /* 8-15: SVGA tileblit compatible modes */ | ||
53 | #define FB_AUX_TEXT_SVGA_MASK 7 /* lower three bits says step */ | ||
54 | #define FB_AUX_TEXT_SVGA_STEP2 8 /* SVGA text mode: text, attr */ | ||
55 | #define FB_AUX_TEXT_SVGA_STEP4 9 /* SVGA text mode: text, attr, 2 reserved bytes */ | ||
56 | #define FB_AUX_TEXT_SVGA_STEP8 10 /* SVGA text mode: text, attr, 6 reserved bytes */ | ||
57 | #define FB_AUX_TEXT_SVGA_STEP16 11 /* SVGA text mode: text, attr, 14 reserved bytes */ | ||
58 | #define FB_AUX_TEXT_SVGA_LAST 15 /* reserved up to 15 */ | ||
52 | 59 | ||
53 | #define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */ | 60 | #define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */ |
54 | #define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */ | 61 | #define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */ |
@@ -945,25 +952,26 @@ extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter); | |||
945 | /* drivers/video/modedb.c */ | 952 | /* drivers/video/modedb.c */ |
946 | #define VESA_MODEDB_SIZE 34 | 953 | #define VESA_MODEDB_SIZE 34 |
947 | extern void fb_var_to_videomode(struct fb_videomode *mode, | 954 | extern void fb_var_to_videomode(struct fb_videomode *mode, |
948 | struct fb_var_screeninfo *var); | 955 | const struct fb_var_screeninfo *var); |
949 | extern void fb_videomode_to_var(struct fb_var_screeninfo *var, | 956 | extern void fb_videomode_to_var(struct fb_var_screeninfo *var, |
950 | struct fb_videomode *mode); | 957 | const struct fb_videomode *mode); |
951 | extern int fb_mode_is_equal(struct fb_videomode *mode1, | 958 | extern int fb_mode_is_equal(const struct fb_videomode *mode1, |
952 | struct fb_videomode *mode2); | 959 | const struct fb_videomode *mode2); |
953 | extern int fb_add_videomode(struct fb_videomode *mode, struct list_head *head); | 960 | extern int fb_add_videomode(const struct fb_videomode *mode, |
954 | extern void fb_delete_videomode(struct fb_videomode *mode, | 961 | struct list_head *head); |
962 | extern void fb_delete_videomode(const struct fb_videomode *mode, | ||
955 | struct list_head *head); | 963 | struct list_head *head); |
956 | extern struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var, | 964 | extern const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var, |
957 | struct list_head *head); | 965 | struct list_head *head); |
958 | extern struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var, | 966 | extern const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var, |
959 | struct list_head *head); | 967 | struct list_head *head); |
960 | extern struct fb_videomode *fb_find_nearest_mode(struct fb_videomode *mode, | 968 | extern const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode, |
961 | struct list_head *head); | 969 | struct list_head *head); |
962 | extern void fb_destroy_modelist(struct list_head *head); | 970 | extern void fb_destroy_modelist(struct list_head *head); |
963 | extern void fb_videomode_to_modelist(struct fb_videomode *modedb, int num, | 971 | extern void fb_videomode_to_modelist(const struct fb_videomode *modedb, int num, |
964 | struct list_head *head); | 972 | struct list_head *head); |
965 | extern struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs, | 973 | extern const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs, |
966 | struct list_head *head); | 974 | struct list_head *head); |
967 | 975 | ||
968 | /* drivers/video/fbcmap.c */ | 976 | /* drivers/video/fbcmap.c */ |
969 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); | 977 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1410e5330c..86ec3f4a7d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -169,6 +169,7 @@ extern int dir_notify_enable; | |||
169 | #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ | 169 | #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ |
170 | ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) | 170 | ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) |
171 | #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) | 171 | #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) |
172 | #define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME) | ||
172 | 173 | ||
173 | #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) | 174 | #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) |
174 | #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) | 175 | #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) |
@@ -550,7 +551,7 @@ struct inode { | |||
550 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | 551 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ |
551 | struct mutex i_mutex; | 552 | struct mutex i_mutex; |
552 | struct rw_semaphore i_alloc_sem; | 553 | struct rw_semaphore i_alloc_sem; |
553 | struct inode_operations *i_op; | 554 | const struct inode_operations *i_op; |
554 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ | 555 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ |
555 | struct super_block *i_sb; | 556 | struct super_block *i_sb; |
556 | struct file_lock *i_flock; | 557 | struct file_lock *i_flock; |
@@ -906,7 +907,7 @@ struct super_block { | |||
906 | unsigned char s_dirt; | 907 | unsigned char s_dirt; |
907 | unsigned long long s_maxbytes; /* Max file size */ | 908 | unsigned long long s_maxbytes; /* Max file size */ |
908 | struct file_system_type *s_type; | 909 | struct file_system_type *s_type; |
909 | struct super_operations *s_op; | 910 | const struct super_operations *s_op; |
910 | struct dquot_operations *dq_op; | 911 | struct dquot_operations *dq_op; |
911 | struct quotactl_ops *s_qcop; | 912 | struct quotactl_ops *s_qcop; |
912 | struct export_operations *s_export_op; | 913 | struct export_operations *s_export_op; |
@@ -1382,7 +1383,7 @@ struct super_block *sget(struct file_system_type *type, | |||
1382 | int (*set)(struct super_block *,void *), | 1383 | int (*set)(struct super_block *,void *), |
1383 | void *data); | 1384 | void *data); |
1384 | extern int get_sb_pseudo(struct file_system_type *, char *, | 1385 | extern int get_sb_pseudo(struct file_system_type *, char *, |
1385 | struct super_operations *ops, unsigned long, | 1386 | const struct super_operations *ops, unsigned long, |
1386 | struct vfsmount *mnt); | 1387 | struct vfsmount *mnt); |
1387 | extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); | 1388 | extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); |
1388 | int __put_super(struct super_block *sb); | 1389 | int __put_super(struct super_block *sb); |
@@ -1572,12 +1573,18 @@ extern int invalidate_partition(struct gendisk *, int); | |||
1572 | extern int invalidate_inodes(struct super_block *); | 1573 | extern int invalidate_inodes(struct super_block *); |
1573 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 1574 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
1574 | pgoff_t start, pgoff_t end); | 1575 | pgoff_t start, pgoff_t end); |
1575 | unsigned long invalidate_inode_pages(struct address_space *mapping); | 1576 | |
1577 | static inline unsigned long __deprecated | ||
1578 | invalidate_inode_pages(struct address_space *mapping) | ||
1579 | { | ||
1580 | return invalidate_mapping_pages(mapping, 0, ~0UL); | ||
1581 | } | ||
1582 | |||
1576 | static inline void invalidate_remote_inode(struct inode *inode) | 1583 | static inline void invalidate_remote_inode(struct inode *inode) |
1577 | { | 1584 | { |
1578 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || | 1585 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
1579 | S_ISLNK(inode->i_mode)) | 1586 | S_ISLNK(inode->i_mode)) |
1580 | invalidate_inode_pages(inode->i_mapping); | 1587 | invalidate_mapping_pages(inode->i_mapping, 0, -1); |
1581 | } | 1588 | } |
1582 | extern int invalidate_inode_pages2(struct address_space *mapping); | 1589 | extern int invalidate_inode_pages2(struct address_space *mapping); |
1583 | extern int invalidate_inode_pages2_range(struct address_space *mapping, | 1590 | extern int invalidate_inode_pages2_range(struct address_space *mapping, |
@@ -1681,7 +1688,6 @@ extern struct inode *new_inode(struct super_block *); | |||
1681 | extern int __remove_suid(struct dentry *, int); | 1688 | extern int __remove_suid(struct dentry *, int); |
1682 | extern int should_remove_suid(struct dentry *); | 1689 | extern int should_remove_suid(struct dentry *); |
1683 | extern int remove_suid(struct dentry *); | 1690 | extern int remove_suid(struct dentry *); |
1684 | extern void remove_dquot_ref(struct super_block *, int, struct list_head *); | ||
1685 | 1691 | ||
1686 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); | 1692 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); |
1687 | extern void remove_inode_hash(struct inode *); | 1693 | extern void remove_inode_hash(struct inode *); |
@@ -1822,7 +1828,7 @@ extern void page_put_link(struct dentry *, struct nameidata *, void *); | |||
1822 | extern int __page_symlink(struct inode *inode, const char *symname, int len, | 1828 | extern int __page_symlink(struct inode *inode, const char *symname, int len, |
1823 | gfp_t gfp_mask); | 1829 | gfp_t gfp_mask); |
1824 | extern int page_symlink(struct inode *inode, const char *symname, int len); | 1830 | extern int page_symlink(struct inode *inode, const char *symname, int len); |
1825 | extern struct inode_operations page_symlink_inode_operations; | 1831 | extern const struct inode_operations page_symlink_inode_operations; |
1826 | extern int generic_readlink(struct dentry *, char __user *, int); | 1832 | extern int generic_readlink(struct dentry *, char __user *, int); |
1827 | extern void generic_fillattr(struct inode *, struct kstat *); | 1833 | extern void generic_fillattr(struct inode *, struct kstat *); |
1828 | extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 1834 | extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
@@ -1867,7 +1873,7 @@ extern int simple_commit_write(struct file *file, struct page *page, | |||
1867 | extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); | 1873 | extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); |
1868 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); | 1874 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); |
1869 | extern const struct file_operations simple_dir_operations; | 1875 | extern const struct file_operations simple_dir_operations; |
1870 | extern struct inode_operations simple_dir_inode_operations; | 1876 | extern const struct inode_operations simple_dir_inode_operations; |
1871 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; | 1877 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; |
1872 | struct dentry *d_alloc_name(struct dentry *, const char *); | 1878 | struct dentry *d_alloc_name(struct dentry *, const char *); |
1873 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); | 1879 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 0a022b2f63..2c65da7cab 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -20,7 +20,11 @@ enum { | |||
20 | LINUX_EXTENDED_PARTITION = 0x85, | 20 | LINUX_EXTENDED_PARTITION = 0x85, |
21 | WIN98_EXTENDED_PARTITION = 0x0f, | 21 | WIN98_EXTENDED_PARTITION = 0x0f, |
22 | 22 | ||
23 | SUN_WHOLE_DISK = DOS_EXTENDED_PARTITION, | ||
24 | |||
23 | LINUX_SWAP_PARTITION = 0x82, | 25 | LINUX_SWAP_PARTITION = 0x82, |
26 | LINUX_DATA_PARTITION = 0x83, | ||
27 | LINUX_LVM_PARTITION = 0x8e, | ||
24 | LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ | 28 | LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ |
25 | 29 | ||
26 | SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION, | 30 | SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION, |
@@ -400,10 +404,14 @@ struct unixware_disklabel { | |||
400 | 404 | ||
401 | #ifdef __KERNEL__ | 405 | #ifdef __KERNEL__ |
402 | 406 | ||
407 | #define ADDPART_FLAG_NONE 0 | ||
408 | #define ADDPART_FLAG_RAID 1 | ||
409 | #define ADDPART_FLAG_WHOLEDISK 2 | ||
410 | |||
403 | char *disk_name (struct gendisk *hd, int part, char *buf); | 411 | char *disk_name (struct gendisk *hd, int part, char *buf); |
404 | 412 | ||
405 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); | 413 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); |
406 | extern void add_partition(struct gendisk *, int, sector_t, sector_t); | 414 | extern void add_partition(struct gendisk *, int, sector_t, sector_t, int); |
407 | extern void delete_partition(struct gendisk *, int); | 415 | extern void delete_partition(struct gendisk *, int); |
408 | 416 | ||
409 | extern struct gendisk *alloc_disk_node(int minors, int node_id); | 417 | extern struct gendisk *alloc_disk_node(int minors, int node_id); |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 00c314aeda..2a7d15bcde 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -70,7 +70,7 @@ struct vm_area_struct; | |||
70 | #ifdef CONFIG_NUMA | 70 | #ifdef CONFIG_NUMA |
71 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) | 71 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) |
72 | #else | 72 | #else |
73 | #define GFP_THISNODE 0 | 73 | #define GFP_THISNODE ((__force gfp_t)0) |
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | 76 | ||
@@ -85,8 +85,10 @@ struct vm_area_struct; | |||
85 | 85 | ||
86 | static inline enum zone_type gfp_zone(gfp_t flags) | 86 | static inline enum zone_type gfp_zone(gfp_t flags) |
87 | { | 87 | { |
88 | #ifdef CONFIG_ZONE_DMA | ||
88 | if (flags & __GFP_DMA) | 89 | if (flags & __GFP_DMA) |
89 | return ZONE_DMA; | 90 | return ZONE_DMA; |
91 | #endif | ||
90 | #ifdef CONFIG_ZONE_DMA32 | 92 | #ifdef CONFIG_ZONE_DMA32 |
91 | if (flags & __GFP_DMA32) | 93 | if (flags & __GFP_DMA32) |
92 | return ZONE_DMA32; | 94 | return ZONE_DMA32; |
diff --git a/include/linux/gigaset_dev.h b/include/linux/gigaset_dev.h index 70ad09c8ad..5dc4a316ca 100644 --- a/include/linux/gigaset_dev.h +++ b/include/linux/gigaset_dev.h | |||
@@ -9,8 +9,6 @@ | |||
9 | * published by the Free Software Foundation; either version 2 of | 9 | * published by the Free Software Foundation; either version 2 of |
10 | * the License, or (at your option) any later version. | 10 | * the License, or (at your option) any later version. |
11 | * ===================================================================== | 11 | * ===================================================================== |
12 | * Version: $Id: gigaset_dev.h,v 1.4.4.4 2005/11/21 22:28:09 hjlipp Exp $ | ||
13 | * ===================================================================== | ||
14 | */ | 12 | */ |
15 | 13 | ||
16 | #ifndef GIGASET_INTERFACE_H | 14 | #ifndef GIGASET_INTERFACE_H |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index d38778f2fb..6e7ec4c761 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -115,6 +115,8 @@ | |||
115 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ | 115 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ |
116 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ | 116 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ |
117 | #define I2C_DRIVERID_ISL1208 88 /* Intersil ISL1208 RTC */ | 117 | #define I2C_DRIVERID_ISL1208 88 /* Intersil ISL1208 RTC */ |
118 | #define I2C_DRIVERID_WM8731 89 /* Wolfson WM8731 audio codec */ | ||
119 | #define I2C_DRIVERID_WM8750 90 /* Wolfson WM8750 audio codec */ | ||
118 | 120 | ||
119 | #define I2C_DRIVERID_I2CDEV 900 | 121 | #define I2C_DRIVERID_I2CDEV 900 |
120 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | 122 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ |
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h index 99393ef3af..f3de05c306 100644 --- a/include/linux/if_packet.h +++ b/include/linux/if_packet.h | |||
@@ -41,6 +41,7 @@ struct sockaddr_ll | |||
41 | #define PACKET_RX_RING 5 | 41 | #define PACKET_RX_RING 5 |
42 | #define PACKET_STATISTICS 6 | 42 | #define PACKET_STATISTICS 6 |
43 | #define PACKET_COPY_THRESH 7 | 43 | #define PACKET_COPY_THRESH 7 |
44 | #define PACKET_AUXDATA 8 | ||
44 | 45 | ||
45 | struct tpacket_stats | 46 | struct tpacket_stats |
46 | { | 47 | { |
@@ -48,6 +49,15 @@ struct tpacket_stats | |||
48 | unsigned int tp_drops; | 49 | unsigned int tp_drops; |
49 | }; | 50 | }; |
50 | 51 | ||
52 | struct tpacket_auxdata | ||
53 | { | ||
54 | __u32 tp_status; | ||
55 | __u32 tp_len; | ||
56 | __u32 tp_snaplen; | ||
57 | __u16 tp_mac; | ||
58 | __u16 tp_net; | ||
59 | }; | ||
60 | |||
51 | struct tpacket_hdr | 61 | struct tpacket_hdr |
52 | { | 62 | { |
53 | unsigned long tp_status; | 63 | unsigned long tp_status; |
diff --git a/include/linux/init.h b/include/linux/init.h index 5a593a1dec..e290a010e3 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -67,7 +67,8 @@ extern initcall_t __con_initcall_start[], __con_initcall_end[]; | |||
67 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; | 67 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; |
68 | 68 | ||
69 | /* Defined in init/main.c */ | 69 | /* Defined in init/main.c */ |
70 | extern char saved_command_line[]; | 70 | extern char __initdata boot_command_line[]; |
71 | extern char *saved_command_line; | ||
71 | extern unsigned int reset_devices; | 72 | extern unsigned int reset_devices; |
72 | 73 | ||
73 | /* used by init/main.c */ | 74 | /* used by init/main.c */ |
@@ -164,7 +165,7 @@ struct obs_kernel_param { | |||
164 | #define early_param(str, fn) \ | 165 | #define early_param(str, fn) \ |
165 | __setup_param(str, fn, fn, 1) | 166 | __setup_param(str, fn, fn, 1) |
166 | 167 | ||
167 | /* Relies on saved_command_line being set */ | 168 | /* Relies on boot_command_line being set */ |
168 | void __init parse_early_param(void); | 169 | void __init parse_early_param(void); |
169 | #endif /* __ASSEMBLY__ */ | 170 | #endif /* __ASSEMBLY__ */ |
170 | 171 | ||
@@ -172,7 +173,7 @@ void __init parse_early_param(void); | |||
172 | * module_init() - driver initialization entry point | 173 | * module_init() - driver initialization entry point |
173 | * @x: function to be run at kernel boot time or module insertion | 174 | * @x: function to be run at kernel boot time or module insertion |
174 | * | 175 | * |
175 | * module_init() will either be called during do_initcalls (if | 176 | * module_init() will either be called during do_initcalls() (if |
176 | * builtin) or at module insertion time (if a module). There can only | 177 | * builtin) or at module insertion time (if a module). There can only |
177 | * be one per module. | 178 | * be one per module. |
178 | */ | 179 | */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 6383d2d83b..a2d95ff50e 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -66,7 +66,7 @@ | |||
66 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ | 66 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ |
67 | .rlim = INIT_RLIMITS, \ | 67 | .rlim = INIT_RLIMITS, \ |
68 | .pgrp = 1, \ | 68 | .pgrp = 1, \ |
69 | .tty_old_pgrp = 0, \ | 69 | .tty_old_pgrp = NULL, \ |
70 | { .__session = 1}, \ | 70 | { .__session = 1}, \ |
71 | } | 71 | } |
72 | 72 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index e36e86c869..5a8ba0b8cc 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/irqflags.h> | 13 | #include <linux/irqflags.h> |
14 | #include <linux/bottom_half.h> | 14 | #include <linux/bottom_half.h> |
15 | #include <linux/device.h> | ||
15 | #include <asm/atomic.h> | 16 | #include <asm/atomic.h> |
16 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
17 | #include <asm/system.h> | 18 | #include <asm/system.h> |
@@ -83,6 +84,11 @@ extern int request_irq(unsigned int, irq_handler_t handler, | |||
83 | unsigned long, const char *, void *); | 84 | unsigned long, const char *, void *); |
84 | extern void free_irq(unsigned int, void *); | 85 | extern void free_irq(unsigned int, void *); |
85 | 86 | ||
87 | extern int devm_request_irq(struct device *dev, unsigned int irq, | ||
88 | irq_handler_t handler, unsigned long irqflags, | ||
89 | const char *devname, void *dev_id); | ||
90 | extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id); | ||
91 | |||
86 | /* | 92 | /* |
87 | * On lockdep we dont want to enable hardirqs in hardirq | 93 | * On lockdep we dont want to enable hardirqs in hardirq |
88 | * context. Use local_irq_enable_in_hardirq() to annotate | 94 | * context. Use local_irq_enable_in_hardirq() to annotate |
diff --git a/include/linux/io.h b/include/linux/io.h index 81877ea393..c244a0cc93 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
@@ -22,12 +22,27 @@ | |||
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | 24 | ||
25 | struct device; | ||
26 | |||
25 | void __iowrite32_copy(void __iomem *to, const void *from, size_t count); | 27 | void __iowrite32_copy(void __iomem *to, const void *from, size_t count); |
26 | void __iowrite64_copy(void __iomem *to, const void *from, size_t count); | 28 | void __iowrite64_copy(void __iomem *to, const void *from, size_t count); |
27 | 29 | ||
28 | int ioremap_page_range(unsigned long addr, unsigned long end, | 30 | int ioremap_page_range(unsigned long addr, unsigned long end, |
29 | unsigned long phys_addr, pgprot_t prot); | 31 | unsigned long phys_addr, pgprot_t prot); |
30 | 32 | ||
33 | /* | ||
34 | * Managed iomap interface | ||
35 | */ | ||
36 | void __iomem * devm_ioport_map(struct device *dev, unsigned long port, | ||
37 | unsigned int nr); | ||
38 | void devm_ioport_unmap(struct device *dev, void __iomem *addr); | ||
39 | |||
40 | void __iomem * devm_ioremap(struct device *dev, unsigned long offset, | ||
41 | unsigned long size); | ||
42 | void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, | ||
43 | unsigned long size); | ||
44 | void devm_iounmap(struct device *dev, void __iomem *addr); | ||
45 | |||
31 | /** | 46 | /** |
32 | * check_signature - find BIOS signatures | 47 | * check_signature - find BIOS signatures |
33 | * @io_addr: mmio address to check | 48 | * @io_addr: mmio address to check |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 15228d79c5..6859a3b140 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -137,4 +137,24 @@ static inline int __deprecated check_region(resource_size_t s, | |||
137 | { | 137 | { |
138 | return __check_region(&ioport_resource, s, n); | 138 | return __check_region(&ioport_resource, s, n); |
139 | } | 139 | } |
140 | |||
141 | /* Wrappers for managed devices */ | ||
142 | struct device; | ||
143 | #define devm_request_region(dev,start,n,name) \ | ||
144 | __devm_request_region(dev, &ioport_resource, (start), (n), (name)) | ||
145 | #define devm_request_mem_region(dev,start,n,name) \ | ||
146 | __devm_request_region(dev, &iomem_resource, (start), (n), (name)) | ||
147 | |||
148 | extern struct resource * __devm_request_region(struct device *dev, | ||
149 | struct resource *parent, resource_size_t start, | ||
150 | resource_size_t n, const char *name); | ||
151 | |||
152 | #define devm_release_region(start,n) \ | ||
153 | __devm_release_region(dev, &ioport_resource, (start), (n)) | ||
154 | #define devm_release_mem_region(start,n) \ | ||
155 | __devm_release_region(dev, &iomem_resource, (start), (n)) | ||
156 | |||
157 | extern void __devm_release_region(struct device *dev, struct resource *parent, | ||
158 | resource_size_t start, resource_size_t n); | ||
159 | |||
140 | #endif /* _LINUX_IOPORT_H */ | 160 | #endif /* _LINUX_IOPORT_H */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 63fb18dcac..9ddf25c215 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -92,11 +92,6 @@ extern int cond_resched(void); | |||
92 | (__x < 0) ? -__x : __x; \ | 92 | (__x < 0) ? -__x : __x; \ |
93 | }) | 93 | }) |
94 | 94 | ||
95 | #define labs(x) ({ \ | ||
96 | long __x = (x); \ | ||
97 | (__x < 0) ? -__x : __x; \ | ||
98 | }) | ||
99 | |||
100 | extern struct atomic_notifier_head panic_notifier_list; | 95 | extern struct atomic_notifier_head panic_notifier_list; |
101 | extern long (*panic_blink)(long time); | 96 | extern long (*panic_blink)(long time); |
102 | NORET_TYPE void panic(const char * fmt, ...) | 97 | NORET_TYPE void panic(const char * fmt, ...) |
@@ -139,7 +134,8 @@ extern unsigned long long memparse(char *ptr, char **retptr); | |||
139 | extern int core_kernel_text(unsigned long addr); | 134 | extern int core_kernel_text(unsigned long addr); |
140 | extern int __kernel_text_address(unsigned long addr); | 135 | extern int __kernel_text_address(unsigned long addr); |
141 | extern int kernel_text_address(unsigned long addr); | 136 | extern int kernel_text_address(unsigned long addr); |
142 | extern int session_of_pgrp(int pgrp); | 137 | struct pid; |
138 | extern struct pid *session_of_pgrp(struct pid *pgrp); | ||
143 | 139 | ||
144 | extern void dump_thread(struct pt_regs *regs, struct user *dump); | 140 | extern void dump_thread(struct pt_regs *regs, struct user *dump); |
145 | 141 | ||
@@ -176,6 +172,7 @@ static inline void console_verbose(void) | |||
176 | } | 172 | } |
177 | 173 | ||
178 | extern void bust_spinlocks(int yes); | 174 | extern void bust_spinlocks(int yes); |
175 | extern void wake_up_klogd(void); | ||
179 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ | 176 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ |
180 | extern int panic_timeout; | 177 | extern int panic_timeout; |
181 | extern int panic_on_oops; | 178 | extern int panic_on_oops; |
@@ -200,6 +197,7 @@ extern enum system_states { | |||
200 | #define TAINT_FORCED_RMMOD (1<<3) | 197 | #define TAINT_FORCED_RMMOD (1<<3) |
201 | #define TAINT_MACHINE_CHECK (1<<4) | 198 | #define TAINT_MACHINE_CHECK (1<<4) |
202 | #define TAINT_BAD_PAGE (1<<5) | 199 | #define TAINT_BAD_PAGE (1<<5) |
200 | #define TAINT_USER (1<<6) | ||
203 | 201 | ||
204 | extern void dump_stack(void); | 202 | extern void dump_stack(void); |
205 | 203 | ||
@@ -312,6 +310,9 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * | |||
312 | (void)__tmp; \ | 310 | (void)__tmp; \ |
313 | }) | 311 | }) |
314 | 312 | ||
313 | struct sysinfo; | ||
314 | extern int do_sysinfo(struct sysinfo *info); | ||
315 | |||
315 | #endif /* __KERNEL__ */ | 316 | #endif /* __KERNEL__ */ |
316 | 317 | ||
317 | #define SI_LOAD_SHIFT 16 | 318 | #define SI_LOAD_SHIFT 16 |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 48eccd865b..404f4464cb 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
@@ -74,7 +74,7 @@ static inline void kfifo_reset(struct kfifo *fifo) | |||
74 | * @buffer: the data to be added. | 74 | * @buffer: the data to be added. |
75 | * @len: the length of the data to be added. | 75 | * @len: the length of the data to be added. |
76 | * | 76 | * |
77 | * This function copies at most 'len' bytes from the 'buffer' into | 77 | * This function copies at most @len bytes from the @buffer into |
78 | * the FIFO depending on the free space, and returns the number of | 78 | * the FIFO depending on the free space, and returns the number of |
79 | * bytes copied. | 79 | * bytes copied. |
80 | */ | 80 | */ |
@@ -99,8 +99,8 @@ static inline unsigned int kfifo_put(struct kfifo *fifo, | |||
99 | * @buffer: where the data must be copied. | 99 | * @buffer: where the data must be copied. |
100 | * @len: the size of the destination buffer. | 100 | * @len: the size of the destination buffer. |
101 | * | 101 | * |
102 | * This function copies at most 'len' bytes from the FIFO into the | 102 | * This function copies at most @len bytes from the FIFO into the |
103 | * 'buffer' and returns the number of copied bytes. | 103 | * @buffer and returns the number of copied bytes. |
104 | */ | 104 | */ |
105 | static inline unsigned int kfifo_get(struct kfifo *fifo, | 105 | static inline unsigned int kfifo_get(struct kfifo *fifo, |
106 | unsigned char *buffer, unsigned int len) | 106 | unsigned char *buffer, unsigned int len) |
diff --git a/include/linux/ks0108.h b/include/linux/ks0108.h new file mode 100644 index 0000000000..8047d4b17b --- /dev/null +++ b/include/linux/ks0108.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * Filename: ks0108.h | ||
3 | * Version: 0.1.0 | ||
4 | * Description: ks0108 LCD Controller driver header | ||
5 | * License: GPLv2 | ||
6 | * | ||
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
8 | * Date: 2006-10-31 | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef _KS0108_H_ | ||
26 | #define _KS0108_H_ | ||
27 | |||
28 | /* Write a byte to the data port */ | ||
29 | extern void ks0108_writedata(unsigned char byte); | ||
30 | |||
31 | /* Write a byte to the control port */ | ||
32 | extern void ks0108_writecontrol(unsigned char byte); | ||
33 | |||
34 | /* Set the controller's current display state (0..1) */ | ||
35 | extern void ks0108_displaystate(unsigned char state); | ||
36 | |||
37 | /* Set the controller's current startline (0..63) */ | ||
38 | extern void ks0108_startline(unsigned char startline); | ||
39 | |||
40 | /* Set the controller's current address (0..63) */ | ||
41 | extern void ks0108_address(unsigned char address); | ||
42 | |||
43 | /* Set the controller's current page (0..7) */ | ||
44 | extern void ks0108_page(unsigned char page); | ||
45 | |||
46 | #endif /* _KS0108_H_ */ | ||
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 611f17f79e..7444a63262 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -163,7 +163,7 @@ static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) | |||
163 | * @add1: addend1 | 163 | * @add1: addend1 |
164 | * @add2: addend2 | 164 | * @add2: addend2 |
165 | * | 165 | * |
166 | * Returns the sum of addend1 and addend2 | 166 | * Returns the sum of @add1 and @add2. |
167 | */ | 167 | */ |
168 | static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) | 168 | static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) |
169 | { | 169 | { |
@@ -189,7 +189,7 @@ static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) | |||
189 | * @kt: addend | 189 | * @kt: addend |
190 | * @nsec: the scalar nsec value to add | 190 | * @nsec: the scalar nsec value to add |
191 | * | 191 | * |
192 | * Returns the sum of kt and nsec in ktime_t format | 192 | * Returns the sum of @kt and @nsec in ktime_t format |
193 | */ | 193 | */ |
194 | extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); | 194 | extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); |
195 | 195 | ||
@@ -246,7 +246,7 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt) | |||
246 | * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds | 246 | * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds |
247 | * @kt: the ktime_t variable to convert | 247 | * @kt: the ktime_t variable to convert |
248 | * | 248 | * |
249 | * Returns the scalar nanoseconds representation of kt | 249 | * Returns the scalar nanoseconds representation of @kt |
250 | */ | 250 | */ |
251 | static inline s64 ktime_to_ns(const ktime_t kt) | 251 | static inline s64 ktime_to_ns(const ktime_t kt) |
252 | { | 252 | { |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 1be148f0fc..f3604593fb 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/types.h> | 11 | #include <asm/types.h> |
12 | #include <linux/ioctl.h> | 12 | #include <linux/ioctl.h> |
13 | 13 | ||
14 | #define KVM_API_VERSION 2 | 14 | #define KVM_API_VERSION 3 |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Architectural interrupt line count, and the size of the bitmap needed | 17 | * Architectural interrupt line count, and the size of the bitmap needed |
@@ -65,6 +65,8 @@ struct kvm_run { | |||
65 | __u8 ready_for_interrupt_injection; | 65 | __u8 ready_for_interrupt_injection; |
66 | __u8 if_flag; | 66 | __u8 if_flag; |
67 | __u16 padding2; | 67 | __u16 padding2; |
68 | |||
69 | /* in (pre_kvm_run), out (post_kvm_run) */ | ||
68 | __u64 cr8; | 70 | __u64 cr8; |
69 | __u64 apic_base; | 71 | __u64 apic_base; |
70 | 72 | ||
@@ -185,6 +187,7 @@ struct kvm_translation { | |||
185 | __u8 valid; | 187 | __u8 valid; |
186 | __u8 writeable; | 188 | __u8 writeable; |
187 | __u8 usermode; | 189 | __u8 usermode; |
190 | __u8 pad[5]; | ||
188 | }; | 191 | }; |
189 | 192 | ||
190 | /* for KVM_INTERRUPT */ | 193 | /* for KVM_INTERRUPT */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 91bb8ceef0..596e0c1888 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
32 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <asm/scatterlist.h> | 33 | #include <asm/scatterlist.h> |
34 | #include <asm/io.h> | 34 | #include <linux/io.h> |
35 | #include <linux/ata.h> | 35 | #include <linux/ata.h> |
36 | #include <linux/workqueue.h> | 36 | #include <linux/workqueue.h> |
37 | #include <scsi/scsi_host.h> | 37 | #include <scsi/scsi_host.h> |
@@ -54,8 +54,6 @@ | |||
54 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ | 54 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ |
55 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ | 55 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ |
56 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ | 56 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ |
57 | #define ATA_ENABLE_PATA /* define to enable PATA support in some | ||
58 | * low-level drivers */ | ||
59 | 57 | ||
60 | 58 | ||
61 | /* note: prints function name for you */ | 59 | /* note: prints function name for you */ |
@@ -109,10 +107,6 @@ static inline u32 ata_msg_init(int dval, int default_msg_enable_bits) | |||
109 | #define ATA_TAG_POISON 0xfafbfcfdU | 107 | #define ATA_TAG_POISON 0xfafbfcfdU |
110 | 108 | ||
111 | /* move to PCI layer? */ | 109 | /* move to PCI layer? */ |
112 | #define PCI_VDEVICE(vendor, device) \ | ||
113 | PCI_VENDOR_ID_##vendor, (device), \ | ||
114 | PCI_ANY_ID, PCI_ANY_ID, 0, 0 | ||
115 | |||
116 | static inline struct device *pci_dev_to_dev(struct pci_dev *pdev) | 110 | static inline struct device *pci_dev_to_dev(struct pci_dev *pdev) |
117 | { | 111 | { |
118 | return &pdev->dev; | 112 | return &pdev->dev; |
@@ -308,7 +302,7 @@ enum { | |||
308 | * most devices. | 302 | * most devices. |
309 | */ | 303 | */ |
310 | ATA_SPINUP_WAIT = 8000, | 304 | ATA_SPINUP_WAIT = 8000, |
311 | 305 | ||
312 | /* Horkage types. May be set by libata or controller on drives | 306 | /* Horkage types. May be set by libata or controller on drives |
313 | (some horkage may be drive/controller pair dependant */ | 307 | (some horkage may be drive/controller pair dependant */ |
314 | 308 | ||
@@ -352,21 +346,21 @@ typedef int (*ata_reset_fn_t)(struct ata_port *ap, unsigned int *classes); | |||
352 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes); | 346 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes); |
353 | 347 | ||
354 | struct ata_ioports { | 348 | struct ata_ioports { |
355 | unsigned long cmd_addr; | 349 | void __iomem *cmd_addr; |
356 | unsigned long data_addr; | 350 | void __iomem *data_addr; |
357 | unsigned long error_addr; | 351 | void __iomem *error_addr; |
358 | unsigned long feature_addr; | 352 | void __iomem *feature_addr; |
359 | unsigned long nsect_addr; | 353 | void __iomem *nsect_addr; |
360 | unsigned long lbal_addr; | 354 | void __iomem *lbal_addr; |
361 | unsigned long lbam_addr; | 355 | void __iomem *lbam_addr; |
362 | unsigned long lbah_addr; | 356 | void __iomem *lbah_addr; |
363 | unsigned long device_addr; | 357 | void __iomem *device_addr; |
364 | unsigned long status_addr; | 358 | void __iomem *status_addr; |
365 | unsigned long command_addr; | 359 | void __iomem *command_addr; |
366 | unsigned long altstatus_addr; | 360 | void __iomem *altstatus_addr; |
367 | unsigned long ctl_addr; | 361 | void __iomem *ctl_addr; |
368 | unsigned long bmdma_addr; | 362 | void __iomem *bmdma_addr; |
369 | unsigned long scr_addr; | 363 | void __iomem *scr_addr; |
370 | }; | 364 | }; |
371 | 365 | ||
372 | struct ata_probe_ent { | 366 | struct ata_probe_ent { |
@@ -385,7 +379,7 @@ struct ata_probe_ent { | |||
385 | unsigned int irq_flags; | 379 | unsigned int irq_flags; |
386 | unsigned long port_flags; | 380 | unsigned long port_flags; |
387 | unsigned long _host_flags; | 381 | unsigned long _host_flags; |
388 | void __iomem *mmio_base; | 382 | void __iomem * const *iomap; |
389 | void *private_data; | 383 | void *private_data; |
390 | 384 | ||
391 | /* port_info for the secondary port. Together with irq2, it's | 385 | /* port_info for the secondary port. Together with irq2, it's |
@@ -402,7 +396,7 @@ struct ata_host { | |||
402 | struct device *dev; | 396 | struct device *dev; |
403 | unsigned long irq; | 397 | unsigned long irq; |
404 | unsigned long irq2; | 398 | unsigned long irq2; |
405 | void __iomem *mmio_base; | 399 | void __iomem * const *iomap; |
406 | unsigned int n_ports; | 400 | unsigned int n_ports; |
407 | void *private_data; | 401 | void *private_data; |
408 | const struct ata_port_operations *ops; | 402 | const struct ata_port_operations *ops; |
@@ -431,9 +425,6 @@ struct ata_queued_cmd { | |||
431 | 425 | ||
432 | unsigned int pad_len; | 426 | unsigned int pad_len; |
433 | 427 | ||
434 | unsigned int nsect; | ||
435 | unsigned int cursect; | ||
436 | |||
437 | unsigned int nbytes; | 428 | unsigned int nbytes; |
438 | unsigned int curbytes; | 429 | unsigned int curbytes; |
439 | 430 | ||
@@ -639,6 +630,8 @@ struct ata_port_operations { | |||
639 | 630 | ||
640 | irq_handler_t irq_handler; | 631 | irq_handler_t irq_handler; |
641 | void (*irq_clear) (struct ata_port *); | 632 | void (*irq_clear) (struct ata_port *); |
633 | u8 (*irq_on) (struct ata_port *); | ||
634 | u8 (*irq_ack) (struct ata_port *ap, unsigned int chk_drq); | ||
642 | 635 | ||
643 | u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); | 636 | u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); |
644 | void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, | 637 | void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, |
@@ -720,20 +713,18 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i | |||
720 | unsigned int n_ports); | 713 | unsigned int n_ports); |
721 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 714 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
722 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); | 715 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); |
723 | extern void ata_pci_device_do_resume(struct pci_dev *pdev); | 716 | extern int __must_check ata_pci_device_do_resume(struct pci_dev *pdev); |
724 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); | 717 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); |
725 | extern int ata_pci_device_resume(struct pci_dev *pdev); | 718 | extern int ata_pci_device_resume(struct pci_dev *pdev); |
726 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); | 719 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); |
727 | #endif /* CONFIG_PCI */ | 720 | #endif /* CONFIG_PCI */ |
728 | extern int ata_device_add(const struct ata_probe_ent *ent); | 721 | extern int ata_device_add(const struct ata_probe_ent *ent); |
729 | extern void ata_port_detach(struct ata_port *ap); | 722 | extern void ata_host_detach(struct ata_host *host); |
730 | extern void ata_host_init(struct ata_host *, struct device *, | 723 | extern void ata_host_init(struct ata_host *, struct device *, |
731 | unsigned long, const struct ata_port_operations *); | 724 | unsigned long, const struct ata_port_operations *); |
732 | extern void ata_host_remove(struct ata_host *host); | ||
733 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 725 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
734 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 726 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
735 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 727 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
736 | extern int ata_scsi_release(struct Scsi_Host *host); | ||
737 | extern void ata_sas_port_destroy(struct ata_port *); | 728 | extern void ata_sas_port_destroy(struct ata_port *); |
738 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, | 729 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, |
739 | struct ata_port_info *, struct Scsi_Host *); | 730 | struct ata_port_info *, struct Scsi_Host *); |
@@ -776,15 +767,11 @@ extern u8 ata_check_status(struct ata_port *ap); | |||
776 | extern u8 ata_altstatus(struct ata_port *ap); | 767 | extern u8 ata_altstatus(struct ata_port *ap); |
777 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); | 768 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); |
778 | extern int ata_port_start (struct ata_port *ap); | 769 | extern int ata_port_start (struct ata_port *ap); |
779 | extern void ata_port_stop (struct ata_port *ap); | ||
780 | extern void ata_host_stop (struct ata_host *host); | ||
781 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance); | 770 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance); |
782 | extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, | 771 | extern void ata_data_xfer(struct ata_device *adev, unsigned char *buf, |
783 | unsigned int buflen, int write_data); | 772 | unsigned int buflen, int write_data); |
784 | extern void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf, | 773 | extern void ata_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, |
785 | unsigned int buflen, int write_data); | 774 | unsigned int buflen, int write_data); |
786 | extern void ata_pio_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, | ||
787 | unsigned int buflen, int write_data); | ||
788 | extern void ata_qc_prep(struct ata_queued_cmd *qc); | 775 | extern void ata_qc_prep(struct ata_queued_cmd *qc); |
789 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); | 776 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); |
790 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); | 777 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); |
@@ -826,6 +813,10 @@ extern void ata_scsi_slave_destroy(struct scsi_device *sdev); | |||
826 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, | 813 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, |
827 | int queue_depth); | 814 | int queue_depth); |
828 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); | 815 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); |
816 | extern u8 ata_irq_on(struct ata_port *ap); | ||
817 | extern u8 ata_dummy_irq_on(struct ata_port *ap); | ||
818 | extern u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq); | ||
819 | extern u8 ata_dummy_irq_ack(struct ata_port *ap, unsigned int chk_drq); | ||
829 | 820 | ||
830 | /* | 821 | /* |
831 | * Timing helpers | 822 | * Timing helpers |
@@ -864,7 +855,6 @@ struct pci_bits { | |||
864 | unsigned long val; | 855 | unsigned long val; |
865 | }; | 856 | }; |
866 | 857 | ||
867 | extern void ata_pci_host_stop (struct ata_host *host); | ||
868 | extern struct ata_probe_ent * | 858 | extern struct ata_probe_ent * |
869 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); | 859 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); |
870 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 860 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |
@@ -1096,10 +1086,9 @@ static inline u8 ata_wait_idle(struct ata_port *ap) | |||
1096 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); | 1086 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); |
1097 | 1087 | ||
1098 | if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) { | 1088 | if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) { |
1099 | unsigned long l = ap->ioaddr.status_addr; | ||
1100 | if (ata_msg_warn(ap)) | 1089 | if (ata_msg_warn(ap)) |
1101 | printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%lX\n", | 1090 | printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%p\n", |
1102 | status, l); | 1091 | status, ap->ioaddr.status_addr); |
1103 | } | 1092 | } |
1104 | 1093 | ||
1105 | return status; | 1094 | return status; |
@@ -1149,8 +1138,7 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc) | |||
1149 | qc->dma_dir = DMA_NONE; | 1138 | qc->dma_dir = DMA_NONE; |
1150 | qc->__sg = NULL; | 1139 | qc->__sg = NULL; |
1151 | qc->flags = 0; | 1140 | qc->flags = 0; |
1152 | qc->cursect = qc->cursg = qc->cursg_ofs = 0; | 1141 | qc->cursg = qc->cursg_ofs = 0; |
1153 | qc->nsect = 0; | ||
1154 | qc->nbytes = qc->curbytes = 0; | 1142 | qc->nbytes = qc->curbytes = 0; |
1155 | qc->n_elem = 0; | 1143 | qc->n_elem = 0; |
1156 | qc->err_mask = 0; | 1144 | qc->err_mask = 0; |
@@ -1163,51 +1151,6 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc) | |||
1163 | qc->result_tf.feature = 0; | 1151 | qc->result_tf.feature = 0; |
1164 | } | 1152 | } |
1165 | 1153 | ||
1166 | /** | ||
1167 | * ata_irq_ack - Acknowledge a device interrupt. | ||
1168 | * @ap: Port on which interrupts are enabled. | ||
1169 | * | ||
1170 | * Wait up to 10 ms for legacy IDE device to become idle (BUSY | ||
1171 | * or BUSY+DRQ clear). Obtain dma status and port status from | ||
1172 | * device. Clear the interrupt. Return port status. | ||
1173 | * | ||
1174 | * LOCKING: | ||
1175 | */ | ||
1176 | |||
1177 | static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq) | ||
1178 | { | ||
1179 | unsigned int bits = chk_drq ? ATA_BUSY | ATA_DRQ : ATA_BUSY; | ||
1180 | u8 host_stat, post_stat, status; | ||
1181 | |||
1182 | status = ata_busy_wait(ap, bits, 1000); | ||
1183 | if (status & bits) | ||
1184 | if (ata_msg_err(ap)) | ||
1185 | printk(KERN_ERR "abnormal status 0x%X\n", status); | ||
1186 | |||
1187 | /* get controller status; clear intr, err bits */ | ||
1188 | if (ap->flags & ATA_FLAG_MMIO) { | ||
1189 | void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr; | ||
1190 | host_stat = readb(mmio + ATA_DMA_STATUS); | ||
1191 | writeb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR, | ||
1192 | mmio + ATA_DMA_STATUS); | ||
1193 | |||
1194 | post_stat = readb(mmio + ATA_DMA_STATUS); | ||
1195 | } else { | ||
1196 | host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); | ||
1197 | outb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR, | ||
1198 | ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); | ||
1199 | |||
1200 | post_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); | ||
1201 | } | ||
1202 | |||
1203 | if (ata_msg_intr(ap)) | ||
1204 | printk(KERN_INFO "%s: irq ack: host_stat 0x%X, new host_stat 0x%X, drv_stat 0x%X\n", | ||
1205 | __FUNCTION__, | ||
1206 | host_stat, post_stat, status); | ||
1207 | |||
1208 | return status; | ||
1209 | } | ||
1210 | |||
1211 | static inline int ata_try_flush_cache(const struct ata_device *dev) | 1154 | static inline int ata_try_flush_cache(const struct ata_device *dev) |
1212 | { | 1155 | { |
1213 | return ata_id_wcache_enabled(dev->id) || | 1156 | return ata_id_wcache_enabled(dev->id) || |
@@ -1235,14 +1178,14 @@ static inline unsigned int __ac_err_mask(u8 status) | |||
1235 | static inline int ata_pad_alloc(struct ata_port *ap, struct device *dev) | 1178 | static inline int ata_pad_alloc(struct ata_port *ap, struct device *dev) |
1236 | { | 1179 | { |
1237 | ap->pad_dma = 0; | 1180 | ap->pad_dma = 0; |
1238 | ap->pad = dma_alloc_coherent(dev, ATA_DMA_PAD_BUF_SZ, | 1181 | ap->pad = dmam_alloc_coherent(dev, ATA_DMA_PAD_BUF_SZ, |
1239 | &ap->pad_dma, GFP_KERNEL); | 1182 | &ap->pad_dma, GFP_KERNEL); |
1240 | return (ap->pad == NULL) ? -ENOMEM : 0; | 1183 | return (ap->pad == NULL) ? -ENOMEM : 0; |
1241 | } | 1184 | } |
1242 | 1185 | ||
1243 | static inline void ata_pad_free(struct ata_port *ap, struct device *dev) | 1186 | static inline void ata_pad_free(struct ata_port *ap, struct device *dev) |
1244 | { | 1187 | { |
1245 | dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); | 1188 | dmam_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); |
1246 | } | 1189 | } |
1247 | 1190 | ||
1248 | static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) | 1191 | static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) |
diff --git a/include/linux/list.h b/include/linux/list.h index 611059d633..f9d71eab05 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -161,7 +161,7 @@ static inline void __list_del(struct list_head * prev, struct list_head * next) | |||
161 | /** | 161 | /** |
162 | * list_del - deletes entry from list. | 162 | * list_del - deletes entry from list. |
163 | * @entry: the element to delete from the list. | 163 | * @entry: the element to delete from the list. |
164 | * Note: list_empty on entry does not return true after this, the entry is | 164 | * Note: list_empty() on entry does not return true after this, the entry is |
165 | * in an undefined state. | 165 | * in an undefined state. |
166 | */ | 166 | */ |
167 | #ifndef CONFIG_DEBUG_LIST | 167 | #ifndef CONFIG_DEBUG_LIST |
@@ -179,7 +179,7 @@ extern void list_del(struct list_head *entry); | |||
179 | * list_del_rcu - deletes entry from list without re-initialization | 179 | * list_del_rcu - deletes entry from list without re-initialization |
180 | * @entry: the element to delete from the list. | 180 | * @entry: the element to delete from the list. |
181 | * | 181 | * |
182 | * Note: list_empty on entry does not return true after this, | 182 | * Note: list_empty() on entry does not return true after this, |
183 | * the entry is in an undefined state. It is useful for RCU based | 183 | * the entry is in an undefined state. It is useful for RCU based |
184 | * lockfree traversal. | 184 | * lockfree traversal. |
185 | * | 185 | * |
@@ -209,7 +209,8 @@ static inline void list_del_rcu(struct list_head *entry) | |||
209 | * list_replace - replace old entry by new one | 209 | * list_replace - replace old entry by new one |
210 | * @old : the element to be replaced | 210 | * @old : the element to be replaced |
211 | * @new : the new element to insert | 211 | * @new : the new element to insert |
212 | * Note: if 'old' was empty, it will be overwritten. | 212 | * |
213 | * If @old was empty, it will be overwritten. | ||
213 | */ | 214 | */ |
214 | static inline void list_replace(struct list_head *old, | 215 | static inline void list_replace(struct list_head *old, |
215 | struct list_head *new) | 216 | struct list_head *new) |
@@ -360,6 +361,62 @@ static inline void list_splice_init(struct list_head *list, | |||
360 | } | 361 | } |
361 | 362 | ||
362 | /** | 363 | /** |
364 | * list_splice_init_rcu - splice an RCU-protected list into an existing list. | ||
365 | * @list: the RCU-protected list to splice | ||
366 | * @head: the place in the list to splice the first list into | ||
367 | * @sync: function to sync: synchronize_rcu(), synchronize_sched(), ... | ||
368 | * | ||
369 | * @head can be RCU-read traversed concurrently with this function. | ||
370 | * | ||
371 | * Note that this function blocks. | ||
372 | * | ||
373 | * Important note: the caller must take whatever action is necessary to | ||
374 | * prevent any other updates to @head. In principle, it is possible | ||
375 | * to modify the list as soon as sync() begins execution. | ||
376 | * If this sort of thing becomes necessary, an alternative version | ||
377 | * based on call_rcu() could be created. But only if -really- | ||
378 | * needed -- there is no shortage of RCU API members. | ||
379 | */ | ||
380 | static inline void list_splice_init_rcu(struct list_head *list, | ||
381 | struct list_head *head, | ||
382 | void (*sync)(void)) | ||
383 | { | ||
384 | struct list_head *first = list->next; | ||
385 | struct list_head *last = list->prev; | ||
386 | struct list_head *at = head->next; | ||
387 | |||
388 | if (list_empty(head)) | ||
389 | return; | ||
390 | |||
391 | /* "first" and "last" tracking list, so initialize it. */ | ||
392 | |||
393 | INIT_LIST_HEAD(list); | ||
394 | |||
395 | /* | ||
396 | * At this point, the list body still points to the source list. | ||
397 | * Wait for any readers to finish using the list before splicing | ||
398 | * the list body into the new list. Any new readers will see | ||
399 | * an empty list. | ||
400 | */ | ||
401 | |||
402 | sync(); | ||
403 | |||
404 | /* | ||
405 | * Readers are finished with the source list, so perform splice. | ||
406 | * The order is important if the new list is global and accessible | ||
407 | * to concurrent RCU readers. Note that RCU readers are not | ||
408 | * permitted to traverse the prev pointers without excluding | ||
409 | * this function. | ||
410 | */ | ||
411 | |||
412 | last->next = at; | ||
413 | smp_wmb(); | ||
414 | head->next = first; | ||
415 | first->prev = head; | ||
416 | at->prev = last; | ||
417 | } | ||
418 | |||
419 | /** | ||
363 | * list_entry - get the struct for this entry | 420 | * list_entry - get the struct for this entry |
364 | * @ptr: the &struct list_head pointer. | 421 | * @ptr: the &struct list_head pointer. |
365 | * @type: the type of the struct this is embedded in. | 422 | * @type: the type of the struct this is embedded in. |
@@ -432,12 +489,12 @@ static inline void list_splice_init(struct list_head *list, | |||
432 | pos = list_entry(pos->member.prev, typeof(*pos), member)) | 489 | pos = list_entry(pos->member.prev, typeof(*pos), member)) |
433 | 490 | ||
434 | /** | 491 | /** |
435 | * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue | 492 | * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() |
436 | * @pos: the type * to use as a start point | 493 | * @pos: the type * to use as a start point |
437 | * @head: the head of the list | 494 | * @head: the head of the list |
438 | * @member: the name of the list_struct within the struct. | 495 | * @member: the name of the list_struct within the struct. |
439 | * | 496 | * |
440 | * Prepares a pos entry for use as a start point in list_for_each_entry_continue. | 497 | * Prepares a pos entry for use as a start point in list_for_each_entry_continue(). |
441 | */ | 498 | */ |
442 | #define list_prepare_entry(pos, head, member) \ | 499 | #define list_prepare_entry(pos, head, member) \ |
443 | ((pos) ? : list_entry(head, typeof(*pos), member)) | 500 | ((pos) ? : list_entry(head, typeof(*pos), member)) |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index ea097dddc4..06fe93a3e9 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -8,6 +8,8 @@ | |||
8 | #ifndef __LINUX_LOCKDEP_H | 8 | #ifndef __LINUX_LOCKDEP_H |
9 | #define __LINUX_LOCKDEP_H | 9 | #define __LINUX_LOCKDEP_H |
10 | 10 | ||
11 | struct task_struct; | ||
12 | |||
11 | #ifdef CONFIG_LOCKDEP | 13 | #ifdef CONFIG_LOCKDEP |
12 | 14 | ||
13 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
@@ -132,6 +134,7 @@ struct lock_list { | |||
132 | struct list_head entry; | 134 | struct list_head entry; |
133 | struct lock_class *class; | 135 | struct lock_class *class; |
134 | struct stack_trace trace; | 136 | struct stack_trace trace; |
137 | int distance; | ||
135 | }; | 138 | }; |
136 | 139 | ||
137 | /* | 140 | /* |
diff --git a/include/linux/magic.h b/include/linux/magic.h index b78bbf4213..b32c8a97fc 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ | 18 | #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ |
19 | #define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ | 19 | #define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ |
20 | #define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ | 20 | #define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ |
21 | #define MINIX3_SUPER_MAGIC 0x4d5a /* minix V3 fs */ | ||
21 | 22 | ||
22 | #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ | 23 | #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ |
23 | #define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ | 24 | #define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ |
diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h index 432b2fa249..bdc01127dc 100644 --- a/include/linux/mc146818rtc.h +++ b/include/linux/mc146818rtc.h | |||
@@ -18,6 +18,16 @@ | |||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | #include <linux/spinlock.h> /* spinlock_t */ | 19 | #include <linux/spinlock.h> /* spinlock_t */ |
20 | extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ | 20 | extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ |
21 | |||
22 | /* Some RTCs extend the mc146818 register set to support alarms of more | ||
23 | * than 24 hours in the future; or dates that include a century code. | ||
24 | * This platform_data structure can pass this information to the driver. | ||
25 | */ | ||
26 | struct cmos_rtc_board_info { | ||
27 | u8 rtc_day_alarm; /* zero, or register index */ | ||
28 | u8 rtc_mon_alarm; /* zero, or register index */ | ||
29 | u8 rtc_century; /* zero, or register index */ | ||
30 | }; | ||
21 | #endif | 31 | #endif |
22 | 32 | ||
23 | /********************************************************************** | 33 | /********************************************************************** |
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h index 916e8f72c6..9850d513ff 100644 --- a/include/linux/minix_fs.h +++ b/include/linux/minix_fs.h | |||
@@ -25,7 +25,6 @@ | |||
25 | #define MINIX_ERROR_FS 0x0002 /* fs has errors. */ | 25 | #define MINIX_ERROR_FS 0x0002 /* fs has errors. */ |
26 | 26 | ||
27 | #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode))) | 27 | #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode))) |
28 | #define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode))) | ||
29 | 28 | ||
30 | /* | 29 | /* |
31 | * This is the original minix inode layout on disk. | 30 | * This is the original minix inode layout on disk. |
@@ -75,9 +74,33 @@ struct minix_super_block { | |||
75 | __u32 s_zones; | 74 | __u32 s_zones; |
76 | }; | 75 | }; |
77 | 76 | ||
77 | /* | ||
78 | * V3 minix super-block data on disk | ||
79 | */ | ||
80 | struct minix3_super_block { | ||
81 | __u16 s_ninodes; | ||
82 | __u16 s_nzones; | ||
83 | __u16 s_pad0; | ||
84 | __u16 s_imap_blocks; | ||
85 | __u16 s_zmap_blocks; | ||
86 | __u16 s_firstdatazone; | ||
87 | __u16 s_log_zone_size; | ||
88 | __u16 s_pad1; | ||
89 | __u32 s_max_size; | ||
90 | __u32 s_zones; | ||
91 | __u16 s_magic; | ||
92 | __u16 s_pad2; | ||
93 | __u16 s_blocksize; | ||
94 | __u8 s_disk_version; | ||
95 | }; | ||
96 | |||
78 | struct minix_dir_entry { | 97 | struct minix_dir_entry { |
79 | __u16 inode; | 98 | __u16 inode; |
80 | char name[0]; | 99 | char name[0]; |
81 | }; | 100 | }; |
82 | 101 | ||
102 | struct minix3_dir_entry { | ||
103 | __u32 inode; | ||
104 | char name[0]; | ||
105 | }; | ||
83 | #endif | 106 | #endif |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 2d2c08d5f4..a0eec16eb0 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -437,15 +437,15 @@ static inline compound_page_dtor *get_compound_page_dtor(struct page *page) | |||
437 | /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */ | 437 | /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */ |
438 | #ifdef NODE_NOT_IN_PAGEFLAGS | 438 | #ifdef NODE_NOT_IN_PAGEFLAGS |
439 | #define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) | 439 | #define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) |
440 | #define ZONEID_PGOFF ((SECTIONS_PGOFF < ZONES_PGOFF)? \ | ||
441 | SECTIONS_PGOFF : ZONES_PGOFF) | ||
440 | #else | 442 | #else |
441 | #define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT) | 443 | #define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT) |
444 | #define ZONEID_PGOFF ((NODES_PGOFF < ZONES_PGOFF)? \ | ||
445 | NODES_PGOFF : ZONES_PGOFF) | ||
442 | #endif | 446 | #endif |
443 | 447 | ||
444 | #if ZONES_WIDTH > 0 | 448 | #define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0)) |
445 | #define ZONEID_PGSHIFT ZONES_PGSHIFT | ||
446 | #else | ||
447 | #define ZONEID_PGSHIFT NODES_PGOFF | ||
448 | #endif | ||
449 | 449 | ||
450 | #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED | 450 | #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED |
451 | #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED | 451 | #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED |
@@ -471,7 +471,6 @@ static inline enum zone_type page_zonenum(struct page *page) | |||
471 | */ | 471 | */ |
472 | static inline int page_zone_id(struct page *page) | 472 | static inline int page_zone_id(struct page *page) |
473 | { | 473 | { |
474 | BUILD_BUG_ON(ZONEID_PGSHIFT == 0 && ZONEID_MASK); | ||
475 | return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; | 474 | return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; |
476 | } | 475 | } |
477 | 476 | ||
@@ -638,6 +637,7 @@ static inline int page_mapped(struct page *page) | |||
638 | */ | 637 | */ |
639 | #define NOPFN_SIGBUS ((unsigned long) -1) | 638 | #define NOPFN_SIGBUS ((unsigned long) -1) |
640 | #define NOPFN_OOM ((unsigned long) -2) | 639 | #define NOPFN_OOM ((unsigned long) -2) |
640 | #define NOPFN_REFAULT ((unsigned long) -3) | ||
641 | 641 | ||
642 | /* | 642 | /* |
643 | * Different kinds of faults, as returned by handle_mm_fault(). | 643 | * Different kinds of faults, as returned by handle_mm_fault(). |
@@ -786,6 +786,7 @@ extern int try_to_release_page(struct page * page, gfp_t gfp_mask); | |||
786 | extern void do_invalidatepage(struct page *page, unsigned long offset); | 786 | extern void do_invalidatepage(struct page *page, unsigned long offset); |
787 | 787 | ||
788 | int __set_page_dirty_nobuffers(struct page *page); | 788 | int __set_page_dirty_nobuffers(struct page *page); |
789 | int __set_page_dirty_no_writeback(struct page *page); | ||
789 | int redirty_page_for_writepage(struct writeback_control *wbc, | 790 | int redirty_page_for_writepage(struct writeback_control *wbc, |
790 | struct page *page); | 791 | struct page *page); |
791 | int FASTCALL(set_page_dirty(struct page *page)); | 792 | int FASTCALL(set_page_dirty(struct page *page)); |
@@ -1030,6 +1031,9 @@ extern struct vm_area_struct *copy_vma(struct vm_area_struct **, | |||
1030 | unsigned long addr, unsigned long len, pgoff_t pgoff); | 1031 | unsigned long addr, unsigned long len, pgoff_t pgoff); |
1031 | extern void exit_mmap(struct mm_struct *); | 1032 | extern void exit_mmap(struct mm_struct *); |
1032 | extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); | 1033 | extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); |
1034 | extern int install_special_mapping(struct mm_struct *mm, | ||
1035 | unsigned long addr, unsigned long len, | ||
1036 | unsigned long flags, struct page **pages); | ||
1033 | 1037 | ||
1034 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); | 1038 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); |
1035 | 1039 | ||
@@ -1121,6 +1125,8 @@ unsigned long vmalloc_to_pfn(void *addr); | |||
1121 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, | 1125 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, |
1122 | unsigned long pfn, unsigned long size, pgprot_t); | 1126 | unsigned long pfn, unsigned long size, pgprot_t); |
1123 | int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); | 1127 | int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); |
1128 | int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr, | ||
1129 | unsigned long pfn); | ||
1124 | 1130 | ||
1125 | struct page *follow_page(struct vm_area_struct *, unsigned long address, | 1131 | struct page *follow_page(struct vm_area_struct *, unsigned long address, |
1126 | unsigned int foll_flags); | 1132 | unsigned int foll_flags); |
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 3b6723dfaf..895bc4e930 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h | |||
@@ -1,30 +1,29 @@ | |||
1 | |||
2 | static inline void | 1 | static inline void |
3 | add_page_to_active_list(struct zone *zone, struct page *page) | 2 | add_page_to_active_list(struct zone *zone, struct page *page) |
4 | { | 3 | { |
5 | list_add(&page->lru, &zone->active_list); | 4 | list_add(&page->lru, &zone->active_list); |
6 | zone->nr_active++; | 5 | __inc_zone_state(zone, NR_ACTIVE); |
7 | } | 6 | } |
8 | 7 | ||
9 | static inline void | 8 | static inline void |
10 | add_page_to_inactive_list(struct zone *zone, struct page *page) | 9 | add_page_to_inactive_list(struct zone *zone, struct page *page) |
11 | { | 10 | { |
12 | list_add(&page->lru, &zone->inactive_list); | 11 | list_add(&page->lru, &zone->inactive_list); |
13 | zone->nr_inactive++; | 12 | __inc_zone_state(zone, NR_INACTIVE); |
14 | } | 13 | } |
15 | 14 | ||
16 | static inline void | 15 | static inline void |
17 | del_page_from_active_list(struct zone *zone, struct page *page) | 16 | del_page_from_active_list(struct zone *zone, struct page *page) |
18 | { | 17 | { |
19 | list_del(&page->lru); | 18 | list_del(&page->lru); |
20 | zone->nr_active--; | 19 | __dec_zone_state(zone, NR_ACTIVE); |
21 | } | 20 | } |
22 | 21 | ||
23 | static inline void | 22 | static inline void |
24 | del_page_from_inactive_list(struct zone *zone, struct page *page) | 23 | del_page_from_inactive_list(struct zone *zone, struct page *page) |
25 | { | 24 | { |
26 | list_del(&page->lru); | 25 | list_del(&page->lru); |
27 | zone->nr_inactive--; | 26 | __dec_zone_state(zone, NR_INACTIVE); |
28 | } | 27 | } |
29 | 28 | ||
30 | static inline void | 29 | static inline void |
@@ -33,9 +32,9 @@ del_page_from_lru(struct zone *zone, struct page *page) | |||
33 | list_del(&page->lru); | 32 | list_del(&page->lru); |
34 | if (PageActive(page)) { | 33 | if (PageActive(page)) { |
35 | __ClearPageActive(page); | 34 | __ClearPageActive(page); |
36 | zone->nr_active--; | 35 | __dec_zone_state(zone, NR_ACTIVE); |
37 | } else { | 36 | } else { |
38 | zone->nr_inactive--; | 37 | __dec_zone_state(zone, NR_INACTIVE); |
39 | } | 38 | } |
40 | } | 39 | } |
41 | 40 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index b262f47961..ee9e3143df 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -47,15 +47,20 @@ struct zone_padding { | |||
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | enum zone_stat_item { | 49 | enum zone_stat_item { |
50 | /* First 128 byte cacheline (assuming 64 bit words) */ | ||
51 | NR_FREE_PAGES, | ||
52 | NR_INACTIVE, | ||
53 | NR_ACTIVE, | ||
50 | NR_ANON_PAGES, /* Mapped anonymous pages */ | 54 | NR_ANON_PAGES, /* Mapped anonymous pages */ |
51 | NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. | 55 | NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. |
52 | only modified from process context */ | 56 | only modified from process context */ |
53 | NR_FILE_PAGES, | 57 | NR_FILE_PAGES, |
54 | NR_SLAB_RECLAIMABLE, | ||
55 | NR_SLAB_UNRECLAIMABLE, | ||
56 | NR_PAGETABLE, /* used for pagetables */ | ||
57 | NR_FILE_DIRTY, | 58 | NR_FILE_DIRTY, |
58 | NR_WRITEBACK, | 59 | NR_WRITEBACK, |
60 | /* Second 128 byte cacheline */ | ||
61 | NR_SLAB_RECLAIMABLE, | ||
62 | NR_SLAB_UNRECLAIMABLE, | ||
63 | NR_PAGETABLE, /* used for pagetables */ | ||
59 | NR_UNSTABLE_NFS, /* NFS unstable pages */ | 64 | NR_UNSTABLE_NFS, /* NFS unstable pages */ |
60 | NR_BOUNCE, | 65 | NR_BOUNCE, |
61 | NR_VMSCAN_WRITE, | 66 | NR_VMSCAN_WRITE, |
@@ -91,6 +96,7 @@ struct per_cpu_pageset { | |||
91 | #endif | 96 | #endif |
92 | 97 | ||
93 | enum zone_type { | 98 | enum zone_type { |
99 | #ifdef CONFIG_ZONE_DMA | ||
94 | /* | 100 | /* |
95 | * ZONE_DMA is used when there are devices that are not able | 101 | * ZONE_DMA is used when there are devices that are not able |
96 | * to do DMA to all of addressable memory (ZONE_NORMAL). Then we | 102 | * to do DMA to all of addressable memory (ZONE_NORMAL). Then we |
@@ -111,6 +117,7 @@ enum zone_type { | |||
111 | * <16M. | 117 | * <16M. |
112 | */ | 118 | */ |
113 | ZONE_DMA, | 119 | ZONE_DMA, |
120 | #endif | ||
114 | #ifdef CONFIG_ZONE_DMA32 | 121 | #ifdef CONFIG_ZONE_DMA32 |
115 | /* | 122 | /* |
116 | * x86_64 needs two ZONE_DMAs because it supports devices that are | 123 | * x86_64 needs two ZONE_DMAs because it supports devices that are |
@@ -147,15 +154,30 @@ enum zone_type { | |||
147 | * match the requested limits. See gfp_zone() in include/linux/gfp.h | 154 | * match the requested limits. See gfp_zone() in include/linux/gfp.h |
148 | */ | 155 | */ |
149 | 156 | ||
150 | #if !defined(CONFIG_ZONE_DMA32) && !defined(CONFIG_HIGHMEM) | 157 | /* |
158 | * Count the active zones. Note that the use of defined(X) outside | ||
159 | * #if and family is not necessarily defined so ensure we cannot use | ||
160 | * it later. Use __ZONE_COUNT to work out how many shift bits we need. | ||
161 | */ | ||
162 | #define __ZONE_COUNT ( \ | ||
163 | defined(CONFIG_ZONE_DMA) \ | ||
164 | + defined(CONFIG_ZONE_DMA32) \ | ||
165 | + 1 \ | ||
166 | + defined(CONFIG_HIGHMEM) \ | ||
167 | ) | ||
168 | #if __ZONE_COUNT < 2 | ||
169 | #define ZONES_SHIFT 0 | ||
170 | #elif __ZONE_COUNT <= 2 | ||
151 | #define ZONES_SHIFT 1 | 171 | #define ZONES_SHIFT 1 |
152 | #else | 172 | #elif __ZONE_COUNT <= 4 |
153 | #define ZONES_SHIFT 2 | 173 | #define ZONES_SHIFT 2 |
174 | #else | ||
175 | #error ZONES_SHIFT -- too many zones configured adjust calculation | ||
154 | #endif | 176 | #endif |
177 | #undef __ZONE_COUNT | ||
155 | 178 | ||
156 | struct zone { | 179 | struct zone { |
157 | /* Fields commonly accessed by the page allocator */ | 180 | /* Fields commonly accessed by the page allocator */ |
158 | unsigned long free_pages; | ||
159 | unsigned long pages_min, pages_low, pages_high; | 181 | unsigned long pages_min, pages_low, pages_high; |
160 | /* | 182 | /* |
161 | * We don't know if the memory that we're going to allocate will be freeable | 183 | * We don't know if the memory that we're going to allocate will be freeable |
@@ -197,8 +219,6 @@ struct zone { | |||
197 | struct list_head inactive_list; | 219 | struct list_head inactive_list; |
198 | unsigned long nr_scan_active; | 220 | unsigned long nr_scan_active; |
199 | unsigned long nr_scan_inactive; | 221 | unsigned long nr_scan_inactive; |
200 | unsigned long nr_active; | ||
201 | unsigned long nr_inactive; | ||
202 | unsigned long pages_scanned; /* since last reclaim */ | 222 | unsigned long pages_scanned; /* since last reclaim */ |
203 | int all_unreclaimable; /* All pages pinned */ | 223 | int all_unreclaimable; /* All pages pinned */ |
204 | 224 | ||
@@ -442,8 +462,6 @@ typedef struct pglist_data { | |||
442 | 462 | ||
443 | #include <linux/memory_hotplug.h> | 463 | #include <linux/memory_hotplug.h> |
444 | 464 | ||
445 | void __get_zone_counts(unsigned long *active, unsigned long *inactive, | ||
446 | unsigned long *free, struct pglist_data *pgdat); | ||
447 | void get_zone_counts(unsigned long *active, unsigned long *inactive, | 465 | void get_zone_counts(unsigned long *active, unsigned long *inactive, |
448 | unsigned long *free); | 466 | unsigned long *free); |
449 | void build_all_zonelists(void); | 467 | void build_all_zonelists(void); |
@@ -523,7 +541,11 @@ static inline int is_dma32(struct zone *zone) | |||
523 | 541 | ||
524 | static inline int is_dma(struct zone *zone) | 542 | static inline int is_dma(struct zone *zone) |
525 | { | 543 | { |
544 | #ifdef CONFIG_ZONE_DMA | ||
526 | return zone == zone->zone_pgdat->node_zones + ZONE_DMA; | 545 | return zone == zone->zone_pgdat->node_zones + ZONE_DMA; |
546 | #else | ||
547 | return 0; | ||
548 | #endif | ||
527 | } | 549 | } |
528 | 550 | ||
529 | /* These two functions are used to setup the per zone pages min values */ | 551 | /* These two functions are used to setup the per zone pages min values */ |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 1b7e178b0d..dab69afee2 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -43,9 +43,8 @@ struct vfsmount { | |||
43 | struct super_block *mnt_sb; /* pointer to superblock */ | 43 | struct super_block *mnt_sb; /* pointer to superblock */ |
44 | struct list_head mnt_mounts; /* list of children, anchored here */ | 44 | struct list_head mnt_mounts; /* list of children, anchored here */ |
45 | struct list_head mnt_child; /* and going through their mnt_child */ | 45 | struct list_head mnt_child; /* and going through their mnt_child */ |
46 | atomic_t mnt_count; | ||
47 | int mnt_flags; | 46 | int mnt_flags; |
48 | int mnt_expiry_mark; /* true if marked for expiry */ | 47 | /* 4 bytes hole on 64bits arches */ |
49 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ | 48 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ |
50 | struct list_head mnt_list; | 49 | struct list_head mnt_list; |
51 | struct list_head mnt_expire; /* link in fs-specific expiry list */ | 50 | struct list_head mnt_expire; /* link in fs-specific expiry list */ |
@@ -54,6 +53,13 @@ struct vfsmount { | |||
54 | struct list_head mnt_slave; /* slave list entry */ | 53 | struct list_head mnt_slave; /* slave list entry */ |
55 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ | 54 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ |
56 | struct mnt_namespace *mnt_ns; /* containing namespace */ | 55 | struct mnt_namespace *mnt_ns; /* containing namespace */ |
56 | /* | ||
57 | * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount | ||
58 | * to let these frequently modified fields in a separate cache line | ||
59 | * (so that reads of mnt_flags wont ping-pong on SMP machines) | ||
60 | */ | ||
61 | atomic_t mnt_count; | ||
62 | int mnt_expiry_mark; /* true if marked for expiry */ | ||
57 | int mnt_pinned; | 63 | int mnt_pinned; |
58 | }; | 64 | }; |
59 | 65 | ||
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 24a9ef1506..fa253fa73a 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -234,7 +234,7 @@ struct msdos_sb_info { | |||
234 | struct fat_mount_options options; | 234 | struct fat_mount_options options; |
235 | struct nls_table *nls_disk; /* Codepage used on disk */ | 235 | struct nls_table *nls_disk; /* Codepage used on disk */ |
236 | struct nls_table *nls_io; /* Charset used for input and display */ | 236 | struct nls_table *nls_io; /* Charset used for input and display */ |
237 | void *dir_ops; /* Opaque; default directory operations */ | 237 | const void *dir_ops; /* Opaque; default directory operations */ |
238 | int dir_per_block; /* dir entries per block */ | 238 | int dir_per_block; /* dir entries per block */ |
239 | int dir_per_block_bits; /* log2(dir_per_block) */ | 239 | int dir_per_block_bits; /* log2(dir_per_block) */ |
240 | 240 | ||
@@ -399,7 +399,7 @@ extern int fat_count_free_clusters(struct super_block *sb); | |||
399 | extern int fat_generic_ioctl(struct inode *inode, struct file *filp, | 399 | extern int fat_generic_ioctl(struct inode *inode, struct file *filp, |
400 | unsigned int cmd, unsigned long arg); | 400 | unsigned int cmd, unsigned long arg); |
401 | extern const struct file_operations fat_file_operations; | 401 | extern const struct file_operations fat_file_operations; |
402 | extern struct inode_operations fat_file_inode_operations; | 402 | extern const struct inode_operations fat_file_inode_operations; |
403 | extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); | 403 | extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); |
404 | extern void fat_truncate(struct inode *inode); | 404 | extern void fat_truncate(struct inode *inode); |
405 | extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, | 405 | extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, |
@@ -413,7 +413,7 @@ extern struct inode *fat_build_inode(struct super_block *sb, | |||
413 | struct msdos_dir_entry *de, loff_t i_pos); | 413 | struct msdos_dir_entry *de, loff_t i_pos); |
414 | extern int fat_sync_inode(struct inode *inode); | 414 | extern int fat_sync_inode(struct inode *inode); |
415 | extern int fat_fill_super(struct super_block *sb, void *data, int silent, | 415 | extern int fat_fill_super(struct super_block *sb, void *data, int silent, |
416 | struct inode_operations *fs_dir_inode_ops, int isvfat); | 416 | const struct inode_operations *fs_dir_inode_ops, int isvfat); |
417 | 417 | ||
418 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, | 418 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, |
419 | struct inode *i2); | 419 | struct inode *i2); |
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index 0ea7f89e61..83e39eb054 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
@@ -204,7 +204,7 @@ void ncp_update_inode(struct inode *, struct ncp_entry_info *); | |||
204 | void ncp_update_inode2(struct inode *, struct ncp_entry_info *); | 204 | void ncp_update_inode2(struct inode *, struct ncp_entry_info *); |
205 | 205 | ||
206 | /* linux/fs/ncpfs/dir.c */ | 206 | /* linux/fs/ncpfs/dir.c */ |
207 | extern struct inode_operations ncp_dir_inode_operations; | 207 | extern const struct inode_operations ncp_dir_inode_operations; |
208 | extern const struct file_operations ncp_dir_operations; | 208 | extern const struct file_operations ncp_dir_operations; |
209 | int ncp_conn_logged_in(struct super_block *); | 209 | int ncp_conn_logged_in(struct super_block *); |
210 | int ncp_date_dos2unix(__le16 time, __le16 date); | 210 | int ncp_date_dos2unix(__le16 time, __le16 date); |
@@ -226,7 +226,7 @@ void ncp_lock_server(struct ncp_server *server); | |||
226 | void ncp_unlock_server(struct ncp_server *server); | 226 | void ncp_unlock_server(struct ncp_server *server); |
227 | 227 | ||
228 | /* linux/fs/ncpfs/file.c */ | 228 | /* linux/fs/ncpfs/file.c */ |
229 | extern struct inode_operations ncp_file_inode_operations; | 229 | extern const struct inode_operations ncp_file_inode_operations; |
230 | extern const struct file_operations ncp_file_operations; | 230 | extern const struct file_operations ncp_file_operations; |
231 | int ncp_make_open(struct inode *, int); | 231 | int ncp_make_open(struct inode *, int); |
232 | 232 | ||
diff --git a/include/linux/net.h b/include/linux/net.h index f28d8a2e2c..4db21e63d8 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -24,7 +24,7 @@ | |||
24 | struct poll_table_struct; | 24 | struct poll_table_struct; |
25 | struct inode; | 25 | struct inode; |
26 | 26 | ||
27 | #define NPROTO 32 /* should be enough for now.. */ | 27 | #define NPROTO 33 /* should be enough for now.. */ |
28 | 28 | ||
29 | #define SYS_SOCKET 1 /* sys_socket(2) */ | 29 | #define SYS_SOCKET 1 /* sys_socket(2) */ |
30 | #define SYS_BIND 2 /* sys_bind(2) */ | 30 | #define SYS_BIND 2 /* sys_bind(2) */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 2e37f50127..1a528548cd 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -589,7 +589,7 @@ extern int dev_open(struct net_device *dev); | |||
589 | extern int dev_close(struct net_device *dev); | 589 | extern int dev_close(struct net_device *dev); |
590 | extern int dev_queue_xmit(struct sk_buff *skb); | 590 | extern int dev_queue_xmit(struct sk_buff *skb); |
591 | extern int register_netdevice(struct net_device *dev); | 591 | extern int register_netdevice(struct net_device *dev); |
592 | extern int unregister_netdevice(struct net_device *dev); | 592 | extern void unregister_netdevice(struct net_device *dev); |
593 | extern void free_netdev(struct net_device *dev); | 593 | extern void free_netdev(struct net_device *dev); |
594 | extern void synchronize_net(void); | 594 | extern void synchronize_net(void); |
595 | extern int register_netdevice_notifier(struct notifier_block *nb); | 595 | extern int register_netdevice_notifier(struct notifier_block *nb); |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index d4c4c5120b..70d3b4f1e4 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -172,8 +172,8 @@ struct nf_logger { | |||
172 | 172 | ||
173 | /* Function to register/unregister log function. */ | 173 | /* Function to register/unregister log function. */ |
174 | int nf_log_register(int pf, struct nf_logger *logger); | 174 | int nf_log_register(int pf, struct nf_logger *logger); |
175 | int nf_log_unregister_pf(int pf); | 175 | void nf_log_unregister(struct nf_logger *logger); |
176 | void nf_log_unregister_logger(struct nf_logger *logger); | 176 | void nf_log_unregister_pf(int pf); |
177 | 177 | ||
178 | /* Calls the registered backend logging function */ | 178 | /* Calls the registered backend logging function */ |
179 | void nf_log_packet(int pf, | 179 | void nf_log_packet(int pf, |
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index 6328175a1c..43397a414c 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
@@ -33,6 +33,7 @@ header-y += xt_tcpmss.h | |||
33 | header-y += xt_tcpudp.h | 33 | header-y += xt_tcpudp.h |
34 | header-y += xt_SECMARK.h | 34 | header-y += xt_SECMARK.h |
35 | header-y += xt_CONNSECMARK.h | 35 | header-y += xt_CONNSECMARK.h |
36 | header-y += xt_TCPMSS.h | ||
36 | 37 | ||
37 | unifdef-y += nf_conntrack_common.h | 38 | unifdef-y += nf_conntrack_common.h |
38 | unifdef-y += nf_conntrack_ftp.h | 39 | unifdef-y += nf_conntrack_ftp.h |
diff --git a/include/linux/netfilter/nf_conntrack_sane.h b/include/linux/netfilter/nf_conntrack_sane.h new file mode 100644 index 0000000000..4767d6e23e --- /dev/null +++ b/include/linux/netfilter/nf_conntrack_sane.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef _NF_CONNTRACK_SANE_H | ||
2 | #define _NF_CONNTRACK_SANE_H | ||
3 | /* SANE tracking. */ | ||
4 | |||
5 | #ifdef __KERNEL__ | ||
6 | |||
7 | #define SANE_PORT 6566 | ||
8 | |||
9 | enum sane_state { | ||
10 | SANE_STATE_NORMAL, | ||
11 | SANE_STATE_START_REQUESTED, | ||
12 | }; | ||
13 | |||
14 | /* This structure exists only once per master */ | ||
15 | struct nf_ct_sane_master { | ||
16 | enum sane_state state; | ||
17 | }; | ||
18 | |||
19 | #endif /* __KERNEL__ */ | ||
20 | |||
21 | #endif /* _NF_CONNTRACK_SANE_H */ | ||
diff --git a/include/linux/netfilter/nf_conntrack_tcp.h b/include/linux/netfilter/nf_conntrack_tcp.h index 2f4e98b90c..007af4c277 100644 --- a/include/linux/netfilter/nf_conntrack_tcp.h +++ b/include/linux/netfilter/nf_conntrack_tcp.h | |||
@@ -27,6 +27,9 @@ enum tcp_conntrack { | |||
27 | /* This sender sent FIN first */ | 27 | /* This sender sent FIN first */ |
28 | #define IP_CT_TCP_FLAG_CLOSE_INIT 0x04 | 28 | #define IP_CT_TCP_FLAG_CLOSE_INIT 0x04 |
29 | 29 | ||
30 | /* Be liberal in window checking */ | ||
31 | #define IP_CT_TCP_FLAG_BE_LIBERAL 0x08 | ||
32 | |||
30 | #ifdef __KERNEL__ | 33 | #ifdef __KERNEL__ |
31 | 34 | ||
32 | struct ip_ct_tcp_state { | 35 | struct ip_ct_tcp_state { |
@@ -34,7 +37,6 @@ struct ip_ct_tcp_state { | |||
34 | u_int32_t td_maxend; /* max of ack + max(win, 1) */ | 37 | u_int32_t td_maxend; /* max of ack + max(win, 1) */ |
35 | u_int32_t td_maxwin; /* max(win) */ | 38 | u_int32_t td_maxwin; /* max(win) */ |
36 | u_int8_t td_scale; /* window scale factor */ | 39 | u_int8_t td_scale; /* window scale factor */ |
37 | u_int8_t loose; /* used when connection picked up from the middle */ | ||
38 | u_int8_t flags; /* per direction options */ | 40 | u_int8_t flags; /* per direction options */ |
39 | }; | 41 | }; |
40 | 42 | ||
diff --git a/include/linux/netfilter/xt_TCPMSS.h b/include/linux/netfilter/xt_TCPMSS.h new file mode 100644 index 0000000000..53a292cd47 --- /dev/null +++ b/include/linux/netfilter/xt_TCPMSS.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef _XT_TCPMSS_H | ||
2 | #define _XT_TCPMSS_H | ||
3 | |||
4 | struct xt_tcpmss_info { | ||
5 | u_int16_t mss; | ||
6 | }; | ||
7 | |||
8 | #define XT_TCPMSS_CLAMP_PMTU 0xffff | ||
9 | |||
10 | #endif /* _XT_TCPMSS_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index 33581c13d9..da9274e6bf 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h | |||
@@ -301,6 +301,12 @@ extern unsigned int ip_conntrack_htable_size; | |||
301 | extern int ip_conntrack_checksum; | 301 | extern int ip_conntrack_checksum; |
302 | 302 | ||
303 | #define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++) | 303 | #define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++) |
304 | #define CONNTRACK_STAT_INC_ATOMIC(count) \ | ||
305 | do { \ | ||
306 | local_bh_disable(); \ | ||
307 | __get_cpu_var(ip_conntrack_stat).count++; \ | ||
308 | local_bh_enable(); \ | ||
309 | } while (0) | ||
304 | 310 | ||
305 | #ifdef CONFIG_IP_NF_CONNTRACK_EVENTS | 311 | #ifdef CONFIG_IP_NF_CONNTRACK_EVENTS |
306 | #include <linux/notifier.h> | 312 | #include <linux/notifier.h> |
diff --git a/include/linux/netfilter_ipv4/ip_nat.h b/include/linux/netfilter_ipv4/ip_nat.h index bdf553620c..bbca89aab8 100644 --- a/include/linux/netfilter_ipv4/ip_nat.h +++ b/include/linux/netfilter_ipv4/ip_nat.h | |||
@@ -16,6 +16,7 @@ enum ip_nat_manip_type | |||
16 | 16 | ||
17 | #define IP_NAT_RANGE_MAP_IPS 1 | 17 | #define IP_NAT_RANGE_MAP_IPS 1 |
18 | #define IP_NAT_RANGE_PROTO_SPECIFIED 2 | 18 | #define IP_NAT_RANGE_PROTO_SPECIFIED 2 |
19 | #define IP_NAT_RANGE_PROTO_RANDOM 4 /* add randomness to "port" selection */ | ||
19 | 20 | ||
20 | /* NAT sequence number modifications */ | 21 | /* NAT sequence number modifications */ |
21 | struct ip_nat_seq { | 22 | struct ip_nat_seq { |
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index 98d566c5e3..9527296595 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -272,25 +272,9 @@ ipt_get_target(struct ipt_entry *e) | |||
272 | #include <linux/init.h> | 272 | #include <linux/init.h> |
273 | extern void ipt_init(void) __init; | 273 | extern void ipt_init(void) __init; |
274 | 274 | ||
275 | #define ipt_register_target(tgt) \ | 275 | extern int ipt_register_table(struct xt_table *table, |
276 | ({ (tgt)->family = AF_INET; \ | ||
277 | xt_register_target(tgt); }) | ||
278 | #define ipt_unregister_target(tgt) xt_unregister_target(tgt) | ||
279 | |||
280 | #define ipt_register_match(mtch) \ | ||
281 | ({ (mtch)->family = AF_INET; \ | ||
282 | xt_register_match(mtch); }) | ||
283 | #define ipt_unregister_match(mtch) xt_unregister_match(mtch) | ||
284 | |||
285 | //#define ipt_register_table(tbl, repl) xt_register_table(AF_INET, tbl, repl) | ||
286 | //#define ipt_unregister_table(tbl) xt_unregister_table(AF_INET, tbl) | ||
287 | |||
288 | extern int ipt_register_table(struct ipt_table *table, | ||
289 | const struct ipt_replace *repl); | 276 | const struct ipt_replace *repl); |
290 | extern void ipt_unregister_table(struct ipt_table *table); | 277 | extern void ipt_unregister_table(struct xt_table *table); |
291 | |||
292 | /* net/sched/ipt.c: Gimme access to your targets! Gets target->me. */ | ||
293 | extern struct ipt_target *ipt_find_target(const char *name, u8 revision); | ||
294 | 278 | ||
295 | /* Standard entry. */ | 279 | /* Standard entry. */ |
296 | struct ipt_standard | 280 | struct ipt_standard |
@@ -315,7 +299,7 @@ extern unsigned int ipt_do_table(struct sk_buff **pskb, | |||
315 | unsigned int hook, | 299 | unsigned int hook, |
316 | const struct net_device *in, | 300 | const struct net_device *in, |
317 | const struct net_device *out, | 301 | const struct net_device *out, |
318 | struct ipt_table *table); | 302 | struct xt_table *table); |
319 | 303 | ||
320 | #define IPT_ALIGN(s) XT_ALIGN(s) | 304 | #define IPT_ALIGN(s) XT_ALIGN(s) |
321 | 305 | ||
diff --git a/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/include/linux/netfilter_ipv4/ipt_TCPMSS.h index aadb39580c..7a850f9458 100644 --- a/include/linux/netfilter_ipv4/ipt_TCPMSS.h +++ b/include/linux/netfilter_ipv4/ipt_TCPMSS.h | |||
@@ -1,10 +1,9 @@ | |||
1 | #ifndef _IPT_TCPMSS_H | 1 | #ifndef _IPT_TCPMSS_H |
2 | #define _IPT_TCPMSS_H | 2 | #define _IPT_TCPMSS_H |
3 | 3 | ||
4 | struct ipt_tcpmss_info { | 4 | #include <linux/netfilter/xt_TCPMSS.h> |
5 | u_int16_t mss; | ||
6 | }; | ||
7 | 5 | ||
8 | #define IPT_TCPMSS_CLAMP_PMTU 0xffff | 6 | #define ipt_tcpmss_info xt_tcpmss_info |
7 | #define IPT_TCPMSS_CLAMP_PMTU XT_TCPMSS_CLAMP_PMTU | ||
9 | 8 | ||
10 | #endif /*_IPT_TCPMSS_H*/ | 9 | #endif /*_IPT_TCPMSS_H*/ |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 4aed340401..61aa10412f 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -104,6 +104,25 @@ struct ip6t_entry | |||
104 | unsigned char elems[0]; | 104 | unsigned char elems[0]; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | /* Standard entry */ | ||
108 | struct ip6t_standard | ||
109 | { | ||
110 | struct ip6t_entry entry; | ||
111 | struct ip6t_standard_target target; | ||
112 | }; | ||
113 | |||
114 | struct ip6t_error_target | ||
115 | { | ||
116 | struct ip6t_entry_target target; | ||
117 | char errorname[IP6T_FUNCTION_MAXNAMELEN]; | ||
118 | }; | ||
119 | |||
120 | struct ip6t_error | ||
121 | { | ||
122 | struct ip6t_entry entry; | ||
123 | struct ip6t_error_target target; | ||
124 | }; | ||
125 | |||
107 | /* | 126 | /* |
108 | * New IP firewall options for [gs]etsockopt at the RAW IP level. | 127 | * New IP firewall options for [gs]etsockopt at the RAW IP level. |
109 | * Unlike BSD Linux inherits IP options so you don't have to use | 128 | * Unlike BSD Linux inherits IP options so you don't have to use |
@@ -286,24 +305,14 @@ ip6t_get_target(struct ip6t_entry *e) | |||
286 | #include <linux/init.h> | 305 | #include <linux/init.h> |
287 | extern void ip6t_init(void) __init; | 306 | extern void ip6t_init(void) __init; |
288 | 307 | ||
289 | #define ip6t_register_target(tgt) \ | 308 | extern int ip6t_register_table(struct xt_table *table, |
290 | ({ (tgt)->family = AF_INET6; \ | ||
291 | xt_register_target(tgt); }) | ||
292 | #define ip6t_unregister_target(tgt) xt_unregister_target(tgt) | ||
293 | |||
294 | #define ip6t_register_match(match) \ | ||
295 | ({ (match)->family = AF_INET6; \ | ||
296 | xt_register_match(match); }) | ||
297 | #define ip6t_unregister_match(match) xt_unregister_match(match) | ||
298 | |||
299 | extern int ip6t_register_table(struct ip6t_table *table, | ||
300 | const struct ip6t_replace *repl); | 309 | const struct ip6t_replace *repl); |
301 | extern void ip6t_unregister_table(struct ip6t_table *table); | 310 | extern void ip6t_unregister_table(struct xt_table *table); |
302 | extern unsigned int ip6t_do_table(struct sk_buff **pskb, | 311 | extern unsigned int ip6t_do_table(struct sk_buff **pskb, |
303 | unsigned int hook, | 312 | unsigned int hook, |
304 | const struct net_device *in, | 313 | const struct net_device *in, |
305 | const struct net_device *out, | 314 | const struct net_device *out, |
306 | struct ip6t_table *table); | 315 | struct xt_table *table); |
307 | 316 | ||
308 | /* Check for an extension */ | 317 | /* Check for an extension */ |
309 | extern int ip6t_ext_hdr(u8 nexthdr); | 318 | extern int ip6t_ext_hdr(u8 nexthdr); |
diff --git a/include/linux/netfilter_ipv6/ip6t_mh.h b/include/linux/netfilter_ipv6/ip6t_mh.h new file mode 100644 index 0000000000..b9ca9a5f74 --- /dev/null +++ b/include/linux/netfilter_ipv6/ip6t_mh.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef _IP6T_MH_H | ||
2 | #define _IP6T_MH_H | ||
3 | |||
4 | /* MH matching stuff */ | ||
5 | struct ip6t_mh | ||
6 | { | ||
7 | u_int8_t types[2]; /* MH type range */ | ||
8 | u_int8_t invflags; /* Inverse flags */ | ||
9 | }; | ||
10 | |||
11 | /* Values for "invflags" field in struct ip6t_mh. */ | ||
12 | #define IP6T_MH_INV_TYPE 0x01 /* Invert the sense of type. */ | ||
13 | #define IP6T_MH_INV_MASK 0x01 /* All possible flags. */ | ||
14 | |||
15 | #endif /*_IP6T_MH_H*/ | ||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index b3b9b609ee..2a20f488ac 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define NETLINK_GENERIC 16 | 23 | #define NETLINK_GENERIC 16 |
24 | /* leave room for NETLINK_DM (DM Events) */ | 24 | /* leave room for NETLINK_DM (DM Events) */ |
25 | #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ | 25 | #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ |
26 | #define NETLINK_ECRYPTFS 19 | ||
26 | 27 | ||
27 | #define MAX_LINKS 32 | 28 | #define MAX_LINKS 32 |
28 | 29 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index c5d4084773..ed0f2eac8f 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -331,9 +331,9 @@ static inline void nfs_fattr_init(struct nfs_fattr *fattr) | |||
331 | /* | 331 | /* |
332 | * linux/fs/nfs/file.c | 332 | * linux/fs/nfs/file.c |
333 | */ | 333 | */ |
334 | extern struct inode_operations nfs_file_inode_operations; | 334 | extern const struct inode_operations nfs_file_inode_operations; |
335 | #ifdef CONFIG_NFS_V3 | 335 | #ifdef CONFIG_NFS_V3 |
336 | extern struct inode_operations nfs3_file_inode_operations; | 336 | extern const struct inode_operations nfs3_file_inode_operations; |
337 | #endif /* CONFIG_NFS_V3 */ | 337 | #endif /* CONFIG_NFS_V3 */ |
338 | extern const struct file_operations nfs_file_operations; | 338 | extern const struct file_operations nfs_file_operations; |
339 | extern const struct address_space_operations nfs_file_aops; | 339 | extern const struct address_space_operations nfs_file_aops; |
@@ -380,9 +380,9 @@ extern ssize_t nfs_file_direct_write(struct kiocb *iocb, | |||
380 | /* | 380 | /* |
381 | * linux/fs/nfs/dir.c | 381 | * linux/fs/nfs/dir.c |
382 | */ | 382 | */ |
383 | extern struct inode_operations nfs_dir_inode_operations; | 383 | extern const struct inode_operations nfs_dir_inode_operations; |
384 | #ifdef CONFIG_NFS_V3 | 384 | #ifdef CONFIG_NFS_V3 |
385 | extern struct inode_operations nfs3_dir_inode_operations; | 385 | extern const struct inode_operations nfs3_dir_inode_operations; |
386 | #endif /* CONFIG_NFS_V3 */ | 386 | #endif /* CONFIG_NFS_V3 */ |
387 | extern const struct file_operations nfs_dir_operations; | 387 | extern const struct file_operations nfs_dir_operations; |
388 | extern struct dentry_operations nfs_dentry_operations; | 388 | extern struct dentry_operations nfs_dentry_operations; |
@@ -392,7 +392,7 @@ extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_ | |||
392 | /* | 392 | /* |
393 | * linux/fs/nfs/symlink.c | 393 | * linux/fs/nfs/symlink.c |
394 | */ | 394 | */ |
395 | extern struct inode_operations nfs_symlink_inode_operations; | 395 | extern const struct inode_operations nfs_symlink_inode_operations; |
396 | 396 | ||
397 | /* | 397 | /* |
398 | * linux/fs/nfs/sysctl.c | 398 | * linux/fs/nfs/sysctl.c |
@@ -409,8 +409,8 @@ extern void nfs_unregister_sysctl(void); | |||
409 | * linux/fs/nfs/namespace.c | 409 | * linux/fs/nfs/namespace.c |
410 | */ | 410 | */ |
411 | extern struct list_head nfs_automount_list; | 411 | extern struct list_head nfs_automount_list; |
412 | extern struct inode_operations nfs_mountpoint_inode_operations; | 412 | extern const struct inode_operations nfs_mountpoint_inode_operations; |
413 | extern struct inode_operations nfs_referral_inode_operations; | 413 | extern const struct inode_operations nfs_referral_inode_operations; |
414 | extern int nfs_mountpoint_expiry_timeout; | 414 | extern int nfs_mountpoint_expiry_timeout; |
415 | extern void nfs_release_automount_timer(void); | 415 | extern void nfs_release_automount_timer(void); |
416 | 416 | ||
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 9ee9da5e1c..30d7116d60 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -767,8 +767,8 @@ struct nfs_access_entry; | |||
767 | struct nfs_rpc_ops { | 767 | struct nfs_rpc_ops { |
768 | int version; /* Protocol version */ | 768 | int version; /* Protocol version */ |
769 | struct dentry_operations *dentry_ops; | 769 | struct dentry_operations *dentry_ops; |
770 | struct inode_operations *dir_inode_ops; | 770 | const struct inode_operations *dir_inode_ops; |
771 | struct inode_operations *file_inode_ops; | 771 | const struct inode_operations *file_inode_ops; |
772 | 772 | ||
773 | int (*getroot) (struct nfs_server *, struct nfs_fh *, | 773 | int (*getroot) (struct nfs_server *, struct nfs_fh *, |
774 | struct nfs_fsinfo *); | 774 | struct nfs_fsinfo *); |
diff --git a/include/linux/nfsd/const.h b/include/linux/nfsd/const.h index f0cc777905..323f8cfa06 100644 --- a/include/linux/nfsd/const.h +++ b/include/linux/nfsd/const.h | |||
@@ -30,10 +30,6 @@ | |||
30 | 30 | ||
31 | #include <linux/sunrpc/msg_prot.h> | 31 | #include <linux/sunrpc/msg_prot.h> |
32 | 32 | ||
33 | #ifndef NFS_SUPER_MAGIC | ||
34 | # define NFS_SUPER_MAGIC 0x6969 | ||
35 | #endif | ||
36 | |||
37 | /* | 33 | /* |
38 | * Largest number of bytes we need to allocate for an NFS | 34 | * Largest number of bytes we need to allocate for an NFS |
39 | * call or reply. Used to control buffer sizes. We use | 35 | * call or reply. Used to control buffer sizes. We use |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index c3e255bf85..7a8dcb82a6 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -76,8 +76,6 @@ extern struct page * find_get_page(struct address_space *mapping, | |||
76 | unsigned long index); | 76 | unsigned long index); |
77 | extern struct page * find_lock_page(struct address_space *mapping, | 77 | extern struct page * find_lock_page(struct address_space *mapping, |
78 | unsigned long index); | 78 | unsigned long index); |
79 | extern __deprecated_for_modules struct page * find_trylock_page( | ||
80 | struct address_space *mapping, unsigned long index); | ||
81 | extern struct page * find_or_create_page(struct address_space *mapping, | 79 | extern struct page * find_or_create_page(struct address_space *mapping, |
82 | unsigned long index, gfp_t gfp_mask); | 80 | unsigned long index, gfp_t gfp_mask); |
83 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, | 81 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 805412cc68..98c8765a48 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -167,6 +167,7 @@ struct pci_dev { | |||
167 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ | 167 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ |
168 | unsigned int msi_enabled:1; | 168 | unsigned int msi_enabled:1; |
169 | unsigned int msix_enabled:1; | 169 | unsigned int msix_enabled:1; |
170 | unsigned int is_managed:1; | ||
170 | atomic_t enable_cnt; /* pci_enable_device has been called */ | 171 | atomic_t enable_cnt; /* pci_enable_device has been called */ |
171 | 172 | ||
172 | u32 saved_config_space[16]; /* config space saved at suspend time */ | 173 | u32 saved_config_space[16]; /* config space saved at suspend time */ |
@@ -528,6 +529,14 @@ static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val | |||
528 | 529 | ||
529 | int __must_check pci_enable_device(struct pci_dev *dev); | 530 | int __must_check pci_enable_device(struct pci_dev *dev); |
530 | int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask); | 531 | int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask); |
532 | int __must_check pcim_enable_device(struct pci_dev *pdev); | ||
533 | void pcim_pin_device(struct pci_dev *pdev); | ||
534 | |||
535 | static inline int pci_is_managed(struct pci_dev *pdev) | ||
536 | { | ||
537 | return pdev->is_managed; | ||
538 | } | ||
539 | |||
531 | void pci_disable_device(struct pci_dev *dev); | 540 | void pci_disable_device(struct pci_dev *dev); |
532 | void pci_set_master(struct pci_dev *dev); | 541 | void pci_set_master(struct pci_dev *dev); |
533 | #define HAVE_PCI_SET_MWI | 542 | #define HAVE_PCI_SET_MWI |
@@ -831,6 +840,11 @@ enum pci_fixup_pass { | |||
831 | 840 | ||
832 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); | 841 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); |
833 | 842 | ||
843 | void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); | ||
844 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); | ||
845 | void __iomem * const * pcim_iomap_table(struct pci_dev *pdev); | ||
846 | int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); | ||
847 | |||
834 | extern int pci_pci_problems; | 848 | extern int pci_pci_problems; |
835 | #define PCIPCI_FAIL 1 /* No PCI PCI DMA */ | 849 | #define PCIPCI_FAIL 1 /* No PCI PCI DMA */ |
836 | #define PCIPCI_TRITON 2 | 850 | #define PCIPCI_TRITON 2 |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index defdeed206..8fb9c3e06e 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #define PCI_CLASS_STORAGE_FLOPPY 0x0102 | 15 | #define PCI_CLASS_STORAGE_FLOPPY 0x0102 |
16 | #define PCI_CLASS_STORAGE_IPI 0x0103 | 16 | #define PCI_CLASS_STORAGE_IPI 0x0103 |
17 | #define PCI_CLASS_STORAGE_RAID 0x0104 | 17 | #define PCI_CLASS_STORAGE_RAID 0x0104 |
18 | #define PCI_CLASS_STORAGE_SATA 0x0106 | ||
19 | #define PCI_CLASS_STORAGE_SATA_AHCI 0x010601 | ||
18 | #define PCI_CLASS_STORAGE_SAS 0x0107 | 20 | #define PCI_CLASS_STORAGE_SAS 0x0107 |
19 | #define PCI_CLASS_STORAGE_OTHER 0x0180 | 21 | #define PCI_CLASS_STORAGE_OTHER 0x0180 |
20 | 22 | ||
@@ -95,6 +97,7 @@ | |||
95 | 97 | ||
96 | #define PCI_BASE_CLASS_SERIAL 0x0c | 98 | #define PCI_BASE_CLASS_SERIAL 0x0c |
97 | #define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 | 99 | #define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 |
100 | #define PCI_CLASS_SERIAL_FIREWIRE_OHCI 0x0c0010 | ||
98 | #define PCI_CLASS_SERIAL_ACCESS 0x0c01 | 101 | #define PCI_CLASS_SERIAL_ACCESS 0x0c01 |
99 | #define PCI_CLASS_SERIAL_SSA 0x0c02 | 102 | #define PCI_CLASS_SERIAL_SSA 0x0c02 |
100 | #define PCI_CLASS_SERIAL_USB 0x0c03 | 103 | #define PCI_CLASS_SERIAL_USB 0x0c03 |
@@ -956,6 +959,7 @@ | |||
956 | #define PCI_DEVICE_ID_PLX_R753 0x1152 | 959 | #define PCI_DEVICE_ID_PLX_R753 0x1152 |
957 | #define PCI_DEVICE_ID_PLX_OLITEC 0x1187 | 960 | #define PCI_DEVICE_ID_PLX_OLITEC 0x1187 |
958 | #define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196 | 961 | #define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196 |
962 | #define PCI_DEVICE_ID_PLX_9030 0x9030 | ||
959 | #define PCI_DEVICE_ID_PLX_9050 0x9050 | 963 | #define PCI_DEVICE_ID_PLX_9050 0x9050 |
960 | #define PCI_DEVICE_ID_PLX_9080 0x9080 | 964 | #define PCI_DEVICE_ID_PLX_9080 0x9080 |
961 | #define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 | 965 | #define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 |
@@ -1632,6 +1636,7 @@ | |||
1632 | #define PCI_VENDOR_ID_ITE 0x1283 | 1636 | #define PCI_VENDOR_ID_ITE 0x1283 |
1633 | #define PCI_DEVICE_ID_ITE_8211 0x8211 | 1637 | #define PCI_DEVICE_ID_ITE_8211 0x8211 |
1634 | #define PCI_DEVICE_ID_ITE_8212 0x8212 | 1638 | #define PCI_DEVICE_ID_ITE_8212 0x8212 |
1639 | #define PCI_DEVICE_ID_ITE_8213 0x8213 | ||
1635 | #define PCI_DEVICE_ID_ITE_8872 0x8872 | 1640 | #define PCI_DEVICE_ID_ITE_8872 0x8872 |
1636 | #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 | 1641 | #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 |
1637 | 1642 | ||
@@ -1692,6 +1697,8 @@ | |||
1692 | #define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8 | 1697 | #define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8 |
1693 | #define PCI_DEVICE_ID_LML_33R10 0x8a02 | 1698 | #define PCI_DEVICE_ID_LML_33R10 0x8a02 |
1694 | 1699 | ||
1700 | #define PCI_VENDOR_ID_ESDGMBH 0x12fe | ||
1701 | #define PCI_DEVICE_ID_ESDGMBH_CPCIASIO4 0x0111 | ||
1695 | 1702 | ||
1696 | #define PCI_VENDOR_ID_SIIG 0x131f | 1703 | #define PCI_VENDOR_ID_SIIG 0x131f |
1697 | #define PCI_SUBVENDOR_ID_SIIG 0x131f | 1704 | #define PCI_SUBVENDOR_ID_SIIG 0x131f |
@@ -1807,6 +1814,9 @@ | |||
1807 | #define PCI_DEVICE_ID_MOXA_C168 0x1680 | 1814 | #define PCI_DEVICE_ID_MOXA_C168 0x1680 |
1808 | #define PCI_DEVICE_ID_MOXA_CP168U 0x1681 | 1815 | #define PCI_DEVICE_ID_MOXA_CP168U 0x1681 |
1809 | #define PCI_DEVICE_ID_MOXA_CP168EL 0x1682 | 1816 | #define PCI_DEVICE_ID_MOXA_CP168EL 0x1682 |
1817 | #define PCI_DEVICE_ID_MOXA_CP204J 0x2040 | ||
1818 | #define PCI_DEVICE_ID_MOXA_C218 0x2180 | ||
1819 | #define PCI_DEVICE_ID_MOXA_C320 0x3200 | ||
1810 | 1820 | ||
1811 | #define PCI_VENDOR_ID_CCD 0x1397 | 1821 | #define PCI_VENDOR_ID_CCD 0x1397 |
1812 | #define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 | 1822 | #define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 |
@@ -1987,6 +1997,10 @@ | |||
1987 | 1997 | ||
1988 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | 1998 | #define PCI_VENDOR_ID_CHELSIO 0x1425 |
1989 | 1999 | ||
2000 | #define PCI_SUBVENDOR_ID_PERLE 0x155f | ||
2001 | #define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 | ||
2002 | #define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 | ||
2003 | |||
1990 | 2004 | ||
1991 | #define PCI_VENDOR_ID_SYBA 0x1592 | 2005 | #define PCI_VENDOR_ID_SYBA 0x1592 |
1992 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 | 2006 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 |
@@ -2073,6 +2087,8 @@ | |||
2073 | 2087 | ||
2074 | #define PCI_VENDOR_ID_PASEMI 0x1959 | 2088 | #define PCI_VENDOR_ID_PASEMI 0x1959 |
2075 | 2089 | ||
2090 | #define PCI_VENDOR_ID_ATTANSIC 0x1969 | ||
2091 | |||
2076 | #define PCI_VENDOR_ID_JMICRON 0x197B | 2092 | #define PCI_VENDOR_ID_JMICRON 0x197B |
2077 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 | 2093 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 |
2078 | #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 | 2094 | #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 |
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h index 265bafab64..d9db5f62ee 100644 --- a/include/linux/pfkeyv2.h +++ b/include/linux/pfkeyv2.h | |||
@@ -251,7 +251,8 @@ struct sadb_x_sec_ctx { | |||
251 | #define SADB_X_SPDEXPIRE 21 | 251 | #define SADB_X_SPDEXPIRE 21 |
252 | #define SADB_X_SPDDELETE2 22 | 252 | #define SADB_X_SPDDELETE2 22 |
253 | #define SADB_X_NAT_T_NEW_MAPPING 23 | 253 | #define SADB_X_NAT_T_NEW_MAPPING 23 |
254 | #define SADB_MAX 23 | 254 | #define SADB_X_MIGRATE 24 |
255 | #define SADB_MAX 24 | ||
255 | 256 | ||
256 | /* Security Association flags */ | 257 | /* Security Association flags */ |
257 | #define SADB_SAFLAGS_PFS 1 | 258 | #define SADB_SAFLAGS_PFS 1 |
@@ -297,6 +298,7 @@ struct sadb_x_sec_ctx { | |||
297 | #define SADB_X_EALG_BLOWFISHCBC 7 | 298 | #define SADB_X_EALG_BLOWFISHCBC 7 |
298 | #define SADB_EALG_NULL 11 | 299 | #define SADB_EALG_NULL 11 |
299 | #define SADB_X_EALG_AESCBC 12 | 300 | #define SADB_X_EALG_AESCBC 12 |
301 | #define SADB_X_EALG_CAMELLIACBC 22 | ||
300 | #define SADB_EALG_MAX 253 /* last EALG */ | 302 | #define SADB_EALG_MAX 253 /* last EALG */ |
301 | /* private allocations should use 249-255 (RFC2407) */ | 303 | /* private allocations should use 249-255 (RFC2407) */ |
302 | #define SADB_X_EALG_SERPENTCBC 252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */ | 304 | #define SADB_X_EALG_SERPENTCBC 252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */ |
diff --git a/include/linux/phonedev.h b/include/linux/phonedev.h index a0e31adf3a..4269de99e3 100644 --- a/include/linux/phonedev.h +++ b/include/linux/phonedev.h | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | struct phone_device { | 10 | struct phone_device { |
11 | struct phone_device *next; | 11 | struct phone_device *next; |
12 | struct file_operations *f_op; | 12 | const struct file_operations *f_op; |
13 | int (*open) (struct phone_device *, struct file *); | 13 | int (*open) (struct phone_device *, struct file *); |
14 | int board; /* Device private index */ | 14 | int board; /* Device private index */ |
15 | int minor; | 15 | int minor; |
diff --git a/include/linux/pid.h b/include/linux/pid.h index 4dec047b18..2ac27f9997 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -105,20 +105,6 @@ static inline pid_t pid_nr(struct pid *pid) | |||
105 | return nr; | 105 | return nr; |
106 | } | 106 | } |
107 | 107 | ||
108 | |||
109 | #define do_each_task_pid(who, type, task) \ | ||
110 | do { \ | ||
111 | struct hlist_node *pos___; \ | ||
112 | struct pid *pid___ = find_pid(who); \ | ||
113 | if (pid___ != NULL) \ | ||
114 | hlist_for_each_entry_rcu((task), pos___, \ | ||
115 | &pid___->tasks[type], pids[type].node) { | ||
116 | |||
117 | #define while_each_task_pid(who, type, task) \ | ||
118 | } \ | ||
119 | } while (0) | ||
120 | |||
121 | |||
122 | #define do_each_pid_task(pid, type, task) \ | 108 | #define do_each_pid_task(pid, type, task) \ |
123 | do { \ | 109 | do { \ |
124 | struct hlist_node *pos___; \ | 110 | struct hlist_node *pos___; \ |
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index ab8a8dd8d6..9a5226f0f1 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -352,6 +352,8 @@ struct pnp_protocol { | |||
352 | (dev) = protocol_to_pnp_dev((dev)->protocol_list.next)) | 352 | (dev) = protocol_to_pnp_dev((dev)->protocol_list.next)) |
353 | 353 | ||
354 | 354 | ||
355 | extern struct bus_type pnp_bus_type; | ||
356 | |||
355 | #if defined(CONFIG_PNP) | 357 | #if defined(CONFIG_PNP) |
356 | 358 | ||
357 | /* device management */ | 359 | /* device management */ |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 87dec8fe6d..2e132473cb 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -55,8 +55,8 @@ struct proc_dir_entry { | |||
55 | uid_t uid; | 55 | uid_t uid; |
56 | gid_t gid; | 56 | gid_t gid; |
57 | loff_t size; | 57 | loff_t size; |
58 | struct inode_operations * proc_iops; | 58 | const struct inode_operations *proc_iops; |
59 | const struct file_operations * proc_fops; | 59 | const struct file_operations *proc_fops; |
60 | get_info_t *get_info; | 60 | get_info_t *get_info; |
61 | struct module *owner; | 61 | struct module *owner; |
62 | struct proc_dir_entry *next, *parent, *subdir; | 62 | struct proc_dir_entry *next, *parent, *subdir; |
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h index 0c7ac444fd..19bc9b8b61 100644 --- a/include/linux/qnx4_fs.h +++ b/include/linux/qnx4_fs.h | |||
@@ -116,8 +116,8 @@ extern unsigned long qnx4_block_map(struct inode *inode, long iblock); | |||
116 | 116 | ||
117 | extern struct buffer_head *qnx4_bread(struct inode *, int, int); | 117 | extern struct buffer_head *qnx4_bread(struct inode *, int, int); |
118 | 118 | ||
119 | extern struct inode_operations qnx4_file_inode_operations; | 119 | extern const struct inode_operations qnx4_file_inode_operations; |
120 | extern struct inode_operations qnx4_dir_inode_operations; | 120 | extern const struct inode_operations qnx4_dir_inode_operations; |
121 | extern const struct file_operations qnx4_file_operations; | 121 | extern const struct file_operations qnx4_file_operations; |
122 | extern const struct file_operations qnx4_dir_operations; | 122 | extern const struct file_operations qnx4_dir_operations; |
123 | extern int qnx4_is_free(struct super_block *sb, long block); | 123 | extern int qnx4_is_free(struct super_block *sb, long block); |
diff --git a/include/linux/quota.h b/include/linux/quota.h index b8fbf26eb8..77db80a953 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -132,6 +132,7 @@ struct if_dqinfo { | |||
132 | 132 | ||
133 | #ifdef __KERNEL__ | 133 | #ifdef __KERNEL__ |
134 | #include <linux/spinlock.h> | 134 | #include <linux/spinlock.h> |
135 | #include <linux/rwsem.h> | ||
135 | #include <linux/mutex.h> | 136 | #include <linux/mutex.h> |
136 | 137 | ||
137 | #include <linux/dqblk_xfs.h> | 138 | #include <linux/dqblk_xfs.h> |
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index ebd42a3710..6db9a4c153 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
@@ -247,6 +247,7 @@ struct bitmap { | |||
247 | 247 | ||
248 | atomic_t pending_writes; /* pending writes to the bitmap file */ | 248 | atomic_t pending_writes; /* pending writes to the bitmap file */ |
249 | wait_queue_head_t write_wait; | 249 | wait_queue_head_t write_wait; |
250 | wait_queue_head_t overflow_wait; | ||
250 | 251 | ||
251 | }; | 252 | }; |
252 | 253 | ||
diff --git a/include/linux/random.h b/include/linux/random.h index 01ad71033d..36f125c0c6 100644 --- a/include/linux/random.h +++ b/include/linux/random.h | |||
@@ -63,7 +63,7 @@ extern u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, | |||
63 | __be16 sport, __be16 dport); | 63 | __be16 sport, __be16 dport); |
64 | 64 | ||
65 | #ifndef MODULE | 65 | #ifndef MODULE |
66 | extern struct file_operations random_fops, urandom_fops; | 66 | extern const struct file_operations random_fops, urandom_fops; |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | unsigned int get_random_int(void); | 69 | unsigned int get_random_int(void); |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index c3fc6caaad..965d5b3ea9 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -1949,9 +1949,9 @@ int reiserfs_global_version_in_proc(char *buffer, char **start, off_t offset, | |||
1949 | #endif | 1949 | #endif |
1950 | 1950 | ||
1951 | /* dir.c */ | 1951 | /* dir.c */ |
1952 | extern struct inode_operations reiserfs_dir_inode_operations; | 1952 | extern const struct inode_operations reiserfs_dir_inode_operations; |
1953 | extern struct inode_operations reiserfs_symlink_inode_operations; | 1953 | extern const struct inode_operations reiserfs_symlink_inode_operations; |
1954 | extern struct inode_operations reiserfs_special_inode_operations; | 1954 | extern const struct inode_operations reiserfs_special_inode_operations; |
1955 | extern const struct file_operations reiserfs_dir_operations; | 1955 | extern const struct file_operations reiserfs_dir_operations; |
1956 | 1956 | ||
1957 | /* tail_conversion.c */ | 1957 | /* tail_conversion.c */ |
@@ -1963,7 +1963,7 @@ int indirect2direct(struct reiserfs_transaction_handle *, struct inode *, | |||
1963 | void reiserfs_unmap_buffer(struct buffer_head *); | 1963 | void reiserfs_unmap_buffer(struct buffer_head *); |
1964 | 1964 | ||
1965 | /* file.c */ | 1965 | /* file.c */ |
1966 | extern struct inode_operations reiserfs_file_inode_operations; | 1966 | extern const struct inode_operations reiserfs_file_inode_operations; |
1967 | extern const struct file_operations reiserfs_file_operations; | 1967 | extern const struct file_operations reiserfs_file_operations; |
1968 | extern const struct address_space_operations reiserfs_address_space_operations; | 1968 | extern const struct address_space_operations reiserfs_address_space_operations; |
1969 | 1969 | ||
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 966c35851b..66a96814d6 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -2,7 +2,10 @@ | |||
2 | File: linux/reiserfs_xattr.h | 2 | File: linux/reiserfs_xattr.h |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/xattr.h> | 5 | #ifndef _LINUX_REISERFS_XATTR_H |
6 | #define _LINUX_REISERFS_XATTR_H | ||
7 | |||
8 | #include <linux/types.h> | ||
6 | 9 | ||
7 | /* Magic value in header */ | 10 | /* Magic value in header */ |
8 | #define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ | 11 | #define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ |
@@ -13,7 +16,18 @@ struct reiserfs_xattr_header { | |||
13 | }; | 16 | }; |
14 | 17 | ||
15 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | |||
16 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/list.h> | ||
22 | #include <linux/rwsem.h> | ||
23 | #include <linux/reiserfs_fs_i.h> | ||
24 | #include <linux/reiserfs_fs.h> | ||
25 | |||
26 | struct inode; | ||
27 | struct dentry; | ||
28 | struct iattr; | ||
29 | struct super_block; | ||
30 | struct nameidata; | ||
17 | 31 | ||
18 | struct reiserfs_xattr_handler { | 32 | struct reiserfs_xattr_handler { |
19 | char *prefix; | 33 | char *prefix; |
@@ -49,9 +63,7 @@ int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int); | |||
49 | 63 | ||
50 | extern struct reiserfs_xattr_handler user_handler; | 64 | extern struct reiserfs_xattr_handler user_handler; |
51 | extern struct reiserfs_xattr_handler trusted_handler; | 65 | extern struct reiserfs_xattr_handler trusted_handler; |
52 | #ifdef CONFIG_REISERFS_FS_SECURITY | ||
53 | extern struct reiserfs_xattr_handler security_handler; | 66 | extern struct reiserfs_xattr_handler security_handler; |
54 | #endif | ||
55 | 67 | ||
56 | int reiserfs_xattr_register_handlers(void) __init; | 68 | int reiserfs_xattr_register_handlers(void) __init; |
57 | void reiserfs_xattr_unregister_handlers(void); | 69 | void reiserfs_xattr_unregister_handlers(void); |
@@ -137,6 +149,8 @@ static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags) | |||
137 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) | 149 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) |
138 | { | 150 | { |
139 | } | 151 | } |
140 | #endif | 152 | #endif /* CONFIG_REISERFS_FS_XATTR */ |
153 | |||
154 | #endif /* __KERNEL__ */ | ||
141 | 155 | ||
142 | #endif /* __KERNEL__ */ | 156 | #endif /* _LINUX_REISERFS_XATTR_H */ |
diff --git a/include/linux/relay.h b/include/linux/relay.h index c6a48bfc8b..759a0f97be 100644 --- a/include/linux/relay.h +++ b/include/linux/relay.h | |||
@@ -24,7 +24,7 @@ | |||
24 | /* | 24 | /* |
25 | * Tracks changes to rchan/rchan_buf structs | 25 | * Tracks changes to rchan/rchan_buf structs |
26 | */ | 26 | */ |
27 | #define RELAYFS_CHANNEL_VERSION 6 | 27 | #define RELAYFS_CHANNEL_VERSION 7 |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * Per-cpu relay channel buffer | 30 | * Per-cpu relay channel buffer |
@@ -64,6 +64,10 @@ struct rchan | |||
64 | void *private_data; /* for user-defined data */ | 64 | void *private_data; /* for user-defined data */ |
65 | size_t last_toobig; /* tried to log event > subbuf size */ | 65 | size_t last_toobig; /* tried to log event > subbuf size */ |
66 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ | 66 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ |
67 | int is_global; /* One global buffer ? */ | ||
68 | struct list_head list; /* for channel list */ | ||
69 | struct dentry *parent; /* parent dentry passed to open */ | ||
70 | char base_filename[NAME_MAX]; /* saved base filename */ | ||
67 | }; | 71 | }; |
68 | 72 | ||
69 | /* | 73 | /* |
@@ -162,7 +166,8 @@ struct rchan *relay_open(const char *base_filename, | |||
162 | struct dentry *parent, | 166 | struct dentry *parent, |
163 | size_t subbuf_size, | 167 | size_t subbuf_size, |
164 | size_t n_subbufs, | 168 | size_t n_subbufs, |
165 | struct rchan_callbacks *cb); | 169 | struct rchan_callbacks *cb, |
170 | void *private_data); | ||
166 | extern void relay_close(struct rchan *chan); | 171 | extern void relay_close(struct rchan *chan); |
167 | extern void relay_flush(struct rchan *chan); | 172 | extern void relay_flush(struct rchan *chan); |
168 | extern void relay_subbufs_consumed(struct rchan *chan, | 173 | extern void relay_subbufs_consumed(struct rchan *chan, |
diff --git a/include/linux/rio.h b/include/linux/rio.h index d93857056c..68e3f6853f 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #define RIO_ANY_DESTID 0xff | 26 | #define RIO_ANY_DESTID 0xff |
27 | #define RIO_NO_HOPCOUNT -1 | 27 | #define RIO_NO_HOPCOUNT -1 |
28 | #define RIO_INVALID_DESTID 0xffff | ||
28 | 29 | ||
29 | #define RIO_MAX_MPORT_RESOURCES 16 | 30 | #define RIO_MAX_MPORT_RESOURCES 16 |
30 | #define RIO_MAX_DEV_RESOURCES 16 | 31 | #define RIO_MAX_DEV_RESOURCES 16 |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 4463735351..5053dc01fa 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -436,7 +436,7 @@ struct signal_struct { | |||
436 | 436 | ||
437 | /* job control IDs */ | 437 | /* job control IDs */ |
438 | pid_t pgrp; | 438 | pid_t pgrp; |
439 | pid_t tty_old_pgrp; | 439 | struct pid *tty_old_pgrp; |
440 | 440 | ||
441 | union { | 441 | union { |
442 | pid_t session __deprecated; | 442 | pid_t session __deprecated; |
@@ -1013,8 +1013,10 @@ struct task_struct { | |||
1013 | * to a stack based synchronous wait) if its doing sync IO. | 1013 | * to a stack based synchronous wait) if its doing sync IO. |
1014 | */ | 1014 | */ |
1015 | wait_queue_t *io_wait; | 1015 | wait_queue_t *io_wait; |
1016 | #ifdef CONFIG_TASK_XACCT | ||
1016 | /* i/o counters(bytes read/written, #syscalls */ | 1017 | /* i/o counters(bytes read/written, #syscalls */ |
1017 | u64 rchar, wchar, syscr, syscw; | 1018 | u64 rchar, wchar, syscr, syscw; |
1019 | #endif | ||
1018 | struct task_io_accounting ioac; | 1020 | struct task_io_accounting ioac; |
1019 | #if defined(CONFIG_TASK_XACCT) | 1021 | #if defined(CONFIG_TASK_XACCT) |
1020 | u64 acct_rss_mem1; /* accumulated rss usage */ | 1022 | u64 acct_rss_mem1; /* accumulated rss usage */ |
@@ -1327,14 +1329,11 @@ extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); | |||
1327 | extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); | 1329 | extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); |
1328 | extern int kill_pgrp(struct pid *pid, int sig, int priv); | 1330 | extern int kill_pgrp(struct pid *pid, int sig, int priv); |
1329 | extern int kill_pid(struct pid *pid, int sig, int priv); | 1331 | extern int kill_pid(struct pid *pid, int sig, int priv); |
1330 | extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); | ||
1331 | extern int kill_pg_info(int, struct siginfo *, pid_t); | ||
1332 | extern void do_notify_parent(struct task_struct *, int); | 1332 | extern void do_notify_parent(struct task_struct *, int); |
1333 | extern void force_sig(int, struct task_struct *); | 1333 | extern void force_sig(int, struct task_struct *); |
1334 | extern void force_sig_specific(int, struct task_struct *); | 1334 | extern void force_sig_specific(int, struct task_struct *); |
1335 | extern int send_sig(int, struct task_struct *, int); | 1335 | extern int send_sig(int, struct task_struct *, int); |
1336 | extern void zap_other_threads(struct task_struct *p); | 1336 | extern void zap_other_threads(struct task_struct *p); |
1337 | extern int kill_pg(pid_t, int, int); | ||
1338 | extern int kill_proc(pid_t, int, int); | 1337 | extern int kill_proc(pid_t, int, int); |
1339 | extern struct sigqueue *sigqueue_alloc(void); | 1338 | extern struct sigqueue *sigqueue_alloc(void); |
1340 | extern void sigqueue_free(struct sigqueue *); | 1339 | extern void sigqueue_free(struct sigqueue *); |
@@ -1649,6 +1648,44 @@ extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); | |||
1649 | 1648 | ||
1650 | extern void normalize_rt_tasks(void); | 1649 | extern void normalize_rt_tasks(void); |
1651 | 1650 | ||
1651 | #ifdef CONFIG_TASK_XACCT | ||
1652 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
1653 | { | ||
1654 | tsk->rchar += amt; | ||
1655 | } | ||
1656 | |||
1657 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
1658 | { | ||
1659 | tsk->wchar += amt; | ||
1660 | } | ||
1661 | |||
1662 | static inline void inc_syscr(struct task_struct *tsk) | ||
1663 | { | ||
1664 | tsk->syscr++; | ||
1665 | } | ||
1666 | |||
1667 | static inline void inc_syscw(struct task_struct *tsk) | ||
1668 | { | ||
1669 | tsk->syscw++; | ||
1670 | } | ||
1671 | #else | ||
1672 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
1673 | { | ||
1674 | } | ||
1675 | |||
1676 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
1677 | { | ||
1678 | } | ||
1679 | |||
1680 | static inline void inc_syscr(struct task_struct *tsk) | ||
1681 | { | ||
1682 | } | ||
1683 | |||
1684 | static inline void inc_syscw(struct task_struct *tsk) | ||
1685 | { | ||
1686 | } | ||
1687 | #endif | ||
1688 | |||
1652 | #endif /* __KERNEL__ */ | 1689 | #endif /* __KERNEL__ */ |
1653 | 1690 | ||
1654 | #endif | 1691 | #endif |
diff --git a/include/linux/security.h b/include/linux/security.h index 83cdefae99..7f88d97575 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -492,7 +492,7 @@ struct request_sock; | |||
492 | * Note that the fown_struct, @fown, is never outside the context of a | 492 | * Note that the fown_struct, @fown, is never outside the context of a |
493 | * struct file, so the file structure (and associated security information) | 493 | * struct file, so the file structure (and associated security information) |
494 | * can always be obtained: | 494 | * can always be obtained: |
495 | * (struct file *)((long)fown - offsetof(struct file,f_owner)); | 495 | * container_of(fown, struct file, f_owner) |
496 | * @tsk contains the structure of task receiving signal. | 496 | * @tsk contains the structure of task receiving signal. |
497 | * @fown contains the file owner information. | 497 | * @fown contains the file owner information. |
498 | * @sig is the signal that will be sent. When 0, kernel sends SIGIO. | 498 | * @sig is the signal that will be sent. When 0, kernel sends SIGIO. |
@@ -2130,7 +2130,7 @@ extern int mod_reg_security (const char *name, struct security_operations *ops); | |||
2130 | extern int mod_unreg_security (const char *name, struct security_operations *ops); | 2130 | extern int mod_unreg_security (const char *name, struct security_operations *ops); |
2131 | extern struct dentry *securityfs_create_file(const char *name, mode_t mode, | 2131 | extern struct dentry *securityfs_create_file(const char *name, mode_t mode, |
2132 | struct dentry *parent, void *data, | 2132 | struct dentry *parent, void *data, |
2133 | struct file_operations *fops); | 2133 | const struct file_operations *fops); |
2134 | extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent); | 2134 | extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent); |
2135 | extern void securityfs_remove(struct dentry *dentry); | 2135 | extern void securityfs_remove(struct dentry *dentry); |
2136 | 2136 | ||
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 4b463e66dd..5e4364644e 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -19,7 +19,9 @@ | |||
19 | struct cache_sizes { | 19 | struct cache_sizes { |
20 | size_t cs_size; | 20 | size_t cs_size; |
21 | struct kmem_cache *cs_cachep; | 21 | struct kmem_cache *cs_cachep; |
22 | #ifdef CONFIG_ZONE_DMA | ||
22 | struct kmem_cache *cs_dmacachep; | 23 | struct kmem_cache *cs_dmacachep; |
24 | #endif | ||
23 | }; | 25 | }; |
24 | extern struct cache_sizes malloc_sizes[]; | 26 | extern struct cache_sizes malloc_sizes[]; |
25 | 27 | ||
@@ -39,9 +41,12 @@ static inline void *kmalloc(size_t size, gfp_t flags) | |||
39 | __you_cannot_kmalloc_that_much(); | 41 | __you_cannot_kmalloc_that_much(); |
40 | } | 42 | } |
41 | found: | 43 | found: |
42 | return kmem_cache_alloc((flags & GFP_DMA) ? | 44 | #ifdef CONFIG_ZONE_DMA |
43 | malloc_sizes[i].cs_dmacachep : | 45 | if (flags & GFP_DMA) |
44 | malloc_sizes[i].cs_cachep, flags); | 46 | return kmem_cache_alloc(malloc_sizes[i].cs_dmacachep, |
47 | flags); | ||
48 | #endif | ||
49 | return kmem_cache_alloc(malloc_sizes[i].cs_cachep, flags); | ||
45 | } | 50 | } |
46 | return __kmalloc(size, flags); | 51 | return __kmalloc(size, flags); |
47 | } | 52 | } |
@@ -62,9 +67,12 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
62 | __you_cannot_kzalloc_that_much(); | 67 | __you_cannot_kzalloc_that_much(); |
63 | } | 68 | } |
64 | found: | 69 | found: |
65 | return kmem_cache_zalloc((flags & GFP_DMA) ? | 70 | #ifdef CONFIG_ZONE_DMA |
66 | malloc_sizes[i].cs_dmacachep : | 71 | if (flags & GFP_DMA) |
67 | malloc_sizes[i].cs_cachep, flags); | 72 | return kmem_cache_zalloc(malloc_sizes[i].cs_dmacachep, |
73 | flags); | ||
74 | #endif | ||
75 | return kmem_cache_zalloc(malloc_sizes[i].cs_cachep, flags); | ||
68 | } | 76 | } |
69 | return __kzalloc(size, flags); | 77 | return __kzalloc(size, flags); |
70 | } | 78 | } |
@@ -88,9 +96,13 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
88 | __you_cannot_kmalloc_that_much(); | 96 | __you_cannot_kmalloc_that_much(); |
89 | } | 97 | } |
90 | found: | 98 | found: |
91 | return kmem_cache_alloc_node((flags & GFP_DMA) ? | 99 | #ifdef CONFIG_ZONE_DMA |
92 | malloc_sizes[i].cs_dmacachep : | 100 | if (flags & GFP_DMA) |
93 | malloc_sizes[i].cs_cachep, flags, node); | 101 | return kmem_cache_alloc_node(malloc_sizes[i].cs_dmacachep, |
102 | flags, node); | ||
103 | #endif | ||
104 | return kmem_cache_alloc_node(malloc_sizes[i].cs_cachep, | ||
105 | flags, node); | ||
94 | } | 106 | } |
95 | return __kmalloc_node(size, flags, node); | 107 | return __kmalloc_node(size, flags, node); |
96 | } | 108 | } |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 92cd38efad..28157a36e6 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage { | |||
16 | /* _SS_MAXSIZE value minus size of ss_family */ | 16 | /* _SS_MAXSIZE value minus size of ss_family */ |
17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ | 17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ |
18 | 18 | ||
19 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 19 | #ifdef __KERNEL__ |
20 | 20 | ||
21 | #include <asm/socket.h> /* arch-dependent defines */ | 21 | #include <asm/socket.h> /* arch-dependent defines */ |
22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ | 22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ |
@@ -187,7 +187,8 @@ struct ucred { | |||
187 | #define AF_LLC 26 /* Linux LLC */ | 187 | #define AF_LLC 26 /* Linux LLC */ |
188 | #define AF_TIPC 30 /* TIPC sockets */ | 188 | #define AF_TIPC 30 /* TIPC sockets */ |
189 | #define AF_BLUETOOTH 31 /* Bluetooth sockets */ | 189 | #define AF_BLUETOOTH 31 /* Bluetooth sockets */ |
190 | #define AF_MAX 32 /* For now.. */ | 190 | #define AF_IUCV 32 /* IUCV sockets */ |
191 | #define AF_MAX 33 /* For now.. */ | ||
191 | 192 | ||
192 | /* Protocol families, same as address families. */ | 193 | /* Protocol families, same as address families. */ |
193 | #define PF_UNSPEC AF_UNSPEC | 194 | #define PF_UNSPEC AF_UNSPEC |
@@ -220,6 +221,7 @@ struct ucred { | |||
220 | #define PF_LLC AF_LLC | 221 | #define PF_LLC AF_LLC |
221 | #define PF_TIPC AF_TIPC | 222 | #define PF_TIPC AF_TIPC |
222 | #define PF_BLUETOOTH AF_BLUETOOTH | 223 | #define PF_BLUETOOTH AF_BLUETOOTH |
224 | #define PF_IUCV AF_IUCV | ||
223 | #define PF_MAX AF_MAX | 225 | #define PF_MAX AF_MAX |
224 | 226 | ||
225 | /* Maximum queue length specifiable by listen. */ | 227 | /* Maximum queue length specifiable by listen. */ |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index adb3dafd33..3387e44dfd 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
@@ -5,9 +5,17 @@ | |||
5 | * | 5 | * |
6 | * It's OK if the min/max values are zero. | 6 | * It's OK if the min/max values are zero. |
7 | */ | 7 | */ |
8 | enum ads7846_filter { | ||
9 | ADS7846_FILTER_OK, | ||
10 | ADS7846_FILTER_REPEAT, | ||
11 | ADS7846_FILTER_IGNORE, | ||
12 | }; | ||
13 | |||
8 | struct ads7846_platform_data { | 14 | struct ads7846_platform_data { |
9 | u16 model; /* 7843, 7845, 7846. */ | 15 | u16 model; /* 7843, 7845, 7846. */ |
10 | u16 vref_delay_usecs; /* 0 for external vref; etc */ | 16 | u16 vref_delay_usecs; /* 0 for external vref; etc */ |
17 | int keep_vref_on:1; /* set to keep vref on for differential | ||
18 | * measurements as well */ | ||
11 | u16 x_plate_ohms; | 19 | u16 x_plate_ohms; |
12 | u16 y_plate_ohms; | 20 | u16 y_plate_ohms; |
13 | 21 | ||
@@ -21,5 +29,9 @@ struct ads7846_platform_data { | |||
21 | u16 debounce_rep; /* additional consecutive good readings | 29 | u16 debounce_rep; /* additional consecutive good readings |
22 | * required after the first two */ | 30 | * required after the first two */ |
23 | int (*get_pendown_state)(void); | 31 | int (*get_pendown_state)(void); |
32 | int (*filter_init) (struct ads7846_platform_data *pdata, | ||
33 | void **filter_data); | ||
34 | int (*filter) (void *filter_data, int data_idx, int *val); | ||
35 | void (*filter_cleanup)(void *filter_data); | ||
24 | }; | 36 | }; |
25 | 37 | ||
diff --git a/include/linux/spi/eeprom.h b/include/linux/spi/eeprom.h new file mode 100644 index 0000000000..1085212c44 --- /dev/null +++ b/include/linux/spi/eeprom.h | |||
@@ -0,0 +1,22 @@ | |||
1 | #ifndef __LINUX_SPI_EEPROM_H | ||
2 | #define __LINUX_SPI_EEPROM_H | ||
3 | |||
4 | /* | ||
5 | * Put one of these structures in platform_data for SPI EEPROMS handled | ||
6 | * by the "at25" driver. On SPI, most EEPROMS understand the same core | ||
7 | * command set. If you need to support EEPROMs that don't yet fit, add | ||
8 | * flags to support those protocol options. These values all come from | ||
9 | * the chip datasheets. | ||
10 | */ | ||
11 | struct spi_eeprom { | ||
12 | u32 byte_len; | ||
13 | char name[10]; | ||
14 | u16 page_size; /* for writes */ | ||
15 | u16 flags; | ||
16 | #define EE_ADDR1 0x0001 /* 8 bit addrs */ | ||
17 | #define EE_ADDR2 0x0002 /* 16 bit addrs */ | ||
18 | #define EE_ADDR3 0x0004 /* 24 bit addrs */ | ||
19 | #define EE_READONLY 0x0008 /* disallow writes */ | ||
20 | }; | ||
21 | |||
22 | #endif /* __LINUX_SPI_EEPROM_H */ | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 176f6e36db..4f0f8c2e58 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -114,6 +114,17 @@ static inline void spi_set_ctldata(struct spi_device *spi, void *state) | |||
114 | spi->controller_state = state; | 114 | spi->controller_state = state; |
115 | } | 115 | } |
116 | 116 | ||
117 | /* device driver data */ | ||
118 | |||
119 | static inline void spi_set_drvdata(struct spi_device *spi, void *data) | ||
120 | { | ||
121 | dev_set_drvdata(&spi->dev, data); | ||
122 | } | ||
123 | |||
124 | static inline void *spi_get_drvdata(struct spi_device *spi) | ||
125 | { | ||
126 | return dev_get_drvdata(&spi->dev); | ||
127 | } | ||
117 | 128 | ||
118 | struct spi_message; | 129 | struct spi_message; |
119 | 130 | ||
@@ -137,13 +148,11 @@ extern int spi_register_driver(struct spi_driver *sdrv); | |||
137 | 148 | ||
138 | static inline void spi_unregister_driver(struct spi_driver *sdrv) | 149 | static inline void spi_unregister_driver(struct spi_driver *sdrv) |
139 | { | 150 | { |
140 | if (!sdrv) | 151 | if (sdrv) |
141 | return; | 152 | driver_unregister(&sdrv->driver); |
142 | driver_unregister(&sdrv->driver); | ||
143 | } | 153 | } |
144 | 154 | ||
145 | 155 | ||
146 | |||
147 | /** | 156 | /** |
148 | * struct spi_master - interface to SPI master controller | 157 | * struct spi_master - interface to SPI master controller |
149 | * @cdev: class interface to this driver | 158 | * @cdev: class interface to this driver |
@@ -154,7 +163,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
154 | * each slave has a chipselect signal, but it's common that not | 163 | * each slave has a chipselect signal, but it's common that not |
155 | * every chipselect is connected to a slave. | 164 | * every chipselect is connected to a slave. |
156 | * @setup: updates the device mode and clocking records used by a | 165 | * @setup: updates the device mode and clocking records used by a |
157 | * device's SPI controller; protocol code may call this. | 166 | * device's SPI controller; protocol code may call this. This |
167 | * must fail if an unrecognized or unsupported mode is requested. | ||
158 | * @transfer: adds a message to the controller's transfer queue. | 168 | * @transfer: adds a message to the controller's transfer queue. |
159 | * @cleanup: frees controller-specific state | 169 | * @cleanup: frees controller-specific state |
160 | * | 170 | * |
@@ -211,7 +221,7 @@ struct spi_master { | |||
211 | struct spi_message *mesg); | 221 | struct spi_message *mesg); |
212 | 222 | ||
213 | /* called on release() to free memory provided by spi_master */ | 223 | /* called on release() to free memory provided by spi_master */ |
214 | void (*cleanup)(const struct spi_device *spi); | 224 | void (*cleanup)(struct spi_device *spi); |
215 | }; | 225 | }; |
216 | 226 | ||
217 | static inline void *spi_master_get_devdata(struct spi_master *master) | 227 | static inline void *spi_master_get_devdata(struct spi_master *master) |
@@ -296,6 +306,16 @@ extern struct spi_master *spi_busnum_to_master(u16 busnum); | |||
296 | * shifting out three bytes with word size of sixteen or twenty bits; | 306 | * shifting out three bytes with word size of sixteen or twenty bits; |
297 | * the former uses two bytes per word, the latter uses four bytes.) | 307 | * the former uses two bytes per word, the latter uses four bytes.) |
298 | * | 308 | * |
309 | * In-memory data values are always in native CPU byte order, translated | ||
310 | * from the wire byte order (big-endian except with SPI_LSB_FIRST). So | ||
311 | * for example when bits_per_word is sixteen, buffers are 2N bytes long | ||
312 | * and hold N sixteen bit words in CPU byte order. | ||
313 | * | ||
314 | * When the word size of the SPI transfer is not a power-of-two multiple | ||
315 | * of eight bits, those in-memory words include extra bits. In-memory | ||
316 | * words are always seen by protocol drivers as right-justified, so the | ||
317 | * undefined (rx) or unused (tx) bits are always the most significant bits. | ||
318 | * | ||
299 | * All SPI transfers start with the relevant chipselect active. Normally | 319 | * All SPI transfers start with the relevant chipselect active. Normally |
300 | * it stays selected until after the last transfer in a message. Drivers | 320 | * it stays selected until after the last transfer in a message. Drivers |
301 | * can affect the chipselect signal using cs_change: | 321 | * can affect the chipselect signal using cs_change: |
@@ -453,6 +473,11 @@ static inline void spi_message_free(struct spi_message *m) | |||
453 | * changes those settings, and must be called from a context that can sleep. | 473 | * changes those settings, and must be called from a context that can sleep. |
454 | * The changes take effect the next time the device is selected and data | 474 | * The changes take effect the next time the device is selected and data |
455 | * is transferred to or from it. | 475 | * is transferred to or from it. |
476 | * | ||
477 | * Note that this call wil fail if the protocol driver specifies an option | ||
478 | * that the underlying controller or its driver does not support. For | ||
479 | * example, not all hardware supports wire transfers using nine bit words, | ||
480 | * LSB-first wire encoding, or active-high chipselects. | ||
456 | */ | 481 | */ |
457 | static inline int | 482 | static inline int |
458 | spi_setup(struct spi_device *spi) | 483 | spi_setup(struct spi_device *spi) |
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index 16ce178f54..2e8c048b9b 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h | |||
@@ -55,7 +55,7 @@ struct spi_bitbang { | |||
55 | * methods, if you like. | 55 | * methods, if you like. |
56 | */ | 56 | */ |
57 | extern int spi_bitbang_setup(struct spi_device *spi); | 57 | extern int spi_bitbang_setup(struct spi_device *spi); |
58 | extern void spi_bitbang_cleanup(const struct spi_device *spi); | 58 | extern void spi_bitbang_cleanup(struct spi_device *spi); |
59 | extern int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m); | 59 | extern int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m); |
60 | extern int spi_bitbang_setup_transfer(struct spi_device *spi, | 60 | extern int spi_bitbang_setup_transfer(struct spi_device *spi, |
61 | struct spi_transfer *t); | 61 | struct spi_transfer *t); |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 94b767d642..61fef376ed 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -228,15 +228,30 @@ do { \ | |||
228 | # define read_unlock_irq(lock) _read_unlock_irq(lock) | 228 | # define read_unlock_irq(lock) _read_unlock_irq(lock) |
229 | # define write_unlock_irq(lock) _write_unlock_irq(lock) | 229 | # define write_unlock_irq(lock) _write_unlock_irq(lock) |
230 | #else | 230 | #else |
231 | # define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) | 231 | # define spin_unlock(lock) \ |
232 | # define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock) | 232 | do {__raw_spin_unlock(&(lock)->raw_lock); __release(lock); } while (0) |
233 | # define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock) | 233 | # define read_unlock(lock) \ |
234 | # define spin_unlock_irq(lock) \ | 234 | do {__raw_read_unlock(&(lock)->raw_lock); __release(lock); } while (0) |
235 | do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | 235 | # define write_unlock(lock) \ |
236 | # define read_unlock_irq(lock) \ | 236 | do {__raw_write_unlock(&(lock)->raw_lock); __release(lock); } while (0) |
237 | do { __raw_read_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | 237 | # define spin_unlock_irq(lock) \ |
238 | # define write_unlock_irq(lock) \ | 238 | do { \ |
239 | do { __raw_write_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | 239 | __raw_spin_unlock(&(lock)->raw_lock); \ |
240 | __release(lock); \ | ||
241 | local_irq_enable(); \ | ||
242 | } while (0) | ||
243 | # define read_unlock_irq(lock) \ | ||
244 | do { \ | ||
245 | __raw_read_unlock(&(lock)->raw_lock); \ | ||
246 | __release(lock); \ | ||
247 | local_irq_enable(); \ | ||
248 | } while (0) | ||
249 | # define write_unlock_irq(lock) \ | ||
250 | do { \ | ||
251 | __raw_write_unlock(&(lock)->raw_lock); \ | ||
252 | __release(lock); \ | ||
253 | local_irq_enable(); \ | ||
254 | } while (0) | ||
240 | #endif | 255 | #endif |
241 | 256 | ||
242 | #define spin_unlock_irqrestore(lock, flags) \ | 257 | #define spin_unlock_irqrestore(lock, flags) \ |
diff --git a/include/linux/stat.h b/include/linux/stat.h index 679ef0d70b..4f8539ccff 100644 --- a/include/linux/stat.h +++ b/include/linux/stat.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 10 | #ifdef __KERNEL__ |
11 | 11 | ||
12 | #define S_IFMT 00170000 | 12 | #define S_IFMT 00170000 |
13 | #define S_IFSOCK 0140000 | 13 | #define S_IFSOCK 0140000 |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 64f3d60c72..83b3c7b433 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define SUNRPC_SVC_H | 11 | #define SUNRPC_SVC_H |
12 | 12 | ||
13 | #include <linux/in.h> | 13 | #include <linux/in.h> |
14 | #include <linux/in6.h> | ||
14 | #include <linux/sunrpc/types.h> | 15 | #include <linux/sunrpc/types.h> |
15 | #include <linux/sunrpc/xdr.h> | 16 | #include <linux/sunrpc/xdr.h> |
16 | #include <linux/sunrpc/auth.h> | 17 | #include <linux/sunrpc/auth.h> |
@@ -191,7 +192,13 @@ static inline void svc_putu32(struct kvec *iov, __be32 val) | |||
191 | iov->iov_len += sizeof(__be32); | 192 | iov->iov_len += sizeof(__be32); |
192 | } | 193 | } |
193 | 194 | ||
194 | 195 | union svc_addr_u { | |
196 | struct in_addr addr; | ||
197 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
198 | struct in6_addr addr6; | ||
199 | #endif | ||
200 | }; | ||
201 | |||
195 | /* | 202 | /* |
196 | * The context of a single thread, including the request currently being | 203 | * The context of a single thread, including the request currently being |
197 | * processed. | 204 | * processed. |
@@ -200,8 +207,8 @@ struct svc_rqst { | |||
200 | struct list_head rq_list; /* idle list */ | 207 | struct list_head rq_list; /* idle list */ |
201 | struct list_head rq_all; /* all threads list */ | 208 | struct list_head rq_all; /* all threads list */ |
202 | struct svc_sock * rq_sock; /* socket */ | 209 | struct svc_sock * rq_sock; /* socket */ |
203 | struct sockaddr_in rq_addr; /* peer address */ | 210 | struct sockaddr_storage rq_addr; /* peer address */ |
204 | int rq_addrlen; | 211 | size_t rq_addrlen; |
205 | 212 | ||
206 | struct svc_serv * rq_server; /* RPC service definition */ | 213 | struct svc_serv * rq_server; /* RPC service definition */ |
207 | struct svc_pool * rq_pool; /* thread pool */ | 214 | struct svc_pool * rq_pool; /* thread pool */ |
@@ -227,8 +234,8 @@ struct svc_rqst { | |||
227 | unsigned short | 234 | unsigned short |
228 | rq_secure : 1; /* secure port */ | 235 | rq_secure : 1; /* secure port */ |
229 | 236 | ||
230 | 237 | union svc_addr_u rq_daddr; /* dest addr of request | |
231 | __be32 rq_daddr; /* dest addr of request - reply from here */ | 238 | * - reply from here */ |
232 | 239 | ||
233 | void * rq_argp; /* decoded arguments */ | 240 | void * rq_argp; /* decoded arguments */ |
234 | void * rq_resp; /* xdr'd results */ | 241 | void * rq_resp; /* xdr'd results */ |
@@ -256,6 +263,24 @@ struct svc_rqst { | |||
256 | }; | 263 | }; |
257 | 264 | ||
258 | /* | 265 | /* |
266 | * Rigorous type checking on sockaddr type conversions | ||
267 | */ | ||
268 | static inline struct sockaddr_in *svc_addr_in(struct svc_rqst *rqst) | ||
269 | { | ||
270 | return (struct sockaddr_in *) &rqst->rq_addr; | ||
271 | } | ||
272 | |||
273 | static inline struct sockaddr_in6 *svc_addr_in6(struct svc_rqst *rqst) | ||
274 | { | ||
275 | return (struct sockaddr_in6 *) &rqst->rq_addr; | ||
276 | } | ||
277 | |||
278 | static inline struct sockaddr *svc_addr(struct svc_rqst *rqst) | ||
279 | { | ||
280 | return (struct sockaddr *) &rqst->rq_addr; | ||
281 | } | ||
282 | |||
283 | /* | ||
259 | * Check buffer bounds after decoding arguments | 284 | * Check buffer bounds after decoding arguments |
260 | */ | 285 | */ |
261 | static inline int | 286 | static inline int |
@@ -292,9 +317,10 @@ static inline void svc_free_res_pages(struct svc_rqst *rqstp) | |||
292 | 317 | ||
293 | struct svc_deferred_req { | 318 | struct svc_deferred_req { |
294 | u32 prot; /* protocol (UDP or TCP) */ | 319 | u32 prot; /* protocol (UDP or TCP) */ |
295 | struct sockaddr_in addr; | 320 | struct svc_sock *svsk; |
296 | struct svc_sock *svsk; /* where reply must go */ | 321 | struct sockaddr_storage addr; /* where reply must go */ |
297 | __be32 daddr; /* where reply must come from */ | 322 | size_t addrlen; |
323 | union svc_addr_u daddr; /* where reply must come from */ | ||
298 | struct cache_deferred_req handle; | 324 | struct cache_deferred_req handle; |
299 | int argslen; | 325 | int argslen; |
300 | __be32 args[0]; | 326 | __be32 args[0]; |
@@ -368,5 +394,8 @@ int svc_register(struct svc_serv *, int, unsigned short); | |||
368 | void svc_wake_up(struct svc_serv *); | 394 | void svc_wake_up(struct svc_serv *); |
369 | void svc_reserve(struct svc_rqst *rqstp, int space); | 395 | void svc_reserve(struct svc_rqst *rqstp, int space); |
370 | struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu); | 396 | struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu); |
397 | char * svc_print_addr(struct svc_rqst *, char *, size_t); | ||
398 | |||
399 | #define RPC_MAX_ADDRBUFLEN (63U) | ||
371 | 400 | ||
372 | #endif /* SUNRPC_SVC_H */ | 401 | #endif /* SUNRPC_SVC_H */ |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 98b21ad370..cccea0a0fe 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -57,13 +57,16 @@ struct svc_sock { | |||
57 | 57 | ||
58 | /* cache of various info for TCP sockets */ | 58 | /* cache of various info for TCP sockets */ |
59 | void *sk_info_authunix; | 59 | void *sk_info_authunix; |
60 | |||
61 | struct sockaddr_storage sk_remote; /* remote peer's address */ | ||
62 | int sk_remotelen; /* length of address */ | ||
60 | }; | 63 | }; |
61 | 64 | ||
62 | /* | 65 | /* |
63 | * Function prototypes. | 66 | * Function prototypes. |
64 | */ | 67 | */ |
65 | int svc_makesock(struct svc_serv *, int, unsigned short); | 68 | int svc_makesock(struct svc_serv *, int, unsigned short, int flags); |
66 | void svc_delete_socket(struct svc_sock *); | 69 | void svc_close_socket(struct svc_sock *); |
67 | int svc_recv(struct svc_rqst *, long); | 70 | int svc_recv(struct svc_rqst *, long); |
68 | int svc_send(struct svc_rqst *); | 71 | int svc_send(struct svc_rqst *); |
69 | void svc_drop(struct svc_rqst *); | 72 | void svc_drop(struct svc_rqst *); |
@@ -74,4 +77,11 @@ int svc_addsock(struct svc_serv *serv, | |||
74 | char *name_return, | 77 | char *name_return, |
75 | int *proto); | 78 | int *proto); |
76 | 79 | ||
80 | /* | ||
81 | * svc_makesock socket characteristics | ||
82 | */ | ||
83 | #define SVC_SOCK_DEFAULTS (0U) | ||
84 | #define SVC_SOCK_ANONYMOUS (1U << 0) /* don't register with pmap */ | ||
85 | #define SVC_SOCK_TEMPORARY (1U << 1) /* flag socket as temporary */ | ||
86 | |||
77 | #endif /* SUNRPC_SVCSOCK_H */ | 87 | #endif /* SUNRPC_SVCSOCK_H */ |
diff --git a/include/linux/svga.h b/include/linux/svga.h new file mode 100644 index 0000000000..eadb981bb3 --- /dev/null +++ b/include/linux/svga.h | |||
@@ -0,0 +1,124 @@ | |||
1 | #ifndef _LINUX_SVGA_H | ||
2 | #define _LINUX_SVGA_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <linux/pci.h> | ||
7 | #include <video/vga.h> | ||
8 | |||
9 | /* Terminator for register set */ | ||
10 | |||
11 | #define VGA_REGSET_END_VAL 0xFF | ||
12 | #define VGA_REGSET_END {VGA_REGSET_END_VAL, 0, 0} | ||
13 | |||
14 | struct vga_regset { | ||
15 | u8 regnum; | ||
16 | u8 lowbit; | ||
17 | u8 highbit; | ||
18 | }; | ||
19 | |||
20 | /* ------------------------------------------------------------------------- */ | ||
21 | |||
22 | #define SVGA_FORMAT_END_VAL 0xFFFF | ||
23 | #define SVGA_FORMAT_END {SVGA_FORMAT_END_VAL, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, 0, 0, 0, 0, 0, 0} | ||
24 | |||
25 | struct svga_fb_format { | ||
26 | /* var part */ | ||
27 | u32 bits_per_pixel; | ||
28 | struct fb_bitfield red; | ||
29 | struct fb_bitfield green; | ||
30 | struct fb_bitfield blue; | ||
31 | struct fb_bitfield transp; | ||
32 | u32 nonstd; | ||
33 | /* fix part */ | ||
34 | u32 type; | ||
35 | u32 type_aux; | ||
36 | u32 visual; | ||
37 | u32 xpanstep; | ||
38 | u32 xresstep; | ||
39 | }; | ||
40 | |||
41 | struct svga_timing_regs { | ||
42 | const struct vga_regset *h_total_regs; | ||
43 | const struct vga_regset *h_display_regs; | ||
44 | const struct vga_regset *h_blank_start_regs; | ||
45 | const struct vga_regset *h_blank_end_regs; | ||
46 | const struct vga_regset *h_sync_start_regs; | ||
47 | const struct vga_regset *h_sync_end_regs; | ||
48 | |||
49 | const struct vga_regset *v_total_regs; | ||
50 | const struct vga_regset *v_display_regs; | ||
51 | const struct vga_regset *v_blank_start_regs; | ||
52 | const struct vga_regset *v_blank_end_regs; | ||
53 | const struct vga_regset *v_sync_start_regs; | ||
54 | const struct vga_regset *v_sync_end_regs; | ||
55 | }; | ||
56 | |||
57 | struct svga_pll { | ||
58 | u16 m_min; | ||
59 | u16 m_max; | ||
60 | u16 n_min; | ||
61 | u16 n_max; | ||
62 | u16 r_min; | ||
63 | u16 r_max; /* r_max < 32 */ | ||
64 | u32 f_vco_min; | ||
65 | u32 f_vco_max; | ||
66 | u32 f_base; | ||
67 | }; | ||
68 | |||
69 | |||
70 | /* Write a value to the attribute register */ | ||
71 | |||
72 | static inline void svga_wattr(u8 index, u8 data) | ||
73 | { | ||
74 | inb(0x3DA); | ||
75 | outb(index, 0x3C0); | ||
76 | outb(data, 0x3C0); | ||
77 | } | ||
78 | |||
79 | /* Write a value to a sequence register with a mask */ | ||
80 | |||
81 | static inline void svga_wseq_mask(u8 index, u8 data, u8 mask) | ||
82 | { | ||
83 | vga_wseq(NULL, index, (data & mask) | (vga_rseq(NULL, index) & ~mask)); | ||
84 | } | ||
85 | |||
86 | /* Write a value to a CRT register with a mask */ | ||
87 | |||
88 | static inline void svga_wcrt_mask(u8 index, u8 data, u8 mask) | ||
89 | { | ||
90 | vga_wcrt(NULL, index, (data & mask) | (vga_rcrt(NULL, index) & ~mask)); | ||
91 | } | ||
92 | |||
93 | static inline int svga_primary_device(struct pci_dev *dev) | ||
94 | { | ||
95 | u16 flags; | ||
96 | pci_read_config_word(dev, PCI_COMMAND, &flags); | ||
97 | return (flags & PCI_COMMAND_IO); | ||
98 | } | ||
99 | |||
100 | |||
101 | void svga_wcrt_multi(const struct vga_regset *regset, u32 value); | ||
102 | void svga_wseq_multi(const struct vga_regset *regset, u32 value); | ||
103 | |||
104 | void svga_set_default_gfx_regs(void); | ||
105 | void svga_set_default_atc_regs(void); | ||
106 | void svga_set_default_seq_regs(void); | ||
107 | void svga_set_default_crt_regs(void); | ||
108 | void svga_set_textmode_vga_regs(void); | ||
109 | |||
110 | void svga_settile(struct fb_info *info, struct fb_tilemap *map); | ||
111 | void svga_tilecopy(struct fb_info *info, struct fb_tilearea *area); | ||
112 | void svga_tilefill(struct fb_info *info, struct fb_tilerect *rect); | ||
113 | void svga_tileblit(struct fb_info *info, struct fb_tileblit *blit); | ||
114 | void svga_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor); | ||
115 | |||
116 | int svga_compute_pll(const struct svga_pll *pll, u32 f_wanted, u16 *m, u16 *n, u16 *r, int node); | ||
117 | int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node); | ||
118 | void svga_set_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, u32 hmul, u32 hdiv, u32 vmul, u32 vdiv, u32 hborder, int node); | ||
119 | |||
120 | int svga_match_format(const struct svga_fb_format *frm, struct fb_var_screeninfo *var, struct fb_fix_screeninfo *fix); | ||
121 | |||
122 | #endif /* __KERNEL__ */ | ||
123 | #endif /* _LINUX_SVGA_H */ | ||
124 | |||
diff --git a/include/linux/swap.h b/include/linux/swap.h index 5423559a44..0068688813 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -170,11 +170,13 @@ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct * | |||
170 | extern unsigned long totalram_pages; | 170 | extern unsigned long totalram_pages; |
171 | extern unsigned long totalreserve_pages; | 171 | extern unsigned long totalreserve_pages; |
172 | extern long nr_swap_pages; | 172 | extern long nr_swap_pages; |
173 | extern unsigned int nr_free_pages(void); | ||
174 | extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat); | ||
175 | extern unsigned int nr_free_buffer_pages(void); | 173 | extern unsigned int nr_free_buffer_pages(void); |
176 | extern unsigned int nr_free_pagecache_pages(void); | 174 | extern unsigned int nr_free_pagecache_pages(void); |
177 | 175 | ||
176 | /* Definition of global_page_state not available yet */ | ||
177 | #define nr_free_pages() global_page_state(NR_FREE_PAGES) | ||
178 | |||
179 | |||
178 | /* linux/mm/swap.c */ | 180 | /* linux/mm/swap.c */ |
179 | extern void FASTCALL(lru_cache_add(struct page *)); | 181 | extern void FASTCALL(lru_cache_add(struct page *)); |
180 | extern void FASTCALL(lru_cache_add_active(struct page *)); | 182 | extern void FASTCALL(lru_cache_add_active(struct page *)); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 81480e6134..665412c4f4 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -699,7 +699,8 @@ enum { | |||
699 | NET_X25_CALL_REQUEST_TIMEOUT=2, | 699 | NET_X25_CALL_REQUEST_TIMEOUT=2, |
700 | NET_X25_RESET_REQUEST_TIMEOUT=3, | 700 | NET_X25_RESET_REQUEST_TIMEOUT=3, |
701 | NET_X25_CLEAR_REQUEST_TIMEOUT=4, | 701 | NET_X25_CLEAR_REQUEST_TIMEOUT=4, |
702 | NET_X25_ACK_HOLD_BACK_TIMEOUT=5 | 702 | NET_X25_ACK_HOLD_BACK_TIMEOUT=5, |
703 | NET_X25_FORWARD=6 | ||
703 | }; | 704 | }; |
704 | 705 | ||
705 | /* /proc/sys/net/token-ring */ | 706 | /* /proc/sys/net/token-ring */ |
diff --git a/include/linux/tc.h b/include/linux/tc.h new file mode 100644 index 0000000000..f92511e57c --- /dev/null +++ b/include/linux/tc.h | |||
@@ -0,0 +1,141 @@ | |||
1 | /* | ||
2 | * Interface to the TURBOchannel related routines. | ||
3 | * | ||
4 | * Copyright (c) 1998 Harald Koerfgen | ||
5 | * Copyright (c) 2005 James Simmons | ||
6 | * Copyright (c) 2006 Maciej W. Rozycki | ||
7 | * | ||
8 | * Based on: | ||
9 | * | ||
10 | * "TURBOchannel Firmware Specification", EK-TCAAD-FS-004 | ||
11 | * | ||
12 | * from Digital Equipment Corporation. | ||
13 | * | ||
14 | * This file is subject to the terms and conditions of the GNU | ||
15 | * General Public License. See the file "COPYING" in the main | ||
16 | * directory of this archive for more details. | ||
17 | */ | ||
18 | #ifndef _LINUX_TC_H | ||
19 | #define _LINUX_TC_H | ||
20 | |||
21 | #include <linux/compiler.h> | ||
22 | #include <linux/device.h> | ||
23 | #include <linux/ioport.h> | ||
24 | #include <linux/types.h> | ||
25 | |||
26 | /* | ||
27 | * Offsets for the ROM header locations for TURBOchannel cards. | ||
28 | */ | ||
29 | #define TC_OLDCARD 0x3c0000 | ||
30 | #define TC_NEWCARD 0x000000 | ||
31 | |||
32 | #define TC_ROM_WIDTH 0x3e0 | ||
33 | #define TC_ROM_STRIDE 0x3e4 | ||
34 | #define TC_ROM_SIZE 0x3e8 | ||
35 | #define TC_SLOT_SIZE 0x3ec | ||
36 | #define TC_PATTERN0 0x3f0 | ||
37 | #define TC_PATTERN1 0x3f4 | ||
38 | #define TC_PATTERN2 0x3f8 | ||
39 | #define TC_PATTERN3 0x3fc | ||
40 | #define TC_FIRM_VER 0x400 | ||
41 | #define TC_VENDOR 0x420 | ||
42 | #define TC_MODULE 0x440 | ||
43 | #define TC_FIRM_TYPE 0x460 | ||
44 | #define TC_FLAGS 0x470 | ||
45 | #define TC_ROM_OBJECTS 0x480 | ||
46 | |||
47 | /* | ||
48 | * Information obtained through the get_tcinfo() PROM call. | ||
49 | */ | ||
50 | struct tcinfo { | ||
51 | s32 revision; /* Hardware revision level. */ | ||
52 | s32 clk_period; /* Clock period in nanoseconds. */ | ||
53 | s32 slot_size; /* Slot size in megabytes. */ | ||
54 | s32 io_timeout; /* I/O timeout in cycles. */ | ||
55 | s32 dma_range; /* DMA address range in megabytes. */ | ||
56 | s32 max_dma_burst; /* Maximum DMA burst length. */ | ||
57 | s32 parity; /* System module supports TC parity. */ | ||
58 | s32 reserved[4]; | ||
59 | }; | ||
60 | |||
61 | /* | ||
62 | * TURBOchannel bus. | ||
63 | */ | ||
64 | struct tc_bus { | ||
65 | struct list_head devices; /* List of devices on this bus. */ | ||
66 | struct resource resource[2]; /* Address space routed to this bus. */ | ||
67 | |||
68 | struct device dev; | ||
69 | char name[13]; | ||
70 | resource_size_t slot_base; | ||
71 | resource_size_t ext_slot_base; | ||
72 | resource_size_t ext_slot_size; | ||
73 | int num_tcslots; | ||
74 | struct tcinfo info; | ||
75 | }; | ||
76 | |||
77 | /* | ||
78 | * TURBOchannel device. | ||
79 | */ | ||
80 | struct tc_dev { | ||
81 | struct list_head node; /* Node in list of all TC devices. */ | ||
82 | struct tc_bus *bus; /* Bus this device is on. */ | ||
83 | struct tc_driver *driver; /* Which driver has allocated this | ||
84 | device. */ | ||
85 | struct device dev; /* Generic device interface. */ | ||
86 | struct resource resource; /* Address space of this device. */ | ||
87 | char vendor[9]; | ||
88 | char name[9]; | ||
89 | char firmware[9]; | ||
90 | int interrupt; | ||
91 | int slot; | ||
92 | }; | ||
93 | |||
94 | #define to_tc_dev(n) container_of(n, struct tc_dev, dev) | ||
95 | |||
96 | struct tc_device_id { | ||
97 | char vendor[9]; | ||
98 | char name[9]; | ||
99 | }; | ||
100 | |||
101 | /* | ||
102 | * TURBOchannel driver. | ||
103 | */ | ||
104 | struct tc_driver { | ||
105 | struct list_head node; | ||
106 | const struct tc_device_id *id_table; | ||
107 | struct device_driver driver; | ||
108 | }; | ||
109 | |||
110 | #define to_tc_driver(drv) container_of(drv, struct tc_driver, driver) | ||
111 | |||
112 | /* | ||
113 | * Return TURBOchannel clock frequency in Hz. | ||
114 | */ | ||
115 | static inline unsigned long tc_get_speed(struct tc_bus *tbus) | ||
116 | { | ||
117 | return 100000 * (10000 / (unsigned long)tbus->info.clk_period); | ||
118 | } | ||
119 | |||
120 | #ifdef CONFIG_TC | ||
121 | |||
122 | extern struct bus_type tc_bus_type; | ||
123 | |||
124 | extern int tc_register_driver(struct tc_driver *tdrv); | ||
125 | extern void tc_unregister_driver(struct tc_driver *tdrv); | ||
126 | |||
127 | #else /* !CONFIG_TC */ | ||
128 | |||
129 | static inline int tc_register_driver(struct tc_driver *tdrv) { return 0; } | ||
130 | static inline void tc_unregister_driver(struct tc_driver *tdrv) { } | ||
131 | |||
132 | #endif /* CONFIG_TC */ | ||
133 | |||
134 | /* | ||
135 | * These have to be provided by the architecture. | ||
136 | */ | ||
137 | extern int tc_preadb(u8 *valp, void __iomem *addr); | ||
138 | extern int tc_bus_get_info(struct tc_bus *tbus); | ||
139 | extern void tc_device_get_irq(struct tc_dev *tdev); | ||
140 | |||
141 | #endif /* _LINUX_TC_H */ | ||
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 3cc70d1a35..29d3089038 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -316,7 +316,7 @@ struct tcp_sock { | |||
316 | struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ | 316 | struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ |
317 | struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ | 317 | struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ |
318 | 318 | ||
319 | struct tcp_sack_block recv_sack_cache[4]; | 319 | struct tcp_sack_block_wire recv_sack_cache[4]; |
320 | 320 | ||
321 | /* from STCP, retrans queue hinting */ | 321 | /* from STCP, retrans queue hinting */ |
322 | struct sk_buff* lost_skb_hint; | 322 | struct sk_buff* lost_skb_hint; |
diff --git a/include/linux/time.h b/include/linux/time.h index a5b739967b..55cee172d7 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -46,7 +46,7 @@ static inline int timespec_equal(struct timespec *a, struct timespec *b) | |||
46 | * lhs == rhs: return 0 | 46 | * lhs == rhs: return 0 |
47 | * lhs > rhs: return >0 | 47 | * lhs > rhs: return >0 |
48 | */ | 48 | */ |
49 | static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) | 49 | static inline int timespec_compare(const struct timespec *lhs, const struct timespec *rhs) |
50 | { | 50 | { |
51 | if (lhs->tv_sec < rhs->tv_sec) | 51 | if (lhs->tv_sec < rhs->tv_sec) |
52 | return -1; | 52 | return -1; |
@@ -55,7 +55,7 @@ static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) | |||
55 | return lhs->tv_nsec - rhs->tv_nsec; | 55 | return lhs->tv_nsec - rhs->tv_nsec; |
56 | } | 56 | } |
57 | 57 | ||
58 | static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs) | 58 | static inline int timeval_compare(const struct timeval *lhs, const struct timeval *rhs) |
59 | { | 59 | { |
60 | if (lhs->tv_sec < rhs->tv_sec) | 60 | if (lhs->tv_sec < rhs->tv_sec) |
61 | return -1; | 61 | return -1; |
diff --git a/include/linux/timex.h b/include/linux/timex.h index db501dc23c..9a24e500c3 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -255,10 +255,10 @@ struct time_interpolator { | |||
255 | u8 jitter; /* if set compensate for fluctuations */ | 255 | u8 jitter; /* if set compensate for fluctuations */ |
256 | u32 nsec_per_cyc; /* set by register_time_interpolator() */ | 256 | u32 nsec_per_cyc; /* set by register_time_interpolator() */ |
257 | void *addr; /* address of counter or function */ | 257 | void *addr; /* address of counter or function */ |
258 | u64 mask; /* mask the valid bits of the counter */ | 258 | cycles_t mask; /* mask the valid bits of the counter */ |
259 | unsigned long offset; /* nsec offset at last update of interpolator */ | 259 | unsigned long offset; /* nsec offset at last update of interpolator */ |
260 | u64 last_counter; /* counter value in units of the counter at last update */ | 260 | u64 last_counter; /* counter value in units of the counter at last update */ |
261 | u64 last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ | 261 | cycles_t last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ |
262 | u64 frequency; /* frequency in counts/second */ | 262 | u64 frequency; /* frequency in counts/second */ |
263 | long drift; /* drift in parts-per-million (or -1) */ | 263 | long drift; /* drift in parts-per-million (or -1) */ |
264 | unsigned long skips; /* skips forward */ | 264 | unsigned long skips; /* skips forward */ |
diff --git a/include/linux/toshiba.h b/include/linux/toshiba.h index 916e5e3a69..6a7c4edf0e 100644 --- a/include/linux/toshiba.h +++ b/include/linux/toshiba.h | |||
@@ -33,4 +33,6 @@ typedef struct { | |||
33 | unsigned int edi __attribute__ ((packed)); | 33 | unsigned int edi __attribute__ ((packed)); |
34 | } SMMRegisters; | 34 | } SMMRegisters; |
35 | 35 | ||
36 | int tosh_smm(SMMRegisters *regs); | ||
37 | |||
36 | #endif | 38 | #endif |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 65cbcf22c3..dee72b9a20 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -24,7 +24,27 @@ | |||
24 | #define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */ | 24 | #define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */ |
25 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ | 25 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ |
26 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ | 26 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ |
27 | #define NR_LDISCS 16 | 27 | #define NR_LDISCS 17 |
28 | |||
29 | /* line disciplines */ | ||
30 | #define N_TTY 0 | ||
31 | #define N_SLIP 1 | ||
32 | #define N_MOUSE 2 | ||
33 | #define N_PPP 3 | ||
34 | #define N_STRIP 4 | ||
35 | #define N_AX25 5 | ||
36 | #define N_X25 6 /* X.25 async */ | ||
37 | #define N_6PACK 7 | ||
38 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
39 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
40 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
41 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
42 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ | ||
43 | /* cards about SMS messages */ | ||
44 | #define N_HDLC 13 /* synchronous HDLC */ | ||
45 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
46 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
47 | #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ | ||
28 | 48 | ||
29 | /* | 49 | /* |
30 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 50 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
@@ -177,8 +197,8 @@ struct tty_struct { | |||
177 | struct mutex termios_mutex; | 197 | struct mutex termios_mutex; |
178 | struct ktermios *termios, *termios_locked; | 198 | struct ktermios *termios, *termios_locked; |
179 | char name[64]; | 199 | char name[64]; |
180 | int pgrp; | 200 | struct pid *pgrp; |
181 | int session; | 201 | struct pid *session; |
182 | unsigned long flags; | 202 | unsigned long flags; |
183 | int count; | 203 | int count; |
184 | struct winsize winsize; | 204 | struct winsize winsize; |
@@ -283,7 +303,7 @@ extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, | |||
283 | int buflen); | 303 | int buflen); |
284 | extern void tty_write_message(struct tty_struct *tty, char *msg); | 304 | extern void tty_write_message(struct tty_struct *tty, char *msg); |
285 | 305 | ||
286 | extern int is_orphaned_pgrp(int pgrp); | 306 | extern int is_current_pgrp_orphaned(void); |
287 | extern int is_ignored(int sig); | 307 | extern int is_ignored(int sig); |
288 | extern int tty_signal(int sig, struct tty_struct *tty); | 308 | extern int tty_signal(int sig, struct tty_struct *tty); |
289 | extern void tty_hangup(struct tty_struct * tty); | 309 | extern void tty_hangup(struct tty_struct * tty); |
@@ -291,6 +311,7 @@ extern void tty_vhangup(struct tty_struct * tty); | |||
291 | extern void tty_unhangup(struct file *filp); | 311 | extern void tty_unhangup(struct file *filp); |
292 | extern int tty_hung_up_p(struct file * filp); | 312 | extern int tty_hung_up_p(struct file * filp); |
293 | extern void do_SAK(struct tty_struct *tty); | 313 | extern void do_SAK(struct tty_struct *tty); |
314 | extern void __do_SAK(struct tty_struct *tty); | ||
294 | extern void disassociate_ctty(int priv); | 315 | extern void disassociate_ctty(int priv); |
295 | extern void tty_flip_buffer_push(struct tty_struct *tty); | 316 | extern void tty_flip_buffer_push(struct tty_struct *tty); |
296 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); | 317 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); |
@@ -312,7 +333,6 @@ extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
312 | 333 | ||
313 | extern dev_t tty_devnum(struct tty_struct *tty); | 334 | extern dev_t tty_devnum(struct tty_struct *tty); |
314 | extern void proc_clear_tty(struct task_struct *p); | 335 | extern void proc_clear_tty(struct task_struct *p); |
315 | extern void __proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); | ||
316 | extern void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); | 336 | extern void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); |
317 | extern struct tty_struct *get_current_tty(void); | 337 | extern struct tty_struct *get_current_tty(void); |
318 | 338 | ||
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 28967eda9d..dc2e9fe694 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h | |||
@@ -40,13 +40,16 @@ typedef __u64 __fs64; | |||
40 | typedef __u32 __fs32; | 40 | typedef __u32 __fs32; |
41 | typedef __u16 __fs16; | 41 | typedef __u16 __fs16; |
42 | #else | 42 | #else |
43 | #include <asm/div64.h> | ||
43 | typedef __u64 __bitwise __fs64; | 44 | typedef __u64 __bitwise __fs64; |
44 | typedef __u32 __bitwise __fs32; | 45 | typedef __u32 __bitwise __fs32; |
45 | typedef __u16 __bitwise __fs16; | 46 | typedef __u16 __bitwise __fs16; |
46 | #endif | 47 | #endif |
47 | 48 | ||
49 | #ifdef __KERNEL__ | ||
48 | #include <linux/ufs_fs_i.h> | 50 | #include <linux/ufs_fs_i.h> |
49 | #include <linux/ufs_fs_sb.h> | 51 | #include <linux/ufs_fs_sb.h> |
52 | #endif | ||
50 | 53 | ||
51 | #define UFS_BBLOCK 0 | 54 | #define UFS_BBLOCK 0 |
52 | #define UFS_BBSIZE 8192 | 55 | #define UFS_BBSIZE 8192 |
@@ -261,17 +264,10 @@ typedef __u16 __bitwise __fs16; | |||
261 | */ | 264 | */ |
262 | #define ufs_inotocg(x) ((x) / uspi->s_ipg) | 265 | #define ufs_inotocg(x) ((x) / uspi->s_ipg) |
263 | #define ufs_inotocgoff(x) ((x) % uspi->s_ipg) | 266 | #define ufs_inotocgoff(x) ((x) % uspi->s_ipg) |
264 | #define ufs_inotofsba(x) (ufs_cgimin(ufs_inotocg(x)) + ufs_inotocgoff(x) / uspi->s_inopf) | 267 | #define ufs_inotofsba(x) (((u64)ufs_cgimin(ufs_inotocg(x))) + ufs_inotocgoff(x) / uspi->s_inopf) |
265 | #define ufs_inotofsbo(x) ((x) % uspi->s_inopf) | 268 | #define ufs_inotofsbo(x) ((x) % uspi->s_inopf) |
266 | 269 | ||
267 | /* | 270 | /* |
268 | * Give cylinder group number for a file system block. | ||
269 | * Give cylinder group block number for a file system block. | ||
270 | */ | ||
271 | #define ufs_dtog(d) ((d) / uspi->s_fpg) | ||
272 | #define ufs_dtogd(d) ((d) % uspi->s_fpg) | ||
273 | |||
274 | /* | ||
275 | * Compute the cylinder and rotational position of a cyl block addr. | 271 | * Compute the cylinder and rotational position of a cyl block addr. |
276 | */ | 272 | */ |
277 | #define ufs_cbtocylno(bno) \ | 273 | #define ufs_cbtocylno(bno) \ |
@@ -303,7 +299,7 @@ typedef __u16 __bitwise __fs16; | |||
303 | #define UFS_MAXMNTLEN 512 | 299 | #define UFS_MAXMNTLEN 512 |
304 | #define UFS2_MAXMNTLEN 468 | 300 | #define UFS2_MAXMNTLEN 468 |
305 | #define UFS2_MAXVOLLEN 32 | 301 | #define UFS2_MAXVOLLEN 32 |
306 | /* #define UFS_MAXCSBUFS 31 */ | 302 | #define UFS_MAXCSBUFS 31 |
307 | #define UFS_LINK_MAX 32000 | 303 | #define UFS_LINK_MAX 32000 |
308 | /* | 304 | /* |
309 | #define UFS2_NOCSPTRS ((128 / sizeof(void *)) - 4) | 305 | #define UFS2_NOCSPTRS ((128 / sizeof(void *)) - 4) |
@@ -721,6 +717,7 @@ struct ufs_cg_private_info { | |||
721 | __u32 c_nclusterblks; /* number of clusters this cg */ | 717 | __u32 c_nclusterblks; /* number of clusters this cg */ |
722 | }; | 718 | }; |
723 | 719 | ||
720 | |||
724 | struct ufs_sb_private_info { | 721 | struct ufs_sb_private_info { |
725 | struct ufs_buffer_head s_ubh; /* buffer containing super block */ | 722 | struct ufs_buffer_head s_ubh; /* buffer containing super block */ |
726 | struct ufs_csum_core cs_total; | 723 | struct ufs_csum_core cs_total; |
@@ -754,7 +751,7 @@ struct ufs_sb_private_info { | |||
754 | __u32 s_npsect; /* # sectors/track including spares */ | 751 | __u32 s_npsect; /* # sectors/track including spares */ |
755 | __u32 s_interleave; /* hardware sector interleave */ | 752 | __u32 s_interleave; /* hardware sector interleave */ |
756 | __u32 s_trackskew; /* sector 0 skew, per track */ | 753 | __u32 s_trackskew; /* sector 0 skew, per track */ |
757 | __u32 s_csaddr; /* blk addr of cyl grp summary area */ | 754 | __u64 s_csaddr; /* blk addr of cyl grp summary area */ |
758 | __u32 s_cssize; /* size of cyl grp summary area */ | 755 | __u32 s_cssize; /* size of cyl grp summary area */ |
759 | __u32 s_cgsize; /* cylinder group size */ | 756 | __u32 s_cgsize; /* cylinder group size */ |
760 | __u32 s_ntrak; /* tracks per cylinder */ | 757 | __u32 s_ntrak; /* tracks per cylinder */ |
@@ -789,6 +786,7 @@ struct ufs_sb_private_info { | |||
789 | 786 | ||
790 | __u32 s_maxsymlinklen;/* upper limit on fast symlinks' size */ | 787 | __u32 s_maxsymlinklen;/* upper limit on fast symlinks' size */ |
791 | __s32 fs_magic; /* filesystem magic */ | 788 | __s32 fs_magic; /* filesystem magic */ |
789 | unsigned int s_dirblksize; | ||
792 | }; | 790 | }; |
793 | 791 | ||
794 | /* | 792 | /* |
@@ -949,17 +947,17 @@ struct ufs_super_block_third { | |||
949 | #ifdef __KERNEL__ | 947 | #ifdef __KERNEL__ |
950 | 948 | ||
951 | /* balloc.c */ | 949 | /* balloc.c */ |
952 | extern void ufs_free_fragments (struct inode *, unsigned, unsigned); | 950 | extern void ufs_free_fragments (struct inode *, u64, unsigned); |
953 | extern void ufs_free_blocks (struct inode *, unsigned, unsigned); | 951 | extern void ufs_free_blocks (struct inode *, u64, unsigned); |
954 | extern unsigned ufs_new_fragments(struct inode *, __fs32 *, unsigned, unsigned, | 952 | extern u64 ufs_new_fragments(struct inode *, void *, u64, u64, |
955 | unsigned, int *, struct page *); | 953 | unsigned, int *, struct page *); |
956 | 954 | ||
957 | /* cylinder.c */ | 955 | /* cylinder.c */ |
958 | extern struct ufs_cg_private_info * ufs_load_cylinder (struct super_block *, unsigned); | 956 | extern struct ufs_cg_private_info * ufs_load_cylinder (struct super_block *, unsigned); |
959 | extern void ufs_put_cylinder (struct super_block *, unsigned); | 957 | extern void ufs_put_cylinder (struct super_block *, unsigned); |
960 | 958 | ||
961 | /* dir.c */ | 959 | /* dir.c */ |
962 | extern struct inode_operations ufs_dir_inode_operations; | 960 | extern const struct inode_operations ufs_dir_inode_operations; |
963 | extern int ufs_add_link (struct dentry *, struct inode *); | 961 | extern int ufs_add_link (struct dentry *, struct inode *); |
964 | extern ino_t ufs_inode_by_name(struct inode *, struct dentry *); | 962 | extern ino_t ufs_inode_by_name(struct inode *, struct dentry *); |
965 | extern int ufs_make_empty(struct inode *, struct inode *); | 963 | extern int ufs_make_empty(struct inode *, struct inode *); |
@@ -971,7 +969,7 @@ extern void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de, | |||
971 | struct page *page, struct inode *inode); | 969 | struct page *page, struct inode *inode); |
972 | 970 | ||
973 | /* file.c */ | 971 | /* file.c */ |
974 | extern struct inode_operations ufs_file_inode_operations; | 972 | extern const struct inode_operations ufs_file_inode_operations; |
975 | extern const struct file_operations ufs_file_operations; | 973 | extern const struct file_operations ufs_file_operations; |
976 | 974 | ||
977 | extern const struct address_space_operations ufs_aops; | 975 | extern const struct address_space_operations ufs_aops; |
@@ -998,7 +996,7 @@ extern void ufs_error (struct super_block *, const char *, const char *, ...) __ | |||
998 | extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); | 996 | extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); |
999 | 997 | ||
1000 | /* symlink.c */ | 998 | /* symlink.c */ |
1001 | extern struct inode_operations ufs_fast_symlink_inode_operations; | 999 | extern const struct inode_operations ufs_fast_symlink_inode_operations; |
1002 | 1000 | ||
1003 | /* truncate.c */ | 1001 | /* truncate.c */ |
1004 | extern int ufs_truncate (struct inode *, loff_t); | 1002 | extern int ufs_truncate (struct inode *, loff_t); |
@@ -1013,6 +1011,22 @@ static inline struct ufs_inode_info *UFS_I(struct inode *inode) | |||
1013 | return container_of(inode, struct ufs_inode_info, vfs_inode); | 1011 | return container_of(inode, struct ufs_inode_info, vfs_inode); |
1014 | } | 1012 | } |
1015 | 1013 | ||
1014 | /* | ||
1015 | * Give cylinder group number for a file system block. | ||
1016 | * Give cylinder group block number for a file system block. | ||
1017 | */ | ||
1018 | /* #define ufs_dtog(d) ((d) / uspi->s_fpg) */ | ||
1019 | static inline u64 ufs_dtog(struct ufs_sb_private_info * uspi, u64 b) | ||
1020 | { | ||
1021 | do_div(b, uspi->s_fpg); | ||
1022 | return b; | ||
1023 | } | ||
1024 | /* #define ufs_dtogd(d) ((d) % uspi->s_fpg) */ | ||
1025 | static inline u32 ufs_dtogd(struct ufs_sb_private_info * uspi, u64 b) | ||
1026 | { | ||
1027 | return do_div(b, uspi->s_fpg); | ||
1028 | } | ||
1029 | |||
1016 | #endif /* __KERNEL__ */ | 1030 | #endif /* __KERNEL__ */ |
1017 | 1031 | ||
1018 | #endif /* __LINUX_UFS_FS_H */ | 1032 | #endif /* __LINUX_UFS_FS_H */ |
diff --git a/include/linux/ufs_fs_i.h b/include/linux/ufs_fs_i.h index f50ce3b0cd..6496caa82f 100644 --- a/include/linux/ufs_fs_i.h +++ b/include/linux/ufs_fs_i.h | |||
@@ -20,13 +20,12 @@ struct ufs_inode_info { | |||
20 | __fs64 u2_i_data[15]; | 20 | __fs64 u2_i_data[15]; |
21 | } i_u1; | 21 | } i_u1; |
22 | __u32 i_flags; | 22 | __u32 i_flags; |
23 | __u32 i_gen; | ||
24 | __u32 i_shadow; | 23 | __u32 i_shadow; |
25 | __u32 i_unused1; | 24 | __u32 i_unused1; |
26 | __u32 i_unused2; | 25 | __u32 i_unused2; |
27 | __u32 i_oeftflag; | 26 | __u32 i_oeftflag; |
28 | __u16 i_osync; | 27 | __u16 i_osync; |
29 | __u32 i_lastfrag; | 28 | __u64 i_lastfrag; |
30 | __u32 i_dir_start_lookup; | 29 | __u32 i_dir_start_lookup; |
31 | struct inode vfs_inode; | 30 | struct inode vfs_inode; |
32 | }; | 31 | }; |
diff --git a/include/linux/ufs_fs_sb.h b/include/linux/ufs_fs_sb.h index 8ff13c160f..e114c93fc5 100644 --- a/include/linux/ufs_fs_sb.h +++ b/include/linux/ufs_fs_sb.h | |||
@@ -21,7 +21,6 @@ | |||
21 | struct ufs_sb_private_info; | 21 | struct ufs_sb_private_info; |
22 | struct ufs_cg_private_info; | 22 | struct ufs_cg_private_info; |
23 | struct ufs_csum; | 23 | struct ufs_csum; |
24 | #define UFS_MAXCSBUFS 31 | ||
25 | 24 | ||
26 | struct ufs_sb_info { | 25 | struct ufs_sb_info { |
27 | struct ufs_sb_private_info * s_uspi; | 26 | struct ufs_sb_private_info * s_uspi; |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 5e9803ed17..acb1f10587 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -3,20 +3,15 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
6 | #include <linux/mm.h> | ||
6 | #include <linux/mmzone.h> | 7 | #include <linux/mmzone.h> |
7 | #include <asm/atomic.h> | 8 | #include <asm/atomic.h> |
8 | 9 | ||
9 | #ifdef CONFIG_VM_EVENT_COUNTERS | 10 | #ifdef CONFIG_ZONE_DMA |
10 | /* | 11 | #define DMA_ZONE(xx) xx##_DMA, |
11 | * Light weight per cpu counter implementation. | 12 | #else |
12 | * | 13 | #define DMA_ZONE(xx) |
13 | * Counters should only be incremented. You need to set EMBEDDED | 14 | #endif |
14 | * to disable VM_EVENT_COUNTERS. Things like procps (vmstat, | ||
15 | * top, etc) use /proc/vmstat and depend on these counters. | ||
16 | * | ||
17 | * Counters are handled completely inline. On many platforms the code | ||
18 | * generated will simply be the increment of a global address. | ||
19 | */ | ||
20 | 15 | ||
21 | #ifdef CONFIG_ZONE_DMA32 | 16 | #ifdef CONFIG_ZONE_DMA32 |
22 | #define DMA32_ZONE(xx) xx##_DMA32, | 17 | #define DMA32_ZONE(xx) xx##_DMA32, |
@@ -30,7 +25,7 @@ | |||
30 | #define HIGHMEM_ZONE(xx) | 25 | #define HIGHMEM_ZONE(xx) |
31 | #endif | 26 | #endif |
32 | 27 | ||
33 | #define FOR_ALL_ZONES(xx) xx##_DMA, DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) | 28 | #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) |
34 | 29 | ||
35 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | 30 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, |
36 | FOR_ALL_ZONES(PGALLOC), | 31 | FOR_ALL_ZONES(PGALLOC), |
@@ -45,6 +40,17 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | |||
45 | NR_VM_EVENT_ITEMS | 40 | NR_VM_EVENT_ITEMS |
46 | }; | 41 | }; |
47 | 42 | ||
43 | #ifdef CONFIG_VM_EVENT_COUNTERS | ||
44 | /* | ||
45 | * Light weight per cpu counter implementation. | ||
46 | * | ||
47 | * Counters should only be incremented and no critical kernel component | ||
48 | * should rely on the counter values. | ||
49 | * | ||
50 | * Counters are handled completely inline. On many platforms the code | ||
51 | * generated will simply be the increment of a global address. | ||
52 | */ | ||
53 | |||
48 | struct vm_event_state { | 54 | struct vm_event_state { |
49 | unsigned long event[NR_VM_EVENT_ITEMS]; | 55 | unsigned long event[NR_VM_EVENT_ITEMS]; |
50 | }; | 56 | }; |
@@ -85,17 +91,30 @@ static inline void vm_events_fold_cpu(int cpu) | |||
85 | #else | 91 | #else |
86 | 92 | ||
87 | /* Disable counters */ | 93 | /* Disable counters */ |
88 | #define get_cpu_vm_events(e) 0L | 94 | static inline void count_vm_event(enum vm_event_item item) |
89 | #define count_vm_event(e) do { } while (0) | 95 | { |
90 | #define count_vm_events(e,d) do { } while (0) | 96 | } |
91 | #define __count_vm_event(e) do { } while (0) | 97 | static inline void count_vm_events(enum vm_event_item item, long delta) |
92 | #define __count_vm_events(e,d) do { } while (0) | 98 | { |
93 | #define vm_events_fold_cpu(x) do { } while (0) | 99 | } |
100 | static inline void __count_vm_event(enum vm_event_item item) | ||
101 | { | ||
102 | } | ||
103 | static inline void __count_vm_events(enum vm_event_item item, long delta) | ||
104 | { | ||
105 | } | ||
106 | static inline void all_vm_events(unsigned long *ret) | ||
107 | { | ||
108 | } | ||
109 | static inline void vm_events_fold_cpu(int cpu) | ||
110 | { | ||
111 | } | ||
94 | 112 | ||
95 | #endif /* CONFIG_VM_EVENT_COUNTERS */ | 113 | #endif /* CONFIG_VM_EVENT_COUNTERS */ |
96 | 114 | ||
97 | #define __count_zone_vm_events(item, zone, delta) \ | 115 | #define __count_zone_vm_events(item, zone, delta) \ |
98 | __count_vm_events(item##_DMA + zone_idx(zone), delta) | 116 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + \ |
117 | zone_idx(zone), delta) | ||
99 | 118 | ||
100 | /* | 119 | /* |
101 | * Zone based page accounting with per cpu differentials. | 120 | * Zone based page accounting with per cpu differentials. |
@@ -142,14 +161,16 @@ static inline unsigned long node_page_state(int node, | |||
142 | struct zone *zones = NODE_DATA(node)->node_zones; | 161 | struct zone *zones = NODE_DATA(node)->node_zones; |
143 | 162 | ||
144 | return | 163 | return |
164 | #ifdef CONFIG_ZONE_DMA | ||
165 | zone_page_state(&zones[ZONE_DMA], item) + | ||
166 | #endif | ||
145 | #ifdef CONFIG_ZONE_DMA32 | 167 | #ifdef CONFIG_ZONE_DMA32 |
146 | zone_page_state(&zones[ZONE_DMA32], item) + | 168 | zone_page_state(&zones[ZONE_DMA32], item) + |
147 | #endif | 169 | #endif |
148 | zone_page_state(&zones[ZONE_NORMAL], item) + | ||
149 | #ifdef CONFIG_HIGHMEM | 170 | #ifdef CONFIG_HIGHMEM |
150 | zone_page_state(&zones[ZONE_HIGHMEM], item) + | 171 | zone_page_state(&zones[ZONE_HIGHMEM], item) + |
151 | #endif | 172 | #endif |
152 | zone_page_state(&zones[ZONE_DMA], item); | 173 | zone_page_state(&zones[ZONE_NORMAL], item); |
153 | } | 174 | } |
154 | 175 | ||
155 | extern void zone_statistics(struct zonelist *, struct zone *); | 176 | extern void zone_statistics(struct zonelist *, struct zone *); |
@@ -186,6 +207,9 @@ void inc_zone_page_state(struct page *, enum zone_stat_item); | |||
186 | void dec_zone_page_state(struct page *, enum zone_stat_item); | 207 | void dec_zone_page_state(struct page *, enum zone_stat_item); |
187 | 208 | ||
188 | extern void inc_zone_state(struct zone *, enum zone_stat_item); | 209 | extern void inc_zone_state(struct zone *, enum zone_stat_item); |
210 | extern void __inc_zone_state(struct zone *, enum zone_stat_item); | ||
211 | extern void dec_zone_state(struct zone *, enum zone_stat_item); | ||
212 | extern void __dec_zone_state(struct zone *, enum zone_stat_item); | ||
189 | 213 | ||
190 | void refresh_cpu_vm_stats(int); | 214 | void refresh_cpu_vm_stats(int); |
191 | void refresh_vm_stats(void); | 215 | void refresh_vm_stats(void); |
@@ -214,6 +238,12 @@ static inline void __inc_zone_page_state(struct page *page, | |||
214 | __inc_zone_state(page_zone(page), item); | 238 | __inc_zone_state(page_zone(page), item); |
215 | } | 239 | } |
216 | 240 | ||
241 | static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item) | ||
242 | { | ||
243 | atomic_long_dec(&zone->vm_stat[item]); | ||
244 | atomic_long_dec(&vm_stat[item]); | ||
245 | } | ||
246 | |||
217 | static inline void __dec_zone_page_state(struct page *page, | 247 | static inline void __dec_zone_page_state(struct page *page, |
218 | enum zone_stat_item item) | 248 | enum zone_stat_item item) |
219 | { | 249 | { |
diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h index 2cd05013ed..3add87465b 100644 --- a/include/linux/wanrouter.h +++ b/include/linux/wanrouter.h | |||
@@ -516,9 +516,6 @@ struct wan_device { | |||
516 | /* Public functions available for device drivers */ | 516 | /* Public functions available for device drivers */ |
517 | extern int register_wan_device(struct wan_device *wandev); | 517 | extern int register_wan_device(struct wan_device *wandev); |
518 | extern int unregister_wan_device(char *name); | 518 | extern int unregister_wan_device(char *name); |
519 | __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev); | ||
520 | int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev, | ||
521 | unsigned short type); | ||
522 | 519 | ||
523 | /* Proc interface functions. These must not be called by the drivers! */ | 520 | /* Proc interface functions. These must not be called by the drivers! */ |
524 | extern int wanrouter_proc_init(void); | 521 | extern int wanrouter_proc_init(void); |
@@ -527,11 +524,6 @@ extern int wanrouter_proc_add(struct wan_device *wandev); | |||
527 | extern int wanrouter_proc_delete(struct wan_device *wandev); | 524 | extern int wanrouter_proc_delete(struct wan_device *wandev); |
528 | extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); | 525 | extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); |
529 | 526 | ||
530 | extern void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); | ||
531 | extern void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); | ||
532 | |||
533 | |||
534 | |||
535 | /* Public Data */ | 527 | /* Public Data */ |
536 | /* list of registered devices */ | 528 | /* list of registered devices */ |
537 | extern struct wan_device *wanrouter_router_devlist; | 529 | extern struct wan_device *wanrouter_router_devlist; |
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index 0e7f1e20ea..def131a5ac 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h | |||
@@ -13,6 +13,10 @@ | |||
13 | #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ | 13 | #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ |
14 | #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ | 14 | #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ |
15 | 15 | ||
16 | #ifdef __KERNEL__ | ||
17 | |||
18 | #include <linux/types.h> | ||
19 | |||
16 | /* Namespaces */ | 20 | /* Namespaces */ |
17 | #define XATTR_OS2_PREFIX "os2." | 21 | #define XATTR_OS2_PREFIX "os2." |
18 | #define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1) | 22 | #define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1) |
@@ -29,6 +33,8 @@ | |||
29 | #define XATTR_USER_PREFIX "user." | 33 | #define XATTR_USER_PREFIX "user." |
30 | #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) | 34 | #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) |
31 | 35 | ||
36 | struct inode; | ||
37 | struct dentry; | ||
32 | 38 | ||
33 | struct xattr_handler { | 39 | struct xattr_handler { |
34 | char *prefix; | 40 | char *prefix; |
@@ -50,4 +56,6 @@ ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_siz | |||
50 | int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags); | 56 | int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags); |
51 | int generic_removexattr(struct dentry *dentry, const char *name); | 57 | int generic_removexattr(struct dentry *dentry, const char *name); |
52 | 58 | ||
59 | #endif /* __KERNEL__ */ | ||
60 | |||
53 | #endif /* _LINUX_XATTR_H */ | 61 | #endif /* _LINUX_XATTR_H */ |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 9529ea1ae3..15ca89e996 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -178,6 +178,9 @@ enum { | |||
178 | XFRM_MSG_REPORT, | 178 | XFRM_MSG_REPORT, |
179 | #define XFRM_MSG_REPORT XFRM_MSG_REPORT | 179 | #define XFRM_MSG_REPORT XFRM_MSG_REPORT |
180 | 180 | ||
181 | XFRM_MSG_MIGRATE, | ||
182 | #define XFRM_MSG_MIGRATE XFRM_MSG_MIGRATE | ||
183 | |||
181 | __XFRM_MSG_MAX | 184 | __XFRM_MSG_MAX |
182 | }; | 185 | }; |
183 | #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) | 186 | #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) |
@@ -256,6 +259,7 @@ enum xfrm_attr_type_t { | |||
256 | XFRMA_COADDR, /* xfrm_address_t */ | 259 | XFRMA_COADDR, /* xfrm_address_t */ |
257 | XFRMA_LASTUSED, | 260 | XFRMA_LASTUSED, |
258 | XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */ | 261 | XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */ |
262 | XFRMA_MIGRATE, | ||
259 | __XFRMA_MAX | 263 | __XFRMA_MAX |
260 | 264 | ||
261 | #define XFRMA_MAX (__XFRMA_MAX - 1) | 265 | #define XFRMA_MAX (__XFRMA_MAX - 1) |
@@ -351,6 +355,19 @@ struct xfrm_user_report { | |||
351 | struct xfrm_selector sel; | 355 | struct xfrm_selector sel; |
352 | }; | 356 | }; |
353 | 357 | ||
358 | struct xfrm_user_migrate { | ||
359 | xfrm_address_t old_daddr; | ||
360 | xfrm_address_t old_saddr; | ||
361 | xfrm_address_t new_daddr; | ||
362 | xfrm_address_t new_saddr; | ||
363 | __u8 proto; | ||
364 | __u8 mode; | ||
365 | __u16 reserved; | ||
366 | __u32 reqid; | ||
367 | __u16 old_family; | ||
368 | __u16 new_family; | ||
369 | }; | ||
370 | |||
354 | #ifndef __KERNEL__ | 371 | #ifndef __KERNEL__ |
355 | /* backwards compatibility for userspace */ | 372 | /* backwards compatibility for userspace */ |
356 | #define XFRMGRP_ACQUIRE 1 | 373 | #define XFRMGRP_ACQUIRE 1 |
@@ -375,6 +392,8 @@ enum xfrm_nlgroups { | |||
375 | #define XFRMNLGRP_AEVENTS XFRMNLGRP_AEVENTS | 392 | #define XFRMNLGRP_AEVENTS XFRMNLGRP_AEVENTS |
376 | XFRMNLGRP_REPORT, | 393 | XFRMNLGRP_REPORT, |
377 | #define XFRMNLGRP_REPORT XFRMNLGRP_REPORT | 394 | #define XFRMNLGRP_REPORT XFRMNLGRP_REPORT |
395 | XFRMNLGRP_MIGRATE, | ||
396 | #define XFRMNLGRP_MIGRATE XFRMNLGRP_MIGRATE | ||
378 | __XFRMNLGRP_MAX | 397 | __XFRMNLGRP_MAX |
379 | }; | 398 | }; |
380 | #define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1) | 399 | #define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1) |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 5ae10dd2e3..47ff2f46e9 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -377,7 +377,7 @@ extern int ax25_check_iframes_acked(ax25_cb *, unsigned short); | |||
377 | /* ax25_route.c */ | 377 | /* ax25_route.c */ |
378 | extern void ax25_rt_device_down(struct net_device *); | 378 | extern void ax25_rt_device_down(struct net_device *); |
379 | extern int ax25_rt_ioctl(unsigned int, void __user *); | 379 | extern int ax25_rt_ioctl(unsigned int, void __user *); |
380 | extern struct file_operations ax25_route_fops; | 380 | extern const struct file_operations ax25_route_fops; |
381 | extern ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); | 381 | extern ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); |
382 | extern int ax25_rt_autobind(ax25_cb *, ax25_address *); | 382 | extern int ax25_rt_autobind(ax25_cb *, ax25_address *); |
383 | extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *); | 383 | extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *); |
@@ -430,7 +430,7 @@ extern unsigned long ax25_display_timer(struct timer_list *); | |||
430 | extern int ax25_uid_policy; | 430 | extern int ax25_uid_policy; |
431 | extern ax25_uid_assoc *ax25_findbyuid(uid_t); | 431 | extern ax25_uid_assoc *ax25_findbyuid(uid_t); |
432 | extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); | 432 | extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); |
433 | extern struct file_operations ax25_uid_fops; | 433 | extern const struct file_operations ax25_uid_fops; |
434 | extern void ax25_uid_free(void); | 434 | extern void ax25_uid_free(void); |
435 | 435 | ||
436 | /* sysctl_net_ax25.c */ | 436 | /* sysctl_net_ax25.c */ |
diff --git a/include/net/dn_route.h b/include/net/dn_route.h index 76f957e258..a566944c49 100644 --- a/include/net/dn_route.h +++ b/include/net/dn_route.h | |||
@@ -68,9 +68,10 @@ extern void dn_rt_cache_flush(int delay); | |||
68 | struct dn_route { | 68 | struct dn_route { |
69 | union { | 69 | union { |
70 | struct dst_entry dst; | 70 | struct dst_entry dst; |
71 | struct dn_route *rt_next; | ||
72 | } u; | 71 | } u; |
73 | 72 | ||
73 | struct flowi fl; | ||
74 | |||
74 | __le16 rt_saddr; | 75 | __le16 rt_saddr; |
75 | __le16 rt_daddr; | 76 | __le16 rt_daddr; |
76 | __le16 rt_gateway; | 77 | __le16 rt_gateway; |
@@ -80,8 +81,6 @@ struct dn_route { | |||
80 | 81 | ||
81 | unsigned rt_flags; | 82 | unsigned rt_flags; |
82 | unsigned rt_type; | 83 | unsigned rt_type; |
83 | |||
84 | struct flowi fl; | ||
85 | }; | 84 | }; |
86 | 85 | ||
87 | extern void dn_route_init(void); | 86 | extern void dn_route_init(void); |
diff --git a/include/net/dst.h b/include/net/dst.h index 62b7e7598e..e12a8ce0b9 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -37,9 +37,7 @@ struct sk_buff; | |||
37 | 37 | ||
38 | struct dst_entry | 38 | struct dst_entry |
39 | { | 39 | { |
40 | struct dst_entry *next; | 40 | struct rcu_head rcu_head; |
41 | atomic_t __refcnt; /* client references */ | ||
42 | int __use; | ||
43 | struct dst_entry *child; | 41 | struct dst_entry *child; |
44 | struct net_device *dev; | 42 | struct net_device *dev; |
45 | short error; | 43 | short error; |
@@ -50,7 +48,6 @@ struct dst_entry | |||
50 | #define DST_NOPOLICY 4 | 48 | #define DST_NOPOLICY 4 |
51 | #define DST_NOHASH 8 | 49 | #define DST_NOHASH 8 |
52 | #define DST_BALANCED 0x10 | 50 | #define DST_BALANCED 0x10 |
53 | unsigned long lastuse; | ||
54 | unsigned long expires; | 51 | unsigned long expires; |
55 | 52 | ||
56 | unsigned short header_len; /* more space at head required */ | 53 | unsigned short header_len; /* more space at head required */ |
@@ -75,8 +72,16 @@ struct dst_entry | |||
75 | #endif | 72 | #endif |
76 | 73 | ||
77 | struct dst_ops *ops; | 74 | struct dst_ops *ops; |
78 | struct rcu_head rcu_head; | ||
79 | 75 | ||
76 | unsigned long lastuse; | ||
77 | atomic_t __refcnt; /* client references */ | ||
78 | int __use; | ||
79 | union { | ||
80 | struct dst_entry *next; | ||
81 | struct rtable *rt_next; | ||
82 | struct rt6_info *rt6_next; | ||
83 | struct dn_route *dn_next; | ||
84 | }; | ||
80 | char info[0]; | 85 | char info[0]; |
81 | }; | 86 | }; |
82 | 87 | ||
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 34cc76e3dd..d27ee8c0da 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -34,12 +34,13 @@ | |||
34 | #include <asm/byteorder.h> | 34 | #include <asm/byteorder.h> |
35 | 35 | ||
36 | /* This is for all connections with a full identity, no wildcards. | 36 | /* This is for all connections with a full identity, no wildcards. |
37 | * New scheme, half the table is for TIME_WAIT, the other half is | 37 | * One chain is dedicated to TIME_WAIT sockets. |
38 | * for the rest. I'll experiment with dynamic table growth later. | 38 | * I'll experiment with dynamic table growth later. |
39 | */ | 39 | */ |
40 | struct inet_ehash_bucket { | 40 | struct inet_ehash_bucket { |
41 | rwlock_t lock; | 41 | rwlock_t lock; |
42 | struct hlist_head chain; | 42 | struct hlist_head chain; |
43 | struct hlist_head twchain; | ||
43 | }; | 44 | }; |
44 | 45 | ||
45 | /* There are a few simple rules, which allow for local port reuse by | 46 | /* There are a few simple rules, which allow for local port reuse by |
@@ -97,8 +98,7 @@ struct inet_hashinfo { | |||
97 | * | 98 | * |
98 | * TCP_ESTABLISHED <= sk->sk_state < TCP_CLOSE | 99 | * TCP_ESTABLISHED <= sk->sk_state < TCP_CLOSE |
99 | * | 100 | * |
100 | * First half of the table is for sockets not in TIME_WAIT, second half | 101 | * TIME_WAIT sockets use a separate chain (twchain). |
101 | * is for TIME_WAIT sockets only. | ||
102 | */ | 102 | */ |
103 | struct inet_ehash_bucket *ehash; | 103 | struct inet_ehash_bucket *ehash; |
104 | 104 | ||
@@ -369,7 +369,7 @@ static inline struct sock * | |||
369 | } | 369 | } |
370 | 370 | ||
371 | /* Must check for a TIME_WAIT'er before going to listener hash. */ | 371 | /* Must check for a TIME_WAIT'er before going to listener hash. */ |
372 | sk_for_each(sk, node, &(head + hashinfo->ehash_size)->chain) { | 372 | sk_for_each(sk, node, &head->twchain) { |
373 | if (INET_TW_MATCH(sk, hash, acookie, saddr, daddr, ports, dif)) | 373 | if (INET_TW_MATCH(sk, hash, acookie, saddr, daddr, ports, dif)) |
374 | goto hit; | 374 | goto hit; |
375 | } | 375 | } |
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 7be4f4e3a0..9eda572a2a 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h | |||
@@ -83,7 +83,6 @@ struct rt6_info | |||
83 | { | 83 | { |
84 | union { | 84 | union { |
85 | struct dst_entry dst; | 85 | struct dst_entry dst; |
86 | struct rt6_info *next; | ||
87 | } u; | 86 | } u; |
88 | 87 | ||
89 | struct inet6_dev *rt6i_idev; | 88 | struct inet6_dev *rt6i_idev; |
diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h new file mode 100644 index 0000000000..04d1abb72d --- /dev/null +++ b/include/net/iucv/af_iucv.h | |||
@@ -0,0 +1,106 @@ | |||
1 | /* | ||
2 | * Copyright 2006 IBM Corporation | ||
3 | * IUCV protocol stack for Linux on zSeries | ||
4 | * Version 1.0 | ||
5 | * Author(s): Jennifer Hunt <jenhunt@us.ibm.com> | ||
6 | * | ||
7 | */ | ||
8 | |||
9 | #ifndef __AFIUCV_H | ||
10 | #define __AFIUCV_H | ||
11 | |||
12 | #include <asm/types.h> | ||
13 | #include <asm/byteorder.h> | ||
14 | #include <linux/list.h> | ||
15 | #include <linux/poll.h> | ||
16 | #include <linux/socket.h> | ||
17 | |||
18 | #ifndef AF_IUCV | ||
19 | #define AF_IUCV 32 | ||
20 | #define PF_IUCV AF_IUCV | ||
21 | #endif | ||
22 | |||
23 | /* Connection and socket states */ | ||
24 | enum { | ||
25 | IUCV_CONNECTED = 1, | ||
26 | IUCV_OPEN, | ||
27 | IUCV_BOUND, | ||
28 | IUCV_LISTEN, | ||
29 | IUCV_SEVERED, | ||
30 | IUCV_DISCONN, | ||
31 | IUCV_CLOSED | ||
32 | }; | ||
33 | |||
34 | #define IUCV_QUEUELEN_DEFAULT 65535 | ||
35 | #define IUCV_CONN_TIMEOUT (HZ * 40) | ||
36 | #define IUCV_DISCONN_TIMEOUT (HZ * 2) | ||
37 | #define IUCV_CONN_IDLE_TIMEOUT (HZ * 60) | ||
38 | #define IUCV_BUFSIZE_DEFAULT 32768 | ||
39 | |||
40 | /* IUCV socket address */ | ||
41 | struct sockaddr_iucv { | ||
42 | sa_family_t siucv_family; | ||
43 | unsigned short siucv_port; /* Reserved */ | ||
44 | unsigned int siucv_addr; /* Reserved */ | ||
45 | char siucv_nodeid[8]; /* Reserved */ | ||
46 | char siucv_user_id[8]; /* Guest User Id */ | ||
47 | char siucv_name[8]; /* Application Name */ | ||
48 | }; | ||
49 | |||
50 | |||
51 | /* Common socket structures and functions */ | ||
52 | |||
53 | #define iucv_sk(__sk) ((struct iucv_sock *) __sk) | ||
54 | |||
55 | struct iucv_sock { | ||
56 | struct sock sk; | ||
57 | char src_user_id[8]; | ||
58 | char src_name[8]; | ||
59 | char dst_user_id[8]; | ||
60 | char dst_name[8]; | ||
61 | struct list_head accept_q; | ||
62 | struct sock *parent; | ||
63 | struct iucv_path *path; | ||
64 | struct sk_buff_head send_skb_q; | ||
65 | unsigned int send_tag; | ||
66 | }; | ||
67 | |||
68 | struct iucv_sock_list { | ||
69 | struct hlist_head head; | ||
70 | rwlock_t lock; | ||
71 | atomic_t autobind_name; | ||
72 | }; | ||
73 | |||
74 | static void iucv_sock_destruct(struct sock *sk); | ||
75 | static void iucv_sock_cleanup_listen(struct sock *parent); | ||
76 | static void iucv_sock_kill(struct sock *sk); | ||
77 | static void iucv_sock_close(struct sock *sk); | ||
78 | static int iucv_sock_create(struct socket *sock, int proto); | ||
79 | static int iucv_sock_bind(struct socket *sock, struct sockaddr *addr, | ||
80 | int addr_len); | ||
81 | static int iucv_sock_connect(struct socket *sock, struct sockaddr *addr, | ||
82 | int alen, int flags); | ||
83 | static int iucv_sock_listen(struct socket *sock, int backlog); | ||
84 | static int iucv_sock_accept(struct socket *sock, struct socket *newsock, | ||
85 | int flags); | ||
86 | static int iucv_sock_getname(struct socket *sock, struct sockaddr *addr, | ||
87 | int *len, int peer); | ||
88 | static int iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock, | ||
89 | struct msghdr *msg, size_t len); | ||
90 | static int iucv_sock_recvmsg(struct kiocb *iocb, struct socket *sock, | ||
91 | struct msghdr *msg, size_t len, int flags); | ||
92 | unsigned int iucv_sock_poll(struct file *file, struct socket *sock, | ||
93 | poll_table *wait); | ||
94 | static int iucv_sock_release(struct socket *sock); | ||
95 | static int iucv_sock_shutdown(struct socket *sock, int how); | ||
96 | |||
97 | void iucv_sock_link(struct iucv_sock_list *l, struct sock *s); | ||
98 | void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s); | ||
99 | int iucv_sock_wait_state(struct sock *sk, int state, int state2, | ||
100 | unsigned long timeo); | ||
101 | int iucv_sock_wait_cnt(struct sock *sk, unsigned long timeo); | ||
102 | void iucv_accept_enqueue(struct sock *parent, struct sock *sk); | ||
103 | void iucv_accept_unlink(struct sock *sk); | ||
104 | struct sock *iucv_accept_dequeue(struct sock *parent, struct socket *newsock); | ||
105 | |||
106 | #endif /* __IUCV_H */ | ||
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h new file mode 100644 index 0000000000..746e741626 --- /dev/null +++ b/include/net/iucv/iucv.h | |||
@@ -0,0 +1,415 @@ | |||
1 | /* | ||
2 | * drivers/s390/net/iucv.h | ||
3 | * IUCV base support. | ||
4 | * | ||
5 | * S390 version | ||
6 | * Copyright 2000, 2006 IBM Corporation | ||
7 | * Author(s):Alan Altmark (Alan_Altmark@us.ibm.com) | ||
8 | * Xenia Tkatschow (xenia@us.ibm.com) | ||
9 | * Rewritten for af_iucv: | ||
10 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | ||
11 | * | ||
12 | * | ||
13 | * Functionality: | ||
14 | * To explore any of the IUCV functions, one must first register their | ||
15 | * program using iucv_register(). Once your program has successfully | ||
16 | * completed a register, it can exploit the other functions. | ||
17 | * For furthur reference on all IUCV functionality, refer to the | ||
18 | * CP Programming Services book, also available on the web thru | ||
19 | * www.ibm.com/s390/vm/pubs, manual # SC24-5760 | ||
20 | * | ||
21 | * Definition of Return Codes | ||
22 | * - All positive return codes including zero are reflected back | ||
23 | * from CP. The definition of each return code can be found in | ||
24 | * CP Programming Services book. | ||
25 | * - Return Code of: | ||
26 | * -EINVAL: Invalid value | ||
27 | * -ENOMEM: storage allocation failed | ||
28 | */ | ||
29 | |||
30 | #include <linux/types.h> | ||
31 | #include <asm/debug.h> | ||
32 | |||
33 | /* | ||
34 | * IUCV option flags usable by device drivers: | ||
35 | * | ||
36 | * IUCV_IPRMDATA Indicates that your program can handle a message in the | ||
37 | * parameter list / a message is sent in the parameter list. | ||
38 | * Used for iucv_path_accept, iucv_path_connect, | ||
39 | * iucv_message_reply, iucv_message_send, iucv_message_send2way. | ||
40 | * IUCV_IPQUSCE Indicates that you do not want to receive messages on this | ||
41 | * path until an iucv_path_resume is issued. | ||
42 | * Used for iucv_path_accept, iucv_path_connect. | ||
43 | * IUCV_IPBUFLST Indicates that an address list is used for the message data. | ||
44 | * Used for iucv_message_receive, iucv_message_send, | ||
45 | * iucv_message_send2way. | ||
46 | * IUCV_IPPRTY Specifies that you want to send priority messages. | ||
47 | * Used for iucv_path_accept, iucv_path_connect, | ||
48 | * iucv_message_reply, iucv_message_send, iucv_message_send2way. | ||
49 | * IUCV_IPSYNC Indicates a synchronous send request. | ||
50 | * Used for iucv_message_send, iucv_message_send2way. | ||
51 | * IUCV_IPANSLST Indicates that an address list is used for the reply data. | ||
52 | * Used for iucv_message_reply, iucv_message_send2way. | ||
53 | * IUCV_IPLOCAL Specifies that the communication partner has to be on the | ||
54 | * local system. If local is specified no target class can be | ||
55 | * specified. | ||
56 | * Used for iucv_path_connect. | ||
57 | * | ||
58 | * All flags are defined in the input field IPFLAGS1 of each function | ||
59 | * and can be found in CP Programming Services. | ||
60 | */ | ||
61 | #define IUCV_IPRMDATA 0x80 | ||
62 | #define IUCV_IPQUSCE 0x40 | ||
63 | #define IUCV_IPBUFLST 0x40 | ||
64 | #define IUCV_IPPRTY 0x20 | ||
65 | #define IUCV_IPANSLST 0x08 | ||
66 | #define IUCV_IPSYNC 0x04 | ||
67 | #define IUCV_IPLOCAL 0x01 | ||
68 | |||
69 | /* | ||
70 | * iucv_array : Defines buffer array. | ||
71 | * Inside the array may be 31- bit addresses and 31-bit lengths. | ||
72 | * Use a pointer to an iucv_array as the buffer, reply or answer | ||
73 | * parameter on iucv_message_send, iucv_message_send2way, iucv_message_receive | ||
74 | * and iucv_message_reply if IUCV_IPBUFLST or IUCV_IPANSLST are used. | ||
75 | */ | ||
76 | struct iucv_array { | ||
77 | u32 address; | ||
78 | u32 length; | ||
79 | } __attribute__ ((aligned (8))); | ||
80 | |||
81 | extern struct bus_type iucv_bus; | ||
82 | extern struct device *iucv_root; | ||
83 | |||
84 | /* | ||
85 | * struct iucv_path | ||
86 | * pathid: 16 bit path identification | ||
87 | * msglim: 16 bit message limit | ||
88 | * flags: properties of the path: IPRMDATA, IPQUSCE, IPPRTY | ||
89 | * handler: address of iucv handler structure | ||
90 | * private: private information of the handler associated with the path | ||
91 | * list: list_head for the iucv_handler path list. | ||
92 | */ | ||
93 | struct iucv_path { | ||
94 | u16 pathid; | ||
95 | u16 msglim; | ||
96 | u8 flags; | ||
97 | void *private; | ||
98 | struct iucv_handler *handler; | ||
99 | struct list_head list; | ||
100 | }; | ||
101 | |||
102 | /* | ||
103 | * struct iucv_message | ||
104 | * id: 32 bit message id | ||
105 | * audit: 32 bit error information of purged or replied messages | ||
106 | * class: 32 bit target class of a message (source class for replies) | ||
107 | * tag: 32 bit tag to be associated with the message | ||
108 | * length: 32 bit length of the message / reply | ||
109 | * reply_size: 32 bit maximum allowed length of the reply | ||
110 | * rmmsg: 8 byte inline message | ||
111 | * flags: message properties (IUCV_IPPRTY) | ||
112 | */ | ||
113 | struct iucv_message { | ||
114 | u32 id; | ||
115 | u32 audit; | ||
116 | u32 class; | ||
117 | u32 tag; | ||
118 | u32 length; | ||
119 | u32 reply_size; | ||
120 | u8 rmmsg[8]; | ||
121 | u8 flags; | ||
122 | }; | ||
123 | |||
124 | /* | ||
125 | * struct iucv_handler | ||
126 | * | ||
127 | * A vector of functions that handle IUCV interrupts. Each functions gets | ||
128 | * a parameter area as defined by the CP Programming Services and private | ||
129 | * pointer that is provided by the user of the interface. | ||
130 | */ | ||
131 | struct iucv_handler { | ||
132 | /* | ||
133 | * The path_pending function is called after an iucv interrupt | ||
134 | * type 0x01 has been received. The base code allocates a path | ||
135 | * structure and "asks" the handler if this path belongs to the | ||
136 | * handler. To accept the path the path_pending function needs | ||
137 | * to call iucv_path_accept and return 0. If the callback returns | ||
138 | * a value != 0 the iucv base code will continue with the next | ||
139 | * handler. The order in which the path_pending functions are | ||
140 | * called is the order of the registration of the iucv handlers | ||
141 | * to the base code. | ||
142 | */ | ||
143 | int (*path_pending)(struct iucv_path *, u8 ipvmid[8], u8 ipuser[16]); | ||
144 | /* | ||
145 | * The path_complete function is called after an iucv interrupt | ||
146 | * type 0x02 has been received for a path that has been established | ||
147 | * for this handler with iucv_path_connect and got accepted by the | ||
148 | * peer with iucv_path_accept. | ||
149 | */ | ||
150 | void (*path_complete)(struct iucv_path *, u8 ipuser[16]); | ||
151 | /* | ||
152 | * The path_severed function is called after an iucv interrupt | ||
153 | * type 0x03 has been received. The communication peer shutdown | ||
154 | * his end of the communication path. The path still exists and | ||
155 | * remaining messages can be received until a iucv_path_sever | ||
156 | * shuts down the other end of the path as well. | ||
157 | */ | ||
158 | void (*path_severed)(struct iucv_path *, u8 ipuser[16]); | ||
159 | /* | ||
160 | * The path_quiesced function is called after an icuv interrupt | ||
161 | * type 0x04 has been received. The communication peer has quiesced | ||
162 | * the path. Delivery of messages is stopped until iucv_path_resume | ||
163 | * has been called. | ||
164 | */ | ||
165 | void (*path_quiesced)(struct iucv_path *, u8 ipuser[16]); | ||
166 | /* | ||
167 | * The path_resumed function is called after an icuv interrupt | ||
168 | * type 0x05 has been received. The communication peer has resumed | ||
169 | * the path. | ||
170 | */ | ||
171 | void (*path_resumed)(struct iucv_path *, u8 ipuser[16]); | ||
172 | /* | ||
173 | * The message_pending function is called after an icuv interrupt | ||
174 | * type 0x06 or type 0x07 has been received. A new message is | ||
175 | * availabe and can be received with iucv_message_receive. | ||
176 | */ | ||
177 | void (*message_pending)(struct iucv_path *, struct iucv_message *); | ||
178 | /* | ||
179 | * The message_complete function is called after an icuv interrupt | ||
180 | * type 0x08 or type 0x09 has been received. A message send with | ||
181 | * iucv_message_send2way has been replied to. The reply can be | ||
182 | * received with iucv_message_receive. | ||
183 | */ | ||
184 | void (*message_complete)(struct iucv_path *, struct iucv_message *); | ||
185 | |||
186 | struct list_head list; | ||
187 | struct list_head paths; | ||
188 | }; | ||
189 | |||
190 | /** | ||
191 | * iucv_register: | ||
192 | * @handler: address of iucv handler structure | ||
193 | * @smp: != 0 indicates that the handler can deal with out of order messages | ||
194 | * | ||
195 | * Registers a driver with IUCV. | ||
196 | * | ||
197 | * Returns 0 on success, -ENOMEM if the memory allocation for the pathid | ||
198 | * table failed, or -EIO if IUCV_DECLARE_BUFFER failed on all cpus. | ||
199 | */ | ||
200 | int iucv_register(struct iucv_handler *handler, int smp); | ||
201 | |||
202 | /** | ||
203 | * iucv_unregister | ||
204 | * @handler: address of iucv handler structure | ||
205 | * @smp: != 0 indicates that the handler can deal with out of order messages | ||
206 | * | ||
207 | * Unregister driver from IUCV. | ||
208 | */ | ||
209 | void iucv_unregister(struct iucv_handler *handle, int smp); | ||
210 | |||
211 | /** | ||
212 | * iucv_path_alloc | ||
213 | * @msglim: initial message limit | ||
214 | * @flags: initial flags | ||
215 | * @gfp: kmalloc allocation flag | ||
216 | * | ||
217 | * Allocate a new path structure for use with iucv_connect. | ||
218 | * | ||
219 | * Returns NULL if the memory allocation failed or a pointer to the | ||
220 | * path structure. | ||
221 | */ | ||
222 | static inline struct iucv_path *iucv_path_alloc(u16 msglim, u8 flags, gfp_t gfp) | ||
223 | { | ||
224 | struct iucv_path *path; | ||
225 | |||
226 | path = kzalloc(sizeof(struct iucv_path), gfp); | ||
227 | if (path) { | ||
228 | path->msglim = msglim; | ||
229 | path->flags = flags; | ||
230 | } | ||
231 | return path; | ||
232 | } | ||
233 | |||
234 | /** | ||
235 | * iucv_path_free | ||
236 | * @path: address of iucv path structure | ||
237 | * | ||
238 | * Frees a path structure. | ||
239 | */ | ||
240 | static inline void iucv_path_free(struct iucv_path *path) | ||
241 | { | ||
242 | kfree(path); | ||
243 | } | ||
244 | |||
245 | /** | ||
246 | * iucv_path_accept | ||
247 | * @path: address of iucv path structure | ||
248 | * @handler: address of iucv handler structure | ||
249 | * @userdata: 16 bytes of data reflected to the communication partner | ||
250 | * @private: private data passed to interrupt handlers for this path | ||
251 | * | ||
252 | * This function is issued after the user received a connection pending | ||
253 | * external interrupt and now wishes to complete the IUCV communication path. | ||
254 | * | ||
255 | * Returns the result of the CP IUCV call. | ||
256 | */ | ||
257 | int iucv_path_accept(struct iucv_path *path, struct iucv_handler *handler, | ||
258 | u8 userdata[16], void *private); | ||
259 | |||
260 | /** | ||
261 | * iucv_path_connect | ||
262 | * @path: address of iucv path structure | ||
263 | * @handler: address of iucv handler structure | ||
264 | * @userid: 8-byte user identification | ||
265 | * @system: 8-byte target system identification | ||
266 | * @userdata: 16 bytes of data reflected to the communication partner | ||
267 | * @private: private data passed to interrupt handlers for this path | ||
268 | * | ||
269 | * This function establishes an IUCV path. Although the connect may complete | ||
270 | * successfully, you are not able to use the path until you receive an IUCV | ||
271 | * Connection Complete external interrupt. | ||
272 | * | ||
273 | * Returns the result of the CP IUCV call. | ||
274 | */ | ||
275 | int iucv_path_connect(struct iucv_path *path, struct iucv_handler *handler, | ||
276 | u8 userid[8], u8 system[8], u8 userdata[16], | ||
277 | void *private); | ||
278 | |||
279 | /** | ||
280 | * iucv_path_quiesce: | ||
281 | * @path: address of iucv path structure | ||
282 | * @userdata: 16 bytes of data reflected to the communication partner | ||
283 | * | ||
284 | * This function temporarily suspends incoming messages on an IUCV path. | ||
285 | * You can later reactivate the path by invoking the iucv_resume function. | ||
286 | * | ||
287 | * Returns the result from the CP IUCV call. | ||
288 | */ | ||
289 | int iucv_path_quiesce(struct iucv_path *path, u8 userdata[16]); | ||
290 | |||
291 | /** | ||
292 | * iucv_path_resume: | ||
293 | * @path: address of iucv path structure | ||
294 | * @userdata: 16 bytes of data reflected to the communication partner | ||
295 | * | ||
296 | * This function resumes incoming messages on an IUCV path that has | ||
297 | * been stopped with iucv_path_quiesce. | ||
298 | * | ||
299 | * Returns the result from the CP IUCV call. | ||
300 | */ | ||
301 | int iucv_path_resume(struct iucv_path *path, u8 userdata[16]); | ||
302 | |||
303 | /** | ||
304 | * iucv_path_sever | ||
305 | * @path: address of iucv path structure | ||
306 | * @userdata: 16 bytes of data reflected to the communication partner | ||
307 | * | ||
308 | * This function terminates an IUCV path. | ||
309 | * | ||
310 | * Returns the result from the CP IUCV call. | ||
311 | */ | ||
312 | int iucv_path_sever(struct iucv_path *path, u8 userdata[16]); | ||
313 | |||
314 | /** | ||
315 | * iucv_message_purge | ||
316 | * @path: address of iucv path structure | ||
317 | * @msg: address of iucv msg structure | ||
318 | * @srccls: source class of message | ||
319 | * | ||
320 | * Cancels a message you have sent. | ||
321 | * | ||
322 | * Returns the result from the CP IUCV call. | ||
323 | */ | ||
324 | int iucv_message_purge(struct iucv_path *path, struct iucv_message *msg, | ||
325 | u32 srccls); | ||
326 | |||
327 | /** | ||
328 | * iucv_message_receive | ||
329 | * @path: address of iucv path structure | ||
330 | * @msg: address of iucv msg structure | ||
331 | * @flags: flags that affect how the message is received (IUCV_IPBUFLST) | ||
332 | * @buffer: address of data buffer or address of struct iucv_array | ||
333 | * @size: length of data buffer | ||
334 | * @residual: | ||
335 | * | ||
336 | * This function receives messages that are being sent to you over | ||
337 | * established paths. This function will deal with RMDATA messages | ||
338 | * embedded in struct iucv_message as well. | ||
339 | * | ||
340 | * Returns the result from the CP IUCV call. | ||
341 | */ | ||
342 | int iucv_message_receive(struct iucv_path *path, struct iucv_message *msg, | ||
343 | u8 flags, void *buffer, size_t size, size_t *residual); | ||
344 | |||
345 | /** | ||
346 | * iucv_message_reject | ||
347 | * @path: address of iucv path structure | ||
348 | * @msg: address of iucv msg structure | ||
349 | * | ||
350 | * The reject function refuses a specified message. Between the time you | ||
351 | * are notified of a message and the time that you complete the message, | ||
352 | * the message may be rejected. | ||
353 | * | ||
354 | * Returns the result from the CP IUCV call. | ||
355 | */ | ||
356 | int iucv_message_reject(struct iucv_path *path, struct iucv_message *msg); | ||
357 | |||
358 | /** | ||
359 | * iucv_message_reply | ||
360 | * @path: address of iucv path structure | ||
361 | * @msg: address of iucv msg structure | ||
362 | * @flags: how the reply is sent (IUCV_IPRMDATA, IUCV_IPPRTY, IUCV_IPBUFLST) | ||
363 | * @reply: address of data buffer or address of struct iucv_array | ||
364 | * @size: length of reply data buffer | ||
365 | * | ||
366 | * This function responds to the two-way messages that you receive. You | ||
367 | * must identify completely the message to which you wish to reply. ie, | ||
368 | * pathid, msgid, and trgcls. Prmmsg signifies the data is moved into | ||
369 | * the parameter list. | ||
370 | * | ||
371 | * Returns the result from the CP IUCV call. | ||
372 | */ | ||
373 | int iucv_message_reply(struct iucv_path *path, struct iucv_message *msg, | ||
374 | u8 flags, void *reply, size_t size); | ||
375 | |||
376 | /** | ||
377 | * iucv_message_send | ||
378 | * @path: address of iucv path structure | ||
379 | * @msg: address of iucv msg structure | ||
380 | * @flags: how the message is sent (IUCV_IPRMDATA, IUCV_IPPRTY, IUCV_IPBUFLST) | ||
381 | * @srccls: source class of message | ||
382 | * @buffer: address of data buffer or address of struct iucv_array | ||
383 | * @size: length of send buffer | ||
384 | * | ||
385 | * This function transmits data to another application. Data to be | ||
386 | * transmitted is in a buffer and this is a one-way message and the | ||
387 | * receiver will not reply to the message. | ||
388 | * | ||
389 | * Returns the result from the CP IUCV call. | ||
390 | */ | ||
391 | int iucv_message_send(struct iucv_path *path, struct iucv_message *msg, | ||
392 | u8 flags, u32 srccls, void *buffer, size_t size); | ||
393 | |||
394 | /** | ||
395 | * iucv_message_send2way | ||
396 | * @path: address of iucv path structure | ||
397 | * @msg: address of iucv msg structure | ||
398 | * @flags: how the message is sent and the reply is received | ||
399 | * (IUCV_IPRMDATA, IUCV_IPBUFLST, IUCV_IPPRTY, IUCV_ANSLST) | ||
400 | * @srccls: source class of message | ||
401 | * @buffer: address of data buffer or address of struct iucv_array | ||
402 | * @size: length of send buffer | ||
403 | * @ansbuf: address of answer buffer or address of struct iucv_array | ||
404 | * @asize: size of reply buffer | ||
405 | * | ||
406 | * This function transmits data to another application. Data to be | ||
407 | * transmitted is in a buffer. The receiver of the send is expected to | ||
408 | * reply to the message and a buffer is provided into which IUCV moves | ||
409 | * the reply to this message. | ||
410 | * | ||
411 | * Returns the result from the CP IUCV call. | ||
412 | */ | ||
413 | int iucv_message_send2way(struct iucv_path *path, struct iucv_message *msg, | ||
414 | u8 flags, u32 srccls, void *buffer, size_t size, | ||
415 | void *answer, size_t asize, size_t *residual); | ||
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index bd01b4633e..0e690e34c0 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -45,6 +45,7 @@ union nf_conntrack_expect_proto { | |||
45 | #include <linux/netfilter/nf_conntrack_ftp.h> | 45 | #include <linux/netfilter/nf_conntrack_ftp.h> |
46 | #include <linux/netfilter/nf_conntrack_pptp.h> | 46 | #include <linux/netfilter/nf_conntrack_pptp.h> |
47 | #include <linux/netfilter/nf_conntrack_h323.h> | 47 | #include <linux/netfilter/nf_conntrack_h323.h> |
48 | #include <linux/netfilter/nf_conntrack_sane.h> | ||
48 | 49 | ||
49 | /* per conntrack: application helper private data */ | 50 | /* per conntrack: application helper private data */ |
50 | union nf_conntrack_help { | 51 | union nf_conntrack_help { |
@@ -52,6 +53,7 @@ union nf_conntrack_help { | |||
52 | struct nf_ct_ftp_master ct_ftp_info; | 53 | struct nf_ct_ftp_master ct_ftp_info; |
53 | struct nf_ct_pptp_master ct_pptp_info; | 54 | struct nf_ct_pptp_master ct_pptp_info; |
54 | struct nf_ct_h323_master ct_h323_info; | 55 | struct nf_ct_h323_master ct_h323_info; |
56 | struct nf_ct_sane_master ct_sane_info; | ||
55 | }; | 57 | }; |
56 | 58 | ||
57 | #include <linux/types.h> | 59 | #include <linux/types.h> |
@@ -255,6 +257,12 @@ extern int nf_conntrack_max; | |||
255 | 257 | ||
256 | DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); | 258 | DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); |
257 | #define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) | 259 | #define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) |
260 | #define NF_CT_STAT_INC_ATOMIC(count) \ | ||
261 | do { \ | ||
262 | local_bh_disable(); \ | ||
263 | __get_cpu_var(nf_conntrack_stat).count++; \ | ||
264 | local_bh_enable(); \ | ||
265 | } while (0) | ||
258 | 266 | ||
259 | /* no helper, no nat */ | 267 | /* no helper, no nat */ |
260 | #define NF_CT_F_BASIC 0 | 268 | #define NF_CT_F_BASIC 0 |
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h index 41bcc9eb42..173c7c1eff 100644 --- a/include/net/netfilter/nf_conntrack_expect.h +++ b/include/net/netfilter/nf_conntrack_expect.h | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | extern struct list_head nf_conntrack_expect_list; | 9 | extern struct list_head nf_conntrack_expect_list; |
10 | extern struct kmem_cache *nf_conntrack_expect_cachep; | 10 | extern struct kmem_cache *nf_conntrack_expect_cachep; |
11 | extern struct file_operations exp_file_ops; | 11 | extern const struct file_operations exp_file_ops; |
12 | 12 | ||
13 | struct nf_conntrack_expect | 13 | struct nf_conntrack_expect |
14 | { | 14 | { |
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h index 664ddcffe0..eb575cbd4c 100644 --- a/include/net/netfilter/nf_conntrack_l3proto.h +++ b/include/net/netfilter/nf_conntrack_l3proto.h | |||
@@ -89,7 +89,7 @@ extern struct nf_conntrack_l3proto *nf_ct_l3protos[AF_MAX]; | |||
89 | 89 | ||
90 | /* Protocol registration. */ | 90 | /* Protocol registration. */ |
91 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); | 91 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); |
92 | extern int nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); | 92 | extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); |
93 | 93 | ||
94 | extern struct nf_conntrack_l3proto * | 94 | extern struct nf_conntrack_l3proto * |
95 | nf_ct_l3proto_find_get(u_int16_t l3proto); | 95 | nf_ct_l3proto_find_get(u_int16_t l3proto); |
@@ -106,7 +106,7 @@ __nf_ct_l3proto_find(u_int16_t l3proto) | |||
106 | { | 106 | { |
107 | if (unlikely(l3proto >= AF_MAX)) | 107 | if (unlikely(l3proto >= AF_MAX)) |
108 | return &nf_conntrack_l3proto_generic; | 108 | return &nf_conntrack_l3proto_generic; |
109 | return nf_ct_l3protos[l3proto]; | 109 | return rcu_dereference(nf_ct_l3protos[l3proto]); |
110 | } | 110 | } |
111 | 111 | ||
112 | #endif /*_NF_CONNTRACK_L3PROTO_H*/ | 112 | #endif /*_NF_CONNTRACK_L3PROTO_H*/ |
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h index fc8af08ff5..8415182ec1 100644 --- a/include/net/netfilter/nf_conntrack_l4proto.h +++ b/include/net/netfilter/nf_conntrack_l4proto.h | |||
@@ -109,7 +109,7 @@ extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p); | |||
109 | 109 | ||
110 | /* Protocol registration. */ | 110 | /* Protocol registration. */ |
111 | extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto); | 111 | extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto); |
112 | extern int nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto); | 112 | extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto); |
113 | 113 | ||
114 | /* Generic netlink helpers */ | 114 | /* Generic netlink helpers */ |
115 | extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb, | 115 | extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb, |
diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h index 61c62068ca..bc57dd7b9b 100644 --- a/include/net/netfilter/nf_nat.h +++ b/include/net/netfilter/nf_nat.h | |||
@@ -16,6 +16,7 @@ enum nf_nat_manip_type | |||
16 | 16 | ||
17 | #define IP_NAT_RANGE_MAP_IPS 1 | 17 | #define IP_NAT_RANGE_MAP_IPS 1 |
18 | #define IP_NAT_RANGE_PROTO_SPECIFIED 2 | 18 | #define IP_NAT_RANGE_PROTO_SPECIFIED 2 |
19 | #define IP_NAT_RANGE_PROTO_RANDOM 4 | ||
19 | 20 | ||
20 | /* NAT sequence number modifications */ | 21 | /* NAT sequence number modifications */ |
21 | struct nf_nat_seq { | 22 | struct nf_nat_seq { |
diff --git a/include/net/netrom.h b/include/net/netrom.h index e0ca112024..f06852bba6 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h | |||
@@ -215,8 +215,8 @@ extern struct net_device *nr_dev_get(ax25_address *); | |||
215 | extern int nr_rt_ioctl(unsigned int, void __user *); | 215 | extern int nr_rt_ioctl(unsigned int, void __user *); |
216 | extern void nr_link_failed(ax25_cb *, int); | 216 | extern void nr_link_failed(ax25_cb *, int); |
217 | extern int nr_route_frame(struct sk_buff *, ax25_cb *); | 217 | extern int nr_route_frame(struct sk_buff *, ax25_cb *); |
218 | extern struct file_operations nr_nodes_fops; | 218 | extern const struct file_operations nr_nodes_fops; |
219 | extern struct file_operations nr_neigh_fops; | 219 | extern const struct file_operations nr_neigh_fops; |
220 | extern void nr_rt_free(void); | 220 | extern void nr_rt_free(void); |
221 | 221 | ||
222 | /* nr_subr.c */ | 222 | /* nr_subr.c */ |
diff --git a/include/net/rose.h b/include/net/rose.h index 4c05a88b92..a4047d3cf5 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -189,9 +189,9 @@ extern void rose_enquiry_response(struct sock *); | |||
189 | 189 | ||
190 | /* rose_route.c */ | 190 | /* rose_route.c */ |
191 | extern struct rose_neigh rose_loopback_neigh; | 191 | extern struct rose_neigh rose_loopback_neigh; |
192 | extern struct file_operations rose_neigh_fops; | 192 | extern const struct file_operations rose_neigh_fops; |
193 | extern struct file_operations rose_nodes_fops; | 193 | extern const struct file_operations rose_nodes_fops; |
194 | extern struct file_operations rose_routes_fops; | 194 | extern const struct file_operations rose_routes_fops; |
195 | 195 | ||
196 | extern void rose_add_loopback_neigh(void); | 196 | extern void rose_add_loopback_neigh(void); |
197 | extern int __must_check rose_add_loopback_node(rose_address *); | 197 | extern int __must_check rose_add_loopback_node(rose_address *); |
diff --git a/include/net/route.h b/include/net/route.h index 486e37aff0..749e4dfe5f 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -53,9 +53,11 @@ struct rtable | |||
53 | union | 53 | union |
54 | { | 54 | { |
55 | struct dst_entry dst; | 55 | struct dst_entry dst; |
56 | struct rtable *rt_next; | ||
57 | } u; | 56 | } u; |
58 | 57 | ||
58 | /* Cache lookup keys */ | ||
59 | struct flowi fl; | ||
60 | |||
59 | struct in_device *idev; | 61 | struct in_device *idev; |
60 | 62 | ||
61 | unsigned rt_flags; | 63 | unsigned rt_flags; |
@@ -69,9 +71,6 @@ struct rtable | |||
69 | /* Info on neighbour */ | 71 | /* Info on neighbour */ |
70 | __be32 rt_gateway; | 72 | __be32 rt_gateway; |
71 | 73 | ||
72 | /* Cache lookup keys */ | ||
73 | struct flowi fl; | ||
74 | |||
75 | /* Miscellaneous cached information */ | 74 | /* Miscellaneous cached information */ |
76 | __be32 rt_spec_dst; /* RFC1122 specific destination */ | 75 | __be32 rt_spec_dst; /* RFC1122 specific destination */ |
77 | struct inet_peer *peer; /* long-living peer info */ | 76 | struct inet_peer *peer; /* long-living peer info */ |
@@ -146,7 +145,8 @@ static inline char rt_tos2priority(u8 tos) | |||
146 | 145 | ||
147 | static inline int ip_route_connect(struct rtable **rp, __be32 dst, | 146 | static inline int ip_route_connect(struct rtable **rp, __be32 dst, |
148 | __be32 src, u32 tos, int oif, u8 protocol, | 147 | __be32 src, u32 tos, int oif, u8 protocol, |
149 | __be16 sport, __be16 dport, struct sock *sk) | 148 | __be16 sport, __be16 dport, struct sock *sk, |
149 | int flags) | ||
150 | { | 150 | { |
151 | struct flowi fl = { .oif = oif, | 151 | struct flowi fl = { .oif = oif, |
152 | .nl_u = { .ip4_u = { .daddr = dst, | 152 | .nl_u = { .ip4_u = { .daddr = dst, |
@@ -168,7 +168,7 @@ static inline int ip_route_connect(struct rtable **rp, __be32 dst, | |||
168 | *rp = NULL; | 168 | *rp = NULL; |
169 | } | 169 | } |
170 | security_sk_classify_flow(sk, &fl); | 170 | security_sk_classify_flow(sk, &fl); |
171 | return ip_route_output_flow(rp, &fl, sk, 0); | 171 | return ip_route_output_flow(rp, &fl, sk, flags); |
172 | } | 172 | } |
173 | 173 | ||
174 | static inline int ip_route_newports(struct rtable **rp, u8 protocol, | 174 | static inline int ip_route_newports(struct rtable **rp, u8 protocol, |
diff --git a/include/net/tcp.h b/include/net/tcp.h index cd8fa0c858..5c472f255b 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -802,9 +802,8 @@ static inline void tcp_update_wl(struct tcp_sock *tp, u32 ack, u32 seq) | |||
802 | /* | 802 | /* |
803 | * Calculate(/check) TCP checksum | 803 | * Calculate(/check) TCP checksum |
804 | */ | 804 | */ |
805 | static inline __sum16 tcp_v4_check(struct tcphdr *th, int len, | 805 | static inline __sum16 tcp_v4_check(int len, __be32 saddr, |
806 | __be32 saddr, __be32 daddr, | 806 | __be32 daddr, __wsum base) |
807 | __wsum base) | ||
808 | { | 807 | { |
809 | return csum_tcpudp_magic(saddr,daddr,len,IPPROTO_TCP,base); | 808 | return csum_tcpudp_magic(saddr,daddr,len,IPPROTO_TCP,base); |
810 | } | 809 | } |
diff --git a/include/net/x25.h b/include/net/x25.h index e47fe440d9..fc3f03d976 100644 --- a/include/net/x25.h +++ b/include/net/x25.h | |||
@@ -161,6 +161,14 @@ struct x25_sock { | |||
161 | unsigned long vc_facil_mask; /* inc_call facilities mask */ | 161 | unsigned long vc_facil_mask; /* inc_call facilities mask */ |
162 | }; | 162 | }; |
163 | 163 | ||
164 | struct x25_forward { | ||
165 | struct list_head node; | ||
166 | unsigned int lci; | ||
167 | struct net_device *dev1; | ||
168 | struct net_device *dev2; | ||
169 | atomic_t refcnt; | ||
170 | }; | ||
171 | |||
164 | static inline struct x25_sock *x25_sk(const struct sock *sk) | 172 | static inline struct x25_sock *x25_sk(const struct sock *sk) |
165 | { | 173 | { |
166 | return (struct x25_sock *)sk; | 174 | return (struct x25_sock *)sk; |
@@ -172,6 +180,7 @@ extern int sysctl_x25_call_request_timeout; | |||
172 | extern int sysctl_x25_reset_request_timeout; | 180 | extern int sysctl_x25_reset_request_timeout; |
173 | extern int sysctl_x25_clear_request_timeout; | 181 | extern int sysctl_x25_clear_request_timeout; |
174 | extern int sysctl_x25_ack_holdback_timeout; | 182 | extern int sysctl_x25_ack_holdback_timeout; |
183 | extern int sysctl_x25_forward; | ||
175 | 184 | ||
176 | extern int x25_addr_ntoa(unsigned char *, struct x25_address *, | 185 | extern int x25_addr_ntoa(unsigned char *, struct x25_address *, |
177 | struct x25_address *); | 186 | struct x25_address *); |
@@ -198,6 +207,13 @@ extern int x25_negotiate_facilities(struct sk_buff *, struct sock *, | |||
198 | struct x25_dte_facilities *); | 207 | struct x25_dte_facilities *); |
199 | extern void x25_limit_facilities(struct x25_facilities *, struct x25_neigh *); | 208 | extern void x25_limit_facilities(struct x25_facilities *, struct x25_neigh *); |
200 | 209 | ||
210 | /* x25_forward.c */ | ||
211 | extern void x25_clear_forward_by_lci(unsigned int lci); | ||
212 | extern void x25_clear_forward_by_dev(struct net_device *); | ||
213 | extern int x25_forward_data(int, struct x25_neigh *, struct sk_buff *); | ||
214 | extern int x25_forward_call(struct x25_address *, struct x25_neigh *, | ||
215 | struct sk_buff *, int); | ||
216 | |||
201 | /* x25_in.c */ | 217 | /* x25_in.c */ |
202 | extern int x25_process_rx_frame(struct sock *, struct sk_buff *); | 218 | extern int x25_process_rx_frame(struct sock *, struct sk_buff *); |
203 | extern int x25_backlog_rcv(struct sock *, struct sk_buff *); | 219 | extern int x25_backlog_rcv(struct sock *, struct sk_buff *); |
@@ -282,6 +298,8 @@ extern struct hlist_head x25_list; | |||
282 | extern rwlock_t x25_list_lock; | 298 | extern rwlock_t x25_list_lock; |
283 | extern struct list_head x25_route_list; | 299 | extern struct list_head x25_route_list; |
284 | extern rwlock_t x25_route_list_lock; | 300 | extern rwlock_t x25_route_list_lock; |
301 | extern struct list_head x25_forward_list; | ||
302 | extern rwlock_t x25_forward_list_lock; | ||
285 | 303 | ||
286 | extern int x25_proc_init(void); | 304 | extern int x25_proc_init(void); |
287 | extern void x25_proc_exit(void); | 305 | extern void x25_proc_exit(void); |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index e4765413cf..16924cb772 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -252,10 +252,13 @@ struct xfrm_state_afinfo { | |||
252 | xfrm_address_t *daddr, xfrm_address_t *saddr); | 252 | xfrm_address_t *daddr, xfrm_address_t *saddr); |
253 | int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n); | 253 | int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n); |
254 | int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n); | 254 | int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n); |
255 | int (*output)(struct sk_buff *skb); | ||
255 | }; | 256 | }; |
256 | 257 | ||
257 | extern int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo); | 258 | extern int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo); |
258 | extern int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo); | 259 | extern int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo); |
260 | extern struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family); | ||
261 | extern void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo); | ||
259 | 262 | ||
260 | extern void xfrm_state_delete_tunnel(struct xfrm_state *x); | 263 | extern void xfrm_state_delete_tunnel(struct xfrm_state *x); |
261 | 264 | ||
@@ -359,6 +362,19 @@ struct xfrm_policy | |||
359 | struct xfrm_tmpl xfrm_vec[XFRM_MAX_DEPTH]; | 362 | struct xfrm_tmpl xfrm_vec[XFRM_MAX_DEPTH]; |
360 | }; | 363 | }; |
361 | 364 | ||
365 | struct xfrm_migrate { | ||
366 | xfrm_address_t old_daddr; | ||
367 | xfrm_address_t old_saddr; | ||
368 | xfrm_address_t new_daddr; | ||
369 | xfrm_address_t new_saddr; | ||
370 | u8 proto; | ||
371 | u8 mode; | ||
372 | u16 reserved; | ||
373 | u32 reqid; | ||
374 | u16 old_family; | ||
375 | u16 new_family; | ||
376 | }; | ||
377 | |||
362 | #define XFRM_KM_TIMEOUT 30 | 378 | #define XFRM_KM_TIMEOUT 30 |
363 | /* which seqno */ | 379 | /* which seqno */ |
364 | #define XFRM_REPLAY_SEQ 1 | 380 | #define XFRM_REPLAY_SEQ 1 |
@@ -385,6 +401,7 @@ struct xfrm_mgr | |||
385 | int (*new_mapping)(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); | 401 | int (*new_mapping)(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); |
386 | int (*notify_policy)(struct xfrm_policy *x, int dir, struct km_event *c); | 402 | int (*notify_policy)(struct xfrm_policy *x, int dir, struct km_event *c); |
387 | int (*report)(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr); | 403 | int (*report)(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr); |
404 | int (*migrate)(struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_bundles); | ||
388 | }; | 405 | }; |
389 | 406 | ||
390 | extern int xfrm_register_km(struct xfrm_mgr *km); | 407 | extern int xfrm_register_km(struct xfrm_mgr *km); |
@@ -985,6 +1002,16 @@ extern int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *xdst, | |||
985 | struct flowi *fl, int family, int strict); | 1002 | struct flowi *fl, int family, int strict); |
986 | extern void xfrm_init_pmtu(struct dst_entry *dst); | 1003 | extern void xfrm_init_pmtu(struct dst_entry *dst); |
987 | 1004 | ||
1005 | #ifdef CONFIG_XFRM_MIGRATE | ||
1006 | extern int km_migrate(struct xfrm_selector *sel, u8 dir, u8 type, | ||
1007 | struct xfrm_migrate *m, int num_bundles); | ||
1008 | extern struct xfrm_state * xfrm_migrate_state_find(struct xfrm_migrate *m); | ||
1009 | extern struct xfrm_state * xfrm_state_migrate(struct xfrm_state *x, | ||
1010 | struct xfrm_migrate *m); | ||
1011 | extern int xfrm_migrate(struct xfrm_selector *sel, u8 dir, u8 type, | ||
1012 | struct xfrm_migrate *m, int num_bundles); | ||
1013 | #endif | ||
1014 | |||
988 | extern wait_queue_head_t km_waitq; | 1015 | extern wait_queue_head_t km_waitq; |
989 | extern int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); | 1016 | extern int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); |
990 | extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid); | 1017 | extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid); |
@@ -1050,5 +1077,25 @@ static inline void xfrm_aevent_doreplay(struct xfrm_state *x) | |||
1050 | xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); | 1077 | xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); |
1051 | } | 1078 | } |
1052 | 1079 | ||
1080 | #ifdef CONFIG_XFRM_MIGRATE | ||
1081 | static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) | ||
1082 | { | ||
1083 | return (struct xfrm_algo *)kmemdup(orig, sizeof(*orig) + orig->alg_key_len, GFP_KERNEL); | ||
1084 | } | ||
1085 | |||
1086 | static inline void xfrm_states_put(struct xfrm_state **states, int n) | ||
1087 | { | ||
1088 | int i; | ||
1089 | for (i = 0; i < n; i++) | ||
1090 | xfrm_state_put(*(states + i)); | ||
1091 | } | ||
1092 | |||
1093 | static inline void xfrm_states_delete(struct xfrm_state **states, int n) | ||
1094 | { | ||
1095 | int i; | ||
1096 | for (i = 0; i < n; i++) | ||
1097 | xfrm_state_delete(*(states + i)); | ||
1098 | } | ||
1099 | #endif | ||
1053 | 1100 | ||
1054 | #endif /* _NET_XFRM_H */ | 1101 | #endif /* _NET_XFRM_H */ |
diff --git a/include/scsi/iscsi_proto.h b/include/scsi/iscsi_proto.h index 02f6e4b9e6..4a44278ed7 100644 --- a/include/scsi/iscsi_proto.h +++ b/include/scsi/iscsi_proto.h | |||
@@ -40,6 +40,14 @@ | |||
40 | } | 40 | } |
41 | #define zero_data(p) {p[0]=0;p[1]=0;p[2]=0;} | 41 | #define zero_data(p) {p[0]=0;p[1]=0;p[2]=0;} |
42 | 42 | ||
43 | /* initiator tags; opaque for target */ | ||
44 | typedef uint32_t __bitwise__ itt_t; | ||
45 | /* below makes sense only for initiator that created this tag */ | ||
46 | #define build_itt(itt, id, age) ((__force itt_t)\ | ||
47 | ((itt) | ((id) << ISCSI_CID_SHIFT) | ((age) << ISCSI_AGE_SHIFT))) | ||
48 | #define get_itt(itt) ((__force uint32_t)(itt_t)(itt) & ISCSI_ITT_MASK) | ||
49 | #define RESERVED_ITT ((__force itt_t)0xffffffff) | ||
50 | |||
43 | /* | 51 | /* |
44 | * iSCSI Template Message Header | 52 | * iSCSI Template Message Header |
45 | */ | 53 | */ |
@@ -50,7 +58,7 @@ struct iscsi_hdr { | |||
50 | uint8_t hlength; /* AHSs total length */ | 58 | uint8_t hlength; /* AHSs total length */ |
51 | uint8_t dlength[3]; /* Data length */ | 59 | uint8_t dlength[3]; /* Data length */ |
52 | uint8_t lun[8]; | 60 | uint8_t lun[8]; |
53 | __be32 itt; /* Initiator Task Tag */ | 61 | itt_t itt; /* Initiator Task Tag, opaque for target */ |
54 | __be32 ttt; /* Target Task Tag */ | 62 | __be32 ttt; /* Target Task Tag */ |
55 | __be32 statsn; | 63 | __be32 statsn; |
56 | __be32 exp_statsn; | 64 | __be32 exp_statsn; |
@@ -111,7 +119,7 @@ struct iscsi_cmd { | |||
111 | uint8_t hlength; | 119 | uint8_t hlength; |
112 | uint8_t dlength[3]; | 120 | uint8_t dlength[3]; |
113 | uint8_t lun[8]; | 121 | uint8_t lun[8]; |
114 | __be32 itt; /* Initiator Task Tag */ | 122 | itt_t itt; /* Initiator Task Tag */ |
115 | __be32 data_length; | 123 | __be32 data_length; |
116 | __be32 cmdsn; | 124 | __be32 cmdsn; |
117 | __be32 exp_statsn; | 125 | __be32 exp_statsn; |
@@ -148,7 +156,7 @@ struct iscsi_cmd_rsp { | |||
148 | uint8_t hlength; | 156 | uint8_t hlength; |
149 | uint8_t dlength[3]; | 157 | uint8_t dlength[3]; |
150 | uint8_t rsvd[8]; | 158 | uint8_t rsvd[8]; |
151 | __be32 itt; /* Initiator Task Tag */ | 159 | itt_t itt; /* Initiator Task Tag */ |
152 | __be32 rsvd1; | 160 | __be32 rsvd1; |
153 | __be32 statsn; | 161 | __be32 statsn; |
154 | __be32 exp_cmdsn; | 162 | __be32 exp_cmdsn; |
@@ -206,7 +214,7 @@ struct iscsi_nopout { | |||
206 | uint8_t rsvd3; | 214 | uint8_t rsvd3; |
207 | uint8_t dlength[3]; | 215 | uint8_t dlength[3]; |
208 | uint8_t lun[8]; | 216 | uint8_t lun[8]; |
209 | __be32 itt; /* Initiator Task Tag */ | 217 | itt_t itt; /* Initiator Task Tag */ |
210 | __be32 ttt; /* Target Transfer Tag */ | 218 | __be32 ttt; /* Target Transfer Tag */ |
211 | __be32 cmdsn; | 219 | __be32 cmdsn; |
212 | __be32 exp_statsn; | 220 | __be32 exp_statsn; |
@@ -221,7 +229,7 @@ struct iscsi_nopin { | |||
221 | uint8_t rsvd3; | 229 | uint8_t rsvd3; |
222 | uint8_t dlength[3]; | 230 | uint8_t dlength[3]; |
223 | uint8_t lun[8]; | 231 | uint8_t lun[8]; |
224 | __be32 itt; /* Initiator Task Tag */ | 232 | itt_t itt; /* Initiator Task Tag */ |
225 | __be32 ttt; /* Target Transfer Tag */ | 233 | __be32 ttt; /* Target Transfer Tag */ |
226 | __be32 statsn; | 234 | __be32 statsn; |
227 | __be32 exp_cmdsn; | 235 | __be32 exp_cmdsn; |
@@ -237,8 +245,8 @@ struct iscsi_tm { | |||
237 | uint8_t hlength; | 245 | uint8_t hlength; |
238 | uint8_t dlength[3]; | 246 | uint8_t dlength[3]; |
239 | uint8_t lun[8]; | 247 | uint8_t lun[8]; |
240 | __be32 itt; /* Initiator Task Tag */ | 248 | itt_t itt; /* Initiator Task Tag */ |
241 | __be32 rtt; /* Reference Task Tag */ | 249 | itt_t rtt; /* Reference Task Tag */ |
242 | __be32 cmdsn; | 250 | __be32 cmdsn; |
243 | __be32 exp_statsn; | 251 | __be32 exp_statsn; |
244 | __be32 refcmdsn; | 252 | __be32 refcmdsn; |
@@ -267,8 +275,8 @@ struct iscsi_tm_rsp { | |||
267 | uint8_t hlength; | 275 | uint8_t hlength; |
268 | uint8_t dlength[3]; | 276 | uint8_t dlength[3]; |
269 | uint8_t rsvd2[8]; | 277 | uint8_t rsvd2[8]; |
270 | __be32 itt; /* Initiator Task Tag */ | 278 | itt_t itt; /* Initiator Task Tag */ |
271 | __be32 rtt; /* Reference Task Tag */ | 279 | itt_t rtt; /* Reference Task Tag */ |
272 | __be32 statsn; | 280 | __be32 statsn; |
273 | __be32 exp_cmdsn; | 281 | __be32 exp_cmdsn; |
274 | __be32 max_cmdsn; | 282 | __be32 max_cmdsn; |
@@ -293,7 +301,7 @@ struct iscsi_r2t_rsp { | |||
293 | uint8_t hlength; | 301 | uint8_t hlength; |
294 | uint8_t dlength[3]; | 302 | uint8_t dlength[3]; |
295 | uint8_t lun[8]; | 303 | uint8_t lun[8]; |
296 | __be32 itt; /* Initiator Task Tag */ | 304 | itt_t itt; /* Initiator Task Tag */ |
297 | __be32 ttt; /* Target Transfer Tag */ | 305 | __be32 ttt; /* Target Transfer Tag */ |
298 | __be32 statsn; | 306 | __be32 statsn; |
299 | __be32 exp_cmdsn; | 307 | __be32 exp_cmdsn; |
@@ -311,7 +319,7 @@ struct iscsi_data { | |||
311 | uint8_t rsvd3; | 319 | uint8_t rsvd3; |
312 | uint8_t dlength[3]; | 320 | uint8_t dlength[3]; |
313 | uint8_t lun[8]; | 321 | uint8_t lun[8]; |
314 | __be32 itt; | 322 | itt_t itt; |
315 | __be32 ttt; | 323 | __be32 ttt; |
316 | __be32 rsvd4; | 324 | __be32 rsvd4; |
317 | __be32 exp_statsn; | 325 | __be32 exp_statsn; |
@@ -331,7 +339,7 @@ struct iscsi_data_rsp { | |||
331 | uint8_t hlength; | 339 | uint8_t hlength; |
332 | uint8_t dlength[3]; | 340 | uint8_t dlength[3]; |
333 | uint8_t lun[8]; | 341 | uint8_t lun[8]; |
334 | __be32 itt; | 342 | itt_t itt; |
335 | __be32 ttt; | 343 | __be32 ttt; |
336 | __be32 statsn; | 344 | __be32 statsn; |
337 | __be32 exp_cmdsn; | 345 | __be32 exp_cmdsn; |
@@ -355,7 +363,7 @@ struct iscsi_text { | |||
355 | uint8_t hlength; | 363 | uint8_t hlength; |
356 | uint8_t dlength[3]; | 364 | uint8_t dlength[3]; |
357 | uint8_t rsvd4[8]; | 365 | uint8_t rsvd4[8]; |
358 | __be32 itt; | 366 | itt_t itt; |
359 | __be32 ttt; | 367 | __be32 ttt; |
360 | __be32 cmdsn; | 368 | __be32 cmdsn; |
361 | __be32 exp_statsn; | 369 | __be32 exp_statsn; |
@@ -373,7 +381,7 @@ struct iscsi_text_rsp { | |||
373 | uint8_t hlength; | 381 | uint8_t hlength; |
374 | uint8_t dlength[3]; | 382 | uint8_t dlength[3]; |
375 | uint8_t rsvd4[8]; | 383 | uint8_t rsvd4[8]; |
376 | __be32 itt; | 384 | itt_t itt; |
377 | __be32 ttt; | 385 | __be32 ttt; |
378 | __be32 statsn; | 386 | __be32 statsn; |
379 | __be32 exp_cmdsn; | 387 | __be32 exp_cmdsn; |
@@ -392,7 +400,7 @@ struct iscsi_login { | |||
392 | uint8_t dlength[3]; | 400 | uint8_t dlength[3]; |
393 | uint8_t isid[6]; /* Initiator Session ID */ | 401 | uint8_t isid[6]; /* Initiator Session ID */ |
394 | __be16 tsih; /* Target Session Handle */ | 402 | __be16 tsih; /* Target Session Handle */ |
395 | __be32 itt; /* Initiator Task Tag */ | 403 | itt_t itt; /* Initiator Task Tag */ |
396 | __be16 cid; | 404 | __be16 cid; |
397 | __be16 rsvd3; | 405 | __be16 rsvd3; |
398 | __be32 cmdsn; | 406 | __be32 cmdsn; |
@@ -421,7 +429,7 @@ struct iscsi_login_rsp { | |||
421 | uint8_t dlength[3]; | 429 | uint8_t dlength[3]; |
422 | uint8_t isid[6]; /* Initiator Session ID */ | 430 | uint8_t isid[6]; /* Initiator Session ID */ |
423 | __be16 tsih; /* Target Session Handle */ | 431 | __be16 tsih; /* Target Session Handle */ |
424 | __be32 itt; /* Initiator Task Tag */ | 432 | itt_t itt; /* Initiator Task Tag */ |
425 | __be32 rsvd3; | 433 | __be32 rsvd3; |
426 | __be32 statsn; | 434 | __be32 statsn; |
427 | __be32 exp_cmdsn; | 435 | __be32 exp_cmdsn; |
@@ -478,7 +486,7 @@ struct iscsi_logout { | |||
478 | uint8_t hlength; | 486 | uint8_t hlength; |
479 | uint8_t dlength[3]; | 487 | uint8_t dlength[3]; |
480 | uint8_t rsvd2[8]; | 488 | uint8_t rsvd2[8]; |
481 | __be32 itt; /* Initiator Task Tag */ | 489 | itt_t itt; /* Initiator Task Tag */ |
482 | __be16 cid; | 490 | __be16 cid; |
483 | uint8_t rsvd3[2]; | 491 | uint8_t rsvd3[2]; |
484 | __be32 cmdsn; | 492 | __be32 cmdsn; |
@@ -505,7 +513,7 @@ struct iscsi_logout_rsp { | |||
505 | uint8_t hlength; | 513 | uint8_t hlength; |
506 | uint8_t dlength[3]; | 514 | uint8_t dlength[3]; |
507 | uint8_t rsvd3[8]; | 515 | uint8_t rsvd3[8]; |
508 | __be32 itt; /* Initiator Task Tag */ | 516 | itt_t itt; /* Initiator Task Tag */ |
509 | __be32 rsvd4; | 517 | __be32 rsvd4; |
510 | __be32 statsn; | 518 | __be32 statsn; |
511 | __be32 exp_cmdsn; | 519 | __be32 exp_cmdsn; |
@@ -528,7 +536,7 @@ struct iscsi_snack { | |||
528 | uint8_t opcode; | 536 | uint8_t opcode; |
529 | uint8_t flags; | 537 | uint8_t flags; |
530 | uint8_t rsvd2[14]; | 538 | uint8_t rsvd2[14]; |
531 | __be32 itt; | 539 | itt_t itt; |
532 | __be32 begrun; | 540 | __be32 begrun; |
533 | __be32 runlength; | 541 | __be32 runlength; |
534 | __be32 exp_statsn; | 542 | __be32 exp_statsn; |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 0c775fceb6..ad0182ef78 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -323,12 +323,20 @@ struct sas_ha_event { | |||
323 | struct sas_ha_struct *ha; | 323 | struct sas_ha_struct *ha; |
324 | }; | 324 | }; |
325 | 325 | ||
326 | enum sas_ha_state { | ||
327 | SAS_HA_REGISTERED, | ||
328 | SAS_HA_UNREGISTERED | ||
329 | }; | ||
330 | |||
326 | struct sas_ha_struct { | 331 | struct sas_ha_struct { |
327 | /* private: */ | 332 | /* private: */ |
328 | spinlock_t event_lock; | 333 | spinlock_t event_lock; |
329 | struct sas_ha_event ha_events[HA_NUM_EVENTS]; | 334 | struct sas_ha_event ha_events[HA_NUM_EVENTS]; |
330 | unsigned long pending; | 335 | unsigned long pending; |
331 | 336 | ||
337 | enum sas_ha_state state; | ||
338 | spinlock_t state_lock; | ||
339 | |||
332 | struct scsi_core core; | 340 | struct scsi_core core; |
333 | 341 | ||
334 | /* public: */ | 342 | /* public: */ |
@@ -553,15 +561,15 @@ struct sas_task { | |||
553 | #define SAS_TASK_STATE_PENDING 1 | 561 | #define SAS_TASK_STATE_PENDING 1 |
554 | #define SAS_TASK_STATE_DONE 2 | 562 | #define SAS_TASK_STATE_DONE 2 |
555 | #define SAS_TASK_STATE_ABORTED 4 | 563 | #define SAS_TASK_STATE_ABORTED 4 |
556 | #define SAS_TASK_INITIATOR_ABORTED 8 | 564 | #define SAS_TASK_NEED_DEV_RESET 8 |
565 | #define SAS_TASK_AT_INITIATOR 16 | ||
557 | 566 | ||
558 | static inline struct sas_task *sas_alloc_task(gfp_t flags) | 567 | static inline struct sas_task *sas_alloc_task(gfp_t flags) |
559 | { | 568 | { |
560 | extern struct kmem_cache *sas_task_cache; | 569 | extern struct kmem_cache *sas_task_cache; |
561 | struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags); | 570 | struct sas_task *task = kmem_cache_zalloc(sas_task_cache, flags); |
562 | 571 | ||
563 | if (task) { | 572 | if (task) { |
564 | memset(task, 0, sizeof(*task)); | ||
565 | INIT_LIST_HEAD(&task->list); | 573 | INIT_LIST_HEAD(&task->list); |
566 | spin_lock_init(&task->task_state_lock); | 574 | spin_lock_init(&task->task_state_lock); |
567 | task->task_state_flags = SAS_TASK_STATE_PENDING; | 575 | task->task_state_flags = SAS_TASK_STATE_PENDING; |
@@ -613,6 +621,9 @@ struct sas_domain_function_template { | |||
613 | extern int sas_register_ha(struct sas_ha_struct *); | 621 | extern int sas_register_ha(struct sas_ha_struct *); |
614 | extern int sas_unregister_ha(struct sas_ha_struct *); | 622 | extern int sas_unregister_ha(struct sas_ha_struct *); |
615 | 623 | ||
624 | int sas_set_phy_speed(struct sas_phy *phy, | ||
625 | struct sas_phy_linkrates *rates); | ||
626 | int sas_phy_enable(struct sas_phy *phy, int enabled); | ||
616 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); | 627 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); |
617 | extern int sas_queuecommand(struct scsi_cmnd *, | 628 | extern int sas_queuecommand(struct scsi_cmnd *, |
618 | void (*scsi_done)(struct scsi_cmnd *)); | 629 | void (*scsi_done)(struct scsi_cmnd *)); |
@@ -646,6 +657,9 @@ void sas_unregister_dev(struct domain_device *); | |||
646 | 657 | ||
647 | void sas_init_dev(struct domain_device *); | 658 | void sas_init_dev(struct domain_device *); |
648 | 659 | ||
649 | void sas_task_abort(struct work_struct *); | 660 | void sas_task_abort(struct sas_task *); |
661 | int __sas_task_abort(struct sas_task *); | ||
662 | int sas_eh_device_reset_handler(struct scsi_cmnd *cmd); | ||
663 | int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd); | ||
650 | 664 | ||
651 | #endif /* _SASLIB_H_ */ | 665 | #endif /* _SASLIB_H_ */ |
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 59633a82de..9aedc19820 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h | |||
@@ -54,6 +54,7 @@ struct sas_identify { | |||
54 | struct sas_phy { | 54 | struct sas_phy { |
55 | struct device dev; | 55 | struct device dev; |
56 | int number; | 56 | int number; |
57 | int enabled; | ||
57 | 58 | ||
58 | /* phy identification */ | 59 | /* phy identification */ |
59 | struct sas_identify identify; | 60 | struct sas_identify identify; |
@@ -163,6 +164,7 @@ struct sas_function_template { | |||
163 | int (*get_enclosure_identifier)(struct sas_rphy *, u64 *); | 164 | int (*get_enclosure_identifier)(struct sas_rphy *, u64 *); |
164 | int (*get_bay_identifier)(struct sas_rphy *); | 165 | int (*get_bay_identifier)(struct sas_rphy *); |
165 | int (*phy_reset)(struct sas_phy *, int); | 166 | int (*phy_reset)(struct sas_phy *, int); |
167 | int (*phy_enable)(struct sas_phy *, int); | ||
166 | int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *); | 168 | int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *); |
167 | }; | 169 | }; |
168 | 170 | ||
@@ -180,6 +182,7 @@ extern struct sas_rphy *sas_end_device_alloc(struct sas_port *); | |||
180 | extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); | 182 | extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); |
181 | void sas_rphy_free(struct sas_rphy *); | 183 | void sas_rphy_free(struct sas_rphy *); |
182 | extern int sas_rphy_add(struct sas_rphy *); | 184 | extern int sas_rphy_add(struct sas_rphy *); |
185 | extern void sas_rphy_remove(struct sas_rphy *); | ||
183 | extern void sas_rphy_delete(struct sas_rphy *); | 186 | extern void sas_rphy_delete(struct sas_rphy *); |
184 | extern int scsi_is_sas_rphy(const struct device *); | 187 | extern int scsi_is_sas_rphy(const struct device *); |
185 | 188 | ||
diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index da180f7384..286e9628ed 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h | |||
@@ -85,6 +85,7 @@ struct spi_host_attrs { | |||
85 | #define spi_pcomp_en(x) (((struct spi_transport_attrs *)&(x)->starget_data)->pcomp_en) | 85 | #define spi_pcomp_en(x) (((struct spi_transport_attrs *)&(x)->starget_data)->pcomp_en) |
86 | #define spi_hold_mcs(x) (((struct spi_transport_attrs *)&(x)->starget_data)->hold_mcs) | 86 | #define spi_hold_mcs(x) (((struct spi_transport_attrs *)&(x)->starget_data)->hold_mcs) |
87 | #define spi_initial_dv(x) (((struct spi_transport_attrs *)&(x)->starget_data)->initial_dv) | 87 | #define spi_initial_dv(x) (((struct spi_transport_attrs *)&(x)->starget_data)->initial_dv) |
88 | #define spi_dv_pending(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_pending) | ||
88 | 89 | ||
89 | #define spi_support_sync(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_sync) | 90 | #define spi_support_sync(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_sync) |
90 | #define spi_support_wide(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_wide) | 91 | #define spi_support_wide(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_wide) |
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index 33720397a9..246ac23534 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h | |||
@@ -375,6 +375,7 @@ | |||
375 | #define AC97_SCAP_DETECT_BY_VENDOR (1<<8) /* use vendor registers for read tests */ | 375 | #define AC97_SCAP_DETECT_BY_VENDOR (1<<8) /* use vendor registers for read tests */ |
376 | #define AC97_SCAP_NO_SPDIF (1<<9) /* don't build SPDIF controls */ | 376 | #define AC97_SCAP_NO_SPDIF (1<<9) /* don't build SPDIF controls */ |
377 | #define AC97_SCAP_EAPD_LED (1<<10) /* EAPD as mute LED */ | 377 | #define AC97_SCAP_EAPD_LED (1<<10) /* EAPD as mute LED */ |
378 | #define AC97_SCAP_POWER_SAVE (1<<11) /* capable for aggresive power-saving */ | ||
378 | 379 | ||
379 | /* ac97->flags */ | 380 | /* ac97->flags */ |
380 | #define AC97_HAS_PC_BEEP (1<<0) /* force PC Speaker usage */ | 381 | #define AC97_HAS_PC_BEEP (1<<0) /* force PC Speaker usage */ |
@@ -425,6 +426,7 @@ struct snd_ac97_build_ops { | |||
425 | 426 | ||
426 | struct snd_ac97_bus_ops { | 427 | struct snd_ac97_bus_ops { |
427 | void (*reset) (struct snd_ac97 *ac97); | 428 | void (*reset) (struct snd_ac97 *ac97); |
429 | void (*warm_reset)(struct snd_ac97 *ac97); | ||
428 | void (*write) (struct snd_ac97 *ac97, unsigned short reg, unsigned short val); | 430 | void (*write) (struct snd_ac97 *ac97, unsigned short reg, unsigned short val); |
429 | unsigned short (*read) (struct snd_ac97 *ac97, unsigned short reg); | 431 | unsigned short (*read) (struct snd_ac97 *ac97, unsigned short reg); |
430 | void (*wait) (struct snd_ac97 *ac97); | 432 | void (*wait) (struct snd_ac97 *ac97); |
@@ -501,6 +503,7 @@ struct snd_ac97 { | |||
501 | unsigned short id[3]; // codec IDs (lower 16-bit word) | 503 | unsigned short id[3]; // codec IDs (lower 16-bit word) |
502 | unsigned short pcmreg[3]; // PCM registers | 504 | unsigned short pcmreg[3]; // PCM registers |
503 | unsigned short codec_cfg[3]; // CODEC_CFG bits | 505 | unsigned short codec_cfg[3]; // CODEC_CFG bits |
506 | unsigned char swap_mic_linein; // AD1986/AD1986A only | ||
504 | } ad18xx; | 507 | } ad18xx; |
505 | unsigned int dev_flags; /* device specific */ | 508 | unsigned int dev_flags; /* device specific */ |
506 | } spec; | 509 | } spec; |
@@ -510,7 +513,6 @@ struct snd_ac97 { | |||
510 | 513 | ||
511 | #ifdef CONFIG_SND_AC97_POWER_SAVE | 514 | #ifdef CONFIG_SND_AC97_POWER_SAVE |
512 | unsigned int power_up; /* power states */ | 515 | unsigned int power_up; /* power states */ |
513 | struct workqueue_struct *power_workq; | ||
514 | struct delayed_work power_work; | 516 | struct delayed_work power_work; |
515 | #endif | 517 | #endif |
516 | struct device dev; | 518 | struct device dev; |
diff --git a/include/sound/ad1848.h b/include/sound/ad1848.h index c8de6f8333..b2c3f00a9b 100644 --- a/include/sound/ad1848.h +++ b/include/sound/ad1848.h | |||
@@ -185,7 +185,7 @@ struct ad1848_mix_elem { | |||
185 | int index; | 185 | int index; |
186 | int type; | 186 | int type; |
187 | unsigned long private_value; | 187 | unsigned long private_value; |
188 | unsigned int *tlv; | 188 | const unsigned int *tlv; |
189 | }; | 189 | }; |
190 | 190 | ||
191 | #define AD1848_SINGLE(xname, xindex, reg, shift, mask, invert) \ | 191 | #define AD1848_SINGLE(xname, xindex, reg, shift, mask, invert) \ |
diff --git a/include/sound/ak4114.h b/include/sound/ak4114.h index 2ee061625f..c149d3b255 100644 --- a/include/sound/ak4114.h +++ b/include/sound/ak4114.h | |||
@@ -181,7 +181,6 @@ struct ak4114 { | |||
181 | unsigned long ccrc_errors; | 181 | unsigned long ccrc_errors; |
182 | unsigned char rcs0; | 182 | unsigned char rcs0; |
183 | unsigned char rcs1; | 183 | unsigned char rcs1; |
184 | struct workqueue_struct *workqueue; | ||
185 | struct delayed_work work; | 184 | struct delayed_work work; |
186 | void *change_callback_private; | 185 | void *change_callback_private; |
187 | void (*change_callback)(struct ak4114 *ak4114, unsigned char c0, unsigned char c1); | 186 | void (*change_callback)(struct ak4114 *ak4114, unsigned char c0, unsigned char c1); |
@@ -189,7 +188,7 @@ struct ak4114 { | |||
189 | 188 | ||
190 | int snd_ak4114_create(struct snd_card *card, | 189 | int snd_ak4114_create(struct snd_card *card, |
191 | ak4114_read_t *read, ak4114_write_t *write, | 190 | ak4114_read_t *read, ak4114_write_t *write, |
192 | unsigned char pgm[7], unsigned char txcsb[5], | 191 | const unsigned char pgm[7], const unsigned char txcsb[5], |
193 | void *private_data, struct ak4114 **r_ak4114); | 192 | void *private_data, struct ak4114 **r_ak4114); |
194 | void snd_ak4114_reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char mask, unsigned char val); | 193 | void snd_ak4114_reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char mask, unsigned char val); |
195 | void snd_ak4114_reinit(struct ak4114 *ak4114); | 194 | void snd_ak4114_reinit(struct ak4114 *ak4114); |
diff --git a/include/sound/ak4117.h b/include/sound/ak4117.h index 2b96c32f06..d650d52e3d 100644 --- a/include/sound/ak4117.h +++ b/include/sound/ak4117.h | |||
@@ -178,7 +178,7 @@ struct ak4117 { | |||
178 | }; | 178 | }; |
179 | 179 | ||
180 | int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t *write, | 180 | int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t *write, |
181 | unsigned char pgm[5], void *private_data, struct ak4117 **r_ak4117); | 181 | const unsigned char pgm[5], void *private_data, struct ak4117 **r_ak4117); |
182 | void snd_ak4117_reg_write(struct ak4117 *ak4117, unsigned char reg, unsigned char mask, unsigned char val); | 182 | void snd_ak4117_reg_write(struct ak4117 *ak4117, unsigned char reg, unsigned char mask, unsigned char val); |
183 | void snd_ak4117_reinit(struct ak4117 *ak4117); | 183 | void snd_ak4117_reinit(struct ak4117 *ak4117); |
184 | int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *capture_substream); | 184 | int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *capture_substream); |
diff --git a/include/sound/ak4xxx-adda.h b/include/sound/ak4xxx-adda.h index d0deca669b..aa49dda4f4 100644 --- a/include/sound/ak4xxx-adda.h +++ b/include/sound/ak4xxx-adda.h | |||
@@ -50,6 +50,8 @@ struct snd_akm4xxx_adc_channel { | |||
50 | char *name; /* capture gain volume label */ | 50 | char *name; /* capture gain volume label */ |
51 | char *switch_name; /* capture switch */ | 51 | char *switch_name; /* capture switch */ |
52 | unsigned int num_channels; | 52 | unsigned int num_channels; |
53 | char *selector_name; /* capture source select label */ | ||
54 | const char **input_names; /* capture source names (NULL terminated) */ | ||
53 | }; | 55 | }; |
54 | 56 | ||
55 | struct snd_akm4xxx { | 57 | struct snd_akm4xxx { |
@@ -69,8 +71,8 @@ struct snd_akm4xxx { | |||
69 | } type; | 71 | } type; |
70 | 72 | ||
71 | /* (array) information of combined codecs */ | 73 | /* (array) information of combined codecs */ |
72 | struct snd_akm4xxx_dac_channel *dac_info; | 74 | const struct snd_akm4xxx_dac_channel *dac_info; |
73 | struct snd_akm4xxx_adc_channel *adc_info; | 75 | const struct snd_akm4xxx_adc_channel *adc_info; |
74 | 76 | ||
75 | struct snd_ak4xxx_ops ops; | 77 | struct snd_ak4xxx_ops ops; |
76 | }; | 78 | }; |
diff --git a/include/sound/control.h b/include/sound/control.h index 1de148b0fd..72e759f619 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -49,7 +49,7 @@ struct snd_kcontrol_new { | |||
49 | snd_kcontrol_put_t *put; | 49 | snd_kcontrol_put_t *put; |
50 | union { | 50 | union { |
51 | snd_kcontrol_tlv_rw_t *c; | 51 | snd_kcontrol_tlv_rw_t *c; |
52 | unsigned int *p; | 52 | const unsigned int *p; |
53 | } tlv; | 53 | } tlv; |
54 | unsigned long private_value; | 54 | unsigned long private_value; |
55 | }; | 55 | }; |
@@ -69,7 +69,7 @@ struct snd_kcontrol { | |||
69 | snd_kcontrol_put_t *put; | 69 | snd_kcontrol_put_t *put; |
70 | union { | 70 | union { |
71 | snd_kcontrol_tlv_rw_t *c; | 71 | snd_kcontrol_tlv_rw_t *c; |
72 | unsigned int *p; | 72 | const unsigned int *p; |
73 | } tlv; | 73 | } tlv; |
74 | unsigned long private_value; | 74 | unsigned long private_value; |
75 | void *private_data; | 75 | void *private_data; |
@@ -108,7 +108,6 @@ typedef int (*snd_kctl_ioctl_func_t) (struct snd_card * card, | |||
108 | 108 | ||
109 | void snd_ctl_notify(struct snd_card * card, unsigned int mask, struct snd_ctl_elem_id * id); | 109 | void snd_ctl_notify(struct snd_card * card, unsigned int mask, struct snd_ctl_elem_id * id); |
110 | 110 | ||
111 | struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol * kcontrol, unsigned int access); | ||
112 | struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new * kcontrolnew, void * private_data); | 111 | struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new * kcontrolnew, void * private_data); |
113 | void snd_ctl_free_one(struct snd_kcontrol * kcontrol); | 112 | void snd_ctl_free_one(struct snd_kcontrol * kcontrol); |
114 | int snd_ctl_add(struct snd_card * card, struct snd_kcontrol * kcontrol); | 113 | int snd_ctl_add(struct snd_card * card, struct snd_kcontrol * kcontrol); |
diff --git a/include/sound/core.h b/include/sound/core.h index 521f036cce..4b9e609975 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -211,9 +211,40 @@ extern struct class *sound_class; | |||
211 | 211 | ||
212 | void snd_request_card(int card); | 212 | void snd_request_card(int card); |
213 | 213 | ||
214 | int snd_register_device(int type, struct snd_card *card, int dev, | 214 | int snd_register_device_for_dev(int type, struct snd_card *card, |
215 | const struct file_operations *f_ops, void *private_data, | 215 | int dev, |
216 | const char *name); | 216 | const struct file_operations *f_ops, |
217 | void *private_data, | ||
218 | const char *name, | ||
219 | struct device *device); | ||
220 | |||
221 | /** | ||
222 | * snd_register_device - Register the ALSA device file for the card | ||
223 | * @type: the device type, SNDRV_DEVICE_TYPE_XXX | ||
224 | * @card: the card instance | ||
225 | * @dev: the device index | ||
226 | * @f_ops: the file operations | ||
227 | * @private_data: user pointer for f_ops->open() | ||
228 | * @name: the device file name | ||
229 | * | ||
230 | * Registers an ALSA device file for the given card. | ||
231 | * The operators have to be set in reg parameter. | ||
232 | * | ||
233 | * This function uses the card's device pointer to link to the | ||
234 | * correct &struct device. | ||
235 | * | ||
236 | * Returns zero if successful, or a negative error code on failure. | ||
237 | */ | ||
238 | static inline int snd_register_device(int type, struct snd_card *card, int dev, | ||
239 | const struct file_operations *f_ops, | ||
240 | void *private_data, | ||
241 | const char *name) | ||
242 | { | ||
243 | return snd_register_device_for_dev(type, card, dev, f_ops, | ||
244 | private_data, name, | ||
245 | snd_card_get_device_link(card)); | ||
246 | } | ||
247 | |||
217 | int snd_unregister_device(int type, struct snd_card *card, int dev); | 248 | int snd_unregister_device(int type, struct snd_card *card, int dev); |
218 | void *snd_lookup_minor_data(unsigned int minor, int type); | 249 | void *snd_lookup_minor_data(unsigned int minor, int type); |
219 | int snd_add_device_sysfs_file(int type, struct snd_card *card, int dev, | 250 | int snd_add_device_sysfs_file(int type, struct snd_card *card, int dev, |
@@ -396,6 +427,29 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
396 | #endif | 427 | #endif |
397 | #endif | 428 | #endif |
398 | 429 | ||
399 | #include "typedefs.h" | 430 | /* PCI quirk list helper */ |
431 | struct snd_pci_quirk { | ||
432 | unsigned short subvendor; /* PCI subvendor ID */ | ||
433 | unsigned short subdevice; /* PCI subdevice ID */ | ||
434 | int value; /* value */ | ||
435 | #ifdef CONFIG_SND_DEBUG_DETECT | ||
436 | const char *name; /* name of the device (optional) */ | ||
437 | #endif | ||
438 | }; | ||
439 | |||
440 | #define _SND_PCI_QUIRK_ID(vend,dev) \ | ||
441 | .subvendor = (vend), .subdevice = (dev) | ||
442 | #define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)} | ||
443 | #ifdef CONFIG_SND_DEBUG_DETECT | ||
444 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ | ||
445 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)} | ||
446 | #else | ||
447 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ | ||
448 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val)} | ||
449 | #endif | ||
450 | |||
451 | const struct snd_pci_quirk * | ||
452 | snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list); | ||
453 | |||
400 | 454 | ||
401 | #endif /* __SOUND_CORE_H */ | 455 | #endif /* __SOUND_CORE_H */ |
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 3d3c1514cf..eb7ce96ddf 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h | |||
@@ -188,7 +188,35 @@ | |||
188 | #define HCFG_LEGACYINT 0x00200000 /* 1 = legacy event captured. Write 1 to clear. */ | 188 | #define HCFG_LEGACYINT 0x00200000 /* 1 = legacy event captured. Write 1 to clear. */ |
189 | /* NOTE: The rest of the bits in this register */ | 189 | /* NOTE: The rest of the bits in this register */ |
190 | /* _are_ relevant under Linux. */ | 190 | /* _are_ relevant under Linux. */ |
191 | #define HCFG_CODECFORMAT_MASK 0x00070000 /* CODEC format */ | 191 | #define HCFG_PUSH_BUTTON_ENABLE 0x00100000 /* Enables Volume Inc/Dec and Mute functions */ |
192 | #define HCFG_BAUD_RATE 0x00080000 /* 0 = 48kHz, 1 = 44.1kHz */ | ||
193 | #define HCFG_EXPANDED_MEM 0x00040000 /* 1 = any 16M of 4G addr, 0 = 32M of 2G addr */ | ||
194 | #define HCFG_CODECFORMAT_MASK 0x00030000 /* CODEC format */ | ||
195 | |||
196 | /* Specific to Alice2, CA0102 */ | ||
197 | #define HCFG_CODECFORMAT_AC97_1 0x00000000 /* AC97 CODEC format -- Ver 1.03 */ | ||
198 | #define HCFG_CODECFORMAT_AC97_2 0x00010000 /* AC97 CODEC format -- Ver 2.1 */ | ||
199 | #define HCFG_AUTOMUTE_ASYNC 0x00008000 /* When set, the async sample rate convertors */ | ||
200 | /* will automatically mute their output when */ | ||
201 | /* they are not rate-locked to the external */ | ||
202 | /* async audio source */ | ||
203 | #define HCFG_AUTOMUTE_SPDIF 0x00004000 /* When set, the async sample rate convertors */ | ||
204 | /* will automatically mute their output when */ | ||
205 | /* the SPDIF V-bit indicates invalid audio */ | ||
206 | #define HCFG_EMU32_SLAVE 0x00002000 /* 0 = Master, 1 = Slave. Slave for EMU1010 */ | ||
207 | #define HCFG_SLOW_RAMP 0x00001000 /* Increases Send Smoothing time constant */ | ||
208 | /* 0x00000800 not used on Alice2 */ | ||
209 | #define HCFG_PHASE_TRACK_MASK 0x00000700 /* When set, forces corresponding input to */ | ||
210 | /* phase track the previous input. */ | ||
211 | /* I2S0 can phase track the last S/PDIF input */ | ||
212 | #define HCFG_I2S_ASRC_ENABLE 0x00000070 /* When set, enables asynchronous sample rate */ | ||
213 | /* conversion for the corresponding */ | ||
214 | /* I2S format input */ | ||
215 | /* Rest of HCFG 0x0000000f same as below. LOCKSOUNDCACHE etc. */ | ||
216 | |||
217 | |||
218 | |||
219 | /* Older chips */ | ||
192 | #define HCFG_CODECFORMAT_AC97 0x00000000 /* AC97 CODEC format -- Primary Output */ | 220 | #define HCFG_CODECFORMAT_AC97 0x00000000 /* AC97 CODEC format -- Primary Output */ |
193 | #define HCFG_CODECFORMAT_I2S 0x00010000 /* I2S CODEC format -- Secondary (Rear) Output */ | 221 | #define HCFG_CODECFORMAT_I2S 0x00010000 /* I2S CODEC format -- Secondary (Rear) Output */ |
194 | #define HCFG_GPINPUT0 0x00004000 /* External pin112 */ | 222 | #define HCFG_GPINPUT0 0x00004000 /* External pin112 */ |
@@ -432,6 +460,7 @@ | |||
432 | #define FXRT_CHANNELC 0x0f000000 /* Effects send bus number for channel's effects send C */ | 460 | #define FXRT_CHANNELC 0x0f000000 /* Effects send bus number for channel's effects send C */ |
433 | #define FXRT_CHANNELD 0xf0000000 /* Effects send bus number for channel's effects send D */ | 461 | #define FXRT_CHANNELD 0xf0000000 /* Effects send bus number for channel's effects send D */ |
434 | 462 | ||
463 | #define A_HR 0x0b /* High Resolution. 24bit playback from host to DSP. */ | ||
435 | #define MAPA 0x0c /* Cache map A */ | 464 | #define MAPA 0x0c /* Cache map A */ |
436 | 465 | ||
437 | #define MAPB 0x0d /* Cache map B */ | 466 | #define MAPB 0x0d /* Cache map B */ |
@@ -439,6 +468,8 @@ | |||
439 | #define MAP_PTE_MASK 0xffffe000 /* The 19 MSBs of the PTE indexed by the PTI */ | 468 | #define MAP_PTE_MASK 0xffffe000 /* The 19 MSBs of the PTE indexed by the PTI */ |
440 | #define MAP_PTI_MASK 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */ | 469 | #define MAP_PTI_MASK 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */ |
441 | 470 | ||
471 | /* 0x0e, 0x0f: Not used */ | ||
472 | |||
442 | #define ENVVOL 0x10 /* Volume envelope register */ | 473 | #define ENVVOL 0x10 /* Volume envelope register */ |
443 | #define ENVVOL_MASK 0x0000ffff /* Current value of volume envelope state variable */ | 474 | #define ENVVOL_MASK 0x0000ffff /* Current value of volume envelope state variable */ |
444 | /* 0x8000-n == 666*n usec delay */ | 475 | /* 0x8000-n == 666*n usec delay */ |
@@ -527,7 +558,7 @@ | |||
527 | /* NOTE: All channels contain internal variables; do */ | 558 | /* NOTE: All channels contain internal variables; do */ |
528 | /* not write to these locations. */ | 559 | /* not write to these locations. */ |
529 | 560 | ||
530 | /* 1f something */ | 561 | /* 0x1f: not used */ |
531 | 562 | ||
532 | #define CD0 0x20 /* Cache data 0 register */ | 563 | #define CD0 0x20 /* Cache data 0 register */ |
533 | #define CD1 0x21 /* Cache data 1 register */ | 564 | #define CD1 0x21 /* Cache data 1 register */ |
@@ -597,6 +628,8 @@ | |||
597 | #define FXWC_SPDIFLEFT (1<<22) /* 0x00400000 */ | 628 | #define FXWC_SPDIFLEFT (1<<22) /* 0x00400000 */ |
598 | #define FXWC_SPDIFRIGHT (1<<23) /* 0x00800000 */ | 629 | #define FXWC_SPDIFRIGHT (1<<23) /* 0x00800000 */ |
599 | 630 | ||
631 | #define A_TBLSZ ` 0x43 /* Effects Tank Internal Table Size. Only low byte or register used */ | ||
632 | |||
600 | #define TCBS 0x44 /* Tank cache buffer size register */ | 633 | #define TCBS 0x44 /* Tank cache buffer size register */ |
601 | #define TCBS_MASK 0x00000007 /* Tank cache buffer size field */ | 634 | #define TCBS_MASK 0x00000007 /* Tank cache buffer size field */ |
602 | #define TCBS_BUFFSIZE_16K 0x00000000 | 635 | #define TCBS_BUFFSIZE_16K 0x00000000 |
@@ -617,7 +650,7 @@ | |||
617 | #define FXBA 0x47 /* FX Buffer Address */ | 650 | #define FXBA 0x47 /* FX Buffer Address */ |
618 | #define FXBA_MASK 0xfffff000 /* 20 bit base address */ | 651 | #define FXBA_MASK 0xfffff000 /* 20 bit base address */ |
619 | 652 | ||
620 | /* 0x48 something - word access, defaults to 3f */ | 653 | #define A_HWM 0x48 /* High PCI Water Mark - word access, defaults to 3f */ |
621 | 654 | ||
622 | #define MICBS 0x49 /* Microphone buffer size register */ | 655 | #define MICBS 0x49 /* Microphone buffer size register */ |
623 | 656 | ||
@@ -661,6 +694,18 @@ | |||
661 | #define ADCBS_BUFSIZE_57344 0x0000001e | 694 | #define ADCBS_BUFSIZE_57344 0x0000001e |
662 | #define ADCBS_BUFSIZE_65536 0x0000001f | 695 | #define ADCBS_BUFSIZE_65536 0x0000001f |
663 | 696 | ||
697 | /* Current Send B, A Amounts */ | ||
698 | #define A_CSBA 0x4c | ||
699 | |||
700 | /* Current Send D, C Amounts */ | ||
701 | #define A_CSDC 0x4d | ||
702 | |||
703 | /* Current Send F, E Amounts */ | ||
704 | #define A_CSFE 0x4e | ||
705 | |||
706 | /* Current Send H, G Amounts */ | ||
707 | #define A_CSHG 0x4f | ||
708 | |||
664 | 709 | ||
665 | #define CDCS 0x50 /* CD-ROM digital channel status register */ | 710 | #define CDCS 0x50 /* CD-ROM digital channel status register */ |
666 | 711 | ||
@@ -668,6 +713,9 @@ | |||
668 | 713 | ||
669 | #define DBG 0x52 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */ | 714 | #define DBG 0x52 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */ |
670 | 715 | ||
716 | /* S/PDIF Input C Channel Status */ | ||
717 | #define A_SPSC 0x52 | ||
718 | |||
671 | #define REG53 0x53 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */ | 719 | #define REG53 0x53 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */ |
672 | 720 | ||
673 | #define A_DBG 0x53 | 721 | #define A_DBG 0x53 |
@@ -708,6 +756,8 @@ | |||
708 | #define SPCS_NOTAUDIODATA 0x00000002 /* 0 = Digital audio, 1 = not audio */ | 756 | #define SPCS_NOTAUDIODATA 0x00000002 /* 0 = Digital audio, 1 = not audio */ |
709 | #define SPCS_PROFESSIONAL 0x00000001 /* 0 = Consumer (IEC-958), 1 = pro (AES3-1992) */ | 757 | #define SPCS_PROFESSIONAL 0x00000001 /* 0 = Consumer (IEC-958), 1 = pro (AES3-1992) */ |
710 | 758 | ||
759 | /* 0x57: Not used */ | ||
760 | |||
711 | /* The 32-bit CLIx and SOLx registers all have one bit per channel control/status */ | 761 | /* The 32-bit CLIx and SOLx registers all have one bit per channel control/status */ |
712 | #define CLIEL 0x58 /* Channel loop interrupt enable low register */ | 762 | #define CLIEL 0x58 /* Channel loop interrupt enable low register */ |
713 | 763 | ||
@@ -733,6 +783,9 @@ | |||
733 | #define AC97SLOT_CNTR 0x10 /* Center enable */ | 783 | #define AC97SLOT_CNTR 0x10 /* Center enable */ |
734 | #define AC97SLOT_LFE 0x20 /* LFE enable */ | 784 | #define AC97SLOT_LFE 0x20 /* LFE enable */ |
735 | 785 | ||
786 | /* PCB Revision */ | ||
787 | #define A_PCB 0x5f | ||
788 | |||
736 | // NOTE: 0x60,61,62: 64-bit | 789 | // NOTE: 0x60,61,62: 64-bit |
737 | #define CDSRCS 0x60 /* CD-ROM Sample Rate Converter status register */ | 790 | #define CDSRCS 0x60 /* CD-ROM Sample Rate Converter status register */ |
738 | 791 | ||
@@ -780,9 +833,18 @@ | |||
780 | 833 | ||
781 | #define HLIPH 0x69 /* Channel half loop interrupt pending high register */ | 834 | #define HLIPH 0x69 /* Channel half loop interrupt pending high register */ |
782 | 835 | ||
783 | // 0x6a,6b,6c used for some recording | 836 | /* S/PDIF Host Record Index (bypasses SRC) */ |
784 | // 0x6d unused | 837 | #define A_SPRI 0x6a |
785 | // 0x6e,6f - tanktable base / offset | 838 | /* S/PDIF Host Record Address */ |
839 | #define A_SPRA 0x6b | ||
840 | /* S/PDIF Host Record Control */ | ||
841 | #define A_SPRC 0x6c | ||
842 | /* Delayed Interrupt Counter & Enable */ | ||
843 | #define A_DICE 0x6d | ||
844 | /* Tank Table Base */ | ||
845 | #define A_TTB 0x6e | ||
846 | /* Tank Delay Offset */ | ||
847 | #define A_TDOF 0x6f | ||
786 | 848 | ||
787 | /* This is the MPU port on the card (via the game port) */ | 849 | /* This is the MPU port on the card (via the game port) */ |
788 | #define A_MUDATA1 0x70 | 850 | #define A_MUDATA1 0x70 |
@@ -800,6 +862,7 @@ | |||
800 | #define A_FXWC1 0x74 /* Selects 0x7f-0x60 for FX recording */ | 862 | #define A_FXWC1 0x74 /* Selects 0x7f-0x60 for FX recording */ |
801 | #define A_FXWC2 0x75 /* Selects 0x9f-0x80 for FX recording */ | 863 | #define A_FXWC2 0x75 /* Selects 0x9f-0x80 for FX recording */ |
802 | 864 | ||
865 | /* Extended Hardware Control */ | ||
803 | #define A_SPDIF_SAMPLERATE 0x76 /* Set the sample rate of SPDIF output */ | 866 | #define A_SPDIF_SAMPLERATE 0x76 /* Set the sample rate of SPDIF output */ |
804 | #define A_SAMPLE_RATE 0x76 /* Various sample rate settings. */ | 867 | #define A_SAMPLE_RATE 0x76 /* Various sample rate settings. */ |
805 | #define A_SAMPLE_RATE_NOT_USED 0x0ffc111e /* Bits that are not used and cannot be set. */ | 868 | #define A_SAMPLE_RATE_NOT_USED 0x0ffc111e /* Bits that are not used and cannot be set. */ |
@@ -822,8 +885,20 @@ | |||
822 | #define A_PCM_96000 0x00004000 | 885 | #define A_PCM_96000 0x00004000 |
823 | #define A_PCM_44100 0x00008000 | 886 | #define A_PCM_44100 0x00008000 |
824 | 887 | ||
825 | /* 0x77,0x78,0x79 "something i2s-related" - default to 0x01080000 on my audigy 2 ZS --rlrevell */ | 888 | /* I2S0 Sample Rate Tracker Status */ |
826 | /* 0x7a, 0x7b - lookup tables */ | 889 | #define A_SRT3 0x77 |
890 | |||
891 | /* I2S1 Sample Rate Tracker Status */ | ||
892 | #define A_SRT4 0x78 | ||
893 | |||
894 | /* I2S2 Sample Rate Tracker Status */ | ||
895 | #define A_SRT5 0x79 | ||
896 | /* - default to 0x01080000 on my audigy 2 ZS --rlrevell */ | ||
897 | |||
898 | /* Tank Table DMA Address */ | ||
899 | #define A_TTDA 0x7a | ||
900 | /* Tank Table DMA Data */ | ||
901 | #define A_TTDD 0x7b | ||
827 | 902 | ||
828 | #define A_FXRT2 0x7c | 903 | #define A_FXRT2 0x7c |
829 | #define A_FXRT_CHANNELE 0x0000003f /* Effects send bus number for channel's effects send E */ | 904 | #define A_FXRT_CHANNELE 0x0000003f /* Effects send bus number for channel's effects send E */ |
@@ -845,7 +920,7 @@ | |||
845 | #define A_FXRT_CHANNELC 0x003f0000 | 920 | #define A_FXRT_CHANNELC 0x003f0000 |
846 | #define A_FXRT_CHANNELD 0x3f000000 | 921 | #define A_FXRT_CHANNELD 0x3f000000 |
847 | 922 | ||
848 | 923 | /* 0x7f: Not used */ | |
849 | /* Each FX general purpose register is 32 bits in length, all bits are used */ | 924 | /* Each FX general purpose register is 32 bits in length, all bits are used */ |
850 | #define FXGPREGBASE 0x100 /* FX general purpose registers base */ | 925 | #define FXGPREGBASE 0x100 /* FX general purpose registers base */ |
851 | #define A_FXGPREGBASE 0x400 /* Audigy GPRs, 0x400 to 0x5ff */ | 926 | #define A_FXGPREGBASE 0x400 /* Audigy GPRs, 0x400 to 0x5ff */ |
@@ -886,6 +961,293 @@ | |||
886 | #define A_HIWORD_RESULT_MASK 0x007ff000 | 961 | #define A_HIWORD_RESULT_MASK 0x007ff000 |
887 | #define A_HIWORD_OPA_MASK 0x000007ff | 962 | #define A_HIWORD_OPA_MASK 0x000007ff |
888 | 963 | ||
964 | /************************************************************************************************/ | ||
965 | /* EMU1010m HANA FPGA registers */ | ||
966 | /************************************************************************************************/ | ||
967 | #define EMU_HANA_DESTHI 0x00 /* 0000xxx 3 bits Link Destination */ | ||
968 | #define EMU_HANA_DESTLO 0x01 /* 00xxxxx 5 bits */ | ||
969 | #define EMU_HANA_SRCHI 0x02 /* 0000xxx 3 bits Link Source */ | ||
970 | #define EMU_HANA_SRCLO 0x03 /* 00xxxxx 5 bits */ | ||
971 | #define EMU_HANA_DOCK_PWR 0x04 /* 000000x 1 bits Audio Dock power */ | ||
972 | #define EMU_HANA_DOCK_PWR_ON 0x01 /* Audio Dock power on */ | ||
973 | #define EMU_HANA_WCLOCK 0x05 /* 0000xxx 3 bits Word Clock source select */ | ||
974 | /* Must be written after power on to reset DLL */ | ||
975 | /* One is unable to detect the Audio dock without this */ | ||
976 | #define EMU_HANA_WCLOCK_SRC_MASK 0x07 | ||
977 | #define EMU_HANA_WCLOCK_INT_48K 0x00 | ||
978 | #define EMU_HANA_WCLOCK_INT_44_1K 0x01 | ||
979 | #define EMU_HANA_WCLOCK_HANA_SPDIF_IN 0x02 | ||
980 | #define EMU_HANA_WCLOCK_HANA_ADAT_IN 0x03 | ||
981 | #define EMU_HANA_WCLOCK_SYNC_BNCN 0x04 | ||
982 | #define EMU_HANA_WCLOCK_2ND_HANA 0x05 | ||
983 | #define EMU_HANA_WCLOCK_SRC_RESERVED 0x06 | ||
984 | #define EMU_HANA_WCLOCK_OFF 0x07 /* For testing, forces fallback to DEFCLOCK */ | ||
985 | #define EMU_HANA_WCLOCK_MULT_MASK 0x18 | ||
986 | #define EMU_HANA_WCLOCK_1X 0x00 | ||
987 | #define EMU_HANA_WCLOCK_2X 0x08 | ||
988 | #define EMU_HANA_WCLOCK_4X 0x10 | ||
989 | #define EMU_HANA_WCLOCK_MULT_RESERVED 0x18 | ||
990 | |||
991 | #define EMU_HANA_DEFCLOCK 0x06 /* 000000x 1 bits Default Word Clock */ | ||
992 | #define EMU_HANA_DEFCLOCK_48K 0x00 | ||
993 | #define EMU_HANA_DEFCLOCK_44_1K 0x01 | ||
994 | |||
995 | #define EMU_HANA_UNMUTE 0x07 /* 000000x 1 bits Mute all audio outputs */ | ||
996 | #define EMU_MUTE 0x00 | ||
997 | #define EMU_UNMUTE 0x01 | ||
998 | |||
999 | #define EMU_HANA_FPGA_CONFIG 0x08 /* 00000xx 2 bits Config control of FPGAs */ | ||
1000 | #define EMU_HANA_FPGA_CONFIG_AUDIODOCK 0x01 /* Set in order to program FPGA on Audio Dock */ | ||
1001 | #define EMU_HANA_FPGA_CONFIG_HANA 0x02 /* Set in order to program FPGA on Hana */ | ||
1002 | |||
1003 | #define EMU_HANA_IRQ_ENABLE 0x09 /* 000xxxx 4 bits IRQ Enable */ | ||
1004 | #define EMU_HANA_IRQ_WCLK_CHANGED 0x01 | ||
1005 | #define EMU_HANA_IRQ_ADAT 0x02 | ||
1006 | #define EMU_HANA_IRQ_DOCK 0x04 | ||
1007 | #define EMU_HANA_IRQ_DOCK_LOST 0x08 | ||
1008 | |||
1009 | #define EMU_HANA_SPDIF_MODE 0x0a /* 00xxxxx 5 bits SPDIF MODE */ | ||
1010 | #define EMU_HANA_SPDIF_MODE_TX_COMSUMER 0x00 | ||
1011 | #define EMU_HANA_SPDIF_MODE_TX_PRO 0x01 | ||
1012 | #define EMU_HANA_SPDIF_MODE_TX_NOCOPY 0x02 | ||
1013 | #define EMU_HANA_SPDIF_MODE_RX_COMSUMER 0x00 | ||
1014 | #define EMU_HANA_SPDIF_MODE_RX_PRO 0x04 | ||
1015 | #define EMU_HANA_SPDIF_MODE_RX_NOCOPY 0x08 | ||
1016 | #define EMU_HANA_SPDIF_MODE_RX_INVALID 0x10 | ||
1017 | |||
1018 | #define EMU_HANA_OPTICAL_TYPE 0x0b /* 00000xx 2 bits ADAT or SPDIF in/out */ | ||
1019 | #define EMU_HANA_OPTICAL_IN_SPDIF 0x00 | ||
1020 | #define EMU_HANA_OPTICAL_IN_ADAT 0x01 | ||
1021 | #define EMU_HANA_OPTICAL_OUT_SPDIF 0x00 | ||
1022 | #define EMU_HANA_OPTICAL_OUT_ADAT 0x02 | ||
1023 | |||
1024 | #define EMU_HANA_MIDI_IN 0x0c /* 000000x 1 bit Control MIDI */ | ||
1025 | #define EMU_HANA_MIDI_IN_FROM_HAMOA 0x00 /* HAMOA MIDI in to Alice 2 MIDI B */ | ||
1026 | #define EMU_HANA_MIDI_IN_FROM_DOCK 0x01 /* Audio Dock MIDI in to Alice 2 MIDI B */ | ||
1027 | |||
1028 | #define EMU_HANA_DOCK_LEDS_1 0x0d /* 000xxxx 4 bit Audio Dock LEDs */ | ||
1029 | #define EMU_HANA_DOCK_LEDS_1_MIDI1 0x01 /* MIDI 1 LED on */ | ||
1030 | #define EMU_HANA_DOCK_LEDS_1_MIDI2 0x02 /* MIDI 2 LED on */ | ||
1031 | #define EMU_HANA_DOCK_LEDS_1_SMPTE_IN 0x04 /* SMPTE IN LED on */ | ||
1032 | #define EMU_HANA_DOCK_LEDS_1_SMPTE_OUT 0x08 /* SMPTE OUT LED on */ | ||
1033 | |||
1034 | #define EMU_HANA_DOCK_LEDS_2 0x0e /* 0xxxxxx 6 bit Audio Dock LEDs */ | ||
1035 | #define EMU_HANA_DOCK_LEDS_2_44K 0x01 /* 44.1 kHz LED on */ | ||
1036 | #define EMU_HANA_DOCK_LEDS_2_48K 0x02 /* 48 kHz LED on */ | ||
1037 | #define EMU_HANA_DOCK_LEDS_2_96K 0x04 /* 96 kHz LED on */ | ||
1038 | #define EMU_HANA_DOCK_LEDS_2_192K 0x08 /* 192 kHz LED on */ | ||
1039 | #define EMU_HANA_DOCK_LEDS_2_LOCK 0x10 /* LOCK LED on */ | ||
1040 | #define EMU_HANA_DOCK_LEDS_2_EXT 0x20 /* EXT LED on */ | ||
1041 | |||
1042 | #define EMU_HANA_DOCK_LEDS_3 0x0f /* 0xxxxxx 6 bit Audio Dock LEDs */ | ||
1043 | #define EMU_HANA_DOCK_LEDS_3_CLIP_A 0x01 /* Mic A Clip LED on */ | ||
1044 | #define EMU_HANA_DOCK_LEDS_3_CLIP_B 0x02 /* Mic B Clip LED on */ | ||
1045 | #define EMU_HANA_DOCK_LEDS_3_SIGNAL_A 0x04 /* Signal A Clip LED on */ | ||
1046 | #define EMU_HANA_DOCK_LEDS_3_SIGNAL_B 0x08 /* Signal B Clip LED on */ | ||
1047 | #define EMU_HANA_DOCK_LEDS_3_MANUAL_CLIP 0x10 /* Manual Clip detection */ | ||
1048 | #define EMU_HANA_DOCK_LEDS_3_MANUAL_SIGNAL 0x20 /* Manual Signal detection */ | ||
1049 | |||
1050 | #define EMU_HANA_ADC_PADS 0x10 /* 0000xxx 3 bit Audio Dock ADC 14dB pads */ | ||
1051 | #define EMU_HANA_DOCK_ADC_PAD1 0x01 /* 14dB Attenuation on Audio Dock ADC 1 */ | ||
1052 | #define EMU_HANA_DOCK_ADC_PAD2 0x02 /* 14dB Attenuation on Audio Dock ADC 2 */ | ||
1053 | #define EMU_HANA_DOCK_ADC_PAD3 0x04 /* 14dB Attenuation on Audio Dock ADC 3 */ | ||
1054 | #define EMU_HANA_0202_ADC_PAD1 0x08 /* 14dB Attenuation on 0202 ADC 1 */ | ||
1055 | |||
1056 | #define EMU_HANA_DOCK_MISC 0x11 /* 0xxxxxx 6 bit Audio Dock misc bits */ | ||
1057 | #define EMU_HANA_DOCK_DAC1_MUTE 0x01 /* DAC 1 Mute */ | ||
1058 | #define EMU_HANA_DOCK_DAC2_MUTE 0x02 /* DAC 2 Mute */ | ||
1059 | #define EMU_HANA_DOCK_DAC3_MUTE 0x04 /* DAC 3 Mute */ | ||
1060 | #define EMU_HANA_DOCK_DAC4_MUTE 0x08 /* DAC 4 Mute */ | ||
1061 | #define EMU_HANA_DOCK_PHONES_192_DAC1 0x00 /* DAC 1 Headphones source at 192kHz */ | ||
1062 | #define EMU_HANA_DOCK_PHONES_192_DAC2 0x10 /* DAC 2 Headphones source at 192kHz */ | ||
1063 | #define EMU_HANA_DOCK_PHONES_192_DAC3 0x20 /* DAC 3 Headphones source at 192kHz */ | ||
1064 | #define EMU_HANA_DOCK_PHONES_192_DAC4 0x30 /* DAC 4 Headphones source at 192kHz */ | ||
1065 | |||
1066 | #define EMU_HANA_MIDI_OUT 0x12 /* 00xxxxx 5 bit Source for each MIDI out port */ | ||
1067 | #define EMU_HANA_MIDI_OUT_0202 0x01 /* 0202 MIDI from Alice 2. 0 = A, 1 = B */ | ||
1068 | #define EMU_HANA_MIDI_OUT_DOCK1 0x02 /* Audio Dock MIDI1 front, from Alice 2. 0 = A, 1 = B */ | ||
1069 | #define EMU_HANA_MIDI_OUT_DOCK2 0x04 /* Audio Dock MIDI2 rear, from Alice 2. 0 = A, 1 = B */ | ||
1070 | #define EMU_HANA_MIDI_OUT_SYNC2 0x08 /* Sync card. Not the actual MIDI out jack. 0 = A, 1 = B */ | ||
1071 | #define EMU_HANA_MIDI_OUT_LOOP 0x10 /* 0 = bits (3:0) normal. 1 = MIDI loopback enabled. */ | ||
1072 | |||
1073 | #define EMU_HANA_DAC_PADS 0x13 /* 00xxxxx 5 bit DAC 14dB attenuation pads */ | ||
1074 | #define EMU_HANA_DOCK_DAC_PAD1 0x01 /* 14dB Attenuation on AudioDock DAC 1. Left and Right */ | ||
1075 | #define EMU_HANA_DOCK_DAC_PAD2 0x02 /* 14dB Attenuation on AudioDock DAC 2. Left and Right */ | ||
1076 | #define EMU_HANA_DOCK_DAC_PAD3 0x04 /* 14dB Attenuation on AudioDock DAC 3. Left and Right */ | ||
1077 | #define EMU_HANA_DOCK_DAC_PAD4 0x08 /* 14dB Attenuation on AudioDock DAC 4. Left and Right */ | ||
1078 | #define EMU_HANA_0202_DAC_PAD1 0x10 /* 14dB Attenuation on 0202 DAC 1. Left and Right */ | ||
1079 | |||
1080 | /* 0x14 - 0x1f Unused R/W registers */ | ||
1081 | #define EMU_HANA_IRQ_STATUS 0x20 /* 000xxxx 4 bits IRQ Status */ | ||
1082 | #if 0 /* Already defined for reg 0x09 IRQ_ENABLE */ | ||
1083 | #define EMU_HANA_IRQ_WCLK_CHANGED 0x01 | ||
1084 | #define EMU_HANA_IRQ_ADAT 0x02 | ||
1085 | #define EMU_HANA_IRQ_DOCK 0x04 | ||
1086 | #define EMU_HANA_IRQ_DOCK_LOST 0x08 | ||
1087 | #endif | ||
1088 | |||
1089 | #define EMU_HANA_OPTION_CARDS 0x21 /* 000xxxx 4 bits Presence of option cards */ | ||
1090 | #define EMU_HANA_OPTION_HAMOA 0x01 /* HAMOA card present */ | ||
1091 | #define EMU_HANA_OPTION_SYNC 0x02 /* Sync card present */ | ||
1092 | #define EMU_HANA_OPTION_DOCK_ONLINE 0x04 /* Audio Dock online and FPGA configured */ | ||
1093 | #define EMU_HANA_OPTION_DOCK_OFFLINE 0x08 /* Audio Dock online and FPGA not configured */ | ||
1094 | |||
1095 | #define EMU_HANA_ID 0x22 /* 1010101 7 bits ID byte & 0x7f = 0x55 */ | ||
1096 | |||
1097 | #define EMU_HANA_MAJOR_REV 0x23 /* 0000xxx 3 bit Hana FPGA Major rev */ | ||
1098 | #define EMU_HANA_MINOR_REV 0x24 /* 0000xxx 3 bit Hana FPGA Minor rev */ | ||
1099 | |||
1100 | #define EMU_DOCK_MAJOR_REV 0x25 /* 0000xxx 3 bit Audio Dock FPGA Major rev */ | ||
1101 | #define EMU_DOCK_MINOR_REV 0x26 /* 0000xxx 3 bit Audio Dock FPGA Minor rev */ | ||
1102 | |||
1103 | #define EMU_DOCK_BOARD_ID 0x27 /* 00000xx 2 bits Audio Dock ID pins */ | ||
1104 | #define EMU_DOCK_BOARD_ID0 0x00 /* ID bit 0 */ | ||
1105 | #define EMU_DOCK_BOARD_ID1 0x03 /* ID bit 1 */ | ||
1106 | |||
1107 | #define EMU_HANA_WC_SPDIF_HI 0x28 /* 0xxxxxx 6 bit SPDIF IN Word clock, upper 6 bits */ | ||
1108 | #define EMU_HANA_WC_SPDIF_LO 0x29 /* 0xxxxxx 6 bit SPDIF IN Word clock, lower 6 bits */ | ||
1109 | |||
1110 | #define EMU_HANA_WC_ADAT_HI 0x2a /* 0xxxxxx 6 bit ADAT IN Word clock, upper 6 bits */ | ||
1111 | #define EMU_HANA_WC_ADAT_LO 0x2b /* 0xxxxxx 6 bit ADAT IN Word clock, lower 6 bits */ | ||
1112 | |||
1113 | #define EMU_HANA_WC_BNC_LO 0x2c /* 0xxxxxx 6 bit BNC IN Word clock, lower 6 bits */ | ||
1114 | #define EMU_HANA_WC_BNC_HI 0x2d /* 0xxxxxx 6 bit BNC IN Word clock, upper 6 bits */ | ||
1115 | |||
1116 | #define EMU_HANA2_WC_SPDIF_HI 0x2e /* 0xxxxxx 6 bit HANA2 SPDIF IN Word clock, upper 6 bits */ | ||
1117 | #define EMU_HANA2_WC_SPDIF_LO 0x2f /* 0xxxxxx 6 bit HANA2 SPDIF IN Word clock, lower 6 bits */ | ||
1118 | /* 0x30 - 0x3f Unused Read only registers */ | ||
1119 | |||
1120 | /************************************************************************************************/ | ||
1121 | /* EMU1010m HANA Destinations */ | ||
1122 | /************************************************************************************************/ | ||
1123 | #define EMU_DST_ALICE2_EMU32_0 0x000f /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1124 | #define EMU_DST_ALICE2_EMU32_1 0x0000 /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1125 | #define EMU_DST_ALICE2_EMU32_2 0x0001 /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1126 | #define EMU_DST_ALICE2_EMU32_3 0x0002 /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1127 | #define EMU_DST_ALICE2_EMU32_4 0x0003 /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1128 | #define EMU_DST_ALICE2_EMU32_5 0x0004 /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1129 | #define EMU_DST_ALICE2_EMU32_6 0x0005 /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1130 | #define EMU_DST_ALICE2_EMU32_7 0x0006 /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1131 | #define EMU_DST_ALICE2_EMU32_8 0x0007 /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1132 | #define EMU_DST_ALICE2_EMU32_9 0x0008 /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1133 | #define EMU_DST_ALICE2_EMU32_A 0x0009 /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1134 | #define EMU_DST_ALICE2_EMU32_B 0x000a /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1135 | #define EMU_DST_ALICE2_EMU32_C 0x000b /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1136 | #define EMU_DST_ALICE2_EMU32_D 0x000c /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1137 | #define EMU_DST_ALICE2_EMU32_E 0x000d /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1138 | #define EMU_DST_ALICE2_EMU32_F 0x000e /* 16 EMU32 channels to Alice2 +0 to +0xf */ | ||
1139 | #define EMU_DST_DOCK_DAC1_LEFT1 0x0100 /* Audio Dock DAC1 Left, 1st or 48kHz only */ | ||
1140 | #define EMU_DST_DOCK_DAC1_LEFT2 0x0101 /* Audio Dock DAC1 Left, 2nd or 96kHz */ | ||
1141 | #define EMU_DST_DOCK_DAC1_LEFT3 0x0102 /* Audio Dock DAC1 Left, 3rd or 192kHz */ | ||
1142 | #define EMU_DST_DOCK_DAC1_LEFT4 0x0103 /* Audio Dock DAC1 Left, 4th or 192kHz */ | ||
1143 | #define EMU_DST_DOCK_DAC1_RIGHT1 0x0104 /* Audio Dock DAC1 Right, 1st or 48kHz only */ | ||
1144 | #define EMU_DST_DOCK_DAC1_RIGHT2 0x0105 /* Audio Dock DAC1 Right, 2nd or 96kHz */ | ||
1145 | #define EMU_DST_DOCK_DAC1_RIGHT3 0x0106 /* Audio Dock DAC1 Right, 3rd or 192kHz */ | ||
1146 | #define EMU_DST_DOCK_DAC1_RIGHT4 0x0107 /* Audio Dock DAC1 Right, 4th or 192kHz */ | ||
1147 | #define EMU_DST_DOCK_DAC2_LEFT1 0x0108 /* Audio Dock DAC2 Left, 1st or 48kHz only */ | ||
1148 | #define EMU_DST_DOCK_DAC2_LEFT2 0x0109 /* Audio Dock DAC2 Left, 2nd or 96kHz */ | ||
1149 | #define EMU_DST_DOCK_DAC2_LEFT3 0x010a /* Audio Dock DAC2 Left, 3rd or 192kHz */ | ||
1150 | #define EMU_DST_DOCK_DAC2_LEFT4 0x010b /* Audio Dock DAC2 Left, 4th or 192kHz */ | ||
1151 | #define EMU_DST_DOCK_DAC2_RIGHT1 0x010c /* Audio Dock DAC2 Right, 1st or 48kHz only */ | ||
1152 | #define EMU_DST_DOCK_DAC2_RIGHT2 0x010d /* Audio Dock DAC2 Right, 2nd or 96kHz */ | ||
1153 | #define EMU_DST_DOCK_DAC2_RIGHT3 0x010e /* Audio Dock DAC2 Right, 3rd or 192kHz */ | ||
1154 | #define EMU_DST_DOCK_DAC2_RIGHT4 0x010f /* Audio Dock DAC2 Right, 4th or 192kHz */ | ||
1155 | #define EMU_DST_DOCK_DAC3_LEFT1 0x0110 /* Audio Dock DAC1 Left, 1st or 48kHz only */ | ||
1156 | #define EMU_DST_DOCK_DAC3_LEFT2 0x0111 /* Audio Dock DAC1 Left, 2nd or 96kHz */ | ||
1157 | #define EMU_DST_DOCK_DAC3_LEFT3 0x0112 /* Audio Dock DAC1 Left, 3rd or 192kHz */ | ||
1158 | #define EMU_DST_DOCK_DAC3_LEFT4 0x0113 /* Audio Dock DAC1 Left, 4th or 192kHz */ | ||
1159 | #define EMU_DST_DOCK_PHONES_LEFT1 0x0112 /* Audio Dock PHONES Left, 1st or 48kHz only */ | ||
1160 | #define EMU_DST_DOCK_PHONES_LEFT2 0x0113 /* Audio Dock PHONES Left, 2nd or 96kHz */ | ||
1161 | #define EMU_DST_DOCK_DAC3_RIGHT1 0x0114 /* Audio Dock DAC1 Right, 1st or 48kHz only */ | ||
1162 | #define EMU_DST_DOCK_DAC3_RIGHT2 0x0115 /* Audio Dock DAC1 Right, 2nd or 96kHz */ | ||
1163 | #define EMU_DST_DOCK_DAC3_RIGHT3 0x0116 /* Audio Dock DAC1 Right, 3rd or 192kHz */ | ||
1164 | #define EMU_DST_DOCK_DAC3_RIGHT4 0x0117 /* Audio Dock DAC1 Right, 4th or 192kHz */ | ||
1165 | #define EMU_DST_DOCK_PHONES_RIGHT1 0x0116 /* Audio Dock PHONES Right, 1st or 48kHz only */ | ||
1166 | #define EMU_DST_DOCK_PHONES_RIGHT2 0x0117 /* Audio Dock PHONES Right, 2nd or 96kHz */ | ||
1167 | #define EMU_DST_DOCK_DAC4_LEFT1 0x0118 /* Audio Dock DAC2 Left, 1st or 48kHz only */ | ||
1168 | #define EMU_DST_DOCK_DAC4_LEFT2 0x0119 /* Audio Dock DAC2 Left, 2nd or 96kHz */ | ||
1169 | #define EMU_DST_DOCK_DAC4_LEFT3 0x011a /* Audio Dock DAC2 Left, 3rd or 192kHz */ | ||
1170 | #define EMU_DST_DOCK_DAC4_LEFT4 0x011b /* Audio Dock DAC2 Left, 4th or 192kHz */ | ||
1171 | #define EMU_DST_DOCK_SPDIF_LEFT1 0x011a /* Audio Dock SPDIF Left, 1st or 48kHz only */ | ||
1172 | #define EMU_DST_DOCK_SPDIF_LEFT2 0x011b /* Audio Dock SPDIF Left, 2nd or 96kHz */ | ||
1173 | #define EMU_DST_DOCK_DAC4_RIGHT1 0x011c /* Audio Dock DAC2 Right, 1st or 48kHz only */ | ||
1174 | #define EMU_DST_DOCK_DAC4_RIGHT2 0x011d /* Audio Dock DAC2 Right, 2nd or 96kHz */ | ||
1175 | #define EMU_DST_DOCK_DAC4_RIGHT3 0x011e /* Audio Dock DAC2 Right, 3rd or 192kHz */ | ||
1176 | #define EMU_DST_DOCK_DAC4_RIGHT4 0x011f /* Audio Dock DAC2 Right, 4th or 192kHz */ | ||
1177 | #define EMU_DST_DOCK_SPDIF_RIGHT1 0x011e /* Audio Dock SPDIF Right, 1st or 48kHz only */ | ||
1178 | #define EMU_DST_DOCK_SPDIF_RIGHT2 0x011f /* Audio Dock SPDIF Right, 2nd or 96kHz */ | ||
1179 | #define EMU_DST_HANA_SPDIF_LEFT1 0x0200 /* Hana SPDIF Left, 1st or 48kHz only */ | ||
1180 | #define EMU_DST_HANA_SPDIF_LEFT2 0x0202 /* Hana SPDIF Left, 2nd or 96kHz */ | ||
1181 | #define EMU_DST_HANA_SPDIF_RIGHT1 0x0201 /* Hana SPDIF Right, 1st or 48kHz only */ | ||
1182 | #define EMU_DST_HANA_SPDIF_RIGHT2 0x0203 /* Hana SPDIF Right, 2nd or 96kHz */ | ||
1183 | #define EMU_DST_HAMOA_DAC_LEFT1 0x0300 /* Hamoa DAC Left, 1st or 48kHz only */ | ||
1184 | #define EMU_DST_HAMOA_DAC_LEFT2 0x0302 /* Hamoa DAC Left, 2nd or 96kHz */ | ||
1185 | #define EMU_DST_HAMOA_DAC_LEFT3 0x0304 /* Hamoa DAC Left, 3rd or 192kHz */ | ||
1186 | #define EMU_DST_HAMOA_DAC_LEFT4 0x0306 /* Hamoa DAC Left, 4th or 192kHz */ | ||
1187 | #define EMU_DST_HAMOA_DAC_RIGHT1 0x0301 /* Hamoa DAC Right, 1st or 48kHz only */ | ||
1188 | #define EMU_DST_HAMOA_DAC_RIGHT2 0x0303 /* Hamoa DAC Right, 2nd or 96kHz */ | ||
1189 | #define EMU_DST_HAMOA_DAC_RIGHT3 0x0305 /* Hamoa DAC Right, 3rd or 192kHz */ | ||
1190 | #define EMU_DST_HAMOA_DAC_RIGHT4 0x0307 /* Hamoa DAC Right, 4th or 192kHz */ | ||
1191 | #define EMU_DST_HANA_ADAT 0x0400 /* Hana ADAT 8 channel out +0 to +7 */ | ||
1192 | #define EMU_DST_ALICE_I2S0_LEFT 0x0500 /* Alice2 I2S0 Left */ | ||
1193 | #define EMU_DST_ALICE_I2S0_RIGHT 0x0501 /* Alice2 I2S0 Right */ | ||
1194 | #define EMU_DST_ALICE_I2S1_LEFT 0x0600 /* Alice2 I2S1 Left */ | ||
1195 | #define EMU_DST_ALICE_I2S1_RIGHT 0x0601 /* Alice2 I2S1 Right */ | ||
1196 | #define EMU_DST_ALICE_I2S2_LEFT 0x0700 /* Alice2 I2S2 Left */ | ||
1197 | #define EMU_DST_ALICE_I2S2_RIGHT 0x0701 /* Alice2 I2S2 Right */ | ||
1198 | |||
1199 | /************************************************************************************************/ | ||
1200 | /* EMU1010m HANA Sources */ | ||
1201 | /************************************************************************************************/ | ||
1202 | #define EMU_SRC_SILENCE 0x0000 /* Silence */ | ||
1203 | #define EMU_SRC_DOCK_MIC_A1 0x0100 /* Audio Dock Mic A, 1st or 48kHz only */ | ||
1204 | #define EMU_SRC_DOCK_MIC_A2 0x0101 /* Audio Dock Mic A, 2nd or 96kHz */ | ||
1205 | #define EMU_SRC_DOCK_MIC_A3 0x0102 /* Audio Dock Mic A, 3rd or 192kHz */ | ||
1206 | #define EMU_SRC_DOCK_MIC_A4 0x0103 /* Audio Dock Mic A, 4th or 192kHz */ | ||
1207 | #define EMU_SRC_DOCK_MIC_B1 0x0104 /* Audio Dock Mic B, 1st or 48kHz only */ | ||
1208 | #define EMU_SRC_DOCK_MIC_B2 0x0105 /* Audio Dock Mic B, 2nd or 96kHz */ | ||
1209 | #define EMU_SRC_DOCK_MIC_B3 0x0106 /* Audio Dock Mic B, 3rd or 192kHz */ | ||
1210 | #define EMU_SRC_DOCK_MIC_B4 0x0107 /* Audio Dock Mic B, 4th or 192kHz */ | ||
1211 | #define EMU_SRC_DOCK_ADC1_LEFT1 0x0108 /* Audio Dock ADC1 Left, 1st or 48kHz only */ | ||
1212 | #define EMU_SRC_DOCK_ADC1_LEFT2 0x0109 /* Audio Dock ADC1 Left, 2nd or 96kHz */ | ||
1213 | #define EMU_SRC_DOCK_ADC1_LEFT3 0x010a /* Audio Dock ADC1 Left, 3rd or 192kHz */ | ||
1214 | #define EMU_SRC_DOCK_ADC1_LEFT4 0x010b /* Audio Dock ADC1 Left, 4th or 192kHz */ | ||
1215 | #define EMU_SRC_DOCK_ADC1_RIGHT1 0x010c /* Audio Dock ADC1 Right, 1st or 48kHz only */ | ||
1216 | #define EMU_SRC_DOCK_ADC1_RIGHT2 0x010d /* Audio Dock ADC1 Right, 2nd or 96kHz */ | ||
1217 | #define EMU_SRC_DOCK_ADC1_RIGHT3 0x010e /* Audio Dock ADC1 Right, 3rd or 192kHz */ | ||
1218 | #define EMU_SRC_DOCK_ADC1_RIGHT4 0x010f /* Audio Dock ADC1 Right, 4th or 192kHz */ | ||
1219 | #define EMU_SRC_DOCK_ADC2_LEFT1 0x0110 /* Audio Dock ADC2 Left, 1st or 48kHz only */ | ||
1220 | #define EMU_SRC_DOCK_ADC2_LEFT2 0x0111 /* Audio Dock ADC2 Left, 2nd or 96kHz */ | ||
1221 | #define EMU_SRC_DOCK_ADC2_LEFT3 0x0112 /* Audio Dock ADC2 Left, 3rd or 192kHz */ | ||
1222 | #define EMU_SRC_DOCK_ADC2_LEFT4 0x0113 /* Audio Dock ADC2 Left, 4th or 192kHz */ | ||
1223 | #define EMU_SRC_DOCK_ADC2_RIGHT1 0x0114 /* Audio Dock ADC2 Right, 1st or 48kHz only */ | ||
1224 | #define EMU_SRC_DOCK_ADC2_RIGHT2 0x0115 /* Audio Dock ADC2 Right, 2nd or 96kHz */ | ||
1225 | #define EMU_SRC_DOCK_ADC2_RIGHT3 0x0116 /* Audio Dock ADC2 Right, 3rd or 192kHz */ | ||
1226 | #define EMU_SRC_DOCK_ADC2_RIGHT4 0x0117 /* Audio Dock ADC2 Right, 4th or 192kHz */ | ||
1227 | #define EMU_SRC_DOCK_ADC3_LEFT1 0x0118 /* Audio Dock ADC3 Left, 1st or 48kHz only */ | ||
1228 | #define EMU_SRC_DOCK_ADC3_LEFT2 0x0119 /* Audio Dock ADC3 Left, 2nd or 96kHz */ | ||
1229 | #define EMU_SRC_DOCK_ADC3_LEFT3 0x011a /* Audio Dock ADC3 Left, 3rd or 192kHz */ | ||
1230 | #define EMU_SRC_DOCK_ADC3_LEFT4 0x011b /* Audio Dock ADC3 Left, 4th or 192kHz */ | ||
1231 | #define EMU_SRC_DOCK_ADC3_RIGHT1 0x011c /* Audio Dock ADC3 Right, 1st or 48kHz only */ | ||
1232 | #define EMU_SRC_DOCK_ADC3_RIGHT2 0x011d /* Audio Dock ADC3 Right, 2nd or 96kHz */ | ||
1233 | #define EMU_SRC_DOCK_ADC3_RIGHT3 0x011e /* Audio Dock ADC3 Right, 3rd or 192kHz */ | ||
1234 | #define EMU_SRC_DOCK_ADC3_RIGHT4 0x011f /* Audio Dock ADC3 Right, 4th or 192kHz */ | ||
1235 | #define EMU_SRC_HAMOA_ADC_LEFT1 0x0200 /* Hamoa ADC Left, 1st or 48kHz only */ | ||
1236 | #define EMU_SRC_HAMOA_ADC_LEFT2 0x0202 /* Hamoa ADC Left, 2nd or 96kHz */ | ||
1237 | #define EMU_SRC_HAMOA_ADC_LEFT3 0x0204 /* Hamoa ADC Left, 3rd or 192kHz */ | ||
1238 | #define EMU_SRC_HAMOA_ADC_LEFT4 0x0206 /* Hamoa ADC Left, 4th or 192kHz */ | ||
1239 | #define EMU_SRC_HAMOA_ADC_RIGHT1 0x0201 /* Hamoa ADC Right, 1st or 48kHz only */ | ||
1240 | #define EMU_SRC_HAMOA_ADC_RIGHT2 0x0203 /* Hamoa ADC Right, 2nd or 96kHz */ | ||
1241 | #define EMU_SRC_HAMOA_ADC_RIGHT3 0x0205 /* Hamoa ADC Right, 3rd or 192kHz */ | ||
1242 | #define EMU_SRC_HAMOA_ADC_RIGHT4 0x0207 /* Hamoa ADC Right, 4th or 192kHz */ | ||
1243 | #define EMU_SRC_ALICE_EMU32A 0x0300 /* Alice2 EMU32a 16 outputs. +0 to +0xf */ | ||
1244 | #define EMU_SRC_ALICE_EMU32B 0x0310 /* Alice2 EMU32b 16 outputs. +0 to +0xf */ | ||
1245 | #define EMU_SRC_HANA_ADAT 0x0400 /* Hana ADAT 8 channel in +0 to +7 */ | ||
1246 | #define EMU_SRC_HANA_SPDIF_LEFT1 0x0500 /* Hana SPDIF Left, 1st or 48kHz only */ | ||
1247 | #define EMU_SRC_HANA_SPDIF_LEFT2 0x0502 /* Hana SPDIF Left, 2nd or 96kHz */ | ||
1248 | #define EMU_SRC_HANA_SPDIF_RIGHT1 0x0501 /* Hana SPDIF Right, 1st or 48kHz only */ | ||
1249 | #define EMU_SRC_HANA_SPDIF_RIGHT2 0x0503 /* Hana SPDIF Right, 2nd or 96kHz */ | ||
1250 | /* 0x600 and 0x700 no used */ | ||
889 | 1251 | ||
890 | /* ------------------- STRUCTURES -------------------- */ | 1252 | /* ------------------- STRUCTURES -------------------- */ |
891 | 1253 | ||
@@ -1063,7 +1425,7 @@ struct snd_emu_chip_details { | |||
1063 | unsigned char spdif_bug; /* Has Spdif phasing bug */ | 1425 | unsigned char spdif_bug; /* Has Spdif phasing bug */ |
1064 | unsigned char ac97_chip; /* Has an AC97 chip: 1 = mandatory, 2 = optional */ | 1426 | unsigned char ac97_chip; /* Has an AC97 chip: 1 = mandatory, 2 = optional */ |
1065 | unsigned char ecard; /* APS EEPROM */ | 1427 | unsigned char ecard; /* APS EEPROM */ |
1066 | unsigned char emu1212m; /* EMU 1212m card */ | 1428 | unsigned char emu1010; /* EMU 1010m card */ |
1067 | unsigned char spi_dac; /* SPI interface for DAC */ | 1429 | unsigned char spi_dac; /* SPI interface for DAC */ |
1068 | unsigned char i2c_adc; /* I2C interface for ADC */ | 1430 | unsigned char i2c_adc; /* I2C interface for ADC */ |
1069 | unsigned char adc_1361t; /* Use Philips 1361T ADC */ | 1431 | unsigned char adc_1361t; /* Use Philips 1361T ADC */ |
@@ -1072,6 +1434,14 @@ struct snd_emu_chip_details { | |||
1072 | const char *id; /* for backward compatibility - can be NULL if not needed */ | 1434 | const char *id; /* for backward compatibility - can be NULL if not needed */ |
1073 | }; | 1435 | }; |
1074 | 1436 | ||
1437 | struct snd_emu1010 { | ||
1438 | unsigned int output_source[64]; | ||
1439 | unsigned int input_source[64]; | ||
1440 | unsigned int adc_pads; /* bit mask */ | ||
1441 | unsigned int dac_pads; /* bit mask */ | ||
1442 | unsigned int internal_clock; /* 44100 or 48000 */ | ||
1443 | }; | ||
1444 | |||
1075 | struct snd_emu10k1 { | 1445 | struct snd_emu10k1 { |
1076 | int irq; | 1446 | int irq; |
1077 | 1447 | ||
@@ -1079,6 +1449,7 @@ struct snd_emu10k1 { | |||
1079 | unsigned int tos_link: 1, /* tos link detected */ | 1449 | unsigned int tos_link: 1, /* tos link detected */ |
1080 | rear_ac97: 1, /* rear channels are on AC'97 */ | 1450 | rear_ac97: 1, /* rear channels are on AC'97 */ |
1081 | enable_ir: 1; | 1451 | enable_ir: 1; |
1452 | unsigned int support_tlv :1; | ||
1082 | /* Contains profile of card capabilities */ | 1453 | /* Contains profile of card capabilities */ |
1083 | const struct snd_emu_chip_details *card_capabilities; | 1454 | const struct snd_emu_chip_details *card_capabilities; |
1084 | unsigned int audigy; /* is Audigy? */ | 1455 | unsigned int audigy; /* is Audigy? */ |
@@ -1104,6 +1475,8 @@ struct snd_emu10k1 { | |||
1104 | spinlock_t memblk_lock; | 1475 | spinlock_t memblk_lock; |
1105 | 1476 | ||
1106 | unsigned int spdif_bits[3]; /* s/pdif out setup */ | 1477 | unsigned int spdif_bits[3]; /* s/pdif out setup */ |
1478 | unsigned int i2c_capture_source; | ||
1479 | u8 i2c_capture_volume[4][2]; | ||
1107 | 1480 | ||
1108 | struct snd_emu10k1_fx8010 fx8010; /* FX8010 info */ | 1481 | struct snd_emu10k1_fx8010 fx8010; /* FX8010 info */ |
1109 | int gpr_base; | 1482 | int gpr_base; |
@@ -1132,6 +1505,7 @@ struct snd_emu10k1 { | |||
1132 | int p16v_device_offset; | 1505 | int p16v_device_offset; |
1133 | u32 p16v_capture_source; | 1506 | u32 p16v_capture_source; |
1134 | u32 p16v_capture_channel; | 1507 | u32 p16v_capture_channel; |
1508 | struct snd_emu1010 emu1010; | ||
1135 | struct snd_emu10k1_pcm_mixer pcm_mixer[32]; | 1509 | struct snd_emu10k1_pcm_mixer pcm_mixer[32]; |
1136 | struct snd_emu10k1_pcm_mixer efx_pcm_mixer[NUM_EFX_PLAYBACK]; | 1510 | struct snd_emu10k1_pcm_mixer efx_pcm_mixer[NUM_EFX_PLAYBACK]; |
1137 | struct snd_kcontrol *ctl_send_routing; | 1511 | struct snd_kcontrol *ctl_send_routing; |
@@ -1208,6 +1582,10 @@ void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned i | |||
1208 | unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn); | 1582 | unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn); |
1209 | void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data); | 1583 | void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data); |
1210 | int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data); | 1584 | int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data); |
1585 | int snd_emu10k1_i2c_write(struct snd_emu10k1 *emu, u32 reg, u32 value); | ||
1586 | int snd_emu1010_fpga_write(struct snd_emu10k1 * emu, int reg, int value); | ||
1587 | int snd_emu1010_fpga_read(struct snd_emu10k1 * emu, int reg, int *value); | ||
1588 | int snd_emu1010_fpga_link_dst_src_write(struct snd_emu10k1 * emu, int dst, int src); | ||
1211 | unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc); | 1589 | unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc); |
1212 | void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb); | 1590 | void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb); |
1213 | void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb); | 1591 | void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb); |
@@ -1524,11 +1902,20 @@ struct snd_emu10k1_fx8010_control_gpr { | |||
1524 | unsigned int value[32]; /* initial values */ | 1902 | unsigned int value[32]; /* initial values */ |
1525 | unsigned int min; /* minimum range */ | 1903 | unsigned int min; /* minimum range */ |
1526 | unsigned int max; /* maximum range */ | 1904 | unsigned int max; /* maximum range */ |
1527 | union { | ||
1528 | snd_kcontrol_tlv_rw_t *c; | ||
1529 | unsigned int *p; | ||
1530 | } tlv; | ||
1531 | unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */ | 1905 | unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */ |
1906 | const unsigned int *tlv; | ||
1907 | }; | ||
1908 | |||
1909 | /* old ABI without TLV support */ | ||
1910 | struct snd_emu10k1_fx8010_control_old_gpr { | ||
1911 | struct snd_ctl_elem_id id; | ||
1912 | unsigned int vcount; | ||
1913 | unsigned int count; | ||
1914 | unsigned short gpr[32]; | ||
1915 | unsigned int value[32]; | ||
1916 | unsigned int min; | ||
1917 | unsigned int max; | ||
1918 | unsigned int translation; | ||
1532 | }; | 1919 | }; |
1533 | 1920 | ||
1534 | struct snd_emu10k1_fx8010_code { | 1921 | struct snd_emu10k1_fx8010_code { |
@@ -1579,6 +1966,8 @@ struct snd_emu10k1_fx8010_pcm_rec { | |||
1579 | unsigned int res2; /* reserved */ | 1966 | unsigned int res2; /* reserved */ |
1580 | }; | 1967 | }; |
1581 | 1968 | ||
1969 | #define SNDRV_EMU10K1_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1) | ||
1970 | |||
1582 | #define SNDRV_EMU10K1_IOCTL_INFO _IOR ('H', 0x10, struct snd_emu10k1_fx8010_info) | 1971 | #define SNDRV_EMU10K1_IOCTL_INFO _IOR ('H', 0x10, struct snd_emu10k1_fx8010_info) |
1583 | #define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW ('H', 0x11, struct snd_emu10k1_fx8010_code) | 1972 | #define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW ('H', 0x11, struct snd_emu10k1_fx8010_code) |
1584 | #define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code) | 1973 | #define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code) |
@@ -1587,6 +1976,7 @@ struct snd_emu10k1_fx8010_pcm_rec { | |||
1587 | #define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram) | 1976 | #define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram) |
1588 | #define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW ('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec) | 1977 | #define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW ('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec) |
1589 | #define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec) | 1978 | #define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec) |
1979 | #define SNDRV_EMU10K1_IOCTL_PVERSION _IOR ('H', 0x40, int) | ||
1590 | #define SNDRV_EMU10K1_IOCTL_STOP _IO ('H', 0x80) | 1980 | #define SNDRV_EMU10K1_IOCTL_STOP _IO ('H', 0x80) |
1591 | #define SNDRV_EMU10K1_IOCTL_CONTINUE _IO ('H', 0x81) | 1981 | #define SNDRV_EMU10K1_IOCTL_CONTINUE _IO ('H', 0x81) |
1592 | #define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82) | 1982 | #define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82) |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 2f645dfd7f..deff5a92ef 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -56,6 +56,8 @@ struct snd_pcm_hardware { | |||
56 | size_t fifo_size; /* fifo size in bytes */ | 56 | size_t fifo_size; /* fifo size in bytes */ |
57 | }; | 57 | }; |
58 | 58 | ||
59 | struct snd_pcm_substream; | ||
60 | |||
59 | struct snd_pcm_ops { | 61 | struct snd_pcm_ops { |
60 | int (*open)(struct snd_pcm_substream *substream); | 62 | int (*open)(struct snd_pcm_substream *substream); |
61 | int (*close)(struct snd_pcm_substream *substream); | 63 | int (*close)(struct snd_pcm_substream *substream); |
@@ -384,6 +386,7 @@ struct snd_pcm_substream { | |||
384 | struct snd_info_entry *proc_sw_params_entry; | 386 | struct snd_info_entry *proc_sw_params_entry; |
385 | struct snd_info_entry *proc_status_entry; | 387 | struct snd_info_entry *proc_status_entry; |
386 | struct snd_info_entry *proc_prealloc_entry; | 388 | struct snd_info_entry *proc_prealloc_entry; |
389 | struct snd_info_entry *proc_prealloc_max_entry; | ||
387 | #endif | 390 | #endif |
388 | /* misc flags */ | 391 | /* misc flags */ |
389 | unsigned int hw_opened: 1; | 392 | unsigned int hw_opened: 1; |
@@ -427,6 +430,7 @@ struct snd_pcm { | |||
427 | wait_queue_head_t open_wait; | 430 | wait_queue_head_t open_wait; |
428 | void *private_data; | 431 | void *private_data; |
429 | void (*private_free) (struct snd_pcm *pcm); | 432 | void (*private_free) (struct snd_pcm *pcm); |
433 | struct device *dev; /* actual hw device this belongs to */ | ||
430 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) | 434 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) |
431 | struct snd_pcm_oss oss; | 435 | struct snd_pcm_oss oss; |
432 | #endif | 436 | #endif |
@@ -443,7 +447,7 @@ struct snd_pcm_notify { | |||
443 | * Registering | 447 | * Registering |
444 | */ | 448 | */ |
445 | 449 | ||
446 | extern struct file_operations snd_pcm_f_ops[2]; | 450 | extern const struct file_operations snd_pcm_f_ops[2]; |
447 | 451 | ||
448 | int snd_pcm_new(struct snd_card *card, char *id, int device, | 452 | int snd_pcm_new(struct snd_card *card, char *id, int device, |
449 | int playback_count, int capture_count, | 453 | int playback_count, int capture_count, |
diff --git a/include/sound/pt2258.h b/include/sound/pt2258.h new file mode 100644 index 0000000000..160f812faa --- /dev/null +++ b/include/sound/pt2258.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * ALSA Driver for the PT2258 volume controller. | ||
3 | * | ||
4 | * Copyright (c) 2006 Jochen Voss <voss@seehuhn.de> | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | #ifndef __SOUND_PT2258_H | ||
23 | #define __SOUND_PT2258_H | ||
24 | |||
25 | struct snd_pt2258 { | ||
26 | struct snd_card *card; | ||
27 | struct snd_i2c_bus *i2c_bus; | ||
28 | struct snd_i2c_device *i2c_dev; | ||
29 | |||
30 | unsigned char volume[6]; | ||
31 | int mute; | ||
32 | }; | ||
33 | |||
34 | extern int snd_pt2258_reset(struct snd_pt2258 *pt); | ||
35 | extern int snd_pt2258_build_controls(struct snd_pt2258 *pt); | ||
36 | |||
37 | #endif /* __SOUND_PT2258_H */ | ||
diff --git a/include/sound/sb16_csp.h b/include/sound/sb16_csp.h index caf6fe2151..736eac71d0 100644 --- a/include/sound/sb16_csp.h +++ b/include/sound/sb16_csp.h | |||
@@ -114,9 +114,21 @@ struct snd_sb_csp_info { | |||
114 | #ifdef __KERNEL__ | 114 | #ifdef __KERNEL__ |
115 | #include "sb.h" | 115 | #include "sb.h" |
116 | #include "hwdep.h" | 116 | #include "hwdep.h" |
117 | #include <linux/firmware.h> | ||
117 | 118 | ||
118 | struct snd_sb_csp; | 119 | struct snd_sb_csp; |
119 | 120 | ||
121 | /* indices for the known CSP programs */ | ||
122 | enum { | ||
123 | CSP_PROGRAM_MULAW, | ||
124 | CSP_PROGRAM_ALAW, | ||
125 | CSP_PROGRAM_ADPCM_INIT, | ||
126 | CSP_PROGRAM_ADPCM_PLAYBACK, | ||
127 | CSP_PROGRAM_ADPCM_CAPTURE, | ||
128 | |||
129 | CSP_PROGRAM_COUNT | ||
130 | }; | ||
131 | |||
120 | /* | 132 | /* |
121 | * CSP operators | 133 | * CSP operators |
122 | */ | 134 | */ |
@@ -159,6 +171,8 @@ struct snd_sb_csp { | |||
159 | struct snd_kcontrol *qsound_space; | 171 | struct snd_kcontrol *qsound_space; |
160 | 172 | ||
161 | struct mutex access_mutex; /* locking */ | 173 | struct mutex access_mutex; /* locking */ |
174 | |||
175 | const struct firmware *csp_programs[CSP_PROGRAM_COUNT]; | ||
162 | }; | 176 | }; |
163 | 177 | ||
164 | int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep); | 178 | int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep); |
diff --git a/include/sound/snd_wavefront.h b/include/sound/snd_wavefront.h index 0b9e5de94f..9688d4be91 100644 --- a/include/sound/snd_wavefront.h +++ b/include/sound/snd_wavefront.h | |||
@@ -85,6 +85,7 @@ struct _snd_wavefront { | |||
85 | char hw_version[2]; /* major = [0], minor = [1] */ | 85 | char hw_version[2]; /* major = [0], minor = [1] */ |
86 | char israw; /* needs Motorola microcode */ | 86 | char israw; /* needs Motorola microcode */ |
87 | char has_fx; /* has FX processor (Tropez+) */ | 87 | char has_fx; /* has FX processor (Tropez+) */ |
88 | char fx_initialized; /* FX's register pages initialized */ | ||
88 | char prog_status[WF_MAX_PROGRAM]; /* WF_SLOT_* */ | 89 | char prog_status[WF_MAX_PROGRAM]; /* WF_SLOT_* */ |
89 | char patch_status[WF_MAX_PATCH]; /* WF_SLOT_* */ | 90 | char patch_status[WF_MAX_PATCH]; /* WF_SLOT_* */ |
90 | char sample_status[WF_MAX_SAMPLE]; /* WF_ST_* | WF_SLOT_* */ | 91 | char sample_status[WF_MAX_SAMPLE]; /* WF_ST_* | WF_SLOT_* */ |
@@ -94,6 +95,7 @@ struct _snd_wavefront { | |||
94 | spinlock_t irq_lock; | 95 | spinlock_t irq_lock; |
95 | wait_queue_head_t interrupt_sleeper; | 96 | wait_queue_head_t interrupt_sleeper; |
96 | snd_wavefront_midi_t midi; /* ICS2115 MIDI interface */ | 97 | snd_wavefront_midi_t midi; /* ICS2115 MIDI interface */ |
98 | struct snd_card *card; | ||
97 | }; | 99 | }; |
98 | 100 | ||
99 | struct _snd_wavefront_card { | 101 | struct _snd_wavefront_card { |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h new file mode 100644 index 0000000000..2b1ae8edc4 --- /dev/null +++ b/include/sound/soc-dapm.h | |||
@@ -0,0 +1,286 @@ | |||
1 | /* | ||
2 | * linux/sound/soc-dapm.h -- ALSA SoC Dynamic Audio Power Management | ||
3 | * | ||
4 | * Author: Liam Girdwood | ||
5 | * Created: Aug 11th 2005 | ||
6 | * Copyright: Wolfson Microelectronics. PLC. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_SND_SOC_DAPM_H | ||
14 | #define __LINUX_SND_SOC_DAPM_H | ||
15 | |||
16 | #include <linux/device.h> | ||
17 | #include <linux/types.h> | ||
18 | #include <sound/control.h> | ||
19 | #include <sound/soc.h> | ||
20 | |||
21 | /* widget has no PM register bit */ | ||
22 | #define SND_SOC_NOPM -1 | ||
23 | |||
24 | /* | ||
25 | * SoC dynamic audio power managment | ||
26 | * | ||
27 | * We can have upto 4 power domains | ||
28 | * 1. Codec domain - VREF, VMID | ||
29 | * Usually controlled at codec probe/remove, although can be set | ||
30 | * at stream time if power is not needed for sidetone, etc. | ||
31 | * 2. Platform/Machine domain - physically connected inputs and outputs | ||
32 | * Is platform/machine and user action specific, is set in the machine | ||
33 | * driver and by userspace e.g when HP are inserted | ||
34 | * 3. Path domain - Internal codec path mixers | ||
35 | * Are automatically set when mixer and mux settings are | ||
36 | * changed by the user. | ||
37 | * 4. Stream domain - DAC's and ADC's. | ||
38 | * Enabled when stream playback/capture is started. | ||
39 | */ | ||
40 | |||
41 | /* codec domain */ | ||
42 | #define SND_SOC_DAPM_VMID(wname) \ | ||
43 | { .id = snd_soc_dapm_vmid, .name = wname, .kcontrols = NULL, \ | ||
44 | .num_kcontrols = 0} | ||
45 | |||
46 | /* platform domain */ | ||
47 | #define SND_SOC_DAPM_INPUT(wname) \ | ||
48 | { .id = snd_soc_dapm_input, .name = wname, .kcontrols = NULL, \ | ||
49 | .num_kcontrols = 0} | ||
50 | #define SND_SOC_DAPM_OUTPUT(wname) \ | ||
51 | { .id = snd_soc_dapm_output, .name = wname, .kcontrols = NULL, \ | ||
52 | .num_kcontrols = 0} | ||
53 | #define SND_SOC_DAPM_MIC(wname, wevent) \ | ||
54 | { .id = snd_soc_dapm_mic, .name = wname, .kcontrols = NULL, \ | ||
55 | .num_kcontrols = 0, .event = wevent, \ | ||
56 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} | ||
57 | #define SND_SOC_DAPM_HP(wname, wevent) \ | ||
58 | { .id = snd_soc_dapm_hp, .name = wname, .kcontrols = NULL, \ | ||
59 | .num_kcontrols = 0, .event = wevent, \ | ||
60 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | ||
61 | #define SND_SOC_DAPM_SPK(wname, wevent) \ | ||
62 | { .id = snd_soc_dapm_spk, .name = wname, .kcontrols = NULL, \ | ||
63 | .num_kcontrols = 0, .event = wevent, \ | ||
64 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | ||
65 | #define SND_SOC_DAPM_LINE(wname, wevent) \ | ||
66 | { .id = snd_soc_dapm_line, .name = wname, .kcontrols = NULL, \ | ||
67 | .num_kcontrols = 0, .event = wevent, \ | ||
68 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | ||
69 | |||
70 | /* path domain */ | ||
71 | #define SND_SOC_DAPM_PGA(wname, wreg, wshift, winvert,\ | ||
72 | wcontrols, wncontrols) \ | ||
73 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ | ||
74 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} | ||
75 | #define SND_SOC_DAPM_MIXER(wname, wreg, wshift, winvert, \ | ||
76 | wcontrols, wncontrols)\ | ||
77 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | ||
78 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} | ||
79 | #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \ | ||
80 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ | ||
81 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0} | ||
82 | #define SND_SOC_DAPM_SWITCH(wname, wreg, wshift, winvert, wcontrols) \ | ||
83 | { .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ | ||
84 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1} | ||
85 | #define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \ | ||
86 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ | ||
87 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1} | ||
88 | |||
89 | /* path domain with event - event handler must return 0 for success */ | ||
90 | #define SND_SOC_DAPM_PGA_E(wname, wreg, wshift, winvert, wcontrols, \ | ||
91 | wncontrols, wevent, wflags) \ | ||
92 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ | ||
93 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ | ||
94 | .event = wevent, .event_flags = wflags} | ||
95 | #define SND_SOC_DAPM_MIXER_E(wname, wreg, wshift, winvert, wcontrols, \ | ||
96 | wncontrols, wevent, wflags) \ | ||
97 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | ||
98 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ | ||
99 | .event = wevent, .event_flags = wflags} | ||
100 | #define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \ | ||
101 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ | ||
102 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0, \ | ||
103 | .event = wevent, .event_flags = wflags} | ||
104 | #define SND_SOC_DAPM_SWITCH_E(wname, wreg, wshift, winvert, wcontrols, \ | ||
105 | wevent, wflags) \ | ||
106 | { .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ | ||
107 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1 \ | ||
108 | .event = wevent, .event_flags = wflags} | ||
109 | #define SND_SOC_DAPM_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ | ||
110 | wevent, wflags) \ | ||
111 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ | ||
112 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ | ||
113 | .event = wevent, .event_flags = wflags} | ||
114 | |||
115 | /* events that are pre and post DAPM */ | ||
116 | #define SND_SOC_DAPM_PRE(wname, wevent) \ | ||
117 | { .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ | ||
118 | .num_kcontrols = 0, .event = wevent, \ | ||
119 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD} | ||
120 | #define SND_SOC_DAPM_POST(wname, wevent) \ | ||
121 | { .id = snd_soc_dapm_post, .name = wname, .kcontrols = NULL, \ | ||
122 | .num_kcontrols = 0, .event = wevent, \ | ||
123 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD} | ||
124 | |||
125 | /* stream domain */ | ||
126 | #define SND_SOC_DAPM_DAC(wname, stname, wreg, wshift, winvert) \ | ||
127 | { .id = snd_soc_dapm_dac, .name = wname, .sname = stname, .reg = wreg, \ | ||
128 | .shift = wshift, .invert = winvert} | ||
129 | #define SND_SOC_DAPM_ADC(wname, stname, wreg, wshift, winvert) \ | ||
130 | { .id = snd_soc_dapm_adc, .name = wname, .sname = stname, .reg = wreg, \ | ||
131 | .shift = wshift, .invert = winvert} | ||
132 | |||
133 | /* dapm kcontrol types */ | ||
134 | #define SOC_DAPM_SINGLE(xname, reg, shift, mask, invert) \ | ||
135 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | ||
136 | .info = snd_soc_info_volsw, \ | ||
137 | .get = snd_soc_dapm_get_volsw, .put = snd_soc_dapm_put_volsw, \ | ||
138 | .private_value = SOC_SINGLE_VALUE(reg, shift, mask, invert) } | ||
139 | #define SOC_DAPM_DOUBLE(xname, reg, shift_left, shift_right, mask, invert, \ | ||
140 | power) \ | ||
141 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | ||
142 | .info = snd_soc_info_volsw, \ | ||
143 | .get = snd_soc_dapm_get_volsw, .put = snd_soc_dapm_put_volsw, \ | ||
144 | .private_value = (reg) | ((shift_left) << 8) | ((shift_right) << 12) |\ | ||
145 | ((mask) << 16) | ((invert) << 24) } | ||
146 | #define SOC_DAPM_ENUM(xname, xenum) \ | ||
147 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | ||
148 | .info = snd_soc_info_enum_double, \ | ||
149 | .get = snd_soc_dapm_get_enum_double, \ | ||
150 | .put = snd_soc_dapm_put_enum_double, \ | ||
151 | .private_value = (unsigned long)&xenum } | ||
152 | |||
153 | /* dapm stream operations */ | ||
154 | #define SND_SOC_DAPM_STREAM_NOP 0x0 | ||
155 | #define SND_SOC_DAPM_STREAM_START 0x1 | ||
156 | #define SND_SOC_DAPM_STREAM_STOP 0x2 | ||
157 | #define SND_SOC_DAPM_STREAM_SUSPEND 0x4 | ||
158 | #define SND_SOC_DAPM_STREAM_RESUME 0x8 | ||
159 | #define SND_SOC_DAPM_STREAM_PAUSE_PUSH 0x10 | ||
160 | #define SND_SOC_DAPM_STREAM_PAUSE_RELEASE 0x20 | ||
161 | |||
162 | /* dapm event types */ | ||
163 | #define SND_SOC_DAPM_PRE_PMU 0x1 /* before widget power up */ | ||
164 | #define SND_SOC_DAPM_POST_PMU 0x2 /* after widget power up */ | ||
165 | #define SND_SOC_DAPM_PRE_PMD 0x4 /* before widget power down */ | ||
166 | #define SND_SOC_DAPM_POST_PMD 0x8 /* after widget power down */ | ||
167 | #define SND_SOC_DAPM_PRE_REG 0x10 /* before audio path setup */ | ||
168 | #define SND_SOC_DAPM_POST_REG 0x20 /* after audio path setup */ | ||
169 | |||
170 | /* convenience event type detection */ | ||
171 | #define SND_SOC_DAPM_EVENT_ON(e) \ | ||
172 | (e & (SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU)) | ||
173 | #define SND_SOC_DAPM_EVENT_OFF(e) \ | ||
174 | (e & (SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD)) | ||
175 | |||
176 | struct snd_soc_dapm_widget; | ||
177 | enum snd_soc_dapm_type; | ||
178 | struct snd_soc_dapm_path; | ||
179 | struct snd_soc_dapm_pin; | ||
180 | |||
181 | /* dapm controls */ | ||
182 | int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, | ||
183 | struct snd_ctl_elem_value *ucontrol); | ||
184 | int snd_soc_dapm_get_volsw(struct snd_kcontrol *kcontrol, | ||
185 | struct snd_ctl_elem_value *ucontrol); | ||
186 | int snd_soc_dapm_get_enum_double(struct snd_kcontrol *kcontrol, | ||
187 | struct snd_ctl_elem_value *ucontrol); | ||
188 | int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, | ||
189 | struct snd_ctl_elem_value *ucontrol); | ||
190 | int snd_soc_dapm_new_control(struct snd_soc_codec *codec, | ||
191 | const struct snd_soc_dapm_widget *widget); | ||
192 | |||
193 | /* dapm path setup */ | ||
194 | int snd_soc_dapm_connect_input(struct snd_soc_codec *codec, | ||
195 | const char *sink_name, const char *control_name, const char *src_name); | ||
196 | int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec); | ||
197 | void snd_soc_dapm_free(struct snd_soc_device *socdev); | ||
198 | |||
199 | /* dapm events */ | ||
200 | int snd_soc_dapm_stream_event(struct snd_soc_codec *codec, char *stream, | ||
201 | int event); | ||
202 | |||
203 | /* dapm sys fs - used by the core */ | ||
204 | int snd_soc_dapm_sys_add(struct device *dev); | ||
205 | |||
206 | /* dapm audio endpoint control */ | ||
207 | int snd_soc_dapm_set_endpoint(struct snd_soc_codec *codec, | ||
208 | char *pin, int status); | ||
209 | int snd_soc_dapm_sync_endpoints(struct snd_soc_codec *codec); | ||
210 | |||
211 | /* dapm widget types */ | ||
212 | enum snd_soc_dapm_type { | ||
213 | snd_soc_dapm_input = 0, /* input pin */ | ||
214 | snd_soc_dapm_output, /* output pin */ | ||
215 | snd_soc_dapm_mux, /* selects 1 analog signal from many inputs */ | ||
216 | snd_soc_dapm_mixer, /* mixes several analog signals together */ | ||
217 | snd_soc_dapm_pga, /* programmable gain/attenuation (volume) */ | ||
218 | snd_soc_dapm_adc, /* analog to digital converter */ | ||
219 | snd_soc_dapm_dac, /* digital to analog converter */ | ||
220 | snd_soc_dapm_micbias, /* microphone bias (power) */ | ||
221 | snd_soc_dapm_mic, /* microphone */ | ||
222 | snd_soc_dapm_hp, /* headphones */ | ||
223 | snd_soc_dapm_spk, /* speaker */ | ||
224 | snd_soc_dapm_line, /* line input/output */ | ||
225 | snd_soc_dapm_switch, /* analog switch */ | ||
226 | snd_soc_dapm_vmid, /* codec bias/vmid - to minimise pops */ | ||
227 | snd_soc_dapm_pre, /* machine specific pre widget - exec first */ | ||
228 | snd_soc_dapm_post, /* machine specific post widget - exec last */ | ||
229 | }; | ||
230 | |||
231 | /* dapm audio path between two widgets */ | ||
232 | struct snd_soc_dapm_path { | ||
233 | char *name; | ||
234 | char *long_name; | ||
235 | |||
236 | /* source (input) and sink (output) widgets */ | ||
237 | struct snd_soc_dapm_widget *source; | ||
238 | struct snd_soc_dapm_widget *sink; | ||
239 | struct snd_kcontrol *kcontrol; | ||
240 | |||
241 | /* status */ | ||
242 | u32 connect:1; /* source and sink widgets are connected */ | ||
243 | u32 walked:1; /* path has been walked */ | ||
244 | |||
245 | struct list_head list_source; | ||
246 | struct list_head list_sink; | ||
247 | struct list_head list; | ||
248 | }; | ||
249 | |||
250 | /* dapm widget */ | ||
251 | struct snd_soc_dapm_widget { | ||
252 | enum snd_soc_dapm_type id; | ||
253 | char *name; /* widget name */ | ||
254 | char *sname; /* stream name */ | ||
255 | struct snd_soc_codec *codec; | ||
256 | struct list_head list; | ||
257 | |||
258 | /* dapm control */ | ||
259 | short reg; /* negative reg = no direct dapm */ | ||
260 | unsigned char shift; /* bits to shift */ | ||
261 | unsigned int saved_value; /* widget saved value */ | ||
262 | unsigned int value; /* widget current value */ | ||
263 | unsigned char power:1; /* block power status */ | ||
264 | unsigned char invert:1; /* invert the power bit */ | ||
265 | unsigned char active:1; /* active stream on DAC, ADC's */ | ||
266 | unsigned char connected:1; /* connected codec pin */ | ||
267 | unsigned char new:1; /* cnew complete */ | ||
268 | unsigned char ext:1; /* has external widgets */ | ||
269 | unsigned char muted:1; /* muted for pop reduction */ | ||
270 | unsigned char suspend:1; /* was active before suspend */ | ||
271 | unsigned char pmdown:1; /* waiting for timeout */ | ||
272 | |||
273 | /* external events */ | ||
274 | unsigned short event_flags; /* flags to specify event types */ | ||
275 | int (*event)(struct snd_soc_dapm_widget*, int); | ||
276 | |||
277 | /* kcontrols that relate to this widget */ | ||
278 | int num_kcontrols; | ||
279 | const struct snd_kcontrol_new *kcontrols; | ||
280 | |||
281 | /* widget input and outputs */ | ||
282 | struct list_head sources; | ||
283 | struct list_head sinks; | ||
284 | }; | ||
285 | |||
286 | #endif | ||
diff --git a/include/sound/soc.h b/include/sound/soc.h new file mode 100644 index 0000000000..b1dc364b8f --- /dev/null +++ b/include/sound/soc.h | |||
@@ -0,0 +1,461 @@ | |||
1 | /* | ||
2 | * linux/sound/soc.h -- ALSA SoC Layer | ||
3 | * | ||
4 | * Author: Liam Girdwood | ||
5 | * Created: Aug 11th 2005 | ||
6 | * Copyright: Wolfson Microelectronics. PLC. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_SND_SOC_H | ||
14 | #define __LINUX_SND_SOC_H | ||
15 | |||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/types.h> | ||
18 | #include <linux/workqueue.h> | ||
19 | #include <sound/driver.h> | ||
20 | #include <sound/core.h> | ||
21 | #include <sound/pcm.h> | ||
22 | #include <sound/control.h> | ||
23 | #include <sound/ac97_codec.h> | ||
24 | |||
25 | #define SND_SOC_VERSION "0.13.0" | ||
26 | |||
27 | /* | ||
28 | * Convenience kcontrol builders | ||
29 | */ | ||
30 | #define SOC_SINGLE_VALUE(reg,shift,mask,invert) ((reg) | ((shift) << 8) |\ | ||
31 | ((shift) << 12) | ((mask) << 16) | ((invert) << 24)) | ||
32 | #define SOC_SINGLE_VALUE_EXT(reg,mask,invert) ((reg) | ((mask) << 16) |\ | ||
33 | ((invert) << 31)) | ||
34 | #define SOC_SINGLE(xname, reg, shift, mask, invert) \ | ||
35 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | ||
36 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ | ||
37 | .put = snd_soc_put_volsw, \ | ||
38 | .private_value = SOC_SINGLE_VALUE(reg, shift, mask, invert) } | ||
39 | #define SOC_DOUBLE(xname, reg, shift_left, shift_right, mask, invert) \ | ||
40 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ | ||
41 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ | ||
42 | .put = snd_soc_put_volsw, \ | ||
43 | .private_value = (reg) | ((shift_left) << 8) | \ | ||
44 | ((shift_right) << 12) | ((mask) << 16) | ((invert) << 24) } | ||
45 | #define SOC_DOUBLE_R(xname, reg_left, reg_right, shift, mask, invert) \ | ||
46 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | ||
47 | .info = snd_soc_info_volsw_2r, \ | ||
48 | .get = snd_soc_get_volsw_2r, .put = snd_soc_put_volsw_2r, \ | ||
49 | .private_value = (reg_left) | ((shift) << 8) | \ | ||
50 | ((mask) << 12) | ((invert) << 20) | ((reg_right) << 24) } | ||
51 | #define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \ | ||
52 | { .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \ | ||
53 | .mask = xmask, .texts = xtexts } | ||
54 | #define SOC_ENUM_SINGLE(xreg, xshift, xmask, xtexts) \ | ||
55 | SOC_ENUM_DOUBLE(xreg, xshift, xshift, xmask, xtexts) | ||
56 | #define SOC_ENUM_SINGLE_EXT(xmask, xtexts) \ | ||
57 | { .mask = xmask, .texts = xtexts } | ||
58 | #define SOC_ENUM(xname, xenum) \ | ||
59 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,\ | ||
60 | .info = snd_soc_info_enum_double, \ | ||
61 | .get = snd_soc_get_enum_double, .put = snd_soc_put_enum_double, \ | ||
62 | .private_value = (unsigned long)&xenum } | ||
63 | #define SOC_SINGLE_EXT(xname, xreg, xshift, xmask, xinvert,\ | ||
64 | xhandler_get, xhandler_put) \ | ||
65 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | ||
66 | .info = snd_soc_info_volsw, \ | ||
67 | .get = xhandler_get, .put = xhandler_put, \ | ||
68 | .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmask, xinvert) } | ||
69 | #define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put) \ | ||
70 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | ||
71 | .info = snd_soc_info_bool_ext, \ | ||
72 | .get = xhandler_get, .put = xhandler_put, \ | ||
73 | .private_value = xdata } | ||
74 | #define SOC_ENUM_EXT(xname, xenum, xhandler_get, xhandler_put) \ | ||
75 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | ||
76 | .info = snd_soc_info_enum_ext, \ | ||
77 | .get = xhandler_get, .put = xhandler_put, \ | ||
78 | .private_value = (unsigned long)&xenum } | ||
79 | |||
80 | /* | ||
81 | * Digital Audio Interface (DAI) types | ||
82 | */ | ||
83 | #define SND_SOC_DAI_AC97 0x1 | ||
84 | #define SND_SOC_DAI_I2S 0x2 | ||
85 | #define SND_SOC_DAI_PCM 0x4 | ||
86 | |||
87 | /* | ||
88 | * DAI hardware audio formats | ||
89 | */ | ||
90 | #define SND_SOC_DAIFMT_I2S 0 /* I2S mode */ | ||
91 | #define SND_SOC_DAIFMT_RIGHT_J 1 /* Right justified mode */ | ||
92 | #define SND_SOC_DAIFMT_LEFT_J 2 /* Left Justified mode */ | ||
93 | #define SND_SOC_DAIFMT_DSP_A 3 /* L data msb after FRM or LRC */ | ||
94 | #define SND_SOC_DAIFMT_DSP_B 4 /* L data msb during FRM or LRC */ | ||
95 | #define SND_SOC_DAIFMT_AC97 5 /* AC97 */ | ||
96 | |||
97 | #define SND_SOC_DAIFMT_MSB SND_SOC_DAIFMT_LEFT_J | ||
98 | #define SND_SOC_DAIFMT_LSB SND_SOC_DAIFMT_RIGHT_J | ||
99 | |||
100 | /* | ||
101 | * DAI Gating | ||
102 | */ | ||
103 | #define SND_SOC_DAIFMT_CONT (0 << 4) /* continuous clock */ | ||
104 | #define SND_SOC_DAIFMT_GATED (1 << 4) /* clock is gated when not Tx/Rx */ | ||
105 | |||
106 | /* | ||
107 | * DAI hardware signal inversions | ||
108 | */ | ||
109 | #define SND_SOC_DAIFMT_NB_NF (0 << 8) /* normal bit clock + frame */ | ||
110 | #define SND_SOC_DAIFMT_NB_IF (1 << 8) /* normal bclk + inv frm */ | ||
111 | #define SND_SOC_DAIFMT_IB_NF (2 << 8) /* invert bclk + nor frm */ | ||
112 | #define SND_SOC_DAIFMT_IB_IF (3 << 8) /* invert bclk + frm */ | ||
113 | |||
114 | /* | ||
115 | * DAI hardware clock masters | ||
116 | * This is wrt the codec, the inverse is true for the interface | ||
117 | * i.e. if the codec is clk and frm master then the interface is | ||
118 | * clk and frame slave. | ||
119 | */ | ||
120 | #define SND_SOC_DAIFMT_CBM_CFM (0 << 12) /* codec clk & frm master */ | ||
121 | #define SND_SOC_DAIFMT_CBS_CFM (1 << 12) /* codec clk slave & frm master */ | ||
122 | #define SND_SOC_DAIFMT_CBM_CFS (2 << 12) /* codec clk master & frame slave */ | ||
123 | #define SND_SOC_DAIFMT_CBS_CFS (3 << 12) /* codec clk & frm slave */ | ||
124 | |||
125 | #define SND_SOC_DAIFMT_FORMAT_MASK 0x000f | ||
126 | #define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0 | ||
127 | #define SND_SOC_DAIFMT_INV_MASK 0x0f00 | ||
128 | #define SND_SOC_DAIFMT_MASTER_MASK 0xf000 | ||
129 | |||
130 | |||
131 | /* | ||
132 | * Master Clock Directions | ||
133 | */ | ||
134 | #define SND_SOC_CLOCK_IN 0 | ||
135 | #define SND_SOC_CLOCK_OUT 1 | ||
136 | |||
137 | /* | ||
138 | * AC97 codec ID's bitmask | ||
139 | */ | ||
140 | #define SND_SOC_DAI_AC97_ID0 (1 << 0) | ||
141 | #define SND_SOC_DAI_AC97_ID1 (1 << 1) | ||
142 | #define SND_SOC_DAI_AC97_ID2 (1 << 2) | ||
143 | #define SND_SOC_DAI_AC97_ID3 (1 << 3) | ||
144 | |||
145 | struct snd_soc_device; | ||
146 | struct snd_soc_pcm_stream; | ||
147 | struct snd_soc_ops; | ||
148 | struct snd_soc_dai_mode; | ||
149 | struct snd_soc_pcm_runtime; | ||
150 | struct snd_soc_codec_dai; | ||
151 | struct snd_soc_cpu_dai; | ||
152 | struct snd_soc_codec; | ||
153 | struct snd_soc_machine_config; | ||
154 | struct soc_enum; | ||
155 | struct snd_soc_ac97_ops; | ||
156 | struct snd_soc_clock_info; | ||
157 | |||
158 | typedef int (*hw_write_t)(void *,const char* ,int); | ||
159 | typedef int (*hw_read_t)(void *,char* ,int); | ||
160 | |||
161 | extern struct snd_ac97_bus_ops soc_ac97_ops; | ||
162 | |||
163 | /* pcm <-> DAI connect */ | ||
164 | void snd_soc_free_pcms(struct snd_soc_device *socdev); | ||
165 | int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid); | ||
166 | int snd_soc_register_card(struct snd_soc_device *socdev); | ||
167 | |||
168 | /* set runtime hw params */ | ||
169 | int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream, | ||
170 | const struct snd_pcm_hardware *hw); | ||
171 | |||
172 | /* codec IO */ | ||
173 | #define snd_soc_read(codec, reg) codec->read(codec, reg) | ||
174 | #define snd_soc_write(codec, reg, value) codec->write(codec, reg, value) | ||
175 | |||
176 | /* codec register bit access */ | ||
177 | int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg, | ||
178 | unsigned short mask, unsigned short value); | ||
179 | int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned short reg, | ||
180 | unsigned short mask, unsigned short value); | ||
181 | |||
182 | int snd_soc_new_ac97_codec(struct snd_soc_codec *codec, | ||
183 | struct snd_ac97_bus_ops *ops, int num); | ||
184 | void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); | ||
185 | |||
186 | /* | ||
187 | *Controls | ||
188 | */ | ||
189 | struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, | ||
190 | void *data, char *long_name); | ||
191 | int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol, | ||
192 | struct snd_ctl_elem_info *uinfo); | ||
193 | int snd_soc_info_enum_ext(struct snd_kcontrol *kcontrol, | ||
194 | struct snd_ctl_elem_info *uinfo); | ||
195 | int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol, | ||
196 | struct snd_ctl_elem_value *ucontrol); | ||
197 | int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol, | ||
198 | struct snd_ctl_elem_value *ucontrol); | ||
199 | int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, | ||
200 | struct snd_ctl_elem_info *uinfo); | ||
201 | int snd_soc_info_volsw_ext(struct snd_kcontrol *kcontrol, | ||
202 | struct snd_ctl_elem_info *uinfo); | ||
203 | int snd_soc_info_bool_ext(struct snd_kcontrol *kcontrol, | ||
204 | struct snd_ctl_elem_info *uinfo); | ||
205 | int snd_soc_get_volsw(struct snd_kcontrol *kcontrol, | ||
206 | struct snd_ctl_elem_value *ucontrol); | ||
207 | int snd_soc_put_volsw(struct snd_kcontrol *kcontrol, | ||
208 | struct snd_ctl_elem_value *ucontrol); | ||
209 | int snd_soc_info_volsw_2r(struct snd_kcontrol *kcontrol, | ||
210 | struct snd_ctl_elem_info *uinfo); | ||
211 | int snd_soc_get_volsw_2r(struct snd_kcontrol *kcontrol, | ||
212 | struct snd_ctl_elem_value *ucontrol); | ||
213 | int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol, | ||
214 | struct snd_ctl_elem_value *ucontrol); | ||
215 | |||
216 | /* SoC PCM stream information */ | ||
217 | struct snd_soc_pcm_stream { | ||
218 | char *stream_name; | ||
219 | u64 formats; /* SNDRV_PCM_FMTBIT_* */ | ||
220 | unsigned int rates; /* SNDRV_PCM_RATE_* */ | ||
221 | unsigned int rate_min; /* min rate */ | ||
222 | unsigned int rate_max; /* max rate */ | ||
223 | unsigned int channels_min; /* min channels */ | ||
224 | unsigned int channels_max; /* max channels */ | ||
225 | unsigned int active:1; /* stream is in use */ | ||
226 | }; | ||
227 | |||
228 | /* SoC audio ops */ | ||
229 | struct snd_soc_ops { | ||
230 | int (*startup)(struct snd_pcm_substream *); | ||
231 | void (*shutdown)(struct snd_pcm_substream *); | ||
232 | int (*hw_params)(struct snd_pcm_substream *, struct snd_pcm_hw_params *); | ||
233 | int (*hw_free)(struct snd_pcm_substream *); | ||
234 | int (*prepare)(struct snd_pcm_substream *); | ||
235 | int (*trigger)(struct snd_pcm_substream *, int); | ||
236 | }; | ||
237 | |||
238 | /* ASoC codec DAI ops */ | ||
239 | struct snd_soc_codec_ops { | ||
240 | /* codec DAI clocking configuration */ | ||
241 | int (*set_sysclk)(struct snd_soc_codec_dai *codec_dai, | ||
242 | int clk_id, unsigned int freq, int dir); | ||
243 | int (*set_pll)(struct snd_soc_codec_dai *codec_dai, | ||
244 | int pll_id, unsigned int freq_in, unsigned int freq_out); | ||
245 | int (*set_clkdiv)(struct snd_soc_codec_dai *codec_dai, | ||
246 | int div_id, int div); | ||
247 | |||
248 | /* CPU DAI format configuration */ | ||
249 | int (*set_fmt)(struct snd_soc_codec_dai *codec_dai, | ||
250 | unsigned int fmt); | ||
251 | int (*set_tdm_slot)(struct snd_soc_codec_dai *codec_dai, | ||
252 | unsigned int mask, int slots); | ||
253 | int (*set_tristate)(struct snd_soc_codec_dai *, int tristate); | ||
254 | |||
255 | /* digital mute */ | ||
256 | int (*digital_mute)(struct snd_soc_codec_dai *, int mute); | ||
257 | }; | ||
258 | |||
259 | /* ASoC cpu DAI ops */ | ||
260 | struct snd_soc_cpu_ops { | ||
261 | /* CPU DAI clocking configuration */ | ||
262 | int (*set_sysclk)(struct snd_soc_cpu_dai *cpu_dai, | ||
263 | int clk_id, unsigned int freq, int dir); | ||
264 | int (*set_clkdiv)(struct snd_soc_cpu_dai *cpu_dai, | ||
265 | int div_id, int div); | ||
266 | int (*set_pll)(struct snd_soc_cpu_dai *cpu_dai, | ||
267 | int pll_id, unsigned int freq_in, unsigned int freq_out); | ||
268 | |||
269 | /* CPU DAI format configuration */ | ||
270 | int (*set_fmt)(struct snd_soc_cpu_dai *cpu_dai, | ||
271 | unsigned int fmt); | ||
272 | int (*set_tdm_slot)(struct snd_soc_cpu_dai *cpu_dai, | ||
273 | unsigned int mask, int slots); | ||
274 | int (*set_tristate)(struct snd_soc_cpu_dai *, int tristate); | ||
275 | }; | ||
276 | |||
277 | /* SoC Codec DAI */ | ||
278 | struct snd_soc_codec_dai { | ||
279 | char *name; | ||
280 | int id; | ||
281 | |||
282 | /* DAI capabilities */ | ||
283 | struct snd_soc_pcm_stream playback; | ||
284 | struct snd_soc_pcm_stream capture; | ||
285 | |||
286 | /* DAI runtime info */ | ||
287 | struct snd_soc_codec *codec; | ||
288 | unsigned int active; | ||
289 | unsigned char pop_wait:1; | ||
290 | |||
291 | /* ops */ | ||
292 | struct snd_soc_ops ops; | ||
293 | struct snd_soc_codec_ops dai_ops; | ||
294 | |||
295 | /* DAI private data */ | ||
296 | void *private_data; | ||
297 | }; | ||
298 | |||
299 | /* SoC CPU DAI */ | ||
300 | struct snd_soc_cpu_dai { | ||
301 | |||
302 | /* DAI description */ | ||
303 | char *name; | ||
304 | unsigned int id; | ||
305 | unsigned char type; | ||
306 | |||
307 | /* DAI callbacks */ | ||
308 | int (*probe)(struct platform_device *pdev); | ||
309 | void (*remove)(struct platform_device *pdev); | ||
310 | int (*suspend)(struct platform_device *pdev, | ||
311 | struct snd_soc_cpu_dai *cpu_dai); | ||
312 | int (*resume)(struct platform_device *pdev, | ||
313 | struct snd_soc_cpu_dai *cpu_dai); | ||
314 | |||
315 | /* ops */ | ||
316 | struct snd_soc_ops ops; | ||
317 | struct snd_soc_cpu_ops dai_ops; | ||
318 | |||
319 | /* DAI capabilities */ | ||
320 | struct snd_soc_pcm_stream capture; | ||
321 | struct snd_soc_pcm_stream playback; | ||
322 | |||
323 | /* DAI runtime info */ | ||
324 | struct snd_pcm_runtime *runtime; | ||
325 | unsigned char active:1; | ||
326 | void *dma_data; | ||
327 | |||
328 | /* DAI private data */ | ||
329 | void *private_data; | ||
330 | }; | ||
331 | |||
332 | /* SoC Audio Codec */ | ||
333 | struct snd_soc_codec { | ||
334 | char *name; | ||
335 | struct module *owner; | ||
336 | struct mutex mutex; | ||
337 | |||
338 | /* callbacks */ | ||
339 | int (*dapm_event)(struct snd_soc_codec *codec, int event); | ||
340 | |||
341 | /* runtime */ | ||
342 | struct snd_card *card; | ||
343 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ | ||
344 | unsigned int active; | ||
345 | unsigned int pcm_devs; | ||
346 | void *private_data; | ||
347 | |||
348 | /* codec IO */ | ||
349 | void *control_data; /* codec control (i2c/3wire) data */ | ||
350 | unsigned int (*read)(struct snd_soc_codec *, unsigned int); | ||
351 | int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); | ||
352 | hw_write_t hw_write; | ||
353 | hw_read_t hw_read; | ||
354 | void *reg_cache; | ||
355 | short reg_cache_size; | ||
356 | short reg_cache_step; | ||
357 | |||
358 | /* dapm */ | ||
359 | struct list_head dapm_widgets; | ||
360 | struct list_head dapm_paths; | ||
361 | unsigned int dapm_state; | ||
362 | unsigned int suspend_dapm_state; | ||
363 | struct delayed_work delayed_work; | ||
364 | |||
365 | /* codec DAI's */ | ||
366 | struct snd_soc_codec_dai *dai; | ||
367 | unsigned int num_dai; | ||
368 | }; | ||
369 | |||
370 | /* codec device */ | ||
371 | struct snd_soc_codec_device { | ||
372 | int (*probe)(struct platform_device *pdev); | ||
373 | int (*remove)(struct platform_device *pdev); | ||
374 | int (*suspend)(struct platform_device *pdev, pm_message_t state); | ||
375 | int (*resume)(struct platform_device *pdev); | ||
376 | }; | ||
377 | |||
378 | /* SoC platform interface */ | ||
379 | struct snd_soc_platform { | ||
380 | char *name; | ||
381 | |||
382 | int (*probe)(struct platform_device *pdev); | ||
383 | int (*remove)(struct platform_device *pdev); | ||
384 | int (*suspend)(struct platform_device *pdev, | ||
385 | struct snd_soc_cpu_dai *cpu_dai); | ||
386 | int (*resume)(struct platform_device *pdev, | ||
387 | struct snd_soc_cpu_dai *cpu_dai); | ||
388 | |||
389 | /* pcm creation and destruction */ | ||
390 | int (*pcm_new)(struct snd_card *, struct snd_soc_codec_dai *, | ||
391 | struct snd_pcm *); | ||
392 | void (*pcm_free)(struct snd_pcm *); | ||
393 | |||
394 | /* platform stream ops */ | ||
395 | struct snd_pcm_ops *pcm_ops; | ||
396 | }; | ||
397 | |||
398 | /* SoC machine DAI configuration, glues a codec and cpu DAI together */ | ||
399 | struct snd_soc_dai_link { | ||
400 | char *name; /* Codec name */ | ||
401 | char *stream_name; /* Stream name */ | ||
402 | |||
403 | /* DAI */ | ||
404 | struct snd_soc_codec_dai *codec_dai; | ||
405 | struct snd_soc_cpu_dai *cpu_dai; | ||
406 | |||
407 | /* machine stream operations */ | ||
408 | struct snd_soc_ops *ops; | ||
409 | |||
410 | /* codec/machine specific init - e.g. add machine controls */ | ||
411 | int (*init)(struct snd_soc_codec *codec); | ||
412 | }; | ||
413 | |||
414 | /* SoC machine */ | ||
415 | struct snd_soc_machine { | ||
416 | char *name; | ||
417 | |||
418 | int (*probe)(struct platform_device *pdev); | ||
419 | int (*remove)(struct platform_device *pdev); | ||
420 | |||
421 | /* the pre and post PM functions are used to do any PM work before and | ||
422 | * after the codec and DAI's do any PM work. */ | ||
423 | int (*suspend_pre)(struct platform_device *pdev, pm_message_t state); | ||
424 | int (*suspend_post)(struct platform_device *pdev, pm_message_t state); | ||
425 | int (*resume_pre)(struct platform_device *pdev); | ||
426 | int (*resume_post)(struct platform_device *pdev); | ||
427 | |||
428 | /* CPU <--> Codec DAI links */ | ||
429 | struct snd_soc_dai_link *dai_link; | ||
430 | int num_links; | ||
431 | }; | ||
432 | |||
433 | /* SoC Device - the audio subsystem */ | ||
434 | struct snd_soc_device { | ||
435 | struct device *dev; | ||
436 | struct snd_soc_machine *machine; | ||
437 | struct snd_soc_platform *platform; | ||
438 | struct snd_soc_codec *codec; | ||
439 | struct snd_soc_codec_device *codec_dev; | ||
440 | struct delayed_work delayed_work; | ||
441 | void *codec_data; | ||
442 | }; | ||
443 | |||
444 | /* runtime channel data */ | ||
445 | struct snd_soc_pcm_runtime { | ||
446 | struct snd_soc_dai_link *dai; | ||
447 | struct snd_soc_device *socdev; | ||
448 | }; | ||
449 | |||
450 | /* enumerated kcontrol */ | ||
451 | struct soc_enum { | ||
452 | unsigned short reg; | ||
453 | unsigned short reg2; | ||
454 | unsigned char shift_l; | ||
455 | unsigned char shift_r; | ||
456 | unsigned int mask; | ||
457 | const char **texts; | ||
458 | void *dapm; | ||
459 | }; | ||
460 | |||
461 | #endif | ||
diff --git a/include/sound/typedefs.h b/include/sound/typedefs.h deleted file mode 100644 index f454b0206b..0000000000 --- a/include/sound/typedefs.h +++ /dev/null | |||
@@ -1,173 +0,0 @@ | |||
1 | /* | ||
2 | * Typedef's for backward compatibility (for out-of-kernel drivers) | ||
3 | * | ||
4 | * This file will be removed soon in future | ||
5 | */ | ||
6 | |||
7 | /* core stuff */ | ||
8 | typedef struct snd_card snd_card_t; | ||
9 | typedef struct snd_device snd_device_t; | ||
10 | typedef struct snd_device_ops snd_device_ops_t; | ||
11 | typedef enum snd_card_type snd_card_type_t; | ||
12 | typedef struct snd_minor snd_minor_t; | ||
13 | |||
14 | /* info */ | ||
15 | typedef struct snd_info_entry snd_info_entry_t; | ||
16 | typedef struct snd_info_buffer snd_info_buffer_t; | ||
17 | |||
18 | /* control */ | ||
19 | typedef struct snd_ctl_file snd_ctl_file_t; | ||
20 | typedef struct snd_kcontrol snd_kcontrol_t; | ||
21 | typedef struct snd_kcontrol_new snd_kcontrol_new_t; | ||
22 | typedef struct snd_kcontrol_volatile snd_kcontrol_volatile_t; | ||
23 | typedef struct snd_kctl_event snd_kctl_event_t; | ||
24 | typedef struct snd_aes_iec958 snd_aes_iec958_t; | ||
25 | typedef struct snd_ctl_card_info snd_ctl_card_info_t; | ||
26 | typedef struct snd_ctl_elem_id snd_ctl_elem_id_t; | ||
27 | typedef struct snd_ctl_elem_list snd_ctl_elem_list_t; | ||
28 | typedef struct snd_ctl_elem_info snd_ctl_elem_info_t; | ||
29 | typedef struct snd_ctl_elem_value snd_ctl_elem_value_t; | ||
30 | typedef struct snd_ctl_event snd_ctl_event_t; | ||
31 | #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) | ||
32 | typedef struct snd_mixer_oss snd_mixer_oss_t; | ||
33 | #endif | ||
34 | |||
35 | /* timer */ | ||
36 | typedef struct snd_timer snd_timer_t; | ||
37 | typedef struct snd_timer_instance snd_timer_instance_t; | ||
38 | typedef struct snd_timer_id snd_timer_id_t; | ||
39 | typedef struct snd_timer_ginfo snd_timer_ginfo_t; | ||
40 | typedef struct snd_timer_gparams snd_timer_gparams_t; | ||
41 | typedef struct snd_timer_gstatus snd_timer_gstatus_t; | ||
42 | typedef struct snd_timer_select snd_timer_select_t; | ||
43 | typedef struct snd_timer_info snd_timer_info_t; | ||
44 | typedef struct snd_timer_params snd_timer_params_t; | ||
45 | typedef struct snd_timer_status snd_timer_status_t; | ||
46 | typedef struct snd_timer_read snd_timer_read_t; | ||
47 | typedef struct snd_timer_tread snd_timer_tread_t; | ||
48 | |||
49 | /* PCM */ | ||
50 | typedef struct snd_pcm snd_pcm_t; | ||
51 | typedef struct snd_pcm_str snd_pcm_str_t; | ||
52 | typedef struct snd_pcm_substream snd_pcm_substream_t; | ||
53 | typedef struct snd_pcm_info snd_pcm_info_t; | ||
54 | typedef struct snd_pcm_hw_params snd_pcm_hw_params_t; | ||
55 | typedef struct snd_pcm_sw_params snd_pcm_sw_params_t; | ||
56 | typedef struct snd_pcm_channel_info snd_pcm_channel_info_t; | ||
57 | typedef struct snd_pcm_status snd_pcm_status_t; | ||
58 | typedef struct snd_pcm_mmap_status snd_pcm_mmap_status_t; | ||
59 | typedef struct snd_pcm_mmap_control snd_pcm_mmap_control_t; | ||
60 | typedef struct snd_mask snd_mask_t; | ||
61 | typedef struct snd_sg_buf snd_pcm_sgbuf_t; | ||
62 | |||
63 | typedef struct snd_interval snd_interval_t; | ||
64 | typedef struct snd_xferi snd_xferi_t; | ||
65 | typedef struct snd_xfern snd_xfern_t; | ||
66 | typedef struct snd_xferv snd_xferv_t; | ||
67 | |||
68 | typedef struct snd_pcm_file snd_pcm_file_t; | ||
69 | typedef struct snd_pcm_runtime snd_pcm_runtime_t; | ||
70 | typedef struct snd_pcm_hardware snd_pcm_hardware_t; | ||
71 | typedef struct snd_pcm_ops snd_pcm_ops_t; | ||
72 | typedef struct snd_pcm_hw_rule snd_pcm_hw_rule_t; | ||
73 | typedef struct snd_pcm_hw_constraints snd_pcm_hw_constraints_t; | ||
74 | typedef struct snd_ratnum ratnum_t; | ||
75 | typedef struct snd_ratden ratden_t; | ||
76 | typedef struct snd_pcm_hw_constraint_ratnums snd_pcm_hw_constraint_ratnums_t; | ||
77 | typedef struct snd_pcm_hw_constraint_ratdens snd_pcm_hw_constraint_ratdens_t; | ||
78 | typedef struct snd_pcm_hw_constraint_list snd_pcm_hw_constraint_list_t; | ||
79 | typedef struct snd_pcm_group snd_pcm_group_t; | ||
80 | typedef struct snd_pcm_notify snd_pcm_notify_t; | ||
81 | |||
82 | /* rawmidi */ | ||
83 | typedef struct snd_rawmidi snd_rawmidi_t; | ||
84 | typedef struct snd_rawmidi_info snd_rawmidi_info_t; | ||
85 | typedef struct snd_rawmidi_params snd_rawmidi_params_t; | ||
86 | typedef struct snd_rawmidi_status snd_rawmidi_status_t; | ||
87 | typedef struct snd_rawmidi_runtime snd_rawmidi_runtime_t; | ||
88 | typedef struct snd_rawmidi_substream snd_rawmidi_substream_t; | ||
89 | typedef struct snd_rawmidi_str snd_rawmidi_str_t; | ||
90 | typedef struct snd_rawmidi_ops snd_rawmidi_ops_t; | ||
91 | typedef struct snd_rawmidi_global_ops snd_rawmidi_global_ops_t; | ||
92 | typedef struct snd_rawmidi_file snd_rawmidi_file_t; | ||
93 | |||
94 | /* hwdep */ | ||
95 | typedef struct snd_hwdep snd_hwdep_t; | ||
96 | typedef struct snd_hwdep_info snd_hwdep_info_t; | ||
97 | typedef struct snd_hwdep_dsp_status snd_hwdep_dsp_status_t; | ||
98 | typedef struct snd_hwdep_dsp_image snd_hwdep_dsp_image_t; | ||
99 | typedef struct snd_hwdep_ops snd_hwdep_ops_t; | ||
100 | |||
101 | /* sequencer */ | ||
102 | typedef struct snd_seq_port_info snd_seq_port_info_t; | ||
103 | typedef struct snd_seq_port_subscribe snd_seq_port_subscribe_t; | ||
104 | typedef struct snd_seq_event snd_seq_event_t; | ||
105 | typedef struct snd_seq_addr snd_seq_addr_t; | ||
106 | typedef struct snd_seq_ev_volume snd_seq_ev_volume_t; | ||
107 | typedef struct snd_seq_ev_loop snd_seq_ev_loop_t; | ||
108 | typedef struct snd_seq_remove_events snd_seq_remove_events_t; | ||
109 | typedef struct snd_seq_query_subs snd_seq_query_subs_t; | ||
110 | typedef struct snd_seq_system_info snd_seq_system_info_t; | ||
111 | typedef struct snd_seq_client_info snd_seq_client_info_t; | ||
112 | typedef struct snd_seq_queue_info snd_seq_queue_info_t; | ||
113 | typedef struct snd_seq_queue_status snd_seq_queue_status_t; | ||
114 | typedef struct snd_seq_queue_tempo snd_seq_queue_tempo_t; | ||
115 | typedef struct snd_seq_queue_owner snd_seq_queue_owner_t; | ||
116 | typedef struct snd_seq_queue_timer snd_seq_queue_timer_t; | ||
117 | typedef struct snd_seq_queue_client snd_seq_queue_client_t; | ||
118 | typedef struct snd_seq_client_pool snd_seq_client_pool_t; | ||
119 | typedef struct snd_seq_instr snd_seq_instr_t; | ||
120 | typedef struct snd_seq_instr_data snd_seq_instr_data_t; | ||
121 | typedef struct snd_seq_instr_header snd_seq_instr_header_t; | ||
122 | |||
123 | typedef struct snd_seq_user_client user_client_t; | ||
124 | typedef struct snd_seq_kernel_client kernel_client_t; | ||
125 | typedef struct snd_seq_client client_t; | ||
126 | typedef struct snd_seq_queue queue_t; | ||
127 | |||
128 | /* seq_device */ | ||
129 | typedef struct snd_seq_device snd_seq_device_t; | ||
130 | typedef struct snd_seq_dev_ops snd_seq_dev_ops_t; | ||
131 | |||
132 | /* seq_midi */ | ||
133 | typedef struct snd_midi_event snd_midi_event_t; | ||
134 | |||
135 | /* seq_midi_emul */ | ||
136 | typedef struct snd_midi_channel snd_midi_channel_t; | ||
137 | typedef struct snd_midi_channel_set snd_midi_channel_set_t; | ||
138 | typedef struct snd_midi_op snd_midi_op_t; | ||
139 | |||
140 | /* seq_oss */ | ||
141 | typedef struct snd_seq_oss_arg snd_seq_oss_arg_t; | ||
142 | typedef struct snd_seq_oss_callback snd_seq_oss_callback_t; | ||
143 | typedef struct snd_seq_oss_reg snd_seq_oss_reg_t; | ||
144 | |||
145 | /* virmidi */ | ||
146 | typedef struct snd_virmidi_dev snd_virmidi_dev_t; | ||
147 | typedef struct snd_virmidi snd_virmidi_t; | ||
148 | |||
149 | /* seq_instr */ | ||
150 | typedef struct snd_seq_kcluster snd_seq_kcluster_t; | ||
151 | typedef struct snd_seq_kinstr_ops snd_seq_kinstr_ops_t; | ||
152 | typedef struct snd_seq_kinstr snd_seq_kinstr_t; | ||
153 | typedef struct snd_seq_kinstr_list snd_seq_kinstr_list_t; | ||
154 | |||
155 | /* ac97 */ | ||
156 | typedef struct snd_ac97_bus ac97_bus_t; | ||
157 | typedef struct snd_ac97_bus_ops ac97_bus_ops_t; | ||
158 | typedef struct snd_ac97_template ac97_template_t; | ||
159 | typedef struct snd_ac97 ac97_t; | ||
160 | |||
161 | /* opl3/4 */ | ||
162 | typedef struct snd_opl3 opl3_t; | ||
163 | typedef struct snd_opl4 opl4_t; | ||
164 | |||
165 | /* mpu401 */ | ||
166 | typedef struct snd_mpu401 mpu401_t; | ||
167 | |||
168 | /* i2c */ | ||
169 | typedef struct snd_i2c_device snd_i2c_device_t; | ||
170 | typedef struct snd_i2c_bus snd_i2c_bus_t; | ||
171 | |||
172 | typedef struct snd_ak4531 ak4531_t; | ||
173 | |||
diff --git a/include/sound/version.h b/include/sound/version.h index 20f7babad5..c39b3802cf 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h. Generated by alsa/ksync script. */ | 1 | /* include/version.h. Generated by alsa/ksync script. */ |
2 | #define CONFIG_SND_VERSION "1.0.14rc1" | 2 | #define CONFIG_SND_VERSION "1.0.14rc2" |
3 | #define CONFIG_SND_DATE " (Tue Jan 09 09:56:17 2007 UTC)" | 3 | #define CONFIG_SND_DATE " (Fri Feb 09 13:50:10 2007 UTC)" |
diff --git a/include/sound/vx_core.h b/include/sound/vx_core.h index 2173946520..4830651cc4 100644 --- a/include/sound/vx_core.h +++ b/include/sound/vx_core.h | |||
@@ -128,7 +128,7 @@ struct snd_vx_hardware { | |||
128 | unsigned int num_ins; | 128 | unsigned int num_ins; |
129 | unsigned int num_outs; | 129 | unsigned int num_outs; |
130 | unsigned int output_level_max; | 130 | unsigned int output_level_max; |
131 | unsigned int *output_level_db_scale; | 131 | const unsigned int *output_level_db_scale; |
132 | }; | 132 | }; |
133 | 133 | ||
134 | /* hwdep id string */ | 134 | /* hwdep id string */ |
diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h index f3514ee96b..203d2b45b7 100644 --- a/include/sound/ymfpci.h +++ b/include/sound/ymfpci.h | |||
@@ -270,6 +270,7 @@ struct snd_ymfpci_pcm { | |||
270 | struct snd_pcm_substream *substream; | 270 | struct snd_pcm_substream *substream; |
271 | struct snd_ymfpci_voice *voices[2]; /* playback only */ | 271 | struct snd_ymfpci_voice *voices[2]; /* playback only */ |
272 | unsigned int running: 1, | 272 | unsigned int running: 1, |
273 | use_441_slot: 1, | ||
273 | output_front: 1, | 274 | output_front: 1, |
274 | output_rear: 1, | 275 | output_rear: 1, |
275 | swap_rear: 1; | 276 | swap_rear: 1; |
@@ -324,6 +325,7 @@ struct snd_ymfpci { | |||
324 | 325 | ||
325 | u32 active_bank; | 326 | u32 active_bank; |
326 | struct snd_ymfpci_voice voices[64]; | 327 | struct snd_ymfpci_voice voices[64]; |
328 | int src441_used; | ||
327 | 329 | ||
328 | struct snd_ac97_bus *ac97_bus; | 330 | struct snd_ac97_bus *ac97_bus; |
329 | struct snd_ac97 *ac97; | 331 | struct snd_ac97 *ac97; |
@@ -346,7 +348,7 @@ struct snd_ymfpci { | |||
346 | int mode_dup4ch; | 348 | int mode_dup4ch; |
347 | int rear_opened; | 349 | int rear_opened; |
348 | int spdif_opened; | 350 | int spdif_opened; |
349 | struct { | 351 | struct snd_ymfpci_pcm_mixer { |
350 | u16 left; | 352 | u16 left; |
351 | u16 right; | 353 | u16 right; |
352 | struct snd_kcontrol *ctl; | 354 | struct snd_kcontrol *ctl; |
@@ -357,6 +359,8 @@ struct snd_ymfpci { | |||
357 | wait_queue_head_t interrupt_sleep; | 359 | wait_queue_head_t interrupt_sleep; |
358 | atomic_t interrupt_sleep_count; | 360 | atomic_t interrupt_sleep_count; |
359 | struct snd_info_entry *proc_entry; | 361 | struct snd_info_entry *proc_entry; |
362 | const struct firmware *dsp_microcode; | ||
363 | const struct firmware *controller_microcode; | ||
360 | 364 | ||
361 | #ifdef CONFIG_PM | 365 | #ifdef CONFIG_PM |
362 | u32 *saved_regs; | 366 | u32 *saved_regs; |
diff --git a/include/video/neomagic.h b/include/video/neomagic.h index 78b1f15a53..a9e118a1cd 100644 --- a/include/video/neomagic.h +++ b/include/video/neomagic.h | |||
@@ -140,7 +140,8 @@ typedef volatile struct { | |||
140 | 140 | ||
141 | struct neofb_par { | 141 | struct neofb_par { |
142 | struct vgastate state; | 142 | struct vgastate state; |
143 | atomic_t ref_count; | 143 | struct mutex open_lock; |
144 | unsigned int ref_count; | ||
144 | 145 | ||
145 | unsigned char MiscOutReg; /* Misc */ | 146 | unsigned char MiscOutReg; /* Misc */ |
146 | unsigned char CRTC[25]; /* Crtc Controller */ | 147 | unsigned char CRTC[25]; /* Crtc Controller */ |
diff --git a/include/video/s3blit.h b/include/video/s3blit.h deleted file mode 100644 index b1db63187b..0000000000 --- a/include/video/s3blit.h +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | #ifndef _VIDEO_S3BLIT_H | ||
2 | #define _VIDEO_S3BLIT_H | ||
3 | |||
4 | /* s3 commands */ | ||
5 | #define S3_BITBLT 0xc011 | ||
6 | #define S3_TWOPOINTLINE 0x2811 | ||
7 | #define S3_FILLEDRECT 0x40b1 | ||
8 | |||
9 | #define S3_FIFO_EMPTY 0x0400 | ||
10 | #define S3_HDW_BUSY 0x0200 | ||
11 | |||
12 | /* Enhanced register mapping (MMIO mode) */ | ||
13 | |||
14 | #define S3_READ_SEL 0xbee8 /* offset f */ | ||
15 | #define S3_MULT_MISC 0xbee8 /* offset e */ | ||
16 | #define S3_ERR_TERM 0x92e8 | ||
17 | #define S3_FRGD_COLOR 0xa6e8 | ||
18 | #define S3_BKGD_COLOR 0xa2e8 | ||
19 | #define S3_PIXEL_CNTL 0xbee8 /* offset a */ | ||
20 | #define S3_FRGD_MIX 0xbae8 | ||
21 | #define S3_BKGD_MIX 0xb6e8 | ||
22 | #define S3_CUR_Y 0x82e8 | ||
23 | #define S3_CUR_X 0x86e8 | ||
24 | #define S3_DESTY_AXSTP 0x8ae8 | ||
25 | #define S3_DESTX_DIASTP 0x8ee8 | ||
26 | #define S3_MIN_AXIS_PCNT 0xbee8 /* offset 0 */ | ||
27 | #define S3_MAJ_AXIS_PCNT 0x96e8 | ||
28 | #define S3_CMD 0x9ae8 | ||
29 | #define S3_GP_STAT 0x9ae8 | ||
30 | #define S3_ADVFUNC_CNTL 0x4ae8 | ||
31 | #define S3_WRT_MASK 0xaae8 | ||
32 | #define S3_RD_MASK 0xaee8 | ||
33 | |||
34 | /* Enhanced register mapping (Packed MMIO mode, write only) */ | ||
35 | #define S3_ALT_CURXY 0x8100 | ||
36 | #define S3_ALT_CURXY2 0x8104 | ||
37 | #define S3_ALT_STEP 0x8108 | ||
38 | #define S3_ALT_STEP2 0x810c | ||
39 | #define S3_ALT_ERR 0x8110 | ||
40 | #define S3_ALT_CMD 0x8118 | ||
41 | #define S3_ALT_MIX 0x8134 | ||
42 | #define S3_ALT_PCNT 0x8148 | ||
43 | #define S3_ALT_PAT 0x8168 | ||
44 | |||
45 | /* Drawing modes */ | ||
46 | #define S3_NOTCUR 0x0000 | ||
47 | #define S3_LOGICALZERO 0x0001 | ||
48 | #define S3_LOGICALONE 0x0002 | ||
49 | #define S3_LEAVEASIS 0x0003 | ||
50 | #define S3_NOTNEW 0x0004 | ||
51 | #define S3_CURXORNEW 0x0005 | ||
52 | #define S3_NOT_CURXORNEW 0x0006 | ||
53 | #define S3_NEW 0x0007 | ||
54 | #define S3_NOTCURORNOTNEW 0x0008 | ||
55 | #define S3_CURORNOTNEW 0x0009 | ||
56 | #define S3_NOTCURORNEW 0x000a | ||
57 | #define S3_CURORNEW 0x000b | ||
58 | #define S3_CURANDNEW 0x000c | ||
59 | #define S3_NOTCURANDNEW 0x000d | ||
60 | #define S3_CURANDNOTNEW 0x000e | ||
61 | #define S3_NOTCURANDNOTNEW 0x000f | ||
62 | |||
63 | #define S3_CRTC_ADR 0x03d4 | ||
64 | #define S3_CRTC_DATA 0x03d5 | ||
65 | |||
66 | #define S3_REG_LOCK2 0x39 | ||
67 | #define S3_HGC_MODE 0x45 | ||
68 | |||
69 | #define S3_HWGC_ORGX_H 0x46 | ||
70 | #define S3_HWGC_ORGX_L 0x47 | ||
71 | #define S3_HWGC_ORGY_H 0x48 | ||
72 | #define S3_HWGC_ORGY_L 0x49 | ||
73 | #define S3_HWGC_DX 0x4e | ||
74 | #define S3_HWGC_DY 0x4f | ||
75 | |||
76 | |||
77 | #define S3_LAW_CTL 0x58 | ||
78 | |||
79 | #endif /* _VIDEO_S3BLIT_H */ | ||