diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-05-20 00:36:08 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-05-20 00:36:08 -0400 |
commit | 3d71b3b0b634b1a5ba8632fd9ec998e0e4aedfdb (patch) | |
tree | addbc37a278a126a19e03edd8270e577c75a8829 /include | |
parent | 8d4ee71ff6de5255ebfdf44fb83419d27bd06368 (diff) | |
parent | e2a7f77a7b4ab298a38c8d1f624628456069bdb0 (diff) |
Merge branch 'upstream-fixes' into upstream
Conflicts:
drivers/scsi/libata-core.c
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/arch-pxa/pxa2xx_spi.h | 68 | ||||
-rw-r--r-- | include/asm-arm/procinfo.h | 2 | ||||
-rw-r--r-- | include/asm-arm/spinlock.h | 6 | ||||
-rw-r--r-- | include/asm-s390/unistd.h | 8 | ||||
-rw-r--r-- | include/linux/kernel.h | 1 | ||||
-rw-r--r-- | include/linux/mmc/mmc.h | 1 | ||||
-rw-r--r-- | include/linux/rcupdate.h | 1 | ||||
-rw-r--r-- | include/linux/slab.h | 1 | ||||
-rw-r--r-- | include/linux/spi/spi.h | 45 | ||||
-rw-r--r-- | include/linux/spi/spi_bitbang.h | 8 | ||||
-rw-r--r-- | include/linux/swap.h | 2 | ||||
-rw-r--r-- | include/net/sctp/command.h | 1 | ||||
-rw-r--r-- | include/net/sctp/sctp.h | 6 |
13 files changed, 126 insertions, 24 deletions
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/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-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/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/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/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/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/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 | ||