diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-05-20 00:03:38 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-05-20 00:03:38 -0400 |
commit | badc48e6605ddeeb2484afae5993c859494decaa (patch) | |
tree | 7da638f9bb53b1812b71e40ad6deca91d59ad301 /include | |
parent | 753a6c4ff4c371a3e4e3408aaba4d03f3cfde73a (diff) | |
parent | 2f880b65fdbc2d4915bddc59d75a176329570fdd (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'include')
48 files changed, 320 insertions, 96 deletions
diff --git a/include/asm-arm/arch-aaec2000/debug-macro.S b/include/asm-arm/arch-aaec2000/debug-macro.S index e4f1fa539a74..7b1fce021d8a 100644 --- a/include/asm-arm/arch-aaec2000/debug-macro.S +++ b/include/asm-arm/arch-aaec2000/debug-macro.S | |||
@@ -9,6 +9,7 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "hardware.h" | ||
12 | .macro addruart,rx | 13 | .macro addruart,rx |
13 | mrc p15, 0, \rx, c1, c0 | 14 | mrc p15, 0, \rx, c1, c0 |
14 | tst \rx, #1 @ MMU enabled? | 15 | tst \rx, #1 @ MMU enabled? |
diff --git a/include/asm-arm/arch-aaec2000/entry-macro.S b/include/asm-arm/arch-aaec2000/entry-macro.S index df31313ab07e..1eb3503bd16e 100644 --- a/include/asm-arm/arch-aaec2000/entry-macro.S +++ b/include/asm-arm/arch-aaec2000/entry-macro.S | |||
@@ -10,6 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | #include <asm/arch/irqs.h> | ||
13 | 14 | ||
14 | .macro disable_fiq | 15 | .macro disable_fiq |
15 | .endm | 16 | .endm |
diff --git a/include/asm-arm/arch-imx/debug-macro.S b/include/asm-arm/arch-imx/debug-macro.S index 83f552f7bcc1..c611871643a2 100644 --- a/include/asm-arm/arch-imx/debug-macro.S +++ b/include/asm-arm/arch-imx/debug-macro.S | |||
@@ -16,7 +16,7 @@ | |||
16 | tst \rx, #1 @ MMU enabled? | 16 | tst \rx, #1 @ MMU enabled? |
17 | moveq \rx, #0x00000000 @ physical | 17 | moveq \rx, #0x00000000 @ physical |
18 | movne \rx, #0xe0000000 @ virtual | 18 | movne \rx, #0xe0000000 @ virtual |
19 | orr \rx, \rx, #0x00200000 | 19 | orreq \rx, \rx, #0x00200000 @ physical |
20 | orr \rx, \rx, #0x00006000 @ UART1 offset | 20 | orr \rx, \rx, #0x00006000 @ UART1 offset |
21 | .endm | 21 | .endm |
22 | 22 | ||
diff --git a/include/asm-arm/arch-imx/imx-uart.h b/include/asm-arm/arch-imx/imx-uart.h new file mode 100644 index 000000000000..3a685e1780ea --- /dev/null +++ b/include/asm-arm/arch-imx/imx-uart.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef ASMARM_ARCH_UART_H | ||
2 | #define ASMARM_ARCH_UART_H | ||
3 | |||
4 | #define IMXUART_HAVE_RTSCTS (1<<0) | ||
5 | |||
6 | struct imxuart_platform_data { | ||
7 | unsigned int flags; | ||
8 | }; | ||
9 | |||
10 | #endif | ||
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index 942b622455bc..b59520e56fc7 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
@@ -260,6 +260,12 @@ out: | |||
260 | 260 | ||
261 | #endif | 261 | #endif |
262 | 262 | ||
263 | #ifndef CONFIG_PCI | ||
264 | |||
265 | #define __io(v) v | ||
266 | |||
267 | #else | ||
268 | |||
263 | /* | 269 | /* |
264 | * IXP4xx does not have a transparent cpu -> PCI I/O translation | 270 | * IXP4xx does not have a transparent cpu -> PCI I/O translation |
265 | * window. Instead, it has a set of registers that must be tweaked | 271 | * window. Instead, it has a set of registers that must be tweaked |
@@ -578,6 +584,7 @@ __ixp4xx_iowrite32_rep(void __iomem *addr, const void *vaddr, u32 count) | |||
578 | 584 | ||
579 | #define ioport_map(port, nr) ((void __iomem*)(port + PIO_OFFSET)) | 585 | #define ioport_map(port, nr) ((void __iomem*)(port + PIO_OFFSET)) |
580 | #define ioport_unmap(addr) | 586 | #define ioport_unmap(addr) |
587 | #endif // !CONFIG_PCI | ||
581 | 588 | ||
582 | #endif // __ASM_ARM_ARCH_IO_H | 589 | #endif // __ASM_ARM_ARCH_IO_H |
583 | 590 | ||
diff --git a/include/asm-arm/arch-ixp4xx/memory.h b/include/asm-arm/arch-ixp4xx/memory.h index ee211d28a3ef..af9667b57ab3 100644 --- a/include/asm-arm/arch-ixp4xx/memory.h +++ b/include/asm-arm/arch-ixp4xx/memory.h | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #define PHYS_OFFSET UL(0x00000000) | 15 | #define PHYS_OFFSET UL(0x00000000) |
16 | 16 | ||
17 | #ifndef __ASSEMBLY__ | 17 | #if !defined(__ASSEMBLY__) && defined(CONFIG_PCI) |
18 | 18 | ||
19 | void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes); | 19 | void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes); |
20 | 20 | ||
diff --git a/include/asm-arm/arch-pxa/dma.h b/include/asm-arm/arch-pxa/dma.h index 3e88a2a02a0f..a008150abc59 100644 --- a/include/asm-arm/arch-pxa/dma.h +++ b/include/asm-arm/arch-pxa/dma.h | |||
@@ -24,27 +24,29 @@ typedef struct pxa_dma_desc { | |||
24 | volatile u32 dcmd; /* DCMD value for the current transfer */ | 24 | volatile u32 dcmd; /* DCMD value for the current transfer */ |
25 | } pxa_dma_desc; | 25 | } pxa_dma_desc; |
26 | 26 | ||
27 | typedef enum { | ||
28 | DMA_PRIO_HIGH = 0, | ||
29 | DMA_PRIO_MEDIUM = 1, | ||
30 | DMA_PRIO_LOW = 2 | ||
31 | } pxa_dma_prio; | ||
32 | |||
27 | #if defined(CONFIG_PXA27x) | 33 | #if defined(CONFIG_PXA27x) |
28 | 34 | ||
29 | #define PXA_DMA_CHANNELS 32 | 35 | #define PXA_DMA_CHANNELS 32 |
30 | #define PXA_DMA_NBCH(prio) ((prio == DMA_PRIO_LOW) ? 16 : 8) | ||
31 | 36 | ||
32 | typedef enum { | 37 | #define pxa_for_each_dma_prio(ch, prio) \ |
33 | DMA_PRIO_HIGH = 0, | 38 | for ( \ |
34 | DMA_PRIO_MEDIUM = 8, | 39 | ch = prio * 4; \ |
35 | DMA_PRIO_LOW = 16 | 40 | ch != (4 << prio) + 16; \ |
36 | } pxa_dma_prio; | 41 | ch = (ch + 1 == (4 << prio)) ? (prio * 4 + 16) : (ch + 1) \ |
42 | ) | ||
37 | 43 | ||
38 | #elif defined(CONFIG_PXA25x) | 44 | #elif defined(CONFIG_PXA25x) |
39 | 45 | ||
40 | #define PXA_DMA_CHANNELS 16 | 46 | #define PXA_DMA_CHANNELS 16 |
41 | #define PXA_DMA_NBCH(prio) ((prio == DMA_PRIO_LOW) ? 8 : 4) | ||
42 | 47 | ||
43 | typedef enum { | 48 | #define pxa_for_each_dma_prio(ch, prio) \ |
44 | DMA_PRIO_HIGH = 0, | 49 | for (ch = prio * 4; ch != (4 << prio); ch++) |
45 | DMA_PRIO_MEDIUM = 4, | ||
46 | DMA_PRIO_LOW = 8 | ||
47 | } pxa_dma_prio; | ||
48 | 50 | ||
49 | #endif | 51 | #endif |
50 | 52 | ||
diff --git a/include/asm-arm/arch-pxa/pxa2xx_spi.h b/include/asm-arm/arch-pxa/pxa2xx_spi.h new file mode 100644 index 000000000000..1e70908b816f --- /dev/null +++ b/include/asm-arm/arch-pxa/pxa2xx_spi.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef PXA2XX_SPI_H_ | ||
20 | #define PXA2XX_SPI_H_ | ||
21 | |||
22 | #define PXA2XX_CS_ASSERT (0x01) | ||
23 | #define PXA2XX_CS_DEASSERT (0x02) | ||
24 | |||
25 | #if defined(CONFIG_PXA25x) | ||
26 | #define CLOCK_SPEED_HZ 3686400 | ||
27 | #define SSP1_SerClkDiv(x) (((CLOCK_SPEED_HZ/2/(x+1))<<8)&0x0000ff00) | ||
28 | #define SSP2_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00) | ||
29 | #define SSP3_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00) | ||
30 | #elif defined(CONFIG_PXA27x) | ||
31 | #define CLOCK_SPEED_HZ 13000000 | ||
32 | #define SSP1_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00) | ||
33 | #define SSP2_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00) | ||
34 | #define SSP3_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00) | ||
35 | #endif | ||
36 | |||
37 | #define SSP1_VIRT ((void *)(io_p2v(__PREG(SSCR0_P(1))))) | ||
38 | #define SSP2_VIRT ((void *)(io_p2v(__PREG(SSCR0_P(2))))) | ||
39 | #define SSP3_VIRT ((void *)(io_p2v(__PREG(SSCR0_P(3))))) | ||
40 | |||
41 | enum pxa_ssp_type { | ||
42 | SSP_UNDEFINED = 0, | ||
43 | PXA25x_SSP, /* pxa 210, 250, 255, 26x */ | ||
44 | PXA25x_NSSP, /* pxa 255, 26x (including ASSP) */ | ||
45 | PXA27x_SSP, | ||
46 | }; | ||
47 | |||
48 | /* device.platform_data for SSP controller devices */ | ||
49 | struct pxa2xx_spi_master { | ||
50 | enum pxa_ssp_type ssp_type; | ||
51 | u32 clock_enable; | ||
52 | u16 num_chipselect; | ||
53 | u8 enable_dma; | ||
54 | }; | ||
55 | |||
56 | /* spi_board_info.controller_data for SPI slave devices, | ||
57 | * copied to spi_device.platform_data ... mostly for dma tuning | ||
58 | */ | ||
59 | struct pxa2xx_spi_chip { | ||
60 | u8 tx_threshold; | ||
61 | u8 rx_threshold; | ||
62 | u8 dma_burst_size; | ||
63 | u32 timeout_microsecs; | ||
64 | u8 enable_loopback; | ||
65 | void (*cs_control)(u32 command); | ||
66 | }; | ||
67 | |||
68 | #endif /*PXA2XX_SPI_H_*/ | ||
diff --git a/include/asm-arm/bug.h b/include/asm-arm/bug.h index 7fb02138f585..5ab8216f5204 100644 --- a/include/asm-arm/bug.h +++ b/include/asm-arm/bug.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _ASMARM_BUG_H | 2 | #define _ASMARM_BUG_H |
3 | 3 | ||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <linux/stddef.h> | ||
5 | 6 | ||
6 | #ifdef CONFIG_BUG | 7 | #ifdef CONFIG_BUG |
7 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 8 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
diff --git a/include/asm-arm/procinfo.h b/include/asm-arm/procinfo.h index a9c75b2c314f..842526055225 100644 --- a/include/asm-arm/procinfo.h +++ b/include/asm-arm/procinfo.h | |||
@@ -45,8 +45,6 @@ extern unsigned int elf_hwcap; | |||
45 | 45 | ||
46 | #endif /* __ASSEMBLY__ */ | 46 | #endif /* __ASSEMBLY__ */ |
47 | 47 | ||
48 | #define PROC_INFO_SZ 48 | ||
49 | |||
50 | #define HWCAP_SWP 1 | 48 | #define HWCAP_SWP 1 |
51 | #define HWCAP_HALF 2 | 49 | #define HWCAP_HALF 2 |
52 | #define HWCAP_THUMB 4 | 50 | #define HWCAP_THUMB 4 |
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index 43ad4e55878c..406ca97a8ab2 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h | |||
@@ -142,6 +142,9 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) | |||
142 | : "cc"); | 142 | : "cc"); |
143 | } | 143 | } |
144 | 144 | ||
145 | /* write_can_lock - would write_trylock() succeed? */ | ||
146 | #define __raw_write_can_lock(x) ((x)->lock == 0x80000000) | ||
147 | |||
145 | /* | 148 | /* |
146 | * Read locks are a bit more hairy: | 149 | * Read locks are a bit more hairy: |
147 | * - Exclusively load the lock value. | 150 | * - Exclusively load the lock value. |
@@ -198,4 +201,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) | |||
198 | 201 | ||
199 | #define __raw_read_trylock(lock) generic__raw_read_trylock(lock) | 202 | #define __raw_read_trylock(lock) generic__raw_read_trylock(lock) |
200 | 203 | ||
204 | /* read_can_lock - would read_trylock() succeed? */ | ||
205 | #define __raw_read_can_lock(x) ((x)->lock < 0x80000000) | ||
206 | |||
201 | #endif /* __ASM_SPINLOCK_H */ | 207 | #endif /* __ASM_SPINLOCK_H */ |
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index ee8dfea549bc..cbf39a56dbe7 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -363,7 +363,7 @@ | |||
363 | /* | 363 | /* |
364 | * The following syscalls are obsolete and no longer available for EABI. | 364 | * The following syscalls are obsolete and no longer available for EABI. |
365 | */ | 365 | */ |
366 | #if defined(__ARM_EABI__) | 366 | #if defined(__ARM_EABI__) && !defined(__KERNEL__) |
367 | #undef __NR_time | 367 | #undef __NR_time |
368 | #undef __NR_umount | 368 | #undef __NR_umount |
369 | #undef __NR_stime | 369 | #undef __NR_stime |
@@ -410,7 +410,8 @@ type name(void) { \ | |||
410 | __asm__ __volatile__ ( \ | 410 | __asm__ __volatile__ ( \ |
411 | __syscall(name) \ | 411 | __syscall(name) \ |
412 | : "=r" (__res_r0) \ | 412 | : "=r" (__res_r0) \ |
413 | : __SYS_REG_LIST() ); \ | 413 | : __SYS_REG_LIST() \ |
414 | : "memory" ); \ | ||
414 | __res = __res_r0; \ | 415 | __res = __res_r0; \ |
415 | __syscall_return(type,__res); \ | 416 | __syscall_return(type,__res); \ |
416 | } | 417 | } |
@@ -424,7 +425,8 @@ type name(type1 arg1) { \ | |||
424 | __asm__ __volatile__ ( \ | 425 | __asm__ __volatile__ ( \ |
425 | __syscall(name) \ | 426 | __syscall(name) \ |
426 | : "=r" (__res_r0) \ | 427 | : "=r" (__res_r0) \ |
427 | : __SYS_REG_LIST( "0" (__r0) ) ); \ | 428 | : __SYS_REG_LIST( "0" (__r0) ) \ |
429 | : "memory" ); \ | ||
428 | __res = __res_r0; \ | 430 | __res = __res_r0; \ |
429 | __syscall_return(type,__res); \ | 431 | __syscall_return(type,__res); \ |
430 | } | 432 | } |
@@ -439,7 +441,8 @@ type name(type1 arg1,type2 arg2) { \ | |||
439 | __asm__ __volatile__ ( \ | 441 | __asm__ __volatile__ ( \ |
440 | __syscall(name) \ | 442 | __syscall(name) \ |
441 | : "=r" (__res_r0) \ | 443 | : "=r" (__res_r0) \ |
442 | : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) ); \ | 444 | : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \ |
445 | : "memory" ); \ | ||
443 | __res = __res_r0; \ | 446 | __res = __res_r0; \ |
444 | __syscall_return(type,__res); \ | 447 | __syscall_return(type,__res); \ |
445 | } | 448 | } |
@@ -456,7 +459,8 @@ type name(type1 arg1,type2 arg2,type3 arg3) { \ | |||
456 | __asm__ __volatile__ ( \ | 459 | __asm__ __volatile__ ( \ |
457 | __syscall(name) \ | 460 | __syscall(name) \ |
458 | : "=r" (__res_r0) \ | 461 | : "=r" (__res_r0) \ |
459 | : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) ); \ | 462 | : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \ |
463 | : "memory" ); \ | ||
460 | __res = __res_r0; \ | 464 | __res = __res_r0; \ |
461 | __syscall_return(type,__res); \ | 465 | __syscall_return(type,__res); \ |
462 | } | 466 | } |
@@ -474,7 +478,8 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ | |||
474 | __asm__ __volatile__ ( \ | 478 | __asm__ __volatile__ ( \ |
475 | __syscall(name) \ | 479 | __syscall(name) \ |
476 | : "=r" (__res_r0) \ | 480 | : "=r" (__res_r0) \ |
477 | : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) ); \ | 481 | : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \ |
482 | : "memory" ); \ | ||
478 | __res = __res_r0; \ | 483 | __res = __res_r0; \ |
479 | __syscall_return(type,__res); \ | 484 | __syscall_return(type,__res); \ |
480 | } | 485 | } |
@@ -494,7 +499,8 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) { \ | |||
494 | __syscall(name) \ | 499 | __syscall(name) \ |
495 | : "=r" (__res_r0) \ | 500 | : "=r" (__res_r0) \ |
496 | : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ | 501 | : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ |
497 | "r" (__r3), "r" (__r4) ) ); \ | 502 | "r" (__r3), "r" (__r4) ) \ |
503 | : "memory" ); \ | ||
498 | __res = __res_r0; \ | 504 | __res = __res_r0; \ |
499 | __syscall_return(type,__res); \ | 505 | __syscall_return(type,__res); \ |
500 | } | 506 | } |
@@ -514,7 +520,8 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 | |||
514 | __syscall(name) \ | 520 | __syscall(name) \ |
515 | : "=r" (__res_r0) \ | 521 | : "=r" (__res_r0) \ |
516 | : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ | 522 | : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ |
517 | "r" (__r3), "r" (__r4), "r" (__r5) ) ); \ | 523 | "r" (__r3), "r" (__r4), "r" (__r5) ) \ |
524 | : "memory" ); \ | ||
518 | __res = __res_r0; \ | 525 | __res = __res_r0; \ |
519 | __syscall_return(type,__res); \ | 526 | __syscall_return(type,__res); \ |
520 | } | 527 | } |
diff --git a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h index 51c4e5fe6062..d92e253f7f6f 100644 --- a/include/asm-i386/io_apic.h +++ b/include/asm-i386/io_apic.h | |||
@@ -200,6 +200,7 @@ extern int io_apic_get_unique_id (int ioapic, int apic_id); | |||
200 | extern int io_apic_get_version (int ioapic); | 200 | extern int io_apic_get_version (int ioapic); |
201 | extern int io_apic_get_redir_entries (int ioapic); | 201 | extern int io_apic_get_redir_entries (int ioapic); |
202 | extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low); | 202 | extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low); |
203 | extern int timer_uses_ioapic_pin_0; | ||
203 | #endif /* CONFIG_ACPI */ | 204 | #endif /* CONFIG_ACPI */ |
204 | 205 | ||
205 | extern int (*ioapic_renumber_irq)(int ioapic, int irq); | 206 | extern int (*ioapic_renumber_irq)(int ioapic, int irq); |
diff --git a/include/asm-ia64/bitops.h b/include/asm-ia64/bitops.h index 90921e162793..6cc517e212a9 100644 --- a/include/asm-ia64/bitops.h +++ b/include/asm-ia64/bitops.h | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #include <linux/compiler.h> | 12 | #include <linux/compiler.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <asm/bitops.h> | ||
15 | #include <asm/intrinsics.h> | 14 | #include <asm/intrinsics.h> |
16 | 15 | ||
17 | /** | 16 | /** |
diff --git a/include/asm-powerpc/uaccess.h b/include/asm-powerpc/uaccess.h index 3872e924cdd6..d83fc29c2bbf 100644 --- a/include/asm-powerpc/uaccess.h +++ b/include/asm-powerpc/uaccess.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <asm/processor.h> | 9 | #include <asm/processor.h> |
10 | #include <asm/page.h> | ||
10 | 11 | ||
11 | #define VERIFY_READ 0 | 12 | #define VERIFY_READ 0 |
12 | #define VERIFY_WRITE 1 | 13 | #define VERIFY_WRITE 1 |
@@ -179,9 +180,11 @@ do { \ | |||
179 | #define __put_user_nocheck(x, ptr, size) \ | 180 | #define __put_user_nocheck(x, ptr, size) \ |
180 | ({ \ | 181 | ({ \ |
181 | long __pu_err; \ | 182 | long __pu_err; \ |
182 | might_sleep(); \ | 183 | __typeof__(*(ptr)) __user *__pu_addr = (ptr); \ |
184 | if (!is_kernel_addr((unsigned long)__pu_addr)) \ | ||
185 | might_sleep(); \ | ||
183 | __chk_user_ptr(ptr); \ | 186 | __chk_user_ptr(ptr); \ |
184 | __put_user_size((x), (ptr), (size), __pu_err); \ | 187 | __put_user_size((x), __pu_addr, (size), __pu_err); \ |
185 | __pu_err; \ | 188 | __pu_err; \ |
186 | }) | 189 | }) |
187 | 190 | ||
@@ -258,9 +261,11 @@ do { \ | |||
258 | ({ \ | 261 | ({ \ |
259 | long __gu_err; \ | 262 | long __gu_err; \ |
260 | unsigned long __gu_val; \ | 263 | unsigned long __gu_val; \ |
264 | const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ | ||
261 | __chk_user_ptr(ptr); \ | 265 | __chk_user_ptr(ptr); \ |
262 | might_sleep(); \ | 266 | if (!is_kernel_addr((unsigned long)__gu_addr)) \ |
263 | __get_user_size(__gu_val, (ptr), (size), __gu_err); \ | 267 | might_sleep(); \ |
268 | __get_user_size(__gu_val, __gu_addr, (size), __gu_err); \ | ||
264 | (x) = (__typeof__(*(ptr)))__gu_val; \ | 269 | (x) = (__typeof__(*(ptr)))__gu_val; \ |
265 | __gu_err; \ | 270 | __gu_err; \ |
266 | }) | 271 | }) |
@@ -270,9 +275,11 @@ do { \ | |||
270 | ({ \ | 275 | ({ \ |
271 | long __gu_err; \ | 276 | long __gu_err; \ |
272 | long long __gu_val; \ | 277 | long long __gu_val; \ |
278 | const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ | ||
273 | __chk_user_ptr(ptr); \ | 279 | __chk_user_ptr(ptr); \ |
274 | might_sleep(); \ | 280 | if (!is_kernel_addr((unsigned long)__gu_addr)) \ |
275 | __get_user_size(__gu_val, (ptr), (size), __gu_err); \ | 281 | might_sleep(); \ |
282 | __get_user_size(__gu_val, __gu_addr, (size), __gu_err); \ | ||
276 | (x) = (__typeof__(*(ptr)))__gu_val; \ | 283 | (x) = (__typeof__(*(ptr)))__gu_val; \ |
277 | __gu_err; \ | 284 | __gu_err; \ |
278 | }) | 285 | }) |
diff --git a/include/asm-ppc/commproc.h b/include/asm-ppc/commproc.h index 973e60908234..31f362966a58 100644 --- a/include/asm-ppc/commproc.h +++ b/include/asm-ppc/commproc.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #define CPM_CR_INIT_TX ((ushort)0x0002) | 35 | #define CPM_CR_INIT_TX ((ushort)0x0002) |
36 | #define CPM_CR_HUNT_MODE ((ushort)0x0003) | 36 | #define CPM_CR_HUNT_MODE ((ushort)0x0003) |
37 | #define CPM_CR_STOP_TX ((ushort)0x0004) | 37 | #define CPM_CR_STOP_TX ((ushort)0x0004) |
38 | #define CPM_CR_GRA_STOP_TX ((ushort)0x0005) | ||
38 | #define CPM_CR_RESTART_TX ((ushort)0x0006) | 39 | #define CPM_CR_RESTART_TX ((ushort)0x0006) |
39 | #define CPM_CR_CLOSE_RX_BD ((ushort)0x0007) | 40 | #define CPM_CR_CLOSE_RX_BD ((ushort)0x0007) |
40 | #define CPM_CR_SET_GADDR ((ushort)0x0008) | 41 | #define CPM_CR_SET_GADDR ((ushort)0x0008) |
diff --git a/include/asm-ppc/cpm2.h b/include/asm-ppc/cpm2.h index b638b87cebe3..c70344b91049 100644 --- a/include/asm-ppc/cpm2.h +++ b/include/asm-ppc/cpm2.h | |||
@@ -69,7 +69,7 @@ | |||
69 | #define CPM_CR_INIT_TX ((ushort)0x0002) | 69 | #define CPM_CR_INIT_TX ((ushort)0x0002) |
70 | #define CPM_CR_HUNT_MODE ((ushort)0x0003) | 70 | #define CPM_CR_HUNT_MODE ((ushort)0x0003) |
71 | #define CPM_CR_STOP_TX ((ushort)0x0004) | 71 | #define CPM_CR_STOP_TX ((ushort)0x0004) |
72 | #define CPM_CR_GRA_STOP_TX ((ushort)0x0005) | 72 | #define CPM_CR_GRA_STOP_TX ((ushort)0x0005) |
73 | #define CPM_CR_RESTART_TX ((ushort)0x0006) | 73 | #define CPM_CR_RESTART_TX ((ushort)0x0006) |
74 | #define CPM_CR_SET_GADDR ((ushort)0x0008) | 74 | #define CPM_CR_SET_GADDR ((ushort)0x0008) |
75 | #define CPM_CR_START_IDMA ((ushort)0x0009) | 75 | #define CPM_CR_START_IDMA ((ushort)0x0009) |
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h index a70ba2ee552d..0fb68a0b0181 100644 --- a/include/asm-ppc/page.h +++ b/include/asm-ppc/page.h | |||
@@ -20,6 +20,7 @@ | |||
20 | /* This must match what is in arch/ppc/Makefile */ | 20 | /* This must match what is in arch/ppc/Makefile */ |
21 | #define PAGE_OFFSET CONFIG_KERNEL_START | 21 | #define PAGE_OFFSET CONFIG_KERNEL_START |
22 | #define KERNELBASE PAGE_OFFSET | 22 | #define KERNELBASE PAGE_OFFSET |
23 | #define is_kernel_addr(x) ((x) >= PAGE_OFFSET) | ||
23 | 24 | ||
24 | #ifndef __ASSEMBLY__ | 25 | #ifndef __ASSEMBLY__ |
25 | 26 | ||
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index 657d582e8149..41c2792ff6b0 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h | |||
@@ -296,8 +296,14 @@ | |||
296 | #define __NR_pselect6 301 | 296 | #define __NR_pselect6 301 |
297 | #define __NR_ppoll 302 | 297 | #define __NR_ppoll 302 |
298 | #define __NR_unshare 303 | 298 | #define __NR_unshare 303 |
299 | #define __NR_set_robust_list 304 | ||
300 | #define __NR_get_robust_list 305 | ||
301 | #define __NR_splice 306 | ||
302 | #define __NR_sync_file_range 307 | ||
303 | #define __NR_tee 308 | ||
304 | #define __NR_vmsplice 309 | ||
299 | 305 | ||
300 | #define NR_syscalls 304 | 306 | #define NR_syscalls 310 |
301 | 307 | ||
302 | /* | 308 | /* |
303 | * There are some system calls that are not present on 64 bit, some | 309 | * There are some system calls that are not present on 64 bit, some |
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 32a48f623e2b..f5611a721fbd 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #define __NR_capset 22 /* Linux Specific */ | 41 | #define __NR_capset 22 /* Linux Specific */ |
42 | #define __NR_setuid 23 /* Implemented via setreuid in SunOS */ | 42 | #define __NR_setuid 23 /* Implemented via setreuid in SunOS */ |
43 | #define __NR_getuid 24 /* Common */ | 43 | #define __NR_getuid 24 /* Common */ |
44 | /* #define __NR_time alias 25 ENOSYS under SunOS */ | 44 | #define __NR_vmsplice 25 /* ENOSYS under SunOS */ |
45 | #define __NR_ptrace 26 /* Common */ | 45 | #define __NR_ptrace 26 /* Common */ |
46 | #define __NR_alarm 27 /* Implemented via setitimer in SunOS */ | 46 | #define __NR_alarm 27 /* Implemented via setitimer in SunOS */ |
47 | #define __NR_sigaltstack 28 /* Common */ | 47 | #define __NR_sigaltstack 28 /* Common */ |
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index ca80e8aca128..68705748bec0 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #define __NR_capset 22 /* Linux Specific */ | 41 | #define __NR_capset 22 /* Linux Specific */ |
42 | #define __NR_setuid 23 /* Implemented via setreuid in SunOS */ | 42 | #define __NR_setuid 23 /* Implemented via setreuid in SunOS */ |
43 | #define __NR_getuid 24 /* Common */ | 43 | #define __NR_getuid 24 /* Common */ |
44 | /* #define __NR_time alias 25 ENOSYS under SunOS */ | 44 | #define __NR_vmsplice 25 /* ENOSYS under SunOS */ |
45 | #define __NR_ptrace 26 /* Common */ | 45 | #define __NR_ptrace 26 /* Common */ |
46 | #define __NR_alarm 27 /* Implemented via setitimer in SunOS */ | 46 | #define __NR_alarm 27 /* Implemented via setitimer in SunOS */ |
47 | #define __NR_sigaltstack 28 /* Common */ | 47 | #define __NR_sigaltstack 28 /* Common */ |
diff --git a/include/asm-x86_64/e820.h b/include/asm-x86_64/e820.h index 93b51df51687..670a3388e70a 100644 --- a/include/asm-x86_64/e820.h +++ b/include/asm-x86_64/e820.h | |||
@@ -59,6 +59,8 @@ extern void __init parse_memopt(char *p, char **end); | |||
59 | extern void __init parse_memmapopt(char *p, char **end); | 59 | extern void __init parse_memmapopt(char *p, char **end); |
60 | 60 | ||
61 | extern struct e820map e820; | 61 | extern struct e820map e820; |
62 | |||
63 | extern unsigned ebda_addr, ebda_size; | ||
62 | #endif/*!__ASSEMBLY__*/ | 64 | #endif/*!__ASSEMBLY__*/ |
63 | 65 | ||
64 | #endif/*__E820_HEADER*/ | 66 | #endif/*__E820_HEADER*/ |
diff --git a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h index ee1bc69aec9c..52484e82c641 100644 --- a/include/asm-x86_64/io_apic.h +++ b/include/asm-x86_64/io_apic.h | |||
@@ -205,6 +205,7 @@ extern int skip_ioapic_setup; | |||
205 | extern int io_apic_get_version (int ioapic); | 205 | extern int io_apic_get_version (int ioapic); |
206 | extern int io_apic_get_redir_entries (int ioapic); | 206 | extern int io_apic_get_redir_entries (int ioapic); |
207 | extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int, int); | 207 | extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int, int); |
208 | extern int timer_uses_ioapic_pin_0; | ||
208 | #endif | 209 | #endif |
209 | 210 | ||
210 | extern int sis_apic_bug; /* dummy */ | 211 | extern int sis_apic_bug; /* dummy */ |
diff --git a/include/linux/device.h b/include/linux/device.h index f6e72a65a3f2..e8e53b9accc6 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -200,6 +200,7 @@ extern int class_device_create_file(struct class_device *, | |||
200 | * @node: for internal use by the driver core only. | 200 | * @node: for internal use by the driver core only. |
201 | * @kobj: for internal use by the driver core only. | 201 | * @kobj: for internal use by the driver core only. |
202 | * @devt_attr: for internal use by the driver core only. | 202 | * @devt_attr: for internal use by the driver core only. |
203 | * @groups: optional additional groups to be created | ||
203 | * @dev: if set, a symlink to the struct device is created in the sysfs | 204 | * @dev: if set, a symlink to the struct device is created in the sysfs |
204 | * directory for this struct class device. | 205 | * directory for this struct class device. |
205 | * @class_data: pointer to whatever you want to store here for this struct | 206 | * @class_data: pointer to whatever you want to store here for this struct |
@@ -228,6 +229,7 @@ struct class_device { | |||
228 | struct device * dev; /* not necessary, but nice to have */ | 229 | struct device * dev; /* not necessary, but nice to have */ |
229 | void * class_data; /* class-specific data */ | 230 | void * class_data; /* class-specific data */ |
230 | struct class_device *parent; /* parent of this child device, if there is one */ | 231 | struct class_device *parent; /* parent of this child device, if there is one */ |
232 | struct attribute_group ** groups; /* optional groups */ | ||
231 | 233 | ||
232 | void (*release)(struct class_device *dev); | 234 | void (*release)(struct class_device *dev); |
233 | int (*uevent)(struct class_device *dev, char **envp, | 235 | int (*uevent)(struct class_device *dev, char **envp, |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index ff61817082fa..635690cf3e3d 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -14,6 +14,7 @@ enum dma_data_direction { | |||
14 | }; | 14 | }; |
15 | 15 | ||
16 | #define DMA_64BIT_MASK 0xffffffffffffffffULL | 16 | #define DMA_64BIT_MASK 0xffffffffffffffffULL |
17 | #define DMA_48BIT_MASK 0x0000ffffffffffffULL | ||
17 | #define DMA_40BIT_MASK 0x000000ffffffffffULL | 18 | #define DMA_40BIT_MASK 0x000000ffffffffffULL |
18 | #define DMA_39BIT_MASK 0x0000007fffffffffULL | 19 | #define DMA_39BIT_MASK 0x0000007fffffffffULL |
19 | #define DMA_32BIT_MASK 0x00000000ffffffffULL | 20 | #define DMA_32BIT_MASK 0x00000000ffffffffULL |
diff --git a/include/linux/fs_uart_pd.h b/include/linux/fs_uart_pd.h new file mode 100644 index 000000000000..f5975126b712 --- /dev/null +++ b/include/linux/fs_uart_pd.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * Platform information definitions for the CPM Uart driver. | ||
3 | * | ||
4 | * 2006 (c) MontaVista Software, Inc. | ||
5 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public License | ||
8 | * version 2. This program is licensed "as is" without any warranty of any | ||
9 | * kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef FS_UART_PD_H | ||
13 | #define FS_UART_PD_H | ||
14 | |||
15 | #include <linux/version.h> | ||
16 | #include <asm/types.h> | ||
17 | |||
18 | enum fs_uart_id { | ||
19 | fsid_smc1_uart, | ||
20 | fsid_smc2_uart, | ||
21 | fsid_scc1_uart, | ||
22 | fsid_scc2_uart, | ||
23 | fsid_scc3_uart, | ||
24 | fsid_scc4_uart, | ||
25 | fs_uart_nr, | ||
26 | }; | ||
27 | |||
28 | static inline int fs_uart_id_scc2fsid(int id) | ||
29 | { | ||
30 | return fsid_scc1_uart + id - 1; | ||
31 | } | ||
32 | |||
33 | static inline int fs_uart_id_fsid2scc(int id) | ||
34 | { | ||
35 | return id - fsid_scc1_uart + 1; | ||
36 | } | ||
37 | |||
38 | static inline int fs_uart_id_smc2fsid(int id) | ||
39 | { | ||
40 | return fsid_smc1_uart + id - 1; | ||
41 | } | ||
42 | |||
43 | static inline int fs_uart_id_fsid2smc(int id) | ||
44 | { | ||
45 | return id - fsid_smc1_uart + 1; | ||
46 | } | ||
47 | |||
48 | struct fs_uart_platform_info { | ||
49 | void(*init_ioports)(void); | ||
50 | /* device specific information */ | ||
51 | int fs_no; /* controller index */ | ||
52 | u32 uart_clk; | ||
53 | u8 tx_num_fifo; | ||
54 | u8 tx_buf_size; | ||
55 | u8 rx_num_fifo; | ||
56 | u8 rx_buf_size; | ||
57 | u8 brg; | ||
58 | }; | ||
59 | |||
60 | #endif | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e1bd0842f6a1..f4fc576ed4c4 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -124,6 +124,7 @@ extern int get_option(char **str, int *pint); | |||
124 | extern char *get_options(const char *str, int nints, int *ints); | 124 | extern char *get_options(const char *str, int nints, int *ints); |
125 | extern unsigned long long memparse(char *ptr, char **retptr); | 125 | extern unsigned long long memparse(char *ptr, char **retptr); |
126 | 126 | ||
127 | extern int core_kernel_text(unsigned long addr); | ||
127 | extern int __kernel_text_address(unsigned long addr); | 128 | extern int __kernel_text_address(unsigned long addr); |
128 | extern int kernel_text_address(unsigned long addr); | 129 | extern int kernel_text_address(unsigned long addr); |
129 | extern int session_of_pgrp(int pgrp); | 130 | extern int session_of_pgrp(int pgrp); |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 30dd978c1ec8..991a37382a22 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -28,6 +28,7 @@ struct mmc_csd { | |||
28 | unsigned short cmdclass; | 28 | unsigned short cmdclass; |
29 | unsigned short tacc_clks; | 29 | unsigned short tacc_clks; |
30 | unsigned int tacc_ns; | 30 | unsigned int tacc_ns; |
31 | unsigned int r2w_factor; | ||
31 | unsigned int max_dtr; | 32 | unsigned int max_dtr; |
32 | unsigned int read_blkbits; | 33 | unsigned int read_blkbits; |
33 | unsigned int write_blkbits; | 34 | unsigned int write_blkbits; |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index bdc556d88498..03a14a30c46a 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -69,6 +69,7 @@ struct mmc_data { | |||
69 | unsigned int timeout_ns; /* data timeout (in ns, max 80ms) */ | 69 | unsigned int timeout_ns; /* data timeout (in ns, max 80ms) */ |
70 | unsigned int timeout_clks; /* data timeout (in clocks) */ | 70 | unsigned int timeout_clks; /* data timeout (in clocks) */ |
71 | unsigned int blksz_bits; /* data block size */ | 71 | unsigned int blksz_bits; /* data block size */ |
72 | unsigned int blksz; /* data block size */ | ||
72 | unsigned int blocks; /* number of blocks */ | 73 | unsigned int blocks; /* number of blocks */ |
73 | unsigned int error; /* data error */ | 74 | unsigned int error; /* data error */ |
74 | unsigned int flags; | 75 | unsigned int flags; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 01db7b88a2b1..f4169bbb60eb 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -433,8 +433,7 @@ struct net_device | |||
433 | 433 | ||
434 | /* register/unregister state machine */ | 434 | /* register/unregister state machine */ |
435 | enum { NETREG_UNINITIALIZED=0, | 435 | enum { NETREG_UNINITIALIZED=0, |
436 | NETREG_REGISTERING, /* called register_netdevice */ | 436 | NETREG_REGISTERED, /* completed register_netdevice */ |
437 | NETREG_REGISTERED, /* completed register todo */ | ||
438 | NETREG_UNREGISTERING, /* called unregister_netdevice */ | 437 | NETREG_UNREGISTERING, /* called unregister_netdevice */ |
439 | NETREG_UNREGISTERED, /* completed unregister todo */ | 438 | NETREG_UNREGISTERED, /* completed unregister todo */ |
440 | NETREG_RELEASED, /* called free_netdev */ | 439 | NETREG_RELEASED, /* called free_netdev */ |
@@ -506,6 +505,8 @@ struct net_device | |||
506 | 505 | ||
507 | /* class/net/name entry */ | 506 | /* class/net/name entry */ |
508 | struct class_device class_dev; | 507 | struct class_device class_dev; |
508 | /* space for optional statistics and wireless sysfs groups */ | ||
509 | struct attribute_group *sysfs_groups[3]; | ||
509 | }; | 510 | }; |
510 | 511 | ||
511 | #define NETDEV_ALIGN 32 | 512 | #define NETDEV_ALIGN 32 |
@@ -829,21 +830,19 @@ static inline void netif_rx_schedule(struct net_device *dev) | |||
829 | __netif_rx_schedule(dev); | 830 | __netif_rx_schedule(dev); |
830 | } | 831 | } |
831 | 832 | ||
832 | 833 | /* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). | |
833 | static inline void __netif_rx_reschedule(struct net_device *dev, int undo) | 834 | * Do not inline this? |
834 | { | 835 | */ |
835 | dev->quota += undo; | ||
836 | list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list); | ||
837 | __raise_softirq_irqoff(NET_RX_SOFTIRQ); | ||
838 | } | ||
839 | |||
840 | /* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). */ | ||
841 | static inline int netif_rx_reschedule(struct net_device *dev, int undo) | 836 | static inline int netif_rx_reschedule(struct net_device *dev, int undo) |
842 | { | 837 | { |
843 | if (netif_rx_schedule_prep(dev)) { | 838 | if (netif_rx_schedule_prep(dev)) { |
844 | unsigned long flags; | 839 | unsigned long flags; |
840 | |||
841 | dev->quota += undo; | ||
842 | |||
845 | local_irq_save(flags); | 843 | local_irq_save(flags); |
846 | __netif_rx_reschedule(dev, undo); | 844 | list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list); |
845 | __raise_softirq_irqoff(NET_RX_SOFTIRQ); | ||
847 | local_irq_restore(flags); | 846 | local_irq_restore(flags); |
848 | return 1; | 847 | return 1; |
849 | } | 848 | } |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h index 0bd828081c0c..c6e9a0b6d30b 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * ip_conntrack_helper_h323_asn1.h - BER and PER decoding library for H.323 | 2 | * ip_conntrack_helper_h323_asn1.h - BER and PER decoding library for H.323 |
3 | * conntrack/NAT module. | 3 | * conntrack/NAT module. |
4 | * | 4 | * |
5 | * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@hotmail.com> | 5 | * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@users.sourceforge.net> |
6 | * | 6 | * |
7 | * This source code is licensed under General Public License version 2. | 7 | * This source code is licensed under General Public License version 2. |
8 | * | 8 | * |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index ba73108cbf8b..ea4f7cd7bfd8 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -5,8 +5,9 @@ | |||
5 | 5 | ||
6 | #define PIPE_BUFFERS (16) | 6 | #define PIPE_BUFFERS (16) |
7 | 7 | ||
8 | #define PIPE_BUF_FLAG_ATOMIC 0x01 /* was atomically mapped */ | 8 | #define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */ |
9 | #define PIPE_BUF_FLAG_GIFT 0x02 /* page is a gift */ | 9 | #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */ |
10 | #define PIPE_BUF_FLAG_GIFT 0x04 /* page is a gift */ | ||
10 | 11 | ||
11 | struct pipe_buffer { | 12 | struct pipe_buffer { |
12 | struct page *page; | 13 | struct page *page; |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 5673008b61e1..970284f571a6 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -132,6 +132,7 @@ static inline void rcu_bh_qsctr_inc(int cpu) | |||
132 | } | 132 | } |
133 | 133 | ||
134 | extern int rcu_pending(int cpu); | 134 | extern int rcu_pending(int cpu); |
135 | extern int rcu_needs_cpu(int cpu); | ||
135 | 136 | ||
136 | /** | 137 | /** |
137 | * rcu_read_lock - mark the beginning of an RCU read-side critical section. | 138 | * rcu_read_lock - mark the beginning of an RCU read-side critical section. |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index c32e60e79dea..bd14858121ea 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -254,6 +254,7 @@ struct uart_port { | |||
254 | #define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) | 254 | #define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) |
255 | #define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) | 255 | #define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) |
256 | #define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) | 256 | #define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) |
257 | #define UPF_DEAD ((__force upf_t) (1 << 30)) | ||
257 | #define UPF_IOREMAP ((__force upf_t) (1 << 31)) | 258 | #define UPF_IOREMAP ((__force upf_t) (1 << 31)) |
258 | 259 | ||
259 | #define UPF_CHANGE_MASK ((__force upf_t) (0x17fff)) | 260 | #define UPF_CHANGE_MASK ((__force upf_t) (0x17fff)) |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 3af03b19c983..2d985d59c7b8 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -150,6 +150,7 @@ static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | |||
150 | 150 | ||
151 | extern void kfree(const void *); | 151 | extern void kfree(const void *); |
152 | extern unsigned int ksize(const void *); | 152 | extern unsigned int ksize(const void *); |
153 | extern int slab_is_available(void); | ||
153 | 154 | ||
154 | #ifdef CONFIG_NUMA | 155 | #ifdef CONFIG_NUMA |
155 | extern void *kmem_cache_alloc_node(kmem_cache_t *, gfp_t flags, int node); | 156 | extern void *kmem_cache_alloc_node(kmem_cache_t *, gfp_t flags, int node); |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index b05f1463a267..e928c0dcc297 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -31,18 +31,23 @@ extern struct bus_type spi_bus_type; | |||
31 | * @master: SPI controller used with the device. | 31 | * @master: SPI controller used with the device. |
32 | * @max_speed_hz: Maximum clock rate to be used with this chip | 32 | * @max_speed_hz: Maximum clock rate to be used with this chip |
33 | * (on this board); may be changed by the device's driver. | 33 | * (on this board); may be changed by the device's driver. |
34 | * The spi_transfer.speed_hz can override this for each transfer. | ||
34 | * @chip-select: Chipselect, distinguishing chips handled by "master". | 35 | * @chip-select: Chipselect, distinguishing chips handled by "master". |
35 | * @mode: The spi mode defines how data is clocked out and in. | 36 | * @mode: The spi mode defines how data is clocked out and in. |
36 | * This may be changed by the device's driver. | 37 | * This may be changed by the device's driver. |
38 | * The "active low" default for chipselect mode can be overridden, | ||
39 | * as can the "MSB first" default for each word in a transfer. | ||
37 | * @bits_per_word: Data transfers involve one or more words; word sizes | 40 | * @bits_per_word: Data transfers involve one or more words; word sizes |
38 | * like eight or 12 bits are common. In-memory wordsizes are | 41 | * like eight or 12 bits are common. In-memory wordsizes are |
39 | * powers of two bytes (e.g. 20 bit samples use 32 bits). | 42 | * powers of two bytes (e.g. 20 bit samples use 32 bits). |
40 | * This may be changed by the device's driver. | 43 | * This may be changed by the device's driver, or left at the |
44 | * default (0) indicating protocol words are eight bit bytes. | ||
45 | * The spi_transfer.bits_per_word can override this for each transfer. | ||
41 | * @irq: Negative, or the number passed to request_irq() to receive | 46 | * @irq: Negative, or the number passed to request_irq() to receive |
42 | * interrupts from this device. | 47 | * interrupts from this device. |
43 | * @controller_state: Controller's runtime state | 48 | * @controller_state: Controller's runtime state |
44 | * @controller_data: Board-specific definitions for controller, such as | 49 | * @controller_data: Board-specific definitions for controller, such as |
45 | * FIFO initialization parameters; from board_info.controller_data | 50 | * FIFO initialization parameters; from board_info.controller_data |
46 | * | 51 | * |
47 | * An spi_device is used to interchange data between an SPI slave | 52 | * An spi_device is used to interchange data between an SPI slave |
48 | * (usually a discrete chip) and CPU memory. | 53 | * (usually a discrete chip) and CPU memory. |
@@ -65,6 +70,7 @@ struct spi_device { | |||
65 | #define SPI_MODE_2 (SPI_CPOL|0) | 70 | #define SPI_MODE_2 (SPI_CPOL|0) |
66 | #define SPI_MODE_3 (SPI_CPOL|SPI_CPHA) | 71 | #define SPI_MODE_3 (SPI_CPOL|SPI_CPHA) |
67 | #define SPI_CS_HIGH 0x04 /* chipselect active high? */ | 72 | #define SPI_CS_HIGH 0x04 /* chipselect active high? */ |
73 | #define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */ | ||
68 | u8 bits_per_word; | 74 | u8 bits_per_word; |
69 | int irq; | 75 | int irq; |
70 | void *controller_state; | 76 | void *controller_state; |
@@ -73,7 +79,6 @@ struct spi_device { | |||
73 | 79 | ||
74 | // likely need more hooks for more protocol options affecting how | 80 | // likely need more hooks for more protocol options affecting how |
75 | // the controller talks to each chip, like: | 81 | // the controller talks to each chip, like: |
76 | // - bit order (default is wordwise msb-first) | ||
77 | // - memory packing (12 bit samples into low bits, others zeroed) | 82 | // - memory packing (12 bit samples into low bits, others zeroed) |
78 | // - priority | 83 | // - priority |
79 | // - drop chipselect after each word | 84 | // - drop chipselect after each word |
@@ -143,13 +148,13 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
143 | * struct spi_master - interface to SPI master controller | 148 | * struct spi_master - interface to SPI master controller |
144 | * @cdev: class interface to this driver | 149 | * @cdev: class interface to this driver |
145 | * @bus_num: board-specific (and often SOC-specific) identifier for a | 150 | * @bus_num: board-specific (and often SOC-specific) identifier for a |
146 | * given SPI controller. | 151 | * given SPI controller. |
147 | * @num_chipselect: chipselects are used to distinguish individual | 152 | * @num_chipselect: chipselects are used to distinguish individual |
148 | * SPI slaves, and are numbered from zero to num_chipselects. | 153 | * SPI slaves, and are numbered from zero to num_chipselects. |
149 | * each slave has a chipselect signal, but it's common that not | 154 | * each slave has a chipselect signal, but it's common that not |
150 | * every chipselect is connected to a slave. | 155 | * every chipselect is connected to a slave. |
151 | * @setup: updates the device mode and clocking records used by a | 156 | * @setup: updates the device mode and clocking records used by a |
152 | * device's SPI controller; protocol code may call this. | 157 | * device's SPI controller; protocol code may call this. |
153 | * @transfer: adds a message to the controller's transfer queue. | 158 | * @transfer: adds a message to the controller's transfer queue. |
154 | * @cleanup: frees controller-specific state | 159 | * @cleanup: frees controller-specific state |
155 | * | 160 | * |
@@ -167,13 +172,13 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
167 | struct spi_master { | 172 | struct spi_master { |
168 | struct class_device cdev; | 173 | struct class_device cdev; |
169 | 174 | ||
170 | /* other than zero (== assign one dynamically), bus_num is fully | 175 | /* other than negative (== assign one dynamically), bus_num is fully |
171 | * board-specific. usually that simplifies to being SOC-specific. | 176 | * board-specific. usually that simplifies to being SOC-specific. |
172 | * example: one SOC has three SPI controllers, numbered 1..3, | 177 | * example: one SOC has three SPI controllers, numbered 0..2, |
173 | * and one board's schematics might show it using SPI-2. software | 178 | * and one board's schematics might show it using SPI-2. software |
174 | * would normally use bus_num=2 for that controller. | 179 | * would normally use bus_num=2 for that controller. |
175 | */ | 180 | */ |
176 | u16 bus_num; | 181 | s16 bus_num; |
177 | 182 | ||
178 | /* chipselects will be integral to many controllers; some others | 183 | /* chipselects will be integral to many controllers; some others |
179 | * might use board-specific GPIOs. | 184 | * might use board-specific GPIOs. |
@@ -268,10 +273,14 @@ extern struct spi_master *spi_busnum_to_master(u16 busnum); | |||
268 | * @tx_dma: DMA address of tx_buf, if spi_message.is_dma_mapped | 273 | * @tx_dma: DMA address of tx_buf, if spi_message.is_dma_mapped |
269 | * @rx_dma: DMA address of rx_buf, if spi_message.is_dma_mapped | 274 | * @rx_dma: DMA address of rx_buf, if spi_message.is_dma_mapped |
270 | * @len: size of rx and tx buffers (in bytes) | 275 | * @len: size of rx and tx buffers (in bytes) |
276 | * @speed_hz: Select a speed other then the device default for this | ||
277 | * transfer. If 0 the default (from spi_device) is used. | ||
278 | * @bits_per_word: select a bits_per_word other then the device default | ||
279 | * for this transfer. If 0 the default (from spi_device) is used. | ||
271 | * @cs_change: affects chipselect after this transfer completes | 280 | * @cs_change: affects chipselect after this transfer completes |
272 | * @delay_usecs: microseconds to delay after this transfer before | 281 | * @delay_usecs: microseconds to delay after this transfer before |
273 | * (optionally) changing the chipselect status, then starting | 282 | * (optionally) changing the chipselect status, then starting |
274 | * the next transfer or completing this spi_message. | 283 | * the next transfer or completing this spi_message. |
275 | * @transfer_list: transfers are sequenced through spi_message.transfers | 284 | * @transfer_list: transfers are sequenced through spi_message.transfers |
276 | * | 285 | * |
277 | * SPI transfers always write the same number of bytes as they read. | 286 | * SPI transfers always write the same number of bytes as they read. |
@@ -322,7 +331,9 @@ struct spi_transfer { | |||
322 | dma_addr_t rx_dma; | 331 | dma_addr_t rx_dma; |
323 | 332 | ||
324 | unsigned cs_change:1; | 333 | unsigned cs_change:1; |
334 | u8 bits_per_word; | ||
325 | u16 delay_usecs; | 335 | u16 delay_usecs; |
336 | u32 speed_hz; | ||
326 | 337 | ||
327 | struct list_head transfer_list; | 338 | struct list_head transfer_list; |
328 | }; | 339 | }; |
@@ -356,7 +367,7 @@ struct spi_transfer { | |||
356 | * and its transfers, ignore them until its completion callback. | 367 | * and its transfers, ignore them until its completion callback. |
357 | */ | 368 | */ |
358 | struct spi_message { | 369 | struct spi_message { |
359 | struct list_head transfers; | 370 | struct list_head transfers; |
360 | 371 | ||
361 | struct spi_device *spi; | 372 | struct spi_device *spi; |
362 | 373 | ||
@@ -374,7 +385,7 @@ struct spi_message { | |||
374 | */ | 385 | */ |
375 | 386 | ||
376 | /* completion is reported through a callback */ | 387 | /* completion is reported through a callback */ |
377 | void (*complete)(void *context); | 388 | void (*complete)(void *context); |
378 | void *context; | 389 | void *context; |
379 | unsigned actual_length; | 390 | unsigned actual_length; |
380 | int status; | 391 | int status; |
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index c961fe9bf3eb..16ce178f54d7 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h | |||
@@ -30,6 +30,12 @@ struct spi_bitbang { | |||
30 | 30 | ||
31 | struct spi_master *master; | 31 | struct spi_master *master; |
32 | 32 | ||
33 | /* setup_transfer() changes clock and/or wordsize to match settings | ||
34 | * for this transfer; zeroes restore defaults from spi_device. | ||
35 | */ | ||
36 | int (*setup_transfer)(struct spi_device *spi, | ||
37 | struct spi_transfer *t); | ||
38 | |||
33 | void (*chipselect)(struct spi_device *spi, int is_on); | 39 | void (*chipselect)(struct spi_device *spi, int is_on); |
34 | #define BITBANG_CS_ACTIVE 1 /* normally nCS, active low */ | 40 | #define BITBANG_CS_ACTIVE 1 /* normally nCS, active low */ |
35 | #define BITBANG_CS_INACTIVE 0 | 41 | #define BITBANG_CS_INACTIVE 0 |
@@ -51,6 +57,8 @@ struct spi_bitbang { | |||
51 | extern int spi_bitbang_setup(struct spi_device *spi); | 57 | extern int spi_bitbang_setup(struct spi_device *spi); |
52 | extern void spi_bitbang_cleanup(const struct spi_device *spi); | 58 | extern void spi_bitbang_cleanup(const struct spi_device *spi); |
53 | extern int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m); | 59 | extern int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m); |
60 | extern int spi_bitbang_setup_transfer(struct spi_device *spi, | ||
61 | struct spi_transfer *t); | ||
54 | 62 | ||
55 | /* start or stop queue processing */ | 63 | /* start or stop queue processing */ |
56 | extern int spi_bitbang_start(struct spi_bitbang *spi); | 64 | extern int spi_bitbang_start(struct spi_bitbang *spi); |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 5b1fdf1cff4f..f03c24719302 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -296,7 +296,7 @@ static inline void disable_swap_token(void) | |||
296 | #define read_swap_cache_async(swp,vma,addr) NULL | 296 | #define read_swap_cache_async(swp,vma,addr) NULL |
297 | #define lookup_swap_cache(swp) NULL | 297 | #define lookup_swap_cache(swp) NULL |
298 | #define valid_swaphandles(swp, off) 0 | 298 | #define valid_swaphandles(swp, off) 0 |
299 | #define can_share_swap_page(p) 0 | 299 | #define can_share_swap_page(p) (page_mapcount(p) == 1) |
300 | #define move_to_swap_cache(p, swp) 1 | 300 | #define move_to_swap_cache(p, swp) 1 |
301 | #define move_from_swap_cache(p, i, m) 1 | 301 | #define move_from_swap_cache(p, i, m) 1 |
302 | #define __delete_from_swap_cache(p) /*NOTHING*/ | 302 | #define __delete_from_swap_cache(p) /*NOTHING*/ |
diff --git a/include/net/ax25.h b/include/net/ax25.h index d052b221dbcd..5bd997487054 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -145,14 +145,14 @@ enum { | |||
145 | #define AX25_DEF_CONMODE 2 /* Connected mode allowed */ | 145 | #define AX25_DEF_CONMODE 2 /* Connected mode allowed */ |
146 | #define AX25_DEF_WINDOW 2 /* Window=2 */ | 146 | #define AX25_DEF_WINDOW 2 /* Window=2 */ |
147 | #define AX25_DEF_EWINDOW 32 /* Module-128 Window=32 */ | 147 | #define AX25_DEF_EWINDOW 32 /* Module-128 Window=32 */ |
148 | #define AX25_DEF_T1 (10 * HZ) /* T1=10s */ | 148 | #define AX25_DEF_T1 10000 /* T1=10s */ |
149 | #define AX25_DEF_T2 (3 * HZ) /* T2=3s */ | 149 | #define AX25_DEF_T2 3000 /* T2=3s */ |
150 | #define AX25_DEF_T3 (300 * HZ) /* T3=300s */ | 150 | #define AX25_DEF_T3 300000 /* T3=300s */ |
151 | #define AX25_DEF_N2 10 /* N2=10 */ | 151 | #define AX25_DEF_N2 10 /* N2=10 */ |
152 | #define AX25_DEF_IDLE (0 * 60 * HZ) /* Idle=None */ | 152 | #define AX25_DEF_IDLE 0 /* Idle=None */ |
153 | #define AX25_DEF_PACLEN 256 /* Paclen=256 */ | 153 | #define AX25_DEF_PACLEN 256 /* Paclen=256 */ |
154 | #define AX25_DEF_PROTOCOL AX25_PROTO_STD_SIMPLEX /* Standard AX.25 */ | 154 | #define AX25_DEF_PROTOCOL AX25_PROTO_STD_SIMPLEX /* Standard AX.25 */ |
155 | #define AX25_DEF_DS_TIMEOUT (3 * 60 * HZ) /* DAMA timeout 3 minutes */ | 155 | #define AX25_DEF_DS_TIMEOUT 180000 /* DAMA timeout 3 minutes */ |
156 | 156 | ||
157 | typedef struct ax25_uid_assoc { | 157 | typedef struct ax25_uid_assoc { |
158 | struct hlist_node uid_node; | 158 | struct hlist_node uid_node; |
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index 4087dfc47094..293e920ca59d 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -958,11 +958,13 @@ enum ieee80211_state { | |||
958 | 958 | ||
959 | #define IEEE80211_24GHZ_MIN_CHANNEL 1 | 959 | #define IEEE80211_24GHZ_MIN_CHANNEL 1 |
960 | #define IEEE80211_24GHZ_MAX_CHANNEL 14 | 960 | #define IEEE80211_24GHZ_MAX_CHANNEL 14 |
961 | #define IEEE80211_24GHZ_CHANNELS 14 | 961 | #define IEEE80211_24GHZ_CHANNELS (IEEE80211_24GHZ_MAX_CHANNEL - \ |
962 | IEEE80211_24GHZ_MIN_CHANNEL + 1) | ||
962 | 963 | ||
963 | #define IEEE80211_52GHZ_MIN_CHANNEL 34 | 964 | #define IEEE80211_52GHZ_MIN_CHANNEL 34 |
964 | #define IEEE80211_52GHZ_MAX_CHANNEL 165 | 965 | #define IEEE80211_52GHZ_MAX_CHANNEL 165 |
965 | #define IEEE80211_52GHZ_CHANNELS 131 | 966 | #define IEEE80211_52GHZ_CHANNELS (IEEE80211_52GHZ_MAX_CHANNEL - \ |
967 | IEEE80211_52GHZ_MIN_CHANNEL + 1) | ||
966 | 968 | ||
967 | enum { | 969 | enum { |
968 | IEEE80211_CH_PASSIVE_ONLY = (1 << 0), | 970 | IEEE80211_CH_PASSIVE_ONLY = (1 << 0), |
diff --git a/include/net/ieee80211softmac.h b/include/net/ieee80211softmac.h index b1ebfbae397f..052ed596a4e4 100644 --- a/include/net/ieee80211softmac.h +++ b/include/net/ieee80211softmac.h | |||
@@ -204,7 +204,8 @@ struct ieee80211softmac_device { | |||
204 | 204 | ||
205 | /* couple of flags */ | 205 | /* couple of flags */ |
206 | u8 scanning:1, /* protects scanning from being done multiple times at once */ | 206 | u8 scanning:1, /* protects scanning from being done multiple times at once */ |
207 | associated:1; | 207 | associated:1, |
208 | running:1; | ||
208 | 209 | ||
209 | struct ieee80211softmac_scaninfo *scaninfo; | 210 | struct ieee80211softmac_scaninfo *scaninfo; |
210 | struct ieee80211softmac_assoc_info associnfo; | 211 | struct ieee80211softmac_assoc_info associnfo; |
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index b0666d66293f..4901ee446879 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -211,6 +211,7 @@ struct neigh_table | |||
211 | #define NEIGH_UPDATE_F_ADMIN 0x80000000 | 211 | #define NEIGH_UPDATE_F_ADMIN 0x80000000 |
212 | 212 | ||
213 | extern void neigh_table_init(struct neigh_table *tbl); | 213 | extern void neigh_table_init(struct neigh_table *tbl); |
214 | extern void neigh_table_init_no_netlink(struct neigh_table *tbl); | ||
214 | extern int neigh_table_clear(struct neigh_table *tbl); | 215 | extern int neigh_table_clear(struct neigh_table *tbl); |
215 | extern struct neighbour * neigh_lookup(struct neigh_table *tbl, | 216 | extern struct neighbour * neigh_lookup(struct neigh_table *tbl, |
216 | const void *pkey, | 217 | const void *pkey, |
diff --git a/include/net/netrom.h b/include/net/netrom.h index a5ee53bce62f..e0ca112024a3 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h | |||
@@ -42,11 +42,11 @@ enum { | |||
42 | #define NR_COND_PEER_RX_BUSY 0x04 | 42 | #define NR_COND_PEER_RX_BUSY 0x04 |
43 | #define NR_COND_OWN_RX_BUSY 0x08 | 43 | #define NR_COND_OWN_RX_BUSY 0x08 |
44 | 44 | ||
45 | #define NR_DEFAULT_T1 (120 * HZ) /* Outstanding frames - 120 seconds */ | 45 | #define NR_DEFAULT_T1 120000 /* Outstanding frames - 120 seconds */ |
46 | #define NR_DEFAULT_T2 (5 * HZ) /* Response delay - 5 seconds */ | 46 | #define NR_DEFAULT_T2 5000 /* Response delay - 5 seconds */ |
47 | #define NR_DEFAULT_N2 3 /* Number of Retries - 3 */ | 47 | #define NR_DEFAULT_N2 3 /* Number of Retries - 3 */ |
48 | #define NR_DEFAULT_T4 (180 * HZ) /* Busy Delay - 180 seconds */ | 48 | #define NR_DEFAULT_T4 180000 /* Busy Delay - 180 seconds */ |
49 | #define NR_DEFAULT_IDLE (0 * 60 * HZ) /* No Activity Timeout - none */ | 49 | #define NR_DEFAULT_IDLE 0 /* No Activity Timeout - none */ |
50 | #define NR_DEFAULT_WINDOW 4 /* Default Window Size - 4 */ | 50 | #define NR_DEFAULT_WINDOW 4 /* Default Window Size - 4 */ |
51 | #define NR_DEFAULT_OBS 6 /* Default Obsolescence Count - 6 */ | 51 | #define NR_DEFAULT_OBS 6 /* Default Obsolescence Count - 6 */ |
52 | #define NR_DEFAULT_QUAL 10 /* Default Neighbour Quality - 10 */ | 52 | #define NR_DEFAULT_QUAL 10 /* Default Neighbour Quality - 10 */ |
diff --git a/include/net/rose.h b/include/net/rose.h index 3249b979605a..012b09ed2401 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -49,14 +49,14 @@ enum { | |||
49 | ROSE_STATE_5 /* Deferred Call Acceptance */ | 49 | ROSE_STATE_5 /* Deferred Call Acceptance */ |
50 | }; | 50 | }; |
51 | 51 | ||
52 | #define ROSE_DEFAULT_T0 (180 * HZ) /* Default T10 T20 value */ | 52 | #define ROSE_DEFAULT_T0 180000 /* Default T10 T20 value */ |
53 | #define ROSE_DEFAULT_T1 (200 * HZ) /* Default T11 T21 value */ | 53 | #define ROSE_DEFAULT_T1 200000 /* Default T11 T21 value */ |
54 | #define ROSE_DEFAULT_T2 (180 * HZ) /* Default T12 T22 value */ | 54 | #define ROSE_DEFAULT_T2 180000 /* Default T12 T22 value */ |
55 | #define ROSE_DEFAULT_T3 (180 * HZ) /* Default T13 T23 value */ | 55 | #define ROSE_DEFAULT_T3 180000 /* Default T13 T23 value */ |
56 | #define ROSE_DEFAULT_HB (5 * HZ) /* Default Holdback value */ | 56 | #define ROSE_DEFAULT_HB 5000 /* Default Holdback value */ |
57 | #define ROSE_DEFAULT_IDLE (0 * 60 * HZ) /* No Activity Timeout - none */ | 57 | #define ROSE_DEFAULT_IDLE 0 /* No Activity Timeout - none */ |
58 | #define ROSE_DEFAULT_ROUTING 1 /* Default routing flag */ | 58 | #define ROSE_DEFAULT_ROUTING 1 /* Default routing flag */ |
59 | #define ROSE_DEFAULT_FAIL_TIMEOUT (120 * HZ) /* Time until link considered usable */ | 59 | #define ROSE_DEFAULT_FAIL_TIMEOUT 120000 /* Time until link considered usable */ |
60 | #define ROSE_DEFAULT_MAXVC 50 /* Maximum number of VCs per neighbour */ | 60 | #define ROSE_DEFAULT_MAXVC 50 /* Maximum number of VCs per neighbour */ |
61 | #define ROSE_DEFAULT_WINDOW_SIZE 7 /* Default window size */ | 61 | #define ROSE_DEFAULT_WINDOW_SIZE 7 /* Default window size */ |
62 | 62 | ||
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h index 34a1a09e5aef..807d6f1ef4b5 100644 --- a/include/net/sctp/command.h +++ b/include/net/sctp/command.h | |||
@@ -99,6 +99,7 @@ typedef enum { | |||
99 | SCTP_CMD_DEL_NON_PRIMARY, /* Removes non-primary peer transports. */ | 99 | SCTP_CMD_DEL_NON_PRIMARY, /* Removes non-primary peer transports. */ |
100 | SCTP_CMD_T3_RTX_TIMERS_STOP, /* Stops T3-rtx pending timers */ | 100 | SCTP_CMD_T3_RTX_TIMERS_STOP, /* Stops T3-rtx pending timers */ |
101 | SCTP_CMD_FORCE_PRIM_RETRAN, /* Forces retrans. over primary path. */ | 101 | SCTP_CMD_FORCE_PRIM_RETRAN, /* Forces retrans. over primary path. */ |
102 | SCTP_CMD_SET_SK_ERR, /* Set sk_err */ | ||
102 | SCTP_CMD_LAST | 103 | SCTP_CMD_LAST |
103 | } sctp_verb_t; | 104 | } sctp_verb_t; |
104 | 105 | ||
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index e673b2c984e9..aa6033ca7cd8 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -461,12 +461,12 @@ static inline int sctp_frag_point(const struct sctp_sock *sp, int pmtu) | |||
461 | * there is room for a param header too. | 461 | * there is room for a param header too. |
462 | */ | 462 | */ |
463 | #define sctp_walk_params(pos, chunk, member)\ | 463 | #define sctp_walk_params(pos, chunk, member)\ |
464 | _sctp_walk_params((pos), (chunk), WORD_ROUND(ntohs((chunk)->chunk_hdr.length)), member) | 464 | _sctp_walk_params((pos), (chunk), ntohs((chunk)->chunk_hdr.length), member) |
465 | 465 | ||
466 | #define _sctp_walk_params(pos, chunk, end, member)\ | 466 | #define _sctp_walk_params(pos, chunk, end, member)\ |
467 | for (pos.v = chunk->member;\ | 467 | for (pos.v = chunk->member;\ |
468 | pos.v <= (void *)chunk + end - sizeof(sctp_paramhdr_t) &&\ | 468 | pos.v <= (void *)chunk + end - sizeof(sctp_paramhdr_t) &&\ |
469 | pos.v <= (void *)chunk + end - WORD_ROUND(ntohs(pos.p->length)) &&\ | 469 | pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\ |
470 | ntohs(pos.p->length) >= sizeof(sctp_paramhdr_t);\ | 470 | ntohs(pos.p->length) >= sizeof(sctp_paramhdr_t);\ |
471 | pos.v += WORD_ROUND(ntohs(pos.p->length))) | 471 | pos.v += WORD_ROUND(ntohs(pos.p->length))) |
472 | 472 | ||
@@ -477,7 +477,7 @@ _sctp_walk_errors((err), (chunk_hdr), ntohs((chunk_hdr)->length)) | |||
477 | for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ | 477 | for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ |
478 | sizeof(sctp_chunkhdr_t));\ | 478 | sizeof(sctp_chunkhdr_t));\ |
479 | (void *)err <= (void *)chunk_hdr + end - sizeof(sctp_errhdr_t) &&\ | 479 | (void *)err <= (void *)chunk_hdr + end - sizeof(sctp_errhdr_t) &&\ |
480 | (void *)err <= (void *)chunk_hdr + end - WORD_ROUND(ntohs(err->length)) &&\ | 480 | (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\ |
481 | ntohs(err->length) >= sizeof(sctp_errhdr_t); \ | 481 | ntohs(err->length) >= sizeof(sctp_errhdr_t); \ |
482 | err = (sctp_errhdr_t *)((void *)err + WORD_ROUND(ntohs(err->length)))) | 482 | err = (sctp_errhdr_t *)((void *)err + WORD_ROUND(ntohs(err->length)))) |
483 | 483 | ||
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index eba99f375517..7f4fea173fb1 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -712,6 +712,7 @@ struct sctp_chunk { | |||
712 | __u8 tsn_gap_acked; /* Is this chunk acked by a GAP ACK? */ | 712 | __u8 tsn_gap_acked; /* Is this chunk acked by a GAP ACK? */ |
713 | __s8 fast_retransmit; /* Is this chunk fast retransmitted? */ | 713 | __s8 fast_retransmit; /* Is this chunk fast retransmitted? */ |
714 | __u8 tsn_missing_report; /* Data chunk missing counter. */ | 714 | __u8 tsn_missing_report; /* Data chunk missing counter. */ |
715 | __u8 data_accepted; /* At least 1 chunk in this packet accepted */ | ||
715 | }; | 716 | }; |
716 | 717 | ||
717 | void sctp_chunk_hold(struct sctp_chunk *); | 718 | void sctp_chunk_hold(struct sctp_chunk *); |
diff --git a/include/scsi/srp.h b/include/scsi/srp.h index 6c2681dc5b46..637f77eccf0c 100644 --- a/include/scsi/srp.h +++ b/include/scsi/srp.h | |||
@@ -95,14 +95,15 @@ struct srp_direct_buf { | |||
95 | 95 | ||
96 | /* | 96 | /* |
97 | * We need the packed attribute because the SRP spec puts the list of | 97 | * We need the packed attribute because the SRP spec puts the list of |
98 | * descriptors at an offset of 20, which is not aligned to the size | 98 | * descriptors at an offset of 20, which is not aligned to the size of |
99 | * of struct srp_direct_buf. | 99 | * struct srp_direct_buf. The whole structure must be packed to avoid |
100 | * having the 20-byte structure padded to 24 bytes on 64-bit architectures. | ||
100 | */ | 101 | */ |
101 | struct srp_indirect_buf { | 102 | struct srp_indirect_buf { |
102 | struct srp_direct_buf table_desc; | 103 | struct srp_direct_buf table_desc; |
103 | __be32 len; | 104 | __be32 len; |
104 | struct srp_direct_buf desc_list[0] __attribute__((packed)); | 105 | struct srp_direct_buf desc_list[0]; |
105 | }; | 106 | } __attribute__((packed)); |
106 | 107 | ||
107 | enum { | 108 | enum { |
108 | SRP_MULTICHAN_SINGLE = 0, | 109 | SRP_MULTICHAN_SINGLE = 0, |
@@ -122,6 +123,11 @@ struct srp_login_req { | |||
122 | u8 target_port_id[16]; | 123 | u8 target_port_id[16]; |
123 | }; | 124 | }; |
124 | 125 | ||
126 | /* | ||
127 | * The SRP spec defines the size of the LOGIN_RSP structure to be 52 | ||
128 | * bytes, so it needs to be packed to avoid having it padded to 56 | ||
129 | * bytes on 64-bit architectures. | ||
130 | */ | ||
125 | struct srp_login_rsp { | 131 | struct srp_login_rsp { |
126 | u8 opcode; | 132 | u8 opcode; |
127 | u8 reserved1[3]; | 133 | u8 reserved1[3]; |
@@ -132,7 +138,7 @@ struct srp_login_rsp { | |||
132 | __be16 buf_fmt; | 138 | __be16 buf_fmt; |
133 | u8 rsp_flags; | 139 | u8 rsp_flags; |
134 | u8 reserved2[25]; | 140 | u8 reserved2[25]; |
135 | }; | 141 | } __attribute__((packed)); |
136 | 142 | ||
137 | struct srp_login_rej { | 143 | struct srp_login_rej { |
138 | u8 opcode; | 144 | u8 opcode; |
@@ -207,6 +213,11 @@ enum { | |||
207 | SRP_RSP_FLAG_DIUNDER = 1 << 5 | 213 | SRP_RSP_FLAG_DIUNDER = 1 << 5 |
208 | }; | 214 | }; |
209 | 215 | ||
216 | /* | ||
217 | * The SRP spec defines the size of the RSP structure to be 36 bytes, | ||
218 | * so it needs to be packed to avoid having it padded to 40 bytes on | ||
219 | * 64-bit architectures. | ||
220 | */ | ||
210 | struct srp_rsp { | 221 | struct srp_rsp { |
211 | u8 opcode; | 222 | u8 opcode; |
212 | u8 sol_not; | 223 | u8 sol_not; |
@@ -221,6 +232,6 @@ struct srp_rsp { | |||
221 | __be32 sense_data_len; | 232 | __be32 sense_data_len; |
222 | __be32 resp_data_len; | 233 | __be32 resp_data_len; |
223 | u8 data[0]; | 234 | u8 data[0]; |
224 | }; | 235 | } __attribute__((packed)); |
225 | 236 | ||
226 | #endif /* SCSI_SRP_H */ | 237 | #endif /* SCSI_SRP_H */ |