diff options
author | Patrick McHardy <kaber@trash.net> | 2010-04-20 10:02:01 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-04-20 10:02:01 -0400 |
commit | 62910554656cdcd6b6f84a5154c4155aae4ca231 (patch) | |
tree | dcf14004f6fd2ef7154362ff948bfeba0f3ea92d /include | |
parent | 22265a5c3c103cf8c50be62e6c90d045eb649e6d (diff) | |
parent | ab9304717f7624c41927f442e6b6d418b2d8b3e4 (diff) |
Merge branch 'master' of /repos/git/net-next-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
net/ipv6/netfilter/ip6t_REJECT.c
net/netfilter/xt_limit.c
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
152 files changed, 2672 insertions, 586 deletions
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 3a4767c01c5f..4f7b44866b76 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -65,6 +65,8 @@ | |||
65 | #define ACPI_VIDEO_HID "LNXVIDEO" | 65 | #define ACPI_VIDEO_HID "LNXVIDEO" |
66 | #define ACPI_BAY_HID "LNXIOBAY" | 66 | #define ACPI_BAY_HID "LNXIOBAY" |
67 | #define ACPI_DOCK_HID "LNXDOCK" | 67 | #define ACPI_DOCK_HID "LNXDOCK" |
68 | /* Quirk for broken IBM BIOSes */ | ||
69 | #define ACPI_SMBUS_IBM_HID "SMBUSIBM" | ||
68 | 70 | ||
69 | /* | 71 | /* |
70 | * For fixed hardware buttons, we fabricate acpi_devices with HID | 72 | * For fixed hardware buttons, we fabricate acpi_devices with HID |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 4a3c4e441027..2f3b3a00b7a3 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -55,6 +55,7 @@ | |||
55 | #include <linux/mm.h> | 55 | #include <linux/mm.h> |
56 | #include <linux/cdev.h> | 56 | #include <linux/cdev.h> |
57 | #include <linux/mutex.h> | 57 | #include <linux/mutex.h> |
58 | #include <linux/slab.h> | ||
58 | #if defined(__alpha__) || defined(__powerpc__) | 59 | #if defined(__alpha__) || defined(__powerpc__) |
59 | #include <asm/pgtable.h> /* For pte_wrprotect */ | 60 | #include <asm/pgtable.h> /* For pte_wrprotect */ |
60 | #endif | 61 | #endif |
@@ -1545,39 +1546,7 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map) | |||
1545 | { | 1546 | { |
1546 | } | 1547 | } |
1547 | 1548 | ||
1548 | 1549 | #include "drm_mem_util.h" | |
1549 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | ||
1550 | { | ||
1551 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
1552 | return NULL; | ||
1553 | |||
1554 | if (size * nmemb <= PAGE_SIZE) | ||
1555 | return kcalloc(nmemb, size, GFP_KERNEL); | ||
1556 | |||
1557 | return __vmalloc(size * nmemb, | ||
1558 | GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL); | ||
1559 | } | ||
1560 | |||
1561 | /* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */ | ||
1562 | static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) | ||
1563 | { | ||
1564 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
1565 | return NULL; | ||
1566 | |||
1567 | if (size * nmemb <= PAGE_SIZE) | ||
1568 | return kmalloc(nmemb * size, GFP_KERNEL); | ||
1569 | |||
1570 | return __vmalloc(size * nmemb, | ||
1571 | GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL); | ||
1572 | } | ||
1573 | |||
1574 | static __inline void drm_free_large(void *ptr) | ||
1575 | { | ||
1576 | if (!is_vmalloc_addr(ptr)) | ||
1577 | return kfree(ptr); | ||
1578 | |||
1579 | vfree(ptr); | ||
1580 | } | ||
1581 | /*@}*/ | 1550 | /*@}*/ |
1582 | 1551 | ||
1583 | #endif /* __KERNEL__ */ | 1552 | #endif /* __KERNEL__ */ |
diff --git a/include/drm/drm_mem_util.h b/include/drm/drm_mem_util.h new file mode 100644 index 000000000000..6bd325fedc87 --- /dev/null +++ b/include/drm/drm_mem_util.h | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | * Copyright © 2008 Intel Corporation | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice (including the next | ||
12 | * paragraph) shall be included in all copies or substantial portions of the | ||
13 | * Software. | ||
14 | * | ||
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
21 | * IN THE SOFTWARE. | ||
22 | * | ||
23 | * Authors: | ||
24 | * Jesse Barnes <jbarnes@virtuousgeek.org> | ||
25 | * | ||
26 | */ | ||
27 | #ifndef _DRM_MEM_UTIL_H_ | ||
28 | #define _DRM_MEM_UTIL_H_ | ||
29 | |||
30 | #include <linux/vmalloc.h> | ||
31 | |||
32 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | ||
33 | { | ||
34 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
35 | return NULL; | ||
36 | |||
37 | if (size * nmemb <= PAGE_SIZE) | ||
38 | return kcalloc(nmemb, size, GFP_KERNEL); | ||
39 | |||
40 | return __vmalloc(size * nmemb, | ||
41 | GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL); | ||
42 | } | ||
43 | |||
44 | /* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */ | ||
45 | static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) | ||
46 | { | ||
47 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
48 | return NULL; | ||
49 | |||
50 | if (size * nmemb <= PAGE_SIZE) | ||
51 | return kmalloc(nmemb * size, GFP_KERNEL); | ||
52 | |||
53 | return __vmalloc(size * nmemb, | ||
54 | GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL); | ||
55 | } | ||
56 | |||
57 | static __inline void drm_free_large(void *ptr) | ||
58 | { | ||
59 | if (!is_vmalloc_addr(ptr)) | ||
60 | return kfree(ptr); | ||
61 | |||
62 | vfree(ptr); | ||
63 | } | ||
64 | |||
65 | #endif | ||
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 676104b7818c..04a6ebc27b96 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -410,6 +410,7 @@ | |||
410 | {0x1002, 0x9712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 410 | {0x1002, 0x9712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
411 | {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 411 | {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
412 | {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 412 | {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
413 | {0x1002, 0x9715, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
413 | {0, 0, 0} | 414 | {0, 0, 0} |
414 | 415 | ||
415 | #define r128_PCI_IDS \ | 416 | #define r128_PCI_IDS \ |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index e3f1b4a4b601..e929c27ede22 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -115,7 +115,6 @@ struct ttm_backend { | |||
115 | struct ttm_backend_func *func; | 115 | struct ttm_backend_func *func; |
116 | }; | 116 | }; |
117 | 117 | ||
118 | #define TTM_PAGE_FLAG_VMALLOC (1 << 0) | ||
119 | #define TTM_PAGE_FLAG_USER (1 << 1) | 118 | #define TTM_PAGE_FLAG_USER (1 << 1) |
120 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) | 119 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) |
121 | #define TTM_PAGE_FLAG_WRITE (1 << 3) | 120 | #define TTM_PAGE_FLAG_WRITE (1 << 3) |
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 6816be6c3f77..8b1038607831 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
@@ -14,6 +14,9 @@ | |||
14 | #ifndef ASMARM_AMBA_H | 14 | #ifndef ASMARM_AMBA_H |
15 | #define ASMARM_AMBA_H | 15 | #define ASMARM_AMBA_H |
16 | 16 | ||
17 | #include <linux/device.h> | ||
18 | #include <linux/resource.h> | ||
19 | |||
17 | #define AMBA_NR_IRQS 2 | 20 | #define AMBA_NR_IRQS 2 |
18 | 21 | ||
19 | struct amba_device { | 22 | struct amba_device { |
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h index 29c0448265cf..ca16c3801a1e 100644 --- a/include/linux/amba/clcd.h +++ b/include/linux/amba/clcd.h | |||
@@ -21,22 +21,21 @@ | |||
21 | #define CLCD_UBAS 0x00000010 | 21 | #define CLCD_UBAS 0x00000010 |
22 | #define CLCD_LBAS 0x00000014 | 22 | #define CLCD_LBAS 0x00000014 |
23 | 23 | ||
24 | #if !defined(CONFIG_ARCH_VERSATILE) && !defined(CONFIG_ARCH_REALVIEW) | 24 | #define CLCD_PL110_IENB 0x00000018 |
25 | #define CLCD_IENB 0x00000018 | 25 | #define CLCD_PL110_CNTL 0x0000001c |
26 | #define CLCD_CNTL 0x0000001c | 26 | #define CLCD_PL110_STAT 0x00000020 |
27 | #else | 27 | #define CLCD_PL110_INTR 0x00000024 |
28 | /* | 28 | #define CLCD_PL110_UCUR 0x00000028 |
29 | * Someone rearranged these two registers on the Versatile | 29 | #define CLCD_PL110_LCUR 0x0000002C |
30 | * platform... | 30 | |
31 | */ | 31 | #define CLCD_PL111_CNTL 0x00000018 |
32 | #define CLCD_IENB 0x0000001c | 32 | #define CLCD_PL111_IENB 0x0000001c |
33 | #define CLCD_CNTL 0x00000018 | 33 | #define CLCD_PL111_RIS 0x00000020 |
34 | #endif | 34 | #define CLCD_PL111_MIS 0x00000024 |
35 | 35 | #define CLCD_PL111_ICR 0x00000028 | |
36 | #define CLCD_STAT 0x00000020 | 36 | #define CLCD_PL111_UCUR 0x0000002c |
37 | #define CLCD_INTR 0x00000024 | 37 | #define CLCD_PL111_LCUR 0x00000030 |
38 | #define CLCD_UCUR 0x00000028 | 38 | |
39 | #define CLCD_LCUR 0x0000002C | ||
40 | #define CLCD_PALL 0x00000200 | 39 | #define CLCD_PALL 0x00000200 |
41 | #define CLCD_PALETTE 0x00000200 | 40 | #define CLCD_PALETTE 0x00000200 |
42 | 41 | ||
@@ -147,6 +146,8 @@ struct clcd_fb { | |||
147 | struct clcd_board *board; | 146 | struct clcd_board *board; |
148 | void *board_data; | 147 | void *board_data; |
149 | void __iomem *regs; | 148 | void __iomem *regs; |
149 | u16 off_ienb; | ||
150 | u16 off_cntl; | ||
150 | u32 clcd_cntl; | 151 | u32 clcd_cntl; |
151 | u32 cmap[16]; | 152 | u32 cmap[16]; |
152 | }; | 153 | }; |
diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h index b4fbd9862606..5ddd9ad4b19c 100644 --- a/include/linux/amba/pl061.h +++ b/include/linux/amba/pl061.h | |||
@@ -1,3 +1,5 @@ | |||
1 | #include <linux/types.h> | ||
2 | |||
1 | /* platform data for the PL061 GPIO driver */ | 3 | /* platform data for the PL061 GPIO driver */ |
2 | 4 | ||
3 | struct pl061_platform_data { | 5 | struct pl061_platform_data { |
diff --git a/include/linux/ata.h b/include/linux/ata.h index b4c85e2adef5..700c5b9b3583 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -1025,8 +1025,8 @@ static inline int ata_ok(u8 status) | |||
1025 | 1025 | ||
1026 | static inline int lba_28_ok(u64 block, u32 n_block) | 1026 | static inline int lba_28_ok(u64 block, u32 n_block) |
1027 | { | 1027 | { |
1028 | /* check the ending block number */ | 1028 | /* check the ending block number: must be LESS THAN 0x0fffffff */ |
1029 | return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); | 1029 | return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256); |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | static inline int lba_48_ok(u64 block, u32 n_block) | 1032 | static inline int lba_48_ok(u64 block, u32 n_block) |
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 8c4f884db6b4..4a3d52e545e1 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -36,18 +36,18 @@ struct backlight_device; | |||
36 | struct fb_info; | 36 | struct fb_info; |
37 | 37 | ||
38 | struct backlight_ops { | 38 | struct backlight_ops { |
39 | const unsigned int options; | 39 | unsigned int options; |
40 | 40 | ||
41 | #define BL_CORE_SUSPENDRESUME (1 << 0) | 41 | #define BL_CORE_SUSPENDRESUME (1 << 0) |
42 | 42 | ||
43 | /* Notify the backlight driver some property has changed */ | 43 | /* Notify the backlight driver some property has changed */ |
44 | int (* const update_status)(struct backlight_device *); | 44 | int (*update_status)(struct backlight_device *); |
45 | /* Return the current backlight brightness (accounting for power, | 45 | /* Return the current backlight brightness (accounting for power, |
46 | fb_blank etc.) */ | 46 | fb_blank etc.) */ |
47 | int (* const get_brightness)(struct backlight_device *); | 47 | int (*get_brightness)(struct backlight_device *); |
48 | /* Check if given framebuffer device is the one bound to this backlight; | 48 | /* Check if given framebuffer device is the one bound to this backlight; |
49 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ | 49 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ |
50 | int (* const check_fb)(struct fb_info *); | 50 | int (*check_fb)(struct backlight_device *, struct fb_info *); |
51 | }; | 51 | }; |
52 | 52 | ||
53 | /* This structure defines all the properties of a backlight */ | 53 | /* This structure defines all the properties of a backlight */ |
@@ -103,7 +103,8 @@ static inline void backlight_update_status(struct backlight_device *bd) | |||
103 | } | 103 | } |
104 | 104 | ||
105 | extern struct backlight_device *backlight_device_register(const char *name, | 105 | extern struct backlight_device *backlight_device_register(const char *name, |
106 | struct device *dev, void *devdata, const struct backlight_ops *ops); | 106 | struct device *dev, void *devdata, const struct backlight_ops *ops, |
107 | const struct backlight_properties *props); | ||
107 | extern void backlight_device_unregister(struct backlight_device *bd); | 108 | extern void backlight_device_unregister(struct backlight_device *bd); |
108 | extern void backlight_force_update(struct backlight_device *bd, | 109 | extern void backlight_force_update(struct backlight_device *bd, |
109 | enum backlight_update_reason reason); | 110 | enum backlight_update_reason reason); |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index b79389879238..b796eab5ca75 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -21,9 +21,6 @@ | |||
21 | (bit) < (size); \ | 21 | (bit) < (size); \ |
22 | (bit) = find_next_bit((addr), (size), (bit) + 1)) | 22 | (bit) = find_next_bit((addr), (size), (bit) + 1)) |
23 | 23 | ||
24 | /* Temporary */ | ||
25 | #define for_each_bit(bit, addr, size) for_each_set_bit(bit, addr, size) | ||
26 | |||
27 | static __inline__ int get_bitmask_order(unsigned int count) | 24 | static __inline__ int get_bitmask_order(unsigned int count) |
28 | { | 25 | { |
29 | int order; | 26 | int order; |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ebd22dbed861..6690e8bae7bb 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -158,7 +158,6 @@ enum rq_flag_bits { | |||
158 | struct request { | 158 | struct request { |
159 | struct list_head queuelist; | 159 | struct list_head queuelist; |
160 | struct call_single_data csd; | 160 | struct call_single_data csd; |
161 | int cpu; | ||
162 | 161 | ||
163 | struct request_queue *q; | 162 | struct request_queue *q; |
164 | 163 | ||
@@ -166,9 +165,11 @@ struct request { | |||
166 | enum rq_cmd_type_bits cmd_type; | 165 | enum rq_cmd_type_bits cmd_type; |
167 | unsigned long atomic_flags; | 166 | unsigned long atomic_flags; |
168 | 167 | ||
168 | int cpu; | ||
169 | |||
169 | /* the following two fields are internal, NEVER access directly */ | 170 | /* the following two fields are internal, NEVER access directly */ |
170 | sector_t __sector; /* sector cursor */ | ||
171 | unsigned int __data_len; /* total data len */ | 171 | unsigned int __data_len; /* total data len */ |
172 | sector_t __sector; /* sector cursor */ | ||
172 | 173 | ||
173 | struct bio *bio; | 174 | struct bio *bio; |
174 | struct bio *biotail; | 175 | struct bio *biotail; |
@@ -201,20 +202,20 @@ struct request { | |||
201 | 202 | ||
202 | unsigned short ioprio; | 203 | unsigned short ioprio; |
203 | 204 | ||
205 | int ref_count; | ||
206 | |||
204 | void *special; /* opaque pointer available for LLD use */ | 207 | void *special; /* opaque pointer available for LLD use */ |
205 | char *buffer; /* kaddr of the current segment if available */ | 208 | char *buffer; /* kaddr of the current segment if available */ |
206 | 209 | ||
207 | int tag; | 210 | int tag; |
208 | int errors; | 211 | int errors; |
209 | 212 | ||
210 | int ref_count; | ||
211 | |||
212 | /* | 213 | /* |
213 | * when request is used as a packet command carrier | 214 | * when request is used as a packet command carrier |
214 | */ | 215 | */ |
215 | unsigned short cmd_len; | ||
216 | unsigned char __cmd[BLK_MAX_CDB]; | 216 | unsigned char __cmd[BLK_MAX_CDB]; |
217 | unsigned char *cmd; | 217 | unsigned char *cmd; |
218 | unsigned short cmd_len; | ||
218 | 219 | ||
219 | unsigned int extra_len; /* length of alignment and padding */ | 220 | unsigned int extra_len; /* length of alignment and padding */ |
220 | unsigned int sense_len; | 221 | unsigned int sense_len; |
@@ -921,26 +922,7 @@ extern void blk_cleanup_queue(struct request_queue *); | |||
921 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); | 922 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); |
922 | extern void blk_queue_bounce_limit(struct request_queue *, u64); | 923 | extern void blk_queue_bounce_limit(struct request_queue *, u64); |
923 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); | 924 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); |
924 | |||
925 | /* Temporary compatibility wrapper */ | ||
926 | static inline void blk_queue_max_sectors(struct request_queue *q, unsigned int max) | ||
927 | { | ||
928 | blk_queue_max_hw_sectors(q, max); | ||
929 | } | ||
930 | |||
931 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); | 925 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); |
932 | |||
933 | static inline void blk_queue_max_phys_segments(struct request_queue *q, unsigned short max) | ||
934 | { | ||
935 | blk_queue_max_segments(q, max); | ||
936 | } | ||
937 | |||
938 | static inline void blk_queue_max_hw_segments(struct request_queue *q, unsigned short max) | ||
939 | { | ||
940 | blk_queue_max_segments(q, max); | ||
941 | } | ||
942 | |||
943 | |||
944 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); | 926 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); |
945 | extern void blk_queue_max_discard_sectors(struct request_queue *q, | 927 | extern void blk_queue_max_discard_sectors(struct request_queue *q, |
946 | unsigned int max_discard_sectors); | 928 | unsigned int max_discard_sectors); |
@@ -1030,11 +1012,6 @@ static inline int sb_issue_discard(struct super_block *sb, | |||
1030 | 1012 | ||
1031 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); | 1013 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); |
1032 | 1014 | ||
1033 | #define MAX_PHYS_SEGMENTS 128 | ||
1034 | #define MAX_HW_SEGMENTS 128 | ||
1035 | #define SAFE_MAX_SECTORS 255 | ||
1036 | #define MAX_SEGMENT_SIZE 65536 | ||
1037 | |||
1038 | enum blk_default_limits { | 1015 | enum blk_default_limits { |
1039 | BLK_MAX_SEGMENTS = 128, | 1016 | BLK_MAX_SEGMENTS = 128, |
1040 | BLK_SAFE_MAX_SECTORS = 255, | 1017 | BLK_SAFE_MAX_SECTORS = 255, |
diff --git a/include/linux/caif/caif_socket.h b/include/linux/caif/caif_socket.h new file mode 100644 index 000000000000..8e5c8444a3f4 --- /dev/null +++ b/include/linux/caif/caif_socket.h | |||
@@ -0,0 +1,164 @@ | |||
1 | /* linux/caif_socket.h | ||
2 | * CAIF Definitions for CAIF socket and network layer | ||
3 | * Copyright (C) ST-Ericsson AB 2010 | ||
4 | * Author: Sjur Brendeland/ sjur.brandeland@stericsson.com | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #ifndef _LINUX_CAIF_SOCKET_H | ||
9 | #define _LINUX_CAIF_SOCKET_H | ||
10 | |||
11 | #include <linux/types.h> | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | #include <linux/socket.h> | ||
15 | #else | ||
16 | #include <sys/socket.h> | ||
17 | #endif | ||
18 | |||
19 | |||
20 | /** | ||
21 | * enum caif_link_selector - Physical Link Selection. | ||
22 | * @CAIF_LINK_HIGH_BANDW: Physical interface for high-bandwidth | ||
23 | * traffic. | ||
24 | * @CAIF_LINK_LOW_LATENCY: Physical interface for low-latency | ||
25 | * traffic. | ||
26 | * | ||
27 | * CAIF Link Layers can register their link properties. | ||
28 | * This enum is used for choosing between CAIF Link Layers when | ||
29 | * setting up CAIF Channels when multiple CAIF Link Layers exists. | ||
30 | */ | ||
31 | enum caif_link_selector { | ||
32 | CAIF_LINK_HIGH_BANDW, | ||
33 | CAIF_LINK_LOW_LATENCY | ||
34 | }; | ||
35 | |||
36 | /** | ||
37 | * enum caif_channel_priority - CAIF channel priorities. | ||
38 | * | ||
39 | * @CAIF_PRIO_MIN: Min priority for a channel. | ||
40 | * @CAIF_PRIO_LOW: Low-priority channel. | ||
41 | * @CAIF_PRIO_NORMAL: Normal/default priority level. | ||
42 | * @CAIF_PRIO_HIGH: High priority level | ||
43 | * @CAIF_PRIO_MAX: Max priority for channel | ||
44 | * | ||
45 | * Priority can be set on CAIF Channels in order to | ||
46 | * prioritize between traffic on different CAIF Channels. | ||
47 | * These priority levels are recommended, but the priority value | ||
48 | * is not restricted to the values defined in this enum, any value | ||
49 | * between CAIF_PRIO_MIN and CAIF_PRIO_MAX could be used. | ||
50 | */ | ||
51 | enum caif_channel_priority { | ||
52 | CAIF_PRIO_MIN = 0x01, | ||
53 | CAIF_PRIO_LOW = 0x04, | ||
54 | CAIF_PRIO_NORMAL = 0x0f, | ||
55 | CAIF_PRIO_HIGH = 0x14, | ||
56 | CAIF_PRIO_MAX = 0x1F | ||
57 | }; | ||
58 | |||
59 | /** | ||
60 | * enum caif_protocol_type - CAIF Channel type. | ||
61 | * @CAIFPROTO_AT: Classic AT channel. | ||
62 | * @CAIFPROTO_DATAGRAM: Datagram channel. | ||
63 | * @CAIFPROTO_DATAGRAM_LOOP: Datagram loopback channel, used for testing. | ||
64 | * @CAIFPROTO_UTIL: Utility (Psock) channel. | ||
65 | * @CAIFPROTO_RFM: Remote File Manager | ||
66 | * | ||
67 | * This enum defines the CAIF Channel type to be used. This defines | ||
68 | * the service to connect to on the modem. | ||
69 | */ | ||
70 | enum caif_protocol_type { | ||
71 | CAIFPROTO_AT, | ||
72 | CAIFPROTO_DATAGRAM, | ||
73 | CAIFPROTO_DATAGRAM_LOOP, | ||
74 | CAIFPROTO_UTIL, | ||
75 | CAIFPROTO_RFM, | ||
76 | _CAIFPROTO_MAX | ||
77 | }; | ||
78 | #define CAIFPROTO_MAX _CAIFPROTO_MAX | ||
79 | |||
80 | /** | ||
81 | * enum caif_at_type - AT Service Endpoint | ||
82 | * @CAIF_ATTYPE_PLAIN: Connects to a plain vanilla AT channel. | ||
83 | */ | ||
84 | enum caif_at_type { | ||
85 | CAIF_ATTYPE_PLAIN = 2 | ||
86 | }; | ||
87 | |||
88 | /** | ||
89 | * struct sockaddr_caif - the sockaddr structure for CAIF sockets. | ||
90 | * @u: Union of address data 'switched' by family. | ||
91 | * : | ||
92 | * @u.at: Applies when family = CAIFPROTO_AT. | ||
93 | * | ||
94 | * @u.at.type: Type of AT link to set up (enum caif_at_type). | ||
95 | * | ||
96 | * @u.util: Applies when family = CAIFPROTO_UTIL | ||
97 | * | ||
98 | * @u.util.service: Utility service name. | ||
99 | * | ||
100 | * @u.dgm: Applies when family = CAIFPROTO_DATAGRAM | ||
101 | * | ||
102 | * @u.dgm.connection_id: Datagram connection id. | ||
103 | * | ||
104 | * @u.dgm.nsapi: NSAPI of the PDP-Context. | ||
105 | * | ||
106 | * @u.rfm: Applies when family = CAIFPROTO_RFM | ||
107 | * | ||
108 | * @u.rfm.connection_id: Connection ID for RFM. | ||
109 | * | ||
110 | * @u.rfm.volume: Volume to mount. | ||
111 | * | ||
112 | * Description: | ||
113 | * This structure holds the connect parameters used for setting up a | ||
114 | * CAIF Channel. It defines the service to connect to on the modem. | ||
115 | */ | ||
116 | struct sockaddr_caif { | ||
117 | sa_family_t family; | ||
118 | union { | ||
119 | struct { | ||
120 | __u8 type; /* type: enum caif_at_type */ | ||
121 | } at; /* CAIFPROTO_AT */ | ||
122 | struct { | ||
123 | char service[16]; | ||
124 | } util; /* CAIFPROTO_UTIL */ | ||
125 | union { | ||
126 | __u32 connection_id; | ||
127 | __u8 nsapi; | ||
128 | } dgm; /* CAIFPROTO_DATAGRAM(_LOOP)*/ | ||
129 | struct { | ||
130 | __u32 connection_id; | ||
131 | char volume[16]; | ||
132 | } rfm; /* CAIFPROTO_RFM */ | ||
133 | } u; | ||
134 | }; | ||
135 | |||
136 | /** | ||
137 | * enum caif_socket_opts - CAIF option values for getsockopt and setsockopt. | ||
138 | * | ||
139 | * @CAIFSO_LINK_SELECT: Selector used if multiple CAIF Link layers are | ||
140 | * available. Either a high bandwidth | ||
141 | * link can be selected (CAIF_LINK_HIGH_BANDW) or | ||
142 | * or a low latency link (CAIF_LINK_LOW_LATENCY). | ||
143 | * This option is of type __u32. | ||
144 | * Alternatively SO_BINDTODEVICE can be used. | ||
145 | * | ||
146 | * @CAIFSO_REQ_PARAM: Used to set the request parameters for a | ||
147 | * utility channel. (maximum 256 bytes). This | ||
148 | * option must be set before connecting. | ||
149 | * | ||
150 | * @CAIFSO_RSP_PARAM: Gets the response parameters for a utility | ||
151 | * channel. (maximum 256 bytes). This option | ||
152 | * is valid after a successful connect. | ||
153 | * | ||
154 | * | ||
155 | * This enum defines the CAIF Socket options to be used on a socket | ||
156 | * | ||
157 | */ | ||
158 | enum caif_socket_opts { | ||
159 | CAIFSO_LINK_SELECT = 127, | ||
160 | CAIFSO_REQ_PARAM = 128, | ||
161 | CAIFSO_RSP_PARAM = 129, | ||
162 | }; | ||
163 | |||
164 | #endif /* _LINUX_CAIF_SOCKET_H */ | ||
diff --git a/include/linux/caif/if_caif.h b/include/linux/caif/if_caif.h new file mode 100644 index 000000000000..5e7eed4edf51 --- /dev/null +++ b/include/linux/caif/if_caif.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson AB 2010 | ||
3 | * Author: Sjur Brendeland/ sjur.brandeland@stericsson.com | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef IF_CAIF_H_ | ||
8 | #define IF_CAIF_H_ | ||
9 | #include <linux/sockios.h> | ||
10 | #include <linux/types.h> | ||
11 | #include <linux/socket.h> | ||
12 | |||
13 | /** | ||
14 | * enum ifla_caif - CAIF NetlinkRT parameters. | ||
15 | * @IFLA_CAIF_IPV4_CONNID: Connection ID for IPv4 PDP Context. | ||
16 | * The type of attribute is NLA_U32. | ||
17 | * @IFLA_CAIF_IPV6_CONNID: Connection ID for IPv6 PDP Context. | ||
18 | * The type of attribute is NLA_U32. | ||
19 | * @IFLA_CAIF_LOOPBACK: If different from zero, device is doing loopback | ||
20 | * The type of attribute is NLA_U8. | ||
21 | * | ||
22 | * When using RT Netlink to create, destroy or configure a CAIF IP interface, | ||
23 | * enum ifla_caif is used to specify the configuration attributes. | ||
24 | */ | ||
25 | enum ifla_caif { | ||
26 | __IFLA_CAIF_UNSPEC, | ||
27 | IFLA_CAIF_IPV4_CONNID, | ||
28 | IFLA_CAIF_IPV6_CONNID, | ||
29 | IFLA_CAIF_LOOPBACK, | ||
30 | __IFLA_CAIF_MAX | ||
31 | }; | ||
32 | #define IFLA_CAIF_MAX (__IFLA_CAIF_MAX-1) | ||
33 | |||
34 | #endif /*IF_CAIF_H_*/ | ||
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index 6e5a7f00223d..cc0bb4961669 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #ifndef CAN_DEV_H | 14 | #ifndef CAN_DEV_H |
15 | #define CAN_DEV_H | 15 | #define CAN_DEV_H |
16 | 16 | ||
17 | #include <linux/can.h> | ||
17 | #include <linux/can/netlink.h> | 18 | #include <linux/can/netlink.h> |
18 | #include <linux/can/error.h> | 19 | #include <linux/can/error.h> |
19 | 20 | ||
diff --git a/include/linux/can/platform/mcp251x.h b/include/linux/can/platform/mcp251x.h index 1448177d86d5..dba28268e651 100644 --- a/include/linux/can/platform/mcp251x.h +++ b/include/linux/can/platform/mcp251x.h | |||
@@ -26,8 +26,8 @@ | |||
26 | struct mcp251x_platform_data { | 26 | struct mcp251x_platform_data { |
27 | unsigned long oscillator_frequency; | 27 | unsigned long oscillator_frequency; |
28 | int model; | 28 | int model; |
29 | #define CAN_MCP251X_MCP2510 0 | 29 | #define CAN_MCP251X_MCP2510 0x2510 |
30 | #define CAN_MCP251X_MCP2515 1 | 30 | #define CAN_MCP251X_MCP2515 0x2515 |
31 | int (*board_specific_setup)(struct spi_device *spi); | 31 | int (*board_specific_setup)(struct spi_device *spi); |
32 | int (*transceiver_enable)(int enable); | 32 | int (*transceiver_enable)(int enable); |
33 | int (*power_enable) (int enable); | 33 | int (*power_enable) (int enable); |
diff --git a/include/linux/circ_buf.h b/include/linux/circ_buf.h index a2ed0591fb19..90f2471dc6f2 100644 --- a/include/linux/circ_buf.h +++ b/include/linux/circ_buf.h | |||
@@ -1,3 +1,7 @@ | |||
1 | /* | ||
2 | * See Documentation/circular-buffers.txt for more information. | ||
3 | */ | ||
4 | |||
1 | #ifndef _LINUX_CIRC_BUF_H | 5 | #ifndef _LINUX_CIRC_BUF_H |
2 | #define _LINUX_CIRC_BUF_H 1 | 6 | #define _LINUX_CIRC_BUF_H 1 |
3 | 7 | ||
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 0cf725bdd2a1..fc53492b6ad7 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -73,6 +73,7 @@ enum clock_event_nofitiers { | |||
73 | * @list: list head for the management code | 73 | * @list: list head for the management code |
74 | * @mode: operating mode assigned by the management code | 74 | * @mode: operating mode assigned by the management code |
75 | * @next_event: local storage for the next event in oneshot mode | 75 | * @next_event: local storage for the next event in oneshot mode |
76 | * @retries: number of forced programming retries | ||
76 | */ | 77 | */ |
77 | struct clock_event_device { | 78 | struct clock_event_device { |
78 | const char *name; | 79 | const char *name; |
@@ -93,6 +94,7 @@ struct clock_event_device { | |||
93 | struct list_head list; | 94 | struct list_head list; |
94 | enum clock_event_mode mode; | 95 | enum clock_event_mode mode; |
95 | ktime_t next_event; | 96 | ktime_t next_event; |
97 | unsigned long retries; | ||
96 | }; | 98 | }; |
97 | 99 | ||
98 | /* | 100 | /* |
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h index 5076fe0c8a96..6cee17c22313 100644 --- a/include/linux/delayacct.h +++ b/include/linux/delayacct.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define _LINUX_DELAYACCT_H | 18 | #define _LINUX_DELAYACCT_H |
19 | 19 | ||
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | /* | 23 | /* |
23 | * Per-task flags relevant to delay accounting | 24 | * Per-task flags relevant to delay accounting |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 78962272338a..4341b1a97a34 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
@@ -56,7 +56,7 @@ extern const char *drbd_buildtag(void); | |||
56 | #define REL_VERSION "8.3.7" | 56 | #define REL_VERSION "8.3.7" |
57 | #define API_VERSION 88 | 57 | #define API_VERSION 88 |
58 | #define PRO_VERSION_MIN 86 | 58 | #define PRO_VERSION_MIN 86 |
59 | #define PRO_VERSION_MAX 91 | 59 | #define PRO_VERSION_MAX 92 |
60 | 60 | ||
61 | 61 | ||
62 | enum drbd_io_error_p { | 62 | enum drbd_io_error_p { |
diff --git a/include/linux/drbd_nl.h b/include/linux/drbd_nl.h index a4d82f895994..f7431a4ca608 100644 --- a/include/linux/drbd_nl.h +++ b/include/linux/drbd_nl.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #endif | 12 | #endif |
13 | 13 | ||
14 | NL_PACKET(primary, 1, | 14 | NL_PACKET(primary, 1, |
15 | NL_BIT( 1, T_MAY_IGNORE, overwrite_peer) | 15 | NL_BIT( 1, T_MAY_IGNORE, primary_force) |
16 | ) | 16 | ) |
17 | 17 | ||
18 | NL_PACKET(secondary, 2, ) | 18 | NL_PACKET(secondary, 2, ) |
@@ -63,6 +63,7 @@ NL_PACKET(net_conf, 5, | |||
63 | NL_BIT( 41, T_MAY_IGNORE, always_asbp) | 63 | NL_BIT( 41, T_MAY_IGNORE, always_asbp) |
64 | NL_BIT( 61, T_MAY_IGNORE, no_cork) | 64 | NL_BIT( 61, T_MAY_IGNORE, no_cork) |
65 | NL_BIT( 62, T_MANDATORY, auto_sndbuf_size) | 65 | NL_BIT( 62, T_MANDATORY, auto_sndbuf_size) |
66 | NL_BIT( 70, T_MANDATORY, dry_run) | ||
66 | ) | 67 | ) |
67 | 68 | ||
68 | NL_PACKET(disconnect, 6, ) | 69 | NL_PACKET(disconnect, 6, ) |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index b33f316bb92e..276b40a16835 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -310,6 +310,7 @@ struct ethtool_perm_addr { | |||
310 | enum ethtool_flags { | 310 | enum ethtool_flags { |
311 | ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */ | 311 | ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */ |
312 | ETH_FLAG_NTUPLE = (1 << 27), /* N-tuple filters enabled */ | 312 | ETH_FLAG_NTUPLE = (1 << 27), /* N-tuple filters enabled */ |
313 | ETH_FLAG_RXHASH = (1 << 28), | ||
313 | }; | 314 | }; |
314 | 315 | ||
315 | /* The following structures are for supporting RX network flow | 316 | /* The following structures are for supporting RX network flow |
@@ -490,12 +491,12 @@ void ethtool_ntuple_flush(struct net_device *dev); | |||
490 | * get_ufo: Report whether UDP fragmentation offload is enabled | 491 | * get_ufo: Report whether UDP fragmentation offload is enabled |
491 | * set_ufo: Turn UDP fragmentation offload on or off | 492 | * set_ufo: Turn UDP fragmentation offload on or off |
492 | * self_test: Run specified self-tests | 493 | * self_test: Run specified self-tests |
493 | * get_strings: Return a set of strings that describe the requested objects | 494 | * get_strings: Return a set of strings that describe the requested objects |
494 | * phys_id: Identify the device | 495 | * phys_id: Identify the device |
495 | * get_stats: Return statistics about the device | 496 | * get_stats: Return statistics about the device |
496 | * get_flags: get 32-bit flags bitmap | 497 | * get_flags: get 32-bit flags bitmap |
497 | * set_flags: set 32-bit flags bitmap | 498 | * set_flags: set 32-bit flags bitmap |
498 | * | 499 | * |
499 | * Description: | 500 | * Description: |
500 | * | 501 | * |
501 | * get_settings: | 502 | * get_settings: |
@@ -531,14 +532,20 @@ struct ethtool_ops { | |||
531 | int (*nway_reset)(struct net_device *); | 532 | int (*nway_reset)(struct net_device *); |
532 | u32 (*get_link)(struct net_device *); | 533 | u32 (*get_link)(struct net_device *); |
533 | int (*get_eeprom_len)(struct net_device *); | 534 | int (*get_eeprom_len)(struct net_device *); |
534 | int (*get_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); | 535 | int (*get_eeprom)(struct net_device *, |
535 | int (*set_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); | 536 | struct ethtool_eeprom *, u8 *); |
537 | int (*set_eeprom)(struct net_device *, | ||
538 | struct ethtool_eeprom *, u8 *); | ||
536 | int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *); | 539 | int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *); |
537 | int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *); | 540 | int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *); |
538 | void (*get_ringparam)(struct net_device *, struct ethtool_ringparam *); | 541 | void (*get_ringparam)(struct net_device *, |
539 | int (*set_ringparam)(struct net_device *, struct ethtool_ringparam *); | 542 | struct ethtool_ringparam *); |
540 | void (*get_pauseparam)(struct net_device *, struct ethtool_pauseparam*); | 543 | int (*set_ringparam)(struct net_device *, |
541 | int (*set_pauseparam)(struct net_device *, struct ethtool_pauseparam*); | 544 | struct ethtool_ringparam *); |
545 | void (*get_pauseparam)(struct net_device *, | ||
546 | struct ethtool_pauseparam*); | ||
547 | int (*set_pauseparam)(struct net_device *, | ||
548 | struct ethtool_pauseparam*); | ||
542 | u32 (*get_rx_csum)(struct net_device *); | 549 | u32 (*get_rx_csum)(struct net_device *); |
543 | int (*set_rx_csum)(struct net_device *, u32); | 550 | int (*set_rx_csum)(struct net_device *, u32); |
544 | u32 (*get_tx_csum)(struct net_device *); | 551 | u32 (*get_tx_csum)(struct net_device *); |
@@ -550,21 +557,24 @@ struct ethtool_ops { | |||
550 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); | 557 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); |
551 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); | 558 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); |
552 | int (*phys_id)(struct net_device *, u32); | 559 | int (*phys_id)(struct net_device *, u32); |
553 | void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); | 560 | void (*get_ethtool_stats)(struct net_device *, |
561 | struct ethtool_stats *, u64 *); | ||
554 | int (*begin)(struct net_device *); | 562 | int (*begin)(struct net_device *); |
555 | void (*complete)(struct net_device *); | 563 | void (*complete)(struct net_device *); |
556 | u32 (*get_ufo)(struct net_device *); | 564 | u32 (*get_ufo)(struct net_device *); |
557 | int (*set_ufo)(struct net_device *, u32); | 565 | int (*set_ufo)(struct net_device *, u32); |
558 | u32 (*get_flags)(struct net_device *); | 566 | u32 (*get_flags)(struct net_device *); |
559 | int (*set_flags)(struct net_device *, u32); | 567 | int (*set_flags)(struct net_device *, u32); |
560 | u32 (*get_priv_flags)(struct net_device *); | 568 | u32 (*get_priv_flags)(struct net_device *); |
561 | int (*set_priv_flags)(struct net_device *, u32); | 569 | int (*set_priv_flags)(struct net_device *, u32); |
562 | int (*get_sset_count)(struct net_device *, int); | 570 | int (*get_sset_count)(struct net_device *, int); |
563 | int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *); | 571 | int (*get_rxnfc)(struct net_device *, |
572 | struct ethtool_rxnfc *, void *); | ||
564 | int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); | 573 | int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); |
565 | int (*flash_device)(struct net_device *, struct ethtool_flash *); | 574 | int (*flash_device)(struct net_device *, struct ethtool_flash *); |
566 | int (*reset)(struct net_device *, u32 *); | 575 | int (*reset)(struct net_device *, u32 *); |
567 | int (*set_rx_ntuple)(struct net_device *, struct ethtool_rx_ntuple *); | 576 | int (*set_rx_ntuple)(struct net_device *, |
577 | struct ethtool_rx_ntuple *); | ||
568 | int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *); | 578 | int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *); |
569 | }; | 579 | }; |
570 | #endif /* __KERNEL__ */ | 580 | #endif /* __KERNEL__ */ |
@@ -576,29 +586,29 @@ struct ethtool_ops { | |||
576 | #define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */ | 586 | #define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */ |
577 | #define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */ | 587 | #define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */ |
578 | #define ETHTOOL_SWOL 0x00000006 /* Set wake-on-lan options. */ | 588 | #define ETHTOOL_SWOL 0x00000006 /* Set wake-on-lan options. */ |
579 | #define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */ | 589 | #define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */ |
580 | #define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */ | 590 | #define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */ |
581 | #define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */ | 591 | #define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */ |
582 | #define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */ | 592 | #define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */ |
583 | #define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ | 593 | #define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ |
584 | #define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */ | 594 | #define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */ |
585 | #define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ | 595 | #define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ |
586 | #define ETHTOOL_SCOALESCE 0x0000000f /* Set coalesce config. */ | 596 | #define ETHTOOL_SCOALESCE 0x0000000f /* Set coalesce config. */ |
587 | #define ETHTOOL_GRINGPARAM 0x00000010 /* Get ring parameters */ | 597 | #define ETHTOOL_GRINGPARAM 0x00000010 /* Get ring parameters */ |
588 | #define ETHTOOL_SRINGPARAM 0x00000011 /* Set ring parameters. */ | 598 | #define ETHTOOL_SRINGPARAM 0x00000011 /* Set ring parameters. */ |
589 | #define ETHTOOL_GPAUSEPARAM 0x00000012 /* Get pause parameters */ | 599 | #define ETHTOOL_GPAUSEPARAM 0x00000012 /* Get pause parameters */ |
590 | #define ETHTOOL_SPAUSEPARAM 0x00000013 /* Set pause parameters. */ | 600 | #define ETHTOOL_SPAUSEPARAM 0x00000013 /* Set pause parameters. */ |
591 | #define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */ | 601 | #define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */ |
592 | #define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */ | 602 | #define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */ |
593 | #define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */ | 603 | #define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */ |
594 | #define ETHTOOL_STXCSUM 0x00000017 /* Set TX hw csum enable (ethtool_value) */ | 604 | #define ETHTOOL_STXCSUM 0x00000017 /* Set TX hw csum enable (ethtool_value) */ |
595 | #define ETHTOOL_GSG 0x00000018 /* Get scatter-gather enable | 605 | #define ETHTOOL_GSG 0x00000018 /* Get scatter-gather enable |
596 | * (ethtool_value) */ | 606 | * (ethtool_value) */ |
597 | #define ETHTOOL_SSG 0x00000019 /* Set scatter-gather enable | 607 | #define ETHTOOL_SSG 0x00000019 /* Set scatter-gather enable |
598 | * (ethtool_value). */ | 608 | * (ethtool_value). */ |
599 | #define ETHTOOL_TEST 0x0000001a /* execute NIC self-test. */ | 609 | #define ETHTOOL_TEST 0x0000001a /* execute NIC self-test. */ |
600 | #define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */ | 610 | #define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */ |
601 | #define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */ | 611 | #define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */ |
602 | #define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */ | 612 | #define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */ |
603 | #define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */ | 613 | #define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */ |
604 | #define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */ | 614 | #define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */ |
@@ -609,24 +619,24 @@ struct ethtool_ops { | |||
609 | #define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */ | 619 | #define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */ |
610 | #define ETHTOOL_GFLAGS 0x00000025 /* Get flags bitmap(ethtool_value) */ | 620 | #define ETHTOOL_GFLAGS 0x00000025 /* Get flags bitmap(ethtool_value) */ |
611 | #define ETHTOOL_SFLAGS 0x00000026 /* Set flags bitmap(ethtool_value) */ | 621 | #define ETHTOOL_SFLAGS 0x00000026 /* Set flags bitmap(ethtool_value) */ |
612 | #define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */ | 622 | #define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */ |
613 | #define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */ | 623 | #define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */ |
614 | 624 | ||
615 | #define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */ | 625 | #define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */ |
616 | #define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */ | 626 | #define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */ |
617 | #define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */ | 627 | #define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */ |
618 | #define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */ | 628 | #define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */ |
619 | #define ETHTOOL_GRXRINGS 0x0000002d /* Get RX rings available for LB */ | 629 | #define ETHTOOL_GRXRINGS 0x0000002d /* Get RX rings available for LB */ |
620 | #define ETHTOOL_GRXCLSRLCNT 0x0000002e /* Get RX class rule count */ | 630 | #define ETHTOOL_GRXCLSRLCNT 0x0000002e /* Get RX class rule count */ |
621 | #define ETHTOOL_GRXCLSRULE 0x0000002f /* Get RX classification rule */ | 631 | #define ETHTOOL_GRXCLSRULE 0x0000002f /* Get RX classification rule */ |
622 | #define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */ | 632 | #define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */ |
623 | #define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ | 633 | #define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ |
624 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ | 634 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ |
625 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ | 635 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ |
626 | #define ETHTOOL_RESET 0x00000034 /* Reset hardware */ | 636 | #define ETHTOOL_RESET 0x00000034 /* Reset hardware */ |
627 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ | 637 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ |
628 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ | 638 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ |
629 | #define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */ | 639 | #define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */ |
630 | 640 | ||
631 | /* compatibility with older code */ | 641 | /* compatibility with older code */ |
632 | #define SPARC_ETH_GSET ETHTOOL_GSET | 642 | #define SPARC_ETH_GSET ETHTOOL_GSET |
@@ -635,18 +645,18 @@ struct ethtool_ops { | |||
635 | /* Indicates what features are supported by the interface. */ | 645 | /* Indicates what features are supported by the interface. */ |
636 | #define SUPPORTED_10baseT_Half (1 << 0) | 646 | #define SUPPORTED_10baseT_Half (1 << 0) |
637 | #define SUPPORTED_10baseT_Full (1 << 1) | 647 | #define SUPPORTED_10baseT_Full (1 << 1) |
638 | #define SUPPORTED_100baseT_Half (1 << 2) | 648 | #define SUPPORTED_100baseT_Half (1 << 2) |
639 | #define SUPPORTED_100baseT_Full (1 << 3) | 649 | #define SUPPORTED_100baseT_Full (1 << 3) |
640 | #define SUPPORTED_1000baseT_Half (1 << 4) | 650 | #define SUPPORTED_1000baseT_Half (1 << 4) |
641 | #define SUPPORTED_1000baseT_Full (1 << 5) | 651 | #define SUPPORTED_1000baseT_Full (1 << 5) |
642 | #define SUPPORTED_Autoneg (1 << 6) | 652 | #define SUPPORTED_Autoneg (1 << 6) |
643 | #define SUPPORTED_TP (1 << 7) | 653 | #define SUPPORTED_TP (1 << 7) |
644 | #define SUPPORTED_AUI (1 << 8) | 654 | #define SUPPORTED_AUI (1 << 8) |
645 | #define SUPPORTED_MII (1 << 9) | 655 | #define SUPPORTED_MII (1 << 9) |
646 | #define SUPPORTED_FIBRE (1 << 10) | 656 | #define SUPPORTED_FIBRE (1 << 10) |
647 | #define SUPPORTED_BNC (1 << 11) | 657 | #define SUPPORTED_BNC (1 << 11) |
648 | #define SUPPORTED_10000baseT_Full (1 << 12) | 658 | #define SUPPORTED_10000baseT_Full (1 << 12) |
649 | #define SUPPORTED_Pause (1 << 13) | 659 | #define SUPPORTED_Pause (1 << 13) |
650 | #define SUPPORTED_Asym_Pause (1 << 14) | 660 | #define SUPPORTED_Asym_Pause (1 << 14) |
651 | #define SUPPORTED_2500baseX_Full (1 << 15) | 661 | #define SUPPORTED_2500baseX_Full (1 << 15) |
652 | #define SUPPORTED_Backplane (1 << 16) | 662 | #define SUPPORTED_Backplane (1 << 16) |
@@ -656,8 +666,8 @@ struct ethtool_ops { | |||
656 | #define SUPPORTED_10000baseR_FEC (1 << 20) | 666 | #define SUPPORTED_10000baseR_FEC (1 << 20) |
657 | 667 | ||
658 | /* Indicates what features are advertised by the interface. */ | 668 | /* Indicates what features are advertised by the interface. */ |
659 | #define ADVERTISED_10baseT_Half (1 << 0) | 669 | #define ADVERTISED_10baseT_Half (1 << 0) |
660 | #define ADVERTISED_10baseT_Full (1 << 1) | 670 | #define ADVERTISED_10baseT_Full (1 << 1) |
661 | #define ADVERTISED_100baseT_Half (1 << 2) | 671 | #define ADVERTISED_100baseT_Half (1 << 2) |
662 | #define ADVERTISED_100baseT_Full (1 << 3) | 672 | #define ADVERTISED_100baseT_Full (1 << 3) |
663 | #define ADVERTISED_1000baseT_Half (1 << 4) | 673 | #define ADVERTISED_1000baseT_Half (1 << 4) |
@@ -696,12 +706,12 @@ struct ethtool_ops { | |||
696 | #define DUPLEX_FULL 0x01 | 706 | #define DUPLEX_FULL 0x01 |
697 | 707 | ||
698 | /* Which connector port. */ | 708 | /* Which connector port. */ |
699 | #define PORT_TP 0x00 | 709 | #define PORT_TP 0x00 |
700 | #define PORT_AUI 0x01 | 710 | #define PORT_AUI 0x01 |
701 | #define PORT_MII 0x02 | 711 | #define PORT_MII 0x02 |
702 | #define PORT_FIBRE 0x03 | 712 | #define PORT_FIBRE 0x03 |
703 | #define PORT_BNC 0x04 | 713 | #define PORT_BNC 0x04 |
704 | #define PORT_DA 0x05 | 714 | #define PORT_DA 0x05 |
705 | #define PORT_NONE 0xef | 715 | #define PORT_NONE 0xef |
706 | #define PORT_OTHER 0xff | 716 | #define PORT_OTHER 0xff |
707 | 717 | ||
@@ -715,7 +725,7 @@ struct ethtool_ops { | |||
715 | /* Enable or disable autonegotiation. If this is set to enable, | 725 | /* Enable or disable autonegotiation. If this is set to enable, |
716 | * the forced link modes above are completely ignored. | 726 | * the forced link modes above are completely ignored. |
717 | */ | 727 | */ |
718 | #define AUTONEG_DISABLE 0x00 | 728 | #define AUTONEG_DISABLE 0x00 |
719 | #define AUTONEG_ENABLE 0x01 | 729 | #define AUTONEG_ENABLE 0x01 |
720 | 730 | ||
721 | /* Mode MDI or MDI-X */ | 731 | /* Mode MDI or MDI-X */ |
@@ -746,8 +756,8 @@ struct ethtool_ops { | |||
746 | #define AH_V6_FLOW 0x0b | 756 | #define AH_V6_FLOW 0x0b |
747 | #define ESP_V6_FLOW 0x0c | 757 | #define ESP_V6_FLOW 0x0c |
748 | #define IP_USER_FLOW 0x0d | 758 | #define IP_USER_FLOW 0x0d |
749 | #define IPV4_FLOW 0x10 | 759 | #define IPV4_FLOW 0x10 |
750 | #define IPV6_FLOW 0x11 | 760 | #define IPV6_FLOW 0x11 |
751 | 761 | ||
752 | /* L3-L4 network traffic flow hash options */ | 762 | /* L3-L4 network traffic flow hash options */ |
753 | #define RXH_L2DA (1 << 1) | 763 | #define RXH_L2DA (1 << 1) |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index cac84b006667..5f494b465097 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -565,17 +565,17 @@ enum { | |||
565 | 565 | ||
566 | static inline int ext3_test_inode_state(struct inode *inode, int bit) | 566 | static inline int ext3_test_inode_state(struct inode *inode, int bit) |
567 | { | 567 | { |
568 | return test_bit(bit, &EXT3_I(inode)->i_state); | 568 | return test_bit(bit, &EXT3_I(inode)->i_state_flags); |
569 | } | 569 | } |
570 | 570 | ||
571 | static inline void ext3_set_inode_state(struct inode *inode, int bit) | 571 | static inline void ext3_set_inode_state(struct inode *inode, int bit) |
572 | { | 572 | { |
573 | set_bit(bit, &EXT3_I(inode)->i_state); | 573 | set_bit(bit, &EXT3_I(inode)->i_state_flags); |
574 | } | 574 | } |
575 | 575 | ||
576 | static inline void ext3_clear_inode_state(struct inode *inode, int bit) | 576 | static inline void ext3_clear_inode_state(struct inode *inode, int bit) |
577 | { | 577 | { |
578 | clear_bit(bit, &EXT3_I(inode)->i_state); | 578 | clear_bit(bit, &EXT3_I(inode)->i_state_flags); |
579 | } | 579 | } |
580 | #else | 580 | #else |
581 | /* Assume that user mode programs are passing in an ext3fs superblock, not | 581 | /* Assume that user mode programs are passing in an ext3fs superblock, not |
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 7679acdb519a..f42c098aed8d 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h | |||
@@ -87,7 +87,7 @@ struct ext3_inode_info { | |||
87 | * near to their parent directory's inode. | 87 | * near to their parent directory's inode. |
88 | */ | 88 | */ |
89 | __u32 i_block_group; | 89 | __u32 i_block_group; |
90 | unsigned long i_state; /* Dynamic state flags for ext3 */ | 90 | unsigned long i_state_flags; /* Dynamic state flags for ext3 */ |
91 | 91 | ||
92 | /* block reservation info */ | 92 | /* block reservation info */ |
93 | struct ext3_block_alloc_info *i_block_alloc_info; | 93 | struct ext3_block_alloc_info *i_block_alloc_info; |
diff --git a/include/linux/fib_rules.h b/include/linux/fib_rules.h index 51da65b68b85..04a397619ebe 100644 --- a/include/linux/fib_rules.h +++ b/include/linux/fib_rules.h | |||
@@ -15,6 +15,14 @@ | |||
15 | /* try to find source address in routing lookups */ | 15 | /* try to find source address in routing lookups */ |
16 | #define FIB_RULE_FIND_SADDR 0x00010000 | 16 | #define FIB_RULE_FIND_SADDR 0x00010000 |
17 | 17 | ||
18 | /* fib_rules families. values up to 127 are reserved for real address | ||
19 | * families, values above 128 may be used arbitrarily. | ||
20 | */ | ||
21 | #define FIB_RULES_IPV4 AF_INET | ||
22 | #define FIB_RULES_IPV6 AF_INET6 | ||
23 | #define FIB_RULES_DECNET AF_DECnet | ||
24 | #define FIB_RULES_IPMR 128 | ||
25 | |||
18 | struct fib_rule_hdr { | 26 | struct fib_rule_hdr { |
19 | __u8 family; | 27 | __u8 family; |
20 | __u8 dst_len; | 28 | __u8 dst_len; |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 5a361f85cfec..da7e52b099f3 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -64,9 +64,12 @@ extern bool freeze_task(struct task_struct *p, bool sig_only); | |||
64 | extern void cancel_freezing(struct task_struct *p); | 64 | extern void cancel_freezing(struct task_struct *p); |
65 | 65 | ||
66 | #ifdef CONFIG_CGROUP_FREEZER | 66 | #ifdef CONFIG_CGROUP_FREEZER |
67 | extern int cgroup_frozen(struct task_struct *task); | 67 | extern int cgroup_freezing_or_frozen(struct task_struct *task); |
68 | #else /* !CONFIG_CGROUP_FREEZER */ | 68 | #else /* !CONFIG_CGROUP_FREEZER */ |
69 | static inline int cgroup_frozen(struct task_struct *task) { return 0; } | 69 | static inline int cgroup_freezing_or_frozen(struct task_struct *task) |
70 | { | ||
71 | return 0; | ||
72 | } | ||
70 | #endif /* !CONFIG_CGROUP_FREEZER */ | 73 | #endif /* !CONFIG_CGROUP_FREEZER */ |
71 | 74 | ||
72 | /* | 75 | /* |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 10b8dedcd18b..39d57bc6cc71 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2212,6 +2212,7 @@ extern int generic_segment_checks(const struct iovec *iov, | |||
2212 | /* fs/block_dev.c */ | 2212 | /* fs/block_dev.c */ |
2213 | extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, | 2213 | extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, |
2214 | unsigned long nr_segs, loff_t pos); | 2214 | unsigned long nr_segs, loff_t pos); |
2215 | extern int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync); | ||
2215 | 2216 | ||
2216 | /* fs/splice.c */ | 2217 | /* fs/splice.c */ |
2217 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, | 2218 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, |
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 7be0c6fbe880..c57db27ac861 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
@@ -105,7 +105,7 @@ struct fscache_operation { | |||
105 | /* operation releaser */ | 105 | /* operation releaser */ |
106 | fscache_operation_release_t release; | 106 | fscache_operation_release_t release; |
107 | 107 | ||
108 | #ifdef CONFIG_SLOW_WORK_PROC | 108 | #ifdef CONFIG_SLOW_WORK_DEBUG |
109 | const char *name; /* operation name */ | 109 | const char *name; /* operation name */ |
110 | const char *state; /* operation state */ | 110 | const char *state; /* operation state */ |
111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) | 111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index df8fd9a3b214..01755909ce81 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/inotify.h> | 15 | #include <linux/inotify.h> |
16 | #include <linux/fsnotify_backend.h> | 16 | #include <linux/fsnotify_backend.h> |
17 | #include <linux/audit.h> | 17 | #include <linux/audit.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * fsnotify_d_instantiate - instantiate a dentry for inode | 21 | * fsnotify_d_instantiate - instantiate a dentry for inode |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 6b7c444ab8f6..c0f4b364c711 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -131,12 +131,12 @@ struct ftrace_event_call { | |||
131 | void *mod; | 131 | void *mod; |
132 | void *data; | 132 | void *data; |
133 | 133 | ||
134 | int profile_count; | 134 | int perf_refcount; |
135 | int (*profile_enable)(struct ftrace_event_call *); | 135 | int (*perf_event_enable)(struct ftrace_event_call *); |
136 | void (*profile_disable)(struct ftrace_event_call *); | 136 | void (*perf_event_disable)(struct ftrace_event_call *); |
137 | }; | 137 | }; |
138 | 138 | ||
139 | #define FTRACE_MAX_PROFILE_SIZE 2048 | 139 | #define PERF_MAX_TRACE_SIZE 2048 |
140 | 140 | ||
141 | #define MAX_FILTER_PRED 32 | 141 | #define MAX_FILTER_PRED 32 |
142 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ | 142 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ |
@@ -187,22 +187,25 @@ do { \ | |||
187 | 187 | ||
188 | #ifdef CONFIG_PERF_EVENTS | 188 | #ifdef CONFIG_PERF_EVENTS |
189 | struct perf_event; | 189 | struct perf_event; |
190 | extern int ftrace_profile_enable(int event_id); | 190 | |
191 | extern void ftrace_profile_disable(int event_id); | 191 | DECLARE_PER_CPU(struct pt_regs, perf_trace_regs); |
192 | |||
193 | extern int perf_trace_enable(int event_id); | ||
194 | extern void perf_trace_disable(int event_id); | ||
192 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, | 195 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, |
193 | char *filter_str); | 196 | char *filter_str); |
194 | extern void ftrace_profile_free_filter(struct perf_event *event); | 197 | extern void ftrace_profile_free_filter(struct perf_event *event); |
195 | extern void * | 198 | extern void * |
196 | ftrace_perf_buf_prepare(int size, unsigned short type, int *rctxp, | 199 | perf_trace_buf_prepare(int size, unsigned short type, int *rctxp, |
197 | unsigned long *irq_flags); | 200 | unsigned long *irq_flags); |
198 | 201 | ||
199 | static inline void | 202 | static inline void |
200 | ftrace_perf_buf_submit(void *raw_data, int size, int rctx, u64 addr, | 203 | perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, |
201 | u64 count, unsigned long irq_flags) | 204 | u64 count, unsigned long irq_flags, struct pt_regs *regs) |
202 | { | 205 | { |
203 | struct trace_entry *entry = raw_data; | 206 | struct trace_entry *entry = raw_data; |
204 | 207 | ||
205 | perf_tp_event(entry->type, addr, count, raw_data, size); | 208 | perf_tp_event(entry->type, addr, count, raw_data, size, regs); |
206 | perf_swevent_put_recursion_context(rctx); | 209 | perf_swevent_put_recursion_context(rctx); |
207 | local_irq_restore(irq_flags); | 210 | local_irq_restore(irq_flags); |
208 | } | 211 | } |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 48e68da097f6..361d1cc288d0 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | struct gameport { | 21 | struct gameport { |
21 | 22 | ||
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h index b834ef6d59fa..61549b26ad6f 100644 --- a/include/linux/genetlink.h +++ b/include/linux/genetlink.h | |||
@@ -80,4 +80,12 @@ enum { | |||
80 | 80 | ||
81 | #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) | 81 | #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) |
82 | 82 | ||
83 | #ifdef __KERNEL__ | ||
84 | |||
85 | /* All generic netlink requests are serialized by a global lock. */ | ||
86 | extern void genl_lock(void); | ||
87 | extern void genl_unlock(void); | ||
88 | |||
89 | #endif /* __KERNEL__ */ | ||
90 | |||
83 | #endif /* __LINUX_GENERIC_NETLINK_H */ | 91 | #endif /* __LINUX_GENERIC_NETLINK_H */ |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 56b50514ab25..5f2f4c4d8fb0 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -109,7 +109,7 @@ struct hd_struct { | |||
109 | }; | 109 | }; |
110 | 110 | ||
111 | #define GENHD_FL_REMOVABLE 1 | 111 | #define GENHD_FL_REMOVABLE 1 |
112 | #define GENHD_FL_DRIVERFS 2 | 112 | /* 2 is unused */ |
113 | #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 | 113 | #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 |
114 | #define GENHD_FL_CD 8 | 114 | #define GENHD_FL_CD 8 |
115 | #define GENHD_FL_UP 16 | 115 | #define GENHD_FL_UP 16 |
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 87018dc5527d..9e7a12d6385d 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
@@ -782,7 +782,6 @@ extern int i2o_exec_lct_get(struct i2o_controller *); | |||
782 | #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver) | 782 | #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver) |
783 | #define to_i2o_device(dev) container_of(dev, struct i2o_device, device) | 783 | #define to_i2o_device(dev) container_of(dev, struct i2o_device, device) |
784 | #define to_i2o_controller(dev) container_of(dev, struct i2o_controller, device) | 784 | #define to_i2o_controller(dev) container_of(dev, struct i2o_controller, device) |
785 | #define kobj_to_i2o_device(kobj) to_i2o_device(container_of(kobj, struct device, kobj)) | ||
786 | 785 | ||
787 | /** | 786 | /** |
788 | * i2o_out_to_virt - Turn an I2O message to a virtual address | 787 | * i2o_out_to_virt - Turn an I2O message to a virtual address |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 97e6ab435184..3239d1c10acb 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1169,6 +1169,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); | |||
1169 | extern void ide_timer_expiry(unsigned long); | 1169 | extern void ide_timer_expiry(unsigned long); |
1170 | extern irqreturn_t ide_intr(int irq, void *dev_id); | 1170 | extern irqreturn_t ide_intr(int irq, void *dev_id); |
1171 | extern void do_ide_request(struct request_queue *); | 1171 | extern void do_ide_request(struct request_queue *); |
1172 | extern void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq); | ||
1172 | 1173 | ||
1173 | void ide_init_disk(struct gendisk *, ide_drive_t *); | 1174 | void ide_init_disk(struct gendisk *, ide_drive_t *); |
1174 | 1175 | ||
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 19984958ab7b..1252ba1fbff5 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -1211,6 +1211,8 @@ enum ieee80211_category { | |||
1211 | WLAN_CATEGORY_SA_QUERY = 8, | 1211 | WLAN_CATEGORY_SA_QUERY = 8, |
1212 | WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9, | 1212 | WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9, |
1213 | WLAN_CATEGORY_WMM = 17, | 1213 | WLAN_CATEGORY_WMM = 17, |
1214 | WLAN_CATEGORY_MESH_PLINK = 30, /* Pending ANA approval */ | ||
1215 | WLAN_CATEGORY_MESH_PATH_SEL = 32, /* Pending ANA approval */ | ||
1214 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, | 1216 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, |
1215 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, | 1217 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, |
1216 | }; | 1218 | }; |
@@ -1324,7 +1326,6 @@ enum ieee80211_back_actioncode { | |||
1324 | enum ieee80211_back_parties { | 1326 | enum ieee80211_back_parties { |
1325 | WLAN_BACK_RECIPIENT = 0, | 1327 | WLAN_BACK_RECIPIENT = 0, |
1326 | WLAN_BACK_INITIATOR = 1, | 1328 | WLAN_BACK_INITIATOR = 1, |
1327 | WLAN_BACK_TIMER = 2, | ||
1328 | }; | 1329 | }; |
1329 | 1330 | ||
1330 | /* SA Query action */ | 1331 | /* SA Query action */ |
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h index e80b7f88f7c6..6d722f41ee7c 100644 --- a/include/linux/if_arp.h +++ b/include/linux/if_arp.h | |||
@@ -90,6 +90,7 @@ | |||
90 | 90 | ||
91 | #define ARPHRD_PHONET 820 /* PhoNet media type */ | 91 | #define ARPHRD_PHONET 820 /* PhoNet media type */ |
92 | #define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */ | 92 | #define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */ |
93 | #define ARPHRD_CAIF 822 /* CAIF media type */ | ||
93 | 94 | ||
94 | #define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */ | 95 | #define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */ |
95 | #define ARPHRD_NONE 0xFFFE /* zero header length */ | 96 | #define ARPHRD_NONE 0xFFFE /* zero header length */ |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index 299b4121f914..bed7a4682b90 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -109,6 +109,7 @@ | |||
109 | #define ETH_P_TRAILER 0x001C /* Trailer switch tagging */ | 109 | #define ETH_P_TRAILER 0x001C /* Trailer switch tagging */ |
110 | #define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */ | 110 | #define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */ |
111 | #define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */ | 111 | #define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */ |
112 | #define ETH_P_CAIF 0x00F7 /* ST-Ericsson CAIF protocol */ | ||
112 | 113 | ||
113 | /* | 114 | /* |
114 | * This is an Ethernet frame header. | 115 | * This is an Ethernet frame header. |
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h index aa57a5f993fc..6ac23ef1801a 100644 --- a/include/linux/if_packet.h +++ b/include/linux/if_packet.h | |||
@@ -47,6 +47,7 @@ struct sockaddr_ll { | |||
47 | #define PACKET_TX_RING 13 | 47 | #define PACKET_TX_RING 13 |
48 | #define PACKET_LOSS 14 | 48 | #define PACKET_LOSS 14 |
49 | #define PACKET_VNET_HDR 15 | 49 | #define PACKET_VNET_HDR 15 |
50 | #define PACKET_TX_TIMESTAMP 16 | ||
50 | 51 | ||
51 | struct tpacket_stats { | 52 | struct tpacket_stats { |
52 | unsigned int tp_packets; | 53 | unsigned int tp_packets; |
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h index c58baea4a25b..184bc5566207 100644 --- a/include/linux/if_pppol2tp.h +++ b/include/linux/if_pppol2tp.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Linux PPP over L2TP (PPPoL2TP) Socket Implementation (RFC 2661) | 2 | * Linux PPP over L2TP (PPPoL2TP) Socket Implementation (RFC 2661) |
3 | * | 3 | * |
4 | * This file supplies definitions required by the PPP over L2TP driver | 4 | * This file supplies definitions required by the PPP over L2TP driver |
5 | * (pppol2tp.c). All version information wrt this file is located in pppol2tp.c | 5 | * (l2tp_ppp.c). All version information wrt this file is located in l2tp_ppp.c |
6 | * | 6 | * |
7 | * License: | 7 | * License: |
8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
@@ -35,6 +35,20 @@ struct pppol2tp_addr { | |||
35 | __u16 d_tunnel, d_session; /* For sending outgoing packets */ | 35 | __u16 d_tunnel, d_session; /* For sending outgoing packets */ |
36 | }; | 36 | }; |
37 | 37 | ||
38 | /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 | ||
39 | * bits. So we need a different sockaddr structure. | ||
40 | */ | ||
41 | struct pppol2tpv3_addr { | ||
42 | pid_t pid; /* pid that owns the fd. | ||
43 | * 0 => current */ | ||
44 | int fd; /* FD of UDP or IP socket to use */ | ||
45 | |||
46 | struct sockaddr_in addr; /* IP address and port to send to */ | ||
47 | |||
48 | __u32 s_tunnel, s_session; /* For matching incoming packets */ | ||
49 | __u32 d_tunnel, d_session; /* For sending outgoing packets */ | ||
50 | }; | ||
51 | |||
38 | /* Socket options: | 52 | /* Socket options: |
39 | * DEBUG - bitmask of debug message categories | 53 | * DEBUG - bitmask of debug message categories |
40 | * SENDSEQ - 0 => don't send packets with sequence numbers | 54 | * SENDSEQ - 0 => don't send packets with sequence numbers |
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 90b5fae5d714..a6577af0c4e6 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
@@ -72,6 +72,15 @@ struct sockaddr_pppol2tp { | |||
72 | struct pppol2tp_addr pppol2tp; | 72 | struct pppol2tp_addr pppol2tp; |
73 | }__attribute__ ((packed)); | 73 | }__attribute__ ((packed)); |
74 | 74 | ||
75 | /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 | ||
76 | * bits. So we need a different sockaddr structure. | ||
77 | */ | ||
78 | struct sockaddr_pppol2tpv3 { | ||
79 | sa_family_t sa_family; /* address family, AF_PPPOX */ | ||
80 | unsigned int sa_protocol; /* protocol identifier */ | ||
81 | struct pppol2tpv3_addr pppol2tp; | ||
82 | } __attribute__ ((packed)); | ||
83 | |||
75 | /********************************************************************* | 84 | /********************************************************************* |
76 | * | 85 | * |
77 | * ioctl interface for defining forwarding of connections | 86 | * ioctl interface for defining forwarding of connections |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index 1822d635be6b..16b92d008bed 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _IF_TUNNEL_H_ | 2 | #define _IF_TUNNEL_H_ |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <asm/byteorder.h> | ||
5 | 6 | ||
6 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
7 | #include <linux/ip.h> | 8 | #include <linux/ip.h> |
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 97eb928b4924..25085ddd955f 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define _LINUX_IO_MAPPING_H | 19 | #define _LINUX_IO_MAPPING_H |
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/slab.h> | ||
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
23 | #include <asm/page.h> | 24 | #include <asm/page.h> |
24 | #include <asm/iomap.h> | 25 | #include <asm/iomap.h> |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 71ab79da7e7f..26fad187d661 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -112,12 +112,14 @@ struct resource_list { | |||
112 | extern struct resource ioport_resource; | 112 | extern struct resource ioport_resource; |
113 | extern struct resource iomem_resource; | 113 | extern struct resource iomem_resource; |
114 | 114 | ||
115 | extern struct resource *request_resource_conflict(struct resource *root, struct resource *new); | ||
115 | extern int request_resource(struct resource *root, struct resource *new); | 116 | extern int request_resource(struct resource *root, struct resource *new); |
116 | extern int release_resource(struct resource *new); | 117 | extern int release_resource(struct resource *new); |
117 | void release_child_resources(struct resource *new); | 118 | void release_child_resources(struct resource *new); |
118 | extern void reserve_region_with_split(struct resource *root, | 119 | extern void reserve_region_with_split(struct resource *root, |
119 | resource_size_t start, resource_size_t end, | 120 | resource_size_t start, resource_size_t end, |
120 | const char *name); | 121 | const char *name); |
122 | extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new); | ||
121 | extern int insert_resource(struct resource *parent, struct resource *new); | 123 | extern int insert_resource(struct resource *parent, struct resource *new); |
122 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); | 124 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); |
123 | extern int allocate_resource(struct resource *root, struct resource *new, | 125 | extern int allocate_resource(struct resource *root, struct resource *new, |
diff --git a/include/linux/iscsi_ibft.h b/include/linux/iscsi_ibft.h index 6092487e2950..d2e4042f8f5e 100644 --- a/include/linux/iscsi_ibft.h +++ b/include/linux/iscsi_ibft.h | |||
@@ -42,9 +42,13 @@ extern struct ibft_table_header *ibft_addr; | |||
42 | * mapped address is set in the ibft_addr variable. | 42 | * mapped address is set in the ibft_addr variable. |
43 | */ | 43 | */ |
44 | #ifdef CONFIG_ISCSI_IBFT_FIND | 44 | #ifdef CONFIG_ISCSI_IBFT_FIND |
45 | extern void __init reserve_ibft_region(void); | 45 | unsigned long find_ibft_region(unsigned long *sizep); |
46 | #else | 46 | #else |
47 | static inline void reserve_ibft_region(void) { } | 47 | static inline unsigned long find_ibft_region(unsigned long *sizep) |
48 | { | ||
49 | *sizep = 0; | ||
50 | return 0; | ||
51 | } | ||
48 | #endif | 52 | #endif |
49 | 53 | ||
50 | #endif /* ISCSI_IBFT_H */ | 54 | #endif /* ISCSI_IBFT_H */ |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index f3aa59cb675d..516a2a27e87a 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
33 | #include <linux/lockdep.h> | 33 | #include <linux/lockdep.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #define journal_oom_retry 1 | 36 | #define journal_oom_retry 1 |
36 | 37 | ||
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 1ec876358180..a4d2e9f7088a 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/bit_spinlock.h> | 30 | #include <linux/bit_spinlock.h> |
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
33 | #include <linux/slab.h> | ||
33 | #endif | 34 | #endif |
34 | 35 | ||
35 | #define journal_oom_retry 1 | 36 | #define journal_oom_retry 1 |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index db6717d0fd6f..a38d6bd6fde6 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -428,7 +428,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
428 | .burst = DEFAULT_RATELIMIT_BURST, \ | 428 | .burst = DEFAULT_RATELIMIT_BURST, \ |
429 | }; \ | 429 | }; \ |
430 | \ | 430 | \ |
431 | if (!__ratelimit(&_rs)) \ | 431 | if (__ratelimit(&_rs)) \ |
432 | printk(fmt, ##__VA_ARGS__); \ | 432 | printk(fmt, ##__VA_ARGS__); \ |
433 | }) | 433 | }) |
434 | #else | 434 | #else |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index bc0fc795bd35..e117b1aee69c 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
@@ -86,7 +86,8 @@ union { \ | |||
86 | */ | 86 | */ |
87 | #define INIT_KFIFO(name) \ | 87 | #define INIT_KFIFO(name) \ |
88 | name = __kfifo_initializer(sizeof(name##kfifo_buffer) - \ | 88 | name = __kfifo_initializer(sizeof(name##kfifo_buffer) - \ |
89 | sizeof(struct kfifo), name##kfifo_buffer) | 89 | sizeof(struct kfifo), \ |
90 | name##kfifo_buffer + sizeof(struct kfifo)) | ||
90 | 91 | ||
91 | /** | 92 | /** |
92 | * DEFINE_KFIFO - macro to define and initialize a kfifo | 93 | * DEFINE_KFIFO - macro to define and initialize a kfifo |
@@ -102,8 +103,6 @@ union { \ | |||
102 | unsigned char name##kfifo_buffer[size]; \ | 103 | unsigned char name##kfifo_buffer[size]; \ |
103 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) | 104 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) |
104 | 105 | ||
105 | #undef __kfifo_initializer | ||
106 | |||
107 | extern void kfifo_init(struct kfifo *fifo, void *buffer, | 106 | extern void kfifo_init(struct kfifo *fifo, void *buffer, |
108 | unsigned int size); | 107 | unsigned int size); |
109 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, | 108 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, |
diff --git a/include/linux/l2tp.h b/include/linux/l2tp.h new file mode 100644 index 000000000000..4bdb31df8e72 --- /dev/null +++ b/include/linux/l2tp.h | |||
@@ -0,0 +1,163 @@ | |||
1 | /* | ||
2 | * L2TP-over-IP socket for L2TPv3. | ||
3 | * | ||
4 | * Author: James Chapman <jchapman@katalix.com> | ||
5 | */ | ||
6 | |||
7 | #ifndef _LINUX_L2TP_H_ | ||
8 | #define _LINUX_L2TP_H_ | ||
9 | |||
10 | #include <linux/types.h> | ||
11 | #ifdef __KERNEL__ | ||
12 | #include <linux/socket.h> | ||
13 | #include <linux/in.h> | ||
14 | #else | ||
15 | #include <netinet/in.h> | ||
16 | #endif | ||
17 | |||
18 | #define IPPROTO_L2TP 115 | ||
19 | |||
20 | /** | ||
21 | * struct sockaddr_l2tpip - the sockaddr structure for L2TP-over-IP sockets | ||
22 | * @l2tp_family: address family number AF_L2TPIP. | ||
23 | * @l2tp_addr: protocol specific address information | ||
24 | * @l2tp_conn_id: connection id of tunnel | ||
25 | */ | ||
26 | #define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ | ||
27 | struct sockaddr_l2tpip { | ||
28 | /* The first fields must match struct sockaddr_in */ | ||
29 | sa_family_t l2tp_family; /* AF_INET */ | ||
30 | __be16 l2tp_unused; /* INET port number (unused) */ | ||
31 | struct in_addr l2tp_addr; /* Internet address */ | ||
32 | |||
33 | __u32 l2tp_conn_id; /* Connection ID of tunnel */ | ||
34 | |||
35 | /* Pad to size of `struct sockaddr'. */ | ||
36 | unsigned char __pad[sizeof(struct sockaddr) - sizeof(sa_family_t) - | ||
37 | sizeof(__be16) - sizeof(struct in_addr) - | ||
38 | sizeof(__u32)]; | ||
39 | }; | ||
40 | |||
41 | /***************************************************************************** | ||
42 | * NETLINK_GENERIC netlink family. | ||
43 | *****************************************************************************/ | ||
44 | |||
45 | /* | ||
46 | * Commands. | ||
47 | * Valid TLVs of each command are:- | ||
48 | * TUNNEL_CREATE - CONN_ID, pw_type, netns, ifname, ipinfo, udpinfo, udpcsum, vlanid | ||
49 | * TUNNEL_DELETE - CONN_ID | ||
50 | * TUNNEL_MODIFY - CONN_ID, udpcsum | ||
51 | * TUNNEL_GETSTATS - CONN_ID, (stats) | ||
52 | * TUNNEL_GET - CONN_ID, (...) | ||
53 | * SESSION_CREATE - SESSION_ID, PW_TYPE, offset, data_seq, cookie, peer_cookie, offset, l2spec | ||
54 | * SESSION_DELETE - SESSION_ID | ||
55 | * SESSION_MODIFY - SESSION_ID, data_seq | ||
56 | * SESSION_GET - SESSION_ID, (...) | ||
57 | * SESSION_GETSTATS - SESSION_ID, (stats) | ||
58 | * | ||
59 | */ | ||
60 | enum { | ||
61 | L2TP_CMD_NOOP, | ||
62 | L2TP_CMD_TUNNEL_CREATE, | ||
63 | L2TP_CMD_TUNNEL_DELETE, | ||
64 | L2TP_CMD_TUNNEL_MODIFY, | ||
65 | L2TP_CMD_TUNNEL_GET, | ||
66 | L2TP_CMD_SESSION_CREATE, | ||
67 | L2TP_CMD_SESSION_DELETE, | ||
68 | L2TP_CMD_SESSION_MODIFY, | ||
69 | L2TP_CMD_SESSION_GET, | ||
70 | __L2TP_CMD_MAX, | ||
71 | }; | ||
72 | |||
73 | #define L2TP_CMD_MAX (__L2TP_CMD_MAX - 1) | ||
74 | |||
75 | /* | ||
76 | * ATTR types defined for L2TP | ||
77 | */ | ||
78 | enum { | ||
79 | L2TP_ATTR_NONE, /* no data */ | ||
80 | L2TP_ATTR_PW_TYPE, /* u16, enum l2tp_pwtype */ | ||
81 | L2TP_ATTR_ENCAP_TYPE, /* u16, enum l2tp_encap_type */ | ||
82 | L2TP_ATTR_OFFSET, /* u16 */ | ||
83 | L2TP_ATTR_DATA_SEQ, /* u16 */ | ||
84 | L2TP_ATTR_L2SPEC_TYPE, /* u8, enum l2tp_l2spec_type */ | ||
85 | L2TP_ATTR_L2SPEC_LEN, /* u8, enum l2tp_l2spec_type */ | ||
86 | L2TP_ATTR_PROTO_VERSION, /* u8 */ | ||
87 | L2TP_ATTR_IFNAME, /* string */ | ||
88 | L2TP_ATTR_CONN_ID, /* u32 */ | ||
89 | L2TP_ATTR_PEER_CONN_ID, /* u32 */ | ||
90 | L2TP_ATTR_SESSION_ID, /* u32 */ | ||
91 | L2TP_ATTR_PEER_SESSION_ID, /* u32 */ | ||
92 | L2TP_ATTR_UDP_CSUM, /* u8 */ | ||
93 | L2TP_ATTR_VLAN_ID, /* u16 */ | ||
94 | L2TP_ATTR_COOKIE, /* 0, 4 or 8 bytes */ | ||
95 | L2TP_ATTR_PEER_COOKIE, /* 0, 4 or 8 bytes */ | ||
96 | L2TP_ATTR_DEBUG, /* u32 */ | ||
97 | L2TP_ATTR_RECV_SEQ, /* u8 */ | ||
98 | L2TP_ATTR_SEND_SEQ, /* u8 */ | ||
99 | L2TP_ATTR_LNS_MODE, /* u8 */ | ||
100 | L2TP_ATTR_USING_IPSEC, /* u8 */ | ||
101 | L2TP_ATTR_RECV_TIMEOUT, /* msec */ | ||
102 | L2TP_ATTR_FD, /* int */ | ||
103 | L2TP_ATTR_IP_SADDR, /* u32 */ | ||
104 | L2TP_ATTR_IP_DADDR, /* u32 */ | ||
105 | L2TP_ATTR_UDP_SPORT, /* u16 */ | ||
106 | L2TP_ATTR_UDP_DPORT, /* u16 */ | ||
107 | L2TP_ATTR_MTU, /* u16 */ | ||
108 | L2TP_ATTR_MRU, /* u16 */ | ||
109 | L2TP_ATTR_STATS, /* nested */ | ||
110 | __L2TP_ATTR_MAX, | ||
111 | }; | ||
112 | |||
113 | #define L2TP_ATTR_MAX (__L2TP_ATTR_MAX - 1) | ||
114 | |||
115 | /* Nested in L2TP_ATTR_STATS */ | ||
116 | enum { | ||
117 | L2TP_ATTR_STATS_NONE, /* no data */ | ||
118 | L2TP_ATTR_TX_PACKETS, /* u64 */ | ||
119 | L2TP_ATTR_TX_BYTES, /* u64 */ | ||
120 | L2TP_ATTR_TX_ERRORS, /* u64 */ | ||
121 | L2TP_ATTR_RX_PACKETS, /* u64 */ | ||
122 | L2TP_ATTR_RX_BYTES, /* u64 */ | ||
123 | L2TP_ATTR_RX_SEQ_DISCARDS, /* u64 */ | ||
124 | L2TP_ATTR_RX_OOS_PACKETS, /* u64 */ | ||
125 | L2TP_ATTR_RX_ERRORS, /* u64 */ | ||
126 | __L2TP_ATTR_STATS_MAX, | ||
127 | }; | ||
128 | |||
129 | #define L2TP_ATTR_STATS_MAX (__L2TP_ATTR_STATS_MAX - 1) | ||
130 | |||
131 | enum l2tp_pwtype { | ||
132 | L2TP_PWTYPE_NONE = 0x0000, | ||
133 | L2TP_PWTYPE_ETH_VLAN = 0x0004, | ||
134 | L2TP_PWTYPE_ETH = 0x0005, | ||
135 | L2TP_PWTYPE_PPP = 0x0007, | ||
136 | L2TP_PWTYPE_PPP_AC = 0x0008, | ||
137 | L2TP_PWTYPE_IP = 0x000b, | ||
138 | __L2TP_PWTYPE_MAX | ||
139 | }; | ||
140 | |||
141 | enum l2tp_l2spec_type { | ||
142 | L2TP_L2SPECTYPE_NONE, | ||
143 | L2TP_L2SPECTYPE_DEFAULT, | ||
144 | }; | ||
145 | |||
146 | enum l2tp_encap_type { | ||
147 | L2TP_ENCAPTYPE_UDP, | ||
148 | L2TP_ENCAPTYPE_IP, | ||
149 | }; | ||
150 | |||
151 | enum l2tp_seqmode { | ||
152 | L2TP_SEQ_NONE = 0, | ||
153 | L2TP_SEQ_IP = 1, | ||
154 | L2TP_SEQ_ALL = 2, | ||
155 | }; | ||
156 | |||
157 | /* | ||
158 | * NETLINK_GENERIC related info | ||
159 | */ | ||
160 | #define L2TP_GENL_NAME "l2tp" | ||
161 | #define L2TP_GENL_VERSION 0x1 | ||
162 | |||
163 | #endif | ||
diff --git a/include/linux/lcm.h b/include/linux/lcm.h new file mode 100644 index 000000000000..7bf01d779b45 --- /dev/null +++ b/include/linux/lcm.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _LCM_H | ||
2 | #define _LCM_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | |||
6 | unsigned long lcm(unsigned long a, unsigned long b) __attribute_const__; | ||
7 | |||
8 | #endif /* _LCM_H */ | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index f8ea71e6d0e2..b2f2003b92e5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -146,6 +146,7 @@ enum { | |||
146 | ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ | 146 | ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ |
147 | ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */ | 147 | ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */ |
148 | ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */ | 148 | ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */ |
149 | ATA_DFLAG_UNLOCK_HPA = (1 << 18), /* unlock HPA */ | ||
149 | ATA_DFLAG_INIT_MASK = (1 << 24) - 1, | 150 | ATA_DFLAG_INIT_MASK = (1 << 24) - 1, |
150 | 151 | ||
151 | ATA_DFLAG_DETACH = (1 << 24), | 152 | ATA_DFLAG_DETACH = (1 << 24), |
diff --git a/include/linux/memory.h b/include/linux/memory.h index 1adfe779eb99..85582e1bcee9 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
@@ -36,6 +36,8 @@ struct memory_block { | |||
36 | struct sys_device sysdev; | 36 | struct sys_device sysdev; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | int arch_get_memory_phys_device(unsigned long start_pfn); | ||
40 | |||
39 | /* These states are exposed to userspace as text strings in sysfs */ | 41 | /* These states are exposed to userspace as text strings in sysfs */ |
40 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ | 42 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ |
41 | #define MEM_GOING_OFFLINE (1<<1) /* exposed to userspace */ | 43 | #define MEM_GOING_OFFLINE (1<<1) /* exposed to userspace */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index e70f21beb4b4..462acaf36f3a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -783,8 +783,8 @@ struct mm_walk { | |||
783 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); | 783 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); |
784 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); | 784 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); |
785 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); | 785 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); |
786 | int (*hugetlb_entry)(pte_t *, unsigned long, unsigned long, | 786 | int (*hugetlb_entry)(pte_t *, unsigned long, |
787 | struct mm_walk *); | 787 | unsigned long, unsigned long, struct mm_walk *); |
788 | struct mm_struct *mm; | 788 | struct mm_struct *mm; |
789 | void *private; | 789 | void *private; |
790 | }; | 790 | }; |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index c02c8db73701..8a49cbf0376d 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -268,6 +268,7 @@ struct _mmc_csd { | |||
268 | 268 | ||
269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ | 269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ |
270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ | 270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ |
271 | #define EXT_CSD_CARD_TYPE_MASK 0x3 /* Mask out reserved and DDR bits */ | ||
271 | 272 | ||
272 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ | 273 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ |
273 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ | 274 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ |
diff --git a/include/linux/mmc/sdio.h b/include/linux/mmc/sdio.h index 0ebaef577ff5..329a8faa6e37 100644 --- a/include/linux/mmc/sdio.h +++ b/include/linux/mmc/sdio.h | |||
@@ -94,6 +94,8 @@ | |||
94 | 94 | ||
95 | #define SDIO_BUS_WIDTH_1BIT 0x00 | 95 | #define SDIO_BUS_WIDTH_1BIT 0x00 |
96 | #define SDIO_BUS_WIDTH_4BIT 0x02 | 96 | #define SDIO_BUS_WIDTH_4BIT 0x02 |
97 | #define SDIO_BUS_ECSI 0x20 /* Enable continuous SPI interrupt */ | ||
98 | #define SDIO_BUS_SCSI 0x40 /* Support continuous SPI interrupt */ | ||
97 | 99 | ||
98 | #define SDIO_BUS_ASYNC_INT 0x20 | 100 | #define SDIO_BUS_ASYNC_INT 0x20 |
99 | 101 | ||
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index f58e9d836f32..55f1f9c9506c 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -474,4 +474,30 @@ struct platform_device_id { | |||
474 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | 474 | __attribute__((aligned(sizeof(kernel_ulong_t)))); |
475 | }; | 475 | }; |
476 | 476 | ||
477 | #define MDIO_MODULE_PREFIX "mdio:" | ||
478 | |||
479 | #define MDIO_ID_FMT "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d" | ||
480 | #define MDIO_ID_ARGS(_id) \ | ||
481 | (_id)>>31, ((_id)>>30) & 1, ((_id)>>29) & 1, ((_id)>>28) & 1, \ | ||
482 | ((_id)>>27) & 1, ((_id)>>26) & 1, ((_id)>>25) & 1, ((_id)>>24) & 1, \ | ||
483 | ((_id)>>23) & 1, ((_id)>>22) & 1, ((_id)>>21) & 1, ((_id)>>20) & 1, \ | ||
484 | ((_id)>>19) & 1, ((_id)>>18) & 1, ((_id)>>17) & 1, ((_id)>>16) & 1, \ | ||
485 | ((_id)>>15) & 1, ((_id)>>14) & 1, ((_id)>>13) & 1, ((_id)>>12) & 1, \ | ||
486 | ((_id)>>11) & 1, ((_id)>>10) & 1, ((_id)>>9) & 1, ((_id)>>8) & 1, \ | ||
487 | ((_id)>>7) & 1, ((_id)>>6) & 1, ((_id)>>5) & 1, ((_id)>>4) & 1, \ | ||
488 | ((_id)>>3) & 1, ((_id)>>2) & 1, ((_id)>>1) & 1, (_id) & 1 | ||
489 | |||
490 | /** | ||
491 | * struct mdio_device_id - identifies PHY devices on an MDIO/MII bus | ||
492 | * @phy_id: The result of | ||
493 | * (mdio_read(&MII_PHYSID1) << 16 | mdio_read(&PHYSID2)) & @phy_id_mask | ||
494 | * for this PHY type | ||
495 | * @phy_id_mask: Defines the significant bits of @phy_id. A value of 0 | ||
496 | * is used to terminate an array of struct mdio_device_id. | ||
497 | */ | ||
498 | struct mdio_device_id { | ||
499 | __u32 phy_id; | ||
500 | __u32 phy_id_mask; | ||
501 | }; | ||
502 | |||
477 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 503 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 5e869ffd34aa..515d53ae6a79 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -330,8 +330,11 @@ struct module | |||
330 | struct module_notes_attrs *notes_attrs; | 330 | struct module_notes_attrs *notes_attrs; |
331 | #endif | 331 | #endif |
332 | 332 | ||
333 | #ifdef CONFIG_SMP | ||
333 | /* Per-cpu data. */ | 334 | /* Per-cpu data. */ |
334 | void *percpu; | 335 | void __percpu *percpu; |
336 | unsigned int percpu_size; | ||
337 | #endif | ||
335 | 338 | ||
336 | /* The command line arguments (may be mangled). People like | 339 | /* The command line arguments (may be mangled). People like |
337 | keeping pointers to this stuff */ | 340 | keeping pointers to this stuff */ |
@@ -365,7 +368,8 @@ struct module | |||
365 | void (*exit)(void); | 368 | void (*exit)(void); |
366 | 369 | ||
367 | struct module_ref { | 370 | struct module_ref { |
368 | int count; | 371 | unsigned int incs; |
372 | unsigned int decs; | ||
369 | } __percpu *refptr; | 373 | } __percpu *refptr; |
370 | #endif | 374 | #endif |
371 | 375 | ||
@@ -392,6 +396,7 @@ static inline int module_is_live(struct module *mod) | |||
392 | struct module *__module_text_address(unsigned long addr); | 396 | struct module *__module_text_address(unsigned long addr); |
393 | struct module *__module_address(unsigned long addr); | 397 | struct module *__module_address(unsigned long addr); |
394 | bool is_module_address(unsigned long addr); | 398 | bool is_module_address(unsigned long addr); |
399 | bool is_module_percpu_address(unsigned long addr); | ||
395 | bool is_module_text_address(unsigned long addr); | 400 | bool is_module_text_address(unsigned long addr); |
396 | 401 | ||
397 | static inline int within_module_core(unsigned long addr, struct module *mod) | 402 | static inline int within_module_core(unsigned long addr, struct module *mod) |
@@ -459,9 +464,9 @@ static inline void __module_get(struct module *module) | |||
459 | { | 464 | { |
460 | if (module) { | 465 | if (module) { |
461 | preempt_disable(); | 466 | preempt_disable(); |
462 | __this_cpu_inc(module->refptr->count); | 467 | __this_cpu_inc(module->refptr->incs); |
463 | trace_module_get(module, _THIS_IP_, | 468 | trace_module_get(module, _THIS_IP_, |
464 | __this_cpu_read(module->refptr->count)); | 469 | __this_cpu_read(module->refptr->incs)); |
465 | preempt_enable(); | 470 | preempt_enable(); |
466 | } | 471 | } |
467 | } | 472 | } |
@@ -474,11 +479,10 @@ static inline int try_module_get(struct module *module) | |||
474 | preempt_disable(); | 479 | preempt_disable(); |
475 | 480 | ||
476 | if (likely(module_is_live(module))) { | 481 | if (likely(module_is_live(module))) { |
477 | __this_cpu_inc(module->refptr->count); | 482 | __this_cpu_inc(module->refptr->incs); |
478 | trace_module_get(module, _THIS_IP_, | 483 | trace_module_get(module, _THIS_IP_, |
479 | __this_cpu_read(module->refptr->count)); | 484 | __this_cpu_read(module->refptr->incs)); |
480 | } | 485 | } else |
481 | else | ||
482 | ret = 0; | 486 | ret = 0; |
483 | 487 | ||
484 | preempt_enable(); | 488 | preempt_enable(); |
@@ -563,6 +567,11 @@ static inline bool is_module_address(unsigned long addr) | |||
563 | return false; | 567 | return false; |
564 | } | 568 | } |
565 | 569 | ||
570 | static inline bool is_module_percpu_address(unsigned long addr) | ||
571 | { | ||
572 | return false; | ||
573 | } | ||
574 | |||
566 | static inline bool is_module_text_address(unsigned long addr) | 575 | static inline bool is_module_text_address(unsigned long addr) |
567 | { | 576 | { |
568 | return false; | 577 | return false; |
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index c5f3d53548e2..fa04b246c9ae 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
@@ -27,7 +27,8 @@ | |||
27 | #define MRT_DEL_MFC (MRT_BASE+5) /* Delete a multicast forwarding entry */ | 27 | #define MRT_DEL_MFC (MRT_BASE+5) /* Delete a multicast forwarding entry */ |
28 | #define MRT_VERSION (MRT_BASE+6) /* Get the kernel multicast version */ | 28 | #define MRT_VERSION (MRT_BASE+6) /* Get the kernel multicast version */ |
29 | #define MRT_ASSERT (MRT_BASE+7) /* Activate PIM assert mode */ | 29 | #define MRT_ASSERT (MRT_BASE+7) /* Activate PIM assert mode */ |
30 | #define MRT_PIM (MRT_BASE+8) /* enable PIM code */ | 30 | #define MRT_PIM (MRT_BASE+8) /* enable PIM code */ |
31 | #define MRT_TABLE (MRT_BASE+9) /* Specify mroute table ID */ | ||
31 | 32 | ||
32 | #define SIOCGETVIFCNT SIOCPROTOPRIVATE /* IP protocol privates */ | 33 | #define SIOCGETVIFCNT SIOCPROTOPRIVATE /* IP protocol privates */ |
33 | #define SIOCGETSGCNT (SIOCPROTOPRIVATE+1) | 34 | #define SIOCGETSGCNT (SIOCPROTOPRIVATE+1) |
@@ -191,10 +192,7 @@ struct vif_device { | |||
191 | #define VIFF_STATIC 0x8000 | 192 | #define VIFF_STATIC 0x8000 |
192 | 193 | ||
193 | struct mfc_cache { | 194 | struct mfc_cache { |
194 | struct mfc_cache *next; /* Next entry on cache line */ | 195 | struct list_head list; |
195 | #ifdef CONFIG_NET_NS | ||
196 | struct net *mfc_net; | ||
197 | #endif | ||
198 | __be32 mfc_mcastgrp; /* Group the entry belongs to */ | 196 | __be32 mfc_mcastgrp; /* Group the entry belongs to */ |
199 | __be32 mfc_origin; /* Source of packet */ | 197 | __be32 mfc_origin; /* Source of packet */ |
200 | vifi_t mfc_parent; /* Source interface */ | 198 | vifi_t mfc_parent; /* Source interface */ |
@@ -217,18 +215,6 @@ struct mfc_cache { | |||
217 | } mfc_un; | 215 | } mfc_un; |
218 | }; | 216 | }; |
219 | 217 | ||
220 | static inline | ||
221 | struct net *mfc_net(const struct mfc_cache *mfc) | ||
222 | { | ||
223 | return read_pnet(&mfc->mfc_net); | ||
224 | } | ||
225 | |||
226 | static inline | ||
227 | void mfc_net_set(struct mfc_cache *mfc, struct net *net) | ||
228 | { | ||
229 | write_pnet(&mfc->mfc_net, hold_net(net)); | ||
230 | } | ||
231 | |||
232 | #define MFC_STATIC 1 | 218 | #define MFC_STATIC 1 |
233 | #define MFC_NOTIFY 2 | 219 | #define MFC_NOTIFY 2 |
234 | 220 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index de1a52bcb9e0..3c5ed5f5274e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -228,25 +228,6 @@ struct netif_rx_stats { | |||
228 | 228 | ||
229 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); | 229 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); |
230 | 230 | ||
231 | struct dev_addr_list { | ||
232 | struct dev_addr_list *next; | ||
233 | u8 da_addr[MAX_ADDR_LEN]; | ||
234 | u8 da_addrlen; | ||
235 | u8 da_synced; | ||
236 | int da_users; | ||
237 | int da_gusers; | ||
238 | }; | ||
239 | |||
240 | /* | ||
241 | * We tag multicasts with these structures. | ||
242 | */ | ||
243 | |||
244 | #define dev_mc_list dev_addr_list | ||
245 | #define dmi_addr da_addr | ||
246 | #define dmi_addrlen da_addrlen | ||
247 | #define dmi_users da_users | ||
248 | #define dmi_gusers da_gusers | ||
249 | |||
250 | struct netdev_hw_addr { | 231 | struct netdev_hw_addr { |
251 | struct list_head list; | 232 | struct list_head list; |
252 | unsigned char addr[MAX_ADDR_LEN]; | 233 | unsigned char addr[MAX_ADDR_LEN]; |
@@ -255,8 +236,10 @@ struct netdev_hw_addr { | |||
255 | #define NETDEV_HW_ADDR_T_SAN 2 | 236 | #define NETDEV_HW_ADDR_T_SAN 2 |
256 | #define NETDEV_HW_ADDR_T_SLAVE 3 | 237 | #define NETDEV_HW_ADDR_T_SLAVE 3 |
257 | #define NETDEV_HW_ADDR_T_UNICAST 4 | 238 | #define NETDEV_HW_ADDR_T_UNICAST 4 |
239 | #define NETDEV_HW_ADDR_T_MULTICAST 5 | ||
258 | int refcount; | 240 | int refcount; |
259 | bool synced; | 241 | bool synced; |
242 | bool global_use; | ||
260 | struct rcu_head rcu_head; | 243 | struct rcu_head rcu_head; |
261 | }; | 244 | }; |
262 | 245 | ||
@@ -265,16 +248,20 @@ struct netdev_hw_addr_list { | |||
265 | int count; | 248 | int count; |
266 | }; | 249 | }; |
267 | 250 | ||
268 | #define netdev_uc_count(dev) ((dev)->uc.count) | 251 | #define netdev_hw_addr_list_count(l) ((l)->count) |
269 | #define netdev_uc_empty(dev) ((dev)->uc.count == 0) | 252 | #define netdev_hw_addr_list_empty(l) (netdev_hw_addr_list_count(l) == 0) |
270 | #define netdev_for_each_uc_addr(ha, dev) \ | 253 | #define netdev_hw_addr_list_for_each(ha, l) \ |
271 | list_for_each_entry(ha, &dev->uc.list, list) | 254 | list_for_each_entry(ha, &(l)->list, list) |
272 | 255 | ||
273 | #define netdev_mc_count(dev) ((dev)->mc_count) | 256 | #define netdev_uc_count(dev) netdev_hw_addr_list_count(&(dev)->uc) |
274 | #define netdev_mc_empty(dev) (netdev_mc_count(dev) == 0) | 257 | #define netdev_uc_empty(dev) netdev_hw_addr_list_empty(&(dev)->uc) |
258 | #define netdev_for_each_uc_addr(ha, dev) \ | ||
259 | netdev_hw_addr_list_for_each(ha, &(dev)->uc) | ||
275 | 260 | ||
276 | #define netdev_for_each_mc_addr(mclist, dev) \ | 261 | #define netdev_mc_count(dev) netdev_hw_addr_list_count(&(dev)->mc) |
277 | for (mclist = dev->mc_list; mclist; mclist = mclist->next) | 262 | #define netdev_mc_empty(dev) netdev_hw_addr_list_empty(&(dev)->mc) |
263 | #define netdev_for_each_mc_addr(ha, dev) \ | ||
264 | netdev_hw_addr_list_for_each(ha, &(dev)->mc) | ||
278 | 265 | ||
279 | struct hh_cache { | 266 | struct hh_cache { |
280 | struct hh_cache *hh_next; /* Next entry */ | 267 | struct hh_cache *hh_next; /* Next entry */ |
@@ -531,6 +518,7 @@ struct netdev_queue { | |||
531 | unsigned long tx_dropped; | 518 | unsigned long tx_dropped; |
532 | } ____cacheline_aligned_in_smp; | 519 | } ____cacheline_aligned_in_smp; |
533 | 520 | ||
521 | #ifdef CONFIG_RPS | ||
534 | /* | 522 | /* |
535 | * This structure holds an RPS map which can be of variable length. The | 523 | * This structure holds an RPS map which can be of variable length. The |
536 | * map is an array of CPUs. | 524 | * map is an array of CPUs. |
@@ -542,13 +530,73 @@ struct rps_map { | |||
542 | }; | 530 | }; |
543 | #define RPS_MAP_SIZE(_num) (sizeof(struct rps_map) + (_num * sizeof(u16))) | 531 | #define RPS_MAP_SIZE(_num) (sizeof(struct rps_map) + (_num * sizeof(u16))) |
544 | 532 | ||
533 | /* | ||
534 | * The rps_dev_flow structure contains the mapping of a flow to a CPU and the | ||
535 | * tail pointer for that CPU's input queue at the time of last enqueue. | ||
536 | */ | ||
537 | struct rps_dev_flow { | ||
538 | u16 cpu; | ||
539 | u16 fill; | ||
540 | unsigned int last_qtail; | ||
541 | }; | ||
542 | |||
543 | /* | ||
544 | * The rps_dev_flow_table structure contains a table of flow mappings. | ||
545 | */ | ||
546 | struct rps_dev_flow_table { | ||
547 | unsigned int mask; | ||
548 | struct rcu_head rcu; | ||
549 | struct work_struct free_work; | ||
550 | struct rps_dev_flow flows[0]; | ||
551 | }; | ||
552 | #define RPS_DEV_FLOW_TABLE_SIZE(_num) (sizeof(struct rps_dev_flow_table) + \ | ||
553 | (_num * sizeof(struct rps_dev_flow))) | ||
554 | |||
555 | /* | ||
556 | * The rps_sock_flow_table contains mappings of flows to the last CPU | ||
557 | * on which they were processed by the application (set in recvmsg). | ||
558 | */ | ||
559 | struct rps_sock_flow_table { | ||
560 | unsigned int mask; | ||
561 | u16 ents[0]; | ||
562 | }; | ||
563 | #define RPS_SOCK_FLOW_TABLE_SIZE(_num) (sizeof(struct rps_sock_flow_table) + \ | ||
564 | (_num * sizeof(u16))) | ||
565 | |||
566 | #define RPS_NO_CPU 0xffff | ||
567 | |||
568 | static inline void rps_record_sock_flow(struct rps_sock_flow_table *table, | ||
569 | u32 hash) | ||
570 | { | ||
571 | if (table && hash) { | ||
572 | unsigned int cpu, index = hash & table->mask; | ||
573 | |||
574 | /* We only give a hint, preemption can change cpu under us */ | ||
575 | cpu = raw_smp_processor_id(); | ||
576 | |||
577 | if (table->ents[index] != cpu) | ||
578 | table->ents[index] = cpu; | ||
579 | } | ||
580 | } | ||
581 | |||
582 | static inline void rps_reset_sock_flow(struct rps_sock_flow_table *table, | ||
583 | u32 hash) | ||
584 | { | ||
585 | if (table && hash) | ||
586 | table->ents[hash & table->mask] = RPS_NO_CPU; | ||
587 | } | ||
588 | |||
589 | extern struct rps_sock_flow_table *rps_sock_flow_table; | ||
590 | |||
545 | /* This structure contains an instance of an RX queue. */ | 591 | /* This structure contains an instance of an RX queue. */ |
546 | struct netdev_rx_queue { | 592 | struct netdev_rx_queue { |
547 | struct rps_map *rps_map; | 593 | struct rps_map *rps_map; |
594 | struct rps_dev_flow_table *rps_flow_table; | ||
548 | struct kobject kobj; | 595 | struct kobject kobj; |
549 | struct netdev_rx_queue *first; | 596 | struct netdev_rx_queue *first; |
550 | atomic_t count; | 597 | atomic_t count; |
551 | } ____cacheline_aligned_in_smp; | 598 | } ____cacheline_aligned_in_smp; |
599 | #endif /* CONFIG_RPS */ | ||
552 | 600 | ||
553 | /* | 601 | /* |
554 | * This structure defines the management hooks for network devices. | 602 | * This structure defines the management hooks for network devices. |
@@ -783,6 +831,7 @@ struct net_device { | |||
783 | #define NETIF_F_SCTP_CSUM (1 << 25) /* SCTP checksum offload */ | 831 | #define NETIF_F_SCTP_CSUM (1 << 25) /* SCTP checksum offload */ |
784 | #define NETIF_F_FCOE_MTU (1 << 26) /* Supports max FCoE MTU, 2158 bytes*/ | 832 | #define NETIF_F_FCOE_MTU (1 << 26) /* Supports max FCoE MTU, 2158 bytes*/ |
785 | #define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */ | 833 | #define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */ |
834 | #define NETIF_F_RXHASH (1 << 28) /* Receive hashing offload */ | ||
786 | 835 | ||
787 | /* Segmentation offload features */ | 836 | /* Segmentation offload features */ |
788 | #define NETIF_F_GSO_SHIFT 16 | 837 | #define NETIF_F_GSO_SHIFT 16 |
@@ -859,12 +908,10 @@ struct net_device { | |||
859 | unsigned char addr_len; /* hardware address length */ | 908 | unsigned char addr_len; /* hardware address length */ |
860 | unsigned short dev_id; /* for shared network cards */ | 909 | unsigned short dev_id; /* for shared network cards */ |
861 | 910 | ||
862 | struct netdev_hw_addr_list uc; /* Secondary unicast | ||
863 | mac addresses */ | ||
864 | int uc_promisc; | ||
865 | spinlock_t addr_list_lock; | 911 | spinlock_t addr_list_lock; |
866 | struct dev_addr_list *mc_list; /* Multicast mac addresses */ | 912 | struct netdev_hw_addr_list uc; /* Unicast mac addresses */ |
867 | int mc_count; /* Number of installed mcasts */ | 913 | struct netdev_hw_addr_list mc; /* Multicast mac addresses */ |
914 | int uc_promisc; | ||
868 | unsigned int promiscuity; | 915 | unsigned int promiscuity; |
869 | unsigned int allmulti; | 916 | unsigned int allmulti; |
870 | 917 | ||
@@ -897,12 +944,14 @@ struct net_device { | |||
897 | 944 | ||
898 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | 945 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ |
899 | 946 | ||
947 | #ifdef CONFIG_RPS | ||
900 | struct kset *queues_kset; | 948 | struct kset *queues_kset; |
901 | 949 | ||
902 | struct netdev_rx_queue *_rx; | 950 | struct netdev_rx_queue *_rx; |
903 | 951 | ||
904 | /* Number of RX queues allocated at alloc_netdev_mq() time */ | 952 | /* Number of RX queues allocated at alloc_netdev_mq() time */ |
905 | unsigned int num_rx_queues; | 953 | unsigned int num_rx_queues; |
954 | #endif | ||
906 | 955 | ||
907 | struct netdev_queue rx_queue; | 956 | struct netdev_queue rx_queue; |
908 | 957 | ||
@@ -1332,20 +1381,33 @@ static inline int unregister_gifconf(unsigned int family) | |||
1332 | } | 1381 | } |
1333 | 1382 | ||
1334 | /* | 1383 | /* |
1335 | * Incoming packets are placed on per-cpu queues so that | 1384 | * Incoming packets are placed on per-cpu queues |
1336 | * no locking is needed. | ||
1337 | */ | 1385 | */ |
1338 | struct softnet_data { | 1386 | struct softnet_data { |
1339 | struct Qdisc *output_queue; | 1387 | struct Qdisc *output_queue; |
1340 | struct list_head poll_list; | 1388 | struct list_head poll_list; |
1341 | struct sk_buff *completion_queue; | 1389 | struct sk_buff *completion_queue; |
1342 | 1390 | ||
1391 | #ifdef CONFIG_RPS | ||
1392 | struct softnet_data *rps_ipi_list; | ||
1393 | |||
1343 | /* Elements below can be accessed between CPUs for RPS */ | 1394 | /* Elements below can be accessed between CPUs for RPS */ |
1344 | struct call_single_data csd ____cacheline_aligned_in_smp; | 1395 | struct call_single_data csd ____cacheline_aligned_in_smp; |
1396 | struct softnet_data *rps_ipi_next; | ||
1397 | unsigned int cpu; | ||
1398 | unsigned int input_queue_head; | ||
1399 | #endif | ||
1345 | struct sk_buff_head input_pkt_queue; | 1400 | struct sk_buff_head input_pkt_queue; |
1346 | struct napi_struct backlog; | 1401 | struct napi_struct backlog; |
1347 | }; | 1402 | }; |
1348 | 1403 | ||
1404 | static inline void input_queue_head_incr(struct softnet_data *sd) | ||
1405 | { | ||
1406 | #ifdef CONFIG_RPS | ||
1407 | sd->input_queue_head++; | ||
1408 | #endif | ||
1409 | } | ||
1410 | |||
1349 | DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data); | 1411 | DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data); |
1350 | 1412 | ||
1351 | #define HAVE_NETIF_QUEUE | 1413 | #define HAVE_NETIF_QUEUE |
@@ -1973,6 +2035,22 @@ extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, | |||
1973 | extern int register_netdev(struct net_device *dev); | 2035 | extern int register_netdev(struct net_device *dev); |
1974 | extern void unregister_netdev(struct net_device *dev); | 2036 | extern void unregister_netdev(struct net_device *dev); |
1975 | 2037 | ||
2038 | /* General hardware address lists handling functions */ | ||
2039 | extern int __hw_addr_add_multiple(struct netdev_hw_addr_list *to_list, | ||
2040 | struct netdev_hw_addr_list *from_list, | ||
2041 | int addr_len, unsigned char addr_type); | ||
2042 | extern void __hw_addr_del_multiple(struct netdev_hw_addr_list *to_list, | ||
2043 | struct netdev_hw_addr_list *from_list, | ||
2044 | int addr_len, unsigned char addr_type); | ||
2045 | extern int __hw_addr_sync(struct netdev_hw_addr_list *to_list, | ||
2046 | struct netdev_hw_addr_list *from_list, | ||
2047 | int addr_len); | ||
2048 | extern void __hw_addr_unsync(struct netdev_hw_addr_list *to_list, | ||
2049 | struct netdev_hw_addr_list *from_list, | ||
2050 | int addr_len); | ||
2051 | extern void __hw_addr_flush(struct netdev_hw_addr_list *list); | ||
2052 | extern void __hw_addr_init(struct netdev_hw_addr_list *list); | ||
2053 | |||
1976 | /* Functions used for device addresses handling */ | 2054 | /* Functions used for device addresses handling */ |
1977 | extern int dev_addr_add(struct net_device *dev, unsigned char *addr, | 2055 | extern int dev_addr_add(struct net_device *dev, unsigned char *addr, |
1978 | unsigned char addr_type); | 2056 | unsigned char addr_type); |
@@ -1984,26 +2062,34 @@ extern int dev_addr_add_multiple(struct net_device *to_dev, | |||
1984 | extern int dev_addr_del_multiple(struct net_device *to_dev, | 2062 | extern int dev_addr_del_multiple(struct net_device *to_dev, |
1985 | struct net_device *from_dev, | 2063 | struct net_device *from_dev, |
1986 | unsigned char addr_type); | 2064 | unsigned char addr_type); |
2065 | extern void dev_addr_flush(struct net_device *dev); | ||
2066 | extern int dev_addr_init(struct net_device *dev); | ||
2067 | |||
2068 | /* Functions used for unicast addresses handling */ | ||
2069 | extern int dev_uc_add(struct net_device *dev, unsigned char *addr); | ||
2070 | extern int dev_uc_del(struct net_device *dev, unsigned char *addr); | ||
2071 | extern int dev_uc_sync(struct net_device *to, struct net_device *from); | ||
2072 | extern void dev_uc_unsync(struct net_device *to, struct net_device *from); | ||
2073 | extern void dev_uc_flush(struct net_device *dev); | ||
2074 | extern void dev_uc_init(struct net_device *dev); | ||
2075 | |||
2076 | /* Functions used for multicast addresses handling */ | ||
2077 | extern int dev_mc_add(struct net_device *dev, unsigned char *addr); | ||
2078 | extern int dev_mc_add_global(struct net_device *dev, unsigned char *addr); | ||
2079 | extern int dev_mc_del(struct net_device *dev, unsigned char *addr); | ||
2080 | extern int dev_mc_del_global(struct net_device *dev, unsigned char *addr); | ||
2081 | extern int dev_mc_sync(struct net_device *to, struct net_device *from); | ||
2082 | extern void dev_mc_unsync(struct net_device *to, struct net_device *from); | ||
2083 | extern void dev_mc_flush(struct net_device *dev); | ||
2084 | extern void dev_mc_init(struct net_device *dev); | ||
1987 | 2085 | ||
1988 | /* Functions used for secondary unicast and multicast support */ | 2086 | /* Functions used for secondary unicast and multicast support */ |
1989 | extern void dev_set_rx_mode(struct net_device *dev); | 2087 | extern void dev_set_rx_mode(struct net_device *dev); |
1990 | extern void __dev_set_rx_mode(struct net_device *dev); | 2088 | extern void __dev_set_rx_mode(struct net_device *dev); |
1991 | extern int dev_unicast_delete(struct net_device *dev, void *addr); | ||
1992 | extern int dev_unicast_add(struct net_device *dev, void *addr); | ||
1993 | extern int dev_unicast_sync(struct net_device *to, struct net_device *from); | ||
1994 | extern void dev_unicast_unsync(struct net_device *to, struct net_device *from); | ||
1995 | extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); | ||
1996 | extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); | ||
1997 | extern int dev_mc_sync(struct net_device *to, struct net_device *from); | ||
1998 | extern void dev_mc_unsync(struct net_device *to, struct net_device *from); | ||
1999 | extern int __dev_addr_delete(struct dev_addr_list **list, int *count, void *addr, int alen, int all); | ||
2000 | extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly); | ||
2001 | extern int __dev_addr_sync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); | ||
2002 | extern void __dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); | ||
2003 | extern int dev_set_promiscuity(struct net_device *dev, int inc); | 2089 | extern int dev_set_promiscuity(struct net_device *dev, int inc); |
2004 | extern int dev_set_allmulti(struct net_device *dev, int inc); | 2090 | extern int dev_set_allmulti(struct net_device *dev, int inc); |
2005 | extern void netdev_state_change(struct net_device *dev); | 2091 | extern void netdev_state_change(struct net_device *dev); |
2006 | extern void netdev_bonding_change(struct net_device *dev, | 2092 | extern int netdev_bonding_change(struct net_device *dev, |
2007 | unsigned long event); | 2093 | unsigned long event); |
2008 | extern void netdev_features_change(struct net_device *dev); | 2094 | extern void netdev_features_change(struct net_device *dev); |
2009 | /* Load a device via the kmod */ | 2095 | /* Load a device via the kmod */ |
@@ -2073,54 +2159,14 @@ static inline void netif_set_gso_max_size(struct net_device *dev, | |||
2073 | dev->gso_max_size = size; | 2159 | dev->gso_max_size = size; |
2074 | } | 2160 | } |
2075 | 2161 | ||
2076 | static inline void skb_bond_set_mac_by_master(struct sk_buff *skb, | 2162 | extern int __skb_bond_should_drop(struct sk_buff *skb, |
2077 | struct net_device *master) | 2163 | struct net_device *master); |
2078 | { | ||
2079 | if (skb->pkt_type == PACKET_HOST) { | ||
2080 | u16 *dest = (u16 *) eth_hdr(skb)->h_dest; | ||
2081 | |||
2082 | memcpy(dest, master->dev_addr, ETH_ALEN); | ||
2083 | } | ||
2084 | } | ||
2085 | 2164 | ||
2086 | /* On bonding slaves other than the currently active slave, suppress | 2165 | static inline int skb_bond_should_drop(struct sk_buff *skb, |
2087 | * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and | 2166 | struct net_device *master) |
2088 | * ARP on active-backup slaves with arp_validate enabled. | 2167 | { |
2089 | */ | 2168 | if (master) |
2090 | static inline int skb_bond_should_drop(struct sk_buff *skb) | 2169 | return __skb_bond_should_drop(skb, master); |
2091 | { | ||
2092 | struct net_device *dev = skb->dev; | ||
2093 | struct net_device *master = dev->master; | ||
2094 | |||
2095 | if (master) { | ||
2096 | if (master->priv_flags & IFF_MASTER_ARPMON) | ||
2097 | dev->last_rx = jiffies; | ||
2098 | |||
2099 | if ((master->priv_flags & IFF_MASTER_ALB) && master->br_port) { | ||
2100 | /* Do address unmangle. The local destination address | ||
2101 | * will be always the one master has. Provides the right | ||
2102 | * functionality in a bridge. | ||
2103 | */ | ||
2104 | skb_bond_set_mac_by_master(skb, master); | ||
2105 | } | ||
2106 | |||
2107 | if (dev->priv_flags & IFF_SLAVE_INACTIVE) { | ||
2108 | if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && | ||
2109 | skb->protocol == __cpu_to_be16(ETH_P_ARP)) | ||
2110 | return 0; | ||
2111 | |||
2112 | if (master->priv_flags & IFF_MASTER_ALB) { | ||
2113 | if (skb->pkt_type != PACKET_BROADCAST && | ||
2114 | skb->pkt_type != PACKET_MULTICAST) | ||
2115 | return 0; | ||
2116 | } | ||
2117 | if (master->priv_flags & IFF_MASTER_8023AD && | ||
2118 | skb->protocol == __cpu_to_be16(ETH_P_SLOW)) | ||
2119 | return 0; | ||
2120 | |||
2121 | return 1; | ||
2122 | } | ||
2123 | } | ||
2124 | return 0; | 2170 | return 0; |
2125 | } | 2171 | } |
2126 | 2172 | ||
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index 53923868c9bd..361d6b5630ee 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
@@ -76,7 +76,7 @@ extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n); | |||
76 | extern int nfnetlink_has_listeners(struct net *net, unsigned int group); | 76 | extern int nfnetlink_has_listeners(struct net *net, unsigned int group); |
77 | extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group, | 77 | extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group, |
78 | int echo, gfp_t flags); | 78 | int echo, gfp_t flags); |
79 | extern void nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error); | 79 | extern int nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error); |
80 | extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags); | 80 | extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags); |
81 | 81 | ||
82 | extern void nfnl_lock(void); | 82 | extern void nfnl_lock(void); |
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index d654873aa25a..1f7e300094cd 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h | |||
@@ -59,6 +59,7 @@ | |||
59 | enum nf_ip6_hook_priorities { | 59 | enum nf_ip6_hook_priorities { |
60 | NF_IP6_PRI_FIRST = INT_MIN, | 60 | NF_IP6_PRI_FIRST = INT_MIN, |
61 | NF_IP6_PRI_CONNTRACK_DEFRAG = -400, | 61 | NF_IP6_PRI_CONNTRACK_DEFRAG = -400, |
62 | NF_IP6_PRI_RAW = -300, | ||
62 | NF_IP6_PRI_SELINUX_FIRST = -225, | 63 | NF_IP6_PRI_SELINUX_FIRST = -225, |
63 | NF_IP6_PRI_CONNTRACK = -200, | 64 | NF_IP6_PRI_CONNTRACK = -200, |
64 | NF_IP6_PRI_MANGLE = -150, | 65 | NF_IP6_PRI_MANGLE = -150, |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index fde27c017326..6eaca5e1e8ca 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -188,7 +188,7 @@ extern int netlink_has_listeners(struct sock *sk, unsigned int group); | |||
188 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); | 188 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); |
189 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, | 189 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, |
190 | __u32 group, gfp_t allocation); | 190 | __u32 group, gfp_t allocation); |
191 | extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); | 191 | extern int netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); |
192 | extern int netlink_register_notifier(struct notifier_block *nb); | 192 | extern int netlink_register_notifier(struct notifier_block *nb); |
193 | extern int netlink_unregister_notifier(struct notifier_block *nb); | 193 | extern int netlink_unregister_notifier(struct notifier_block *nb); |
194 | 194 | ||
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 28ba20fda3e2..2ea3edeee7aa 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -323,6 +323,12 @@ | |||
323 | * the TX command and %NL80211_ATTR_FRAME includes the contents of the | 323 | * the TX command and %NL80211_ATTR_FRAME includes the contents of the |
324 | * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged | 324 | * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged |
325 | * the frame. | 325 | * the frame. |
326 | * @NL80211_CMD_SET_CQM: Connection quality monitor configuration. This command | ||
327 | * is used to configure connection quality monitoring notification trigger | ||
328 | * levels. | ||
329 | * @NL80211_CMD_NOTIFY_CQM: Connection quality monitor notification. This | ||
330 | * command is used as an event to indicate the that a trigger level was | ||
331 | * reached. | ||
326 | * | 332 | * |
327 | * @NL80211_CMD_MAX: highest used command number | 333 | * @NL80211_CMD_MAX: highest used command number |
328 | * @__NL80211_CMD_AFTER_LAST: internal use | 334 | * @__NL80211_CMD_AFTER_LAST: internal use |
@@ -419,6 +425,9 @@ enum nl80211_commands { | |||
419 | NL80211_CMD_SET_POWER_SAVE, | 425 | NL80211_CMD_SET_POWER_SAVE, |
420 | NL80211_CMD_GET_POWER_SAVE, | 426 | NL80211_CMD_GET_POWER_SAVE, |
421 | 427 | ||
428 | NL80211_CMD_SET_CQM, | ||
429 | NL80211_CMD_NOTIFY_CQM, | ||
430 | |||
422 | /* add new commands above here */ | 431 | /* add new commands above here */ |
423 | 432 | ||
424 | /* used to define NL80211_CMD_MAX below */ | 433 | /* used to define NL80211_CMD_MAX below */ |
@@ -691,6 +700,15 @@ enum nl80211_commands { | |||
691 | * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was | 700 | * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was |
692 | * acknowledged by the recipient. | 701 | * acknowledged by the recipient. |
693 | * | 702 | * |
703 | * @NL80211_ATTR_CQM: connection quality monitor configuration in a | ||
704 | * nested attribute with %NL80211_ATTR_CQM_* sub-attributes. | ||
705 | * | ||
706 | * @NL80211_ATTR_LOCAL_STATE_CHANGE: Flag attribute to indicate that a command | ||
707 | * is requesting a local authentication/association state change without | ||
708 | * invoking actual management frame exchange. This can be used with | ||
709 | * NL80211_CMD_AUTHENTICATE, NL80211_CMD_DEAUTHENTICATE, | ||
710 | * NL80211_CMD_DISASSOCIATE. | ||
711 | * | ||
694 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 712 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
695 | * @__NL80211_ATTR_AFTER_LAST: internal use | 713 | * @__NL80211_ATTR_AFTER_LAST: internal use |
696 | */ | 714 | */ |
@@ -842,6 +860,10 @@ enum nl80211_attrs { | |||
842 | 860 | ||
843 | NL80211_ATTR_PS_STATE, | 861 | NL80211_ATTR_PS_STATE, |
844 | 862 | ||
863 | NL80211_ATTR_CQM, | ||
864 | |||
865 | NL80211_ATTR_LOCAL_STATE_CHANGE, | ||
866 | |||
845 | /* add attributes here, update the policy in nl80211.c */ | 867 | /* add attributes here, update the policy in nl80211.c */ |
846 | 868 | ||
847 | __NL80211_ATTR_AFTER_LAST, | 869 | __NL80211_ATTR_AFTER_LAST, |
@@ -1583,4 +1605,40 @@ enum nl80211_ps_state { | |||
1583 | NL80211_PS_ENABLED, | 1605 | NL80211_PS_ENABLED, |
1584 | }; | 1606 | }; |
1585 | 1607 | ||
1608 | /** | ||
1609 | * enum nl80211_attr_cqm - connection quality monitor attributes | ||
1610 | * @__NL80211_ATTR_CQM_INVALID: invalid | ||
1611 | * @NL80211_ATTR_CQM_RSSI_THOLD: RSSI threshold in dBm. This value specifies | ||
1612 | * the threshold for the RSSI level at which an event will be sent. Zero | ||
1613 | * to disable. | ||
1614 | * @NL80211_ATTR_CQM_RSSI_HYST: RSSI hysteresis in dBm. This value specifies | ||
1615 | * the minimum amount the RSSI level must change after an event before a | ||
1616 | * new event may be issued (to reduce effects of RSSI oscillation). | ||
1617 | * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event | ||
1618 | * @__NL80211_ATTR_CQM_AFTER_LAST: internal | ||
1619 | * @NL80211_ATTR_CQM_MAX: highest key attribute | ||
1620 | */ | ||
1621 | enum nl80211_attr_cqm { | ||
1622 | __NL80211_ATTR_CQM_INVALID, | ||
1623 | NL80211_ATTR_CQM_RSSI_THOLD, | ||
1624 | NL80211_ATTR_CQM_RSSI_HYST, | ||
1625 | NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT, | ||
1626 | |||
1627 | /* keep last */ | ||
1628 | __NL80211_ATTR_CQM_AFTER_LAST, | ||
1629 | NL80211_ATTR_CQM_MAX = __NL80211_ATTR_CQM_AFTER_LAST - 1 | ||
1630 | }; | ||
1631 | |||
1632 | /** | ||
1633 | * enum nl80211_cqm_rssi_threshold_event - RSSI threshold event | ||
1634 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW - The RSSI level is lower than the | ||
1635 | * configured threshold | ||
1636 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH - The RSSI is higher than the | ||
1637 | * configured threshold | ||
1638 | */ | ||
1639 | enum nl80211_cqm_rssi_threshold_event { | ||
1640 | NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, | ||
1641 | NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, | ||
1642 | }; | ||
1643 | |||
1586 | #endif /* __LINUX_NL80211_H */ | 1644 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index fee6c2f68075..9c5d3fad01f3 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -182,7 +182,10 @@ static inline int notifier_to_errno(int ret) | |||
182 | * VC switch chains (for loadable kernel svgalib VC switch helpers) etc... | 182 | * VC switch chains (for loadable kernel svgalib VC switch helpers) etc... |
183 | */ | 183 | */ |
184 | 184 | ||
185 | /* netdevice notifier chain */ | 185 | /* netdevice notifier chain. Please remember to update the rtnetlink |
186 | * notification exclusion list in rtnetlink_event() when adding new | ||
187 | * types. | ||
188 | */ | ||
186 | #define NETDEV_UP 0x0001 /* For now you can't veto a device up/down */ | 189 | #define NETDEV_UP 0x0001 /* For now you can't veto a device up/down */ |
187 | #define NETDEV_DOWN 0x0002 | 190 | #define NETDEV_DOWN 0x0002 |
188 | #define NETDEV_REBOOT 0x0003 /* Tell a protocol stack a network interface | 191 | #define NETDEV_REBOOT 0x0003 /* Tell a protocol stack a network interface |
@@ -199,8 +202,8 @@ static inline int notifier_to_errno(int ret) | |||
199 | #define NETDEV_FEAT_CHANGE 0x000B | 202 | #define NETDEV_FEAT_CHANGE 0x000B |
200 | #define NETDEV_BONDING_FAILOVER 0x000C | 203 | #define NETDEV_BONDING_FAILOVER 0x000C |
201 | #define NETDEV_PRE_UP 0x000D | 204 | #define NETDEV_PRE_UP 0x000D |
202 | #define NETDEV_BONDING_OLDTYPE 0x000E | 205 | #define NETDEV_PRE_TYPE_CHANGE 0x000E |
203 | #define NETDEV_BONDING_NEWTYPE 0x000F | 206 | #define NETDEV_POST_TYPE_CHANGE 0x000F |
204 | #define NETDEV_POST_INIT 0x0010 | 207 | #define NETDEV_POST_INIT 0x0010 |
205 | #define NETDEV_UNREGISTER_BATCH 0x0011 | 208 | #define NETDEV_UNREGISTER_BATCH 0x0011 |
206 | 209 | ||
diff --git a/include/linux/of.h b/include/linux/of.h index f6d9cbc39c9c..a367e19bb3af 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -127,7 +127,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) | |||
127 | 127 | ||
128 | /* Default string compare functions, Allow arch asm/prom.h to override */ | 128 | /* Default string compare functions, Allow arch asm/prom.h to override */ |
129 | #if !defined(of_compat_cmp) | 129 | #if !defined(of_compat_cmp) |
130 | #define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l)) | 130 | #define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2)) |
131 | #define of_prop_cmp(s1, s2) strcmp((s1), (s2)) | 131 | #define of_prop_cmp(s1, s2) strcmp((s1), (s2)) |
132 | #define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) | 132 | #define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) |
133 | #endif | 133 | #endif |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index 30b08136fdf3..aef22ae2af47 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
@@ -39,6 +39,7 @@ enum { | |||
39 | PCG_CACHE, /* charged as cache */ | 39 | PCG_CACHE, /* charged as cache */ |
40 | PCG_USED, /* this object is in use. */ | 40 | PCG_USED, /* this object is in use. */ |
41 | PCG_ACCT_LRU, /* page has been accounted for */ | 41 | PCG_ACCT_LRU, /* page has been accounted for */ |
42 | PCG_FILE_MAPPED, /* page is accounted as "mapped" */ | ||
42 | }; | 43 | }; |
43 | 44 | ||
44 | #define TESTPCGFLAG(uname, lname) \ | 45 | #define TESTPCGFLAG(uname, lname) \ |
@@ -73,6 +74,11 @@ CLEARPCGFLAG(AcctLRU, ACCT_LRU) | |||
73 | TESTPCGFLAG(AcctLRU, ACCT_LRU) | 74 | TESTPCGFLAG(AcctLRU, ACCT_LRU) |
74 | TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) | 75 | TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) |
75 | 76 | ||
77 | |||
78 | SETPCGFLAG(FileMapped, FILE_MAPPED) | ||
79 | CLEARPCGFLAG(FileMapped, FILE_MAPPED) | ||
80 | TESTPCGFLAG(FileMapped, FILE_MAPPED) | ||
81 | |||
76 | static inline int page_cgroup_nid(struct page_cgroup *pc) | 82 | static inline int page_cgroup_nid(struct page_cgroup *pc) |
77 | { | 83 | { |
78 | return page_to_nid(pc->page); | 84 | return page_to_nid(pc->page); |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index a93e5bfdccb8..d3a38d687104 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -2,10 +2,10 @@ | |||
2 | #define __LINUX_PERCPU_H | 2 | #define __LINUX_PERCPU_H |
3 | 3 | ||
4 | #include <linux/preempt.h> | 4 | #include <linux/preempt.h> |
5 | #include <linux/slab.h> /* For kmalloc() */ | ||
6 | #include <linux/smp.h> | 5 | #include <linux/smp.h> |
7 | #include <linux/cpumask.h> | 6 | #include <linux/cpumask.h> |
8 | #include <linux/pfn.h> | 7 | #include <linux/pfn.h> |
8 | #include <linux/init.h> | ||
9 | 9 | ||
10 | #include <asm/percpu.h> | 10 | #include <asm/percpu.h> |
11 | 11 | ||
@@ -135,9 +135,7 @@ extern int __init pcpu_page_first_chunk(size_t reserved_size, | |||
135 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) | 135 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) |
136 | 136 | ||
137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); | 137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); |
138 | extern void __percpu *__alloc_percpu(size_t size, size_t align); | 138 | extern bool is_kernel_percpu_address(unsigned long addr); |
139 | extern void free_percpu(void __percpu *__pdata); | ||
140 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | ||
141 | 139 | ||
142 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA | 140 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA |
143 | extern void __init setup_per_cpu_areas(void); | 141 | extern void __init setup_per_cpu_areas(void); |
@@ -147,25 +145,10 @@ extern void __init setup_per_cpu_areas(void); | |||
147 | 145 | ||
148 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | 146 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) |
149 | 147 | ||
150 | static inline void __percpu *__alloc_percpu(size_t size, size_t align) | 148 | /* can't distinguish from other static vars, always false */ |
149 | static inline bool is_kernel_percpu_address(unsigned long addr) | ||
151 | { | 150 | { |
152 | /* | 151 | return false; |
153 | * Can't easily make larger alignment work with kmalloc. WARN | ||
154 | * on it. Larger alignment should only be used for module | ||
155 | * percpu sections on SMP for which this path isn't used. | ||
156 | */ | ||
157 | WARN_ON_ONCE(align > SMP_CACHE_BYTES); | ||
158 | return kzalloc(size, GFP_KERNEL); | ||
159 | } | ||
160 | |||
161 | static inline void free_percpu(void __percpu *p) | ||
162 | { | ||
163 | kfree(p); | ||
164 | } | ||
165 | |||
166 | static inline phys_addr_t per_cpu_ptr_to_phys(void *addr) | ||
167 | { | ||
168 | return __pa(addr); | ||
169 | } | 152 | } |
170 | 153 | ||
171 | static inline void __init setup_per_cpu_areas(void) { } | 154 | static inline void __init setup_per_cpu_areas(void) { } |
@@ -177,6 +160,10 @@ static inline void *pcpu_lpage_remapped(void *kaddr) | |||
177 | 160 | ||
178 | #endif /* CONFIG_SMP */ | 161 | #endif /* CONFIG_SMP */ |
179 | 162 | ||
163 | extern void __percpu *__alloc_percpu(size_t size, size_t align); | ||
164 | extern void free_percpu(void __percpu *__pdata); | ||
165 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | ||
166 | |||
180 | #define alloc_percpu(type) \ | 167 | #define alloc_percpu(type) \ |
181 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) | 168 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) |
182 | 169 | ||
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 6f8cd7da1a01..c8e375440403 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -452,6 +452,8 @@ enum perf_callchain_context { | |||
452 | #include <linux/fs.h> | 452 | #include <linux/fs.h> |
453 | #include <linux/pid_namespace.h> | 453 | #include <linux/pid_namespace.h> |
454 | #include <linux/workqueue.h> | 454 | #include <linux/workqueue.h> |
455 | #include <linux/ftrace.h> | ||
456 | #include <linux/cpu.h> | ||
455 | #include <asm/atomic.h> | 457 | #include <asm/atomic.h> |
456 | 458 | ||
457 | #define PERF_MAX_STACK_DEPTH 255 | 459 | #define PERF_MAX_STACK_DEPTH 255 |
@@ -840,11 +842,56 @@ extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX]; | |||
840 | 842 | ||
841 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); | 843 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); |
842 | 844 | ||
845 | extern void | ||
846 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); | ||
847 | |||
848 | /* | ||
849 | * Take a snapshot of the regs. Skip ip and frame pointer to | ||
850 | * the nth caller. We only need a few of the regs: | ||
851 | * - ip for PERF_SAMPLE_IP | ||
852 | * - cs for user_mode() tests | ||
853 | * - bp for callchains | ||
854 | * - eflags, for future purposes, just in case | ||
855 | */ | ||
856 | static inline void perf_fetch_caller_regs(struct pt_regs *regs, int skip) | ||
857 | { | ||
858 | unsigned long ip; | ||
859 | |||
860 | memset(regs, 0, sizeof(*regs)); | ||
861 | |||
862 | switch (skip) { | ||
863 | case 1 : | ||
864 | ip = CALLER_ADDR0; | ||
865 | break; | ||
866 | case 2 : | ||
867 | ip = CALLER_ADDR1; | ||
868 | break; | ||
869 | case 3 : | ||
870 | ip = CALLER_ADDR2; | ||
871 | break; | ||
872 | case 4: | ||
873 | ip = CALLER_ADDR3; | ||
874 | break; | ||
875 | /* No need to support further for now */ | ||
876 | default: | ||
877 | ip = 0; | ||
878 | } | ||
879 | |||
880 | return perf_arch_fetch_caller_regs(regs, ip, skip); | ||
881 | } | ||
882 | |||
843 | static inline void | 883 | static inline void |
844 | perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | 884 | perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) |
845 | { | 885 | { |
846 | if (atomic_read(&perf_swevent_enabled[event_id])) | 886 | if (atomic_read(&perf_swevent_enabled[event_id])) { |
887 | struct pt_regs hot_regs; | ||
888 | |||
889 | if (!regs) { | ||
890 | perf_fetch_caller_regs(&hot_regs, 1); | ||
891 | regs = &hot_regs; | ||
892 | } | ||
847 | __perf_sw_event(event_id, nr, nmi, regs, addr); | 893 | __perf_sw_event(event_id, nr, nmi, regs, addr); |
894 | } | ||
848 | } | 895 | } |
849 | 896 | ||
850 | extern void __perf_event_mmap(struct vm_area_struct *vma); | 897 | extern void __perf_event_mmap(struct vm_area_struct *vma); |
@@ -880,7 +927,8 @@ static inline bool perf_paranoid_kernel(void) | |||
880 | } | 927 | } |
881 | 928 | ||
882 | extern void perf_event_init(void); | 929 | extern void perf_event_init(void); |
883 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size); | 930 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, |
931 | int entry_size, struct pt_regs *regs); | ||
884 | extern void perf_bp_event(struct perf_event *event, void *data); | 932 | extern void perf_bp_event(struct perf_event *event, void *data); |
885 | 933 | ||
886 | #ifndef perf_misc_flags | 934 | #ifndef perf_misc_flags |
@@ -936,5 +984,21 @@ static inline void perf_event_disable(struct perf_event *event) { } | |||
936 | #define perf_output_put(handle, x) \ | 984 | #define perf_output_put(handle, x) \ |
937 | perf_output_copy((handle), &(x), sizeof(x)) | 985 | perf_output_copy((handle), &(x), sizeof(x)) |
938 | 986 | ||
987 | /* | ||
988 | * This has to have a higher priority than migration_notifier in sched.c. | ||
989 | */ | ||
990 | #define perf_cpu_notifier(fn) \ | ||
991 | do { \ | ||
992 | static struct notifier_block fn##_nb __cpuinitdata = \ | ||
993 | { .notifier_call = fn, .priority = 20 }; \ | ||
994 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ | ||
995 | (void *)(unsigned long)smp_processor_id()); \ | ||
996 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ | ||
997 | (void *)(unsigned long)smp_processor_id()); \ | ||
998 | fn(&fn##_nb, (unsigned long)CPU_ONLINE, \ | ||
999 | (void *)(unsigned long)smp_processor_id()); \ | ||
1000 | register_cpu_notifier(&fn##_nb); \ | ||
1001 | } while (0) | ||
1002 | |||
939 | #endif /* __KERNEL__ */ | 1003 | #endif /* __KERNEL__ */ |
940 | #endif /* _LINUX_PERF_EVENT_H */ | 1004 | #endif /* _LINUX_PERF_EVENT_H */ |
diff --git a/include/linux/phy.h b/include/linux/phy.h index d9bce4b526b4..987e111f7b11 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/mii.h> | 24 | #include <linux/mii.h> |
25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
26 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
27 | #include <linux/mod_devicetable.h> | ||
27 | 28 | ||
28 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
29 | 30 | ||
diff --git a/include/linux/ppp_channel.h b/include/linux/ppp_channel.h index 0d3fa63e90ea..bff98ec1bfed 100644 --- a/include/linux/ppp_channel.h +++ b/include/linux/ppp_channel.h | |||
@@ -72,6 +72,9 @@ extern int ppp_channel_index(struct ppp_channel *); | |||
72 | /* Get the unit number associated with a channel, or -1 if none */ | 72 | /* Get the unit number associated with a channel, or -1 if none */ |
73 | extern int ppp_unit_number(struct ppp_channel *); | 73 | extern int ppp_unit_number(struct ppp_channel *); |
74 | 74 | ||
75 | /* Get the device name associated with a channel, or NULL if none */ | ||
76 | extern char *ppp_dev_name(struct ppp_channel *); | ||
77 | |||
75 | /* | 78 | /* |
76 | * SMP locking notes: | 79 | * SMP locking notes: |
77 | * The channel code must ensure that when it calls ppp_unregister_channel, | 80 | * The channel code must ensure that when it calls ppp_unregister_channel, |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index c5da74918096..55ca73cf25e5 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
@@ -121,6 +121,13 @@ do { \ | |||
121 | * (Note, rcu_assign_pointer and rcu_dereference are not needed to control | 121 | * (Note, rcu_assign_pointer and rcu_dereference are not needed to control |
122 | * access to data items when inserting into or looking up from the radix tree) | 122 | * access to data items when inserting into or looking up from the radix tree) |
123 | * | 123 | * |
124 | * Note that the value returned by radix_tree_tag_get() may not be relied upon | ||
125 | * if only the RCU read lock is held. Functions to set/clear tags and to | ||
126 | * delete nodes running concurrently with it may affect its result such that | ||
127 | * two consecutive reads in the same locked section may return different | ||
128 | * values. If reliability is required, modification functions must also be | ||
129 | * excluded from concurrency. | ||
130 | * | ||
124 | * radix_tree_tagged is able to be called without locking or RCU. | 131 | * radix_tree_tagged is able to be called without locking or RCU. |
125 | */ | 132 | */ |
126 | 133 | ||
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 2c9b46cff3d7..004908b104d5 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
@@ -428,5 +428,18 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
428 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | 428 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ |
429 | pos = rcu_dereference_raw(pos->next)) | 429 | pos = rcu_dereference_raw(pos->next)) |
430 | 430 | ||
431 | /** | ||
432 | * hlist_for_each_entry_continue_rcu - iterate over a hlist continuing after current point | ||
433 | * @tpos: the type * to use as a loop cursor. | ||
434 | * @pos: the &struct hlist_node to use as a loop cursor. | ||
435 | * @member: the name of the hlist_node within the struct. | ||
436 | */ | ||
437 | #define hlist_for_each_entry_continue_rcu(tpos, pos, member) \ | ||
438 | for (pos = rcu_dereference((pos)->next); \ | ||
439 | pos && ({ prefetch(pos->next); 1; }) && \ | ||
440 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | ||
441 | pos = rcu_dereference(pos->next)) | ||
442 | |||
443 | |||
431 | #endif /* __KERNEL__ */ | 444 | #endif /* __KERNEL__ */ |
432 | #endif | 445 | #endif |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 3024050c82a1..872a98e13d6a 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -123,22 +123,11 @@ static inline int rcu_read_lock_held(void) | |||
123 | return lock_is_held(&rcu_lock_map); | 123 | return lock_is_held(&rcu_lock_map); |
124 | } | 124 | } |
125 | 125 | ||
126 | /** | 126 | /* |
127 | * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? | 127 | * rcu_read_lock_bh_held() is defined out of line to avoid #include-file |
128 | * | 128 | * hell. |
129 | * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in | ||
130 | * an RCU-bh read-side critical section. In absence of CONFIG_PROVE_LOCKING, | ||
131 | * this assumes we are in an RCU-bh read-side critical section unless it can | ||
132 | * prove otherwise. | ||
133 | * | ||
134 | * Check rcu_scheduler_active to prevent false positives during boot. | ||
135 | */ | 129 | */ |
136 | static inline int rcu_read_lock_bh_held(void) | 130 | extern int rcu_read_lock_bh_held(void); |
137 | { | ||
138 | if (!debug_lockdep_rcu_enabled()) | ||
139 | return 1; | ||
140 | return lock_is_held(&rcu_bh_lock_map); | ||
141 | } | ||
142 | 131 | ||
143 | /** | 132 | /** |
144 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? | 133 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? |
@@ -160,7 +149,7 @@ static inline int rcu_read_lock_sched_held(void) | |||
160 | return 1; | 149 | return 1; |
161 | if (debug_locks) | 150 | if (debug_locks) |
162 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); | 151 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); |
163 | return lockdep_opinion || preempt_count() != 0; | 152 | return lockdep_opinion || preempt_count() != 0 || irqs_disabled(); |
164 | } | 153 | } |
165 | #else /* #ifdef CONFIG_PREEMPT */ | 154 | #else /* #ifdef CONFIG_PREEMPT */ |
166 | static inline int rcu_read_lock_sched_held(void) | 155 | static inline int rcu_read_lock_sched_held(void) |
@@ -191,7 +180,7 @@ static inline int rcu_read_lock_bh_held(void) | |||
191 | #ifdef CONFIG_PREEMPT | 180 | #ifdef CONFIG_PREEMPT |
192 | static inline int rcu_read_lock_sched_held(void) | 181 | static inline int rcu_read_lock_sched_held(void) |
193 | { | 182 | { |
194 | return !rcu_scheduler_active || preempt_count() != 0; | 183 | return !rcu_scheduler_active || preempt_count() != 0 || irqs_disabled(); |
195 | } | 184 | } |
196 | #else /* #ifdef CONFIG_PREEMPT */ | 185 | #else /* #ifdef CONFIG_PREEMPT */ |
197 | static inline int rcu_read_lock_sched_held(void) | 186 | static inline int rcu_read_lock_sched_held(void) |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 99928dce37ea..7fa02b4af838 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -70,6 +70,11 @@ int reiserfs_security_write(struct reiserfs_transaction_handle *th, | |||
70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); | 70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); |
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | static inline int reiserfs_xattrs_initialized(struct super_block *sb) | ||
74 | { | ||
75 | return REISERFS_SB(sb)->priv_root != NULL; | ||
76 | } | ||
77 | |||
73 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) | 78 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) |
74 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) | 79 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) |
75 | { | 80 | { |
diff --git a/include/linux/security.h b/include/linux/security.h index 233d20b52c1b..3158dd982d27 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
34 | #include <linux/key.h> | 34 | #include <linux/key.h> |
35 | #include <linux/xfrm.h> | 35 | #include <linux/xfrm.h> |
36 | #include <linux/gfp.h> | 36 | #include <linux/slab.h> |
37 | #include <net/flow.h> | 37 | #include <net/flow.h> |
38 | 38 | ||
39 | /* Maximum number of letters for an LSM name string */ | 39 | /* Maximum number of letters for an LSM name string */ |
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 1b177d29a7f0..193d4bfe42ff 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
@@ -2,7 +2,9 @@ | |||
2 | #define __LINUX_SERIAL_SCI_H | 2 | #define __LINUX_SERIAL_SCI_H |
3 | 3 | ||
4 | #include <linux/serial_core.h> | 4 | #include <linux/serial_core.h> |
5 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | ||
5 | #include <asm/dmaengine.h> | 6 | #include <asm/dmaengine.h> |
7 | #endif | ||
6 | 8 | ||
7 | /* | 9 | /* |
8 | * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) | 10 | * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) |
@@ -30,8 +32,10 @@ struct plat_sci_port { | |||
30 | upf_t flags; /* UPF_* flags */ | 32 | upf_t flags; /* UPF_* flags */ |
31 | char *clk; /* clock string */ | 33 | char *clk; /* clock string */ |
32 | struct device *dma_dev; | 34 | struct device *dma_dev; |
35 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | ||
33 | enum sh_dmae_slave_chan_id dma_slave_tx; | 36 | enum sh_dmae_slave_chan_id dma_slave_tx; |
34 | enum sh_dmae_slave_chan_id dma_slave_rx; | 37 | enum sh_dmae_slave_chan_id dma_slave_rx; |
38 | #endif | ||
35 | }; | 39 | }; |
36 | 40 | ||
37 | #endif /* __LINUX_SERIAL_SCI_H */ | 41 | #endif /* __LINUX_SERIAL_SCI_H */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index def10b064f29..38501d20650c 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -190,9 +190,6 @@ struct skb_shared_info { | |||
190 | atomic_t dataref; | 190 | atomic_t dataref; |
191 | unsigned short nr_frags; | 191 | unsigned short nr_frags; |
192 | unsigned short gso_size; | 192 | unsigned short gso_size; |
193 | #ifdef CONFIG_HAS_DMA | ||
194 | dma_addr_t dma_head; | ||
195 | #endif | ||
196 | /* Warning: this field is not always filled in (UFO)! */ | 193 | /* Warning: this field is not always filled in (UFO)! */ |
197 | unsigned short gso_segs; | 194 | unsigned short gso_segs; |
198 | unsigned short gso_type; | 195 | unsigned short gso_type; |
@@ -201,9 +198,6 @@ struct skb_shared_info { | |||
201 | struct sk_buff *frag_list; | 198 | struct sk_buff *frag_list; |
202 | struct skb_shared_hwtstamps hwtstamps; | 199 | struct skb_shared_hwtstamps hwtstamps; |
203 | skb_frag_t frags[MAX_SKB_FRAGS]; | 200 | skb_frag_t frags[MAX_SKB_FRAGS]; |
204 | #ifdef CONFIG_HAS_DMA | ||
205 | dma_addr_t dma_maps[MAX_SKB_FRAGS]; | ||
206 | #endif | ||
207 | /* Intermediate layers must ensure that destructor_arg | 201 | /* Intermediate layers must ensure that destructor_arg |
208 | * remains valid until skb destructor */ | 202 | * remains valid until skb destructor */ |
209 | void * destructor_arg; | 203 | void * destructor_arg; |
@@ -476,7 +470,6 @@ extern int skb_cow_data(struct sk_buff *skb, int tailbits, | |||
476 | struct sk_buff **trailer); | 470 | struct sk_buff **trailer); |
477 | extern int skb_pad(struct sk_buff *skb, int pad); | 471 | extern int skb_pad(struct sk_buff *skb, int pad); |
478 | #define dev_kfree_skb(a) consume_skb(a) | 472 | #define dev_kfree_skb(a) consume_skb(a) |
479 | #define dev_consume_skb(a) kfree_skb_clean(a) | ||
480 | extern void skb_over_panic(struct sk_buff *skb, int len, | 473 | extern void skb_over_panic(struct sk_buff *skb, int len, |
481 | void *here); | 474 | void *here); |
482 | extern void skb_under_panic(struct sk_buff *skb, int len, | 475 | extern void skb_under_panic(struct sk_buff *skb, int len, |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 488446289cab..49d1247cd6d9 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -106,6 +106,7 @@ int kmem_cache_shrink(struct kmem_cache *); | |||
106 | void kmem_cache_free(struct kmem_cache *, void *); | 106 | void kmem_cache_free(struct kmem_cache *, void *); |
107 | unsigned int kmem_cache_size(struct kmem_cache *); | 107 | unsigned int kmem_cache_size(struct kmem_cache *); |
108 | const char *kmem_cache_name(struct kmem_cache *); | 108 | const char *kmem_cache_name(struct kmem_cache *); |
109 | int kern_ptr_validate(const void *ptr, unsigned long size); | ||
109 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | 110 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); |
110 | 111 | ||
111 | /* | 112 | /* |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index 4435d1084755..52797714ade7 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
@@ -100,6 +100,7 @@ enum | |||
100 | ICMP6_MIB_INMSGS, /* InMsgs */ | 100 | ICMP6_MIB_INMSGS, /* InMsgs */ |
101 | ICMP6_MIB_INERRORS, /* InErrors */ | 101 | ICMP6_MIB_INERRORS, /* InErrors */ |
102 | ICMP6_MIB_OUTMSGS, /* OutMsgs */ | 102 | ICMP6_MIB_OUTMSGS, /* OutMsgs */ |
103 | ICMP6_MIB_OUTERRORS, /* OutErrors */ | ||
103 | __ICMP6_MIB_MAX | 104 | __ICMP6_MIB_MAX |
104 | }; | 105 | }; |
105 | 106 | ||
@@ -227,6 +228,7 @@ enum | |||
227 | LINUX_MIB_SACKSHIFTFALLBACK, | 228 | LINUX_MIB_SACKSHIFTFALLBACK, |
228 | LINUX_MIB_TCPBACKLOGDROP, | 229 | LINUX_MIB_TCPBACKLOGDROP, |
229 | LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ | 230 | LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ |
231 | LINUX_MIB_TCPDEFERACCEPTDROP, | ||
230 | __LINUX_MIB_MAX | 232 | __LINUX_MIB_MAX |
231 | }; | 233 | }; |
232 | 234 | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index 7b3aae2052a6..032a19eb61b1 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -189,7 +189,8 @@ struct ucred { | |||
189 | #define AF_ISDN 34 /* mISDN sockets */ | 189 | #define AF_ISDN 34 /* mISDN sockets */ |
190 | #define AF_PHONET 35 /* Phonet sockets */ | 190 | #define AF_PHONET 35 /* Phonet sockets */ |
191 | #define AF_IEEE802154 36 /* IEEE802154 sockets */ | 191 | #define AF_IEEE802154 36 /* IEEE802154 sockets */ |
192 | #define AF_MAX 37 /* For now.. */ | 192 | #define AF_CAIF 37 /* CAIF sockets */ |
193 | #define AF_MAX 38 /* For now.. */ | ||
193 | 194 | ||
194 | /* Protocol families, same as address families. */ | 195 | /* Protocol families, same as address families. */ |
195 | #define PF_UNSPEC AF_UNSPEC | 196 | #define PF_UNSPEC AF_UNSPEC |
@@ -229,6 +230,7 @@ struct ucred { | |||
229 | #define PF_ISDN AF_ISDN | 230 | #define PF_ISDN AF_ISDN |
230 | #define PF_PHONET AF_PHONET | 231 | #define PF_PHONET AF_PHONET |
231 | #define PF_IEEE802154 AF_IEEE802154 | 232 | #define PF_IEEE802154 AF_IEEE802154 |
233 | #define PF_CAIF AF_CAIF | ||
232 | #define PF_MAX AF_MAX | 234 | #define PF_MAX AF_MAX |
233 | 235 | ||
234 | /* Maximum queue length specifiable by listen. */ | 236 | /* Maximum queue length specifiable by listen. */ |
@@ -255,6 +257,7 @@ struct ucred { | |||
255 | #define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ | 257 | #define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ |
256 | #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ | 258 | #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ |
257 | #define MSG_MORE 0x8000 /* Sender will send more */ | 259 | #define MSG_MORE 0x8000 /* Sender will send more */ |
260 | #define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */ | ||
258 | 261 | ||
259 | #define MSG_EOF MSG_FIN | 262 | #define MSG_EOF MSG_FIN |
260 | 263 | ||
@@ -300,6 +303,7 @@ struct ucred { | |||
300 | #define SOL_PNPIPE 275 | 303 | #define SOL_PNPIPE 275 |
301 | #define SOL_RDS 276 | 304 | #define SOL_RDS 276 |
302 | #define SOL_IUCV 277 | 305 | #define SOL_IUCV 277 |
306 | #define SOL_CAIF 278 | ||
303 | 307 | ||
304 | /* IPX options */ | 308 | /* IPX options */ |
305 | #define IPX_TYPE 1 | 309 | #define IPX_TYPE 1 |
diff --git a/include/linux/spi/l4f00242t03.h b/include/linux/spi/l4f00242t03.h new file mode 100644 index 000000000000..aee1dbda4edc --- /dev/null +++ b/include/linux/spi/l4f00242t03.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * l4f00242t03.h -- Platform glue for Epson L4F00242T03 LCD | ||
3 | * | ||
4 | * Copyright (c) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> | ||
5 | * Based on Marek Vasut work in lms283gf05.h | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef _INCLUDE_LINUX_SPI_L4F00242T03_H_ | ||
22 | #define _INCLUDE_LINUX_SPI_L4F00242T03_H_ | ||
23 | |||
24 | struct l4f00242t03_pdata { | ||
25 | unsigned int reset_gpio; | ||
26 | unsigned int data_enable_gpio; | ||
27 | const char *io_supply; /* will be set to 1.8 V */ | ||
28 | const char *core_supply; /* will be set to 2.8 V */ | ||
29 | }; | ||
30 | |||
31 | #endif /* _INCLUDE_LINUX_SPI_L4F00242T03_H_ */ | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 97b60b37f445..af56071b06f9 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/mod_devicetable.h> | 23 | #include <linux/mod_devicetable.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * INTERFACES between SPI master-side drivers and SPI infrastructure. | 27 | * INTERFACES between SPI master-side drivers and SPI infrastructure. |
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 32bfd1a8a48d..632ff7c03280 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
@@ -33,6 +33,7 @@ struct plat_stmmacenet_data { | |||
33 | int bus_id; | 33 | int bus_id; |
34 | int pbl; | 34 | int pbl; |
35 | int has_gmac; | 35 | int has_gmac; |
36 | int enh_desc; | ||
36 | void (*fix_mac_speed)(void *priv, unsigned int speed); | 37 | void (*fix_mac_speed)(void *priv, unsigned int speed); |
37 | void (*bus_setup)(unsigned long ioaddr); | 38 | void (*bus_setup)(unsigned long ioaddr); |
38 | #ifdef CONFIG_STM_DRIVERS | 39 | #ifdef CONFIG_STM_DRIVERS |
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index d7152b451e21..7c91260c44a9 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
@@ -36,7 +36,6 @@ struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); | |||
36 | void xprt_free_bc_request(struct rpc_rqst *req); | 36 | void xprt_free_bc_request(struct rpc_rqst *req); |
37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); | 37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); |
38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); | 38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); |
39 | void bc_release_request(struct rpc_task *); | ||
40 | int bc_send(struct rpc_rqst *req); | 39 | int bc_send(struct rpc_rqst *req); |
41 | 40 | ||
42 | /* | 41 | /* |
@@ -59,6 +58,10 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
59 | { | 58 | { |
60 | return 0; | 59 | return 0; |
61 | } | 60 | } |
61 | |||
62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | ||
63 | { | ||
64 | } | ||
62 | #endif /* CONFIG_NFS_V4_1 */ | 65 | #endif /* CONFIG_NFS_V4_1 */ |
63 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ | 66 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ |
64 | 67 | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 44f2ad0e8825..057929b0a651 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -105,18 +105,18 @@ struct perf_event_attr; | |||
105 | 105 | ||
106 | #ifdef CONFIG_PERF_EVENTS | 106 | #ifdef CONFIG_PERF_EVENTS |
107 | 107 | ||
108 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) \ | 108 | #define TRACE_SYS_ENTER_PERF_INIT(sname) \ |
109 | .profile_enable = prof_sysenter_enable, \ | 109 | .perf_event_enable = perf_sysenter_enable, \ |
110 | .profile_disable = prof_sysenter_disable, | 110 | .perf_event_disable = perf_sysenter_disable, |
111 | 111 | ||
112 | #define TRACE_SYS_EXIT_PROFILE_INIT(sname) \ | 112 | #define TRACE_SYS_EXIT_PERF_INIT(sname) \ |
113 | .profile_enable = prof_sysexit_enable, \ | 113 | .perf_event_enable = perf_sysexit_enable, \ |
114 | .profile_disable = prof_sysexit_disable, | 114 | .perf_event_disable = perf_sysexit_disable, |
115 | #else | 115 | #else |
116 | #define TRACE_SYS_ENTER_PROFILE(sname) | 116 | #define TRACE_SYS_ENTER_PERF(sname) |
117 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) | 117 | #define TRACE_SYS_ENTER_PERF_INIT(sname) |
118 | #define TRACE_SYS_EXIT_PROFILE(sname) | 118 | #define TRACE_SYS_EXIT_PERF(sname) |
119 | #define TRACE_SYS_EXIT_PROFILE_INIT(sname) | 119 | #define TRACE_SYS_EXIT_PERF_INIT(sname) |
120 | #endif /* CONFIG_PERF_EVENTS */ | 120 | #endif /* CONFIG_PERF_EVENTS */ |
121 | 121 | ||
122 | #ifdef CONFIG_FTRACE_SYSCALLS | 122 | #ifdef CONFIG_FTRACE_SYSCALLS |
@@ -153,7 +153,7 @@ struct perf_event_attr; | |||
153 | .regfunc = reg_event_syscall_enter, \ | 153 | .regfunc = reg_event_syscall_enter, \ |
154 | .unregfunc = unreg_event_syscall_enter, \ | 154 | .unregfunc = unreg_event_syscall_enter, \ |
155 | .data = (void *)&__syscall_meta_##sname,\ | 155 | .data = (void *)&__syscall_meta_##sname,\ |
156 | TRACE_SYS_ENTER_PROFILE_INIT(sname) \ | 156 | TRACE_SYS_ENTER_PERF_INIT(sname) \ |
157 | } | 157 | } |
158 | 158 | ||
159 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 159 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
@@ -175,7 +175,7 @@ struct perf_event_attr; | |||
175 | .regfunc = reg_event_syscall_exit, \ | 175 | .regfunc = reg_event_syscall_exit, \ |
176 | .unregfunc = unreg_event_syscall_exit, \ | 176 | .unregfunc = unreg_event_syscall_exit, \ |
177 | .data = (void *)&__syscall_meta_##sname,\ | 177 | .data = (void *)&__syscall_meta_##sname,\ |
178 | TRACE_SYS_EXIT_PROFILE_INIT(sname) \ | 178 | TRACE_SYS_EXIT_PERF_INIT(sname) \ |
179 | } | 179 | } |
180 | 180 | ||
181 | #define SYSCALL_METADATA(sname, nb) \ | 181 | #define SYSCALL_METADATA(sname, nb) \ |
@@ -688,7 +688,7 @@ asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); | |||
688 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); | 688 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); |
689 | asmlinkage long sys_shmdt(char __user *shmaddr); | 689 | asmlinkage long sys_shmdt(char __user *shmaddr); |
690 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); | 690 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); |
691 | asmlinkage long sys_ipc(unsigned int call, int first, int second, | 691 | asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second, |
692 | unsigned long third, void __user *ptr, long fifth); | 692 | unsigned long third, void __user *ptr, long fifth); |
693 | 693 | ||
694 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); | 694 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); |
diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index b6523c1427ce..58de6edf751f 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/taskstats.h> | 10 | #include <linux/taskstats.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | #ifdef CONFIG_TASKSTATS | 14 | #ifdef CONFIG_TASKSTATS |
14 | extern struct kmem_cache *taskstats_cache; | 15 | extern struct kmem_cache *taskstats_cache; |
diff --git a/include/linux/tipc.h b/include/linux/tipc.h index 3d92396639de..9536d8aeadf1 100644 --- a/include/linux/tipc.h +++ b/include/linux/tipc.h | |||
@@ -127,23 +127,17 @@ static inline unsigned int tipc_node(__u32 addr) | |||
127 | * TIPC topology subscription service definitions | 127 | * TIPC topology subscription service definitions |
128 | */ | 128 | */ |
129 | 129 | ||
130 | #define TIPC_SUB_PORTS 0x01 /* filter for port availability */ | 130 | #define TIPC_SUB_SERVICE 0x00 /* Filter for service availability */ |
131 | #define TIPC_SUB_SERVICE 0x02 /* filter for service availability */ | 131 | #define TIPC_SUB_PORTS 0x01 /* Filter for port availability */ |
132 | #define TIPC_SUB_CANCEL 0x04 /* cancel a subscription */ | 132 | #define TIPC_SUB_CANCEL 0x04 /* Cancel a subscription */ |
133 | #if 0 | ||
134 | /* The following filter options are not currently implemented */ | ||
135 | #define TIPC_SUB_NO_BIND_EVTS 0x04 /* filter out "publish" events */ | ||
136 | #define TIPC_SUB_NO_UNBIND_EVTS 0x08 /* filter out "withdraw" events */ | ||
137 | #define TIPC_SUB_SINGLE_EVT 0x10 /* expire after first event */ | ||
138 | #endif | ||
139 | 133 | ||
140 | #define TIPC_WAIT_FOREVER ~0 /* timeout for permanent subscription */ | 134 | #define TIPC_WAIT_FOREVER ~0 /* timeout for permanent subscription */ |
141 | 135 | ||
142 | struct tipc_subscr { | 136 | struct tipc_subscr { |
143 | struct tipc_name_seq seq; /* name sequence of interest */ | 137 | struct tipc_name_seq seq; /* NBO. Name sequence of interest */ |
144 | __u32 timeout; /* subscription duration (in ms) */ | 138 | __u32 timeout; /* NBO. Subscription duration (in ms) */ |
145 | __u32 filter; /* bitmask of filter options */ | 139 | __u32 filter; /* NBO. Bitmask of filter options */ |
146 | char usr_handle[8]; /* available for subscriber use */ | 140 | char usr_handle[8]; /* Opaque. Available for subscriber use */ |
147 | }; | 141 | }; |
148 | 142 | ||
149 | #define TIPC_PUBLISHED 1 /* publication event */ | 143 | #define TIPC_PUBLISHED 1 /* publication event */ |
@@ -151,11 +145,11 @@ struct tipc_subscr { | |||
151 | #define TIPC_SUBSCR_TIMEOUT 3 /* subscription timeout event */ | 145 | #define TIPC_SUBSCR_TIMEOUT 3 /* subscription timeout event */ |
152 | 146 | ||
153 | struct tipc_event { | 147 | struct tipc_event { |
154 | __u32 event; /* event type */ | 148 | __u32 event; /* NBO. Event type, as defined above */ |
155 | __u32 found_lower; /* matching name seq instances */ | 149 | __u32 found_lower; /* NBO. Matching name seq instances */ |
156 | __u32 found_upper; /* " " " " */ | 150 | __u32 found_upper; /* " " " " " */ |
157 | struct tipc_portid port; /* associated port */ | 151 | struct tipc_portid port; /* NBO. Associated port */ |
158 | struct tipc_subscr s; /* associated subscription */ | 152 | struct tipc_subscr s; /* Original, associated subscription */ |
159 | }; | 153 | }; |
160 | 154 | ||
161 | /* | 155 | /* |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index f59604ed0ec6..78b4bd3be496 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -49,7 +49,7 @@ struct tracepoint { | |||
49 | void **it_func; \ | 49 | void **it_func; \ |
50 | \ | 50 | \ |
51 | rcu_read_lock_sched_notrace(); \ | 51 | rcu_read_lock_sched_notrace(); \ |
52 | it_func = rcu_dereference((tp)->funcs); \ | 52 | it_func = rcu_dereference_sched((tp)->funcs); \ |
53 | if (it_func) { \ | 53 | if (it_func) { \ |
54 | do { \ | 54 | do { \ |
55 | ((void(*)(proto))(*it_func))(args); \ | 55 | ((void(*)(proto))(*it_func))(args); \ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 568369a86306..bb44fa9ae135 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ | 24 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ |
25 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ | 25 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ |
26 | #define NR_LDISCS 20 | 26 | #define NR_LDISCS 21 |
27 | 27 | ||
28 | /* line disciplines */ | 28 | /* line disciplines */ |
29 | #define N_TTY 0 | 29 | #define N_TTY 0 |
@@ -46,8 +46,8 @@ | |||
46 | #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ | 46 | #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ |
47 | #define N_SLCAN 17 /* Serial / USB serial CAN Adaptors */ | 47 | #define N_SLCAN 17 /* Serial / USB serial CAN Adaptors */ |
48 | #define N_PPS 18 /* Pulse per Second */ | 48 | #define N_PPS 18 /* Pulse per Second */ |
49 | |||
50 | #define N_V253 19 /* Codec control over voice modem */ | 49 | #define N_V253 19 /* Codec control over voice modem */ |
50 | #define N_CAIF 20 /* CAIF protocol for talking to modems */ | ||
51 | 51 | ||
52 | /* | 52 | /* |
53 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 53 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
@@ -70,12 +70,13 @@ struct tty_buffer { | |||
70 | 70 | ||
71 | /* | 71 | /* |
72 | * We default to dicing tty buffer allocations to this many characters | 72 | * We default to dicing tty buffer allocations to this many characters |
73 | * in order to avoid multiple page allocations. We assume tty_buffer itself | 73 | * in order to avoid multiple page allocations. We know the size of |
74 | * is under 256 bytes. See tty_buffer_find for the allocation logic this | 74 | * tty_buffer itself but it must also be taken into account that the |
75 | * must match | 75 | * the buffer is 256 byte aligned. See tty_buffer_find for the allocation |
76 | * logic this must match | ||
76 | */ | 77 | */ |
77 | 78 | ||
78 | #define TTY_BUFFER_PAGE ((PAGE_SIZE - 256) / 2) | 79 | #define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF) |
79 | 80 | ||
80 | 81 | ||
81 | struct tty_bufhead { | 82 | struct tty_bufhead { |
@@ -223,6 +224,7 @@ struct tty_port { | |||
223 | wait_queue_head_t close_wait; /* Close waiters */ | 224 | wait_queue_head_t close_wait; /* Close waiters */ |
224 | wait_queue_head_t delta_msr_wait; /* Modem status change */ | 225 | wait_queue_head_t delta_msr_wait; /* Modem status change */ |
225 | unsigned long flags; /* TTY flags ASY_*/ | 226 | unsigned long flags; /* TTY flags ASY_*/ |
227 | unsigned char console:1; /* port is a console */ | ||
226 | struct mutex mutex; /* Locking */ | 228 | struct mutex mutex; /* Locking */ |
227 | struct mutex buf_mutex; /* Buffer alloc lock */ | 229 | struct mutex buf_mutex; /* Buffer alloc lock */ |
228 | unsigned char *xmit_buf; /* Optional buffer */ | 230 | unsigned char *xmit_buf; /* Optional buffer */ |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 8c9f053111bb..ce1323c4e47c 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -1055,7 +1055,8 @@ typedef void (*usb_complete_t)(struct urb *); | |||
1055 | * @number_of_packets: Lists the number of ISO transfer buffers. | 1055 | * @number_of_packets: Lists the number of ISO transfer buffers. |
1056 | * @interval: Specifies the polling interval for interrupt or isochronous | 1056 | * @interval: Specifies the polling interval for interrupt or isochronous |
1057 | * transfers. The units are frames (milliseconds) for full and low | 1057 | * transfers. The units are frames (milliseconds) for full and low |
1058 | * speed devices, and microframes (1/8 millisecond) for highspeed ones. | 1058 | * speed devices, and microframes (1/8 millisecond) for highspeed |
1059 | * and SuperSpeed devices. | ||
1059 | * @error_count: Returns the number of ISO transfers that reported errors. | 1060 | * @error_count: Returns the number of ISO transfers that reported errors. |
1060 | * @context: For use in completion functions. This normally points to | 1061 | * @context: For use in completion functions. This normally points to |
1061 | * request-specific driver context. | 1062 | * request-specific driver context. |
@@ -1286,9 +1287,16 @@ static inline void usb_fill_bulk_urb(struct urb *urb, | |||
1286 | * | 1287 | * |
1287 | * Initializes a interrupt urb with the proper information needed to submit | 1288 | * Initializes a interrupt urb with the proper information needed to submit |
1288 | * it to a device. | 1289 | * it to a device. |
1289 | * Note that high speed interrupt endpoints use a logarithmic encoding of | 1290 | * |
1290 | * the endpoint interval, and express polling intervals in microframes | 1291 | * Note that High Speed and SuperSpeed interrupt endpoints use a logarithmic |
1291 | * (eight per millisecond) rather than in frames (one per millisecond). | 1292 | * encoding of the endpoint interval, and express polling intervals in |
1293 | * microframes (eight per millisecond) rather than in frames (one per | ||
1294 | * millisecond). | ||
1295 | * | ||
1296 | * Wireless USB also uses the logarithmic encoding, but specifies it in units of | ||
1297 | * 128us instead of 125us. For Wireless USB devices, the interval is passed | ||
1298 | * through to the host controller, rather than being translated into microframe | ||
1299 | * units. | ||
1292 | */ | 1300 | */ |
1293 | static inline void usb_fill_int_urb(struct urb *urb, | 1301 | static inline void usb_fill_int_urb(struct urb *urb, |
1294 | struct usb_device *dev, | 1302 | struct usb_device *dev, |
@@ -1305,7 +1313,7 @@ static inline void usb_fill_int_urb(struct urb *urb, | |||
1305 | urb->transfer_buffer_length = buffer_length; | 1313 | urb->transfer_buffer_length = buffer_length; |
1306 | urb->complete = complete_fn; | 1314 | urb->complete = complete_fn; |
1307 | urb->context = context; | 1315 | urb->context = context; |
1308 | if (dev->speed == USB_SPEED_HIGH) | 1316 | if (dev->speed == USB_SPEED_HIGH || dev->speed == USB_SPEED_SUPER) |
1309 | urb->interval = 1 << (interval - 1); | 1317 | urb->interval = 1 << (interval - 1); |
1310 | else | 1318 | else |
1311 | urb->interval = interval; | 1319 | urb->interval = interval; |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index bbf45d500b6d..f4b7ca516cdd 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #ifndef __LINUX_USB_GADGET_H | 15 | #ifndef __LINUX_USB_GADGET_H |
16 | #define __LINUX_USB_GADGET_H | 16 | #define __LINUX_USB_GADGET_H |
17 | 17 | ||
18 | #include <linux/slab.h> | ||
19 | |||
18 | struct usb_ep; | 20 | struct usb_ep; |
19 | 21 | ||
20 | /** | 22 | /** |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index ae4f039515b4..92228a8fbcbc 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
@@ -12,37 +12,14 @@ | |||
12 | 12 | ||
13 | /* Feature bits */ | 13 | /* Feature bits */ |
14 | #define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */ | 14 | #define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */ |
15 | #define VIRTIO_CONSOLE_F_MULTIPORT 1 /* Does host provide multiple ports? */ | ||
16 | 15 | ||
17 | struct virtio_console_config { | 16 | struct virtio_console_config { |
18 | /* colums of the screens */ | 17 | /* colums of the screens */ |
19 | __u16 cols; | 18 | __u16 cols; |
20 | /* rows of the screens */ | 19 | /* rows of the screens */ |
21 | __u16 rows; | 20 | __u16 rows; |
22 | /* max. number of ports this device can hold */ | ||
23 | __u32 max_nr_ports; | ||
24 | /* number of ports added so far */ | ||
25 | __u32 nr_ports; | ||
26 | } __attribute__((packed)); | 21 | } __attribute__((packed)); |
27 | 22 | ||
28 | /* | ||
29 | * A message that's passed between the Host and the Guest for a | ||
30 | * particular port. | ||
31 | */ | ||
32 | struct virtio_console_control { | ||
33 | __u32 id; /* Port number */ | ||
34 | __u16 event; /* The kind of control event (see below) */ | ||
35 | __u16 value; /* Extra information for the key */ | ||
36 | }; | ||
37 | |||
38 | /* Some events for control messages */ | ||
39 | #define VIRTIO_CONSOLE_PORT_READY 0 | ||
40 | #define VIRTIO_CONSOLE_CONSOLE_PORT 1 | ||
41 | #define VIRTIO_CONSOLE_RESIZE 2 | ||
42 | #define VIRTIO_CONSOLE_PORT_OPEN 3 | ||
43 | #define VIRTIO_CONSOLE_PORT_NAME 4 | ||
44 | #define VIRTIO_CONSOLE_PORT_REMOVE 5 | ||
45 | |||
46 | #ifdef __KERNEL__ | 23 | #ifdef __KERNEL__ |
47 | int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)); | 24 | int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)); |
48 | #endif /* __KERNEL__ */ | 25 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/vt.h b/include/linux/vt.h index 778b7b2a47d4..d5dd0bc408fd 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h | |||
@@ -27,7 +27,7 @@ struct vt_mode { | |||
27 | #define VT_SETMODE 0x5602 /* set mode of active vt */ | 27 | #define VT_SETMODE 0x5602 /* set mode of active vt */ |
28 | #define VT_AUTO 0x00 /* auto vt switching */ | 28 | #define VT_AUTO 0x00 /* auto vt switching */ |
29 | #define VT_PROCESS 0x01 /* process controls switching */ | 29 | #define VT_PROCESS 0x01 /* process controls switching */ |
30 | #define VT_PROCESS_AUTO 0x02 /* process is notified of switching */ | 30 | #define VT_ACKACQ 0x02 /* acknowledge switch */ |
31 | 31 | ||
32 | struct vt_stat { | 32 | struct vt_stat { |
33 | unsigned short v_active; /* active vt */ | 33 | unsigned short v_active; /* active vt */ |
@@ -38,7 +38,6 @@ struct vt_stat { | |||
38 | #define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */ | 38 | #define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */ |
39 | 39 | ||
40 | #define VT_RELDISP 0x5605 /* release display */ | 40 | #define VT_RELDISP 0x5605 /* release display */ |
41 | #define VT_ACKACQ 0x02 /* acknowledge switch */ | ||
42 | 41 | ||
43 | #define VT_ACTIVATE 0x5606 /* make vt active */ | 42 | #define VT_ACTIVATE 0x5606 /* make vt active */ |
44 | #define VT_WAITACTIVE 0x5607 /* wait for vt active */ | 43 | #define VT_WAITACTIVE 0x5607 /* wait for vt active */ |
diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h index db8096e88533..57031b4d12f2 100644 --- a/include/linux/wimax/debug.h +++ b/include/linux/wimax/debug.h | |||
@@ -155,6 +155,7 @@ | |||
155 | 155 | ||
156 | #include <linux/types.h> | 156 | #include <linux/types.h> |
157 | #include <linux/device.h> | 157 | #include <linux/device.h> |
158 | #include <linux/slab.h> | ||
158 | 159 | ||
159 | 160 | ||
160 | /* Backend stuff */ | 161 | /* Backend stuff */ |
diff --git a/include/linux/wireless.h b/include/linux/wireless.h index 5b4c6c772a9b..e6827eedf18b 100644 --- a/include/linux/wireless.h +++ b/include/linux/wireless.h | |||
@@ -346,6 +346,8 @@ | |||
346 | #define SIOCIWFIRST 0x8B00 | 346 | #define SIOCIWFIRST 0x8B00 |
347 | #define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */ | 347 | #define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */ |
348 | #define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST) | 348 | #define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST) |
349 | #define IW_HANDLER(id, func) \ | ||
350 | [IW_IOCTL_IDX(id)] = func | ||
349 | 351 | ||
350 | /* Odd : get (world access), even : set (root access) */ | 352 | /* Odd : get (world access), even : set (root access) */ |
351 | #define IW_IS_SET(cmd) (!((cmd) & 0x1)) | 353 | #define IW_IS_SET(cmd) (!((cmd) & 0x1)) |
@@ -648,7 +650,7 @@ | |||
648 | * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */ | 650 | * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */ |
649 | #define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? \ | 651 | #define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? \ |
650 | (cmd - SIOCIWFIRSTPRIV + 0x60) : \ | 652 | (cmd - SIOCIWFIRSTPRIV + 0x60) : \ |
651 | (cmd - SIOCSIWCOMMIT)) | 653 | (cmd - SIOCIWFIRST)) |
652 | #define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5) | 654 | #define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5) |
653 | #define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F)) | 655 | #define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F)) |
654 | /* Event capability constants - event autogenerated by the kernel | 656 | /* Event capability constants - event autogenerated by the kernel |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 76e8903cd204..36520ded3e06 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -34,6 +34,9 @@ struct writeback_control { | |||
34 | enum writeback_sync_modes sync_mode; | 34 | enum writeback_sync_modes sync_mode; |
35 | unsigned long *older_than_this; /* If !NULL, only write back inodes | 35 | unsigned long *older_than_this; /* If !NULL, only write back inodes |
36 | older than this */ | 36 | older than this */ |
37 | unsigned long wb_start; /* Time writeback_inodes_wb was | ||
38 | called. This is needed to avoid | ||
39 | extra jobs and livelock */ | ||
37 | long nr_to_write; /* Write this many pages, and decrement | 40 | long nr_to_write; /* Write this many pages, and decrement |
38 | this for each page written */ | 41 | this for each page written */ |
39 | long pages_skipped; /* Pages which were not written */ | 42 | long pages_skipped; /* Pages which were not written */ |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index f076dfa75ae8..4f3760afc20f 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -54,6 +54,7 @@ enum p9_proto_versions{ | |||
54 | 54 | ||
55 | enum p9_trans_status { | 55 | enum p9_trans_status { |
56 | Connected, | 56 | Connected, |
57 | BeginDisconnect, | ||
57 | Disconnected, | 58 | Disconnected, |
58 | Hung, | 59 | Hung, |
59 | }; | 60 | }; |
@@ -198,6 +199,7 @@ int p9_client_version(struct p9_client *); | |||
198 | struct p9_client *p9_client_create(const char *dev_name, char *options); | 199 | struct p9_client *p9_client_create(const char *dev_name, char *options); |
199 | void p9_client_destroy(struct p9_client *clnt); | 200 | void p9_client_destroy(struct p9_client *clnt); |
200 | void p9_client_disconnect(struct p9_client *clnt); | 201 | void p9_client_disconnect(struct p9_client *clnt); |
202 | void p9_client_begin_disconnect(struct p9_client *clnt); | ||
201 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, | 203 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, |
202 | char *uname, u32 n_uname, char *aname); | 204 | char *uname, u32 n_uname, char *aname); |
203 | struct p9_fid *p9_client_auth(struct p9_client *clnt, char *uname, | 205 | struct p9_fid *p9_client_auth(struct p9_client *clnt, char *uname, |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 717e2192d521..206d22297ac3 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
11 | #include <linux/timer.h> | 11 | #include <linux/timer.h> |
12 | #include <linux/list.h> | 12 | #include <linux/list.h> |
13 | #include <linux/slab.h> | ||
13 | #include <asm/atomic.h> | 14 | #include <asm/atomic.h> |
14 | 15 | ||
15 | #define AX25_T1CLAMPLO 1 | 16 | #define AX25_T1CLAMPLO 1 |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 04a6908e38d2..ff77e8f882f1 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -176,6 +176,6 @@ extern void hci_sock_cleanup(void); | |||
176 | extern int bt_sysfs_init(void); | 176 | extern int bt_sysfs_init(void); |
177 | extern void bt_sysfs_cleanup(void); | 177 | extern void bt_sysfs_cleanup(void); |
178 | 178 | ||
179 | extern struct class *bt_class; | 179 | extern struct dentry *bt_debugfs; |
180 | 180 | ||
181 | #endif /* __BLUETOOTH_H */ | 181 | #endif /* __BLUETOOTH_H */ |
diff --git a/include/net/caif/caif_dev.h b/include/net/caif/caif_dev.h new file mode 100644 index 000000000000..42a7c7867849 --- /dev/null +++ b/include/net/caif/caif_dev.h | |||
@@ -0,0 +1,90 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson AB 2010 | ||
3 | * Author: Sjur Brendeland/ sjur.brandeland@stericsson.com | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef CAIF_DEV_H_ | ||
8 | #define CAIF_DEV_H_ | ||
9 | |||
10 | #include <net/caif/caif_layer.h> | ||
11 | #include <net/caif/cfcnfg.h> | ||
12 | #include <linux/caif/caif_socket.h> | ||
13 | #include <linux/if.h> | ||
14 | |||
15 | /** | ||
16 | * struct caif_param - CAIF parameters. | ||
17 | * @size: Length of data | ||
18 | * @data: Binary Data Blob | ||
19 | */ | ||
20 | struct caif_param { | ||
21 | u16 size; | ||
22 | u8 data[256]; | ||
23 | }; | ||
24 | |||
25 | /** | ||
26 | * caif_connect_request - Request data for CAIF channel setup. | ||
27 | * @sockaddr: Socket address to connect. | ||
28 | * @priority: Priority of the connection. | ||
29 | * @link_selector: Link selector (high bandwidth or low latency) | ||
30 | * @link_name: Name of the CAIF Link Layer to use. | ||
31 | * | ||
32 | * This struct is used when connecting a CAIF channel. | ||
33 | * It contains all CAIF channel configuration options. | ||
34 | */ | ||
35 | struct caif_connect_request { | ||
36 | int protocol; | ||
37 | struct sockaddr_caif sockaddr; | ||
38 | enum caif_channel_priority priority; | ||
39 | enum caif_link_selector link_selector; | ||
40 | char link_name[16]; | ||
41 | struct caif_param param; | ||
42 | }; | ||
43 | |||
44 | /** | ||
45 | * caif_connect_client - Connect a client to CAIF Core Stack. | ||
46 | * @config: Channel setup parameters, specifying what address | ||
47 | * to connect on the Modem. | ||
48 | * @client_layer: User implementation of client layer. This layer | ||
49 | * MUST have receive and control callback functions | ||
50 | * implemented. | ||
51 | * | ||
52 | * This function connects a CAIF channel. The Client must implement | ||
53 | * the struct cflayer. This layer represents the Client layer and holds | ||
54 | * receive functions and control callback functions. Control callback | ||
55 | * function will receive information about connect/disconnect responses, | ||
56 | * flow control etc (see enum caif_control). | ||
57 | * E.g. CAIF Socket will call this function for each socket it connects | ||
58 | * and have one client_layer instance for each socket. | ||
59 | */ | ||
60 | int caif_connect_client(struct caif_connect_request *config, | ||
61 | struct cflayer *client_layer); | ||
62 | |||
63 | /** | ||
64 | * caif_disconnect_client - Disconnects a client from the CAIF stack. | ||
65 | * | ||
66 | * @client_layer: Client layer to be removed. | ||
67 | */ | ||
68 | int caif_disconnect_client(struct cflayer *client_layer); | ||
69 | |||
70 | /** | ||
71 | * connect_req_to_link_param - Translate configuration parameters | ||
72 | * from socket format to internal format. | ||
73 | * @cnfg: Pointer to configuration handler | ||
74 | * @con_req: Configuration parameters supplied in function | ||
75 | * caif_connect_client | ||
76 | * @channel_setup_param: Parameters supplied to the CAIF Core stack for | ||
77 | * setting up channels. | ||
78 | * | ||
79 | */ | ||
80 | int connect_req_to_link_param(struct cfcnfg *cnfg, | ||
81 | struct caif_connect_request *con_req, | ||
82 | struct cfctrl_link_param *channel_setup_param); | ||
83 | |||
84 | /** | ||
85 | * get_caif_conf() - Get the configuration handler. | ||
86 | */ | ||
87 | struct cfcnfg *get_caif_conf(void); | ||
88 | |||
89 | |||
90 | #endif /* CAIF_DEV_H_ */ | ||
diff --git a/include/net/caif/caif_device.h b/include/net/caif/caif_device.h new file mode 100644 index 000000000000..d02f044adb8a --- /dev/null +++ b/include/net/caif/caif_device.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson AB 2010 | ||
3 | * Author: Sjur Brendeland/ sjur.brandeland@stericsson.com | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef CAIF_DEVICE_H_ | ||
8 | #define CAIF_DEVICE_H_ | ||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/net.h> | ||
11 | #include <linux/netdevice.h> | ||
12 | #include <linux/caif/caif_socket.h> | ||
13 | #include <net/caif/caif_device.h> | ||
14 | |||
15 | /** | ||
16 | * struct caif_dev_common - data shared between CAIF drivers and stack. | ||
17 | * @flowctrl: Flow Control callback function. This function is | ||
18 | * supplied by CAIF Core Stack and is used by CAIF | ||
19 | * Link Layer to send flow-stop to CAIF Core. | ||
20 | * The flow information will be distributed to all | ||
21 | * clients of CAIF. | ||
22 | * | ||
23 | * @link_select: Profile of device, either high-bandwidth or | ||
24 | * low-latency. This member is set by CAIF Link | ||
25 | * Layer Device in order to indicate if this device | ||
26 | * is a high bandwidth or low latency device. | ||
27 | * | ||
28 | * @use_frag: CAIF Frames may be fragmented. | ||
29 | * Is set by CAIF Link Layer in order to indicate if the | ||
30 | * interface receives fragmented frames that must be | ||
31 | * assembled by CAIF Core Layer. | ||
32 | * | ||
33 | * @use_fcs: Indicate if Frame CheckSum (fcs) is used. | ||
34 | * Is set if the physical interface is | ||
35 | * using Frame Checksum on the CAIF Frames. | ||
36 | * | ||
37 | * @use_stx: Indicate STart of frame eXtension (stx) in use. | ||
38 | * Is set if the CAIF Link Layer expects | ||
39 | * CAIF Frames to start with the STX byte. | ||
40 | * | ||
41 | * This structure is shared between the CAIF drivers and the CAIF stack. | ||
42 | * It is used by the device to register its behavior. | ||
43 | * CAIF Core layer must set the member flowctrl in order to supply | ||
44 | * CAIF Link Layer with the flow control function. | ||
45 | * | ||
46 | */ | ||
47 | struct caif_dev_common { | ||
48 | void (*flowctrl)(struct net_device *net, int on); | ||
49 | enum caif_link_selector link_select; | ||
50 | int use_frag; | ||
51 | int use_fcs; | ||
52 | int use_stx; | ||
53 | }; | ||
54 | |||
55 | #endif /* CAIF_DEVICE_H_ */ | ||
diff --git a/include/net/caif/caif_layer.h b/include/net/caif/caif_layer.h new file mode 100644 index 000000000000..25c472f0e5b8 --- /dev/null +++ b/include/net/caif/caif_layer.h | |||
@@ -0,0 +1,283 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson AB 2010 | ||
3 | * Author: Sjur Brendeland / sjur.brandeland@stericsson.com | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef CAIF_LAYER_H_ | ||
8 | #define CAIF_LAYER_H_ | ||
9 | |||
10 | #include <linux/list.h> | ||
11 | |||
12 | struct cflayer; | ||
13 | struct cfpkt; | ||
14 | struct cfpktq; | ||
15 | struct caif_payload_info; | ||
16 | struct caif_packet_funcs; | ||
17 | |||
18 | #define CAIF_MAX_FRAMESIZE 4096 | ||
19 | #define CAIF_MAX_PAYLOAD_SIZE (4096 - 64) | ||
20 | #define CAIF_NEEDED_HEADROOM (10) | ||
21 | #define CAIF_NEEDED_TAILROOM (2) | ||
22 | |||
23 | #define CAIF_LAYER_NAME_SZ 16 | ||
24 | #define CAIF_SUCCESS 1 | ||
25 | #define CAIF_FAILURE 0 | ||
26 | |||
27 | /** | ||
28 | * caif_assert() - Assert function for CAIF. | ||
29 | * @assert: expression to evaluate. | ||
30 | * | ||
31 | * This function will print a error message and a do WARN_ON if the | ||
32 | * assertion failes. Normally this will do a stack up at the current location. | ||
33 | */ | ||
34 | #define caif_assert(assert) \ | ||
35 | do { \ | ||
36 | if (!(assert)) { \ | ||
37 | pr_err("caif:Assert detected:'%s'\n", #assert); \ | ||
38 | WARN_ON(!(assert)); \ | ||
39 | } \ | ||
40 | } while (0) | ||
41 | |||
42 | |||
43 | /** | ||
44 | * enum caif_ctrlcmd - CAIF Stack Control Signaling sent in layer.ctrlcmd(). | ||
45 | * | ||
46 | * @CAIF_CTRLCMD_FLOW_OFF_IND: Flow Control is OFF, transmit function | ||
47 | * should stop sending data | ||
48 | * | ||
49 | * @CAIF_CTRLCMD_FLOW_ON_IND: Flow Control is ON, transmit function | ||
50 | * can start sending data | ||
51 | * | ||
52 | * @CAIF_CTRLCMD_REMOTE_SHUTDOWN_IND: Remote end modem has decided to close | ||
53 | * down channel | ||
54 | * | ||
55 | * @CAIF_CTRLCMD_INIT_RSP: Called initially when the layer below | ||
56 | * has finished initialization | ||
57 | * | ||
58 | * @CAIF_CTRLCMD_DEINIT_RSP: Called when de-initialization is | ||
59 | * complete | ||
60 | * | ||
61 | * @CAIF_CTRLCMD_INIT_FAIL_RSP: Called if initialization fails | ||
62 | * | ||
63 | * @_CAIF_CTRLCMD_PHYIF_FLOW_OFF_IND: CAIF Link layer temporarily cannot | ||
64 | * send more packets. | ||
65 | * @_CAIF_CTRLCMD_PHYIF_FLOW_ON_IND: Called if CAIF Link layer is able | ||
66 | * to send packets again. | ||
67 | * @_CAIF_CTRLCMD_PHYIF_DOWN_IND: Called if CAIF Link layer is going | ||
68 | * down. | ||
69 | * | ||
70 | * These commands are sent upwards in the CAIF stack to the CAIF Client. | ||
71 | * They are used for signaling originating from the modem or CAIF Link Layer. | ||
72 | * These are either responses (*_RSP) or events (*_IND). | ||
73 | */ | ||
74 | enum caif_ctrlcmd { | ||
75 | CAIF_CTRLCMD_FLOW_OFF_IND, | ||
76 | CAIF_CTRLCMD_FLOW_ON_IND, | ||
77 | CAIF_CTRLCMD_REMOTE_SHUTDOWN_IND, | ||
78 | CAIF_CTRLCMD_INIT_RSP, | ||
79 | CAIF_CTRLCMD_DEINIT_RSP, | ||
80 | CAIF_CTRLCMD_INIT_FAIL_RSP, | ||
81 | _CAIF_CTRLCMD_PHYIF_FLOW_OFF_IND, | ||
82 | _CAIF_CTRLCMD_PHYIF_FLOW_ON_IND, | ||
83 | _CAIF_CTRLCMD_PHYIF_DOWN_IND, | ||
84 | }; | ||
85 | |||
86 | /** | ||
87 | * enum caif_modemcmd - Modem Control Signaling, sent from CAIF Client | ||
88 | * to the CAIF Link Layer or modem. | ||
89 | * | ||
90 | * @CAIF_MODEMCMD_FLOW_ON_REQ: Flow Control is ON, transmit function | ||
91 | * can start sending data. | ||
92 | * | ||
93 | * @CAIF_MODEMCMD_FLOW_OFF_REQ: Flow Control is OFF, transmit function | ||
94 | * should stop sending data. | ||
95 | * | ||
96 | * @_CAIF_MODEMCMD_PHYIF_USEFULL: Notify physical layer that it is in use | ||
97 | * | ||
98 | * @_CAIF_MODEMCMD_PHYIF_USELESS: Notify physical layer that it is | ||
99 | * no longer in use. | ||
100 | * | ||
101 | * These are requests sent 'downwards' in the stack. | ||
102 | * Flow ON, OFF can be indicated to the modem. | ||
103 | */ | ||
104 | enum caif_modemcmd { | ||
105 | CAIF_MODEMCMD_FLOW_ON_REQ = 0, | ||
106 | CAIF_MODEMCMD_FLOW_OFF_REQ = 1, | ||
107 | _CAIF_MODEMCMD_PHYIF_USEFULL = 3, | ||
108 | _CAIF_MODEMCMD_PHYIF_USELESS = 4 | ||
109 | }; | ||
110 | |||
111 | /** | ||
112 | * enum caif_direction - CAIF Packet Direction. | ||
113 | * Indicate if a packet is to be sent out or to be received in. | ||
114 | * @CAIF_DIR_IN: Incoming packet received. | ||
115 | * @CAIF_DIR_OUT: Outgoing packet to be transmitted. | ||
116 | */ | ||
117 | enum caif_direction { | ||
118 | CAIF_DIR_IN = 0, | ||
119 | CAIF_DIR_OUT = 1 | ||
120 | }; | ||
121 | |||
122 | /** | ||
123 | * struct cflayer - CAIF Stack layer. | ||
124 | * Defines the framework for the CAIF Core Stack. | ||
125 | * @up: Pointer up to the layer above. | ||
126 | * @dn: Pointer down to the layer below. | ||
127 | * @node: List node used when layer participate in a list. | ||
128 | * @receive: Packet receive function. | ||
129 | * @transmit: Packet transmit funciton. | ||
130 | * @ctrlcmd: Used for control signalling upwards in the stack. | ||
131 | * @modemcmd: Used for control signaling downwards in the stack. | ||
132 | * @prio: Priority of this layer. | ||
133 | * @id: The identity of this layer | ||
134 | * @type: The type of this layer | ||
135 | * @name: Name of the layer. | ||
136 | * | ||
137 | * This structure defines the layered structure in CAIF. | ||
138 | * | ||
139 | * It defines CAIF layering structure, used by all CAIF Layers and the | ||
140 | * layers interfacing CAIF. | ||
141 | * | ||
142 | * In order to integrate with CAIF an adaptation layer on top of the CAIF stack | ||
143 | * and PHY layer below the CAIF stack | ||
144 | * must be implemented. These layer must follow the design principles below. | ||
145 | * | ||
146 | * Principles for layering of protocol layers: | ||
147 | * - All layers must use this structure. If embedding it, then place this | ||
148 | * structure first in the layer specific structure. | ||
149 | * | ||
150 | * - Each layer should not depend on any others layer private data. | ||
151 | * | ||
152 | * - In order to send data upwards do | ||
153 | * layer->up->receive(layer->up, packet); | ||
154 | * | ||
155 | * - In order to send data downwards do | ||
156 | * layer->dn->transmit(layer->dn, info, packet); | ||
157 | */ | ||
158 | struct cflayer { | ||
159 | struct cflayer *up; | ||
160 | struct cflayer *dn; | ||
161 | struct list_head node; | ||
162 | |||
163 | /* | ||
164 | * receive() - Receive Function. | ||
165 | * Contract: Each layer must implement a receive function passing the | ||
166 | * CAIF packets upwards in the stack. | ||
167 | * Packet handling rules: | ||
168 | * - The CAIF packet (cfpkt) cannot be accessed after | ||
169 | * passing it to the next layer using up->receive(). | ||
170 | * - If parsing of the packet fails, the packet must be | ||
171 | * destroyed and -1 returned from the function. | ||
172 | * - If parsing succeeds (and above layers return OK) then | ||
173 | * the function must return a value > 0. | ||
174 | * | ||
175 | * Returns result < 0 indicates an error, 0 or positive value | ||
176 | * indicates success. | ||
177 | * | ||
178 | * @layr: Pointer to the current layer the receive function is | ||
179 | * implemented for (this pointer). | ||
180 | * @cfpkt: Pointer to CaifPacket to be handled. | ||
181 | */ | ||
182 | int (*receive)(struct cflayer *layr, struct cfpkt *cfpkt); | ||
183 | |||
184 | /* | ||
185 | * transmit() - Transmit Function. | ||
186 | * Contract: Each layer must implement a transmit function passing the | ||
187 | * CAIF packet downwards in the stack. | ||
188 | * Packet handling rules: | ||
189 | * - The CAIF packet (cfpkt) ownership is passed to the | ||
190 | * transmit function. This means that the the packet | ||
191 | * cannot be accessed after passing it to the below | ||
192 | * layer using dn->transmit(). | ||
193 | * | ||
194 | * - If transmit fails, however, the ownership is returned | ||
195 | * to thecaller. The caller of "dn->transmit()" must | ||
196 | * destroy or resend packet. | ||
197 | * | ||
198 | * - Return value less than zero means error, zero or | ||
199 | * greater than zero means OK. | ||
200 | * | ||
201 | * result < 0 indicates an error, 0 or positive value | ||
202 | * indicate success. | ||
203 | * | ||
204 | * @layr: Pointer to the current layer the receive function | ||
205 | * isimplemented for (this pointer). | ||
206 | * @cfpkt: Pointer to CaifPacket to be handled. | ||
207 | */ | ||
208 | int (*transmit) (struct cflayer *layr, struct cfpkt *cfpkt); | ||
209 | |||
210 | /* | ||
211 | * cttrlcmd() - Control Function upwards in CAIF Stack. | ||
212 | * Used for signaling responses (CAIF_CTRLCMD_*_RSP) | ||
213 | * and asynchronous events from the modem (CAIF_CTRLCMD_*_IND) | ||
214 | * | ||
215 | * @layr: Pointer to the current layer the receive function | ||
216 | * is implemented for (this pointer). | ||
217 | * @ctrl: Control Command. | ||
218 | */ | ||
219 | void (*ctrlcmd) (struct cflayer *layr, enum caif_ctrlcmd ctrl, | ||
220 | int phyid); | ||
221 | |||
222 | /* | ||
223 | * modemctrl() - Control Function used for controlling the modem. | ||
224 | * Used to signal down-wards in the CAIF stack. | ||
225 | * Returns 0 on success, < 0 upon failure. | ||
226 | * | ||
227 | * @layr: Pointer to the current layer the receive function | ||
228 | * is implemented for (this pointer). | ||
229 | * @ctrl: Control Command. | ||
230 | */ | ||
231 | int (*modemcmd) (struct cflayer *layr, enum caif_modemcmd ctrl); | ||
232 | |||
233 | unsigned short prio; | ||
234 | unsigned int id; | ||
235 | unsigned int type; | ||
236 | char name[CAIF_LAYER_NAME_SZ]; | ||
237 | }; | ||
238 | |||
239 | /** | ||
240 | * layer_set_up() - Set the up pointer for a specified layer. | ||
241 | * @layr: Layer where up pointer shall be set. | ||
242 | * @above: Layer above. | ||
243 | */ | ||
244 | #define layer_set_up(layr, above) ((layr)->up = (struct cflayer *)(above)) | ||
245 | |||
246 | /** | ||
247 | * layer_set_dn() - Set the down pointer for a specified layer. | ||
248 | * @layr: Layer where down pointer shall be set. | ||
249 | * @below: Layer below. | ||
250 | */ | ||
251 | #define layer_set_dn(layr, below) ((layr)->dn = (struct cflayer *)(below)) | ||
252 | |||
253 | /** | ||
254 | * struct dev_info - Physical Device info information about physical layer. | ||
255 | * @dev: Pointer to native physical device. | ||
256 | * @id: Physical ID of the physical connection used by the | ||
257 | * logical CAIF connection. Used by service layers to | ||
258 | * identify their physical id to Caif MUX (CFMUXL)so | ||
259 | * that the MUX can add the correct physical ID to the | ||
260 | * packet. | ||
261 | */ | ||
262 | struct dev_info { | ||
263 | void *dev; | ||
264 | unsigned int id; | ||
265 | }; | ||
266 | |||
267 | /** | ||
268 | * struct caif_payload_info - Payload information embedded in packet (sk_buff). | ||
269 | * | ||
270 | * @dev_info: Information about the receiving device. | ||
271 | * | ||
272 | * @hdr_len: Header length, used to align pay load on 32bit boundary. | ||
273 | * | ||
274 | * @channel_id: Channel ID of the logical CAIF connection. | ||
275 | * Used by mux to insert channel id into the caif packet. | ||
276 | */ | ||
277 | struct caif_payload_info { | ||
278 | struct dev_info *dev_info; | ||
279 | unsigned short hdr_len; | ||
280 | unsigned short channel_id; | ||
281 | }; | ||
282 | |||
283 | #endif /* CAIF_LAYER_H_ */ | ||
diff --git a/include/net/caif/cfcnfg.h b/include/net/caif/cfcnfg.h new file mode 100644 index 000000000000..366082c5d435 --- /dev/null +++ b/include/net/caif/cfcnfg.h | |||
@@ -0,0 +1,133 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson AB 2010 | ||
3 | * Author: Sjur Brendeland/sjur.brandeland@stericsson.com | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef CFCNFG_H_ | ||
8 | #define CFCNFG_H_ | ||
9 | #include <linux/spinlock.h> | ||
10 | #include <net/caif/caif_layer.h> | ||
11 | #include <net/caif/cfctrl.h> | ||
12 | |||
13 | struct cfcnfg; | ||
14 | |||
15 | /** | ||
16 | * enum cfcnfg_phy_type - Types of physical layers defined in CAIF Stack | ||
17 | * | ||
18 | * @CFPHYTYPE_FRAG: Fragmented frames physical interface. | ||
19 | * @CFPHYTYPE_CAIF: Generic CAIF physical interface | ||
20 | */ | ||
21 | enum cfcnfg_phy_type { | ||
22 | CFPHYTYPE_FRAG = 1, | ||
23 | CFPHYTYPE_CAIF, | ||
24 | CFPHYTYPE_MAX | ||
25 | }; | ||
26 | |||
27 | /** | ||
28 | * enum cfcnfg_phy_preference - Physical preference HW Abstraction | ||
29 | * | ||
30 | * @CFPHYPREF_UNSPECIFIED: Default physical interface | ||
31 | * | ||
32 | * @CFPHYPREF_LOW_LAT: Default physical interface for low-latency | ||
33 | * traffic | ||
34 | * @CFPHYPREF_HIGH_BW: Default physical interface for high-bandwidth | ||
35 | * traffic | ||
36 | * @CFPHYPREF_LOOP: TEST only Loopback interface simulating modem | ||
37 | * responses. | ||
38 | * | ||
39 | */ | ||
40 | enum cfcnfg_phy_preference { | ||
41 | CFPHYPREF_UNSPECIFIED, | ||
42 | CFPHYPREF_LOW_LAT, | ||
43 | CFPHYPREF_HIGH_BW, | ||
44 | CFPHYPREF_LOOP | ||
45 | }; | ||
46 | |||
47 | /** | ||
48 | * cfcnfg_create() - Create the CAIF configuration object. | ||
49 | */ | ||
50 | struct cfcnfg *cfcnfg_create(void); | ||
51 | |||
52 | /** | ||
53 | * cfcnfg_remove() - Remove the CFCNFG object | ||
54 | * @cfg: config object | ||
55 | */ | ||
56 | void cfcnfg_remove(struct cfcnfg *cfg); | ||
57 | |||
58 | /** | ||
59 | * cfcnfg_add_phy_layer() - Adds a physical layer to the CAIF stack. | ||
60 | * @cnfg: Pointer to a CAIF configuration object, created by | ||
61 | * cfcnfg_create(). | ||
62 | * @phy_type: Specifies the type of physical interface, e.g. | ||
63 | * CFPHYTYPE_FRAG. | ||
64 | * @dev: Pointer to link layer device | ||
65 | * @phy_layer: Specify the physical layer. The transmit function | ||
66 | * MUST be set in the structure. | ||
67 | * @phyid: The assigned physical ID for this layer, used in | ||
68 | * cfcnfg_add_adapt_layer to specify PHY for the link. | ||
69 | * @pref: The phy (link layer) preference. | ||
70 | * @fcs: Specify if checksum is used in CAIF Framing Layer. | ||
71 | * @stx: Specify if Start Of Frame eXtention is used. | ||
72 | */ | ||
73 | |||
74 | void | ||
75 | cfcnfg_add_phy_layer(struct cfcnfg *cnfg, enum cfcnfg_phy_type phy_type, | ||
76 | void *dev, struct cflayer *phy_layer, u16 *phyid, | ||
77 | enum cfcnfg_phy_preference pref, | ||
78 | bool fcs, bool stx); | ||
79 | |||
80 | /** | ||
81 | * cfcnfg_del_phy_layer - Deletes an phy layer from the CAIF stack. | ||
82 | * | ||
83 | * @cnfg: Pointer to a CAIF configuration object, created by | ||
84 | * cfcnfg_create(). | ||
85 | * @phy_layer: Adaptation layer to be removed. | ||
86 | */ | ||
87 | int cfcnfg_del_phy_layer(struct cfcnfg *cnfg, struct cflayer *phy_layer); | ||
88 | |||
89 | /** | ||
90 | * cfcnfg_del_adapt_layer - Deletes an adaptation layer from the CAIF stack. | ||
91 | * | ||
92 | * @cnfg: Pointer to a CAIF configuration object, created by | ||
93 | * cfcnfg_create(). | ||
94 | * @adap_layer: Adaptation layer to be removed. | ||
95 | */ | ||
96 | int cfcnfg_del_adapt_layer(struct cfcnfg *cnfg, struct cflayer *adap_layer); | ||
97 | |||
98 | /** | ||
99 | * cfcnfg_add_adaptation_layer - Add an adaptation layer to the CAIF stack. | ||
100 | * | ||
101 | * The adaptation Layer is where the interface to application or higher-level | ||
102 | * driver functionality is implemented. | ||
103 | * | ||
104 | * @cnfg: Pointer to a CAIF configuration object, created by | ||
105 | * cfcnfg_create(). | ||
106 | * @param: Link setup parameters. | ||
107 | * @adap_layer: Specify the adaptation layer; the receive and | ||
108 | * flow-control functions MUST be set in the structure. | ||
109 | * | ||
110 | */ | ||
111 | int | ||
112 | cfcnfg_add_adaptation_layer(struct cfcnfg *cnfg, | ||
113 | struct cfctrl_link_param *param, | ||
114 | struct cflayer *adap_layer); | ||
115 | |||
116 | /** | ||
117 | * cfcnfg_get_phyid() - Get physical ID, given type. | ||
118 | * Returns one of the physical interfaces matching the given type. | ||
119 | * Zero if no match is found. | ||
120 | * @cnfg: Configuration object | ||
121 | * @phy_pref: Caif Link Layer preference | ||
122 | */ | ||
123 | struct dev_info *cfcnfg_get_phyid(struct cfcnfg *cnfg, | ||
124 | enum cfcnfg_phy_preference phy_pref); | ||
125 | |||
126 | /** | ||
127 | * cfcnfg_get_named() - Get the Physical Identifier of CAIF Link Layer | ||
128 | * @cnfg: Configuration object | ||
129 | * @name: Name of the Physical Layer (Caif Link Layer) | ||
130 | */ | ||
131 | int cfcnfg_get_named(struct cfcnfg *cnfg, char *name); | ||
132 | |||
133 | #endif /* CFCNFG_H_ */ | ||
diff --git a/include/net/caif/cfctrl.h b/include/net/caif/cfctrl.h new file mode 100644 index 000000000000..dee25b86caa0 --- /dev/null +++ b/include/net/caif/cfctrl.h | |||
@@ -0,0 +1,138 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson AB 2010 | ||
3 | * Author: Sjur Brendeland/sjur.brandeland@stericsson.com | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef CFCTRL_H_ | ||
8 | #define CFCTRL_H_ | ||
9 | #include <net/caif/caif_layer.h> | ||
10 | #include <net/caif/cfsrvl.h> | ||
11 | |||
12 | /* CAIF Control packet commands */ | ||
13 | enum cfctrl_cmd { | ||
14 | CFCTRL_CMD_LINK_SETUP = 0, | ||
15 | CFCTRL_CMD_LINK_DESTROY = 1, | ||
16 | CFCTRL_CMD_LINK_ERR = 2, | ||
17 | CFCTRL_CMD_ENUM = 3, | ||
18 | CFCTRL_CMD_SLEEP = 4, | ||
19 | CFCTRL_CMD_WAKE = 5, | ||
20 | CFCTRL_CMD_LINK_RECONF = 6, | ||
21 | CFCTRL_CMD_START_REASON = 7, | ||
22 | CFCTRL_CMD_RADIO_SET = 8, | ||
23 | CFCTRL_CMD_MODEM_SET = 9, | ||
24 | CFCTRL_CMD_MASK = 0xf | ||
25 | }; | ||
26 | |||
27 | /* Channel types */ | ||
28 | enum cfctrl_srv { | ||
29 | CFCTRL_SRV_DECM = 0, | ||
30 | CFCTRL_SRV_VEI = 1, | ||
31 | CFCTRL_SRV_VIDEO = 2, | ||
32 | CFCTRL_SRV_DBG = 3, | ||
33 | CFCTRL_SRV_DATAGRAM = 4, | ||
34 | CFCTRL_SRV_RFM = 5, | ||
35 | CFCTRL_SRV_UTIL = 6, | ||
36 | CFCTRL_SRV_MASK = 0xf | ||
37 | }; | ||
38 | |||
39 | #define CFCTRL_RSP_BIT 0x20 | ||
40 | #define CFCTRL_ERR_BIT 0x10 | ||
41 | |||
42 | struct cfctrl_rsp { | ||
43 | void (*linksetup_rsp)(struct cflayer *layer, u8 linkid, | ||
44 | enum cfctrl_srv serv, u8 phyid, | ||
45 | struct cflayer *adapt_layer); | ||
46 | void (*linkdestroy_rsp)(struct cflayer *layer, u8 linkid, | ||
47 | struct cflayer *client_layer); | ||
48 | void (*linkerror_ind)(void); | ||
49 | void (*enum_rsp)(void); | ||
50 | void (*sleep_rsp)(void); | ||
51 | void (*wake_rsp)(void); | ||
52 | void (*restart_rsp)(void); | ||
53 | void (*radioset_rsp)(void); | ||
54 | void (*reject_rsp)(struct cflayer *layer, u8 linkid, | ||
55 | struct cflayer *client_layer);; | ||
56 | }; | ||
57 | |||
58 | /* Link Setup Parameters for CAIF-Links. */ | ||
59 | struct cfctrl_link_param { | ||
60 | enum cfctrl_srv linktype;/* (T3,T0) Type of Channel */ | ||
61 | u8 priority; /* (P4,P0) Priority of the channel */ | ||
62 | u8 phyid; /* (U2-U0) Physical interface to connect */ | ||
63 | u8 endpoint; /* (E1,E0) Endpoint for data channels */ | ||
64 | u8 chtype; /* (H1,H0) Channel-Type, applies to | ||
65 | * VEI, DEBUG */ | ||
66 | union { | ||
67 | struct { | ||
68 | u8 connid; /* (D7,D0) Video LinkId */ | ||
69 | } video; | ||
70 | |||
71 | struct { | ||
72 | u32 connid; /* (N31,Ngit0) Connection ID used | ||
73 | * for Datagram */ | ||
74 | } datagram; | ||
75 | |||
76 | struct { | ||
77 | u32 connid; /* Connection ID used for RFM */ | ||
78 | char volume[20]; /* Volume to mount for RFM */ | ||
79 | } rfm; /* Configuration for RFM */ | ||
80 | |||
81 | struct { | ||
82 | u16 fifosize_kb; /* Psock FIFO size in KB */ | ||
83 | u16 fifosize_bufs; /* Psock # signal buffers */ | ||
84 | char name[16]; /* Name of the PSOCK service */ | ||
85 | u8 params[255]; /* Link setup Parameters> */ | ||
86 | u16 paramlen; /* Length of Link Setup | ||
87 | * Parameters */ | ||
88 | } utility; /* Configuration for Utility Links (Psock) */ | ||
89 | } u; | ||
90 | }; | ||
91 | |||
92 | /* This structure is used internally in CFCTRL */ | ||
93 | struct cfctrl_request_info { | ||
94 | int sequence_no; | ||
95 | enum cfctrl_cmd cmd; | ||
96 | u8 channel_id; | ||
97 | struct cfctrl_link_param param; | ||
98 | struct cfctrl_request_info *next; | ||
99 | struct cflayer *client_layer; | ||
100 | }; | ||
101 | |||
102 | struct cfctrl { | ||
103 | struct cfsrvl serv; | ||
104 | struct cfctrl_rsp res; | ||
105 | atomic_t req_seq_no; | ||
106 | atomic_t rsp_seq_no; | ||
107 | struct cfctrl_request_info *first_req; | ||
108 | /* Protects from simultaneous access to first_req list */ | ||
109 | spinlock_t info_list_lock; | ||
110 | #ifndef CAIF_NO_LOOP | ||
111 | u8 loop_linkid; | ||
112 | int loop_linkused[256]; | ||
113 | /* Protects simultaneous access to loop_linkid and loop_linkused */ | ||
114 | spinlock_t loop_linkid_lock; | ||
115 | #endif | ||
116 | |||
117 | }; | ||
118 | |||
119 | void cfctrl_enum_req(struct cflayer *cfctrl, u8 physlinkid); | ||
120 | void cfctrl_linkup_request(struct cflayer *cfctrl, | ||
121 | struct cfctrl_link_param *param, | ||
122 | struct cflayer *user_layer); | ||
123 | int cfctrl_linkdown_req(struct cflayer *cfctrl, u8 linkid, | ||
124 | struct cflayer *client); | ||
125 | void cfctrl_sleep_req(struct cflayer *cfctrl); | ||
126 | void cfctrl_wake_req(struct cflayer *cfctrl); | ||
127 | void cfctrl_getstartreason_req(struct cflayer *cfctrl); | ||
128 | struct cflayer *cfctrl_create(void); | ||
129 | void cfctrl_set_dnlayer(struct cflayer *this, struct cflayer *dn); | ||
130 | void cfctrl_set_uplayer(struct cflayer *this, struct cflayer *up); | ||
131 | struct cfctrl_rsp *cfctrl_get_respfuncs(struct cflayer *layer); | ||
132 | bool cfctrl_req_eq(struct cfctrl_request_info *r1, | ||
133 | struct cfctrl_request_info *r2); | ||
134 | void cfctrl_insert_req(struct cfctrl *ctrl, | ||
135 | struct cfctrl_request_info *req); | ||
136 | struct cfctrl_request_info *cfctrl_remove_req(struct cfctrl *ctrl, | ||
137 | struct cfctrl_request_info *req); | ||
138 | #endif /* CFCTRL_H_ */ | ||
diff --git a/include/net/caif/cffrml.h b/include/net/caif/cffrml.h new file mode 100644 index 000000000000..3f14d2e1ce61 --- /dev/null +++ b/include/net/caif/cffrml.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson AB 2010 | ||
3 | * Author: Sjur Brendeland/sjur.brandeland@stericsson.com | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef CFFRML_H_ | ||
8 | #define CFFRML_H_ | ||
9 | #include <net/caif/caif_layer.h> | ||
10 | |||
11 | struct cffrml; | ||
12 | struct cflayer *cffrml_create(u16 phyid, bool DoFCS); | ||
13 | void cffrml_set_uplayer(struct cflayer *this, struct cflayer *up); | ||
14 | void cffrml_set_dnlayer(struct cflayer *this, struct cflayer *dn); | ||
15 | |||
16 | #endif /* CFFRML_H_ */ | ||
diff --git a/include/net/caif/cfmuxl.h b/include/net/caif/cfmuxl.h new file mode 100644 index 000000000000..4e1b4f33423e --- /dev/null +++ b/include/net/caif/cfmuxl.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson AB 2010 | ||
3 | * Author: Sjur Brendeland/sjur.brandeland@stericsson.com | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef CFMUXL_H_ | ||
8 | #define CFMUXL_H_ | ||
9 | #include <net/caif/caif_layer.h> | ||
10 | |||
11 | struct cfsrvl; | ||
12 | struct cffrml; | ||
13 | |||
14 | struct cflayer *cfmuxl_create(void); | ||
15 | int cfmuxl_set_uplayer(struct cflayer *layr, struct cflayer *up, u8 linkid); | ||
16 | struct cflayer *cfmuxl_remove_dnlayer(struct cflayer *layr, u8 phyid); | ||
17 | int cfmuxl_set_dnlayer(struct cflayer *layr, struct cflayer *up, u8 phyid); | ||
18 | struct cflayer *cfmuxl_remove_uplayer(struct cflayer *layr, u8 linkid); | ||
19 | bool cfmuxl_is_phy_inuse(struct cflayer *layr, u8 phyid); | ||
20 | u8 cfmuxl_get_phyid(struct cflayer *layr, u8 channel_id); | ||
21 | |||
22 | #endif /* CFMUXL_H_ */ | ||
diff --git a/include/net/caif/cfpkt.h b/include/net/caif/cfpkt.h new file mode 100644 index 000000000000..fbc681beff52 --- /dev/null +++ b/include/net/caif/cfpkt.h | |||
@@ -0,0 +1,274 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson AB 2010 | ||
3 | * Author: Sjur Brendeland/sjur.brandeland@stericsson.com | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef CFPKT_H_ | ||
8 | #define CFPKT_H_ | ||
9 | #include <net/caif/caif_layer.h> | ||
10 | #include <linux/types.h> | ||
11 | struct cfpkt; | ||
12 | |||
13 | /* Create a CAIF packet. | ||
14 | * len: Length of packet to be created | ||
15 | * @return New packet. | ||
16 | */ | ||
17 | struct cfpkt *cfpkt_create(u16 len); | ||
18 | |||
19 | /* Create a CAIF packet. | ||
20 | * data Data to copy. | ||
21 | * len Length of packet to be created | ||
22 | * @return New packet. | ||
23 | */ | ||
24 | struct cfpkt *cfpkt_create_uplink(const unsigned char *data, unsigned int len); | ||
25 | /* | ||
26 | * Destroy a CAIF Packet. | ||
27 | * pkt Packet to be destoyed. | ||
28 | */ | ||
29 | void cfpkt_destroy(struct cfpkt *pkt); | ||
30 | |||
31 | /* | ||
32 | * Extract header from packet. | ||
33 | * | ||
34 | * pkt Packet to extract header data from. | ||
35 | * data Pointer to copy the header data into. | ||
36 | * len Length of head data to copy. | ||
37 | * @return zero on success and error code upon failure | ||
38 | */ | ||
39 | int cfpkt_extr_head(struct cfpkt *pkt, void *data, u16 len); | ||
40 | |||
41 | /* | ||
42 | * Peek header from packet. | ||
43 | * Reads data from packet without changing packet. | ||
44 | * | ||
45 | * pkt Packet to extract header data from. | ||
46 | * data Pointer to copy the header data into. | ||
47 | * len Length of head data to copy. | ||
48 | * @return zero on success and error code upon failure | ||
49 | */ | ||
50 | int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len); | ||
51 | |||
52 | /* | ||
53 | * Extract header from trailer (end of packet). | ||
54 | * | ||
55 | * pkt Packet to extract header data from. | ||
56 | * data Pointer to copy the trailer data into. | ||
57 | * len Length of header data to copy. | ||
58 | * @return zero on success and error code upon failure | ||
59 | */ | ||
60 | int cfpkt_extr_trail(struct cfpkt *pkt, void *data, u16 len); | ||
61 | |||
62 | /* | ||
63 | * Add header to packet. | ||
64 | * | ||
65 | * | ||
66 | * pkt Packet to add header data to. | ||
67 | * data Pointer to data to copy into the header. | ||
68 | * len Length of header data to copy. | ||
69 | * @return zero on success and error code upon failure | ||
70 | */ | ||
71 | int cfpkt_add_head(struct cfpkt *pkt, const void *data, u16 len); | ||
72 | |||
73 | /* | ||
74 | * Add trailer to packet. | ||
75 | * | ||
76 | * | ||
77 | * pkt Packet to add trailer data to. | ||
78 | * data Pointer to data to copy into the trailer. | ||
79 | * len Length of trailer data to copy. | ||
80 | * @return zero on success and error code upon failure | ||
81 | */ | ||
82 | int cfpkt_add_trail(struct cfpkt *pkt, const void *data, u16 len); | ||
83 | |||
84 | /* | ||
85 | * Pad trailer on packet. | ||
86 | * Moves data pointer in packet, no content copied. | ||
87 | * | ||
88 | * pkt Packet in which to pad trailer. | ||
89 | * len Length of padding to add. | ||
90 | * @return zero on success and error code upon failure | ||
91 | */ | ||
92 | int cfpkt_pad_trail(struct cfpkt *pkt, u16 len); | ||
93 | |||
94 | /* | ||
95 | * Add a single byte to packet body (tail). | ||
96 | * | ||
97 | * pkt Packet in which to add byte. | ||
98 | * data Byte to add. | ||
99 | * @return zero on success and error code upon failure | ||
100 | */ | ||
101 | int cfpkt_addbdy(struct cfpkt *pkt, const u8 data); | ||
102 | |||
103 | /* | ||
104 | * Add a data to packet body (tail). | ||
105 | * | ||
106 | * pkt Packet in which to add data. | ||
107 | * data Pointer to data to copy into the packet body. | ||
108 | * len Length of data to add. | ||
109 | * @return zero on success and error code upon failure | ||
110 | */ | ||
111 | int cfpkt_add_body(struct cfpkt *pkt, const void *data, u16 len); | ||
112 | |||
113 | /* | ||
114 | * Checks whether there are more data to process in packet. | ||
115 | * pkt Packet to check. | ||
116 | * @return true if more data are available in packet false otherwise | ||
117 | */ | ||
118 | bool cfpkt_more(struct cfpkt *pkt); | ||
119 | |||
120 | /* | ||
121 | * Checks whether the packet is erroneous, | ||
122 | * i.e. if it has been attempted to extract more data than available in packet | ||
123 | * or writing more data than has been allocated in cfpkt_create(). | ||
124 | * pkt Packet to check. | ||
125 | * @return true on error false otherwise | ||
126 | */ | ||
127 | bool cfpkt_erroneous(struct cfpkt *pkt); | ||
128 | |||
129 | /* | ||
130 | * Get the packet length. | ||
131 | * pkt Packet to get length from. | ||
132 | * @return Number of bytes in packet. | ||
133 | */ | ||
134 | u16 cfpkt_getlen(struct cfpkt *pkt); | ||
135 | |||
136 | /* | ||
137 | * Set the packet length, by adjusting the trailer pointer according to length. | ||
138 | * pkt Packet to set length. | ||
139 | * len Packet length. | ||
140 | * @return Number of bytes in packet. | ||
141 | */ | ||
142 | int cfpkt_setlen(struct cfpkt *pkt, u16 len); | ||
143 | |||
144 | /* | ||
145 | * cfpkt_append - Appends a packet's data to another packet. | ||
146 | * dstpkt: Packet to append data into, WILL BE FREED BY THIS FUNCTION | ||
147 | * addpkt: Packet to be appended and automatically released, | ||
148 | * WILL BE FREED BY THIS FUNCTION. | ||
149 | * expectlen: Packet's expected total length. This should be considered | ||
150 | * as a hint. | ||
151 | * NB: Input packets will be destroyed after appending and cannot be used | ||
152 | * after calling this function. | ||
153 | * @return The new appended packet. | ||
154 | */ | ||
155 | struct cfpkt *cfpkt_append(struct cfpkt *dstpkt, struct cfpkt *addpkt, | ||
156 | u16 expectlen); | ||
157 | |||
158 | /* | ||
159 | * cfpkt_split - Split a packet into two packets at the specified split point. | ||
160 | * pkt: Packet to be split (will contain the first part of the data on exit) | ||
161 | * pos: Position to split packet in two parts. | ||
162 | * @return The new packet, containing the second part of the data. | ||
163 | */ | ||
164 | struct cfpkt *cfpkt_split(struct cfpkt *pkt, u16 pos); | ||
165 | |||
166 | /* | ||
167 | * Iteration function, iterates the packet buffers from start to end. | ||
168 | * | ||
169 | * Checksum iteration function used to iterate buffers | ||
170 | * (we may have packets consisting of a chain of buffers) | ||
171 | * pkt: Packet to calculate checksum for | ||
172 | * iter_func: Function pointer to iteration function | ||
173 | * chks: Checksum calculated so far. | ||
174 | * buf: Pointer to the buffer to checksum | ||
175 | * len: Length of buf. | ||
176 | * data: Initial checksum value. | ||
177 | * @return Checksum of buffer. | ||
178 | */ | ||
179 | |||
180 | u16 cfpkt_iterate(struct cfpkt *pkt, | ||
181 | u16 (*iter_func)(u16 chks, void *buf, u16 len), | ||
182 | u16 data); | ||
183 | |||
184 | /* Append by giving user access to packet buffer | ||
185 | * cfpkt Packet to append to | ||
186 | * buf Buffer inside pkt that user shall copy data into | ||
187 | * buflen Length of buffer and number of bytes added to packet | ||
188 | * @return 0 on error, 1 on success | ||
189 | */ | ||
190 | int cfpkt_raw_append(struct cfpkt *cfpkt, void **buf, unsigned int buflen); | ||
191 | |||
192 | /* Extract by giving user access to packet buffer | ||
193 | * cfpkt Packet to extract from | ||
194 | * buf Buffer inside pkt that user shall copy data from | ||
195 | * buflen Length of buffer and number of bytes removed from packet | ||
196 | * @return 0 on error, 1 on success | ||
197 | */ | ||
198 | int cfpkt_raw_extract(struct cfpkt *cfpkt, void **buf, unsigned int buflen); | ||
199 | |||
200 | /* Map from a "native" packet (e.g. Linux Socket Buffer) to a CAIF packet. | ||
201 | * dir - Direction indicating whether this packet is to be sent or received. | ||
202 | * nativepkt - The native packet to be transformed to a CAIF packet | ||
203 | * @return The mapped CAIF Packet CFPKT. | ||
204 | */ | ||
205 | struct cfpkt *cfpkt_fromnative(enum caif_direction dir, void *nativepkt); | ||
206 | |||
207 | /* Map from a CAIF packet to a "native" packet (e.g. Linux Socket Buffer). | ||
208 | * pkt - The CAIF packet to be transformed into a "native" packet. | ||
209 | * @return The native packet transformed from a CAIF packet. | ||
210 | */ | ||
211 | void *cfpkt_tonative(struct cfpkt *pkt); | ||
212 | |||
213 | /* | ||
214 | * Insert a packet in the packet queue. | ||
215 | * pktq Packet queue to insert into | ||
216 | * pkt Packet to be inserted in queue | ||
217 | * prio Priority of packet | ||
218 | */ | ||
219 | void cfpkt_queue(struct cfpktq *pktq, struct cfpkt *pkt, | ||
220 | unsigned short prio); | ||
221 | |||
222 | /* | ||
223 | * Remove a packet from the packet queue. | ||
224 | * pktq Packet queue to fetch packets from. | ||
225 | * @return Dequeued packet. | ||
226 | */ | ||
227 | struct cfpkt *cfpkt_dequeue(struct cfpktq *pktq); | ||
228 | |||
229 | /* | ||
230 | * Peek into a packet from the packet queue. | ||
231 | * pktq Packet queue to fetch packets from. | ||
232 | * @return Peeked packet. | ||
233 | */ | ||
234 | struct cfpkt *cfpkt_qpeek(struct cfpktq *pktq); | ||
235 | |||
236 | /* | ||
237 | * Initiates the packet queue. | ||
238 | * @return Pointer to new packet queue. | ||
239 | */ | ||
240 | struct cfpktq *cfpktq_create(void); | ||
241 | |||
242 | /* | ||
243 | * Get the number of packets in the queue. | ||
244 | * pktq Packet queue to fetch count from. | ||
245 | * @return Number of packets in queue. | ||
246 | */ | ||
247 | int cfpkt_qcount(struct cfpktq *pktq); | ||
248 | |||
249 | /* | ||
250 | * Put content of packet into buffer for debuging purposes. | ||
251 | * pkt Packet to copy data from | ||
252 | * buf Buffer to copy data into | ||
253 | * buflen Length of data to copy | ||
254 | * @return Pointer to copied data | ||
255 | */ | ||
256 | char *cfpkt_log_pkt(struct cfpkt *pkt, char *buf, int buflen); | ||
257 | |||
258 | /* | ||
259 | * Clones a packet and releases the original packet. | ||
260 | * This is used for taking ownership of a packet e.g queueing. | ||
261 | * pkt Packet to clone and release. | ||
262 | * @return Cloned packet. | ||
263 | */ | ||
264 | struct cfpkt *cfpkt_clone_release(struct cfpkt *pkt); | ||
265 | |||
266 | |||
267 | /* | ||
268 | * Returns packet information for a packet. | ||
269 | * pkt Packet to get info from; | ||
270 | * @return Packet information | ||
271 | */ | ||
272 | struct caif_payload_info *cfpkt_info(struct cfpkt *pkt); | ||
273 | /*! @} */ | ||
274 | #endif /* CFPKT_H_ */ | ||
diff --git a/include/net/caif/cfserl.h b/include/net/caif/cfserl.h new file mode 100644 index 000000000000..b8374321b362 --- /dev/null +++ b/include/net/caif/cfserl.h | |||
@@ -0,0 +1,12 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson AB 2010 | ||
3 | * Author: Sjur Brendeland/sjur.brandeland@stericsson.com | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef CFSERL_H_ | ||
8 | #define CFSERL_H_ | ||
9 | #include <net/caif/caif_layer.h> | ||
10 | |||
11 | struct cflayer *cfserl_create(int type, int instance, bool use_stx); | ||
12 | #endif /* CFSERL_H_ */ | ||
diff --git a/include/net/caif/cfsrvl.h b/include/net/caif/cfsrvl.h new file mode 100644 index 000000000000..b2a12db20cd2 --- /dev/null +++ b/include/net/caif/cfsrvl.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson AB 2010 | ||
3 | * Author: Sjur Brendeland/sjur.brandeland@stericsson.com | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef CFSRVL_H_ | ||
8 | #define CFSRVL_H_ | ||
9 | #include <linux/list.h> | ||
10 | #include <linux/stddef.h> | ||
11 | #include <linux/types.h> | ||
12 | struct cfsrvl { | ||
13 | struct cflayer layer; | ||
14 | bool open; | ||
15 | bool phy_flow_on; | ||
16 | bool modem_flow_on; | ||
17 | struct dev_info dev_info; | ||
18 | }; | ||
19 | |||
20 | struct cflayer *cfvei_create(u8 linkid, struct dev_info *dev_info); | ||
21 | struct cflayer *cfdgml_create(u8 linkid, struct dev_info *dev_info); | ||
22 | struct cflayer *cfutill_create(u8 linkid, struct dev_info *dev_info); | ||
23 | struct cflayer *cfvidl_create(u8 linkid, struct dev_info *dev_info); | ||
24 | struct cflayer *cfrfml_create(u8 linkid, struct dev_info *dev_info); | ||
25 | struct cflayer *cfdbgl_create(u8 linkid, struct dev_info *dev_info); | ||
26 | bool cfsrvl_phyid_match(struct cflayer *layer, int phyid); | ||
27 | void cfservl_destroy(struct cflayer *layer); | ||
28 | void cfsrvl_init(struct cfsrvl *service, | ||
29 | u8 channel_id, | ||
30 | struct dev_info *dev_info); | ||
31 | bool cfsrvl_ready(struct cfsrvl *service, int *err); | ||
32 | u8 cfsrvl_getphyid(struct cflayer *layer); | ||
33 | |||
34 | #endif /* CFSRVL_H_ */ | ||
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 3d134a1fb96b..37cebd3aa0f7 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -704,6 +704,10 @@ struct cfg80211_crypto_settings { | |||
704 | * @key_len: length of WEP key for shared key authentication | 704 | * @key_len: length of WEP key for shared key authentication |
705 | * @key_idx: index of WEP key for shared key authentication | 705 | * @key_idx: index of WEP key for shared key authentication |
706 | * @key: WEP key for shared key authentication | 706 | * @key: WEP key for shared key authentication |
707 | * @local_state_change: This is a request for a local state only, i.e., no | ||
708 | * Authentication frame is to be transmitted and authentication state is | ||
709 | * to be changed without having to wait for a response from the peer STA | ||
710 | * (AP). | ||
707 | */ | 711 | */ |
708 | struct cfg80211_auth_request { | 712 | struct cfg80211_auth_request { |
709 | struct cfg80211_bss *bss; | 713 | struct cfg80211_bss *bss; |
@@ -712,6 +716,7 @@ struct cfg80211_auth_request { | |||
712 | enum nl80211_auth_type auth_type; | 716 | enum nl80211_auth_type auth_type; |
713 | const u8 *key; | 717 | const u8 *key; |
714 | u8 key_len, key_idx; | 718 | u8 key_len, key_idx; |
719 | bool local_state_change; | ||
715 | }; | 720 | }; |
716 | 721 | ||
717 | /** | 722 | /** |
@@ -744,12 +749,15 @@ struct cfg80211_assoc_request { | |||
744 | * @ie: Extra IEs to add to Deauthentication frame or %NULL | 749 | * @ie: Extra IEs to add to Deauthentication frame or %NULL |
745 | * @ie_len: Length of ie buffer in octets | 750 | * @ie_len: Length of ie buffer in octets |
746 | * @reason_code: The reason code for the deauthentication | 751 | * @reason_code: The reason code for the deauthentication |
752 | * @local_state_change: This is a request for a local state only, i.e., no | ||
753 | * Deauthentication frame is to be transmitted. | ||
747 | */ | 754 | */ |
748 | struct cfg80211_deauth_request { | 755 | struct cfg80211_deauth_request { |
749 | struct cfg80211_bss *bss; | 756 | struct cfg80211_bss *bss; |
750 | const u8 *ie; | 757 | const u8 *ie; |
751 | size_t ie_len; | 758 | size_t ie_len; |
752 | u16 reason_code; | 759 | u16 reason_code; |
760 | bool local_state_change; | ||
753 | }; | 761 | }; |
754 | 762 | ||
755 | /** | 763 | /** |
@@ -762,12 +770,15 @@ struct cfg80211_deauth_request { | |||
762 | * @ie: Extra IEs to add to Disassociation frame or %NULL | 770 | * @ie: Extra IEs to add to Disassociation frame or %NULL |
763 | * @ie_len: Length of ie buffer in octets | 771 | * @ie_len: Length of ie buffer in octets |
764 | * @reason_code: The reason code for the disassociation | 772 | * @reason_code: The reason code for the disassociation |
773 | * @local_state_change: This is a request for a local state only, i.e., no | ||
774 | * Disassociation frame is to be transmitted. | ||
765 | */ | 775 | */ |
766 | struct cfg80211_disassoc_request { | 776 | struct cfg80211_disassoc_request { |
767 | struct cfg80211_bss *bss; | 777 | struct cfg80211_bss *bss; |
768 | const u8 *ie; | 778 | const u8 *ie; |
769 | size_t ie_len; | 779 | size_t ie_len; |
770 | u16 reason_code; | 780 | u16 reason_code; |
781 | bool local_state_change; | ||
771 | }; | 782 | }; |
772 | 783 | ||
773 | /** | 784 | /** |
@@ -1007,6 +1018,7 @@ struct cfg80211_pmksa { | |||
1007 | * RSN IE. It allows for faster roaming between WPA2 BSSIDs. | 1018 | * RSN IE. It allows for faster roaming between WPA2 BSSIDs. |
1008 | * @del_pmksa: Delete a cached PMKID. | 1019 | * @del_pmksa: Delete a cached PMKID. |
1009 | * @flush_pmksa: Flush all cached PMKIDs. | 1020 | * @flush_pmksa: Flush all cached PMKIDs. |
1021 | * @set_cqm_rssi_config: Configure connection quality monitor RSSI threshold. | ||
1010 | * | 1022 | * |
1011 | */ | 1023 | */ |
1012 | struct cfg80211_ops { | 1024 | struct cfg80211_ops { |
@@ -1152,6 +1164,10 @@ struct cfg80211_ops { | |||
1152 | 1164 | ||
1153 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, | 1165 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, |
1154 | bool enabled, int timeout); | 1166 | bool enabled, int timeout); |
1167 | |||
1168 | int (*set_cqm_rssi_config)(struct wiphy *wiphy, | ||
1169 | struct net_device *dev, | ||
1170 | s32 rssi_thold, u32 rssi_hyst); | ||
1155 | }; | 1171 | }; |
1156 | 1172 | ||
1157 | /* | 1173 | /* |
@@ -2337,4 +2353,18 @@ bool cfg80211_rx_action(struct net_device *dev, int freq, const u8 *buf, | |||
2337 | void cfg80211_action_tx_status(struct net_device *dev, u64 cookie, | 2353 | void cfg80211_action_tx_status(struct net_device *dev, u64 cookie, |
2338 | const u8 *buf, size_t len, bool ack, gfp_t gfp); | 2354 | const u8 *buf, size_t len, bool ack, gfp_t gfp); |
2339 | 2355 | ||
2356 | |||
2357 | /** | ||
2358 | * cfg80211_cqm_rssi_notify - connection quality monitoring rssi event | ||
2359 | * @dev: network device | ||
2360 | * @rssi_event: the triggered RSSI event | ||
2361 | * @gfp: context flags | ||
2362 | * | ||
2363 | * This function is called when a configured connection quality monitoring | ||
2364 | * rssi threshold reached event occurs. | ||
2365 | */ | ||
2366 | void cfg80211_cqm_rssi_notify(struct net_device *dev, | ||
2367 | enum nl80211_cqm_rssi_threshold_event rssi_event, | ||
2368 | gfp_t gfp); | ||
2369 | |||
2340 | #endif /* __NET_CFG80211_H */ | 2370 | #endif /* __NET_CFG80211_H */ |
diff --git a/include/net/dn_fib.h b/include/net/dn_fib.h index 52da6c3dd50d..bbcde3238e58 100644 --- a/include/net/dn_fib.h +++ b/include/net/dn_fib.h | |||
@@ -50,10 +50,6 @@ struct dn_fib_info { | |||
50 | __le16 fib_prefsrc; | 50 | __le16 fib_prefsrc; |
51 | __u32 fib_priority; | 51 | __u32 fib_priority; |
52 | __u32 fib_metrics[RTAX_MAX]; | 52 | __u32 fib_metrics[RTAX_MAX]; |
53 | #define dn_fib_mtu fib_metrics[RTAX_MTU-1] | ||
54 | #define dn_fib_window fib_metrics[RTAX_WINDOW-1] | ||
55 | #define dn_fib_rtt fib_metrics[RTAX_RTT-1] | ||
56 | #define dn_fib_advmss fib_metrics[RTAX_ADVMSS-1] | ||
57 | int fib_nhs; | 53 | int fib_nhs; |
58 | int fib_power; | 54 | int fib_power; |
59 | struct dn_fib_nh fib_nh[0]; | 55 | struct dn_fib_nh fib_nh[0]; |
diff --git a/include/net/dst.h b/include/net/dst.h index ce078cda6b74..aac5a5fcfda9 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -225,21 +225,6 @@ static inline void dst_confirm(struct dst_entry *dst) | |||
225 | neigh_confirm(dst->neighbour); | 225 | neigh_confirm(dst->neighbour); |
226 | } | 226 | } |
227 | 227 | ||
228 | static inline void dst_negative_advice(struct dst_entry **dst_p, | ||
229 | struct sock *sk) | ||
230 | { | ||
231 | struct dst_entry * dst = *dst_p; | ||
232 | if (dst && dst->ops->negative_advice) { | ||
233 | *dst_p = dst->ops->negative_advice(dst); | ||
234 | |||
235 | if (dst != *dst_p) { | ||
236 | extern void sk_reset_txq(struct sock *sk); | ||
237 | |||
238 | sk_reset_txq(sk); | ||
239 | } | ||
240 | } | ||
241 | } | ||
242 | |||
243 | static inline void dst_link_failure(struct sk_buff *skb) | 228 | static inline void dst_link_failure(struct sk_buff *skb) |
244 | { | 229 | { |
245 | struct dst_entry *dst = skb_dst(skb); | 230 | struct dst_entry *dst = skb_dst(skb); |
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index c07ac9650ebc..52bd9e6c9141 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __NET_FIB_RULES_H | 2 | #define __NET_FIB_RULES_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/slab.h> | ||
5 | #include <linux/netdevice.h> | 6 | #include <linux/netdevice.h> |
6 | #include <linux/fib_rules.h> | 7 | #include <linux/fib_rules.h> |
7 | #include <net/flow.h> | 8 | #include <net/flow.h> |
@@ -113,4 +114,5 @@ extern int fib_rules_lookup(struct fib_rules_ops *, | |||
113 | extern int fib_default_rule_add(struct fib_rules_ops *, | 114 | extern int fib_default_rule_add(struct fib_rules_ops *, |
114 | u32 pref, u32 table, | 115 | u32 pref, u32 table, |
115 | u32 flags); | 116 | u32 flags); |
117 | extern u32 fib_default_rule_pref(struct fib_rules_ops *ops); | ||
116 | #endif | 118 | #endif |
diff --git a/include/net/flow.h b/include/net/flow.h index 809970b7dfee..bb08692a20b0 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
@@ -86,11 +86,26 @@ struct flowi { | |||
86 | 86 | ||
87 | struct net; | 87 | struct net; |
88 | struct sock; | 88 | struct sock; |
89 | typedef int (*flow_resolve_t)(struct net *net, struct flowi *key, u16 family, | 89 | struct flow_cache_ops; |
90 | u8 dir, void **objp, atomic_t **obj_refp); | 90 | |
91 | struct flow_cache_object { | ||
92 | const struct flow_cache_ops *ops; | ||
93 | }; | ||
94 | |||
95 | struct flow_cache_ops { | ||
96 | struct flow_cache_object *(*get)(struct flow_cache_object *); | ||
97 | int (*check)(struct flow_cache_object *); | ||
98 | void (*delete)(struct flow_cache_object *); | ||
99 | }; | ||
100 | |||
101 | typedef struct flow_cache_object *(*flow_resolve_t)( | ||
102 | struct net *net, struct flowi *key, u16 family, | ||
103 | u8 dir, struct flow_cache_object *oldobj, void *ctx); | ||
104 | |||
105 | extern struct flow_cache_object *flow_cache_lookup( | ||
106 | struct net *net, struct flowi *key, u16 family, | ||
107 | u8 dir, flow_resolve_t resolver, void *ctx); | ||
91 | 108 | ||
92 | extern void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family, | ||
93 | u8 dir, flow_resolve_t resolver); | ||
94 | extern void flow_cache_flush(void); | 109 | extern void flow_cache_flush(void); |
95 | extern atomic_t flow_cache_genid; | 110 | extern atomic_t flow_cache_genid; |
96 | 111 | ||
diff --git a/include/net/icmp.h b/include/net/icmp.h index 15b3dfe9fce8..6e991e0d0d6f 100644 --- a/include/net/icmp.h +++ b/include/net/icmp.h | |||
@@ -48,15 +48,4 @@ extern void icmp_out_count(struct net *net, unsigned char type); | |||
48 | /* Move into dst.h ? */ | 48 | /* Move into dst.h ? */ |
49 | extern int xrlim_allow(struct dst_entry *dst, int timeout); | 49 | extern int xrlim_allow(struct dst_entry *dst, int timeout); |
50 | 50 | ||
51 | struct raw_sock { | ||
52 | /* inet_sock has to be the first member */ | ||
53 | struct inet_sock inet; | ||
54 | struct icmp_filter filter; | ||
55 | }; | ||
56 | |||
57 | static inline struct raw_sock *raw_sk(const struct sock *sk) | ||
58 | { | ||
59 | return (struct raw_sock *)sk; | ||
60 | } | ||
61 | |||
62 | #endif /* _ICMP_H */ | 51 | #endif /* _ICMP_H */ |
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index 545d8b059bef..13f9fc086d54 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h | |||
@@ -54,16 +54,17 @@ struct inet6_ifaddr { | |||
54 | struct inet6_dev *idev; | 54 | struct inet6_dev *idev; |
55 | struct rt6_info *rt; | 55 | struct rt6_info *rt; |
56 | 56 | ||
57 | struct inet6_ifaddr *lst_next; /* next addr in addr_lst */ | 57 | struct hlist_node addr_lst; |
58 | struct inet6_ifaddr *if_next; /* next addr in inet6_dev */ | 58 | struct list_head if_list; |
59 | 59 | ||
60 | #ifdef CONFIG_IPV6_PRIVACY | 60 | #ifdef CONFIG_IPV6_PRIVACY |
61 | struct inet6_ifaddr *tmp_next; /* next addr in tempaddr_lst */ | 61 | struct list_head tmp_list; |
62 | struct inet6_ifaddr *ifpub; | 62 | struct inet6_ifaddr *ifpub; |
63 | int regen_count; | 63 | int regen_count; |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | int dead; | 66 | int dead; |
67 | struct rcu_head rcu; | ||
67 | }; | 68 | }; |
68 | 69 | ||
69 | struct ip6_sf_socklist { | 70 | struct ip6_sf_socklist { |
@@ -151,9 +152,9 @@ struct ipv6_devstat { | |||
151 | }; | 152 | }; |
152 | 153 | ||
153 | struct inet6_dev { | 154 | struct inet6_dev { |
154 | struct net_device *dev; | 155 | struct net_device *dev; |
155 | 156 | ||
156 | struct inet6_ifaddr *addr_list; | 157 | struct list_head addr_list; |
157 | 158 | ||
158 | struct ifmcaddr6 *mc_list; | 159 | struct ifmcaddr6 *mc_list; |
159 | struct ifmcaddr6 *mc_tomb; | 160 | struct ifmcaddr6 *mc_tomb; |
@@ -175,7 +176,7 @@ struct inet6_dev { | |||
175 | #ifdef CONFIG_IPV6_PRIVACY | 176 | #ifdef CONFIG_IPV6_PRIVACY |
176 | u8 rndid[8]; | 177 | u8 rndid[8]; |
177 | struct timer_list regen_timer; | 178 | struct timer_list regen_timer; |
178 | struct inet6_ifaddr *tempaddr_list; | 179 | struct list_head tempaddr_list; |
179 | #endif | 180 | #endif |
180 | 181 | ||
181 | struct neigh_parms *nd_parms; | 182 | struct neigh_parms *nd_parms; |
diff --git a/include/net/inet6_connection_sock.h b/include/net/inet6_connection_sock.h index f13ddc2543b1..aae08f686633 100644 --- a/include/net/inet6_connection_sock.h +++ b/include/net/inet6_connection_sock.h | |||
@@ -38,5 +38,5 @@ extern void inet6_csk_reqsk_queue_hash_add(struct sock *sk, | |||
38 | 38 | ||
39 | extern void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); | 39 | extern void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); |
40 | 40 | ||
41 | extern int inet6_csk_xmit(struct sk_buff *skb, int ipfragok); | 41 | extern int inet6_csk_xmit(struct sk_buff *skb); |
42 | #endif /* _INET6_CONNECTION_SOCK_H */ | 42 | #endif /* _INET6_CONNECTION_SOCK_H */ |
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 696d6e4ce68a..b6d3b55da19b 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
@@ -36,9 +36,8 @@ struct tcp_congestion_ops; | |||
36 | * (i.e. things that depend on the address family) | 36 | * (i.e. things that depend on the address family) |
37 | */ | 37 | */ |
38 | struct inet_connection_sock_af_ops { | 38 | struct inet_connection_sock_af_ops { |
39 | int (*queue_xmit)(struct sk_buff *skb, int ipfragok); | 39 | int (*queue_xmit)(struct sk_buff *skb); |
40 | void (*send_check)(struct sock *sk, int len, | 40 | void (*send_check)(struct sock *sk, struct sk_buff *skb); |
41 | struct sk_buff *skb); | ||
42 | int (*rebuild_header)(struct sock *sk); | 41 | int (*rebuild_header)(struct sock *sk); |
43 | int (*conn_request)(struct sock *sk, struct sk_buff *skb); | 42 | int (*conn_request)(struct sock *sk, struct sk_buff *skb); |
44 | struct sock *(*syn_recv_sock)(struct sock *sk, struct sk_buff *skb, | 43 | struct sock *(*syn_recv_sock)(struct sock *sk, struct sk_buff *skb, |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 83fd34437cf1..b487bc1b99ab 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/jhash.h> | 23 | #include <linux/jhash.h> |
24 | #include <linux/netdevice.h> | ||
24 | 25 | ||
25 | #include <net/flow.h> | 26 | #include <net/flow.h> |
26 | #include <net/sock.h> | 27 | #include <net/sock.h> |
@@ -101,6 +102,7 @@ struct rtable; | |||
101 | * @uc_ttl - Unicast TTL | 102 | * @uc_ttl - Unicast TTL |
102 | * @inet_sport - Source port | 103 | * @inet_sport - Source port |
103 | * @inet_id - ID counter for DF pkts | 104 | * @inet_id - ID counter for DF pkts |
105 | * @rxhash - flow hash received from netif layer | ||
104 | * @tos - TOS | 106 | * @tos - TOS |
105 | * @mc_ttl - Multicasting TTL | 107 | * @mc_ttl - Multicasting TTL |
106 | * @is_icsk - is this an inet_connection_sock? | 108 | * @is_icsk - is this an inet_connection_sock? |
@@ -124,6 +126,9 @@ struct inet_sock { | |||
124 | __u16 cmsg_flags; | 126 | __u16 cmsg_flags; |
125 | __be16 inet_sport; | 127 | __be16 inet_sport; |
126 | __u16 inet_id; | 128 | __u16 inet_id; |
129 | #ifdef CONFIG_RPS | ||
130 | __u32 rxhash; | ||
131 | #endif | ||
127 | 132 | ||
128 | struct ip_options *opt; | 133 | struct ip_options *opt; |
129 | __u8 tos; | 134 | __u8 tos; |
@@ -219,4 +224,37 @@ static inline __u8 inet_sk_flowi_flags(const struct sock *sk) | |||
219 | return inet_sk(sk)->transparent ? FLOWI_FLAG_ANYSRC : 0; | 224 | return inet_sk(sk)->transparent ? FLOWI_FLAG_ANYSRC : 0; |
220 | } | 225 | } |
221 | 226 | ||
227 | static inline void inet_rps_record_flow(const struct sock *sk) | ||
228 | { | ||
229 | #ifdef CONFIG_RPS | ||
230 | struct rps_sock_flow_table *sock_flow_table; | ||
231 | |||
232 | rcu_read_lock(); | ||
233 | sock_flow_table = rcu_dereference(rps_sock_flow_table); | ||
234 | rps_record_sock_flow(sock_flow_table, inet_sk(sk)->rxhash); | ||
235 | rcu_read_unlock(); | ||
236 | #endif | ||
237 | } | ||
238 | |||
239 | static inline void inet_rps_reset_flow(const struct sock *sk) | ||
240 | { | ||
241 | #ifdef CONFIG_RPS | ||
242 | struct rps_sock_flow_table *sock_flow_table; | ||
243 | |||
244 | rcu_read_lock(); | ||
245 | sock_flow_table = rcu_dereference(rps_sock_flow_table); | ||
246 | rps_reset_sock_flow(sock_flow_table, inet_sk(sk)->rxhash); | ||
247 | rcu_read_unlock(); | ||
248 | #endif | ||
249 | } | ||
250 | |||
251 | static inline void inet_rps_save_rxhash(const struct sock *sk, u32 rxhash) | ||
252 | { | ||
253 | #ifdef CONFIG_RPS | ||
254 | if (unlikely(inet_sk(sk)->rxhash != rxhash)) { | ||
255 | inet_rps_reset_flow(sk); | ||
256 | inet_sk(sk)->rxhash = rxhash; | ||
257 | } | ||
258 | #endif | ||
259 | } | ||
222 | #endif /* _INET_SOCK_H */ | 260 | #endif /* _INET_SOCK_H */ |
diff --git a/include/net/ip.h b/include/net/ip.h index 503994a38ed1..a84ceb692687 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -101,7 +101,7 @@ extern int ip_do_nat(struct sk_buff *skb); | |||
101 | extern void ip_send_check(struct iphdr *ip); | 101 | extern void ip_send_check(struct iphdr *ip); |
102 | extern int __ip_local_out(struct sk_buff *skb); | 102 | extern int __ip_local_out(struct sk_buff *skb); |
103 | extern int ip_local_out(struct sk_buff *skb); | 103 | extern int ip_local_out(struct sk_buff *skb); |
104 | extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok); | 104 | extern int ip_queue_xmit(struct sk_buff *skb); |
105 | extern void ip_init(void); | 105 | extern void ip_init(void); |
106 | extern int ip_append_data(struct sock *sk, | 106 | extern int ip_append_data(struct sock *sk, |
107 | int getfrag(void *from, char *to, int offset, int len, | 107 | int getfrag(void *from, char *to, int offset, int len, |
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 86f46c49e318..4b1dc1161c37 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h | |||
@@ -88,34 +88,37 @@ struct rt6_info { | |||
88 | struct dst_entry dst; | 88 | struct dst_entry dst; |
89 | } u; | 89 | } u; |
90 | 90 | ||
91 | struct inet6_dev *rt6i_idev; | ||
92 | |||
93 | #define rt6i_dev u.dst.dev | 91 | #define rt6i_dev u.dst.dev |
94 | #define rt6i_nexthop u.dst.neighbour | 92 | #define rt6i_nexthop u.dst.neighbour |
95 | #define rt6i_expires u.dst.expires | 93 | #define rt6i_expires u.dst.expires |
96 | 94 | ||
95 | /* | ||
96 | * Tail elements of dst_entry (__refcnt etc.) | ||
97 | * and these elements (rarely used in hot path) are in | ||
98 | * the same cache line. | ||
99 | */ | ||
100 | struct fib6_table *rt6i_table; | ||
97 | struct fib6_node *rt6i_node; | 101 | struct fib6_node *rt6i_node; |
98 | 102 | ||
99 | struct in6_addr rt6i_gateway; | 103 | struct in6_addr rt6i_gateway; |
100 | |||
101 | u32 rt6i_flags; | ||
102 | u32 rt6i_metric; | ||
103 | atomic_t rt6i_ref; | ||
104 | 104 | ||
105 | /* more non-fragment space at head required */ | 105 | atomic_t rt6i_ref; |
106 | unsigned short rt6i_nfheader_len; | ||
107 | |||
108 | u8 rt6i_protocol; | ||
109 | 106 | ||
110 | struct fib6_table *rt6i_table; | 107 | /* These are in a separate cache line. */ |
108 | struct rt6key rt6i_dst ____cacheline_aligned_in_smp; | ||
109 | u32 rt6i_flags; | ||
110 | struct rt6key rt6i_src; | ||
111 | u32 rt6i_metric; | ||
111 | 112 | ||
112 | struct rt6key rt6i_dst; | 113 | struct inet6_dev *rt6i_idev; |
113 | 114 | ||
114 | #ifdef CONFIG_XFRM | 115 | #ifdef CONFIG_XFRM |
115 | u32 rt6i_flow_cache_genid; | 116 | u32 rt6i_flow_cache_genid; |
116 | #endif | 117 | #endif |
118 | /* more non-fragment space at head required */ | ||
119 | unsigned short rt6i_nfheader_len; | ||
117 | 120 | ||
118 | struct rt6key rt6i_src; | 121 | u8 rt6i_protocol; |
119 | }; | 122 | }; |
120 | 123 | ||
121 | static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst) | 124 | static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst) |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 68f67836e146..278312c95f96 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -152,9 +152,9 @@ static inline void __ip6_dst_store(struct sock *sk, struct dst_entry *dst, | |||
152 | static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, | 152 | static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, |
153 | struct in6_addr *daddr, struct in6_addr *saddr) | 153 | struct in6_addr *daddr, struct in6_addr *saddr) |
154 | { | 154 | { |
155 | write_lock(&sk->sk_dst_lock); | 155 | spin_lock(&sk->sk_dst_lock); |
156 | __ip6_dst_store(sk, dst, daddr, saddr); | 156 | __ip6_dst_store(sk, dst, daddr, saddr); |
157 | write_unlock(&sk->sk_dst_lock); | 157 | spin_unlock(&sk->sk_dst_lock); |
158 | } | 158 | } |
159 | 159 | ||
160 | static inline int ipv6_unicast_destination(struct sk_buff *skb) | 160 | static inline int ipv6_unicast_destination(struct sk_buff *skb) |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index e72fb10ce573..b1d8db90b214 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -422,7 +422,7 @@ static inline int __ipv6_addr_diff(const void *token1, const void *token2, int a | |||
422 | for (i = 0; i < addrlen; i++) { | 422 | for (i = 0; i < addrlen; i++) { |
423 | __be32 xb = a1[i] ^ a2[i]; | 423 | __be32 xb = a1[i] ^ a2[i]; |
424 | if (xb) | 424 | if (xb) |
425 | return i * 32 + 32 - fls(ntohl(xb)); | 425 | return i * 32 + 31 - __fls(ntohl(xb)); |
426 | } | 426 | } |
427 | 427 | ||
428 | /* | 428 | /* |
@@ -482,8 +482,7 @@ extern int ip6_rcv_finish(struct sk_buff *skb); | |||
482 | extern int ip6_xmit(struct sock *sk, | 482 | extern int ip6_xmit(struct sock *sk, |
483 | struct sk_buff *skb, | 483 | struct sk_buff *skb, |
484 | struct flowi *fl, | 484 | struct flowi *fl, |
485 | struct ipv6_txoptions *opt, | 485 | struct ipv6_txoptions *opt); |
486 | int ipfragok); | ||
487 | 486 | ||
488 | extern int ip6_nd_hdr(struct sock *sk, | 487 | extern int ip6_nd_hdr(struct sock *sk, |
489 | struct sk_buff *skb, | 488 | struct sk_buff *skb, |
diff --git a/include/net/ipx.h b/include/net/ipx.h index a14121dd1932..ef51a668ba19 100644 --- a/include/net/ipx.h +++ b/include/net/ipx.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <net/datalink.h> | 13 | #include <net/datalink.h> |
14 | #include <linux/ipx.h> | 14 | #include <linux/ipx.h> |
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | struct ipx_address { | 18 | struct ipx_address { |
18 | __be32 net; | 19 | __be32 net; |
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h index 5e310c8d8e2f..205a3360156e 100644 --- a/include/net/iucv/iucv.h +++ b/include/net/iucv/iucv.h | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/slab.h> | ||
31 | #include <asm/debug.h> | 32 | #include <asm/debug.h> |
32 | 33 | ||
33 | /* | 34 | /* |
diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h index b2b98f3fa265..3afdb21cc31d 100644 --- a/include/net/iw_handler.h +++ b/include/net/iw_handler.h | |||
@@ -323,7 +323,7 @@ typedef int (*iw_handler)(struct net_device *dev, struct iw_request_info *info, | |||
323 | struct iw_handler_def { | 323 | struct iw_handler_def { |
324 | 324 | ||
325 | /* Array of handlers for standard ioctls | 325 | /* Array of handlers for standard ioctls |
326 | * We will call dev->wireless_handlers->standard[ioctl - SIOCSIWCOMMIT] | 326 | * We will call dev->wireless_handlers->standard[ioctl - SIOCIWFIRST] |
327 | */ | 327 | */ |
328 | const iw_handler * standard; | 328 | const iw_handler * standard; |
329 | /* Number of handlers defined (more precisely, index of the | 329 | /* Number of handlers defined (more precisely, index of the |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 45d7d44d7cbe..344e5bf72062 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -144,6 +144,7 @@ struct ieee80211_low_level_stats { | |||
144 | * new beacon (beaconing modes) | 144 | * new beacon (beaconing modes) |
145 | * @BSS_CHANGED_BEACON_ENABLED: Beaconing should be | 145 | * @BSS_CHANGED_BEACON_ENABLED: Beaconing should be |
146 | * enabled/disabled (beaconing modes) | 146 | * enabled/disabled (beaconing modes) |
147 | * @BSS_CHANGED_CQM: Connection quality monitor config changed | ||
147 | */ | 148 | */ |
148 | enum ieee80211_bss_change { | 149 | enum ieee80211_bss_change { |
149 | BSS_CHANGED_ASSOC = 1<<0, | 150 | BSS_CHANGED_ASSOC = 1<<0, |
@@ -156,6 +157,7 @@ enum ieee80211_bss_change { | |||
156 | BSS_CHANGED_BSSID = 1<<7, | 157 | BSS_CHANGED_BSSID = 1<<7, |
157 | BSS_CHANGED_BEACON = 1<<8, | 158 | BSS_CHANGED_BEACON = 1<<8, |
158 | BSS_CHANGED_BEACON_ENABLED = 1<<9, | 159 | BSS_CHANGED_BEACON_ENABLED = 1<<9, |
160 | BSS_CHANGED_CQM = 1<<10, | ||
159 | }; | 161 | }; |
160 | 162 | ||
161 | /** | 163 | /** |
@@ -185,6 +187,9 @@ enum ieee80211_bss_change { | |||
185 | * @enable_beacon: whether beaconing should be enabled or not | 187 | * @enable_beacon: whether beaconing should be enabled or not |
186 | * @ht_operation_mode: HT operation mode (like in &struct ieee80211_ht_info). | 188 | * @ht_operation_mode: HT operation mode (like in &struct ieee80211_ht_info). |
187 | * This field is only valid when the channel type is one of the HT types. | 189 | * This field is only valid when the channel type is one of the HT types. |
190 | * @cqm_rssi_thold: Connection quality monitor RSSI threshold, a zero value | ||
191 | * implies disabled | ||
192 | * @cqm_rssi_hyst: Connection quality monitor RSSI hysteresis | ||
188 | */ | 193 | */ |
189 | struct ieee80211_bss_conf { | 194 | struct ieee80211_bss_conf { |
190 | const u8 *bssid; | 195 | const u8 *bssid; |
@@ -202,6 +207,8 @@ struct ieee80211_bss_conf { | |||
202 | u64 timestamp; | 207 | u64 timestamp; |
203 | u32 basic_rates; | 208 | u32 basic_rates; |
204 | u16 ht_operation_mode; | 209 | u16 ht_operation_mode; |
210 | s32 cqm_rssi_thold; | ||
211 | u32 cqm_rssi_hyst; | ||
205 | }; | 212 | }; |
206 | 213 | ||
207 | /** | 214 | /** |
@@ -543,7 +550,7 @@ enum mac80211_rx_flags { | |||
543 | * @signal: signal strength when receiving this frame, either in dBm, in dB or | 550 | * @signal: signal strength when receiving this frame, either in dBm, in dB or |
544 | * unspecified depending on the hardware capabilities flags | 551 | * unspecified depending on the hardware capabilities flags |
545 | * @IEEE80211_HW_SIGNAL_* | 552 | * @IEEE80211_HW_SIGNAL_* |
546 | * @noise: noise when receiving this frame, in dBm. | 553 | * @noise: noise when receiving this frame, in dBm (DEPRECATED). |
547 | * @antenna: antenna used | 554 | * @antenna: antenna used |
548 | * @rate_idx: index of data rate into band's supported rates or MCS index if | 555 | * @rate_idx: index of data rate into band's supported rates or MCS index if |
549 | * HT rates are use (RX_FLAG_HT) | 556 | * HT rates are use (RX_FLAG_HT) |
@@ -554,7 +561,7 @@ struct ieee80211_rx_status { | |||
554 | enum ieee80211_band band; | 561 | enum ieee80211_band band; |
555 | int freq; | 562 | int freq; |
556 | int signal; | 563 | int signal; |
557 | int noise; | 564 | int noise __deprecated; |
558 | int antenna; | 565 | int antenna; |
559 | int rate_idx; | 566 | int rate_idx; |
560 | int flag; | 567 | int flag; |
@@ -580,11 +587,15 @@ struct ieee80211_rx_status { | |||
580 | * may turn the device off as much as possible. Typically, this flag will | 587 | * may turn the device off as much as possible. Typically, this flag will |
581 | * be set when an interface is set UP but not associated or scanning, but | 588 | * be set when an interface is set UP but not associated or scanning, but |
582 | * it can also be unset in that case when monitor interfaces are active. | 589 | * it can also be unset in that case when monitor interfaces are active. |
590 | * @IEEE80211_CONF_QOS: Enable 802.11e QoS also know as WMM (Wireless | ||
591 | * Multimedia). On some drivers (iwlwifi is one of know) we have | ||
592 | * to enable/disable QoS explicitly. | ||
583 | */ | 593 | */ |
584 | enum ieee80211_conf_flags { | 594 | enum ieee80211_conf_flags { |
585 | IEEE80211_CONF_MONITOR = (1<<0), | 595 | IEEE80211_CONF_MONITOR = (1<<0), |
586 | IEEE80211_CONF_PS = (1<<1), | 596 | IEEE80211_CONF_PS = (1<<1), |
587 | IEEE80211_CONF_IDLE = (1<<2), | 597 | IEEE80211_CONF_IDLE = (1<<2), |
598 | IEEE80211_CONF_QOS = (1<<3), | ||
588 | }; | 599 | }; |
589 | 600 | ||
590 | 601 | ||
@@ -609,6 +620,7 @@ enum ieee80211_conf_changed { | |||
609 | IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), | 620 | IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), |
610 | IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7), | 621 | IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7), |
611 | IEEE80211_CONF_CHANGE_IDLE = BIT(8), | 622 | IEEE80211_CONF_CHANGE_IDLE = BIT(8), |
623 | IEEE80211_CONF_CHANGE_QOS = BIT(9), | ||
612 | }; | 624 | }; |
613 | 625 | ||
614 | /** | 626 | /** |
@@ -954,6 +966,17 @@ enum ieee80211_tkip_key_type { | |||
954 | * Hardware can provide ack status reports of Tx frames to | 966 | * Hardware can provide ack status reports of Tx frames to |
955 | * the stack. | 967 | * the stack. |
956 | * | 968 | * |
969 | * @IEEE80211_HW_CONNECTION_MONITOR: | ||
970 | * The hardware performs its own connection monitoring, including | ||
971 | * periodic keep-alives to the AP and probing the AP on beacon loss. | ||
972 | * When this flag is set, signaling beacon-loss will cause an immediate | ||
973 | * change to disassociated state. | ||
974 | * | ||
975 | * @IEEE80211_HW_SUPPORTS_CQM_RSSI: | ||
976 | * Hardware can do connection quality monitoring - i.e. it can monitor | ||
977 | * connection quality related parameters, such as the RSSI level and | ||
978 | * provide notifications if configured trigger levels are reached. | ||
979 | * | ||
957 | */ | 980 | */ |
958 | enum ieee80211_hw_flags { | 981 | enum ieee80211_hw_flags { |
959 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | 982 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, |
@@ -975,6 +998,8 @@ enum ieee80211_hw_flags { | |||
975 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS = 1<<16, | 998 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS = 1<<16, |
976 | IEEE80211_HW_SUPPORTS_UAPSD = 1<<17, | 999 | IEEE80211_HW_SUPPORTS_UAPSD = 1<<17, |
977 | IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18, | 1000 | IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18, |
1001 | IEEE80211_HW_CONNECTION_MONITOR = 1<<19, | ||
1002 | IEEE80211_HW_SUPPORTS_CQM_RSSI = 1<<20, | ||
978 | }; | 1003 | }; |
979 | 1004 | ||
980 | /** | 1005 | /** |
@@ -1606,7 +1631,7 @@ struct ieee80211_ops { | |||
1606 | struct ieee80211_bss_conf *info, | 1631 | struct ieee80211_bss_conf *info, |
1607 | u32 changed); | 1632 | u32 changed); |
1608 | u64 (*prepare_multicast)(struct ieee80211_hw *hw, | 1633 | u64 (*prepare_multicast)(struct ieee80211_hw *hw, |
1609 | int mc_count, struct dev_addr_list *mc_list); | 1634 | struct netdev_hw_addr_list *mc_list); |
1610 | void (*configure_filter)(struct ieee80211_hw *hw, | 1635 | void (*configure_filter)(struct ieee80211_hw *hw, |
1611 | unsigned int changed_flags, | 1636 | unsigned int changed_flags, |
1612 | unsigned int *total_flags, | 1637 | unsigned int *total_flags, |
@@ -1802,7 +1827,10 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw); | |||
1802 | * ieee80211_rx - receive frame | 1827 | * ieee80211_rx - receive frame |
1803 | * | 1828 | * |
1804 | * Use this function to hand received frames to mac80211. The receive | 1829 | * Use this function to hand received frames to mac80211. The receive |
1805 | * buffer in @skb must start with an IEEE 802.11 header. | 1830 | * buffer in @skb must start with an IEEE 802.11 header. In case of a |
1831 | * paged @skb is used, the driver is recommended to put the ieee80211 | ||
1832 | * header of the frame on the linear part of the @skb to avoid memory | ||
1833 | * allocation and/or memcpy by the stack. | ||
1806 | * | 1834 | * |
1807 | * This function may not be called in IRQ context. Calls to this function | 1835 | * This function may not be called in IRQ context. Calls to this function |
1808 | * for a single hardware must be synchronized against each other. Calls to | 1836 | * for a single hardware must be synchronized against each other. Calls to |
@@ -2364,12 +2392,42 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw, | |||
2364 | * | 2392 | * |
2365 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | 2393 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
2366 | * | 2394 | * |
2367 | * When beacon filtering is enabled with IEEE80211_HW_BEACON_FILTERING and | 2395 | * When beacon filtering is enabled with %IEEE80211_HW_BEACON_FILTERING and |
2368 | * IEEE80211_CONF_PS is set, the driver needs to inform whenever the | 2396 | * %IEEE80211_CONF_PS is set, the driver needs to inform whenever the |
2369 | * hardware is not receiving beacons with this function. | 2397 | * hardware is not receiving beacons with this function. |
2370 | */ | 2398 | */ |
2371 | void ieee80211_beacon_loss(struct ieee80211_vif *vif); | 2399 | void ieee80211_beacon_loss(struct ieee80211_vif *vif); |
2372 | 2400 | ||
2401 | /** | ||
2402 | * ieee80211_connection_loss - inform hardware has lost connection to the AP | ||
2403 | * | ||
2404 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
2405 | * | ||
2406 | * When beacon filtering is enabled with %IEEE80211_HW_BEACON_FILTERING, and | ||
2407 | * %IEEE80211_CONF_PS and %IEEE80211_HW_CONNECTION_MONITOR are set, the driver | ||
2408 | * needs to inform if the connection to the AP has been lost. | ||
2409 | * | ||
2410 | * This function will cause immediate change to disassociated state, | ||
2411 | * without connection recovery attempts. | ||
2412 | */ | ||
2413 | void ieee80211_connection_loss(struct ieee80211_vif *vif); | ||
2414 | |||
2415 | /** | ||
2416 | * ieee80211_cqm_rssi_notify - inform a configured connection quality monitoring | ||
2417 | * rssi threshold triggered | ||
2418 | * | ||
2419 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
2420 | * @rssi_event: the RSSI trigger event type | ||
2421 | * @gfp: context flags | ||
2422 | * | ||
2423 | * When the %IEEE80211_HW_SUPPORTS_CQM_RSSI is set, and a connection quality | ||
2424 | * monitoring is configured with an rssi threshold, the driver will inform | ||
2425 | * whenever the rssi level reaches the threshold. | ||
2426 | */ | ||
2427 | void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif, | ||
2428 | enum nl80211_cqm_rssi_threshold_event rssi_event, | ||
2429 | gfp_t gfp); | ||
2430 | |||
2373 | /* Rate control API */ | 2431 | /* Rate control API */ |
2374 | 2432 | ||
2375 | /** | 2433 | /** |
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h index 2d2a1f9a61d8..32d15bd6efa3 100644 --- a/include/net/netfilter/nf_conntrack_extend.h +++ b/include/net/netfilter/nf_conntrack_extend.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _NF_CONNTRACK_EXTEND_H | 1 | #ifndef _NF_CONNTRACK_EXTEND_H |
2 | #define _NF_CONNTRACK_EXTEND_H | 2 | #define _NF_CONNTRACK_EXTEND_H |
3 | 3 | ||
4 | #include <linux/slab.h> | ||
5 | |||
4 | #include <net/netfilter/nf_conntrack.h> | 6 | #include <net/netfilter/nf_conntrack.h> |
5 | 7 | ||
6 | enum nf_ct_ext_id { | 8 | enum nf_ct_ext_id { |
diff --git a/include/net/netlabel.h b/include/net/netlabel.h index 60ebbc1fef46..9db401a8b4d9 100644 --- a/include/net/netlabel.h +++ b/include/net/netlabel.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #define _NETLABEL_H | 31 | #define _NETLABEL_H |
32 | 32 | ||
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/net.h> | 35 | #include <linux/net.h> |
35 | #include <linux/skbuff.h> | 36 | #include <linux/skbuff.h> |
36 | #include <linux/in.h> | 37 | #include <linux/in.h> |
diff --git a/include/net/netlink.h b/include/net/netlink.h index f82e463c875a..4fc05b58503e 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -945,7 +945,11 @@ static inline u64 nla_get_u64(const struct nlattr *nla) | |||
945 | */ | 945 | */ |
946 | static inline __be64 nla_get_be64(const struct nlattr *nla) | 946 | static inline __be64 nla_get_be64(const struct nlattr *nla) |
947 | { | 947 | { |
948 | return *(__be64 *) nla_data(nla); | 948 | __be64 tmp; |
949 | |||
950 | nla_memcpy(&tmp, nla, sizeof(tmp)); | ||
951 | |||
952 | return tmp; | ||
949 | } | 953 | } |
950 | 954 | ||
951 | /** | 955 | /** |
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 2764994c9136..ae07feec6446 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
@@ -59,15 +59,11 @@ struct netns_ipv4 { | |||
59 | atomic_t rt_genid; | 59 | atomic_t rt_genid; |
60 | 60 | ||
61 | #ifdef CONFIG_IP_MROUTE | 61 | #ifdef CONFIG_IP_MROUTE |
62 | struct sock *mroute_sk; | 62 | #ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES |
63 | struct mfc_cache **mfc_cache_array; | 63 | struct mr_table *mrt; |
64 | struct vif_device *vif_table; | 64 | #else |
65 | int maxvif; | 65 | struct list_head mr_tables; |
66 | atomic_t cache_resolve_queue_len; | 66 | struct fib_rules_ops *mr_rules_ops; |
67 | int mroute_do_assert; | ||
68 | int mroute_do_pim; | ||
69 | #if defined(CONFIG_IP_PIMSM_V1) || defined(CONFIG_IP_PIMSM_V2) | ||
70 | int mroute_reg_vif_num; | ||
71 | #endif | 67 | #endif |
72 | #endif | 68 | #endif |
73 | }; | 69 | }; |
diff --git a/include/net/netrom.h b/include/net/netrom.h index ab170a60e7d3..f0793c1cb5f8 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/netrom.h> | 10 | #include <linux/netrom.h> |
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/slab.h> | ||
12 | #include <net/sock.h> | 13 | #include <net/sock.h> |
13 | 14 | ||
14 | #define NR_NETWORK_LEN 15 | 15 | #define NR_NETWORK_LEN 15 |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index b6cdc33b39c1..9d4d87cc970e 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -12,7 +12,7 @@ struct qdisc_walker { | |||
12 | int (*fn)(struct Qdisc *, unsigned long cl, struct qdisc_walker *); | 12 | int (*fn)(struct Qdisc *, unsigned long cl, struct qdisc_walker *); |
13 | }; | 13 | }; |
14 | 14 | ||
15 | #define QDISC_ALIGNTO 32 | 15 | #define QDISC_ALIGNTO 64 |
16 | #define QDISC_ALIGN(len) (((len) + QDISC_ALIGNTO-1) & ~(QDISC_ALIGNTO-1)) | 16 | #define QDISC_ALIGN(len) (((len) + QDISC_ALIGNTO-1) & ~(QDISC_ALIGNTO-1)) |
17 | 17 | ||
18 | static inline void *qdisc_priv(struct Qdisc *q) | 18 | static inline void *qdisc_priv(struct Qdisc *q) |
diff --git a/include/net/raw.h b/include/net/raw.h index 6c14a656357a..43c57502659b 100644 --- a/include/net/raw.h +++ b/include/net/raw.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | 20 | ||
21 | #include <net/protocol.h> | 21 | #include <net/protocol.h> |
22 | #include <linux/icmp.h> | ||
22 | 23 | ||
23 | extern struct proto raw_prot; | 24 | extern struct proto raw_prot; |
24 | 25 | ||
@@ -56,4 +57,16 @@ int raw_seq_open(struct inode *ino, struct file *file, | |||
56 | void raw_hash_sk(struct sock *sk); | 57 | void raw_hash_sk(struct sock *sk); |
57 | void raw_unhash_sk(struct sock *sk); | 58 | void raw_unhash_sk(struct sock *sk); |
58 | 59 | ||
60 | struct raw_sock { | ||
61 | /* inet_sock has to be the first member */ | ||
62 | struct inet_sock inet; | ||
63 | struct icmp_filter filter; | ||
64 | u32 ipmr_table; | ||
65 | }; | ||
66 | |||
67 | static inline struct raw_sock *raw_sk(const struct sock *sk) | ||
68 | { | ||
69 | return (struct raw_sock *)sk; | ||
70 | } | ||
71 | |||
59 | #endif /* _RAW_H */ | 72 | #endif /* _RAW_H */ |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 67dc08eaaa45..03ca5d826757 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -73,6 +73,7 @@ struct Qdisc { | |||
73 | struct sk_buff_head q; | 73 | struct sk_buff_head q; |
74 | struct gnet_stats_basic_packed bstats; | 74 | struct gnet_stats_basic_packed bstats; |
75 | struct gnet_stats_queue qstats; | 75 | struct gnet_stats_queue qstats; |
76 | struct rcu_head rcu_head; | ||
76 | }; | 77 | }; |
77 | 78 | ||
78 | struct Qdisc_class_ops { | 79 | struct Qdisc_class_ops { |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 78740ec57d5d..59151557406c 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -268,7 +268,7 @@ enum { | |||
268 | #define SCTP_MIB_MAX __SCTP_MIB_MAX | 268 | #define SCTP_MIB_MAX __SCTP_MIB_MAX |
269 | struct sctp_mib { | 269 | struct sctp_mib { |
270 | unsigned long mibs[SCTP_MIB_MAX]; | 270 | unsigned long mibs[SCTP_MIB_MAX]; |
271 | } __SNMP_MIB_ALIGN__; | 271 | }; |
272 | 272 | ||
273 | 273 | ||
274 | /* Print debugging messages. */ | 274 | /* Print debugging messages. */ |
diff --git a/include/net/snmp.h b/include/net/snmp.h index 692ee0061dc4..884fdbb74b23 100644 --- a/include/net/snmp.h +++ b/include/net/snmp.h | |||
@@ -52,26 +52,11 @@ struct snmp_mib { | |||
52 | * count on the 20Gb/s + networks people expect in a few years time! | 52 | * count on the 20Gb/s + networks people expect in a few years time! |
53 | */ | 53 | */ |
54 | 54 | ||
55 | /* | ||
56 | * The rule for padding: | ||
57 | * Best is power of two because then the right structure can be found by a | ||
58 | * simple shift. The structure should be always cache line aligned. | ||
59 | * gcc needs n=alignto(cachelinesize, popcnt(sizeof(bla_mib))) shift/add | ||
60 | * instructions to emulate multiply in case it is not power-of-two. | ||
61 | * Currently n is always <=3 for all sizes so simple cache line alignment | ||
62 | * is enough. | ||
63 | * | ||
64 | * The best solution would be a global CPU local area , especially on 64 | ||
65 | * and 128byte cacheline machine it makes a *lot* of sense -AK | ||
66 | */ | ||
67 | |||
68 | #define __SNMP_MIB_ALIGN__ ____cacheline_aligned | ||
69 | |||
70 | /* IPstats */ | 55 | /* IPstats */ |
71 | #define IPSTATS_MIB_MAX __IPSTATS_MIB_MAX | 56 | #define IPSTATS_MIB_MAX __IPSTATS_MIB_MAX |
72 | struct ipstats_mib { | 57 | struct ipstats_mib { |
73 | unsigned long mibs[IPSTATS_MIB_MAX]; | 58 | unsigned long mibs[IPSTATS_MIB_MAX]; |
74 | } __SNMP_MIB_ALIGN__; | 59 | }; |
75 | 60 | ||
76 | /* ICMP */ | 61 | /* ICMP */ |
77 | #define ICMP_MIB_DUMMY __ICMP_MIB_MAX | 62 | #define ICMP_MIB_DUMMY __ICMP_MIB_MAX |
@@ -79,36 +64,36 @@ struct ipstats_mib { | |||
79 | 64 | ||
80 | struct icmp_mib { | 65 | struct icmp_mib { |
81 | unsigned long mibs[ICMP_MIB_MAX]; | 66 | unsigned long mibs[ICMP_MIB_MAX]; |
82 | } __SNMP_MIB_ALIGN__; | 67 | }; |
83 | 68 | ||
84 | #define ICMPMSG_MIB_MAX __ICMPMSG_MIB_MAX | 69 | #define ICMPMSG_MIB_MAX __ICMPMSG_MIB_MAX |
85 | struct icmpmsg_mib { | 70 | struct icmpmsg_mib { |
86 | unsigned long mibs[ICMPMSG_MIB_MAX]; | 71 | unsigned long mibs[ICMPMSG_MIB_MAX]; |
87 | } __SNMP_MIB_ALIGN__; | 72 | }; |
88 | 73 | ||
89 | /* ICMP6 (IPv6-ICMP) */ | 74 | /* ICMP6 (IPv6-ICMP) */ |
90 | #define ICMP6_MIB_MAX __ICMP6_MIB_MAX | 75 | #define ICMP6_MIB_MAX __ICMP6_MIB_MAX |
91 | struct icmpv6_mib { | 76 | struct icmpv6_mib { |
92 | unsigned long mibs[ICMP6_MIB_MAX]; | 77 | unsigned long mibs[ICMP6_MIB_MAX]; |
93 | } __SNMP_MIB_ALIGN__; | 78 | }; |
94 | 79 | ||
95 | #define ICMP6MSG_MIB_MAX __ICMP6MSG_MIB_MAX | 80 | #define ICMP6MSG_MIB_MAX __ICMP6MSG_MIB_MAX |
96 | struct icmpv6msg_mib { | 81 | struct icmpv6msg_mib { |
97 | unsigned long mibs[ICMP6MSG_MIB_MAX]; | 82 | unsigned long mibs[ICMP6MSG_MIB_MAX]; |
98 | } __SNMP_MIB_ALIGN__; | 83 | }; |
99 | 84 | ||
100 | 85 | ||
101 | /* TCP */ | 86 | /* TCP */ |
102 | #define TCP_MIB_MAX __TCP_MIB_MAX | 87 | #define TCP_MIB_MAX __TCP_MIB_MAX |
103 | struct tcp_mib { | 88 | struct tcp_mib { |
104 | unsigned long mibs[TCP_MIB_MAX]; | 89 | unsigned long mibs[TCP_MIB_MAX]; |
105 | } __SNMP_MIB_ALIGN__; | 90 | }; |
106 | 91 | ||
107 | /* UDP */ | 92 | /* UDP */ |
108 | #define UDP_MIB_MAX __UDP_MIB_MAX | 93 | #define UDP_MIB_MAX __UDP_MIB_MAX |
109 | struct udp_mib { | 94 | struct udp_mib { |
110 | unsigned long mibs[UDP_MIB_MAX]; | 95 | unsigned long mibs[UDP_MIB_MAX]; |
111 | } __SNMP_MIB_ALIGN__; | 96 | }; |
112 | 97 | ||
113 | /* Linux */ | 98 | /* Linux */ |
114 | #define LINUX_MIB_MAX __LINUX_MIB_MAX | 99 | #define LINUX_MIB_MAX __LINUX_MIB_MAX |
diff --git a/include/net/sock.h b/include/net/sock.h index 092b0551e77f..56df440a950b 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/skbuff.h> /* struct sk_buff */ | 51 | #include <linux/skbuff.h> /* struct sk_buff */ |
52 | #include <linux/mm.h> | 52 | #include <linux/mm.h> |
53 | #include <linux/security.h> | 53 | #include <linux/security.h> |
54 | #include <linux/slab.h> | ||
54 | 55 | ||
55 | #include <linux/filter.h> | 56 | #include <linux/filter.h> |
56 | #include <linux/rculist_nulls.h> | 57 | #include <linux/rculist_nulls.h> |
@@ -261,7 +262,7 @@ struct sock { | |||
261 | #ifdef CONFIG_XFRM | 262 | #ifdef CONFIG_XFRM |
262 | struct xfrm_policy *sk_policy[2]; | 263 | struct xfrm_policy *sk_policy[2]; |
263 | #endif | 264 | #endif |
264 | rwlock_t sk_dst_lock; | 265 | spinlock_t sk_dst_lock; |
265 | atomic_t sk_rmem_alloc; | 266 | atomic_t sk_rmem_alloc; |
266 | atomic_t sk_wmem_alloc; | 267 | atomic_t sk_wmem_alloc; |
267 | atomic_t sk_omem_alloc; | 268 | atomic_t sk_omem_alloc; |
@@ -1191,7 +1192,8 @@ extern unsigned long sock_i_ino(struct sock *sk); | |||
1191 | static inline struct dst_entry * | 1192 | static inline struct dst_entry * |
1192 | __sk_dst_get(struct sock *sk) | 1193 | __sk_dst_get(struct sock *sk) |
1193 | { | 1194 | { |
1194 | return sk->sk_dst_cache; | 1195 | return rcu_dereference_check(sk->sk_dst_cache, rcu_read_lock_held() || |
1196 | sock_owned_by_user(sk)); | ||
1195 | } | 1197 | } |
1196 | 1198 | ||
1197 | static inline struct dst_entry * | 1199 | static inline struct dst_entry * |
@@ -1199,50 +1201,62 @@ sk_dst_get(struct sock *sk) | |||
1199 | { | 1201 | { |
1200 | struct dst_entry *dst; | 1202 | struct dst_entry *dst; |
1201 | 1203 | ||
1202 | read_lock(&sk->sk_dst_lock); | 1204 | rcu_read_lock(); |
1203 | dst = sk->sk_dst_cache; | 1205 | dst = rcu_dereference(sk->sk_dst_cache); |
1204 | if (dst) | 1206 | if (dst) |
1205 | dst_hold(dst); | 1207 | dst_hold(dst); |
1206 | read_unlock(&sk->sk_dst_lock); | 1208 | rcu_read_unlock(); |
1207 | return dst; | 1209 | return dst; |
1208 | } | 1210 | } |
1209 | 1211 | ||
1212 | extern void sk_reset_txq(struct sock *sk); | ||
1213 | |||
1214 | static inline void dst_negative_advice(struct sock *sk) | ||
1215 | { | ||
1216 | struct dst_entry *ndst, *dst = __sk_dst_get(sk); | ||
1217 | |||
1218 | if (dst && dst->ops->negative_advice) { | ||
1219 | ndst = dst->ops->negative_advice(dst); | ||
1220 | |||
1221 | if (ndst != dst) { | ||
1222 | rcu_assign_pointer(sk->sk_dst_cache, ndst); | ||
1223 | sk_reset_txq(sk); | ||
1224 | } | ||
1225 | } | ||
1226 | } | ||
1227 | |||
1210 | static inline void | 1228 | static inline void |
1211 | __sk_dst_set(struct sock *sk, struct dst_entry *dst) | 1229 | __sk_dst_set(struct sock *sk, struct dst_entry *dst) |
1212 | { | 1230 | { |
1213 | struct dst_entry *old_dst; | 1231 | struct dst_entry *old_dst; |
1214 | 1232 | ||
1215 | sk_tx_queue_clear(sk); | 1233 | sk_tx_queue_clear(sk); |
1216 | old_dst = sk->sk_dst_cache; | 1234 | old_dst = rcu_dereference_check(sk->sk_dst_cache, |
1217 | sk->sk_dst_cache = dst; | 1235 | lockdep_is_held(&sk->sk_dst_lock)); |
1236 | rcu_assign_pointer(sk->sk_dst_cache, dst); | ||
1218 | dst_release(old_dst); | 1237 | dst_release(old_dst); |
1219 | } | 1238 | } |
1220 | 1239 | ||
1221 | static inline void | 1240 | static inline void |
1222 | sk_dst_set(struct sock *sk, struct dst_entry *dst) | 1241 | sk_dst_set(struct sock *sk, struct dst_entry *dst) |
1223 | { | 1242 | { |
1224 | write_lock(&sk->sk_dst_lock); | 1243 | spin_lock(&sk->sk_dst_lock); |
1225 | __sk_dst_set(sk, dst); | 1244 | __sk_dst_set(sk, dst); |
1226 | write_unlock(&sk->sk_dst_lock); | 1245 | spin_unlock(&sk->sk_dst_lock); |
1227 | } | 1246 | } |
1228 | 1247 | ||
1229 | static inline void | 1248 | static inline void |
1230 | __sk_dst_reset(struct sock *sk) | 1249 | __sk_dst_reset(struct sock *sk) |
1231 | { | 1250 | { |
1232 | struct dst_entry *old_dst; | 1251 | __sk_dst_set(sk, NULL); |
1233 | |||
1234 | sk_tx_queue_clear(sk); | ||
1235 | old_dst = sk->sk_dst_cache; | ||
1236 | sk->sk_dst_cache = NULL; | ||
1237 | dst_release(old_dst); | ||
1238 | } | 1252 | } |
1239 | 1253 | ||
1240 | static inline void | 1254 | static inline void |
1241 | sk_dst_reset(struct sock *sk) | 1255 | sk_dst_reset(struct sock *sk) |
1242 | { | 1256 | { |
1243 | write_lock(&sk->sk_dst_lock); | 1257 | spin_lock(&sk->sk_dst_lock); |
1244 | __sk_dst_reset(sk); | 1258 | __sk_dst_reset(sk); |
1245 | write_unlock(&sk->sk_dst_lock); | 1259 | spin_unlock(&sk->sk_dst_lock); |
1246 | } | 1260 | } |
1247 | 1261 | ||
1248 | extern struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie); | 1262 | extern struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie); |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 75be5a28815d..70c5159f4b36 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -423,7 +423,7 @@ extern u8 *tcp_parse_md5sig_option(struct tcphdr *th); | |||
423 | * TCP v4 functions exported for the inet6 API | 423 | * TCP v4 functions exported for the inet6 API |
424 | */ | 424 | */ |
425 | 425 | ||
426 | extern void tcp_v4_send_check(struct sock *sk, int len, | 426 | extern void tcp_v4_send_check(struct sock *sk, |
427 | struct sk_buff *skb); | 427 | struct sk_buff *skb); |
428 | 428 | ||
429 | extern int tcp_v4_conn_request(struct sock *sk, | 429 | extern int tcp_v4_conn_request(struct sock *sk, |
diff --git a/include/net/x25.h b/include/net/x25.h index 9baa07dc7d17..468551ea4f1d 100644 --- a/include/net/x25.h +++ b/include/net/x25.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #ifndef _X25_H | 10 | #ifndef _X25_H |
11 | #define _X25_H | 11 | #define _X25_H |
12 | #include <linux/x25.h> | 12 | #include <linux/x25.h> |
13 | #include <linux/slab.h> | ||
13 | #include <net/sock.h> | 14 | #include <net/sock.h> |
14 | 15 | ||
15 | #define X25_ADDR_LEN 16 | 16 | #define X25_ADDR_LEN 16 |
@@ -182,6 +183,10 @@ extern int sysctl_x25_clear_request_timeout; | |||
182 | extern int sysctl_x25_ack_holdback_timeout; | 183 | extern int sysctl_x25_ack_holdback_timeout; |
183 | extern int sysctl_x25_forward; | 184 | extern int sysctl_x25_forward; |
184 | 185 | ||
186 | extern int x25_parse_address_block(struct sk_buff *skb, | ||
187 | struct x25_address *called_addr, | ||
188 | struct x25_address *calling_addr); | ||
189 | |||
185 | extern int x25_addr_ntoa(unsigned char *, struct x25_address *, | 190 | extern int x25_addr_ntoa(unsigned char *, struct x25_address *, |
186 | struct x25_address *); | 191 | struct x25_address *); |
187 | extern int x25_addr_aton(unsigned char *, struct x25_address *, | 192 | extern int x25_addr_aton(unsigned char *, struct x25_address *, |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index d74e080ba6c9..1913af67c43d 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/in6.h> | 12 | #include <linux/in6.h> |
13 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
14 | #include <linux/audit.h> | 14 | #include <linux/audit.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <net/sock.h> | 17 | #include <net/sock.h> |
17 | #include <net/dst.h> | 18 | #include <net/dst.h> |
@@ -19,6 +20,7 @@ | |||
19 | #include <net/route.h> | 20 | #include <net/route.h> |
20 | #include <net/ipv6.h> | 21 | #include <net/ipv6.h> |
21 | #include <net/ip6_fib.h> | 22 | #include <net/ip6_fib.h> |
23 | #include <net/flow.h> | ||
22 | 24 | ||
23 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
24 | 26 | ||
@@ -266,7 +268,6 @@ struct xfrm_policy_afinfo { | |||
266 | xfrm_address_t *saddr, | 268 | xfrm_address_t *saddr, |
267 | xfrm_address_t *daddr); | 269 | xfrm_address_t *daddr); |
268 | int (*get_saddr)(struct net *net, xfrm_address_t *saddr, xfrm_address_t *daddr); | 270 | int (*get_saddr)(struct net *net, xfrm_address_t *saddr, xfrm_address_t *daddr); |
269 | struct dst_entry *(*find_bundle)(struct flowi *fl, struct xfrm_policy *policy); | ||
270 | void (*decode_session)(struct sk_buff *skb, | 271 | void (*decode_session)(struct sk_buff *skb, |
271 | struct flowi *fl, | 272 | struct flowi *fl, |
272 | int reverse); | 273 | int reverse); |
@@ -481,13 +482,14 @@ struct xfrm_policy { | |||
481 | atomic_t refcnt; | 482 | atomic_t refcnt; |
482 | struct timer_list timer; | 483 | struct timer_list timer; |
483 | 484 | ||
485 | struct flow_cache_object flo; | ||
486 | atomic_t genid; | ||
484 | u32 priority; | 487 | u32 priority; |
485 | u32 index; | 488 | u32 index; |
486 | struct xfrm_mark mark; | 489 | struct xfrm_mark mark; |
487 | struct xfrm_selector selector; | 490 | struct xfrm_selector selector; |
488 | struct xfrm_lifetime_cfg lft; | 491 | struct xfrm_lifetime_cfg lft; |
489 | struct xfrm_lifetime_cur curlft; | 492 | struct xfrm_lifetime_cur curlft; |
490 | struct dst_entry *bundles; | ||
491 | struct xfrm_policy_walk_entry walk; | 493 | struct xfrm_policy_walk_entry walk; |
492 | u8 type; | 494 | u8 type; |
493 | u8 action; | 495 | u8 action; |
@@ -734,19 +736,12 @@ static inline void xfrm_pol_put(struct xfrm_policy *policy) | |||
734 | xfrm_policy_destroy(policy); | 736 | xfrm_policy_destroy(policy); |
735 | } | 737 | } |
736 | 738 | ||
737 | #ifdef CONFIG_XFRM_SUB_POLICY | ||
738 | static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols) | 739 | static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols) |
739 | { | 740 | { |
740 | int i; | 741 | int i; |
741 | for (i = npols - 1; i >= 0; --i) | 742 | for (i = npols - 1; i >= 0; --i) |
742 | xfrm_pol_put(pols[i]); | 743 | xfrm_pol_put(pols[i]); |
743 | } | 744 | } |
744 | #else | ||
745 | static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols) | ||
746 | { | ||
747 | xfrm_pol_put(pols[0]); | ||
748 | } | ||
749 | #endif | ||
750 | 745 | ||
751 | extern void __xfrm_state_destroy(struct xfrm_state *); | 746 | extern void __xfrm_state_destroy(struct xfrm_state *); |
752 | 747 | ||
@@ -877,11 +872,15 @@ struct xfrm_dst { | |||
877 | struct rt6_info rt6; | 872 | struct rt6_info rt6; |
878 | } u; | 873 | } u; |
879 | struct dst_entry *route; | 874 | struct dst_entry *route; |
875 | struct flow_cache_object flo; | ||
876 | struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX]; | ||
877 | int num_pols, num_xfrms; | ||
880 | #ifdef CONFIG_XFRM_SUB_POLICY | 878 | #ifdef CONFIG_XFRM_SUB_POLICY |
881 | struct flowi *origin; | 879 | struct flowi *origin; |
882 | struct xfrm_selector *partner; | 880 | struct xfrm_selector *partner; |
883 | #endif | 881 | #endif |
884 | u32 genid; | 882 | u32 xfrm_genid; |
883 | u32 policy_genid; | ||
885 | u32 route_mtu_cached; | 884 | u32 route_mtu_cached; |
886 | u32 child_mtu_cached; | 885 | u32 child_mtu_cached; |
887 | u32 route_cookie; | 886 | u32 route_cookie; |
@@ -891,6 +890,7 @@ struct xfrm_dst { | |||
891 | #ifdef CONFIG_XFRM | 890 | #ifdef CONFIG_XFRM |
892 | static inline void xfrm_dst_destroy(struct xfrm_dst *xdst) | 891 | static inline void xfrm_dst_destroy(struct xfrm_dst *xdst) |
893 | { | 892 | { |
893 | xfrm_pols_put(xdst->pols, xdst->num_pols); | ||
894 | dst_release(xdst->route); | 894 | dst_release(xdst->route); |
895 | if (likely(xdst->u.dst.xfrm)) | 895 | if (likely(xdst->u.dst.xfrm)) |
896 | xfrm_state_put(xdst->u.dst.xfrm); | 896 | xfrm_state_put(xdst->u.dst.xfrm); |
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 32896a773910..2e488b60bc76 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h | |||
@@ -277,12 +277,6 @@ extern struct pccard_resource_ops pccard_nonstatic_ops; | |||
277 | #endif | 277 | #endif |
278 | 278 | ||
279 | 279 | ||
280 | /* socket drivers are expected to use these callbacks in their .drv struct */ | ||
281 | extern int pcmcia_socket_dev_suspend(struct device *dev); | ||
282 | extern void pcmcia_socket_dev_early_resume(struct device *dev); | ||
283 | extern void pcmcia_socket_dev_late_resume(struct device *dev); | ||
284 | extern int pcmcia_socket_dev_resume(struct device *dev); | ||
285 | |||
286 | /* socket drivers use this callback in their IRQ handler */ | 280 | /* socket drivers use this callback in their IRQ handler */ |
287 | extern void pcmcia_parse_events(struct pcmcia_socket *socket, | 281 | extern void pcmcia_parse_events(struct pcmcia_socket *socket, |
288 | unsigned int events); | 282 | unsigned int events); |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index ff92b46f5153..ae5196aae1a5 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -338,7 +338,8 @@ struct iscsi_host { | |||
338 | extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, | 338 | extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, |
339 | int reason); | 339 | int reason); |
340 | extern int iscsi_eh_abort(struct scsi_cmnd *sc); | 340 | extern int iscsi_eh_abort(struct scsi_cmnd *sc); |
341 | extern int iscsi_eh_target_reset(struct scsi_cmnd *sc); | 341 | extern int iscsi_eh_recover_target(struct scsi_cmnd *sc); |
342 | extern int iscsi_eh_session_reset(struct scsi_cmnd *sc); | ||
342 | extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); | 343 | extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); |
343 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, | 344 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, |
344 | void (*done)(struct scsi_cmnd *)); | 345 | void (*done)(struct scsi_cmnd *)); |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 9eaa3f05f954..3b586859669c 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <scsi/scsi_cmnd.h> | 36 | #include <scsi/scsi_cmnd.h> |
37 | #include <scsi/scsi_transport_sas.h> | 37 | #include <scsi/scsi_transport_sas.h> |
38 | #include <linux/scatterlist.h> | 38 | #include <linux/scatterlist.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | struct block_device; | 41 | struct block_device; |
41 | 42 | ||
diff --git a/include/sound/ak4113.h b/include/sound/ak4113.h index 8988edae1609..2609048c1d44 100644 --- a/include/sound/ak4113.h +++ b/include/sound/ak4113.h | |||
@@ -307,7 +307,7 @@ struct ak4113 { | |||
307 | 307 | ||
308 | int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read, | 308 | int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read, |
309 | ak4113_write_t *write, | 309 | ak4113_write_t *write, |
310 | const unsigned char pgm[AK4113_WRITABLE_REGS], | 310 | const unsigned char *pgm, |
311 | void *private_data, struct ak4113 **r_ak4113); | 311 | void *private_data, struct ak4113 **r_ak4113); |
312 | void snd_ak4113_reg_write(struct ak4113 *ak4113, unsigned char reg, | 312 | void snd_ak4113_reg_write(struct ak4113 *ak4113, unsigned char reg, |
313 | unsigned char mask, unsigned char val); | 313 | unsigned char mask, unsigned char val); |
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 061f16d4c878..0a0b019d41ad 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
@@ -219,7 +219,6 @@ struct snd_soc_dai { | |||
219 | struct snd_soc_codec *codec; | 219 | struct snd_soc_codec *codec; |
220 | unsigned int active; | 220 | unsigned int active; |
221 | unsigned char pop_wait:1; | 221 | unsigned char pop_wait:1; |
222 | void *dma_data; | ||
223 | 222 | ||
224 | /* DAI private data */ | 223 | /* DAI private data */ |
225 | void *private_data; | 224 | void *private_data; |
@@ -230,4 +229,21 @@ struct snd_soc_dai { | |||
230 | struct list_head list; | 229 | struct list_head list; |
231 | }; | 230 | }; |
232 | 231 | ||
232 | static inline void *snd_soc_dai_get_dma_data(const struct snd_soc_dai *dai, | ||
233 | const struct snd_pcm_substream *ss) | ||
234 | { | ||
235 | return (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) ? | ||
236 | dai->playback.dma_data : dai->capture.dma_data; | ||
237 | } | ||
238 | |||
239 | static inline void snd_soc_dai_set_dma_data(struct snd_soc_dai *dai, | ||
240 | const struct snd_pcm_substream *ss, | ||
241 | void *data) | ||
242 | { | ||
243 | if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) | ||
244 | dai->playback.dma_data = data; | ||
245 | else | ||
246 | dai->capture.dma_data = data; | ||
247 | } | ||
248 | |||
233 | #endif | 249 | #endif |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 5d234a8c2506..a57fbfcd4c8f 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -375,6 +375,7 @@ struct snd_soc_pcm_stream { | |||
375 | unsigned int channels_min; /* min channels */ | 375 | unsigned int channels_min; /* min channels */ |
376 | unsigned int channels_max; /* max channels */ | 376 | unsigned int channels_max; /* max channels */ |
377 | unsigned int active:1; /* stream is in use */ | 377 | unsigned int active:1; /* stream is in use */ |
378 | void *dma_data; /* used by platform code */ | ||
378 | }; | 379 | }; |
379 | 380 | ||
380 | /* SoC audio ops */ | 381 | /* SoC audio ops */ |
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 5fb72733331e..d870a918559c 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -40,6 +40,16 @@ DECLARE_EVENT_CLASS(block_rq_with_error, | |||
40 | __entry->nr_sector, __entry->errors) | 40 | __entry->nr_sector, __entry->errors) |
41 | ); | 41 | ); |
42 | 42 | ||
43 | /** | ||
44 | * block_rq_abort - abort block operation request | ||
45 | * @q: queue containing the block operation request | ||
46 | * @rq: block IO operation request | ||
47 | * | ||
48 | * Called immediately after pending block IO operation request @rq in | ||
49 | * queue @q is aborted. The fields in the operation request @rq | ||
50 | * can be examined to determine which device and sectors the pending | ||
51 | * operation would access. | ||
52 | */ | ||
43 | DEFINE_EVENT(block_rq_with_error, block_rq_abort, | 53 | DEFINE_EVENT(block_rq_with_error, block_rq_abort, |
44 | 54 | ||
45 | TP_PROTO(struct request_queue *q, struct request *rq), | 55 | TP_PROTO(struct request_queue *q, struct request *rq), |
@@ -47,6 +57,15 @@ DEFINE_EVENT(block_rq_with_error, block_rq_abort, | |||
47 | TP_ARGS(q, rq) | 57 | TP_ARGS(q, rq) |
48 | ); | 58 | ); |
49 | 59 | ||
60 | /** | ||
61 | * block_rq_requeue - place block IO request back on a queue | ||
62 | * @q: queue holding operation | ||
63 | * @rq: block IO operation request | ||
64 | * | ||
65 | * The block operation request @rq is being placed back into queue | ||
66 | * @q. For some reason the request was not completed and needs to be | ||
67 | * put back in the queue. | ||
68 | */ | ||
50 | DEFINE_EVENT(block_rq_with_error, block_rq_requeue, | 69 | DEFINE_EVENT(block_rq_with_error, block_rq_requeue, |
51 | 70 | ||
52 | TP_PROTO(struct request_queue *q, struct request *rq), | 71 | TP_PROTO(struct request_queue *q, struct request *rq), |
@@ -54,6 +73,17 @@ DEFINE_EVENT(block_rq_with_error, block_rq_requeue, | |||
54 | TP_ARGS(q, rq) | 73 | TP_ARGS(q, rq) |
55 | ); | 74 | ); |
56 | 75 | ||
76 | /** | ||
77 | * block_rq_complete - block IO operation completed by device driver | ||
78 | * @q: queue containing the block operation request | ||
79 | * @rq: block operations request | ||
80 | * | ||
81 | * The block_rq_complete tracepoint event indicates that some portion | ||
82 | * of operation request has been completed by the device driver. If | ||
83 | * the @rq->bio is %NULL, then there is absolutely no additional work to | ||
84 | * do for the request. If @rq->bio is non-NULL then there is | ||
85 | * additional work required to complete the request. | ||
86 | */ | ||
57 | DEFINE_EVENT(block_rq_with_error, block_rq_complete, | 87 | DEFINE_EVENT(block_rq_with_error, block_rq_complete, |
58 | 88 | ||
59 | TP_PROTO(struct request_queue *q, struct request *rq), | 89 | TP_PROTO(struct request_queue *q, struct request *rq), |
@@ -95,6 +125,16 @@ DECLARE_EVENT_CLASS(block_rq, | |||
95 | __entry->nr_sector, __entry->comm) | 125 | __entry->nr_sector, __entry->comm) |
96 | ); | 126 | ); |
97 | 127 | ||
128 | /** | ||
129 | * block_rq_insert - insert block operation request into queue | ||
130 | * @q: target queue | ||
131 | * @rq: block IO operation request | ||
132 | * | ||
133 | * Called immediately before block operation request @rq is inserted | ||
134 | * into queue @q. The fields in the operation request @rq struct can | ||
135 | * be examined to determine which device and sectors the pending | ||
136 | * operation would access. | ||
137 | */ | ||
98 | DEFINE_EVENT(block_rq, block_rq_insert, | 138 | DEFINE_EVENT(block_rq, block_rq_insert, |
99 | 139 | ||
100 | TP_PROTO(struct request_queue *q, struct request *rq), | 140 | TP_PROTO(struct request_queue *q, struct request *rq), |
@@ -102,6 +142,14 @@ DEFINE_EVENT(block_rq, block_rq_insert, | |||
102 | TP_ARGS(q, rq) | 142 | TP_ARGS(q, rq) |
103 | ); | 143 | ); |
104 | 144 | ||
145 | /** | ||
146 | * block_rq_issue - issue pending block IO request operation to device driver | ||
147 | * @q: queue holding operation | ||
148 | * @rq: block IO operation operation request | ||
149 | * | ||
150 | * Called when block operation request @rq from queue @q is sent to a | ||
151 | * device driver for processing. | ||
152 | */ | ||
105 | DEFINE_EVENT(block_rq, block_rq_issue, | 153 | DEFINE_EVENT(block_rq, block_rq_issue, |
106 | 154 | ||
107 | TP_PROTO(struct request_queue *q, struct request *rq), | 155 | TP_PROTO(struct request_queue *q, struct request *rq), |
@@ -109,6 +157,17 @@ DEFINE_EVENT(block_rq, block_rq_issue, | |||
109 | TP_ARGS(q, rq) | 157 | TP_ARGS(q, rq) |
110 | ); | 158 | ); |
111 | 159 | ||
160 | /** | ||
161 | * block_bio_bounce - used bounce buffer when processing block operation | ||
162 | * @q: queue holding the block operation | ||
163 | * @bio: block operation | ||
164 | * | ||
165 | * A bounce buffer was used to handle the block operation @bio in @q. | ||
166 | * This occurs when hardware limitations prevent a direct transfer of | ||
167 | * data between the @bio data memory area and the IO device. Use of a | ||
168 | * bounce buffer requires extra copying of data and decreases | ||
169 | * performance. | ||
170 | */ | ||
112 | TRACE_EVENT(block_bio_bounce, | 171 | TRACE_EVENT(block_bio_bounce, |
113 | 172 | ||
114 | TP_PROTO(struct request_queue *q, struct bio *bio), | 173 | TP_PROTO(struct request_queue *q, struct bio *bio), |
@@ -138,6 +197,14 @@ TRACE_EVENT(block_bio_bounce, | |||
138 | __entry->nr_sector, __entry->comm) | 197 | __entry->nr_sector, __entry->comm) |
139 | ); | 198 | ); |
140 | 199 | ||
200 | /** | ||
201 | * block_bio_complete - completed all work on the block operation | ||
202 | * @q: queue holding the block operation | ||
203 | * @bio: block operation completed | ||
204 | * | ||
205 | * This tracepoint indicates there is no further work to do on this | ||
206 | * block IO operation @bio. | ||
207 | */ | ||
141 | TRACE_EVENT(block_bio_complete, | 208 | TRACE_EVENT(block_bio_complete, |
142 | 209 | ||
143 | TP_PROTO(struct request_queue *q, struct bio *bio), | 210 | TP_PROTO(struct request_queue *q, struct bio *bio), |
@@ -193,6 +260,14 @@ DECLARE_EVENT_CLASS(block_bio, | |||
193 | __entry->nr_sector, __entry->comm) | 260 | __entry->nr_sector, __entry->comm) |
194 | ); | 261 | ); |
195 | 262 | ||
263 | /** | ||
264 | * block_bio_backmerge - merging block operation to the end of an existing operation | ||
265 | * @q: queue holding operation | ||
266 | * @bio: new block operation to merge | ||
267 | * | ||
268 | * Merging block request @bio to the end of an existing block request | ||
269 | * in queue @q. | ||
270 | */ | ||
196 | DEFINE_EVENT(block_bio, block_bio_backmerge, | 271 | DEFINE_EVENT(block_bio, block_bio_backmerge, |
197 | 272 | ||
198 | TP_PROTO(struct request_queue *q, struct bio *bio), | 273 | TP_PROTO(struct request_queue *q, struct bio *bio), |
@@ -200,6 +275,14 @@ DEFINE_EVENT(block_bio, block_bio_backmerge, | |||
200 | TP_ARGS(q, bio) | 275 | TP_ARGS(q, bio) |
201 | ); | 276 | ); |
202 | 277 | ||
278 | /** | ||
279 | * block_bio_frontmerge - merging block operation to the beginning of an existing operation | ||
280 | * @q: queue holding operation | ||
281 | * @bio: new block operation to merge | ||
282 | * | ||
283 | * Merging block IO operation @bio to the beginning of an existing block | ||
284 | * operation in queue @q. | ||
285 | */ | ||
203 | DEFINE_EVENT(block_bio, block_bio_frontmerge, | 286 | DEFINE_EVENT(block_bio, block_bio_frontmerge, |
204 | 287 | ||
205 | TP_PROTO(struct request_queue *q, struct bio *bio), | 288 | TP_PROTO(struct request_queue *q, struct bio *bio), |
@@ -207,6 +290,13 @@ DEFINE_EVENT(block_bio, block_bio_frontmerge, | |||
207 | TP_ARGS(q, bio) | 290 | TP_ARGS(q, bio) |
208 | ); | 291 | ); |
209 | 292 | ||
293 | /** | ||
294 | * block_bio_queue - putting new block IO operation in queue | ||
295 | * @q: queue holding operation | ||
296 | * @bio: new block operation | ||
297 | * | ||
298 | * About to place the block IO operation @bio into queue @q. | ||
299 | */ | ||
210 | DEFINE_EVENT(block_bio, block_bio_queue, | 300 | DEFINE_EVENT(block_bio, block_bio_queue, |
211 | 301 | ||
212 | TP_PROTO(struct request_queue *q, struct bio *bio), | 302 | TP_PROTO(struct request_queue *q, struct bio *bio), |
@@ -243,6 +333,15 @@ DECLARE_EVENT_CLASS(block_get_rq, | |||
243 | __entry->nr_sector, __entry->comm) | 333 | __entry->nr_sector, __entry->comm) |
244 | ); | 334 | ); |
245 | 335 | ||
336 | /** | ||
337 | * block_getrq - get a free request entry in queue for block IO operations | ||
338 | * @q: queue for operations | ||
339 | * @bio: pending block IO operation | ||
340 | * @rw: low bit indicates a read (%0) or a write (%1) | ||
341 | * | ||
342 | * A request struct for queue @q has been allocated to handle the | ||
343 | * block IO operation @bio. | ||
344 | */ | ||
246 | DEFINE_EVENT(block_get_rq, block_getrq, | 345 | DEFINE_EVENT(block_get_rq, block_getrq, |
247 | 346 | ||
248 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), | 347 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), |
@@ -250,6 +349,17 @@ DEFINE_EVENT(block_get_rq, block_getrq, | |||
250 | TP_ARGS(q, bio, rw) | 349 | TP_ARGS(q, bio, rw) |
251 | ); | 350 | ); |
252 | 351 | ||
352 | /** | ||
353 | * block_sleeprq - waiting to get a free request entry in queue for block IO operation | ||
354 | * @q: queue for operation | ||
355 | * @bio: pending block IO operation | ||
356 | * @rw: low bit indicates a read (%0) or a write (%1) | ||
357 | * | ||
358 | * In the case where a request struct cannot be provided for queue @q | ||
359 | * the process needs to wait for an request struct to become | ||
360 | * available. This tracepoint event is generated each time the | ||
361 | * process goes to sleep waiting for request struct become available. | ||
362 | */ | ||
253 | DEFINE_EVENT(block_get_rq, block_sleeprq, | 363 | DEFINE_EVENT(block_get_rq, block_sleeprq, |
254 | 364 | ||
255 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), | 365 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), |
@@ -257,6 +367,14 @@ DEFINE_EVENT(block_get_rq, block_sleeprq, | |||
257 | TP_ARGS(q, bio, rw) | 367 | TP_ARGS(q, bio, rw) |
258 | ); | 368 | ); |
259 | 369 | ||
370 | /** | ||
371 | * block_plug - keep operations requests in request queue | ||
372 | * @q: request queue to plug | ||
373 | * | ||
374 | * Plug the request queue @q. Do not allow block operation requests | ||
375 | * to be sent to the device driver. Instead, accumulate requests in | ||
376 | * the queue to improve throughput performance of the block device. | ||
377 | */ | ||
260 | TRACE_EVENT(block_plug, | 378 | TRACE_EVENT(block_plug, |
261 | 379 | ||
262 | TP_PROTO(struct request_queue *q), | 380 | TP_PROTO(struct request_queue *q), |
@@ -293,6 +411,13 @@ DECLARE_EVENT_CLASS(block_unplug, | |||
293 | TP_printk("[%s] %d", __entry->comm, __entry->nr_rq) | 411 | TP_printk("[%s] %d", __entry->comm, __entry->nr_rq) |
294 | ); | 412 | ); |
295 | 413 | ||
414 | /** | ||
415 | * block_unplug_timer - timed release of operations requests in queue to device driver | ||
416 | * @q: request queue to unplug | ||
417 | * | ||
418 | * Unplug the request queue @q because a timer expired and allow block | ||
419 | * operation requests to be sent to the device driver. | ||
420 | */ | ||
296 | DEFINE_EVENT(block_unplug, block_unplug_timer, | 421 | DEFINE_EVENT(block_unplug, block_unplug_timer, |
297 | 422 | ||
298 | TP_PROTO(struct request_queue *q), | 423 | TP_PROTO(struct request_queue *q), |
@@ -300,6 +425,13 @@ DEFINE_EVENT(block_unplug, block_unplug_timer, | |||
300 | TP_ARGS(q) | 425 | TP_ARGS(q) |
301 | ); | 426 | ); |
302 | 427 | ||
428 | /** | ||
429 | * block_unplug_io - release of operations requests in request queue | ||
430 | * @q: request queue to unplug | ||
431 | * | ||
432 | * Unplug request queue @q because device driver is scheduled to work | ||
433 | * on elements in the request queue. | ||
434 | */ | ||
303 | DEFINE_EVENT(block_unplug, block_unplug_io, | 435 | DEFINE_EVENT(block_unplug, block_unplug_io, |
304 | 436 | ||
305 | TP_PROTO(struct request_queue *q), | 437 | TP_PROTO(struct request_queue *q), |
@@ -307,6 +439,17 @@ DEFINE_EVENT(block_unplug, block_unplug_io, | |||
307 | TP_ARGS(q) | 439 | TP_ARGS(q) |
308 | ); | 440 | ); |
309 | 441 | ||
442 | /** | ||
443 | * block_split - split a single bio struct into two bio structs | ||
444 | * @q: queue containing the bio | ||
445 | * @bio: block operation being split | ||
446 | * @new_sector: The starting sector for the new bio | ||
447 | * | ||
448 | * The bio request @bio in request queue @q needs to be split into two | ||
449 | * bio requests. The newly created @bio request starts at | ||
450 | * @new_sector. This split may be required due to hardware limitation | ||
451 | * such as operation crossing device boundaries in a RAID system. | ||
452 | */ | ||
310 | TRACE_EVENT(block_split, | 453 | TRACE_EVENT(block_split, |
311 | 454 | ||
312 | TP_PROTO(struct request_queue *q, struct bio *bio, | 455 | TP_PROTO(struct request_queue *q, struct bio *bio, |
@@ -337,6 +480,16 @@ TRACE_EVENT(block_split, | |||
337 | __entry->comm) | 480 | __entry->comm) |
338 | ); | 481 | ); |
339 | 482 | ||
483 | /** | ||
484 | * block_remap - map request for a partition to the raw device | ||
485 | * @q: queue holding the operation | ||
486 | * @bio: revised operation | ||
487 | * @dev: device for the operation | ||
488 | * @from: original sector for the operation | ||
489 | * | ||
490 | * An operation for a partition on a block device has been mapped to the | ||
491 | * raw block device. | ||
492 | */ | ||
340 | TRACE_EVENT(block_remap, | 493 | TRACE_EVENT(block_remap, |
341 | 494 | ||
342 | TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev, | 495 | TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev, |
@@ -370,6 +523,17 @@ TRACE_EVENT(block_remap, | |||
370 | (unsigned long long)__entry->old_sector) | 523 | (unsigned long long)__entry->old_sector) |
371 | ); | 524 | ); |
372 | 525 | ||
526 | /** | ||
527 | * block_rq_remap - map request for a block operation request | ||
528 | * @q: queue holding the operation | ||
529 | * @rq: block IO operation request | ||
530 | * @dev: device for the operation | ||
531 | * @from: original sector for the operation | ||
532 | * | ||
533 | * The block operation request @rq in @q has been remapped. The block | ||
534 | * operation request @rq holds the current information and @from hold | ||
535 | * the original sector. | ||
536 | */ | ||
373 | TRACE_EVENT(block_rq_remap, | 537 | TRACE_EVENT(block_rq_remap, |
374 | 538 | ||
375 | TP_PROTO(struct request_queue *q, struct request *rq, dev_t dev, | 539 | TP_PROTO(struct request_queue *q, struct request *rq, dev_t dev, |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 601ad7744247..ea6f9d4a20e9 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -401,18 +401,18 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
401 | #undef DEFINE_EVENT | 401 | #undef DEFINE_EVENT |
402 | #define DEFINE_EVENT(template, name, proto, args) \ | 402 | #define DEFINE_EVENT(template, name, proto, args) \ |
403 | \ | 403 | \ |
404 | static void ftrace_profile_##name(proto); \ | 404 | static void perf_trace_##name(proto); \ |
405 | \ | 405 | \ |
406 | static notrace int \ | 406 | static notrace int \ |
407 | ftrace_profile_enable_##name(struct ftrace_event_call *unused) \ | 407 | perf_trace_enable_##name(struct ftrace_event_call *unused) \ |
408 | { \ | 408 | { \ |
409 | return register_trace_##name(ftrace_profile_##name); \ | 409 | return register_trace_##name(perf_trace_##name); \ |
410 | } \ | 410 | } \ |
411 | \ | 411 | \ |
412 | static notrace void \ | 412 | static notrace void \ |
413 | ftrace_profile_disable_##name(struct ftrace_event_call *unused) \ | 413 | perf_trace_disable_##name(struct ftrace_event_call *unused) \ |
414 | { \ | 414 | { \ |
415 | unregister_trace_##name(ftrace_profile_##name); \ | 415 | unregister_trace_##name(perf_trace_##name); \ |
416 | } | 416 | } |
417 | 417 | ||
418 | #undef DEFINE_EVENT_PRINT | 418 | #undef DEFINE_EVENT_PRINT |
@@ -507,12 +507,12 @@ ftrace_profile_disable_##name(struct ftrace_event_call *unused) \ | |||
507 | 507 | ||
508 | #ifdef CONFIG_PERF_EVENTS | 508 | #ifdef CONFIG_PERF_EVENTS |
509 | 509 | ||
510 | #define _TRACE_PROFILE_INIT(call) \ | 510 | #define _TRACE_PERF_INIT(call) \ |
511 | .profile_enable = ftrace_profile_enable_##call, \ | 511 | .perf_event_enable = perf_trace_enable_##call, \ |
512 | .profile_disable = ftrace_profile_disable_##call, | 512 | .perf_event_disable = perf_trace_disable_##call, |
513 | 513 | ||
514 | #else | 514 | #else |
515 | #define _TRACE_PROFILE_INIT(call) | 515 | #define _TRACE_PERF_INIT(call) |
516 | #endif /* CONFIG_PERF_EVENTS */ | 516 | #endif /* CONFIG_PERF_EVENTS */ |
517 | 517 | ||
518 | #undef __entry | 518 | #undef __entry |
@@ -638,7 +638,7 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
638 | .unregfunc = ftrace_raw_unreg_event_##call, \ | 638 | .unregfunc = ftrace_raw_unreg_event_##call, \ |
639 | .print_fmt = print_fmt_##template, \ | 639 | .print_fmt = print_fmt_##template, \ |
640 | .define_fields = ftrace_define_fields_##template, \ | 640 | .define_fields = ftrace_define_fields_##template, \ |
641 | _TRACE_PROFILE_INIT(call) \ | 641 | _TRACE_PERF_INIT(call) \ |
642 | } | 642 | } |
643 | 643 | ||
644 | #undef DEFINE_EVENT_PRINT | 644 | #undef DEFINE_EVENT_PRINT |
@@ -657,18 +657,18 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
657 | .unregfunc = ftrace_raw_unreg_event_##call, \ | 657 | .unregfunc = ftrace_raw_unreg_event_##call, \ |
658 | .print_fmt = print_fmt_##call, \ | 658 | .print_fmt = print_fmt_##call, \ |
659 | .define_fields = ftrace_define_fields_##template, \ | 659 | .define_fields = ftrace_define_fields_##template, \ |
660 | _TRACE_PROFILE_INIT(call) \ | 660 | _TRACE_PERF_INIT(call) \ |
661 | } | 661 | } |
662 | 662 | ||
663 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 663 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
664 | 664 | ||
665 | /* | 665 | /* |
666 | * Define the insertion callback to profile events | 666 | * Define the insertion callback to perf events |
667 | * | 667 | * |
668 | * The job is very similar to ftrace_raw_event_<call> except that we don't | 668 | * The job is very similar to ftrace_raw_event_<call> except that we don't |
669 | * insert in the ring buffer but in a perf counter. | 669 | * insert in the ring buffer but in a perf counter. |
670 | * | 670 | * |
671 | * static void ftrace_profile_<call>(proto) | 671 | * static void ftrace_perf_<call>(proto) |
672 | * { | 672 | * { |
673 | * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; | 673 | * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; |
674 | * struct ftrace_event_call *event_call = &event_<call>; | 674 | * struct ftrace_event_call *event_call = &event_<call>; |
@@ -757,13 +757,14 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
757 | #undef DECLARE_EVENT_CLASS | 757 | #undef DECLARE_EVENT_CLASS |
758 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 758 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
759 | static notrace void \ | 759 | static notrace void \ |
760 | ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \ | 760 | perf_trace_templ_##call(struct ftrace_event_call *event_call, \ |
761 | proto) \ | 761 | proto) \ |
762 | { \ | 762 | { \ |
763 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ | 763 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ |
764 | struct ftrace_raw_##call *entry; \ | 764 | struct ftrace_raw_##call *entry; \ |
765 | u64 __addr = 0, __count = 1; \ | 765 | u64 __addr = 0, __count = 1; \ |
766 | unsigned long irq_flags; \ | 766 | unsigned long irq_flags; \ |
767 | struct pt_regs *__regs; \ | ||
767 | int __entry_size; \ | 768 | int __entry_size; \ |
768 | int __data_size; \ | 769 | int __data_size; \ |
769 | int rctx; \ | 770 | int rctx; \ |
@@ -773,10 +774,10 @@ ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \ | |||
773 | sizeof(u64)); \ | 774 | sizeof(u64)); \ |
774 | __entry_size -= sizeof(u32); \ | 775 | __entry_size -= sizeof(u32); \ |
775 | \ | 776 | \ |
776 | if (WARN_ONCE(__entry_size > FTRACE_MAX_PROFILE_SIZE, \ | 777 | if (WARN_ONCE(__entry_size > PERF_MAX_TRACE_SIZE, \ |
777 | "profile buffer not large enough")) \ | 778 | "profile buffer not large enough")) \ |
778 | return; \ | 779 | return; \ |
779 | entry = (struct ftrace_raw_##call *)ftrace_perf_buf_prepare( \ | 780 | entry = (struct ftrace_raw_##call *)perf_trace_buf_prepare( \ |
780 | __entry_size, event_call->id, &rctx, &irq_flags); \ | 781 | __entry_size, event_call->id, &rctx, &irq_flags); \ |
781 | if (!entry) \ | 782 | if (!entry) \ |
782 | return; \ | 783 | return; \ |
@@ -784,17 +785,20 @@ ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \ | |||
784 | \ | 785 | \ |
785 | { assign; } \ | 786 | { assign; } \ |
786 | \ | 787 | \ |
787 | ftrace_perf_buf_submit(entry, __entry_size, rctx, __addr, \ | 788 | __regs = &__get_cpu_var(perf_trace_regs); \ |
788 | __count, irq_flags); \ | 789 | perf_fetch_caller_regs(__regs, 2); \ |
790 | \ | ||
791 | perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ | ||
792 | __count, irq_flags, __regs); \ | ||
789 | } | 793 | } |
790 | 794 | ||
791 | #undef DEFINE_EVENT | 795 | #undef DEFINE_EVENT |
792 | #define DEFINE_EVENT(template, call, proto, args) \ | 796 | #define DEFINE_EVENT(template, call, proto, args) \ |
793 | static notrace void ftrace_profile_##call(proto) \ | 797 | static notrace void perf_trace_##call(proto) \ |
794 | { \ | 798 | { \ |
795 | struct ftrace_event_call *event_call = &event_##call; \ | 799 | struct ftrace_event_call *event_call = &event_##call; \ |
796 | \ | 800 | \ |
797 | ftrace_profile_templ_##template(event_call, args); \ | 801 | perf_trace_templ_##template(event_call, args); \ |
798 | } | 802 | } |
799 | 803 | ||
800 | #undef DEFINE_EVENT_PRINT | 804 | #undef DEFINE_EVENT_PRINT |
diff --git a/include/trace/syscall.h b/include/trace/syscall.h index 0387100752f0..e5e5f48dbfb3 100644 --- a/include/trace/syscall.h +++ b/include/trace/syscall.h | |||
@@ -47,10 +47,10 @@ enum print_line_t print_syscall_exit(struct trace_iterator *iter, int flags); | |||
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #ifdef CONFIG_PERF_EVENTS | 49 | #ifdef CONFIG_PERF_EVENTS |
50 | int prof_sysenter_enable(struct ftrace_event_call *call); | 50 | int perf_sysenter_enable(struct ftrace_event_call *call); |
51 | void prof_sysenter_disable(struct ftrace_event_call *call); | 51 | void perf_sysenter_disable(struct ftrace_event_call *call); |
52 | int prof_sysexit_enable(struct ftrace_event_call *call); | 52 | int perf_sysexit_enable(struct ftrace_event_call *call); |
53 | void prof_sysexit_disable(struct ftrace_event_call *call); | 53 | void perf_sysexit_disable(struct ftrace_event_call *call); |
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | #endif /* _TRACE_SYSCALL_H */ | 56 | #endif /* _TRACE_SYSCALL_H */ |
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h index b9763badbd77..43e2d7d33976 100644 --- a/include/xen/xenbus.h +++ b/include/xen/xenbus.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/mutex.h> | 39 | #include <linux/mutex.h> |
40 | #include <linux/completion.h> | 40 | #include <linux/completion.h> |
41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
42 | #include <linux/slab.h> | ||
42 | #include <xen/interface/xen.h> | 43 | #include <xen/interface/xen.h> |
43 | #include <xen/interface/grant_table.h> | 44 | #include <xen/interface/grant_table.h> |
44 | #include <xen/interface/io/xenbus.h> | 45 | #include <xen/interface/io/xenbus.h> |