diff options
Diffstat (limited to 'include')
79 files changed, 793 insertions, 222 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 06480bcabfdc..06ebb6ef72aa 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -319,6 +319,7 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) | |||
319 | #endif /* CONFIG_CPU_FREQ */ | 319 | #endif /* CONFIG_CPU_FREQ */ |
320 | 320 | ||
321 | /* in processor_throttling.c */ | 321 | /* in processor_throttling.c */ |
322 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr); | ||
322 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); | 323 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
323 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); | 324 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); |
324 | extern struct file_operations acpi_processor_throttling_fops; | 325 | extern struct file_operations acpi_processor_throttling_fops; |
diff --git a/include/asm-arm/arch-at91/io.h b/include/asm-arm/arch-at91/io.h index 80073fd36b8e..f8beaa228467 100644 --- a/include/asm-arm/arch-at91/io.h +++ b/include/asm-arm/arch-at91/io.h | |||
@@ -21,8 +21,6 @@ | |||
21 | #ifndef __ASM_ARCH_IO_H | 21 | #ifndef __ASM_ARCH_IO_H |
22 | #define __ASM_ARCH_IO_H | 22 | #define __ASM_ARCH_IO_H |
23 | 23 | ||
24 | #include <asm/io.h> | ||
25 | |||
26 | #define IO_SPACE_LIMIT 0xFFFFFFFF | 24 | #define IO_SPACE_LIMIT 0xFFFFFFFF |
27 | 25 | ||
28 | #define __io(a) ((void __iomem *)(a)) | 26 | #define __io(a) ((void __iomem *)(a)) |
diff --git a/include/asm-arm/arch-pxa/mfp-pxa27x.h b/include/asm-arm/arch-pxa/mfp-pxa27x.h index eb6eaa174f8d..bc73ab84167c 100644 --- a/include/asm-arm/arch-pxa/mfp-pxa27x.h +++ b/include/asm-arm/arch-pxa/mfp-pxa27x.h | |||
@@ -112,6 +112,7 @@ | |||
112 | #define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1) | 112 | #define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1) |
113 | #define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1) | 113 | #define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1) |
114 | #define GPIO79_PSKTSEL MFP_CFG_OUT(GPIO79, AF1, DRIVE_HIGH) | 114 | #define GPIO79_PSKTSEL MFP_CFG_OUT(GPIO79, AF1, DRIVE_HIGH) |
115 | #define GPIO104_PSKTSEL MFP_CFG_OUT(GPIO104, AF1, DRIVE_HIGH) | ||
115 | 116 | ||
116 | /* I2C */ | 117 | /* I2C */ |
117 | #define GPIO117_I2C_SCL MFP_CFG_IN(GPIO117, AF1) | 118 | #define GPIO117_I2C_SCL MFP_CFG_IN(GPIO117, AF1) |
diff --git a/include/asm-arm/arch-pxa/pxa2xx-gpio.h b/include/asm-arm/arch-pxa/pxa2xx-gpio.h index 763313c5e6be..b81cd63cb2eb 100644 --- a/include/asm-arm/arch-pxa/pxa2xx-gpio.h +++ b/include/asm-arm/arch-pxa/pxa2xx-gpio.h | |||
@@ -134,7 +134,11 @@ | |||
134 | #define GPIO93_CIF_DD_6 93 /* Camera data pin 6 */ | 134 | #define GPIO93_CIF_DD_6 93 /* Camera data pin 6 */ |
135 | #define GPIO94_CIF_DD_5 94 /* Camera data pin 5 */ | 135 | #define GPIO94_CIF_DD_5 94 /* Camera data pin 5 */ |
136 | #define GPIO95_CIF_DD_4 95 /* Camera data pin 4 */ | 136 | #define GPIO95_CIF_DD_4 95 /* Camera data pin 4 */ |
137 | #define GPIO96_FFRXD 96 /* FFUART recieve */ | ||
138 | #define GPIO98_FFRTS 98 /* FFUART request to send */ | ||
137 | #define GPIO98_CIF_DD_0 98 /* Camera data pin 0 */ | 139 | #define GPIO98_CIF_DD_0 98 /* Camera data pin 0 */ |
140 | #define GPIO99_FFTXD 99 /* FFUART transmit data */ | ||
141 | #define GPIO100_FFCTS 100 /* FFUART Clear to send */ | ||
138 | #define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */ | 142 | #define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */ |
139 | #define GPIO103_CIF_DD_3 103 /* Camera data pin 3 */ | 143 | #define GPIO103_CIF_DD_3 103 /* Camera data pin 3 */ |
140 | #define GPIO104_CIF_DD_2 104 /* Camera data pin 2 */ | 144 | #define GPIO104_CIF_DD_2 104 /* Camera data pin 2 */ |
@@ -316,6 +320,8 @@ | |||
316 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) | 320 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) |
317 | #define GPIO85_CIF_LV_MD (85 | GPIO_ALT_FN_3_IN) | 321 | #define GPIO85_CIF_LV_MD (85 | GPIO_ALT_FN_3_IN) |
318 | #define GPIO86_nPCE_1_MD (86 | GPIO_ALT_FN_1_OUT) | 322 | #define GPIO86_nPCE_1_MD (86 | GPIO_ALT_FN_1_OUT) |
323 | #define GPIO88_USBH1_PWR_MD (88 | GPIO_ALT_FN_1_IN) | ||
324 | #define GPIO89_USBH1_PEN_MD (89 | GPIO_ALT_FN_2_OUT) | ||
319 | #define GPIO90_CIF_DD_4_MD (90 | GPIO_ALT_FN_3_IN) | 325 | #define GPIO90_CIF_DD_4_MD (90 | GPIO_ALT_FN_3_IN) |
320 | #define GPIO91_CIF_DD_5_MD (91 | GPIO_ALT_FN_3_IN) | 326 | #define GPIO91_CIF_DD_5_MD (91 | GPIO_ALT_FN_3_IN) |
321 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) | 327 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) |
@@ -324,8 +330,11 @@ | |||
324 | #define GPIO95_CIF_DD_4_MD (95 | GPIO_ALT_FN_2_IN) | 330 | #define GPIO95_CIF_DD_4_MD (95 | GPIO_ALT_FN_2_IN) |
325 | #define GPIO95_KP_MKIN6_MD (95 | GPIO_ALT_FN_3_IN) | 331 | #define GPIO95_KP_MKIN6_MD (95 | GPIO_ALT_FN_3_IN) |
326 | #define GPIO96_KP_DKIN3_MD (96 | GPIO_ALT_FN_1_IN) | 332 | #define GPIO96_KP_DKIN3_MD (96 | GPIO_ALT_FN_1_IN) |
333 | #define GPIO96_FFRXD_MD (96 | GPIO_ALT_FN_3_IN) | ||
327 | #define GPIO97_KP_MKIN3_MD (97 | GPIO_ALT_FN_3_IN) | 334 | #define GPIO97_KP_MKIN3_MD (97 | GPIO_ALT_FN_3_IN) |
328 | #define GPIO98_CIF_DD_0_MD (98 | GPIO_ALT_FN_2_IN) | 335 | #define GPIO98_CIF_DD_0_MD (98 | GPIO_ALT_FN_2_IN) |
336 | #define GPIO98_FFRTS_MD (98 | GPIO_ALT_FN_3_OUT) | ||
337 | #define GPIO99_FFTXD_MD (99 | GPIO_ALT_FN_3_OUT) | ||
329 | #define GPIO100_KP_MKIN0_MD (100 | GPIO_ALT_FN_1_IN) | 338 | #define GPIO100_KP_MKIN0_MD (100 | GPIO_ALT_FN_1_IN) |
330 | #define GPIO101_KP_MKIN1_MD (101 | GPIO_ALT_FN_1_IN) | 339 | #define GPIO101_KP_MKIN1_MD (101 | GPIO_ALT_FN_1_IN) |
331 | #define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) | 340 | #define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) |
diff --git a/include/asm-arm/arch-pxa/regs-lcd.h b/include/asm-arm/arch-pxa/regs-lcd.h index f762493f5141..3ba464c913a5 100644 --- a/include/asm-arm/arch-pxa/regs-lcd.h +++ b/include/asm-arm/arch-pxa/regs-lcd.h | |||
@@ -1,5 +1,8 @@ | |||
1 | #ifndef __ASM_ARCH_REGS_LCD_H | 1 | #ifndef __ASM_ARCH_REGS_LCD_H |
2 | #define __ASM_ARCH_REGS_LCD_H | 2 | #define __ASM_ARCH_REGS_LCD_H |
3 | |||
4 | #include <asm/arch/bitfield.h> | ||
5 | |||
3 | /* | 6 | /* |
4 | * LCD Controller Registers and Bits Definitions | 7 | * LCD Controller Registers and Bits Definitions |
5 | */ | 8 | */ |
@@ -69,7 +72,7 @@ | |||
69 | #define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */ | 72 | #define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */ |
70 | #define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */ | 73 | #define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */ |
71 | #define LCCR0_PDD_S 12 | 74 | #define LCCR0_PDD_S 12 |
72 | #define LCCR0_BM (1 << 20) /* Branch mask */ | 75 | #define LCCR0_BM (1 << 20) /* Branch mask */ |
73 | #define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */ | 76 | #define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */ |
74 | #define LCCR0_LCDT (1 << 22) /* LCD panel type */ | 77 | #define LCCR0_LCDT (1 << 22) /* LCD panel type */ |
75 | #define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */ | 78 | #define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */ |
diff --git a/include/asm-arm/pgtable-nommu.h b/include/asm-arm/pgtable-nommu.h index 2e5868bbe03b..386fcc10a973 100644 --- a/include/asm-arm/pgtable-nommu.h +++ b/include/asm-arm/pgtable-nommu.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | #include <asm/io.h> | ||
20 | 19 | ||
21 | /* | 20 | /* |
22 | * Trivial page table functions. | 21 | * Trivial page table functions. |
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index 800ba5254daf..2b41ebbfa7ff 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h | |||
@@ -142,7 +142,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) | |||
142 | } | 142 | } |
143 | 143 | ||
144 | /* write_can_lock - would write_trylock() succeed? */ | 144 | /* write_can_lock - would write_trylock() succeed? */ |
145 | #define __raw_write_can_lock(x) ((x)->lock == 0x80000000) | 145 | #define __raw_write_can_lock(x) ((x)->lock == 0) |
146 | 146 | ||
147 | /* | 147 | /* |
148 | * Read locks are a bit more hairy: | 148 | * Read locks are a bit more hairy: |
diff --git a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h index 26e3c8076b4e..96bd09e31e36 100644 --- a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h | |||
@@ -53,6 +53,12 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) | ||
57 | #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) | ||
58 | #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) | ||
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | ||
60 | #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) | ||
61 | |||
56 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) | 62 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) |
57 | # define CONFIG_SERIAL_BFIN_CTSRTS | 63 | # define CONFIG_SERIAL_BFIN_CTSRTS |
58 | 64 | ||
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h index d016603b6615..e924569ad1d8 100644 --- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h | |||
@@ -53,6 +53,12 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) | ||
57 | #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) | ||
58 | #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) | ||
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | ||
60 | #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) | ||
61 | |||
56 | #ifdef CONFIG_BFIN_UART0_CTSRTS | 62 | #ifdef CONFIG_BFIN_UART0_CTSRTS |
57 | # define CONFIG_SERIAL_BFIN_CTSRTS | 63 | # define CONFIG_SERIAL_BFIN_CTSRTS |
58 | # ifndef CONFIG_UART0_CTS_PIN | 64 | # ifndef CONFIG_UART0_CTS_PIN |
diff --git a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h index f79d1a0e9129..41d7b6490bb1 100644 --- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h | |||
@@ -53,6 +53,12 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) | ||
57 | #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) | ||
58 | #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) | ||
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | ||
60 | #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) | ||
61 | |||
56 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) | 62 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) |
57 | # define CONFIG_SERIAL_BFIN_CTSRTS | 63 | # define CONFIG_SERIAL_BFIN_CTSRTS |
58 | 64 | ||
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h index 5eb46a77d919..59b4ad4e5b4a 100644 --- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h | |||
@@ -57,6 +57,12 @@ | |||
57 | #define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */ | 57 | #define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */ |
58 | #define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */ | 58 | #define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */ |
59 | 59 | ||
60 | #define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS) | ||
61 | #define UART_SET_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS)) | ||
62 | #define UART_CLEAR_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) & ~MRTS)) | ||
63 | #define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v) | ||
64 | #define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF) | ||
65 | |||
60 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) | 66 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) |
61 | # define CONFIG_SERIAL_BFIN_CTSRTS | 67 | # define CONFIG_SERIAL_BFIN_CTSRTS |
62 | 68 | ||
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h index 7a9628769296..30d90b580f18 100644 --- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h | |||
@@ -53,6 +53,12 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) | ||
57 | #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) | ||
58 | #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) | ||
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | ||
60 | #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) | ||
61 | |||
56 | #ifdef CONFIG_BFIN_UART0_CTSRTS | 62 | #ifdef CONFIG_BFIN_UART0_CTSRTS |
57 | # define CONFIG_SERIAL_BFIN_CTSRTS | 63 | # define CONFIG_SERIAL_BFIN_CTSRTS |
58 | # ifndef CONFIG_UART0_CTS_PIN | 64 | # ifndef CONFIG_UART0_CTS_PIN |
diff --git a/include/asm-frv/checksum.h b/include/asm-frv/checksum.h index 9b1689850187..269da09ff637 100644 --- a/include/asm-frv/checksum.h +++ b/include/asm-frv/checksum.h | |||
@@ -75,7 +75,7 @@ __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | |||
75 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (inc), "=&r"(tmp) | 75 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (inc), "=&r"(tmp) |
76 | : "0" (sum), "1" (iph), "2" (ihl), "3" (4), | 76 | : "0" (sum), "1" (iph), "2" (ihl), "3" (4), |
77 | "m"(*(volatile struct { int _[100]; } *)iph) | 77 | "m"(*(volatile struct { int _[100]; } *)iph) |
78 | : "icc0", "icc1" | 78 | : "icc0", "icc1", "memory" |
79 | ); | 79 | ); |
80 | 80 | ||
81 | return (__force __sum16)~sum; | 81 | return (__force __sum16)~sum; |
diff --git a/include/asm-h8300/cacheflush.h b/include/asm-h8300/cacheflush.h index 71210d141b64..5ffdca217b95 100644 --- a/include/asm-h8300/cacheflush.h +++ b/include/asm-h8300/cacheflush.h | |||
@@ -3,7 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef _ASM_H8300_CACHEFLUSH_H | 5 | #ifndef _ASM_H8300_CACHEFLUSH_H |
6 | #define _AMS_H8300_CACHEFLUSH_H | 6 | #define _ASM_H8300_CACHEFLUSH_H |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Cache handling functions | 9 | * Cache handling functions |
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h index bd8c83765a5c..1c7047bea200 100644 --- a/include/asm-m32r/uaccess.h +++ b/include/asm-m32r/uaccess.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/thread_info.h> | 15 | #include <linux/thread_info.h> |
16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
17 | #include <asm/setup.h> | ||
17 | 18 | ||
18 | #define VERIFY_READ 0 | 19 | #define VERIFY_READ 0 |
19 | #define VERIFY_WRITE 1 | 20 | #define VERIFY_WRITE 1 |
@@ -106,7 +107,6 @@ static inline void set_fs(mm_segment_t s) | |||
106 | #else | 107 | #else |
107 | static inline int access_ok(int type, const void *addr, unsigned long size) | 108 | static inline int access_ok(int type, const void *addr, unsigned long size) |
108 | { | 109 | { |
109 | extern unsigned long memory_start, memory_end; | ||
110 | unsigned long val = (unsigned long)addr; | 110 | unsigned long val = (unsigned long)addr; |
111 | 111 | ||
112 | return ((val >= memory_start) && ((val + size) < memory_end)); | 112 | return ((val >= memory_start) && ((val + size) < memory_end)); |
diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h index 83d1f286230b..3e8106442d5a 100644 --- a/include/asm-m68k/bitops.h +++ b/include/asm-m68k/bitops.h | |||
@@ -410,8 +410,49 @@ static inline int ext2_find_next_zero_bit(const void *vaddr, unsigned size, | |||
410 | res = ext2_find_first_zero_bit (p, size - 32 * (p - addr)); | 410 | res = ext2_find_first_zero_bit (p, size - 32 * (p - addr)); |
411 | return (p - addr) * 32 + res; | 411 | return (p - addr) * 32 + res; |
412 | } | 412 | } |
413 | #define ext2_find_next_bit(addr, size, off) \ | 413 | |
414 | generic_find_next_le_bit((unsigned long *)(addr), (size), (off)) | 414 | static inline int ext2_find_first_bit(const void *vaddr, unsigned size) |
415 | { | ||
416 | const unsigned long *p = vaddr, *addr = vaddr; | ||
417 | int res; | ||
418 | |||
419 | if (!size) | ||
420 | return 0; | ||
421 | |||
422 | size = (size >> 5) + ((size & 31) > 0); | ||
423 | while (*p++ == 0UL) { | ||
424 | if (--size == 0) | ||
425 | return (p - addr) << 5; | ||
426 | } | ||
427 | |||
428 | --p; | ||
429 | for (res = 0; res < 32; res++) | ||
430 | if (ext2_test_bit(res, p)) | ||
431 | break; | ||
432 | return (p - addr) * 32 + res; | ||
433 | } | ||
434 | |||
435 | static inline int ext2_find_next_bit(const void *vaddr, unsigned size, | ||
436 | unsigned offset) | ||
437 | { | ||
438 | const unsigned long *addr = vaddr; | ||
439 | const unsigned long *p = addr + (offset >> 5); | ||
440 | int bit = offset & 31UL, res; | ||
441 | |||
442 | if (offset >= size) | ||
443 | return size; | ||
444 | |||
445 | if (bit) { | ||
446 | /* Look for one in first longword */ | ||
447 | for (res = bit; res < 32; res++) | ||
448 | if (ext2_test_bit(res, p)) | ||
449 | return (p - addr) * 32 + res; | ||
450 | p++; | ||
451 | } | ||
452 | /* No set bit yet, search remaining full bytes for a set bit */ | ||
453 | res = ext2_find_first_bit(p, size - 32 * (p - addr)); | ||
454 | return (p - addr) * 32 + res; | ||
455 | } | ||
415 | 456 | ||
416 | #endif /* __KERNEL__ */ | 457 | #endif /* __KERNEL__ */ |
417 | 458 | ||
diff --git a/include/asm-mips/mach-au1x00/au1xxx_dbdma.h b/include/asm-mips/mach-au1x00/au1xxx_dbdma.h index ad17d7ce516a..44a67bf05dc1 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_dbdma.h +++ b/include/asm-mips/mach-au1x00/au1xxx_dbdma.h | |||
@@ -355,6 +355,7 @@ void au1xxx_dbdma_dump(u32 chanid); | |||
355 | u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr); | 355 | u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr); |
356 | 356 | ||
357 | u32 au1xxx_ddma_add_device(dbdev_tab_t *dev); | 357 | u32 au1xxx_ddma_add_device(dbdev_tab_t *dev); |
358 | extern void au1xxx_ddma_del_device(u32 devid); | ||
358 | void *au1xxx_ddma_get_nextptr_virt(au1x_ddma_desc_t *dp); | 359 | void *au1xxx_ddma_get_nextptr_virt(au1x_ddma_desc_t *dp); |
359 | 360 | ||
360 | /* | 361 | /* |
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h index aa17f658f73c..a46f8e258e6b 100644 --- a/include/asm-mips/mipsregs.h +++ b/include/asm-mips/mipsregs.h | |||
@@ -765,6 +765,9 @@ do { \ | |||
765 | #define read_c0_index() __read_32bit_c0_register($0, 0) | 765 | #define read_c0_index() __read_32bit_c0_register($0, 0) |
766 | #define write_c0_index(val) __write_32bit_c0_register($0, 0, val) | 766 | #define write_c0_index(val) __write_32bit_c0_register($0, 0, val) |
767 | 767 | ||
768 | #define read_c0_random() __read_32bit_c0_register($1, 0) | ||
769 | #define write_c0_random(val) __write_32bit_c0_register($1, 0, val) | ||
770 | |||
768 | #define read_c0_entrylo0() __read_ulong_c0_register($2, 0) | 771 | #define read_c0_entrylo0() __read_ulong_c0_register($2, 0) |
769 | #define write_c0_entrylo0(val) __write_ulong_c0_register($2, 0, val) | 772 | #define write_c0_entrylo0(val) __write_ulong_c0_register($2, 0, val) |
770 | 773 | ||
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index 2f597eea4448..6a0edf72ffbc 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -239,9 +239,10 @@ static inline pte_t pte_mkdirty(pte_t pte) | |||
239 | static inline pte_t pte_mkyoung(pte_t pte) | 239 | static inline pte_t pte_mkyoung(pte_t pte) |
240 | { | 240 | { |
241 | pte.pte_low |= _PAGE_ACCESSED; | 241 | pte.pte_low |= _PAGE_ACCESSED; |
242 | if (pte.pte_low & _PAGE_READ) | 242 | if (pte.pte_low & _PAGE_READ) { |
243 | pte.pte_low |= _PAGE_SILENT_READ; | 243 | pte.pte_low |= _PAGE_SILENT_READ; |
244 | pte.pte_high |= _PAGE_SILENT_READ; | 244 | pte.pte_high |= _PAGE_SILENT_READ; |
245 | } | ||
245 | return pte; | 246 | return pte; |
246 | } | 247 | } |
247 | #else | 248 | #else |
diff --git a/include/asm-mips/rtlx.h b/include/asm-mips/rtlx.h index 20b666022dcb..4ca3063ed2ce 100644 --- a/include/asm-mips/rtlx.h +++ b/include/asm-mips/rtlx.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef __ASM_RTLX_H | 6 | #ifndef __ASM_RTLX_H_ |
7 | #define __ASM_RTLX_H_ | 7 | #define __ASM_RTLX_H_ |
8 | 8 | ||
9 | #include <irq.h> | 9 | #include <irq.h> |
diff --git a/include/asm-parisc/checksum.h b/include/asm-parisc/checksum.h index cc3ec1bd8919..e9639ccc3fce 100644 --- a/include/asm-parisc/checksum.h +++ b/include/asm-parisc/checksum.h | |||
@@ -65,7 +65,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | |||
65 | "2:\n" | 65 | "2:\n" |
66 | : "=r" (sum), "=r" (iph), "=r" (ihl) | 66 | : "=r" (sum), "=r" (iph), "=r" (ihl) |
67 | : "1" (iph), "2" (ihl) | 67 | : "1" (iph), "2" (ihl) |
68 | : "r19", "r20", "r21" ); | 68 | : "r19", "r20", "r21", "memory"); |
69 | 69 | ||
70 | return (__force __sum16)sum; | 70 | return (__force __sum16)sum; |
71 | } | 71 | } |
diff --git a/include/asm-powerpc/kvm_ppc.h b/include/asm-powerpc/kvm_ppc.h index b35a7e3ef978..5a21115228af 100644 --- a/include/asm-powerpc/kvm_ppc.h +++ b/include/asm-powerpc/kvm_ppc.h | |||
@@ -57,6 +57,7 @@ extern int kvmppc_handle_store(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
57 | 57 | ||
58 | extern int kvmppc_emulate_instruction(struct kvm_run *run, | 58 | extern int kvmppc_emulate_instruction(struct kvm_run *run, |
59 | struct kvm_vcpu *vcpu); | 59 | struct kvm_vcpu *vcpu); |
60 | extern int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu); | ||
60 | 61 | ||
61 | extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, | 62 | extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, |
62 | u64 asid, u32 flags); | 63 | u64 asid, u32 flags); |
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index e0d4500d5f95..819e7d99ca0c 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h | |||
@@ -315,14 +315,14 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
315 | asm volatile( \ | 315 | asm volatile( \ |
316 | " lctlg %1,%2,0(%0)\n" \ | 316 | " lctlg %1,%2,0(%0)\n" \ |
317 | : : "a" (&array), "i" (low), "i" (high), \ | 317 | : : "a" (&array), "i" (low), "i" (high), \ |
318 | "m" (*(addrtype *)(array))); \ | 318 | "m" (*(addrtype *)(&array))); \ |
319 | }) | 319 | }) |
320 | 320 | ||
321 | #define __ctl_store(array, low, high) ({ \ | 321 | #define __ctl_store(array, low, high) ({ \ |
322 | typedef struct { char _[sizeof(array)]; } addrtype; \ | 322 | typedef struct { char _[sizeof(array)]; } addrtype; \ |
323 | asm volatile( \ | 323 | asm volatile( \ |
324 | " stctg %2,%3,0(%1)\n" \ | 324 | " stctg %2,%3,0(%1)\n" \ |
325 | : "=m" (*(addrtype *)(array)) \ | 325 | : "=m" (*(addrtype *)(&array)) \ |
326 | : "a" (&array), "i" (low), "i" (high)); \ | 326 | : "a" (&array), "i" (low), "i" (high)); \ |
327 | }) | 327 | }) |
328 | 328 | ||
@@ -333,14 +333,14 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
333 | asm volatile( \ | 333 | asm volatile( \ |
334 | " lctl %1,%2,0(%0)\n" \ | 334 | " lctl %1,%2,0(%0)\n" \ |
335 | : : "a" (&array), "i" (low), "i" (high), \ | 335 | : : "a" (&array), "i" (low), "i" (high), \ |
336 | "m" (*(addrtype *)(array))); \ | 336 | "m" (*(addrtype *)(&array))); \ |
337 | }) | 337 | }) |
338 | 338 | ||
339 | #define __ctl_store(array, low, high) ({ \ | 339 | #define __ctl_store(array, low, high) ({ \ |
340 | typedef struct { char _[sizeof(array)]; } addrtype; \ | 340 | typedef struct { char _[sizeof(array)]; } addrtype; \ |
341 | asm volatile( \ | 341 | asm volatile( \ |
342 | " stctl %2,%3,0(%1)\n" \ | 342 | " stctl %2,%3,0(%1)\n" \ |
343 | : "=m" (*(addrtype *)(array)) \ | 343 | : "=m" (*(addrtype *)(&array)) \ |
344 | : "a" (&array), "i" (low), "i" (high)); \ | 344 | : "a" (&array), "i" (low), "i" (high)); \ |
345 | }) | 345 | }) |
346 | 346 | ||
diff --git a/include/asm-sh/checksum_32.h b/include/asm-sh/checksum_32.h index 4bc8357e8892..14b7ac2f0a07 100644 --- a/include/asm-sh/checksum_32.h +++ b/include/asm-sh/checksum_32.h | |||
@@ -109,7 +109,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | |||
109 | will assume they contain their original values. */ | 109 | will assume they contain their original values. */ |
110 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1) | 110 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1) |
111 | : "1" (iph), "2" (ihl) | 111 | : "1" (iph), "2" (ihl) |
112 | : "t"); | 112 | : "t", "memory"); |
113 | 113 | ||
114 | return csum_fold(sum); | 114 | return csum_fold(sum); |
115 | } | 115 | } |
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index c299b853b5ba..3158960f3eb5 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h | |||
@@ -24,7 +24,8 @@ static inline u8 _inb(unsigned long addr) | |||
24 | 24 | ||
25 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_inb */" | 25 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_inb */" |
26 | : "=r" (ret) | 26 | : "=r" (ret) |
27 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 27 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
28 | : "memory"); | ||
28 | 29 | ||
29 | return ret; | 30 | return ret; |
30 | } | 31 | } |
@@ -35,7 +36,8 @@ static inline u16 _inw(unsigned long addr) | |||
35 | 36 | ||
36 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_inw */" | 37 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_inw */" |
37 | : "=r" (ret) | 38 | : "=r" (ret) |
38 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 39 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
40 | : "memory"); | ||
39 | 41 | ||
40 | return ret; | 42 | return ret; |
41 | } | 43 | } |
@@ -46,7 +48,8 @@ static inline u32 _inl(unsigned long addr) | |||
46 | 48 | ||
47 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_inl */" | 49 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_inl */" |
48 | : "=r" (ret) | 50 | : "=r" (ret) |
49 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 51 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
52 | : "memory"); | ||
50 | 53 | ||
51 | return ret; | 54 | return ret; |
52 | } | 55 | } |
@@ -55,21 +58,24 @@ static inline void _outb(u8 b, unsigned long addr) | |||
55 | { | 58 | { |
56 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */" | 59 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */" |
57 | : /* no outputs */ | 60 | : /* no outputs */ |
58 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 61 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
62 | : "memory"); | ||
59 | } | 63 | } |
60 | 64 | ||
61 | static inline void _outw(u16 w, unsigned long addr) | 65 | static inline void _outw(u16 w, unsigned long addr) |
62 | { | 66 | { |
63 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */" | 67 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */" |
64 | : /* no outputs */ | 68 | : /* no outputs */ |
65 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 69 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
70 | : "memory"); | ||
66 | } | 71 | } |
67 | 72 | ||
68 | static inline void _outl(u32 l, unsigned long addr) | 73 | static inline void _outl(u32 l, unsigned long addr) |
69 | { | 74 | { |
70 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */" | 75 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */" |
71 | : /* no outputs */ | 76 | : /* no outputs */ |
72 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 77 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
78 | : "memory"); | ||
73 | } | 79 | } |
74 | 80 | ||
75 | #define inb(__addr) (_inb((unsigned long)(__addr))) | 81 | #define inb(__addr) (_inb((unsigned long)(__addr))) |
@@ -128,7 +134,8 @@ static inline u8 _readb(const volatile void __iomem *addr) | |||
128 | 134 | ||
129 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_readb */" | 135 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_readb */" |
130 | : "=r" (ret) | 136 | : "=r" (ret) |
131 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 137 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
138 | : "memory"); | ||
132 | return ret; | 139 | return ret; |
133 | } | 140 | } |
134 | 141 | ||
@@ -137,7 +144,8 @@ static inline u16 _readw(const volatile void __iomem *addr) | |||
137 | 144 | ||
138 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_readw */" | 145 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_readw */" |
139 | : "=r" (ret) | 146 | : "=r" (ret) |
140 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 147 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
148 | : "memory"); | ||
141 | 149 | ||
142 | return ret; | 150 | return ret; |
143 | } | 151 | } |
@@ -147,7 +155,8 @@ static inline u32 _readl(const volatile void __iomem *addr) | |||
147 | 155 | ||
148 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_readl */" | 156 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_readl */" |
149 | : "=r" (ret) | 157 | : "=r" (ret) |
150 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 158 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
159 | : "memory"); | ||
151 | 160 | ||
152 | return ret; | 161 | return ret; |
153 | } | 162 | } |
@@ -157,7 +166,8 @@ static inline u64 _readq(const volatile void __iomem *addr) | |||
157 | 166 | ||
158 | __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* pci_readq */" | 167 | __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* pci_readq */" |
159 | : "=r" (ret) | 168 | : "=r" (ret) |
160 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 169 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
170 | : "memory"); | ||
161 | 171 | ||
162 | return ret; | 172 | return ret; |
163 | } | 173 | } |
@@ -166,28 +176,32 @@ static inline void _writeb(u8 b, volatile void __iomem *addr) | |||
166 | { | 176 | { |
167 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_writeb */" | 177 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_writeb */" |
168 | : /* no outputs */ | 178 | : /* no outputs */ |
169 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 179 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
180 | : "memory"); | ||
170 | } | 181 | } |
171 | 182 | ||
172 | static inline void _writew(u16 w, volatile void __iomem *addr) | 183 | static inline void _writew(u16 w, volatile void __iomem *addr) |
173 | { | 184 | { |
174 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_writew */" | 185 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_writew */" |
175 | : /* no outputs */ | 186 | : /* no outputs */ |
176 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 187 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
188 | : "memory"); | ||
177 | } | 189 | } |
178 | 190 | ||
179 | static inline void _writel(u32 l, volatile void __iomem *addr) | 191 | static inline void _writel(u32 l, volatile void __iomem *addr) |
180 | { | 192 | { |
181 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_writel */" | 193 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_writel */" |
182 | : /* no outputs */ | 194 | : /* no outputs */ |
183 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 195 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
196 | : "memory"); | ||
184 | } | 197 | } |
185 | 198 | ||
186 | static inline void _writeq(u64 q, volatile void __iomem *addr) | 199 | static inline void _writeq(u64 q, volatile void __iomem *addr) |
187 | { | 200 | { |
188 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_writeq */" | 201 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_writeq */" |
189 | : /* no outputs */ | 202 | : /* no outputs */ |
190 | : "Jr" (q), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 203 | : "Jr" (q), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
204 | : "memory"); | ||
191 | } | 205 | } |
192 | 206 | ||
193 | #define readb(__addr) _readb(__addr) | 207 | #define readb(__addr) _readb(__addr) |
@@ -299,7 +313,8 @@ static inline u8 _sbus_readb(const volatile void __iomem *addr) | |||
299 | 313 | ||
300 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* sbus_readb */" | 314 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* sbus_readb */" |
301 | : "=r" (ret) | 315 | : "=r" (ret) |
302 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 316 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
317 | : "memory"); | ||
303 | 318 | ||
304 | return ret; | 319 | return ret; |
305 | } | 320 | } |
@@ -310,7 +325,8 @@ static inline u16 _sbus_readw(const volatile void __iomem *addr) | |||
310 | 325 | ||
311 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* sbus_readw */" | 326 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* sbus_readw */" |
312 | : "=r" (ret) | 327 | : "=r" (ret) |
313 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 328 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
329 | : "memory"); | ||
314 | 330 | ||
315 | return ret; | 331 | return ret; |
316 | } | 332 | } |
@@ -321,7 +337,8 @@ static inline u32 _sbus_readl(const volatile void __iomem *addr) | |||
321 | 337 | ||
322 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* sbus_readl */" | 338 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* sbus_readl */" |
323 | : "=r" (ret) | 339 | : "=r" (ret) |
324 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 340 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
341 | : "memory"); | ||
325 | 342 | ||
326 | return ret; | 343 | return ret; |
327 | } | 344 | } |
@@ -332,7 +349,8 @@ static inline u64 _sbus_readq(const volatile void __iomem *addr) | |||
332 | 349 | ||
333 | __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* sbus_readq */" | 350 | __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* sbus_readq */" |
334 | : "=r" (ret) | 351 | : "=r" (ret) |
335 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 352 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
353 | : "memory"); | ||
336 | 354 | ||
337 | return ret; | 355 | return ret; |
338 | } | 356 | } |
@@ -341,28 +359,32 @@ static inline void _sbus_writeb(u8 b, volatile void __iomem *addr) | |||
341 | { | 359 | { |
342 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* sbus_writeb */" | 360 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* sbus_writeb */" |
343 | : /* no outputs */ | 361 | : /* no outputs */ |
344 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 362 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
363 | : "memory"); | ||
345 | } | 364 | } |
346 | 365 | ||
347 | static inline void _sbus_writew(u16 w, volatile void __iomem *addr) | 366 | static inline void _sbus_writew(u16 w, volatile void __iomem *addr) |
348 | { | 367 | { |
349 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* sbus_writew */" | 368 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* sbus_writew */" |
350 | : /* no outputs */ | 369 | : /* no outputs */ |
351 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 370 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
371 | : "memory"); | ||
352 | } | 372 | } |
353 | 373 | ||
354 | static inline void _sbus_writel(u32 l, volatile void __iomem *addr) | 374 | static inline void _sbus_writel(u32 l, volatile void __iomem *addr) |
355 | { | 375 | { |
356 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* sbus_writel */" | 376 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* sbus_writel */" |
357 | : /* no outputs */ | 377 | : /* no outputs */ |
358 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 378 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
379 | : "memory"); | ||
359 | } | 380 | } |
360 | 381 | ||
361 | static inline void _sbus_writeq(u64 l, volatile void __iomem *addr) | 382 | static inline void _sbus_writeq(u64 l, volatile void __iomem *addr) |
362 | { | 383 | { |
363 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* sbus_writeq */" | 384 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* sbus_writeq */" |
364 | : /* no outputs */ | 385 | : /* no outputs */ |
365 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 386 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
387 | : "memory"); | ||
366 | } | 388 | } |
367 | 389 | ||
368 | #define sbus_readb(__addr) _sbus_readb(__addr) | 390 | #define sbus_readb(__addr) _sbus_readb(__addr) |
diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h index 6686fc524ca1..54f42e8b0105 100644 --- a/include/asm-um/mmu_context.h +++ b/include/asm-um/mmu_context.h | |||
@@ -22,16 +22,10 @@ extern void force_flush_all(void); | |||
22 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) | 22 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) |
23 | { | 23 | { |
24 | /* | 24 | /* |
25 | * This is called by fs/exec.c and fs/aio.c. In the first case, for an | 25 | * This is called by fs/exec.c and sys_unshare() |
26 | * exec, we don't need to do anything as we're called from userspace | 26 | * when the new ->mm is used for the first time. |
27 | * and thus going to use a new host PID. In the second, we're called | ||
28 | * from a kernel thread, and thus need to go doing the mmap's on the | ||
29 | * host. Since they're very expensive, we want to avoid that as far as | ||
30 | * possible. | ||
31 | */ | 27 | */ |
32 | if (old != new && (current->flags & PF_BORROWED_MM)) | 28 | __switch_mm(&new->context.id); |
33 | __switch_mm(&new->context.id); | ||
34 | |||
35 | arch_dup_mmap(old, new); | 29 | arch_dup_mmap(old, new); |
36 | } | 30 | } |
37 | 31 | ||
diff --git a/include/asm-v850/clinkage.h b/include/asm-v850/clinkage.h index 2b622adccae5..c389691d6f86 100644 --- a/include/asm-v850/clinkage.h +++ b/include/asm-v850/clinkage.h | |||
@@ -11,7 +11,7 @@ | |||
11 | * Written by Miles Bader <miles@gnu.org> | 11 | * Written by Miles Bader <miles@gnu.org> |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #ifndef __CLINKAGE_H__ | 14 | #ifndef __V850_CLINKAGE_H__ |
15 | #define __V850_CLINKAGE_H__ | 15 | #define __V850_CLINKAGE_H__ |
16 | 16 | ||
17 | #include <asm/macrology.h> | 17 | #include <asm/macrology.h> |
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h index 6b722d315936..37672f79dcc8 100644 --- a/include/asm-x86/i387.h +++ b/include/asm-x86/i387.h | |||
@@ -193,6 +193,8 @@ static inline int restore_i387(struct _fpstate __user *buf) | |||
193 | 193 | ||
194 | #else /* CONFIG_X86_32 */ | 194 | #else /* CONFIG_X86_32 */ |
195 | 195 | ||
196 | extern void finit(void); | ||
197 | |||
196 | static inline void tolerant_fwait(void) | 198 | static inline void tolerant_fwait(void) |
197 | { | 199 | { |
198 | asm volatile("fnclex ; fwait"); | 200 | asm volatile("fnclex ; fwait"); |
diff --git a/include/linux/bitrev.h b/include/linux/bitrev.h index 05e540d6963a..7ffe03f4693d 100644 --- a/include/linux/bitrev.h +++ b/include/linux/bitrev.h | |||
@@ -10,6 +10,7 @@ static inline u8 bitrev8(u8 byte) | |||
10 | return byte_rev_table[byte]; | 10 | return byte_rev_table[byte]; |
11 | } | 11 | } |
12 | 12 | ||
13 | extern u16 bitrev16(u16 in); | ||
13 | extern u32 bitrev32(u32 in); | 14 | extern u32 bitrev32(u32 in); |
14 | 15 | ||
15 | #endif /* _LINUX_BITREV_H */ | 16 | #endif /* _LINUX_BITREV_H */ |
diff --git a/include/linux/capability.h b/include/linux/capability.h index f4ea0dd9a618..fa830f8de032 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -31,11 +31,11 @@ struct task_struct; | |||
31 | #define _LINUX_CAPABILITY_VERSION_1 0x19980330 | 31 | #define _LINUX_CAPABILITY_VERSION_1 0x19980330 |
32 | #define _LINUX_CAPABILITY_U32S_1 1 | 32 | #define _LINUX_CAPABILITY_U32S_1 1 |
33 | 33 | ||
34 | #define _LINUX_CAPABILITY_VERSION_2 0x20071026 | 34 | #define _LINUX_CAPABILITY_VERSION_2 0x20071026 /* deprecated - use v3 */ |
35 | #define _LINUX_CAPABILITY_U32S_2 2 | 35 | #define _LINUX_CAPABILITY_U32S_2 2 |
36 | 36 | ||
37 | #define _LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_2 | 37 | #define _LINUX_CAPABILITY_VERSION_3 0x20080522 |
38 | #define _LINUX_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_2 | 38 | #define _LINUX_CAPABILITY_U32S_3 2 |
39 | 39 | ||
40 | typedef struct __user_cap_header_struct { | 40 | typedef struct __user_cap_header_struct { |
41 | __u32 version; | 41 | __u32 version; |
@@ -77,10 +77,23 @@ struct vfs_cap_data { | |||
77 | } data[VFS_CAP_U32]; | 77 | } data[VFS_CAP_U32]; |
78 | }; | 78 | }; |
79 | 79 | ||
80 | #ifdef __KERNEL__ | 80 | #ifndef __KERNEL__ |
81 | |||
82 | /* | ||
83 | * Backwardly compatible definition for source code - trapped in a | ||
84 | * 32-bit world. If you find you need this, please consider using | ||
85 | * libcap to untrap yourself... | ||
86 | */ | ||
87 | #define _LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_1 | ||
88 | #define _LINUX_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_1 | ||
89 | |||
90 | #else | ||
91 | |||
92 | #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 | ||
93 | #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 | ||
81 | 94 | ||
82 | typedef struct kernel_cap_struct { | 95 | typedef struct kernel_cap_struct { |
83 | __u32 cap[_LINUX_CAPABILITY_U32S]; | 96 | __u32 cap[_KERNEL_CAPABILITY_U32S]; |
84 | } kernel_cap_t; | 97 | } kernel_cap_t; |
85 | 98 | ||
86 | #define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct)) | 99 | #define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct)) |
@@ -351,7 +364,7 @@ typedef struct kernel_cap_struct { | |||
351 | */ | 364 | */ |
352 | 365 | ||
353 | #define CAP_FOR_EACH_U32(__capi) \ | 366 | #define CAP_FOR_EACH_U32(__capi) \ |
354 | for (__capi = 0; __capi < _LINUX_CAPABILITY_U32S; ++__capi) | 367 | for (__capi = 0; __capi < _KERNEL_CAPABILITY_U32S; ++__capi) |
355 | 368 | ||
356 | # define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \ | 369 | # define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \ |
357 | | CAP_TO_MASK(CAP_DAC_OVERRIDE) \ | 370 | | CAP_TO_MASK(CAP_DAC_OVERRIDE) \ |
@@ -361,7 +374,7 @@ typedef struct kernel_cap_struct { | |||
361 | 374 | ||
362 | # define CAP_FS_MASK_B1 (CAP_TO_MASK(CAP_MAC_OVERRIDE)) | 375 | # define CAP_FS_MASK_B1 (CAP_TO_MASK(CAP_MAC_OVERRIDE)) |
363 | 376 | ||
364 | #if _LINUX_CAPABILITY_U32S != 2 | 377 | #if _KERNEL_CAPABILITY_U32S != 2 |
365 | # error Fix up hand-coded capability macro initializers | 378 | # error Fix up hand-coded capability macro initializers |
366 | #else /* HAND-CODED capability initializers */ | 379 | #else /* HAND-CODED capability initializers */ |
367 | 380 | ||
@@ -372,7 +385,7 @@ typedef struct kernel_cap_struct { | |||
372 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ | 385 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ |
373 | CAP_FS_MASK_B1 } }) | 386 | CAP_FS_MASK_B1 } }) |
374 | 387 | ||
375 | #endif /* _LINUX_CAPABILITY_U32S != 2 */ | 388 | #endif /* _KERNEL_CAPABILITY_U32S != 2 */ |
376 | 389 | ||
377 | #define CAP_INIT_INH_SET CAP_EMPTY_SET | 390 | #define CAP_INIT_INH_SET CAP_EMPTY_SET |
378 | 391 | ||
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 51e6b1e520e6..dcf77fa826b5 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -82,6 +82,7 @@ struct cpuidle_state_kobj { | |||
82 | }; | 82 | }; |
83 | 83 | ||
84 | struct cpuidle_device { | 84 | struct cpuidle_device { |
85 | unsigned int registered:1; | ||
85 | unsigned int enabled:1; | 86 | unsigned int enabled:1; |
86 | unsigned int cpu; | 87 | unsigned int cpu; |
87 | 88 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index f413085f748e..d490779f18d9 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2000,7 +2000,10 @@ extern int simple_fill_super(struct super_block *, int, struct tree_descr *); | |||
2000 | extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); | 2000 | extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); |
2001 | extern void simple_release_fs(struct vfsmount **mount, int *count); | 2001 | extern void simple_release_fs(struct vfsmount **mount, int *count); |
2002 | 2002 | ||
2003 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); | 2003 | extern ssize_t simple_read_from_buffer(void __user *to, size_t count, |
2004 | loff_t *ppos, const void *from, size_t available); | ||
2005 | extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, | ||
2006 | const void *from, size_t available); | ||
2004 | 2007 | ||
2005 | #ifdef CONFIG_MIGRATION | 2008 | #ifdef CONFIG_MIGRATION |
2006 | extern int buffer_migrate_page(struct address_space *, | 2009 | extern int buffer_migrate_page(struct address_space *, |
diff --git a/include/linux/ide.h b/include/linux/ide.h index f8f195c20da2..9918772bf274 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -153,7 +153,7 @@ enum { ide_unknown, ide_generic, ide_pci, | |||
153 | ide_qd65xx, ide_umc8672, ide_ht6560b, | 153 | ide_qd65xx, ide_umc8672, ide_ht6560b, |
154 | ide_rz1000, ide_trm290, | 154 | ide_rz1000, ide_trm290, |
155 | ide_cmd646, ide_cy82c693, ide_4drives, | 155 | ide_cmd646, ide_cy82c693, ide_4drives, |
156 | ide_pmac, ide_etrax100, ide_acorn, | 156 | ide_pmac, ide_acorn, |
157 | ide_au1xxx, ide_palm3710 | 157 | ide_au1xxx, ide_palm3710 |
158 | }; | 158 | }; |
159 | 159 | ||
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 9300f37cd7e8..2998e3b5f166 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -98,6 +98,7 @@ | |||
98 | 98 | ||
99 | #define IEEE80211_MAX_SSID_LEN 32 | 99 | #define IEEE80211_MAX_SSID_LEN 32 |
100 | #define IEEE80211_MAX_MESH_ID_LEN 32 | 100 | #define IEEE80211_MAX_MESH_ID_LEN 32 |
101 | #define IEEE80211_QOS_CTL_LEN 2 | ||
101 | 102 | ||
102 | struct ieee80211_hdr { | 103 | struct ieee80211_hdr { |
103 | __le16 frame_control; | 104 | __le16 frame_control; |
@@ -109,6 +110,355 @@ struct ieee80211_hdr { | |||
109 | u8 addr4[6]; | 110 | u8 addr4[6]; |
110 | } __attribute__ ((packed)); | 111 | } __attribute__ ((packed)); |
111 | 112 | ||
113 | /** | ||
114 | * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set | ||
115 | * @fc: frame control bytes in little-endian byteorder | ||
116 | */ | ||
117 | static inline int ieee80211_has_tods(__le16 fc) | ||
118 | { | ||
119 | return (fc & cpu_to_le16(IEEE80211_FCTL_TODS)) != 0; | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * ieee80211_has_fromds - check if IEEE80211_FCTL_FROMDS is set | ||
124 | * @fc: frame control bytes in little-endian byteorder | ||
125 | */ | ||
126 | static inline int ieee80211_has_fromds(__le16 fc) | ||
127 | { | ||
128 | return (fc & cpu_to_le16(IEEE80211_FCTL_FROMDS)) != 0; | ||
129 | } | ||
130 | |||
131 | /** | ||
132 | * ieee80211_has_a4 - check if IEEE80211_FCTL_TODS and IEEE80211_FCTL_FROMDS are set | ||
133 | * @fc: frame control bytes in little-endian byteorder | ||
134 | */ | ||
135 | static inline int ieee80211_has_a4(__le16 fc) | ||
136 | { | ||
137 | __le16 tmp = cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS); | ||
138 | return (fc & tmp) == tmp; | ||
139 | } | ||
140 | |||
141 | /** | ||
142 | * ieee80211_has_morefrags - check if IEEE80211_FCTL_MOREFRAGS is set | ||
143 | * @fc: frame control bytes in little-endian byteorder | ||
144 | */ | ||
145 | static inline int ieee80211_has_morefrags(__le16 fc) | ||
146 | { | ||
147 | return (fc & cpu_to_le16(IEEE80211_FCTL_MOREFRAGS)) != 0; | ||
148 | } | ||
149 | |||
150 | /** | ||
151 | * ieee80211_has_retry - check if IEEE80211_FCTL_RETRY is set | ||
152 | * @fc: frame control bytes in little-endian byteorder | ||
153 | */ | ||
154 | static inline int ieee80211_has_retry(__le16 fc) | ||
155 | { | ||
156 | return (fc & cpu_to_le16(IEEE80211_FCTL_RETRY)) != 0; | ||
157 | } | ||
158 | |||
159 | /** | ||
160 | * ieee80211_has_pm - check if IEEE80211_FCTL_PM is set | ||
161 | * @fc: frame control bytes in little-endian byteorder | ||
162 | */ | ||
163 | static inline int ieee80211_has_pm(__le16 fc) | ||
164 | { | ||
165 | return (fc & cpu_to_le16(IEEE80211_FCTL_PM)) != 0; | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * ieee80211_has_moredata - check if IEEE80211_FCTL_MOREDATA is set | ||
170 | * @fc: frame control bytes in little-endian byteorder | ||
171 | */ | ||
172 | static inline int ieee80211_has_moredata(__le16 fc) | ||
173 | { | ||
174 | return (fc & cpu_to_le16(IEEE80211_FCTL_MOREDATA)) != 0; | ||
175 | } | ||
176 | |||
177 | /** | ||
178 | * ieee80211_has_protected - check if IEEE80211_FCTL_PROTECTED is set | ||
179 | * @fc: frame control bytes in little-endian byteorder | ||
180 | */ | ||
181 | static inline int ieee80211_has_protected(__le16 fc) | ||
182 | { | ||
183 | return (fc & cpu_to_le16(IEEE80211_FCTL_PROTECTED)) != 0; | ||
184 | } | ||
185 | |||
186 | /** | ||
187 | * ieee80211_has_order - check if IEEE80211_FCTL_ORDER is set | ||
188 | * @fc: frame control bytes in little-endian byteorder | ||
189 | */ | ||
190 | static inline int ieee80211_has_order(__le16 fc) | ||
191 | { | ||
192 | return (fc & cpu_to_le16(IEEE80211_FCTL_ORDER)) != 0; | ||
193 | } | ||
194 | |||
195 | /** | ||
196 | * ieee80211_is_mgmt - check if type is IEEE80211_FTYPE_MGMT | ||
197 | * @fc: frame control bytes in little-endian byteorder | ||
198 | */ | ||
199 | static inline int ieee80211_is_mgmt(__le16 fc) | ||
200 | { | ||
201 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == | ||
202 | cpu_to_le16(IEEE80211_FTYPE_MGMT); | ||
203 | } | ||
204 | |||
205 | /** | ||
206 | * ieee80211_is_ctl - check if type is IEEE80211_FTYPE_CTL | ||
207 | * @fc: frame control bytes in little-endian byteorder | ||
208 | */ | ||
209 | static inline int ieee80211_is_ctl(__le16 fc) | ||
210 | { | ||
211 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == | ||
212 | cpu_to_le16(IEEE80211_FTYPE_CTL); | ||
213 | } | ||
214 | |||
215 | /** | ||
216 | * ieee80211_is_data - check if type is IEEE80211_FTYPE_DATA | ||
217 | * @fc: frame control bytes in little-endian byteorder | ||
218 | */ | ||
219 | static inline int ieee80211_is_data(__le16 fc) | ||
220 | { | ||
221 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == | ||
222 | cpu_to_le16(IEEE80211_FTYPE_DATA); | ||
223 | } | ||
224 | |||
225 | /** | ||
226 | * ieee80211_is_data_qos - check if type is IEEE80211_FTYPE_DATA and IEEE80211_STYPE_QOS_DATA is set | ||
227 | * @fc: frame control bytes in little-endian byteorder | ||
228 | */ | ||
229 | static inline int ieee80211_is_data_qos(__le16 fc) | ||
230 | { | ||
231 | /* | ||
232 | * mask with QOS_DATA rather than IEEE80211_FCTL_STYPE as we just need | ||
233 | * to check the one bit | ||
234 | */ | ||
235 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_STYPE_QOS_DATA)) == | ||
236 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_DATA); | ||
237 | } | ||
238 | |||
239 | /** | ||
240 | * ieee80211_is_data_present - check if type is IEEE80211_FTYPE_DATA and has data | ||
241 | * @fc: frame control bytes in little-endian byteorder | ||
242 | */ | ||
243 | static inline int ieee80211_is_data_present(__le16 fc) | ||
244 | { | ||
245 | /* | ||
246 | * mask with 0x40 and test that that bit is clear to only return true | ||
247 | * for the data-containing substypes. | ||
248 | */ | ||
249 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | 0x40)) == | ||
250 | cpu_to_le16(IEEE80211_FTYPE_DATA); | ||
251 | } | ||
252 | |||
253 | /** | ||
254 | * ieee80211_is_assoc_req - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_REQ | ||
255 | * @fc: frame control bytes in little-endian byteorder | ||
256 | */ | ||
257 | static inline int ieee80211_is_assoc_req(__le16 fc) | ||
258 | { | ||
259 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
260 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ASSOC_REQ); | ||
261 | } | ||
262 | |||
263 | /** | ||
264 | * ieee80211_is_assoc_resp - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_RESP | ||
265 | * @fc: frame control bytes in little-endian byteorder | ||
266 | */ | ||
267 | static inline int ieee80211_is_assoc_resp(__le16 fc) | ||
268 | { | ||
269 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
270 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ASSOC_RESP); | ||
271 | } | ||
272 | |||
273 | /** | ||
274 | * ieee80211_is_reassoc_req - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_REQ | ||
275 | * @fc: frame control bytes in little-endian byteorder | ||
276 | */ | ||
277 | static inline int ieee80211_is_reassoc_req(__le16 fc) | ||
278 | { | ||
279 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
280 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_REASSOC_REQ); | ||
281 | } | ||
282 | |||
283 | /** | ||
284 | * ieee80211_is_reassoc_resp - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_RESP | ||
285 | * @fc: frame control bytes in little-endian byteorder | ||
286 | */ | ||
287 | static inline int ieee80211_is_reassoc_resp(__le16 fc) | ||
288 | { | ||
289 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
290 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_REASSOC_RESP); | ||
291 | } | ||
292 | |||
293 | /** | ||
294 | * ieee80211_is_probe_req - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_REQ | ||
295 | * @fc: frame control bytes in little-endian byteorder | ||
296 | */ | ||
297 | static inline int ieee80211_is_probe_req(__le16 fc) | ||
298 | { | ||
299 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
300 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_REQ); | ||
301 | } | ||
302 | |||
303 | /** | ||
304 | * ieee80211_is_probe_resp - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_RESP | ||
305 | * @fc: frame control bytes in little-endian byteorder | ||
306 | */ | ||
307 | static inline int ieee80211_is_probe_resp(__le16 fc) | ||
308 | { | ||
309 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
310 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_RESP); | ||
311 | } | ||
312 | |||
313 | /** | ||
314 | * ieee80211_is_beacon - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_BEACON | ||
315 | * @fc: frame control bytes in little-endian byteorder | ||
316 | */ | ||
317 | static inline int ieee80211_is_beacon(__le16 fc) | ||
318 | { | ||
319 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
320 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON); | ||
321 | } | ||
322 | |||
323 | /** | ||
324 | * ieee80211_is_atim - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ATIM | ||
325 | * @fc: frame control bytes in little-endian byteorder | ||
326 | */ | ||
327 | static inline int ieee80211_is_atim(__le16 fc) | ||
328 | { | ||
329 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
330 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ATIM); | ||
331 | } | ||
332 | |||
333 | /** | ||
334 | * ieee80211_is_disassoc - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DISASSOC | ||
335 | * @fc: frame control bytes in little-endian byteorder | ||
336 | */ | ||
337 | static inline int ieee80211_is_disassoc(__le16 fc) | ||
338 | { | ||
339 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
340 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DISASSOC); | ||
341 | } | ||
342 | |||
343 | /** | ||
344 | * ieee80211_is_auth - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_AUTH | ||
345 | * @fc: frame control bytes in little-endian byteorder | ||
346 | */ | ||
347 | static inline int ieee80211_is_auth(__le16 fc) | ||
348 | { | ||
349 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
350 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH); | ||
351 | } | ||
352 | |||
353 | /** | ||
354 | * ieee80211_is_deauth - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DEAUTH | ||
355 | * @fc: frame control bytes in little-endian byteorder | ||
356 | */ | ||
357 | static inline int ieee80211_is_deauth(__le16 fc) | ||
358 | { | ||
359 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
360 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DEAUTH); | ||
361 | } | ||
362 | |||
363 | /** | ||
364 | * ieee80211_is_action - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ACTION | ||
365 | * @fc: frame control bytes in little-endian byteorder | ||
366 | */ | ||
367 | static inline int ieee80211_is_action(__le16 fc) | ||
368 | { | ||
369 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
370 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION); | ||
371 | } | ||
372 | |||
373 | /** | ||
374 | * ieee80211_is_back_req - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK_REQ | ||
375 | * @fc: frame control bytes in little-endian byteorder | ||
376 | */ | ||
377 | static inline int ieee80211_is_back_req(__le16 fc) | ||
378 | { | ||
379 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
380 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_BACK_REQ); | ||
381 | } | ||
382 | |||
383 | /** | ||
384 | * ieee80211_is_back - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK | ||
385 | * @fc: frame control bytes in little-endian byteorder | ||
386 | */ | ||
387 | static inline int ieee80211_is_back(__le16 fc) | ||
388 | { | ||
389 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
390 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_BACK); | ||
391 | } | ||
392 | |||
393 | /** | ||
394 | * ieee80211_is_pspoll - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_PSPOLL | ||
395 | * @fc: frame control bytes in little-endian byteorder | ||
396 | */ | ||
397 | static inline int ieee80211_is_pspoll(__le16 fc) | ||
398 | { | ||
399 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
400 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_PSPOLL); | ||
401 | } | ||
402 | |||
403 | /** | ||
404 | * ieee80211_is_rts - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_RTS | ||
405 | * @fc: frame control bytes in little-endian byteorder | ||
406 | */ | ||
407 | static inline int ieee80211_is_rts(__le16 fc) | ||
408 | { | ||
409 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
410 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_RTS); | ||
411 | } | ||
412 | |||
413 | /** | ||
414 | * ieee80211_is_cts - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CTS | ||
415 | * @fc: frame control bytes in little-endian byteorder | ||
416 | */ | ||
417 | static inline int ieee80211_is_cts(__le16 fc) | ||
418 | { | ||
419 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
420 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS); | ||
421 | } | ||
422 | |||
423 | /** | ||
424 | * ieee80211_is_ack - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_ACK | ||
425 | * @fc: frame control bytes in little-endian byteorder | ||
426 | */ | ||
427 | static inline int ieee80211_is_ack(__le16 fc) | ||
428 | { | ||
429 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
430 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_ACK); | ||
431 | } | ||
432 | |||
433 | /** | ||
434 | * ieee80211_is_cfend - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFEND | ||
435 | * @fc: frame control bytes in little-endian byteorder | ||
436 | */ | ||
437 | static inline int ieee80211_is_cfend(__le16 fc) | ||
438 | { | ||
439 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
440 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CFEND); | ||
441 | } | ||
442 | |||
443 | /** | ||
444 | * ieee80211_is_cfendack - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFENDACK | ||
445 | * @fc: frame control bytes in little-endian byteorder | ||
446 | */ | ||
447 | static inline int ieee80211_is_cfendack(__le16 fc) | ||
448 | { | ||
449 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
450 | cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CFENDACK); | ||
451 | } | ||
452 | |||
453 | /** | ||
454 | * ieee80211_is_nullfunc - check if FTYPE=IEEE80211_FTYPE_DATA and STYPE=IEEE80211_STYPE_NULLFUNC | ||
455 | * @fc: frame control bytes in little-endian byteorder | ||
456 | */ | ||
457 | static inline int ieee80211_is_nullfunc(__le16 fc) | ||
458 | { | ||
459 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
460 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC); | ||
461 | } | ||
112 | 462 | ||
113 | struct ieee80211s_hdr { | 463 | struct ieee80211s_hdr { |
114 | u8 flags; | 464 | u8 flags; |
@@ -320,6 +670,7 @@ struct ieee80211_ht_addt_info { | |||
320 | #define IEEE80211_HT_CAP_MCS_TX_UEQM 0x10 | 670 | #define IEEE80211_HT_CAP_MCS_TX_UEQM 0x10 |
321 | /* 802.11n HT IE masks */ | 671 | /* 802.11n HT IE masks */ |
322 | #define IEEE80211_HT_IE_CHA_SEC_OFFSET 0x03 | 672 | #define IEEE80211_HT_IE_CHA_SEC_OFFSET 0x03 |
673 | #define IEEE80211_HT_IE_CHA_SEC_NONE 0x00 | ||
323 | #define IEEE80211_HT_IE_CHA_SEC_ABOVE 0x01 | 674 | #define IEEE80211_HT_IE_CHA_SEC_ABOVE 0x01 |
324 | #define IEEE80211_HT_IE_CHA_SEC_BELOW 0x03 | 675 | #define IEEE80211_HT_IE_CHA_SEC_BELOW 0x03 |
325 | #define IEEE80211_HT_IE_CHA_WIDTH 0x04 | 676 | #define IEEE80211_HT_IE_CHA_WIDTH 0x04 |
@@ -552,65 +903,57 @@ enum ieee80211_back_parties { | |||
552 | #define WLAN_MAX_KEY_LEN 32 | 903 | #define WLAN_MAX_KEY_LEN 32 |
553 | 904 | ||
554 | /** | 905 | /** |
906 | * ieee80211_get_qos_ctl - get pointer to qos control bytes | ||
907 | * @hdr: the frame | ||
908 | * | ||
909 | * The qos ctrl bytes come after the frame_control, duration, seq_num | ||
910 | * and 3 or 4 addresses of length ETH_ALEN. | ||
911 | * 3 addr: 2 + 2 + 2 + 3*6 = 24 | ||
912 | * 4 addr: 2 + 2 + 2 + 4*6 = 30 | ||
913 | */ | ||
914 | static inline u8 *ieee80211_get_qos_ctl(struct ieee80211_hdr *hdr) | ||
915 | { | ||
916 | if (ieee80211_has_a4(hdr->frame_control)) | ||
917 | return (u8 *)hdr + 30; | ||
918 | else | ||
919 | return (u8 *)hdr + 24; | ||
920 | } | ||
921 | |||
922 | /** | ||
555 | * ieee80211_get_SA - get pointer to SA | 923 | * ieee80211_get_SA - get pointer to SA |
924 | * @hdr: the frame | ||
556 | * | 925 | * |
557 | * Given an 802.11 frame, this function returns the offset | 926 | * Given an 802.11 frame, this function returns the offset |
558 | * to the source address (SA). It does not verify that the | 927 | * to the source address (SA). It does not verify that the |
559 | * header is long enough to contain the address, and the | 928 | * header is long enough to contain the address, and the |
560 | * header must be long enough to contain the frame control | 929 | * header must be long enough to contain the frame control |
561 | * field. | 930 | * field. |
562 | * | ||
563 | * @hdr: the frame | ||
564 | */ | 931 | */ |
565 | static inline u8 *ieee80211_get_SA(struct ieee80211_hdr *hdr) | 932 | static inline u8 *ieee80211_get_SA(struct ieee80211_hdr *hdr) |
566 | { | 933 | { |
567 | __le16 fc = hdr->frame_control; | 934 | if (ieee80211_has_a4(hdr->frame_control)) |
568 | fc &= cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS); | ||
569 | |||
570 | switch (fc) { | ||
571 | case __constant_cpu_to_le16(IEEE80211_FCTL_FROMDS): | ||
572 | return hdr->addr3; | ||
573 | case __constant_cpu_to_le16(IEEE80211_FCTL_TODS|IEEE80211_FCTL_FROMDS): | ||
574 | return hdr->addr4; | 935 | return hdr->addr4; |
575 | default: | 936 | if (ieee80211_has_fromds(hdr->frame_control)) |
576 | return hdr->addr2; | 937 | return hdr->addr3; |
577 | } | 938 | return hdr->addr2; |
578 | } | 939 | } |
579 | 940 | ||
580 | /** | 941 | /** |
581 | * ieee80211_get_DA - get pointer to DA | 942 | * ieee80211_get_DA - get pointer to DA |
943 | * @hdr: the frame | ||
582 | * | 944 | * |
583 | * Given an 802.11 frame, this function returns the offset | 945 | * Given an 802.11 frame, this function returns the offset |
584 | * to the destination address (DA). It does not verify that | 946 | * to the destination address (DA). It does not verify that |
585 | * the header is long enough to contain the address, and the | 947 | * the header is long enough to contain the address, and the |
586 | * header must be long enough to contain the frame control | 948 | * header must be long enough to contain the frame control |
587 | * field. | 949 | * field. |
588 | * | ||
589 | * @hdr: the frame | ||
590 | */ | 950 | */ |
591 | static inline u8 *ieee80211_get_DA(struct ieee80211_hdr *hdr) | 951 | static inline u8 *ieee80211_get_DA(struct ieee80211_hdr *hdr) |
592 | { | 952 | { |
593 | __le16 fc = hdr->frame_control; | 953 | if (ieee80211_has_tods(hdr->frame_control)) |
594 | fc &= cpu_to_le16(IEEE80211_FCTL_TODS); | ||
595 | |||
596 | if (fc) | ||
597 | return hdr->addr3; | 954 | return hdr->addr3; |
598 | else | 955 | else |
599 | return hdr->addr1; | 956 | return hdr->addr1; |
600 | } | 957 | } |
601 | 958 | ||
602 | /** | ||
603 | * ieee80211_get_morefrag - determine whether the MOREFRAGS bit is set | ||
604 | * | ||
605 | * This function determines whether the "more fragments" bit is set | ||
606 | * in the frame. | ||
607 | * | ||
608 | * @hdr: the frame | ||
609 | */ | ||
610 | static inline int ieee80211_get_morefrag(struct ieee80211_hdr *hdr) | ||
611 | { | ||
612 | __le16 fc = hdr->frame_control; | ||
613 | return !!(fc & cpu_to_le16(IEEE80211_FCTL_MOREFRAGS)); | ||
614 | } | ||
615 | |||
616 | #endif /* IEEE80211_H */ | 959 | #endif /* IEEE80211_H */ |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index f1fbe9c930d7..d4efe4014705 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -41,7 +41,7 @@ struct ip_tunnel_prl { | |||
41 | __u16 __reserved; | 41 | __u16 __reserved; |
42 | __u32 datalen; | 42 | __u32 datalen; |
43 | __u32 __reserved2; | 43 | __u32 __reserved2; |
44 | void __user *data; | 44 | /* data follows */ |
45 | }; | 45 | }; |
46 | 46 | ||
47 | /* PRL flags */ | 47 | /* PRL flags */ |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index d5d40a9f7929..c6801bffe76d 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -53,14 +53,14 @@ struct resource_list { | |||
53 | #define IORESOURCE_AUTO 0x40000000 | 53 | #define IORESOURCE_AUTO 0x40000000 |
54 | #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ | 54 | #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ |
55 | 55 | ||
56 | /* ISA PnP IRQ specific bits (IORESOURCE_BITS) */ | 56 | /* PnP IRQ specific bits (IORESOURCE_BITS) */ |
57 | #define IORESOURCE_IRQ_HIGHEDGE (1<<0) | 57 | #define IORESOURCE_IRQ_HIGHEDGE (1<<0) |
58 | #define IORESOURCE_IRQ_LOWEDGE (1<<1) | 58 | #define IORESOURCE_IRQ_LOWEDGE (1<<1) |
59 | #define IORESOURCE_IRQ_HIGHLEVEL (1<<2) | 59 | #define IORESOURCE_IRQ_HIGHLEVEL (1<<2) |
60 | #define IORESOURCE_IRQ_LOWLEVEL (1<<3) | 60 | #define IORESOURCE_IRQ_LOWLEVEL (1<<3) |
61 | #define IORESOURCE_IRQ_SHAREABLE (1<<4) | 61 | #define IORESOURCE_IRQ_SHAREABLE (1<<4) |
62 | 62 | ||
63 | /* ISA PnP DMA specific bits (IORESOURCE_BITS) */ | 63 | /* PnP DMA specific bits (IORESOURCE_BITS) */ |
64 | #define IORESOURCE_DMA_TYPE_MASK (3<<0) | 64 | #define IORESOURCE_DMA_TYPE_MASK (3<<0) |
65 | #define IORESOURCE_DMA_8BIT (0<<0) | 65 | #define IORESOURCE_DMA_8BIT (0<<0) |
66 | #define IORESOURCE_DMA_8AND16BIT (1<<0) | 66 | #define IORESOURCE_DMA_8AND16BIT (1<<0) |
@@ -76,7 +76,7 @@ struct resource_list { | |||
76 | #define IORESOURCE_DMA_TYPEB (2<<6) | 76 | #define IORESOURCE_DMA_TYPEB (2<<6) |
77 | #define IORESOURCE_DMA_TYPEF (3<<6) | 77 | #define IORESOURCE_DMA_TYPEF (3<<6) |
78 | 78 | ||
79 | /* ISA PnP memory I/O specific bits (IORESOURCE_BITS) */ | 79 | /* PnP memory I/O specific bits (IORESOURCE_BITS) */ |
80 | #define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */ | 80 | #define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */ |
81 | #define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */ | 81 | #define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */ |
82 | #define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */ | 82 | #define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */ |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 10b666b61add..cde056e08181 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -396,8 +396,10 @@ static inline struct request_sock *inet6_reqsk_alloc(struct request_sock_ops *op | |||
396 | { | 396 | { |
397 | struct request_sock *req = reqsk_alloc(ops); | 397 | struct request_sock *req = reqsk_alloc(ops); |
398 | 398 | ||
399 | if (req != NULL) | 399 | if (req != NULL) { |
400 | inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); | 400 | inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); |
401 | inet6_rsk(req)->pktopts = NULL; | ||
402 | } | ||
401 | 403 | ||
402 | return req; | 404 | return req; |
403 | } | 405 | } |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 05e2b307161a..d147f0f90360 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -919,6 +919,9 @@ struct journal_s | |||
919 | struct proc_dir_entry *j_proc_entry; | 919 | struct proc_dir_entry *j_proc_entry; |
920 | struct transaction_stats_s j_stats; | 920 | struct transaction_stats_s j_stats; |
921 | 921 | ||
922 | /* Failed journal commit ID */ | ||
923 | unsigned int j_failed_commit; | ||
924 | |||
922 | /* | 925 | /* |
923 | * An opaque pointer to fs-private information. ext3 puts its | 926 | * An opaque pointer to fs-private information. ext3 puts its |
924 | * superblock pointer here | 927 | * superblock pointer here |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 398978972b7a..092b1b25291d 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -297,7 +297,7 @@ static inline gpa_t gfn_to_gpa(gfn_t gfn) | |||
297 | return (gpa_t)gfn << PAGE_SHIFT; | 297 | return (gpa_t)gfn << PAGE_SHIFT; |
298 | } | 298 | } |
299 | 299 | ||
300 | static inline void kvm_migrate_apic_timer(struct kvm_vcpu *vcpu) | 300 | static inline void kvm_migrate_timers(struct kvm_vcpu *vcpu) |
301 | { | 301 | { |
302 | set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests); | 302 | set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests); |
303 | } | 303 | } |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 4a92fbafce9d..e57e5d08312d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -111,13 +111,10 @@ enum { | |||
111 | /* various global constants */ | 111 | /* various global constants */ |
112 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, | 112 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, |
113 | LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */ | 113 | LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */ |
114 | ATA_MAX_PORTS = 8, | ||
115 | ATA_DEF_QUEUE = 1, | 114 | ATA_DEF_QUEUE = 1, |
116 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ | 115 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ |
117 | ATA_MAX_QUEUE = 32, | 116 | ATA_MAX_QUEUE = 32, |
118 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, | 117 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, |
119 | ATA_MAX_BUS = 2, | ||
120 | ATA_DEF_BUSY_WAIT = 10000, | ||
121 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, | 118 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, |
122 | 119 | ||
123 | ATAPI_MAX_DRAIN = 16 << 10, | 120 | ATAPI_MAX_DRAIN = 16 << 10, |
@@ -1435,7 +1432,8 @@ extern void ata_sff_qc_prep(struct ata_queued_cmd *qc); | |||
1435 | extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); | 1432 | extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); |
1436 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); | 1433 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); |
1437 | extern u8 ata_sff_check_status(struct ata_port *ap); | 1434 | extern u8 ata_sff_check_status(struct ata_port *ap); |
1438 | extern u8 ata_sff_altstatus(struct ata_port *ap); | 1435 | extern void ata_sff_pause(struct ata_port *ap); |
1436 | extern void ata_sff_dma_pause(struct ata_port *ap); | ||
1439 | extern int ata_sff_busy_sleep(struct ata_port *ap, | 1437 | extern int ata_sff_busy_sleep(struct ata_port *ap, |
1440 | unsigned long timeout_pat, unsigned long timeout); | 1438 | unsigned long timeout_pat, unsigned long timeout); |
1441 | extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline); | 1439 | extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline); |
@@ -1496,19 +1494,6 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev, | |||
1496 | #endif /* CONFIG_PCI */ | 1494 | #endif /* CONFIG_PCI */ |
1497 | 1495 | ||
1498 | /** | 1496 | /** |
1499 | * ata_sff_pause - Flush writes and pause 400 nanoseconds. | ||
1500 | * @ap: Port to wait for. | ||
1501 | * | ||
1502 | * LOCKING: | ||
1503 | * Inherited from caller. | ||
1504 | */ | ||
1505 | static inline void ata_sff_pause(struct ata_port *ap) | ||
1506 | { | ||
1507 | ata_sff_altstatus(ap); | ||
1508 | ndelay(400); | ||
1509 | } | ||
1510 | |||
1511 | /** | ||
1512 | * ata_sff_busy_wait - Wait for a port status register | 1497 | * ata_sff_busy_wait - Wait for a port status register |
1513 | * @ap: Port to wait for. | 1498 | * @ap: Port to wait for. |
1514 | * @bits: bits that must be clear | 1499 | * @bits: bits that must be clear |
diff --git a/include/linux/math64.h b/include/linux/math64.h index c1a5f81501ff..c87f1528703a 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h | |||
@@ -81,4 +81,25 @@ static inline s64 div_s64(s64 dividend, s32 divisor) | |||
81 | } | 81 | } |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder); | ||
85 | |||
86 | static __always_inline u32 | ||
87 | __iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder) | ||
88 | { | ||
89 | u32 ret = 0; | ||
90 | |||
91 | while (dividend >= divisor) { | ||
92 | /* The following asm() prevents the compiler from | ||
93 | optimising this loop into a modulo operation. */ | ||
94 | asm("" : "+rm"(dividend)); | ||
95 | |||
96 | dividend -= divisor; | ||
97 | ret++; | ||
98 | } | ||
99 | |||
100 | *remainder = dividend; | ||
101 | |||
102 | return ret; | ||
103 | } | ||
104 | |||
84 | #endif /* _LINUX_MATH64_H */ | 105 | #endif /* _LINUX_MATH64_H */ |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 73e358612eaf..ea9f5ad9ec8e 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -77,14 +77,6 @@ extern int __add_pages(struct zone *zone, unsigned long start_pfn, | |||
77 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, | 77 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, |
78 | unsigned long nr_pages); | 78 | unsigned long nr_pages); |
79 | 79 | ||
80 | /* | ||
81 | * Walk through all memory which is registered as resource. | ||
82 | * arg is (start_pfn, nr_pages, private_arg_pointer) | ||
83 | */ | ||
84 | extern int walk_memory_resource(unsigned long start_pfn, | ||
85 | unsigned long nr_pages, void *arg, | ||
86 | int (*func)(unsigned long, unsigned long, void *)); | ||
87 | |||
88 | #ifdef CONFIG_NUMA | 80 | #ifdef CONFIG_NUMA |
89 | extern int memory_add_physaddr_to_nid(u64 start); | 81 | extern int memory_add_physaddr_to_nid(u64 start); |
90 | #else | 82 | #else |
@@ -199,6 +191,14 @@ static inline void register_page_bootmem_info_node(struct pglist_data *pgdat) | |||
199 | 191 | ||
200 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ | 192 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ |
201 | 193 | ||
194 | /* | ||
195 | * Walk through all memory which is registered as resource. | ||
196 | * arg is (start_pfn, nr_pages, private_arg_pointer) | ||
197 | */ | ||
198 | extern int walk_memory_resource(unsigned long start_pfn, | ||
199 | unsigned long nr_pages, void *arg, | ||
200 | int (*func)(unsigned long, unsigned long, void *)); | ||
201 | |||
202 | extern int add_memory(int nid, u64 start, u64 size); | 202 | extern int add_memory(int nid, u64 start, u64 size); |
203 | extern int arch_add_memory(int nid, u64 start, u64 size); | 203 | extern int arch_add_memory(int nid, u64 start, u64 size); |
204 | extern int remove_memory(u64 start, u64 size); | 204 | extern int remove_memory(u64 start, u64 size); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index c31a9cd2a30e..586a943cab01 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -760,16 +760,17 @@ unsigned long unmap_vmas(struct mmu_gather **tlb, | |||
760 | * (see walk_page_range for more details) | 760 | * (see walk_page_range for more details) |
761 | */ | 761 | */ |
762 | struct mm_walk { | 762 | struct mm_walk { |
763 | int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, void *); | 763 | int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *); |
764 | int (*pud_entry)(pud_t *, unsigned long, unsigned long, void *); | 764 | int (*pud_entry)(pud_t *, unsigned long, unsigned long, struct mm_walk *); |
765 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, void *); | 765 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); |
766 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, void *); | 766 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); |
767 | int (*pte_hole)(unsigned long, unsigned long, void *); | 767 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); |
768 | struct mm_struct *mm; | ||
769 | void *private; | ||
768 | }; | 770 | }; |
769 | 771 | ||
770 | int walk_page_range(const struct mm_struct *, unsigned long addr, | 772 | int walk_page_range(unsigned long addr, unsigned long end, |
771 | unsigned long end, const struct mm_walk *walk, | 773 | struct mm_walk *walk); |
772 | void *private); | ||
773 | void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | 774 | void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, |
774 | unsigned long end, unsigned long floor, unsigned long ceiling); | 775 | unsigned long end, unsigned long floor, unsigned long ceiling); |
775 | void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, | 776 | void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index b03b27457413..81cd36b735b0 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -57,12 +57,6 @@ | |||
57 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ | 57 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ |
58 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ | 58 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ |
59 | 59 | ||
60 | /* media of boot sector */ | ||
61 | static inline int fat_valid_media(u8 media) | ||
62 | { | ||
63 | return 0xf8 <= media || media == 0xf0; | ||
64 | } | ||
65 | |||
66 | #define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ | 60 | #define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ |
67 | MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x)) | 61 | MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x)) |
68 | 62 | ||
@@ -334,6 +328,12 @@ static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len) | |||
334 | #endif | 328 | #endif |
335 | } | 329 | } |
336 | 330 | ||
331 | /* media of boot sector */ | ||
332 | static inline int fat_valid_media(u8 media) | ||
333 | { | ||
334 | return 0xf8 <= media || media == 0xf0; | ||
335 | } | ||
336 | |||
337 | /* fat/cache.c */ | 337 | /* fat/cache.c */ |
338 | extern void fat_cache_inval_inode(struct inode *inode); | 338 | extern void fat_cache_inval_inode(struct inode *inode); |
339 | extern int fat_get_cluster(struct inode *inode, int cluster, | 339 | extern int fat_get_cluster(struct inode *inode, int cluster, |
diff --git a/include/linux/msg.h b/include/linux/msg.h index 6f3b8e79a991..56abf1558fdd 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h | |||
@@ -64,11 +64,11 @@ struct msginfo { | |||
64 | #define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ | 64 | #define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ |
65 | 65 | ||
66 | /* unused */ | 66 | /* unused */ |
67 | #define MSGPOOL (MSGMNI * MSGMNB) /* size in bytes of message pool */ | 67 | #define MSGPOOL (MSGMNI * MSGMNB / 1024) /* size in kbytes of message pool */ |
68 | #define MSGTQL MSGMNB /* number of system message headers */ | 68 | #define MSGTQL MSGMNB /* number of system message headers */ |
69 | #define MSGMAP MSGMNB /* number of entries in message map */ | 69 | #define MSGMAP MSGMNB /* number of entries in message map */ |
70 | #define MSGSSZ 16 /* message segment size */ | 70 | #define MSGSSZ 16 /* message segment size */ |
71 | #define __MSGSEG (MSGPOOL / MSGSSZ) /* max no. of segments */ | 71 | #define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) /* max no. of segments */ |
72 | #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) | 72 | #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) |
73 | 73 | ||
74 | #ifdef __KERNEL__ | 74 | #ifdef __KERNEL__ |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index c42bc7f533a5..53ea3dc8b0e8 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/linux/mtd/nand.h | 2 | * linux/include/linux/mtd/nand.h |
3 | * | 3 | * |
4 | * Copyright (c) 2000 David Woodhouse <dwmw2@mvhi.com> | 4 | * Copyright (c) 2000 David Woodhouse <dwmw2@infradead.org> |
5 | * Steven J. Hill <sjhill@realitydiluted.com> | 5 | * Steven J. Hill <sjhill@realitydiluted.com> |
6 | * Thomas Gleixner <tglx@linutronix.de> | 6 | * Thomas Gleixner <tglx@linutronix.de> |
7 | * | 7 | * |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index ea6517e58b04..aa8411e2a160 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -122,13 +122,13 @@ enum nl80211_commands { | |||
122 | NL80211_CMD_NEW_STATION, | 122 | NL80211_CMD_NEW_STATION, |
123 | NL80211_CMD_DEL_STATION, | 123 | NL80211_CMD_DEL_STATION, |
124 | 124 | ||
125 | /* add commands here */ | ||
126 | |||
127 | NL80211_CMD_GET_MPATH, | 125 | NL80211_CMD_GET_MPATH, |
128 | NL80211_CMD_SET_MPATH, | 126 | NL80211_CMD_SET_MPATH, |
129 | NL80211_CMD_NEW_MPATH, | 127 | NL80211_CMD_NEW_MPATH, |
130 | NL80211_CMD_DEL_MPATH, | 128 | NL80211_CMD_DEL_MPATH, |
131 | 129 | ||
130 | /* add commands here */ | ||
131 | |||
132 | /* used to define NL80211_CMD_MAX below */ | 132 | /* used to define NL80211_CMD_MAX below */ |
133 | __NL80211_CMD_AFTER_LAST, | 133 | __NL80211_CMD_AFTER_LAST, |
134 | NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1 | 134 | NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1 |
@@ -230,13 +230,13 @@ enum nl80211_attrs { | |||
230 | 230 | ||
231 | NL80211_ATTR_MNTR_FLAGS, | 231 | NL80211_ATTR_MNTR_FLAGS, |
232 | 232 | ||
233 | /* add attributes here, update the policy in nl80211.c */ | ||
234 | |||
235 | NL80211_ATTR_MESH_ID, | 233 | NL80211_ATTR_MESH_ID, |
236 | NL80211_ATTR_STA_PLINK_ACTION, | 234 | NL80211_ATTR_STA_PLINK_ACTION, |
237 | NL80211_ATTR_MPATH_NEXT_HOP, | 235 | NL80211_ATTR_MPATH_NEXT_HOP, |
238 | NL80211_ATTR_MPATH_INFO, | 236 | NL80211_ATTR_MPATH_INFO, |
239 | 237 | ||
238 | /* add attributes here, update the policy in nl80211.c */ | ||
239 | |||
240 | __NL80211_ATTR_AFTER_LAST, | 240 | __NL80211_ATTR_AFTER_LAST, |
241 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 | 241 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 |
242 | }; | 242 | }; |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 590cff32415d..f31debfac926 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -306,5 +306,29 @@ static inline void __ClearPageTail(struct page *page) | |||
306 | } | 306 | } |
307 | 307 | ||
308 | #endif /* !PAGEFLAGS_EXTENDED */ | 308 | #endif /* !PAGEFLAGS_EXTENDED */ |
309 | |||
310 | #define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \ | ||
311 | 1 << PG_buddy | 1 << PG_writeback | \ | ||
312 | 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active) | ||
313 | |||
314 | /* | ||
315 | * Flags checked in bad_page(). Pages on the free list should not have | ||
316 | * these flags set. It they are, there is a problem. | ||
317 | */ | ||
318 | #define PAGE_FLAGS_CLEAR_WHEN_BAD (PAGE_FLAGS | 1 << PG_reclaim | 1 << PG_dirty) | ||
319 | |||
320 | /* | ||
321 | * Flags checked when a page is freed. Pages being freed should not have | ||
322 | * these flags set. It they are, there is a problem. | ||
323 | */ | ||
324 | #define PAGE_FLAGS_CHECK_AT_FREE (PAGE_FLAGS | 1 << PG_reserved) | ||
325 | |||
326 | /* | ||
327 | * Flags checked when a page is prepped for return by the page allocator. | ||
328 | * Pages being prepped should not have these flags set. It they are, there | ||
329 | * is a problem. | ||
330 | */ | ||
331 | #define PAGE_FLAGS_CHECK_AT_PREP (PAGE_FLAGS | 1 << PG_reserved | 1 << PG_dirty) | ||
332 | |||
309 | #endif /* !__GENERATING_BOUNDS_H */ | 333 | #endif /* !__GENERATING_BOUNDS_H */ |
310 | #endif /* PAGE_FLAGS_H */ | 334 | #endif /* PAGE_FLAGS_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 1bbb346066dd..caa000596b25 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -716,6 +716,7 @@ | |||
716 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 | 716 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 |
717 | #define PCI_DEVICE_ID_HP_CISSC 0x3230 | 717 | #define PCI_DEVICE_ID_HP_CISSC 0x3230 |
718 | #define PCI_DEVICE_ID_HP_CISSD 0x3238 | 718 | #define PCI_DEVICE_ID_HP_CISSD 0x3238 |
719 | #define PCI_DEVICE_ID_HP_CISSE 0x323a | ||
719 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 | 720 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 |
720 | 721 | ||
721 | #define PCI_VENDOR_ID_PCTECH 0x1042 | 722 | #define PCI_VENDOR_ID_PCTECH 0x1042 |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 9883bc942262..fff1d27ddb4c 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | struct net; | 10 | struct net; |
11 | struct completion; | 11 | struct completion; |
12 | struct mm_struct; | ||
13 | |||
12 | /* | 14 | /* |
13 | * The proc filesystem constants/structures | 15 | * The proc filesystem constants/structures |
14 | */ | 16 | */ |
@@ -101,8 +103,6 @@ extern spinlock_t proc_subdir_lock; | |||
101 | extern void proc_root_init(void); | 103 | extern void proc_root_init(void); |
102 | extern void proc_misc_init(void); | 104 | extern void proc_misc_init(void); |
103 | 105 | ||
104 | struct mm_struct; | ||
105 | |||
106 | void proc_flush_task(struct task_struct *task); | 106 | void proc_flush_task(struct task_struct *task); |
107 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); | 107 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); |
108 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); | 108 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index a2aec2c0cfb5..b358c704d102 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -246,6 +246,7 @@ enum rt_class_t | |||
246 | { | 246 | { |
247 | RT_TABLE_UNSPEC=0, | 247 | RT_TABLE_UNSPEC=0, |
248 | /* User defined values */ | 248 | /* User defined values */ |
249 | RT_TABLE_COMPAT=252, | ||
249 | RT_TABLE_DEFAULT=253, | 250 | RT_TABLE_DEFAULT=253, |
250 | RT_TABLE_MAIN=254, | 251 | RT_TABLE_MAIN=254, |
251 | RT_TABLE_LOCAL=255, | 252 | RT_TABLE_LOCAL=255, |
diff --git a/include/linux/sched.h b/include/linux/sched.h index ae0be3c62375..c5d3f847ca8d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2026,6 +2026,19 @@ static inline int fatal_signal_pending(struct task_struct *p) | |||
2026 | return signal_pending(p) && __fatal_signal_pending(p); | 2026 | return signal_pending(p) && __fatal_signal_pending(p); |
2027 | } | 2027 | } |
2028 | 2028 | ||
2029 | static inline int signal_pending_state(long state, struct task_struct *p) | ||
2030 | { | ||
2031 | if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) | ||
2032 | return 0; | ||
2033 | if (!signal_pending(p)) | ||
2034 | return 0; | ||
2035 | |||
2036 | if (state & (__TASK_STOPPED | __TASK_TRACED)) | ||
2037 | return 0; | ||
2038 | |||
2039 | return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); | ||
2040 | } | ||
2041 | |||
2029 | static inline int need_resched(void) | 2042 | static inline int need_resched(void) |
2030 | { | 2043 | { |
2031 | return unlikely(test_thread_flag(TIF_NEED_RESCHED)); | 2044 | return unlikely(test_thread_flag(TIF_NEED_RESCHED)); |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index d32123ae08ad..d8f31de632c5 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -192,6 +192,7 @@ struct uart_ops { | |||
192 | void (*shutdown)(struct uart_port *); | 192 | void (*shutdown)(struct uart_port *); |
193 | void (*set_termios)(struct uart_port *, struct ktermios *new, | 193 | void (*set_termios)(struct uart_port *, struct ktermios *new, |
194 | struct ktermios *old); | 194 | struct ktermios *old); |
195 | void (*set_ldisc)(struct uart_port *); | ||
195 | void (*pm)(struct uart_port *, unsigned int state, | 196 | void (*pm)(struct uart_port *, unsigned int state, |
196 | unsigned int oldstate); | 197 | unsigned int oldstate); |
197 | int (*set_wake)(struct uart_port *, unsigned int state); | 198 | int (*set_wake)(struct uart_port *, unsigned int state); |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 805ed4b92f9a..c2ad35016599 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -276,6 +276,17 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
276 | return kmalloc(size, flags | __GFP_ZERO); | 276 | return kmalloc(size, flags | __GFP_ZERO); |
277 | } | 277 | } |
278 | 278 | ||
279 | /** | ||
280 | * kzalloc_node - allocate zeroed memory from a particular memory node. | ||
281 | * @size: how many bytes of memory are required. | ||
282 | * @flags: the type of memory to allocate (see kmalloc). | ||
283 | * @node: memory node from which to allocate | ||
284 | */ | ||
285 | static inline void *kzalloc_node(size_t size, gfp_t flags, int node) | ||
286 | { | ||
287 | return kmalloc_node(size, flags | __GFP_ZERO, node); | ||
288 | } | ||
289 | |||
279 | #ifdef CONFIG_SLABINFO | 290 | #ifdef CONFIG_SLABINFO |
280 | extern const struct seq_operations slabinfo_op; | 291 | extern const struct seq_operations slabinfo_op; |
281 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); | 292 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); |
diff --git a/include/linux/smc911x.h b/include/linux/smc911x.h new file mode 100644 index 000000000000..b58f54c24183 --- /dev/null +++ b/include/linux/smc911x.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef __SMC911X_H__ | ||
2 | #define __SMC911X_H__ | ||
3 | |||
4 | #define SMC911X_USE_16BIT (1 << 0) | ||
5 | #define SMC911X_USE_32BIT (1 << 1) | ||
6 | |||
7 | struct smc911x_platdata { | ||
8 | unsigned long flags; | ||
9 | unsigned long irq_flags; /* IRQF_... */ | ||
10 | }; | ||
11 | |||
12 | #endif /* __SMC911X_H__ */ | ||
diff --git a/include/linux/sonet.h b/include/linux/sonet.h index 753680296e17..67ad11fcf88b 100644 --- a/include/linux/sonet.h +++ b/include/linux/sonet.h | |||
@@ -34,7 +34,7 @@ struct sonet_stats { | |||
34 | /* clear error insertion */ | 34 | /* clear error insertion */ |
35 | #define SONET_GETDIAG _IOR('a',ATMIOC_PHYTYP+4,int) | 35 | #define SONET_GETDIAG _IOR('a',ATMIOC_PHYTYP+4,int) |
36 | /* query error insertion */ | 36 | /* query error insertion */ |
37 | #define SONET_SETFRAMING _IO('a',ATMIOC_PHYTYP+5) | 37 | #define SONET_SETFRAMING _IOW('a',ATMIOC_PHYTYP+5,int) |
38 | /* set framing mode (SONET/SDH) */ | 38 | /* set framing mode (SONET/SDH) */ |
39 | #define SONET_GETFRAMING _IOR('a',ATMIOC_PHYTYP+6,int) | 39 | #define SONET_GETFRAMING _IOR('a',ATMIOC_PHYTYP+6,int) |
40 | /* get framing mode */ | 40 | /* get framing mode */ |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 9881295f3857..07e79bdb9cdf 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -239,11 +239,6 @@ static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) | |||
239 | return (struct tcp_request_sock *)req; | 239 | return (struct tcp_request_sock *)req; |
240 | } | 240 | } |
241 | 241 | ||
242 | struct tcp_deferred_accept_info { | ||
243 | struct sock *listen_sk; | ||
244 | struct request_sock *request; | ||
245 | }; | ||
246 | |||
247 | struct tcp_sock { | 242 | struct tcp_sock { |
248 | /* inet_connection_sock has to be the first member of tcp_sock */ | 243 | /* inet_connection_sock has to be the first member of tcp_sock */ |
249 | struct inet_connection_sock inet_conn; | 244 | struct inet_connection_sock inet_conn; |
@@ -379,8 +374,6 @@ struct tcp_sock { | |||
379 | unsigned int keepalive_time; /* time before keep alive takes place */ | 374 | unsigned int keepalive_time; /* time before keep alive takes place */ |
380 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ | 375 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ |
381 | 376 | ||
382 | struct tcp_deferred_accept_info defer_tcp_accept; | ||
383 | |||
384 | unsigned long last_synq_overflow; | 377 | unsigned long last_synq_overflow; |
385 | 378 | ||
386 | /* Receiver side RTT estimation */ | 379 | /* Receiver side RTT estimation */ |
diff --git a/include/linux/time.h b/include/linux/time.h index d32ef0ad4c0a..e15206a7e82e 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
7 | # include <linux/cache.h> | 7 | # include <linux/cache.h> |
8 | # include <linux/seqlock.h> | 8 | # include <linux/seqlock.h> |
9 | # include <linux/math64.h> | ||
9 | #endif | 10 | #endif |
10 | 11 | ||
11 | #ifndef _STRUCT_TIMESPEC | 12 | #ifndef _STRUCT_TIMESPEC |
@@ -169,18 +170,13 @@ extern struct timeval ns_to_timeval(const s64 nsec); | |||
169 | * timespec_add_ns - Adds nanoseconds to a timespec | 170 | * timespec_add_ns - Adds nanoseconds to a timespec |
170 | * @a: pointer to timespec to be incremented | 171 | * @a: pointer to timespec to be incremented |
171 | * @ns: unsigned nanoseconds value to be added | 172 | * @ns: unsigned nanoseconds value to be added |
173 | * | ||
174 | * This must always be inlined because its used from the x86-64 vdso, | ||
175 | * which cannot call other kernel functions. | ||
172 | */ | 176 | */ |
173 | static inline void timespec_add_ns(struct timespec *a, u64 ns) | 177 | static __always_inline void timespec_add_ns(struct timespec *a, u64 ns) |
174 | { | 178 | { |
175 | ns += a->tv_nsec; | 179 | a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); |
176 | while(unlikely(ns >= NSEC_PER_SEC)) { | ||
177 | /* The following asm() prevents the compiler from | ||
178 | * optimising this loop into a modulo operation. */ | ||
179 | asm("" : "+r"(ns)); | ||
180 | |||
181 | ns -= NSEC_PER_SEC; | ||
182 | a->tv_sec++; | ||
183 | } | ||
184 | a->tv_nsec = ns; | 180 | a->tv_nsec = ns; |
185 | } | 181 | } |
186 | #endif /* __KERNEL__ */ | 182 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 7f7121f9c968..324a3b231d40 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define N_6PACK 7 | 36 | #define N_6PACK 7 |
37 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | 37 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ |
38 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | 38 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ |
39 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | 39 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus */ |
40 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | 40 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ |
41 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ | 41 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ |
42 | /* cards about SMS messages */ | 42 | /* cards about SMS messages */ |
diff --git a/include/linux/udp.h b/include/linux/udp.h index 581ca2c14c52..0cf5c4c0ec81 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h | |||
@@ -38,6 +38,7 @@ struct udphdr { | |||
38 | #ifdef __KERNEL__ | 38 | #ifdef __KERNEL__ |
39 | #include <net/inet_sock.h> | 39 | #include <net/inet_sock.h> |
40 | #include <linux/skbuff.h> | 40 | #include <linux/skbuff.h> |
41 | #include <net/netns/hash.h> | ||
41 | 42 | ||
42 | static inline struct udphdr *udp_hdr(const struct sk_buff *skb) | 43 | static inline struct udphdr *udp_hdr(const struct sk_buff *skb) |
43 | { | 44 | { |
@@ -46,6 +47,11 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb) | |||
46 | 47 | ||
47 | #define UDP_HTABLE_SIZE 128 | 48 | #define UDP_HTABLE_SIZE 128 |
48 | 49 | ||
50 | static inline int udp_hashfn(struct net *net, const unsigned num) | ||
51 | { | ||
52 | return (num + net_hash_mix(net)) & (UDP_HTABLE_SIZE - 1); | ||
53 | } | ||
54 | |||
49 | struct udp_sock { | 55 | struct udp_sock { |
50 | /* inet_sock has to be the first member */ | 56 | /* inet_sock has to be the first member */ |
51 | struct inet_sock inet; | 57 | struct inet_sock inet; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index c1411189ba6c..4a535ea1e123 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -865,9 +865,9 @@ struct v4l2_querymenu | |||
865 | #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) | 865 | #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) |
866 | #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) | 866 | #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) |
867 | 867 | ||
868 | /* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ | 868 | /* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ |
869 | #define V4L2_CID_HCENTER_DEPRECATED (V4L2_CID_BASE+22) | 869 | #define V4L2_CID_HCENTER (V4L2_CID_BASE+22) |
870 | #define V4L2_CID_VCENTER_DEPRECATED (V4L2_CID_BASE+23) | 870 | #define V4L2_CID_VCENTER (V4L2_CID_BASE+23) |
871 | 871 | ||
872 | #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) | 872 | #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) |
873 | enum v4l2_power_line_frequency { | 873 | enum v4l2_power_line_frequency { |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 9405aa6cdf26..38c0571820fb 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -38,7 +38,7 @@ struct virtio_net_hdr | |||
38 | #define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set | 38 | #define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set |
39 | __u8 gso_type; | 39 | __u8 gso_type; |
40 | __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ | 40 | __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ |
41 | __u16 gso_size; /* Bytes to append to gso_hdr_len per frame */ | 41 | __u16 gso_size; /* Bytes to append to hdr_len per frame */ |
42 | __u16 csum_start; /* Position to start checksumming from */ | 42 | __u16 csum_start; /* Position to start checksumming from */ |
43 | __u16 csum_offset; /* Offset after that to place checksum */ | 43 | __u16 csum_offset; /* Offset after that to place checksum */ |
44 | }; | 44 | }; |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index a807d2f86ee8..33f01ae08f76 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -40,7 +40,6 @@ | |||
40 | #define VFL_TYPE_VTX 3 | 40 | #define VFL_TYPE_VTX 3 |
41 | 41 | ||
42 | /* Video standard functions */ | 42 | /* Video standard functions */ |
43 | extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); | ||
44 | extern char *v4l2_norm_to_name(v4l2_std_id id); | 43 | extern char *v4l2_norm_to_name(v4l2_std_id id); |
45 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, | 44 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, |
46 | int id, char *name); | 45 | int id, char *name); |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index bbd3d583c6e6..06b28142b3ab 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -121,7 +121,8 @@ static inline int addrconf_finite_timeout(unsigned long timeout) | |||
121 | */ | 121 | */ |
122 | extern int ipv6_addr_label_init(void); | 122 | extern int ipv6_addr_label_init(void); |
123 | extern void ipv6_addr_label_rtnl_register(void); | 123 | extern void ipv6_addr_label_rtnl_register(void); |
124 | extern u32 ipv6_addr_label(const struct in6_addr *addr, | 124 | extern u32 ipv6_addr_label(struct net *net, |
125 | const struct in6_addr *addr, | ||
125 | int type, int ifindex); | 126 | int type, int ifindex); |
126 | 127 | ||
127 | /* | 128 | /* |
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index b2cfc4927257..db66c7927743 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h | |||
@@ -148,7 +148,6 @@ struct ifacaddr6 | |||
148 | #define IFA_HOST IPV6_ADDR_LOOPBACK | 148 | #define IFA_HOST IPV6_ADDR_LOOPBACK |
149 | #define IFA_LINK IPV6_ADDR_LINKLOCAL | 149 | #define IFA_LINK IPV6_ADDR_LINKLOCAL |
150 | #define IFA_SITE IPV6_ADDR_SITELOCAL | 150 | #define IFA_SITE IPV6_ADDR_SITELOCAL |
151 | #define IFA_GLOBAL 0x0000U | ||
152 | 151 | ||
153 | struct ipv6_devstat { | 152 | struct ipv6_devstat { |
154 | struct proc_dir_entry *proc_dir_entry; | 153 | struct proc_dir_entry *proc_dir_entry; |
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h index 62a5b691858e..e48989f04c24 100644 --- a/include/net/inet6_hashtables.h +++ b/include/net/inet6_hashtables.h | |||
@@ -24,18 +24,20 @@ | |||
24 | #include <net/inet_sock.h> | 24 | #include <net/inet_sock.h> |
25 | 25 | ||
26 | #include <net/ipv6.h> | 26 | #include <net/ipv6.h> |
27 | #include <net/netns/hash.h> | ||
27 | 28 | ||
28 | struct inet_hashinfo; | 29 | struct inet_hashinfo; |
29 | 30 | ||
30 | /* I have no idea if this is a good hash for v6 or not. -DaveM */ | 31 | /* I have no idea if this is a good hash for v6 or not. -DaveM */ |
31 | static inline unsigned int inet6_ehashfn(const struct in6_addr *laddr, const u16 lport, | 32 | static inline unsigned int inet6_ehashfn(struct net *net, |
33 | const struct in6_addr *laddr, const u16 lport, | ||
32 | const struct in6_addr *faddr, const __be16 fport) | 34 | const struct in6_addr *faddr, const __be16 fport) |
33 | { | 35 | { |
34 | u32 ports = (lport ^ (__force u16)fport); | 36 | u32 ports = (lport ^ (__force u16)fport); |
35 | 37 | ||
36 | return jhash_3words((__force u32)laddr->s6_addr32[3], | 38 | return jhash_3words((__force u32)laddr->s6_addr32[3], |
37 | (__force u32)faddr->s6_addr32[3], | 39 | (__force u32)faddr->s6_addr32[3], |
38 | ports, inet_ehash_secret); | 40 | ports, inet_ehash_secret + net_hash_mix(net)); |
39 | } | 41 | } |
40 | 42 | ||
41 | static inline int inet6_sk_ehashfn(const struct sock *sk) | 43 | static inline int inet6_sk_ehashfn(const struct sock *sk) |
@@ -46,7 +48,9 @@ static inline int inet6_sk_ehashfn(const struct sock *sk) | |||
46 | const struct in6_addr *faddr = &np->daddr; | 48 | const struct in6_addr *faddr = &np->daddr; |
47 | const __u16 lport = inet->num; | 49 | const __u16 lport = inet->num; |
48 | const __be16 fport = inet->dport; | 50 | const __be16 fport = inet->dport; |
49 | return inet6_ehashfn(laddr, lport, faddr, fport); | 51 | struct net *net = sock_net(sk); |
52 | |||
53 | return inet6_ehashfn(net, laddr, lport, faddr, fport); | ||
50 | } | 54 | } |
51 | 55 | ||
52 | extern void __inet6_hash(struct sock *sk); | 56 | extern void __inet6_hash(struct sock *sk); |
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 735b926a3497..bb619d80f2e2 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <net/inet_sock.h> | 29 | #include <net/inet_sock.h> |
30 | #include <net/sock.h> | 30 | #include <net/sock.h> |
31 | #include <net/tcp_states.h> | 31 | #include <net/tcp_states.h> |
32 | #include <net/netns/hash.h> | ||
32 | 33 | ||
33 | #include <asm/atomic.h> | 34 | #include <asm/atomic.h> |
34 | #include <asm/byteorder.h> | 35 | #include <asm/byteorder.h> |
@@ -201,23 +202,24 @@ extern struct inet_bind_bucket * | |||
201 | extern void inet_bind_bucket_destroy(struct kmem_cache *cachep, | 202 | extern void inet_bind_bucket_destroy(struct kmem_cache *cachep, |
202 | struct inet_bind_bucket *tb); | 203 | struct inet_bind_bucket *tb); |
203 | 204 | ||
204 | static inline int inet_bhashfn(const __u16 lport, const int bhash_size) | 205 | static inline int inet_bhashfn(struct net *net, |
206 | const __u16 lport, const int bhash_size) | ||
205 | { | 207 | { |
206 | return lport & (bhash_size - 1); | 208 | return (lport + net_hash_mix(net)) & (bhash_size - 1); |
207 | } | 209 | } |
208 | 210 | ||
209 | extern void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, | 211 | extern void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, |
210 | const unsigned short snum); | 212 | const unsigned short snum); |
211 | 213 | ||
212 | /* These can have wildcards, don't try too hard. */ | 214 | /* These can have wildcards, don't try too hard. */ |
213 | static inline int inet_lhashfn(const unsigned short num) | 215 | static inline int inet_lhashfn(struct net *net, const unsigned short num) |
214 | { | 216 | { |
215 | return num & (INET_LHTABLE_SIZE - 1); | 217 | return (num + net_hash_mix(net)) & (INET_LHTABLE_SIZE - 1); |
216 | } | 218 | } |
217 | 219 | ||
218 | static inline int inet_sk_listen_hashfn(const struct sock *sk) | 220 | static inline int inet_sk_listen_hashfn(const struct sock *sk) |
219 | { | 221 | { |
220 | return inet_lhashfn(inet_sk(sk)->num); | 222 | return inet_lhashfn(sock_net(sk), inet_sk(sk)->num); |
221 | } | 223 | } |
222 | 224 | ||
223 | /* Caller must disable local BH processing. */ | 225 | /* Caller must disable local BH processing. */ |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index a42cd63d241a..643e26be058e 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <net/sock.h> | 25 | #include <net/sock.h> |
26 | #include <net/request_sock.h> | 26 | #include <net/request_sock.h> |
27 | #include <net/route.h> | 27 | #include <net/route.h> |
28 | #include <net/netns/hash.h> | ||
28 | 29 | ||
29 | /** struct ip_options - IP Options | 30 | /** struct ip_options - IP Options |
30 | * | 31 | * |
@@ -171,13 +172,14 @@ extern int inet_sk_rebuild_header(struct sock *sk); | |||
171 | extern u32 inet_ehash_secret; | 172 | extern u32 inet_ehash_secret; |
172 | extern void build_ehash_secret(void); | 173 | extern void build_ehash_secret(void); |
173 | 174 | ||
174 | static inline unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport, | 175 | static inline unsigned int inet_ehashfn(struct net *net, |
176 | const __be32 laddr, const __u16 lport, | ||
175 | const __be32 faddr, const __be16 fport) | 177 | const __be32 faddr, const __be16 fport) |
176 | { | 178 | { |
177 | return jhash_3words((__force __u32) laddr, | 179 | return jhash_3words((__force __u32) laddr, |
178 | (__force __u32) faddr, | 180 | (__force __u32) faddr, |
179 | ((__u32) lport) << 16 | (__force __u32)fport, | 181 | ((__u32) lport) << 16 | (__force __u32)fport, |
180 | inet_ehash_secret); | 182 | inet_ehash_secret + net_hash_mix(net)); |
181 | } | 183 | } |
182 | 184 | ||
183 | static inline int inet_sk_ehashfn(const struct sock *sk) | 185 | static inline int inet_sk_ehashfn(const struct sock *sk) |
@@ -187,8 +189,9 @@ static inline int inet_sk_ehashfn(const struct sock *sk) | |||
187 | const __u16 lport = inet->num; | 189 | const __u16 lport = inet->num; |
188 | const __be32 faddr = inet->daddr; | 190 | const __be32 faddr = inet->daddr; |
189 | const __be16 fport = inet->dport; | 191 | const __be16 fport = inet->dport; |
192 | struct net *net = sock_net(sk); | ||
190 | 193 | ||
191 | return inet_ehashfn(laddr, lport, faddr, fport); | 194 | return inet_ehashfn(net, laddr, lport, faddr, fport); |
192 | } | 195 | } |
193 | 196 | ||
194 | 197 | ||
@@ -197,4 +200,14 @@ static inline int inet_iif(const struct sk_buff *skb) | |||
197 | return skb->rtable->rt_iif; | 200 | return skb->rtable->rt_iif; |
198 | } | 201 | } |
199 | 202 | ||
203 | static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops) | ||
204 | { | ||
205 | struct request_sock *req = reqsk_alloc(ops); | ||
206 | |||
207 | if (req != NULL) | ||
208 | inet_rsk(req)->opt = NULL; | ||
209 | |||
210 | return req; | ||
211 | } | ||
212 | |||
200 | #endif /* _INET_SOCK_H */ | 213 | #endif /* _INET_SOCK_H */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 1196de85f8db..7ab4ff6159a2 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1535,7 +1535,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif); | |||
1535 | * | 1535 | * |
1536 | * @skb: the frame | 1536 | * @skb: the frame |
1537 | */ | 1537 | */ |
1538 | int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); | 1538 | unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); |
1539 | 1539 | ||
1540 | /** | 1540 | /** |
1541 | * ieee80211_get_hdrlen - get header length from frame control | 1541 | * ieee80211_get_hdrlen - get header length from frame control |
@@ -1548,6 +1548,12 @@ int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); | |||
1548 | int ieee80211_get_hdrlen(u16 fc); | 1548 | int ieee80211_get_hdrlen(u16 fc); |
1549 | 1549 | ||
1550 | /** | 1550 | /** |
1551 | * ieee80211_hdrlen - get header length in bytes from frame control | ||
1552 | * @fc: frame control field in little-endian format | ||
1553 | */ | ||
1554 | unsigned int ieee80211_hdrlen(__le16 fc); | ||
1555 | |||
1556 | /** | ||
1551 | * ieee80211_get_tkip_key - get a TKIP rc4 for skb | 1557 | * ieee80211_get_tkip_key - get a TKIP rc4 for skb |
1552 | * | 1558 | * |
1553 | * This function computes a TKIP rc4 key for an skb. It computes | 1559 | * This function computes a TKIP rc4 key for an skb. It computes |
diff --git a/include/net/netns/hash.h b/include/net/netns/hash.h new file mode 100644 index 000000000000..548d78f2cc47 --- /dev/null +++ b/include/net/netns/hash.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef __NET_NS_HASH_H__ | ||
2 | #define __NET_NS_HASH_H__ | ||
3 | |||
4 | #include <asm/cache.h> | ||
5 | |||
6 | struct net; | ||
7 | |||
8 | static inline unsigned net_hash_mix(struct net *net) | ||
9 | { | ||
10 | #ifdef CONFIG_NET_NS | ||
11 | /* | ||
12 | * shift this right to eliminate bits, that are | ||
13 | * always zeroed | ||
14 | */ | ||
15 | |||
16 | return (unsigned)(((unsigned long)net) >> L1_CACHE_SHIFT); | ||
17 | #else | ||
18 | return 0; | ||
19 | #endif | ||
20 | } | ||
21 | #endif | ||
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index b220b5f624de..0c96e7bed5db 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -115,8 +115,8 @@ struct request_sock_queue { | |||
115 | struct request_sock *rskq_accept_head; | 115 | struct request_sock *rskq_accept_head; |
116 | struct request_sock *rskq_accept_tail; | 116 | struct request_sock *rskq_accept_tail; |
117 | rwlock_t syn_wait_lock; | 117 | rwlock_t syn_wait_lock; |
118 | u16 rskq_defer_accept; | 118 | u8 rskq_defer_accept; |
119 | /* 2 bytes hole, try to pack */ | 119 | /* 3 bytes hole, try to pack */ |
120 | struct listen_sock *listen_opt; | 120 | struct listen_sock *listen_opt; |
121 | }; | 121 | }; |
122 | 122 | ||
diff --git a/include/net/rose.h b/include/net/rose.h index e5bb084d8754..cbd5364b2c8a 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -201,7 +201,7 @@ extern void rose_link_device_down(struct net_device *); | |||
201 | extern struct net_device *rose_dev_first(void); | 201 | extern struct net_device *rose_dev_first(void); |
202 | extern struct net_device *rose_dev_get(rose_address *); | 202 | extern struct net_device *rose_dev_get(rose_address *); |
203 | extern struct rose_route *rose_route_free_lci(unsigned int, struct rose_neigh *); | 203 | extern struct rose_route *rose_route_free_lci(unsigned int, struct rose_neigh *); |
204 | extern struct rose_neigh *rose_get_neigh(rose_address *, unsigned char *, unsigned char *); | 204 | extern struct rose_neigh *rose_get_neigh(rose_address *, unsigned char *, unsigned char *, int); |
205 | extern int rose_rt_ioctl(unsigned int, void __user *); | 205 | extern int rose_rt_ioctl(unsigned int, void __user *); |
206 | extern void rose_link_failed(ax25_cb *, int); | 206 | extern void rose_link_failed(ax25_cb *, int); |
207 | extern int rose_route_frame(struct sk_buff *, ax25_cb *); | 207 | extern int rose_route_frame(struct sk_buff *, ax25_cb *); |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 5672d489e924..17b932b8a55a 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -220,8 +220,6 @@ extern struct kmem_cache *sctp_bucket_cachep __read_mostly; | |||
220 | #define sctp_release_sock(sk) release_sock(sk) | 220 | #define sctp_release_sock(sk) release_sock(sk) |
221 | #define sctp_bh_lock_sock(sk) bh_lock_sock(sk) | 221 | #define sctp_bh_lock_sock(sk) bh_lock_sock(sk) |
222 | #define sctp_bh_unlock_sock(sk) bh_unlock_sock(sk) | 222 | #define sctp_bh_unlock_sock(sk) bh_unlock_sock(sk) |
223 | #define SCTP_SOCK_SLEEP_PRE(sk) SOCK_SLEEP_PRE(sk) | ||
224 | #define SCTP_SOCK_SLEEP_POST(sk) SOCK_SLEEP_POST(sk) | ||
225 | 223 | ||
226 | /* SCTP SNMP MIB stats handlers */ | 224 | /* SCTP SNMP MIB stats handlers */ |
227 | DECLARE_SNMP_STAT(struct sctp_mib, sctp_statistics); | 225 | DECLARE_SNMP_STAT(struct sctp_mib, sctp_statistics); |
diff --git a/include/net/sock.h b/include/net/sock.h index dc42b44c2aa1..83f74b11d09a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -524,7 +524,7 @@ struct proto { | |||
524 | int (*ioctl)(struct sock *sk, int cmd, | 524 | int (*ioctl)(struct sock *sk, int cmd, |
525 | unsigned long arg); | 525 | unsigned long arg); |
526 | int (*init)(struct sock *sk); | 526 | int (*init)(struct sock *sk); |
527 | int (*destroy)(struct sock *sk); | 527 | void (*destroy)(struct sock *sk); |
528 | void (*shutdown)(struct sock *sk, int how); | 528 | void (*shutdown)(struct sock *sk, int how); |
529 | int (*setsockopt)(struct sock *sk, int level, | 529 | int (*setsockopt)(struct sock *sk, int level, |
530 | int optname, char __user *optval, | 530 | int optname, char __user *optval, |
@@ -1331,30 +1331,6 @@ extern int net_msg_warn; | |||
1331 | #define LIMIT_NETDEBUG(fmt, args...) \ | 1331 | #define LIMIT_NETDEBUG(fmt, args...) \ |
1332 | do { if (net_msg_warn && net_ratelimit()) printk(fmt,##args); } while(0) | 1332 | do { if (net_msg_warn && net_ratelimit()) printk(fmt,##args); } while(0) |
1333 | 1333 | ||
1334 | /* | ||
1335 | * Macros for sleeping on a socket. Use them like this: | ||
1336 | * | ||
1337 | * SOCK_SLEEP_PRE(sk) | ||
1338 | * if (condition) | ||
1339 | * schedule(); | ||
1340 | * SOCK_SLEEP_POST(sk) | ||
1341 | * | ||
1342 | * N.B. These are now obsolete and were, afaik, only ever used in DECnet | ||
1343 | * and when the last use of them in DECnet has gone, I'm intending to | ||
1344 | * remove them. | ||
1345 | */ | ||
1346 | |||
1347 | #define SOCK_SLEEP_PRE(sk) { struct task_struct *tsk = current; \ | ||
1348 | DECLARE_WAITQUEUE(wait, tsk); \ | ||
1349 | tsk->state = TASK_INTERRUPTIBLE; \ | ||
1350 | add_wait_queue((sk)->sk_sleep, &wait); \ | ||
1351 | release_sock(sk); | ||
1352 | |||
1353 | #define SOCK_SLEEP_POST(sk) tsk->state = TASK_RUNNING; \ | ||
1354 | remove_wait_queue((sk)->sk_sleep, &wait); \ | ||
1355 | lock_sock(sk); \ | ||
1356 | } | ||
1357 | |||
1358 | extern __u32 sysctl_wmem_max; | 1334 | extern __u32 sysctl_wmem_max; |
1359 | extern __u32 sysctl_rmem_max; | 1335 | extern __u32 sysctl_rmem_max; |
1360 | 1336 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 633147cb6bbc..6b827cc6c52f 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -139,7 +139,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
139 | #define MAX_TCP_KEEPINTVL 32767 | 139 | #define MAX_TCP_KEEPINTVL 32767 |
140 | #define MAX_TCP_KEEPCNT 127 | 140 | #define MAX_TCP_KEEPCNT 127 |
141 | #define MAX_TCP_SYNCNT 127 | 141 | #define MAX_TCP_SYNCNT 127 |
142 | #define MAX_TCP_ACCEPT_DEFERRED 65535 | ||
143 | 142 | ||
144 | #define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */ | 143 | #define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */ |
145 | 144 | ||
@@ -399,6 +398,8 @@ extern void tcp_parse_options(struct sk_buff *skb, | |||
399 | struct tcp_options_received *opt_rx, | 398 | struct tcp_options_received *opt_rx, |
400 | int estab); | 399 | int estab); |
401 | 400 | ||
401 | extern u8 *tcp_parse_md5sig_option(struct tcphdr *th); | ||
402 | |||
402 | /* | 403 | /* |
403 | * TCP v4 functions exported for the inet6 API | 404 | * TCP v4 functions exported for the inet6 API |
404 | */ | 405 | */ |
@@ -433,7 +434,6 @@ extern struct sk_buff * tcp_make_synack(struct sock *sk, | |||
433 | 434 | ||
434 | extern int tcp_disconnect(struct sock *sk, int flags); | 435 | extern int tcp_disconnect(struct sock *sk, int flags); |
435 | 436 | ||
436 | extern void tcp_unhash(struct sock *sk); | ||
437 | 437 | ||
438 | /* From syncookies.c */ | 438 | /* From syncookies.c */ |
439 | extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; | 439 | extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; |
@@ -1115,13 +1115,19 @@ struct tcp_md5sig_pool { | |||
1115 | #define TCP_MD5SIG_MAXKEYS (~(u32)0) /* really?! */ | 1115 | #define TCP_MD5SIG_MAXKEYS (~(u32)0) /* really?! */ |
1116 | 1116 | ||
1117 | /* - functions */ | 1117 | /* - functions */ |
1118 | extern int tcp_calc_md5_hash(char *md5_hash, | ||
1119 | struct tcp_md5sig_key *key, | ||
1120 | int bplen, | ||
1121 | struct tcphdr *th, | ||
1122 | unsigned int tcplen, | ||
1123 | struct tcp_md5sig_pool *hp); | ||
1124 | |||
1118 | extern int tcp_v4_calc_md5_hash(char *md5_hash, | 1125 | extern int tcp_v4_calc_md5_hash(char *md5_hash, |
1119 | struct tcp_md5sig_key *key, | 1126 | struct tcp_md5sig_key *key, |
1120 | struct sock *sk, | 1127 | struct sock *sk, |
1121 | struct dst_entry *dst, | 1128 | struct dst_entry *dst, |
1122 | struct request_sock *req, | 1129 | struct request_sock *req, |
1123 | struct tcphdr *th, | 1130 | struct tcphdr *th, |
1124 | int protocol, | ||
1125 | unsigned int tcplen); | 1131 | unsigned int tcplen); |
1126 | extern struct tcp_md5sig_key *tcp_v4_md5_lookup(struct sock *sk, | 1132 | extern struct tcp_md5sig_key *tcp_v4_md5_lookup(struct sock *sk, |
1127 | struct sock *addr_sk); | 1133 | struct sock *addr_sk); |
@@ -1134,6 +1140,16 @@ extern int tcp_v4_md5_do_add(struct sock *sk, | |||
1134 | extern int tcp_v4_md5_do_del(struct sock *sk, | 1140 | extern int tcp_v4_md5_do_del(struct sock *sk, |
1135 | __be32 addr); | 1141 | __be32 addr); |
1136 | 1142 | ||
1143 | #ifdef CONFIG_TCP_MD5SIG | ||
1144 | #define tcp_twsk_md5_key(twsk) ((twsk)->tw_md5_keylen ? \ | ||
1145 | &(struct tcp_md5sig_key) { \ | ||
1146 | .key = (twsk)->tw_md5_key, \ | ||
1147 | .keylen = (twsk)->tw_md5_keylen, \ | ||
1148 | } : NULL) | ||
1149 | #else | ||
1150 | #define tcp_twsk_md5_key(twsk) NULL | ||
1151 | #endif | ||
1152 | |||
1137 | extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(void); | 1153 | extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(void); |
1138 | extern void tcp_free_md5sig_pool(void); | 1154 | extern void tcp_free_md5sig_pool(void); |
1139 | 1155 | ||
@@ -1350,7 +1366,7 @@ extern void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo); | |||
1350 | extern struct request_sock_ops tcp_request_sock_ops; | 1366 | extern struct request_sock_ops tcp_request_sock_ops; |
1351 | extern struct request_sock_ops tcp6_request_sock_ops; | 1367 | extern struct request_sock_ops tcp6_request_sock_ops; |
1352 | 1368 | ||
1353 | extern int tcp_v4_destroy_sock(struct sock *sk); | 1369 | extern void tcp_v4_destroy_sock(struct sock *sk); |
1354 | 1370 | ||
1355 | extern int tcp_v4_gso_send_check(struct sk_buff *skb); | 1371 | extern int tcp_v4_gso_send_check(struct sk_buff *skb); |
1356 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); | 1372 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); |
@@ -1371,7 +1387,6 @@ struct tcp_sock_af_ops { | |||
1371 | struct dst_entry *dst, | 1387 | struct dst_entry *dst, |
1372 | struct request_sock *req, | 1388 | struct request_sock *req, |
1373 | struct tcphdr *th, | 1389 | struct tcphdr *th, |
1374 | int protocol, | ||
1375 | unsigned int len); | 1390 | unsigned int len); |
1376 | int (*md5_add) (struct sock *sk, | 1391 | int (*md5_add) (struct sock *sk, |
1377 | struct sock *addr_sk, | 1392 | struct sock *addr_sk, |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index 112934a3288d..876b6f2bb4fd 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -53,7 +53,7 @@ extern int datagram_send_ctl(struct net *net, | |||
53 | */ | 53 | */ |
54 | extern struct inet_connection_sock_af_ops ipv4_specific; | 54 | extern struct inet_connection_sock_af_ops ipv4_specific; |
55 | 55 | ||
56 | extern int inet6_destroy_sock(struct sock *sk); | 56 | extern void inet6_destroy_sock(struct sock *sk); |
57 | 57 | ||
58 | #endif | 58 | #endif |
59 | 59 | ||
diff --git a/include/net/udp.h b/include/net/udp.h index ccce83707046..7a8684855245 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -196,8 +196,8 @@ struct udp_seq_afinfo { | |||
196 | struct udp_iter_state { | 196 | struct udp_iter_state { |
197 | struct seq_net_private p; | 197 | struct seq_net_private p; |
198 | sa_family_t family; | 198 | sa_family_t family; |
199 | struct hlist_head *hashtable; | ||
200 | int bucket; | 199 | int bucket; |
200 | struct hlist_head *hashtable; | ||
201 | }; | 201 | }; |
202 | 202 | ||
203 | #ifdef CONFIG_PROC_FS | 203 | #ifdef CONFIG_PROC_FS |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 911a661b7278..31d30b1852e8 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -105,7 +105,6 @@ enum ib_device_cap_flags { | |||
105 | */ | 105 | */ |
106 | IB_DEVICE_UD_IP_CSUM = (1<<18), | 106 | IB_DEVICE_UD_IP_CSUM = (1<<18), |
107 | IB_DEVICE_UD_TSO = (1<<19), | 107 | IB_DEVICE_UD_TSO = (1<<19), |
108 | IB_DEVICE_SEND_W_INV = (1<<21), | ||
109 | }; | 108 | }; |
110 | 109 | ||
111 | enum ib_atomic_cap { | 110 | enum ib_atomic_cap { |
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index 049edc5e6461..9c309daf492b 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h | |||
@@ -505,6 +505,7 @@ struct snd_ac97 { | |||
505 | unsigned short pcmreg[3]; // PCM registers | 505 | unsigned short pcmreg[3]; // PCM registers |
506 | unsigned short codec_cfg[3]; // CODEC_CFG bits | 506 | unsigned short codec_cfg[3]; // CODEC_CFG bits |
507 | unsigned char swap_mic_linein; // AD1986/AD1986A only | 507 | unsigned char swap_mic_linein; // AD1986/AD1986A only |
508 | unsigned char lo_as_master; /* LO as master */ | ||
508 | } ad18xx; | 509 | } ad18xx; |
509 | unsigned int dev_flags; /* device specific */ | 510 | unsigned int dev_flags; /* device specific */ |
510 | } spec; | 511 | } spec; |