diff options
| author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2009-03-27 11:14:38 -0400 |
|---|---|---|
| committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2009-03-27 11:14:38 -0400 |
| commit | b92efa9abffc4a634cd2e7a0f81f8aa6310d67c9 (patch) | |
| tree | 9847508d9b8d4e585f90db4a453bfbc3700c997e /include/linux | |
| parent | a16fffdd8eb95ebab7dc22414896fe6493951e0e (diff) | |
| parent | be0ea69674ed95e1e98cb3687a241badc756d228 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into avr32-arch
Diffstat (limited to 'include/linux')
311 files changed, 4185 insertions, 1956 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 12e9a2957caf..e9581fd9fb66 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -41,6 +41,7 @@ header-y += baycom.h | |||
| 41 | header-y += bfs_fs.h | 41 | header-y += bfs_fs.h |
| 42 | header-y += blkpg.h | 42 | header-y += blkpg.h |
| 43 | header-y += bpqether.h | 43 | header-y += bpqether.h |
| 44 | header-y += bsg.h | ||
| 44 | header-y += can.h | 45 | header-y += can.h |
| 45 | header-y += cdk.h | 46 | header-y += cdk.h |
| 46 | header-y += chio.h | 47 | header-y += chio.h |
| @@ -51,6 +52,7 @@ header-y += const.h | |||
| 51 | header-y += cgroupstats.h | 52 | header-y += cgroupstats.h |
| 52 | header-y += cramfs_fs.h | 53 | header-y += cramfs_fs.h |
| 53 | header-y += cycx_cfm.h | 54 | header-y += cycx_cfm.h |
| 55 | header-y += dcbnl.h | ||
| 54 | header-y += dlmconstants.h | 56 | header-y += dlmconstants.h |
| 55 | header-y += dlm_device.h | 57 | header-y += dlm_device.h |
| 56 | header-y += dlm_netlink.h | 58 | header-y += dlm_netlink.h |
| @@ -89,7 +91,6 @@ header-y += if_ppp.h | |||
| 89 | header-y += if_slip.h | 91 | header-y += if_slip.h |
| 90 | header-y += if_strip.h | 92 | header-y += if_strip.h |
| 91 | header-y += if_tun.h | 93 | header-y += if_tun.h |
| 92 | header-y += if_tunnel.h | ||
| 93 | header-y += in_route.h | 94 | header-y += in_route.h |
| 94 | header-y += ioctl.h | 95 | header-y += ioctl.h |
| 95 | header-y += ip6_tunnel.h | 96 | header-y += ip6_tunnel.h |
| @@ -114,6 +115,7 @@ header-y += mqueue.h | |||
| 114 | header-y += mtio.h | 115 | header-y += mtio.h |
| 115 | header-y += ncp_no.h | 116 | header-y += ncp_no.h |
| 116 | header-y += neighbour.h | 117 | header-y += neighbour.h |
| 118 | header-y += net_dropmon.h | ||
| 117 | header-y += netfilter_arp.h | 119 | header-y += netfilter_arp.h |
| 118 | header-y += netrom.h | 120 | header-y += netrom.h |
| 119 | header-y += nfs2.h | 121 | header-y += nfs2.h |
| @@ -235,6 +237,7 @@ unifdef-y += if_phonet.h | |||
| 235 | unifdef-y += if_pppol2tp.h | 237 | unifdef-y += if_pppol2tp.h |
| 236 | unifdef-y += if_pppox.h | 238 | unifdef-y += if_pppox.h |
| 237 | unifdef-y += if_tr.h | 239 | unifdef-y += if_tr.h |
| 240 | unifdef-y += if_tunnel.h | ||
| 238 | unifdef-y += if_vlan.h | 241 | unifdef-y += if_vlan.h |
| 239 | unifdef-y += igmp.h | 242 | unifdef-y += igmp.h |
| 240 | unifdef-y += inet_diag.h | 243 | unifdef-y += inet_diag.h |
diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h index 110c600c885f..f6778eceb8f4 100644 --- a/include/linux/agpgart.h +++ b/include/linux/agpgart.h | |||
| @@ -77,20 +77,20 @@ typedef struct _agp_setup { | |||
| 77 | * The "prot" down below needs still a "sleep" flag somehow ... | 77 | * The "prot" down below needs still a "sleep" flag somehow ... |
| 78 | */ | 78 | */ |
| 79 | typedef struct _agp_segment { | 79 | typedef struct _agp_segment { |
| 80 | off_t pg_start; /* starting page to populate */ | 80 | __kernel_off_t pg_start; /* starting page to populate */ |
| 81 | size_t pg_count; /* number of pages */ | 81 | __kernel_size_t pg_count; /* number of pages */ |
| 82 | int prot; /* prot flags for mmap */ | 82 | int prot; /* prot flags for mmap */ |
| 83 | } agp_segment; | 83 | } agp_segment; |
| 84 | 84 | ||
| 85 | typedef struct _agp_region { | 85 | typedef struct _agp_region { |
| 86 | pid_t pid; /* pid of process */ | 86 | __kernel_pid_t pid; /* pid of process */ |
| 87 | size_t seg_count; /* number of segments */ | 87 | __kernel_size_t seg_count; /* number of segments */ |
| 88 | struct _agp_segment *seg_list; | 88 | struct _agp_segment *seg_list; |
| 89 | } agp_region; | 89 | } agp_region; |
| 90 | 90 | ||
| 91 | typedef struct _agp_allocate { | 91 | typedef struct _agp_allocate { |
| 92 | int key; /* tag of allocation */ | 92 | int key; /* tag of allocation */ |
| 93 | size_t pg_count; /* number of pages */ | 93 | __kernel_size_t pg_count;/* number of pages */ |
| 94 | __u32 type; /* 0 == normal, other devspec */ | 94 | __u32 type; /* 0 == normal, other devspec */ |
| 95 | __u32 physical; /* device specific (some devices | 95 | __u32 physical; /* device specific (some devices |
| 96 | * need a phys address of the | 96 | * need a phys address of the |
| @@ -100,7 +100,7 @@ typedef struct _agp_allocate { | |||
| 100 | 100 | ||
| 101 | typedef struct _agp_bind { | 101 | typedef struct _agp_bind { |
| 102 | int key; /* tag of allocation */ | 102 | int key; /* tag of allocation */ |
| 103 | off_t pg_start; /* starting page to populate */ | 103 | __kernel_off_t pg_start;/* starting page to populate */ |
| 104 | } agp_bind; | 104 | } agp_bind; |
| 105 | 105 | ||
| 106 | typedef struct _agp_unbind { | 106 | typedef struct _agp_unbind { |
diff --git a/include/linux/aio_abi.h b/include/linux/aio_abi.h index 9e0172931315..2c8731664180 100644 --- a/include/linux/aio_abi.h +++ b/include/linux/aio_abi.h | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #ifndef __LINUX__AIO_ABI_H | 27 | #ifndef __LINUX__AIO_ABI_H |
| 28 | #define __LINUX__AIO_ABI_H | 28 | #define __LINUX__AIO_ABI_H |
| 29 | 29 | ||
| 30 | #include <linux/types.h> | ||
| 30 | #include <asm/byteorder.h> | 31 | #include <asm/byteorder.h> |
| 31 | 32 | ||
| 32 | typedef unsigned long aio_context_t; | 33 | typedef unsigned long aio_context_t; |
diff --git a/include/linux/arcdevice.h b/include/linux/arcdevice.h index a1916078fd08..cd4bcb6989ce 100644 --- a/include/linux/arcdevice.h +++ b/include/linux/arcdevice.h | |||
| @@ -235,8 +235,6 @@ struct Outgoing { | |||
| 235 | 235 | ||
| 236 | 236 | ||
| 237 | struct arcnet_local { | 237 | struct arcnet_local { |
| 238 | struct net_device_stats stats; | ||
| 239 | |||
| 240 | uint8_t config, /* current value of CONFIG register */ | 238 | uint8_t config, /* current value of CONFIG register */ |
| 241 | timeout, /* Extended timeout for COM20020 */ | 239 | timeout, /* Extended timeout for COM20020 */ |
| 242 | backplane, /* Backplane flag for COM20020 */ | 240 | backplane, /* Backplane flag for COM20020 */ |
| @@ -335,7 +333,12 @@ void arcnet_dump_skb(struct net_device *dev, struct sk_buff *skb, char *desc); | |||
| 335 | 333 | ||
| 336 | void arcnet_unregister_proto(struct ArcProto *proto); | 334 | void arcnet_unregister_proto(struct ArcProto *proto); |
| 337 | irqreturn_t arcnet_interrupt(int irq, void *dev_id); | 335 | irqreturn_t arcnet_interrupt(int irq, void *dev_id); |
| 338 | struct net_device *alloc_arcdev(char *name); | 336 | struct net_device *alloc_arcdev(const char *name); |
| 337 | |||
| 338 | int arcnet_open(struct net_device *dev); | ||
| 339 | int arcnet_close(struct net_device *dev); | ||
| 340 | int arcnet_send_packet(struct sk_buff *skb, struct net_device *dev); | ||
| 341 | void arcnet_timeout(struct net_device *dev); | ||
| 339 | 342 | ||
| 340 | #endif /* __KERNEL__ */ | 343 | #endif /* __KERNEL__ */ |
| 341 | #endif /* _LINUX_ARCDEVICE_H */ | 344 | #endif /* _LINUX_ARCDEVICE_H */ |
diff --git a/include/linux/async.h b/include/linux/async.h index c4ecacd0b327..68a9530196f2 100644 --- a/include/linux/async.h +++ b/include/linux/async.h | |||
| @@ -17,9 +17,11 @@ typedef u64 async_cookie_t; | |||
| 17 | typedef void (async_func_ptr) (void *data, async_cookie_t cookie); | 17 | typedef void (async_func_ptr) (void *data, async_cookie_t cookie); |
| 18 | 18 | ||
| 19 | extern async_cookie_t async_schedule(async_func_ptr *ptr, void *data); | 19 | extern async_cookie_t async_schedule(async_func_ptr *ptr, void *data); |
| 20 | extern async_cookie_t async_schedule_special(async_func_ptr *ptr, void *data, struct list_head *list); | 20 | extern async_cookie_t async_schedule_domain(async_func_ptr *ptr, void *data, |
| 21 | struct list_head *list); | ||
| 21 | extern void async_synchronize_full(void); | 22 | extern void async_synchronize_full(void); |
| 22 | extern void async_synchronize_full_special(struct list_head *list); | 23 | extern void async_synchronize_full_domain(struct list_head *list); |
| 23 | extern void async_synchronize_cookie(async_cookie_t cookie); | 24 | extern void async_synchronize_cookie(async_cookie_t cookie); |
| 24 | extern void async_synchronize_cookie_special(async_cookie_t cookie, struct list_head *list); | 25 | extern void async_synchronize_cookie_domain(async_cookie_t cookie, |
| 26 | struct list_head *list); | ||
| 25 | 27 | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index a53318b8cbd0..6617c9f8f2ca 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
| @@ -89,6 +89,8 @@ enum { | |||
| 89 | ATA_ID_DLF = 128, | 89 | ATA_ID_DLF = 128, |
| 90 | ATA_ID_CSFO = 129, | 90 | ATA_ID_CSFO = 129, |
| 91 | ATA_ID_CFA_POWER = 160, | 91 | ATA_ID_CFA_POWER = 160, |
| 92 | ATA_ID_CFA_KEY_MGMT = 162, | ||
| 93 | ATA_ID_CFA_MODES = 163, | ||
| 92 | ATA_ID_ROT_SPEED = 217, | 94 | ATA_ID_ROT_SPEED = 217, |
| 93 | ATA_ID_PIO4 = (1 << 1), | 95 | ATA_ID_PIO4 = (1 << 1), |
| 94 | 96 | ||
| @@ -106,6 +108,8 @@ enum { | |||
| 106 | ATA_PIO5 = ATA_PIO4 | (1 << 5), | 108 | ATA_PIO5 = ATA_PIO4 | (1 << 5), |
| 107 | ATA_PIO6 = ATA_PIO5 | (1 << 6), | 109 | ATA_PIO6 = ATA_PIO5 | (1 << 6), |
| 108 | 110 | ||
| 111 | ATA_PIO4_ONLY = (1 << 4), | ||
| 112 | |||
| 109 | ATA_SWDMA0 = (1 << 0), | 113 | ATA_SWDMA0 = (1 << 0), |
| 110 | ATA_SWDMA1 = ATA_SWDMA0 | (1 << 1), | 114 | ATA_SWDMA1 = ATA_SWDMA0 | (1 << 1), |
| 111 | ATA_SWDMA2 = ATA_SWDMA1 | (1 << 2), | 115 | ATA_SWDMA2 = ATA_SWDMA1 | (1 << 2), |
| @@ -115,6 +119,8 @@ enum { | |||
| 115 | ATA_MWDMA0 = (1 << 0), | 119 | ATA_MWDMA0 = (1 << 0), |
| 116 | ATA_MWDMA1 = ATA_MWDMA0 | (1 << 1), | 120 | ATA_MWDMA1 = ATA_MWDMA0 | (1 << 1), |
| 117 | ATA_MWDMA2 = ATA_MWDMA1 | (1 << 2), | 121 | ATA_MWDMA2 = ATA_MWDMA1 | (1 << 2), |
| 122 | ATA_MWDMA3 = ATA_MWDMA2 | (1 << 3), | ||
| 123 | ATA_MWDMA4 = ATA_MWDMA3 | (1 << 4), | ||
| 118 | 124 | ||
| 119 | ATA_MWDMA12_ONLY = (1 << 1) | (1 << 2), | 125 | ATA_MWDMA12_ONLY = (1 << 1) | (1 << 2), |
| 120 | ATA_MWDMA2_ONLY = (1 << 2), | 126 | ATA_MWDMA2_ONLY = (1 << 2), |
| @@ -129,6 +135,8 @@ enum { | |||
| 129 | ATA_UDMA7 = ATA_UDMA6 | (1 << 7), | 135 | ATA_UDMA7 = ATA_UDMA6 | (1 << 7), |
| 130 | /* ATA_UDMA7 is just for completeness... doesn't exist (yet?). */ | 136 | /* ATA_UDMA7 is just for completeness... doesn't exist (yet?). */ |
| 131 | 137 | ||
| 138 | ATA_UDMA24_ONLY = (1 << 2) | (1 << 4), | ||
| 139 | |||
| 132 | ATA_UDMA_MASK_40C = ATA_UDMA2, /* udma0-2 */ | 140 | ATA_UDMA_MASK_40C = ATA_UDMA2, /* udma0-2 */ |
| 133 | 141 | ||
| 134 | /* DMA-related */ | 142 | /* DMA-related */ |
| @@ -242,8 +250,6 @@ enum { | |||
| 242 | ATA_CMD_MEDIA_UNLOCK = 0xDF, | 250 | ATA_CMD_MEDIA_UNLOCK = 0xDF, |
| 243 | /* marked obsolete in the ATA/ATAPI-7 spec */ | 251 | /* marked obsolete in the ATA/ATAPI-7 spec */ |
| 244 | ATA_CMD_RESTORE = 0x10, | 252 | ATA_CMD_RESTORE = 0x10, |
| 245 | /* EXABYTE specific */ | ||
| 246 | ATA_EXABYTE_ENABLE_NEST = 0xF0, | ||
| 247 | 253 | ||
| 248 | /* READ_LOG_EXT pages */ | 254 | /* READ_LOG_EXT pages */ |
| 249 | ATA_LOG_SATA_NCQ = 0x10, | 255 | ATA_LOG_SATA_NCQ = 0x10, |
| @@ -731,12 +737,17 @@ static inline int ata_id_current_chs_valid(const u16 *id) | |||
| 731 | 737 | ||
| 732 | static inline int ata_id_is_cfa(const u16 *id) | 738 | static inline int ata_id_is_cfa(const u16 *id) |
| 733 | { | 739 | { |
| 734 | if (id[ATA_ID_CONFIG] == 0x848A) /* Standard CF */ | 740 | if (id[ATA_ID_CONFIG] == 0x848A) /* Traditional CF */ |
| 735 | return 1; | 741 | return 1; |
| 736 | /* Could be CF hiding as standard ATA */ | 742 | /* |
| 737 | if (ata_id_major_version(id) >= 3 && | 743 | * CF specs don't require specific value in the word 0 anymore and yet |
| 738 | id[ATA_ID_COMMAND_SET_1] != 0xFFFF && | 744 | * they forbid to report the ATA version in the word 80 and require the |
| 739 | (id[ATA_ID_COMMAND_SET_1] & (1 << 2))) | 745 | * CFA feature set support to be indicated in the word 83 in this case. |
| 746 | * Unfortunately, some cards only follow either of this requirements, | ||
| 747 | * and while those that don't indicate CFA feature support need some | ||
| 748 | * sort of quirk list, it seems impractical for the ones that do... | ||
| 749 | */ | ||
| 750 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC004) == 0x4004) | ||
| 740 | return 1; | 751 | return 1; |
| 741 | return 0; | 752 | return 0; |
| 742 | } | 753 | } |
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index e9ebac2e2ecc..d34c187432ed 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_ATALK_H__ | 1 | #ifndef __LINUX_ATALK_H__ |
| 2 | #define __LINUX_ATALK_H__ | 2 | #define __LINUX_ATALK_H__ |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <asm/byteorder.h> | 5 | #include <asm/byteorder.h> |
| 5 | 6 | ||
| 6 | /* | 7 | /* |
diff --git a/include/linux/ath9k_platform.h b/include/linux/ath9k_platform.h new file mode 100644 index 000000000000..b847fc7b93f9 --- /dev/null +++ b/include/linux/ath9k_platform.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2008 Atheros Communications Inc. | ||
| 3 | * Copyright (c) 2009 Gabor Juhos <juhosg@openwrt.org> | ||
| 4 | * Copyright (c) 2009 Imre Kaloz <kaloz@openwrt.org> | ||
| 5 | * | ||
| 6 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 7 | * purpose with or without fee is hereby granted, provided that the above | ||
| 8 | * copyright notice and this permission notice appear in all copies. | ||
| 9 | * | ||
| 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef _LINUX_ATH9K_PLATFORM_H | ||
| 20 | #define _LINUX_ATH9K_PLATFORM_H | ||
| 21 | |||
| 22 | #define ATH9K_PLAT_EEP_MAX_WORDS 2048 | ||
| 23 | |||
| 24 | struct ath9k_platform_data { | ||
| 25 | u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS]; | ||
| 26 | }; | ||
| 27 | |||
| 28 | #endif /* _LINUX_ATH9K_PLATFORM_H */ | ||
diff --git a/include/linux/atmbr2684.h b/include/linux/atmbr2684.h index 52bf72affbba..fdb2629b6189 100644 --- a/include/linux/atmbr2684.h +++ b/include/linux/atmbr2684.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _LINUX_ATMBR2684_H | 1 | #ifndef _LINUX_ATMBR2684_H |
| 2 | #define _LINUX_ATMBR2684_H | 2 | #define _LINUX_ATMBR2684_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/atm.h> | 5 | #include <linux/atm.h> |
| 5 | #include <linux/if.h> /* For IFNAMSIZ */ | 6 | #include <linux/if.h> /* For IFNAMSIZ */ |
| 6 | 7 | ||
diff --git a/include/linux/atmlec.h b/include/linux/atmlec.h index 6f5a1bab8f50..39c917fd1b96 100644 --- a/include/linux/atmlec.h +++ b/include/linux/atmlec.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/atmioc.h> | 11 | #include <linux/atmioc.h> |
| 12 | #include <linux/atm.h> | 12 | #include <linux/atm.h> |
| 13 | #include <linux/if_ether.h> | 13 | #include <linux/if_ether.h> |
| 14 | #include <linux/types.h> | ||
| 14 | 15 | ||
| 15 | /* ATM lec daemon control socket */ | 16 | /* ATM lec daemon control socket */ |
| 16 | #define ATMLEC_CTRL _IO('a', ATMIOC_LANE) | 17 | #define ATMLEC_CTRL _IO('a', ATMIOC_LANE) |
| @@ -78,8 +79,8 @@ struct atmlec_msg { | |||
| 78 | } normal; | 79 | } normal; |
| 79 | struct atmlec_config_msg config; | 80 | struct atmlec_config_msg config; |
| 80 | struct { | 81 | struct { |
| 81 | uint16_t lec_id; /* requestor lec_id */ | 82 | __u16 lec_id; /* requestor lec_id */ |
| 82 | uint32_t tran_id; /* transaction id */ | 83 | __u32 tran_id; /* transaction id */ |
| 83 | unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */ | 84 | unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */ |
| 84 | unsigned char atm_addr[ATM_ESA_LEN]; /* reqestor ATM addr */ | 85 | unsigned char atm_addr[ATM_ESA_LEN]; /* reqestor ATM addr */ |
| 85 | } proxy; /* | 86 | } proxy; /* |
diff --git a/include/linux/atmmpc.h b/include/linux/atmmpc.h index ea1650425a12..2aba5787fa63 100644 --- a/include/linux/atmmpc.h +++ b/include/linux/atmmpc.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #include <linux/atmapi.h> | 4 | #include <linux/atmapi.h> |
| 5 | #include <linux/atmioc.h> | 5 | #include <linux/atmioc.h> |
| 6 | #include <linux/atm.h> | 6 | #include <linux/atm.h> |
| 7 | #include <linux/types.h> | ||
| 7 | 8 | ||
| 8 | #define ATMMPC_CTRL _IO('a', ATMIOC_MPOA) | 9 | #define ATMMPC_CTRL _IO('a', ATMIOC_MPOA) |
| 9 | #define ATMMPC_DATA _IO('a', ATMIOC_MPOA+1) | 10 | #define ATMMPC_DATA _IO('a', ATMIOC_MPOA+1) |
| @@ -18,39 +19,39 @@ struct atmmpc_ioc { | |||
| 18 | }; | 19 | }; |
| 19 | 20 | ||
| 20 | typedef struct in_ctrl_info { | 21 | typedef struct in_ctrl_info { |
| 21 | uint8_t Last_NHRP_CIE_code; | 22 | __u8 Last_NHRP_CIE_code; |
| 22 | uint8_t Last_Q2931_cause_value; | 23 | __u8 Last_Q2931_cause_value; |
| 23 | uint8_t eg_MPC_ATM_addr[ATM_ESA_LEN]; | 24 | __u8 eg_MPC_ATM_addr[ATM_ESA_LEN]; |
| 24 | __be32 tag; | 25 | __be32 tag; |
| 25 | __be32 in_dst_ip; /* IP address this ingress MPC sends packets to */ | 26 | __be32 in_dst_ip; /* IP address this ingress MPC sends packets to */ |
| 26 | uint16_t holding_time; | 27 | __u16 holding_time; |
| 27 | uint32_t request_id; | 28 | __u32 request_id; |
| 28 | } in_ctrl_info; | 29 | } in_ctrl_info; |
| 29 | 30 | ||
| 30 | typedef struct eg_ctrl_info { | 31 | typedef struct eg_ctrl_info { |
| 31 | uint8_t DLL_header[256]; | 32 | __u8 DLL_header[256]; |
| 32 | uint8_t DH_length; | 33 | __u8 DH_length; |
| 33 | __be32 cache_id; | 34 | __be32 cache_id; |
| 34 | __be32 tag; | 35 | __be32 tag; |
| 35 | __be32 mps_ip; | 36 | __be32 mps_ip; |
| 36 | __be32 eg_dst_ip; /* IP address to which ingress MPC sends packets */ | 37 | __be32 eg_dst_ip; /* IP address to which ingress MPC sends packets */ |
| 37 | uint8_t in_MPC_data_ATM_addr[ATM_ESA_LEN]; | 38 | __u8 in_MPC_data_ATM_addr[ATM_ESA_LEN]; |
| 38 | uint16_t holding_time; | 39 | __u16 holding_time; |
| 39 | } eg_ctrl_info; | 40 | } eg_ctrl_info; |
| 40 | 41 | ||
| 41 | struct mpc_parameters { | 42 | struct mpc_parameters { |
| 42 | uint16_t mpc_p1; /* Shortcut-Setup Frame Count */ | 43 | __u16 mpc_p1; /* Shortcut-Setup Frame Count */ |
| 43 | uint16_t mpc_p2; /* Shortcut-Setup Frame Time */ | 44 | __u16 mpc_p2; /* Shortcut-Setup Frame Time */ |
| 44 | uint8_t mpc_p3[8]; /* Flow-detection Protocols */ | 45 | __u8 mpc_p3[8]; /* Flow-detection Protocols */ |
| 45 | uint16_t mpc_p4; /* MPC Initial Retry Time */ | 46 | __u16 mpc_p4; /* MPC Initial Retry Time */ |
| 46 | uint16_t mpc_p5; /* MPC Retry Time Maximum */ | 47 | __u16 mpc_p5; /* MPC Retry Time Maximum */ |
| 47 | uint16_t mpc_p6; /* Hold Down Time */ | 48 | __u16 mpc_p6; /* Hold Down Time */ |
| 48 | } ; | 49 | } ; |
| 49 | 50 | ||
| 50 | struct k_message { | 51 | struct k_message { |
| 51 | uint16_t type; | 52 | __u16 type; |
| 52 | __be32 ip_mask; | 53 | __be32 ip_mask; |
| 53 | uint8_t MPS_ctrl[ATM_ESA_LEN]; | 54 | __u8 MPS_ctrl[ATM_ESA_LEN]; |
| 54 | union { | 55 | union { |
| 55 | in_ctrl_info in_info; | 56 | in_ctrl_info in_info; |
| 56 | eg_ctrl_info eg_info; | 57 | eg_ctrl_info eg_info; |
| @@ -61,11 +62,11 @@ struct k_message { | |||
| 61 | 62 | ||
| 62 | struct llc_snap_hdr { | 63 | struct llc_snap_hdr { |
| 63 | /* RFC 1483 LLC/SNAP encapsulation for routed IP PDUs */ | 64 | /* RFC 1483 LLC/SNAP encapsulation for routed IP PDUs */ |
| 64 | uint8_t dsap; /* Destination Service Access Point (0xAA) */ | 65 | __u8 dsap; /* Destination Service Access Point (0xAA) */ |
| 65 | uint8_t ssap; /* Source Service Access Point (0xAA) */ | 66 | __u8 ssap; /* Source Service Access Point (0xAA) */ |
| 66 | uint8_t ui; /* Unnumbered Information (0x03) */ | 67 | __u8 ui; /* Unnumbered Information (0x03) */ |
| 67 | uint8_t org[3]; /* Organizational identification (0x000000) */ | 68 | __u8 org[3]; /* Organizational identification (0x000000) */ |
| 68 | uint8_t type[2]; /* Ether type (for IP) (0x0800) */ | 69 | __u8 type[2]; /* Ether type (for IP) (0x0800) */ |
| 69 | }; | 70 | }; |
| 70 | 71 | ||
| 71 | /* TLVs this MPC recognizes */ | 72 | /* TLVs this MPC recognizes */ |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 67e5dbfc2961..4fa2810b675e 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -36,7 +36,8 @@ | |||
| 36 | * 1500 - 1599 kernel LSPP events | 36 | * 1500 - 1599 kernel LSPP events |
| 37 | * 1600 - 1699 kernel crypto events | 37 | * 1600 - 1699 kernel crypto events |
| 38 | * 1700 - 1799 kernel anomaly records | 38 | * 1700 - 1799 kernel anomaly records |
| 39 | * 1800 - 1999 future kernel use (maybe integrity labels and related events) | 39 | * 1800 - 1899 kernel integrity events |
| 40 | * 1900 - 1999 future kernel use | ||
| 40 | * 2000 is for otherwise unclassified kernel audit messages (legacy) | 41 | * 2000 is for otherwise unclassified kernel audit messages (legacy) |
| 41 | * 2001 - 2099 unused (kernel) | 42 | * 2001 - 2099 unused (kernel) |
| 42 | * 2100 - 2199 user space anomaly records | 43 | * 2100 - 2199 user space anomaly records |
| @@ -125,6 +126,12 @@ | |||
| 125 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 | 126 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 |
| 126 | #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */ | 127 | #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */ |
| 127 | #define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */ | 128 | #define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */ |
| 129 | #define AUDIT_INTEGRITY_DATA 1800 /* Data integrity verification */ | ||
| 130 | #define AUDIT_INTEGRITY_METADATA 1801 /* Metadata integrity verification */ | ||
| 131 | #define AUDIT_INTEGRITY_STATUS 1802 /* Integrity enable status */ | ||
| 132 | #define AUDIT_INTEGRITY_HASH 1803 /* Integrity HASH type */ | ||
| 133 | #define AUDIT_INTEGRITY_PCR 1804 /* PCR invalidation msgs */ | ||
| 134 | #define AUDIT_INTEGRITY_RULE 1805 /* policy rule */ | ||
| 128 | 135 | ||
| 129 | #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ | 136 | #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ |
| 130 | 137 | ||
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h index 55fa478bd639..8b49ac48a5b7 100644 --- a/include/linux/auto_fs4.h +++ b/include/linux/auto_fs4.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #define _LINUX_AUTO_FS4_H | 12 | #define _LINUX_AUTO_FS4_H |
| 13 | 13 | ||
| 14 | /* Include common v3 definitions */ | 14 | /* Include common v3 definitions */ |
| 15 | #include <linux/types.h> | ||
| 15 | #include <linux/auto_fs.h> | 16 | #include <linux/auto_fs.h> |
| 16 | 17 | ||
| 17 | /* autofs v4 definitions */ | 18 | /* autofs v4 definitions */ |
diff --git a/include/linux/bfs_fs.h b/include/linux/bfs_fs.h index 8ed6dfdcd783..1c0b355aa515 100644 --- a/include/linux/bfs_fs.h +++ b/include/linux/bfs_fs.h | |||
| @@ -6,6 +6,8 @@ | |||
| 6 | #ifndef _LINUX_BFS_FS_H | 6 | #ifndef _LINUX_BFS_FS_H |
| 7 | #define _LINUX_BFS_FS_H | 7 | #define _LINUX_BFS_FS_H |
| 8 | 8 | ||
| 9 | #include <linux/types.h> | ||
| 10 | |||
| 9 | #define BFS_BSIZE_BITS 9 | 11 | #define BFS_BSIZE_BITS 9 |
| 10 | #define BFS_BSIZE (1<<BFS_BSIZE_BITS) | 12 | #define BFS_BSIZE (1<<BFS_BSIZE_BITS) |
| 11 | 13 | ||
| @@ -17,7 +19,6 @@ | |||
| 17 | #define BFS_VDIR 2L | 19 | #define BFS_VDIR 2L |
| 18 | #define BFS_VREG 1L | 20 | #define BFS_VREG 1L |
| 19 | 21 | ||
| 20 | |||
| 21 | /* BFS inode layout on disk */ | 22 | /* BFS inode layout on disk */ |
| 22 | struct bfs_inode { | 23 | struct bfs_inode { |
| 23 | __le16 i_ino; | 24 | __le16 i_ino; |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 18462c5b8fff..b05b1d4d17d2 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -144,7 +144,7 @@ struct bio { | |||
| 144 | * bit 1 -- rw-ahead when set | 144 | * bit 1 -- rw-ahead when set |
| 145 | * bit 2 -- barrier | 145 | * bit 2 -- barrier |
| 146 | * Insert a serialization point in the IO queue, forcing previously | 146 | * Insert a serialization point in the IO queue, forcing previously |
| 147 | * submitted IO to be completed before this oen is issued. | 147 | * submitted IO to be completed before this one is issued. |
| 148 | * bit 3 -- synchronous I/O hint: the block layer will unplug immediately | 148 | * bit 3 -- synchronous I/O hint: the block layer will unplug immediately |
| 149 | * Note that this does NOT indicate that the IO itself is sync, just | 149 | * Note that this does NOT indicate that the IO itself is sync, just |
| 150 | * that the block layer will not postpone issue of this IO by plugging. | 150 | * that the block layer will not postpone issue of this IO by plugging. |
| @@ -163,12 +163,31 @@ struct bio { | |||
| 163 | #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ | 163 | #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ |
| 164 | #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ | 164 | #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ |
| 165 | #define BIO_RW_BARRIER 2 | 165 | #define BIO_RW_BARRIER 2 |
| 166 | #define BIO_RW_SYNC 3 | 166 | #define BIO_RW_SYNCIO 3 |
| 167 | #define BIO_RW_META 4 | 167 | #define BIO_RW_UNPLUG 4 |
| 168 | #define BIO_RW_DISCARD 5 | 168 | #define BIO_RW_META 5 |
| 169 | #define BIO_RW_FAILFAST_DEV 6 | 169 | #define BIO_RW_DISCARD 6 |
| 170 | #define BIO_RW_FAILFAST_TRANSPORT 7 | 170 | #define BIO_RW_FAILFAST_DEV 7 |
| 171 | #define BIO_RW_FAILFAST_DRIVER 8 | 171 | #define BIO_RW_FAILFAST_TRANSPORT 8 |
| 172 | #define BIO_RW_FAILFAST_DRIVER 9 | ||
| 173 | |||
| 174 | #define bio_rw_flagged(bio, flag) ((bio)->bi_rw & (1 << (flag))) | ||
| 175 | |||
| 176 | /* | ||
| 177 | * Old defines, these should eventually be replaced by direct usage of | ||
| 178 | * bio_rw_flagged() | ||
| 179 | */ | ||
| 180 | #define bio_barrier(bio) bio_rw_flagged(bio, BIO_RW_BARRIER) | ||
| 181 | #define bio_sync(bio) bio_rw_flagged(bio, BIO_RW_SYNCIO) | ||
| 182 | #define bio_unplug(bio) bio_rw_flagged(bio, BIO_RW_UNPLUG) | ||
| 183 | #define bio_failfast_dev(bio) bio_rw_flagged(bio, BIO_RW_FAILFAST_DEV) | ||
| 184 | #define bio_failfast_transport(bio) \ | ||
| 185 | bio_rw_flagged(bio, BIO_RW_FAILFAST_TRANSPORT) | ||
| 186 | #define bio_failfast_driver(bio) \ | ||
| 187 | bio_rw_flagged(bio, BIO_RW_FAILFAST_DRIVER) | ||
| 188 | #define bio_rw_ahead(bio) bio_rw_flagged(bio, BIO_RW_AHEAD) | ||
| 189 | #define bio_rw_meta(bio) bio_rw_flagged(bio, BIO_RW_META) | ||
| 190 | #define bio_discard(bio) bio_rw_flagged(bio, BIO_RW_DISCARD) | ||
| 172 | 191 | ||
| 173 | /* | 192 | /* |
| 174 | * upper 16 bits of bi_rw define the io priority of this bio | 193 | * upper 16 bits of bi_rw define the io priority of this bio |
| @@ -193,15 +212,6 @@ struct bio { | |||
| 193 | #define bio_offset(bio) bio_iovec((bio))->bv_offset | 212 | #define bio_offset(bio) bio_iovec((bio))->bv_offset |
| 194 | #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx) | 213 | #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx) |
| 195 | #define bio_sectors(bio) ((bio)->bi_size >> 9) | 214 | #define bio_sectors(bio) ((bio)->bi_size >> 9) |
| 196 | #define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER)) | ||
| 197 | #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC)) | ||
| 198 | #define bio_failfast_dev(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DEV)) | ||
| 199 | #define bio_failfast_transport(bio) \ | ||
| 200 | ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_TRANSPORT)) | ||
| 201 | #define bio_failfast_driver(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DRIVER)) | ||
| 202 | #define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD)) | ||
| 203 | #define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META)) | ||
| 204 | #define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD)) | ||
| 205 | #define bio_empty_barrier(bio) (bio_barrier(bio) && !bio_has_data(bio) && !bio_discard(bio)) | 215 | #define bio_empty_barrier(bio) (bio_barrier(bio) && !bio_has_data(bio) && !bio_discard(bio)) |
| 206 | 216 | ||
| 207 | static inline unsigned int bio_cur_sectors(struct bio *bio) | 217 | static inline unsigned int bio_cur_sectors(struct bio *bio) |
| @@ -312,7 +322,6 @@ struct bio_integrity_payload { | |||
| 312 | void *bip_buf; /* generated integrity data */ | 322 | void *bip_buf; /* generated integrity data */ |
| 313 | bio_end_io_t *bip_end_io; /* saved I/O completion fn */ | 323 | bio_end_io_t *bip_end_io; /* saved I/O completion fn */ |
| 314 | 324 | ||
| 315 | int bip_error; /* saved I/O error */ | ||
| 316 | unsigned int bip_size; | 325 | unsigned int bip_size; |
| 317 | 326 | ||
| 318 | unsigned short bip_pool; /* pool the ivec came from */ | 327 | unsigned short bip_pool; /* pool the ivec came from */ |
| @@ -417,9 +426,6 @@ struct bio_set { | |||
| 417 | unsigned int front_pad; | 426 | unsigned int front_pad; |
| 418 | 427 | ||
| 419 | mempool_t *bio_pool; | 428 | mempool_t *bio_pool; |
| 420 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
| 421 | mempool_t *bio_integrity_pool; | ||
| 422 | #endif | ||
| 423 | mempool_t *bvec_pool; | 429 | mempool_t *bvec_pool; |
| 424 | }; | 430 | }; |
| 425 | 431 | ||
| @@ -440,12 +446,13 @@ extern struct biovec_slab bvec_slabs[BIOVEC_NR_POOLS] __read_mostly; | |||
| 440 | 446 | ||
| 441 | #ifdef CONFIG_HIGHMEM | 447 | #ifdef CONFIG_HIGHMEM |
| 442 | /* | 448 | /* |
| 443 | * remember to add offset! and never ever reenable interrupts between a | 449 | * remember never ever reenable interrupts between a bvec_kmap_irq and |
| 444 | * bvec_kmap_irq and bvec_kunmap_irq!! | 450 | * bvec_kunmap_irq! |
| 445 | * | 451 | * |
| 446 | * This function MUST be inlined - it plays with the CPU interrupt flags. | 452 | * This function MUST be inlined - it plays with the CPU interrupt flags. |
| 447 | */ | 453 | */ |
| 448 | static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags) | 454 | static __always_inline char *bvec_kmap_irq(struct bio_vec *bvec, |
| 455 | unsigned long *flags) | ||
| 449 | { | 456 | { |
| 450 | unsigned long addr; | 457 | unsigned long addr; |
| 451 | 458 | ||
| @@ -461,7 +468,8 @@ static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags) | |||
| 461 | return (char *) addr + bvec->bv_offset; | 468 | return (char *) addr + bvec->bv_offset; |
| 462 | } | 469 | } |
| 463 | 470 | ||
| 464 | static inline void bvec_kunmap_irq(char *buffer, unsigned long *flags) | 471 | static __always_inline void bvec_kunmap_irq(char *buffer, |
| 472 | unsigned long *flags) | ||
| 465 | { | 473 | { |
| 466 | unsigned long ptr = (unsigned long) buffer & PAGE_MASK; | 474 | unsigned long ptr = (unsigned long) buffer & PAGE_MASK; |
| 467 | 475 | ||
| @@ -508,9 +516,8 @@ static inline int bio_has_data(struct bio *bio) | |||
| 508 | 516 | ||
| 509 | #define bio_integrity(bio) (bio->bi_integrity != NULL) | 517 | #define bio_integrity(bio) (bio->bi_integrity != NULL) |
| 510 | 518 | ||
| 511 | extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *); | ||
| 512 | extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int); | 519 | extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int); |
| 513 | extern void bio_integrity_free(struct bio *, struct bio_set *); | 520 | extern void bio_integrity_free(struct bio *); |
| 514 | extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int); | 521 | extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int); |
| 515 | extern int bio_integrity_enabled(struct bio *bio); | 522 | extern int bio_integrity_enabled(struct bio *bio); |
| 516 | extern int bio_integrity_set_tag(struct bio *, void *, unsigned int); | 523 | extern int bio_integrity_set_tag(struct bio *, void *, unsigned int); |
| @@ -520,27 +527,21 @@ extern void bio_integrity_endio(struct bio *, int); | |||
| 520 | extern void bio_integrity_advance(struct bio *, unsigned int); | 527 | extern void bio_integrity_advance(struct bio *, unsigned int); |
| 521 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); | 528 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); |
| 522 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); | 529 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); |
| 523 | extern int bio_integrity_clone(struct bio *, struct bio *, struct bio_set *); | 530 | extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t); |
| 524 | extern int bioset_integrity_create(struct bio_set *, int); | ||
| 525 | extern void bioset_integrity_free(struct bio_set *); | ||
| 526 | extern void bio_integrity_init_slab(void); | ||
| 527 | 531 | ||
| 528 | #else /* CONFIG_BLK_DEV_INTEGRITY */ | 532 | #else /* CONFIG_BLK_DEV_INTEGRITY */ |
| 529 | 533 | ||
| 530 | #define bio_integrity(a) (0) | 534 | #define bio_integrity(a) (0) |
| 531 | #define bioset_integrity_create(a, b) (0) | ||
| 532 | #define bio_integrity_prep(a) (0) | 535 | #define bio_integrity_prep(a) (0) |
| 533 | #define bio_integrity_enabled(a) (0) | 536 | #define bio_integrity_enabled(a) (0) |
| 534 | #define bio_integrity_clone(a, b, c) (0) | 537 | #define bio_integrity_clone(a, b, c) (0) |
| 535 | #define bioset_integrity_free(a) do { } while (0) | 538 | #define bio_integrity_free(a) do { } while (0) |
| 536 | #define bio_integrity_free(a, b) do { } while (0) | ||
| 537 | #define bio_integrity_endio(a, b) do { } while (0) | 539 | #define bio_integrity_endio(a, b) do { } while (0) |
| 538 | #define bio_integrity_advance(a, b) do { } while (0) | 540 | #define bio_integrity_advance(a, b) do { } while (0) |
| 539 | #define bio_integrity_trim(a, b, c) do { } while (0) | 541 | #define bio_integrity_trim(a, b, c) do { } while (0) |
| 540 | #define bio_integrity_split(a, b, c) do { } while (0) | 542 | #define bio_integrity_split(a, b, c) do { } while (0) |
| 541 | #define bio_integrity_set_tag(a, b, c) do { } while (0) | 543 | #define bio_integrity_set_tag(a, b, c) do { } while (0) |
| 542 | #define bio_integrity_get_tag(a, b, c) do { } while (0) | 544 | #define bio_integrity_get_tag(a, b, c) do { } while (0) |
| 543 | #define bio_integrity_init_slab(a) do { } while (0) | ||
| 544 | 545 | ||
| 545 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 546 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
| 546 | 547 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 044467ef7b11..465d6babc847 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -108,6 +108,7 @@ enum rq_flag_bits { | |||
| 108 | __REQ_RW_META, /* metadata io request */ | 108 | __REQ_RW_META, /* metadata io request */ |
| 109 | __REQ_COPY_USER, /* contains copies of user pages */ | 109 | __REQ_COPY_USER, /* contains copies of user pages */ |
| 110 | __REQ_INTEGRITY, /* integrity metadata has been remapped */ | 110 | __REQ_INTEGRITY, /* integrity metadata has been remapped */ |
| 111 | __REQ_UNPLUG, /* unplug queue on submission */ | ||
| 111 | __REQ_NR_BITS, /* stops here */ | 112 | __REQ_NR_BITS, /* stops here */ |
| 112 | }; | 113 | }; |
| 113 | 114 | ||
| @@ -134,6 +135,7 @@ enum rq_flag_bits { | |||
| 134 | #define REQ_RW_META (1 << __REQ_RW_META) | 135 | #define REQ_RW_META (1 << __REQ_RW_META) |
| 135 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) | 136 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) |
| 136 | #define REQ_INTEGRITY (1 << __REQ_INTEGRITY) | 137 | #define REQ_INTEGRITY (1 << __REQ_INTEGRITY) |
| 138 | #define REQ_UNPLUG (1 << __REQ_UNPLUG) | ||
| 137 | 139 | ||
| 138 | #define BLK_MAX_CDB 16 | 140 | #define BLK_MAX_CDB 16 |
| 139 | 141 | ||
| @@ -449,6 +451,11 @@ struct request_queue | |||
| 449 | #define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */ | 451 | #define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */ |
| 450 | #define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ | 452 | #define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ |
| 451 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ | 453 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ |
| 454 | #define QUEUE_FLAG_IO_STAT 15 /* do IO stats */ | ||
| 455 | |||
| 456 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | ||
| 457 | (1 << QUEUE_FLAG_CLUSTER) | \ | ||
| 458 | (1 << QUEUE_FLAG_STACKABLE)) | ||
| 452 | 459 | ||
| 453 | static inline int queue_is_locked(struct request_queue *q) | 460 | static inline int queue_is_locked(struct request_queue *q) |
| 454 | { | 461 | { |
| @@ -565,6 +572,7 @@ enum { | |||
| 565 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) | 572 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) |
| 566 | #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) | 573 | #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) |
| 567 | #define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags) | 574 | #define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags) |
| 575 | #define blk_queue_io_stat(q) test_bit(QUEUE_FLAG_IO_STAT, &(q)->queue_flags) | ||
| 568 | #define blk_queue_flushing(q) ((q)->ordseq) | 576 | #define blk_queue_flushing(q) ((q)->ordseq) |
| 569 | #define blk_queue_stackable(q) \ | 577 | #define blk_queue_stackable(q) \ |
| 570 | test_bit(QUEUE_FLAG_STACKABLE, &(q)->queue_flags) | 578 | test_bit(QUEUE_FLAG_STACKABLE, &(q)->queue_flags) |
| @@ -700,6 +708,8 @@ struct req_iterator { | |||
| 700 | }; | 708 | }; |
| 701 | 709 | ||
| 702 | /* This should not be used directly - use rq_for_each_segment */ | 710 | /* This should not be used directly - use rq_for_each_segment */ |
| 711 | #define for_each_bio(_bio) \ | ||
| 712 | for (; _bio; _bio = _bio->bi_next) | ||
| 703 | #define __rq_for_each_bio(_bio, rq) \ | 713 | #define __rq_for_each_bio(_bio, rq) \ |
| 704 | if ((rq->bio)) \ | 714 | if ((rq->bio)) \ |
| 705 | for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next) | 715 | for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next) |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 1dba3493d520..6e915878e88c 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef BLKTRACE_H | 1 | #ifndef BLKTRACE_H |
| 2 | #define BLKTRACE_H | 2 | #define BLKTRACE_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #ifdef __KERNEL__ | 5 | #ifdef __KERNEL__ |
| 5 | #include <linux/blkdev.h> | 6 | #include <linux/blkdev.h> |
| 6 | #include <linux/relay.h> | 7 | #include <linux/relay.h> |
| @@ -14,6 +15,7 @@ enum blktrace_cat { | |||
| 14 | BLK_TC_WRITE = 1 << 1, /* writes */ | 15 | BLK_TC_WRITE = 1 << 1, /* writes */ |
| 15 | BLK_TC_BARRIER = 1 << 2, /* barrier */ | 16 | BLK_TC_BARRIER = 1 << 2, /* barrier */ |
| 16 | BLK_TC_SYNC = 1 << 3, /* sync IO */ | 17 | BLK_TC_SYNC = 1 << 3, /* sync IO */ |
| 18 | BLK_TC_SYNCIO = BLK_TC_SYNC, | ||
| 17 | BLK_TC_QUEUE = 1 << 4, /* queueing/merging */ | 19 | BLK_TC_QUEUE = 1 << 4, /* queueing/merging */ |
| 18 | BLK_TC_REQUEUE = 1 << 5, /* requeueing */ | 20 | BLK_TC_REQUEUE = 1 << 5, /* requeueing */ |
| 19 | BLK_TC_ISSUE = 1 << 6, /* issue */ | 21 | BLK_TC_ISSUE = 1 << 6, /* issue */ |
diff --git a/include/linux/bsg.h b/include/linux/bsg.h index cf0303a60611..3f0c64ace424 100644 --- a/include/linux/bsg.h +++ b/include/linux/bsg.h | |||
| @@ -7,6 +7,14 @@ | |||
| 7 | #define BSG_SUB_PROTOCOL_SCSI_TMF 1 | 7 | #define BSG_SUB_PROTOCOL_SCSI_TMF 1 |
| 8 | #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 | 8 | #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 |
| 9 | 9 | ||
| 10 | /* | ||
| 11 | * For flags member below | ||
| 12 | * sg.h sg_io_hdr also has bits defined for it's flags member. However | ||
| 13 | * none of these bits are implemented/used by bsg. The bits below are | ||
| 14 | * allocated to not conflict with sg.h ones anyway. | ||
| 15 | */ | ||
| 16 | #define BSG_FLAG_Q_AT_TAIL 0x10 /* default, == 0 at this bit, is Q_AT_HEAD */ | ||
| 17 | |||
| 10 | struct sg_io_v4 { | 18 | struct sg_io_v4 { |
| 11 | __s32 guard; /* [i] 'Q' to differentiate from v3 */ | 19 | __s32 guard; /* [i] 'Q' to differentiate from v3 */ |
| 12 | __u32 protocol; /* [i] 0 -> SCSI , .... */ | 20 | __u32 protocol; /* [i] 0 -> SCSI , .... */ |
diff --git a/include/linux/can/bcm.h b/include/linux/can/bcm.h index 7f293273c444..1432b278c52d 100644 --- a/include/linux/can/bcm.h +++ b/include/linux/can/bcm.h | |||
| @@ -14,6 +14,8 @@ | |||
| 14 | #ifndef CAN_BCM_H | 14 | #ifndef CAN_BCM_H |
| 15 | #define CAN_BCM_H | 15 | #define CAN_BCM_H |
| 16 | 16 | ||
| 17 | #include <linux/types.h> | ||
| 18 | |||
| 17 | /** | 19 | /** |
| 18 | * struct bcm_msg_head - head of messages to/from the broadcast manager | 20 | * struct bcm_msg_head - head of messages to/from the broadcast manager |
| 19 | * @opcode: opcode, see enum below. | 21 | * @opcode: opcode, see enum below. |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 02bdb768d43b..4864a43b2b45 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
| @@ -69,10 +69,6 @@ typedef struct __user_cap_data_struct { | |||
| 69 | #define VFS_CAP_U32 VFS_CAP_U32_2 | 69 | #define VFS_CAP_U32 VFS_CAP_U32_2 |
| 70 | #define VFS_CAP_REVISION VFS_CAP_REVISION_2 | 70 | #define VFS_CAP_REVISION VFS_CAP_REVISION_2 |
| 71 | 71 | ||
| 72 | #ifdef CONFIG_SECURITY_FILE_CAPABILITIES | ||
| 73 | extern int file_caps_enabled; | ||
| 74 | #endif | ||
| 75 | |||
| 76 | struct vfs_cap_data { | 72 | struct vfs_cap_data { |
| 77 | __le32 magic_etc; /* Little endian */ | 73 | __le32 magic_etc; /* Little endian */ |
| 78 | struct { | 74 | struct { |
| @@ -96,6 +92,10 @@ struct vfs_cap_data { | |||
| 96 | #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 | 92 | #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 |
| 97 | #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 | 93 | #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 |
| 98 | 94 | ||
| 95 | #ifdef CONFIG_SECURITY_FILE_CAPABILITIES | ||
| 96 | extern int file_caps_enabled; | ||
| 97 | #endif | ||
| 98 | |||
| 99 | typedef struct kernel_cap_struct { | 99 | typedef struct kernel_cap_struct { |
| 100 | __u32 cap[_KERNEL_CAPABILITY_U32S]; | 100 | __u32 cap[_KERNEL_CAPABILITY_U32S]; |
| 101 | } kernel_cap_t; | 101 | } kernel_cap_t; |
| @@ -393,8 +393,10 @@ struct cpu_vfs_cap_data { | |||
| 393 | # define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }}) | 393 | # define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }}) |
| 394 | # define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }}) | 394 | # define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }}) |
| 395 | # define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } }) | 395 | # define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } }) |
| 396 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ | 396 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ |
| 397 | CAP_FS_MASK_B1 } }) | 397 | | CAP_TO_MASK(CAP_SYS_RESOURCE) \ |
| 398 | | CAP_TO_MASK(CAP_MKNOD), \ | ||
| 399 | CAP_FS_MASK_B1 } }) | ||
| 398 | 400 | ||
| 399 | #endif /* _KERNEL_CAPABILITY_U32S != 2 */ | 401 | #endif /* _KERNEL_CAPABILITY_U32S != 2 */ |
| 400 | 402 | ||
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index 0b49e08d3cb0..78e904796622 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #ifndef _LINUX_CDROM_H | 11 | #ifndef _LINUX_CDROM_H |
| 12 | #define _LINUX_CDROM_H | 12 | #define _LINUX_CDROM_H |
| 13 | 13 | ||
| 14 | #include <linux/types.h> | ||
| 14 | #include <asm/byteorder.h> | 15 | #include <asm/byteorder.h> |
| 15 | 16 | ||
| 16 | /******************************************************* | 17 | /******************************************************* |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index e267e62827bb..499900d0cee7 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -99,6 +99,7 @@ static inline bool css_tryget(struct cgroup_subsys_state *css) | |||
| 99 | while (!atomic_inc_not_zero(&css->refcnt)) { | 99 | while (!atomic_inc_not_zero(&css->refcnt)) { |
| 100 | if (test_bit(CSS_REMOVED, &css->flags)) | 100 | if (test_bit(CSS_REMOVED, &css->flags)) |
| 101 | return false; | 101 | return false; |
| 102 | cpu_relax(); | ||
| 102 | } | 103 | } |
| 103 | return true; | 104 | return true; |
| 104 | } | 105 | } |
| @@ -377,6 +378,7 @@ struct cgroup_subsys { | |||
| 377 | * - initiating hotplug events | 378 | * - initiating hotplug events |
| 378 | */ | 379 | */ |
| 379 | struct mutex hierarchy_mutex; | 380 | struct mutex hierarchy_mutex; |
| 381 | struct lock_class_key subsys_key; | ||
| 380 | 382 | ||
| 381 | /* | 383 | /* |
| 382 | * Link to parent, and list entry in parent's children. | 384 | * Link to parent, and list entry in parent's children. |
diff --git a/include/linux/cgroupstats.h b/include/linux/cgroupstats.h index 4f53abf6855d..3753c33160d1 100644 --- a/include/linux/cgroupstats.h +++ b/include/linux/cgroupstats.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #ifndef _LINUX_CGROUPSTATS_H | 15 | #ifndef _LINUX_CGROUPSTATS_H |
| 16 | #define _LINUX_CGROUPSTATS_H | 16 | #define _LINUX_CGROUPSTATS_H |
| 17 | 17 | ||
| 18 | #include <linux/types.h> | ||
| 18 | #include <linux/taskstats.h> | 19 | #include <linux/taskstats.h> |
| 19 | 20 | ||
| 20 | /* | 21 | /* |
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index cea153697ec7..3a1dbba4d3ae 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
| @@ -36,6 +36,7 @@ enum clock_event_nofitiers { | |||
| 36 | CLOCK_EVT_NOTIFY_BROADCAST_EXIT, | 36 | CLOCK_EVT_NOTIFY_BROADCAST_EXIT, |
| 37 | CLOCK_EVT_NOTIFY_SUSPEND, | 37 | CLOCK_EVT_NOTIFY_SUSPEND, |
| 38 | CLOCK_EVT_NOTIFY_RESUME, | 38 | CLOCK_EVT_NOTIFY_RESUME, |
| 39 | CLOCK_EVT_NOTIFY_CPU_DYING, | ||
| 39 | CLOCK_EVT_NOTIFY_CPU_DEAD, | 40 | CLOCK_EVT_NOTIFY_CPU_DEAD, |
| 40 | }; | 41 | }; |
| 41 | 42 | ||
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index f88d32f8ff7c..573819ef4cc0 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
| @@ -22,8 +22,109 @@ typedef u64 cycle_t; | |||
| 22 | struct clocksource; | 22 | struct clocksource; |
| 23 | 23 | ||
| 24 | /** | 24 | /** |
| 25 | * struct cyclecounter - hardware abstraction for a free running counter | ||
| 26 | * Provides completely state-free accessors to the underlying hardware. | ||
| 27 | * Depending on which hardware it reads, the cycle counter may wrap | ||
| 28 | * around quickly. Locking rules (if necessary) have to be defined | ||
| 29 | * by the implementor and user of specific instances of this API. | ||
| 30 | * | ||
| 31 | * @read: returns the current cycle value | ||
| 32 | * @mask: bitmask for two's complement | ||
| 33 | * subtraction of non 64 bit counters, | ||
| 34 | * see CLOCKSOURCE_MASK() helper macro | ||
| 35 | * @mult: cycle to nanosecond multiplier | ||
| 36 | * @shift: cycle to nanosecond divisor (power of two) | ||
| 37 | */ | ||
| 38 | struct cyclecounter { | ||
| 39 | cycle_t (*read)(const struct cyclecounter *cc); | ||
| 40 | cycle_t mask; | ||
| 41 | u32 mult; | ||
| 42 | u32 shift; | ||
| 43 | }; | ||
| 44 | |||
| 45 | /** | ||
| 46 | * struct timecounter - layer above a %struct cyclecounter which counts nanoseconds | ||
| 47 | * Contains the state needed by timecounter_read() to detect | ||
| 48 | * cycle counter wrap around. Initialize with | ||
| 49 | * timecounter_init(). Also used to convert cycle counts into the | ||
| 50 | * corresponding nanosecond counts with timecounter_cyc2time(). Users | ||
| 51 | * of this code are responsible for initializing the underlying | ||
| 52 | * cycle counter hardware, locking issues and reading the time | ||
| 53 | * more often than the cycle counter wraps around. The nanosecond | ||
| 54 | * counter will only wrap around after ~585 years. | ||
| 55 | * | ||
| 56 | * @cc: the cycle counter used by this instance | ||
| 57 | * @cycle_last: most recent cycle counter value seen by | ||
| 58 | * timecounter_read() | ||
| 59 | * @nsec: continuously increasing count | ||
| 60 | */ | ||
| 61 | struct timecounter { | ||
| 62 | const struct cyclecounter *cc; | ||
| 63 | cycle_t cycle_last; | ||
| 64 | u64 nsec; | ||
| 65 | }; | ||
| 66 | |||
| 67 | /** | ||
| 68 | * cyclecounter_cyc2ns - converts cycle counter cycles to nanoseconds | ||
| 69 | * @tc: Pointer to cycle counter. | ||
| 70 | * @cycles: Cycles | ||
| 71 | * | ||
| 72 | * XXX - This could use some mult_lxl_ll() asm optimization. Same code | ||
| 73 | * as in cyc2ns, but with unsigned result. | ||
| 74 | */ | ||
| 75 | static inline u64 cyclecounter_cyc2ns(const struct cyclecounter *cc, | ||
| 76 | cycle_t cycles) | ||
| 77 | { | ||
| 78 | u64 ret = (u64)cycles; | ||
| 79 | ret = (ret * cc->mult) >> cc->shift; | ||
| 80 | return ret; | ||
| 81 | } | ||
| 82 | |||
| 83 | /** | ||
| 84 | * timecounter_init - initialize a time counter | ||
| 85 | * @tc: Pointer to time counter which is to be initialized/reset | ||
| 86 | * @cc: A cycle counter, ready to be used. | ||
| 87 | * @start_tstamp: Arbitrary initial time stamp. | ||
| 88 | * | ||
| 89 | * After this call the current cycle register (roughly) corresponds to | ||
| 90 | * the initial time stamp. Every call to timecounter_read() increments | ||
| 91 | * the time stamp counter by the number of elapsed nanoseconds. | ||
| 92 | */ | ||
| 93 | extern void timecounter_init(struct timecounter *tc, | ||
| 94 | const struct cyclecounter *cc, | ||
| 95 | u64 start_tstamp); | ||
| 96 | |||
| 97 | /** | ||
| 98 | * timecounter_read - return nanoseconds elapsed since timecounter_init() | ||
| 99 | * plus the initial time stamp | ||
| 100 | * @tc: Pointer to time counter. | ||
| 101 | * | ||
| 102 | * In other words, keeps track of time since the same epoch as | ||
| 103 | * the function which generated the initial time stamp. | ||
| 104 | */ | ||
| 105 | extern u64 timecounter_read(struct timecounter *tc); | ||
| 106 | |||
| 107 | /** | ||
| 108 | * timecounter_cyc2time - convert a cycle counter to same | ||
| 109 | * time base as values returned by | ||
| 110 | * timecounter_read() | ||
| 111 | * @tc: Pointer to time counter. | ||
| 112 | * @cycle: a value returned by tc->cc->read() | ||
| 113 | * | ||
| 114 | * Cycle counts that are converted correctly as long as they | ||
| 115 | * fall into the interval [-1/2 max cycle count, +1/2 max cycle count], | ||
| 116 | * with "max cycle count" == cs->mask+1. | ||
| 117 | * | ||
| 118 | * This allows conversion of cycle counter values which were generated | ||
| 119 | * in the past. | ||
| 120 | */ | ||
| 121 | extern u64 timecounter_cyc2time(struct timecounter *tc, | ||
| 122 | cycle_t cycle_tstamp); | ||
| 123 | |||
| 124 | /** | ||
| 25 | * struct clocksource - hardware abstraction for a free running counter | 125 | * struct clocksource - hardware abstraction for a free running counter |
| 26 | * Provides mostly state-free accessors to the underlying hardware. | 126 | * Provides mostly state-free accessors to the underlying hardware. |
| 127 | * This is the structure used for system time. | ||
| 27 | * | 128 | * |
| 28 | * @name: ptr to clocksource name | 129 | * @name: ptr to clocksource name |
| 29 | * @list: list head for registration | 130 | * @list: list head for registration |
diff --git a/include/linux/cm4000_cs.h b/include/linux/cm4000_cs.h index 605ebe24bb2e..72bfefdbd767 100644 --- a/include/linux/cm4000_cs.h +++ b/include/linux/cm4000_cs.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _CM4000_H_ | 1 | #ifndef _CM4000_H_ |
| 2 | #define _CM4000_H_ | 2 | #define _CM4000_H_ |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | #define MAX_ATR 33 | 6 | #define MAX_ATR 33 |
| 5 | 7 | ||
| 6 | #define CM4000_MAX_DEV 4 | 8 | #define CM4000_MAX_DEV 4 |
| @@ -10,9 +12,9 @@ | |||
| 10 | * not to break compilation of userspace apps. -HW */ | 12 | * not to break compilation of userspace apps. -HW */ |
| 11 | 13 | ||
| 12 | typedef struct atreq { | 14 | typedef struct atreq { |
| 13 | int32_t atr_len; | 15 | __s32 atr_len; |
| 14 | unsigned char atr[64]; | 16 | unsigned char atr[64]; |
| 15 | int32_t power_act; | 17 | __s32 power_act; |
| 16 | unsigned char bIFSD; | 18 | unsigned char bIFSD; |
| 17 | unsigned char bIFSC; | 19 | unsigned char bIFSC; |
| 18 | } atreq_t; | 20 | } atreq_t; |
| @@ -22,13 +24,13 @@ typedef struct atreq { | |||
| 22 | * member sizes. This leads to CONFIG_COMPAT breakage, since 32bit userspace | 24 | * member sizes. This leads to CONFIG_COMPAT breakage, since 32bit userspace |
| 23 | * will lay out the structure members differently than the 64bit kernel. | 25 | * will lay out the structure members differently than the 64bit kernel. |
| 24 | * | 26 | * |
| 25 | * I've changed "ptsreq.protocol" from "unsigned long" to "u_int32_t". | 27 | * I've changed "ptsreq.protocol" from "unsigned long" to "__u32". |
| 26 | * On 32bit this will make no difference. With 64bit kernels, it will make | 28 | * On 32bit this will make no difference. With 64bit kernels, it will make |
| 27 | * 32bit apps work, too. | 29 | * 32bit apps work, too. |
| 28 | */ | 30 | */ |
| 29 | 31 | ||
| 30 | typedef struct ptsreq { | 32 | typedef struct ptsreq { |
| 31 | u_int32_t protocol; /*T=0: 2^0, T=1: 2^1*/ | 33 | __u32 protocol; /*T=0: 2^0, T=1: 2^1*/ |
| 32 | unsigned char flags; | 34 | unsigned char flags; |
| 33 | unsigned char pts1; | 35 | unsigned char pts1; |
| 34 | unsigned char pts2; | 36 | unsigned char pts2; |
diff --git a/include/linux/cn_proc.h b/include/linux/cn_proc.h index 1c86d65bc4b9..b8125b2eb665 100644 --- a/include/linux/cn_proc.h +++ b/include/linux/cn_proc.h | |||
| @@ -65,20 +65,20 @@ struct proc_event { | |||
| 65 | } ack; | 65 | } ack; |
| 66 | 66 | ||
| 67 | struct fork_proc_event { | 67 | struct fork_proc_event { |
| 68 | pid_t parent_pid; | 68 | __kernel_pid_t parent_pid; |
| 69 | pid_t parent_tgid; | 69 | __kernel_pid_t parent_tgid; |
| 70 | pid_t child_pid; | 70 | __kernel_pid_t child_pid; |
| 71 | pid_t child_tgid; | 71 | __kernel_pid_t child_tgid; |
| 72 | } fork; | 72 | } fork; |
| 73 | 73 | ||
| 74 | struct exec_proc_event { | 74 | struct exec_proc_event { |
| 75 | pid_t process_pid; | 75 | __kernel_pid_t process_pid; |
| 76 | pid_t process_tgid; | 76 | __kernel_pid_t process_tgid; |
| 77 | } exec; | 77 | } exec; |
| 78 | 78 | ||
| 79 | struct id_proc_event { | 79 | struct id_proc_event { |
| 80 | pid_t process_pid; | 80 | __kernel_pid_t process_pid; |
| 81 | pid_t process_tgid; | 81 | __kernel_pid_t process_tgid; |
| 82 | union { | 82 | union { |
| 83 | __u32 ruid; /* task uid */ | 83 | __u32 ruid; /* task uid */ |
| 84 | __u32 rgid; /* task gid */ | 84 | __u32 rgid; /* task gid */ |
| @@ -90,8 +90,8 @@ struct proc_event { | |||
| 90 | } id; | 90 | } id; |
| 91 | 91 | ||
| 92 | struct exit_proc_event { | 92 | struct exit_proc_event { |
| 93 | pid_t process_pid; | 93 | __kernel_pid_t process_pid; |
| 94 | pid_t process_tgid; | 94 | __kernel_pid_t process_tgid; |
| 95 | __u32 exit_code, exit_signal; | 95 | __u32 exit_code, exit_signal; |
| 96 | } exit; | 96 | } exit; |
| 97 | } event_data; | 97 | } event_data; |
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h index 07ae8f846055..5b5d4731f956 100644 --- a/include/linux/coda_psdev.h +++ b/include/linux/coda_psdev.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #define CODA_PSDEV_MAJOR 67 | 6 | #define CODA_PSDEV_MAJOR 67 |
| 7 | #define MAX_CODADEVS 5 /* how many do we allow */ | 7 | #define MAX_CODADEVS 5 /* how many do we allow */ |
| 8 | 8 | ||
| 9 | #ifdef __KERNEL__ | ||
| 9 | struct kstatfs; | 10 | struct kstatfs; |
| 10 | 11 | ||
| 11 | /* communication pending/processing queues */ | 12 | /* communication pending/processing queues */ |
| @@ -24,7 +25,6 @@ static inline struct venus_comm *coda_vcp(struct super_block *sb) | |||
| 24 | return (struct venus_comm *)((sb)->s_fs_info); | 25 | return (struct venus_comm *)((sb)->s_fs_info); |
| 25 | } | 26 | } |
| 26 | 27 | ||
| 27 | |||
| 28 | /* upcalls */ | 28 | /* upcalls */ |
| 29 | int venus_rootfid(struct super_block *sb, struct CodaFid *fidp); | 29 | int venus_rootfid(struct super_block *sb, struct CodaFid *fidp); |
| 30 | int venus_getattr(struct super_block *sb, struct CodaFid *fid, | 30 | int venus_getattr(struct super_block *sb, struct CodaFid *fid, |
| @@ -64,6 +64,12 @@ int coda_downcall(int opcode, union outputArgs *out, struct super_block *sb); | |||
| 64 | int venus_fsync(struct super_block *sb, struct CodaFid *fid); | 64 | int venus_fsync(struct super_block *sb, struct CodaFid *fid); |
| 65 | int venus_statfs(struct dentry *dentry, struct kstatfs *sfs); | 65 | int venus_statfs(struct dentry *dentry, struct kstatfs *sfs); |
| 66 | 66 | ||
| 67 | /* | ||
| 68 | * Statistics | ||
| 69 | */ | ||
| 70 | |||
| 71 | extern struct venus_comm coda_comms[]; | ||
| 72 | #endif /* __KERNEL__ */ | ||
| 67 | 73 | ||
| 68 | /* messages between coda filesystem in kernel and Venus */ | 74 | /* messages between coda filesystem in kernel and Venus */ |
| 69 | struct upc_req { | 75 | struct upc_req { |
| @@ -82,11 +88,4 @@ struct upc_req { | |||
| 82 | #define REQ_WRITE 0x4 | 88 | #define REQ_WRITE 0x4 |
| 83 | #define REQ_ABORT 0x8 | 89 | #define REQ_ABORT 0x8 |
| 84 | 90 | ||
| 85 | |||
| 86 | /* | ||
| 87 | * Statistics | ||
| 88 | */ | ||
| 89 | |||
| 90 | extern struct venus_comm coda_comms[]; | ||
| 91 | |||
| 92 | #endif | 91 | #endif |
diff --git a/include/linux/com20020.h b/include/linux/com20020.h index ac6d9a43e085..5dcfb944b6ce 100644 --- a/include/linux/com20020.h +++ b/include/linux/com20020.h | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | 29 | ||
| 30 | int com20020_check(struct net_device *dev); | 30 | int com20020_check(struct net_device *dev); |
| 31 | int com20020_found(struct net_device *dev, int shared); | 31 | int com20020_found(struct net_device *dev, int shared); |
| 32 | extern const struct net_device_ops com20020_netdev_ops; | ||
| 32 | 33 | ||
| 33 | /* The number of low I/O ports used by the card. */ | 34 | /* The number of low I/O ports used by the card. */ |
| 34 | #define ARCNET_TOTAL_SIZE 8 | 35 | #define ARCNET_TOTAL_SIZE 8 |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 1514d534deeb..a3ed7cb8ca34 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
| @@ -52,7 +52,15 @@ | |||
| 52 | #define __deprecated __attribute__((deprecated)) | 52 | #define __deprecated __attribute__((deprecated)) |
| 53 | #define __packed __attribute__((packed)) | 53 | #define __packed __attribute__((packed)) |
| 54 | #define __weak __attribute__((weak)) | 54 | #define __weak __attribute__((weak)) |
| 55 | #define __naked __attribute__((naked)) | 55 | |
| 56 | /* | ||
| 57 | * it doesn't make sense on ARM (currently the only user of __naked) to trace | ||
| 58 | * naked functions because then mcount is called without stack and frame pointer | ||
| 59 | * being set up and there is no chance to restore the lr register to the value | ||
| 60 | * before mcount was called. | ||
| 61 | */ | ||
| 62 | #define __naked __attribute__((naked)) notrace | ||
| 63 | |||
| 56 | #define __noreturn __attribute__((noreturn)) | 64 | #define __noreturn __attribute__((noreturn)) |
| 57 | 65 | ||
| 58 | /* | 66 | /* |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 09992718f9e8..450fa597c94d 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
| @@ -3,8 +3,10 @@ | |||
| 3 | #endif | 3 | #endif |
| 4 | 4 | ||
| 5 | /* GCC 4.1.[01] miscompiles __weak */ | 5 | /* GCC 4.1.[01] miscompiles __weak */ |
| 6 | #if __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ <= 1 | 6 | #ifdef __KERNEL__ |
| 7 | # error Your version of gcc miscompiles the __weak directive | 7 | # if __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ <= 1 |
| 8 | # error Your version of gcc miscompiles the __weak directive | ||
| 9 | # endif | ||
| 8 | #endif | 10 | #endif |
| 9 | 11 | ||
| 10 | #define __used __attribute__((__used__)) | 12 | #define __used __attribute__((__used__)) |
diff --git a/include/linux/connector.h b/include/linux/connector.h index 34f2789d9b9b..fc65d219d88c 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
| @@ -109,6 +109,12 @@ struct cn_queue_dev { | |||
| 109 | unsigned char name[CN_CBQ_NAMELEN]; | 109 | unsigned char name[CN_CBQ_NAMELEN]; |
| 110 | 110 | ||
| 111 | struct workqueue_struct *cn_queue; | 111 | struct workqueue_struct *cn_queue; |
| 112 | /* Sent to kevent to create cn_queue only when needed */ | ||
| 113 | struct work_struct wq_creation; | ||
| 114 | /* Tell if the wq_creation job is pending/completed */ | ||
| 115 | atomic_t wq_requested; | ||
| 116 | /* Wait for cn_queue to be created */ | ||
| 117 | wait_queue_head_t wq_created; | ||
| 112 | 118 | ||
| 113 | struct list_head queue_list; | 119 | struct list_head queue_list; |
| 114 | spinlock_t queue_lock; | 120 | spinlock_t queue_lock; |
| @@ -164,6 +170,8 @@ int cn_netlink_send(struct cn_msg *, u32, gfp_t); | |||
| 164 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); | 170 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); |
| 165 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | 171 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); |
| 166 | 172 | ||
| 173 | int queue_cn_work(struct cn_callback_entry *cbq, struct work_struct *work); | ||
| 174 | |||
| 167 | struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *); | 175 | struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *); |
| 168 | void cn_queue_free_dev(struct cn_queue_dev *dev); | 176 | void cn_queue_free_dev(struct cn_queue_dev *dev); |
| 169 | 177 | ||
diff --git a/include/linux/console.h b/include/linux/console.h index a67a90cf8268..dcca5339ceb3 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
| @@ -137,8 +137,8 @@ extern void resume_console(void); | |||
| 137 | int mda_console_init(void); | 137 | int mda_console_init(void); |
| 138 | void prom_con_init(void); | 138 | void prom_con_init(void); |
| 139 | 139 | ||
| 140 | void vcs_make_sysfs(struct tty_struct *tty); | 140 | void vcs_make_sysfs(int index); |
| 141 | void vcs_remove_sysfs(struct tty_struct *tty); | 141 | void vcs_remove_sysfs(int index); |
| 142 | 142 | ||
| 143 | /* Some debug stub to catch some of the obvious races in the VT code */ | 143 | /* Some debug stub to catch some of the obvious races in the VT code */ |
| 144 | #if 1 | 144 | #if 1 |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 384b38d3e8e2..161042746afc 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -234,7 +234,6 @@ struct cpufreq_driver { | |||
| 234 | int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg); | 234 | int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg); |
| 235 | int (*resume) (struct cpufreq_policy *policy); | 235 | int (*resume) (struct cpufreq_policy *policy); |
| 236 | struct freq_attr **attr; | 236 | struct freq_attr **attr; |
| 237 | bool hide_interface; | ||
| 238 | }; | 237 | }; |
| 239 | 238 | ||
| 240 | /* flags */ | 239 | /* flags */ |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 3bacd71509fb..ec29fa268b94 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #define CRYPTO_ALG_TYPE_SHASH 0x00000009 | 40 | #define CRYPTO_ALG_TYPE_SHASH 0x00000009 |
| 41 | #define CRYPTO_ALG_TYPE_AHASH 0x0000000a | 41 | #define CRYPTO_ALG_TYPE_AHASH 0x0000000a |
| 42 | #define CRYPTO_ALG_TYPE_RNG 0x0000000c | 42 | #define CRYPTO_ALG_TYPE_RNG 0x0000000c |
| 43 | #define CRYPTO_ALG_TYPE_PCOMPRESS 0x0000000f | ||
| 43 | 44 | ||
| 44 | #define CRYPTO_ALG_TYPE_HASH_MASK 0x0000000e | 45 | #define CRYPTO_ALG_TYPE_HASH_MASK 0x0000000e |
| 45 | #define CRYPTO_ALG_TYPE_AHASH_MASK 0x0000000c | 46 | #define CRYPTO_ALG_TYPE_AHASH_MASK 0x0000000c |
| @@ -548,11 +549,13 @@ struct crypto_attr_u32 { | |||
| 548 | * Transform user interface. | 549 | * Transform user interface. |
| 549 | */ | 550 | */ |
| 550 | 551 | ||
| 551 | struct crypto_tfm *crypto_alloc_tfm(const char *alg_name, | ||
| 552 | const struct crypto_type *frontend, | ||
| 553 | u32 type, u32 mask); | ||
| 554 | struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask); | 552 | struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask); |
| 555 | void crypto_free_tfm(struct crypto_tfm *tfm); | 553 | void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm); |
| 554 | |||
| 555 | static inline void crypto_free_tfm(struct crypto_tfm *tfm) | ||
| 556 | { | ||
| 557 | return crypto_destroy_tfm(tfm, tfm); | ||
| 558 | } | ||
| 556 | 559 | ||
| 557 | int alg_test(const char *driver, const char *alg, u32 type, u32 mask); | 560 | int alg_test(const char *driver, const char *alg, u32 type, u32 mask); |
| 558 | 561 | ||
diff --git a/include/linux/cyclades.h b/include/linux/cyclades.h index d06fbf286346..788850ba4e75 100644 --- a/include/linux/cyclades.h +++ b/include/linux/cyclades.h | |||
| @@ -82,9 +82,9 @@ struct cyclades_monitor { | |||
| 82 | * open) | 82 | * open) |
| 83 | */ | 83 | */ |
| 84 | struct cyclades_idle_stats { | 84 | struct cyclades_idle_stats { |
| 85 | time_t in_use; /* Time device has been in use (secs) */ | 85 | __kernel_time_t in_use; /* Time device has been in use (secs) */ |
| 86 | time_t recv_idle; /* Time since last char received (secs) */ | 86 | __kernel_time_t recv_idle; /* Time since last char received (secs) */ |
| 87 | time_t xmit_idle; /* Time since last char transmitted (secs) */ | 87 | __kernel_time_t xmit_idle; /* Time since last char transmitted (secs) */ |
| 88 | unsigned long recv_bytes; /* Bytes received */ | 88 | unsigned long recv_bytes; /* Bytes received */ |
| 89 | unsigned long xmit_bytes; /* Bytes transmitted */ | 89 | unsigned long xmit_bytes; /* Bytes transmitted */ |
| 90 | unsigned long overruns; /* Input overruns */ | 90 | unsigned long overruns; /* Input overruns */ |
diff --git a/include/linux/dca.h b/include/linux/dca.h index b00a753eda53..9c20c7e87d0a 100644 --- a/include/linux/dca.h +++ b/include/linux/dca.h | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | /* | ||
| 2 | * Copyright(c) 2007 - 2009 Intel Corporation. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms of the GNU General Public License as published by the Free | ||
| 6 | * Software Foundation; either version 2 of the License, or (at your option) | ||
| 7 | * any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License along with | ||
| 15 | * this program; if not, write to the Free Software Foundation, Inc., 59 | ||
| 16 | * Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
| 17 | * | ||
| 18 | * The full GNU General Public License is included in this distribution in the | ||
| 19 | * file called COPYING. | ||
| 20 | */ | ||
| 1 | #ifndef DCA_H | 21 | #ifndef DCA_H |
| 2 | #define DCA_H | 22 | #define DCA_H |
| 3 | /* DCA Provider API */ | 23 | /* DCA Provider API */ |
diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h index b0ef274e0031..7d2e10006188 100644 --- a/include/linux/dcbnl.h +++ b/include/linux/dcbnl.h | |||
| @@ -20,10 +20,12 @@ | |||
| 20 | #ifndef __LINUX_DCBNL_H__ | 20 | #ifndef __LINUX_DCBNL_H__ |
| 21 | #define __LINUX_DCBNL_H__ | 21 | #define __LINUX_DCBNL_H__ |
| 22 | 22 | ||
| 23 | #include <linux/types.h> | ||
| 24 | |||
| 23 | #define DCB_PROTO_VERSION 1 | 25 | #define DCB_PROTO_VERSION 1 |
| 24 | 26 | ||
| 25 | struct dcbmsg { | 27 | struct dcbmsg { |
| 26 | unsigned char dcb_family; | 28 | __u8 dcb_family; |
| 27 | __u8 cmd; | 29 | __u8 cmd; |
| 28 | __u16 dcb_pad; | 30 | __u16 dcb_pad; |
| 29 | }; | 31 | }; |
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 61734e27abb7..7434a8353e23 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
| @@ -355,46 +355,6 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb) | |||
| 355 | return __dccp_hdr_len(dccp_hdr(skb)); | 355 | return __dccp_hdr_len(dccp_hdr(skb)); |
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | |||
| 359 | /* initial values for each feature */ | ||
| 360 | #define DCCPF_INITIAL_SEQUENCE_WINDOW 100 | ||
| 361 | #define DCCPF_INITIAL_ACK_RATIO 2 | ||
| 362 | #define DCCPF_INITIAL_CCID DCCPC_CCID2 | ||
| 363 | /* FIXME: for now we're default to 1 but it should really be 0 */ | ||
| 364 | #define DCCPF_INITIAL_SEND_NDP_COUNT 1 | ||
| 365 | |||
| 366 | /** | ||
| 367 | * struct dccp_minisock - Minimal DCCP connection representation | ||
| 368 | * | ||
| 369 | * Will be used to pass the state from dccp_request_sock to dccp_sock. | ||
| 370 | * | ||
| 371 | * @dccpms_sequence_window - Sequence Window Feature (section 7.5.2) | ||
| 372 | * @dccpms_pending - List of features being negotiated | ||
| 373 | * @dccpms_conf - | ||
| 374 | */ | ||
| 375 | struct dccp_minisock { | ||
| 376 | __u64 dccpms_sequence_window; | ||
| 377 | struct list_head dccpms_pending; | ||
| 378 | struct list_head dccpms_conf; | ||
| 379 | }; | ||
| 380 | |||
| 381 | struct dccp_opt_conf { | ||
| 382 | __u8 *dccpoc_val; | ||
| 383 | __u8 dccpoc_len; | ||
| 384 | }; | ||
| 385 | |||
| 386 | struct dccp_opt_pend { | ||
| 387 | struct list_head dccpop_node; | ||
| 388 | __u8 dccpop_type; | ||
| 389 | __u8 dccpop_feat; | ||
| 390 | __u8 *dccpop_val; | ||
| 391 | __u8 dccpop_len; | ||
| 392 | int dccpop_conf; | ||
| 393 | struct dccp_opt_conf *dccpop_sc; | ||
| 394 | }; | ||
| 395 | |||
| 396 | extern void dccp_minisock_init(struct dccp_minisock *dmsk); | ||
| 397 | |||
| 398 | /** | 358 | /** |
| 399 | * struct dccp_request_sock - represent DCCP-specific connection request | 359 | * struct dccp_request_sock - represent DCCP-specific connection request |
| 400 | * @dreq_inet_rsk: structure inherited from | 360 | * @dreq_inet_rsk: structure inherited from |
| @@ -483,13 +443,14 @@ struct dccp_ackvec; | |||
| 483 | * @dccps_timestamp_time - time of receiving latest @dccps_timestamp_echo | 443 | * @dccps_timestamp_time - time of receiving latest @dccps_timestamp_echo |
| 484 | * @dccps_l_ack_ratio - feature-local Ack Ratio | 444 | * @dccps_l_ack_ratio - feature-local Ack Ratio |
| 485 | * @dccps_r_ack_ratio - feature-remote Ack Ratio | 445 | * @dccps_r_ack_ratio - feature-remote Ack Ratio |
| 446 | * @dccps_l_seq_win - local Sequence Window (influences ack number validity) | ||
| 447 | * @dccps_r_seq_win - remote Sequence Window (influences seq number validity) | ||
| 486 | * @dccps_pcslen - sender partial checksum coverage (via sockopt) | 448 | * @dccps_pcslen - sender partial checksum coverage (via sockopt) |
| 487 | * @dccps_pcrlen - receiver partial checksum coverage (via sockopt) | 449 | * @dccps_pcrlen - receiver partial checksum coverage (via sockopt) |
| 488 | * @dccps_send_ndp_count - local Send NDP Count feature (7.7.2) | 450 | * @dccps_send_ndp_count - local Send NDP Count feature (7.7.2) |
| 489 | * @dccps_ndp_count - number of Non Data Packets since last data packet | 451 | * @dccps_ndp_count - number of Non Data Packets since last data packet |
| 490 | * @dccps_mss_cache - current value of MSS (path MTU minus header sizes) | 452 | * @dccps_mss_cache - current value of MSS (path MTU minus header sizes) |
| 491 | * @dccps_rate_last - timestamp for rate-limiting DCCP-Sync (RFC 4340, 7.5.4) | 453 | * @dccps_rate_last - timestamp for rate-limiting DCCP-Sync (RFC 4340, 7.5.4) |
| 492 | * @dccps_minisock - associated minisock (accessed via dccp_msk) | ||
| 493 | * @dccps_featneg - tracks feature-negotiation state (mostly during handshake) | 454 | * @dccps_featneg - tracks feature-negotiation state (mostly during handshake) |
| 494 | * @dccps_hc_rx_ackvec - rx half connection ack vector | 455 | * @dccps_hc_rx_ackvec - rx half connection ack vector |
| 495 | * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection) | 456 | * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection) |
| @@ -523,12 +484,13 @@ struct dccp_sock { | |||
| 523 | __u32 dccps_timestamp_time; | 484 | __u32 dccps_timestamp_time; |
| 524 | __u16 dccps_l_ack_ratio; | 485 | __u16 dccps_l_ack_ratio; |
| 525 | __u16 dccps_r_ack_ratio; | 486 | __u16 dccps_r_ack_ratio; |
| 487 | __u64 dccps_l_seq_win:48; | ||
| 488 | __u64 dccps_r_seq_win:48; | ||
| 526 | __u8 dccps_pcslen:4; | 489 | __u8 dccps_pcslen:4; |
| 527 | __u8 dccps_pcrlen:4; | 490 | __u8 dccps_pcrlen:4; |
| 528 | __u8 dccps_send_ndp_count:1; | 491 | __u8 dccps_send_ndp_count:1; |
| 529 | __u64 dccps_ndp_count:48; | 492 | __u64 dccps_ndp_count:48; |
| 530 | unsigned long dccps_rate_last; | 493 | unsigned long dccps_rate_last; |
| 531 | struct dccp_minisock dccps_minisock; | ||
| 532 | struct list_head dccps_featneg; | 494 | struct list_head dccps_featneg; |
| 533 | struct dccp_ackvec *dccps_hc_rx_ackvec; | 495 | struct dccp_ackvec *dccps_hc_rx_ackvec; |
| 534 | struct ccid *dccps_hc_rx_ccid; | 496 | struct ccid *dccps_hc_rx_ccid; |
| @@ -546,11 +508,6 @@ static inline struct dccp_sock *dccp_sk(const struct sock *sk) | |||
| 546 | return (struct dccp_sock *)sk; | 508 | return (struct dccp_sock *)sk; |
| 547 | } | 509 | } |
| 548 | 510 | ||
| 549 | static inline struct dccp_minisock *dccp_msk(const struct sock *sk) | ||
| 550 | { | ||
| 551 | return (struct dccp_minisock *)&dccp_sk(sk)->dccps_minisock; | ||
| 552 | } | ||
| 553 | |||
| 554 | static inline const char *dccp_role(const struct sock *sk) | 511 | static inline const char *dccp_role(const struct sock *sk) |
| 555 | { | 512 | { |
| 556 | switch (dccp_sk(sk)->dccps_role) { | 513 | switch (dccp_sk(sk)->dccps_role) { |
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 23936b16426b..af0e01d4c663 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
| @@ -162,6 +162,13 @@ static inline struct dentry *debugfs_create_x32(const char *name, mode_t mode, | |||
| 162 | return ERR_PTR(-ENODEV); | 162 | return ERR_PTR(-ENODEV); |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | static inline struct dentry *debugfs_create_size_t(const char *name, mode_t mode, | ||
| 166 | struct dentry *parent, | ||
| 167 | size_t *value) | ||
| 168 | { | ||
| 169 | return ERR_PTR(-ENODEV); | ||
| 170 | } | ||
| 171 | |||
| 165 | static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode, | 172 | static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode, |
| 166 | struct dentry *parent, | 173 | struct dentry *parent, |
| 167 | u32 *value) | 174 | u32 *value) |
diff --git a/include/linux/device.h b/include/linux/device.h index 45e5b1921fbb..2918c0e8fdfd 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #define BUS_ID_SIZE 20 | 28 | #define BUS_ID_SIZE 20 |
| 29 | 29 | ||
| 30 | struct device; | 30 | struct device; |
| 31 | struct device_private; | ||
| 31 | struct device_driver; | 32 | struct device_driver; |
| 32 | struct driver_private; | 33 | struct driver_private; |
| 33 | struct class; | 34 | struct class; |
| @@ -147,6 +148,8 @@ extern void put_driver(struct device_driver *drv); | |||
| 147 | extern struct device_driver *driver_find(const char *name, | 148 | extern struct device_driver *driver_find(const char *name, |
| 148 | struct bus_type *bus); | 149 | struct bus_type *bus); |
| 149 | extern int driver_probe_done(void); | 150 | extern int driver_probe_done(void); |
| 151 | extern void wait_for_device_probe(void); | ||
| 152 | |||
| 150 | 153 | ||
| 151 | /* sysfs interface for exporting driver attributes */ | 154 | /* sysfs interface for exporting driver attributes */ |
| 152 | 155 | ||
| @@ -365,15 +368,11 @@ struct device_dma_parameters { | |||
| 365 | }; | 368 | }; |
| 366 | 369 | ||
| 367 | struct device { | 370 | struct device { |
| 368 | struct klist klist_children; | ||
| 369 | struct klist_node knode_parent; /* node in sibling list */ | ||
| 370 | struct klist_node knode_driver; | ||
| 371 | struct klist_node knode_bus; | ||
| 372 | struct device *parent; | 371 | struct device *parent; |
| 373 | 372 | ||
| 373 | struct device_private *p; | ||
| 374 | |||
| 374 | struct kobject kobj; | 375 | struct kobject kobj; |
| 375 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ | ||
| 376 | unsigned uevent_suppress:1; | ||
| 377 | const char *init_name; /* initial name of the device */ | 376 | const char *init_name; /* initial name of the device */ |
| 378 | struct device_type *type; | 377 | struct device_type *type; |
| 379 | 378 | ||
| @@ -385,8 +384,13 @@ struct device { | |||
| 385 | struct device_driver *driver; /* which driver has allocated this | 384 | struct device_driver *driver; /* which driver has allocated this |
| 386 | device */ | 385 | device */ |
| 387 | void *driver_data; /* data private to the driver */ | 386 | void *driver_data; /* data private to the driver */ |
| 388 | void *platform_data; /* Platform specific data, device | 387 | |
| 389 | core doesn't touch it */ | 388 | void *platform_data; /* We will remove platform_data |
| 389 | field if all platform devices | ||
| 390 | pass its platform specific data | ||
| 391 | from platform_device->platform_data, | ||
| 392 | other kind of devices should not | ||
| 393 | use platform_data. */ | ||
| 390 | struct dev_pm_info power; | 394 | struct dev_pm_info power; |
| 391 | 395 | ||
| 392 | #ifdef CONFIG_NUMA | 396 | #ifdef CONFIG_NUMA |
| @@ -425,8 +429,7 @@ struct device { | |||
| 425 | 429 | ||
| 426 | static inline const char *dev_name(const struct device *dev) | 430 | static inline const char *dev_name(const struct device *dev) |
| 427 | { | 431 | { |
| 428 | /* will be changed into kobject_name(&dev->kobj) in the near future */ | 432 | return kobject_name(&dev->kobj); |
| 429 | return dev->bus_id; | ||
| 430 | } | 433 | } |
| 431 | 434 | ||
| 432 | extern int dev_set_name(struct device *dev, const char *name, ...) | 435 | extern int dev_set_name(struct device *dev, const char *name, ...) |
| @@ -461,6 +464,16 @@ static inline void dev_set_drvdata(struct device *dev, void *data) | |||
| 461 | dev->driver_data = data; | 464 | dev->driver_data = data; |
| 462 | } | 465 | } |
| 463 | 466 | ||
| 467 | static inline unsigned int dev_get_uevent_suppress(const struct device *dev) | ||
| 468 | { | ||
| 469 | return dev->kobj.uevent_suppress; | ||
| 470 | } | ||
| 471 | |||
| 472 | static inline void dev_set_uevent_suppress(struct device *dev, int val) | ||
| 473 | { | ||
| 474 | dev->kobj.uevent_suppress = val; | ||
| 475 | } | ||
| 476 | |||
| 464 | static inline int device_is_registered(struct device *dev) | 477 | static inline int device_is_registered(struct device *dev) |
| 465 | { | 478 | { |
| 466 | return dev->kobj.state_in_sysfs; | 479 | return dev->kobj.state_in_sysfs; |
| @@ -481,7 +494,8 @@ extern int device_for_each_child(struct device *dev, void *data, | |||
| 481 | extern struct device *device_find_child(struct device *dev, void *data, | 494 | extern struct device *device_find_child(struct device *dev, void *data, |
| 482 | int (*match)(struct device *dev, void *data)); | 495 | int (*match)(struct device *dev, void *data)); |
| 483 | extern int device_rename(struct device *dev, char *new_name); | 496 | extern int device_rename(struct device *dev, char *new_name); |
| 484 | extern int device_move(struct device *dev, struct device *new_parent); | 497 | extern int device_move(struct device *dev, struct device *new_parent, |
| 498 | enum dpm_order dpm_order); | ||
| 485 | 499 | ||
| 486 | /* | 500 | /* |
| 487 | * Root device objects for grouping under /sys/devices | 501 | * Root device objects for grouping under /sys/devices |
| @@ -568,7 +582,7 @@ extern const char *dev_driver_string(const struct device *dev); | |||
| 568 | #if defined(DEBUG) | 582 | #if defined(DEBUG) |
| 569 | #define dev_dbg(dev, format, arg...) \ | 583 | #define dev_dbg(dev, format, arg...) \ |
| 570 | dev_printk(KERN_DEBUG , dev , format , ## arg) | 584 | dev_printk(KERN_DEBUG , dev , format , ## arg) |
| 571 | #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 585 | #elif defined(CONFIG_DYNAMIC_DEBUG) |
| 572 | #define dev_dbg(dev, format, ...) do { \ | 586 | #define dev_dbg(dev, format, ...) do { \ |
| 573 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ | 587 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ |
| 574 | } while (0) | 588 | } while (0) |
diff --git a/include/linux/dlm_netlink.h b/include/linux/dlm_netlink.h index 19276332707a..647c8ef27227 100644 --- a/include/linux/dlm_netlink.h +++ b/include/linux/dlm_netlink.h | |||
| @@ -9,6 +9,8 @@ | |||
| 9 | #ifndef _DLM_NETLINK_H | 9 | #ifndef _DLM_NETLINK_H |
| 10 | #define _DLM_NETLINK_H | 10 | #define _DLM_NETLINK_H |
| 11 | 11 | ||
| 12 | #include <linux/types.h> | ||
| 13 | |||
| 12 | enum { | 14 | enum { |
| 13 | DLM_STATUS_WAITING = 1, | 15 | DLM_STATUS_WAITING = 1, |
| 14 | DLM_STATUS_GRANTED = 2, | 16 | DLM_STATUS_GRANTED = 2, |
| @@ -18,16 +20,16 @@ enum { | |||
| 18 | #define DLM_LOCK_DATA_VERSION 1 | 20 | #define DLM_LOCK_DATA_VERSION 1 |
| 19 | 21 | ||
| 20 | struct dlm_lock_data { | 22 | struct dlm_lock_data { |
| 21 | uint16_t version; | 23 | __u16 version; |
| 22 | uint32_t lockspace_id; | 24 | __u32 lockspace_id; |
| 23 | int nodeid; | 25 | int nodeid; |
| 24 | int ownpid; | 26 | int ownpid; |
| 25 | uint32_t id; | 27 | __u32 id; |
| 26 | uint32_t remid; | 28 | __u32 remid; |
| 27 | uint64_t xid; | 29 | __u64 xid; |
| 28 | int8_t status; | 30 | __s8 status; |
| 29 | int8_t grmode; | 31 | __s8 grmode; |
| 30 | int8_t rqmode; | 32 | __s8 rqmode; |
| 31 | unsigned long timestamp; | 33 | unsigned long timestamp; |
| 32 | int resource_namelen; | 34 | int resource_namelen; |
| 33 | char resource_name[DLM_RESNAME_MAXLEN]; | 35 | char resource_name[DLM_RESNAME_MAXLEN]; |
diff --git a/include/linux/dlm_plock.h b/include/linux/dlm_plock.h index 18d5fdbceb74..2dd21243104f 100644 --- a/include/linux/dlm_plock.h +++ b/include/linux/dlm_plock.h | |||
| @@ -9,6 +9,8 @@ | |||
| 9 | #ifndef __DLM_PLOCK_DOT_H__ | 9 | #ifndef __DLM_PLOCK_DOT_H__ |
| 10 | #define __DLM_PLOCK_DOT_H__ | 10 | #define __DLM_PLOCK_DOT_H__ |
| 11 | 11 | ||
| 12 | #include <linux/types.h> | ||
| 13 | |||
| 12 | #define DLM_PLOCK_MISC_NAME "dlm_plock" | 14 | #define DLM_PLOCK_MISC_NAME "dlm_plock" |
| 13 | 15 | ||
| 14 | #define DLM_PLOCK_VERSION_MAJOR 1 | 16 | #define DLM_PLOCK_VERSION_MAJOR 1 |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 28c2940eb30d..48e44ee2b466 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
| @@ -113,20 +113,20 @@ struct dm_ioctl { | |||
| 113 | * return -ENOTTY) fill out this field, even if the | 113 | * return -ENOTTY) fill out this field, even if the |
| 114 | * command failed. | 114 | * command failed. |
| 115 | */ | 115 | */ |
| 116 | uint32_t version[3]; /* in/out */ | 116 | __u32 version[3]; /* in/out */ |
| 117 | uint32_t data_size; /* total size of data passed in | 117 | __u32 data_size; /* total size of data passed in |
| 118 | * including this struct */ | 118 | * including this struct */ |
| 119 | 119 | ||
| 120 | uint32_t data_start; /* offset to start of data | 120 | __u32 data_start; /* offset to start of data |
| 121 | * relative to start of this struct */ | 121 | * relative to start of this struct */ |
| 122 | 122 | ||
| 123 | uint32_t target_count; /* in/out */ | 123 | __u32 target_count; /* in/out */ |
| 124 | int32_t open_count; /* out */ | 124 | __s32 open_count; /* out */ |
| 125 | uint32_t flags; /* in/out */ | 125 | __u32 flags; /* in/out */ |
| 126 | uint32_t event_nr; /* in/out */ | 126 | __u32 event_nr; /* in/out */ |
| 127 | uint32_t padding; | 127 | __u32 padding; |
| 128 | 128 | ||
| 129 | uint64_t dev; /* in/out */ | 129 | __u64 dev; /* in/out */ |
| 130 | 130 | ||
| 131 | char name[DM_NAME_LEN]; /* device name */ | 131 | char name[DM_NAME_LEN]; /* device name */ |
| 132 | char uuid[DM_UUID_LEN]; /* unique identifier for | 132 | char uuid[DM_UUID_LEN]; /* unique identifier for |
| @@ -139,9 +139,9 @@ struct dm_ioctl { | |||
| 139 | * dm_ioctl. | 139 | * dm_ioctl. |
| 140 | */ | 140 | */ |
| 141 | struct dm_target_spec { | 141 | struct dm_target_spec { |
| 142 | uint64_t sector_start; | 142 | __u64 sector_start; |
| 143 | uint64_t length; | 143 | __u64 length; |
| 144 | int32_t status; /* used when reading from kernel only */ | 144 | __s32 status; /* used when reading from kernel only */ |
| 145 | 145 | ||
| 146 | /* | 146 | /* |
| 147 | * Location of the next dm_target_spec. | 147 | * Location of the next dm_target_spec. |
| @@ -153,7 +153,7 @@ struct dm_target_spec { | |||
| 153 | * (that follows the dm_ioctl struct) to the start of the "next" | 153 | * (that follows the dm_ioctl struct) to the start of the "next" |
| 154 | * dm_target_spec. | 154 | * dm_target_spec. |
| 155 | */ | 155 | */ |
| 156 | uint32_t next; | 156 | __u32 next; |
| 157 | 157 | ||
| 158 | char target_type[DM_MAX_TYPE_NAME]; | 158 | char target_type[DM_MAX_TYPE_NAME]; |
| 159 | 159 | ||
| @@ -168,17 +168,17 @@ struct dm_target_spec { | |||
| 168 | * Used to retrieve the target dependencies. | 168 | * Used to retrieve the target dependencies. |
| 169 | */ | 169 | */ |
| 170 | struct dm_target_deps { | 170 | struct dm_target_deps { |
| 171 | uint32_t count; /* Array size */ | 171 | __u32 count; /* Array size */ |
| 172 | uint32_t padding; /* unused */ | 172 | __u32 padding; /* unused */ |
| 173 | uint64_t dev[0]; /* out */ | 173 | __u64 dev[0]; /* out */ |
| 174 | }; | 174 | }; |
| 175 | 175 | ||
| 176 | /* | 176 | /* |
| 177 | * Used to get a list of all dm devices. | 177 | * Used to get a list of all dm devices. |
| 178 | */ | 178 | */ |
| 179 | struct dm_name_list { | 179 | struct dm_name_list { |
| 180 | uint64_t dev; | 180 | __u64 dev; |
| 181 | uint32_t next; /* offset to the next record from | 181 | __u32 next; /* offset to the next record from |
| 182 | the _start_ of this */ | 182 | the _start_ of this */ |
| 183 | char name[0]; | 183 | char name[0]; |
| 184 | }; | 184 | }; |
| @@ -187,8 +187,8 @@ struct dm_name_list { | |||
| 187 | * Used to retrieve the target versions | 187 | * Used to retrieve the target versions |
| 188 | */ | 188 | */ |
| 189 | struct dm_target_versions { | 189 | struct dm_target_versions { |
| 190 | uint32_t next; | 190 | __u32 next; |
| 191 | uint32_t version[3]; | 191 | __u32 version[3]; |
| 192 | 192 | ||
| 193 | char name[0]; | 193 | char name[0]; |
| 194 | }; | 194 | }; |
| @@ -197,7 +197,7 @@ struct dm_target_versions { | |||
| 197 | * Used to pass message to a target | 197 | * Used to pass message to a target |
| 198 | */ | 198 | */ |
| 199 | struct dm_target_msg { | 199 | struct dm_target_msg { |
| 200 | uint64_t sector; /* Device sector */ | 200 | __u64 sector; /* Device sector */ |
| 201 | 201 | ||
| 202 | char message[0]; | 202 | char message[0]; |
| 203 | }; | 203 | }; |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index c73f1e2b59b7..1956c8d46d32 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -97,7 +97,6 @@ typedef struct { DECLARE_BITMAP(bits, DMA_TX_TYPE_END); } dma_cap_mask_t; | |||
| 97 | 97 | ||
| 98 | /** | 98 | /** |
| 99 | * struct dma_chan_percpu - the per-CPU part of struct dma_chan | 99 | * struct dma_chan_percpu - the per-CPU part of struct dma_chan |
| 100 | * @refcount: local_t used for open-coded "bigref" counting | ||
| 101 | * @memcpy_count: transaction counter | 100 | * @memcpy_count: transaction counter |
| 102 | * @bytes_transferred: byte counter | 101 | * @bytes_transferred: byte counter |
| 103 | */ | 102 | */ |
| @@ -114,13 +113,11 @@ struct dma_chan_percpu { | |||
| 114 | * @cookie: last cookie value returned to client | 113 | * @cookie: last cookie value returned to client |
| 115 | * @chan_id: channel ID for sysfs | 114 | * @chan_id: channel ID for sysfs |
| 116 | * @dev: class device for sysfs | 115 | * @dev: class device for sysfs |
| 117 | * @refcount: kref, used in "bigref" slow-mode | ||
| 118 | * @slow_ref: indicates that the DMA channel is free | ||
| 119 | * @rcu: the DMA channel's RCU head | ||
| 120 | * @device_node: used to add this to the device chan list | 116 | * @device_node: used to add this to the device chan list |
| 121 | * @local: per-cpu pointer to a struct dma_chan_percpu | 117 | * @local: per-cpu pointer to a struct dma_chan_percpu |
| 122 | * @client-count: how many clients are using this channel | 118 | * @client-count: how many clients are using this channel |
| 123 | * @table_count: number of appearances in the mem-to-mem allocation table | 119 | * @table_count: number of appearances in the mem-to-mem allocation table |
| 120 | * @private: private data for certain client-channel associations | ||
| 124 | */ | 121 | */ |
| 125 | struct dma_chan { | 122 | struct dma_chan { |
| 126 | struct dma_device *device; | 123 | struct dma_device *device; |
| @@ -134,6 +131,7 @@ struct dma_chan { | |||
| 134 | struct dma_chan_percpu *local; | 131 | struct dma_chan_percpu *local; |
| 135 | int client_count; | 132 | int client_count; |
| 136 | int table_count; | 133 | int table_count; |
| 134 | void *private; | ||
| 137 | }; | 135 | }; |
| 138 | 136 | ||
| 139 | /** | 137 | /** |
| @@ -211,8 +209,6 @@ struct dma_async_tx_descriptor { | |||
| 211 | * @global_node: list_head for global dma_device_list | 209 | * @global_node: list_head for global dma_device_list |
| 212 | * @cap_mask: one or more dma_capability flags | 210 | * @cap_mask: one or more dma_capability flags |
| 213 | * @max_xor: maximum number of xor sources, 0 if no capability | 211 | * @max_xor: maximum number of xor sources, 0 if no capability |
| 214 | * @refcount: reference count | ||
| 215 | * @done: IO completion struct | ||
| 216 | * @dev_id: unique device ID | 212 | * @dev_id: unique device ID |
| 217 | * @dev: struct device reference for dma mapping api | 213 | * @dev: struct device reference for dma mapping api |
| 218 | * @device_alloc_chan_resources: allocate resources and return the | 214 | * @device_alloc_chan_resources: allocate resources and return the |
| @@ -225,6 +221,7 @@ struct dma_async_tx_descriptor { | |||
| 225 | * @device_prep_dma_interrupt: prepares an end of chain interrupt operation | 221 | * @device_prep_dma_interrupt: prepares an end of chain interrupt operation |
| 226 | * @device_prep_slave_sg: prepares a slave dma operation | 222 | * @device_prep_slave_sg: prepares a slave dma operation |
| 227 | * @device_terminate_all: terminate all pending operations | 223 | * @device_terminate_all: terminate all pending operations |
| 224 | * @device_is_tx_complete: poll for transaction completion | ||
| 228 | * @device_issue_pending: push pending transactions to hardware | 225 | * @device_issue_pending: push pending transactions to hardware |
| 229 | */ | 226 | */ |
| 230 | struct dma_device { | 227 | struct dma_device { |
| @@ -282,6 +279,18 @@ static inline void dmaengine_put(void) | |||
| 282 | } | 279 | } |
| 283 | #endif | 280 | #endif |
| 284 | 281 | ||
| 282 | #ifdef CONFIG_NET_DMA | ||
| 283 | #define net_dmaengine_get() dmaengine_get() | ||
| 284 | #define net_dmaengine_put() dmaengine_put() | ||
| 285 | #else | ||
| 286 | static inline void net_dmaengine_get(void) | ||
| 287 | { | ||
| 288 | } | ||
| 289 | static inline void net_dmaengine_put(void) | ||
| 290 | { | ||
| 291 | } | ||
| 292 | #endif | ||
| 293 | |||
| 285 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, | 294 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, |
| 286 | void *dest, void *src, size_t len); | 295 | void *dest, void *src, size_t len); |
| 287 | dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, | 296 | dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, |
| @@ -297,6 +306,11 @@ static inline void async_tx_ack(struct dma_async_tx_descriptor *tx) | |||
| 297 | tx->flags |= DMA_CTRL_ACK; | 306 | tx->flags |= DMA_CTRL_ACK; |
| 298 | } | 307 | } |
| 299 | 308 | ||
| 309 | static inline void async_tx_clear_ack(struct dma_async_tx_descriptor *tx) | ||
| 310 | { | ||
| 311 | tx->flags &= ~DMA_CTRL_ACK; | ||
| 312 | } | ||
| 313 | |||
| 300 | static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx) | 314 | static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx) |
| 301 | { | 315 | { |
| 302 | return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK; | 316 | return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK; |
| @@ -400,11 +414,16 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie, | |||
| 400 | enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); | 414 | enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); |
| 401 | #ifdef CONFIG_DMA_ENGINE | 415 | #ifdef CONFIG_DMA_ENGINE |
| 402 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); | 416 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); |
| 417 | void dma_issue_pending_all(void); | ||
| 403 | #else | 418 | #else |
| 404 | static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) | 419 | static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) |
| 405 | { | 420 | { |
| 406 | return DMA_SUCCESS; | 421 | return DMA_SUCCESS; |
| 407 | } | 422 | } |
| 423 | static inline void dma_issue_pending_all(void) | ||
| 424 | { | ||
| 425 | do { } while (0); | ||
| 426 | } | ||
| 408 | #endif | 427 | #endif |
| 409 | 428 | ||
| 410 | /* --- DMA device --- */ | 429 | /* --- DMA device --- */ |
| @@ -413,7 +432,6 @@ int dma_async_device_register(struct dma_device *device); | |||
| 413 | void dma_async_device_unregister(struct dma_device *device); | 432 | void dma_async_device_unregister(struct dma_device *device); |
| 414 | void dma_run_dependencies(struct dma_async_tx_descriptor *tx); | 433 | void dma_run_dependencies(struct dma_async_tx_descriptor *tx); |
| 415 | struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); | 434 | struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); |
| 416 | void dma_issue_pending_all(void); | ||
| 417 | #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) | 435 | #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) |
| 418 | struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); | 436 | struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); |
| 419 | void dma_release_channel(struct dma_chan *chan); | 437 | void dma_release_channel(struct dma_chan *chan); |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index 34161907b2f8..d741b9ceb0e0 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
| @@ -38,6 +38,7 @@ struct dmi_device { | |||
| 38 | #ifdef CONFIG_DMI | 38 | #ifdef CONFIG_DMI |
| 39 | 39 | ||
| 40 | extern int dmi_check_system(const struct dmi_system_id *list); | 40 | extern int dmi_check_system(const struct dmi_system_id *list); |
| 41 | const struct dmi_system_id *dmi_first_match(const struct dmi_system_id *list); | ||
| 41 | extern const char * dmi_get_system_info(int field); | 42 | extern const char * dmi_get_system_info(int field); |
| 42 | extern const struct dmi_device * dmi_find_device(int type, const char *name, | 43 | extern const struct dmi_device * dmi_find_device(int type, const char *name, |
| 43 | const struct dmi_device *from); | 44 | const struct dmi_device *from); |
| @@ -64,6 +65,8 @@ static inline int dmi_walk(void (*decode)(const struct dmi_header *)) | |||
| 64 | { return -1; } | 65 | { return -1; } |
| 65 | static inline bool dmi_match(enum dmi_field f, const char *str) | 66 | static inline bool dmi_match(enum dmi_field f, const char *str) |
| 66 | { return false; } | 67 | { return false; } |
| 68 | static inline const struct dmi_system_id * | ||
| 69 | dmi_first_match(const struct dmi_system_id *list) { return NULL; } | ||
| 67 | 70 | ||
| 68 | #endif | 71 | #endif |
| 69 | 72 | ||
diff --git a/include/linux/dn.h b/include/linux/dn.h index 02bba040fcfb..fe9990823193 100644 --- a/include/linux/dn.h +++ b/include/linux/dn.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _LINUX_DN_H | 1 | #ifndef _LINUX_DN_H |
| 2 | #define _LINUX_DN_H | 2 | #define _LINUX_DN_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | /* | 6 | /* |
| 5 | 7 | ||
| 6 | DECnet Data Structures and Constants | 8 | DECnet Data Structures and Constants |
diff --git a/include/linux/dvb/audio.h b/include/linux/dvb/audio.h index 89412e18f571..fec66bd24f22 100644 --- a/include/linux/dvb/audio.h +++ b/include/linux/dvb/audio.h | |||
| @@ -24,12 +24,7 @@ | |||
| 24 | #ifndef _DVBAUDIO_H_ | 24 | #ifndef _DVBAUDIO_H_ |
| 25 | #define _DVBAUDIO_H_ | 25 | #define _DVBAUDIO_H_ |
| 26 | 26 | ||
| 27 | #ifdef __KERNEL__ | ||
| 28 | #include <linux/types.h> | 27 | #include <linux/types.h> |
| 29 | #else | ||
| 30 | #include <stdint.h> | ||
| 31 | #endif | ||
| 32 | |||
| 33 | 28 | ||
| 34 | typedef enum { | 29 | typedef enum { |
| 35 | AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */ | 30 | AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */ |
| @@ -81,7 +76,7 @@ struct audio_karaoke{ /* if Vocal1 or Vocal2 are non-zero, they get mixed */ | |||
| 81 | } audio_karaoke_t; /* into left and right */ | 76 | } audio_karaoke_t; /* into left and right */ |
| 82 | 77 | ||
| 83 | 78 | ||
| 84 | typedef uint16_t audio_attributes_t; | 79 | typedef __u16 audio_attributes_t; |
| 85 | /* bits: descr. */ | 80 | /* bits: descr. */ |
| 86 | /* 15-13 audio coding mode (0=ac3, 2=mpeg1, 3=mpeg2ext, 4=LPCM, 6=DTS, */ | 81 | /* 15-13 audio coding mode (0=ac3, 2=mpeg1, 3=mpeg2ext, 4=LPCM, 6=DTS, */ |
| 87 | /* 12 multichannel extension */ | 82 | /* 12 multichannel extension */ |
diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h index 402fb7a8d922..fef943738a24 100644 --- a/include/linux/dvb/dmx.h +++ b/include/linux/dvb/dmx.h | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | #ifndef _DVBDMX_H_ | 24 | #ifndef _DVBDMX_H_ |
| 25 | #define _DVBDMX_H_ | 25 | #define _DVBDMX_H_ |
| 26 | 26 | ||
| 27 | #include <asm/types.h> | 27 | #include <linux/types.h> |
| 28 | #ifdef __KERNEL__ | 28 | #ifdef __KERNEL__ |
| 29 | #include <linux/time.h> | 29 | #include <linux/time.h> |
| 30 | #else | 30 | #else |
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index 55026b1a40bd..51c8d2d49e42 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h | |||
| @@ -26,8 +26,7 @@ | |||
| 26 | #ifndef _DVBFRONTEND_H_ | 26 | #ifndef _DVBFRONTEND_H_ |
| 27 | #define _DVBFRONTEND_H_ | 27 | #define _DVBFRONTEND_H_ |
| 28 | 28 | ||
| 29 | #include <asm/types.h> | 29 | #include <linux/types.h> |
| 30 | |||
| 31 | 30 | ||
| 32 | typedef enum fe_type { | 31 | typedef enum fe_type { |
| 33 | FE_QPSK, | 32 | FE_QPSK, |
diff --git a/include/linux/dvb/net.h b/include/linux/dvb/net.h index 5be474bf0d2b..f451e7eb0b0b 100644 --- a/include/linux/dvb/net.h +++ b/include/linux/dvb/net.h | |||
| @@ -24,8 +24,7 @@ | |||
| 24 | #ifndef _DVBNET_H_ | 24 | #ifndef _DVBNET_H_ |
| 25 | #define _DVBNET_H_ | 25 | #define _DVBNET_H_ |
| 26 | 26 | ||
| 27 | #include <asm/types.h> | 27 | #include <linux/types.h> |
| 28 | |||
| 29 | 28 | ||
| 30 | struct dvb_net_if { | 29 | struct dvb_net_if { |
| 31 | __u16 pid; | 30 | __u16 pid; |
diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index 50839fe9e39e..1d750c0fd86e 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h | |||
| @@ -24,17 +24,14 @@ | |||
| 24 | #ifndef _DVBVIDEO_H_ | 24 | #ifndef _DVBVIDEO_H_ |
| 25 | #define _DVBVIDEO_H_ | 25 | #define _DVBVIDEO_H_ |
| 26 | 26 | ||
| 27 | #include <linux/compiler.h> | ||
| 28 | |||
| 29 | #ifdef __KERNEL__ | ||
| 30 | #include <linux/types.h> | 27 | #include <linux/types.h> |
| 28 | #ifdef __KERNEL__ | ||
| 29 | #include <linux/compiler.h> | ||
| 31 | #else | 30 | #else |
| 32 | #include <asm/types.h> | ||
| 33 | #include <stdint.h> | 31 | #include <stdint.h> |
| 34 | #include <time.h> | 32 | #include <time.h> |
| 35 | #endif | 33 | #endif |
| 36 | 34 | ||
| 37 | |||
| 38 | typedef enum { | 35 | typedef enum { |
| 39 | VIDEO_FORMAT_4_3, /* Select 4:3 format */ | 36 | VIDEO_FORMAT_4_3, /* Select 4:3 format */ |
| 40 | VIDEO_FORMAT_16_9, /* Select 16:9 format. */ | 37 | VIDEO_FORMAT_16_9, /* Select 16:9 format. */ |
| @@ -135,12 +132,12 @@ struct video_command { | |||
| 135 | #define VIDEO_VSYNC_FIELD_PROGRESSIVE (3) | 132 | #define VIDEO_VSYNC_FIELD_PROGRESSIVE (3) |
| 136 | 133 | ||
| 137 | struct video_event { | 134 | struct video_event { |
| 138 | int32_t type; | 135 | __s32 type; |
| 139 | #define VIDEO_EVENT_SIZE_CHANGED 1 | 136 | #define VIDEO_EVENT_SIZE_CHANGED 1 |
| 140 | #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 | 137 | #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 |
| 141 | #define VIDEO_EVENT_DECODER_STOPPED 3 | 138 | #define VIDEO_EVENT_DECODER_STOPPED 3 |
| 142 | #define VIDEO_EVENT_VSYNC 4 | 139 | #define VIDEO_EVENT_VSYNC 4 |
| 143 | time_t timestamp; | 140 | __kernel_time_t timestamp; |
| 144 | union { | 141 | union { |
| 145 | video_size_t size; | 142 | video_size_t size; |
| 146 | unsigned int frame_rate; /* in frames per 1000sec */ | 143 | unsigned int frame_rate; /* in frames per 1000sec */ |
| @@ -160,25 +157,25 @@ struct video_status { | |||
| 160 | 157 | ||
| 161 | struct video_still_picture { | 158 | struct video_still_picture { |
| 162 | char __user *iFrame; /* pointer to a single iframe in memory */ | 159 | char __user *iFrame; /* pointer to a single iframe in memory */ |
| 163 | int32_t size; | 160 | __s32 size; |
| 164 | }; | 161 | }; |
| 165 | 162 | ||
| 166 | 163 | ||
| 167 | typedef | 164 | typedef |
| 168 | struct video_highlight { | 165 | struct video_highlight { |
| 169 | int active; /* 1=show highlight, 0=hide highlight */ | 166 | int active; /* 1=show highlight, 0=hide highlight */ |
| 170 | uint8_t contrast1; /* 7- 4 Pattern pixel contrast */ | 167 | __u8 contrast1; /* 7- 4 Pattern pixel contrast */ |
| 171 | /* 3- 0 Background pixel contrast */ | 168 | /* 3- 0 Background pixel contrast */ |
| 172 | uint8_t contrast2; /* 7- 4 Emphasis pixel-2 contrast */ | 169 | __u8 contrast2; /* 7- 4 Emphasis pixel-2 contrast */ |
| 173 | /* 3- 0 Emphasis pixel-1 contrast */ | 170 | /* 3- 0 Emphasis pixel-1 contrast */ |
| 174 | uint8_t color1; /* 7- 4 Pattern pixel color */ | 171 | __u8 color1; /* 7- 4 Pattern pixel color */ |
| 175 | /* 3- 0 Background pixel color */ | 172 | /* 3- 0 Background pixel color */ |
| 176 | uint8_t color2; /* 7- 4 Emphasis pixel-2 color */ | 173 | __u8 color2; /* 7- 4 Emphasis pixel-2 color */ |
| 177 | /* 3- 0 Emphasis pixel-1 color */ | 174 | /* 3- 0 Emphasis pixel-1 color */ |
| 178 | uint32_t ypos; /* 23-22 auto action mode */ | 175 | __u32 ypos; /* 23-22 auto action mode */ |
| 179 | /* 21-12 start y */ | 176 | /* 21-12 start y */ |
| 180 | /* 9- 0 end y */ | 177 | /* 9- 0 end y */ |
| 181 | uint32_t xpos; /* 23-22 button color number */ | 178 | __u32 xpos; /* 23-22 button color number */ |
| 182 | /* 21-12 start x */ | 179 | /* 21-12 start x */ |
| 183 | /* 9- 0 end x */ | 180 | /* 9- 0 end x */ |
| 184 | } video_highlight_t; | 181 | } video_highlight_t; |
| @@ -192,17 +189,17 @@ typedef struct video_spu { | |||
| 192 | 189 | ||
| 193 | typedef struct video_spu_palette { /* SPU Palette information */ | 190 | typedef struct video_spu_palette { /* SPU Palette information */ |
| 194 | int length; | 191 | int length; |
| 195 | uint8_t __user *palette; | 192 | __u8 __user *palette; |
| 196 | } video_spu_palette_t; | 193 | } video_spu_palette_t; |
| 197 | 194 | ||
| 198 | 195 | ||
| 199 | typedef struct video_navi_pack { | 196 | typedef struct video_navi_pack { |
| 200 | int length; /* 0 ... 1024 */ | 197 | int length; /* 0 ... 1024 */ |
| 201 | uint8_t data[1024]; | 198 | __u8 data[1024]; |
| 202 | } video_navi_pack_t; | 199 | } video_navi_pack_t; |
| 203 | 200 | ||
| 204 | 201 | ||
| 205 | typedef uint16_t video_attributes_t; | 202 | typedef __u16 video_attributes_t; |
| 206 | /* bits: descr. */ | 203 | /* bits: descr. */ |
| 207 | /* 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */ | 204 | /* 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */ |
| 208 | /* 13-12 TV system (0=525/60, 1=625/50) */ | 205 | /* 13-12 TV system (0=525/60, 1=625/50) */ |
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h new file mode 100644 index 000000000000..baabf33be244 --- /dev/null +++ b/include/linux/dynamic_debug.h | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | #ifndef _DYNAMIC_DEBUG_H | ||
| 2 | #define _DYNAMIC_DEBUG_H | ||
| 3 | |||
| 4 | /* dynamic_printk_enabled, and dynamic_printk_enabled2 are bitmasks in which | ||
| 5 | * bit n is set to 1 if any modname hashes into the bucket n, 0 otherwise. They | ||
| 6 | * use independent hash functions, to reduce the chance of false positives. | ||
| 7 | */ | ||
| 8 | extern long long dynamic_debug_enabled; | ||
| 9 | extern long long dynamic_debug_enabled2; | ||
| 10 | |||
| 11 | /* | ||
| 12 | * An instance of this structure is created in a special | ||
| 13 | * ELF section at every dynamic debug callsite. At runtime, | ||
| 14 | * the special section is treated as an array of these. | ||
| 15 | */ | ||
| 16 | struct _ddebug { | ||
| 17 | /* | ||
| 18 | * These fields are used to drive the user interface | ||
| 19 | * for selecting and displaying debug callsites. | ||
| 20 | */ | ||
| 21 | const char *modname; | ||
| 22 | const char *function; | ||
| 23 | const char *filename; | ||
| 24 | const char *format; | ||
| 25 | char primary_hash; | ||
| 26 | char secondary_hash; | ||
| 27 | unsigned int lineno:24; | ||
| 28 | /* | ||
| 29 | * The flags field controls the behaviour at the callsite. | ||
| 30 | * The bits here are changed dynamically when the user | ||
| 31 | * writes commands to <debugfs>/dynamic_debug/ddebug | ||
| 32 | */ | ||
| 33 | #define _DPRINTK_FLAGS_PRINT (1<<0) /* printk() a message using the format */ | ||
| 34 | #define _DPRINTK_FLAGS_DEFAULT 0 | ||
| 35 | unsigned int flags:8; | ||
| 36 | } __attribute__((aligned(8))); | ||
| 37 | |||
| 38 | |||
| 39 | int ddebug_add_module(struct _ddebug *tab, unsigned int n, | ||
| 40 | const char *modname); | ||
| 41 | |||
| 42 | #if defined(CONFIG_DYNAMIC_DEBUG) | ||
| 43 | extern int ddebug_remove_module(char *mod_name); | ||
| 44 | |||
| 45 | #define __dynamic_dbg_enabled(dd) ({ \ | ||
| 46 | int __ret = 0; \ | ||
| 47 | if (unlikely((dynamic_debug_enabled & (1LL << DEBUG_HASH)) && \ | ||
| 48 | (dynamic_debug_enabled2 & (1LL << DEBUG_HASH2)))) \ | ||
| 49 | if (unlikely(dd.flags)) \ | ||
| 50 | __ret = 1; \ | ||
| 51 | __ret; }) | ||
| 52 | |||
| 53 | #define dynamic_pr_debug(fmt, ...) do { \ | ||
| 54 | static struct _ddebug descriptor \ | ||
| 55 | __used \ | ||
| 56 | __attribute__((section("__verbose"), aligned(8))) = \ | ||
| 57 | { KBUILD_MODNAME, __func__, __FILE__, fmt, DEBUG_HASH, \ | ||
| 58 | DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ | ||
| 59 | if (__dynamic_dbg_enabled(descriptor)) \ | ||
| 60 | printk(KERN_DEBUG KBUILD_MODNAME ":" pr_fmt(fmt), \ | ||
| 61 | ##__VA_ARGS__); \ | ||
| 62 | } while (0) | ||
| 63 | |||
| 64 | |||
| 65 | #define dynamic_dev_dbg(dev, fmt, ...) do { \ | ||
| 66 | static struct _ddebug descriptor \ | ||
| 67 | __used \ | ||
| 68 | __attribute__((section("__verbose"), aligned(8))) = \ | ||
| 69 | { KBUILD_MODNAME, __func__, __FILE__, fmt, DEBUG_HASH, \ | ||
| 70 | DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ | ||
| 71 | if (__dynamic_dbg_enabled(descriptor)) \ | ||
| 72 | dev_printk(KERN_DEBUG, dev, \ | ||
| 73 | KBUILD_MODNAME ": " pr_fmt(fmt),\ | ||
| 74 | ##__VA_ARGS__); \ | ||
| 75 | } while (0) | ||
| 76 | |||
| 77 | #else | ||
| 78 | |||
| 79 | static inline int ddebug_remove_module(char *mod) | ||
| 80 | { | ||
| 81 | return 0; | ||
| 82 | } | ||
| 83 | |||
| 84 | #define dynamic_pr_debug(fmt, ...) do { } while (0) | ||
| 85 | #define dynamic_dev_dbg(dev, format, ...) do { } while (0) | ||
| 86 | #endif | ||
| 87 | |||
| 88 | #endif | ||
diff --git a/include/linux/dynamic_printk.h b/include/linux/dynamic_printk.h deleted file mode 100644 index 2d528d009074..000000000000 --- a/include/linux/dynamic_printk.h +++ /dev/null | |||
| @@ -1,93 +0,0 @@ | |||
| 1 | #ifndef _DYNAMIC_PRINTK_H | ||
| 2 | #define _DYNAMIC_PRINTK_H | ||
| 3 | |||
| 4 | #define DYNAMIC_DEBUG_HASH_BITS 6 | ||
| 5 | #define DEBUG_HASH_TABLE_SIZE (1 << DYNAMIC_DEBUG_HASH_BITS) | ||
| 6 | |||
| 7 | #define TYPE_BOOLEAN 1 | ||
| 8 | |||
| 9 | #define DYNAMIC_ENABLED_ALL 0 | ||
| 10 | #define DYNAMIC_ENABLED_NONE 1 | ||
| 11 | #define DYNAMIC_ENABLED_SOME 2 | ||
| 12 | |||
| 13 | extern int dynamic_enabled; | ||
| 14 | |||
| 15 | /* dynamic_printk_enabled, and dynamic_printk_enabled2 are bitmasks in which | ||
| 16 | * bit n is set to 1 if any modname hashes into the bucket n, 0 otherwise. They | ||
| 17 | * use independent hash functions, to reduce the chance of false positives. | ||
| 18 | */ | ||
| 19 | extern long long dynamic_printk_enabled; | ||
| 20 | extern long long dynamic_printk_enabled2; | ||
| 21 | |||
| 22 | struct mod_debug { | ||
| 23 | char *modname; | ||
| 24 | char *logical_modname; | ||
| 25 | char *flag_names; | ||
| 26 | int type; | ||
| 27 | int hash; | ||
| 28 | int hash2; | ||
| 29 | } __attribute__((aligned(8))); | ||
| 30 | |||
| 31 | int register_dynamic_debug_module(char *mod_name, int type, char *share_name, | ||
| 32 | char *flags, int hash, int hash2); | ||
| 33 | |||
| 34 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | ||
| 35 | extern int unregister_dynamic_debug_module(char *mod_name); | ||
| 36 | extern int __dynamic_dbg_enabled_helper(char *modname, int type, | ||
| 37 | int value, int hash); | ||
| 38 | |||
| 39 | #define __dynamic_dbg_enabled(module, type, value, level, hash) ({ \ | ||
| 40 | int __ret = 0; \ | ||
| 41 | if (unlikely((dynamic_printk_enabled & (1LL << DEBUG_HASH)) && \ | ||
| 42 | (dynamic_printk_enabled2 & (1LL << DEBUG_HASH2)))) \ | ||
| 43 | __ret = __dynamic_dbg_enabled_helper(module, type, \ | ||
| 44 | value, hash);\ | ||
| 45 | __ret; }) | ||
| 46 | |||
| 47 | #define dynamic_pr_debug(fmt, ...) do { \ | ||
| 48 | static char mod_name[] \ | ||
| 49 | __attribute__((section("__verbose_strings"))) \ | ||
| 50 | = KBUILD_MODNAME; \ | ||
| 51 | static struct mod_debug descriptor \ | ||
| 52 | __used \ | ||
| 53 | __attribute__((section("__verbose"), aligned(8))) = \ | ||
| 54 | { mod_name, mod_name, NULL, TYPE_BOOLEAN, DEBUG_HASH, DEBUG_HASH2 };\ | ||
| 55 | if (__dynamic_dbg_enabled(KBUILD_MODNAME, TYPE_BOOLEAN, \ | ||
| 56 | 0, 0, DEBUG_HASH)) \ | ||
| 57 | printk(KERN_DEBUG KBUILD_MODNAME ":" fmt, \ | ||
| 58 | ##__VA_ARGS__); \ | ||
| 59 | } while (0) | ||
| 60 | |||
| 61 | #define dynamic_dev_dbg(dev, format, ...) do { \ | ||
| 62 | static char mod_name[] \ | ||
| 63 | __attribute__((section("__verbose_strings"))) \ | ||
| 64 | = KBUILD_MODNAME; \ | ||
| 65 | static struct mod_debug descriptor \ | ||
| 66 | __used \ | ||
| 67 | __attribute__((section("__verbose"), aligned(8))) = \ | ||
| 68 | { mod_name, mod_name, NULL, TYPE_BOOLEAN, DEBUG_HASH, DEBUG_HASH2 };\ | ||
| 69 | if (__dynamic_dbg_enabled(KBUILD_MODNAME, TYPE_BOOLEAN, \ | ||
| 70 | 0, 0, DEBUG_HASH)) \ | ||
| 71 | dev_printk(KERN_DEBUG, dev, \ | ||
| 72 | KBUILD_MODNAME ": " format, \ | ||
| 73 | ##__VA_ARGS__); \ | ||
| 74 | } while (0) | ||
| 75 | |||
| 76 | #else | ||
| 77 | |||
| 78 | static inline int unregister_dynamic_debug_module(const char *mod_name) | ||
| 79 | { | ||
| 80 | return 0; | ||
| 81 | } | ||
| 82 | static inline int __dynamic_dbg_enabled_helper(char *modname, int type, | ||
| 83 | int value, int hash) | ||
| 84 | { | ||
| 85 | return 0; | ||
| 86 | } | ||
| 87 | |||
| 88 | #define __dynamic_dbg_enabled(module, type, value, level, hash) ({ 0; }) | ||
| 89 | #define dynamic_pr_debug(fmt, ...) do { } while (0) | ||
| 90 | #define dynamic_dev_dbg(dev, format, ...) do { } while (0) | ||
| 91 | #endif | ||
| 92 | |||
| 93 | #endif | ||
diff --git a/include/linux/edd.h b/include/linux/edd.h index 5d747c5cd0fe..4cbd0fe9df08 100644 --- a/include/linux/edd.h +++ b/include/linux/edd.h | |||
| @@ -30,6 +30,8 @@ | |||
| 30 | #ifndef _LINUX_EDD_H | 30 | #ifndef _LINUX_EDD_H |
| 31 | #define _LINUX_EDD_H | 31 | #define _LINUX_EDD_H |
| 32 | 32 | ||
| 33 | #include <linux/types.h> | ||
| 34 | |||
| 33 | #define EDDNR 0x1e9 /* addr of number of edd_info structs at EDDBUF | 35 | #define EDDNR 0x1e9 /* addr of number of edd_info structs at EDDBUF |
| 34 | in boot_params - treat this as 1 byte */ | 36 | in boot_params - treat this as 1 byte */ |
| 35 | #define EDDBUF 0xd00 /* addr of edd_info structs in boot_params */ | 37 | #define EDDBUF 0xd00 /* addr of edd_info structs in boot_params */ |
diff --git a/include/linux/efs_fs_sb.h b/include/linux/efs_fs_sb.h index ff1945e37790..a01be90c58cc 100644 --- a/include/linux/efs_fs_sb.h +++ b/include/linux/efs_fs_sb.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #ifndef __EFS_FS_SB_H__ | 9 | #ifndef __EFS_FS_SB_H__ |
| 10 | #define __EFS_FS_SB_H__ | 10 | #define __EFS_FS_SB_H__ |
| 11 | 11 | ||
| 12 | #include <linux/types.h> | ||
| 12 | #include <linux/magic.h> | 13 | #include <linux/magic.h> |
| 13 | 14 | ||
| 14 | /* EFS superblock magic numbers */ | 15 | /* EFS superblock magic numbers */ |
diff --git a/include/linux/elf-fdpic.h b/include/linux/elf-fdpic.h index 9f5b7456bff3..7cd2e80cebc8 100644 --- a/include/linux/elf-fdpic.h +++ b/include/linux/elf-fdpic.h | |||
| @@ -58,11 +58,13 @@ struct elf_fdpic_params { | |||
| 58 | #define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */ | 58 | #define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */ |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | #ifdef __KERNEL__ | ||
| 61 | #ifdef CONFIG_MMU | 62 | #ifdef CONFIG_MMU |
| 62 | extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params, | 63 | extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params, |
| 63 | struct elf_fdpic_params *interp_params, | 64 | struct elf_fdpic_params *interp_params, |
| 64 | unsigned long *start_stack, | 65 | unsigned long *start_stack, |
| 65 | unsigned long *start_brk); | 66 | unsigned long *start_brk); |
| 66 | #endif | 67 | #endif |
| 68 | #endif /* __KERNEL__ */ | ||
| 67 | 69 | ||
| 68 | #endif /* _LINUX_ELF_FDPIC_H */ | 70 | #endif /* _LINUX_ELF_FDPIC_H */ |
diff --git a/include/linux/elf.h b/include/linux/elf.h index 0b61ca41a044..45a937be6d38 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
| @@ -377,6 +377,7 @@ typedef struct elf64_note { | |||
| 377 | Elf64_Word n_type; /* Content type */ | 377 | Elf64_Word n_type; /* Content type */ |
| 378 | } Elf64_Nhdr; | 378 | } Elf64_Nhdr; |
| 379 | 379 | ||
| 380 | #ifdef __KERNEL__ | ||
| 380 | #if ELF_CLASS == ELFCLASS32 | 381 | #if ELF_CLASS == ELFCLASS32 |
| 381 | 382 | ||
| 382 | extern Elf32_Dyn _DYNAMIC []; | 383 | extern Elf32_Dyn _DYNAMIC []; |
| @@ -404,5 +405,5 @@ static inline int elf_coredump_extra_notes_write(struct file *file, | |||
| 404 | extern int elf_coredump_extra_notes_size(void); | 405 | extern int elf_coredump_extra_notes_size(void); |
| 405 | extern int elf_coredump_extra_notes_write(struct file *file, loff_t *foffset); | 406 | extern int elf_coredump_extra_notes_write(struct file *file, loff_t *foffset); |
| 406 | #endif | 407 | #endif |
| 407 | 408 | #endif /* __KERNEL__ */ | |
| 408 | #endif /* _LINUX_ELF_H */ | 409 | #endif /* _LINUX_ELF_H */ |
diff --git a/include/linux/errqueue.h b/include/linux/errqueue.h index 92f8d4fab32b..ec12cc74366f 100644 --- a/include/linux/errqueue.h +++ b/include/linux/errqueue.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _LINUX_ERRQUEUE_H | 1 | #ifndef _LINUX_ERRQUEUE_H |
| 2 | #define _LINUX_ERRQUEUE_H 1 | 2 | #define _LINUX_ERRQUEUE_H 1 |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | struct sock_extended_err | 6 | struct sock_extended_err |
| 5 | { | 7 | { |
| 6 | __u32 ee_errno; | 8 | __u32 ee_errno; |
| @@ -16,6 +18,7 @@ struct sock_extended_err | |||
| 16 | #define SO_EE_ORIGIN_LOCAL 1 | 18 | #define SO_EE_ORIGIN_LOCAL 1 |
| 17 | #define SO_EE_ORIGIN_ICMP 2 | 19 | #define SO_EE_ORIGIN_ICMP 2 |
| 18 | #define SO_EE_ORIGIN_ICMP6 3 | 20 | #define SO_EE_ORIGIN_ICMP6 3 |
| 21 | #define SO_EE_ORIGIN_TIMESTAMPING 4 | ||
| 19 | 22 | ||
| 20 | #define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1)) | 23 | #define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1)) |
| 21 | 24 | ||
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 1cb0f0b90926..a1f17abba7dc 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
| @@ -184,4 +184,25 @@ static inline unsigned compare_ether_addr_64bits(const u8 addr1[6+2], | |||
| 184 | } | 184 | } |
| 185 | #endif /* __KERNEL__ */ | 185 | #endif /* __KERNEL__ */ |
| 186 | 186 | ||
| 187 | /** | ||
| 188 | * compare_ether_header - Compare two Ethernet headers | ||
| 189 | * @a: Pointer to Ethernet header | ||
| 190 | * @b: Pointer to Ethernet header | ||
| 191 | * | ||
| 192 | * Compare two ethernet headers, returns 0 if equal. | ||
| 193 | * This assumes that the network header (i.e., IP header) is 4-byte | ||
| 194 | * aligned OR the platform can handle unaligned access. This is the | ||
| 195 | * case for all packets coming into netif_receive_skb or similar | ||
| 196 | * entry points. | ||
| 197 | */ | ||
| 198 | |||
| 199 | static inline int compare_ether_header(const void *a, const void *b) | ||
| 200 | { | ||
| 201 | u32 *a32 = (u32 *)((u8 *)a + 2); | ||
| 202 | u32 *b32 = (u32 *)((u8 *)b + 2); | ||
| 203 | |||
| 204 | return (*(u16 *)a ^ *(u16 *)b) | (a32[0] ^ b32[0]) | | ||
| 205 | (a32[1] ^ b32[1]) | (a32[2] ^ b32[2]); | ||
| 206 | } | ||
| 207 | |||
| 187 | #endif /* _LINUX_ETHERDEVICE_H */ | 208 | #endif /* _LINUX_ETHERDEVICE_H */ |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 27c67a542235..131b127b70f8 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | * Portions Copyright 2002 Intel (eli.kupermann@intel.com, | 7 | * Portions Copyright 2002 Intel (eli.kupermann@intel.com, |
| 8 | * christopher.leech@intel.com, | 8 | * christopher.leech@intel.com, |
| 9 | * scott.feldman@intel.com) | 9 | * scott.feldman@intel.com) |
| 10 | * Portions Copyright (C) Sun Microsystems 2008 | ||
| 10 | */ | 11 | */ |
| 11 | 12 | ||
| 12 | #ifndef _LINUX_ETHTOOL_H | 13 | #ifndef _LINUX_ETHTOOL_H |
| @@ -287,10 +288,75 @@ enum ethtool_flags { | |||
| 287 | ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */ | 288 | ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */ |
| 288 | }; | 289 | }; |
| 289 | 290 | ||
| 290 | struct ethtool_rxnfc { | 291 | /* The following structures are for supporting RX network flow |
| 291 | __u32 cmd; | 292 | * classification configuration. Note, all multibyte fields, e.g., |
| 293 | * ip4src, ip4dst, psrc, pdst, spi, etc. are expected to be in network | ||
| 294 | * byte order. | ||
| 295 | */ | ||
| 296 | struct ethtool_tcpip4_spec { | ||
| 297 | __be32 ip4src; | ||
| 298 | __be32 ip4dst; | ||
| 299 | __be16 psrc; | ||
| 300 | __be16 pdst; | ||
| 301 | __u8 tos; | ||
| 302 | }; | ||
| 303 | |||
| 304 | struct ethtool_ah_espip4_spec { | ||
| 305 | __be32 ip4src; | ||
| 306 | __be32 ip4dst; | ||
| 307 | __be32 spi; | ||
| 308 | __u8 tos; | ||
| 309 | }; | ||
| 310 | |||
| 311 | struct ethtool_rawip4_spec { | ||
| 312 | __be32 ip4src; | ||
| 313 | __be32 ip4dst; | ||
| 314 | __u8 hdata[64]; | ||
| 315 | }; | ||
| 316 | |||
| 317 | struct ethtool_ether_spec { | ||
| 318 | __be16 ether_type; | ||
| 319 | __u8 frame_size; | ||
| 320 | __u8 eframe[16]; | ||
| 321 | }; | ||
| 322 | |||
| 323 | #define ETH_RX_NFC_IP4 1 | ||
| 324 | #define ETH_RX_NFC_IP6 2 | ||
| 325 | |||
| 326 | struct ethtool_usrip4_spec { | ||
| 327 | __be32 ip4src; | ||
| 328 | __be32 ip4dst; | ||
| 329 | __be32 l4_4_bytes; | ||
| 330 | __u8 tos; | ||
| 331 | __u8 ip_ver; | ||
| 332 | __u8 proto; | ||
| 333 | }; | ||
| 334 | |||
| 335 | struct ethtool_rx_flow_spec { | ||
| 292 | __u32 flow_type; | 336 | __u32 flow_type; |
| 293 | __u64 data; | 337 | union { |
| 338 | struct ethtool_tcpip4_spec tcp_ip4_spec; | ||
| 339 | struct ethtool_tcpip4_spec udp_ip4_spec; | ||
| 340 | struct ethtool_tcpip4_spec sctp_ip4_spec; | ||
| 341 | struct ethtool_ah_espip4_spec ah_ip4_spec; | ||
| 342 | struct ethtool_ah_espip4_spec esp_ip4_spec; | ||
| 343 | struct ethtool_rawip4_spec raw_ip4_spec; | ||
| 344 | struct ethtool_ether_spec ether_spec; | ||
| 345 | struct ethtool_usrip4_spec usr_ip4_spec; | ||
| 346 | __u8 hdata[64]; | ||
| 347 | } h_u, m_u; /* entry, mask */ | ||
| 348 | __u64 ring_cookie; | ||
| 349 | __u32 location; | ||
| 350 | }; | ||
| 351 | |||
| 352 | struct ethtool_rxnfc { | ||
| 353 | __u32 cmd; | ||
| 354 | __u32 flow_type; | ||
| 355 | /* The rx flow hash value or the rule DB size */ | ||
| 356 | __u64 data; | ||
| 357 | struct ethtool_rx_flow_spec fs; | ||
| 358 | __u32 rule_cnt; | ||
| 359 | __u32 rule_locs[0]; | ||
| 294 | }; | 360 | }; |
| 295 | 361 | ||
| 296 | #ifdef __KERNEL__ | 362 | #ifdef __KERNEL__ |
| @@ -417,8 +483,8 @@ struct ethtool_ops { | |||
| 417 | /* the following hooks are obsolete */ | 483 | /* the following hooks are obsolete */ |
| 418 | int (*self_test_count)(struct net_device *);/* use get_sset_count */ | 484 | int (*self_test_count)(struct net_device *);/* use get_sset_count */ |
| 419 | int (*get_stats_count)(struct net_device *);/* use get_sset_count */ | 485 | int (*get_stats_count)(struct net_device *);/* use get_sset_count */ |
| 420 | int (*get_rxhash)(struct net_device *, struct ethtool_rxnfc *); | 486 | int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *); |
| 421 | int (*set_rxhash)(struct net_device *, struct ethtool_rxnfc *); | 487 | int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); |
| 422 | }; | 488 | }; |
| 423 | #endif /* __KERNEL__ */ | 489 | #endif /* __KERNEL__ */ |
| 424 | 490 | ||
| @@ -469,6 +535,12 @@ struct ethtool_ops { | |||
| 469 | #define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */ | 535 | #define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */ |
| 470 | #define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */ | 536 | #define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */ |
| 471 | #define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */ | 537 | #define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */ |
| 538 | #define ETHTOOL_GRXRINGS 0x0000002d /* Get RX rings available for LB */ | ||
| 539 | #define ETHTOOL_GRXCLSRLCNT 0x0000002e /* Get RX class rule count */ | ||
| 540 | #define ETHTOOL_GRXCLSRULE 0x0000002f /* Get RX classification rule */ | ||
| 541 | #define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */ | ||
| 542 | #define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ | ||
| 543 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ | ||
| 472 | 544 | ||
| 473 | /* compatibility with older code */ | 545 | /* compatibility with older code */ |
| 474 | #define SPARC_ETH_GSET ETHTOOL_GSET | 546 | #define SPARC_ETH_GSET ETHTOOL_GSET |
| @@ -565,9 +637,13 @@ struct ethtool_ops { | |||
| 565 | #define UDP_V6_FLOW 0x06 | 637 | #define UDP_V6_FLOW 0x06 |
| 566 | #define SCTP_V6_FLOW 0x07 | 638 | #define SCTP_V6_FLOW 0x07 |
| 567 | #define AH_ESP_V6_FLOW 0x08 | 639 | #define AH_ESP_V6_FLOW 0x08 |
| 640 | #define AH_V4_FLOW 0x09 | ||
| 641 | #define ESP_V4_FLOW 0x0a | ||
| 642 | #define AH_V6_FLOW 0x0b | ||
| 643 | #define ESP_V6_FLOW 0x0c | ||
| 644 | #define IP_USER_FLOW 0x0d | ||
| 568 | 645 | ||
| 569 | /* L3-L4 network traffic flow hash options */ | 646 | /* L3-L4 network traffic flow hash options */ |
| 570 | #define RXH_DEV_PORT (1 << 0) | ||
| 571 | #define RXH_L2DA (1 << 1) | 647 | #define RXH_L2DA (1 << 1) |
| 572 | #define RXH_VLAN (1 << 2) | 648 | #define RXH_VLAN (1 << 2) |
| 573 | #define RXH_L3_PROTO (1 << 3) | 649 | #define RXH_L3_PROTO (1 << 3) |
| @@ -577,5 +653,6 @@ struct ethtool_ops { | |||
| 577 | #define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */ | 653 | #define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */ |
| 578 | #define RXH_DISCARD (1 << 31) | 654 | #define RXH_DISCARD (1 << 31) |
| 579 | 655 | ||
| 656 | #define RX_CLS_FLOW_DISC 0xffffffffffffffffULL | ||
| 580 | 657 | ||
| 581 | #endif /* _LINUX_ETHTOOL_H */ | 658 | #endif /* _LINUX_ETHTOOL_H */ |
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index f1e1d3c47125..f6856a5a1d4b 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h | |||
| @@ -61,7 +61,6 @@ struct file; | |||
| 61 | static inline void eventpoll_init_file(struct file *file) | 61 | static inline void eventpoll_init_file(struct file *file) |
| 62 | { | 62 | { |
| 63 | INIT_LIST_HEAD(&file->f_ep_links); | 63 | INIT_LIST_HEAD(&file->f_ep_links); |
| 64 | spin_lock_init(&file->f_ep_lock); | ||
| 65 | } | 64 | } |
| 66 | 65 | ||
| 67 | 66 | ||
diff --git a/include/linux/fb.h b/include/linux/fb.h index 818fe21257e8..31527e17076b 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -960,6 +960,21 @@ extern struct fb_info *registered_fb[FB_MAX]; | |||
| 960 | extern int num_registered_fb; | 960 | extern int num_registered_fb; |
| 961 | extern struct class *fb_class; | 961 | extern struct class *fb_class; |
| 962 | 962 | ||
| 963 | static inline int lock_fb_info(struct fb_info *info) | ||
| 964 | { | ||
| 965 | mutex_lock(&info->lock); | ||
| 966 | if (!info->fbops) { | ||
| 967 | mutex_unlock(&info->lock); | ||
| 968 | return 0; | ||
| 969 | } | ||
| 970 | return 1; | ||
| 971 | } | ||
| 972 | |||
| 973 | static inline void unlock_fb_info(struct fb_info *info) | ||
| 974 | { | ||
| 975 | mutex_unlock(&info->lock); | ||
| 976 | } | ||
| 977 | |||
| 963 | static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, | 978 | static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, |
| 964 | u8 *src, u32 s_pitch, u32 height) | 979 | u8 *src, u32 s_pitch, u32 height) |
| 965 | { | 980 | { |
diff --git a/include/linux/firmware-map.h b/include/linux/firmware-map.h index 6e199c8dfacc..cca686b39123 100644 --- a/include/linux/firmware-map.h +++ b/include/linux/firmware-map.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * include/linux/firmware-map.h: | 2 | * include/linux/firmware-map.h: |
| 3 | * Copyright (C) 2008 SUSE LINUX Products GmbH | 3 | * Copyright (C) 2008 SUSE LINUX Products GmbH |
| 4 | * by Bernhard Walle <bwalle@suse.de> | 4 | * by Bernhard Walle <bernhard.walle@gmx.de> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License v2.0 as published by | 7 | * it under the terms of the GNU General Public License v2.0 as published by |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 6022f44043f2..1cd44f727dac 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -54,24 +54,30 @@ struct inodes_stat_t { | |||
| 54 | #define MAY_ACCESS 16 | 54 | #define MAY_ACCESS 16 |
| 55 | #define MAY_OPEN 32 | 55 | #define MAY_OPEN 32 |
| 56 | 56 | ||
| 57 | /* | ||
| 58 | * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond | ||
| 59 | * to O_WRONLY and O_RDWR via the strange trick in __dentry_open() | ||
| 60 | */ | ||
| 61 | |||
| 57 | /* file is open for reading */ | 62 | /* file is open for reading */ |
| 58 | #define FMODE_READ ((__force fmode_t)1) | 63 | #define FMODE_READ ((__force fmode_t)1) |
| 59 | /* file is open for writing */ | 64 | /* file is open for writing */ |
| 60 | #define FMODE_WRITE ((__force fmode_t)2) | 65 | #define FMODE_WRITE ((__force fmode_t)2) |
| 61 | /* file is seekable */ | 66 | /* file is seekable */ |
| 62 | #define FMODE_LSEEK ((__force fmode_t)4) | 67 | #define FMODE_LSEEK ((__force fmode_t)4) |
| 63 | /* file can be accessed using pread/pwrite */ | 68 | /* file can be accessed using pread */ |
| 64 | #define FMODE_PREAD ((__force fmode_t)8) | 69 | #define FMODE_PREAD ((__force fmode_t)8) |
| 65 | #define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */ | 70 | /* file can be accessed using pwrite */ |
| 71 | #define FMODE_PWRITE ((__force fmode_t)16) | ||
| 66 | /* File is opened for execution with sys_execve / sys_uselib */ | 72 | /* File is opened for execution with sys_execve / sys_uselib */ |
| 67 | #define FMODE_EXEC ((__force fmode_t)16) | 73 | #define FMODE_EXEC ((__force fmode_t)32) |
| 68 | /* File is opened with O_NDELAY (only set for block devices) */ | 74 | /* File is opened with O_NDELAY (only set for block devices) */ |
| 69 | #define FMODE_NDELAY ((__force fmode_t)32) | 75 | #define FMODE_NDELAY ((__force fmode_t)64) |
| 70 | /* File is opened with O_EXCL (only set for block devices) */ | 76 | /* File is opened with O_EXCL (only set for block devices) */ |
| 71 | #define FMODE_EXCL ((__force fmode_t)64) | 77 | #define FMODE_EXCL ((__force fmode_t)128) |
| 72 | /* File is opened using open(.., 3, ..) and is writeable only for ioctls | 78 | /* File is opened using open(.., 3, ..) and is writeable only for ioctls |
| 73 | (specialy hack for floppy.c) */ | 79 | (specialy hack for floppy.c) */ |
| 74 | #define FMODE_WRITE_IOCTL ((__force fmode_t)128) | 80 | #define FMODE_WRITE_IOCTL ((__force fmode_t)256) |
| 75 | 81 | ||
| 76 | /* | 82 | /* |
| 77 | * Don't update ctime and mtime. | 83 | * Don't update ctime and mtime. |
| @@ -87,10 +93,10 @@ struct inodes_stat_t { | |||
| 87 | #define WRITE 1 | 93 | #define WRITE 1 |
| 88 | #define READA 2 /* read-ahead - don't block if no resources */ | 94 | #define READA 2 /* read-ahead - don't block if no resources */ |
| 89 | #define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */ | 95 | #define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */ |
| 90 | #define READ_SYNC (READ | (1 << BIO_RW_SYNC)) | 96 | #define READ_SYNC (READ | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG)) |
| 91 | #define READ_META (READ | (1 << BIO_RW_META)) | 97 | #define READ_META (READ | (1 << BIO_RW_META)) |
| 92 | #define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) | 98 | #define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG)) |
| 93 | #define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNC)) | 99 | #define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG)) |
| 94 | #define WRITE_BARRIER (WRITE | (1 << BIO_RW_BARRIER)) | 100 | #define WRITE_BARRIER (WRITE | (1 << BIO_RW_BARRIER)) |
| 95 | #define DISCARD_NOBARRIER (1 << BIO_RW_DISCARD) | 101 | #define DISCARD_NOBARRIER (1 << BIO_RW_DISCARD) |
| 96 | #define DISCARD_BARRIER ((1 << BIO_RW_DISCARD) | (1 << BIO_RW_BARRIER)) | 102 | #define DISCARD_BARRIER ((1 << BIO_RW_DISCARD) | (1 << BIO_RW_BARRIER)) |
| @@ -135,6 +141,7 @@ struct inodes_stat_t { | |||
| 135 | #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ | 141 | #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ |
| 136 | #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ | 142 | #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ |
| 137 | #define MS_I_VERSION (1<<23) /* Update inode I_version field */ | 143 | #define MS_I_VERSION (1<<23) /* Update inode I_version field */ |
| 144 | #define MS_STRICTATIME (1<<24) /* Always perform atime updates */ | ||
| 138 | #define MS_ACTIVE (1<<30) | 145 | #define MS_ACTIVE (1<<30) |
| 139 | #define MS_NOUSER (1<<31) | 146 | #define MS_NOUSER (1<<31) |
| 140 | 147 | ||
| @@ -842,6 +849,7 @@ struct file { | |||
| 842 | #define f_dentry f_path.dentry | 849 | #define f_dentry f_path.dentry |
| 843 | #define f_vfsmnt f_path.mnt | 850 | #define f_vfsmnt f_path.mnt |
| 844 | const struct file_operations *f_op; | 851 | const struct file_operations *f_op; |
| 852 | spinlock_t f_lock; /* f_ep_links, f_flags */ | ||
| 845 | atomic_long_t f_count; | 853 | atomic_long_t f_count; |
| 846 | unsigned int f_flags; | 854 | unsigned int f_flags; |
| 847 | fmode_t f_mode; | 855 | fmode_t f_mode; |
| @@ -860,7 +868,6 @@ struct file { | |||
| 860 | #ifdef CONFIG_EPOLL | 868 | #ifdef CONFIG_EPOLL |
| 861 | /* Used by fs/eventpoll.c to link all the hooks to this file */ | 869 | /* Used by fs/eventpoll.c to link all the hooks to this file */ |
| 862 | struct list_head f_ep_links; | 870 | struct list_head f_ep_links; |
| 863 | spinlock_t f_ep_lock; | ||
| 864 | #endif /* #ifdef CONFIG_EPOLL */ | 871 | #endif /* #ifdef CONFIG_EPOLL */ |
| 865 | struct address_space *f_mapping; | 872 | struct address_space *f_mapping; |
| 866 | #ifdef CONFIG_DEBUG_WRITECOUNT | 873 | #ifdef CONFIG_DEBUG_WRITECOUNT |
diff --git a/include/linux/gen_stats.h b/include/linux/gen_stats.h index 13f4e74609ac..0ffa41df0ee8 100644 --- a/include/linux/gen_stats.h +++ b/include/linux/gen_stats.h | |||
| @@ -22,7 +22,7 @@ struct gnet_stats_basic | |||
| 22 | { | 22 | { |
| 23 | __u64 bytes; | 23 | __u64 bytes; |
| 24 | __u32 packets; | 24 | __u32 packets; |
| 25 | }; | 25 | } __attribute__ ((packed)); |
| 26 | 26 | ||
| 27 | /** | 27 | /** |
| 28 | * struct gnet_stats_rate_est - rate estimator | 28 | * struct gnet_stats_rate_est - rate estimator |
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h index 7da02c93002b..b834ef6d59fa 100644 --- a/include/linux/genetlink.h +++ b/include/linux/genetlink.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_GENERIC_NETLINK_H | 1 | #ifndef __LINUX_GENERIC_NETLINK_H |
| 2 | #define __LINUX_GENERIC_NETLINK_H | 2 | #define __LINUX_GENERIC_NETLINK_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
| 5 | 6 | ||
| 6 | #define GENL_NAMSIZ 16 /* length of family name */ | 7 | #define GENL_NAMSIZ 16 /* length of family name */ |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 16948eaecae3..634c53028fb8 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -333,11 +333,10 @@ static inline void part_dec_in_flight(struct hd_struct *part) | |||
| 333 | part_to_disk(part)->part0.in_flight--; | 333 | part_to_disk(part)->part0.in_flight--; |
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | /* drivers/block/ll_rw_blk.c */ | 336 | /* block/blk-core.c */ |
| 337 | extern void part_round_stats(int cpu, struct hd_struct *part); | 337 | extern void part_round_stats(int cpu, struct hd_struct *part); |
| 338 | 338 | ||
| 339 | /* drivers/block/genhd.c */ | 339 | /* block/genhd.c */ |
| 340 | extern int get_blkdev_list(char *, int); | ||
| 341 | extern void add_disk(struct gendisk *disk); | 340 | extern void add_disk(struct gendisk *disk); |
| 342 | extern void del_gendisk(struct gendisk *gp); | 341 | extern void del_gendisk(struct gendisk *gp); |
| 343 | extern void unlink_gendisk(struct gendisk *gp); | 342 | extern void unlink_gendisk(struct gendisk *gp); |
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index 14d0df0b5749..c56b4bce56d0 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h | |||
| @@ -10,6 +10,8 @@ | |||
| 10 | #ifndef __GFS2_ONDISK_DOT_H__ | 10 | #ifndef __GFS2_ONDISK_DOT_H__ |
| 11 | #define __GFS2_ONDISK_DOT_H__ | 11 | #define __GFS2_ONDISK_DOT_H__ |
| 12 | 12 | ||
| 13 | #include <linux/types.h> | ||
| 14 | |||
| 13 | #define GFS2_MAGIC 0x01161970 | 15 | #define GFS2_MAGIC 0x01161970 |
| 14 | #define GFS2_BASIC_BLOCK 512 | 16 | #define GFS2_BASIC_BLOCK 512 |
| 15 | #define GFS2_BASIC_BLOCK_SHIFT 9 | 17 | #define GFS2_BASIC_BLOCK_SHIFT 9 |
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h index fd47a151665e..6a6e701f1631 100644 --- a/include/linux/hdlc.h +++ b/include/linux/hdlc.h | |||
| @@ -38,6 +38,7 @@ struct hdlc_proto { | |||
| 38 | int (*ioctl)(struct net_device *dev, struct ifreq *ifr); | 38 | int (*ioctl)(struct net_device *dev, struct ifreq *ifr); |
| 39 | __be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev); | 39 | __be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev); |
| 40 | int (*netif_rx)(struct sk_buff *skb); | 40 | int (*netif_rx)(struct sk_buff *skb); |
| 41 | int (*xmit)(struct sk_buff *skb, struct net_device *dev); | ||
| 41 | struct module *module; | 42 | struct module *module; |
| 42 | struct hdlc_proto *next; /* next protocol in the list */ | 43 | struct hdlc_proto *next; /* next protocol in the list */ |
| 43 | }; | 44 | }; |
| @@ -102,6 +103,10 @@ static __inline__ void debug_frame(const struct sk_buff *skb) | |||
| 102 | int hdlc_open(struct net_device *dev); | 103 | int hdlc_open(struct net_device *dev); |
| 103 | /* Must be called by hardware driver when HDLC device is being closed */ | 104 | /* Must be called by hardware driver when HDLC device is being closed */ |
| 104 | void hdlc_close(struct net_device *dev); | 105 | void hdlc_close(struct net_device *dev); |
| 106 | /* May be used by hardware driver */ | ||
| 107 | int hdlc_change_mtu(struct net_device *dev, int new_mtu); | ||
| 108 | /* Must be pointed to by hw driver's dev->netdev_ops->ndo_start_xmit */ | ||
| 109 | int hdlc_start_xmit(struct sk_buff *skb, struct net_device *dev); | ||
| 105 | 110 | ||
| 106 | int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, | 111 | int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, |
| 107 | size_t size); | 112 | size_t size); |
diff --git a/include/linux/hdlcdrv.h b/include/linux/hdlcdrv.h index bf6302f6b5f8..c010b4a785b8 100644 --- a/include/linux/hdlcdrv.h +++ b/include/linux/hdlcdrv.h | |||
| @@ -215,7 +215,7 @@ struct hdlcdrv_state { | |||
| 215 | 215 | ||
| 216 | struct hdlcdrv_hdlctx { | 216 | struct hdlcdrv_hdlctx { |
| 217 | struct hdlcdrv_hdlcbuffer hbuf; | 217 | struct hdlcdrv_hdlcbuffer hbuf; |
| 218 | long in_hdlc_tx; | 218 | unsigned long in_hdlc_tx; |
| 219 | /* | 219 | /* |
| 220 | * 0 = send flags | 220 | * 0 = send flags |
| 221 | * 1 = send txtail (flags) | 221 | * 1 = send txtail (flags) |
| @@ -241,7 +241,6 @@ struct hdlcdrv_state { | |||
| 241 | struct hdlcdrv_bitbuffer bitbuf_hdlc; | 241 | struct hdlcdrv_bitbuffer bitbuf_hdlc; |
| 242 | #endif /* HDLCDRV_DEBUG */ | 242 | #endif /* HDLCDRV_DEBUG */ |
| 243 | 243 | ||
| 244 | struct net_device_stats stats; | ||
| 245 | int ptt_keyed; | 244 | int ptt_keyed; |
| 246 | 245 | ||
| 247 | /* queued skb for transmission */ | 246 | /* queued skb for transmission */ |
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h index c37e9241fae7..ed21bd3dbd25 100644 --- a/include/linux/hdreg.h +++ b/include/linux/hdreg.h | |||
| @@ -511,7 +511,6 @@ struct hd_driveid { | |||
| 511 | unsigned short words69_70[2]; /* reserved words 69-70 | 511 | unsigned short words69_70[2]; /* reserved words 69-70 |
| 512 | * future command overlap and queuing | 512 | * future command overlap and queuing |
| 513 | */ | 513 | */ |
| 514 | /* HDIO_GET_IDENTITY currently returns only words 0 through 70 */ | ||
| 515 | unsigned short words71_74[4]; /* reserved words 71-74 | 514 | unsigned short words71_74[4]; /* reserved words 71-74 |
| 516 | * for IDENTIFY PACKET DEVICE command | 515 | * for IDENTIFY PACKET DEVICE command |
| 517 | */ | 516 | */ |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 81aa84d60c6b..fa8ee9cef7be 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
| @@ -791,6 +791,7 @@ dbg_hid(const char *fmt, ...) | |||
| 791 | __FILE__ , ## arg) | 791 | __FILE__ , ## arg) |
| 792 | #endif /* HID_FF */ | 792 | #endif /* HID_FF */ |
| 793 | 793 | ||
| 794 | #ifdef __KERNEL__ | ||
| 794 | #ifdef CONFIG_HID_COMPAT | 795 | #ifdef CONFIG_HID_COMPAT |
| 795 | #define HID_COMPAT_LOAD_DRIVER(name) \ | 796 | #define HID_COMPAT_LOAD_DRIVER(name) \ |
| 796 | /* prototype to avoid sparse warning */ \ | 797 | /* prototype to avoid sparse warning */ \ |
| @@ -804,6 +805,7 @@ EXPORT_SYMBOL(hid_compat_##name) | |||
| 804 | extern void hid_compat_##name(void); \ | 805 | extern void hid_compat_##name(void); \ |
| 805 | hid_compat_##name(); \ | 806 | hid_compat_##name(); \ |
| 806 | } while (0) | 807 | } while (0) |
| 808 | #endif /* __KERNEL__ */ | ||
| 807 | 809 | ||
| 808 | #endif | 810 | #endif |
| 809 | 811 | ||
diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h index c760ae0eb6a1..bb6f58baf319 100644 --- a/include/linux/hiddev.h +++ b/include/linux/hiddev.h | |||
| @@ -27,6 +27,8 @@ | |||
| 27 | * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic | 27 | * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic |
| 28 | */ | 28 | */ |
| 29 | 29 | ||
| 30 | #include <linux/types.h> | ||
| 31 | |||
| 30 | /* | 32 | /* |
| 31 | * The event structure itself | 33 | * The event structure itself |
| 32 | */ | 34 | */ |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f1d2fba19ea0..03be7f29ca01 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -33,7 +33,8 @@ unsigned long hugetlb_total_pages(void); | |||
| 33 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 33 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
| 34 | unsigned long address, int write_access); | 34 | unsigned long address, int write_access); |
| 35 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, | 35 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, |
| 36 | struct vm_area_struct *vma); | 36 | struct vm_area_struct *vma, |
| 37 | int acctflags); | ||
| 37 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); | 38 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); |
| 38 | 39 | ||
| 39 | extern unsigned long hugepages_treat_as_movable; | 40 | extern unsigned long hugepages_treat_as_movable; |
| @@ -138,7 +139,7 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | |||
| 138 | 139 | ||
| 139 | extern const struct file_operations hugetlbfs_file_operations; | 140 | extern const struct file_operations hugetlbfs_file_operations; |
| 140 | extern struct vm_operations_struct hugetlb_vm_ops; | 141 | extern struct vm_operations_struct hugetlb_vm_ops; |
| 141 | struct file *hugetlb_file_setup(const char *name, size_t); | 142 | struct file *hugetlb_file_setup(const char *name, size_t, int); |
| 142 | int hugetlb_get_quota(struct address_space *mapping, long delta); | 143 | int hugetlb_get_quota(struct address_space *mapping, long delta); |
| 143 | void hugetlb_put_quota(struct address_space *mapping, long delta); | 144 | void hugetlb_put_quota(struct address_space *mapping, long delta); |
| 144 | 145 | ||
| @@ -158,9 +159,9 @@ static inline void set_file_hugepages(struct file *file) | |||
| 158 | } | 159 | } |
| 159 | #else /* !CONFIG_HUGETLBFS */ | 160 | #else /* !CONFIG_HUGETLBFS */ |
| 160 | 161 | ||
| 161 | #define is_file_hugepages(file) 0 | 162 | #define is_file_hugepages(file) 0 |
| 162 | #define set_file_hugepages(file) BUG() | 163 | #define set_file_hugepages(file) BUG() |
| 163 | #define hugetlb_file_setup(name,size) ERR_PTR(-ENOSYS) | 164 | #define hugetlb_file_setup(name,size,acctflag) ERR_PTR(-ENOSYS) |
| 164 | 165 | ||
| 165 | #endif /* !CONFIG_HUGETLBFS */ | 166 | #endif /* !CONFIG_HUGETLBFS */ |
| 166 | 167 | ||
diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h index 311315b56b61..fd53bfd26470 100644 --- a/include/linux/i2c-dev.h +++ b/include/linux/i2c-dev.h | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | */ | 33 | */ |
| 34 | #define I2C_RETRIES 0x0701 /* number of times a device address should | 34 | #define I2C_RETRIES 0x0701 /* number of times a device address should |
| 35 | be polled when not acknowledging */ | 35 | be polled when not acknowledging */ |
| 36 | #define I2C_TIMEOUT 0x0702 /* set timeout in jiffies - call with int */ | 36 | #define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */ |
| 37 | 37 | ||
| 38 | /* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses | 38 | /* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses |
| 39 | * are NOT supported! (due to code brokenness) | 39 | * are NOT supported! (due to code brokenness) |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 01d67ba9e985..1ffc23bc5d1e 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
| @@ -40,9 +40,7 @@ | |||
| 40 | #define I2C_DRIVERID_SAA7185B 13 /* video encoder */ | 40 | #define I2C_DRIVERID_SAA7185B 13 /* video encoder */ |
| 41 | #define I2C_DRIVERID_SAA7110 22 /* video decoder */ | 41 | #define I2C_DRIVERID_SAA7110 22 /* video decoder */ |
| 42 | #define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */ | 42 | #define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */ |
| 43 | #define I2C_DRIVERID_PCF8583 25 /* real time clock */ | ||
| 44 | #define I2C_DRIVERID_TDA7432 27 /* Stereo sound processor */ | 43 | #define I2C_DRIVERID_TDA7432 27 /* Stereo sound processor */ |
| 45 | #define I2C_DRIVERID_TVMIXER 28 /* Mixer driver for tv cards */ | ||
| 46 | #define I2C_DRIVERID_TVAUDIO 29 /* Generic TV sound driver */ | 44 | #define I2C_DRIVERID_TVAUDIO 29 /* Generic TV sound driver */ |
| 47 | #define I2C_DRIVERID_TDA9875 32 /* TV sound decoder chip */ | 45 | #define I2C_DRIVERID_TDA9875 32 /* TV sound decoder chip */ |
| 48 | #define I2C_DRIVERID_BT819 40 /* video decoder */ | 46 | #define I2C_DRIVERID_BT819 40 /* video decoder */ |
| @@ -54,7 +52,6 @@ | |||
| 54 | #define I2C_DRIVERID_SAA7191 57 /* video decoder */ | 52 | #define I2C_DRIVERID_SAA7191 57 /* video decoder */ |
| 55 | #define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */ | 53 | #define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */ |
| 56 | #define I2C_DRIVERID_OVCAMCHIP 61 /* OmniVision CMOS image sens. */ | 54 | #define I2C_DRIVERID_OVCAMCHIP 61 /* OmniVision CMOS image sens. */ |
| 57 | #define I2C_DRIVERID_MAX6900 63 /* MAX6900 real-time clock */ | ||
| 58 | #define I2C_DRIVERID_SAA6752HS 67 /* MPEG2 encoder */ | 55 | #define I2C_DRIVERID_SAA6752HS 67 /* MPEG2 encoder */ |
| 59 | #define I2C_DRIVERID_TVEEPROM 68 /* TV EEPROM */ | 56 | #define I2C_DRIVERID_TVEEPROM 68 /* TV EEPROM */ |
| 60 | #define I2C_DRIVERID_WM8775 69 /* wm8775 audio processor */ | 57 | #define I2C_DRIVERID_WM8775 69 /* wm8775 audio processor */ |
| @@ -62,23 +59,16 @@ | |||
| 62 | #define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */ | 59 | #define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */ |
| 63 | #define I2C_DRIVERID_SAA7127 72 /* saa7127 video encoder */ | 60 | #define I2C_DRIVERID_SAA7127 72 /* saa7127 video encoder */ |
| 64 | #define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ | 61 | #define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ |
| 65 | #define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ | ||
| 66 | #define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ | 62 | #define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ |
| 67 | #define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */ | 63 | #define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */ |
| 68 | #define I2C_DRIVERID_WM8739 77 /* wm8739 audio processor */ | 64 | #define I2C_DRIVERID_WM8739 77 /* wm8739 audio processor */ |
| 69 | #define I2C_DRIVERID_UPD64083 78 /* upd64083 video processor */ | 65 | #define I2C_DRIVERID_UPD64083 78 /* upd64083 video processor */ |
| 70 | #define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */ | 66 | #define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */ |
| 71 | #define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */ | 67 | #define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */ |
| 72 | #define I2C_DRIVERID_DS1672 81 /* Dallas/Maxim DS1672 RTC */ | ||
| 73 | #define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */ | 68 | #define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */ |
| 74 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ | 69 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ |
| 75 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ | 70 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ |
| 76 | #define I2C_DRIVERID_WM8731 89 /* Wolfson WM8731 audio codec */ | ||
| 77 | #define I2C_DRIVERID_WM8750 90 /* Wolfson WM8750 audio codec */ | ||
| 78 | #define I2C_DRIVERID_WM8753 91 /* Wolfson WM8753 audio codec */ | ||
| 79 | #define I2C_DRIVERID_LM4857 92 /* LM4857 Audio Amplifier */ | ||
| 80 | #define I2C_DRIVERID_VP27SMPX 93 /* Panasonic VP27s tuner internal MPX */ | 71 | #define I2C_DRIVERID_VP27SMPX 93 /* Panasonic VP27s tuner internal MPX */ |
| 81 | #define I2C_DRIVERID_CS4270 94 /* Cirrus Logic 4270 audio codec */ | ||
| 82 | #define I2C_DRIVERID_M52790 95 /* Mitsubishi M52790SP/FP AV switch */ | 72 | #define I2C_DRIVERID_M52790 95 /* Mitsubishi M52790SP/FP AV switch */ |
| 83 | #define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */ | 73 | #define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */ |
| 84 | 74 | ||
| @@ -89,74 +79,23 @@ | |||
| 89 | */ | 79 | */ |
| 90 | 80 | ||
| 91 | /* --- Bit algorithm adapters */ | 81 | /* --- Bit algorithm adapters */ |
| 92 | #define I2C_HW_B_LP 0x010000 /* Parallel port Philips style */ | ||
| 93 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ | 82 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ |
| 94 | #define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */ | ||
| 95 | #define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */ | ||
| 96 | #define I2C_HW_B_I810 0x01000a /* Intel I810 */ | ||
| 97 | #define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */ | ||
| 98 | #define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */ | ||
| 99 | #define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */ | 83 | #define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */ |
| 100 | #define I2C_HW_B_IOC 0x010011 /* IOC bit-wiggling */ | ||
| 101 | #define I2C_HW_B_IXP2000 0x010016 /* GPIO on IXP2000 systems */ | ||
| 102 | #define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */ | 84 | #define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */ |
| 103 | #define I2C_HW_B_PCILYNX 0x01001a /* TI PCILynx I2C adapter */ | ||
| 104 | #define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */ | 85 | #define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */ |
| 105 | #define I2C_HW_B_NVIDIA 0x01001c /* nvidia framebuffer driver */ | ||
| 106 | #define I2C_HW_B_SAVAGE 0x01001d /* savage framebuffer driver */ | ||
| 107 | #define I2C_HW_B_RADEON 0x01001e /* radeon framebuffer driver */ | ||
| 108 | #define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ | 86 | #define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ |
| 109 | #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ | 87 | #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ |
| 110 | #define I2C_HW_B_INTELFB 0x010021 /* intel framebuffer driver */ | ||
| 111 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ | 88 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ |
| 112 | #define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */ | 89 | #define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */ |
| 113 | 90 | ||
| 114 | /* --- PCF 8584 based algorithms */ | ||
| 115 | #define I2C_HW_P_ELEK 0x020002 /* Elektor ISA Bus inteface card */ | ||
| 116 | |||
| 117 | /* --- PCA 9564 based algorithms */ | ||
| 118 | #define I2C_HW_A_ISA 0x1a0000 /* generic ISA Bus interface card */ | ||
| 119 | |||
| 120 | /* --- PowerPC on-chip adapters */ | ||
| 121 | #define I2C_HW_OCP 0x120000 /* IBM on-chip I2C adapter */ | ||
| 122 | |||
| 123 | /* --- Broadcom SiByte adapters */ | ||
| 124 | #define I2C_HW_SIBYTE 0x150000 | ||
| 125 | |||
| 126 | /* --- SGI adapters */ | 91 | /* --- SGI adapters */ |
| 127 | #define I2C_HW_SGI_VINO 0x160000 | 92 | #define I2C_HW_SGI_VINO 0x160000 |
| 128 | 93 | ||
| 129 | /* --- XSCALE on-chip adapters */ | ||
| 130 | #define I2C_HW_IOP3XX 0x140000 | ||
| 131 | |||
| 132 | /* --- Au1550 PSC adapters adapters */ | ||
| 133 | #define I2C_HW_AU1550_PSC 0x1b0000 | ||
| 134 | |||
| 135 | /* --- SMBus only adapters */ | 94 | /* --- SMBus only adapters */ |
| 136 | #define I2C_HW_SMBUS_PIIX4 0x040000 | ||
| 137 | #define I2C_HW_SMBUS_ALI15X3 0x040001 | ||
| 138 | #define I2C_HW_SMBUS_VIA2 0x040002 | ||
| 139 | #define I2C_HW_SMBUS_I801 0x040004 | ||
| 140 | #define I2C_HW_SMBUS_AMD756 0x040005 | ||
| 141 | #define I2C_HW_SMBUS_SIS5595 0x040006 | ||
| 142 | #define I2C_HW_SMBUS_ALI1535 0x040007 | ||
| 143 | #define I2C_HW_SMBUS_SIS630 0x040008 | ||
| 144 | #define I2C_HW_SMBUS_SIS96X 0x040009 | ||
| 145 | #define I2C_HW_SMBUS_AMD8111 0x04000a | ||
| 146 | #define I2C_HW_SMBUS_SCX200 0x04000b | ||
| 147 | #define I2C_HW_SMBUS_NFORCE2 0x04000c | ||
| 148 | #define I2C_HW_SMBUS_W9968CF 0x04000d | 95 | #define I2C_HW_SMBUS_W9968CF 0x04000d |
| 149 | #define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ | 96 | #define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ |
| 150 | #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ | 97 | #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ |
| 151 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ | 98 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ |
| 152 | #define I2C_HW_SMBUS_ALI1563 0x040013 | ||
| 153 | |||
| 154 | /* --- MCP107 adapter */ | ||
| 155 | #define I2C_HW_MPC107 0x0d0000 | ||
| 156 | |||
| 157 | /* --- Embedded adapters */ | ||
| 158 | #define I2C_HW_MV64XXX 0x190000 | ||
| 159 | #define I2C_HW_BLACKFIN 0x190001 /* ADI Blackfin I2C TWI driver */ | ||
| 160 | 99 | ||
| 161 | /* --- Miscellaneous adapters */ | 100 | /* --- Miscellaneous adapters */ |
| 162 | #define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */ | 101 | #define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */ |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 20873d402467..c86c3b07604c 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -151,7 +151,7 @@ struct i2c_driver { | |||
| 151 | * has been dynamically allocated by the driver in the function above, | 151 | * has been dynamically allocated by the driver in the function above, |
| 152 | * it must be freed here. (LEGACY I2C DRIVERS ONLY) | 152 | * it must be freed here. (LEGACY I2C DRIVERS ONLY) |
| 153 | */ | 153 | */ |
| 154 | int (*detach_client)(struct i2c_client *); | 154 | int (*detach_client)(struct i2c_client *) __deprecated; |
| 155 | 155 | ||
| 156 | /* Standard driver model interfaces, for "new style" i2c drivers. | 156 | /* Standard driver model interfaces, for "new style" i2c drivers. |
| 157 | * With the driver model, device enumeration is NEVER done by drivers; | 157 | * With the driver model, device enumeration is NEVER done by drivers; |
| @@ -361,7 +361,7 @@ struct i2c_adapter { | |||
| 361 | struct mutex bus_lock; | 361 | struct mutex bus_lock; |
| 362 | struct mutex clist_lock; | 362 | struct mutex clist_lock; |
| 363 | 363 | ||
| 364 | int timeout; | 364 | int timeout; /* in jiffies */ |
| 365 | int retries; | 365 | int retries; |
| 366 | struct device dev; /* the adapter device */ | 366 | struct device dev; /* the adapter device */ |
| 367 | 367 | ||
| @@ -429,8 +429,10 @@ static inline int i2c_add_driver(struct i2c_driver *driver) | |||
| 429 | return i2c_register_driver(THIS_MODULE, driver); | 429 | return i2c_register_driver(THIS_MODULE, driver); |
| 430 | } | 430 | } |
| 431 | 431 | ||
| 432 | extern int i2c_attach_client(struct i2c_client *); | 432 | /* These are deprecated, your driver should use the standard .probe() |
| 433 | extern int i2c_detach_client(struct i2c_client *); | 433 | * and .remove() methods instead. */ |
| 434 | extern int __deprecated i2c_attach_client(struct i2c_client *); | ||
| 435 | extern int __deprecated i2c_detach_client(struct i2c_client *); | ||
| 434 | 436 | ||
| 435 | extern struct i2c_client *i2c_use_client(struct i2c_client *client); | 437 | extern struct i2c_client *i2c_use_client(struct i2c_client *client); |
| 436 | extern void i2c_release_client(struct i2c_client *client); | 438 | extern void i2c_release_client(struct i2c_client *client); |
diff --git a/include/linux/ibmtr.h b/include/linux/ibmtr.h index 1c7a0dd5536a..06695b74d405 100644 --- a/include/linux/ibmtr.h +++ b/include/linux/ibmtr.h | |||
| @@ -207,7 +207,7 @@ struct tok_info { | |||
| 207 | unsigned short exsap_station_id; | 207 | unsigned short exsap_station_id; |
| 208 | unsigned short global_int_enable; | 208 | unsigned short global_int_enable; |
| 209 | struct sk_buff *current_skb; | 209 | struct sk_buff *current_skb; |
| 210 | struct net_device_stats tr_stats; | 210 | |
| 211 | unsigned char auto_speedsave; | 211 | unsigned char auto_speedsave; |
| 212 | open_state open_status, sap_status; | 212 | open_state open_status, sap_status; |
| 213 | enum {MANUAL, AUTOMATIC} open_mode; | 213 | enum {MANUAL, AUTOMATIC} open_mode; |
diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h index a93a8dd33118..10d701eec484 100644 --- a/include/linux/icmpv6.h +++ b/include/linux/icmpv6.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _LINUX_ICMPV6_H | 1 | #ifndef _LINUX_ICMPV6_H |
| 2 | #define _LINUX_ICMPV6_H | 2 | #define _LINUX_ICMPV6_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <asm/byteorder.h> | 5 | #include <asm/byteorder.h> |
| 5 | 6 | ||
| 6 | struct icmp6hdr { | 7 | struct icmp6hdr { |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 194da5a4b0d6..854eba8b2ba3 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
| 27 | #include <asm/mutex.h> | 27 | #include <asm/mutex.h> |
| 28 | 28 | ||
| 29 | #if defined(CONFIG_CRIS) || defined(CONFIG_FRV) | 29 | #if defined(CONFIG_CRIS) || defined(CONFIG_FRV) || defined(CONFIG_MN10300) |
| 30 | # define SUPPORT_VLB_SYNC 0 | 30 | # define SUPPORT_VLB_SYNC 0 |
| 31 | #else | 31 | #else |
| 32 | # define SUPPORT_VLB_SYNC 1 | 32 | # define SUPPORT_VLB_SYNC 1 |
| @@ -193,24 +193,8 @@ static inline void ide_std_init_ports(hw_regs_t *hw, | |||
| 193 | hw->io_ports.ctl_addr = ctl_addr; | 193 | hw->io_ports.ctl_addr = ctl_addr; |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | /* for IDE PCI controllers in legacy mode, temporary */ | 196 | #if defined(CONFIG_ARM) || defined(CONFIG_M68K) || defined(CONFIG_MIPS) || \ |
| 197 | static inline int __ide_default_irq(unsigned long base) | 197 | defined(CONFIG_PARISC) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) |
| 198 | { | ||
| 199 | switch (base) { | ||
| 200 | #ifdef CONFIG_IA64 | ||
| 201 | case 0x1f0: return isa_irq_to_vector(14); | ||
| 202 | case 0x170: return isa_irq_to_vector(15); | ||
| 203 | #else | ||
| 204 | case 0x1f0: return 14; | ||
| 205 | case 0x170: return 15; | ||
| 206 | #endif | ||
| 207 | } | ||
| 208 | return 0; | ||
| 209 | } | ||
| 210 | |||
| 211 | #if defined(CONFIG_ARM) || defined(CONFIG_FRV) || defined(CONFIG_M68K) || \ | ||
| 212 | defined(CONFIG_MIPS) || defined(CONFIG_MN10300) || defined(CONFIG_PARISC) \ | ||
| 213 | || defined(CONFIG_PPC) || defined(CONFIG_SPARC) || defined(CONFIG_SPARC64) | ||
| 214 | #include <asm/ide.h> | 198 | #include <asm/ide.h> |
| 215 | #else | 199 | #else |
| 216 | #include <asm-generic/ide_iops.h> | 200 | #include <asm-generic/ide_iops.h> |
| @@ -663,7 +647,7 @@ typedef struct ide_drive_s ide_drive_t; | |||
| 663 | #define to_ide_device(dev) container_of(dev, ide_drive_t, gendev) | 647 | #define to_ide_device(dev) container_of(dev, ide_drive_t, gendev) |
| 664 | 648 | ||
| 665 | #define to_ide_drv(obj, cont_type) \ | 649 | #define to_ide_drv(obj, cont_type) \ |
| 666 | container_of(obj, struct cont_type, kref) | 650 | container_of(obj, struct cont_type, dev) |
| 667 | 651 | ||
| 668 | #define ide_drv_g(disk, cont_type) \ | 652 | #define ide_drv_g(disk, cont_type) \ |
| 669 | container_of((disk)->private_data, struct cont_type, driver) | 653 | container_of((disk)->private_data, struct cont_type, driver) |
| @@ -797,6 +781,7 @@ typedef struct hwif_s { | |||
| 797 | struct scatterlist *sg_table; | 781 | struct scatterlist *sg_table; |
| 798 | int sg_max_nents; /* Maximum number of entries in it */ | 782 | int sg_max_nents; /* Maximum number of entries in it */ |
| 799 | int sg_nents; /* Current number of entries in it */ | 783 | int sg_nents; /* Current number of entries in it */ |
| 784 | int orig_sg_nents; | ||
| 800 | int sg_dma_direction; /* dma transfer direction */ | 785 | int sg_dma_direction; /* dma transfer direction */ |
| 801 | 786 | ||
| 802 | /* data phase of the active command (currently only valid for PIO/DMA) */ | 787 | /* data phase of the active command (currently only valid for PIO/DMA) */ |
| @@ -865,7 +850,8 @@ struct ide_host { | |||
| 865 | ide_hwif_t *ports[MAX_HOST_PORTS + 1]; | 850 | ide_hwif_t *ports[MAX_HOST_PORTS + 1]; |
| 866 | unsigned int n_ports; | 851 | unsigned int n_ports; |
| 867 | struct device *dev[2]; | 852 | struct device *dev[2]; |
| 868 | unsigned int (*init_chipset)(struct pci_dev *); | 853 | int (*init_chipset)(struct pci_dev *); |
| 854 | irq_handler_t irq_handler; | ||
| 869 | unsigned long host_flags; | 855 | unsigned long host_flags; |
| 870 | void *host_priv; | 856 | void *host_priv; |
| 871 | ide_hwif_t *cur_port; /* for hosts requiring serialization */ | 857 | ide_hwif_t *cur_port; /* for hosts requiring serialization */ |
| @@ -1144,11 +1130,14 @@ int generic_ide_ioctl(ide_drive_t *, struct block_device *, unsigned, unsigned l | |||
| 1144 | extern int ide_vlb_clk; | 1130 | extern int ide_vlb_clk; |
| 1145 | extern int ide_pci_clk; | 1131 | extern int ide_pci_clk; |
| 1146 | 1132 | ||
| 1147 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); | 1133 | int ide_end_request(ide_drive_t *, int, int); |
| 1148 | int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, | 1134 | int ide_end_dequeued_request(ide_drive_t *, struct request *, int, int); |
| 1149 | int uptodate, int nr_sectors); | 1135 | void ide_kill_rq(ide_drive_t *, struct request *); |
| 1150 | 1136 | ||
| 1151 | extern void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry); | 1137 | void __ide_set_handler(ide_drive_t *, ide_handler_t *, unsigned int, |
| 1138 | ide_expiry_t *); | ||
| 1139 | void ide_set_handler(ide_drive_t *, ide_handler_t *, unsigned int, | ||
| 1140 | ide_expiry_t *); | ||
| 1152 | 1141 | ||
| 1153 | void ide_execute_command(ide_drive_t *, u8, ide_handler_t *, unsigned int, | 1142 | void ide_execute_command(ide_drive_t *, u8, ide_handler_t *, unsigned int, |
| 1154 | ide_expiry_t *); | 1143 | ide_expiry_t *); |
| @@ -1167,13 +1156,14 @@ int ide_busy_sleep(ide_hwif_t *, unsigned long, int); | |||
| 1167 | 1156 | ||
| 1168 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); | 1157 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); |
| 1169 | 1158 | ||
| 1159 | ide_startstop_t ide_do_park_unpark(ide_drive_t *, struct request *); | ||
| 1160 | ide_startstop_t ide_do_devset(ide_drive_t *, struct request *); | ||
| 1161 | |||
| 1170 | extern ide_startstop_t ide_do_reset (ide_drive_t *); | 1162 | extern ide_startstop_t ide_do_reset (ide_drive_t *); |
| 1171 | 1163 | ||
| 1172 | extern int ide_devset_execute(ide_drive_t *drive, | 1164 | extern int ide_devset_execute(ide_drive_t *drive, |
| 1173 | const struct ide_devset *setting, int arg); | 1165 | const struct ide_devset *setting, int arg); |
| 1174 | 1166 | ||
| 1175 | extern void ide_do_drive_cmd(ide_drive_t *, struct request *); | ||
| 1176 | |||
| 1177 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); | 1167 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); |
| 1178 | 1168 | ||
| 1179 | void ide_tf_dump(const char *, struct ide_taskfile *); | 1169 | void ide_tf_dump(const char *, struct ide_taskfile *); |
| @@ -1198,10 +1188,6 @@ void SELECT_MASK(ide_drive_t *, int); | |||
| 1198 | u8 ide_read_error(ide_drive_t *); | 1188 | u8 ide_read_error(ide_drive_t *); |
| 1199 | void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); | 1189 | void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); |
| 1200 | 1190 | ||
| 1201 | extern int drive_is_ready(ide_drive_t *); | ||
| 1202 | |||
| 1203 | void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8); | ||
| 1204 | |||
| 1205 | int ide_check_atapi_device(ide_drive_t *, const char *); | 1191 | int ide_check_atapi_device(ide_drive_t *, const char *); |
| 1206 | 1192 | ||
| 1207 | void ide_init_pc(struct ide_atapi_pc *); | 1193 | void ide_init_pc(struct ide_atapi_pc *); |
| @@ -1249,6 +1235,8 @@ int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); | |||
| 1249 | 1235 | ||
| 1250 | int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long); | 1236 | int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long); |
| 1251 | 1237 | ||
| 1238 | int ide_dev_read_id(ide_drive_t *, u8, u16 *); | ||
| 1239 | |||
| 1252 | extern int ide_driveid_update(ide_drive_t *); | 1240 | extern int ide_driveid_update(ide_drive_t *); |
| 1253 | extern int ide_config_drive_speed(ide_drive_t *, u8); | 1241 | extern int ide_config_drive_speed(ide_drive_t *, u8); |
| 1254 | extern u8 eighty_ninty_three (ide_drive_t *); | 1242 | extern u8 eighty_ninty_three (ide_drive_t *); |
| @@ -1278,7 +1266,7 @@ static inline int ide_pci_is_in_compatibility_mode(struct pci_dev *dev) | |||
| 1278 | return 0; | 1266 | return 0; |
| 1279 | } | 1267 | } |
| 1280 | 1268 | ||
| 1281 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, | 1269 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, |
| 1282 | hw_regs_t *, hw_regs_t **); | 1270 | hw_regs_t *, hw_regs_t **); |
| 1283 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); | 1271 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); |
| 1284 | 1272 | ||
| @@ -1347,10 +1335,6 @@ enum { | |||
| 1347 | IDE_HFLAG_ERROR_STOPS_FIFO = (1 << 19), | 1335 | IDE_HFLAG_ERROR_STOPS_FIFO = (1 << 19), |
| 1348 | /* serialize ports */ | 1336 | /* serialize ports */ |
| 1349 | IDE_HFLAG_SERIALIZE = (1 << 20), | 1337 | IDE_HFLAG_SERIALIZE = (1 << 20), |
| 1350 | /* use legacy IRQs */ | ||
| 1351 | IDE_HFLAG_LEGACY_IRQS = (1 << 21), | ||
| 1352 | /* force use of legacy IRQs */ | ||
| 1353 | IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22), | ||
| 1354 | /* host is TRM290 */ | 1338 | /* host is TRM290 */ |
| 1355 | IDE_HFLAG_TRM290 = (1 << 23), | 1339 | IDE_HFLAG_TRM290 = (1 << 23), |
| 1356 | /* use 32-bit I/O ops */ | 1340 | /* use 32-bit I/O ops */ |
| @@ -1378,7 +1362,7 @@ enum { | |||
| 1378 | 1362 | ||
| 1379 | struct ide_port_info { | 1363 | struct ide_port_info { |
| 1380 | char *name; | 1364 | char *name; |
| 1381 | unsigned int (*init_chipset)(struct pci_dev *); | 1365 | int (*init_chipset)(struct pci_dev *); |
| 1382 | void (*init_iops)(ide_hwif_t *); | 1366 | void (*init_iops)(ide_hwif_t *); |
| 1383 | void (*init_hwif)(ide_hwif_t *); | 1367 | void (*init_hwif)(ide_hwif_t *); |
| 1384 | int (*init_dma)(ide_hwif_t *, | 1368 | int (*init_dma)(ide_hwif_t *, |
| @@ -1469,6 +1453,7 @@ static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; } | |||
| 1469 | 1453 | ||
| 1470 | void ide_dma_lost_irq(ide_drive_t *); | 1454 | void ide_dma_lost_irq(ide_drive_t *); |
| 1471 | void ide_dma_timeout(ide_drive_t *); | 1455 | void ide_dma_timeout(ide_drive_t *); |
| 1456 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); | ||
| 1472 | 1457 | ||
| 1473 | #else | 1458 | #else |
| 1474 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } | 1459 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } |
| @@ -1480,21 +1465,24 @@ static inline void ide_dma_on(ide_drive_t *drive) { ; } | |||
| 1480 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } | 1465 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } |
| 1481 | static inline int ide_set_dma(ide_drive_t *drive) { return 1; } | 1466 | static inline int ide_set_dma(ide_drive_t *drive) { return 1; } |
| 1482 | static inline void ide_check_dma_crc(ide_drive_t *drive) { ; } | 1467 | static inline void ide_check_dma_crc(ide_drive_t *drive) { ; } |
| 1468 | static inline ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) { return ide_stopped; } | ||
| 1483 | static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; } | 1469 | static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; } |
| 1484 | #endif /* CONFIG_BLK_DEV_IDEDMA */ | 1470 | #endif /* CONFIG_BLK_DEV_IDEDMA */ |
| 1485 | 1471 | ||
| 1486 | #ifdef CONFIG_BLK_DEV_IDEACPI | 1472 | #ifdef CONFIG_BLK_DEV_IDEACPI |
| 1473 | int ide_acpi_init(void); | ||
| 1487 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); | 1474 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); |
| 1488 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); | 1475 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); |
| 1489 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); | 1476 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); |
| 1490 | extern void ide_acpi_init(ide_hwif_t *hwif); | 1477 | void ide_acpi_init_port(ide_hwif_t *); |
| 1491 | void ide_acpi_port_init_devices(ide_hwif_t *); | 1478 | void ide_acpi_port_init_devices(ide_hwif_t *); |
| 1492 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); | 1479 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); |
| 1493 | #else | 1480 | #else |
| 1481 | static inline int ide_acpi_init(void) { return 0; } | ||
| 1494 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } | 1482 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } |
| 1495 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } | 1483 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } |
| 1496 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } | 1484 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } |
| 1497 | static inline void ide_acpi_init(ide_hwif_t *hwif) { ; } | 1485 | static inline void ide_acpi_init_port(ide_hwif_t *hwif) { ; } |
| 1498 | static inline void ide_acpi_port_init_devices(ide_hwif_t *hwif) { ; } | 1486 | static inline void ide_acpi_port_init_devices(ide_hwif_t *hwif) { ; } |
| 1499 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} | 1487 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} |
| 1500 | #endif | 1488 | #endif |
| @@ -1528,9 +1516,7 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data) | |||
| 1528 | hwif->hwif_data = data; | 1516 | hwif->hwif_data = data; |
| 1529 | } | 1517 | } |
| 1530 | 1518 | ||
| 1531 | const char *ide_xfer_verbose(u8 mode); | ||
| 1532 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); | 1519 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); |
| 1533 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); | ||
| 1534 | 1520 | ||
| 1535 | u64 ide_get_lba_addr(struct ide_taskfile *, int); | 1521 | u64 ide_get_lba_addr(struct ide_taskfile *, int); |
| 1536 | u8 ide_dump_status(ide_drive_t *, const char *, u8); | 1522 | u8 ide_dump_status(ide_drive_t *, const char *, u8); |
| @@ -1569,14 +1555,18 @@ void ide_timing_merge(struct ide_timing *, struct ide_timing *, | |||
| 1569 | struct ide_timing *, unsigned int); | 1555 | struct ide_timing *, unsigned int); |
| 1570 | int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); | 1556 | int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); |
| 1571 | 1557 | ||
| 1558 | #ifdef CONFIG_IDE_XFER_MODE | ||
| 1572 | int ide_scan_pio_blacklist(char *); | 1559 | int ide_scan_pio_blacklist(char *); |
| 1573 | 1560 | const char *ide_xfer_verbose(u8); | |
| 1574 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); | 1561 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); |
| 1575 | |||
| 1576 | int ide_set_pio_mode(ide_drive_t *, u8); | 1562 | int ide_set_pio_mode(ide_drive_t *, u8); |
| 1577 | int ide_set_dma_mode(ide_drive_t *, u8); | 1563 | int ide_set_dma_mode(ide_drive_t *, u8); |
| 1578 | |||
| 1579 | void ide_set_pio(ide_drive_t *, u8); | 1564 | void ide_set_pio(ide_drive_t *, u8); |
| 1565 | int ide_set_xfer_rate(ide_drive_t *, u8); | ||
| 1566 | #else | ||
| 1567 | static inline void ide_set_pio(ide_drive_t *drive, u8 pio) { ; } | ||
| 1568 | static inline int ide_set_xfer_rate(ide_drive_t *drive, u8 rate) { return -1; } | ||
| 1569 | #endif | ||
| 1580 | 1570 | ||
| 1581 | static inline void ide_set_max_pio(ide_drive_t *drive) | 1571 | static inline void ide_set_max_pio(ide_drive_t *drive) |
| 1582 | { | 1572 | { |
| @@ -1609,6 +1599,10 @@ static inline ide_drive_t *ide_get_pair_dev(ide_drive_t *drive) | |||
| 1609 | #define ide_port_for_each_dev(i, dev, port) \ | 1599 | #define ide_port_for_each_dev(i, dev, port) \ |
| 1610 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) | 1600 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) |
| 1611 | 1601 | ||
| 1602 | #define ide_port_for_each_present_dev(i, dev, port) \ | ||
| 1603 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) \ | ||
| 1604 | if ((dev)->dev_flags & IDE_DFLAG_PRESENT) | ||
| 1605 | |||
| 1612 | #define ide_host_for_each_port(i, port, host) \ | 1606 | #define ide_host_for_each_port(i, port, host) \ |
| 1613 | for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) | 1607 | for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) |
| 1614 | 1608 | ||
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index c4e6ca1a6306..b1bb817d1427 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
| @@ -527,6 +527,8 @@ struct ieee80211_tim_ie { | |||
| 527 | u8 virtual_map[0]; | 527 | u8 virtual_map[0]; |
| 528 | } __attribute__ ((packed)); | 528 | } __attribute__ ((packed)); |
| 529 | 529 | ||
| 530 | #define WLAN_SA_QUERY_TR_ID_LEN 16 | ||
| 531 | |||
| 530 | struct ieee80211_mgmt { | 532 | struct ieee80211_mgmt { |
| 531 | __le16 frame_control; | 533 | __le16 frame_control; |
| 532 | __le16 duration; | 534 | __le16 duration; |
| @@ -646,6 +648,10 @@ struct ieee80211_mgmt { | |||
| 646 | u8 action_code; | 648 | u8 action_code; |
| 647 | u8 variable[0]; | 649 | u8 variable[0]; |
| 648 | } __attribute__((packed)) mesh_action; | 650 | } __attribute__((packed)) mesh_action; |
| 651 | struct { | ||
| 652 | u8 action; | ||
| 653 | u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; | ||
| 654 | } __attribute__ ((packed)) sa_query; | ||
| 649 | } u; | 655 | } u; |
| 650 | } __attribute__ ((packed)) action; | 656 | } __attribute__ ((packed)) action; |
| 651 | } u; | 657 | } u; |
| @@ -655,6 +661,15 @@ struct ieee80211_mgmt { | |||
| 655 | #define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u) | 661 | #define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u) |
| 656 | 662 | ||
| 657 | 663 | ||
| 664 | /* Management MIC information element (IEEE 802.11w) */ | ||
| 665 | struct ieee80211_mmie { | ||
| 666 | u8 element_id; | ||
| 667 | u8 length; | ||
| 668 | __le16 key_id; | ||
| 669 | u8 sequence_number[6]; | ||
| 670 | u8 mic[8]; | ||
| 671 | } __attribute__ ((packed)); | ||
| 672 | |||
| 658 | /* Control frames */ | 673 | /* Control frames */ |
| 659 | struct ieee80211_rts { | 674 | struct ieee80211_rts { |
| 660 | __le16 frame_control; | 675 | __le16 frame_control; |
| @@ -899,6 +914,9 @@ enum ieee80211_statuscode { | |||
| 899 | /* 802.11g */ | 914 | /* 802.11g */ |
| 900 | WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME = 25, | 915 | WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME = 25, |
| 901 | WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM = 26, | 916 | WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM = 26, |
| 917 | /* 802.11w */ | ||
| 918 | WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY = 30, | ||
| 919 | WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION = 31, | ||
| 902 | /* 802.11i */ | 920 | /* 802.11i */ |
| 903 | WLAN_STATUS_INVALID_IE = 40, | 921 | WLAN_STATUS_INVALID_IE = 40, |
| 904 | WLAN_STATUS_INVALID_GROUP_CIPHER = 41, | 922 | WLAN_STATUS_INVALID_GROUP_CIPHER = 41, |
| @@ -1018,6 +1036,8 @@ enum ieee80211_eid { | |||
| 1018 | WLAN_EID_HT_INFORMATION = 61, | 1036 | WLAN_EID_HT_INFORMATION = 61, |
| 1019 | /* 802.11i */ | 1037 | /* 802.11i */ |
| 1020 | WLAN_EID_RSN = 48, | 1038 | WLAN_EID_RSN = 48, |
| 1039 | WLAN_EID_TIMEOUT_INTERVAL = 56, | ||
| 1040 | WLAN_EID_MMIE = 76 /* 802.11w */, | ||
| 1021 | WLAN_EID_WPA = 221, | 1041 | WLAN_EID_WPA = 221, |
| 1022 | WLAN_EID_GENERIC = 221, | 1042 | WLAN_EID_GENERIC = 221, |
| 1023 | WLAN_EID_VENDOR_SPECIFIC = 221, | 1043 | WLAN_EID_VENDOR_SPECIFIC = 221, |
| @@ -1030,6 +1050,8 @@ enum ieee80211_category { | |||
| 1030 | WLAN_CATEGORY_QOS = 1, | 1050 | WLAN_CATEGORY_QOS = 1, |
| 1031 | WLAN_CATEGORY_DLS = 2, | 1051 | WLAN_CATEGORY_DLS = 2, |
| 1032 | WLAN_CATEGORY_BACK = 3, | 1052 | WLAN_CATEGORY_BACK = 3, |
| 1053 | WLAN_CATEGORY_PUBLIC = 4, | ||
| 1054 | WLAN_CATEGORY_SA_QUERY = 8, | ||
| 1033 | WLAN_CATEGORY_WMM = 17, | 1055 | WLAN_CATEGORY_WMM = 17, |
| 1034 | }; | 1056 | }; |
| 1035 | 1057 | ||
| @@ -1104,6 +1126,12 @@ struct ieee80211_country_ie_triplet { | |||
| 1104 | }; | 1126 | }; |
| 1105 | } __attribute__ ((packed)); | 1127 | } __attribute__ ((packed)); |
| 1106 | 1128 | ||
| 1129 | enum ieee80211_timeout_interval_type { | ||
| 1130 | WLAN_TIMEOUT_REASSOC_DEADLINE = 1 /* 802.11r */, | ||
| 1131 | WLAN_TIMEOUT_KEY_LIFETIME = 2 /* 802.11r */, | ||
| 1132 | WLAN_TIMEOUT_ASSOC_COMEBACK = 3 /* 802.11w */, | ||
| 1133 | }; | ||
| 1134 | |||
| 1107 | /* BACK action code */ | 1135 | /* BACK action code */ |
| 1108 | enum ieee80211_back_actioncode { | 1136 | enum ieee80211_back_actioncode { |
| 1109 | WLAN_ACTION_ADDBA_REQ = 0, | 1137 | WLAN_ACTION_ADDBA_REQ = 0, |
| @@ -1118,6 +1146,13 @@ enum ieee80211_back_parties { | |||
| 1118 | WLAN_BACK_TIMER = 2, | 1146 | WLAN_BACK_TIMER = 2, |
| 1119 | }; | 1147 | }; |
| 1120 | 1148 | ||
| 1149 | /* SA Query action */ | ||
| 1150 | enum ieee80211_sa_query_action { | ||
| 1151 | WLAN_ACTION_SA_QUERY_REQUEST = 0, | ||
| 1152 | WLAN_ACTION_SA_QUERY_RESPONSE = 1, | ||
| 1153 | }; | ||
| 1154 | |||
| 1155 | |||
| 1121 | /* A-MSDU 802.11n */ | 1156 | /* A-MSDU 802.11n */ |
| 1122 | #define IEEE80211_QOS_CONTROL_A_MSDU_PRESENT 0x0080 | 1157 | #define IEEE80211_QOS_CONTROL_A_MSDU_PRESENT 0x0080 |
| 1123 | 1158 | ||
| @@ -1128,6 +1163,7 @@ enum ieee80211_back_parties { | |||
| 1128 | /* reserved: 0x000FAC03 */ | 1163 | /* reserved: 0x000FAC03 */ |
| 1129 | #define WLAN_CIPHER_SUITE_CCMP 0x000FAC04 | 1164 | #define WLAN_CIPHER_SUITE_CCMP 0x000FAC04 |
| 1130 | #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05 | 1165 | #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05 |
| 1166 | #define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06 | ||
| 1131 | 1167 | ||
| 1132 | #define WLAN_MAX_KEY_LEN 32 | 1168 | #define WLAN_MAX_KEY_LEN 32 |
| 1133 | 1169 | ||
| @@ -1185,4 +1221,149 @@ static inline u8 *ieee80211_get_DA(struct ieee80211_hdr *hdr) | |||
| 1185 | return hdr->addr1; | 1221 | return hdr->addr1; |
| 1186 | } | 1222 | } |
| 1187 | 1223 | ||
| 1224 | /** | ||
| 1225 | * ieee80211_is_robust_mgmt_frame - check if frame is a robust management frame | ||
| 1226 | * @hdr: the frame (buffer must include at least the first octet of payload) | ||
| 1227 | */ | ||
| 1228 | static inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr) | ||
| 1229 | { | ||
| 1230 | if (ieee80211_is_disassoc(hdr->frame_control) || | ||
| 1231 | ieee80211_is_deauth(hdr->frame_control)) | ||
| 1232 | return true; | ||
| 1233 | |||
| 1234 | if (ieee80211_is_action(hdr->frame_control)) { | ||
| 1235 | u8 *category; | ||
| 1236 | |||
| 1237 | /* | ||
| 1238 | * Action frames, excluding Public Action frames, are Robust | ||
| 1239 | * Management Frames. However, if we are looking at a Protected | ||
| 1240 | * frame, skip the check since the data may be encrypted and | ||
| 1241 | * the frame has already been found to be a Robust Management | ||
| 1242 | * Frame (by the other end). | ||
| 1243 | */ | ||
| 1244 | if (ieee80211_has_protected(hdr->frame_control)) | ||
| 1245 | return true; | ||
| 1246 | category = ((u8 *) hdr) + 24; | ||
| 1247 | return *category != WLAN_CATEGORY_PUBLIC; | ||
| 1248 | } | ||
| 1249 | |||
| 1250 | return false; | ||
| 1251 | } | ||
| 1252 | |||
| 1253 | /** | ||
| 1254 | * ieee80211_fhss_chan_to_freq - get channel frequency | ||
| 1255 | * @channel: the FHSS channel | ||
| 1256 | * | ||
| 1257 | * Convert IEEE802.11 FHSS channel to frequency (MHz) | ||
| 1258 | * Ref IEEE 802.11-2007 section 14.6 | ||
| 1259 | */ | ||
| 1260 | static inline int ieee80211_fhss_chan_to_freq(int channel) | ||
| 1261 | { | ||
| 1262 | if ((channel > 1) && (channel < 96)) | ||
| 1263 | return channel + 2400; | ||
| 1264 | else | ||
| 1265 | return -1; | ||
| 1266 | } | ||
| 1267 | |||
| 1268 | /** | ||
| 1269 | * ieee80211_freq_to_fhss_chan - get channel | ||
| 1270 | * @freq: the channels frequency | ||
| 1271 | * | ||
| 1272 | * Convert frequency (MHz) to IEEE802.11 FHSS channel | ||
| 1273 | * Ref IEEE 802.11-2007 section 14.6 | ||
| 1274 | */ | ||
| 1275 | static inline int ieee80211_freq_to_fhss_chan(int freq) | ||
| 1276 | { | ||
| 1277 | if ((freq > 2401) && (freq < 2496)) | ||
| 1278 | return freq - 2400; | ||
| 1279 | else | ||
| 1280 | return -1; | ||
| 1281 | } | ||
| 1282 | |||
| 1283 | /** | ||
| 1284 | * ieee80211_dsss_chan_to_freq - get channel center frequency | ||
| 1285 | * @channel: the DSSS channel | ||
| 1286 | * | ||
| 1287 | * Convert IEEE802.11 DSSS channel to the center frequency (MHz). | ||
| 1288 | * Ref IEEE 802.11-2007 section 15.6 | ||
| 1289 | */ | ||
| 1290 | static inline int ieee80211_dsss_chan_to_freq(int channel) | ||
| 1291 | { | ||
| 1292 | if ((channel > 0) && (channel < 14)) | ||
| 1293 | return 2407 + (channel * 5); | ||
| 1294 | else if (channel == 14) | ||
| 1295 | return 2484; | ||
| 1296 | else | ||
| 1297 | return -1; | ||
| 1298 | } | ||
| 1299 | |||
| 1300 | /** | ||
| 1301 | * ieee80211_freq_to_dsss_chan - get channel | ||
| 1302 | * @freq: the frequency | ||
| 1303 | * | ||
| 1304 | * Convert frequency (MHz) to IEEE802.11 DSSS channel | ||
| 1305 | * Ref IEEE 802.11-2007 section 15.6 | ||
| 1306 | * | ||
| 1307 | * This routine selects the channel with the closest center frequency. | ||
| 1308 | */ | ||
| 1309 | static inline int ieee80211_freq_to_dsss_chan(int freq) | ||
| 1310 | { | ||
| 1311 | if ((freq >= 2410) && (freq < 2475)) | ||
| 1312 | return (freq - 2405) / 5; | ||
| 1313 | else if ((freq >= 2482) && (freq < 2487)) | ||
| 1314 | return 14; | ||
| 1315 | else | ||
| 1316 | return -1; | ||
| 1317 | } | ||
| 1318 | |||
| 1319 | /* Convert IEEE802.11 HR DSSS channel to frequency (MHz) and back | ||
| 1320 | * Ref IEEE 802.11-2007 section 18.4.6.2 | ||
| 1321 | * | ||
| 1322 | * The channels and frequencies are the same as those defined for DSSS | ||
| 1323 | */ | ||
| 1324 | #define ieee80211_hr_chan_to_freq(chan) ieee80211_dsss_chan_to_freq(chan) | ||
| 1325 | #define ieee80211_freq_to_hr_chan(freq) ieee80211_freq_to_dsss_chan(freq) | ||
| 1326 | |||
| 1327 | /* Convert IEEE802.11 ERP channel to frequency (MHz) and back | ||
| 1328 | * Ref IEEE 802.11-2007 section 19.4.2 | ||
| 1329 | */ | ||
| 1330 | #define ieee80211_erp_chan_to_freq(chan) ieee80211_hr_chan_to_freq(chan) | ||
| 1331 | #define ieee80211_freq_to_erp_chan(freq) ieee80211_freq_to_hr_chan(freq) | ||
| 1332 | |||
| 1333 | /** | ||
| 1334 | * ieee80211_ofdm_chan_to_freq - get channel center frequency | ||
| 1335 | * @s_freq: starting frequency == (dotChannelStartingFactor/2) MHz | ||
| 1336 | * @channel: the OFDM channel | ||
| 1337 | * | ||
| 1338 | * Convert IEEE802.11 OFDM channel to center frequency (MHz) | ||
| 1339 | * Ref IEEE 802.11-2007 section 17.3.8.3.2 | ||
| 1340 | */ | ||
| 1341 | static inline int ieee80211_ofdm_chan_to_freq(int s_freq, int channel) | ||
| 1342 | { | ||
| 1343 | if ((channel > 0) && (channel <= 200) && | ||
| 1344 | (s_freq >= 4000)) | ||
| 1345 | return s_freq + (channel * 5); | ||
| 1346 | else | ||
| 1347 | return -1; | ||
| 1348 | } | ||
| 1349 | |||
| 1350 | /** | ||
| 1351 | * ieee80211_freq_to_ofdm_channel - get channel | ||
| 1352 | * @s_freq: starting frequency == (dotChannelStartingFactor/2) MHz | ||
| 1353 | * @freq: the frequency | ||
| 1354 | * | ||
| 1355 | * Convert frequency (MHz) to IEEE802.11 OFDM channel | ||
| 1356 | * Ref IEEE 802.11-2007 section 17.3.8.3.2 | ||
| 1357 | * | ||
| 1358 | * This routine selects the channel with the closest center frequency. | ||
| 1359 | */ | ||
| 1360 | static inline int ieee80211_freq_to_ofdm_chan(int s_freq, int freq) | ||
| 1361 | { | ||
| 1362 | if ((freq > (s_freq + 2)) && (freq <= (s_freq + 1202)) && | ||
| 1363 | (s_freq >= 4000)) | ||
| 1364 | return (freq + 2 - s_freq) / 5; | ||
| 1365 | else | ||
| 1366 | return -1; | ||
| 1367 | } | ||
| 1368 | |||
| 1188 | #endif /* LINUX_IEEE80211_H */ | 1369 | #endif /* LINUX_IEEE80211_H */ |
diff --git a/include/linux/if.h b/include/linux/if.h index 2a6e29620a96..1108f3e099e3 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
| @@ -66,6 +66,7 @@ | |||
| 66 | #define IFF_SLAVE_NEEDARP 0x40 /* need ARPs for validation */ | 66 | #define IFF_SLAVE_NEEDARP 0x40 /* need ARPs for validation */ |
| 67 | #define IFF_ISATAP 0x80 /* ISATAP interface (RFC4214) */ | 67 | #define IFF_ISATAP 0x80 /* ISATAP interface (RFC4214) */ |
| 68 | #define IFF_MASTER_ARPMON 0x100 /* bonding master, ARP mon in use */ | 68 | #define IFF_MASTER_ARPMON 0x100 /* bonding master, ARP mon in use */ |
| 69 | #define IFF_WAN_HDLC 0x200 /* WAN HDLC device */ | ||
| 69 | 70 | ||
| 70 | #define IF_GET_IFACE 0x0001 /* for querying only */ | 71 | #define IF_GET_IFACE 0x0001 /* for querying only */ |
| 71 | #define IF_GET_PROTO 0x0002 | 72 | #define IF_GET_PROTO 0x0002 |
diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h index 43f3bedaafd3..a60c821be44c 100644 --- a/include/linux/if_addr.h +++ b/include/linux/if_addr.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_IF_ADDR_H | 1 | #ifndef __LINUX_IF_ADDR_H |
| 2 | #define __LINUX_IF_ADDR_H | 2 | #define __LINUX_IF_ADDR_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
| 5 | 6 | ||
| 6 | struct ifaddrmsg | 7 | struct ifaddrmsg |
diff --git a/include/linux/if_addrlabel.h b/include/linux/if_addrlabel.h index 9fe79c95dd28..89571f65d6de 100644 --- a/include/linux/if_addrlabel.h +++ b/include/linux/if_addrlabel.h | |||
| @@ -10,6 +10,8 @@ | |||
| 10 | #ifndef __LINUX_IF_ADDRLABEL_H | 10 | #ifndef __LINUX_IF_ADDRLABEL_H |
| 11 | #define __LINUX_IF_ADDRLABEL_H | 11 | #define __LINUX_IF_ADDRLABEL_H |
| 12 | 12 | ||
| 13 | #include <linux/types.h> | ||
| 14 | |||
| 13 | struct ifaddrlblmsg | 15 | struct ifaddrlblmsg |
| 14 | { | 16 | { |
| 15 | __u8 ifal_family; /* Address family */ | 17 | __u8 ifal_family; /* Address family */ |
diff --git a/include/linux/if_arcnet.h b/include/linux/if_arcnet.h index 27ea2ac445ad..0835debab115 100644 --- a/include/linux/if_arcnet.h +++ b/include/linux/if_arcnet.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #ifndef _LINUX_IF_ARCNET_H | 16 | #ifndef _LINUX_IF_ARCNET_H |
| 17 | #define _LINUX_IF_ARCNET_H | 17 | #define _LINUX_IF_ARCNET_H |
| 18 | 18 | ||
| 19 | #include <linux/types.h> | ||
| 19 | #include <linux/if_ether.h> | 20 | #include <linux/if_ether.h> |
| 20 | 21 | ||
| 21 | 22 | ||
| @@ -57,10 +58,10 @@ | |||
| 57 | */ | 58 | */ |
| 58 | struct arc_rfc1201 | 59 | struct arc_rfc1201 |
| 59 | { | 60 | { |
| 60 | uint8_t proto; /* protocol ID field - varies */ | 61 | __u8 proto; /* protocol ID field - varies */ |
| 61 | uint8_t split_flag; /* for use with split packets */ | 62 | __u8 split_flag; /* for use with split packets */ |
| 62 | __be16 sequence; /* sequence number */ | 63 | __be16 sequence; /* sequence number */ |
| 63 | uint8_t payload[0]; /* space remaining in packet (504 bytes)*/ | 64 | __u8 payload[0]; /* space remaining in packet (504 bytes)*/ |
| 64 | }; | 65 | }; |
| 65 | #define RFC1201_HDR_SIZE 4 | 66 | #define RFC1201_HDR_SIZE 4 |
| 66 | 67 | ||
| @@ -70,8 +71,8 @@ struct arc_rfc1201 | |||
| 70 | */ | 71 | */ |
| 71 | struct arc_rfc1051 | 72 | struct arc_rfc1051 |
| 72 | { | 73 | { |
| 73 | uint8_t proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */ | 74 | __u8 proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */ |
| 74 | uint8_t payload[0]; /* 507 bytes */ | 75 | __u8 payload[0]; /* 507 bytes */ |
| 75 | }; | 76 | }; |
| 76 | #define RFC1051_HDR_SIZE 1 | 77 | #define RFC1051_HDR_SIZE 1 |
| 77 | 78 | ||
| @@ -82,20 +83,20 @@ struct arc_rfc1051 | |||
| 82 | */ | 83 | */ |
| 83 | struct arc_eth_encap | 84 | struct arc_eth_encap |
| 84 | { | 85 | { |
| 85 | uint8_t proto; /* Always ARC_P_ETHER */ | 86 | __u8 proto; /* Always ARC_P_ETHER */ |
| 86 | struct ethhdr eth; /* standard ethernet header (yuck!) */ | 87 | struct ethhdr eth; /* standard ethernet header (yuck!) */ |
| 87 | uint8_t payload[0]; /* 493 bytes */ | 88 | __u8 payload[0]; /* 493 bytes */ |
| 88 | }; | 89 | }; |
| 89 | #define ETH_ENCAP_HDR_SIZE 14 | 90 | #define ETH_ENCAP_HDR_SIZE 14 |
| 90 | 91 | ||
| 91 | 92 | ||
| 92 | struct arc_cap | 93 | struct arc_cap |
| 93 | { | 94 | { |
| 94 | uint8_t proto; | 95 | __u8 proto; |
| 95 | uint8_t cookie[sizeof(int)]; /* Actually NOT sent over the network */ | 96 | __u8 cookie[sizeof(int)]; /* Actually NOT sent over the network */ |
| 96 | union { | 97 | union { |
| 97 | uint8_t ack; | 98 | __u8 ack; |
| 98 | uint8_t raw[0]; /* 507 bytes */ | 99 | __u8 raw[0]; /* 507 bytes */ |
| 99 | } mes; | 100 | } mes; |
| 100 | }; | 101 | }; |
| 101 | 102 | ||
| @@ -109,7 +110,7 @@ struct arc_cap | |||
| 109 | */ | 110 | */ |
| 110 | struct arc_hardware | 111 | struct arc_hardware |
| 111 | { | 112 | { |
| 112 | uint8_t source, /* source ARCnet - filled in automagically */ | 113 | __u8 source, /* source ARCnet - filled in automagically */ |
| 113 | dest, /* destination ARCnet - 0 for broadcast */ | 114 | dest, /* destination ARCnet - 0 for broadcast */ |
| 114 | offset[2]; /* offset bytes (some weird semantics) */ | 115 | offset[2]; /* offset bytes (some weird semantics) */ |
| 115 | }; | 116 | }; |
| @@ -130,7 +131,7 @@ struct archdr | |||
| 130 | struct arc_rfc1051 rfc1051; | 131 | struct arc_rfc1051 rfc1051; |
| 131 | struct arc_eth_encap eth_encap; | 132 | struct arc_eth_encap eth_encap; |
| 132 | struct arc_cap cap; | 133 | struct arc_cap cap; |
| 133 | uint8_t raw[0]; /* 508 bytes */ | 134 | __u8 raw[0]; /* 508 bytes */ |
| 134 | } soft; | 135 | } soft; |
| 135 | }; | 136 | }; |
| 136 | 137 | ||
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index 7f3c735f422b..0216e1bdbc56 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * as published by the Free Software Foundation; either version | 17 | * as published by the Free Software Foundation; either version |
| 18 | * 2 of the License, or (at your option) any later version. | 18 | * 2 of the License, or (at your option) any later version. |
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #ifndef _LINUX_IF_ETHER_H | 21 | #ifndef _LINUX_IF_ETHER_H |
| 22 | #define _LINUX_IF_ETHER_H | 22 | #define _LINUX_IF_ETHER_H |
| 23 | 23 | ||
| @@ -25,7 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | /* | 26 | /* |
| 27 | * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble | 27 | * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble |
| 28 | * and FCS/CRC (frame check sequence). | 28 | * and FCS/CRC (frame check sequence). |
| 29 | */ | 29 | */ |
| 30 | 30 | ||
| 31 | #define ETH_ALEN 6 /* Octets in one ethernet addr */ | 31 | #define ETH_ALEN 6 /* Octets in one ethernet addr */ |
| @@ -83,7 +83,7 @@ | |||
| 83 | /* | 83 | /* |
| 84 | * Non DIX types. Won't clash for 1500 types. | 84 | * Non DIX types. Won't clash for 1500 types. |
| 85 | */ | 85 | */ |
| 86 | 86 | ||
| 87 | #define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */ | 87 | #define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */ |
| 88 | #define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */ | 88 | #define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */ |
| 89 | #define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */ | 89 | #define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */ |
| @@ -109,7 +109,7 @@ | |||
| 109 | /* | 109 | /* |
| 110 | * This is an Ethernet frame header. | 110 | * This is an Ethernet frame header. |
| 111 | */ | 111 | */ |
| 112 | 112 | ||
| 113 | struct ethhdr { | 113 | struct ethhdr { |
| 114 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ | 114 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ |
| 115 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ | 115 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ |
diff --git a/include/linux/if_fc.h b/include/linux/if_fc.h index 376a34ea4723..6ed7f1bf35c8 100644 --- a/include/linux/if_fc.h +++ b/include/linux/if_fc.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #ifndef _LINUX_IF_FC_H | 20 | #ifndef _LINUX_IF_FC_H |
| 21 | #define _LINUX_IF_FC_H | 21 | #define _LINUX_IF_FC_H |
| 22 | 22 | ||
| 23 | #include <linux/types.h> | ||
| 23 | 24 | ||
| 24 | #define FC_ALEN 6 /* Octets in one ethernet addr */ | 25 | #define FC_ALEN 6 /* Octets in one ethernet addr */ |
| 25 | #define FC_HLEN (sizeof(struct fch_hdr)+sizeof(struct fcllc)) | 26 | #define FC_HLEN (sizeof(struct fch_hdr)+sizeof(struct fcllc)) |
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h index 5c34240de746..60e16a551dd6 100644 --- a/include/linux/if_frad.h +++ b/include/linux/if_frad.h | |||
| @@ -26,8 +26,6 @@ | |||
| 26 | 26 | ||
| 27 | #include <linux/if.h> | 27 | #include <linux/if.h> |
| 28 | 28 | ||
| 29 | #if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE) | ||
| 30 | |||
| 31 | /* Structures and constants associated with the DLCI device driver */ | 29 | /* Structures and constants associated with the DLCI device driver */ |
| 32 | 30 | ||
| 33 | struct dlci_add | 31 | struct dlci_add |
| @@ -127,6 +125,8 @@ struct frad_conf | |||
| 127 | 125 | ||
| 128 | #ifdef __KERNEL__ | 126 | #ifdef __KERNEL__ |
| 129 | 127 | ||
| 128 | #if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE) | ||
| 129 | |||
| 130 | /* these are the fields of an RFC 1490 header */ | 130 | /* these are the fields of an RFC 1490 header */ |
| 131 | struct frhdr | 131 | struct frhdr |
| 132 | { | 132 | { |
| @@ -190,12 +190,10 @@ struct frad_local | |||
| 190 | int buffer; /* current buffer for S508 firmware */ | 190 | int buffer; /* current buffer for S508 firmware */ |
| 191 | }; | 191 | }; |
| 192 | 192 | ||
| 193 | #endif /* __KERNEL__ */ | ||
| 194 | |||
| 195 | #endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */ | 193 | #endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */ |
| 196 | 194 | ||
| 197 | #ifdef __KERNEL__ | ||
| 198 | extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *)); | 195 | extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *)); |
| 199 | #endif | 196 | |
| 197 | #endif /* __KERNEL__ */ | ||
| 200 | 198 | ||
| 201 | #endif | 199 | #endif |
diff --git a/include/linux/if_hippi.h b/include/linux/if_hippi.h index f0f23516bb59..4a7c9940b080 100644 --- a/include/linux/if_hippi.h +++ b/include/linux/if_hippi.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #ifndef _LINUX_IF_HIPPI_H | 22 | #ifndef _LINUX_IF_HIPPI_H |
| 23 | #define _LINUX_IF_HIPPI_H | 23 | #define _LINUX_IF_HIPPI_H |
| 24 | 24 | ||
| 25 | #include <linux/types.h> | ||
| 25 | #include <asm/byteorder.h> | 26 | #include <asm/byteorder.h> |
| 26 | 27 | ||
| 27 | /* | 28 | /* |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index f9032c88716a..176c5182c515 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _LINUX_IF_LINK_H | 1 | #ifndef _LINUX_IF_LINK_H |
| 2 | #define _LINUX_IF_LINK_H | 2 | #define _LINUX_IF_LINK_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
| 5 | 6 | ||
| 6 | /* The struct should be in sync with struct net_device_stats */ | 7 | /* The struct should be in sync with struct net_device_stats */ |
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h index c3b1f8562709..fcef103aa3f6 100644 --- a/include/linux/if_ppp.h +++ b/include/linux/if_ppp.h | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | #ifndef _IF_PPP_H_ | 33 | #ifndef _IF_PPP_H_ |
| 34 | #define _IF_PPP_H_ | 34 | #define _IF_PPP_H_ |
| 35 | 35 | ||
| 36 | #include <linux/types.h> | ||
| 36 | #include <linux/compiler.h> | 37 | #include <linux/compiler.h> |
| 37 | 38 | ||
| 38 | /* | 39 | /* |
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h index c7a66882b6d0..3a14b088c8ec 100644 --- a/include/linux/if_pppol2tp.h +++ b/include/linux/if_pppol2tp.h | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | */ | 26 | */ |
| 27 | struct pppol2tp_addr | 27 | struct pppol2tp_addr |
| 28 | { | 28 | { |
| 29 | pid_t pid; /* pid that owns the fd. | 29 | __kernel_pid_t pid; /* pid that owns the fd. |
| 30 | * 0 => current */ | 30 | * 0 => current */ |
| 31 | int fd; /* FD of UDP socket to use */ | 31 | int fd; /* FD of UDP socket to use */ |
| 32 | 32 | ||
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 30c88b2245ff..90b5fae5d714 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
| @@ -95,16 +95,16 @@ struct pppoe_tag { | |||
| 95 | } __attribute ((packed)); | 95 | } __attribute ((packed)); |
| 96 | 96 | ||
| 97 | /* Tag identifiers */ | 97 | /* Tag identifiers */ |
| 98 | #define PTT_EOL __constant_htons(0x0000) | 98 | #define PTT_EOL __cpu_to_be16(0x0000) |
| 99 | #define PTT_SRV_NAME __constant_htons(0x0101) | 99 | #define PTT_SRV_NAME __cpu_to_be16(0x0101) |
| 100 | #define PTT_AC_NAME __constant_htons(0x0102) | 100 | #define PTT_AC_NAME __cpu_to_be16(0x0102) |
| 101 | #define PTT_HOST_UNIQ __constant_htons(0x0103) | 101 | #define PTT_HOST_UNIQ __cpu_to_be16(0x0103) |
| 102 | #define PTT_AC_COOKIE __constant_htons(0x0104) | 102 | #define PTT_AC_COOKIE __cpu_to_be16(0x0104) |
| 103 | #define PTT_VENDOR __constant_htons(0x0105) | 103 | #define PTT_VENDOR __cpu_to_be16(0x0105) |
| 104 | #define PTT_RELAY_SID __constant_htons(0x0110) | 104 | #define PTT_RELAY_SID __cpu_to_be16(0x0110) |
| 105 | #define PTT_SRV_ERR __constant_htons(0x0201) | 105 | #define PTT_SRV_ERR __cpu_to_be16(0x0201) |
| 106 | #define PTT_SYS_ERR __constant_htons(0x0202) | 106 | #define PTT_SYS_ERR __cpu_to_be16(0x0202) |
| 107 | #define PTT_GEN_ERR __constant_htons(0x0203) | 107 | #define PTT_GEN_ERR __cpu_to_be16(0x0203) |
| 108 | 108 | ||
| 109 | struct pppoe_hdr { | 109 | struct pppoe_hdr { |
| 110 | #if defined(__LITTLE_ENDIAN_BITFIELD) | 110 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
diff --git a/include/linux/if_strip.h b/include/linux/if_strip.h index fb5c5c98442f..6526a6235832 100644 --- a/include/linux/if_strip.h +++ b/include/linux/if_strip.h | |||
| @@ -18,6 +18,8 @@ | |||
| 18 | #ifndef __LINUX_STRIP_H | 18 | #ifndef __LINUX_STRIP_H |
| 19 | #define __LINUX_STRIP_H | 19 | #define __LINUX_STRIP_H |
| 20 | 20 | ||
| 21 | #include <linux/types.h> | ||
| 22 | |||
| 21 | typedef struct { | 23 | typedef struct { |
| 22 | __u8 c[6]; | 24 | __u8 c[6]; |
| 23 | } MetricomAddress; | 25 | } MetricomAddress; |
diff --git a/include/linux/if_tr.h b/include/linux/if_tr.h index 5bcec8b2c5e2..fc23aeb0f201 100644 --- a/include/linux/if_tr.h +++ b/include/linux/if_tr.h | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #ifndef _LINUX_IF_TR_H | 19 | #ifndef _LINUX_IF_TR_H |
| 20 | #define _LINUX_IF_TR_H | 20 | #define _LINUX_IF_TR_H |
| 21 | 21 | ||
| 22 | #include <linux/types.h> | ||
| 22 | #include <asm/byteorder.h> /* For __be16 */ | 23 | #include <asm/byteorder.h> /* For __be16 */ |
| 23 | 24 | ||
| 24 | /* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble | 25 | /* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble |
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 8529f57ba263..049d6c9428db 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
| @@ -46,6 +46,8 @@ | |||
| 46 | #define TUNSETOFFLOAD _IOW('T', 208, unsigned int) | 46 | #define TUNSETOFFLOAD _IOW('T', 208, unsigned int) |
| 47 | #define TUNSETTXFILTER _IOW('T', 209, unsigned int) | 47 | #define TUNSETTXFILTER _IOW('T', 209, unsigned int) |
| 48 | #define TUNGETIFF _IOR('T', 210, unsigned int) | 48 | #define TUNGETIFF _IOR('T', 210, unsigned int) |
| 49 | #define TUNGETSNDBUF _IOR('T', 211, int) | ||
| 50 | #define TUNSETSNDBUF _IOW('T', 212, int) | ||
| 49 | 51 | ||
| 50 | /* TUNSETIFF ifr flags */ | 52 | /* TUNSETIFF ifr flags */ |
| 51 | #define IFF_TUN 0x0001 | 53 | #define IFF_TUN 0x0001 |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index aeab2cb32a9c..5a9aae4adb44 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
| @@ -2,7 +2,10 @@ | |||
| 2 | #define _IF_TUNNEL_H_ | 2 | #define _IF_TUNNEL_H_ |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | |||
| 6 | #ifdef __KERNEL__ | ||
| 5 | #include <linux/ip.h> | 7 | #include <linux/ip.h> |
| 8 | #endif | ||
| 6 | 9 | ||
| 7 | #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) | 10 | #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) |
| 8 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) | 11 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) |
| @@ -13,14 +16,14 @@ | |||
| 13 | #define SIOCDELPRL (SIOCDEVPRIVATE + 6) | 16 | #define SIOCDELPRL (SIOCDEVPRIVATE + 6) |
| 14 | #define SIOCCHGPRL (SIOCDEVPRIVATE + 7) | 17 | #define SIOCCHGPRL (SIOCDEVPRIVATE + 7) |
| 15 | 18 | ||
| 16 | #define GRE_CSUM __constant_htons(0x8000) | 19 | #define GRE_CSUM __cpu_to_be16(0x8000) |
| 17 | #define GRE_ROUTING __constant_htons(0x4000) | 20 | #define GRE_ROUTING __cpu_to_be16(0x4000) |
| 18 | #define GRE_KEY __constant_htons(0x2000) | 21 | #define GRE_KEY __cpu_to_be16(0x2000) |
| 19 | #define GRE_SEQ __constant_htons(0x1000) | 22 | #define GRE_SEQ __cpu_to_be16(0x1000) |
| 20 | #define GRE_STRICT __constant_htons(0x0800) | 23 | #define GRE_STRICT __cpu_to_be16(0x0800) |
| 21 | #define GRE_REC __constant_htons(0x0700) | 24 | #define GRE_REC __cpu_to_be16(0x0700) |
| 22 | #define GRE_FLAGS __constant_htons(0x00F8) | 25 | #define GRE_FLAGS __cpu_to_be16(0x00F8) |
| 23 | #define GRE_VERSION __constant_htons(0x0007) | 26 | #define GRE_VERSION __cpu_to_be16(0x0007) |
| 24 | 27 | ||
| 25 | struct ip_tunnel_parm | 28 | struct ip_tunnel_parm |
| 26 | { | 29 | { |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index f8ff918c208f..e1ff5b14310e 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
| @@ -210,6 +210,7 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci) | |||
| 210 | 210 | ||
| 211 | /* Move the mac addresses to the beginning of the new header. */ | 211 | /* Move the mac addresses to the beginning of the new header. */ |
| 212 | memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN); | 212 | memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN); |
| 213 | skb->mac_header -= VLAN_HLEN; | ||
| 213 | 214 | ||
| 214 | /* first, the ethernet type */ | 215 | /* first, the ethernet type */ |
| 215 | veth->h_vlan_proto = htons(ETH_P_8021Q); | 216 | veth->h_vlan_proto = htons(ETH_P_8021Q); |
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index f734a0ba0698..92fbd8cbd68f 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #ifndef _LINUX_IGMP_H | 16 | #ifndef _LINUX_IGMP_H |
| 17 | #define _LINUX_IGMP_H | 17 | #define _LINUX_IGMP_H |
| 18 | 18 | ||
| 19 | #include <linux/types.h> | ||
| 19 | #include <asm/byteorder.h> | 20 | #include <asm/byteorder.h> |
| 20 | 21 | ||
| 21 | /* | 22 | /* |
diff --git a/include/linux/ima.h b/include/linux/ima.h new file mode 100644 index 000000000000..0e2aa45cb0ce --- /dev/null +++ b/include/linux/ima.h | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2008 IBM Corporation | ||
| 3 | * Author: Mimi Zohar <zohar@us.ibm.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation, version 2 of the License. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef _LINUX_IMA_H | ||
| 11 | #define _LINUX_IMA_H | ||
| 12 | |||
| 13 | #include <linux/fs.h> | ||
| 14 | struct linux_binprm; | ||
| 15 | |||
| 16 | #ifdef CONFIG_IMA | ||
| 17 | extern int ima_bprm_check(struct linux_binprm *bprm); | ||
| 18 | extern int ima_inode_alloc(struct inode *inode); | ||
| 19 | extern void ima_inode_free(struct inode *inode); | ||
| 20 | extern int ima_path_check(struct path *path, int mask); | ||
| 21 | extern void ima_file_free(struct file *file); | ||
| 22 | extern int ima_file_mmap(struct file *file, unsigned long prot); | ||
| 23 | extern void ima_shm_check(struct file *file); | ||
| 24 | |||
| 25 | #else | ||
| 26 | static inline int ima_bprm_check(struct linux_binprm *bprm) | ||
| 27 | { | ||
| 28 | return 0; | ||
| 29 | } | ||
| 30 | |||
| 31 | static inline int ima_inode_alloc(struct inode *inode) | ||
| 32 | { | ||
| 33 | return 0; | ||
| 34 | } | ||
| 35 | |||
| 36 | static inline void ima_inode_free(struct inode *inode) | ||
| 37 | { | ||
| 38 | return; | ||
| 39 | } | ||
| 40 | |||
| 41 | static inline int ima_path_check(struct path *path, int mask) | ||
| 42 | { | ||
| 43 | return 0; | ||
| 44 | } | ||
| 45 | |||
| 46 | static inline void ima_file_free(struct file *file) | ||
| 47 | { | ||
| 48 | return; | ||
| 49 | } | ||
| 50 | |||
| 51 | static inline int ima_file_mmap(struct file *file, unsigned long prot) | ||
| 52 | { | ||
| 53 | return 0; | ||
| 54 | } | ||
| 55 | |||
| 56 | static inline void ima_shm_check(struct file *file) | ||
| 57 | { | ||
| 58 | return; | ||
| 59 | } | ||
| 60 | #endif /* CONFIG_IMA_H */ | ||
| 61 | #endif /* _LINUX_IMA_H */ | ||
diff --git a/include/linux/in6.h b/include/linux/in6.h index bc492048c349..718bf21c5754 100644 --- a/include/linux/in6.h +++ b/include/linux/in6.h | |||
| @@ -44,11 +44,11 @@ struct in6_addr | |||
| 44 | * NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined | 44 | * NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined |
| 45 | * in network byte order, not in host byte order as are the IPv4 equivalents | 45 | * in network byte order, not in host byte order as are the IPv4 equivalents |
| 46 | */ | 46 | */ |
| 47 | #ifdef __KERNEL__ | ||
| 47 | extern const struct in6_addr in6addr_any; | 48 | extern const struct in6_addr in6addr_any; |
| 48 | #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } | 49 | #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } |
| 49 | extern const struct in6_addr in6addr_loopback; | 50 | extern const struct in6_addr in6addr_loopback; |
| 50 | #define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } | 51 | #define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } |
| 51 | #ifdef __KERNEL__ | ||
| 52 | extern const struct in6_addr in6addr_linklocal_allnodes; | 52 | extern const struct in6_addr in6addr_linklocal_allnodes; |
| 53 | #define IN6ADDR_LINKLOCAL_ALLNODES_INIT \ | 53 | #define IN6ADDR_LINKLOCAL_ALLNODES_INIT \ |
| 54 | { { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } | 54 | { { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } |
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h index 6e8bc548635a..bc8c49022084 100644 --- a/include/linux/inet_diag.h +++ b/include/linux/inet_diag.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _INET_DIAG_H_ | 1 | #ifndef _INET_DIAG_H_ |
| 2 | #define _INET_DIAG_H_ 1 | 2 | #define _INET_DIAG_H_ 1 |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | /* Just some random number */ | 6 | /* Just some random number */ |
| 5 | #define TCPDIAG_GETSOCK 18 | 7 | #define TCPDIAG_GETSOCK 18 |
| 6 | #define DCCPDIAG_GETSOCK 19 | 8 | #define DCCPDIAG_GETSOCK 19 |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 06fcdb45106b..acef2a770b6b 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
| @@ -108,6 +108,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev) | |||
| 108 | #define IN_DEV_ARPFILTER(in_dev) IN_DEV_ORCONF((in_dev), ARPFILTER) | 108 | #define IN_DEV_ARPFILTER(in_dev) IN_DEV_ORCONF((in_dev), ARPFILTER) |
| 109 | #define IN_DEV_ARP_ANNOUNCE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_ANNOUNCE) | 109 | #define IN_DEV_ARP_ANNOUNCE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_ANNOUNCE) |
| 110 | #define IN_DEV_ARP_IGNORE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_IGNORE) | 110 | #define IN_DEV_ARP_IGNORE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_IGNORE) |
| 111 | #define IN_DEV_ARP_NOTIFY(in_dev) IN_DEV_MAXCONF((in_dev), ARP_NOTIFY) | ||
| 111 | 112 | ||
| 112 | struct in_ifaddr | 113 | struct in_ifaddr |
| 113 | { | 114 | { |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 2f3c2d4ef73b..af1de95e711e 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -48,6 +48,11 @@ extern struct fs_struct init_fs; | |||
| 48 | .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ | 48 | .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ |
| 49 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ | 49 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ |
| 50 | .rlim = INIT_RLIMITS, \ | 50 | .rlim = INIT_RLIMITS, \ |
| 51 | .cputimer = { \ | ||
| 52 | .cputime = INIT_CPUTIME, \ | ||
| 53 | .running = 0, \ | ||
| 54 | .lock = __SPIN_LOCK_UNLOCKED(sig.cputimer.lock), \ | ||
| 55 | }, \ | ||
| 51 | } | 56 | } |
| 52 | 57 | ||
| 53 | extern struct nsproxy init_nsproxy; | 58 | extern struct nsproxy init_nsproxy; |
| @@ -142,6 +147,7 @@ extern struct cred init_cred; | |||
| 142 | .nr_cpus_allowed = NR_CPUS, \ | 147 | .nr_cpus_allowed = NR_CPUS, \ |
| 143 | }, \ | 148 | }, \ |
| 144 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ | 149 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ |
| 150 | .pushable_tasks = PLIST_NODE_INIT(tsk.pushable_tasks, MAX_PRIO), \ | ||
| 145 | .ptraced = LIST_HEAD_INIT(tsk.ptraced), \ | 151 | .ptraced = LIST_HEAD_INIT(tsk.ptraced), \ |
| 146 | .ptrace_entry = LIST_HEAD_INIT(tsk.ptrace_entry), \ | 152 | .ptrace_entry = LIST_HEAD_INIT(tsk.ptrace_entry), \ |
| 147 | .real_parent = &tsk, \ | 153 | .real_parent = &tsk, \ |
diff --git a/include/linux/input.h b/include/linux/input.h index 1249a0c20a38..6b28048fc568 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -661,6 +661,7 @@ struct input_absinfo { | |||
| 661 | #define SW_DOCK 0x05 /* set = plugged into dock */ | 661 | #define SW_DOCK 0x05 /* set = plugged into dock */ |
| 662 | #define SW_LINEOUT_INSERT 0x06 /* set = inserted */ | 662 | #define SW_LINEOUT_INSERT 0x06 /* set = inserted */ |
| 663 | #define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ | 663 | #define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ |
| 664 | #define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ | ||
| 664 | #define SW_MAX 0x0f | 665 | #define SW_MAX 0x0f |
| 665 | #define SW_CNT (SW_MAX+1) | 666 | #define SW_CNT (SW_MAX+1) |
| 666 | 667 | ||
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index c4f6c101dbcd..d2e3cbfba14f 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h | |||
| @@ -194,6 +194,7 @@ static inline void dmar_writeq(void __iomem *addr, u64 val) | |||
| 194 | /* FSTS_REG */ | 194 | /* FSTS_REG */ |
| 195 | #define DMA_FSTS_PPF ((u32)2) | 195 | #define DMA_FSTS_PPF ((u32)2) |
| 196 | #define DMA_FSTS_PFO ((u32)1) | 196 | #define DMA_FSTS_PFO ((u32)1) |
| 197 | #define DMA_FSTS_IQE (1 << 4) | ||
| 197 | #define dma_fsts_fault_record_index(s) (((s) >> 8) & 0xff) | 198 | #define dma_fsts_fault_record_index(s) (((s) >> 8) & 0xff) |
| 198 | 199 | ||
| 199 | /* FRCD_REG, 32 bits access */ | 200 | /* FRCD_REG, 32 bits access */ |
| @@ -328,7 +329,7 @@ extern int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr, | |||
| 328 | unsigned int size_order, u64 type, | 329 | unsigned int size_order, u64 type, |
| 329 | int non_present_entry_flush); | 330 | int non_present_entry_flush); |
| 330 | 331 | ||
| 331 | extern void qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); | 332 | extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); |
| 332 | 333 | ||
| 333 | extern void *intel_alloc_coherent(struct device *, size_t, dma_addr_t *, gfp_t); | 334 | extern void *intel_alloc_coherent(struct device *, size_t, dma_addr_t *, gfp_t); |
| 334 | extern void intel_free_coherent(struct device *, size_t, void *, dma_addr_t); | 335 | extern void intel_free_coherent(struct device *, size_t, void *, dma_addr_t); |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 9127f6b51a39..91658d076598 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -61,6 +61,17 @@ | |||
| 61 | 61 | ||
| 62 | typedef irqreturn_t (*irq_handler_t)(int, void *); | 62 | typedef irqreturn_t (*irq_handler_t)(int, void *); |
| 63 | 63 | ||
| 64 | /** | ||
| 65 | * struct irqaction - per interrupt action descriptor | ||
| 66 | * @handler: interrupt handler function | ||
| 67 | * @flags: flags (see IRQF_* above) | ||
| 68 | * @mask: no comment as it is useless and about to be removed | ||
| 69 | * @name: name of the device | ||
| 70 | * @dev_id: cookie to identify the device | ||
| 71 | * @next: pointer to the next irqaction for shared interrupts | ||
| 72 | * @irq: interrupt number | ||
| 73 | * @dir: pointer to the proc/irq/NN/name entry | ||
| 74 | */ | ||
| 64 | struct irqaction { | 75 | struct irqaction { |
| 65 | irq_handler_t handler; | 76 | irq_handler_t handler; |
| 66 | unsigned long flags; | 77 | unsigned long flags; |
| @@ -462,6 +473,12 @@ static inline void init_irq_proc(void) | |||
| 462 | } | 473 | } |
| 463 | #endif | 474 | #endif |
| 464 | 475 | ||
| 476 | #if defined(CONFIG_GENERIC_HARDIRQS) && defined(CONFIG_DEBUG_SHIRQ) | ||
| 477 | extern void debug_poll_all_shared_irqs(void); | ||
| 478 | #else | ||
| 479 | static inline void debug_poll_all_shared_irqs(void) { } | ||
| 480 | #endif | ||
| 481 | |||
| 465 | int show_interrupts(struct seq_file *p, void *v); | 482 | int show_interrupts(struct seq_file *p, void *v); |
| 466 | 483 | ||
| 467 | struct irq_desc; | 484 | struct irq_desc; |
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 82df31726a54..0adb0f91568c 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
| @@ -30,11 +30,14 @@ | |||
| 30 | * See Documentation/io_mapping.txt | 30 | * See Documentation/io_mapping.txt |
| 31 | */ | 31 | */ |
| 32 | 32 | ||
| 33 | /* this struct isn't actually defined anywhere */ | ||
| 34 | struct io_mapping; | ||
| 35 | |||
| 36 | #ifdef CONFIG_HAVE_ATOMIC_IOMAP | 33 | #ifdef CONFIG_HAVE_ATOMIC_IOMAP |
| 37 | 34 | ||
| 35 | struct io_mapping { | ||
| 36 | resource_size_t base; | ||
| 37 | unsigned long size; | ||
| 38 | pgprot_t prot; | ||
| 39 | }; | ||
| 40 | |||
| 38 | /* | 41 | /* |
| 39 | * For small address space machines, mapping large objects | 42 | * For small address space machines, mapping large objects |
| 40 | * into the kernel virtual space isn't practical. Where | 43 | * into the kernel virtual space isn't practical. Where |
| @@ -43,23 +46,40 @@ struct io_mapping; | |||
| 43 | */ | 46 | */ |
| 44 | 47 | ||
| 45 | static inline struct io_mapping * | 48 | static inline struct io_mapping * |
| 46 | io_mapping_create_wc(unsigned long base, unsigned long size) | 49 | io_mapping_create_wc(resource_size_t base, unsigned long size) |
| 47 | { | 50 | { |
| 48 | return (struct io_mapping *) base; | 51 | struct io_mapping *iomap; |
| 52 | |||
| 53 | if (!is_io_mapping_possible(base, size)) | ||
| 54 | return NULL; | ||
| 55 | |||
| 56 | iomap = kmalloc(sizeof(*iomap), GFP_KERNEL); | ||
| 57 | if (!iomap) | ||
| 58 | return NULL; | ||
| 59 | |||
| 60 | iomap->base = base; | ||
| 61 | iomap->size = size; | ||
| 62 | iomap->prot = pgprot_writecombine(__pgprot(__PAGE_KERNEL)); | ||
| 63 | return iomap; | ||
| 49 | } | 64 | } |
| 50 | 65 | ||
| 51 | static inline void | 66 | static inline void |
| 52 | io_mapping_free(struct io_mapping *mapping) | 67 | io_mapping_free(struct io_mapping *mapping) |
| 53 | { | 68 | { |
| 69 | kfree(mapping); | ||
| 54 | } | 70 | } |
| 55 | 71 | ||
| 56 | /* Atomic map/unmap */ | 72 | /* Atomic map/unmap */ |
| 57 | static inline void * | 73 | static inline void * |
| 58 | io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) | 74 | io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) |
| 59 | { | 75 | { |
| 60 | offset += (unsigned long) mapping; | 76 | resource_size_t phys_addr; |
| 61 | return iomap_atomic_prot_pfn(offset >> PAGE_SHIFT, KM_USER0, | 77 | unsigned long pfn; |
| 62 | __pgprot(__PAGE_KERNEL_WC)); | 78 | |
| 79 | BUG_ON(offset >= mapping->size); | ||
| 80 | phys_addr = mapping->base + offset; | ||
| 81 | pfn = (unsigned long) (phys_addr >> PAGE_SHIFT); | ||
| 82 | return iomap_atomic_prot_pfn(pfn, KM_USER0, mapping->prot); | ||
| 63 | } | 83 | } |
| 64 | 84 | ||
| 65 | static inline void | 85 | static inline void |
| @@ -71,8 +91,12 @@ io_mapping_unmap_atomic(void *vaddr) | |||
| 71 | static inline void * | 91 | static inline void * |
| 72 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | 92 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) |
| 73 | { | 93 | { |
| 74 | offset += (unsigned long) mapping; | 94 | resource_size_t phys_addr; |
| 75 | return ioremap_wc(offset, PAGE_SIZE); | 95 | |
| 96 | BUG_ON(offset >= mapping->size); | ||
| 97 | phys_addr = mapping->base + offset; | ||
| 98 | |||
| 99 | return ioremap_wc(phys_addr, PAGE_SIZE); | ||
| 76 | } | 100 | } |
| 77 | 101 | ||
| 78 | static inline void | 102 | static inline void |
| @@ -83,9 +107,12 @@ io_mapping_unmap(void *vaddr) | |||
| 83 | 107 | ||
| 84 | #else | 108 | #else |
| 85 | 109 | ||
| 110 | /* this struct isn't actually defined anywhere */ | ||
| 111 | struct io_mapping; | ||
| 112 | |||
| 86 | /* Create the io_mapping object*/ | 113 | /* Create the io_mapping object*/ |
| 87 | static inline struct io_mapping * | 114 | static inline struct io_mapping * |
| 88 | io_mapping_create_wc(unsigned long base, unsigned long size) | 115 | io_mapping_create_wc(resource_size_t base, unsigned long size) |
| 89 | { | 116 | { |
| 90 | return (struct io_mapping *) ioremap_wc(base, size); | 117 | return (struct io_mapping *) ioremap_wc(base, size); |
| 91 | } | 118 | } |
diff --git a/include/linux/ip6_tunnel.h b/include/linux/ip6_tunnel.h index 1e7cc4af40de..acb9ad684d63 100644 --- a/include/linux/ip6_tunnel.h +++ b/include/linux/ip6_tunnel.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _IP6_TUNNEL_H | 1 | #ifndef _IP6_TUNNEL_H |
| 2 | #define _IP6_TUNNEL_H | 2 | #define _IP6_TUNNEL_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | #define IPV6_TLV_TNL_ENCAP_LIMIT 4 | 6 | #define IPV6_TLV_TNL_ENCAP_LIMIT 4 |
| 5 | #define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4 | 7 | #define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4 |
| 6 | 8 | ||
diff --git a/include/linux/ip_vs.h b/include/linux/ip_vs.h index 0f434a28fb58..148265e63e8d 100644 --- a/include/linux/ip_vs.h +++ b/include/linux/ip_vs.h | |||
| @@ -96,10 +96,10 @@ | |||
| 96 | */ | 96 | */ |
| 97 | struct ip_vs_service_user { | 97 | struct ip_vs_service_user { |
| 98 | /* virtual service addresses */ | 98 | /* virtual service addresses */ |
| 99 | u_int16_t protocol; | 99 | __u16 protocol; |
| 100 | __be32 addr; /* virtual ip address */ | 100 | __be32 addr; /* virtual ip address */ |
| 101 | __be16 port; | 101 | __be16 port; |
| 102 | u_int32_t fwmark; /* firwall mark of service */ | 102 | __u32 fwmark; /* firwall mark of service */ |
| 103 | 103 | ||
| 104 | /* virtual service options */ | 104 | /* virtual service options */ |
| 105 | char sched_name[IP_VS_SCHEDNAME_MAXLEN]; | 105 | char sched_name[IP_VS_SCHEDNAME_MAXLEN]; |
| @@ -119,8 +119,8 @@ struct ip_vs_dest_user { | |||
| 119 | int weight; /* destination weight */ | 119 | int weight; /* destination weight */ |
| 120 | 120 | ||
| 121 | /* thresholds for active connections */ | 121 | /* thresholds for active connections */ |
| 122 | u_int32_t u_threshold; /* upper threshold */ | 122 | __u32 u_threshold; /* upper threshold */ |
| 123 | u_int32_t l_threshold; /* lower threshold */ | 123 | __u32 l_threshold; /* lower threshold */ |
| 124 | }; | 124 | }; |
| 125 | 125 | ||
| 126 | 126 | ||
| @@ -159,10 +159,10 @@ struct ip_vs_getinfo { | |||
| 159 | /* The argument to IP_VS_SO_GET_SERVICE */ | 159 | /* The argument to IP_VS_SO_GET_SERVICE */ |
| 160 | struct ip_vs_service_entry { | 160 | struct ip_vs_service_entry { |
| 161 | /* which service: user fills in these */ | 161 | /* which service: user fills in these */ |
| 162 | u_int16_t protocol; | 162 | __u16 protocol; |
| 163 | __be32 addr; /* virtual address */ | 163 | __be32 addr; /* virtual address */ |
| 164 | __be16 port; | 164 | __be16 port; |
| 165 | u_int32_t fwmark; /* firwall mark of service */ | 165 | __u32 fwmark; /* firwall mark of service */ |
| 166 | 166 | ||
| 167 | /* service options */ | 167 | /* service options */ |
| 168 | char sched_name[IP_VS_SCHEDNAME_MAXLEN]; | 168 | char sched_name[IP_VS_SCHEDNAME_MAXLEN]; |
| @@ -184,12 +184,12 @@ struct ip_vs_dest_entry { | |||
| 184 | unsigned conn_flags; /* connection flags */ | 184 | unsigned conn_flags; /* connection flags */ |
| 185 | int weight; /* destination weight */ | 185 | int weight; /* destination weight */ |
| 186 | 186 | ||
| 187 | u_int32_t u_threshold; /* upper threshold */ | 187 | __u32 u_threshold; /* upper threshold */ |
| 188 | u_int32_t l_threshold; /* lower threshold */ | 188 | __u32 l_threshold; /* lower threshold */ |
| 189 | 189 | ||
| 190 | u_int32_t activeconns; /* active connections */ | 190 | __u32 activeconns; /* active connections */ |
| 191 | u_int32_t inactconns; /* inactive connections */ | 191 | __u32 inactconns; /* inactive connections */ |
| 192 | u_int32_t persistconns; /* persistent connections */ | 192 | __u32 persistconns; /* persistent connections */ |
| 193 | 193 | ||
| 194 | /* statistics */ | 194 | /* statistics */ |
| 195 | struct ip_vs_stats_user stats; | 195 | struct ip_vs_stats_user stats; |
| @@ -199,10 +199,10 @@ struct ip_vs_dest_entry { | |||
| 199 | /* The argument to IP_VS_SO_GET_DESTS */ | 199 | /* The argument to IP_VS_SO_GET_DESTS */ |
| 200 | struct ip_vs_get_dests { | 200 | struct ip_vs_get_dests { |
| 201 | /* which service: user fills in these */ | 201 | /* which service: user fills in these */ |
| 202 | u_int16_t protocol; | 202 | __u16 protocol; |
| 203 | __be32 addr; /* virtual address */ | 203 | __be32 addr; /* virtual address */ |
| 204 | __be16 port; | 204 | __be16 port; |
| 205 | u_int32_t fwmark; /* firwall mark of service */ | 205 | __u32 fwmark; /* firwall mark of service */ |
| 206 | 206 | ||
| 207 | /* number of real servers */ | 207 | /* number of real servers */ |
| 208 | unsigned int num_dests; | 208 | unsigned int num_dests; |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 0b816cae533e..476d9464ac82 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _IPV6_H | 1 | #ifndef _IPV6_H |
| 2 | #define _IPV6_H | 2 | #define _IPV6_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/in6.h> | 5 | #include <linux/in6.h> |
| 5 | #include <asm/byteorder.h> | 6 | #include <asm/byteorder.h> |
| 6 | 7 | ||
diff --git a/include/linux/ipv6_route.h b/include/linux/ipv6_route.h index b323ff577967..1e7d8af2defe 100644 --- a/include/linux/ipv6_route.h +++ b/include/linux/ipv6_route.h | |||
| @@ -13,6 +13,8 @@ | |||
| 13 | #ifndef _LINUX_IPV6_ROUTE_H | 13 | #ifndef _LINUX_IPV6_ROUTE_H |
| 14 | #define _LINUX_IPV6_ROUTE_H | 14 | #define _LINUX_IPV6_ROUTE_H |
| 15 | 15 | ||
| 16 | #include <linux/types.h> | ||
| 17 | |||
| 16 | #define RTF_DEFAULT 0x00010000 /* default - learned via ND */ | 18 | #define RTF_DEFAULT 0x00010000 /* default - learned via ND */ |
| 17 | #define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed) | 19 | #define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed) |
| 18 | fallback, no routers on link */ | 20 | fallback, no routers on link */ |
diff --git a/include/linux/ipx.h b/include/linux/ipx.h index eb19b4ea84f4..aabb1d294025 100644 --- a/include/linux/ipx.h +++ b/include/linux/ipx.h | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | #ifndef _IPX_H_ | 1 | #ifndef _IPX_H_ |
| 2 | #define _IPX_H_ | 2 | #define _IPX_H_ |
| 3 | #include <linux/types.h> | ||
| 3 | #include <linux/sockios.h> | 4 | #include <linux/sockios.h> |
| 4 | #include <linux/socket.h> | 5 | #include <linux/socket.h> |
| 5 | #define IPX_NODE_LEN 6 | 6 | #define IPX_NODE_LEN 6 |
diff --git a/include/linux/irda.h b/include/linux/irda.h index 28f88ecba344..00bdad0e8515 100644 --- a/include/linux/irda.h +++ b/include/linux/irda.h | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | #ifndef KERNEL_IRDA_H | 25 | #ifndef KERNEL_IRDA_H |
| 26 | #define KERNEL_IRDA_H | 26 | #define KERNEL_IRDA_H |
| 27 | 27 | ||
| 28 | #include <linux/types.h> | ||
| 29 | |||
| 28 | /* Please do *not* add any #include in this file, this file is | 30 | /* Please do *not* add any #include in this file, this file is |
| 29 | * included as-is in user space. | 31 | * included as-is in user space. |
| 30 | * Please fix the calling file to properly included needed files before | 32 | * Please fix the calling file to properly included needed files before |
diff --git a/include/linux/irq.h b/include/linux/irq.h index f899b502f186..6db939a575bd 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -160,12 +160,10 @@ struct irq_2_iommu; | |||
| 160 | */ | 160 | */ |
| 161 | struct irq_desc { | 161 | struct irq_desc { |
| 162 | unsigned int irq; | 162 | unsigned int irq; |
| 163 | #ifdef CONFIG_SPARSE_IRQ | ||
| 164 | struct timer_rand_state *timer_rand_state; | 163 | struct timer_rand_state *timer_rand_state; |
| 165 | unsigned int *kstat_irqs; | 164 | unsigned int *kstat_irqs; |
| 166 | # ifdef CONFIG_INTR_REMAP | 165 | #ifdef CONFIG_INTR_REMAP |
| 167 | struct irq_2_iommu *irq_2_iommu; | 166 | struct irq_2_iommu *irq_2_iommu; |
| 168 | # endif | ||
| 169 | #endif | 167 | #endif |
| 170 | irq_flow_handler_t handle_irq; | 168 | irq_flow_handler_t handle_irq; |
| 171 | struct irq_chip *chip; | 169 | struct irq_chip *chip; |
| @@ -202,12 +200,6 @@ extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc | |||
| 202 | extern struct irq_desc irq_desc[NR_IRQS]; | 200 | extern struct irq_desc irq_desc[NR_IRQS]; |
| 203 | #else /* CONFIG_SPARSE_IRQ */ | 201 | #else /* CONFIG_SPARSE_IRQ */ |
| 204 | extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu); | 202 | extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu); |
| 205 | |||
| 206 | #define kstat_irqs_this_cpu(DESC) \ | ||
| 207 | ((DESC)->kstat_irqs[smp_processor_id()]) | ||
| 208 | #define kstat_incr_irqs_this_cpu(irqno, DESC) \ | ||
| 209 | ((DESC)->kstat_irqs[smp_processor_id()]++) | ||
| 210 | |||
| 211 | #endif /* CONFIG_SPARSE_IRQ */ | 203 | #endif /* CONFIG_SPARSE_IRQ */ |
| 212 | 204 | ||
| 213 | extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu); | 205 | extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu); |
| @@ -226,7 +218,6 @@ irq_remap_to_desc(unsigned int irq, struct irq_desc *desc) | |||
| 226 | * Migration helpers for obsolete names, they will go away: | 218 | * Migration helpers for obsolete names, they will go away: |
| 227 | */ | 219 | */ |
| 228 | #define hw_interrupt_type irq_chip | 220 | #define hw_interrupt_type irq_chip |
| 229 | typedef struct irq_chip hw_irq_controller; | ||
| 230 | #define no_irq_type no_irq_chip | 221 | #define no_irq_type no_irq_chip |
| 231 | typedef struct irq_desc irq_desc_t; | 222 | typedef struct irq_desc irq_desc_t; |
| 232 | 223 | ||
| @@ -236,6 +227,7 @@ typedef struct irq_desc irq_desc_t; | |||
| 236 | #include <asm/hw_irq.h> | 227 | #include <asm/hw_irq.h> |
| 237 | 228 | ||
| 238 | extern int setup_irq(unsigned int irq, struct irqaction *new); | 229 | extern int setup_irq(unsigned int irq, struct irqaction *new); |
| 230 | extern void remove_irq(unsigned int irq, struct irqaction *act); | ||
| 239 | 231 | ||
| 240 | #ifdef CONFIG_GENERIC_HARDIRQS | 232 | #ifdef CONFIG_GENERIC_HARDIRQS |
| 241 | 233 | ||
| @@ -280,7 +272,7 @@ static inline int irq_balancing_disabled(unsigned int irq) | |||
| 280 | } | 272 | } |
| 281 | 273 | ||
| 282 | /* Handle irq action chains: */ | 274 | /* Handle irq action chains: */ |
| 283 | extern int handle_IRQ_event(unsigned int irq, struct irqaction *action); | 275 | extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action); |
| 284 | 276 | ||
| 285 | /* | 277 | /* |
| 286 | * Built-in IRQ handlers for various IRQ types, | 278 | * Built-in IRQ handlers for various IRQ types, |
| @@ -325,7 +317,7 @@ static inline void generic_handle_irq(unsigned int irq) | |||
| 325 | 317 | ||
| 326 | /* Handling of unhandled and spurious interrupts: */ | 318 | /* Handling of unhandled and spurious interrupts: */ |
| 327 | extern void note_interrupt(unsigned int irq, struct irq_desc *desc, | 319 | extern void note_interrupt(unsigned int irq, struct irq_desc *desc, |
| 328 | int action_ret); | 320 | irqreturn_t action_ret); |
| 329 | 321 | ||
| 330 | /* Resending of interrupts :*/ | 322 | /* Resending of interrupts :*/ |
| 331 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); | 323 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); |
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index 86af92e9e84c..52ebbb4b161d 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h | |||
| @@ -28,13 +28,17 @@ extern struct irq_desc *irq_to_desc(unsigned int irq); | |||
| 28 | # define for_each_irq_desc(irq, desc) \ | 28 | # define for_each_irq_desc(irq, desc) \ |
| 29 | for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \ | 29 | for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \ |
| 30 | irq++, desc = irq_to_desc(irq)) \ | 30 | irq++, desc = irq_to_desc(irq)) \ |
| 31 | if (desc) | 31 | if (!desc) \ |
| 32 | ; \ | ||
| 33 | else | ||
| 32 | 34 | ||
| 33 | 35 | ||
| 34 | # define for_each_irq_desc_reverse(irq, desc) \ | 36 | # define for_each_irq_desc_reverse(irq, desc) \ |
| 35 | for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \ | 37 | for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \ |
| 36 | irq--, desc = irq_to_desc(irq)) \ | 38 | irq--, desc = irq_to_desc(irq)) \ |
| 37 | if (desc) | 39 | if (!desc) \ |
| 40 | ; \ | ||
| 41 | else | ||
| 38 | 42 | ||
| 39 | #endif /* CONFIG_GENERIC_HARDIRQS */ | 43 | #endif /* CONFIG_GENERIC_HARDIRQS */ |
| 40 | 44 | ||
diff --git a/include/linux/irqreturn.h b/include/linux/irqreturn.h index 881883c2009d..c5584ca5b8c9 100644 --- a/include/linux/irqreturn.h +++ b/include/linux/irqreturn.h | |||
| @@ -1,25 +1,17 @@ | |||
| 1 | /* irqreturn.h */ | ||
| 2 | #ifndef _LINUX_IRQRETURN_H | 1 | #ifndef _LINUX_IRQRETURN_H |
| 3 | #define _LINUX_IRQRETURN_H | 2 | #define _LINUX_IRQRETURN_H |
| 4 | 3 | ||
| 5 | /* | 4 | /** |
| 6 | * For 2.4.x compatibility, 2.4.x can use | 5 | * enum irqreturn |
| 7 | * | 6 | * @IRQ_NONE interrupt was not from this device |
| 8 | * typedef void irqreturn_t; | 7 | * @IRQ_HANDLED interrupt was handled by this device |
| 9 | * #define IRQ_NONE | ||
| 10 | * #define IRQ_HANDLED | ||
| 11 | * #define IRQ_RETVAL(x) | ||
| 12 | * | ||
| 13 | * To mix old-style and new-style irq handler returns. | ||
| 14 | * | ||
| 15 | * IRQ_NONE means we didn't handle it. | ||
| 16 | * IRQ_HANDLED means that we did have a valid interrupt and handled it. | ||
| 17 | * IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled) | ||
| 18 | */ | 8 | */ |
| 19 | typedef int irqreturn_t; | 9 | enum irqreturn { |
| 10 | IRQ_NONE, | ||
| 11 | IRQ_HANDLED, | ||
| 12 | }; | ||
| 20 | 13 | ||
| 21 | #define IRQ_NONE (0) | 14 | typedef enum irqreturn irqreturn_t; |
| 22 | #define IRQ_HANDLED (1) | 15 | #define IRQ_RETVAL(x) ((x) != IRQ_NONE) |
| 23 | #define IRQ_RETVAL(x) ((x) != 0) | ||
| 24 | 16 | ||
| 25 | #endif | 17 | #endif |
diff --git a/include/linux/ivtvfb.h b/include/linux/ivtvfb.h index e20af47b59ad..9d88b29ddf55 100644 --- a/include/linux/ivtvfb.h +++ b/include/linux/ivtvfb.h | |||
| @@ -33,6 +33,6 @@ struct ivtvfb_dma_frame { | |||
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | #define IVTVFB_IOC_DMA_FRAME _IOW('V', BASE_VIDIOC_PRIVATE+0, struct ivtvfb_dma_frame) | 35 | #define IVTVFB_IOC_DMA_FRAME _IOW('V', BASE_VIDIOC_PRIVATE+0, struct ivtvfb_dma_frame) |
| 36 | #define FBIO_WAITFORVSYNC _IOW('F', 0x20, u_int32_t) | 36 | #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) |
| 37 | 37 | ||
| 38 | #endif | 38 | #endif |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index b45109c61fba..4d248b3f1323 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
| @@ -308,7 +308,8 @@ void buffer_assertion_failure(struct buffer_head *bh); | |||
| 308 | int val = (expr); \ | 308 | int val = (expr); \ |
| 309 | if (!val) { \ | 309 | if (!val) { \ |
| 310 | printk(KERN_ERR \ | 310 | printk(KERN_ERR \ |
| 311 | "EXT3-fs unexpected failure: %s;\n",# expr); \ | 311 | "JBD2 unexpected failure: %s: %s;\n", \ |
| 312 | __func__, #expr); \ | ||
| 312 | printk(KERN_ERR why "\n"); \ | 313 | printk(KERN_ERR why "\n"); \ |
| 313 | } \ | 314 | } \ |
| 314 | val; \ | 315 | val; \ |
| @@ -1149,7 +1150,8 @@ extern int jbd2_journal_clear_err (journal_t *); | |||
| 1149 | extern int jbd2_journal_bmap(journal_t *, unsigned long, unsigned long long *); | 1150 | extern int jbd2_journal_bmap(journal_t *, unsigned long, unsigned long long *); |
| 1150 | extern int jbd2_journal_force_commit(journal_t *); | 1151 | extern int jbd2_journal_force_commit(journal_t *); |
| 1151 | extern int jbd2_journal_file_inode(handle_t *handle, struct jbd2_inode *inode); | 1152 | extern int jbd2_journal_file_inode(handle_t *handle, struct jbd2_inode *inode); |
| 1152 | extern int jbd2_journal_begin_ordered_truncate(struct jbd2_inode *inode, loff_t new_size); | 1153 | extern int jbd2_journal_begin_ordered_truncate(journal_t *journal, |
| 1154 | struct jbd2_inode *inode, loff_t new_size); | ||
| 1153 | extern void jbd2_journal_init_jbd_inode(struct jbd2_inode *jinode, struct inode *inode); | 1155 | extern void jbd2_journal_init_jbd_inode(struct jbd2_inode *jinode, struct inode *inode); |
| 1154 | extern void jbd2_journal_release_jbd_inode(journal_t *journal, struct jbd2_inode *jinode); | 1156 | extern void jbd2_journal_release_jbd_inode(journal_t *journal, struct jbd2_inode *jinode); |
| 1155 | 1157 | ||
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h index da720bc3eb15..2b32d638147d 100644 --- a/include/linux/jffs2.h +++ b/include/linux/jffs2.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #ifndef __LINUX_JFFS2_H__ | 12 | #ifndef __LINUX_JFFS2_H__ |
| 13 | #define __LINUX_JFFS2_H__ | 13 | #define __LINUX_JFFS2_H__ |
| 14 | 14 | ||
| 15 | #include <linux/types.h> | ||
| 15 | #include <linux/magic.h> | 16 | #include <linux/magic.h> |
| 16 | 17 | ||
| 17 | /* You must include something which defines the C99 uintXX_t types. | 18 | /* You must include something which defines the C99 uintXX_t types. |
| @@ -91,15 +92,15 @@ | |||
| 91 | byteswapping */ | 92 | byteswapping */ |
| 92 | 93 | ||
| 93 | typedef struct { | 94 | typedef struct { |
| 94 | uint32_t v32; | 95 | __u32 v32; |
| 95 | } __attribute__((packed)) jint32_t; | 96 | } __attribute__((packed)) jint32_t; |
| 96 | 97 | ||
| 97 | typedef struct { | 98 | typedef struct { |
| 98 | uint32_t m; | 99 | __u32 m; |
| 99 | } __attribute__((packed)) jmode_t; | 100 | } __attribute__((packed)) jmode_t; |
| 100 | 101 | ||
| 101 | typedef struct { | 102 | typedef struct { |
| 102 | uint16_t v16; | 103 | __u16 v16; |
| 103 | } __attribute__((packed)) jint16_t; | 104 | } __attribute__((packed)) jint16_t; |
| 104 | 105 | ||
| 105 | struct jffs2_unknown_node | 106 | struct jffs2_unknown_node |
| @@ -121,12 +122,12 @@ struct jffs2_raw_dirent | |||
| 121 | jint32_t version; | 122 | jint32_t version; |
| 122 | jint32_t ino; /* == zero for unlink */ | 123 | jint32_t ino; /* == zero for unlink */ |
| 123 | jint32_t mctime; | 124 | jint32_t mctime; |
| 124 | uint8_t nsize; | 125 | __u8 nsize; |
| 125 | uint8_t type; | 126 | __u8 type; |
| 126 | uint8_t unused[2]; | 127 | __u8 unused[2]; |
| 127 | jint32_t node_crc; | 128 | jint32_t node_crc; |
| 128 | jint32_t name_crc; | 129 | jint32_t name_crc; |
| 129 | uint8_t name[0]; | 130 | __u8 name[0]; |
| 130 | }; | 131 | }; |
| 131 | 132 | ||
| 132 | /* The JFFS2 raw inode structure: Used for storage on physical media. */ | 133 | /* The JFFS2 raw inode structure: Used for storage on physical media. */ |
| @@ -153,12 +154,12 @@ struct jffs2_raw_inode | |||
| 153 | jint32_t offset; /* Where to begin to write. */ | 154 | jint32_t offset; /* Where to begin to write. */ |
| 154 | jint32_t csize; /* (Compressed) data size */ | 155 | jint32_t csize; /* (Compressed) data size */ |
| 155 | jint32_t dsize; /* Size of the node's data. (after decompression) */ | 156 | jint32_t dsize; /* Size of the node's data. (after decompression) */ |
| 156 | uint8_t compr; /* Compression algorithm used */ | 157 | __u8 compr; /* Compression algorithm used */ |
| 157 | uint8_t usercompr; /* Compression algorithm requested by the user */ | 158 | __u8 usercompr; /* Compression algorithm requested by the user */ |
| 158 | jint16_t flags; /* See JFFS2_INO_FLAG_* */ | 159 | jint16_t flags; /* See JFFS2_INO_FLAG_* */ |
| 159 | jint32_t data_crc; /* CRC for the (compressed) data. */ | 160 | jint32_t data_crc; /* CRC for the (compressed) data. */ |
| 160 | jint32_t node_crc; /* CRC for the raw inode (excluding data) */ | 161 | jint32_t node_crc; /* CRC for the raw inode (excluding data) */ |
| 161 | uint8_t data[0]; | 162 | __u8 data[0]; |
| 162 | }; | 163 | }; |
| 163 | 164 | ||
| 164 | struct jffs2_raw_xattr { | 165 | struct jffs2_raw_xattr { |
| @@ -168,12 +169,12 @@ struct jffs2_raw_xattr { | |||
| 168 | jint32_t hdr_crc; | 169 | jint32_t hdr_crc; |
| 169 | jint32_t xid; /* XATTR identifier number */ | 170 | jint32_t xid; /* XATTR identifier number */ |
| 170 | jint32_t version; | 171 | jint32_t version; |
| 171 | uint8_t xprefix; | 172 | __u8 xprefix; |
| 172 | uint8_t name_len; | 173 | __u8 name_len; |
| 173 | jint16_t value_len; | 174 | jint16_t value_len; |
| 174 | jint32_t data_crc; | 175 | jint32_t data_crc; |
| 175 | jint32_t node_crc; | 176 | jint32_t node_crc; |
| 176 | uint8_t data[0]; | 177 | __u8 data[0]; |
| 177 | } __attribute__((packed)); | 178 | } __attribute__((packed)); |
| 178 | 179 | ||
| 179 | struct jffs2_raw_xref | 180 | struct jffs2_raw_xref |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 343df9ef2412..914918abfdd1 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | #include <linux/log2.h> | 16 | #include <linux/log2.h> |
| 17 | #include <linux/typecheck.h> | 17 | #include <linux/typecheck.h> |
| 18 | #include <linux/ratelimit.h> | 18 | #include <linux/ratelimit.h> |
| 19 | #include <linux/dynamic_printk.h> | 19 | #include <linux/dynamic_debug.h> |
| 20 | #include <asm/byteorder.h> | 20 | #include <asm/byteorder.h> |
| 21 | #include <asm/bug.h> | 21 | #include <asm/bug.h> |
| 22 | 22 | ||
| @@ -358,9 +358,10 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
| 358 | #if defined(DEBUG) | 358 | #if defined(DEBUG) |
| 359 | #define pr_debug(fmt, ...) \ | 359 | #define pr_debug(fmt, ...) \ |
| 360 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | 360 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) |
| 361 | #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 361 | #elif defined(CONFIG_DYNAMIC_DEBUG) |
| 362 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | ||
| 362 | #define pr_debug(fmt, ...) do { \ | 363 | #define pr_debug(fmt, ...) do { \ |
| 363 | dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ | 364 | dynamic_pr_debug(fmt, ##__VA_ARGS__); \ |
| 364 | } while (0) | 365 | } while (0) |
| 365 | #else | 366 | #else |
| 366 | #define pr_debug(fmt, ...) \ | 367 | #define pr_debug(fmt, ...) \ |
| @@ -480,7 +481,8 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
| 480 | /* | 481 | /* |
| 481 | * swap - swap value of @a and @b | 482 | * swap - swap value of @a and @b |
| 482 | */ | 483 | */ |
| 483 | #define swap(a, b) ({ typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; }) | 484 | #define swap(a, b) \ |
| 485 | do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0) | ||
| 484 | 486 | ||
| 485 | /** | 487 | /** |
| 486 | * container_of - cast a member of a structure out to the containing structure | 488 | * container_of - cast a member of a structure out to the containing structure |
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 570d20413119..0c8b89f28a95 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
| @@ -28,7 +28,7 @@ struct cpu_usage_stat { | |||
| 28 | 28 | ||
| 29 | struct kernel_stat { | 29 | struct kernel_stat { |
| 30 | struct cpu_usage_stat cpustat; | 30 | struct cpu_usage_stat cpustat; |
| 31 | #ifndef CONFIG_SPARSE_IRQ | 31 | #ifndef CONFIG_GENERIC_HARDIRQS |
| 32 | unsigned int irqs[NR_IRQS]; | 32 | unsigned int irqs[NR_IRQS]; |
| 33 | #endif | 33 | #endif |
| 34 | }; | 34 | }; |
| @@ -41,7 +41,7 @@ DECLARE_PER_CPU(struct kernel_stat, kstat); | |||
| 41 | 41 | ||
| 42 | extern unsigned long long nr_context_switches(void); | 42 | extern unsigned long long nr_context_switches(void); |
| 43 | 43 | ||
| 44 | #ifndef CONFIG_SPARSE_IRQ | 44 | #ifndef CONFIG_GENERIC_HARDIRQS |
| 45 | #define kstat_irqs_this_cpu(irq) \ | 45 | #define kstat_irqs_this_cpu(irq) \ |
| 46 | (kstat_this_cpu.irqs[irq]) | 46 | (kstat_this_cpu.irqs[irq]) |
| 47 | 47 | ||
| @@ -52,16 +52,19 @@ static inline void kstat_incr_irqs_this_cpu(unsigned int irq, | |||
| 52 | { | 52 | { |
| 53 | kstat_this_cpu.irqs[irq]++; | 53 | kstat_this_cpu.irqs[irq]++; |
| 54 | } | 54 | } |
| 55 | #endif | ||
| 56 | |||
| 57 | 55 | ||
| 58 | #ifndef CONFIG_SPARSE_IRQ | ||
| 59 | static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) | 56 | static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) |
| 60 | { | 57 | { |
| 61 | return kstat_cpu(cpu).irqs[irq]; | 58 | return kstat_cpu(cpu).irqs[irq]; |
| 62 | } | 59 | } |
| 63 | #else | 60 | #else |
| 61 | #include <linux/irq.h> | ||
| 64 | extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); | 62 | extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); |
| 63 | #define kstat_irqs_this_cpu(DESC) \ | ||
| 64 | ((DESC)->kstat_irqs[smp_processor_id()]) | ||
| 65 | #define kstat_incr_irqs_this_cpu(irqno, DESC) \ | ||
| 66 | ((DESC)->kstat_irqs[smp_processor_id()]++) | ||
| 67 | |||
| 65 | #endif | 68 | #endif |
| 66 | 69 | ||
| 67 | /* | 70 | /* |
diff --git a/include/linux/klist.h b/include/linux/klist.h index d5a27af9dba5..e91a4e59b771 100644 --- a/include/linux/klist.h +++ b/include/linux/klist.h | |||
| @@ -22,7 +22,7 @@ struct klist { | |||
| 22 | struct list_head k_list; | 22 | struct list_head k_list; |
| 23 | void (*get)(struct klist_node *); | 23 | void (*get)(struct klist_node *); |
| 24 | void (*put)(struct klist_node *); | 24 | void (*put)(struct klist_node *); |
| 25 | }; | 25 | } __attribute__ ((aligned (4))); |
| 26 | 26 | ||
| 27 | #define KLIST_INIT(_name, _get, _put) \ | 27 | #define KLIST_INIT(_name, _get, _put) \ |
| 28 | { .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \ | 28 | { .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \ |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 5437ac0276e2..58ae8e00fcdd 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -68,10 +68,13 @@ struct kobject { | |||
| 68 | unsigned int state_in_sysfs:1; | 68 | unsigned int state_in_sysfs:1; |
| 69 | unsigned int state_add_uevent_sent:1; | 69 | unsigned int state_add_uevent_sent:1; |
| 70 | unsigned int state_remove_uevent_sent:1; | 70 | unsigned int state_remove_uevent_sent:1; |
| 71 | unsigned int uevent_suppress:1; | ||
| 71 | }; | 72 | }; |
| 72 | 73 | ||
| 73 | extern int kobject_set_name(struct kobject *kobj, const char *name, ...) | 74 | extern int kobject_set_name(struct kobject *kobj, const char *name, ...) |
| 74 | __attribute__((format(printf, 2, 3))); | 75 | __attribute__((format(printf, 2, 3))); |
| 76 | extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, | ||
| 77 | va_list vargs); | ||
| 75 | 78 | ||
| 76 | static inline const char *kobject_name(const struct kobject *kobj) | 79 | static inline const char *kobject_name(const struct kobject *kobj) |
| 77 | { | 80 | { |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index d6ea19e314bb..32851eef48f0 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
| @@ -49,6 +49,13 @@ | |||
| 49 | 49 | ||
| 50 | /* Attach to insert probes on any functions which should be ignored*/ | 50 | /* Attach to insert probes on any functions which should be ignored*/ |
| 51 | #define __kprobes __attribute__((__section__(".kprobes.text"))) notrace | 51 | #define __kprobes __attribute__((__section__(".kprobes.text"))) notrace |
| 52 | #else /* CONFIG_KPROBES */ | ||
| 53 | typedef int kprobe_opcode_t; | ||
| 54 | struct arch_specific_insn { | ||
| 55 | int dummy; | ||
| 56 | }; | ||
| 57 | #define __kprobes notrace | ||
| 58 | #endif /* CONFIG_KPROBES */ | ||
| 52 | 59 | ||
| 53 | struct kprobe; | 60 | struct kprobe; |
| 54 | struct pt_regs; | 61 | struct pt_regs; |
| @@ -131,23 +138,6 @@ struct jprobe { | |||
| 131 | /* For backward compatibility with old code using JPROBE_ENTRY() */ | 138 | /* For backward compatibility with old code using JPROBE_ENTRY() */ |
| 132 | #define JPROBE_ENTRY(handler) (handler) | 139 | #define JPROBE_ENTRY(handler) (handler) |
| 133 | 140 | ||
| 134 | DECLARE_PER_CPU(struct kprobe *, current_kprobe); | ||
| 135 | DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | ||
| 136 | |||
| 137 | #ifdef CONFIG_KRETPROBES | ||
| 138 | extern void arch_prepare_kretprobe(struct kretprobe_instance *ri, | ||
| 139 | struct pt_regs *regs); | ||
| 140 | extern int arch_trampoline_kprobe(struct kprobe *p); | ||
| 141 | #else /* CONFIG_KRETPROBES */ | ||
| 142 | static inline void arch_prepare_kretprobe(struct kretprobe *rp, | ||
| 143 | struct pt_regs *regs) | ||
| 144 | { | ||
| 145 | } | ||
| 146 | static inline int arch_trampoline_kprobe(struct kprobe *p) | ||
| 147 | { | ||
| 148 | return 0; | ||
| 149 | } | ||
| 150 | #endif /* CONFIG_KRETPROBES */ | ||
| 151 | /* | 141 | /* |
| 152 | * Function-return probe - | 142 | * Function-return probe - |
| 153 | * Note: | 143 | * Note: |
| @@ -188,6 +178,25 @@ struct kprobe_blackpoint { | |||
| 188 | unsigned long range; | 178 | unsigned long range; |
| 189 | }; | 179 | }; |
| 190 | 180 | ||
| 181 | #ifdef CONFIG_KPROBES | ||
| 182 | DECLARE_PER_CPU(struct kprobe *, current_kprobe); | ||
| 183 | DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | ||
| 184 | |||
| 185 | #ifdef CONFIG_KRETPROBES | ||
| 186 | extern void arch_prepare_kretprobe(struct kretprobe_instance *ri, | ||
| 187 | struct pt_regs *regs); | ||
| 188 | extern int arch_trampoline_kprobe(struct kprobe *p); | ||
| 189 | #else /* CONFIG_KRETPROBES */ | ||
| 190 | static inline void arch_prepare_kretprobe(struct kretprobe *rp, | ||
| 191 | struct pt_regs *regs) | ||
| 192 | { | ||
| 193 | } | ||
| 194 | static inline int arch_trampoline_kprobe(struct kprobe *p) | ||
| 195 | { | ||
| 196 | return 0; | ||
| 197 | } | ||
| 198 | #endif /* CONFIG_KRETPROBES */ | ||
| 199 | |||
| 191 | extern struct kretprobe_blackpoint kretprobe_blacklist[]; | 200 | extern struct kretprobe_blackpoint kretprobe_blacklist[]; |
| 192 | 201 | ||
| 193 | static inline void kretprobe_assert(struct kretprobe_instance *ri, | 202 | static inline void kretprobe_assert(struct kretprobe_instance *ri, |
| @@ -264,10 +273,6 @@ void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head); | |||
| 264 | 273 | ||
| 265 | #else /* CONFIG_KPROBES */ | 274 | #else /* CONFIG_KPROBES */ |
| 266 | 275 | ||
| 267 | #define __kprobes notrace | ||
| 268 | struct jprobe; | ||
| 269 | struct kretprobe; | ||
| 270 | |||
| 271 | static inline struct kprobe *get_kprobe(void *addr) | 276 | static inline struct kprobe *get_kprobe(void *addr) |
| 272 | { | 277 | { |
| 273 | return NULL; | 278 | return NULL; |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 5715f1907601..311a073afe8a 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
| @@ -48,7 +48,10 @@ struct kvm_irq_level { | |||
| 48 | * For IA-64 (APIC model) IOAPIC0: irq 0-23; IOAPIC1: irq 24-47.. | 48 | * For IA-64 (APIC model) IOAPIC0: irq 0-23; IOAPIC1: irq 24-47.. |
| 49 | * For X86 (standard AT mode) PIC0/1: irq 0-15. IOAPIC0: 0-23.. | 49 | * For X86 (standard AT mode) PIC0/1: irq 0-15. IOAPIC0: 0-23.. |
| 50 | */ | 50 | */ |
| 51 | __u32 irq; | 51 | union { |
| 52 | __u32 irq; | ||
| 53 | __s32 status; | ||
| 54 | }; | ||
| 52 | __u32 level; | 55 | __u32 level; |
| 53 | }; | 56 | }; |
| 54 | 57 | ||
| @@ -58,10 +61,10 @@ struct kvm_irqchip { | |||
| 58 | __u32 pad; | 61 | __u32 pad; |
| 59 | union { | 62 | union { |
| 60 | char dummy[512]; /* reserving space */ | 63 | char dummy[512]; /* reserving space */ |
| 61 | #ifdef CONFIG_X86 | 64 | #ifdef __KVM_HAVE_PIT |
| 62 | struct kvm_pic_state pic; | 65 | struct kvm_pic_state pic; |
| 63 | #endif | 66 | #endif |
| 64 | #if defined(CONFIG_X86) || defined(CONFIG_IA64) | 67 | #ifdef __KVM_HAVE_IOAPIC |
| 65 | struct kvm_ioapic_state ioapic; | 68 | struct kvm_ioapic_state ioapic; |
| 66 | #endif | 69 | #endif |
| 67 | } chip; | 70 | } chip; |
| @@ -126,6 +129,7 @@ struct kvm_run { | |||
| 126 | __u64 data_offset; /* relative to kvm_run start */ | 129 | __u64 data_offset; /* relative to kvm_run start */ |
| 127 | } io; | 130 | } io; |
| 128 | struct { | 131 | struct { |
| 132 | struct kvm_debug_exit_arch arch; | ||
| 129 | } debug; | 133 | } debug; |
| 130 | /* KVM_EXIT_MMIO */ | 134 | /* KVM_EXIT_MMIO */ |
| 131 | struct { | 135 | struct { |
| @@ -217,21 +221,6 @@ struct kvm_interrupt { | |||
| 217 | __u32 irq; | 221 | __u32 irq; |
| 218 | }; | 222 | }; |
| 219 | 223 | ||
| 220 | struct kvm_breakpoint { | ||
| 221 | __u32 enabled; | ||
| 222 | __u32 padding; | ||
| 223 | __u64 address; | ||
| 224 | }; | ||
| 225 | |||
| 226 | /* for KVM_DEBUG_GUEST */ | ||
| 227 | struct kvm_debug_guest { | ||
| 228 | /* int */ | ||
| 229 | __u32 enabled; | ||
| 230 | __u32 pad; | ||
| 231 | struct kvm_breakpoint breakpoints[4]; | ||
| 232 | __u32 singlestep; | ||
| 233 | }; | ||
| 234 | |||
| 235 | /* for KVM_GET_DIRTY_LOG */ | 224 | /* for KVM_GET_DIRTY_LOG */ |
| 236 | struct kvm_dirty_log { | 225 | struct kvm_dirty_log { |
| 237 | __u32 slot; | 226 | __u32 slot; |
| @@ -292,6 +281,17 @@ struct kvm_s390_interrupt { | |||
| 292 | __u64 parm64; | 281 | __u64 parm64; |
| 293 | }; | 282 | }; |
| 294 | 283 | ||
| 284 | /* for KVM_SET_GUEST_DEBUG */ | ||
| 285 | |||
| 286 | #define KVM_GUESTDBG_ENABLE 0x00000001 | ||
| 287 | #define KVM_GUESTDBG_SINGLESTEP 0x00000002 | ||
| 288 | |||
| 289 | struct kvm_guest_debug { | ||
| 290 | __u32 control; | ||
| 291 | __u32 pad; | ||
| 292 | struct kvm_guest_debug_arch arch; | ||
| 293 | }; | ||
| 294 | |||
| 295 | #define KVM_TRC_SHIFT 16 | 295 | #define KVM_TRC_SHIFT 16 |
| 296 | /* | 296 | /* |
| 297 | * kvm trace categories | 297 | * kvm trace categories |
| @@ -384,18 +384,69 @@ struct kvm_trace_rec { | |||
| 384 | #define KVM_CAP_MP_STATE 14 | 384 | #define KVM_CAP_MP_STATE 14 |
| 385 | #define KVM_CAP_COALESCED_MMIO 15 | 385 | #define KVM_CAP_COALESCED_MMIO 15 |
| 386 | #define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ | 386 | #define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ |
| 387 | #if defined(CONFIG_X86)||defined(CONFIG_IA64) | 387 | #ifdef __KVM_HAVE_DEVICE_ASSIGNMENT |
| 388 | #define KVM_CAP_DEVICE_ASSIGNMENT 17 | 388 | #define KVM_CAP_DEVICE_ASSIGNMENT 17 |
| 389 | #endif | 389 | #endif |
| 390 | #define KVM_CAP_IOMMU 18 | 390 | #define KVM_CAP_IOMMU 18 |
| 391 | #if defined(CONFIG_X86) | 391 | #ifdef __KVM_HAVE_MSI |
| 392 | #define KVM_CAP_DEVICE_MSI 20 | 392 | #define KVM_CAP_DEVICE_MSI 20 |
| 393 | #endif | 393 | #endif |
| 394 | /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ | 394 | /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ |
| 395 | #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 | 395 | #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 |
| 396 | #if defined(CONFIG_X86) | 396 | #ifdef __KVM_HAVE_USER_NMI |
| 397 | #define KVM_CAP_USER_NMI 22 | 397 | #define KVM_CAP_USER_NMI 22 |
| 398 | #endif | 398 | #endif |
| 399 | #ifdef __KVM_HAVE_GUEST_DEBUG | ||
| 400 | #define KVM_CAP_SET_GUEST_DEBUG 23 | ||
| 401 | #endif | ||
| 402 | #ifdef __KVM_HAVE_PIT | ||
| 403 | #define KVM_CAP_REINJECT_CONTROL 24 | ||
| 404 | #endif | ||
| 405 | #ifdef __KVM_HAVE_IOAPIC | ||
| 406 | #define KVM_CAP_IRQ_ROUTING 25 | ||
| 407 | #endif | ||
| 408 | #define KVM_CAP_IRQ_INJECT_STATUS 26 | ||
| 409 | #ifdef __KVM_HAVE_DEVICE_ASSIGNMENT | ||
| 410 | #define KVM_CAP_DEVICE_DEASSIGNMENT 27 | ||
| 411 | #endif | ||
| 412 | |||
| 413 | #ifdef KVM_CAP_IRQ_ROUTING | ||
| 414 | |||
| 415 | struct kvm_irq_routing_irqchip { | ||
| 416 | __u32 irqchip; | ||
| 417 | __u32 pin; | ||
| 418 | }; | ||
| 419 | |||
| 420 | struct kvm_irq_routing_msi { | ||
| 421 | __u32 address_lo; | ||
| 422 | __u32 address_hi; | ||
| 423 | __u32 data; | ||
| 424 | __u32 pad; | ||
| 425 | }; | ||
| 426 | |||
| 427 | /* gsi routing entry types */ | ||
| 428 | #define KVM_IRQ_ROUTING_IRQCHIP 1 | ||
| 429 | #define KVM_IRQ_ROUTING_MSI 2 | ||
| 430 | |||
| 431 | struct kvm_irq_routing_entry { | ||
| 432 | __u32 gsi; | ||
| 433 | __u32 type; | ||
| 434 | __u32 flags; | ||
| 435 | __u32 pad; | ||
| 436 | union { | ||
| 437 | struct kvm_irq_routing_irqchip irqchip; | ||
| 438 | struct kvm_irq_routing_msi msi; | ||
| 439 | __u32 pad[8]; | ||
| 440 | } u; | ||
| 441 | }; | ||
| 442 | |||
| 443 | struct kvm_irq_routing { | ||
| 444 | __u32 nr; | ||
| 445 | __u32 flags; | ||
| 446 | struct kvm_irq_routing_entry entries[0]; | ||
| 447 | }; | ||
| 448 | |||
| 449 | #endif | ||
| 399 | 450 | ||
| 400 | /* | 451 | /* |
| 401 | * ioctls for VM fds | 452 | * ioctls for VM fds |
| @@ -421,14 +472,19 @@ struct kvm_trace_rec { | |||
| 421 | #define KVM_CREATE_PIT _IO(KVMIO, 0x64) | 472 | #define KVM_CREATE_PIT _IO(KVMIO, 0x64) |
| 422 | #define KVM_GET_PIT _IOWR(KVMIO, 0x65, struct kvm_pit_state) | 473 | #define KVM_GET_PIT _IOWR(KVMIO, 0x65, struct kvm_pit_state) |
| 423 | #define KVM_SET_PIT _IOR(KVMIO, 0x66, struct kvm_pit_state) | 474 | #define KVM_SET_PIT _IOR(KVMIO, 0x66, struct kvm_pit_state) |
| 475 | #define KVM_IRQ_LINE_STATUS _IOWR(KVMIO, 0x67, struct kvm_irq_level) | ||
| 424 | #define KVM_REGISTER_COALESCED_MMIO \ | 476 | #define KVM_REGISTER_COALESCED_MMIO \ |
| 425 | _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) | 477 | _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) |
| 426 | #define KVM_UNREGISTER_COALESCED_MMIO \ | 478 | #define KVM_UNREGISTER_COALESCED_MMIO \ |
| 427 | _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) | 479 | _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) |
| 428 | #define KVM_ASSIGN_PCI_DEVICE _IOR(KVMIO, 0x69, \ | 480 | #define KVM_ASSIGN_PCI_DEVICE _IOR(KVMIO, 0x69, \ |
| 429 | struct kvm_assigned_pci_dev) | 481 | struct kvm_assigned_pci_dev) |
| 482 | #define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing) | ||
| 430 | #define KVM_ASSIGN_IRQ _IOR(KVMIO, 0x70, \ | 483 | #define KVM_ASSIGN_IRQ _IOR(KVMIO, 0x70, \ |
| 431 | struct kvm_assigned_irq) | 484 | struct kvm_assigned_irq) |
| 485 | #define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71) | ||
| 486 | #define KVM_DEASSIGN_PCI_DEVICE _IOW(KVMIO, 0x72, \ | ||
| 487 | struct kvm_assigned_pci_dev) | ||
| 432 | 488 | ||
| 433 | /* | 489 | /* |
| 434 | * ioctls for vcpu fds | 490 | * ioctls for vcpu fds |
| @@ -440,7 +496,8 @@ struct kvm_trace_rec { | |||
| 440 | #define KVM_SET_SREGS _IOW(KVMIO, 0x84, struct kvm_sregs) | 496 | #define KVM_SET_SREGS _IOW(KVMIO, 0x84, struct kvm_sregs) |
| 441 | #define KVM_TRANSLATE _IOWR(KVMIO, 0x85, struct kvm_translation) | 497 | #define KVM_TRANSLATE _IOWR(KVMIO, 0x85, struct kvm_translation) |
| 442 | #define KVM_INTERRUPT _IOW(KVMIO, 0x86, struct kvm_interrupt) | 498 | #define KVM_INTERRUPT _IOW(KVMIO, 0x86, struct kvm_interrupt) |
| 443 | #define KVM_DEBUG_GUEST _IOW(KVMIO, 0x87, struct kvm_debug_guest) | 499 | /* KVM_DEBUG_GUEST is no longer supported, use KVM_SET_GUEST_DEBUG instead */ |
| 500 | #define KVM_DEBUG_GUEST __KVM_DEPRECATED_DEBUG_GUEST | ||
| 444 | #define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs) | 501 | #define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs) |
| 445 | #define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) | 502 | #define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) |
| 446 | #define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) | 503 | #define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) |
| @@ -469,6 +526,29 @@ struct kvm_trace_rec { | |||
| 469 | #define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct kvm_mp_state) | 526 | #define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct kvm_mp_state) |
| 470 | /* Available with KVM_CAP_NMI */ | 527 | /* Available with KVM_CAP_NMI */ |
| 471 | #define KVM_NMI _IO(KVMIO, 0x9a) | 528 | #define KVM_NMI _IO(KVMIO, 0x9a) |
| 529 | /* Available with KVM_CAP_SET_GUEST_DEBUG */ | ||
| 530 | #define KVM_SET_GUEST_DEBUG _IOW(KVMIO, 0x9b, struct kvm_guest_debug) | ||
| 531 | |||
| 532 | /* | ||
| 533 | * Deprecated interfaces | ||
| 534 | */ | ||
| 535 | struct kvm_breakpoint { | ||
| 536 | __u32 enabled; | ||
| 537 | __u32 padding; | ||
| 538 | __u64 address; | ||
| 539 | }; | ||
| 540 | |||
| 541 | struct kvm_debug_guest { | ||
| 542 | __u32 enabled; | ||
| 543 | __u32 pad; | ||
| 544 | struct kvm_breakpoint breakpoints[4]; | ||
| 545 | __u32 singlestep; | ||
| 546 | }; | ||
| 547 | |||
| 548 | #define __KVM_DEPRECATED_DEBUG_GUEST _IOW(KVMIO, 0x87, struct kvm_debug_guest) | ||
| 549 | |||
| 550 | #define KVM_IA64_VCPU_GET_STACK _IOR(KVMIO, 0x9a, void *) | ||
| 551 | #define KVM_IA64_VCPU_SET_STACK _IOW(KVMIO, 0x9b, void *) | ||
| 472 | 552 | ||
| 473 | #define KVM_TRC_INJ_VIRQ (KVM_TRC_HANDLER + 0x02) | 553 | #define KVM_TRC_INJ_VIRQ (KVM_TRC_HANDLER + 0x02) |
| 474 | #define KVM_TRC_REDELIVER_EVT (KVM_TRC_HANDLER + 0x03) | 554 | #define KVM_TRC_REDELIVER_EVT (KVM_TRC_HANDLER + 0x03) |
| @@ -522,6 +602,7 @@ struct kvm_assigned_irq { | |||
| 522 | 602 | ||
| 523 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 603 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
| 524 | 604 | ||
| 605 | #define KVM_DEV_IRQ_ASSIGN_MSI_ACTION KVM_DEV_IRQ_ASSIGN_ENABLE_MSI | ||
| 525 | #define KVM_DEV_IRQ_ASSIGN_ENABLE_MSI (1 << 0) | 606 | #define KVM_DEV_IRQ_ASSIGN_ENABLE_MSI (1 << 0) |
| 526 | 607 | ||
| 527 | #endif | 608 | #endif |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index ec49d0be7f52..894a56e365e8 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | #define KVM_REQ_PENDING_TIMER 5 | 37 | #define KVM_REQ_PENDING_TIMER 5 |
| 38 | #define KVM_REQ_UNHALT 6 | 38 | #define KVM_REQ_UNHALT 6 |
| 39 | #define KVM_REQ_MMU_SYNC 7 | 39 | #define KVM_REQ_MMU_SYNC 7 |
| 40 | #define KVM_REQ_KVMCLOCK_UPDATE 8 | ||
| 40 | 41 | ||
| 41 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 | 42 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 |
| 42 | 43 | ||
| @@ -73,7 +74,7 @@ struct kvm_vcpu { | |||
| 73 | struct kvm_run *run; | 74 | struct kvm_run *run; |
| 74 | int guest_mode; | 75 | int guest_mode; |
| 75 | unsigned long requests; | 76 | unsigned long requests; |
| 76 | struct kvm_guest_debug guest_debug; | 77 | unsigned long guest_debug; |
| 77 | int fpu_active; | 78 | int fpu_active; |
| 78 | int guest_fpu_loaded; | 79 | int guest_fpu_loaded; |
| 79 | wait_queue_head_t wq; | 80 | wait_queue_head_t wq; |
| @@ -107,6 +108,20 @@ struct kvm_memory_slot { | |||
| 107 | int user_alloc; | 108 | int user_alloc; |
| 108 | }; | 109 | }; |
| 109 | 110 | ||
| 111 | struct kvm_kernel_irq_routing_entry { | ||
| 112 | u32 gsi; | ||
| 113 | int (*set)(struct kvm_kernel_irq_routing_entry *e, | ||
| 114 | struct kvm *kvm, int level); | ||
| 115 | union { | ||
| 116 | struct { | ||
| 117 | unsigned irqchip; | ||
| 118 | unsigned pin; | ||
| 119 | } irqchip; | ||
| 120 | struct msi_msg msi; | ||
| 121 | }; | ||
| 122 | struct list_head link; | ||
| 123 | }; | ||
| 124 | |||
| 110 | struct kvm { | 125 | struct kvm { |
| 111 | struct mutex lock; /* protects the vcpus array and APIC accesses */ | 126 | struct mutex lock; /* protects the vcpus array and APIC accesses */ |
| 112 | spinlock_t mmu_lock; | 127 | spinlock_t mmu_lock; |
| @@ -127,6 +142,11 @@ struct kvm { | |||
| 127 | struct kvm_coalesced_mmio_ring *coalesced_mmio_ring; | 142 | struct kvm_coalesced_mmio_ring *coalesced_mmio_ring; |
| 128 | #endif | 143 | #endif |
| 129 | 144 | ||
| 145 | #ifdef CONFIG_HAVE_KVM_IRQCHIP | ||
| 146 | struct list_head irq_routing; /* of kvm_kernel_irq_routing_entry */ | ||
| 147 | struct hlist_head mask_notifier_list; | ||
| 148 | #endif | ||
| 149 | |||
| 130 | #ifdef KVM_ARCH_WANT_MMU_NOTIFIER | 150 | #ifdef KVM_ARCH_WANT_MMU_NOTIFIER |
| 131 | struct mmu_notifier mmu_notifier; | 151 | struct mmu_notifier mmu_notifier; |
| 132 | unsigned long mmu_notifier_seq; | 152 | unsigned long mmu_notifier_seq; |
| @@ -237,7 +257,6 @@ int kvm_vm_ioctl_set_memory_region(struct kvm *kvm, | |||
| 237 | int user_alloc); | 257 | int user_alloc); |
| 238 | long kvm_arch_vm_ioctl(struct file *filp, | 258 | long kvm_arch_vm_ioctl(struct file *filp, |
| 239 | unsigned int ioctl, unsigned long arg); | 259 | unsigned int ioctl, unsigned long arg); |
| 240 | void kvm_arch_destroy_vm(struct kvm *kvm); | ||
| 241 | 260 | ||
| 242 | int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu); | 261 | int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu); |
| 243 | int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu); | 262 | int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu); |
| @@ -255,8 +274,8 @@ int kvm_arch_vcpu_ioctl_get_mpstate(struct kvm_vcpu *vcpu, | |||
| 255 | struct kvm_mp_state *mp_state); | 274 | struct kvm_mp_state *mp_state); |
| 256 | int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu, | 275 | int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu, |
| 257 | struct kvm_mp_state *mp_state); | 276 | struct kvm_mp_state *mp_state); |
| 258 | int kvm_arch_vcpu_ioctl_debug_guest(struct kvm_vcpu *vcpu, | 277 | int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu, |
| 259 | struct kvm_debug_guest *dbg); | 278 | struct kvm_guest_debug *dbg); |
| 260 | int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run); | 279 | int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run); |
| 261 | 280 | ||
| 262 | int kvm_arch_init(void *opaque); | 281 | int kvm_arch_init(void *opaque); |
| @@ -285,6 +304,7 @@ void kvm_free_physmem(struct kvm *kvm); | |||
| 285 | struct kvm *kvm_arch_create_vm(void); | 304 | struct kvm *kvm_arch_create_vm(void); |
| 286 | void kvm_arch_destroy_vm(struct kvm *kvm); | 305 | void kvm_arch_destroy_vm(struct kvm *kvm); |
| 287 | void kvm_free_all_assigned_devices(struct kvm *kvm); | 306 | void kvm_free_all_assigned_devices(struct kvm *kvm); |
| 307 | void kvm_arch_sync_events(struct kvm *kvm); | ||
| 288 | 308 | ||
| 289 | int kvm_cpu_get_interrupt(struct kvm_vcpu *v); | 309 | int kvm_cpu_get_interrupt(struct kvm_vcpu *v); |
| 290 | int kvm_cpu_has_interrupt(struct kvm_vcpu *v); | 310 | int kvm_cpu_has_interrupt(struct kvm_vcpu *v); |
| @@ -309,7 +329,6 @@ struct kvm_assigned_dev_kernel { | |||
| 309 | int host_irq; | 329 | int host_irq; |
| 310 | bool host_irq_disabled; | 330 | bool host_irq_disabled; |
| 311 | int guest_irq; | 331 | int guest_irq; |
| 312 | struct msi_msg guest_msi; | ||
| 313 | #define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) | 332 | #define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) |
| 314 | #define KVM_ASSIGNED_DEV_GUEST_MSI (1 << 1) | 333 | #define KVM_ASSIGNED_DEV_GUEST_MSI (1 << 1) |
| 315 | #define KVM_ASSIGNED_DEV_HOST_INTX (1 << 8) | 334 | #define KVM_ASSIGNED_DEV_HOST_INTX (1 << 8) |
| @@ -320,8 +339,21 @@ struct kvm_assigned_dev_kernel { | |||
| 320 | struct pci_dev *dev; | 339 | struct pci_dev *dev; |
| 321 | struct kvm *kvm; | 340 | struct kvm *kvm; |
| 322 | }; | 341 | }; |
| 323 | void kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level); | 342 | |
| 324 | void kvm_notify_acked_irq(struct kvm *kvm, unsigned gsi); | 343 | struct kvm_irq_mask_notifier { |
| 344 | void (*func)(struct kvm_irq_mask_notifier *kimn, bool masked); | ||
| 345 | int irq; | ||
| 346 | struct hlist_node link; | ||
| 347 | }; | ||
| 348 | |||
| 349 | void kvm_register_irq_mask_notifier(struct kvm *kvm, int irq, | ||
| 350 | struct kvm_irq_mask_notifier *kimn); | ||
| 351 | void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq, | ||
| 352 | struct kvm_irq_mask_notifier *kimn); | ||
| 353 | void kvm_fire_mask_notifiers(struct kvm *kvm, int irq, bool mask); | ||
| 354 | |||
| 355 | int kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level); | ||
| 356 | void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin); | ||
| 325 | void kvm_register_irq_ack_notifier(struct kvm *kvm, | 357 | void kvm_register_irq_ack_notifier(struct kvm *kvm, |
| 326 | struct kvm_irq_ack_notifier *kian); | 358 | struct kvm_irq_ack_notifier *kian); |
| 327 | void kvm_unregister_irq_ack_notifier(struct kvm_irq_ack_notifier *kian); | 359 | void kvm_unregister_irq_ack_notifier(struct kvm_irq_ack_notifier *kian); |
| @@ -463,4 +495,21 @@ static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_se | |||
| 463 | } | 495 | } |
| 464 | #endif | 496 | #endif |
| 465 | 497 | ||
| 498 | #ifdef CONFIG_HAVE_KVM_IRQCHIP | ||
| 499 | |||
| 500 | #define KVM_MAX_IRQ_ROUTES 1024 | ||
| 501 | |||
| 502 | int kvm_setup_default_irq_routing(struct kvm *kvm); | ||
| 503 | int kvm_set_irq_routing(struct kvm *kvm, | ||
| 504 | const struct kvm_irq_routing_entry *entries, | ||
| 505 | unsigned nr, | ||
| 506 | unsigned flags); | ||
| 507 | void kvm_free_irq_routing(struct kvm *kvm); | ||
| 508 | |||
| 509 | #else | ||
| 510 | |||
| 511 | static inline void kvm_free_irq_routing(struct kvm *kvm) {} | ||
| 512 | |||
| 513 | #endif | ||
| 514 | |||
| 466 | #endif | 515 | #endif |
diff --git a/include/linux/kvm_types.h b/include/linux/kvm_types.h index 9b6f395c9625..2b8318c83e53 100644 --- a/include/linux/kvm_types.h +++ b/include/linux/kvm_types.h | |||
| @@ -40,17 +40,4 @@ typedef unsigned long hfn_t; | |||
| 40 | 40 | ||
| 41 | typedef hfn_t pfn_t; | 41 | typedef hfn_t pfn_t; |
| 42 | 42 | ||
| 43 | struct kvm_pio_request { | ||
| 44 | unsigned long count; | ||
| 45 | int cur_count; | ||
| 46 | struct page *guest_pages[2]; | ||
| 47 | unsigned guest_page_offset; | ||
| 48 | int in; | ||
| 49 | int port; | ||
| 50 | int size; | ||
| 51 | int string; | ||
| 52 | int down; | ||
| 53 | int rep; | ||
| 54 | }; | ||
| 55 | |||
| 56 | #endif /* __KVM_TYPES_H__ */ | 43 | #endif /* __KVM_TYPES_H__ */ |
diff --git a/include/linux/latencytop.h b/include/linux/latencytop.h index 901c2d6377a8..b0e99898527c 100644 --- a/include/linux/latencytop.h +++ b/include/linux/latencytop.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #ifndef _INCLUDE_GUARD_LATENCYTOP_H_ | 9 | #ifndef _INCLUDE_GUARD_LATENCYTOP_H_ |
| 10 | #define _INCLUDE_GUARD_LATENCYTOP_H_ | 10 | #define _INCLUDE_GUARD_LATENCYTOP_H_ |
| 11 | 11 | ||
| 12 | #include <linux/compiler.h> | ||
| 12 | #ifdef CONFIG_LATENCYTOP | 13 | #ifdef CONFIG_LATENCYTOP |
| 13 | 14 | ||
| 14 | #define LT_SAVECOUNT 32 | 15 | #define LT_SAVECOUNT 32 |
| @@ -24,7 +25,14 @@ struct latency_record { | |||
| 24 | 25 | ||
| 25 | struct task_struct; | 26 | struct task_struct; |
| 26 | 27 | ||
| 27 | void account_scheduler_latency(struct task_struct *task, int usecs, int inter); | 28 | extern int latencytop_enabled; |
| 29 | void __account_scheduler_latency(struct task_struct *task, int usecs, int inter); | ||
| 30 | static inline void | ||
| 31 | account_scheduler_latency(struct task_struct *task, int usecs, int inter) | ||
| 32 | { | ||
| 33 | if (unlikely(latencytop_enabled)) | ||
| 34 | __account_scheduler_latency(task, usecs, inter); | ||
| 35 | } | ||
| 28 | 36 | ||
| 29 | void clear_all_latency_tracing(struct task_struct *p); | 37 | void clear_all_latency_tracing(struct task_struct *p); |
| 30 | 38 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index b6b8a7f3ec66..76262d83656b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -187,6 +187,8 @@ enum { | |||
| 187 | ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD | 187 | ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD |
| 188 | * doesn't handle PIO interrupts */ | 188 | * doesn't handle PIO interrupts */ |
| 189 | ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */ | 189 | ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */ |
| 190 | ATA_FLAG_NO_POWEROFF_SPINDOWN = (1 << 11), /* don't spindown before poweroff */ | ||
| 191 | ATA_FLAG_NO_HIBERNATE_SPINDOWN = (1 << 12), /* don't spindown before hibernation */ | ||
| 190 | ATA_FLAG_DEBUGMSG = (1 << 13), | 192 | ATA_FLAG_DEBUGMSG = (1 << 13), |
| 191 | ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ | 193 | ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ |
| 192 | ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */ | 194 | ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */ |
| @@ -273,7 +275,7 @@ enum { | |||
| 273 | * advised to wait only for the following duration before | 275 | * advised to wait only for the following duration before |
| 274 | * doing SRST. | 276 | * doing SRST. |
| 275 | */ | 277 | */ |
| 276 | ATA_TMOUT_PMP_SRST_WAIT = 1000, | 278 | ATA_TMOUT_PMP_SRST_WAIT = 5000, |
| 277 | 279 | ||
| 278 | /* ATA bus states */ | 280 | /* ATA bus states */ |
| 279 | BUS_UNKNOWN = 0, | 281 | BUS_UNKNOWN = 0, |
| @@ -378,6 +380,7 @@ enum { | |||
| 378 | ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands | 380 | ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands |
| 379 | not multiple of 16 bytes */ | 381 | not multiple of 16 bytes */ |
| 380 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */ | 382 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */ |
| 383 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ | ||
| 381 | 384 | ||
| 382 | /* DMA mask for user DMA control: User visible values; DO NOT | 385 | /* DMA mask for user DMA control: User visible values; DO NOT |
| 383 | renumber */ | 386 | renumber */ |
| @@ -401,12 +404,14 @@ enum { | |||
| 401 | ATA_TIMING_CYC8B, | 404 | ATA_TIMING_CYC8B, |
| 402 | ATA_TIMING_ACTIVE = (1 << 4), | 405 | ATA_TIMING_ACTIVE = (1 << 4), |
| 403 | ATA_TIMING_RECOVER = (1 << 5), | 406 | ATA_TIMING_RECOVER = (1 << 5), |
| 404 | ATA_TIMING_CYCLE = (1 << 6), | 407 | ATA_TIMING_DMACK_HOLD = (1 << 6), |
| 405 | ATA_TIMING_UDMA = (1 << 7), | 408 | ATA_TIMING_CYCLE = (1 << 7), |
| 409 | ATA_TIMING_UDMA = (1 << 8), | ||
| 406 | ATA_TIMING_ALL = ATA_TIMING_SETUP | ATA_TIMING_ACT8B | | 410 | ATA_TIMING_ALL = ATA_TIMING_SETUP | ATA_TIMING_ACT8B | |
| 407 | ATA_TIMING_REC8B | ATA_TIMING_CYC8B | | 411 | ATA_TIMING_REC8B | ATA_TIMING_CYC8B | |
| 408 | ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER | | 412 | ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER | |
| 409 | ATA_TIMING_CYCLE | ATA_TIMING_UDMA, | 413 | ATA_TIMING_DMACK_HOLD | ATA_TIMING_CYCLE | |
| 414 | ATA_TIMING_UDMA, | ||
| 410 | }; | 415 | }; |
| 411 | 416 | ||
| 412 | enum ata_xfer_mask { | 417 | enum ata_xfer_mask { |
| @@ -525,6 +530,7 @@ struct ata_queued_cmd { | |||
| 525 | unsigned long flags; /* ATA_QCFLAG_xxx */ | 530 | unsigned long flags; /* ATA_QCFLAG_xxx */ |
| 526 | unsigned int tag; | 531 | unsigned int tag; |
| 527 | unsigned int n_elem; | 532 | unsigned int n_elem; |
| 533 | unsigned int orig_n_elem; | ||
| 528 | 534 | ||
| 529 | int dma_dir; | 535 | int dma_dir; |
| 530 | 536 | ||
| @@ -576,7 +582,7 @@ struct ata_device { | |||
| 576 | acpi_handle acpi_handle; | 582 | acpi_handle acpi_handle; |
| 577 | union acpi_object *gtf_cache; | 583 | union acpi_object *gtf_cache; |
| 578 | #endif | 584 | #endif |
| 579 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ | 585 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ |
| 580 | u64 n_sectors; /* size of device, if ATA */ | 586 | u64 n_sectors; /* size of device, if ATA */ |
| 581 | unsigned int class; /* ATA_DEV_xxx */ | 587 | unsigned int class; /* ATA_DEV_xxx */ |
| 582 | unsigned long unpark_deadline; | 588 | unsigned long unpark_deadline; |
| @@ -601,20 +607,22 @@ struct ata_device { | |||
| 601 | u16 heads; /* Number of heads */ | 607 | u16 heads; /* Number of heads */ |
| 602 | u16 sectors; /* Number of sectors per track */ | 608 | u16 sectors; /* Number of sectors per track */ |
| 603 | 609 | ||
| 604 | /* error history */ | ||
| 605 | int spdn_cnt; | ||
| 606 | struct ata_ering ering; | ||
| 607 | |||
| 608 | union { | 610 | union { |
| 609 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ | 611 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ |
| 610 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ | 612 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ |
| 611 | }; | 613 | }; |
| 614 | |||
| 615 | /* error history */ | ||
| 616 | int spdn_cnt; | ||
| 617 | /* ering is CLEAR_END, read comment above CLEAR_END */ | ||
| 618 | struct ata_ering ering; | ||
| 612 | }; | 619 | }; |
| 613 | 620 | ||
| 614 | /* Offset into struct ata_device. Fields above it are maintained | 621 | /* Fields between ATA_DEVICE_CLEAR_BEGIN and ATA_DEVICE_CLEAR_END are |
| 615 | * acress device init. Fields below are zeroed. | 622 | * cleared to zero on ata_dev_init(). |
| 616 | */ | 623 | */ |
| 617 | #define ATA_DEVICE_CLEAR_OFFSET offsetof(struct ata_device, n_sectors) | 624 | #define ATA_DEVICE_CLEAR_BEGIN offsetof(struct ata_device, n_sectors) |
| 625 | #define ATA_DEVICE_CLEAR_END offsetof(struct ata_device, ering) | ||
| 618 | 626 | ||
| 619 | struct ata_eh_info { | 627 | struct ata_eh_info { |
| 620 | struct ata_device *dev; /* offending device */ | 628 | struct ata_device *dev; /* offending device */ |
| @@ -743,7 +751,8 @@ struct ata_port { | |||
| 743 | acpi_handle acpi_handle; | 751 | acpi_handle acpi_handle; |
| 744 | struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ | 752 | struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ |
| 745 | #endif | 753 | #endif |
| 746 | u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ | 754 | /* owned by EH */ |
| 755 | u8 sector_buf[ATA_SECT_SIZE] ____cacheline_aligned; | ||
| 747 | }; | 756 | }; |
| 748 | 757 | ||
| 749 | /* The following initializer overrides a method to NULL whether one of | 758 | /* The following initializer overrides a method to NULL whether one of |
| @@ -786,6 +795,7 @@ struct ata_port_operations { | |||
| 786 | ata_reset_fn_t pmp_hardreset; | 795 | ata_reset_fn_t pmp_hardreset; |
| 787 | ata_postreset_fn_t pmp_postreset; | 796 | ata_postreset_fn_t pmp_postreset; |
| 788 | void (*error_handler)(struct ata_port *ap); | 797 | void (*error_handler)(struct ata_port *ap); |
| 798 | void (*lost_interrupt)(struct ata_port *ap); | ||
| 789 | void (*post_internal_cmd)(struct ata_queued_cmd *qc); | 799 | void (*post_internal_cmd)(struct ata_queued_cmd *qc); |
| 790 | 800 | ||
| 791 | /* | 801 | /* |
| @@ -827,6 +837,8 @@ struct ata_port_operations { | |||
| 827 | void (*bmdma_start)(struct ata_queued_cmd *qc); | 837 | void (*bmdma_start)(struct ata_queued_cmd *qc); |
| 828 | void (*bmdma_stop)(struct ata_queued_cmd *qc); | 838 | void (*bmdma_stop)(struct ata_queued_cmd *qc); |
| 829 | u8 (*bmdma_status)(struct ata_port *ap); | 839 | u8 (*bmdma_status)(struct ata_port *ap); |
| 840 | |||
| 841 | void (*drain_fifo)(struct ata_queued_cmd *qc); | ||
| 830 | #endif /* CONFIG_ATA_SFF */ | 842 | #endif /* CONFIG_ATA_SFF */ |
| 831 | 843 | ||
| 832 | ssize_t (*em_show)(struct ata_port *ap, char *buf); | 844 | ssize_t (*em_show)(struct ata_port *ap, char *buf); |
| @@ -866,6 +878,7 @@ struct ata_timing { | |||
| 866 | unsigned short cyc8b; /* t0 for 8-bit I/O */ | 878 | unsigned short cyc8b; /* t0 for 8-bit I/O */ |
| 867 | unsigned short active; /* t2 or tD */ | 879 | unsigned short active; /* t2 or tD */ |
| 868 | unsigned short recover; /* t2i or tK */ | 880 | unsigned short recover; /* t2i or tK */ |
| 881 | unsigned short dmack_hold; /* tj */ | ||
| 869 | unsigned short cycle; /* t0 */ | 882 | unsigned short cycle; /* t0 */ |
| 870 | unsigned short udma; /* t2CYCTYP/2 */ | 883 | unsigned short udma; /* t2CYCTYP/2 */ |
| 871 | }; | 884 | }; |
| @@ -927,6 +940,8 @@ extern void ata_host_init(struct ata_host *, struct device *, | |||
| 927 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 940 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
| 928 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 941 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
| 929 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 942 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
| 943 | extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev, | ||
| 944 | int cmd, void __user *arg); | ||
| 930 | extern void ata_sas_port_destroy(struct ata_port *); | 945 | extern void ata_sas_port_destroy(struct ata_port *); |
| 931 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, | 946 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, |
| 932 | struct ata_port_info *, struct Scsi_Host *); | 947 | struct ata_port_info *, struct Scsi_Host *); |
| @@ -996,6 +1011,9 @@ extern int ata_cable_sata(struct ata_port *ap); | |||
| 996 | extern int ata_cable_ignore(struct ata_port *ap); | 1011 | extern int ata_cable_ignore(struct ata_port *ap); |
| 997 | extern int ata_cable_unknown(struct ata_port *ap); | 1012 | extern int ata_cable_unknown(struct ata_port *ap); |
| 998 | 1013 | ||
| 1014 | extern void ata_pio_queue_task(struct ata_port *ap, void *data, | ||
| 1015 | unsigned long delay); | ||
| 1016 | |||
| 999 | /* Timing helpers */ | 1017 | /* Timing helpers */ |
| 1000 | extern unsigned int ata_pio_need_iordy(const struct ata_device *); | 1018 | extern unsigned int ata_pio_need_iordy(const struct ata_device *); |
| 1001 | extern const struct ata_timing *ata_timing_find_mode(u8 xfer_mode); | 1019 | extern const struct ata_timing *ata_timing_find_mode(u8 xfer_mode); |
| @@ -1560,6 +1578,7 @@ extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); | |||
| 1560 | extern unsigned int ata_sff_host_intr(struct ata_port *ap, | 1578 | extern unsigned int ata_sff_host_intr(struct ata_port *ap, |
| 1561 | struct ata_queued_cmd *qc); | 1579 | struct ata_queued_cmd *qc); |
| 1562 | extern irqreturn_t ata_sff_interrupt(int irq, void *dev_instance); | 1580 | extern irqreturn_t ata_sff_interrupt(int irq, void *dev_instance); |
| 1581 | extern void ata_sff_lost_interrupt(struct ata_port *ap); | ||
| 1563 | extern void ata_sff_freeze(struct ata_port *ap); | 1582 | extern void ata_sff_freeze(struct ata_port *ap); |
| 1564 | extern void ata_sff_thaw(struct ata_port *ap); | 1583 | extern void ata_sff_thaw(struct ata_port *ap); |
| 1565 | extern int ata_sff_prereset(struct ata_link *link, unsigned long deadline); | 1584 | extern int ata_sff_prereset(struct ata_link *link, unsigned long deadline); |
| @@ -1572,6 +1591,7 @@ extern int ata_sff_softreset(struct ata_link *link, unsigned int *classes, | |||
| 1572 | extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class, | 1591 | extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class, |
| 1573 | unsigned long deadline); | 1592 | unsigned long deadline); |
| 1574 | extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes); | 1593 | extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes); |
| 1594 | extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc); | ||
| 1575 | extern void ata_sff_error_handler(struct ata_port *ap); | 1595 | extern void ata_sff_error_handler(struct ata_port *ap); |
| 1576 | extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc); | 1596 | extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc); |
| 1577 | extern int ata_sff_port_start(struct ata_port *ap); | 1597 | extern int ata_sff_port_start(struct ata_port *ap); |
diff --git a/include/linux/lm_interface.h b/include/linux/lm_interface.h deleted file mode 100644 index 2ed8fa1b762b..000000000000 --- a/include/linux/lm_interface.h +++ /dev/null | |||
| @@ -1,277 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | ||
| 3 | * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. | ||
| 4 | * | ||
| 5 | * This copyrighted material is made available to anyone wishing to use, | ||
| 6 | * modify, copy, or redistribute it subject to the terms and conditions | ||
| 7 | * of the GNU General Public License version 2. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __LM_INTERFACE_DOT_H__ | ||
| 11 | #define __LM_INTERFACE_DOT_H__ | ||
| 12 | |||
| 13 | |||
| 14 | typedef void (*lm_callback_t) (void *ptr, unsigned int type, void *data); | ||
| 15 | |||
| 16 | /* | ||
| 17 | * lm_mount() flags | ||
| 18 | * | ||
| 19 | * LM_MFLAG_SPECTATOR | ||
| 20 | * GFS is asking to join the filesystem's lockspace, but it doesn't want to | ||
| 21 | * modify the filesystem. The lock module shouldn't assign a journal to the FS | ||
| 22 | * mount. It shouldn't send recovery callbacks to the FS mount. If the node | ||
| 23 | * dies or withdraws, all locks can be wiped immediately. | ||
| 24 | * | ||
| 25 | * LM_MFLAG_CONV_NODROP | ||
| 26 | * Do not allow the dlm to internally resolve conversion deadlocks by demoting | ||
| 27 | * the lock to unlocked and then reacquiring it in the requested mode. Instead, | ||
| 28 | * it should cancel the request and return LM_OUT_CONV_DEADLK. | ||
| 29 | */ | ||
| 30 | |||
| 31 | #define LM_MFLAG_SPECTATOR 0x00000001 | ||
| 32 | #define LM_MFLAG_CONV_NODROP 0x00000002 | ||
| 33 | |||
| 34 | /* | ||
| 35 | * lm_lockstruct flags | ||
| 36 | * | ||
| 37 | * LM_LSFLAG_LOCAL | ||
| 38 | * The lock_nolock module returns LM_LSFLAG_LOCAL to GFS, indicating that GFS | ||
| 39 | * can make single-node optimizations. | ||
| 40 | */ | ||
| 41 | |||
| 42 | #define LM_LSFLAG_LOCAL 0x00000001 | ||
| 43 | |||
| 44 | /* | ||
| 45 | * lm_lockname types | ||
| 46 | */ | ||
| 47 | |||
| 48 | #define LM_TYPE_RESERVED 0x00 | ||
| 49 | #define LM_TYPE_NONDISK 0x01 | ||
| 50 | #define LM_TYPE_INODE 0x02 | ||
| 51 | #define LM_TYPE_RGRP 0x03 | ||
| 52 | #define LM_TYPE_META 0x04 | ||
| 53 | #define LM_TYPE_IOPEN 0x05 | ||
| 54 | #define LM_TYPE_FLOCK 0x06 | ||
| 55 | #define LM_TYPE_PLOCK 0x07 | ||
| 56 | #define LM_TYPE_QUOTA 0x08 | ||
| 57 | #define LM_TYPE_JOURNAL 0x09 | ||
| 58 | |||
| 59 | /* | ||
| 60 | * lm_lock() states | ||
| 61 | * | ||
| 62 | * SHARED is compatible with SHARED, not with DEFERRED or EX. | ||
| 63 | * DEFERRED is compatible with DEFERRED, not with SHARED or EX. | ||
| 64 | */ | ||
| 65 | |||
| 66 | #define LM_ST_UNLOCKED 0 | ||
| 67 | #define LM_ST_EXCLUSIVE 1 | ||
| 68 | #define LM_ST_DEFERRED 2 | ||
| 69 | #define LM_ST_SHARED 3 | ||
| 70 | |||
| 71 | /* | ||
| 72 | * lm_lock() flags | ||
| 73 | * | ||
| 74 | * LM_FLAG_TRY | ||
| 75 | * Don't wait to acquire the lock if it can't be granted immediately. | ||
| 76 | * | ||
| 77 | * LM_FLAG_TRY_1CB | ||
| 78 | * Send one blocking callback if TRY is set and the lock is not granted. | ||
| 79 | * | ||
| 80 | * LM_FLAG_NOEXP | ||
| 81 | * GFS sets this flag on lock requests it makes while doing journal recovery. | ||
| 82 | * These special requests should not be blocked due to the recovery like | ||
| 83 | * ordinary locks would be. | ||
| 84 | * | ||
| 85 | * LM_FLAG_ANY | ||
| 86 | * A SHARED request may also be granted in DEFERRED, or a DEFERRED request may | ||
| 87 | * also be granted in SHARED. The preferred state is whichever is compatible | ||
| 88 | * with other granted locks, or the specified state if no other locks exist. | ||
| 89 | * | ||
| 90 | * LM_FLAG_PRIORITY | ||
| 91 | * Override fairness considerations. Suppose a lock is held in a shared state | ||
| 92 | * and there is a pending request for the deferred state. A shared lock | ||
| 93 | * request with the priority flag would be allowed to bypass the deferred | ||
| 94 | * request and directly join the other shared lock. A shared lock request | ||
| 95 | * without the priority flag might be forced to wait until the deferred | ||
| 96 | * requested had acquired and released the lock. | ||
| 97 | */ | ||
| 98 | |||
| 99 | #define LM_FLAG_TRY 0x00000001 | ||
| 100 | #define LM_FLAG_TRY_1CB 0x00000002 | ||
| 101 | #define LM_FLAG_NOEXP 0x00000004 | ||
| 102 | #define LM_FLAG_ANY 0x00000008 | ||
| 103 | #define LM_FLAG_PRIORITY 0x00000010 | ||
| 104 | |||
| 105 | /* | ||
| 106 | * lm_lock() and lm_async_cb return flags | ||
| 107 | * | ||
| 108 | * LM_OUT_ST_MASK | ||
| 109 | * Masks the lower two bits of lock state in the returned value. | ||
| 110 | * | ||
| 111 | * LM_OUT_CACHEABLE | ||
| 112 | * The lock hasn't been released so GFS can continue to cache data for it. | ||
| 113 | * | ||
| 114 | * LM_OUT_CANCELED | ||
| 115 | * The lock request was canceled. | ||
| 116 | * | ||
| 117 | * LM_OUT_ASYNC | ||
| 118 | * The result of the request will be returned in an LM_CB_ASYNC callback. | ||
| 119 | * | ||
| 120 | * LM_OUT_CONV_DEADLK | ||
| 121 | * The lock request was canceled do to a conversion deadlock. | ||
| 122 | */ | ||
| 123 | |||
| 124 | #define LM_OUT_ST_MASK 0x00000003 | ||
| 125 | #define LM_OUT_CANCELED 0x00000008 | ||
| 126 | #define LM_OUT_ASYNC 0x00000080 | ||
| 127 | #define LM_OUT_ERROR 0x00000100 | ||
| 128 | |||
| 129 | /* | ||
| 130 | * lm_callback_t types | ||
| 131 | * | ||
| 132 | * LM_CB_NEED_E LM_CB_NEED_D LM_CB_NEED_S | ||
| 133 | * Blocking callback, a remote node is requesting the given lock in | ||
| 134 | * EXCLUSIVE, DEFERRED, or SHARED. | ||
| 135 | * | ||
| 136 | * LM_CB_NEED_RECOVERY | ||
| 137 | * The given journal needs to be recovered. | ||
| 138 | * | ||
| 139 | * LM_CB_ASYNC | ||
| 140 | * The given lock has been granted. | ||
| 141 | */ | ||
| 142 | |||
| 143 | #define LM_CB_NEED_E 257 | ||
| 144 | #define LM_CB_NEED_D 258 | ||
| 145 | #define LM_CB_NEED_S 259 | ||
| 146 | #define LM_CB_NEED_RECOVERY 260 | ||
| 147 | #define LM_CB_ASYNC 262 | ||
| 148 | |||
| 149 | /* | ||
| 150 | * lm_recovery_done() messages | ||
| 151 | */ | ||
| 152 | |||
| 153 | #define LM_RD_GAVEUP 308 | ||
| 154 | #define LM_RD_SUCCESS 309 | ||
| 155 | |||
| 156 | |||
| 157 | struct lm_lockname { | ||
| 158 | u64 ln_number; | ||
| 159 | unsigned int ln_type; | ||
| 160 | }; | ||
| 161 | |||
| 162 | #define lm_name_equal(name1, name2) \ | ||
| 163 | (((name1)->ln_number == (name2)->ln_number) && \ | ||
| 164 | ((name1)->ln_type == (name2)->ln_type)) \ | ||
| 165 | |||
| 166 | struct lm_async_cb { | ||
| 167 | struct lm_lockname lc_name; | ||
| 168 | int lc_ret; | ||
| 169 | }; | ||
| 170 | |||
| 171 | struct lm_lockstruct; | ||
| 172 | |||
| 173 | struct lm_lockops { | ||
| 174 | const char *lm_proto_name; | ||
| 175 | |||
| 176 | /* | ||
| 177 | * Mount/Unmount | ||
| 178 | */ | ||
| 179 | |||
| 180 | int (*lm_mount) (char *table_name, char *host_data, | ||
| 181 | lm_callback_t cb, void *cb_data, | ||
| 182 | unsigned int min_lvb_size, int flags, | ||
| 183 | struct lm_lockstruct *lockstruct, | ||
| 184 | struct kobject *fskobj); | ||
| 185 | |||
| 186 | void (*lm_others_may_mount) (void *lockspace); | ||
| 187 | |||
| 188 | void (*lm_unmount) (void *lockspace); | ||
| 189 | |||
| 190 | void (*lm_withdraw) (void *lockspace); | ||
| 191 | |||
| 192 | /* | ||
| 193 | * Lock oriented operations | ||
| 194 | */ | ||
| 195 | |||
| 196 | int (*lm_get_lock) (void *lockspace, struct lm_lockname *name, void **lockp); | ||
| 197 | |||
| 198 | void (*lm_put_lock) (void *lock); | ||
| 199 | |||
| 200 | unsigned int (*lm_lock) (void *lock, unsigned int cur_state, | ||
| 201 | unsigned int req_state, unsigned int flags); | ||
| 202 | |||
| 203 | unsigned int (*lm_unlock) (void *lock, unsigned int cur_state); | ||
| 204 | |||
| 205 | void (*lm_cancel) (void *lock); | ||
| 206 | |||
| 207 | int (*lm_hold_lvb) (void *lock, char **lvbp); | ||
| 208 | void (*lm_unhold_lvb) (void *lock, char *lvb); | ||
| 209 | |||
| 210 | /* | ||
| 211 | * Posix Lock oriented operations | ||
| 212 | */ | ||
| 213 | |||
| 214 | int (*lm_plock_get) (void *lockspace, struct lm_lockname *name, | ||
| 215 | struct file *file, struct file_lock *fl); | ||
| 216 | |||
| 217 | int (*lm_plock) (void *lockspace, struct lm_lockname *name, | ||
| 218 | struct file *file, int cmd, struct file_lock *fl); | ||
| 219 | |||
| 220 | int (*lm_punlock) (void *lockspace, struct lm_lockname *name, | ||
| 221 | struct file *file, struct file_lock *fl); | ||
| 222 | |||
| 223 | /* | ||
| 224 | * Client oriented operations | ||
| 225 | */ | ||
| 226 | |||
| 227 | void (*lm_recovery_done) (void *lockspace, unsigned int jid, | ||
| 228 | unsigned int message); | ||
| 229 | |||
| 230 | struct module *lm_owner; | ||
| 231 | }; | ||
| 232 | |||
| 233 | /* | ||
| 234 | * lm_mount() return values | ||
| 235 | * | ||
| 236 | * ls_jid - the journal ID this node should use | ||
| 237 | * ls_first - this node is the first to mount the file system | ||
| 238 | * ls_lvb_size - size in bytes of lock value blocks | ||
| 239 | * ls_lockspace - lock module's context for this file system | ||
| 240 | * ls_ops - lock module's functions | ||
| 241 | * ls_flags - lock module features | ||
| 242 | */ | ||
| 243 | |||
| 244 | struct lm_lockstruct { | ||
| 245 | unsigned int ls_jid; | ||
| 246 | unsigned int ls_first; | ||
| 247 | unsigned int ls_lvb_size; | ||
| 248 | void *ls_lockspace; | ||
| 249 | const struct lm_lockops *ls_ops; | ||
| 250 | int ls_flags; | ||
| 251 | }; | ||
| 252 | |||
| 253 | /* | ||
| 254 | * Lock module bottom interface. A lock module makes itself available to GFS | ||
| 255 | * with these functions. | ||
| 256 | */ | ||
| 257 | |||
| 258 | int gfs2_register_lockproto(const struct lm_lockops *proto); | ||
| 259 | void gfs2_unregister_lockproto(const struct lm_lockops *proto); | ||
| 260 | |||
| 261 | /* | ||
| 262 | * Lock module top interface. GFS calls these functions when mounting or | ||
| 263 | * unmounting a file system. | ||
| 264 | */ | ||
| 265 | |||
| 266 | int gfs2_mount_lockproto(char *proto_name, char *table_name, char *host_data, | ||
| 267 | lm_callback_t cb, void *cb_data, | ||
| 268 | unsigned int min_lvb_size, int flags, | ||
| 269 | struct lm_lockstruct *lockstruct, | ||
| 270 | struct kobject *fskobj); | ||
| 271 | |||
| 272 | void gfs2_unmount_lockproto(struct lm_lockstruct *lockstruct); | ||
| 273 | |||
| 274 | void gfs2_withdraw_lockproto(struct lm_lockstruct *lockstruct); | ||
| 275 | |||
| 276 | #endif /* __LM_INTERFACE_DOT_H__ */ | ||
| 277 | |||
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index aa6fe7026de7..51855dfd8adb 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
| @@ -346,6 +346,7 @@ static inline int __nlm_cmp_addr4(const struct sockaddr *sap1, | |||
| 346 | return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; | 346 | return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; |
| 347 | } | 347 | } |
| 348 | 348 | ||
| 349 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
| 349 | static inline int __nlm_cmp_addr6(const struct sockaddr *sap1, | 350 | static inline int __nlm_cmp_addr6(const struct sockaddr *sap1, |
| 350 | const struct sockaddr *sap2) | 351 | const struct sockaddr *sap2) |
| 351 | { | 352 | { |
| @@ -353,6 +354,13 @@ static inline int __nlm_cmp_addr6(const struct sockaddr *sap1, | |||
| 353 | const struct sockaddr_in6 *sin2 = (const struct sockaddr_in6 *)sap2; | 354 | const struct sockaddr_in6 *sin2 = (const struct sockaddr_in6 *)sap2; |
| 354 | return ipv6_addr_equal(&sin1->sin6_addr, &sin2->sin6_addr); | 355 | return ipv6_addr_equal(&sin1->sin6_addr, &sin2->sin6_addr); |
| 355 | } | 356 | } |
| 357 | #else /* !(CONFIG_IPV6 || CONFIG_IPV6_MODULE) */ | ||
| 358 | static inline int __nlm_cmp_addr6(const struct sockaddr *sap1, | ||
| 359 | const struct sockaddr *sap2) | ||
| 360 | { | ||
| 361 | return 0; | ||
| 362 | } | ||
| 363 | #endif /* !(CONFIG_IPV6 || CONFIG_IPV6_MODULE) */ | ||
| 356 | 364 | ||
| 357 | /* | 365 | /* |
| 358 | * Compare two host addresses | 366 | * Compare two host addresses |
diff --git a/include/linux/maple.h b/include/linux/maple.h index c23d3f51ba40..d9a51b9b3300 100644 --- a/include/linux/maple.h +++ b/include/linux/maple.h | |||
| @@ -8,33 +8,49 @@ extern struct bus_type maple_bus_type; | |||
| 8 | 8 | ||
| 9 | /* Maple Bus command and response codes */ | 9 | /* Maple Bus command and response codes */ |
| 10 | enum maple_code { | 10 | enum maple_code { |
| 11 | MAPLE_RESPONSE_FILEERR = -5, | 11 | MAPLE_RESPONSE_FILEERR = -5, |
| 12 | MAPLE_RESPONSE_AGAIN = -4, /* request should be retransmitted */ | 12 | MAPLE_RESPONSE_AGAIN, /* retransmit */ |
| 13 | MAPLE_RESPONSE_BADCMD = -3, | 13 | MAPLE_RESPONSE_BADCMD, |
| 14 | MAPLE_RESPONSE_BADFUNC = -2, | 14 | MAPLE_RESPONSE_BADFUNC, |
| 15 | MAPLE_RESPONSE_NONE = -1, /* unit didn't respond at all */ | 15 | MAPLE_RESPONSE_NONE, /* unit didn't respond*/ |
| 16 | MAPLE_COMMAND_DEVINFO = 1, | 16 | MAPLE_COMMAND_DEVINFO = 1, |
| 17 | MAPLE_COMMAND_ALLINFO = 2, | 17 | MAPLE_COMMAND_ALLINFO, |
| 18 | MAPLE_COMMAND_RESET = 3, | 18 | MAPLE_COMMAND_RESET, |
| 19 | MAPLE_COMMAND_KILL = 4, | 19 | MAPLE_COMMAND_KILL, |
| 20 | MAPLE_RESPONSE_DEVINFO = 5, | 20 | MAPLE_RESPONSE_DEVINFO, |
| 21 | MAPLE_RESPONSE_ALLINFO = 6, | 21 | MAPLE_RESPONSE_ALLINFO, |
| 22 | MAPLE_RESPONSE_OK = 7, | 22 | MAPLE_RESPONSE_OK, |
| 23 | MAPLE_RESPONSE_DATATRF = 8, | 23 | MAPLE_RESPONSE_DATATRF, |
| 24 | MAPLE_COMMAND_GETCOND = 9, | 24 | MAPLE_COMMAND_GETCOND, |
| 25 | MAPLE_COMMAND_GETMINFO = 10, | 25 | MAPLE_COMMAND_GETMINFO, |
| 26 | MAPLE_COMMAND_BREAD = 11, | 26 | MAPLE_COMMAND_BREAD, |
| 27 | MAPLE_COMMAND_BWRITE = 12, | 27 | MAPLE_COMMAND_BWRITE, |
| 28 | MAPLE_COMMAND_SETCOND = 14 | 28 | MAPLE_COMMAND_BSYNC, |
| 29 | MAPLE_COMMAND_SETCOND, | ||
| 30 | MAPLE_COMMAND_MICCONTROL | ||
| 31 | }; | ||
| 32 | |||
| 33 | enum maple_file_errors { | ||
| 34 | MAPLE_FILEERR_INVALID_PARTITION = 0x01000000, | ||
| 35 | MAPLE_FILEERR_PHASE_ERROR = 0x02000000, | ||
| 36 | MAPLE_FILEERR_INVALID_BLOCK = 0x04000000, | ||
| 37 | MAPLE_FILEERR_WRITE_ERROR = 0x08000000, | ||
| 38 | MAPLE_FILEERR_INVALID_WRITE_LENGTH = 0x10000000, | ||
| 39 | MAPLE_FILEERR_BAD_CRC = 0x20000000 | ||
| 40 | }; | ||
| 41 | |||
| 42 | struct maple_buffer { | ||
| 43 | char bufx[0x400]; | ||
| 44 | void *buf; | ||
| 29 | }; | 45 | }; |
| 30 | 46 | ||
| 31 | struct mapleq { | 47 | struct mapleq { |
| 32 | struct list_head list; | 48 | struct list_head list; |
| 33 | struct maple_device *dev; | 49 | struct maple_device *dev; |
| 34 | void *sendbuf, *recvbuf, *recvbufdcsp; | 50 | struct maple_buffer *recvbuf; |
| 51 | void *sendbuf, *recvbuf_p2; | ||
| 35 | unsigned char length; | 52 | unsigned char length; |
| 36 | enum maple_code command; | 53 | enum maple_code command; |
| 37 | struct mutex mutex; | ||
| 38 | }; | 54 | }; |
| 39 | 55 | ||
| 40 | struct maple_devinfo { | 56 | struct maple_devinfo { |
| @@ -52,11 +68,15 @@ struct maple_device { | |||
| 52 | struct maple_driver *driver; | 68 | struct maple_driver *driver; |
| 53 | struct mapleq *mq; | 69 | struct mapleq *mq; |
| 54 | void (*callback) (struct mapleq * mq); | 70 | void (*callback) (struct mapleq * mq); |
| 71 | void (*fileerr_handler)(struct maple_device *mdev, void *recvbuf); | ||
| 72 | int (*can_unload)(struct maple_device *mdev); | ||
| 55 | unsigned long when, interval, function; | 73 | unsigned long when, interval, function; |
| 56 | struct maple_devinfo devinfo; | 74 | struct maple_devinfo devinfo; |
| 57 | unsigned char port, unit; | 75 | unsigned char port, unit; |
| 58 | char product_name[32]; | 76 | char product_name[32]; |
| 59 | char product_licence[64]; | 77 | char product_licence[64]; |
| 78 | atomic_t busy; | ||
| 79 | wait_queue_head_t maple_wait; | ||
| 60 | struct device dev; | 80 | struct device dev; |
| 61 | }; | 81 | }; |
| 62 | 82 | ||
| @@ -72,7 +92,7 @@ void maple_getcond_callback(struct maple_device *dev, | |||
| 72 | int maple_driver_register(struct maple_driver *); | 92 | int maple_driver_register(struct maple_driver *); |
| 73 | void maple_driver_unregister(struct maple_driver *); | 93 | void maple_driver_unregister(struct maple_driver *); |
| 74 | 94 | ||
| 75 | int maple_add_packet_sleeps(struct maple_device *mdev, u32 function, | 95 | int maple_add_packet(struct maple_device *mdev, u32 function, |
| 76 | u32 command, u32 length, void *data); | 96 | u32 command, u32 length, void *data); |
| 77 | void maple_clear_dev(struct maple_device *mdev); | 97 | void maple_clear_dev(struct maple_device *mdev); |
| 78 | 98 | ||
diff --git a/include/linux/matroxfb.h b/include/linux/matroxfb.h index 404f678e734b..2203121a43e9 100644 --- a/include/linux/matroxfb.h +++ b/include/linux/matroxfb.h | |||
| @@ -37,7 +37,7 @@ enum matroxfb_ctrl_id { | |||
| 37 | MATROXFB_CID_LAST | 37 | MATROXFB_CID_LAST |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | #define FBIO_WAITFORVSYNC _IOW('F', 0x20, u_int32_t) | 40 | #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) |
| 41 | 41 | ||
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
diff --git a/include/linux/mfd/wm8350/audio.h b/include/linux/mfd/wm8350/audio.h index af95a1d2f3a1..d899dc0223ba 100644 --- a/include/linux/mfd/wm8350/audio.h +++ b/include/linux/mfd/wm8350/audio.h | |||
| @@ -490,6 +490,7 @@ | |||
| 490 | /* | 490 | /* |
| 491 | * R231 (0xE7) - Jack Status | 491 | * R231 (0xE7) - Jack Status |
| 492 | */ | 492 | */ |
| 493 | #define WM8350_JACK_L_LVL 0x0800 | ||
| 493 | #define WM8350_JACK_R_LVL 0x0400 | 494 | #define WM8350_JACK_R_LVL 0x0400 |
| 494 | 495 | ||
| 495 | /* | 496 | /* |
diff --git a/include/linux/mfd/wm8400-audio.h b/include/linux/mfd/wm8400-audio.h index b6640e018046..e06ed3eb1d0a 100644 --- a/include/linux/mfd/wm8400-audio.h +++ b/include/linux/mfd/wm8400-audio.h | |||
| @@ -1181,6 +1181,7 @@ | |||
| 1181 | #define WM8400_FLL_OUTDIV_SHIFT 0 /* FLL_OUTDIV - [2:0] */ | 1181 | #define WM8400_FLL_OUTDIV_SHIFT 0 /* FLL_OUTDIV - [2:0] */ |
| 1182 | #define WM8400_FLL_OUTDIV_WIDTH 3 /* FLL_OUTDIV - [2:0] */ | 1182 | #define WM8400_FLL_OUTDIV_WIDTH 3 /* FLL_OUTDIV - [2:0] */ |
| 1183 | 1183 | ||
| 1184 | struct wm8400; | ||
| 1184 | void wm8400_reset_codec_reg_cache(struct wm8400 *wm8400); | 1185 | void wm8400_reset_codec_reg_cache(struct wm8400 *wm8400); |
| 1185 | 1186 | ||
| 1186 | #endif | 1187 | #endif |
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h index 0e39745f5111..13fe09e0576a 100644 --- a/include/linux/minix_fs.h +++ b/include/linux/minix_fs.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _LINUX_MINIX_FS_H | 1 | #ifndef _LINUX_MINIX_FS_H |
| 2 | #define _LINUX_MINIX_FS_H | 2 | #define _LINUX_MINIX_FS_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/magic.h> | 5 | #include <linux/magic.h> |
| 5 | 6 | ||
| 6 | /* | 7 | /* |
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h index cf9c679ab38b..0f82293a82ed 100644 --- a/include/linux/mlx4/cmd.h +++ b/include/linux/mlx4/cmd.h | |||
| @@ -55,6 +55,7 @@ enum { | |||
| 55 | MLX4_CMD_CLOSE_PORT = 0xa, | 55 | MLX4_CMD_CLOSE_PORT = 0xa, |
| 56 | MLX4_CMD_QUERY_HCA = 0xb, | 56 | MLX4_CMD_QUERY_HCA = 0xb, |
| 57 | MLX4_CMD_QUERY_PORT = 0x43, | 57 | MLX4_CMD_QUERY_PORT = 0x43, |
| 58 | MLX4_CMD_SENSE_PORT = 0x4d, | ||
| 58 | MLX4_CMD_SET_PORT = 0xc, | 59 | MLX4_CMD_SET_PORT = 0xc, |
| 59 | MLX4_CMD_ACCESS_DDR = 0x2e, | 60 | MLX4_CMD_ACCESS_DDR = 0x2e, |
| 60 | MLX4_CMD_MAP_ICM = 0xffa, | 61 | MLX4_CMD_MAP_ICM = 0xffa, |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 8f659cc29960..3aff8a6a389e 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -155,8 +155,9 @@ enum mlx4_qp_region { | |||
| 155 | }; | 155 | }; |
| 156 | 156 | ||
| 157 | enum mlx4_port_type { | 157 | enum mlx4_port_type { |
| 158 | MLX4_PORT_TYPE_IB = 1 << 0, | 158 | MLX4_PORT_TYPE_IB = 1, |
| 159 | MLX4_PORT_TYPE_ETH = 1 << 1, | 159 | MLX4_PORT_TYPE_ETH = 2, |
| 160 | MLX4_PORT_TYPE_AUTO = 3 | ||
| 160 | }; | 161 | }; |
| 161 | 162 | ||
| 162 | enum mlx4_special_vlan_idx { | 163 | enum mlx4_special_vlan_idx { |
| @@ -237,6 +238,7 @@ struct mlx4_caps { | |||
| 237 | enum mlx4_port_type port_type[MLX4_MAX_PORTS + 1]; | 238 | enum mlx4_port_type port_type[MLX4_MAX_PORTS + 1]; |
| 238 | u8 supported_type[MLX4_MAX_PORTS + 1]; | 239 | u8 supported_type[MLX4_MAX_PORTS + 1]; |
| 239 | u32 port_mask; | 240 | u32 port_mask; |
| 241 | enum mlx4_port_type possible_type[MLX4_MAX_PORTS + 1]; | ||
| 240 | }; | 242 | }; |
| 241 | 243 | ||
| 242 | struct mlx4_buf_list { | 244 | struct mlx4_buf_list { |
diff --git a/include/linux/mm.h b/include/linux/mm.h index e8ddc98b8405..065cdf8c09fb 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -1041,10 +1041,23 @@ extern void free_bootmem_with_active_regions(int nid, | |||
| 1041 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); | 1041 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); |
| 1042 | extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data); | 1042 | extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data); |
| 1043 | extern void sparse_memory_present_with_active_regions(int nid); | 1043 | extern void sparse_memory_present_with_active_regions(int nid); |
| 1044 | #ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID | ||
| 1045 | extern int early_pfn_to_nid(unsigned long pfn); | ||
| 1046 | #endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */ | ||
| 1047 | #endif /* CONFIG_ARCH_POPULATES_NODE_MAP */ | 1044 | #endif /* CONFIG_ARCH_POPULATES_NODE_MAP */ |
| 1045 | |||
| 1046 | #if !defined(CONFIG_ARCH_POPULATES_NODE_MAP) && \ | ||
| 1047 | !defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID) | ||
| 1048 | static inline int __early_pfn_to_nid(unsigned long pfn) | ||
| 1049 | { | ||
| 1050 | return 0; | ||
| 1051 | } | ||
| 1052 | #else | ||
| 1053 | /* please see mm/page_alloc.c */ | ||
| 1054 | extern int __meminit early_pfn_to_nid(unsigned long pfn); | ||
| 1055 | #ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID | ||
| 1056 | /* there is a per-arch backend function. */ | ||
| 1057 | extern int __meminit __early_pfn_to_nid(unsigned long pfn); | ||
| 1058 | #endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */ | ||
| 1059 | #endif | ||
| 1060 | |||
| 1048 | extern void set_dma_reserve(unsigned long new_dma_reserve); | 1061 | extern void set_dma_reserve(unsigned long new_dma_reserve); |
| 1049 | extern void memmap_init_zone(unsigned long, int, unsigned long, | 1062 | extern void memmap_init_zone(unsigned long, int, unsigned long, |
| 1050 | unsigned long, enum memmap_context); | 1063 | unsigned long, enum memmap_context); |
| @@ -1129,8 +1142,7 @@ extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | |||
| 1129 | unsigned long flag, unsigned long pgoff); | 1142 | unsigned long flag, unsigned long pgoff); |
| 1130 | extern unsigned long mmap_region(struct file *file, unsigned long addr, | 1143 | extern unsigned long mmap_region(struct file *file, unsigned long addr, |
| 1131 | unsigned long len, unsigned long flags, | 1144 | unsigned long len, unsigned long flags, |
| 1132 | unsigned int vm_flags, unsigned long pgoff, | 1145 | unsigned int vm_flags, unsigned long pgoff); |
| 1133 | int accountable); | ||
| 1134 | 1146 | ||
| 1135 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, | 1147 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, |
| 1136 | unsigned long len, unsigned long prot, | 1148 | unsigned long len, unsigned long prot, |
| @@ -1160,6 +1172,7 @@ extern int filemap_fault(struct vm_area_struct *, struct vm_fault *); | |||
| 1160 | 1172 | ||
| 1161 | /* mm/page-writeback.c */ | 1173 | /* mm/page-writeback.c */ |
| 1162 | int write_one_page(struct page *page, int wait); | 1174 | int write_one_page(struct page *page, int wait); |
| 1175 | void task_dirty_inc(struct task_struct *tsk); | ||
| 1163 | 1176 | ||
| 1164 | /* readahead.c */ | 1177 | /* readahead.c */ |
| 1165 | #define VM_MAX_READAHEAD 128 /* kbytes */ | 1178 | #define VM_MAX_READAHEAD 128 /* kbytes */ |
| @@ -1305,5 +1318,6 @@ void vmemmap_populate_print_last(void); | |||
| 1305 | 1318 | ||
| 1306 | extern void *alloc_locked_buffer(size_t size); | 1319 | extern void *alloc_locked_buffer(size_t size); |
| 1307 | extern void free_locked_buffer(void *buffer, size_t size); | 1320 | extern void free_locked_buffer(void *buffer, size_t size); |
| 1321 | extern void release_locked_buffer(void *buffer, size_t size); | ||
| 1308 | #endif /* __KERNEL__ */ | 1322 | #endif /* __KERNEL__ */ |
| 1309 | #endif /* _LINUX_MM_H */ | 1323 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 92915e81443f..d84feb7bdbf0 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -276,4 +276,7 @@ struct mm_struct { | |||
| 276 | #endif | 276 | #endif |
| 277 | }; | 277 | }; |
| 278 | 278 | ||
| 279 | /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */ | ||
| 280 | #define mm_cpumask(mm) (&(mm)->cpu_vm_mask) | ||
| 281 | |||
| 279 | #endif /* _LINUX_MM_TYPES_H */ | 282 | #endif /* _LINUX_MM_TYPES_H */ |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 09c14e213b63..1aca6cebbb78 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -1071,7 +1071,7 @@ void sparse_init(void); | |||
| 1071 | #endif /* CONFIG_SPARSEMEM */ | 1071 | #endif /* CONFIG_SPARSEMEM */ |
| 1072 | 1072 | ||
| 1073 | #ifdef CONFIG_NODES_SPAN_OTHER_NODES | 1073 | #ifdef CONFIG_NODES_SPAN_OTHER_NODES |
| 1074 | #define early_pfn_in_nid(pfn, nid) (early_pfn_to_nid(pfn) == (nid)) | 1074 | bool early_pfn_in_nid(unsigned long pfn, int nid); |
| 1075 | #else | 1075 | #else |
| 1076 | #define early_pfn_in_nid(pfn, nid) (1) | 1076 | #define early_pfn_in_nid(pfn, nid) (1) |
| 1077 | #endif | 1077 | #endif |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 97b91d1abb43..1bf5900ffe43 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
| @@ -443,8 +443,24 @@ struct dmi_system_id { | |||
| 443 | struct dmi_strmatch matches[4]; | 443 | struct dmi_strmatch matches[4]; |
| 444 | void *driver_data; | 444 | void *driver_data; |
| 445 | }; | 445 | }; |
| 446 | /* | ||
| 447 | * struct dmi_device_id appears during expansion of | ||
| 448 | * "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it | ||
| 449 | * but this is enough for gcc 3.4.6 to error out: | ||
| 450 | * error: storage size of '__mod_dmi_device_table' isn't known | ||
| 451 | */ | ||
| 452 | #define dmi_device_id dmi_system_id | ||
| 446 | #endif | 453 | #endif |
| 447 | 454 | ||
| 448 | #define DMI_MATCH(a, b) { a, b } | 455 | #define DMI_MATCH(a, b) { a, b } |
| 449 | 456 | ||
| 457 | #define PLATFORM_NAME_SIZE 20 | ||
| 458 | #define PLATFORM_MODULE_PREFIX "platform:" | ||
| 459 | |||
| 460 | struct platform_device_id { | ||
| 461 | char name[PLATFORM_NAME_SIZE]; | ||
| 462 | kernel_ulong_t driver_data | ||
| 463 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | ||
| 464 | }; | ||
| 465 | |||
| 450 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 466 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 4f7ea12463d3..145a75528cc1 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -219,11 +219,6 @@ void *__symbol_get_gpl(const char *symbol); | |||
| 219 | 219 | ||
| 220 | #endif | 220 | #endif |
| 221 | 221 | ||
| 222 | struct module_ref | ||
| 223 | { | ||
| 224 | local_t count; | ||
| 225 | } ____cacheline_aligned; | ||
| 226 | |||
| 227 | enum module_state | 222 | enum module_state |
| 228 | { | 223 | { |
| 229 | MODULE_STATE_LIVE, | 224 | MODULE_STATE_LIVE, |
| @@ -344,8 +339,11 @@ struct module | |||
| 344 | /* Destruction function. */ | 339 | /* Destruction function. */ |
| 345 | void (*exit)(void); | 340 | void (*exit)(void); |
| 346 | 341 | ||
| 347 | /* Reference counts */ | 342 | #ifdef CONFIG_SMP |
| 348 | struct module_ref ref[NR_CPUS]; | 343 | char *refptr; |
| 344 | #else | ||
| 345 | local_t ref; | ||
| 346 | #endif | ||
| 349 | #endif | 347 | #endif |
| 350 | }; | 348 | }; |
| 351 | #ifndef MODULE_ARCH_INIT | 349 | #ifndef MODULE_ARCH_INIT |
| @@ -395,13 +393,21 @@ void __symbol_put(const char *symbol); | |||
| 395 | #define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x) | 393 | #define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x) |
| 396 | void symbol_put_addr(void *addr); | 394 | void symbol_put_addr(void *addr); |
| 397 | 395 | ||
| 396 | static inline local_t *__module_ref_addr(struct module *mod, int cpu) | ||
| 397 | { | ||
| 398 | #ifdef CONFIG_SMP | ||
| 399 | return (local_t *) (mod->refptr + per_cpu_offset(cpu)); | ||
| 400 | #else | ||
| 401 | return &mod->ref; | ||
| 402 | #endif | ||
| 403 | } | ||
| 404 | |||
| 398 | /* Sometimes we know we already have a refcount, and it's easier not | 405 | /* Sometimes we know we already have a refcount, and it's easier not |
| 399 | to handle the error case (which only happens with rmmod --wait). */ | 406 | to handle the error case (which only happens with rmmod --wait). */ |
| 400 | static inline void __module_get(struct module *module) | 407 | static inline void __module_get(struct module *module) |
| 401 | { | 408 | { |
| 402 | if (module) { | 409 | if (module) { |
| 403 | BUG_ON(module_refcount(module) == 0); | 410 | local_inc(__module_ref_addr(module, get_cpu())); |
| 404 | local_inc(&module->ref[get_cpu()].count); | ||
| 405 | put_cpu(); | 411 | put_cpu(); |
| 406 | } | 412 | } |
| 407 | } | 413 | } |
| @@ -413,7 +419,7 @@ static inline int try_module_get(struct module *module) | |||
| 413 | if (module) { | 419 | if (module) { |
| 414 | unsigned int cpu = get_cpu(); | 420 | unsigned int cpu = get_cpu(); |
| 415 | if (likely(module_is_live(module))) | 421 | if (likely(module_is_live(module))) |
| 416 | local_inc(&module->ref[cpu].count); | 422 | local_inc(__module_ref_addr(module, cpu)); |
| 417 | else | 423 | else |
| 418 | ret = 0; | 424 | ret = 0; |
| 419 | put_cpu(); | 425 | put_cpu(); |
diff --git a/include/linux/mount.h b/include/linux/mount.h index cab2a85e2ee8..51f55f903aff 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
| @@ -27,6 +27,7 @@ struct mnt_namespace; | |||
| 27 | #define MNT_NODIRATIME 0x10 | 27 | #define MNT_NODIRATIME 0x10 |
| 28 | #define MNT_RELATIME 0x20 | 28 | #define MNT_RELATIME 0x20 |
| 29 | #define MNT_READONLY 0x40 /* does the user want this to be r/o? */ | 29 | #define MNT_READONLY 0x40 /* does the user want this to be r/o? */ |
| 30 | #define MNT_STRICTATIME 0x80 | ||
| 30 | 31 | ||
| 31 | #define MNT_SHRINKABLE 0x100 | 32 | #define MNT_SHRINKABLE 0x100 |
| 32 | #define MNT_IMBALANCED_WRITE_COUNT 0x200 /* just for debugging */ | 33 | #define MNT_IMBALANCED_WRITE_COUNT 0x200 /* just for debugging */ |
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index 8a455694d682..0d45b4e8d367 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
| @@ -193,6 +193,9 @@ struct vif_device | |||
| 193 | struct mfc_cache | 193 | struct mfc_cache |
| 194 | { | 194 | { |
| 195 | struct mfc_cache *next; /* Next entry on cache line */ | 195 | struct mfc_cache *next; /* Next entry on cache line */ |
| 196 | #ifdef CONFIG_NET_NS | ||
| 197 | struct net *mfc_net; | ||
| 198 | #endif | ||
| 196 | __be32 mfc_mcastgrp; /* Group the entry belongs to */ | 199 | __be32 mfc_mcastgrp; /* Group the entry belongs to */ |
| 197 | __be32 mfc_origin; /* Source of packet */ | 200 | __be32 mfc_origin; /* Source of packet */ |
| 198 | vifi_t mfc_parent; /* Source interface */ | 201 | vifi_t mfc_parent; /* Source interface */ |
| @@ -215,6 +218,18 @@ struct mfc_cache | |||
| 215 | } mfc_un; | 218 | } mfc_un; |
| 216 | }; | 219 | }; |
| 217 | 220 | ||
| 221 | static inline | ||
| 222 | struct net *mfc_net(const struct mfc_cache *mfc) | ||
| 223 | { | ||
| 224 | return read_pnet(&mfc->mfc_net); | ||
| 225 | } | ||
| 226 | |||
| 227 | static inline | ||
| 228 | void mfc_net_set(struct mfc_cache *mfc, struct net *net) | ||
| 229 | { | ||
| 230 | write_pnet(&mfc->mfc_net, hold_net(net)); | ||
| 231 | } | ||
| 232 | |||
| 218 | #define MFC_STATIC 1 | 233 | #define MFC_STATIC 1 |
| 219 | #define MFC_NOTIFY 2 | 234 | #define MFC_NOTIFY 2 |
| 220 | 235 | ||
| @@ -241,7 +256,8 @@ struct mfc_cache | |||
| 241 | 256 | ||
| 242 | #ifdef __KERNEL__ | 257 | #ifdef __KERNEL__ |
| 243 | struct rtmsg; | 258 | struct rtmsg; |
| 244 | extern int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait); | 259 | extern int ipmr_get_route(struct net *net, struct sk_buff *skb, |
| 260 | struct rtmsg *rtm, int nowait); | ||
| 245 | #endif | 261 | #endif |
| 246 | 262 | ||
| 247 | #endif | 263 | #endif |
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index 5375faca1f72..43dc97e32183 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h | |||
| @@ -65,7 +65,7 @@ struct mif6ctl { | |||
| 65 | mifi_t mif6c_mifi; /* Index of MIF */ | 65 | mifi_t mif6c_mifi; /* Index of MIF */ |
| 66 | unsigned char mif6c_flags; /* MIFF_ flags */ | 66 | unsigned char mif6c_flags; /* MIFF_ flags */ |
| 67 | unsigned char vifc_threshold; /* ttl limit */ | 67 | unsigned char vifc_threshold; /* ttl limit */ |
| 68 | u_short mif6c_pifi; /* the index of the physical IF */ | 68 | __u16 mif6c_pifi; /* the index of the physical IF */ |
| 69 | unsigned int vifc_rate_limit; /* Rate limiter values (NI) */ | 69 | unsigned int vifc_rate_limit; /* Rate limiter values (NI) */ |
| 70 | }; | 70 | }; |
| 71 | 71 | ||
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index e0a9b207920d..ce38f1caa5e1 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _LINUX_MSDOS_FS_H | 1 | #ifndef _LINUX_MSDOS_FS_H |
| 2 | #define _LINUX_MSDOS_FS_H | 2 | #define _LINUX_MSDOS_FS_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/magic.h> | 5 | #include <linux/magic.h> |
| 5 | #include <asm/byteorder.h> | 6 | #include <asm/byteorder.h> |
| 6 | 7 | ||
diff --git a/include/linux/ncp_no.h b/include/linux/ncp_no.h index f56a696a7cc6..cddaa48fb182 100644 --- a/include/linux/ncp_no.h +++ b/include/linux/ncp_no.h | |||
| @@ -2,18 +2,18 @@ | |||
| 2 | #define _NCP_NO | 2 | #define _NCP_NO |
| 3 | 3 | ||
| 4 | /* these define the attribute byte as seen by NCP */ | 4 | /* these define the attribute byte as seen by NCP */ |
| 5 | #define aRONLY (__constant_cpu_to_le32(1)) | 5 | #define aRONLY (__cpu_to_le32(1)) |
| 6 | #define aHIDDEN (__constant_cpu_to_le32(2)) | 6 | #define aHIDDEN (__cpu_to_le32(2)) |
| 7 | #define aSYSTEM (__constant_cpu_to_le32(4)) | 7 | #define aSYSTEM (__cpu_to_le32(4)) |
| 8 | #define aEXECUTE (__constant_cpu_to_le32(8)) | 8 | #define aEXECUTE (__cpu_to_le32(8)) |
| 9 | #define aDIR (__constant_cpu_to_le32(0x10)) | 9 | #define aDIR (__cpu_to_le32(0x10)) |
| 10 | #define aARCH (__constant_cpu_to_le32(0x20)) | 10 | #define aARCH (__cpu_to_le32(0x20)) |
| 11 | #define aSHARED (__constant_cpu_to_le32(0x80)) | 11 | #define aSHARED (__cpu_to_le32(0x80)) |
| 12 | #define aDONTSUBALLOCATE (__constant_cpu_to_le32(1L<<11)) | 12 | #define aDONTSUBALLOCATE (__cpu_to_le32(1L<<11)) |
| 13 | #define aTRANSACTIONAL (__constant_cpu_to_le32(1L<<12)) | 13 | #define aTRANSACTIONAL (__cpu_to_le32(1L<<12)) |
| 14 | #define aPURGE (__constant_cpu_to_le32(1L<<16)) | 14 | #define aPURGE (__cpu_to_le32(1L<<16)) |
| 15 | #define aRENAMEINHIBIT (__constant_cpu_to_le32(1L<<17)) | 15 | #define aRENAMEINHIBIT (__cpu_to_le32(1L<<17)) |
| 16 | #define aDELETEINHIBIT (__constant_cpu_to_le32(1L<<18)) | 16 | #define aDELETEINHIBIT (__cpu_to_le32(1L<<18)) |
| 17 | #define aDONTCOMPRESS (__constant_cpu_to_le32(1L<<27)) | 17 | #define aDONTCOMPRESS (__cpu_to_le32(1L<<27)) |
| 18 | 18 | ||
| 19 | #endif /* _NCP_NO */ | 19 | #endif /* _NCP_NO */ |
diff --git a/include/linux/neighbour.h b/include/linux/neighbour.h index bd3bbf668cdb..12c9de138451 100644 --- a/include/linux/neighbour.h +++ b/include/linux/neighbour.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_NEIGHBOUR_H | 1 | #ifndef __LINUX_NEIGHBOUR_H |
| 2 | #define __LINUX_NEIGHBOUR_H | 2 | #define __LINUX_NEIGHBOUR_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
| 5 | 6 | ||
| 6 | struct ndmsg | 7 | struct ndmsg |
| @@ -30,6 +31,7 @@ enum | |||
| 30 | * Neighbor Cache Entry Flags | 31 | * Neighbor Cache Entry Flags |
| 31 | */ | 32 | */ |
| 32 | 33 | ||
| 34 | #define NTF_USE 0x01 | ||
| 33 | #define NTF_PROXY 0x08 /* == ATF_PUBL */ | 35 | #define NTF_PROXY 0x08 /* == ATF_PUBL */ |
| 34 | #define NTF_ROUTER 0x80 | 36 | #define NTF_ROUTER 0x80 |
| 35 | 37 | ||
diff --git a/include/linux/net.h b/include/linux/net.h index 4515efae4c39..4fc2ffd527f9 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
| @@ -129,11 +129,15 @@ struct socket { | |||
| 129 | socket_state state; | 129 | socket_state state; |
| 130 | short type; | 130 | short type; |
| 131 | unsigned long flags; | 131 | unsigned long flags; |
| 132 | const struct proto_ops *ops; | 132 | /* |
| 133 | * Please keep fasync_list & wait fields in the same cache line | ||
| 134 | */ | ||
| 133 | struct fasync_struct *fasync_list; | 135 | struct fasync_struct *fasync_list; |
| 136 | wait_queue_head_t wait; | ||
| 137 | |||
| 134 | struct file *file; | 138 | struct file *file; |
| 135 | struct sock *sk; | 139 | struct sock *sk; |
| 136 | wait_queue_head_t wait; | 140 | const struct proto_ops *ops; |
| 137 | }; | 141 | }; |
| 138 | 142 | ||
| 139 | struct vm_area_struct; | 143 | struct vm_area_struct; |
diff --git a/include/linux/net_dropmon.h b/include/linux/net_dropmon.h new file mode 100644 index 000000000000..0217fb81a630 --- /dev/null +++ b/include/linux/net_dropmon.h | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | #ifndef __NET_DROPMON_H | ||
| 2 | #define __NET_DROPMON_H | ||
| 3 | |||
| 4 | #include <linux/netlink.h> | ||
| 5 | |||
| 6 | struct net_dm_drop_point { | ||
| 7 | __u8 pc[8]; | ||
| 8 | __u32 count; | ||
| 9 | }; | ||
| 10 | |||
| 11 | #define NET_DM_CFG_VERSION 0 | ||
| 12 | #define NET_DM_CFG_ALERT_COUNT 1 | ||
| 13 | #define NET_DM_CFG_ALERT_DELAY 2 | ||
| 14 | #define NET_DM_CFG_MAX 3 | ||
| 15 | |||
| 16 | struct net_dm_config_entry { | ||
| 17 | __u32 type; | ||
| 18 | __u64 data __attribute__((aligned(8))); | ||
| 19 | }; | ||
| 20 | |||
| 21 | struct net_dm_config_msg { | ||
| 22 | __u32 entries; | ||
| 23 | struct net_dm_config_entry options[0]; | ||
| 24 | }; | ||
| 25 | |||
| 26 | struct net_dm_alert_msg { | ||
| 27 | __u32 entries; | ||
| 28 | struct net_dm_drop_point points[0]; | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct net_dm_user_msg { | ||
| 32 | union { | ||
| 33 | struct net_dm_config_msg user; | ||
| 34 | struct net_dm_alert_msg alert; | ||
| 35 | } u; | ||
| 36 | }; | ||
| 37 | |||
| 38 | |||
| 39 | /* These are the netlink message types for this protocol */ | ||
| 40 | |||
| 41 | enum { | ||
| 42 | NET_DM_CMD_UNSPEC = 0, | ||
| 43 | NET_DM_CMD_ALERT, | ||
| 44 | NET_DM_CMD_CONFIG, | ||
| 45 | NET_DM_CMD_START, | ||
| 46 | NET_DM_CMD_STOP, | ||
| 47 | _NET_DM_CMD_MAX, | ||
| 48 | }; | ||
| 49 | |||
| 50 | #define NET_DM_CMD_MAX (_NET_DM_CMD_MAX - 1) | ||
| 51 | |||
| 52 | /* | ||
| 53 | * Our group identifiers | ||
| 54 | */ | ||
| 55 | #define NET_DM_GRP_ALERT 1 | ||
| 56 | #endif | ||
diff --git a/include/linux/net_tstamp.h b/include/linux/net_tstamp.h new file mode 100644 index 000000000000..a3b8546354ac --- /dev/null +++ b/include/linux/net_tstamp.h | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | /* | ||
| 2 | * Userspace API for hardware time stamping of network packets | ||
| 3 | * | ||
| 4 | * Copyright (C) 2008,2009 Intel Corporation | ||
| 5 | * Author: Patrick Ohly <patrick.ohly@intel.com> | ||
| 6 | * | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _NET_TIMESTAMPING_H | ||
| 10 | #define _NET_TIMESTAMPING_H | ||
| 11 | |||
| 12 | #include <linux/socket.h> /* for SO_TIMESTAMPING */ | ||
| 13 | |||
| 14 | /* SO_TIMESTAMPING gets an integer bit field comprised of these values */ | ||
| 15 | enum { | ||
| 16 | SOF_TIMESTAMPING_TX_HARDWARE = (1<<0), | ||
| 17 | SOF_TIMESTAMPING_TX_SOFTWARE = (1<<1), | ||
| 18 | SOF_TIMESTAMPING_RX_HARDWARE = (1<<2), | ||
| 19 | SOF_TIMESTAMPING_RX_SOFTWARE = (1<<3), | ||
| 20 | SOF_TIMESTAMPING_SOFTWARE = (1<<4), | ||
| 21 | SOF_TIMESTAMPING_SYS_HARDWARE = (1<<5), | ||
| 22 | SOF_TIMESTAMPING_RAW_HARDWARE = (1<<6), | ||
| 23 | SOF_TIMESTAMPING_MASK = | ||
| 24 | (SOF_TIMESTAMPING_RAW_HARDWARE - 1) | | ||
| 25 | SOF_TIMESTAMPING_RAW_HARDWARE | ||
| 26 | }; | ||
| 27 | |||
| 28 | /** | ||
| 29 | * struct hwtstamp_config - %SIOCSHWTSTAMP parameter | ||
| 30 | * | ||
| 31 | * @flags: no flags defined right now, must be zero | ||
| 32 | * @tx_type: one of HWTSTAMP_TX_* | ||
| 33 | * @rx_type: one of one of HWTSTAMP_FILTER_* | ||
| 34 | * | ||
| 35 | * %SIOCSHWTSTAMP expects a &struct ifreq with a ifr_data pointer to | ||
| 36 | * this structure. dev_ifsioc() in the kernel takes care of the | ||
| 37 | * translation between 32 bit userspace and 64 bit kernel. The | ||
| 38 | * structure is intentionally chosen so that it has the same layout on | ||
| 39 | * 32 and 64 bit systems, don't break this! | ||
| 40 | */ | ||
| 41 | struct hwtstamp_config { | ||
| 42 | int flags; | ||
| 43 | int tx_type; | ||
| 44 | int rx_filter; | ||
| 45 | }; | ||
| 46 | |||
| 47 | /* possible values for hwtstamp_config->tx_type */ | ||
| 48 | enum { | ||
| 49 | /* | ||
| 50 | * No outgoing packet will need hardware time stamping; | ||
| 51 | * should a packet arrive which asks for it, no hardware | ||
| 52 | * time stamping will be done. | ||
| 53 | */ | ||
| 54 | HWTSTAMP_TX_OFF, | ||
| 55 | |||
| 56 | /* | ||
| 57 | * Enables hardware time stamping for outgoing packets; | ||
| 58 | * the sender of the packet decides which are to be | ||
| 59 | * time stamped by setting %SOF_TIMESTAMPING_TX_SOFTWARE | ||
| 60 | * before sending the packet. | ||
| 61 | */ | ||
| 62 | HWTSTAMP_TX_ON, | ||
| 63 | }; | ||
| 64 | |||
| 65 | /* possible values for hwtstamp_config->rx_filter */ | ||
| 66 | enum { | ||
| 67 | /* time stamp no incoming packet at all */ | ||
| 68 | HWTSTAMP_FILTER_NONE, | ||
| 69 | |||
| 70 | /* time stamp any incoming packet */ | ||
| 71 | HWTSTAMP_FILTER_ALL, | ||
| 72 | |||
| 73 | /* return value: time stamp all packets requested plus some others */ | ||
| 74 | HWTSTAMP_FILTER_SOME, | ||
| 75 | |||
| 76 | /* PTP v1, UDP, any kind of event packet */ | ||
| 77 | HWTSTAMP_FILTER_PTP_V1_L4_EVENT, | ||
| 78 | /* PTP v1, UDP, Sync packet */ | ||
| 79 | HWTSTAMP_FILTER_PTP_V1_L4_SYNC, | ||
| 80 | /* PTP v1, UDP, Delay_req packet */ | ||
| 81 | HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ, | ||
| 82 | /* PTP v2, UDP, any kind of event packet */ | ||
| 83 | HWTSTAMP_FILTER_PTP_V2_L4_EVENT, | ||
| 84 | /* PTP v2, UDP, Sync packet */ | ||
| 85 | HWTSTAMP_FILTER_PTP_V2_L4_SYNC, | ||
| 86 | /* PTP v2, UDP, Delay_req packet */ | ||
| 87 | HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ, | ||
| 88 | |||
| 89 | /* 802.AS1, Ethernet, any kind of event packet */ | ||
| 90 | HWTSTAMP_FILTER_PTP_V2_L2_EVENT, | ||
| 91 | /* 802.AS1, Ethernet, Sync packet */ | ||
| 92 | HWTSTAMP_FILTER_PTP_V2_L2_SYNC, | ||
| 93 | /* 802.AS1, Ethernet, Delay_req packet */ | ||
| 94 | HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ, | ||
| 95 | |||
| 96 | /* PTP v2/802.AS1, any layer, any kind of event packet */ | ||
| 97 | HWTSTAMP_FILTER_PTP_V2_EVENT, | ||
| 98 | /* PTP v2/802.AS1, any layer, Sync packet */ | ||
| 99 | HWTSTAMP_FILTER_PTP_V2_SYNC, | ||
| 100 | /* PTP v2/802.AS1, any layer, Delay_req packet */ | ||
| 101 | HWTSTAMP_FILTER_PTP_V2_DELAY_REQ, | ||
| 102 | }; | ||
| 103 | |||
| 104 | #endif /* _NET_TIMESTAMPING_H */ | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ec54785d34f9..be3ebd7e8ce5 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -96,7 +96,7 @@ struct wireless_dev; | |||
| 96 | * Compute the worst case header length according to the protocols | 96 | * Compute the worst case header length according to the protocols |
| 97 | * used. | 97 | * used. |
| 98 | */ | 98 | */ |
| 99 | 99 | ||
| 100 | #if defined(CONFIG_WLAN_80211) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | 100 | #if defined(CONFIG_WLAN_80211) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) |
| 101 | # if defined(CONFIG_MAC80211_MESH) | 101 | # if defined(CONFIG_MAC80211_MESH) |
| 102 | # define LL_MAX_HEADER 128 | 102 | # define LL_MAX_HEADER 128 |
| @@ -124,7 +124,7 @@ struct wireless_dev; | |||
| 124 | * Network device statistics. Akin to the 2.0 ether stats but | 124 | * Network device statistics. Akin to the 2.0 ether stats but |
| 125 | * with byte counters. | 125 | * with byte counters. |
| 126 | */ | 126 | */ |
| 127 | 127 | ||
| 128 | struct net_device_stats | 128 | struct net_device_stats |
| 129 | { | 129 | { |
| 130 | unsigned long rx_packets; /* total packets received */ | 130 | unsigned long rx_packets; /* total packets received */ |
| @@ -285,7 +285,7 @@ enum netdev_state_t | |||
| 285 | 285 | ||
| 286 | /* | 286 | /* |
| 287 | * This structure holds at boot time configured netdevice settings. They | 287 | * This structure holds at boot time configured netdevice settings. They |
| 288 | * are then used in the device probing. | 288 | * are then used in the device probing. |
| 289 | */ | 289 | */ |
| 290 | struct netdev_boot_setup { | 290 | struct netdev_boot_setup { |
| 291 | char name[IFNAMSIZ]; | 291 | char name[IFNAMSIZ]; |
| @@ -314,6 +314,9 @@ struct napi_struct { | |||
| 314 | spinlock_t poll_lock; | 314 | spinlock_t poll_lock; |
| 315 | int poll_owner; | 315 | int poll_owner; |
| 316 | #endif | 316 | #endif |
| 317 | |||
| 318 | unsigned int gro_count; | ||
| 319 | |||
| 317 | struct net_device *dev; | 320 | struct net_device *dev; |
| 318 | struct list_head dev_list; | 321 | struct list_head dev_list; |
| 319 | struct sk_buff *gro_list; | 322 | struct sk_buff *gro_list; |
| @@ -327,6 +330,14 @@ enum | |||
| 327 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ | 330 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ |
| 328 | }; | 331 | }; |
| 329 | 332 | ||
| 333 | enum { | ||
| 334 | GRO_MERGED, | ||
| 335 | GRO_MERGED_FREE, | ||
| 336 | GRO_HELD, | ||
| 337 | GRO_NORMAL, | ||
| 338 | GRO_DROP, | ||
| 339 | }; | ||
| 340 | |||
| 330 | extern void __napi_schedule(struct napi_struct *n); | 341 | extern void __napi_schedule(struct napi_struct *n); |
| 331 | 342 | ||
| 332 | static inline int napi_disable_pending(struct napi_struct *n) | 343 | static inline int napi_disable_pending(struct napi_struct *n) |
| @@ -740,7 +751,7 @@ struct net_device | |||
| 740 | void *dsa_ptr; /* dsa specific data */ | 751 | void *dsa_ptr; /* dsa specific data */ |
| 741 | #endif | 752 | #endif |
| 742 | void *atalk_ptr; /* AppleTalk link */ | 753 | void *atalk_ptr; /* AppleTalk link */ |
| 743 | void *ip_ptr; /* IPv4 specific data */ | 754 | void *ip_ptr; /* IPv4 specific data */ |
| 744 | void *dn_ptr; /* DECnet specific data */ | 755 | void *dn_ptr; /* DECnet specific data */ |
| 745 | void *ip6_ptr; /* IPv6 specific data */ | 756 | void *ip6_ptr; /* IPv6 specific data */ |
| 746 | void *ec_ptr; /* Econet specific data */ | 757 | void *ec_ptr; /* Econet specific data */ |
| @@ -753,7 +764,7 @@ struct net_device | |||
| 753 | */ | 764 | */ |
| 754 | unsigned long last_rx; /* Time of last Rx */ | 765 | unsigned long last_rx; /* Time of last Rx */ |
| 755 | /* Interface address info used in eth_type_trans() */ | 766 | /* Interface address info used in eth_type_trans() */ |
| 756 | unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast | 767 | unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast |
| 757 | because most packets are unicast) */ | 768 | because most packets are unicast) */ |
| 758 | 769 | ||
| 759 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | 770 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ |
| @@ -984,6 +995,9 @@ void netif_napi_add(struct net_device *dev, struct napi_struct *napi, | |||
| 984 | void netif_napi_del(struct napi_struct *napi); | 995 | void netif_napi_del(struct napi_struct *napi); |
| 985 | 996 | ||
| 986 | struct napi_gro_cb { | 997 | struct napi_gro_cb { |
| 998 | /* This indicates where we are processing relative to skb->data. */ | ||
| 999 | int data_offset; | ||
| 1000 | |||
| 987 | /* This is non-zero if the packet may be of the same flow. */ | 1001 | /* This is non-zero if the packet may be of the same flow. */ |
| 988 | int same_flow; | 1002 | int same_flow; |
| 989 | 1003 | ||
| @@ -1079,6 +1093,7 @@ extern void synchronize_net(void); | |||
| 1079 | extern int register_netdevice_notifier(struct notifier_block *nb); | 1093 | extern int register_netdevice_notifier(struct notifier_block *nb); |
| 1080 | extern int unregister_netdevice_notifier(struct notifier_block *nb); | 1094 | extern int unregister_netdevice_notifier(struct notifier_block *nb); |
| 1081 | extern int init_dummy_netdev(struct net_device *dev); | 1095 | extern int init_dummy_netdev(struct net_device *dev); |
| 1096 | extern void netdev_resync_ops(struct net_device *dev); | ||
| 1082 | 1097 | ||
| 1083 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); | 1098 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); |
| 1084 | extern struct net_device *dev_get_by_index(struct net *net, int ifindex); | 1099 | extern struct net_device *dev_get_by_index(struct net *net, int ifindex); |
| @@ -1087,6 +1102,36 @@ extern int dev_restart(struct net_device *dev); | |||
| 1087 | #ifdef CONFIG_NETPOLL_TRAP | 1102 | #ifdef CONFIG_NETPOLL_TRAP |
| 1088 | extern int netpoll_trap(void); | 1103 | extern int netpoll_trap(void); |
| 1089 | #endif | 1104 | #endif |
| 1105 | extern void *skb_gro_header(struct sk_buff *skb, unsigned int hlen); | ||
| 1106 | extern int skb_gro_receive(struct sk_buff **head, | ||
| 1107 | struct sk_buff *skb); | ||
| 1108 | |||
| 1109 | static inline unsigned int skb_gro_offset(const struct sk_buff *skb) | ||
| 1110 | { | ||
| 1111 | return NAPI_GRO_CB(skb)->data_offset; | ||
| 1112 | } | ||
| 1113 | |||
| 1114 | static inline unsigned int skb_gro_len(const struct sk_buff *skb) | ||
| 1115 | { | ||
| 1116 | return skb->len - NAPI_GRO_CB(skb)->data_offset; | ||
| 1117 | } | ||
| 1118 | |||
| 1119 | static inline void skb_gro_pull(struct sk_buff *skb, unsigned int len) | ||
| 1120 | { | ||
| 1121 | NAPI_GRO_CB(skb)->data_offset += len; | ||
| 1122 | } | ||
| 1123 | |||
| 1124 | static inline void skb_gro_reset_offset(struct sk_buff *skb) | ||
| 1125 | { | ||
| 1126 | NAPI_GRO_CB(skb)->data_offset = 0; | ||
| 1127 | } | ||
| 1128 | |||
| 1129 | static inline void *skb_gro_mac_header(struct sk_buff *skb) | ||
| 1130 | { | ||
| 1131 | return skb_mac_header(skb) < skb->data ? skb_mac_header(skb) : | ||
| 1132 | page_address(skb_shinfo(skb)->frags[0].page) + | ||
| 1133 | skb_shinfo(skb)->frags[0].page_offset; | ||
| 1134 | } | ||
| 1090 | 1135 | ||
| 1091 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, | 1136 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, |
| 1092 | unsigned short type, | 1137 | unsigned short type, |
| @@ -1375,12 +1420,15 @@ extern int netif_receive_skb(struct sk_buff *skb); | |||
| 1375 | extern void napi_gro_flush(struct napi_struct *napi); | 1420 | extern void napi_gro_flush(struct napi_struct *napi); |
| 1376 | extern int dev_gro_receive(struct napi_struct *napi, | 1421 | extern int dev_gro_receive(struct napi_struct *napi, |
| 1377 | struct sk_buff *skb); | 1422 | struct sk_buff *skb); |
| 1423 | extern int napi_skb_finish(int ret, struct sk_buff *skb); | ||
| 1378 | extern int napi_gro_receive(struct napi_struct *napi, | 1424 | extern int napi_gro_receive(struct napi_struct *napi, |
| 1379 | struct sk_buff *skb); | 1425 | struct sk_buff *skb); |
| 1380 | extern void napi_reuse_skb(struct napi_struct *napi, | 1426 | extern void napi_reuse_skb(struct napi_struct *napi, |
| 1381 | struct sk_buff *skb); | 1427 | struct sk_buff *skb); |
| 1382 | extern struct sk_buff * napi_fraginfo_skb(struct napi_struct *napi, | 1428 | extern struct sk_buff * napi_fraginfo_skb(struct napi_struct *napi, |
| 1383 | struct napi_gro_fraginfo *info); | 1429 | struct napi_gro_fraginfo *info); |
| 1430 | extern int napi_frags_finish(struct napi_struct *napi, | ||
| 1431 | struct sk_buff *skb, int ret); | ||
| 1384 | extern int napi_gro_frags(struct napi_struct *napi, | 1432 | extern int napi_gro_frags(struct napi_struct *napi, |
| 1385 | struct napi_gro_fraginfo *info); | 1433 | struct napi_gro_fraginfo *info); |
| 1386 | extern void netif_nit_deliver(struct sk_buff *skb); | 1434 | extern void netif_nit_deliver(struct sk_buff *skb); |
| @@ -1574,56 +1622,6 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) | |||
| 1574 | return (1 << debug_value) - 1; | 1622 | return (1 << debug_value) - 1; |
| 1575 | } | 1623 | } |
| 1576 | 1624 | ||
| 1577 | /* Test if receive needs to be scheduled but only if up */ | ||
| 1578 | static inline int netif_rx_schedule_prep(struct napi_struct *napi) | ||
| 1579 | { | ||
| 1580 | return napi_schedule_prep(napi); | ||
| 1581 | } | ||
| 1582 | |||
| 1583 | /* Add interface to tail of rx poll list. This assumes that _prep has | ||
| 1584 | * already been called and returned 1. | ||
| 1585 | */ | ||
| 1586 | static inline void __netif_rx_schedule(struct napi_struct *napi) | ||
| 1587 | { | ||
| 1588 | __napi_schedule(napi); | ||
| 1589 | } | ||
| 1590 | |||
| 1591 | /* Try to reschedule poll. Called by irq handler. */ | ||
| 1592 | |||
| 1593 | static inline void netif_rx_schedule(struct napi_struct *napi) | ||
| 1594 | { | ||
| 1595 | if (netif_rx_schedule_prep(napi)) | ||
| 1596 | __netif_rx_schedule(napi); | ||
| 1597 | } | ||
| 1598 | |||
| 1599 | /* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). */ | ||
| 1600 | static inline int netif_rx_reschedule(struct napi_struct *napi) | ||
| 1601 | { | ||
| 1602 | if (napi_schedule_prep(napi)) { | ||
| 1603 | __netif_rx_schedule(napi); | ||
| 1604 | return 1; | ||
| 1605 | } | ||
| 1606 | return 0; | ||
| 1607 | } | ||
| 1608 | |||
| 1609 | /* same as netif_rx_complete, except that local_irq_save(flags) | ||
| 1610 | * has already been issued | ||
| 1611 | */ | ||
| 1612 | static inline void __netif_rx_complete(struct napi_struct *napi) | ||
| 1613 | { | ||
| 1614 | __napi_complete(napi); | ||
| 1615 | } | ||
| 1616 | |||
| 1617 | /* Remove interface from poll list: it must be in the poll list | ||
| 1618 | * on current cpu. This primitive is called by dev->poll(), when | ||
| 1619 | * it completes the work. The device cannot be out of poll list at this | ||
| 1620 | * moment, it is BUG(). | ||
| 1621 | */ | ||
| 1622 | static inline void netif_rx_complete(struct napi_struct *napi) | ||
| 1623 | { | ||
| 1624 | napi_complete(napi); | ||
| 1625 | } | ||
| 1626 | |||
| 1627 | static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu) | 1625 | static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu) |
| 1628 | { | 1626 | { |
| 1629 | spin_lock(&txq->_xmit_lock); | 1627 | spin_lock(&txq->_xmit_lock); |
| @@ -1874,7 +1872,7 @@ static inline int skb_bond_should_drop(struct sk_buff *skb) | |||
| 1874 | 1872 | ||
| 1875 | if (dev->priv_flags & IFF_SLAVE_INACTIVE) { | 1873 | if (dev->priv_flags & IFF_SLAVE_INACTIVE) { |
| 1876 | if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && | 1874 | if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && |
| 1877 | skb->protocol == __constant_htons(ETH_P_ARP)) | 1875 | skb->protocol == __cpu_to_be16(ETH_P_ARP)) |
| 1878 | return 0; | 1876 | return 0; |
| 1879 | 1877 | ||
| 1880 | if (master->priv_flags & IFF_MASTER_ALB) { | 1878 | if (master->priv_flags & IFF_MASTER_ALB) { |
| @@ -1883,7 +1881,7 @@ static inline int skb_bond_should_drop(struct sk_buff *skb) | |||
| 1883 | return 0; | 1881 | return 0; |
| 1884 | } | 1882 | } |
| 1885 | if (master->priv_flags & IFF_MASTER_8023AD && | 1883 | if (master->priv_flags & IFF_MASTER_8023AD && |
| 1886 | skb->protocol == __constant_htons(ETH_P_SLOW)) | 1884 | skb->protocol == __cpu_to_be16(ETH_P_SLOW)) |
| 1887 | return 0; | 1885 | return 0; |
| 1888 | 1886 | ||
| 1889 | return 1; | 1887 | return 1; |
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index 5a8af875bce2..af9d2fb97212 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
| @@ -7,16 +7,21 @@ header-y += xt_CLASSIFY.h | |||
| 7 | header-y += xt_CONNMARK.h | 7 | header-y += xt_CONNMARK.h |
| 8 | header-y += xt_CONNSECMARK.h | 8 | header-y += xt_CONNSECMARK.h |
| 9 | header-y += xt_DSCP.h | 9 | header-y += xt_DSCP.h |
| 10 | header-y += xt_LED.h | ||
| 10 | header-y += xt_MARK.h | 11 | header-y += xt_MARK.h |
| 11 | header-y += xt_NFLOG.h | 12 | header-y += xt_NFLOG.h |
| 12 | header-y += xt_NFQUEUE.h | 13 | header-y += xt_NFQUEUE.h |
| 13 | header-y += xt_RATEEST.h | 14 | header-y += xt_RATEEST.h |
| 14 | header-y += xt_SECMARK.h | 15 | header-y += xt_SECMARK.h |
| 15 | header-y += xt_TCPMSS.h | 16 | header-y += xt_TCPMSS.h |
| 17 | header-y += xt_TCPOPTSTRIP.h | ||
| 18 | header-y += xt_TPROXY.h | ||
| 16 | header-y += xt_comment.h | 19 | header-y += xt_comment.h |
| 17 | header-y += xt_connbytes.h | 20 | header-y += xt_connbytes.h |
| 21 | header-y += xt_connlimit.h | ||
| 18 | header-y += xt_connmark.h | 22 | header-y += xt_connmark.h |
| 19 | header-y += xt_conntrack.h | 23 | header-y += xt_conntrack.h |
| 24 | header-y += xt_cluster.h | ||
| 20 | header-y += xt_dccp.h | 25 | header-y += xt_dccp.h |
| 21 | header-y += xt_dscp.h | 26 | header-y += xt_dscp.h |
| 22 | header-y += xt_esp.h | 27 | header-y += xt_esp.h |
| @@ -30,6 +35,7 @@ header-y += xt_mark.h | |||
| 30 | header-y += xt_multiport.h | 35 | header-y += xt_multiport.h |
| 31 | header-y += xt_owner.h | 36 | header-y += xt_owner.h |
| 32 | header-y += xt_pkttype.h | 37 | header-y += xt_pkttype.h |
| 38 | header-y += xt_quota.h | ||
| 33 | header-y += xt_rateest.h | 39 | header-y += xt_rateest.h |
| 34 | header-y += xt_realm.h | 40 | header-y += xt_realm.h |
| 35 | header-y += xt_recent.h | 41 | header-y += xt_recent.h |
| @@ -39,6 +45,8 @@ header-y += xt_statistic.h | |||
| 39 | header-y += xt_string.h | 45 | header-y += xt_string.h |
| 40 | header-y += xt_tcpmss.h | 46 | header-y += xt_tcpmss.h |
| 41 | header-y += xt_tcpudp.h | 47 | header-y += xt_tcpudp.h |
| 48 | header-y += xt_time.h | ||
| 49 | header-y += xt_u32.h | ||
| 42 | 50 | ||
| 43 | unifdef-y += nf_conntrack_common.h | 51 | unifdef-y += nf_conntrack_common.h |
| 44 | unifdef-y += nf_conntrack_ftp.h | 52 | unifdef-y += nf_conntrack_ftp.h |
diff --git a/include/linux/netfilter/nf_conntrack_tcp.h b/include/linux/netfilter/nf_conntrack_tcp.h index a049df4f2236..3066789b972a 100644 --- a/include/linux/netfilter/nf_conntrack_tcp.h +++ b/include/linux/netfilter/nf_conntrack_tcp.h | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | #define _NF_CONNTRACK_TCP_H | 2 | #define _NF_CONNTRACK_TCP_H |
| 3 | /* TCP tracking. */ | 3 | /* TCP tracking. */ |
| 4 | 4 | ||
| 5 | #include <linux/types.h> | ||
| 6 | |||
| 5 | /* This is exposed to userspace (ctnetlink) */ | 7 | /* This is exposed to userspace (ctnetlink) */ |
| 6 | enum tcp_conntrack { | 8 | enum tcp_conntrack { |
| 7 | TCP_CONNTRACK_NONE, | 9 | TCP_CONNTRACK_NONE, |
| @@ -34,8 +36,8 @@ enum tcp_conntrack { | |||
| 34 | #define IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED 0x10 | 36 | #define IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED 0x10 |
| 35 | 37 | ||
| 36 | struct nf_ct_tcp_flags { | 38 | struct nf_ct_tcp_flags { |
| 37 | u_int8_t flags; | 39 | __u8 flags; |
| 38 | u_int8_t mask; | 40 | __u8 mask; |
| 39 | }; | 41 | }; |
| 40 | 42 | ||
| 41 | #ifdef __KERNEL__ | 43 | #ifdef __KERNEL__ |
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index 7d8e0455ccac..c600083cbdf5 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
| @@ -25,8 +25,8 @@ enum nfnetlink_groups { | |||
| 25 | /* General form of address family dependent message. | 25 | /* General form of address family dependent message. |
| 26 | */ | 26 | */ |
| 27 | struct nfgenmsg { | 27 | struct nfgenmsg { |
| 28 | u_int8_t nfgen_family; /* AF_xxx */ | 28 | __u8 nfgen_family; /* AF_xxx */ |
| 29 | u_int8_t version; /* nfnetlink version */ | 29 | __u8 version; /* nfnetlink version */ |
| 30 | __be16 res_id; /* resource id */ | 30 | __be16 res_id; /* resource id */ |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| @@ -76,6 +76,7 @@ extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n); | |||
| 76 | extern int nfnetlink_has_listeners(unsigned int group); | 76 | extern int nfnetlink_has_listeners(unsigned int group); |
| 77 | extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, | 77 | extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, |
| 78 | int echo); | 78 | int echo); |
| 79 | extern void nfnetlink_set_err(u32 pid, u32 group, int error); | ||
| 79 | extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags); | 80 | extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags); |
| 80 | 81 | ||
| 81 | extern void nfnl_lock(void); | 82 | extern void nfnl_lock(void); |
diff --git a/include/linux/netfilter/nfnetlink_compat.h b/include/linux/netfilter/nfnetlink_compat.h index e1451760c9cd..eda55cabceec 100644 --- a/include/linux/netfilter/nfnetlink_compat.h +++ b/include/linux/netfilter/nfnetlink_compat.h | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | #ifndef _NFNETLINK_COMPAT_H | 1 | #ifndef _NFNETLINK_COMPAT_H |
| 2 | #define _NFNETLINK_COMPAT_H | 2 | #define _NFNETLINK_COMPAT_H |
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 3 | #ifndef __KERNEL__ | 6 | #ifndef __KERNEL__ |
| 4 | /* Old nfnetlink macros for userspace */ | 7 | /* Old nfnetlink macros for userspace */ |
| 5 | 8 | ||
| @@ -20,8 +23,8 @@ | |||
| 20 | 23 | ||
| 21 | struct nfattr | 24 | struct nfattr |
| 22 | { | 25 | { |
| 23 | u_int16_t nfa_len; | 26 | __u16 nfa_len; |
| 24 | u_int16_t nfa_type; /* we use 15 bits for the type, and the highest | 27 | __u16 nfa_type; /* we use 15 bits for the type, and the highest |
| 25 | * bit to indicate whether the payload is nested */ | 28 | * bit to indicate whether the payload is nested */ |
| 26 | }; | 29 | }; |
| 27 | 30 | ||
diff --git a/include/linux/netfilter/nfnetlink_log.h b/include/linux/netfilter/nfnetlink_log.h index f661731f3cb1..d3bab7a2c9b7 100644 --- a/include/linux/netfilter/nfnetlink_log.h +++ b/include/linux/netfilter/nfnetlink_log.h | |||
| @@ -17,14 +17,14 @@ enum nfulnl_msg_types { | |||
| 17 | 17 | ||
| 18 | struct nfulnl_msg_packet_hdr { | 18 | struct nfulnl_msg_packet_hdr { |
| 19 | __be16 hw_protocol; /* hw protocol (network order) */ | 19 | __be16 hw_protocol; /* hw protocol (network order) */ |
| 20 | u_int8_t hook; /* netfilter hook */ | 20 | __u8 hook; /* netfilter hook */ |
| 21 | u_int8_t _pad; | 21 | __u8 _pad; |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | struct nfulnl_msg_packet_hw { | 24 | struct nfulnl_msg_packet_hw { |
| 25 | __be16 hw_addrlen; | 25 | __be16 hw_addrlen; |
| 26 | u_int16_t _pad; | 26 | __u16 _pad; |
| 27 | u_int8_t hw_addr[8]; | 27 | __u8 hw_addr[8]; |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | struct nfulnl_msg_packet_timestamp { | 30 | struct nfulnl_msg_packet_timestamp { |
| @@ -35,12 +35,12 @@ struct nfulnl_msg_packet_timestamp { | |||
| 35 | enum nfulnl_attr_type { | 35 | enum nfulnl_attr_type { |
| 36 | NFULA_UNSPEC, | 36 | NFULA_UNSPEC, |
| 37 | NFULA_PACKET_HDR, | 37 | NFULA_PACKET_HDR, |
| 38 | NFULA_MARK, /* u_int32_t nfmark */ | 38 | NFULA_MARK, /* __u32 nfmark */ |
| 39 | NFULA_TIMESTAMP, /* nfulnl_msg_packet_timestamp */ | 39 | NFULA_TIMESTAMP, /* nfulnl_msg_packet_timestamp */ |
| 40 | NFULA_IFINDEX_INDEV, /* u_int32_t ifindex */ | 40 | NFULA_IFINDEX_INDEV, /* __u32 ifindex */ |
| 41 | NFULA_IFINDEX_OUTDEV, /* u_int32_t ifindex */ | 41 | NFULA_IFINDEX_OUTDEV, /* __u32 ifindex */ |
| 42 | NFULA_IFINDEX_PHYSINDEV, /* u_int32_t ifindex */ | 42 | NFULA_IFINDEX_PHYSINDEV, /* __u32 ifindex */ |
| 43 | NFULA_IFINDEX_PHYSOUTDEV, /* u_int32_t ifindex */ | 43 | NFULA_IFINDEX_PHYSOUTDEV, /* __u32 ifindex */ |
| 44 | NFULA_HWADDR, /* nfulnl_msg_packet_hw */ | 44 | NFULA_HWADDR, /* nfulnl_msg_packet_hw */ |
| 45 | NFULA_PAYLOAD, /* opaque data payload */ | 45 | NFULA_PAYLOAD, /* opaque data payload */ |
| 46 | NFULA_PREFIX, /* string prefix */ | 46 | NFULA_PREFIX, /* string prefix */ |
| @@ -65,23 +65,23 @@ enum nfulnl_msg_config_cmds { | |||
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | struct nfulnl_msg_config_cmd { | 67 | struct nfulnl_msg_config_cmd { |
| 68 | u_int8_t command; /* nfulnl_msg_config_cmds */ | 68 | __u8 command; /* nfulnl_msg_config_cmds */ |
| 69 | } __attribute__ ((packed)); | 69 | } __attribute__ ((packed)); |
| 70 | 70 | ||
| 71 | struct nfulnl_msg_config_mode { | 71 | struct nfulnl_msg_config_mode { |
| 72 | __be32 copy_range; | 72 | __be32 copy_range; |
| 73 | u_int8_t copy_mode; | 73 | __u8 copy_mode; |
| 74 | u_int8_t _pad; | 74 | __u8 _pad; |
| 75 | } __attribute__ ((packed)); | 75 | } __attribute__ ((packed)); |
| 76 | 76 | ||
| 77 | enum nfulnl_attr_config { | 77 | enum nfulnl_attr_config { |
| 78 | NFULA_CFG_UNSPEC, | 78 | NFULA_CFG_UNSPEC, |
| 79 | NFULA_CFG_CMD, /* nfulnl_msg_config_cmd */ | 79 | NFULA_CFG_CMD, /* nfulnl_msg_config_cmd */ |
| 80 | NFULA_CFG_MODE, /* nfulnl_msg_config_mode */ | 80 | NFULA_CFG_MODE, /* nfulnl_msg_config_mode */ |
| 81 | NFULA_CFG_NLBUFSIZ, /* u_int32_t buffer size */ | 81 | NFULA_CFG_NLBUFSIZ, /* __u32 buffer size */ |
| 82 | NFULA_CFG_TIMEOUT, /* u_int32_t in 1/100 s */ | 82 | NFULA_CFG_TIMEOUT, /* __u32 in 1/100 s */ |
| 83 | NFULA_CFG_QTHRESH, /* u_int32_t */ | 83 | NFULA_CFG_QTHRESH, /* __u32 */ |
| 84 | NFULA_CFG_FLAGS, /* u_int16_t */ | 84 | NFULA_CFG_FLAGS, /* __u16 */ |
| 85 | __NFULA_CFG_MAX | 85 | __NFULA_CFG_MAX |
| 86 | }; | 86 | }; |
| 87 | #define NFULA_CFG_MAX (__NFULA_CFG_MAX -1) | 87 | #define NFULA_CFG_MAX (__NFULA_CFG_MAX -1) |
diff --git a/include/linux/netfilter/nfnetlink_queue.h b/include/linux/netfilter/nfnetlink_queue.h index 83e789633e35..2455fe5f4e01 100644 --- a/include/linux/netfilter/nfnetlink_queue.h +++ b/include/linux/netfilter/nfnetlink_queue.h | |||
| @@ -15,13 +15,13 @@ enum nfqnl_msg_types { | |||
| 15 | struct nfqnl_msg_packet_hdr { | 15 | struct nfqnl_msg_packet_hdr { |
| 16 | __be32 packet_id; /* unique ID of packet in queue */ | 16 | __be32 packet_id; /* unique ID of packet in queue */ |
| 17 | __be16 hw_protocol; /* hw protocol (network order) */ | 17 | __be16 hw_protocol; /* hw protocol (network order) */ |
| 18 | u_int8_t hook; /* netfilter hook */ | 18 | __u8 hook; /* netfilter hook */ |
| 19 | } __attribute__ ((packed)); | 19 | } __attribute__ ((packed)); |
| 20 | 20 | ||
| 21 | struct nfqnl_msg_packet_hw { | 21 | struct nfqnl_msg_packet_hw { |
| 22 | __be16 hw_addrlen; | 22 | __be16 hw_addrlen; |
| 23 | u_int16_t _pad; | 23 | __u16 _pad; |
| 24 | u_int8_t hw_addr[8]; | 24 | __u8 hw_addr[8]; |
| 25 | }; | 25 | }; |
| 26 | 26 | ||
| 27 | struct nfqnl_msg_packet_timestamp { | 27 | struct nfqnl_msg_packet_timestamp { |
| @@ -33,12 +33,12 @@ enum nfqnl_attr_type { | |||
| 33 | NFQA_UNSPEC, | 33 | NFQA_UNSPEC, |
| 34 | NFQA_PACKET_HDR, | 34 | NFQA_PACKET_HDR, |
| 35 | NFQA_VERDICT_HDR, /* nfqnl_msg_verdict_hrd */ | 35 | NFQA_VERDICT_HDR, /* nfqnl_msg_verdict_hrd */ |
| 36 | NFQA_MARK, /* u_int32_t nfmark */ | 36 | NFQA_MARK, /* __u32 nfmark */ |
| 37 | NFQA_TIMESTAMP, /* nfqnl_msg_packet_timestamp */ | 37 | NFQA_TIMESTAMP, /* nfqnl_msg_packet_timestamp */ |
| 38 | NFQA_IFINDEX_INDEV, /* u_int32_t ifindex */ | 38 | NFQA_IFINDEX_INDEV, /* __u32 ifindex */ |
| 39 | NFQA_IFINDEX_OUTDEV, /* u_int32_t ifindex */ | 39 | NFQA_IFINDEX_OUTDEV, /* __u32 ifindex */ |
| 40 | NFQA_IFINDEX_PHYSINDEV, /* u_int32_t ifindex */ | 40 | NFQA_IFINDEX_PHYSINDEV, /* __u32 ifindex */ |
| 41 | NFQA_IFINDEX_PHYSOUTDEV, /* u_int32_t ifindex */ | 41 | NFQA_IFINDEX_PHYSOUTDEV, /* __u32 ifindex */ |
| 42 | NFQA_HWADDR, /* nfqnl_msg_packet_hw */ | 42 | NFQA_HWADDR, /* nfqnl_msg_packet_hw */ |
| 43 | NFQA_PAYLOAD, /* opaque data payload */ | 43 | NFQA_PAYLOAD, /* opaque data payload */ |
| 44 | 44 | ||
| @@ -61,8 +61,8 @@ enum nfqnl_msg_config_cmds { | |||
| 61 | }; | 61 | }; |
| 62 | 62 | ||
| 63 | struct nfqnl_msg_config_cmd { | 63 | struct nfqnl_msg_config_cmd { |
| 64 | u_int8_t command; /* nfqnl_msg_config_cmds */ | 64 | __u8 command; /* nfqnl_msg_config_cmds */ |
| 65 | u_int8_t _pad; | 65 | __u8 _pad; |
| 66 | __be16 pf; /* AF_xxx for PF_[UN]BIND */ | 66 | __be16 pf; /* AF_xxx for PF_[UN]BIND */ |
| 67 | }; | 67 | }; |
| 68 | 68 | ||
| @@ -74,7 +74,7 @@ enum nfqnl_config_mode { | |||
| 74 | 74 | ||
| 75 | struct nfqnl_msg_config_params { | 75 | struct nfqnl_msg_config_params { |
| 76 | __be32 copy_range; | 76 | __be32 copy_range; |
| 77 | u_int8_t copy_mode; /* enum nfqnl_config_mode */ | 77 | __u8 copy_mode; /* enum nfqnl_config_mode */ |
| 78 | } __attribute__ ((packed)); | 78 | } __attribute__ ((packed)); |
| 79 | 79 | ||
| 80 | 80 | ||
| @@ -82,7 +82,7 @@ enum nfqnl_attr_config { | |||
| 82 | NFQA_CFG_UNSPEC, | 82 | NFQA_CFG_UNSPEC, |
| 83 | NFQA_CFG_CMD, /* nfqnl_msg_config_cmd */ | 83 | NFQA_CFG_CMD, /* nfqnl_msg_config_cmd */ |
| 84 | NFQA_CFG_PARAMS, /* nfqnl_msg_config_params */ | 84 | NFQA_CFG_PARAMS, /* nfqnl_msg_config_params */ |
| 85 | NFQA_CFG_QUEUE_MAXLEN, /* u_int32_t */ | 85 | NFQA_CFG_QUEUE_MAXLEN, /* __u32 */ |
| 86 | __NFQA_CFG_MAX | 86 | __NFQA_CFG_MAX |
| 87 | }; | 87 | }; |
| 88 | #define NFQA_CFG_MAX (__NFQA_CFG_MAX-1) | 88 | #define NFQA_CFG_MAX (__NFQA_CFG_MAX-1) |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index c7ee8744d26b..adbc50a20ec2 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _X_TABLES_H | 1 | #ifndef _X_TABLES_H |
| 2 | #define _X_TABLES_H | 2 | #define _X_TABLES_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | #define XT_FUNCTION_MAXNAMELEN 30 | 6 | #define XT_FUNCTION_MAXNAMELEN 30 |
| 5 | #define XT_TABLE_MAXNAMELEN 32 | 7 | #define XT_TABLE_MAXNAMELEN 32 |
| 6 | 8 | ||
| @@ -8,22 +10,22 @@ struct xt_entry_match | |||
| 8 | { | 10 | { |
| 9 | union { | 11 | union { |
| 10 | struct { | 12 | struct { |
| 11 | u_int16_t match_size; | 13 | __u16 match_size; |
| 12 | 14 | ||
| 13 | /* Used by userspace */ | 15 | /* Used by userspace */ |
| 14 | char name[XT_FUNCTION_MAXNAMELEN-1]; | 16 | char name[XT_FUNCTION_MAXNAMELEN-1]; |
| 15 | 17 | ||
| 16 | u_int8_t revision; | 18 | __u8 revision; |
| 17 | } user; | 19 | } user; |
| 18 | struct { | 20 | struct { |
| 19 | u_int16_t match_size; | 21 | __u16 match_size; |
| 20 | 22 | ||
| 21 | /* Used inside the kernel */ | 23 | /* Used inside the kernel */ |
| 22 | struct xt_match *match; | 24 | struct xt_match *match; |
| 23 | } kernel; | 25 | } kernel; |
| 24 | 26 | ||
| 25 | /* Total length */ | 27 | /* Total length */ |
| 26 | u_int16_t match_size; | 28 | __u16 match_size; |
| 27 | } u; | 29 | } u; |
| 28 | 30 | ||
| 29 | unsigned char data[0]; | 31 | unsigned char data[0]; |
| @@ -33,22 +35,22 @@ struct xt_entry_target | |||
| 33 | { | 35 | { |
| 34 | union { | 36 | union { |
| 35 | struct { | 37 | struct { |
| 36 | u_int16_t target_size; | 38 | __u16 target_size; |
| 37 | 39 | ||
| 38 | /* Used by userspace */ | 40 | /* Used by userspace */ |
| 39 | char name[XT_FUNCTION_MAXNAMELEN-1]; | 41 | char name[XT_FUNCTION_MAXNAMELEN-1]; |
| 40 | 42 | ||
| 41 | u_int8_t revision; | 43 | __u8 revision; |
| 42 | } user; | 44 | } user; |
| 43 | struct { | 45 | struct { |
| 44 | u_int16_t target_size; | 46 | __u16 target_size; |
| 45 | 47 | ||
| 46 | /* Used inside the kernel */ | 48 | /* Used inside the kernel */ |
| 47 | struct xt_target *target; | 49 | struct xt_target *target; |
| 48 | } kernel; | 50 | } kernel; |
| 49 | 51 | ||
| 50 | /* Total length */ | 52 | /* Total length */ |
| 51 | u_int16_t target_size; | 53 | __u16 target_size; |
| 52 | } u; | 54 | } u; |
| 53 | 55 | ||
| 54 | unsigned char data[0]; | 56 | unsigned char data[0]; |
| @@ -74,7 +76,7 @@ struct xt_get_revision | |||
| 74 | { | 76 | { |
| 75 | char name[XT_FUNCTION_MAXNAMELEN-1]; | 77 | char name[XT_FUNCTION_MAXNAMELEN-1]; |
| 76 | 78 | ||
| 77 | u_int8_t revision; | 79 | __u8 revision; |
| 78 | }; | 80 | }; |
| 79 | 81 | ||
| 80 | /* CONTINUE verdict for targets */ | 82 | /* CONTINUE verdict for targets */ |
| @@ -90,10 +92,10 @@ struct xt_get_revision | |||
| 90 | */ | 92 | */ |
| 91 | struct _xt_align | 93 | struct _xt_align |
| 92 | { | 94 | { |
| 93 | u_int8_t u8; | 95 | __u8 u8; |
| 94 | u_int16_t u16; | 96 | __u16 u16; |
| 95 | u_int32_t u32; | 97 | __u32 u32; |
| 96 | u_int64_t u64; | 98 | __u64 u64; |
| 97 | }; | 99 | }; |
| 98 | 100 | ||
| 99 | #define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \ | 101 | #define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \ |
| @@ -109,7 +111,7 @@ struct _xt_align | |||
| 109 | 111 | ||
| 110 | struct xt_counters | 112 | struct xt_counters |
| 111 | { | 113 | { |
| 112 | u_int64_t pcnt, bcnt; /* Packet and byte counters */ | 114 | __u64 pcnt, bcnt; /* Packet and byte counters */ |
| 113 | }; | 115 | }; |
| 114 | 116 | ||
| 115 | /* The argument to IPT_SO_ADD_COUNTERS. */ | 117 | /* The argument to IPT_SO_ADD_COUNTERS. */ |
| @@ -349,23 +351,22 @@ struct xt_table | |||
| 349 | { | 351 | { |
| 350 | struct list_head list; | 352 | struct list_head list; |
| 351 | 353 | ||
| 352 | /* A unique name... */ | ||
| 353 | const char name[XT_TABLE_MAXNAMELEN]; | ||
| 354 | |||
| 355 | /* What hooks you will enter on */ | 354 | /* What hooks you will enter on */ |
| 356 | unsigned int valid_hooks; | 355 | unsigned int valid_hooks; |
| 357 | 356 | ||
| 358 | /* Lock for the curtain */ | 357 | /* Lock for the curtain */ |
| 359 | rwlock_t lock; | 358 | struct mutex lock; |
| 360 | 359 | ||
| 361 | /* Man behind the curtain... */ | 360 | /* Man behind the curtain... */ |
| 362 | //struct ip6t_table_info *private; | 361 | struct xt_table_info *private; |
| 363 | void *private; | ||
| 364 | 362 | ||
| 365 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ | 363 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ |
| 366 | struct module *me; | 364 | struct module *me; |
| 367 | 365 | ||
| 368 | u_int8_t af; /* address/protocol family */ | 366 | u_int8_t af; /* address/protocol family */ |
| 367 | |||
| 368 | /* A unique name... */ | ||
| 369 | const char name[XT_TABLE_MAXNAMELEN]; | ||
| 369 | }; | 370 | }; |
| 370 | 371 | ||
| 371 | #include <linux/netfilter_ipv4.h> | 372 | #include <linux/netfilter_ipv4.h> |
| @@ -386,7 +387,7 @@ struct xt_table_info | |||
| 386 | 387 | ||
| 387 | /* ipt_entry tables: one per CPU */ | 388 | /* ipt_entry tables: one per CPU */ |
| 388 | /* Note : this field MUST be the last one, see XT_TABLE_INFO_SZ */ | 389 | /* Note : this field MUST be the last one, see XT_TABLE_INFO_SZ */ |
| 389 | char *entries[1]; | 390 | void *entries[1]; |
| 390 | }; | 391 | }; |
| 391 | 392 | ||
| 392 | #define XT_TABLE_INFO_SZ (offsetof(struct xt_table_info, entries) \ | 393 | #define XT_TABLE_INFO_SZ (offsetof(struct xt_table_info, entries) \ |
| @@ -433,6 +434,8 @@ extern void xt_proto_fini(struct net *net, u_int8_t af); | |||
| 433 | 434 | ||
| 434 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); | 435 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); |
| 435 | extern void xt_free_table_info(struct xt_table_info *info); | 436 | extern void xt_free_table_info(struct xt_table_info *info); |
| 437 | extern void xt_table_entry_swap_rcu(struct xt_table_info *old, | ||
| 438 | struct xt_table_info *new); | ||
| 436 | 439 | ||
| 437 | #ifdef CONFIG_COMPAT | 440 | #ifdef CONFIG_COMPAT |
| 438 | #include <net/compat.h> | 441 | #include <net/compat.h> |
diff --git a/include/linux/netfilter/xt_CLASSIFY.h b/include/linux/netfilter/xt_CLASSIFY.h index 58111355255d..a813bf14dd63 100644 --- a/include/linux/netfilter/xt_CLASSIFY.h +++ b/include/linux/netfilter/xt_CLASSIFY.h | |||
| @@ -1,8 +1,10 @@ | |||
| 1 | #ifndef _XT_CLASSIFY_H | 1 | #ifndef _XT_CLASSIFY_H |
| 2 | #define _XT_CLASSIFY_H | 2 | #define _XT_CLASSIFY_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | struct xt_classify_target_info { | 6 | struct xt_classify_target_info { |
| 5 | u_int32_t priority; | 7 | __u32 priority; |
| 6 | }; | 8 | }; |
| 7 | 9 | ||
| 8 | #endif /*_XT_CLASSIFY_H */ | 10 | #endif /*_XT_CLASSIFY_H */ |
diff --git a/include/linux/netfilter/xt_CONNMARK.h b/include/linux/netfilter/xt_CONNMARK.h index 4e58ba43c289..7635c8ffdadb 100644 --- a/include/linux/netfilter/xt_CONNMARK.h +++ b/include/linux/netfilter/xt_CONNMARK.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_CONNMARK_H_target | 1 | #ifndef _XT_CONNMARK_H_target |
| 2 | #define _XT_CONNMARK_H_target | 2 | #define _XT_CONNMARK_H_target |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | /* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com> | 6 | /* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com> |
| 5 | * by Henrik Nordstrom <hno@marasystems.com> | 7 | * by Henrik Nordstrom <hno@marasystems.com> |
| 6 | * | 8 | * |
| @@ -19,12 +21,12 @@ enum { | |||
| 19 | struct xt_connmark_target_info { | 21 | struct xt_connmark_target_info { |
| 20 | unsigned long mark; | 22 | unsigned long mark; |
| 21 | unsigned long mask; | 23 | unsigned long mask; |
| 22 | u_int8_t mode; | 24 | __u8 mode; |
| 23 | }; | 25 | }; |
| 24 | 26 | ||
| 25 | struct xt_connmark_tginfo1 { | 27 | struct xt_connmark_tginfo1 { |
| 26 | u_int32_t ctmark, ctmask, nfmask; | 28 | __u32 ctmark, ctmask, nfmask; |
| 27 | u_int8_t mode; | 29 | __u8 mode; |
| 28 | }; | 30 | }; |
| 29 | 31 | ||
| 30 | #endif /*_XT_CONNMARK_H_target*/ | 32 | #endif /*_XT_CONNMARK_H_target*/ |
diff --git a/include/linux/netfilter/xt_CONNSECMARK.h b/include/linux/netfilter/xt_CONNSECMARK.h index c6bd75469ba2..b973ff80fa1e 100644 --- a/include/linux/netfilter/xt_CONNSECMARK.h +++ b/include/linux/netfilter/xt_CONNSECMARK.h | |||
| @@ -1,13 +1,15 @@ | |||
| 1 | #ifndef _XT_CONNSECMARK_H_target | 1 | #ifndef _XT_CONNSECMARK_H_target |
| 2 | #define _XT_CONNSECMARK_H_target | 2 | #define _XT_CONNSECMARK_H_target |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | enum { | 6 | enum { |
| 5 | CONNSECMARK_SAVE = 1, | 7 | CONNSECMARK_SAVE = 1, |
| 6 | CONNSECMARK_RESTORE, | 8 | CONNSECMARK_RESTORE, |
| 7 | }; | 9 | }; |
| 8 | 10 | ||
| 9 | struct xt_connsecmark_target_info { | 11 | struct xt_connsecmark_target_info { |
| 10 | u_int8_t mode; | 12 | __u8 mode; |
| 11 | }; | 13 | }; |
| 12 | 14 | ||
| 13 | #endif /*_XT_CONNSECMARK_H_target */ | 15 | #endif /*_XT_CONNSECMARK_H_target */ |
diff --git a/include/linux/netfilter/xt_DSCP.h b/include/linux/netfilter/xt_DSCP.h index 14da1968e2c6..648e0b3bed29 100644 --- a/include/linux/netfilter/xt_DSCP.h +++ b/include/linux/netfilter/xt_DSCP.h | |||
| @@ -11,15 +11,16 @@ | |||
| 11 | #ifndef _XT_DSCP_TARGET_H | 11 | #ifndef _XT_DSCP_TARGET_H |
| 12 | #define _XT_DSCP_TARGET_H | 12 | #define _XT_DSCP_TARGET_H |
| 13 | #include <linux/netfilter/xt_dscp.h> | 13 | #include <linux/netfilter/xt_dscp.h> |
| 14 | #include <linux/types.h> | ||
| 14 | 15 | ||
| 15 | /* target info */ | 16 | /* target info */ |
| 16 | struct xt_DSCP_info { | 17 | struct xt_DSCP_info { |
| 17 | u_int8_t dscp; | 18 | __u8 dscp; |
| 18 | }; | 19 | }; |
| 19 | 20 | ||
| 20 | struct xt_tos_target_info { | 21 | struct xt_tos_target_info { |
| 21 | u_int8_t tos_value; | 22 | __u8 tos_value; |
| 22 | u_int8_t tos_mask; | 23 | __u8 tos_mask; |
| 23 | }; | 24 | }; |
| 24 | 25 | ||
| 25 | #endif /* _XT_DSCP_TARGET_H */ | 26 | #endif /* _XT_DSCP_TARGET_H */ |
diff --git a/include/linux/netfilter/xt_LED.h b/include/linux/netfilter/xt_LED.h new file mode 100644 index 000000000000..4c91a0d770d0 --- /dev/null +++ b/include/linux/netfilter/xt_LED.h | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #ifndef _XT_LED_H | ||
| 2 | #define _XT_LED_H | ||
| 3 | |||
| 4 | struct xt_led_info { | ||
| 5 | char id[27]; /* Unique ID for this trigger in the LED class */ | ||
| 6 | __u8 always_blink; /* Blink even if the LED is already on */ | ||
| 7 | __u32 delay; /* Delay until LED is switched off after trigger */ | ||
| 8 | |||
| 9 | /* Kernel data used in the module */ | ||
| 10 | void *internal_data __attribute__((aligned(8))); | ||
| 11 | }; | ||
| 12 | |||
| 13 | #endif /* _XT_LED_H */ | ||
diff --git a/include/linux/netfilter/xt_MARK.h b/include/linux/netfilter/xt_MARK.h index 778b278fd9f2..028304bcc0b1 100644 --- a/include/linux/netfilter/xt_MARK.h +++ b/include/linux/netfilter/xt_MARK.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_MARK_H_target | 1 | #ifndef _XT_MARK_H_target |
| 2 | #define _XT_MARK_H_target | 2 | #define _XT_MARK_H_target |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | /* Version 0 */ | 6 | /* Version 0 */ |
| 5 | struct xt_mark_target_info { | 7 | struct xt_mark_target_info { |
| 6 | unsigned long mark; | 8 | unsigned long mark; |
| @@ -15,11 +17,11 @@ enum { | |||
| 15 | 17 | ||
| 16 | struct xt_mark_target_info_v1 { | 18 | struct xt_mark_target_info_v1 { |
| 17 | unsigned long mark; | 19 | unsigned long mark; |
| 18 | u_int8_t mode; | 20 | __u8 mode; |
| 19 | }; | 21 | }; |
| 20 | 22 | ||
| 21 | struct xt_mark_tginfo2 { | 23 | struct xt_mark_tginfo2 { |
| 22 | u_int32_t mark, mask; | 24 | __u32 mark, mask; |
| 23 | }; | 25 | }; |
| 24 | 26 | ||
| 25 | #endif /*_XT_MARK_H_target */ | 27 | #endif /*_XT_MARK_H_target */ |
diff --git a/include/linux/netfilter/xt_NFLOG.h b/include/linux/netfilter/xt_NFLOG.h index cdcd0ed58f7a..87b58311ce6b 100644 --- a/include/linux/netfilter/xt_NFLOG.h +++ b/include/linux/netfilter/xt_NFLOG.h | |||
| @@ -1,17 +1,19 @@ | |||
| 1 | #ifndef _XT_NFLOG_TARGET | 1 | #ifndef _XT_NFLOG_TARGET |
| 2 | #define _XT_NFLOG_TARGET | 2 | #define _XT_NFLOG_TARGET |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | #define XT_NFLOG_DEFAULT_GROUP 0x1 | 6 | #define XT_NFLOG_DEFAULT_GROUP 0x1 |
| 5 | #define XT_NFLOG_DEFAULT_THRESHOLD 1 | 7 | #define XT_NFLOG_DEFAULT_THRESHOLD 0 |
| 6 | 8 | ||
| 7 | #define XT_NFLOG_MASK 0x0 | 9 | #define XT_NFLOG_MASK 0x0 |
| 8 | 10 | ||
| 9 | struct xt_nflog_info { | 11 | struct xt_nflog_info { |
| 10 | u_int32_t len; | 12 | __u32 len; |
| 11 | u_int16_t group; | 13 | __u16 group; |
| 12 | u_int16_t threshold; | 14 | __u16 threshold; |
| 13 | u_int16_t flags; | 15 | __u16 flags; |
| 14 | u_int16_t pad; | 16 | __u16 pad; |
| 15 | char prefix[64]; | 17 | char prefix[64]; |
| 16 | }; | 18 | }; |
| 17 | 19 | ||
diff --git a/include/linux/netfilter/xt_NFQUEUE.h b/include/linux/netfilter/xt_NFQUEUE.h index 9a9af79f74d2..982a89f78272 100644 --- a/include/linux/netfilter/xt_NFQUEUE.h +++ b/include/linux/netfilter/xt_NFQUEUE.h | |||
| @@ -8,9 +8,11 @@ | |||
| 8 | #ifndef _XT_NFQ_TARGET_H | 8 | #ifndef _XT_NFQ_TARGET_H |
| 9 | #define _XT_NFQ_TARGET_H | 9 | #define _XT_NFQ_TARGET_H |
| 10 | 10 | ||
| 11 | #include <linux/types.h> | ||
| 12 | |||
| 11 | /* target info */ | 13 | /* target info */ |
| 12 | struct xt_NFQ_info { | 14 | struct xt_NFQ_info { |
| 13 | u_int16_t queuenum; | 15 | __u16 queuenum; |
| 14 | }; | 16 | }; |
| 15 | 17 | ||
| 16 | #endif /* _XT_NFQ_TARGET_H */ | 18 | #endif /* _XT_NFQ_TARGET_H */ |
diff --git a/include/linux/netfilter/xt_RATEEST.h b/include/linux/netfilter/xt_RATEEST.h index f79e3133cbea..6605e20ad8cf 100644 --- a/include/linux/netfilter/xt_RATEEST.h +++ b/include/linux/netfilter/xt_RATEEST.h | |||
| @@ -1,10 +1,12 @@ | |||
| 1 | #ifndef _XT_RATEEST_TARGET_H | 1 | #ifndef _XT_RATEEST_TARGET_H |
| 2 | #define _XT_RATEEST_TARGET_H | 2 | #define _XT_RATEEST_TARGET_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | struct xt_rateest_target_info { | 6 | struct xt_rateest_target_info { |
| 5 | char name[IFNAMSIZ]; | 7 | char name[IFNAMSIZ]; |
| 6 | int8_t interval; | 8 | __s8 interval; |
| 7 | u_int8_t ewma_log; | 9 | __u8 ewma_log; |
| 8 | 10 | ||
| 9 | /* Used internally by the kernel */ | 11 | /* Used internally by the kernel */ |
| 10 | struct xt_rateest *est __attribute__((aligned(8))); | 12 | struct xt_rateest *est __attribute__((aligned(8))); |
diff --git a/include/linux/netfilter/xt_SECMARK.h b/include/linux/netfilter/xt_SECMARK.h index c53fbffa997d..6fcd3448b186 100644 --- a/include/linux/netfilter/xt_SECMARK.h +++ b/include/linux/netfilter/xt_SECMARK.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_SECMARK_H_target | 1 | #ifndef _XT_SECMARK_H_target |
| 2 | #define _XT_SECMARK_H_target | 2 | #define _XT_SECMARK_H_target |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | /* | 6 | /* |
| 5 | * This is intended for use by various security subsystems (but not | 7 | * This is intended for use by various security subsystems (but not |
| 6 | * at the same time). | 8 | * at the same time). |
| @@ -12,12 +14,12 @@ | |||
| 12 | #define SECMARK_SELCTX_MAX 256 | 14 | #define SECMARK_SELCTX_MAX 256 |
| 13 | 15 | ||
| 14 | struct xt_secmark_target_selinux_info { | 16 | struct xt_secmark_target_selinux_info { |
| 15 | u_int32_t selsid; | 17 | __u32 selsid; |
| 16 | char selctx[SECMARK_SELCTX_MAX]; | 18 | char selctx[SECMARK_SELCTX_MAX]; |
| 17 | }; | 19 | }; |
| 18 | 20 | ||
| 19 | struct xt_secmark_target_info { | 21 | struct xt_secmark_target_info { |
| 20 | u_int8_t mode; | 22 | __u8 mode; |
| 21 | union { | 23 | union { |
| 22 | struct xt_secmark_target_selinux_info sel; | 24 | struct xt_secmark_target_selinux_info sel; |
| 23 | } u; | 25 | } u; |
diff --git a/include/linux/netfilter/xt_TCPMSS.h b/include/linux/netfilter/xt_TCPMSS.h index 53a292cd47f3..9a6960afc134 100644 --- a/include/linux/netfilter/xt_TCPMSS.h +++ b/include/linux/netfilter/xt_TCPMSS.h | |||
| @@ -1,8 +1,10 @@ | |||
| 1 | #ifndef _XT_TCPMSS_H | 1 | #ifndef _XT_TCPMSS_H |
| 2 | #define _XT_TCPMSS_H | 2 | #define _XT_TCPMSS_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | struct xt_tcpmss_info { | 6 | struct xt_tcpmss_info { |
| 5 | u_int16_t mss; | 7 | __u16 mss; |
| 6 | }; | 8 | }; |
| 7 | 9 | ||
| 8 | #define XT_TCPMSS_CLAMP_PMTU 0xffff | 10 | #define XT_TCPMSS_CLAMP_PMTU 0xffff |
diff --git a/include/linux/netfilter/xt_cluster.h b/include/linux/netfilter/xt_cluster.h new file mode 100644 index 000000000000..5e0a0d07b526 --- /dev/null +++ b/include/linux/netfilter/xt_cluster.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #ifndef _XT_CLUSTER_MATCH_H | ||
| 2 | #define _XT_CLUSTER_MATCH_H | ||
| 3 | |||
| 4 | enum xt_cluster_flags { | ||
| 5 | XT_CLUSTER_F_INV = (1 << 0) | ||
| 6 | }; | ||
| 7 | |||
| 8 | struct xt_cluster_match_info { | ||
| 9 | u_int32_t total_nodes; | ||
| 10 | u_int32_t node_mask; | ||
| 11 | u_int32_t hash_seed; | ||
| 12 | u_int32_t flags; | ||
| 13 | }; | ||
| 14 | |||
| 15 | #endif /* _XT_CLUSTER_MATCH_H */ | ||
diff --git a/include/linux/netfilter/xt_connbytes.h b/include/linux/netfilter/xt_connbytes.h index c022c989754d..52bd6153b996 100644 --- a/include/linux/netfilter/xt_connbytes.h +++ b/include/linux/netfilter/xt_connbytes.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_CONNBYTES_H | 1 | #ifndef _XT_CONNBYTES_H |
| 2 | #define _XT_CONNBYTES_H | 2 | #define _XT_CONNBYTES_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | enum xt_connbytes_what { | 6 | enum xt_connbytes_what { |
| 5 | XT_CONNBYTES_PKTS, | 7 | XT_CONNBYTES_PKTS, |
| 6 | XT_CONNBYTES_BYTES, | 8 | XT_CONNBYTES_BYTES, |
| @@ -19,7 +21,7 @@ struct xt_connbytes_info | |||
| 19 | aligned_u64 from; /* count to be matched */ | 21 | aligned_u64 from; /* count to be matched */ |
| 20 | aligned_u64 to; /* count to be matched */ | 22 | aligned_u64 to; /* count to be matched */ |
| 21 | } count; | 23 | } count; |
| 22 | u_int8_t what; /* ipt_connbytes_what */ | 24 | __u8 what; /* ipt_connbytes_what */ |
| 23 | u_int8_t direction; /* ipt_connbytes_direction */ | 25 | __u8 direction; /* ipt_connbytes_direction */ |
| 24 | }; | 26 | }; |
| 25 | #endif | 27 | #endif |
diff --git a/include/linux/netfilter/xt_connmark.h b/include/linux/netfilter/xt_connmark.h index 359ef86918dc..571e266d004c 100644 --- a/include/linux/netfilter/xt_connmark.h +++ b/include/linux/netfilter/xt_connmark.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_CONNMARK_H | 1 | #ifndef _XT_CONNMARK_H |
| 2 | #define _XT_CONNMARK_H | 2 | #define _XT_CONNMARK_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | /* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com> | 6 | /* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com> |
| 5 | * by Henrik Nordstrom <hno@marasystems.com> | 7 | * by Henrik Nordstrom <hno@marasystems.com> |
| 6 | * | 8 | * |
| @@ -12,12 +14,12 @@ | |||
| 12 | 14 | ||
| 13 | struct xt_connmark_info { | 15 | struct xt_connmark_info { |
| 14 | unsigned long mark, mask; | 16 | unsigned long mark, mask; |
| 15 | u_int8_t invert; | 17 | __u8 invert; |
| 16 | }; | 18 | }; |
| 17 | 19 | ||
| 18 | struct xt_connmark_mtinfo1 { | 20 | struct xt_connmark_mtinfo1 { |
| 19 | u_int32_t mark, mask; | 21 | __u32 mark, mask; |
| 20 | u_int8_t invert; | 22 | __u8 invert; |
| 21 | }; | 23 | }; |
| 22 | 24 | ||
| 23 | #endif /*_XT_CONNMARK_H*/ | 25 | #endif /*_XT_CONNMARK_H*/ |
diff --git a/include/linux/netfilter/xt_conntrack.h b/include/linux/netfilter/xt_conntrack.h index f3fd83e46bab..3430c7751948 100644 --- a/include/linux/netfilter/xt_conntrack.h +++ b/include/linux/netfilter/xt_conntrack.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #ifndef _XT_CONNTRACK_H | 5 | #ifndef _XT_CONNTRACK_H |
| 6 | #define _XT_CONNTRACK_H | 6 | #define _XT_CONNTRACK_H |
| 7 | 7 | ||
| 8 | #include <linux/types.h> | ||
| 8 | #include <linux/netfilter/nf_conntrack_tuple_common.h> | 9 | #include <linux/netfilter/nf_conntrack_tuple_common.h> |
| 9 | 10 | ||
| 10 | #define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1)) | 11 | #define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1)) |
| @@ -62,9 +63,9 @@ struct xt_conntrack_info | |||
| 62 | unsigned long expires_min, expires_max; | 63 | unsigned long expires_min, expires_max; |
| 63 | 64 | ||
| 64 | /* Flags word */ | 65 | /* Flags word */ |
| 65 | u_int8_t flags; | 66 | __u8 flags; |
| 66 | /* Inverse flags */ | 67 | /* Inverse flags */ |
| 67 | u_int8_t invflags; | 68 | __u8 invflags; |
| 68 | }; | 69 | }; |
| 69 | 70 | ||
| 70 | struct xt_conntrack_mtinfo1 { | 71 | struct xt_conntrack_mtinfo1 { |
| @@ -72,12 +73,12 @@ struct xt_conntrack_mtinfo1 { | |||
| 72 | union nf_inet_addr origdst_addr, origdst_mask; | 73 | union nf_inet_addr origdst_addr, origdst_mask; |
| 73 | union nf_inet_addr replsrc_addr, replsrc_mask; | 74 | union nf_inet_addr replsrc_addr, replsrc_mask; |
| 74 | union nf_inet_addr repldst_addr, repldst_mask; | 75 | union nf_inet_addr repldst_addr, repldst_mask; |
| 75 | u_int32_t expires_min, expires_max; | 76 | __u32 expires_min, expires_max; |
| 76 | u_int16_t l4proto; | 77 | __u16 l4proto; |
| 77 | __be16 origsrc_port, origdst_port; | 78 | __be16 origsrc_port, origdst_port; |
| 78 | __be16 replsrc_port, repldst_port; | 79 | __be16 replsrc_port, repldst_port; |
| 79 | u_int16_t match_flags, invert_flags; | 80 | __u16 match_flags, invert_flags; |
| 80 | u_int8_t state_mask, status_mask; | 81 | __u8 state_mask, status_mask; |
| 81 | }; | 82 | }; |
| 82 | 83 | ||
| 83 | #endif /*_XT_CONNTRACK_H*/ | 84 | #endif /*_XT_CONNTRACK_H*/ |
diff --git a/include/linux/netfilter/xt_dccp.h b/include/linux/netfilter/xt_dccp.h index e0221b9d32cb..a579e1b6f040 100644 --- a/include/linux/netfilter/xt_dccp.h +++ b/include/linux/netfilter/xt_dccp.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_DCCP_H_ | 1 | #ifndef _XT_DCCP_H_ |
| 2 | #define _XT_DCCP_H_ | 2 | #define _XT_DCCP_H_ |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | #define XT_DCCP_SRC_PORTS 0x01 | 6 | #define XT_DCCP_SRC_PORTS 0x01 |
| 5 | #define XT_DCCP_DEST_PORTS 0x02 | 7 | #define XT_DCCP_DEST_PORTS 0x02 |
| 6 | #define XT_DCCP_TYPE 0x04 | 8 | #define XT_DCCP_TYPE 0x04 |
| @@ -9,14 +11,14 @@ | |||
| 9 | #define XT_DCCP_VALID_FLAGS 0x0f | 11 | #define XT_DCCP_VALID_FLAGS 0x0f |
| 10 | 12 | ||
| 11 | struct xt_dccp_info { | 13 | struct xt_dccp_info { |
| 12 | u_int16_t dpts[2]; /* Min, Max */ | 14 | __u16 dpts[2]; /* Min, Max */ |
| 13 | u_int16_t spts[2]; /* Min, Max */ | 15 | __u16 spts[2]; /* Min, Max */ |
| 14 | 16 | ||
| 15 | u_int16_t flags; | 17 | __u16 flags; |
| 16 | u_int16_t invflags; | 18 | __u16 invflags; |
| 17 | 19 | ||
| 18 | u_int16_t typemask; | 20 | __u16 typemask; |
| 19 | u_int8_t option; | 21 | __u8 option; |
| 20 | }; | 22 | }; |
| 21 | 23 | ||
| 22 | #endif /* _XT_DCCP_H_ */ | 24 | #endif /* _XT_DCCP_H_ */ |
diff --git a/include/linux/netfilter/xt_dscp.h b/include/linux/netfilter/xt_dscp.h index f49bc1a648dc..15f8932ad5ce 100644 --- a/include/linux/netfilter/xt_dscp.h +++ b/include/linux/netfilter/xt_dscp.h | |||
| @@ -10,20 +10,22 @@ | |||
| 10 | #ifndef _XT_DSCP_H | 10 | #ifndef _XT_DSCP_H |
| 11 | #define _XT_DSCP_H | 11 | #define _XT_DSCP_H |
| 12 | 12 | ||
| 13 | #include <linux/types.h> | ||
| 14 | |||
| 13 | #define XT_DSCP_MASK 0xfc /* 11111100 */ | 15 | #define XT_DSCP_MASK 0xfc /* 11111100 */ |
| 14 | #define XT_DSCP_SHIFT 2 | 16 | #define XT_DSCP_SHIFT 2 |
| 15 | #define XT_DSCP_MAX 0x3f /* 00111111 */ | 17 | #define XT_DSCP_MAX 0x3f /* 00111111 */ |
| 16 | 18 | ||
| 17 | /* match info */ | 19 | /* match info */ |
| 18 | struct xt_dscp_info { | 20 | struct xt_dscp_info { |
| 19 | u_int8_t dscp; | 21 | __u8 dscp; |
| 20 | u_int8_t invert; | 22 | __u8 invert; |
| 21 | }; | 23 | }; |
| 22 | 24 | ||
| 23 | struct xt_tos_match_info { | 25 | struct xt_tos_match_info { |
| 24 | u_int8_t tos_mask; | 26 | __u8 tos_mask; |
| 25 | u_int8_t tos_value; | 27 | __u8 tos_value; |
| 26 | u_int8_t invert; | 28 | __u8 invert; |
| 27 | }; | 29 | }; |
| 28 | 30 | ||
| 29 | #endif /* _XT_DSCP_H */ | 31 | #endif /* _XT_DSCP_H */ |
diff --git a/include/linux/netfilter/xt_esp.h b/include/linux/netfilter/xt_esp.h index 9380fb1c27da..ef6fa4747d0a 100644 --- a/include/linux/netfilter/xt_esp.h +++ b/include/linux/netfilter/xt_esp.h | |||
| @@ -1,10 +1,12 @@ | |||
| 1 | #ifndef _XT_ESP_H | 1 | #ifndef _XT_ESP_H |
| 2 | #define _XT_ESP_H | 2 | #define _XT_ESP_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | struct xt_esp | 6 | struct xt_esp |
| 5 | { | 7 | { |
| 6 | u_int32_t spis[2]; /* Security Parameter Index */ | 8 | __u32 spis[2]; /* Security Parameter Index */ |
| 7 | u_int8_t invflags; /* Inverse flags */ | 9 | __u8 invflags; /* Inverse flags */ |
| 8 | }; | 10 | }; |
| 9 | 11 | ||
| 10 | /* Values for "invflags" field in struct xt_esp. */ | 12 | /* Values for "invflags" field in struct xt_esp. */ |
diff --git a/include/linux/netfilter/xt_hashlimit.h b/include/linux/netfilter/xt_hashlimit.h index 51b18d83b477..b1925b5925e9 100644 --- a/include/linux/netfilter/xt_hashlimit.h +++ b/include/linux/netfilter/xt_hashlimit.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_HASHLIMIT_H | 1 | #ifndef _XT_HASHLIMIT_H |
| 2 | #define _XT_HASHLIMIT_H | 2 | #define _XT_HASHLIMIT_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | /* timings are in milliseconds. */ | 6 | /* timings are in milliseconds. */ |
| 5 | #define XT_HASHLIMIT_SCALE 10000 | 7 | #define XT_HASHLIMIT_SCALE 10000 |
| 6 | /* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 | 8 | /* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 |
| @@ -18,15 +20,15 @@ enum { | |||
| 18 | }; | 20 | }; |
| 19 | 21 | ||
| 20 | struct hashlimit_cfg { | 22 | struct hashlimit_cfg { |
| 21 | u_int32_t mode; /* bitmask of XT_HASHLIMIT_HASH_* */ | 23 | __u32 mode; /* bitmask of XT_HASHLIMIT_HASH_* */ |
| 22 | u_int32_t avg; /* Average secs between packets * scale */ | 24 | __u32 avg; /* Average secs between packets * scale */ |
| 23 | u_int32_t burst; /* Period multiplier for upper limit. */ | 25 | __u32 burst; /* Period multiplier for upper limit. */ |
| 24 | 26 | ||
| 25 | /* user specified */ | 27 | /* user specified */ |
| 26 | u_int32_t size; /* how many buckets */ | 28 | __u32 size; /* how many buckets */ |
| 27 | u_int32_t max; /* max number of entries */ | 29 | __u32 max; /* max number of entries */ |
| 28 | u_int32_t gc_interval; /* gc interval */ | 30 | __u32 gc_interval; /* gc interval */ |
| 29 | u_int32_t expire; /* when do entries expire? */ | 31 | __u32 expire; /* when do entries expire? */ |
| 30 | }; | 32 | }; |
| 31 | 33 | ||
| 32 | struct xt_hashlimit_info { | 34 | struct xt_hashlimit_info { |
| @@ -42,17 +44,17 @@ struct xt_hashlimit_info { | |||
| 42 | }; | 44 | }; |
| 43 | 45 | ||
| 44 | struct hashlimit_cfg1 { | 46 | struct hashlimit_cfg1 { |
| 45 | u_int32_t mode; /* bitmask of XT_HASHLIMIT_HASH_* */ | 47 | __u32 mode; /* bitmask of XT_HASHLIMIT_HASH_* */ |
| 46 | u_int32_t avg; /* Average secs between packets * scale */ | 48 | __u32 avg; /* Average secs between packets * scale */ |
| 47 | u_int32_t burst; /* Period multiplier for upper limit. */ | 49 | __u32 burst; /* Period multiplier for upper limit. */ |
| 48 | 50 | ||
| 49 | /* user specified */ | 51 | /* user specified */ |
| 50 | u_int32_t size; /* how many buckets */ | 52 | __u32 size; /* how many buckets */ |
| 51 | u_int32_t max; /* max number of entries */ | 53 | __u32 max; /* max number of entries */ |
| 52 | u_int32_t gc_interval; /* gc interval */ | 54 | __u32 gc_interval; /* gc interval */ |
| 53 | u_int32_t expire; /* when do entries expire? */ | 55 | __u32 expire; /* when do entries expire? */ |
| 54 | 56 | ||
| 55 | u_int8_t srcmask, dstmask; | 57 | __u8 srcmask, dstmask; |
| 56 | }; | 58 | }; |
| 57 | 59 | ||
| 58 | struct xt_hashlimit_mtinfo1 { | 60 | struct xt_hashlimit_mtinfo1 { |
diff --git a/include/linux/netfilter/xt_iprange.h b/include/linux/netfilter/xt_iprange.h index a4299c7d3680..c1f21a779a45 100644 --- a/include/linux/netfilter/xt_iprange.h +++ b/include/linux/netfilter/xt_iprange.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _LINUX_NETFILTER_XT_IPRANGE_H | 1 | #ifndef _LINUX_NETFILTER_XT_IPRANGE_H |
| 2 | #define _LINUX_NETFILTER_XT_IPRANGE_H 1 | 2 | #define _LINUX_NETFILTER_XT_IPRANGE_H 1 |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | enum { | 6 | enum { |
| 5 | IPRANGE_SRC = 1 << 0, /* match source IP address */ | 7 | IPRANGE_SRC = 1 << 0, /* match source IP address */ |
| 6 | IPRANGE_DST = 1 << 1, /* match destination IP address */ | 8 | IPRANGE_DST = 1 << 1, /* match destination IP address */ |
| @@ -11,7 +13,7 @@ enum { | |||
| 11 | struct xt_iprange_mtinfo { | 13 | struct xt_iprange_mtinfo { |
| 12 | union nf_inet_addr src_min, src_max; | 14 | union nf_inet_addr src_min, src_max; |
| 13 | union nf_inet_addr dst_min, dst_max; | 15 | union nf_inet_addr dst_min, dst_max; |
| 14 | u_int8_t flags; | 16 | __u8 flags; |
| 15 | }; | 17 | }; |
| 16 | 18 | ||
| 17 | #endif /* _LINUX_NETFILTER_XT_IPRANGE_H */ | 19 | #endif /* _LINUX_NETFILTER_XT_IPRANGE_H */ |
diff --git a/include/linux/netfilter/xt_length.h b/include/linux/netfilter/xt_length.h index 7c2b439f73fe..b82ed7c4b1e0 100644 --- a/include/linux/netfilter/xt_length.h +++ b/include/linux/netfilter/xt_length.h | |||
| @@ -1,9 +1,11 @@ | |||
| 1 | #ifndef _XT_LENGTH_H | 1 | #ifndef _XT_LENGTH_H |
| 2 | #define _XT_LENGTH_H | 2 | #define _XT_LENGTH_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | struct xt_length_info { | 6 | struct xt_length_info { |
| 5 | u_int16_t min, max; | 7 | __u16 min, max; |
| 6 | u_int8_t invert; | 8 | __u8 invert; |
| 7 | }; | 9 | }; |
| 8 | 10 | ||
| 9 | #endif /*_XT_LENGTH_H*/ | 11 | #endif /*_XT_LENGTH_H*/ |
diff --git a/include/linux/netfilter/xt_limit.h b/include/linux/netfilter/xt_limit.h index b3ce65375ecb..bb47fc4d2ade 100644 --- a/include/linux/netfilter/xt_limit.h +++ b/include/linux/netfilter/xt_limit.h | |||
| @@ -1,21 +1,24 @@ | |||
| 1 | #ifndef _XT_RATE_H | 1 | #ifndef _XT_RATE_H |
| 2 | #define _XT_RATE_H | 2 | #define _XT_RATE_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | /* timings are in milliseconds. */ | 6 | /* timings are in milliseconds. */ |
| 5 | #define XT_LIMIT_SCALE 10000 | 7 | #define XT_LIMIT_SCALE 10000 |
| 6 | 8 | ||
| 9 | struct xt_limit_priv; | ||
| 10 | |||
| 7 | /* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 | 11 | /* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 |
| 8 | seconds, or one every 59 hours. */ | 12 | seconds, or one every 59 hours. */ |
| 9 | struct xt_rateinfo { | 13 | struct xt_rateinfo { |
| 10 | u_int32_t avg; /* Average secs between packets * scale */ | 14 | __u32 avg; /* Average secs between packets * scale */ |
| 11 | u_int32_t burst; /* Period multiplier for upper limit. */ | 15 | __u32 burst; /* Period multiplier for upper limit. */ |
| 12 | 16 | ||
| 13 | /* Used internally by the kernel */ | 17 | /* Used internally by the kernel */ |
| 14 | unsigned long prev; | 18 | unsigned long prev; /* moved to xt_limit_priv */ |
| 15 | u_int32_t credit; | 19 | __u32 credit; /* moved to xt_limit_priv */ |
| 16 | u_int32_t credit_cap, cost; | 20 | __u32 credit_cap, cost; |
| 17 | 21 | ||
| 18 | /* Ugly, ugly fucker. */ | 22 | struct xt_limit_priv *master; |
| 19 | struct xt_rateinfo *master; | ||
| 20 | }; | 23 | }; |
| 21 | #endif /*_XT_RATE_H*/ | 24 | #endif /*_XT_RATE_H*/ |
diff --git a/include/linux/netfilter/xt_mark.h b/include/linux/netfilter/xt_mark.h index fae74bc3f34e..6fa460a3cc29 100644 --- a/include/linux/netfilter/xt_mark.h +++ b/include/linux/netfilter/xt_mark.h | |||
| @@ -1,14 +1,16 @@ | |||
| 1 | #ifndef _XT_MARK_H | 1 | #ifndef _XT_MARK_H |
| 2 | #define _XT_MARK_H | 2 | #define _XT_MARK_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | struct xt_mark_info { | 6 | struct xt_mark_info { |
| 5 | unsigned long mark, mask; | 7 | unsigned long mark, mask; |
| 6 | u_int8_t invert; | 8 | __u8 invert; |
| 7 | }; | 9 | }; |
| 8 | 10 | ||
| 9 | struct xt_mark_mtinfo1 { | 11 | struct xt_mark_mtinfo1 { |
| 10 | u_int32_t mark, mask; | 12 | __u32 mark, mask; |
| 11 | u_int8_t invert; | 13 | __u8 invert; |
| 12 | }; | 14 | }; |
| 13 | 15 | ||
| 14 | #endif /*_XT_MARK_H*/ | 16 | #endif /*_XT_MARK_H*/ |
diff --git a/include/linux/netfilter/xt_multiport.h b/include/linux/netfilter/xt_multiport.h index d49ee4183710..185db499fcbc 100644 --- a/include/linux/netfilter/xt_multiport.h +++ b/include/linux/netfilter/xt_multiport.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_MULTIPORT_H | 1 | #ifndef _XT_MULTIPORT_H |
| 2 | #define _XT_MULTIPORT_H | 2 | #define _XT_MULTIPORT_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | enum xt_multiport_flags | 6 | enum xt_multiport_flags |
| 5 | { | 7 | { |
| 6 | XT_MULTIPORT_SOURCE, | 8 | XT_MULTIPORT_SOURCE, |
| @@ -13,18 +15,18 @@ enum xt_multiport_flags | |||
| 13 | /* Must fit inside union xt_matchinfo: 16 bytes */ | 15 | /* Must fit inside union xt_matchinfo: 16 bytes */ |
| 14 | struct xt_multiport | 16 | struct xt_multiport |
| 15 | { | 17 | { |
| 16 | u_int8_t flags; /* Type of comparison */ | 18 | __u8 flags; /* Type of comparison */ |
| 17 | u_int8_t count; /* Number of ports */ | 19 | __u8 count; /* Number of ports */ |
| 18 | u_int16_t ports[XT_MULTI_PORTS]; /* Ports */ | 20 | __u16 ports[XT_MULTI_PORTS]; /* Ports */ |
| 19 | }; | 21 | }; |
| 20 | 22 | ||
| 21 | struct xt_multiport_v1 | 23 | struct xt_multiport_v1 |
| 22 | { | 24 | { |
| 23 | u_int8_t flags; /* Type of comparison */ | 25 | __u8 flags; /* Type of comparison */ |
| 24 | u_int8_t count; /* Number of ports */ | 26 | __u8 count; /* Number of ports */ |
| 25 | u_int16_t ports[XT_MULTI_PORTS]; /* Ports */ | 27 | __u16 ports[XT_MULTI_PORTS]; /* Ports */ |
| 26 | u_int8_t pflags[XT_MULTI_PORTS]; /* Port flags */ | 28 | __u8 pflags[XT_MULTI_PORTS]; /* Port flags */ |
| 27 | u_int8_t invert; /* Invert flag */ | 29 | __u8 invert; /* Invert flag */ |
| 28 | }; | 30 | }; |
| 29 | 31 | ||
| 30 | #endif /*_XT_MULTIPORT_H*/ | 32 | #endif /*_XT_MULTIPORT_H*/ |
diff --git a/include/linux/netfilter/xt_owner.h b/include/linux/netfilter/xt_owner.h index c84e52cfe415..2081761714b5 100644 --- a/include/linux/netfilter/xt_owner.h +++ b/include/linux/netfilter/xt_owner.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_OWNER_MATCH_H | 1 | #ifndef _XT_OWNER_MATCH_H |
| 2 | #define _XT_OWNER_MATCH_H | 2 | #define _XT_OWNER_MATCH_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | enum { | 6 | enum { |
| 5 | XT_OWNER_UID = 1 << 0, | 7 | XT_OWNER_UID = 1 << 0, |
| 6 | XT_OWNER_GID = 1 << 1, | 8 | XT_OWNER_GID = 1 << 1, |
| @@ -8,9 +10,9 @@ enum { | |||
| 8 | }; | 10 | }; |
| 9 | 11 | ||
| 10 | struct xt_owner_match_info { | 12 | struct xt_owner_match_info { |
| 11 | u_int32_t uid_min, uid_max; | 13 | __u32 uid_min, uid_max; |
| 12 | u_int32_t gid_min, gid_max; | 14 | __u32 gid_min, gid_max; |
| 13 | u_int8_t match, invert; | 15 | __u8 match, invert; |
| 14 | }; | 16 | }; |
| 15 | 17 | ||
| 16 | #endif /* _XT_OWNER_MATCH_H */ | 18 | #endif /* _XT_OWNER_MATCH_H */ |
diff --git a/include/linux/netfilter/xt_physdev.h b/include/linux/netfilter/xt_physdev.h index 25a7a1815b5b..8555e399886d 100644 --- a/include/linux/netfilter/xt_physdev.h +++ b/include/linux/netfilter/xt_physdev.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_PHYSDEV_H | 1 | #ifndef _XT_PHYSDEV_H |
| 2 | #define _XT_PHYSDEV_H | 2 | #define _XT_PHYSDEV_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
| 5 | #include <linux/if.h> | 7 | #include <linux/if.h> |
| 6 | #endif | 8 | #endif |
| @@ -17,8 +19,8 @@ struct xt_physdev_info { | |||
| 17 | char in_mask[IFNAMSIZ]; | 19 | char in_mask[IFNAMSIZ]; |
| 18 | char physoutdev[IFNAMSIZ]; | 20 | char physoutdev[IFNAMSIZ]; |
| 19 | char out_mask[IFNAMSIZ]; | 21 | char out_mask[IFNAMSIZ]; |
| 20 | u_int8_t invert; | 22 | __u8 invert; |
| 21 | u_int8_t bitmask; | 23 | __u8 bitmask; |
| 22 | }; | 24 | }; |
| 23 | 25 | ||
| 24 | #endif /*_XT_PHYSDEV_H*/ | 26 | #endif /*_XT_PHYSDEV_H*/ |
diff --git a/include/linux/netfilter/xt_policy.h b/include/linux/netfilter/xt_policy.h index 053d8cc65464..7bb64e7c853d 100644 --- a/include/linux/netfilter/xt_policy.h +++ b/include/linux/netfilter/xt_policy.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_POLICY_H | 1 | #ifndef _XT_POLICY_H |
| 2 | #define _XT_POLICY_H | 2 | #define _XT_POLICY_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | #define XT_POLICY_MAX_ELEM 4 | 6 | #define XT_POLICY_MAX_ELEM 4 |
| 5 | 7 | ||
| 6 | enum xt_policy_flags | 8 | enum xt_policy_flags |
| @@ -19,7 +21,7 @@ enum xt_policy_modes | |||
| 19 | 21 | ||
| 20 | struct xt_policy_spec | 22 | struct xt_policy_spec |
| 21 | { | 23 | { |
| 22 | u_int8_t saddr:1, | 24 | __u8 saddr:1, |
| 23 | daddr:1, | 25 | daddr:1, |
| 24 | proto:1, | 26 | proto:1, |
| 25 | mode:1, | 27 | mode:1, |
| @@ -55,9 +57,9 @@ struct xt_policy_elem | |||
| 55 | #endif | 57 | #endif |
| 56 | }; | 58 | }; |
| 57 | __be32 spi; | 59 | __be32 spi; |
| 58 | u_int32_t reqid; | 60 | __u32 reqid; |
| 59 | u_int8_t proto; | 61 | __u8 proto; |
| 60 | u_int8_t mode; | 62 | __u8 mode; |
| 61 | 63 | ||
| 62 | struct xt_policy_spec match; | 64 | struct xt_policy_spec match; |
| 63 | struct xt_policy_spec invert; | 65 | struct xt_policy_spec invert; |
| @@ -66,8 +68,8 @@ struct xt_policy_elem | |||
| 66 | struct xt_policy_info | 68 | struct xt_policy_info |
| 67 | { | 69 | { |
| 68 | struct xt_policy_elem pol[XT_POLICY_MAX_ELEM]; | 70 | struct xt_policy_elem pol[XT_POLICY_MAX_ELEM]; |
| 69 | u_int16_t flags; | 71 | __u16 flags; |
| 70 | u_int16_t len; | 72 | __u16 len; |
| 71 | }; | 73 | }; |
| 72 | 74 | ||
| 73 | #endif /* _XT_POLICY_H */ | 75 | #endif /* _XT_POLICY_H */ |
diff --git a/include/linux/netfilter/xt_quota.h b/include/linux/netfilter/xt_quota.h index 4c8368d781e5..8dc89dfc1361 100644 --- a/include/linux/netfilter/xt_quota.h +++ b/include/linux/netfilter/xt_quota.h | |||
| @@ -6,13 +6,15 @@ enum xt_quota_flags { | |||
| 6 | }; | 6 | }; |
| 7 | #define XT_QUOTA_MASK 0x1 | 7 | #define XT_QUOTA_MASK 0x1 |
| 8 | 8 | ||
| 9 | struct xt_quota_priv; | ||
| 10 | |||
| 9 | struct xt_quota_info { | 11 | struct xt_quota_info { |
| 10 | u_int32_t flags; | 12 | u_int32_t flags; |
| 11 | u_int32_t pad; | 13 | u_int32_t pad; |
| 12 | 14 | ||
| 13 | /* Used internally by the kernel */ | 15 | /* Used internally by the kernel */ |
| 14 | aligned_u64 quota; | 16 | aligned_u64 quota; |
| 15 | struct xt_quota_info *master; | 17 | struct xt_quota_priv *master; |
| 16 | }; | 18 | }; |
| 17 | 19 | ||
| 18 | #endif /* _XT_QUOTA_H */ | 20 | #endif /* _XT_QUOTA_H */ |
diff --git a/include/linux/netfilter/xt_rateest.h b/include/linux/netfilter/xt_rateest.h index 2010cb74250f..d40a6196842a 100644 --- a/include/linux/netfilter/xt_rateest.h +++ b/include/linux/netfilter/xt_rateest.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_RATEEST_MATCH_H | 1 | #ifndef _XT_RATEEST_MATCH_H |
| 2 | #define _XT_RATEEST_MATCH_H | 2 | #define _XT_RATEEST_MATCH_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | enum xt_rateest_match_flags { | 6 | enum xt_rateest_match_flags { |
| 5 | XT_RATEEST_MATCH_INVERT = 1<<0, | 7 | XT_RATEEST_MATCH_INVERT = 1<<0, |
| 6 | XT_RATEEST_MATCH_ABS = 1<<1, | 8 | XT_RATEEST_MATCH_ABS = 1<<1, |
| @@ -20,12 +22,12 @@ enum xt_rateest_match_mode { | |||
| 20 | struct xt_rateest_match_info { | 22 | struct xt_rateest_match_info { |
| 21 | char name1[IFNAMSIZ]; | 23 | char name1[IFNAMSIZ]; |
| 22 | char name2[IFNAMSIZ]; | 24 | char name2[IFNAMSIZ]; |
| 23 | u_int16_t flags; | 25 | __u16 flags; |
| 24 | u_int16_t mode; | 26 | __u16 mode; |
| 25 | u_int32_t bps1; | 27 | __u32 bps1; |
| 26 | u_int32_t pps1; | 28 | __u32 pps1; |
| 27 | u_int32_t bps2; | 29 | __u32 bps2; |
| 28 | u_int32_t pps2; | 30 | __u32 pps2; |
| 29 | 31 | ||
| 30 | /* Used internally by the kernel */ | 32 | /* Used internally by the kernel */ |
| 31 | struct xt_rateest *est1 __attribute__((aligned(8))); | 33 | struct xt_rateest *est1 __attribute__((aligned(8))); |
diff --git a/include/linux/netfilter/xt_realm.h b/include/linux/netfilter/xt_realm.h index 220e87245716..d4a82ee56a02 100644 --- a/include/linux/netfilter/xt_realm.h +++ b/include/linux/netfilter/xt_realm.h | |||
| @@ -1,10 +1,12 @@ | |||
| 1 | #ifndef _XT_REALM_H | 1 | #ifndef _XT_REALM_H |
| 2 | #define _XT_REALM_H | 2 | #define _XT_REALM_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | struct xt_realm_info { | 6 | struct xt_realm_info { |
| 5 | u_int32_t id; | 7 | __u32 id; |
| 6 | u_int32_t mask; | 8 | __u32 mask; |
| 7 | u_int8_t invert; | 9 | __u8 invert; |
| 8 | }; | 10 | }; |
| 9 | 11 | ||
| 10 | #endif /* _XT_REALM_H */ | 12 | #endif /* _XT_REALM_H */ |
diff --git a/include/linux/netfilter/xt_recent.h b/include/linux/netfilter/xt_recent.h index 5cfeb81c6794..d2c276609925 100644 --- a/include/linux/netfilter/xt_recent.h +++ b/include/linux/netfilter/xt_recent.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _LINUX_NETFILTER_XT_RECENT_H | 1 | #ifndef _LINUX_NETFILTER_XT_RECENT_H |
| 2 | #define _LINUX_NETFILTER_XT_RECENT_H 1 | 2 | #define _LINUX_NETFILTER_XT_RECENT_H 1 |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | enum { | 6 | enum { |
| 5 | XT_RECENT_CHECK = 1 << 0, | 7 | XT_RECENT_CHECK = 1 << 0, |
| 6 | XT_RECENT_SET = 1 << 1, | 8 | XT_RECENT_SET = 1 << 1, |
| @@ -15,12 +17,12 @@ enum { | |||
| 15 | }; | 17 | }; |
| 16 | 18 | ||
| 17 | struct xt_recent_mtinfo { | 19 | struct xt_recent_mtinfo { |
| 18 | u_int32_t seconds; | 20 | __u32 seconds; |
| 19 | u_int32_t hit_count; | 21 | __u32 hit_count; |
| 20 | u_int8_t check_set; | 22 | __u8 check_set; |
| 21 | u_int8_t invert; | 23 | __u8 invert; |
| 22 | char name[XT_RECENT_NAME_LEN]; | 24 | char name[XT_RECENT_NAME_LEN]; |
| 23 | u_int8_t side; | 25 | __u8 side; |
| 24 | }; | 26 | }; |
| 25 | 27 | ||
| 26 | #endif /* _LINUX_NETFILTER_XT_RECENT_H */ | 28 | #endif /* _LINUX_NETFILTER_XT_RECENT_H */ |
diff --git a/include/linux/netfilter/xt_sctp.h b/include/linux/netfilter/xt_sctp.h index 32000ba6ecef..29287be696a2 100644 --- a/include/linux/netfilter/xt_sctp.h +++ b/include/linux/netfilter/xt_sctp.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_SCTP_H_ | 1 | #ifndef _XT_SCTP_H_ |
| 2 | #define _XT_SCTP_H_ | 2 | #define _XT_SCTP_H_ |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | #define XT_SCTP_SRC_PORTS 0x01 | 6 | #define XT_SCTP_SRC_PORTS 0x01 |
| 5 | #define XT_SCTP_DEST_PORTS 0x02 | 7 | #define XT_SCTP_DEST_PORTS 0x02 |
| 6 | #define XT_SCTP_CHUNK_TYPES 0x04 | 8 | #define XT_SCTP_CHUNK_TYPES 0x04 |
| @@ -8,49 +10,49 @@ | |||
| 8 | #define XT_SCTP_VALID_FLAGS 0x07 | 10 | #define XT_SCTP_VALID_FLAGS 0x07 |
| 9 | 11 | ||
| 10 | struct xt_sctp_flag_info { | 12 | struct xt_sctp_flag_info { |
| 11 | u_int8_t chunktype; | 13 | __u8 chunktype; |
| 12 | u_int8_t flag; | 14 | __u8 flag; |
| 13 | u_int8_t flag_mask; | 15 | __u8 flag_mask; |
| 14 | }; | 16 | }; |
| 15 | 17 | ||
| 16 | #define XT_NUM_SCTP_FLAGS 4 | 18 | #define XT_NUM_SCTP_FLAGS 4 |
| 17 | 19 | ||
| 18 | struct xt_sctp_info { | 20 | struct xt_sctp_info { |
| 19 | u_int16_t dpts[2]; /* Min, Max */ | 21 | __u16 dpts[2]; /* Min, Max */ |
| 20 | u_int16_t spts[2]; /* Min, Max */ | 22 | __u16 spts[2]; /* Min, Max */ |
| 21 | 23 | ||
| 22 | u_int32_t chunkmap[256 / sizeof (u_int32_t)]; /* Bit mask of chunks to be matched according to RFC 2960 */ | 24 | __u32 chunkmap[256 / sizeof (__u32)]; /* Bit mask of chunks to be matched according to RFC 2960 */ |
| 23 | 25 | ||
| 24 | #define SCTP_CHUNK_MATCH_ANY 0x01 /* Match if any of the chunk types are present */ | 26 | #define SCTP_CHUNK_MATCH_ANY 0x01 /* Match if any of the chunk types are present */ |
| 25 | #define SCTP_CHUNK_MATCH_ALL 0x02 /* Match if all of the chunk types are present */ | 27 | #define SCTP_CHUNK_MATCH_ALL 0x02 /* Match if all of the chunk types are present */ |
| 26 | #define SCTP_CHUNK_MATCH_ONLY 0x04 /* Match if these are the only chunk types present */ | 28 | #define SCTP_CHUNK_MATCH_ONLY 0x04 /* Match if these are the only chunk types present */ |
| 27 | 29 | ||
| 28 | u_int32_t chunk_match_type; | 30 | __u32 chunk_match_type; |
| 29 | struct xt_sctp_flag_info flag_info[XT_NUM_SCTP_FLAGS]; | 31 | struct xt_sctp_flag_info flag_info[XT_NUM_SCTP_FLAGS]; |
| 30 | int flag_count; | 32 | int flag_count; |
| 31 | 33 | ||
| 32 | u_int32_t flags; | 34 | __u32 flags; |
| 33 | u_int32_t invflags; | 35 | __u32 invflags; |
| 34 | }; | 36 | }; |
| 35 | 37 | ||
| 36 | #define bytes(type) (sizeof(type) * 8) | 38 | #define bytes(type) (sizeof(type) * 8) |
| 37 | 39 | ||
| 38 | #define SCTP_CHUNKMAP_SET(chunkmap, type) \ | 40 | #define SCTP_CHUNKMAP_SET(chunkmap, type) \ |
| 39 | do { \ | 41 | do { \ |
| 40 | (chunkmap)[type / bytes(u_int32_t)] |= \ | 42 | (chunkmap)[type / bytes(__u32)] |= \ |
| 41 | 1 << (type % bytes(u_int32_t)); \ | 43 | 1 << (type % bytes(__u32)); \ |
| 42 | } while (0) | 44 | } while (0) |
| 43 | 45 | ||
| 44 | #define SCTP_CHUNKMAP_CLEAR(chunkmap, type) \ | 46 | #define SCTP_CHUNKMAP_CLEAR(chunkmap, type) \ |
| 45 | do { \ | 47 | do { \ |
| 46 | (chunkmap)[type / bytes(u_int32_t)] &= \ | 48 | (chunkmap)[type / bytes(__u32)] &= \ |
| 47 | ~(1 << (type % bytes(u_int32_t))); \ | 49 | ~(1 << (type % bytes(__u32))); \ |
| 48 | } while (0) | 50 | } while (0) |
| 49 | 51 | ||
| 50 | #define SCTP_CHUNKMAP_IS_SET(chunkmap, type) \ | 52 | #define SCTP_CHUNKMAP_IS_SET(chunkmap, type) \ |
| 51 | ({ \ | 53 | ({ \ |
| 52 | ((chunkmap)[type / bytes (u_int32_t)] & \ | 54 | ((chunkmap)[type / bytes (__u32)] & \ |
| 53 | (1 << (type % bytes (u_int32_t)))) ? 1: 0; \ | 55 | (1 << (type % bytes (__u32)))) ? 1: 0; \ |
| 54 | }) | 56 | }) |
| 55 | 57 | ||
| 56 | #define SCTP_CHUNKMAP_RESET(chunkmap) \ | 58 | #define SCTP_CHUNKMAP_RESET(chunkmap) \ |
| @@ -65,7 +67,7 @@ struct xt_sctp_info { | |||
| 65 | #define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) \ | 67 | #define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) \ |
| 66 | __sctp_chunkmap_is_clear((chunkmap), ARRAY_SIZE(chunkmap)) | 68 | __sctp_chunkmap_is_clear((chunkmap), ARRAY_SIZE(chunkmap)) |
| 67 | static inline bool | 69 | static inline bool |
| 68 | __sctp_chunkmap_is_clear(const u_int32_t *chunkmap, unsigned int n) | 70 | __sctp_chunkmap_is_clear(const __u32 *chunkmap, unsigned int n) |
| 69 | { | 71 | { |
| 70 | unsigned int i; | 72 | unsigned int i; |
| 71 | for (i = 0; i < n; ++i) | 73 | for (i = 0; i < n; ++i) |
| @@ -77,7 +79,7 @@ __sctp_chunkmap_is_clear(const u_int32_t *chunkmap, unsigned int n) | |||
| 77 | #define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) \ | 79 | #define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) \ |
| 78 | __sctp_chunkmap_is_all_set((chunkmap), ARRAY_SIZE(chunkmap)) | 80 | __sctp_chunkmap_is_all_set((chunkmap), ARRAY_SIZE(chunkmap)) |
| 79 | static inline bool | 81 | static inline bool |
| 80 | __sctp_chunkmap_is_all_set(const u_int32_t *chunkmap, unsigned int n) | 82 | __sctp_chunkmap_is_all_set(const __u32 *chunkmap, unsigned int n) |
| 81 | { | 83 | { |
| 82 | unsigned int i; | 84 | unsigned int i; |
| 83 | for (i = 0; i < n; ++i) | 85 | for (i = 0; i < n; ++i) |
diff --git a/include/linux/netfilter/xt_statistic.h b/include/linux/netfilter/xt_statistic.h index 3d38bc975048..4e983ef0c968 100644 --- a/include/linux/netfilter/xt_statistic.h +++ b/include/linux/netfilter/xt_statistic.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_STATISTIC_H | 1 | #ifndef _XT_STATISTIC_H |
| 2 | #define _XT_STATISTIC_H | 2 | #define _XT_STATISTIC_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | enum xt_statistic_mode { | 6 | enum xt_statistic_mode { |
| 5 | XT_STATISTIC_MODE_RANDOM, | 7 | XT_STATISTIC_MODE_RANDOM, |
| 6 | XT_STATISTIC_MODE_NTH, | 8 | XT_STATISTIC_MODE_NTH, |
| @@ -13,21 +15,22 @@ enum xt_statistic_flags { | |||
| 13 | }; | 15 | }; |
| 14 | #define XT_STATISTIC_MASK 0x1 | 16 | #define XT_STATISTIC_MASK 0x1 |
| 15 | 17 | ||
| 18 | struct xt_statistic_priv; | ||
| 19 | |||
| 16 | struct xt_statistic_info { | 20 | struct xt_statistic_info { |
| 17 | u_int16_t mode; | 21 | __u16 mode; |
| 18 | u_int16_t flags; | 22 | __u16 flags; |
| 19 | union { | 23 | union { |
| 20 | struct { | 24 | struct { |
| 21 | u_int32_t probability; | 25 | __u32 probability; |
| 22 | } random; | 26 | } random; |
| 23 | struct { | 27 | struct { |
| 24 | u_int32_t every; | 28 | __u32 every; |
| 25 | u_int32_t packet; | 29 | __u32 packet; |
| 26 | /* Used internally by the kernel */ | 30 | __u32 count; /* unused */ |
| 27 | u_int32_t count; | ||
| 28 | } nth; | 31 | } nth; |
| 29 | } u; | 32 | } u; |
| 30 | struct xt_statistic_info *master __attribute__((aligned(8))); | 33 | struct xt_statistic_priv *master __attribute__((aligned(8))); |
| 31 | }; | 34 | }; |
| 32 | 35 | ||
| 33 | #endif /* _XT_STATISTIC_H */ | 36 | #endif /* _XT_STATISTIC_H */ |
diff --git a/include/linux/netfilter/xt_string.h b/include/linux/netfilter/xt_string.h index 8a6ba7bbef9f..ecbb95fc89ed 100644 --- a/include/linux/netfilter/xt_string.h +++ b/include/linux/netfilter/xt_string.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_STRING_H | 1 | #ifndef _XT_STRING_H |
| 2 | #define _XT_STRING_H | 2 | #define _XT_STRING_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | #define XT_STRING_MAX_PATTERN_SIZE 128 | 6 | #define XT_STRING_MAX_PATTERN_SIZE 128 |
| 5 | #define XT_STRING_MAX_ALGO_NAME_SIZE 16 | 7 | #define XT_STRING_MAX_ALGO_NAME_SIZE 16 |
| 6 | 8 | ||
| @@ -11,18 +13,18 @@ enum { | |||
| 11 | 13 | ||
| 12 | struct xt_string_info | 14 | struct xt_string_info |
| 13 | { | 15 | { |
| 14 | u_int16_t from_offset; | 16 | __u16 from_offset; |
| 15 | u_int16_t to_offset; | 17 | __u16 to_offset; |
| 16 | char algo[XT_STRING_MAX_ALGO_NAME_SIZE]; | 18 | char algo[XT_STRING_MAX_ALGO_NAME_SIZE]; |
| 17 | char pattern[XT_STRING_MAX_PATTERN_SIZE]; | 19 | char pattern[XT_STRING_MAX_PATTERN_SIZE]; |
| 18 | u_int8_t patlen; | 20 | __u8 patlen; |
| 19 | union { | 21 | union { |
| 20 | struct { | 22 | struct { |
| 21 | u_int8_t invert; | 23 | __u8 invert; |
| 22 | } v0; | 24 | } v0; |
| 23 | 25 | ||
| 24 | struct { | 26 | struct { |
| 25 | u_int8_t flags; | 27 | __u8 flags; |
| 26 | } v1; | 28 | } v1; |
| 27 | } u; | 29 | } u; |
| 28 | 30 | ||
diff --git a/include/linux/netfilter/xt_tcpmss.h b/include/linux/netfilter/xt_tcpmss.h index e03274c4c790..fbac56b9e667 100644 --- a/include/linux/netfilter/xt_tcpmss.h +++ b/include/linux/netfilter/xt_tcpmss.h | |||
| @@ -1,9 +1,11 @@ | |||
| 1 | #ifndef _XT_TCPMSS_MATCH_H | 1 | #ifndef _XT_TCPMSS_MATCH_H |
| 2 | #define _XT_TCPMSS_MATCH_H | 2 | #define _XT_TCPMSS_MATCH_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | struct xt_tcpmss_match_info { | 6 | struct xt_tcpmss_match_info { |
| 5 | u_int16_t mss_min, mss_max; | 7 | __u16 mss_min, mss_max; |
| 6 | u_int8_t invert; | 8 | __u8 invert; |
| 7 | }; | 9 | }; |
| 8 | 10 | ||
| 9 | #endif /*_XT_TCPMSS_MATCH_H*/ | 11 | #endif /*_XT_TCPMSS_MATCH_H*/ |
diff --git a/include/linux/netfilter/xt_tcpudp.h b/include/linux/netfilter/xt_tcpudp.h index 78bc65f11adf..a490a0bc1d29 100644 --- a/include/linux/netfilter/xt_tcpudp.h +++ b/include/linux/netfilter/xt_tcpudp.h | |||
| @@ -1,15 +1,17 @@ | |||
| 1 | #ifndef _XT_TCPUDP_H | 1 | #ifndef _XT_TCPUDP_H |
| 2 | #define _XT_TCPUDP_H | 2 | #define _XT_TCPUDP_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | /* TCP matching stuff */ | 6 | /* TCP matching stuff */ |
| 5 | struct xt_tcp | 7 | struct xt_tcp |
| 6 | { | 8 | { |
| 7 | u_int16_t spts[2]; /* Source port range. */ | 9 | __u16 spts[2]; /* Source port range. */ |
| 8 | u_int16_t dpts[2]; /* Destination port range. */ | 10 | __u16 dpts[2]; /* Destination port range. */ |
| 9 | u_int8_t option; /* TCP Option iff non-zero*/ | 11 | __u8 option; /* TCP Option iff non-zero*/ |
| 10 | u_int8_t flg_mask; /* TCP flags mask byte */ | 12 | __u8 flg_mask; /* TCP flags mask byte */ |
| 11 | u_int8_t flg_cmp; /* TCP flags compare byte */ | 13 | __u8 flg_cmp; /* TCP flags compare byte */ |
| 12 | u_int8_t invflags; /* Inverse flags */ | 14 | __u8 invflags; /* Inverse flags */ |
| 13 | }; | 15 | }; |
| 14 | 16 | ||
| 15 | /* Values for "inv" field in struct ipt_tcp. */ | 17 | /* Values for "inv" field in struct ipt_tcp. */ |
| @@ -22,9 +24,9 @@ struct xt_tcp | |||
| 22 | /* UDP matching stuff */ | 24 | /* UDP matching stuff */ |
| 23 | struct xt_udp | 25 | struct xt_udp |
| 24 | { | 26 | { |
| 25 | u_int16_t spts[2]; /* Source port range. */ | 27 | __u16 spts[2]; /* Source port range. */ |
| 26 | u_int16_t dpts[2]; /* Destination port range. */ | 28 | __u16 dpts[2]; /* Destination port range. */ |
| 27 | u_int8_t invflags; /* Inverse flags */ | 29 | __u8 invflags; /* Inverse flags */ |
| 28 | }; | 30 | }; |
| 29 | 31 | ||
| 30 | /* Values for "invflags" field in struct ipt_udp. */ | 32 | /* Values for "invflags" field in struct ipt_udp. */ |
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index 499aa9375901..f8105e54716a 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
| @@ -59,9 +59,9 @@ static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb) | |||
| 59 | static inline unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb) | 59 | static inline unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb) |
| 60 | { | 60 | { |
| 61 | switch (skb->protocol) { | 61 | switch (skb->protocol) { |
| 62 | case __constant_htons(ETH_P_8021Q): | 62 | case __cpu_to_be16(ETH_P_8021Q): |
| 63 | return VLAN_HLEN; | 63 | return VLAN_HLEN; |
| 64 | case __constant_htons(ETH_P_PPP_SES): | 64 | case __cpu_to_be16(ETH_P_PPP_SES): |
| 65 | return PPPOE_SES_HLEN; | 65 | return PPPOE_SES_HLEN; |
| 66 | default: | 66 | default: |
| 67 | return 0; | 67 | return 0; |
diff --git a/include/linux/netfilter_ipv4/ipt_owner.h b/include/linux/netfilter_ipv4/ipt_owner.h index 92f4bdac54ef..a78445be9992 100644 --- a/include/linux/netfilter_ipv4/ipt_owner.h +++ b/include/linux/netfilter_ipv4/ipt_owner.h | |||
| @@ -9,10 +9,10 @@ | |||
| 9 | #define IPT_OWNER_COMM 0x10 | 9 | #define IPT_OWNER_COMM 0x10 |
| 10 | 10 | ||
| 11 | struct ipt_owner_info { | 11 | struct ipt_owner_info { |
| 12 | uid_t uid; | 12 | __kernel_uid32_t uid; |
| 13 | gid_t gid; | 13 | __kernel_gid32_t gid; |
| 14 | pid_t pid; | 14 | __kernel_pid_t pid; |
| 15 | pid_t sid; | 15 | __kernel_pid_t sid; |
| 16 | char comm[16]; | 16 | char comm[16]; |
| 17 | u_int8_t match, invert; /* flags */ | 17 | u_int8_t match, invert; /* flags */ |
| 18 | }; | 18 | }; |
diff --git a/include/linux/netfilter_ipv6/Kbuild b/include/linux/netfilter_ipv6/Kbuild index 8887a5fcd1d0..aca4bd1f6d7c 100644 --- a/include/linux/netfilter_ipv6/Kbuild +++ b/include/linux/netfilter_ipv6/Kbuild | |||
| @@ -11,6 +11,7 @@ header-y += ip6t_length.h | |||
| 11 | header-y += ip6t_limit.h | 11 | header-y += ip6t_limit.h |
| 12 | header-y += ip6t_mac.h | 12 | header-y += ip6t_mac.h |
| 13 | header-y += ip6t_mark.h | 13 | header-y += ip6t_mark.h |
| 14 | header-y += ip6t_mh.h | ||
| 14 | header-y += ip6t_multiport.h | 15 | header-y += ip6t_multiport.h |
| 15 | header-y += ip6t_opts.h | 16 | header-y += ip6t_opts.h |
| 16 | header-y += ip6t_owner.h | 17 | header-y += ip6t_owner.h |
diff --git a/include/linux/netfilter_ipv6/ip6t_owner.h b/include/linux/netfilter_ipv6/ip6t_owner.h index 19937da3d101..ec5cc7a38c42 100644 --- a/include/linux/netfilter_ipv6/ip6t_owner.h +++ b/include/linux/netfilter_ipv6/ip6t_owner.h | |||
| @@ -8,10 +8,10 @@ | |||
| 8 | #define IP6T_OWNER_SID 0x08 | 8 | #define IP6T_OWNER_SID 0x08 |
| 9 | 9 | ||
| 10 | struct ip6t_owner_info { | 10 | struct ip6t_owner_info { |
| 11 | uid_t uid; | 11 | __kernel_uid32_t uid; |
| 12 | gid_t gid; | 12 | __kernel_gid32_t gid; |
| 13 | pid_t pid; | 13 | __kernel_pid_t pid; |
| 14 | pid_t sid; | 14 | __kernel_pid_t sid; |
| 15 | u_int8_t match, invert; /* flags */ | 15 | u_int8_t match, invert; /* flags */ |
| 16 | }; | 16 | }; |
| 17 | 17 | ||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 51b09a1f46c3..5ba398e90304 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
| @@ -103,6 +103,8 @@ struct nlmsgerr | |||
| 103 | #define NETLINK_ADD_MEMBERSHIP 1 | 103 | #define NETLINK_ADD_MEMBERSHIP 1 |
| 104 | #define NETLINK_DROP_MEMBERSHIP 2 | 104 | #define NETLINK_DROP_MEMBERSHIP 2 |
| 105 | #define NETLINK_PKTINFO 3 | 105 | #define NETLINK_PKTINFO 3 |
| 106 | #define NETLINK_BROADCAST_ERROR 4 | ||
| 107 | #define NETLINK_NO_ENOBUFS 5 | ||
| 106 | 108 | ||
| 107 | struct nl_pktinfo | 109 | struct nl_pktinfo |
| 108 | { | 110 | { |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index e38d3c9dccda..de99025f2c5d 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
| @@ -63,6 +63,13 @@ static inline int netpoll_rx(struct sk_buff *skb) | |||
| 63 | return ret; | 63 | return ret; |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | static inline int netpoll_rx_on(struct sk_buff *skb) | ||
| 67 | { | ||
| 68 | struct netpoll_info *npinfo = skb->dev->npinfo; | ||
| 69 | |||
| 70 | return npinfo && (npinfo->rx_np || npinfo->rx_flags); | ||
| 71 | } | ||
| 72 | |||
| 66 | static inline int netpoll_receive_skb(struct sk_buff *skb) | 73 | static inline int netpoll_receive_skb(struct sk_buff *skb) |
| 67 | { | 74 | { |
| 68 | if (!list_empty(&skb->dev->napi_list)) | 75 | if (!list_empty(&skb->dev->napi_list)) |
| @@ -99,6 +106,10 @@ static inline int netpoll_rx(struct sk_buff *skb) | |||
| 99 | { | 106 | { |
| 100 | return 0; | 107 | return 0; |
| 101 | } | 108 | } |
| 109 | static inline int netpoll_rx_on(struct sk_buff *skb) | ||
| 110 | { | ||
| 111 | return 0; | ||
| 112 | } | ||
| 102 | static inline int netpoll_receive_skb(struct sk_buff *skb) | 113 | static inline int netpoll_receive_skb(struct sk_buff *skb) |
| 103 | { | 114 | { |
| 104 | return 0; | 115 | return 0; |
diff --git a/include/linux/nfs_idmap.h b/include/linux/nfs_idmap.h index 15a9f3b7289a..91a1c24e0cbf 100644 --- a/include/linux/nfs_idmap.h +++ b/include/linux/nfs_idmap.h | |||
| @@ -37,6 +37,8 @@ | |||
| 37 | #ifndef NFS_IDMAP_H | 37 | #ifndef NFS_IDMAP_H |
| 38 | #define NFS_IDMAP_H | 38 | #define NFS_IDMAP_H |
| 39 | 39 | ||
| 40 | #include <linux/types.h> | ||
| 41 | |||
| 40 | /* XXX from bits/utmp.h */ | 42 | /* XXX from bits/utmp.h */ |
| 41 | #define IDMAP_NAMESZ 128 | 43 | #define IDMAP_NAMESZ 128 |
| 42 | 44 | ||
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index a550b528319f..2e5f00066afd 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -406,6 +406,8 @@ struct nfs3_setaclargs { | |||
| 406 | int mask; | 406 | int mask; |
| 407 | struct posix_acl * acl_access; | 407 | struct posix_acl * acl_access; |
| 408 | struct posix_acl * acl_default; | 408 | struct posix_acl * acl_default; |
| 409 | size_t len; | ||
| 410 | unsigned int npages; | ||
| 409 | struct page ** pages; | 411 | struct page ** pages; |
| 410 | }; | 412 | }; |
| 411 | 413 | ||
diff --git a/include/linux/nfsacl.h b/include/linux/nfsacl.h index 54487a99beb8..43011b69297c 100644 --- a/include/linux/nfsacl.h +++ b/include/linux/nfsacl.h | |||
| @@ -37,6 +37,9 @@ | |||
| 37 | #define NFSACL_MAXPAGES ((2*(8+12*NFS_ACL_MAX_ENTRIES) + PAGE_SIZE-1) \ | 37 | #define NFSACL_MAXPAGES ((2*(8+12*NFS_ACL_MAX_ENTRIES) + PAGE_SIZE-1) \ |
| 38 | >> PAGE_SHIFT) | 38 | >> PAGE_SHIFT) |
| 39 | 39 | ||
| 40 | #define NFS_ACL_MAX_ENTRIES_INLINE (5) | ||
| 41 | #define NFS_ACL_INLINE_BUFSIZE ((2*(2+3*NFS_ACL_MAX_ENTRIES_INLINE)) << 2) | ||
| 42 | |||
| 40 | static inline unsigned int | 43 | static inline unsigned int |
| 41 | nfsacl_size(struct posix_acl *acl_access, struct posix_acl *acl_default) | 44 | nfsacl_size(struct posix_acl *acl_access, struct posix_acl *acl_default) |
| 42 | { | 45 | { |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 5431512b2757..bcd0201589f8 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
| @@ -10,9 +10,8 @@ | |||
| 10 | #ifndef NFSD_EXPORT_H | 10 | #ifndef NFSD_EXPORT_H |
| 11 | #define NFSD_EXPORT_H | 11 | #define NFSD_EXPORT_H |
| 12 | 12 | ||
| 13 | #include <asm/types.h> | ||
| 14 | #ifdef __KERNEL__ | ||
| 15 | # include <linux/types.h> | 13 | # include <linux/types.h> |
| 14 | #ifdef __KERNEL__ | ||
| 16 | # include <linux/in.h> | 15 | # include <linux/in.h> |
| 17 | #endif | 16 | #endif |
| 18 | 17 | ||
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index b2e093870bc6..fa317f6c154b 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
| @@ -14,9 +14,8 @@ | |||
| 14 | #ifndef _LINUX_NFSD_FH_H | 14 | #ifndef _LINUX_NFSD_FH_H |
| 15 | #define _LINUX_NFSD_FH_H | 15 | #define _LINUX_NFSD_FH_H |
| 16 | 16 | ||
| 17 | #include <asm/types.h> | ||
| 18 | #ifdef __KERNEL__ | ||
| 19 | # include <linux/types.h> | 17 | # include <linux/types.h> |
| 18 | #ifdef __KERNEL__ | ||
| 20 | # include <linux/string.h> | 19 | # include <linux/string.h> |
| 21 | # include <linux/fs.h> | 20 | # include <linux/fs.h> |
| 22 | #endif | 21 | #endif |
diff --git a/include/linux/nfsd/syscall.h b/include/linux/nfsd/syscall.h index 4e439765b705..7a3b565b898f 100644 --- a/include/linux/nfsd/syscall.h +++ b/include/linux/nfsd/syscall.h | |||
| @@ -9,9 +9,8 @@ | |||
| 9 | #ifndef NFSD_SYSCALL_H | 9 | #ifndef NFSD_SYSCALL_H |
| 10 | #define NFSD_SYSCALL_H | 10 | #define NFSD_SYSCALL_H |
| 11 | 11 | ||
| 12 | #include <asm/types.h> | ||
| 13 | #ifdef __KERNEL__ | ||
| 14 | # include <linux/types.h> | 12 | # include <linux/types.h> |
| 13 | #ifdef __KERNEL__ | ||
| 15 | # include <linux/in.h> | 14 | # include <linux/in.h> |
| 16 | #endif | 15 | #endif |
| 17 | #include <linux/posix_types.h> | 16 | #include <linux/posix_types.h> |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index e86ed59f9ad5..f33aa08dd9b3 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or | 47 | * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or |
| 48 | * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME, | 48 | * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME, |
| 49 | * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, and/or | 49 | * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, and/or |
| 50 | * %NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET. | 50 | * %NL80211_ATTR_WIPHY_CHANNEL_TYPE. |
| 51 | * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request | 51 | * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request |
| 52 | * or rename notification. Has attributes %NL80211_ATTR_WIPHY and | 52 | * or rename notification. Has attributes %NL80211_ATTR_WIPHY and |
| 53 | * %NL80211_ATTR_WIPHY_NAME. | 53 | * %NL80211_ATTR_WIPHY_NAME. |
| @@ -72,8 +72,8 @@ | |||
| 72 | * | 72 | * |
| 73 | * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified | 73 | * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified |
| 74 | * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. | 74 | * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. |
| 75 | * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT or | 75 | * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT, |
| 76 | * %NL80211_ATTR_KEY_THRESHOLD. | 76 | * %NL80211_ATTR_KEY_DEFAULT_MGMT, or %NL80211_ATTR_KEY_THRESHOLD. |
| 77 | * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA, | 77 | * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA, |
| 78 | * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER | 78 | * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER |
| 79 | * attributes. | 79 | * attributes. |
| @@ -84,7 +84,7 @@ | |||
| 84 | * %NL80222_CMD_NEW_BEACON message) | 84 | * %NL80222_CMD_NEW_BEACON message) |
| 85 | * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface | 85 | * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface |
| 86 | * using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD, | 86 | * using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD, |
| 87 | * %NL80211_BEACON_HEAD and %NL80211_BEACON_TAIL attributes. | 87 | * %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL attributes. |
| 88 | * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface, | 88 | * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface, |
| 89 | * parameters are like for %NL80211_CMD_SET_BEACON. | 89 | * parameters are like for %NL80211_CMD_SET_BEACON. |
| 90 | * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it | 90 | * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it |
| @@ -113,6 +113,8 @@ | |||
| 113 | * @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by | 113 | * @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by |
| 114 | * %NL80211_ATTR_IFINDEX. | 114 | * %NL80211_ATTR_IFINDEX. |
| 115 | * | 115 | * |
| 116 | * @NL80211_CMD_GET_REG: ask the wireless core to send us its currently set | ||
| 117 | * regulatory domain. | ||
| 116 | * @NL80211_CMD_SET_REG: Set current regulatory domain. CRDA sends this command | 118 | * @NL80211_CMD_SET_REG: Set current regulatory domain. CRDA sends this command |
| 117 | * after being queried by the kernel. CRDA replies by sending a regulatory | 119 | * after being queried by the kernel. CRDA replies by sending a regulatory |
| 118 | * domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our | 120 | * domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our |
| @@ -133,6 +135,32 @@ | |||
| 133 | * @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the | 135 | * @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the |
| 134 | * interface identified by %NL80211_ATTR_IFINDEX | 136 | * interface identified by %NL80211_ATTR_IFINDEX |
| 135 | * | 137 | * |
| 138 | * @NL80211_CMD_SET_MGMT_EXTRA_IE: Set extra IEs for management frames. The | ||
| 139 | * interface is identified with %NL80211_ATTR_IFINDEX and the management | ||
| 140 | * frame subtype with %NL80211_ATTR_MGMT_SUBTYPE. The extra IE data to be | ||
| 141 | * added to the end of the specified management frame is specified with | ||
| 142 | * %NL80211_ATTR_IE. If the command succeeds, the requested data will be | ||
| 143 | * added to all specified management frames generated by | ||
| 144 | * kernel/firmware/driver. | ||
| 145 | * | ||
| 146 | * @NL80211_CMD_GET_SCAN: get scan results | ||
| 147 | * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters | ||
| 148 | * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to | ||
| 149 | * NL80211_CMD_GET_SCAN and on the "scan" multicast group) | ||
| 150 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, | ||
| 151 | * partial scan results may be available | ||
| 152 | * | ||
| 153 | * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain | ||
| 154 | * has been changed and provides details of the request information | ||
| 155 | * that caused the change such as who initiated the regulatory request | ||
| 156 | * (%NL80211_ATTR_REG_INITIATOR), the wiphy_idx | ||
| 157 | * (%NL80211_ATTR_REG_ALPHA2) on which the request was made from if | ||
| 158 | * the initiator was %NL80211_REGDOM_SET_BY_COUNTRY_IE or | ||
| 159 | * %NL80211_REGDOM_SET_BY_DRIVER, the type of regulatory domain | ||
| 160 | * set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is | ||
| 161 | * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on | ||
| 162 | * to (%NL80211_ATTR_REG_ALPHA2). | ||
| 163 | * | ||
| 136 | * @NL80211_CMD_MAX: highest used command number | 164 | * @NL80211_CMD_MAX: highest used command number |
| 137 | * @__NL80211_CMD_AFTER_LAST: internal use | 165 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 138 | */ | 166 | */ |
| @@ -178,6 +206,17 @@ enum nl80211_commands { | |||
| 178 | NL80211_CMD_GET_MESH_PARAMS, | 206 | NL80211_CMD_GET_MESH_PARAMS, |
| 179 | NL80211_CMD_SET_MESH_PARAMS, | 207 | NL80211_CMD_SET_MESH_PARAMS, |
| 180 | 208 | ||
| 209 | NL80211_CMD_SET_MGMT_EXTRA_IE, | ||
| 210 | |||
| 211 | NL80211_CMD_GET_REG, | ||
| 212 | |||
| 213 | NL80211_CMD_GET_SCAN, | ||
| 214 | NL80211_CMD_TRIGGER_SCAN, | ||
| 215 | NL80211_CMD_NEW_SCAN_RESULTS, | ||
| 216 | NL80211_CMD_SCAN_ABORTED, | ||
| 217 | |||
| 218 | NL80211_CMD_REG_CHANGE, | ||
| 219 | |||
| 181 | /* add new commands above here */ | 220 | /* add new commands above here */ |
| 182 | 221 | ||
| 183 | /* used to define NL80211_CMD_MAX below */ | 222 | /* used to define NL80211_CMD_MAX below */ |
| @@ -190,6 +229,9 @@ enum nl80211_commands { | |||
| 190 | * here | 229 | * here |
| 191 | */ | 230 | */ |
| 192 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS | 231 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS |
| 232 | #define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE | ||
| 233 | |||
| 234 | #define NL80211_CMD_REG_CHANGE NL80211_CMD_REG_CHANGE | ||
| 193 | 235 | ||
| 194 | /** | 236 | /** |
| 195 | * enum nl80211_attrs - nl80211 netlink attributes | 237 | * enum nl80211_attrs - nl80211 netlink attributes |
| @@ -284,6 +326,29 @@ enum nl80211_commands { | |||
| 284 | * supported interface types, each a flag attribute with the number | 326 | * supported interface types, each a flag attribute with the number |
| 285 | * of the interface mode. | 327 | * of the interface mode. |
| 286 | * | 328 | * |
| 329 | * @NL80211_ATTR_MGMT_SUBTYPE: Management frame subtype for | ||
| 330 | * %NL80211_CMD_SET_MGMT_EXTRA_IE. | ||
| 331 | * | ||
| 332 | * @NL80211_ATTR_IE: Information element(s) data (used, e.g., with | ||
| 333 | * %NL80211_CMD_SET_MGMT_EXTRA_IE). | ||
| 334 | * | ||
| 335 | * @NL80211_ATTR_MAX_NUM_SCAN_SSIDS: number of SSIDs you can scan with | ||
| 336 | * a single scan request, a wiphy attribute. | ||
| 337 | * | ||
| 338 | * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz) | ||
| 339 | * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive | ||
| 340 | * scanning and include a zero-length SSID (wildcard) for wildcard scan | ||
| 341 | * @NL80211_ATTR_SCAN_GENERATION: the scan generation increases whenever the | ||
| 342 | * scan result list changes (BSS expired or added) so that applications | ||
| 343 | * can verify that they got a single, consistent snapshot (when all dump | ||
| 344 | * messages carried the same generation number) | ||
| 345 | * @NL80211_ATTR_BSS: scan result BSS | ||
| 346 | * | ||
| 347 | * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain | ||
| 348 | * currently in effect. This could be any of the %NL80211_REGDOM_SET_BY_* | ||
| 349 | * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently | ||
| 350 | * set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*) | ||
| 351 | * | ||
| 287 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 352 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 288 | * @__NL80211_ATTR_AFTER_LAST: internal use | 353 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 289 | */ | 354 | */ |
| @@ -346,6 +411,21 @@ enum nl80211_attrs { | |||
| 346 | NL80211_ATTR_WIPHY_FREQ, | 411 | NL80211_ATTR_WIPHY_FREQ, |
| 347 | NL80211_ATTR_WIPHY_CHANNEL_TYPE, | 412 | NL80211_ATTR_WIPHY_CHANNEL_TYPE, |
| 348 | 413 | ||
| 414 | NL80211_ATTR_KEY_DEFAULT_MGMT, | ||
| 415 | |||
| 416 | NL80211_ATTR_MGMT_SUBTYPE, | ||
| 417 | NL80211_ATTR_IE, | ||
| 418 | |||
| 419 | NL80211_ATTR_MAX_NUM_SCAN_SSIDS, | ||
| 420 | |||
| 421 | NL80211_ATTR_SCAN_FREQUENCIES, | ||
| 422 | NL80211_ATTR_SCAN_SSIDS, | ||
| 423 | NL80211_ATTR_SCAN_GENERATION, | ||
| 424 | NL80211_ATTR_BSS, | ||
| 425 | |||
| 426 | NL80211_ATTR_REG_INITIATOR, | ||
| 427 | NL80211_ATTR_REG_TYPE, | ||
| 428 | |||
| 349 | /* add attributes here, update the policy in nl80211.c */ | 429 | /* add attributes here, update the policy in nl80211.c */ |
| 350 | 430 | ||
| 351 | __NL80211_ATTR_AFTER_LAST, | 431 | __NL80211_ATTR_AFTER_LAST, |
| @@ -360,7 +440,11 @@ enum nl80211_attrs { | |||
| 360 | #define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES | 440 | #define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES |
| 361 | #define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS | 441 | #define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS |
| 362 | #define NL80211_ATTR_WIPHY_FREQ NL80211_ATTR_WIPHY_FREQ | 442 | #define NL80211_ATTR_WIPHY_FREQ NL80211_ATTR_WIPHY_FREQ |
| 363 | #define NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET | 443 | #define NL80211_ATTR_WIPHY_CHANNEL_TYPE NL80211_ATTR_WIPHY_CHANNEL_TYPE |
| 444 | #define NL80211_ATTR_MGMT_SUBTYPE NL80211_ATTR_MGMT_SUBTYPE | ||
| 445 | #define NL80211_ATTR_IE NL80211_ATTR_IE | ||
| 446 | #define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR | ||
| 447 | #define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE | ||
| 364 | 448 | ||
| 365 | #define NL80211_MAX_SUPP_RATES 32 | 449 | #define NL80211_MAX_SUPP_RATES 32 |
| 366 | #define NL80211_MAX_SUPP_REG_RULES 32 | 450 | #define NL80211_MAX_SUPP_REG_RULES 32 |
| @@ -412,12 +496,14 @@ enum nl80211_iftype { | |||
| 412 | * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames | 496 | * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames |
| 413 | * with short barker preamble | 497 | * with short barker preamble |
| 414 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable | 498 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable |
| 499 | * @NL80211_STA_FLAG_MFP: station uses management frame protection | ||
| 415 | */ | 500 | */ |
| 416 | enum nl80211_sta_flags { | 501 | enum nl80211_sta_flags { |
| 417 | __NL80211_STA_FLAG_INVALID, | 502 | __NL80211_STA_FLAG_INVALID, |
| 418 | NL80211_STA_FLAG_AUTHORIZED, | 503 | NL80211_STA_FLAG_AUTHORIZED, |
| 419 | NL80211_STA_FLAG_SHORT_PREAMBLE, | 504 | NL80211_STA_FLAG_SHORT_PREAMBLE, |
| 420 | NL80211_STA_FLAG_WME, | 505 | NL80211_STA_FLAG_WME, |
| 506 | NL80211_STA_FLAG_MFP, | ||
| 421 | 507 | ||
| 422 | /* keep last */ | 508 | /* keep last */ |
| 423 | __NL80211_STA_FLAG_AFTER_LAST, | 509 | __NL80211_STA_FLAG_AFTER_LAST, |
| @@ -465,6 +551,9 @@ enum nl80211_rate_info { | |||
| 465 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) | 551 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) |
| 466 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute | 552 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute |
| 467 | * containing info as possible, see &enum nl80211_sta_info_txrate. | 553 | * containing info as possible, see &enum nl80211_sta_info_txrate. |
| 554 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station) | ||
| 555 | * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this | ||
| 556 | * station) | ||
| 468 | */ | 557 | */ |
| 469 | enum nl80211_sta_info { | 558 | enum nl80211_sta_info { |
| 470 | __NL80211_STA_INFO_INVALID, | 559 | __NL80211_STA_INFO_INVALID, |
| @@ -476,6 +565,8 @@ enum nl80211_sta_info { | |||
| 476 | NL80211_STA_INFO_PLINK_STATE, | 565 | NL80211_STA_INFO_PLINK_STATE, |
| 477 | NL80211_STA_INFO_SIGNAL, | 566 | NL80211_STA_INFO_SIGNAL, |
| 478 | NL80211_STA_INFO_TX_BITRATE, | 567 | NL80211_STA_INFO_TX_BITRATE, |
| 568 | NL80211_STA_INFO_RX_PACKETS, | ||
| 569 | NL80211_STA_INFO_TX_PACKETS, | ||
| 479 | 570 | ||
| 480 | /* keep last */ | 571 | /* keep last */ |
| 481 | __NL80211_STA_INFO_AFTER_LAST, | 572 | __NL80211_STA_INFO_AFTER_LAST, |
| @@ -607,6 +698,48 @@ enum nl80211_bitrate_attr { | |||
| 607 | }; | 698 | }; |
| 608 | 699 | ||
| 609 | /** | 700 | /** |
| 701 | * enum nl80211_initiator - Indicates the initiator of a reg domain request | ||
| 702 | * @NL80211_REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world | ||
| 703 | * regulatory domain. | ||
| 704 | * @NL80211_REGDOM_SET_BY_USER: User asked the wireless core to set the | ||
| 705 | * regulatory domain. | ||
| 706 | * @NL80211_REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the | ||
| 707 | * wireless core it thinks its knows the regulatory domain we should be in. | ||
| 708 | * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an | ||
| 709 | * 802.11 country information element with regulatory information it | ||
| 710 | * thinks we should consider. | ||
| 711 | */ | ||
| 712 | enum nl80211_reg_initiator { | ||
| 713 | NL80211_REGDOM_SET_BY_CORE, | ||
| 714 | NL80211_REGDOM_SET_BY_USER, | ||
| 715 | NL80211_REGDOM_SET_BY_DRIVER, | ||
| 716 | NL80211_REGDOM_SET_BY_COUNTRY_IE, | ||
| 717 | }; | ||
| 718 | |||
| 719 | /** | ||
| 720 | * enum nl80211_reg_type - specifies the type of regulatory domain | ||
| 721 | * @NL80211_REGDOM_TYPE_COUNTRY: the regulatory domain set is one that pertains | ||
| 722 | * to a specific country. When this is set you can count on the | ||
| 723 | * ISO / IEC 3166 alpha2 country code being valid. | ||
| 724 | * @NL80211_REGDOM_TYPE_WORLD: the regulatory set domain is the world regulatory | ||
| 725 | * domain. | ||
| 726 | * @NL80211_REGDOM_TYPE_CUSTOM_WORLD: the regulatory domain set is a custom | ||
| 727 | * driver specific world regulatory domain. These do not apply system-wide | ||
| 728 | * and are only applicable to the individual devices which have requested | ||
| 729 | * them to be applied. | ||
| 730 | * @NL80211_REGDOM_TYPE_INTERSECTION: the regulatory domain set is the product | ||
| 731 | * of an intersection between two regulatory domains -- the previously | ||
| 732 | * set regulatory domain on the system and the last accepted regulatory | ||
| 733 | * domain request to be processed. | ||
| 734 | */ | ||
| 735 | enum nl80211_reg_type { | ||
| 736 | NL80211_REGDOM_TYPE_COUNTRY, | ||
| 737 | NL80211_REGDOM_TYPE_WORLD, | ||
| 738 | NL80211_REGDOM_TYPE_CUSTOM_WORLD, | ||
| 739 | NL80211_REGDOM_TYPE_INTERSECTION, | ||
| 740 | }; | ||
| 741 | |||
| 742 | /** | ||
| 610 | * enum nl80211_reg_rule_attr - regulatory rule attributes | 743 | * enum nl80211_reg_rule_attr - regulatory rule attributes |
| 611 | * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional | 744 | * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional |
| 612 | * considerations for a given frequency range. These are the | 745 | * considerations for a given frequency range. These are the |
| @@ -811,4 +944,38 @@ enum nl80211_channel_type { | |||
| 811 | NL80211_CHAN_HT40MINUS, | 944 | NL80211_CHAN_HT40MINUS, |
| 812 | NL80211_CHAN_HT40PLUS | 945 | NL80211_CHAN_HT40PLUS |
| 813 | }; | 946 | }; |
| 947 | |||
| 948 | /** | ||
| 949 | * enum nl80211_bss - netlink attributes for a BSS | ||
| 950 | * | ||
| 951 | * @__NL80211_BSS_INVALID: invalid | ||
| 952 | * @NL80211_BSS_FREQUENCY: frequency in MHz (u32) | ||
| 953 | * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64) | ||
| 954 | * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16) | ||
| 955 | * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16) | ||
| 956 | * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the | ||
| 957 | * raw information elements from the probe response/beacon (bin) | ||
| 958 | * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon | ||
| 959 | * in mBm (100 * dBm) (s32) | ||
| 960 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon | ||
| 961 | * in unspecified units, scaled to 0..100 (u8) | ||
| 962 | * @__NL80211_BSS_AFTER_LAST: internal | ||
| 963 | * @NL80211_BSS_MAX: highest BSS attribute | ||
| 964 | */ | ||
| 965 | enum nl80211_bss { | ||
| 966 | __NL80211_BSS_INVALID, | ||
| 967 | NL80211_BSS_BSSID, | ||
| 968 | NL80211_BSS_FREQUENCY, | ||
| 969 | NL80211_BSS_TSF, | ||
| 970 | NL80211_BSS_BEACON_INTERVAL, | ||
| 971 | NL80211_BSS_CAPABILITY, | ||
| 972 | NL80211_BSS_INFORMATION_ELEMENTS, | ||
| 973 | NL80211_BSS_SIGNAL_MBM, | ||
| 974 | NL80211_BSS_SIGNAL_UNSPEC, | ||
| 975 | |||
| 976 | /* keep last */ | ||
| 977 | __NL80211_BSS_AFTER_LAST, | ||
| 978 | NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1 | ||
| 979 | }; | ||
| 980 | |||
| 814 | #endif /* __LINUX_NL80211_H */ | 981 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/nubus.h b/include/linux/nubus.h index c4355076d1a5..e137b3c486a7 100644 --- a/include/linux/nubus.h +++ b/include/linux/nubus.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #ifndef LINUX_NUBUS_H | 12 | #ifndef LINUX_NUBUS_H |
| 13 | #define LINUX_NUBUS_H | 13 | #define LINUX_NUBUS_H |
| 14 | 14 | ||
| 15 | #include <linux/types.h> | ||
| 15 | #ifdef __KERNEL__ | 16 | #ifdef __KERNEL__ |
| 16 | #include <asm/nubus.h> | 17 | #include <asm/nubus.h> |
| 17 | #endif | 18 | #endif |
| @@ -236,6 +237,7 @@ struct nubus_dirent | |||
| 236 | int mask; | 237 | int mask; |
| 237 | }; | 238 | }; |
| 238 | 239 | ||
| 240 | #ifdef __KERNEL__ | ||
| 239 | struct nubus_board { | 241 | struct nubus_board { |
| 240 | struct nubus_board* next; | 242 | struct nubus_board* next; |
| 241 | struct nubus_dev* first_dev; | 243 | struct nubus_dev* first_dev; |
| @@ -350,6 +352,7 @@ void nubus_get_rsrc_mem(void* dest, | |||
| 350 | void nubus_get_rsrc_str(void* dest, | 352 | void nubus_get_rsrc_str(void* dest, |
| 351 | const struct nubus_dirent *dirent, | 353 | const struct nubus_dirent *dirent, |
| 352 | int maxlen); | 354 | int maxlen); |
| 355 | #endif /* __KERNEL__ */ | ||
| 353 | 356 | ||
| 354 | /* We'd like to get rid of this eventually. Only daynaport.c uses it now. */ | 357 | /* We'd like to get rid of this eventually. Only daynaport.c uses it now. */ |
| 355 | static inline void *nubus_slot_addr(int slot) | 358 | static inline void *nubus_slot_addr(int slot) |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 80f8b8b65fde..7bd624bfdcfd 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -117,6 +117,10 @@ typedef int __bitwise pci_power_t; | |||
| 117 | #define PCI_UNKNOWN ((pci_power_t __force) 5) | 117 | #define PCI_UNKNOWN ((pci_power_t __force) 5) |
| 118 | #define PCI_POWER_ERROR ((pci_power_t __force) -1) | 118 | #define PCI_POWER_ERROR ((pci_power_t __force) -1) |
| 119 | 119 | ||
| 120 | #define PCI_PM_D2_DELAY 200 | ||
| 121 | #define PCI_PM_D3_WAIT 10 | ||
| 122 | #define PCI_PM_BUS_WAIT 50 | ||
| 123 | |||
| 120 | /** The pci_channel state describes connectivity between the CPU and | 124 | /** The pci_channel state describes connectivity between the CPU and |
| 121 | * the pci device. If some PCI bus between here and the pci device | 125 | * the pci device. If some PCI bus between here and the pci device |
| 122 | * has crashed or locked up, this info is reflected here. | 126 | * has crashed or locked up, this info is reflected here. |
| @@ -252,6 +256,7 @@ struct pci_dev { | |||
| 252 | unsigned int ari_enabled:1; /* ARI forwarding */ | 256 | unsigned int ari_enabled:1; /* ARI forwarding */ |
| 253 | unsigned int is_managed:1; | 257 | unsigned int is_managed:1; |
| 254 | unsigned int is_pcie:1; | 258 | unsigned int is_pcie:1; |
| 259 | unsigned int state_saved:1; | ||
| 255 | pci_dev_flags_t dev_flags; | 260 | pci_dev_flags_t dev_flags; |
| 256 | atomic_t enable_cnt; /* pci_enable_device has been called */ | 261 | atomic_t enable_cnt; /* pci_enable_device has been called */ |
| 257 | 262 | ||
| @@ -679,7 +684,7 @@ int pci_enable_rom(struct pci_dev *pdev); | |||
| 679 | void pci_disable_rom(struct pci_dev *pdev); | 684 | void pci_disable_rom(struct pci_dev *pdev); |
| 680 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); | 685 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); |
| 681 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); | 686 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); |
| 682 | size_t pci_get_rom_size(void __iomem *rom, size_t size); | 687 | size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size); |
| 683 | 688 | ||
| 684 | /* Power management related routines */ | 689 | /* Power management related routines */ |
| 685 | int pci_save_state(struct pci_dev *dev); | 690 | int pci_save_state(struct pci_dev *dev); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index d56ad9c21c09..097f410edefa 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -834,6 +834,8 @@ | |||
| 834 | #define PCI_DEVICE_ID_PROMISE_20276 0x5275 | 834 | #define PCI_DEVICE_ID_PROMISE_20276 0x5275 |
| 835 | #define PCI_DEVICE_ID_PROMISE_20277 0x7275 | 835 | #define PCI_DEVICE_ID_PROMISE_20277 0x7275 |
| 836 | 836 | ||
| 837 | #define PCI_VENDOR_ID_FOXCONN 0x105b | ||
| 838 | |||
| 837 | #define PCI_VENDOR_ID_UMC 0x1060 | 839 | #define PCI_VENDOR_ID_UMC 0x1060 |
| 838 | #define PCI_DEVICE_ID_UMC_UM8673F 0x0101 | 840 | #define PCI_DEVICE_ID_UMC_UM8673F 0x0101 |
| 839 | #define PCI_DEVICE_ID_UMC_UM8886BF 0x673a | 841 | #define PCI_DEVICE_ID_UMC_UM8886BF 0x673a |
| @@ -1312,6 +1314,7 @@ | |||
| 1312 | #define PCI_DEVICE_ID_VIA_VT3351 0x0351 | 1314 | #define PCI_DEVICE_ID_VIA_VT3351 0x0351 |
| 1313 | #define PCI_DEVICE_ID_VIA_VT3364 0x0364 | 1315 | #define PCI_DEVICE_ID_VIA_VT3364 0x0364 |
| 1314 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 | 1316 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 |
| 1317 | #define PCI_DEVICE_ID_VIA_6415 0x0415 | ||
| 1315 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 | 1318 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 |
| 1316 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 | 1319 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 |
| 1317 | #define PCI_DEVICE_ID_VIA_82C586_1 0x0571 | 1320 | #define PCI_DEVICE_ID_VIA_82C586_1 0x0571 |
| @@ -1357,6 +1360,7 @@ | |||
| 1357 | #define PCI_DEVICE_ID_VIA_8783_0 0x3208 | 1360 | #define PCI_DEVICE_ID_VIA_8783_0 0x3208 |
| 1358 | #define PCI_DEVICE_ID_VIA_8237 0x3227 | 1361 | #define PCI_DEVICE_ID_VIA_8237 0x3227 |
| 1359 | #define PCI_DEVICE_ID_VIA_8251 0x3287 | 1362 | #define PCI_DEVICE_ID_VIA_8251 0x3287 |
| 1363 | #define PCI_DEVICE_ID_VIA_8261 0x3402 | ||
| 1360 | #define PCI_DEVICE_ID_VIA_8237A 0x3337 | 1364 | #define PCI_DEVICE_ID_VIA_8237A 0x3337 |
| 1361 | #define PCI_DEVICE_ID_VIA_8237S 0x3372 | 1365 | #define PCI_DEVICE_ID_VIA_8237S 0x3372 |
| 1362 | #define PCI_DEVICE_ID_VIA_SATA_EIDE 0x5324 | 1366 | #define PCI_DEVICE_ID_VIA_SATA_EIDE 0x5324 |
| @@ -1366,10 +1370,13 @@ | |||
| 1366 | #define PCI_DEVICE_ID_VIA_CX700 0x8324 | 1370 | #define PCI_DEVICE_ID_VIA_CX700 0x8324 |
| 1367 | #define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581 | 1371 | #define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581 |
| 1368 | #define PCI_DEVICE_ID_VIA_VX800 0x8353 | 1372 | #define PCI_DEVICE_ID_VIA_VX800 0x8353 |
| 1373 | #define PCI_DEVICE_ID_VIA_VX855 0x8409 | ||
| 1369 | #define PCI_DEVICE_ID_VIA_8371_1 0x8391 | 1374 | #define PCI_DEVICE_ID_VIA_8371_1 0x8391 |
| 1370 | #define PCI_DEVICE_ID_VIA_82C598_1 0x8598 | 1375 | #define PCI_DEVICE_ID_VIA_82C598_1 0x8598 |
| 1371 | #define PCI_DEVICE_ID_VIA_838X_1 0xB188 | 1376 | #define PCI_DEVICE_ID_VIA_838X_1 0xB188 |
| 1372 | #define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198 | 1377 | #define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198 |
| 1378 | #define PCI_DEVICE_ID_VIA_C409_IDE 0XC409 | ||
| 1379 | #define PCI_DEVICE_ID_VIA_ANON 0xFFFF | ||
| 1373 | 1380 | ||
| 1374 | #define PCI_VENDOR_ID_SIEMENS 0x110A | 1381 | #define PCI_VENDOR_ID_SIEMENS 0x110A |
| 1375 | #define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 | 1382 | #define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 |
| @@ -1440,6 +1447,7 @@ | |||
| 1440 | #define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 | 1447 | #define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 |
| 1441 | #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A 0x0072 | 1448 | #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A 0x0072 |
| 1442 | #define PCI_DEVICE_ID_DIGI_DF_M_A 0x0073 | 1449 | #define PCI_DEVICE_ID_DIGI_DF_M_A 0x0073 |
| 1450 | #define PCI_DEVICE_ID_DIGI_NEO_8 0x00B1 | ||
| 1443 | #define PCI_DEVICE_ID_NEO_2DB9 0x00C8 | 1451 | #define PCI_DEVICE_ID_NEO_2DB9 0x00C8 |
| 1444 | #define PCI_DEVICE_ID_NEO_2DB9PRI 0x00C9 | 1452 | #define PCI_DEVICE_ID_NEO_2DB9PRI 0x00C9 |
| 1445 | #define PCI_DEVICE_ID_NEO_2RJ45 0x00CA | 1453 | #define PCI_DEVICE_ID_NEO_2RJ45 0x00CA |
| @@ -1965,6 +1973,8 @@ | |||
| 1965 | 1973 | ||
| 1966 | #define PCI_VENDOR_ID_SAMSUNG 0x144d | 1974 | #define PCI_VENDOR_ID_SAMSUNG 0x144d |
| 1967 | 1975 | ||
| 1976 | #define PCI_VENDOR_ID_AMBIT 0x1468 | ||
| 1977 | |||
| 1968 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 | 1978 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 |
| 1969 | 1979 | ||
| 1970 | #define PCI_VENDOR_ID_TITAN 0x14D2 | 1980 | #define PCI_VENDOR_ID_TITAN 0x14D2 |
| @@ -2106,6 +2116,8 @@ | |||
| 2106 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c | 2116 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c |
| 2107 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 | 2117 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 |
| 2108 | 2118 | ||
| 2119 | #define PCI_VENDOR_ID_DFI 0x15bd | ||
| 2120 | |||
| 2109 | #define PCI_VENDOR_ID_QUICKNET 0x15e2 | 2121 | #define PCI_VENDOR_ID_QUICKNET 0x15e2 |
| 2110 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 | 2122 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 |
| 2111 | 2123 | ||
| @@ -2209,6 +2221,8 @@ | |||
| 2209 | 2221 | ||
| 2210 | #define PCI_VENDOR_ID_TOPSPIN 0x1867 | 2222 | #define PCI_VENDOR_ID_TOPSPIN 0x1867 |
| 2211 | 2223 | ||
| 2224 | #define PCI_VENDOR_ID_SILAN 0x1904 | ||
| 2225 | |||
| 2212 | #define PCI_VENDOR_ID_TDI 0x192E | 2226 | #define PCI_VENDOR_ID_TDI 0x192E |
| 2213 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 | 2227 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 |
| 2214 | 2228 | ||
| @@ -2317,6 +2331,9 @@ | |||
| 2317 | #define PCI_DEVICE_ID_INTEL_82378 0x0484 | 2331 | #define PCI_DEVICE_ID_INTEL_82378 0x0484 |
| 2318 | #define PCI_DEVICE_ID_INTEL_I960 0x0960 | 2332 | #define PCI_DEVICE_ID_INTEL_I960 0x0960 |
| 2319 | #define PCI_DEVICE_ID_INTEL_I960RM 0x0962 | 2333 | #define PCI_DEVICE_ID_INTEL_I960RM 0x0962 |
| 2334 | #define PCI_DEVICE_ID_INTEL_8257X_SOL 0x1062 | ||
| 2335 | #define PCI_DEVICE_ID_INTEL_82573E_SOL 0x1085 | ||
| 2336 | #define PCI_DEVICE_ID_INTEL_82573L_SOL 0x108F | ||
| 2320 | #define PCI_DEVICE_ID_INTEL_82815_MC 0x1130 | 2337 | #define PCI_DEVICE_ID_INTEL_82815_MC 0x1130 |
| 2321 | #define PCI_DEVICE_ID_INTEL_82815_CGC 0x1132 | 2338 | #define PCI_DEVICE_ID_INTEL_82815_CGC 0x1132 |
| 2322 | #define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221 | 2339 | #define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221 |
| @@ -2421,6 +2438,7 @@ | |||
| 2421 | #define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8 | 2438 | #define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8 |
| 2422 | #define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 | 2439 | #define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 |
| 2423 | #define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0 | 2440 | #define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0 |
| 2441 | #define PCI_DEVICE_ID_INTEL_TGP_LPC 0x27bc | ||
| 2424 | #define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd | 2442 | #define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd |
| 2425 | #define PCI_DEVICE_ID_INTEL_ICH7_17 0x27da | 2443 | #define PCI_DEVICE_ID_INTEL_ICH7_17 0x27da |
| 2426 | #define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd | 2444 | #define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd |
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h index 01b262959f2e..228b0b6306b0 100644 --- a/include/linux/pfkeyv2.h +++ b/include/linux/pfkeyv2.h | |||
| @@ -12,187 +12,187 @@ | |||
| 12 | #define PFKEYV2_REVISION 199806L | 12 | #define PFKEYV2_REVISION 199806L |
| 13 | 13 | ||
| 14 | struct sadb_msg { | 14 | struct sadb_msg { |
| 15 | uint8_t sadb_msg_version; | 15 | __u8 sadb_msg_version; |
| 16 | uint8_t sadb_msg_type; | 16 | __u8 sadb_msg_type; |
| 17 | uint8_t sadb_msg_errno; | 17 | __u8 sadb_msg_errno; |
| 18 | uint8_t sadb_msg_satype; | 18 | __u8 sadb_msg_satype; |
| 19 | uint16_t sadb_msg_len; | 19 | __u16 sadb_msg_len; |
| 20 | uint16_t sadb_msg_reserved; | 20 | __u16 sadb_msg_reserved; |
| 21 | uint32_t sadb_msg_seq; | 21 | __u32 sadb_msg_seq; |
| 22 | uint32_t sadb_msg_pid; | 22 | __u32 sadb_msg_pid; |
| 23 | } __attribute__((packed)); | 23 | } __attribute__((packed)); |
| 24 | /* sizeof(struct sadb_msg) == 16 */ | 24 | /* sizeof(struct sadb_msg) == 16 */ |
| 25 | 25 | ||
| 26 | struct sadb_ext { | 26 | struct sadb_ext { |
| 27 | uint16_t sadb_ext_len; | 27 | __u16 sadb_ext_len; |
| 28 | uint16_t sadb_ext_type; | 28 | __u16 sadb_ext_type; |
| 29 | } __attribute__((packed)); | 29 | } __attribute__((packed)); |
| 30 | /* sizeof(struct sadb_ext) == 4 */ | 30 | /* sizeof(struct sadb_ext) == 4 */ |
| 31 | 31 | ||
| 32 | struct sadb_sa { | 32 | struct sadb_sa { |
| 33 | uint16_t sadb_sa_len; | 33 | __u16 sadb_sa_len; |
| 34 | uint16_t sadb_sa_exttype; | 34 | __u16 sadb_sa_exttype; |
| 35 | __be32 sadb_sa_spi; | 35 | __be32 sadb_sa_spi; |
| 36 | uint8_t sadb_sa_replay; | 36 | __u8 sadb_sa_replay; |
| 37 | uint8_t sadb_sa_state; | 37 | __u8 sadb_sa_state; |
| 38 | uint8_t sadb_sa_auth; | 38 | __u8 sadb_sa_auth; |
| 39 | uint8_t sadb_sa_encrypt; | 39 | __u8 sadb_sa_encrypt; |
| 40 | uint32_t sadb_sa_flags; | 40 | __u32 sadb_sa_flags; |
| 41 | } __attribute__((packed)); | 41 | } __attribute__((packed)); |
| 42 | /* sizeof(struct sadb_sa) == 16 */ | 42 | /* sizeof(struct sadb_sa) == 16 */ |
| 43 | 43 | ||
| 44 | struct sadb_lifetime { | 44 | struct sadb_lifetime { |
| 45 | uint16_t sadb_lifetime_len; | 45 | __u16 sadb_lifetime_len; |
| 46 | uint16_t sadb_lifetime_exttype; | 46 | __u16 sadb_lifetime_exttype; |
| 47 | uint32_t sadb_lifetime_allocations; | 47 | __u32 sadb_lifetime_allocations; |
| 48 | uint64_t sadb_lifetime_bytes; | 48 | __u64 sadb_lifetime_bytes; |
| 49 | uint64_t sadb_lifetime_addtime; | 49 | __u64 sadb_lifetime_addtime; |
| 50 | uint64_t sadb_lifetime_usetime; | 50 | __u64 sadb_lifetime_usetime; |
| 51 | } __attribute__((packed)); | 51 | } __attribute__((packed)); |
| 52 | /* sizeof(struct sadb_lifetime) == 32 */ | 52 | /* sizeof(struct sadb_lifetime) == 32 */ |
| 53 | 53 | ||
| 54 | struct sadb_address { | 54 | struct sadb_address { |
| 55 | uint16_t sadb_address_len; | 55 | __u16 sadb_address_len; |
| 56 | uint16_t sadb_address_exttype; | 56 | __u16 sadb_address_exttype; |
| 57 | uint8_t sadb_address_proto; | 57 | __u8 sadb_address_proto; |
| 58 | uint8_t sadb_address_prefixlen; | 58 | __u8 sadb_address_prefixlen; |
| 59 | uint16_t sadb_address_reserved; | 59 | __u16 sadb_address_reserved; |
| 60 | } __attribute__((packed)); | 60 | } __attribute__((packed)); |
| 61 | /* sizeof(struct sadb_address) == 8 */ | 61 | /* sizeof(struct sadb_address) == 8 */ |
| 62 | 62 | ||
| 63 | struct sadb_key { | 63 | struct sadb_key { |
| 64 | uint16_t sadb_key_len; | 64 | __u16 sadb_key_len; |
| 65 | uint16_t sadb_key_exttype; | 65 | __u16 sadb_key_exttype; |
| 66 | uint16_t sadb_key_bits; | 66 | __u16 sadb_key_bits; |
| 67 | uint16_t sadb_key_reserved; | 67 | __u16 sadb_key_reserved; |
| 68 | } __attribute__((packed)); | 68 | } __attribute__((packed)); |
| 69 | /* sizeof(struct sadb_key) == 8 */ | 69 | /* sizeof(struct sadb_key) == 8 */ |
| 70 | 70 | ||
| 71 | struct sadb_ident { | 71 | struct sadb_ident { |
| 72 | uint16_t sadb_ident_len; | 72 | __u16 sadb_ident_len; |
| 73 | uint16_t sadb_ident_exttype; | 73 | __u16 sadb_ident_exttype; |
| 74 | uint16_t sadb_ident_type; | 74 | __u16 sadb_ident_type; |
| 75 | uint16_t sadb_ident_reserved; | 75 | __u16 sadb_ident_reserved; |
| 76 | uint64_t sadb_ident_id; | 76 | __u64 sadb_ident_id; |
| 77 | } __attribute__((packed)); | 77 | } __attribute__((packed)); |
| 78 | /* sizeof(struct sadb_ident) == 16 */ | 78 | /* sizeof(struct sadb_ident) == 16 */ |
| 79 | 79 | ||
| 80 | struct sadb_sens { | 80 | struct sadb_sens { |
| 81 | uint16_t sadb_sens_len; | 81 | __u16 sadb_sens_len; |
| 82 | uint16_t sadb_sens_exttype; | 82 | __u16 sadb_sens_exttype; |
| 83 | uint32_t sadb_sens_dpd; | 83 | __u32 sadb_sens_dpd; |
| 84 | uint8_t sadb_sens_sens_level; | 84 | __u8 sadb_sens_sens_level; |
| 85 | uint8_t sadb_sens_sens_len; | 85 | __u8 sadb_sens_sens_len; |
| 86 | uint8_t sadb_sens_integ_level; | 86 | __u8 sadb_sens_integ_level; |
| 87 | uint8_t sadb_sens_integ_len; | 87 | __u8 sadb_sens_integ_len; |
| 88 | uint32_t sadb_sens_reserved; | 88 | __u32 sadb_sens_reserved; |
| 89 | } __attribute__((packed)); | 89 | } __attribute__((packed)); |
| 90 | /* sizeof(struct sadb_sens) == 16 */ | 90 | /* sizeof(struct sadb_sens) == 16 */ |
| 91 | 91 | ||
| 92 | /* followed by: | 92 | /* followed by: |
| 93 | uint64_t sadb_sens_bitmap[sens_len]; | 93 | __u64 sadb_sens_bitmap[sens_len]; |
| 94 | uint64_t sadb_integ_bitmap[integ_len]; */ | 94 | __u64 sadb_integ_bitmap[integ_len]; */ |
| 95 | 95 | ||
| 96 | struct sadb_prop { | 96 | struct sadb_prop { |
| 97 | uint16_t sadb_prop_len; | 97 | __u16 sadb_prop_len; |
| 98 | uint16_t sadb_prop_exttype; | 98 | __u16 sadb_prop_exttype; |
| 99 | uint8_t sadb_prop_replay; | 99 | __u8 sadb_prop_replay; |
| 100 | uint8_t sadb_prop_reserved[3]; | 100 | __u8 sadb_prop_reserved[3]; |
| 101 | } __attribute__((packed)); | 101 | } __attribute__((packed)); |
| 102 | /* sizeof(struct sadb_prop) == 8 */ | 102 | /* sizeof(struct sadb_prop) == 8 */ |
| 103 | 103 | ||
| 104 | /* followed by: | 104 | /* followed by: |
| 105 | struct sadb_comb sadb_combs[(sadb_prop_len + | 105 | struct sadb_comb sadb_combs[(sadb_prop_len + |
| 106 | sizeof(uint64_t) - sizeof(struct sadb_prop)) / | 106 | sizeof(__u64) - sizeof(struct sadb_prop)) / |
| 107 | sizeof(struct sadb_comb)]; */ | 107 | sizeof(struct sadb_comb)]; */ |
| 108 | 108 | ||
| 109 | struct sadb_comb { | 109 | struct sadb_comb { |
| 110 | uint8_t sadb_comb_auth; | 110 | __u8 sadb_comb_auth; |
| 111 | uint8_t sadb_comb_encrypt; | 111 | __u8 sadb_comb_encrypt; |
| 112 | uint16_t sadb_comb_flags; | 112 | __u16 sadb_comb_flags; |
| 113 | uint16_t sadb_comb_auth_minbits; | 113 | __u16 sadb_comb_auth_minbits; |
| 114 | uint16_t sadb_comb_auth_maxbits; | 114 | __u16 sadb_comb_auth_maxbits; |
| 115 | uint16_t sadb_comb_encrypt_minbits; | 115 | __u16 sadb_comb_encrypt_minbits; |
| 116 | uint16_t sadb_comb_encrypt_maxbits; | 116 | __u16 sadb_comb_encrypt_maxbits; |
| 117 | uint32_t sadb_comb_reserved; | 117 | __u32 sadb_comb_reserved; |
| 118 | uint32_t sadb_comb_soft_allocations; | 118 | __u32 sadb_comb_soft_allocations; |
| 119 | uint32_t sadb_comb_hard_allocations; | 119 | __u32 sadb_comb_hard_allocations; |
| 120 | uint64_t sadb_comb_soft_bytes; | 120 | __u64 sadb_comb_soft_bytes; |
| 121 | uint64_t sadb_comb_hard_bytes; | 121 | __u64 sadb_comb_hard_bytes; |
| 122 | uint64_t sadb_comb_soft_addtime; | 122 | __u64 sadb_comb_soft_addtime; |
| 123 | uint64_t sadb_comb_hard_addtime; | 123 | __u64 sadb_comb_hard_addtime; |
| 124 | uint64_t sadb_comb_soft_usetime; | 124 | __u64 sadb_comb_soft_usetime; |
| 125 | uint64_t sadb_comb_hard_usetime; | 125 | __u64 sadb_comb_hard_usetime; |
| 126 | } __attribute__((packed)); | 126 | } __attribute__((packed)); |
| 127 | /* sizeof(struct sadb_comb) == 72 */ | 127 | /* sizeof(struct sadb_comb) == 72 */ |
| 128 | 128 | ||
| 129 | struct sadb_supported { | 129 | struct sadb_supported { |
| 130 | uint16_t sadb_supported_len; | 130 | __u16 sadb_supported_len; |
| 131 | uint16_t sadb_supported_exttype; | 131 | __u16 sadb_supported_exttype; |
| 132 | uint32_t sadb_supported_reserved; | 132 | __u32 sadb_supported_reserved; |
| 133 | } __attribute__((packed)); | 133 | } __attribute__((packed)); |
| 134 | /* sizeof(struct sadb_supported) == 8 */ | 134 | /* sizeof(struct sadb_supported) == 8 */ |
| 135 | 135 | ||
| 136 | /* followed by: | 136 | /* followed by: |
| 137 | struct sadb_alg sadb_algs[(sadb_supported_len + | 137 | struct sadb_alg sadb_algs[(sadb_supported_len + |
| 138 | sizeof(uint64_t) - sizeof(struct sadb_supported)) / | 138 | sizeof(__u64) - sizeof(struct sadb_supported)) / |
| 139 | sizeof(struct sadb_alg)]; */ | 139 | sizeof(struct sadb_alg)]; */ |
| 140 | 140 | ||
| 141 | struct sadb_alg { | 141 | struct sadb_alg { |
| 142 | uint8_t sadb_alg_id; | 142 | __u8 sadb_alg_id; |
| 143 | uint8_t sadb_alg_ivlen; | 143 | __u8 sadb_alg_ivlen; |
| 144 | uint16_t sadb_alg_minbits; | 144 | __u16 sadb_alg_minbits; |
| 145 | uint16_t sadb_alg_maxbits; | 145 | __u16 sadb_alg_maxbits; |
| 146 | uint16_t sadb_alg_reserved; | 146 | __u16 sadb_alg_reserved; |
| 147 | } __attribute__((packed)); | 147 | } __attribute__((packed)); |
| 148 | /* sizeof(struct sadb_alg) == 8 */ | 148 | /* sizeof(struct sadb_alg) == 8 */ |
| 149 | 149 | ||
| 150 | struct sadb_spirange { | 150 | struct sadb_spirange { |
| 151 | uint16_t sadb_spirange_len; | 151 | __u16 sadb_spirange_len; |
| 152 | uint16_t sadb_spirange_exttype; | 152 | __u16 sadb_spirange_exttype; |
| 153 | uint32_t sadb_spirange_min; | 153 | __u32 sadb_spirange_min; |
| 154 | uint32_t sadb_spirange_max; | 154 | __u32 sadb_spirange_max; |
| 155 | uint32_t sadb_spirange_reserved; | 155 | __u32 sadb_spirange_reserved; |
| 156 | } __attribute__((packed)); | 156 | } __attribute__((packed)); |
| 157 | /* sizeof(struct sadb_spirange) == 16 */ | 157 | /* sizeof(struct sadb_spirange) == 16 */ |
| 158 | 158 | ||
| 159 | struct sadb_x_kmprivate { | 159 | struct sadb_x_kmprivate { |
| 160 | uint16_t sadb_x_kmprivate_len; | 160 | __u16 sadb_x_kmprivate_len; |
| 161 | uint16_t sadb_x_kmprivate_exttype; | 161 | __u16 sadb_x_kmprivate_exttype; |
| 162 | uint32_t sadb_x_kmprivate_reserved; | 162 | __u32 sadb_x_kmprivate_reserved; |
| 163 | } __attribute__((packed)); | 163 | } __attribute__((packed)); |
| 164 | /* sizeof(struct sadb_x_kmprivate) == 8 */ | 164 | /* sizeof(struct sadb_x_kmprivate) == 8 */ |
| 165 | 165 | ||
| 166 | struct sadb_x_sa2 { | 166 | struct sadb_x_sa2 { |
| 167 | uint16_t sadb_x_sa2_len; | 167 | __u16 sadb_x_sa2_len; |
| 168 | uint16_t sadb_x_sa2_exttype; | 168 | __u16 sadb_x_sa2_exttype; |
| 169 | uint8_t sadb_x_sa2_mode; | 169 | __u8 sadb_x_sa2_mode; |
| 170 | uint8_t sadb_x_sa2_reserved1; | 170 | __u8 sadb_x_sa2_reserved1; |
| 171 | uint16_t sadb_x_sa2_reserved2; | 171 | __u16 sadb_x_sa2_reserved2; |
| 172 | uint32_t sadb_x_sa2_sequence; | 172 | __u32 sadb_x_sa2_sequence; |
| 173 | uint32_t sadb_x_sa2_reqid; | 173 | __u32 sadb_x_sa2_reqid; |
| 174 | } __attribute__((packed)); | 174 | } __attribute__((packed)); |
| 175 | /* sizeof(struct sadb_x_sa2) == 16 */ | 175 | /* sizeof(struct sadb_x_sa2) == 16 */ |
| 176 | 176 | ||
| 177 | struct sadb_x_policy { | 177 | struct sadb_x_policy { |
| 178 | uint16_t sadb_x_policy_len; | 178 | __u16 sadb_x_policy_len; |
| 179 | uint16_t sadb_x_policy_exttype; | 179 | __u16 sadb_x_policy_exttype; |
| 180 | uint16_t sadb_x_policy_type; | 180 | __u16 sadb_x_policy_type; |
| 181 | uint8_t sadb_x_policy_dir; | 181 | __u8 sadb_x_policy_dir; |
| 182 | uint8_t sadb_x_policy_reserved; | 182 | __u8 sadb_x_policy_reserved; |
| 183 | uint32_t sadb_x_policy_id; | 183 | __u32 sadb_x_policy_id; |
| 184 | uint32_t sadb_x_policy_priority; | 184 | __u32 sadb_x_policy_priority; |
| 185 | } __attribute__((packed)); | 185 | } __attribute__((packed)); |
| 186 | /* sizeof(struct sadb_x_policy) == 16 */ | 186 | /* sizeof(struct sadb_x_policy) == 16 */ |
| 187 | 187 | ||
| 188 | struct sadb_x_ipsecrequest { | 188 | struct sadb_x_ipsecrequest { |
| 189 | uint16_t sadb_x_ipsecrequest_len; | 189 | __u16 sadb_x_ipsecrequest_len; |
| 190 | uint16_t sadb_x_ipsecrequest_proto; | 190 | __u16 sadb_x_ipsecrequest_proto; |
| 191 | uint8_t sadb_x_ipsecrequest_mode; | 191 | __u8 sadb_x_ipsecrequest_mode; |
| 192 | uint8_t sadb_x_ipsecrequest_level; | 192 | __u8 sadb_x_ipsecrequest_level; |
| 193 | uint16_t sadb_x_ipsecrequest_reserved1; | 193 | __u16 sadb_x_ipsecrequest_reserved1; |
| 194 | uint32_t sadb_x_ipsecrequest_reqid; | 194 | __u32 sadb_x_ipsecrequest_reqid; |
| 195 | uint32_t sadb_x_ipsecrequest_reserved2; | 195 | __u32 sadb_x_ipsecrequest_reserved2; |
| 196 | } __attribute__((packed)); | 196 | } __attribute__((packed)); |
| 197 | /* sizeof(struct sadb_x_ipsecrequest) == 16 */ | 197 | /* sizeof(struct sadb_x_ipsecrequest) == 16 */ |
| 198 | 198 | ||
| @@ -200,38 +200,38 @@ struct sadb_x_ipsecrequest { | |||
| 200 | * type of NAT-T is supported, draft-ietf-ipsec-udp-encaps-06 | 200 | * type of NAT-T is supported, draft-ietf-ipsec-udp-encaps-06 |
| 201 | */ | 201 | */ |
| 202 | struct sadb_x_nat_t_type { | 202 | struct sadb_x_nat_t_type { |
| 203 | uint16_t sadb_x_nat_t_type_len; | 203 | __u16 sadb_x_nat_t_type_len; |
| 204 | uint16_t sadb_x_nat_t_type_exttype; | 204 | __u16 sadb_x_nat_t_type_exttype; |
| 205 | uint8_t sadb_x_nat_t_type_type; | 205 | __u8 sadb_x_nat_t_type_type; |
| 206 | uint8_t sadb_x_nat_t_type_reserved[3]; | 206 | __u8 sadb_x_nat_t_type_reserved[3]; |
| 207 | } __attribute__((packed)); | 207 | } __attribute__((packed)); |
| 208 | /* sizeof(struct sadb_x_nat_t_type) == 8 */ | 208 | /* sizeof(struct sadb_x_nat_t_type) == 8 */ |
| 209 | 209 | ||
| 210 | /* Pass a NAT Traversal port (Source or Dest port) */ | 210 | /* Pass a NAT Traversal port (Source or Dest port) */ |
| 211 | struct sadb_x_nat_t_port { | 211 | struct sadb_x_nat_t_port { |
| 212 | uint16_t sadb_x_nat_t_port_len; | 212 | __u16 sadb_x_nat_t_port_len; |
| 213 | uint16_t sadb_x_nat_t_port_exttype; | 213 | __u16 sadb_x_nat_t_port_exttype; |
| 214 | __be16 sadb_x_nat_t_port_port; | 214 | __be16 sadb_x_nat_t_port_port; |
| 215 | uint16_t sadb_x_nat_t_port_reserved; | 215 | __u16 sadb_x_nat_t_port_reserved; |
| 216 | } __attribute__((packed)); | 216 | } __attribute__((packed)); |
| 217 | /* sizeof(struct sadb_x_nat_t_port) == 8 */ | 217 | /* sizeof(struct sadb_x_nat_t_port) == 8 */ |
| 218 | 218 | ||
| 219 | /* Generic LSM security context */ | 219 | /* Generic LSM security context */ |
| 220 | struct sadb_x_sec_ctx { | 220 | struct sadb_x_sec_ctx { |
| 221 | uint16_t sadb_x_sec_len; | 221 | __u16 sadb_x_sec_len; |
| 222 | uint16_t sadb_x_sec_exttype; | 222 | __u16 sadb_x_sec_exttype; |
| 223 | uint8_t sadb_x_ctx_alg; /* LSMs: e.g., selinux == 1 */ | 223 | __u8 sadb_x_ctx_alg; /* LSMs: e.g., selinux == 1 */ |
| 224 | uint8_t sadb_x_ctx_doi; | 224 | __u8 sadb_x_ctx_doi; |
| 225 | uint16_t sadb_x_ctx_len; | 225 | __u16 sadb_x_ctx_len; |
| 226 | } __attribute__((packed)); | 226 | } __attribute__((packed)); |
| 227 | /* sizeof(struct sadb_sec_ctx) = 8 */ | 227 | /* sizeof(struct sadb_sec_ctx) = 8 */ |
| 228 | 228 | ||
| 229 | /* Used by MIGRATE to pass addresses IKE will use to perform | 229 | /* Used by MIGRATE to pass addresses IKE will use to perform |
| 230 | * negotiation with the peer */ | 230 | * negotiation with the peer */ |
| 231 | struct sadb_x_kmaddress { | 231 | struct sadb_x_kmaddress { |
| 232 | uint16_t sadb_x_kmaddress_len; | 232 | __u16 sadb_x_kmaddress_len; |
| 233 | uint16_t sadb_x_kmaddress_exttype; | 233 | __u16 sadb_x_kmaddress_exttype; |
| 234 | uint32_t sadb_x_kmaddress_reserved; | 234 | __u32 sadb_x_kmaddress_reserved; |
| 235 | } __attribute__((packed)); | 235 | } __attribute__((packed)); |
| 236 | /* sizeof(struct sadb_x_kmaddress) == 8 */ | 236 | /* sizeof(struct sadb_x_kmaddress) == 8 */ |
| 237 | 237 | ||
diff --git a/include/linux/phonet.h b/include/linux/phonet.h index 4157faa857b6..ee5e3c9e2bca 100644 --- a/include/linux/phonet.h +++ b/include/linux/phonet.h | |||
| @@ -23,6 +23,8 @@ | |||
| 23 | #ifndef LINUX_PHONET_H | 23 | #ifndef LINUX_PHONET_H |
| 24 | #define LINUX_PHONET_H | 24 | #define LINUX_PHONET_H |
| 25 | 25 | ||
| 26 | #include <linux/types.h> | ||
| 27 | |||
| 26 | /* Automatic protocol selection */ | 28 | /* Automatic protocol selection */ |
| 27 | #define PN_PROTO_TRANSPORT 0 | 29 | #define PN_PROTO_TRANSPORT 0 |
| 28 | /* Phonet datagram socket */ | 30 | /* Phonet datagram socket */ |
diff --git a/include/linux/phy.h b/include/linux/phy.h index d7e54d98869f..32cf14a4b034 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
| @@ -315,8 +315,7 @@ struct phy_device { | |||
| 315 | 315 | ||
| 316 | /* Interrupt and Polling infrastructure */ | 316 | /* Interrupt and Polling infrastructure */ |
| 317 | struct work_struct phy_queue; | 317 | struct work_struct phy_queue; |
| 318 | struct work_struct state_queue; | 318 | struct delayed_work state_queue; |
| 319 | struct timer_list phy_timer; | ||
| 320 | atomic_t irq_disable; | 319 | atomic_t irq_disable; |
| 321 | 320 | ||
| 322 | struct mutex lock; | 321 | struct mutex lock; |
diff --git a/include/linux/pim.h b/include/linux/pim.h index 1ba0661561a4..252bf6644c51 100644 --- a/include/linux/pim.h +++ b/include/linux/pim.h | |||
| @@ -4,14 +4,14 @@ | |||
| 4 | #include <asm/byteorder.h> | 4 | #include <asm/byteorder.h> |
| 5 | 5 | ||
| 6 | /* Message types - V1 */ | 6 | /* Message types - V1 */ |
| 7 | #define PIM_V1_VERSION __constant_htonl(0x10000000) | 7 | #define PIM_V1_VERSION cpu_to_be32(0x10000000) |
| 8 | #define PIM_V1_REGISTER 1 | 8 | #define PIM_V1_REGISTER 1 |
| 9 | 9 | ||
| 10 | /* Message types - V2 */ | 10 | /* Message types - V2 */ |
| 11 | #define PIM_VERSION 2 | 11 | #define PIM_VERSION 2 |
| 12 | #define PIM_REGISTER 1 | 12 | #define PIM_REGISTER 1 |
| 13 | 13 | ||
| 14 | #define PIM_NULL_REGISTER __constant_htonl(0x40000000) | 14 | #define PIM_NULL_REGISTER cpu_to_be32(0x40000000) |
| 15 | 15 | ||
| 16 | /* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */ | 16 | /* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */ |
| 17 | struct pimreghdr | 17 | struct pimreghdr |
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index e6aa8482ad7a..3c842edff388 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_PKT_CLS_H | 1 | #ifndef __LINUX_PKT_CLS_H |
| 2 | #define __LINUX_PKT_CLS_H | 2 | #define __LINUX_PKT_CLS_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/pkt_sched.h> | 5 | #include <linux/pkt_sched.h> |
| 5 | 6 | ||
| 6 | /* I think i could have done better macros ; for now this is stolen from | 7 | /* I think i could have done better macros ; for now this is stolen from |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index e3f133adba78..d51a2b3e221e 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef __LINUX_PKT_SCHED_H | 1 | #ifndef __LINUX_PKT_SCHED_H |
| 2 | #define __LINUX_PKT_SCHED_H | 2 | #define __LINUX_PKT_SCHED_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | /* Logical priority bands not depending on specific packet scheduler. | 6 | /* Logical priority bands not depending on specific packet scheduler. |
| 5 | Every scheduler will map them to real traffic classes, if it has | 7 | Every scheduler will map them to real traffic classes, if it has |
| 6 | no more precise mechanism to classify packets. | 8 | no more precise mechanism to classify packets. |
| @@ -513,7 +515,7 @@ enum | |||
| 513 | 515 | ||
| 514 | struct tc_drr_stats | 516 | struct tc_drr_stats |
| 515 | { | 517 | { |
| 516 | u32 deficit; | 518 | __u32 deficit; |
| 517 | }; | 519 | }; |
| 518 | 520 | ||
| 519 | #endif | 521 | #endif |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 9a342699c607..76e470a299bf 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #define _PLATFORM_DEVICE_H_ | 12 | #define _PLATFORM_DEVICE_H_ |
| 13 | 13 | ||
| 14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
| 15 | #include <linux/mod_devicetable.h> | ||
| 15 | 16 | ||
| 16 | struct platform_device { | 17 | struct platform_device { |
| 17 | const char * name; | 18 | const char * name; |
| @@ -19,8 +20,13 @@ struct platform_device { | |||
| 19 | struct device dev; | 20 | struct device dev; |
| 20 | u32 num_resources; | 21 | u32 num_resources; |
| 21 | struct resource * resource; | 22 | struct resource * resource; |
| 23 | void *platform_data; | ||
| 24 | |||
| 25 | struct platform_device_id *id_entry; | ||
| 22 | }; | 26 | }; |
| 23 | 27 | ||
| 28 | #define platform_get_device_id(pdev) ((pdev)->id_entry) | ||
| 29 | |||
| 24 | #define to_platform_device(x) container_of((x), struct platform_device, dev) | 30 | #define to_platform_device(x) container_of((x), struct platform_device, dev) |
| 25 | 31 | ||
| 26 | extern int platform_device_register(struct platform_device *); | 32 | extern int platform_device_register(struct platform_device *); |
| @@ -56,6 +62,7 @@ struct platform_driver { | |||
| 56 | int (*resume_early)(struct platform_device *); | 62 | int (*resume_early)(struct platform_device *); |
| 57 | int (*resume)(struct platform_device *); | 63 | int (*resume)(struct platform_device *); |
| 58 | struct device_driver driver; | 64 | struct device_driver driver; |
| 65 | struct platform_device_id *id_table; | ||
| 59 | }; | 66 | }; |
| 60 | 67 | ||
| 61 | extern int platform_driver_register(struct platform_driver *); | 68 | extern int platform_driver_register(struct platform_driver *); |
diff --git a/include/linux/plist.h b/include/linux/plist.h index 85de2f055874..45926d77d6ac 100644 --- a/include/linux/plist.h +++ b/include/linux/plist.h | |||
| @@ -96,6 +96,10 @@ struct plist_node { | |||
| 96 | # define PLIST_HEAD_LOCK_INIT(_lock) | 96 | # define PLIST_HEAD_LOCK_INIT(_lock) |
| 97 | #endif | 97 | #endif |
| 98 | 98 | ||
| 99 | #define _PLIST_HEAD_INIT(head) \ | ||
| 100 | .prio_list = LIST_HEAD_INIT((head).prio_list), \ | ||
| 101 | .node_list = LIST_HEAD_INIT((head).node_list) | ||
| 102 | |||
| 99 | /** | 103 | /** |
| 100 | * PLIST_HEAD_INIT - static struct plist_head initializer | 104 | * PLIST_HEAD_INIT - static struct plist_head initializer |
| 101 | * @head: struct plist_head variable name | 105 | * @head: struct plist_head variable name |
| @@ -103,8 +107,7 @@ struct plist_node { | |||
| 103 | */ | 107 | */ |
| 104 | #define PLIST_HEAD_INIT(head, _lock) \ | 108 | #define PLIST_HEAD_INIT(head, _lock) \ |
| 105 | { \ | 109 | { \ |
| 106 | .prio_list = LIST_HEAD_INIT((head).prio_list), \ | 110 | _PLIST_HEAD_INIT(head), \ |
| 107 | .node_list = LIST_HEAD_INIT((head).node_list), \ | ||
| 108 | PLIST_HEAD_LOCK_INIT(&(_lock)) \ | 111 | PLIST_HEAD_LOCK_INIT(&(_lock)) \ |
| 109 | } | 112 | } |
| 110 | 113 | ||
| @@ -116,7 +119,7 @@ struct plist_node { | |||
| 116 | #define PLIST_NODE_INIT(node, __prio) \ | 119 | #define PLIST_NODE_INIT(node, __prio) \ |
| 117 | { \ | 120 | { \ |
| 118 | .prio = (__prio), \ | 121 | .prio = (__prio), \ |
| 119 | .plist = PLIST_HEAD_INIT((node).plist, NULL), \ | 122 | .plist = { _PLIST_HEAD_INIT((node).plist) }, \ |
| 120 | } | 123 | } |
| 121 | 124 | ||
| 122 | /** | 125 | /** |
diff --git a/include/linux/pm.h b/include/linux/pm.h index de2e0a8f6728..1d4e2d289821 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
| @@ -381,10 +381,12 @@ struct dev_pm_info { | |||
| 381 | 381 | ||
| 382 | #ifdef CONFIG_PM_SLEEP | 382 | #ifdef CONFIG_PM_SLEEP |
| 383 | extern void device_pm_lock(void); | 383 | extern void device_pm_lock(void); |
| 384 | extern int sysdev_resume(void); | ||
| 384 | extern void device_power_up(pm_message_t state); | 385 | extern void device_power_up(pm_message_t state); |
| 385 | extern void device_resume(pm_message_t state); | 386 | extern void device_resume(pm_message_t state); |
| 386 | 387 | ||
| 387 | extern void device_pm_unlock(void); | 388 | extern void device_pm_unlock(void); |
| 389 | extern int sysdev_suspend(pm_message_t state); | ||
| 388 | extern int device_power_down(pm_message_t state); | 390 | extern int device_power_down(pm_message_t state); |
| 389 | extern int device_suspend(pm_message_t state); | 391 | extern int device_suspend(pm_message_t state); |
| 390 | extern int device_prepare_suspend(pm_message_t state); | 392 | extern int device_prepare_suspend(pm_message_t state); |
| @@ -398,6 +400,9 @@ extern void __suspend_report_result(const char *function, void *fn, int ret); | |||
| 398 | 400 | ||
| 399 | #else /* !CONFIG_PM_SLEEP */ | 401 | #else /* !CONFIG_PM_SLEEP */ |
| 400 | 402 | ||
| 403 | #define device_pm_lock() do {} while (0) | ||
| 404 | #define device_pm_unlock() do {} while (0) | ||
| 405 | |||
| 401 | static inline int device_suspend(pm_message_t state) | 406 | static inline int device_suspend(pm_message_t state) |
| 402 | { | 407 | { |
| 403 | return 0; | 408 | return 0; |
| @@ -407,6 +412,14 @@ static inline int device_suspend(pm_message_t state) | |||
| 407 | 412 | ||
| 408 | #endif /* !CONFIG_PM_SLEEP */ | 413 | #endif /* !CONFIG_PM_SLEEP */ |
| 409 | 414 | ||
| 415 | /* How to reorder dpm_list after device_move() */ | ||
| 416 | enum dpm_order { | ||
| 417 | DPM_ORDER_NONE, | ||
| 418 | DPM_ORDER_DEV_AFTER_PARENT, | ||
| 419 | DPM_ORDER_PARENT_BEFORE_DEV, | ||
| 420 | DPM_ORDER_DEV_LAST, | ||
| 421 | }; | ||
| 422 | |||
| 410 | /* | 423 | /* |
| 411 | * Global Power Management flags | 424 | * Global Power Management flags |
| 412 | * Used to keep APM and ACPI from both being active | 425 | * Used to keep APM and ACPI from both being active |
diff --git a/include/linux/ppp_channel.h b/include/linux/ppp_channel.h index a942892d6dfe..0d3fa63e90ea 100644 --- a/include/linux/ppp_channel.h +++ b/include/linux/ppp_channel.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/list.h> | 22 | #include <linux/list.h> |
| 23 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
| 24 | #include <linux/poll.h> | 24 | #include <linux/poll.h> |
| 25 | #include <net/net_namespace.h> | ||
| 25 | 26 | ||
| 26 | struct ppp_channel; | 27 | struct ppp_channel; |
| 27 | 28 | ||
| @@ -39,8 +40,8 @@ struct ppp_channel { | |||
| 39 | int mtu; /* max transmit packet size */ | 40 | int mtu; /* max transmit packet size */ |
| 40 | int hdrlen; /* amount of headroom channel needs */ | 41 | int hdrlen; /* amount of headroom channel needs */ |
| 41 | void *ppp; /* opaque to channel */ | 42 | void *ppp; /* opaque to channel */ |
| 42 | /* the following are not used at present */ | ||
| 43 | int speed; /* transfer rate (bytes/second) */ | 43 | int speed; /* transfer rate (bytes/second) */ |
| 44 | /* the following is not used at present */ | ||
| 44 | int latency; /* overhead time in milliseconds */ | 45 | int latency; /* overhead time in milliseconds */ |
| 45 | }; | 46 | }; |
| 46 | 47 | ||
| @@ -56,6 +57,9 @@ extern void ppp_input(struct ppp_channel *, struct sk_buff *); | |||
| 56 | that we may have missed a packet. */ | 57 | that we may have missed a packet. */ |
| 57 | extern void ppp_input_error(struct ppp_channel *, int code); | 58 | extern void ppp_input_error(struct ppp_channel *, int code); |
| 58 | 59 | ||
| 60 | /* Attach a channel to a given PPP unit in specified net. */ | ||
| 61 | extern int ppp_register_net_channel(struct net *, struct ppp_channel *); | ||
| 62 | |||
| 59 | /* Attach a channel to a given PPP unit. */ | 63 | /* Attach a channel to a given PPP unit. */ |
| 60 | extern int ppp_register_channel(struct ppp_channel *); | 64 | extern int ppp_register_channel(struct ppp_channel *); |
| 61 | 65 | ||
diff --git a/include/linux/ppp_defs.h b/include/linux/ppp_defs.h index 6e8adc77522c..0f93ed6b4a88 100644 --- a/include/linux/ppp_defs.h +++ b/include/linux/ppp_defs.h | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | * OR MODIFICATIONS. | 25 | * OR MODIFICATIONS. |
| 26 | */ | 26 | */ |
| 27 | 27 | ||
| 28 | #include <linux/types.h> | ||
| 29 | |||
| 28 | /* | 30 | /* |
| 29 | * ==FILEVERSION 20000114== | 31 | * ==FILEVERSION 20000114== |
| 30 | * | 32 | * |
| @@ -175,8 +177,8 @@ struct ppp_comp_stats { | |||
| 175 | * the last NP packet was sent or received. | 177 | * the last NP packet was sent or received. |
| 176 | */ | 178 | */ |
| 177 | struct ppp_idle { | 179 | struct ppp_idle { |
| 178 | time_t xmit_idle; /* time since last NP packet sent */ | 180 | __kernel_time_t xmit_idle; /* time since last NP packet sent */ |
| 179 | time_t recv_idle; /* time since last NP packet received */ | 181 | __kernel_time_t recv_idle; /* time since last NP packet received */ |
| 180 | }; | 182 | }; |
| 181 | 183 | ||
| 182 | #endif /* _PPP_DEFS_H_ */ | 184 | #endif /* _PPP_DEFS_H_ */ |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 21b781a3350f..0b35b3a1be05 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
| @@ -24,10 +24,8 @@ void sync_dquots(struct super_block *sb, int type); | |||
| 24 | 24 | ||
| 25 | int dquot_initialize(struct inode *inode, int type); | 25 | int dquot_initialize(struct inode *inode, int type); |
| 26 | int dquot_drop(struct inode *inode); | 26 | int dquot_drop(struct inode *inode); |
| 27 | int dquot_drop_locked(struct inode *inode); | ||
| 28 | struct dquot *dqget(struct super_block *sb, unsigned int id, int type); | 27 | struct dquot *dqget(struct super_block *sb, unsigned int id, int type); |
| 29 | void dqput(struct dquot *dquot); | 28 | void dqput(struct dquot *dquot); |
| 30 | int dquot_is_cached(struct super_block *sb, unsigned int id, int type); | ||
| 31 | int dquot_scan_active(struct super_block *sb, | 29 | int dquot_scan_active(struct super_block *sb, |
| 32 | int (*fn)(struct dquot *dquot, unsigned long priv), | 30 | int (*fn)(struct dquot *dquot, unsigned long priv), |
| 33 | unsigned long priv); | 31 | unsigned long priv); |
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index 9491026afe66..6ba830fa8538 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #ifndef _MD_P_H | 15 | #ifndef _MD_P_H |
| 16 | #define _MD_P_H | 16 | #define _MD_P_H |
| 17 | 17 | ||
| 18 | #include <linux/types.h> | ||
| 19 | |||
| 18 | /* | 20 | /* |
| 19 | * RAID superblock. | 21 | * RAID superblock. |
| 20 | * | 22 | * |
diff --git a/include/linux/random.h b/include/linux/random.h index 407ea3646f8f..25d02fe5c9b5 100644 --- a/include/linux/random.h +++ b/include/linux/random.h | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #ifndef _LINUX_RANDOM_H | 7 | #ifndef _LINUX_RANDOM_H |
| 8 | #define _LINUX_RANDOM_H | 8 | #define _LINUX_RANDOM_H |
| 9 | 9 | ||
| 10 | #include <linux/types.h> | ||
| 10 | #include <linux/ioctl.h> | 11 | #include <linux/ioctl.h> |
| 11 | #include <linux/irqnr.h> | 12 | #include <linux/irqnr.h> |
| 12 | 13 | ||
diff --git a/include/linux/rcuclassic.h b/include/linux/rcuclassic.h index f3f697df1d71..80044a4f3ab9 100644 --- a/include/linux/rcuclassic.h +++ b/include/linux/rcuclassic.h | |||
| @@ -181,4 +181,10 @@ extern long rcu_batches_completed_bh(void); | |||
| 181 | #define rcu_enter_nohz() do { } while (0) | 181 | #define rcu_enter_nohz() do { } while (0) |
| 182 | #define rcu_exit_nohz() do { } while (0) | 182 | #define rcu_exit_nohz() do { } while (0) |
| 183 | 183 | ||
| 184 | /* A context switch is a grace period for rcuclassic. */ | ||
| 185 | static inline int rcu_blocking_is_gp(void) | ||
| 186 | { | ||
| 187 | return num_online_cpus() == 1; | ||
| 188 | } | ||
| 189 | |||
| 184 | #endif /* __LINUX_RCUCLASSIC_H */ | 190 | #endif /* __LINUX_RCUCLASSIC_H */ |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 921340a7b71c..528343e6da51 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -52,6 +52,9 @@ struct rcu_head { | |||
| 52 | void (*func)(struct rcu_head *head); | 52 | void (*func)(struct rcu_head *head); |
| 53 | }; | 53 | }; |
| 54 | 54 | ||
| 55 | /* Internal to kernel, but needed by rcupreempt.h. */ | ||
| 56 | extern int rcu_scheduler_active; | ||
| 57 | |||
| 55 | #if defined(CONFIG_CLASSIC_RCU) | 58 | #if defined(CONFIG_CLASSIC_RCU) |
| 56 | #include <linux/rcuclassic.h> | 59 | #include <linux/rcuclassic.h> |
| 57 | #elif defined(CONFIG_TREE_RCU) | 60 | #elif defined(CONFIG_TREE_RCU) |
| @@ -265,6 +268,7 @@ extern void rcu_barrier_sched(void); | |||
| 265 | 268 | ||
| 266 | /* Internal to kernel */ | 269 | /* Internal to kernel */ |
| 267 | extern void rcu_init(void); | 270 | extern void rcu_init(void); |
| 271 | extern void rcu_scheduler_starting(void); | ||
| 268 | extern int rcu_needs_cpu(int cpu); | 272 | extern int rcu_needs_cpu(int cpu); |
| 269 | 273 | ||
| 270 | #endif /* __LINUX_RCUPDATE_H */ | 274 | #endif /* __LINUX_RCUPDATE_H */ |
diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h index 3e05c09b54a2..74304b4538d8 100644 --- a/include/linux/rcupreempt.h +++ b/include/linux/rcupreempt.h | |||
| @@ -142,4 +142,19 @@ static inline void rcu_exit_nohz(void) | |||
| 142 | #define rcu_exit_nohz() do { } while (0) | 142 | #define rcu_exit_nohz() do { } while (0) |
| 143 | #endif /* CONFIG_NO_HZ */ | 143 | #endif /* CONFIG_NO_HZ */ |
| 144 | 144 | ||
| 145 | /* | ||
| 146 | * A context switch is a grace period for rcupreempt synchronize_rcu() | ||
| 147 | * only during early boot, before the scheduler has been initialized. | ||
| 148 | * So, how the heck do we get a context switch? Well, if the caller | ||
| 149 | * invokes synchronize_rcu(), they are willing to accept a context | ||
| 150 | * switch, so we simply pretend that one happened. | ||
| 151 | * | ||
| 152 | * After boot, there might be a blocked or preempted task in an RCU | ||
| 153 | * read-side critical section, so we cannot then take the fastpath. | ||
| 154 | */ | ||
| 155 | static inline int rcu_blocking_is_gp(void) | ||
| 156 | { | ||
| 157 | return num_online_cpus() == 1 && !rcu_scheduler_active; | ||
| 158 | } | ||
| 159 | |||
| 145 | #endif /* __LINUX_RCUPREEMPT_H */ | 160 | #endif /* __LINUX_RCUPREEMPT_H */ |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index d4368b7975c3..a722fb67bb2d 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
| @@ -326,4 +326,10 @@ static inline void rcu_exit_nohz(void) | |||
| 326 | } | 326 | } |
| 327 | #endif /* CONFIG_NO_HZ */ | 327 | #endif /* CONFIG_NO_HZ */ |
| 328 | 328 | ||
| 329 | /* A context switch is a grace period for rcutree. */ | ||
| 330 | static inline int rcu_blocking_is_gp(void) | ||
| 331 | { | ||
| 332 | return num_online_cpus() == 1; | ||
| 333 | } | ||
| 334 | |||
| 329 | #endif /* __LINUX_RCUTREE_H */ | 335 | #endif /* __LINUX_RCUTREE_H */ |
diff --git a/include/linux/rds.h b/include/linux/rds.h new file mode 100644 index 000000000000..d91dc91f5443 --- /dev/null +++ b/include/linux/rds.h | |||
| @@ -0,0 +1,250 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2008 Oracle. All rights reserved. | ||
| 3 | * | ||
| 4 | * This software is available to you under a choice of one of two | ||
| 5 | * licenses. You may choose to be licensed under the terms of the GNU | ||
| 6 | * General Public License (GPL) Version 2, available from the file | ||
| 7 | * COPYING in the main directory of this source tree, or the | ||
| 8 | * OpenIB.org BSD license below: | ||
| 9 | * | ||
| 10 | * Redistribution and use in source and binary forms, with or | ||
| 11 | * without modification, are permitted provided that the following | ||
| 12 | * conditions are met: | ||
| 13 | * | ||
| 14 | * - Redistributions of source code must retain the above | ||
| 15 | * copyright notice, this list of conditions and the following | ||
| 16 | * disclaimer. | ||
| 17 | * | ||
| 18 | * - Redistributions in binary form must reproduce the above | ||
| 19 | * copyright notice, this list of conditions and the following | ||
| 20 | * disclaimer in the documentation and/or other materials | ||
| 21 | * provided with the distribution. | ||
| 22 | * | ||
| 23 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 24 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 25 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 26 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
| 27 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
| 28 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 29 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 30 | * SOFTWARE. | ||
| 31 | * | ||
| 32 | */ | ||
| 33 | |||
| 34 | #ifndef _LINUX_RDS_H | ||
| 35 | #define _LINUX_RDS_H | ||
| 36 | |||
| 37 | #include <linux/types.h> | ||
| 38 | |||
| 39 | /* These sparse annotated types shouldn't be in any user | ||
| 40 | * visible header file. We should clean this up rather | ||
| 41 | * than kludging around them. */ | ||
| 42 | #ifndef __KERNEL__ | ||
| 43 | #define __be16 u_int16_t | ||
| 44 | #define __be32 u_int32_t | ||
| 45 | #define __be64 u_int64_t | ||
| 46 | #endif | ||
| 47 | |||
| 48 | #define RDS_IB_ABI_VERSION 0x301 | ||
| 49 | |||
| 50 | /* | ||
| 51 | * setsockopt/getsockopt for SOL_RDS | ||
| 52 | */ | ||
| 53 | #define RDS_CANCEL_SENT_TO 1 | ||
| 54 | #define RDS_GET_MR 2 | ||
| 55 | #define RDS_FREE_MR 3 | ||
| 56 | /* deprecated: RDS_BARRIER 4 */ | ||
| 57 | #define RDS_RECVERR 5 | ||
| 58 | #define RDS_CONG_MONITOR 6 | ||
| 59 | |||
| 60 | /* | ||
| 61 | * Control message types for SOL_RDS. | ||
| 62 | * | ||
| 63 | * CMSG_RDMA_ARGS (sendmsg) | ||
| 64 | * Request a RDMA transfer to/from the specified | ||
| 65 | * memory ranges. | ||
| 66 | * The cmsg_data is a struct rds_rdma_args. | ||
| 67 | * RDS_CMSG_RDMA_DEST (recvmsg, sendmsg) | ||
| 68 | * Kernel informs application about intended | ||
| 69 | * source/destination of a RDMA transfer | ||
| 70 | * RDS_CMSG_RDMA_MAP (sendmsg) | ||
| 71 | * Application asks kernel to map the given | ||
| 72 | * memory range into a IB MR, and send the | ||
| 73 | * R_Key along in an RDS extension header. | ||
| 74 | * The cmsg_data is a struct rds_get_mr_args, | ||
| 75 | * the same as for the GET_MR setsockopt. | ||
| 76 | * RDS_CMSG_RDMA_STATUS (recvmsg) | ||
| 77 | * Returns the status of a completed RDMA operation. | ||
| 78 | */ | ||
| 79 | #define RDS_CMSG_RDMA_ARGS 1 | ||
| 80 | #define RDS_CMSG_RDMA_DEST 2 | ||
| 81 | #define RDS_CMSG_RDMA_MAP 3 | ||
| 82 | #define RDS_CMSG_RDMA_STATUS 4 | ||
| 83 | #define RDS_CMSG_CONG_UPDATE 5 | ||
| 84 | |||
| 85 | #define RDS_INFO_FIRST 10000 | ||
| 86 | #define RDS_INFO_COUNTERS 10000 | ||
| 87 | #define RDS_INFO_CONNECTIONS 10001 | ||
| 88 | /* 10002 aka RDS_INFO_FLOWS is deprecated */ | ||
| 89 | #define RDS_INFO_SEND_MESSAGES 10003 | ||
| 90 | #define RDS_INFO_RETRANS_MESSAGES 10004 | ||
| 91 | #define RDS_INFO_RECV_MESSAGES 10005 | ||
| 92 | #define RDS_INFO_SOCKETS 10006 | ||
| 93 | #define RDS_INFO_TCP_SOCKETS 10007 | ||
| 94 | #define RDS_INFO_IB_CONNECTIONS 10008 | ||
| 95 | #define RDS_INFO_CONNECTION_STATS 10009 | ||
| 96 | #define RDS_INFO_IWARP_CONNECTIONS 10010 | ||
| 97 | #define RDS_INFO_LAST 10010 | ||
| 98 | |||
| 99 | struct rds_info_counter { | ||
| 100 | u_int8_t name[32]; | ||
| 101 | u_int64_t value; | ||
| 102 | } __attribute__((packed)); | ||
| 103 | |||
| 104 | #define RDS_INFO_CONNECTION_FLAG_SENDING 0x01 | ||
| 105 | #define RDS_INFO_CONNECTION_FLAG_CONNECTING 0x02 | ||
| 106 | #define RDS_INFO_CONNECTION_FLAG_CONNECTED 0x04 | ||
| 107 | |||
| 108 | #define TRANSNAMSIZ 16 | ||
| 109 | |||
| 110 | struct rds_info_connection { | ||
| 111 | u_int64_t next_tx_seq; | ||
| 112 | u_int64_t next_rx_seq; | ||
| 113 | __be32 laddr; | ||
| 114 | __be32 faddr; | ||
| 115 | u_int8_t transport[TRANSNAMSIZ]; /* null term ascii */ | ||
| 116 | u_int8_t flags; | ||
| 117 | } __attribute__((packed)); | ||
| 118 | |||
| 119 | struct rds_info_flow { | ||
| 120 | __be32 laddr; | ||
| 121 | __be32 faddr; | ||
| 122 | u_int32_t bytes; | ||
| 123 | __be16 lport; | ||
| 124 | __be16 fport; | ||
| 125 | } __attribute__((packed)); | ||
| 126 | |||
| 127 | #define RDS_INFO_MESSAGE_FLAG_ACK 0x01 | ||
| 128 | #define RDS_INFO_MESSAGE_FLAG_FAST_ACK 0x02 | ||
| 129 | |||
| 130 | struct rds_info_message { | ||
| 131 | u_int64_t seq; | ||
| 132 | u_int32_t len; | ||
| 133 | __be32 laddr; | ||
| 134 | __be32 faddr; | ||
| 135 | __be16 lport; | ||
| 136 | __be16 fport; | ||
| 137 | u_int8_t flags; | ||
| 138 | } __attribute__((packed)); | ||
| 139 | |||
| 140 | struct rds_info_socket { | ||
| 141 | u_int32_t sndbuf; | ||
| 142 | __be32 bound_addr; | ||
| 143 | __be32 connected_addr; | ||
| 144 | __be16 bound_port; | ||
| 145 | __be16 connected_port; | ||
| 146 | u_int32_t rcvbuf; | ||
| 147 | u_int64_t inum; | ||
| 148 | } __attribute__((packed)); | ||
| 149 | |||
| 150 | #define RDS_IB_GID_LEN 16 | ||
| 151 | struct rds_info_rdma_connection { | ||
| 152 | __be32 src_addr; | ||
| 153 | __be32 dst_addr; | ||
| 154 | uint8_t src_gid[RDS_IB_GID_LEN]; | ||
| 155 | uint8_t dst_gid[RDS_IB_GID_LEN]; | ||
| 156 | |||
| 157 | uint32_t max_send_wr; | ||
| 158 | uint32_t max_recv_wr; | ||
| 159 | uint32_t max_send_sge; | ||
| 160 | uint32_t rdma_mr_max; | ||
| 161 | uint32_t rdma_mr_size; | ||
| 162 | }; | ||
| 163 | |||
| 164 | /* | ||
| 165 | * Congestion monitoring. | ||
| 166 | * Congestion control in RDS happens at the host connection | ||
| 167 | * level by exchanging a bitmap marking congested ports. | ||
| 168 | * By default, a process sleeping in poll() is always woken | ||
| 169 | * up when the congestion map is updated. | ||
| 170 | * With explicit monitoring, an application can have more | ||
| 171 | * fine-grained control. | ||
| 172 | * The application installs a 64bit mask value in the socket, | ||
| 173 | * where each bit corresponds to a group of ports. | ||
| 174 | * When a congestion update arrives, RDS checks the set of | ||
| 175 | * ports that are now uncongested against the list bit mask | ||
| 176 | * installed in the socket, and if they overlap, we queue a | ||
| 177 | * cong_notification on the socket. | ||
| 178 | * | ||
| 179 | * To install the congestion monitor bitmask, use RDS_CONG_MONITOR | ||
| 180 | * with the 64bit mask. | ||
| 181 | * Congestion updates are received via RDS_CMSG_CONG_UPDATE | ||
| 182 | * control messages. | ||
| 183 | * | ||
| 184 | * The correspondence between bits and ports is | ||
| 185 | * 1 << (portnum % 64) | ||
| 186 | */ | ||
| 187 | #define RDS_CONG_MONITOR_SIZE 64 | ||
| 188 | #define RDS_CONG_MONITOR_BIT(port) (((unsigned int) port) % RDS_CONG_MONITOR_SIZE) | ||
| 189 | #define RDS_CONG_MONITOR_MASK(port) (1ULL << RDS_CONG_MONITOR_BIT(port)) | ||
| 190 | |||
| 191 | /* | ||
| 192 | * RDMA related types | ||
| 193 | */ | ||
| 194 | |||
| 195 | /* | ||
| 196 | * This encapsulates a remote memory location. | ||
| 197 | * In the current implementation, it contains the R_Key | ||
| 198 | * of the remote memory region, and the offset into it | ||
| 199 | * (so that the application does not have to worry about | ||
| 200 | * alignment). | ||
| 201 | */ | ||
| 202 | typedef u_int64_t rds_rdma_cookie_t; | ||
| 203 | |||
| 204 | struct rds_iovec { | ||
| 205 | u_int64_t addr; | ||
| 206 | u_int64_t bytes; | ||
| 207 | }; | ||
| 208 | |||
| 209 | struct rds_get_mr_args { | ||
| 210 | struct rds_iovec vec; | ||
| 211 | u_int64_t cookie_addr; | ||
| 212 | uint64_t flags; | ||
| 213 | }; | ||
| 214 | |||
| 215 | struct rds_free_mr_args { | ||
| 216 | rds_rdma_cookie_t cookie; | ||
| 217 | u_int64_t flags; | ||
| 218 | }; | ||
| 219 | |||
| 220 | struct rds_rdma_args { | ||
| 221 | rds_rdma_cookie_t cookie; | ||
| 222 | struct rds_iovec remote_vec; | ||
| 223 | u_int64_t local_vec_addr; | ||
| 224 | u_int64_t nr_local; | ||
| 225 | u_int64_t flags; | ||
| 226 | u_int64_t user_token; | ||
| 227 | }; | ||
| 228 | |||
| 229 | struct rds_rdma_notify { | ||
| 230 | u_int64_t user_token; | ||
| 231 | int32_t status; | ||
| 232 | }; | ||
| 233 | |||
| 234 | #define RDS_RDMA_SUCCESS 0 | ||
| 235 | #define RDS_RDMA_REMOTE_ERROR 1 | ||
| 236 | #define RDS_RDMA_CANCELED 2 | ||
| 237 | #define RDS_RDMA_DROPPED 3 | ||
| 238 | #define RDS_RDMA_OTHER_ERROR 4 | ||
| 239 | |||
| 240 | /* | ||
| 241 | * Common set of flags for all RDMA related structs | ||
| 242 | */ | ||
| 243 | #define RDS_RDMA_READWRITE 0x0001 | ||
| 244 | #define RDS_RDMA_FENCE 0x0002 /* use FENCE for immediate send */ | ||
| 245 | #define RDS_RDMA_INVALIDATE 0x0004 /* invalidate R_Key after freeing MR */ | ||
| 246 | #define RDS_RDMA_USE_ONCE 0x0008 /* free MR after use */ | ||
| 247 | #define RDS_RDMA_DONTWAIT 0x0010 /* Don't wait in SET_BARRIER */ | ||
| 248 | #define RDS_RDMA_NOTIFY_ME 0x0020 /* Notify when operation completes */ | ||
| 249 | |||
| 250 | #endif /* IB_RDS_H */ | ||
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index bc5114d35e99..e356c99f0659 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
| @@ -28,8 +28,6 @@ | |||
| 28 | #include <linux/reiserfs_fs_sb.h> | 28 | #include <linux/reiserfs_fs_sb.h> |
| 29 | #endif | 29 | #endif |
| 30 | 30 | ||
| 31 | struct fid; | ||
| 32 | |||
| 33 | /* | 31 | /* |
| 34 | * include/linux/reiser_fs.h | 32 | * include/linux/reiser_fs.h |
| 35 | * | 33 | * |
| @@ -37,6 +35,33 @@ struct fid; | |||
| 37 | * | 35 | * |
| 38 | */ | 36 | */ |
| 39 | 37 | ||
| 38 | /* ioctl's command */ | ||
| 39 | #define REISERFS_IOC_UNPACK _IOW(0xCD,1,long) | ||
| 40 | /* define following flags to be the same as in ext2, so that chattr(1), | ||
| 41 | lsattr(1) will work with us. */ | ||
| 42 | #define REISERFS_IOC_GETFLAGS FS_IOC_GETFLAGS | ||
| 43 | #define REISERFS_IOC_SETFLAGS FS_IOC_SETFLAGS | ||
| 44 | #define REISERFS_IOC_GETVERSION FS_IOC_GETVERSION | ||
| 45 | #define REISERFS_IOC_SETVERSION FS_IOC_SETVERSION | ||
| 46 | |||
| 47 | #ifdef __KERNEL__ | ||
| 48 | /* the 32 bit compat definitions with int argument */ | ||
| 49 | #define REISERFS_IOC32_UNPACK _IOW(0xCD, 1, int) | ||
| 50 | #define REISERFS_IOC32_GETFLAGS FS_IOC32_GETFLAGS | ||
| 51 | #define REISERFS_IOC32_SETFLAGS FS_IOC32_SETFLAGS | ||
| 52 | #define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION | ||
| 53 | #define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION | ||
| 54 | |||
| 55 | /* Locking primitives */ | ||
| 56 | /* Right now we are still falling back to (un)lock_kernel, but eventually that | ||
| 57 | would evolve into real per-fs locks */ | ||
| 58 | #define reiserfs_write_lock( sb ) lock_kernel() | ||
| 59 | #define reiserfs_write_unlock( sb ) unlock_kernel() | ||
| 60 | |||
| 61 | /* xattr stuff */ | ||
| 62 | #define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem) | ||
| 63 | struct fid; | ||
| 64 | |||
| 40 | /* in reading the #defines, it may help to understand that they employ | 65 | /* in reading the #defines, it may help to understand that they employ |
| 41 | the following abbreviations: | 66 | the following abbreviations: |
| 42 | 67 | ||
| @@ -698,6 +723,7 @@ static inline void cpu_key_k_offset_dec(struct cpu_key *key) | |||
| 698 | /* object identifier for root dir */ | 723 | /* object identifier for root dir */ |
| 699 | #define REISERFS_ROOT_OBJECTID 2 | 724 | #define REISERFS_ROOT_OBJECTID 2 |
| 700 | #define REISERFS_ROOT_PARENT_OBJECTID 1 | 725 | #define REISERFS_ROOT_PARENT_OBJECTID 1 |
| 726 | |||
| 701 | extern struct reiserfs_key root_key; | 727 | extern struct reiserfs_key root_key; |
| 702 | 728 | ||
| 703 | /* | 729 | /* |
| @@ -1540,7 +1566,6 @@ struct reiserfs_iget_args { | |||
| 1540 | /* FUNCTION DECLARATIONS */ | 1566 | /* FUNCTION DECLARATIONS */ |
| 1541 | /***************************************************************************/ | 1567 | /***************************************************************************/ |
| 1542 | 1568 | ||
| 1543 | /*#ifdef __KERNEL__*/ | ||
| 1544 | #define get_journal_desc_magic(bh) (bh->b_data + bh->b_size - 12) | 1569 | #define get_journal_desc_magic(bh) (bh->b_data + bh->b_size - 12) |
| 1545 | 1570 | ||
| 1546 | #define journal_trans_half(blocksize) \ | 1571 | #define journal_trans_half(blocksize) \ |
| @@ -2178,29 +2203,6 @@ long reiserfs_compat_ioctl(struct file *filp, | |||
| 2178 | unsigned int cmd, unsigned long arg); | 2203 | unsigned int cmd, unsigned long arg); |
| 2179 | int reiserfs_unpack(struct inode *inode, struct file *filp); | 2204 | int reiserfs_unpack(struct inode *inode, struct file *filp); |
| 2180 | 2205 | ||
| 2181 | /* ioctl's command */ | ||
| 2182 | #define REISERFS_IOC_UNPACK _IOW(0xCD,1,long) | ||
| 2183 | /* define following flags to be the same as in ext2, so that chattr(1), | ||
| 2184 | lsattr(1) will work with us. */ | ||
| 2185 | #define REISERFS_IOC_GETFLAGS FS_IOC_GETFLAGS | ||
| 2186 | #define REISERFS_IOC_SETFLAGS FS_IOC_SETFLAGS | ||
| 2187 | #define REISERFS_IOC_GETVERSION FS_IOC_GETVERSION | ||
| 2188 | #define REISERFS_IOC_SETVERSION FS_IOC_SETVERSION | ||
| 2189 | |||
| 2190 | /* the 32 bit compat definitions with int argument */ | ||
| 2191 | #define REISERFS_IOC32_UNPACK _IOW(0xCD, 1, int) | ||
| 2192 | #define REISERFS_IOC32_GETFLAGS FS_IOC32_GETFLAGS | ||
| 2193 | #define REISERFS_IOC32_SETFLAGS FS_IOC32_SETFLAGS | ||
| 2194 | #define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION | ||
| 2195 | #define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION | ||
| 2196 | |||
| 2197 | /* Locking primitives */ | ||
| 2198 | /* Right now we are still falling back to (un)lock_kernel, but eventually that | ||
| 2199 | would evolve into real per-fs locks */ | ||
| 2200 | #define reiserfs_write_lock( sb ) lock_kernel() | ||
| 2201 | #define reiserfs_write_unlock( sb ) unlock_kernel() | ||
| 2202 | |||
| 2203 | /* xattr stuff */ | ||
| 2204 | #define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem) | ||
| 2205 | 2206 | ||
| 2207 | #endif /* __KERNEL__ */ | ||
| 2206 | #endif /* _LINUX_REISER_FS_H */ | 2208 | #endif /* _LINUX_REISER_FS_H */ |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index e88f7058b3a1..ba3254ecf7fb 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_RTNETLINK_H | 1 | #ifndef __LINUX_RTNETLINK_H |
| 2 | #define __LINUX_RTNETLINK_H | 2 | #define __LINUX_RTNETLINK_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
| 5 | #include <linux/if_link.h> | 6 | #include <linux/if_link.h> |
| 6 | #include <linux/if_addr.h> | 7 | #include <linux/if_addr.h> |
| @@ -216,6 +217,7 @@ enum | |||
| 216 | #define RTPROT_DNROUTED 13 /* DECnet routing daemon */ | 217 | #define RTPROT_DNROUTED 13 /* DECnet routing daemon */ |
| 217 | #define RTPROT_XORP 14 /* XORP */ | 218 | #define RTPROT_XORP 14 /* XORP */ |
| 218 | #define RTPROT_NTK 15 /* Netsukuku */ | 219 | #define RTPROT_NTK 15 /* Netsukuku */ |
| 220 | #define RTPROT_DHCP 16 /* DHCP client */ | ||
| 219 | 221 | ||
| 220 | /* rtm_scope | 222 | /* rtm_scope |
| 221 | 223 | ||
| @@ -621,8 +623,8 @@ static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) | |||
| 621 | 623 | ||
| 622 | extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 group, int echo); | 624 | extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 group, int echo); |
| 623 | extern int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid); | 625 | extern int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid); |
| 624 | extern int rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, u32 group, | 626 | extern void rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, |
| 625 | struct nlmsghdr *nlh, gfp_t flags); | 627 | u32 group, struct nlmsghdr *nlh, gfp_t flags); |
| 626 | extern void rtnl_set_sk_err(struct net *net, u32 group, int error); | 628 | extern void rtnl_set_sk_err(struct net *net, u32 group, int error); |
| 627 | extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics); | 629 | extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics); |
| 628 | extern int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, | 630 | extern int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 4cae9b81a1f8..ff904b0606d4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -293,6 +293,9 @@ extern void sched_show_task(struct task_struct *p); | |||
| 293 | extern void softlockup_tick(void); | 293 | extern void softlockup_tick(void); |
| 294 | extern void touch_softlockup_watchdog(void); | 294 | extern void touch_softlockup_watchdog(void); |
| 295 | extern void touch_all_softlockup_watchdogs(void); | 295 | extern void touch_all_softlockup_watchdogs(void); |
| 296 | extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write, | ||
| 297 | struct file *filp, void __user *buffer, | ||
| 298 | size_t *lenp, loff_t *ppos); | ||
| 296 | extern unsigned int softlockup_panic; | 299 | extern unsigned int softlockup_panic; |
| 297 | extern unsigned long sysctl_hung_task_check_count; | 300 | extern unsigned long sysctl_hung_task_check_count; |
| 298 | extern unsigned long sysctl_hung_task_timeout_secs; | 301 | extern unsigned long sysctl_hung_task_timeout_secs; |
| @@ -456,16 +459,27 @@ struct task_cputime { | |||
| 456 | #define virt_exp utime | 459 | #define virt_exp utime |
| 457 | #define sched_exp sum_exec_runtime | 460 | #define sched_exp sum_exec_runtime |
| 458 | 461 | ||
| 462 | #define INIT_CPUTIME \ | ||
| 463 | (struct task_cputime) { \ | ||
| 464 | .utime = cputime_zero, \ | ||
| 465 | .stime = cputime_zero, \ | ||
| 466 | .sum_exec_runtime = 0, \ | ||
| 467 | } | ||
| 468 | |||
| 459 | /** | 469 | /** |
| 460 | * struct thread_group_cputime - thread group interval timer counts | 470 | * struct thread_group_cputimer - thread group interval timer counts |
| 461 | * @totals: thread group interval timers; substructure for | 471 | * @cputime: thread group interval timers. |
| 462 | * uniprocessor kernel, per-cpu for SMP kernel. | 472 | * @running: non-zero when there are timers running and |
| 473 | * @cputime receives updates. | ||
| 474 | * @lock: lock for fields in this struct. | ||
| 463 | * | 475 | * |
| 464 | * This structure contains the version of task_cputime, above, that is | 476 | * This structure contains the version of task_cputime, above, that is |
| 465 | * used for thread group CPU clock calculations. | 477 | * used for thread group CPU timer calculations. |
| 466 | */ | 478 | */ |
| 467 | struct thread_group_cputime { | 479 | struct thread_group_cputimer { |
| 468 | struct task_cputime *totals; | 480 | struct task_cputime cputime; |
| 481 | int running; | ||
| 482 | spinlock_t lock; | ||
| 469 | }; | 483 | }; |
| 470 | 484 | ||
| 471 | /* | 485 | /* |
| @@ -514,10 +528,10 @@ struct signal_struct { | |||
| 514 | cputime_t it_prof_incr, it_virt_incr; | 528 | cputime_t it_prof_incr, it_virt_incr; |
| 515 | 529 | ||
| 516 | /* | 530 | /* |
| 517 | * Thread group totals for process CPU clocks. | 531 | * Thread group totals for process CPU timers. |
| 518 | * See thread_group_cputime(), et al, for details. | 532 | * See thread_group_cputimer(), et al, for details. |
| 519 | */ | 533 | */ |
| 520 | struct thread_group_cputime cputime; | 534 | struct thread_group_cputimer cputimer; |
| 521 | 535 | ||
| 522 | /* Earliest-expiration cache. */ | 536 | /* Earliest-expiration cache. */ |
| 523 | struct task_cputime cputime_expires; | 537 | struct task_cputime cputime_expires; |
| @@ -554,7 +568,7 @@ struct signal_struct { | |||
| 554 | * Live threads maintain their own counters and add to these | 568 | * Live threads maintain their own counters and add to these |
| 555 | * in __exit_signal, except for the group leader. | 569 | * in __exit_signal, except for the group leader. |
| 556 | */ | 570 | */ |
| 557 | cputime_t cutime, cstime; | 571 | cputime_t utime, stime, cutime, cstime; |
| 558 | cputime_t gtime; | 572 | cputime_t gtime; |
| 559 | cputime_t cgtime; | 573 | cputime_t cgtime; |
| 560 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | 574 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; |
| @@ -563,6 +577,14 @@ struct signal_struct { | |||
| 563 | struct task_io_accounting ioac; | 577 | struct task_io_accounting ioac; |
| 564 | 578 | ||
| 565 | /* | 579 | /* |
| 580 | * Cumulative ns of schedule CPU time fo dead threads in the | ||
| 581 | * group, not including a zombie group leader, (This only differs | ||
| 582 | * from jiffies_to_ns(utime + stime) if sched_clock uses something | ||
| 583 | * other than jiffies.) | ||
| 584 | */ | ||
| 585 | unsigned long long sum_sched_runtime; | ||
| 586 | |||
| 587 | /* | ||
| 566 | * We don't bother to synchronize most readers of this at all, | 588 | * We don't bother to synchronize most readers of this at all, |
| 567 | * because there is no reader checking a limit that actually needs | 589 | * because there is no reader checking a limit that actually needs |
| 568 | * to get both rlim_cur and rlim_max atomically, and either one | 590 | * to get both rlim_cur and rlim_max atomically, and either one |
| @@ -626,7 +648,6 @@ struct user_struct { | |||
| 626 | atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ | 648 | atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ |
| 627 | #endif | 649 | #endif |
| 628 | #ifdef CONFIG_EPOLL | 650 | #ifdef CONFIG_EPOLL |
| 629 | atomic_t epoll_devs; /* The number of epoll descriptors currently open */ | ||
| 630 | atomic_t epoll_watches; /* The number of file descriptors currently watched */ | 651 | atomic_t epoll_watches; /* The number of file descriptors currently watched */ |
| 631 | #endif | 652 | #endif |
| 632 | #ifdef CONFIG_POSIX_MQUEUE | 653 | #ifdef CONFIG_POSIX_MQUEUE |
| @@ -977,6 +998,7 @@ struct sched_class { | |||
| 977 | struct rq *busiest, struct sched_domain *sd, | 998 | struct rq *busiest, struct sched_domain *sd, |
| 978 | enum cpu_idle_type idle); | 999 | enum cpu_idle_type idle); |
| 979 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | 1000 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); |
| 1001 | int (*needs_post_schedule) (struct rq *this_rq); | ||
| 980 | void (*post_schedule) (struct rq *this_rq); | 1002 | void (*post_schedule) (struct rq *this_rq); |
| 981 | void (*task_wake_up) (struct rq *this_rq, struct task_struct *task); | 1003 | void (*task_wake_up) (struct rq *this_rq, struct task_struct *task); |
| 982 | 1004 | ||
| @@ -1031,6 +1053,10 @@ struct sched_entity { | |||
| 1031 | u64 last_wakeup; | 1053 | u64 last_wakeup; |
| 1032 | u64 avg_overlap; | 1054 | u64 avg_overlap; |
| 1033 | 1055 | ||
| 1056 | u64 start_runtime; | ||
| 1057 | u64 avg_wakeup; | ||
| 1058 | u64 nr_migrations; | ||
| 1059 | |||
| 1034 | #ifdef CONFIG_SCHEDSTATS | 1060 | #ifdef CONFIG_SCHEDSTATS |
| 1035 | u64 wait_start; | 1061 | u64 wait_start; |
| 1036 | u64 wait_max; | 1062 | u64 wait_max; |
| @@ -1046,7 +1072,6 @@ struct sched_entity { | |||
| 1046 | u64 exec_max; | 1072 | u64 exec_max; |
| 1047 | u64 slice_max; | 1073 | u64 slice_max; |
| 1048 | 1074 | ||
| 1049 | u64 nr_migrations; | ||
| 1050 | u64 nr_migrations_cold; | 1075 | u64 nr_migrations_cold; |
| 1051 | u64 nr_failed_migrations_affine; | 1076 | u64 nr_failed_migrations_affine; |
| 1052 | u64 nr_failed_migrations_running; | 1077 | u64 nr_failed_migrations_running; |
| @@ -1143,6 +1168,7 @@ struct task_struct { | |||
| 1143 | #endif | 1168 | #endif |
| 1144 | 1169 | ||
| 1145 | struct list_head tasks; | 1170 | struct list_head tasks; |
| 1171 | struct plist_node pushable_tasks; | ||
| 1146 | 1172 | ||
| 1147 | struct mm_struct *mm, *active_mm; | 1173 | struct mm_struct *mm, *active_mm; |
| 1148 | 1174 | ||
| @@ -1154,6 +1180,8 @@ struct task_struct { | |||
| 1154 | /* ??? */ | 1180 | /* ??? */ |
| 1155 | unsigned int personality; | 1181 | unsigned int personality; |
| 1156 | unsigned did_exec:1; | 1182 | unsigned did_exec:1; |
| 1183 | unsigned in_execve:1; /* Tell the LSMs that the process is doing an | ||
| 1184 | * execve */ | ||
| 1157 | pid_t pid; | 1185 | pid_t pid; |
| 1158 | pid_t tgid; | 1186 | pid_t tgid; |
| 1159 | 1187 | ||
| @@ -1398,6 +1426,9 @@ struct task_struct { | |||
| 1398 | #endif | 1426 | #endif |
| 1399 | }; | 1427 | }; |
| 1400 | 1428 | ||
| 1429 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ | ||
| 1430 | #define tsk_cpumask(tsk) (&(tsk)->cpus_allowed) | ||
| 1431 | |||
| 1401 | /* | 1432 | /* |
| 1402 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT | 1433 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT |
| 1403 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH | 1434 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH |
| @@ -1649,6 +1680,16 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | |||
| 1649 | return set_cpus_allowed_ptr(p, &new_mask); | 1680 | return set_cpus_allowed_ptr(p, &new_mask); |
| 1650 | } | 1681 | } |
| 1651 | 1682 | ||
| 1683 | /* | ||
| 1684 | * Architectures can set this to 1 if they have specified | ||
| 1685 | * CONFIG_HAVE_UNSTABLE_SCHED_CLOCK in their arch Kconfig, | ||
| 1686 | * but then during bootup it turns out that sched_clock() | ||
| 1687 | * is reliable after all: | ||
| 1688 | */ | ||
| 1689 | #ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK | ||
| 1690 | extern int sched_clock_stable; | ||
| 1691 | #endif | ||
| 1692 | |||
| 1652 | extern unsigned long long sched_clock(void); | 1693 | extern unsigned long long sched_clock(void); |
| 1653 | 1694 | ||
| 1654 | extern void sched_clock_init(void); | 1695 | extern void sched_clock_init(void); |
| @@ -2179,25 +2220,18 @@ static inline int spin_needbreak(spinlock_t *lock) | |||
| 2179 | /* | 2220 | /* |
| 2180 | * Thread group CPU time accounting. | 2221 | * Thread group CPU time accounting. |
| 2181 | */ | 2222 | */ |
| 2182 | 2223 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); | |
| 2183 | extern int thread_group_cputime_alloc(struct task_struct *); | 2224 | void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); |
| 2184 | extern void thread_group_cputime(struct task_struct *, struct task_cputime *); | ||
| 2185 | 2225 | ||
| 2186 | static inline void thread_group_cputime_init(struct signal_struct *sig) | 2226 | static inline void thread_group_cputime_init(struct signal_struct *sig) |
| 2187 | { | 2227 | { |
| 2188 | sig->cputime.totals = NULL; | 2228 | sig->cputimer.cputime = INIT_CPUTIME; |
| 2189 | } | 2229 | spin_lock_init(&sig->cputimer.lock); |
| 2190 | 2230 | sig->cputimer.running = 0; | |
| 2191 | static inline int thread_group_cputime_clone_thread(struct task_struct *curr) | ||
| 2192 | { | ||
| 2193 | if (curr->signal->cputime.totals) | ||
| 2194 | return 0; | ||
| 2195 | return thread_group_cputime_alloc(curr); | ||
| 2196 | } | 2231 | } |
| 2197 | 2232 | ||
| 2198 | static inline void thread_group_cputime_free(struct signal_struct *sig) | 2233 | static inline void thread_group_cputime_free(struct signal_struct *sig) |
| 2199 | { | 2234 | { |
| 2200 | free_percpu(sig->cputime.totals); | ||
| 2201 | } | 2235 | } |
| 2202 | 2236 | ||
| 2203 | /* | 2237 | /* |
| @@ -2277,9 +2311,13 @@ extern long sched_group_rt_runtime(struct task_group *tg); | |||
| 2277 | extern int sched_group_set_rt_period(struct task_group *tg, | 2311 | extern int sched_group_set_rt_period(struct task_group *tg, |
| 2278 | long rt_period_us); | 2312 | long rt_period_us); |
| 2279 | extern long sched_group_rt_period(struct task_group *tg); | 2313 | extern long sched_group_rt_period(struct task_group *tg); |
| 2314 | extern int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk); | ||
| 2280 | #endif | 2315 | #endif |
| 2281 | #endif | 2316 | #endif |
| 2282 | 2317 | ||
| 2318 | extern int task_can_switch_user(struct user_struct *up, | ||
| 2319 | struct task_struct *tsk); | ||
| 2320 | |||
| 2283 | #ifdef CONFIG_TASK_XACCT | 2321 | #ifdef CONFIG_TASK_XACCT |
| 2284 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | 2322 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) |
| 2285 | { | 2323 | { |
diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 8ba1c320f975..c2731bfe04d8 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h | |||
| @@ -60,7 +60,7 @@ typedef struct sctphdr { | |||
| 60 | __be16 source; | 60 | __be16 source; |
| 61 | __be16 dest; | 61 | __be16 dest; |
| 62 | __be32 vtag; | 62 | __be32 vtag; |
| 63 | __be32 checksum; | 63 | __le32 checksum; |
| 64 | } __attribute__((packed)) sctp_sctphdr_t; | 64 | } __attribute__((packed)) sctp_sctphdr_t; |
| 65 | 65 | ||
| 66 | #ifdef __KERNEL__ | 66 | #ifdef __KERNEL__ |
| @@ -172,35 +172,35 @@ typedef struct sctp_paramhdr { | |||
| 172 | typedef enum { | 172 | typedef enum { |
| 173 | 173 | ||
| 174 | /* RFC 2960 Section 3.3.5 */ | 174 | /* RFC 2960 Section 3.3.5 */ |
| 175 | SCTP_PARAM_HEARTBEAT_INFO = __constant_htons(1), | 175 | SCTP_PARAM_HEARTBEAT_INFO = cpu_to_be16(1), |
| 176 | /* RFC 2960 Section 3.3.2.1 */ | 176 | /* RFC 2960 Section 3.3.2.1 */ |
| 177 | SCTP_PARAM_IPV4_ADDRESS = __constant_htons(5), | 177 | SCTP_PARAM_IPV4_ADDRESS = cpu_to_be16(5), |
| 178 | SCTP_PARAM_IPV6_ADDRESS = __constant_htons(6), | 178 | SCTP_PARAM_IPV6_ADDRESS = cpu_to_be16(6), |
| 179 | SCTP_PARAM_STATE_COOKIE = __constant_htons(7), | 179 | SCTP_PARAM_STATE_COOKIE = cpu_to_be16(7), |
| 180 | SCTP_PARAM_UNRECOGNIZED_PARAMETERS = __constant_htons(8), | 180 | SCTP_PARAM_UNRECOGNIZED_PARAMETERS = cpu_to_be16(8), |
| 181 | SCTP_PARAM_COOKIE_PRESERVATIVE = __constant_htons(9), | 181 | SCTP_PARAM_COOKIE_PRESERVATIVE = cpu_to_be16(9), |
| 182 | SCTP_PARAM_HOST_NAME_ADDRESS = __constant_htons(11), | 182 | SCTP_PARAM_HOST_NAME_ADDRESS = cpu_to_be16(11), |
| 183 | SCTP_PARAM_SUPPORTED_ADDRESS_TYPES = __constant_htons(12), | 183 | SCTP_PARAM_SUPPORTED_ADDRESS_TYPES = cpu_to_be16(12), |
| 184 | SCTP_PARAM_ECN_CAPABLE = __constant_htons(0x8000), | 184 | SCTP_PARAM_ECN_CAPABLE = cpu_to_be16(0x8000), |
| 185 | 185 | ||
| 186 | /* AUTH Extension Section 3 */ | 186 | /* AUTH Extension Section 3 */ |
| 187 | SCTP_PARAM_RANDOM = __constant_htons(0x8002), | 187 | SCTP_PARAM_RANDOM = cpu_to_be16(0x8002), |
| 188 | SCTP_PARAM_CHUNKS = __constant_htons(0x8003), | 188 | SCTP_PARAM_CHUNKS = cpu_to_be16(0x8003), |
| 189 | SCTP_PARAM_HMAC_ALGO = __constant_htons(0x8004), | 189 | SCTP_PARAM_HMAC_ALGO = cpu_to_be16(0x8004), |
| 190 | 190 | ||
| 191 | /* Add-IP: Supported Extensions, Section 4.2 */ | 191 | /* Add-IP: Supported Extensions, Section 4.2 */ |
| 192 | SCTP_PARAM_SUPPORTED_EXT = __constant_htons(0x8008), | 192 | SCTP_PARAM_SUPPORTED_EXT = cpu_to_be16(0x8008), |
| 193 | 193 | ||
| 194 | /* PR-SCTP Sec 3.1 */ | 194 | /* PR-SCTP Sec 3.1 */ |
| 195 | SCTP_PARAM_FWD_TSN_SUPPORT = __constant_htons(0xc000), | 195 | SCTP_PARAM_FWD_TSN_SUPPORT = cpu_to_be16(0xc000), |
| 196 | 196 | ||
| 197 | /* Add-IP Extension. Section 3.2 */ | 197 | /* Add-IP Extension. Section 3.2 */ |
| 198 | SCTP_PARAM_ADD_IP = __constant_htons(0xc001), | 198 | SCTP_PARAM_ADD_IP = cpu_to_be16(0xc001), |
| 199 | SCTP_PARAM_DEL_IP = __constant_htons(0xc002), | 199 | SCTP_PARAM_DEL_IP = cpu_to_be16(0xc002), |
| 200 | SCTP_PARAM_ERR_CAUSE = __constant_htons(0xc003), | 200 | SCTP_PARAM_ERR_CAUSE = cpu_to_be16(0xc003), |
| 201 | SCTP_PARAM_SET_PRIMARY = __constant_htons(0xc004), | 201 | SCTP_PARAM_SET_PRIMARY = cpu_to_be16(0xc004), |
| 202 | SCTP_PARAM_SUCCESS_REPORT = __constant_htons(0xc005), | 202 | SCTP_PARAM_SUCCESS_REPORT = cpu_to_be16(0xc005), |
| 203 | SCTP_PARAM_ADAPTATION_LAYER_IND = __constant_htons(0xc006), | 203 | SCTP_PARAM_ADAPTATION_LAYER_IND = cpu_to_be16(0xc006), |
| 204 | 204 | ||
| 205 | } sctp_param_t; /* enum */ | 205 | } sctp_param_t; /* enum */ |
| 206 | 206 | ||
| @@ -212,13 +212,13 @@ typedef enum { | |||
| 212 | * | 212 | * |
| 213 | */ | 213 | */ |
| 214 | typedef enum { | 214 | typedef enum { |
| 215 | SCTP_PARAM_ACTION_DISCARD = __constant_htons(0x0000), | 215 | SCTP_PARAM_ACTION_DISCARD = cpu_to_be16(0x0000), |
| 216 | SCTP_PARAM_ACTION_DISCARD_ERR = __constant_htons(0x4000), | 216 | SCTP_PARAM_ACTION_DISCARD_ERR = cpu_to_be16(0x4000), |
| 217 | SCTP_PARAM_ACTION_SKIP = __constant_htons(0x8000), | 217 | SCTP_PARAM_ACTION_SKIP = cpu_to_be16(0x8000), |
| 218 | SCTP_PARAM_ACTION_SKIP_ERR = __constant_htons(0xc000), | 218 | SCTP_PARAM_ACTION_SKIP_ERR = cpu_to_be16(0xc000), |
| 219 | } sctp_param_action_t; | 219 | } sctp_param_action_t; |
| 220 | 220 | ||
| 221 | enum { SCTP_PARAM_ACTION_MASK = __constant_htons(0xc000), }; | 221 | enum { SCTP_PARAM_ACTION_MASK = cpu_to_be16(0xc000), }; |
| 222 | 222 | ||
| 223 | /* RFC 2960 Section 3.3.1 Payload Data (DATA) (0) */ | 223 | /* RFC 2960 Section 3.3.1 Payload Data (DATA) (0) */ |
| 224 | 224 | ||
| @@ -457,17 +457,17 @@ typedef struct sctp_operr_chunk { | |||
| 457 | */ | 457 | */ |
| 458 | typedef enum { | 458 | typedef enum { |
| 459 | 459 | ||
| 460 | SCTP_ERROR_NO_ERROR = __constant_htons(0x00), | 460 | SCTP_ERROR_NO_ERROR = cpu_to_be16(0x00), |
| 461 | SCTP_ERROR_INV_STRM = __constant_htons(0x01), | 461 | SCTP_ERROR_INV_STRM = cpu_to_be16(0x01), |
| 462 | SCTP_ERROR_MISS_PARAM = __constant_htons(0x02), | 462 | SCTP_ERROR_MISS_PARAM = cpu_to_be16(0x02), |
| 463 | SCTP_ERROR_STALE_COOKIE = __constant_htons(0x03), | 463 | SCTP_ERROR_STALE_COOKIE = cpu_to_be16(0x03), |
| 464 | SCTP_ERROR_NO_RESOURCE = __constant_htons(0x04), | 464 | SCTP_ERROR_NO_RESOURCE = cpu_to_be16(0x04), |
| 465 | SCTP_ERROR_DNS_FAILED = __constant_htons(0x05), | 465 | SCTP_ERROR_DNS_FAILED = cpu_to_be16(0x05), |
| 466 | SCTP_ERROR_UNKNOWN_CHUNK = __constant_htons(0x06), | 466 | SCTP_ERROR_UNKNOWN_CHUNK = cpu_to_be16(0x06), |
| 467 | SCTP_ERROR_INV_PARAM = __constant_htons(0x07), | 467 | SCTP_ERROR_INV_PARAM = cpu_to_be16(0x07), |
| 468 | SCTP_ERROR_UNKNOWN_PARAM = __constant_htons(0x08), | 468 | SCTP_ERROR_UNKNOWN_PARAM = cpu_to_be16(0x08), |
| 469 | SCTP_ERROR_NO_DATA = __constant_htons(0x09), | 469 | SCTP_ERROR_NO_DATA = cpu_to_be16(0x09), |
| 470 | SCTP_ERROR_COOKIE_IN_SHUTDOWN = __constant_htons(0x0a), | 470 | SCTP_ERROR_COOKIE_IN_SHUTDOWN = cpu_to_be16(0x0a), |
| 471 | 471 | ||
| 472 | 472 | ||
| 473 | /* SCTP Implementation Guide: | 473 | /* SCTP Implementation Guide: |
| @@ -476,9 +476,9 @@ typedef enum { | |||
| 476 | * 13 Protocol Violation | 476 | * 13 Protocol Violation |
| 477 | */ | 477 | */ |
| 478 | 478 | ||
| 479 | SCTP_ERROR_RESTART = __constant_htons(0x0b), | 479 | SCTP_ERROR_RESTART = cpu_to_be16(0x0b), |
| 480 | SCTP_ERROR_USER_ABORT = __constant_htons(0x0c), | 480 | SCTP_ERROR_USER_ABORT = cpu_to_be16(0x0c), |
| 481 | SCTP_ERROR_PROTO_VIOLATION = __constant_htons(0x0d), | 481 | SCTP_ERROR_PROTO_VIOLATION = cpu_to_be16(0x0d), |
| 482 | 482 | ||
| 483 | /* ADDIP Section 3.3 New Error Causes | 483 | /* ADDIP Section 3.3 New Error Causes |
| 484 | * | 484 | * |
| @@ -493,11 +493,11 @@ typedef enum { | |||
| 493 | * 0x0103 Association Aborted due to illegal ASCONF-ACK | 493 | * 0x0103 Association Aborted due to illegal ASCONF-ACK |
| 494 | * 0x0104 Request refused - no authorization. | 494 | * 0x0104 Request refused - no authorization. |
| 495 | */ | 495 | */ |
| 496 | SCTP_ERROR_DEL_LAST_IP = __constant_htons(0x0100), | 496 | SCTP_ERROR_DEL_LAST_IP = cpu_to_be16(0x0100), |
| 497 | SCTP_ERROR_RSRC_LOW = __constant_htons(0x0101), | 497 | SCTP_ERROR_RSRC_LOW = cpu_to_be16(0x0101), |
| 498 | SCTP_ERROR_DEL_SRC_IP = __constant_htons(0x0102), | 498 | SCTP_ERROR_DEL_SRC_IP = cpu_to_be16(0x0102), |
| 499 | SCTP_ERROR_ASCONF_ACK = __constant_htons(0x0103), | 499 | SCTP_ERROR_ASCONF_ACK = cpu_to_be16(0x0103), |
| 500 | SCTP_ERROR_REQ_REFUSED = __constant_htons(0x0104), | 500 | SCTP_ERROR_REQ_REFUSED = cpu_to_be16(0x0104), |
| 501 | 501 | ||
| 502 | /* AUTH Section 4. New Error Cause | 502 | /* AUTH Section 4. New Error Cause |
| 503 | * | 503 | * |
| @@ -509,7 +509,7 @@ typedef enum { | |||
| 509 | * -------------------------------------------------------------- | 509 | * -------------------------------------------------------------- |
| 510 | * 0x0105 Unsupported HMAC Identifier | 510 | * 0x0105 Unsupported HMAC Identifier |
| 511 | */ | 511 | */ |
| 512 | SCTP_ERROR_UNSUP_HMAC = __constant_htons(0x0105) | 512 | SCTP_ERROR_UNSUP_HMAC = cpu_to_be16(0x0105) |
| 513 | } sctp_error_t; | 513 | } sctp_error_t; |
| 514 | 514 | ||
| 515 | 515 | ||
diff --git a/include/linux/selinux_netlink.h b/include/linux/selinux_netlink.h index bbf489decd84..d239797785cf 100644 --- a/include/linux/selinux_netlink.h +++ b/include/linux/selinux_netlink.h | |||
| @@ -12,6 +12,8 @@ | |||
| 12 | #ifndef _LINUX_SELINUX_NETLINK_H | 12 | #ifndef _LINUX_SELINUX_NETLINK_H |
| 13 | #define _LINUX_SELINUX_NETLINK_H | 13 | #define _LINUX_SELINUX_NETLINK_H |
| 14 | 14 | ||
| 15 | #include <linux/types.h> | ||
| 16 | |||
| 15 | /* Message types. */ | 17 | /* Message types. */ |
| 16 | #define SELNL_MSG_BASE 0x10 | 18 | #define SELNL_MSG_BASE 0x10 |
| 17 | enum { | 19 | enum { |
| @@ -38,11 +40,11 @@ enum selinux_nlgroups { | |||
| 38 | 40 | ||
| 39 | /* Message structures */ | 41 | /* Message structures */ |
| 40 | struct selnl_msg_setenforce { | 42 | struct selnl_msg_setenforce { |
| 41 | int32_t val; | 43 | __s32 val; |
| 42 | }; | 44 | }; |
| 43 | 45 | ||
| 44 | struct selnl_msg_policyload { | 46 | struct selnl_msg_policyload { |
| 45 | u_int32_t seqno; | 47 | __u32 seqno; |
| 46 | }; | 48 | }; |
| 47 | 49 | ||
| 48 | #endif /* _LINUX_SELINUX_NETLINK_H */ | 50 | #endif /* _LINUX_SELINUX_NETLINK_H */ |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 40ea5058c2ec..f616f31576d7 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
| @@ -19,6 +19,7 @@ struct seq_file { | |||
| 19 | size_t from; | 19 | size_t from; |
| 20 | size_t count; | 20 | size_t count; |
| 21 | loff_t index; | 21 | loff_t index; |
| 22 | loff_t read_pos; | ||
| 22 | u64 version; | 23 | u64 version; |
| 23 | struct mutex lock; | 24 | struct mutex lock; |
| 24 | const struct seq_operations *op; | 25 | const struct seq_operations *op; |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 90bbbf0b1161..df9245c7bd3b 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -296,6 +296,7 @@ struct uart_port { | |||
| 296 | #define UPF_HARDPPS_CD ((__force upf_t) (1 << 11)) | 296 | #define UPF_HARDPPS_CD ((__force upf_t) (1 << 11)) |
| 297 | #define UPF_LOW_LATENCY ((__force upf_t) (1 << 13)) | 297 | #define UPF_LOW_LATENCY ((__force upf_t) (1 << 13)) |
| 298 | #define UPF_BUGGY_UART ((__force upf_t) (1 << 14)) | 298 | #define UPF_BUGGY_UART ((__force upf_t) (1 << 14)) |
| 299 | #define UPF_NO_TXEN_TEST ((__force upf_t) (1 << 15)) | ||
| 299 | #define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16)) | 300 | #define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16)) |
| 300 | #define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) | 301 | #define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) |
| 301 | #define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) | 302 | #define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) |
diff --git a/include/linux/serio.h b/include/linux/serio.h index 1bcb357a01a1..e0417e4d3f15 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
| @@ -212,7 +212,7 @@ static inline void serio_unpin_driver(struct serio *serio) | |||
| 212 | #define SERIO_FUJITSU 0x35 | 212 | #define SERIO_FUJITSU 0x35 |
| 213 | #define SERIO_ZHENHUA 0x36 | 213 | #define SERIO_ZHENHUA 0x36 |
| 214 | #define SERIO_INEXIO 0x37 | 214 | #define SERIO_INEXIO 0x37 |
| 215 | #define SERIO_TOUCHIT213 0x37 | 215 | #define SERIO_TOUCHIT213 0x38 |
| 216 | #define SERIO_W8001 0x39 | 216 | #define SERIO_W8001 0x39 |
| 217 | 217 | ||
| 218 | #endif | 218 | #endif |
diff --git a/include/linux/sh_cmt.h b/include/linux/sh_cmt.h new file mode 100644 index 000000000000..68cacde5954f --- /dev/null +++ b/include/linux/sh_cmt.h | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #ifndef __SH_CMT_H__ | ||
| 2 | #define __SH_CMT_H__ | ||
| 3 | |||
| 4 | struct sh_cmt_config { | ||
| 5 | char *name; | ||
| 6 | unsigned long channel_offset; | ||
| 7 | int timer_bit; | ||
| 8 | char *clk; | ||
| 9 | unsigned long clockevent_rating; | ||
| 10 | unsigned long clocksource_rating; | ||
| 11 | }; | ||
| 12 | |||
| 13 | #endif /* __SH_CMT_H__ */ | ||
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index 68e212ff9dde..eb1423a0078d 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
| @@ -85,6 +85,7 @@ struct intc_desc symbol __initdata = { \ | |||
| 85 | } | 85 | } |
| 86 | #endif | 86 | #endif |
| 87 | 87 | ||
| 88 | unsigned int intc_evt2irq(unsigned int vector); | ||
| 88 | void __init register_intc_controller(struct intc_desc *desc); | 89 | void __init register_intc_controller(struct intc_desc *desc); |
| 89 | int intc_set_priority(unsigned int irq, unsigned int prio); | 90 | int intc_set_priority(unsigned int irq, unsigned int prio); |
| 90 | 91 | ||
diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h index bef0c46d4713..b363b916c909 100644 --- a/include/linux/signalfd.h +++ b/include/linux/signalfd.h | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #ifndef _LINUX_SIGNALFD_H | 8 | #ifndef _LINUX_SIGNALFD_H |
| 9 | #define _LINUX_SIGNALFD_H | 9 | #define _LINUX_SIGNALFD_H |
| 10 | 10 | ||
| 11 | #include <linux/types.h> | ||
| 11 | /* For O_CLOEXEC and O_NONBLOCK */ | 12 | /* For O_CLOEXEC and O_NONBLOCK */ |
| 12 | #include <linux/fcntl.h> | 13 | #include <linux/fcntl.h> |
| 13 | 14 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index cf2cb50f77d1..bb1981fd60f3 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -29,9 +29,6 @@ | |||
| 29 | #include <linux/dmaengine.h> | 29 | #include <linux/dmaengine.h> |
| 30 | #include <linux/hrtimer.h> | 30 | #include <linux/hrtimer.h> |
| 31 | 31 | ||
| 32 | #define HAVE_ALLOC_SKB /* For the drivers to know */ | ||
| 33 | #define HAVE_ALIGNABLE_SKB /* Ditto 8) */ | ||
| 34 | |||
| 35 | /* Don't change this without changing skb_csum_unnecessary! */ | 32 | /* Don't change this without changing skb_csum_unnecessary! */ |
| 36 | #define CHECKSUM_NONE 0 | 33 | #define CHECKSUM_NONE 0 |
| 37 | #define CHECKSUM_UNNECESSARY 1 | 34 | #define CHECKSUM_UNNECESSARY 1 |
| @@ -135,6 +132,55 @@ struct skb_frag_struct { | |||
| 135 | __u32 size; | 132 | __u32 size; |
| 136 | }; | 133 | }; |
| 137 | 134 | ||
| 135 | #define HAVE_HW_TIME_STAMP | ||
| 136 | |||
| 137 | /** | ||
| 138 | * struct skb_shared_hwtstamps - hardware time stamps | ||
| 139 | * @hwtstamp: hardware time stamp transformed into duration | ||
| 140 | * since arbitrary point in time | ||
| 141 | * @syststamp: hwtstamp transformed to system time base | ||
| 142 | * | ||
| 143 | * Software time stamps generated by ktime_get_real() are stored in | ||
| 144 | * skb->tstamp. The relation between the different kinds of time | ||
| 145 | * stamps is as follows: | ||
| 146 | * | ||
| 147 | * syststamp and tstamp can be compared against each other in | ||
| 148 | * arbitrary combinations. The accuracy of a | ||
| 149 | * syststamp/tstamp/"syststamp from other device" comparison is | ||
| 150 | * limited by the accuracy of the transformation into system time | ||
| 151 | * base. This depends on the device driver and its underlying | ||
| 152 | * hardware. | ||
| 153 | * | ||
| 154 | * hwtstamps can only be compared against other hwtstamps from | ||
| 155 | * the same device. | ||
| 156 | * | ||
| 157 | * This structure is attached to packets as part of the | ||
| 158 | * &skb_shared_info. Use skb_hwtstamps() to get a pointer. | ||
| 159 | */ | ||
| 160 | struct skb_shared_hwtstamps { | ||
| 161 | ktime_t hwtstamp; | ||
| 162 | ktime_t syststamp; | ||
| 163 | }; | ||
| 164 | |||
| 165 | /** | ||
| 166 | * struct skb_shared_tx - instructions for time stamping of outgoing packets | ||
| 167 | * @hardware: generate hardware time stamp | ||
| 168 | * @software: generate software time stamp | ||
| 169 | * @in_progress: device driver is going to provide | ||
| 170 | * hardware time stamp | ||
| 171 | * | ||
| 172 | * These flags are attached to packets as part of the | ||
| 173 | * &skb_shared_info. Use skb_tx() to get a pointer. | ||
| 174 | */ | ||
| 175 | union skb_shared_tx { | ||
| 176 | struct { | ||
| 177 | __u8 hardware:1, | ||
| 178 | software:1, | ||
| 179 | in_progress:1; | ||
| 180 | }; | ||
| 181 | __u8 flags; | ||
| 182 | }; | ||
| 183 | |||
| 138 | /* This data is invariant across clones and lives at | 184 | /* This data is invariant across clones and lives at |
| 139 | * the end of the header data, ie. at skb->end. | 185 | * the end of the header data, ie. at skb->end. |
| 140 | */ | 186 | */ |
| @@ -146,10 +192,12 @@ struct skb_shared_info { | |||
| 146 | unsigned short gso_segs; | 192 | unsigned short gso_segs; |
| 147 | unsigned short gso_type; | 193 | unsigned short gso_type; |
| 148 | __be32 ip6_frag_id; | 194 | __be32 ip6_frag_id; |
| 195 | union skb_shared_tx tx_flags; | ||
| 149 | #ifdef CONFIG_HAS_DMA | 196 | #ifdef CONFIG_HAS_DMA |
| 150 | unsigned int num_dma_maps; | 197 | unsigned int num_dma_maps; |
| 151 | #endif | 198 | #endif |
| 152 | struct sk_buff *frag_list; | 199 | struct sk_buff *frag_list; |
| 200 | struct skb_shared_hwtstamps hwtstamps; | ||
| 153 | skb_frag_t frags[MAX_SKB_FRAGS]; | 201 | skb_frag_t frags[MAX_SKB_FRAGS]; |
| 154 | #ifdef CONFIG_HAS_DMA | 202 | #ifdef CONFIG_HAS_DMA |
| 155 | dma_addr_t dma_maps[MAX_SKB_FRAGS + 1]; | 203 | dma_addr_t dma_maps[MAX_SKB_FRAGS + 1]; |
| @@ -373,6 +421,7 @@ extern void skb_dma_unmap(struct device *dev, struct sk_buff *skb, | |||
| 373 | #endif | 421 | #endif |
| 374 | 422 | ||
| 375 | extern void kfree_skb(struct sk_buff *skb); | 423 | extern void kfree_skb(struct sk_buff *skb); |
| 424 | extern void consume_skb(struct sk_buff *skb); | ||
| 376 | extern void __kfree_skb(struct sk_buff *skb); | 425 | extern void __kfree_skb(struct sk_buff *skb); |
| 377 | extern struct sk_buff *__alloc_skb(unsigned int size, | 426 | extern struct sk_buff *__alloc_skb(unsigned int size, |
| 378 | gfp_t priority, int fclone, int node); | 427 | gfp_t priority, int fclone, int node); |
| @@ -411,20 +460,12 @@ extern int skb_to_sgvec(struct sk_buff *skb, | |||
| 411 | extern int skb_cow_data(struct sk_buff *skb, int tailbits, | 460 | extern int skb_cow_data(struct sk_buff *skb, int tailbits, |
| 412 | struct sk_buff **trailer); | 461 | struct sk_buff **trailer); |
| 413 | extern int skb_pad(struct sk_buff *skb, int pad); | 462 | extern int skb_pad(struct sk_buff *skb, int pad); |
| 414 | #define dev_kfree_skb(a) kfree_skb(a) | 463 | #define dev_kfree_skb(a) consume_skb(a) |
| 464 | #define dev_consume_skb(a) kfree_skb_clean(a) | ||
| 415 | extern void skb_over_panic(struct sk_buff *skb, int len, | 465 | extern void skb_over_panic(struct sk_buff *skb, int len, |
| 416 | void *here); | 466 | void *here); |
| 417 | extern void skb_under_panic(struct sk_buff *skb, int len, | 467 | extern void skb_under_panic(struct sk_buff *skb, int len, |
| 418 | void *here); | 468 | void *here); |
| 419 | extern void skb_truesize_bug(struct sk_buff *skb); | ||
| 420 | |||
| 421 | static inline void skb_truesize_check(struct sk_buff *skb) | ||
| 422 | { | ||
| 423 | int len = sizeof(struct sk_buff) + skb->len; | ||
| 424 | |||
| 425 | if (unlikely((int)skb->truesize < len)) | ||
| 426 | skb_truesize_bug(skb); | ||
| 427 | } | ||
| 428 | 469 | ||
| 429 | extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, | 470 | extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, |
| 430 | int getfrag(void *from, char *to, int offset, | 471 | int getfrag(void *from, char *to, int offset, |
| @@ -468,6 +509,16 @@ static inline unsigned char *skb_end_pointer(const struct sk_buff *skb) | |||
| 468 | /* Internal */ | 509 | /* Internal */ |
| 469 | #define skb_shinfo(SKB) ((struct skb_shared_info *)(skb_end_pointer(SKB))) | 510 | #define skb_shinfo(SKB) ((struct skb_shared_info *)(skb_end_pointer(SKB))) |
| 470 | 511 | ||
| 512 | static inline struct skb_shared_hwtstamps *skb_hwtstamps(struct sk_buff *skb) | ||
| 513 | { | ||
| 514 | return &skb_shinfo(skb)->hwtstamps; | ||
| 515 | } | ||
| 516 | |||
| 517 | static inline union skb_shared_tx *skb_tx(struct sk_buff *skb) | ||
| 518 | { | ||
| 519 | return &skb_shinfo(skb)->tx_flags; | ||
| 520 | } | ||
| 521 | |||
| 471 | /** | 522 | /** |
| 472 | * skb_queue_empty - check if a queue is empty | 523 | * skb_queue_empty - check if a queue is empty |
| 473 | * @list: queue head | 524 | * @list: queue head |
| @@ -1287,7 +1338,7 @@ static inline int skb_network_offset(const struct sk_buff *skb) | |||
| 1287 | * The networking layer reserves some headroom in skb data (via | 1338 | * The networking layer reserves some headroom in skb data (via |
| 1288 | * dev_alloc_skb). This is used to avoid having to reallocate skb data when | 1339 | * dev_alloc_skb). This is used to avoid having to reallocate skb data when |
| 1289 | * the header has to grow. In the default case, if the header has to grow | 1340 | * the header has to grow. In the default case, if the header has to grow |
| 1290 | * 16 bytes or less we avoid the reallocation. | 1341 | * 32 bytes or less we avoid the reallocation. |
| 1291 | * | 1342 | * |
| 1292 | * Unfortunately this headroom changes the DMA alignment of the resulting | 1343 | * Unfortunately this headroom changes the DMA alignment of the resulting |
| 1293 | * network packet. As for NET_IP_ALIGN, this unaligned DMA is expensive | 1344 | * network packet. As for NET_IP_ALIGN, this unaligned DMA is expensive |
| @@ -1295,11 +1346,11 @@ static inline int skb_network_offset(const struct sk_buff *skb) | |||
| 1295 | * perhaps setting it to a cacheline in size (since that will maintain | 1346 | * perhaps setting it to a cacheline in size (since that will maintain |
| 1296 | * cacheline alignment of the DMA). It must be a power of 2. | 1347 | * cacheline alignment of the DMA). It must be a power of 2. |
| 1297 | * | 1348 | * |
| 1298 | * Various parts of the networking layer expect at least 16 bytes of | 1349 | * Various parts of the networking layer expect at least 32 bytes of |
| 1299 | * headroom, you should not reduce this. | 1350 | * headroom, you should not reduce this. |
| 1300 | */ | 1351 | */ |
| 1301 | #ifndef NET_SKB_PAD | 1352 | #ifndef NET_SKB_PAD |
| 1302 | #define NET_SKB_PAD 16 | 1353 | #define NET_SKB_PAD 32 |
| 1303 | #endif | 1354 | #endif |
| 1304 | 1355 | ||
| 1305 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); | 1356 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); |
| @@ -1687,8 +1738,6 @@ extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, | |||
| 1687 | int shiftlen); | 1738 | int shiftlen); |
| 1688 | 1739 | ||
| 1689 | extern struct sk_buff *skb_segment(struct sk_buff *skb, int features); | 1740 | extern struct sk_buff *skb_segment(struct sk_buff *skb, int features); |
| 1690 | extern int skb_gro_receive(struct sk_buff **head, | ||
| 1691 | struct sk_buff *skb); | ||
| 1692 | 1741 | ||
| 1693 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, | 1742 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, |
| 1694 | int len, void *buffer) | 1743 | int len, void *buffer) |
| @@ -1735,6 +1784,11 @@ static inline void skb_copy_to_linear_data_offset(struct sk_buff *skb, | |||
| 1735 | 1784 | ||
| 1736 | extern void skb_init(void); | 1785 | extern void skb_init(void); |
| 1737 | 1786 | ||
| 1787 | static inline ktime_t skb_get_ktime(const struct sk_buff *skb) | ||
| 1788 | { | ||
| 1789 | return skb->tstamp; | ||
| 1790 | } | ||
| 1791 | |||
| 1738 | /** | 1792 | /** |
| 1739 | * skb_get_timestamp - get timestamp from a skb | 1793 | * skb_get_timestamp - get timestamp from a skb |
| 1740 | * @skb: skb to get stamp from | 1794 | * @skb: skb to get stamp from |
| @@ -1744,11 +1798,18 @@ extern void skb_init(void); | |||
| 1744 | * This function converts the offset back to a struct timeval and stores | 1798 | * This function converts the offset back to a struct timeval and stores |
| 1745 | * it in stamp. | 1799 | * it in stamp. |
| 1746 | */ | 1800 | */ |
| 1747 | static inline void skb_get_timestamp(const struct sk_buff *skb, struct timeval *stamp) | 1801 | static inline void skb_get_timestamp(const struct sk_buff *skb, |
| 1802 | struct timeval *stamp) | ||
| 1748 | { | 1803 | { |
| 1749 | *stamp = ktime_to_timeval(skb->tstamp); | 1804 | *stamp = ktime_to_timeval(skb->tstamp); |
| 1750 | } | 1805 | } |
| 1751 | 1806 | ||
| 1807 | static inline void skb_get_timestampns(const struct sk_buff *skb, | ||
| 1808 | struct timespec *stamp) | ||
| 1809 | { | ||
| 1810 | *stamp = ktime_to_timespec(skb->tstamp); | ||
| 1811 | } | ||
| 1812 | |||
| 1752 | static inline void __net_timestamp(struct sk_buff *skb) | 1813 | static inline void __net_timestamp(struct sk_buff *skb) |
| 1753 | { | 1814 | { |
| 1754 | skb->tstamp = ktime_get_real(); | 1815 | skb->tstamp = ktime_get_real(); |
| @@ -1764,6 +1825,20 @@ static inline ktime_t net_invalid_timestamp(void) | |||
| 1764 | return ktime_set(0, 0); | 1825 | return ktime_set(0, 0); |
| 1765 | } | 1826 | } |
| 1766 | 1827 | ||
| 1828 | /** | ||
| 1829 | * skb_tstamp_tx - queue clone of skb with send time stamps | ||
| 1830 | * @orig_skb: the original outgoing packet | ||
| 1831 | * @hwtstamps: hardware time stamps, may be NULL if not available | ||
| 1832 | * | ||
| 1833 | * If the skb has a socket associated, then this function clones the | ||
| 1834 | * skb (thus sharing the actual data and optional structures), stores | ||
| 1835 | * the optional hardware time stamping information (if non NULL) or | ||
| 1836 | * generates a software time stamp (otherwise), then queues the clone | ||
| 1837 | * to the error queue of the socket. Errors are silently ignored. | ||
| 1838 | */ | ||
| 1839 | extern void skb_tstamp_tx(struct sk_buff *orig_skb, | ||
| 1840 | struct skb_shared_hwtstamps *hwtstamps); | ||
| 1841 | |||
| 1767 | extern __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len); | 1842 | extern __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len); |
| 1768 | extern __sum16 __skb_checksum_complete(struct sk_buff *skb); | 1843 | extern __sum16 __skb_checksum_complete(struct sk_buff *skb); |
| 1769 | 1844 | ||
| @@ -1894,7 +1969,7 @@ static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping) | |||
| 1894 | skb->queue_mapping = queue_mapping; | 1969 | skb->queue_mapping = queue_mapping; |
| 1895 | } | 1970 | } |
| 1896 | 1971 | ||
| 1897 | static inline u16 skb_get_queue_mapping(struct sk_buff *skb) | 1972 | static inline u16 skb_get_queue_mapping(const struct sk_buff *skb) |
| 1898 | { | 1973 | { |
| 1899 | return skb->queue_mapping; | 1974 | return skb->queue_mapping; |
| 1900 | } | 1975 | } |
| @@ -1904,6 +1979,24 @@ static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_bu | |||
| 1904 | to->queue_mapping = from->queue_mapping; | 1979 | to->queue_mapping = from->queue_mapping; |
| 1905 | } | 1980 | } |
| 1906 | 1981 | ||
| 1982 | static inline void skb_record_rx_queue(struct sk_buff *skb, u16 rx_queue) | ||
| 1983 | { | ||
| 1984 | skb->queue_mapping = rx_queue + 1; | ||
| 1985 | } | ||
| 1986 | |||
| 1987 | static inline u16 skb_get_rx_queue(const struct sk_buff *skb) | ||
| 1988 | { | ||
| 1989 | return skb->queue_mapping - 1; | ||
| 1990 | } | ||
| 1991 | |||
| 1992 | static inline bool skb_rx_queue_recorded(const struct sk_buff *skb) | ||
| 1993 | { | ||
| 1994 | return (skb->queue_mapping != 0); | ||
| 1995 | } | ||
| 1996 | |||
| 1997 | extern u16 skb_tx_hash(const struct net_device *dev, | ||
| 1998 | const struct sk_buff *skb); | ||
| 1999 | |||
| 1907 | #ifdef CONFIG_XFRM | 2000 | #ifdef CONFIG_XFRM |
| 1908 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) | 2001 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) |
| 1909 | { | 2002 | { |
diff --git a/include/linux/slab.h b/include/linux/slab.h index f96d13c281e8..24c5602bee99 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -127,6 +127,7 @@ int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | |||
| 127 | void * __must_check __krealloc(const void *, size_t, gfp_t); | 127 | void * __must_check __krealloc(const void *, size_t, gfp_t); |
| 128 | void * __must_check krealloc(const void *, size_t, gfp_t); | 128 | void * __must_check krealloc(const void *, size_t, gfp_t); |
| 129 | void kfree(const void *); | 129 | void kfree(const void *); |
| 130 | void kzfree(const void *); | ||
| 130 | size_t ksize(const void *); | 131 | size_t ksize(const void *); |
| 131 | 132 | ||
| 132 | /* | 133 | /* |
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 39c3a5eb8ebe..6ca6a7b66d75 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
| @@ -43,10 +43,7 @@ static inline void *kmalloc(size_t size, gfp_t flags) | |||
| 43 | i++; | 43 | i++; |
| 44 | #include <linux/kmalloc_sizes.h> | 44 | #include <linux/kmalloc_sizes.h> |
| 45 | #undef CACHE | 45 | #undef CACHE |
| 46 | { | 46 | return NULL; |
| 47 | extern void __you_cannot_kmalloc_that_much(void); | ||
| 48 | __you_cannot_kmalloc_that_much(); | ||
| 49 | } | ||
| 50 | found: | 47 | found: |
| 51 | #ifdef CONFIG_ZONE_DMA | 48 | #ifdef CONFIG_ZONE_DMA |
| 52 | if (flags & GFP_DMA) | 49 | if (flags & GFP_DMA) |
| @@ -77,10 +74,7 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
| 77 | i++; | 74 | i++; |
| 78 | #include <linux/kmalloc_sizes.h> | 75 | #include <linux/kmalloc_sizes.h> |
| 79 | #undef CACHE | 76 | #undef CACHE |
| 80 | { | 77 | return NULL; |
| 81 | extern void __you_cannot_kmalloc_that_much(void); | ||
| 82 | __you_cannot_kmalloc_that_much(); | ||
| 83 | } | ||
| 84 | found: | 78 | found: |
| 85 | #ifdef CONFIG_ZONE_DMA | 79 | #ifdef CONFIG_ZONE_DMA |
| 86 | if (flags & GFP_DMA) | 80 | if (flags & GFP_DMA) |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 2f5c16b1aacd..e37b6aa8a9fb 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
| @@ -46,7 +46,6 @@ struct kmem_cache_cpu { | |||
| 46 | struct kmem_cache_node { | 46 | struct kmem_cache_node { |
| 47 | spinlock_t list_lock; /* Protect partial list and nr_partial */ | 47 | spinlock_t list_lock; /* Protect partial list and nr_partial */ |
| 48 | unsigned long nr_partial; | 48 | unsigned long nr_partial; |
| 49 | unsigned long min_partial; | ||
| 50 | struct list_head partial; | 49 | struct list_head partial; |
| 51 | #ifdef CONFIG_SLUB_DEBUG | 50 | #ifdef CONFIG_SLUB_DEBUG |
| 52 | atomic_long_t nr_slabs; | 51 | atomic_long_t nr_slabs; |
| @@ -89,6 +88,7 @@ struct kmem_cache { | |||
| 89 | void (*ctor)(void *); | 88 | void (*ctor)(void *); |
| 90 | int inuse; /* Offset to metadata */ | 89 | int inuse; /* Offset to metadata */ |
| 91 | int align; /* Alignment */ | 90 | int align; /* Alignment */ |
| 91 | unsigned long min_partial; | ||
| 92 | const char *name; /* Name (only for display!) */ | 92 | const char *name; /* Name (only for display!) */ |
| 93 | struct list_head list; /* List of slab caches */ | 93 | struct list_head list; /* List of slab caches */ |
| 94 | #ifdef CONFIG_SLUB_DEBUG | 94 | #ifdef CONFIG_SLUB_DEBUG |
| @@ -121,10 +121,23 @@ struct kmem_cache { | |||
| 121 | #define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE) | 121 | #define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE) |
| 122 | 122 | ||
| 123 | /* | 123 | /* |
| 124 | * Maximum kmalloc object size handled by SLUB. Larger object allocations | ||
| 125 | * are passed through to the page allocator. The page allocator "fastpath" | ||
| 126 | * is relatively slow so we need this value sufficiently high so that | ||
| 127 | * performance critical objects are allocated through the SLUB fastpath. | ||
| 128 | * | ||
| 129 | * This should be dropped to PAGE_SIZE / 2 once the page allocator | ||
| 130 | * "fastpath" becomes competitive with the slab allocator fastpaths. | ||
| 131 | */ | ||
| 132 | #define SLUB_MAX_SIZE (2 * PAGE_SIZE) | ||
| 133 | |||
| 134 | #define SLUB_PAGE_SHIFT (PAGE_SHIFT + 2) | ||
| 135 | |||
| 136 | /* | ||
| 124 | * We keep the general caches in an array of slab caches that are used for | 137 | * We keep the general caches in an array of slab caches that are used for |
| 125 | * 2^x bytes of allocations. | 138 | * 2^x bytes of allocations. |
| 126 | */ | 139 | */ |
| 127 | extern struct kmem_cache kmalloc_caches[PAGE_SHIFT + 1]; | 140 | extern struct kmem_cache kmalloc_caches[SLUB_PAGE_SHIFT]; |
| 128 | 141 | ||
| 129 | /* | 142 | /* |
| 130 | * Sorry that the following has to be that ugly but some versions of GCC | 143 | * Sorry that the following has to be that ugly but some versions of GCC |
| @@ -212,7 +225,7 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags) | |||
| 212 | static __always_inline void *kmalloc(size_t size, gfp_t flags) | 225 | static __always_inline void *kmalloc(size_t size, gfp_t flags) |
| 213 | { | 226 | { |
| 214 | if (__builtin_constant_p(size)) { | 227 | if (__builtin_constant_p(size)) { |
| 215 | if (size > PAGE_SIZE) | 228 | if (size > SLUB_MAX_SIZE) |
| 216 | return kmalloc_large(size, flags); | 229 | return kmalloc_large(size, flags); |
| 217 | 230 | ||
| 218 | if (!(flags & SLUB_DMA)) { | 231 | if (!(flags & SLUB_DMA)) { |
| @@ -234,7 +247,7 @@ void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | |||
| 234 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 247 | static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
| 235 | { | 248 | { |
| 236 | if (__builtin_constant_p(size) && | 249 | if (__builtin_constant_p(size) && |
| 237 | size <= PAGE_SIZE && !(flags & SLUB_DMA)) { | 250 | size <= SLUB_MAX_SIZE && !(flags & SLUB_DMA)) { |
| 238 | struct kmem_cache *s = kmalloc_slab(size); | 251 | struct kmem_cache *s = kmalloc_slab(size); |
| 239 | 252 | ||
| 240 | if (!s) | 253 | if (!s) |
diff --git a/include/linux/smsc911x.h b/include/linux/smsc911x.h index 1cbf0313adde..b32725075d71 100644 --- a/include/linux/smsc911x.h +++ b/include/linux/smsc911x.h | |||
| @@ -43,5 +43,8 @@ struct smsc911x_platform_config { | |||
| 43 | /* Constants for flags */ | 43 | /* Constants for flags */ |
| 44 | #define SMSC911X_USE_16BIT (BIT(0)) | 44 | #define SMSC911X_USE_16BIT (BIT(0)) |
| 45 | #define SMSC911X_USE_32BIT (BIT(1)) | 45 | #define SMSC911X_USE_32BIT (BIT(1)) |
| 46 | #define SMSC911X_FORCE_INTERNAL_PHY (BIT(2)) | ||
| 47 | #define SMSC911X_FORCE_EXTERNAL_PHY (BIT(3)) | ||
| 48 | #define SMSC911X_SAVE_MAC_ADDRESS (BIT(4)) | ||
| 46 | 49 | ||
| 47 | #endif /* __LINUX_SMSC911X_H__ */ | 50 | #endif /* __LINUX_SMSC911X_H__ */ |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 20fc4bbfca42..421afb4d29b0 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -24,10 +24,12 @@ struct __kernel_sockaddr_storage { | |||
| 24 | #include <linux/types.h> /* pid_t */ | 24 | #include <linux/types.h> /* pid_t */ |
| 25 | #include <linux/compiler.h> /* __user */ | 25 | #include <linux/compiler.h> /* __user */ |
| 26 | 26 | ||
| 27 | #ifdef CONFIG_PROC_FS | 27 | #ifdef __KERNEL__ |
| 28 | # ifdef CONFIG_PROC_FS | ||
| 28 | struct seq_file; | 29 | struct seq_file; |
| 29 | extern void socket_seq_show(struct seq_file *seq); | 30 | extern void socket_seq_show(struct seq_file *seq); |
| 30 | #endif | 31 | # endif |
| 32 | #endif /* __KERNEL__ */ | ||
| 31 | 33 | ||
| 32 | typedef unsigned short sa_family_t; | 34 | typedef unsigned short sa_family_t; |
| 33 | 35 | ||
| @@ -179,6 +181,7 @@ struct ucred { | |||
| 179 | #define AF_ASH 18 /* Ash */ | 181 | #define AF_ASH 18 /* Ash */ |
| 180 | #define AF_ECONET 19 /* Acorn Econet */ | 182 | #define AF_ECONET 19 /* Acorn Econet */ |
| 181 | #define AF_ATMSVC 20 /* ATM SVCs */ | 183 | #define AF_ATMSVC 20 /* ATM SVCs */ |
| 184 | #define AF_RDS 21 /* RDS sockets */ | ||
| 182 | #define AF_SNA 22 /* Linux SNA Project (nutters!) */ | 185 | #define AF_SNA 22 /* Linux SNA Project (nutters!) */ |
| 183 | #define AF_IRDA 23 /* IRDA sockets */ | 186 | #define AF_IRDA 23 /* IRDA sockets */ |
| 184 | #define AF_PPPOX 24 /* PPPoX sockets */ | 187 | #define AF_PPPOX 24 /* PPPoX sockets */ |
| @@ -217,6 +220,7 @@ struct ucred { | |||
| 217 | #define PF_ASH AF_ASH | 220 | #define PF_ASH AF_ASH |
| 218 | #define PF_ECONET AF_ECONET | 221 | #define PF_ECONET AF_ECONET |
| 219 | #define PF_ATMSVC AF_ATMSVC | 222 | #define PF_ATMSVC AF_ATMSVC |
| 223 | #define PF_RDS AF_RDS | ||
| 220 | #define PF_SNA AF_SNA | 224 | #define PF_SNA AF_SNA |
| 221 | #define PF_IRDA AF_IRDA | 225 | #define PF_IRDA AF_IRDA |
| 222 | #define PF_PPPOX AF_PPPOX | 226 | #define PF_PPPOX AF_PPPOX |
| @@ -298,6 +302,7 @@ struct ucred { | |||
| 298 | #define SOL_PPPOL2TP 273 | 302 | #define SOL_PPPOL2TP 273 |
| 299 | #define SOL_BLUETOOTH 274 | 303 | #define SOL_BLUETOOTH 274 |
| 300 | #define SOL_PNPIPE 275 | 304 | #define SOL_PNPIPE 275 |
| 305 | #define SOL_RDS 276 | ||
| 301 | 306 | ||
| 302 | /* IPX options */ | 307 | /* IPX options */ |
| 303 | #define IPX_TYPE 1 | 308 | #define IPX_TYPE 1 |
diff --git a/include/linux/sockios.h b/include/linux/sockios.h index abef7596655a..241f179347d9 100644 --- a/include/linux/sockios.h +++ b/include/linux/sockios.h | |||
| @@ -122,6 +122,9 @@ | |||
| 122 | #define SIOCBRADDIF 0x89a2 /* add interface to bridge */ | 122 | #define SIOCBRADDIF 0x89a2 /* add interface to bridge */ |
| 123 | #define SIOCBRDELIF 0x89a3 /* remove interface from bridge */ | 123 | #define SIOCBRDELIF 0x89a3 /* remove interface from bridge */ |
| 124 | 124 | ||
| 125 | /* hardware time stamping: parameters in linux/net_tstamp.h */ | ||
| 126 | #define SIOCSHWTSTAMP 0x89b0 | ||
| 127 | |||
| 125 | /* Device private ioctl calls */ | 128 | /* Device private ioctl calls */ |
| 126 | 129 | ||
| 127 | /* | 130 | /* |
diff --git a/include/linux/sound.h b/include/linux/sound.h index 9e2a94feed6b..44dcf0570432 100644 --- a/include/linux/sound.h +++ b/include/linux/sound.h | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #define SND_DEV_AMIDI 13 /* Like /dev/midi (obsolete) */ | 25 | #define SND_DEV_AMIDI 13 /* Like /dev/midi (obsolete) */ |
| 26 | #define SND_DEV_ADMMIDI 14 /* Like /dev/dmmidi (onsolete) */ | 26 | #define SND_DEV_ADMMIDI 14 /* Like /dev/dmmidi (onsolete) */ |
| 27 | 27 | ||
| 28 | #ifdef __KERNEL__ | ||
| 28 | /* | 29 | /* |
| 29 | * Sound core interface functions | 30 | * Sound core interface functions |
| 30 | */ | 31 | */ |
| @@ -40,3 +41,4 @@ extern void unregister_sound_special(int unit); | |||
| 40 | extern void unregister_sound_mixer(int unit); | 41 | extern void unregister_sound_mixer(int unit); |
| 41 | extern void unregister_sound_midi(int unit); | 42 | extern void unregister_sound_midi(int unit); |
| 42 | extern void unregister_sound_dsp(int unit); | 43 | extern void unregister_sound_dsp(int unit); |
| 44 | #endif /* __KERNEL__ */ | ||
diff --git a/include/linux/soundcard.h b/include/linux/soundcard.h index 523d069c862c..1904afedb82f 100644 --- a/include/linux/soundcard.h +++ b/include/linux/soundcard.h | |||
| @@ -1045,50 +1045,36 @@ typedef struct mixer_vol_table { | |||
| 1045 | */ | 1045 | */ |
| 1046 | #define LOCL_STARTAUDIO 1 | 1046 | #define LOCL_STARTAUDIO 1 |
| 1047 | 1047 | ||
| 1048 | #if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS) | 1048 | #if !defined(__KERNEL__) || defined(USE_SEQ_MACROS) |
| 1049 | /* | 1049 | /* |
| 1050 | * Some convenience macros to simplify programming of the | 1050 | * Some convenience macros to simplify programming of the |
| 1051 | * /dev/sequencer interface | 1051 | * /dev/sequencer interface |
| 1052 | * | 1052 | * |
| 1053 | * These macros define the API which should be used when possible. | 1053 | * This is a legacy interface for applications written against |
| 1054 | * the OSSlib-3.8 style interface. It is no longer possible | ||
| 1055 | * to actually link against OSSlib with this header, but we | ||
| 1056 | * still provide these macros for programs using them. | ||
| 1057 | * | ||
| 1058 | * If you want to use OSSlib, it is recommended that you get | ||
| 1059 | * the GPL version of OSS-4.x and build against that version | ||
| 1060 | * of the header. | ||
| 1061 | * | ||
| 1062 | * We redefine the extern keyword so that make headers_check | ||
| 1063 | * does not complain about SEQ_USE_EXTBUF. | ||
| 1054 | */ | 1064 | */ |
| 1055 | #define SEQ_DECLAREBUF() SEQ_USE_EXTBUF() | 1065 | #define SEQ_DECLAREBUF() SEQ_USE_EXTBUF() |
| 1056 | 1066 | ||
| 1057 | void seqbuf_dump(void); /* This function must be provided by programs */ | 1067 | void seqbuf_dump(void); /* This function must be provided by programs */ |
| 1058 | 1068 | ||
| 1059 | extern int OSS_init(int seqfd, int buflen); | ||
| 1060 | extern void OSS_seqbuf_dump(int fd, unsigned char *buf, int buflen); | ||
| 1061 | extern void OSS_seq_advbuf(int len, int fd, unsigned char *buf, int buflen); | ||
| 1062 | extern void OSS_seq_needbuf(int len, int fd, unsigned char *buf, int buflen); | ||
| 1063 | extern void OSS_patch_caching(int dev, int chn, int patch, | ||
| 1064 | int fd, unsigned char *buf, int buflen); | ||
| 1065 | extern void OSS_drum_caching(int dev, int chn, int patch, | ||
| 1066 | int fd, unsigned char *buf, int buflen); | ||
| 1067 | extern void OSS_write_patch(int fd, unsigned char *buf, int len); | ||
| 1068 | extern int OSS_write_patch2(int fd, unsigned char *buf, int len); | ||
| 1069 | |||
| 1070 | #define SEQ_PM_DEFINES int __foo_bar___ | 1069 | #define SEQ_PM_DEFINES int __foo_bar___ |
| 1071 | #ifdef OSSLIB | 1070 | |
| 1072 | # define SEQ_USE_EXTBUF() \ | 1071 | #define SEQ_LOAD_GMINSTR(dev, instr) |
| 1073 | extern unsigned char *_seqbuf; \ | 1072 | #define SEQ_LOAD_GMDRUM(dev, drum) |
| 1074 | extern int _seqbuflen;extern int _seqbufptr | 1073 | |
| 1075 | # define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len | 1074 | #define _SEQ_EXTERN extern |
| 1076 | # define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen) | 1075 | #define SEQ_USE_EXTBUF() \ |
| 1077 | # define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen) | 1076 | _SEQ_EXTERN unsigned char _seqbuf[]; \ |
| 1078 | # define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen) | 1077 | _SEQ_EXTERN int _seqbuflen; _SEQ_EXTERN int _seqbufptr |
| 1079 | |||
| 1080 | # define SEQ_LOAD_GMINSTR(dev, instr) \ | ||
| 1081 | OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen) | ||
| 1082 | # define SEQ_LOAD_GMDRUM(dev, drum) \ | ||
| 1083 | OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen) | ||
| 1084 | #else /* !OSSLIB */ | ||
| 1085 | |||
| 1086 | # define SEQ_LOAD_GMINSTR(dev, instr) | ||
| 1087 | # define SEQ_LOAD_GMDRUM(dev, drum) | ||
| 1088 | |||
| 1089 | # define SEQ_USE_EXTBUF() \ | ||
| 1090 | extern unsigned char _seqbuf[]; \ | ||
| 1091 | extern int _seqbuflen;extern int _seqbufptr | ||
| 1092 | 1078 | ||
| 1093 | #ifndef USE_SIMPLE_MACROS | 1079 | #ifndef USE_SIMPLE_MACROS |
| 1094 | /* Sample seqbuf_dump() implementation: | 1080 | /* Sample seqbuf_dump() implementation: |
| @@ -1131,7 +1117,6 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); | |||
| 1131 | */ | 1117 | */ |
| 1132 | #define _SEQ_NEEDBUF(len) /* empty */ | 1118 | #define _SEQ_NEEDBUF(len) /* empty */ |
| 1133 | #endif | 1119 | #endif |
| 1134 | #endif /* !OSSLIB */ | ||
| 1135 | 1120 | ||
| 1136 | #define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\ | 1121 | #define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\ |
| 1137 | _seqbuf[_seqbufptr] = SEQ_EXTENDED;\ | 1122 | _seqbuf[_seqbufptr] = SEQ_EXTENDED;\ |
| @@ -1215,14 +1200,8 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); | |||
| 1215 | _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0) | 1200 | _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0) |
| 1216 | 1201 | ||
| 1217 | #define SEQ_SET_PATCH SEQ_PGM_CHANGE | 1202 | #define SEQ_SET_PATCH SEQ_PGM_CHANGE |
| 1218 | #ifdef OSSLIB | 1203 | #define SEQ_PGM_CHANGE(dev, chn, patch) \ |
| 1219 | # define SEQ_PGM_CHANGE(dev, chn, patch) \ | ||
| 1220 | {OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); \ | ||
| 1221 | _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);} | ||
| 1222 | #else | ||
| 1223 | # define SEQ_PGM_CHANGE(dev, chn, patch) \ | ||
| 1224 | _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0) | 1204 | _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0) |
| 1225 | #endif | ||
| 1226 | 1205 | ||
| 1227 | #define SEQ_CONTROL(dev, chn, controller, value) \ | 1206 | #define SEQ_CONTROL(dev, chn, controller, value) \ |
| 1228 | _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value) | 1207 | _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value) |
| @@ -1300,19 +1279,12 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); | |||
| 1300 | /* | 1279 | /* |
| 1301 | * Patch loading. | 1280 | * Patch loading. |
| 1302 | */ | 1281 | */ |
| 1303 | #ifdef OSSLIB | 1282 | #define SEQ_WRPATCH(patchx, len) \ |
| 1304 | # define SEQ_WRPATCH(patchx, len) \ | ||
| 1305 | OSS_write_patch(seqfd, (char*)(patchx), len) | ||
| 1306 | # define SEQ_WRPATCH2(patchx, len) \ | ||
| 1307 | OSS_write_patch2(seqfd, (char*)(patchx), len) | ||
| 1308 | #else | ||
| 1309 | # define SEQ_WRPATCH(patchx, len) \ | ||
| 1310 | {if (_seqbufptr) SEQ_DUMPBUF();\ | 1283 | {if (_seqbufptr) SEQ_DUMPBUF();\ |
| 1311 | if (write(seqfd, (char*)(patchx), len)==-1) \ | 1284 | if (write(seqfd, (char*)(patchx), len)==-1) \ |
| 1312 | perror("Write patch: /dev/sequencer");} | 1285 | perror("Write patch: /dev/sequencer");} |
| 1313 | # define SEQ_WRPATCH2(patchx, len) \ | 1286 | #define SEQ_WRPATCH2(patchx, len) \ |
| 1314 | (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len)) | 1287 | (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len)) |
| 1315 | #endif | ||
| 1316 | 1288 | ||
| 1317 | #endif | 1289 | #endif |
| 1318 | #endif | 1290 | #endif |
diff --git a/include/linux/spi/libertas_spi.h b/include/linux/spi/libertas_spi.h new file mode 100644 index 000000000000..79506f5f9e67 --- /dev/null +++ b/include/linux/spi/libertas_spi.h | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* | ||
| 2 | * board-specific data for the libertas_spi driver. | ||
| 3 | * | ||
| 4 | * Copyright 2008 Analog Devices Inc. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or (at | ||
| 9 | * your option) any later version. | ||
| 10 | */ | ||
| 11 | #ifndef _LIBERTAS_SPI_H_ | ||
| 12 | #define _LIBERTAS_SPI_H_ | ||
| 13 | |||
| 14 | struct spi_device; | ||
| 15 | |||
| 16 | struct libertas_spi_platform_data { | ||
| 17 | /* There are two ways to read data from the WLAN module's SPI | ||
| 18 | * interface. Setting 0 or 1 here controls which one is used. | ||
| 19 | * | ||
| 20 | * Usually you want to set use_dummy_writes = 1. | ||
| 21 | * However, if that doesn't work or if you are using a slow SPI clock | ||
| 22 | * speed, you may want to use 0 here. */ | ||
| 23 | u16 use_dummy_writes; | ||
| 24 | |||
| 25 | /* GPIO number to use as chip select */ | ||
| 26 | u16 gpio_cs; | ||
| 27 | |||
| 28 | /* Board specific setup/teardown */ | ||
| 29 | int (*setup)(struct spi_device *spi); | ||
| 30 | int (*teardown)(struct spi_device *spi); | ||
| 31 | }; | ||
| 32 | #endif | ||
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index bf8de281b4ed..eed4254bd503 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h | |||
| @@ -83,6 +83,13 @@ extern int spi_bitbang_stop(struct spi_bitbang *spi); | |||
| 83 | * int getmiso(struct spi_device *); | 83 | * int getmiso(struct spi_device *); |
| 84 | * void spidelay(unsigned); | 84 | * void spidelay(unsigned); |
| 85 | * | 85 | * |
| 86 | * setsck()'s is_on parameter is a zero/nonzero boolean. | ||
| 87 | * | ||
| 88 | * setmosi()'s is_on parameter is a zero/nonzero boolean. | ||
| 89 | * | ||
| 90 | * getmiso() is required to return 0 or 1 only. Any other value is invalid | ||
| 91 | * and will result in improper operation. | ||
| 92 | * | ||
| 86 | * A non-inlined routine would call bitbang_txrx_*() routines. The | 93 | * A non-inlined routine would call bitbang_txrx_*() routines. The |
| 87 | * main loop could easily compile down to a handful of instructions, | 94 | * main loop could easily compile down to a handful of instructions, |
| 88 | * especially if the delay is a NOP (to run at peak speed). | 95 | * especially if the delay is a NOP (to run at peak speed). |
diff --git a/include/linux/spi/spidev.h b/include/linux/spi/spidev.h index c93ef9d42a01..95251ccd5a07 100644 --- a/include/linux/spi/spidev.h +++ b/include/linux/spi/spidev.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #ifndef SPIDEV_H | 22 | #ifndef SPIDEV_H |
| 23 | #define SPIDEV_H | 23 | #define SPIDEV_H |
| 24 | 24 | ||
| 25 | #include <linux/types.h> | ||
| 25 | 26 | ||
| 26 | /* User space versions of kernel symbols for SPI clocking modes, | 27 | /* User space versions of kernel symbols for SPI clocking modes, |
| 27 | * matching <linux/spi/spi.h> | 28 | * matching <linux/spi/spi.h> |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index e0c0fccced46..a0c66a2e00ad 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
| @@ -124,7 +124,12 @@ do { \ | |||
| 124 | #ifdef CONFIG_GENERIC_LOCKBREAK | 124 | #ifdef CONFIG_GENERIC_LOCKBREAK |
| 125 | #define spin_is_contended(lock) ((lock)->break_lock) | 125 | #define spin_is_contended(lock) ((lock)->break_lock) |
| 126 | #else | 126 | #else |
| 127 | |||
| 128 | #ifdef __raw_spin_is_contended | ||
| 127 | #define spin_is_contended(lock) __raw_spin_is_contended(&(lock)->raw_lock) | 129 | #define spin_is_contended(lock) __raw_spin_is_contended(&(lock)->raw_lock) |
| 130 | #else | ||
| 131 | #define spin_is_contended(lock) (((void)(lock), 0)) | ||
| 132 | #endif /*__raw_spin_is_contended*/ | ||
| 128 | #endif | 133 | #endif |
| 129 | 134 | ||
| 130 | /** | 135 | /** |
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 17d9b58f6379..5ae8fa22d331 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
| @@ -339,6 +339,10 @@ extern int ssb_bus_pcmciabus_register(struct ssb_bus *bus, | |||
| 339 | 339 | ||
| 340 | extern void ssb_bus_unregister(struct ssb_bus *bus); | 340 | extern void ssb_bus_unregister(struct ssb_bus *bus); |
| 341 | 341 | ||
| 342 | /* Set a fallback SPROM. | ||
| 343 | * See kdoc at the function definition for complete documentation. */ | ||
| 344 | extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom); | ||
| 345 | |||
| 342 | /* Suspend a SSB bus. | 346 | /* Suspend a SSB bus. |
| 343 | * Call this from the parent bus suspend routine. */ | 347 | * Call this from the parent bus suspend routine. */ |
| 344 | extern int ssb_bus_suspend(struct ssb_bus *bus); | 348 | extern int ssb_bus_suspend(struct ssb_bus *bus); |
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h index 7d7e03dcf77c..d3b1d18922f2 100644 --- a/include/linux/ssb/ssb_driver_chipcommon.h +++ b/include/linux/ssb/ssb_driver_chipcommon.h | |||
| @@ -181,6 +181,16 @@ | |||
| 181 | #define SSB_CHIPCO_PROG_WAITCNT 0x0124 | 181 | #define SSB_CHIPCO_PROG_WAITCNT 0x0124 |
| 182 | #define SSB_CHIPCO_FLASH_CFG 0x0128 | 182 | #define SSB_CHIPCO_FLASH_CFG 0x0128 |
| 183 | #define SSB_CHIPCO_FLASH_WAITCNT 0x012C | 183 | #define SSB_CHIPCO_FLASH_WAITCNT 0x012C |
| 184 | #define SSB_CHIPCO_CLKCTLST 0x01E0 /* Clock control and status (rev >= 20) */ | ||
| 185 | #define SSB_CHIPCO_CLKCTLST_FORCEALP 0x00000001 /* Force ALP request */ | ||
| 186 | #define SSB_CHIPCO_CLKCTLST_FORCEHT 0x00000002 /* Force HT request */ | ||
| 187 | #define SSB_CHIPCO_CLKCTLST_FORCEILP 0x00000004 /* Force ILP request */ | ||
| 188 | #define SSB_CHIPCO_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */ | ||
| 189 | #define SSB_CHIPCO_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */ | ||
| 190 | #define SSB_CHIPCO_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */ | ||
| 191 | #define SSB_CHIPCO_CLKCTLST_HAVEHT 0x00010000 /* HT available */ | ||
| 192 | #define SSB_CHIPCO_CLKCTLST_HAVEALP 0x00020000 /* APL available */ | ||
| 193 | #define SSB_CHIPCO_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ | ||
| 184 | #define SSB_CHIPCO_UART0_DATA 0x0300 | 194 | #define SSB_CHIPCO_UART0_DATA 0x0300 |
| 185 | #define SSB_CHIPCO_UART0_IMR 0x0304 | 195 | #define SSB_CHIPCO_UART0_IMR 0x0304 |
| 186 | #define SSB_CHIPCO_UART0_FCR 0x0308 | 196 | #define SSB_CHIPCO_UART0_FCR 0x0308 |
| @@ -197,6 +207,196 @@ | |||
| 197 | #define SSB_CHIPCO_UART1_LSR 0x0414 | 207 | #define SSB_CHIPCO_UART1_LSR 0x0414 |
| 198 | #define SSB_CHIPCO_UART1_MSR 0x0418 | 208 | #define SSB_CHIPCO_UART1_MSR 0x0418 |
| 199 | #define SSB_CHIPCO_UART1_SCRATCH 0x041C | 209 | #define SSB_CHIPCO_UART1_SCRATCH 0x041C |
| 210 | /* PMU registers (rev >= 20) */ | ||
| 211 | #define SSB_CHIPCO_PMU_CTL 0x0600 /* PMU control */ | ||
| 212 | #define SSB_CHIPCO_PMU_CTL_ILP_DIV 0xFFFF0000 /* ILP div mask */ | ||
| 213 | #define SSB_CHIPCO_PMU_CTL_ILP_DIV_SHIFT 16 | ||
| 214 | #define SSB_CHIPCO_PMU_CTL_NOILPONW 0x00000200 /* No ILP on wait */ | ||
| 215 | #define SSB_CHIPCO_PMU_CTL_HTREQEN 0x00000100 /* HT req enable */ | ||
| 216 | #define SSB_CHIPCO_PMU_CTL_ALPREQEN 0x00000080 /* ALP req enable */ | ||
| 217 | #define SSB_CHIPCO_PMU_CTL_XTALFREQ 0x0000007C /* Crystal freq */ | ||
| 218 | #define SSB_CHIPCO_PMU_CTL_XTALFREQ_SHIFT 2 | ||
| 219 | #define SSB_CHIPCO_PMU_CTL_ILPDIVEN 0x00000002 /* ILP div enable */ | ||
| 220 | #define SSB_CHIPCO_PMU_CTL_LPOSEL 0x00000001 /* LPO sel */ | ||
| 221 | #define SSB_CHIPCO_PMU_CAP 0x0604 /* PMU capabilities */ | ||
| 222 | #define SSB_CHIPCO_PMU_CAP_REVISION 0x000000FF /* Revision mask */ | ||
| 223 | #define SSB_CHIPCO_PMU_STAT 0x0608 /* PMU status */ | ||
| 224 | #define SSB_CHIPCO_PMU_STAT_INTPEND 0x00000040 /* Interrupt pending */ | ||
| 225 | #define SSB_CHIPCO_PMU_STAT_SBCLKST 0x00000030 /* Backplane clock status? */ | ||
| 226 | #define SSB_CHIPCO_PMU_STAT_HAVEALP 0x00000008 /* ALP available */ | ||
| 227 | #define SSB_CHIPCO_PMU_STAT_HAVEHT 0x00000004 /* HT available */ | ||
| 228 | #define SSB_CHIPCO_PMU_STAT_RESINIT 0x00000003 /* Res init */ | ||
| 229 | #define SSB_CHIPCO_PMU_RES_STAT 0x060C /* PMU res status */ | ||
| 230 | #define SSB_CHIPCO_PMU_RES_PEND 0x0610 /* PMU res pending */ | ||
| 231 | #define SSB_CHIPCO_PMU_TIMER 0x0614 /* PMU timer */ | ||
| 232 | #define SSB_CHIPCO_PMU_MINRES_MSK 0x0618 /* PMU min res mask */ | ||
| 233 | #define SSB_CHIPCO_PMU_MAXRES_MSK 0x061C /* PMU max res mask */ | ||
| 234 | #define SSB_CHIPCO_PMU_RES_TABSEL 0x0620 /* PMU res table sel */ | ||
| 235 | #define SSB_CHIPCO_PMU_RES_DEPMSK 0x0624 /* PMU res dep mask */ | ||
| 236 | #define SSB_CHIPCO_PMU_RES_UPDNTM 0x0628 /* PMU res updown timer */ | ||
| 237 | #define SSB_CHIPCO_PMU_RES_TIMER 0x062C /* PMU res timer */ | ||
| 238 | #define SSB_CHIPCO_PMU_CLKSTRETCH 0x0630 /* PMU clockstretch */ | ||
| 239 | #define SSB_CHIPCO_PMU_WATCHDOG 0x0634 /* PMU watchdog */ | ||
| 240 | #define SSB_CHIPCO_PMU_RES_REQTS 0x0640 /* PMU res req timer sel */ | ||
| 241 | #define SSB_CHIPCO_PMU_RES_REQT 0x0644 /* PMU res req timer */ | ||
| 242 | #define SSB_CHIPCO_PMU_RES_REQM 0x0648 /* PMU res req mask */ | ||
| 243 | #define SSB_CHIPCO_CHIPCTL_ADDR 0x0650 | ||
| 244 | #define SSB_CHIPCO_CHIPCTL_DATA 0x0654 | ||
| 245 | #define SSB_CHIPCO_REGCTL_ADDR 0x0658 | ||
| 246 | #define SSB_CHIPCO_REGCTL_DATA 0x065C | ||
| 247 | #define SSB_CHIPCO_PLLCTL_ADDR 0x0660 | ||
| 248 | #define SSB_CHIPCO_PLLCTL_DATA 0x0664 | ||
| 249 | |||
| 250 | |||
| 251 | |||
| 252 | /** PMU PLL registers */ | ||
| 253 | |||
| 254 | /* PMU rev 0 PLL registers */ | ||
| 255 | #define SSB_PMU0_PLLCTL0 0 | ||
| 256 | #define SSB_PMU0_PLLCTL0_PDIV_MSK 0x00000001 | ||
| 257 | #define SSB_PMU0_PLLCTL0_PDIV_FREQ 25000 /* kHz */ | ||
| 258 | #define SSB_PMU0_PLLCTL1 1 | ||
| 259 | #define SSB_PMU0_PLLCTL1_WILD_IMSK 0xF0000000 /* Wild int mask (low nibble) */ | ||
| 260 | #define SSB_PMU0_PLLCTL1_WILD_IMSK_SHIFT 28 | ||
| 261 | #define SSB_PMU0_PLLCTL1_WILD_FMSK 0x0FFFFF00 /* Wild frac mask */ | ||
| 262 | #define SSB_PMU0_PLLCTL1_WILD_FMSK_SHIFT 8 | ||
| 263 | #define SSB_PMU0_PLLCTL1_STOPMOD 0x00000040 /* Stop mod */ | ||
| 264 | #define SSB_PMU0_PLLCTL2 2 | ||
| 265 | #define SSB_PMU0_PLLCTL2_WILD_IMSKHI 0x0000000F /* Wild int mask (high nibble) */ | ||
| 266 | #define SSB_PMU0_PLLCTL2_WILD_IMSKHI_SHIFT 0 | ||
| 267 | |||
| 268 | /* PMU rev 1 PLL registers */ | ||
| 269 | #define SSB_PMU1_PLLCTL0 0 | ||
| 270 | #define SSB_PMU1_PLLCTL0_P1DIV 0x00F00000 /* P1 div */ | ||
| 271 | #define SSB_PMU1_PLLCTL0_P1DIV_SHIFT 20 | ||
| 272 | #define SSB_PMU1_PLLCTL0_P2DIV 0x0F000000 /* P2 div */ | ||
| 273 | #define SSB_PMU1_PLLCTL0_P2DIV_SHIFT 24 | ||
| 274 | #define SSB_PMU1_PLLCTL1 1 | ||
| 275 | #define SSB_PMU1_PLLCTL1_M1DIV 0x000000FF /* M1 div */ | ||
| 276 | #define SSB_PMU1_PLLCTL1_M1DIV_SHIFT 0 | ||
| 277 | #define SSB_PMU1_PLLCTL1_M2DIV 0x0000FF00 /* M2 div */ | ||
| 278 | #define SSB_PMU1_PLLCTL1_M2DIV_SHIFT 8 | ||
| 279 | #define SSB_PMU1_PLLCTL1_M3DIV 0x00FF0000 /* M3 div */ | ||
| 280 | #define SSB_PMU1_PLLCTL1_M3DIV_SHIFT 16 | ||
| 281 | #define SSB_PMU1_PLLCTL1_M4DIV 0xFF000000 /* M4 div */ | ||
| 282 | #define SSB_PMU1_PLLCTL1_M4DIV_SHIFT 24 | ||
| 283 | #define SSB_PMU1_PLLCTL2 2 | ||
| 284 | #define SSB_PMU1_PLLCTL2_M5DIV 0x000000FF /* M5 div */ | ||
| 285 | #define SSB_PMU1_PLLCTL2_M5DIV_SHIFT 0 | ||
| 286 | #define SSB_PMU1_PLLCTL2_M6DIV 0x0000FF00 /* M6 div */ | ||
| 287 | #define SSB_PMU1_PLLCTL2_M6DIV_SHIFT 8 | ||
| 288 | #define SSB_PMU1_PLLCTL2_NDIVMODE 0x000E0000 /* NDIV mode */ | ||
| 289 | #define SSB_PMU1_PLLCTL2_NDIVMODE_SHIFT 17 | ||
| 290 | #define SSB_PMU1_PLLCTL2_NDIVINT 0x1FF00000 /* NDIV int */ | ||
| 291 | #define SSB_PMU1_PLLCTL2_NDIVINT_SHIFT 20 | ||
| 292 | #define SSB_PMU1_PLLCTL3 3 | ||
| 293 | #define SSB_PMU1_PLLCTL3_NDIVFRAC 0x00FFFFFF /* NDIV frac */ | ||
| 294 | #define SSB_PMU1_PLLCTL3_NDIVFRAC_SHIFT 0 | ||
| 295 | #define SSB_PMU1_PLLCTL4 4 | ||
| 296 | #define SSB_PMU1_PLLCTL5 5 | ||
| 297 | #define SSB_PMU1_PLLCTL5_CLKDRV 0xFFFFFF00 /* clk drv */ | ||
| 298 | #define SSB_PMU1_PLLCTL5_CLKDRV_SHIFT 8 | ||
| 299 | |||
| 300 | /* BCM4312 PLL resource numbers. */ | ||
| 301 | #define SSB_PMURES_4312_SWITCHER_BURST 0 | ||
| 302 | #define SSB_PMURES_4312_SWITCHER_PWM 1 | ||
| 303 | #define SSB_PMURES_4312_PA_REF_LDO 2 | ||
| 304 | #define SSB_PMURES_4312_CORE_LDO_BURST 3 | ||
| 305 | #define SSB_PMURES_4312_CORE_LDO_PWM 4 | ||
| 306 | #define SSB_PMURES_4312_RADIO_LDO 5 | ||
| 307 | #define SSB_PMURES_4312_ILP_REQUEST 6 | ||
| 308 | #define SSB_PMURES_4312_BG_FILTBYP 7 | ||
| 309 | #define SSB_PMURES_4312_TX_FILTBYP 8 | ||
| 310 | #define SSB_PMURES_4312_RX_FILTBYP 9 | ||
| 311 | #define SSB_PMURES_4312_XTAL_PU 10 | ||
| 312 | #define SSB_PMURES_4312_ALP_AVAIL 11 | ||
| 313 | #define SSB_PMURES_4312_BB_PLL_FILTBYP 12 | ||
| 314 | #define SSB_PMURES_4312_RF_PLL_FILTBYP 13 | ||
| 315 | #define SSB_PMURES_4312_HT_AVAIL 14 | ||
| 316 | |||
| 317 | /* BCM4325 PLL resource numbers. */ | ||
| 318 | #define SSB_PMURES_4325_BUCK_BOOST_BURST 0 | ||
| 319 | #define SSB_PMURES_4325_CBUCK_BURST 1 | ||
| 320 | #define SSB_PMURES_4325_CBUCK_PWM 2 | ||
| 321 | #define SSB_PMURES_4325_CLDO_CBUCK_BURST 3 | ||
| 322 | #define SSB_PMURES_4325_CLDO_CBUCK_PWM 4 | ||
| 323 | #define SSB_PMURES_4325_BUCK_BOOST_PWM 5 | ||
| 324 | #define SSB_PMURES_4325_ILP_REQUEST 6 | ||
| 325 | #define SSB_PMURES_4325_ABUCK_BURST 7 | ||
| 326 | #define SSB_PMURES_4325_ABUCK_PWM 8 | ||
| 327 | #define SSB_PMURES_4325_LNLDO1_PU 9 | ||
| 328 | #define SSB_PMURES_4325_LNLDO2_PU 10 | ||
| 329 | #define SSB_PMURES_4325_LNLDO3_PU 11 | ||
| 330 | #define SSB_PMURES_4325_LNLDO4_PU 12 | ||
| 331 | #define SSB_PMURES_4325_XTAL_PU 13 | ||
| 332 | #define SSB_PMURES_4325_ALP_AVAIL 14 | ||
| 333 | #define SSB_PMURES_4325_RX_PWRSW_PU 15 | ||
| 334 | #define SSB_PMURES_4325_TX_PWRSW_PU 16 | ||
| 335 | #define SSB_PMURES_4325_RFPLL_PWRSW_PU 17 | ||
| 336 | #define SSB_PMURES_4325_LOGEN_PWRSW_PU 18 | ||
| 337 | #define SSB_PMURES_4325_AFE_PWRSW_PU 19 | ||
| 338 | #define SSB_PMURES_4325_BBPLL_PWRSW_PU 20 | ||
| 339 | #define SSB_PMURES_4325_HT_AVAIL 21 | ||
| 340 | |||
| 341 | /* BCM4328 PLL resource numbers. */ | ||
| 342 | #define SSB_PMURES_4328_EXT_SWITCHER_PWM 0 | ||
| 343 | #define SSB_PMURES_4328_BB_SWITCHER_PWM 1 | ||
| 344 | #define SSB_PMURES_4328_BB_SWITCHER_BURST 2 | ||
| 345 | #define SSB_PMURES_4328_BB_EXT_SWITCHER_BURST 3 | ||
| 346 | #define SSB_PMURES_4328_ILP_REQUEST 4 | ||
| 347 | #define SSB_PMURES_4328_RADIO_SWITCHER_PWM 5 | ||
| 348 | #define SSB_PMURES_4328_RADIO_SWITCHER_BURST 6 | ||
| 349 | #define SSB_PMURES_4328_ROM_SWITCH 7 | ||
| 350 | #define SSB_PMURES_4328_PA_REF_LDO 8 | ||
| 351 | #define SSB_PMURES_4328_RADIO_LDO 9 | ||
| 352 | #define SSB_PMURES_4328_AFE_LDO 10 | ||
| 353 | #define SSB_PMURES_4328_PLL_LDO 11 | ||
| 354 | #define SSB_PMURES_4328_BG_FILTBYP 12 | ||
| 355 | #define SSB_PMURES_4328_TX_FILTBYP 13 | ||
| 356 | #define SSB_PMURES_4328_RX_FILTBYP 14 | ||
| 357 | #define SSB_PMURES_4328_XTAL_PU 15 | ||
| 358 | #define SSB_PMURES_4328_XTAL_EN 16 | ||
| 359 | #define SSB_PMURES_4328_BB_PLL_FILTBYP 17 | ||
| 360 | #define SSB_PMURES_4328_RF_PLL_FILTBYP 18 | ||
| 361 | #define SSB_PMURES_4328_BB_PLL_PU 19 | ||
| 362 | |||
| 363 | /* BCM5354 PLL resource numbers. */ | ||
| 364 | #define SSB_PMURES_5354_EXT_SWITCHER_PWM 0 | ||
| 365 | #define SSB_PMURES_5354_BB_SWITCHER_PWM 1 | ||
| 366 | #define SSB_PMURES_5354_BB_SWITCHER_BURST 2 | ||
| 367 | #define SSB_PMURES_5354_BB_EXT_SWITCHER_BURST 3 | ||
| 368 | #define SSB_PMURES_5354_ILP_REQUEST 4 | ||
| 369 | #define SSB_PMURES_5354_RADIO_SWITCHER_PWM 5 | ||
| 370 | #define SSB_PMURES_5354_RADIO_SWITCHER_BURST 6 | ||
| 371 | #define SSB_PMURES_5354_ROM_SWITCH 7 | ||
| 372 | #define SSB_PMURES_5354_PA_REF_LDO 8 | ||
| 373 | #define SSB_PMURES_5354_RADIO_LDO 9 | ||
| 374 | #define SSB_PMURES_5354_AFE_LDO 10 | ||
| 375 | #define SSB_PMURES_5354_PLL_LDO 11 | ||
| 376 | #define SSB_PMURES_5354_BG_FILTBYP 12 | ||
| 377 | #define SSB_PMURES_5354_TX_FILTBYP 13 | ||
| 378 | #define SSB_PMURES_5354_RX_FILTBYP 14 | ||
| 379 | #define SSB_PMURES_5354_XTAL_PU 15 | ||
| 380 | #define SSB_PMURES_5354_XTAL_EN 16 | ||
| 381 | #define SSB_PMURES_5354_BB_PLL_FILTBYP 17 | ||
| 382 | #define SSB_PMURES_5354_RF_PLL_FILTBYP 18 | ||
| 383 | #define SSB_PMURES_5354_BB_PLL_PU 19 | ||
| 384 | |||
| 385 | |||
| 386 | |||
| 387 | /** Chip specific Chip-Status register contents. */ | ||
| 388 | #define SSB_CHIPCO_CHST_4325_SPROM_OTP_SEL 0x00000003 | ||
| 389 | #define SSB_CHIPCO_CHST_4325_DEFCIS_SEL 0 /* OTP is powered up, use def. CIS, no SPROM */ | ||
| 390 | #define SSB_CHIPCO_CHST_4325_SPROM_SEL 1 /* OTP is powered up, SPROM is present */ | ||
| 391 | #define SSB_CHIPCO_CHST_4325_OTP_SEL 2 /* OTP is powered up, no SPROM */ | ||
| 392 | #define SSB_CHIPCO_CHST_4325_OTP_PWRDN 3 /* OTP is powered down, SPROM is present */ | ||
| 393 | #define SSB_CHIPCO_CHST_4325_SDIO_USB_MODE 0x00000004 | ||
| 394 | #define SSB_CHIPCO_CHST_4325_SDIO_USB_MODE_SHIFT 2 | ||
| 395 | #define SSB_CHIPCO_CHST_4325_RCAL_VALID 0x00000008 | ||
| 396 | #define SSB_CHIPCO_CHST_4325_RCAL_VALID_SHIFT 3 | ||
| 397 | #define SSB_CHIPCO_CHST_4325_RCAL_VALUE 0x000001F0 | ||
| 398 | #define SSB_CHIPCO_CHST_4325_RCAL_VALUE_SHIFT 4 | ||
| 399 | #define SSB_CHIPCO_CHST_4325_PMUTOP_2B 0x00000200 /* 1 for 2b, 0 for to 2a */ | ||
| 200 | 400 | ||
| 201 | 401 | ||
| 202 | 402 | ||
| @@ -353,11 +553,20 @@ | |||
| 353 | struct ssb_device; | 553 | struct ssb_device; |
| 354 | struct ssb_serial_port; | 554 | struct ssb_serial_port; |
| 355 | 555 | ||
| 556 | /* Data for the PMU, if available. | ||
| 557 | * Check availability with ((struct ssb_chipcommon)->capabilities & SSB_CHIPCO_CAP_PMU) | ||
| 558 | */ | ||
| 559 | struct ssb_chipcommon_pmu { | ||
| 560 | u8 rev; /* PMU revision */ | ||
| 561 | u32 crystalfreq; /* The active crystal frequency (in kHz) */ | ||
| 562 | }; | ||
| 563 | |||
| 356 | struct ssb_chipcommon { | 564 | struct ssb_chipcommon { |
| 357 | struct ssb_device *dev; | 565 | struct ssb_device *dev; |
| 358 | u32 capabilities; | 566 | u32 capabilities; |
| 359 | /* Fast Powerup Delay constant */ | 567 | /* Fast Powerup Delay constant */ |
| 360 | u16 fast_pwrup_delay; | 568 | u16 fast_pwrup_delay; |
| 569 | struct ssb_chipcommon_pmu pmu; | ||
| 361 | }; | 570 | }; |
| 362 | 571 | ||
| 363 | static inline bool ssb_chipco_available(struct ssb_chipcommon *cc) | 572 | static inline bool ssb_chipco_available(struct ssb_chipcommon *cc) |
| @@ -365,6 +574,17 @@ static inline bool ssb_chipco_available(struct ssb_chipcommon *cc) | |||
| 365 | return (cc->dev != NULL); | 574 | return (cc->dev != NULL); |
| 366 | } | 575 | } |
| 367 | 576 | ||
| 577 | /* Register access */ | ||
| 578 | #define chipco_read32(cc, offset) ssb_read32((cc)->dev, offset) | ||
| 579 | #define chipco_write32(cc, offset, val) ssb_write32((cc)->dev, offset, val) | ||
| 580 | |||
| 581 | #define chipco_mask32(cc, offset, mask) \ | ||
| 582 | chipco_write32(cc, offset, chipco_read32(cc, offset) & (mask)) | ||
| 583 | #define chipco_set32(cc, offset, set) \ | ||
| 584 | chipco_write32(cc, offset, chipco_read32(cc, offset) | (set)) | ||
| 585 | #define chipco_maskset32(cc, offset, mask, set) \ | ||
| 586 | chipco_write32(cc, offset, (chipco_read32(cc, offset) & (mask)) | (set)) | ||
| 587 | |||
| 368 | extern void ssb_chipcommon_init(struct ssb_chipcommon *cc); | 588 | extern void ssb_chipcommon_init(struct ssb_chipcommon *cc); |
| 369 | 589 | ||
| 370 | extern void ssb_chipco_suspend(struct ssb_chipcommon *cc); | 590 | extern void ssb_chipco_suspend(struct ssb_chipcommon *cc); |
| @@ -406,4 +626,8 @@ extern int ssb_chipco_serial_init(struct ssb_chipcommon *cc, | |||
| 406 | struct ssb_serial_port *ports); | 626 | struct ssb_serial_port *ports); |
| 407 | #endif /* CONFIG_SSB_SERIAL */ | 627 | #endif /* CONFIG_SSB_SERIAL */ |
| 408 | 628 | ||
| 629 | /* PMU support */ | ||
| 630 | extern void ssb_pmu_init(struct ssb_chipcommon *cc); | ||
| 631 | |||
| 632 | |||
| 409 | #endif /* LINUX_SSB_CHIPCO_H_ */ | 633 | #endif /* LINUX_SSB_CHIPCO_H_ */ |
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index 99a0f991e850..a01b982b5783 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
| @@ -326,6 +326,42 @@ | |||
| 326 | #define SSB_SPROM5_GPIOB_P3 0xFF00 /* Pin 3 */ | 326 | #define SSB_SPROM5_GPIOB_P3 0xFF00 /* Pin 3 */ |
| 327 | #define SSB_SPROM5_GPIOB_P3_SHIFT 8 | 327 | #define SSB_SPROM5_GPIOB_P3_SHIFT 8 |
| 328 | 328 | ||
| 329 | /* SPROM Revision 8 */ | ||
| 330 | #define SSB_SPROM8_BFLLO 0x1084 /* Boardflags (low 16 bits) */ | ||
| 331 | #define SSB_SPROM8_BFLHI 0x1086 /* Boardflags Hi */ | ||
| 332 | #define SSB_SPROM8_IL0MAC 0x108C /* 6 byte MAC address */ | ||
| 333 | #define SSB_SPROM8_CCODE 0x1092 /* 2 byte country code */ | ||
| 334 | #define SSB_SPROM8_ANTAVAIL 0x109C /* Antenna available bitfields*/ | ||
| 335 | #define SSB_SPROM8_ANTAVAIL_A 0xFF00 /* A-PHY bitfield */ | ||
| 336 | #define SSB_SPROM8_ANTAVAIL_A_SHIFT 8 | ||
| 337 | #define SSB_SPROM8_ANTAVAIL_BG 0x00FF /* B-PHY and G-PHY bitfield */ | ||
| 338 | #define SSB_SPROM8_ANTAVAIL_BG_SHIFT 0 | ||
| 339 | #define SSB_SPROM8_AGAIN01 0x109E /* Antenna Gain (in dBm Q5.2) */ | ||
| 340 | #define SSB_SPROM8_AGAIN0 0x00FF /* Antenna 0 */ | ||
| 341 | #define SSB_SPROM8_AGAIN0_SHIFT 0 | ||
| 342 | #define SSB_SPROM8_AGAIN1 0xFF00 /* Antenna 1 */ | ||
| 343 | #define SSB_SPROM8_AGAIN1_SHIFT 8 | ||
| 344 | #define SSB_SPROM8_AGAIN23 0x10A0 | ||
| 345 | #define SSB_SPROM8_AGAIN2 0x00FF /* Antenna 2 */ | ||
| 346 | #define SSB_SPROM8_AGAIN2_SHIFT 0 | ||
| 347 | #define SSB_SPROM8_AGAIN3 0xFF00 /* Antenna 3 */ | ||
| 348 | #define SSB_SPROM8_AGAIN3_SHIFT 8 | ||
| 349 | #define SSB_SPROM8_GPIOA 0x1096 /*Gen. Purpose IO # 0 and 1 */ | ||
| 350 | #define SSB_SPROM8_GPIOA_P0 0x00FF /* Pin 0 */ | ||
| 351 | #define SSB_SPROM8_GPIOA_P1 0xFF00 /* Pin 1 */ | ||
| 352 | #define SSB_SPROM8_GPIOA_P1_SHIFT 8 | ||
| 353 | #define SSB_SPROM8_GPIOB 0x1098 /* Gen. Purpose IO # 2 and 3 */ | ||
| 354 | #define SSB_SPROM8_GPIOB_P2 0x00FF /* Pin 2 */ | ||
| 355 | #define SSB_SPROM8_GPIOB_P3 0xFF00 /* Pin 3 */ | ||
| 356 | #define SSB_SPROM8_GPIOB_P3_SHIFT 8 | ||
| 357 | #define SSB_SPROM8_MAXP_BG 0x10C0 /* Max Power BG in path 1 */ | ||
| 358 | #define SSB_SPROM8_MAXP_BG_MASK 0x00FF /* Mask for Max Power BG */ | ||
| 359 | #define SSB_SPROM8_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ | ||
| 360 | #define SSB_SPROM8_ITSSI_BG_SHIFT 8 | ||
| 361 | #define SSB_SPROM8_MAXP_A 0x10C8 /* Max Power A in path 1 */ | ||
| 362 | #define SSB_SPROM8_MAXP_A_MASK 0x00FF /* Mask for Max Power A */ | ||
| 363 | #define SSB_SPROM8_ITSSI_A 0xFF00 /* Mask for path 1 itssi_a */ | ||
| 364 | #define SSB_SPROM8_ITSSI_A_SHIFT 8 | ||
| 329 | 365 | ||
| 330 | /* Values for SSB_SPROM1_BINF_CCODE */ | 366 | /* Values for SSB_SPROM1_BINF_CCODE */ |
| 331 | enum { | 367 | enum { |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 2b409c44db83..c7d9bb1832ba 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
| @@ -237,6 +237,7 @@ extern int hibernate_nvs_alloc(void); | |||
| 237 | extern void hibernate_nvs_free(void); | 237 | extern void hibernate_nvs_free(void); |
| 238 | extern void hibernate_nvs_save(void); | 238 | extern void hibernate_nvs_save(void); |
| 239 | extern void hibernate_nvs_restore(void); | 239 | extern void hibernate_nvs_restore(void); |
| 240 | extern bool system_entering_hibernation(void); | ||
| 240 | #else /* CONFIG_HIBERNATION */ | 241 | #else /* CONFIG_HIBERNATION */ |
| 241 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } | 242 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } |
| 242 | static inline void swsusp_set_page_free(struct page *p) {} | 243 | static inline void swsusp_set_page_free(struct page *p) {} |
| @@ -252,6 +253,7 @@ static inline int hibernate_nvs_alloc(void) { return 0; } | |||
| 252 | static inline void hibernate_nvs_free(void) {} | 253 | static inline void hibernate_nvs_free(void) {} |
| 253 | static inline void hibernate_nvs_save(void) {} | 254 | static inline void hibernate_nvs_save(void) {} |
| 254 | static inline void hibernate_nvs_restore(void) {} | 255 | static inline void hibernate_nvs_restore(void) {} |
| 256 | static inline bool system_entering_hibernation(void) { return false; } | ||
| 255 | #endif /* CONFIG_HIBERNATION */ | 257 | #endif /* CONFIG_HIBERNATION */ |
| 256 | 258 | ||
| 257 | #ifdef CONFIG_PM_SLEEP | 259 | #ifdef CONFIG_PM_SLEEP |
diff --git a/include/linux/suspend_ioctls.h b/include/linux/suspend_ioctls.h index 2c6faec96bde..0b30382984fe 100644 --- a/include/linux/suspend_ioctls.h +++ b/include/linux/suspend_ioctls.h | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | #ifndef _LINUX_SUSPEND_IOCTLS_H | 1 | #ifndef _LINUX_SUSPEND_IOCTLS_H |
| 2 | #define _LINUX_SUSPEND_IOCTLS_H | 2 | #define _LINUX_SUSPEND_IOCTLS_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | /* | 5 | /* |
| 5 | * This structure is used to pass the values needed for the identification | 6 | * This structure is used to pass the values needed for the identification |
| 6 | * of the resume swap area from a user space to the kernel via the | 7 | * of the resume swap area from a user space to the kernel via the |
| 7 | * SNAPSHOT_SET_SWAP_AREA ioctl | 8 | * SNAPSHOT_SET_SWAP_AREA ioctl |
| 8 | */ | 9 | */ |
| 9 | struct resume_swap_area { | 10 | struct resume_swap_area { |
| 10 | loff_t offset; | 11 | __kernel_loff_t offset; |
| 11 | u_int32_t dev; | 12 | __u32 dev; |
| 12 | } __attribute__((packed)); | 13 | } __attribute__((packed)); |
| 13 | 14 | ||
| 14 | #define SNAPSHOT_IOC_MAGIC '3' | 15 | #define SNAPSHOT_IOC_MAGIC '3' |
| @@ -20,13 +21,13 @@ struct resume_swap_area { | |||
| 20 | #define SNAPSHOT_S2RAM _IO(SNAPSHOT_IOC_MAGIC, 11) | 21 | #define SNAPSHOT_S2RAM _IO(SNAPSHOT_IOC_MAGIC, 11) |
| 21 | #define SNAPSHOT_SET_SWAP_AREA _IOW(SNAPSHOT_IOC_MAGIC, 13, \ | 22 | #define SNAPSHOT_SET_SWAP_AREA _IOW(SNAPSHOT_IOC_MAGIC, 13, \ |
| 22 | struct resume_swap_area) | 23 | struct resume_swap_area) |
| 23 | #define SNAPSHOT_GET_IMAGE_SIZE _IOR(SNAPSHOT_IOC_MAGIC, 14, loff_t) | 24 | #define SNAPSHOT_GET_IMAGE_SIZE _IOR(SNAPSHOT_IOC_MAGIC, 14, __kernel_loff_t) |
| 24 | #define SNAPSHOT_PLATFORM_SUPPORT _IO(SNAPSHOT_IOC_MAGIC, 15) | 25 | #define SNAPSHOT_PLATFORM_SUPPORT _IO(SNAPSHOT_IOC_MAGIC, 15) |
| 25 | #define SNAPSHOT_POWER_OFF _IO(SNAPSHOT_IOC_MAGIC, 16) | 26 | #define SNAPSHOT_POWER_OFF _IO(SNAPSHOT_IOC_MAGIC, 16) |
| 26 | #define SNAPSHOT_CREATE_IMAGE _IOW(SNAPSHOT_IOC_MAGIC, 17, int) | 27 | #define SNAPSHOT_CREATE_IMAGE _IOW(SNAPSHOT_IOC_MAGIC, 17, int) |
| 27 | #define SNAPSHOT_PREF_IMAGE_SIZE _IO(SNAPSHOT_IOC_MAGIC, 18) | 28 | #define SNAPSHOT_PREF_IMAGE_SIZE _IO(SNAPSHOT_IOC_MAGIC, 18) |
| 28 | #define SNAPSHOT_AVAIL_SWAP_SIZE _IOR(SNAPSHOT_IOC_MAGIC, 19, loff_t) | 29 | #define SNAPSHOT_AVAIL_SWAP_SIZE _IOR(SNAPSHOT_IOC_MAGIC, 19, __kernel_loff_t) |
| 29 | #define SNAPSHOT_ALLOC_SWAP_PAGE _IOR(SNAPSHOT_IOC_MAGIC, 20, loff_t) | 30 | #define SNAPSHOT_ALLOC_SWAP_PAGE _IOR(SNAPSHOT_IOC_MAGIC, 20, __kernel_loff_t) |
| 30 | #define SNAPSHOT_IOC_MAXNR 20 | 31 | #define SNAPSHOT_IOC_MAXNR 20 |
| 31 | 32 | ||
| 32 | #endif /* _LINUX_SUSPEND_IOCTLS_H */ | 33 | #endif /* _LINUX_SUSPEND_IOCTLS_H */ |
diff --git a/include/linux/synclink.h b/include/linux/synclink.h index c844a229acc9..99b8bdb17b2b 100644 --- a/include/linux/synclink.h +++ b/include/linux/synclink.h | |||
| @@ -13,6 +13,8 @@ | |||
| 13 | #define _SYNCLINK_H_ | 13 | #define _SYNCLINK_H_ |
| 14 | #define SYNCLINK_H_VERSION 3.6 | 14 | #define SYNCLINK_H_VERSION 3.6 |
| 15 | 15 | ||
| 16 | #include <linux/types.h> | ||
| 17 | |||
| 16 | #define BIT0 0x0001 | 18 | #define BIT0 0x0001 |
| 17 | #define BIT1 0x0002 | 19 | #define BIT1 0x0002 |
| 18 | #define BIT2 0x0004 | 20 | #define BIT2 0x0004 |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 16875f89e6a7..f9f900cfd066 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -95,42 +95,47 @@ struct old_linux_dirent; | |||
| 95 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) | 95 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) |
| 96 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) | 96 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) |
| 97 | 97 | ||
| 98 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) | 98 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) |
| 99 | #define SYSCALL_DEFINE1(...) SYSCALL_DEFINEx(1, __VA_ARGS__) | 99 | #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) |
| 100 | #define SYSCALL_DEFINE2(...) SYSCALL_DEFINEx(2, __VA_ARGS__) | 100 | #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) |
| 101 | #define SYSCALL_DEFINE3(...) SYSCALL_DEFINEx(3, __VA_ARGS__) | 101 | #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) |
| 102 | #define SYSCALL_DEFINE4(...) SYSCALL_DEFINEx(4, __VA_ARGS__) | 102 | #define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__) |
| 103 | #define SYSCALL_DEFINE5(...) SYSCALL_DEFINEx(5, __VA_ARGS__) | 103 | #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) |
| 104 | #define SYSCALL_DEFINE6(...) SYSCALL_DEFINEx(6, __VA_ARGS__) | 104 | #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) |
| 105 | 105 | ||
| 106 | #ifdef CONFIG_PPC64 | 106 | #ifdef CONFIG_PPC64 |
| 107 | #define SYSCALL_ALIAS(alias, name) \ | 107 | #define SYSCALL_ALIAS(alias, name) \ |
| 108 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ | 108 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ |
| 109 | "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) | 109 | "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) |
| 110 | #else | 110 | #else |
| 111 | #ifdef CONFIG_ALPHA | ||
| 112 | #define SYSCALL_ALIAS(alias, name) \ | ||
| 113 | asm ( #alias " = " #name "\n\t.globl " #alias) | ||
| 114 | #else | ||
| 111 | #define SYSCALL_ALIAS(alias, name) \ | 115 | #define SYSCALL_ALIAS(alias, name) \ |
| 112 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name) | 116 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name) |
| 113 | #endif | 117 | #endif |
| 118 | #endif | ||
| 114 | 119 | ||
| 115 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | 120 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS |
| 116 | 121 | ||
| 117 | #define SYSCALL_DEFINE(name) static inline long SYSC_##name | 122 | #define SYSCALL_DEFINE(name) static inline long SYSC_##name |
| 118 | #define SYSCALL_DEFINEx(x, name, ...) \ | 123 | #define SYSCALL_DEFINEx(x, name, ...) \ |
| 119 | asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)); \ | 124 | asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)); \ |
| 120 | static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)); \ | 125 | static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__)); \ |
| 121 | asmlinkage long SyS_##name(__SC_LONG##x(__VA_ARGS__)) \ | 126 | asmlinkage long SyS##name(__SC_LONG##x(__VA_ARGS__)) \ |
| 122 | { \ | 127 | { \ |
| 123 | __SC_TEST##x(__VA_ARGS__); \ | 128 | __SC_TEST##x(__VA_ARGS__); \ |
| 124 | return (long) SYSC_##name(__SC_CAST##x(__VA_ARGS__)); \ | 129 | return (long) SYSC##name(__SC_CAST##x(__VA_ARGS__)); \ |
| 125 | } \ | 130 | } \ |
| 126 | SYSCALL_ALIAS(sys_##name, SyS_##name); \ | 131 | SYSCALL_ALIAS(sys##name, SyS##name); \ |
| 127 | static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)) | 132 | static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__)) |
| 128 | 133 | ||
| 129 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | 134 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ |
| 130 | 135 | ||
| 131 | #define SYSCALL_DEFINE(name) asmlinkage long sys_##name | 136 | #define SYSCALL_DEFINE(name) asmlinkage long sys_##name |
| 132 | #define SYSCALL_DEFINEx(x, name, ...) \ | 137 | #define SYSCALL_DEFINEx(x, name, ...) \ |
| 133 | asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)) | 138 | asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)) |
| 134 | 139 | ||
| 135 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | 140 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ |
| 136 | 141 | ||
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 39d471d1163b..e76d3b22a466 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
| @@ -490,6 +490,7 @@ enum | |||
| 490 | NET_IPV4_CONF_ARP_IGNORE=19, | 490 | NET_IPV4_CONF_ARP_IGNORE=19, |
| 491 | NET_IPV4_CONF_PROMOTE_SECONDARIES=20, | 491 | NET_IPV4_CONF_PROMOTE_SECONDARIES=20, |
| 492 | NET_IPV4_CONF_ARP_ACCEPT=21, | 492 | NET_IPV4_CONF_ARP_ACCEPT=21, |
| 493 | NET_IPV4_CONF_ARP_NOTIFY=22, | ||
| 493 | __NET_IPV4_CONF_MAX | 494 | __NET_IPV4_CONF_MAX |
| 494 | }; | 495 | }; |
| 495 | 496 | ||
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h index 18269e956a71..341dddb55090 100644 --- a/include/linux/taskstats.h +++ b/include/linux/taskstats.h | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | #ifndef _LINUX_TASKSTATS_H | 16 | #ifndef _LINUX_TASKSTATS_H |
| 17 | #define _LINUX_TASKSTATS_H | 17 | #define _LINUX_TASKSTATS_H |
| 18 | 18 | ||
| 19 | #include <linux/types.h> | ||
| 20 | |||
| 19 | /* Format for per-task data returned to userland when | 21 | /* Format for per-task data returned to userland when |
| 20 | * - a task exits | 22 | * - a task exits |
| 21 | * - listener requests stats for a task | 23 | * - listener requests stats for a task |
diff --git a/include/linux/tc_act/tc_gact.h b/include/linux/tc_act/tc_gact.h index 23a03eb630db..e895c0a39629 100644 --- a/include/linux/tc_act/tc_gact.h +++ b/include/linux/tc_act/tc_gact.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_TC_GACT_H | 1 | #ifndef __LINUX_TC_GACT_H |
| 2 | #define __LINUX_TC_GACT_H | 2 | #define __LINUX_TC_GACT_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
| 5 | 6 | ||
| 6 | #define TCA_ACT_GACT 5 | 7 | #define TCA_ACT_GACT 5 |
diff --git a/include/linux/tc_act/tc_mirred.h b/include/linux/tc_act/tc_mirred.h index 71d63409d568..0a99ab60d610 100644 --- a/include/linux/tc_act/tc_mirred.h +++ b/include/linux/tc_act/tc_mirred.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_TC_MIR_H | 1 | #ifndef __LINUX_TC_MIR_H |
| 2 | #define __LINUX_TC_MIR_H | 2 | #define __LINUX_TC_MIR_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
| 5 | 6 | ||
| 6 | #define TCA_ACT_MIRRED 8 | 7 | #define TCA_ACT_MIRRED 8 |
diff --git a/include/linux/tc_act/tc_pedit.h b/include/linux/tc_act/tc_pedit.h index 83e56e32e8e0..54ce9064115a 100644 --- a/include/linux/tc_act/tc_pedit.h +++ b/include/linux/tc_act/tc_pedit.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_TC_PED_H | 1 | #ifndef __LINUX_TC_PED_H |
| 2 | #define __LINUX_TC_PED_H | 2 | #define __LINUX_TC_PED_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
| 5 | 6 | ||
| 6 | #define TCA_ACT_PEDIT 7 | 7 | #define TCA_ACT_PEDIT 7 |
diff --git a/include/linux/tc_ematch/tc_em_cmp.h b/include/linux/tc_ematch/tc_em_cmp.h index c7f4d43618fd..38e7f7b25ec2 100644 --- a/include/linux/tc_ematch/tc_em_cmp.h +++ b/include/linux/tc_ematch/tc_em_cmp.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_TC_EM_CMP_H | 1 | #ifndef __LINUX_TC_EM_CMP_H |
| 2 | #define __LINUX_TC_EM_CMP_H | 2 | #define __LINUX_TC_EM_CMP_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
| 5 | 6 | ||
| 6 | struct tcf_em_cmp | 7 | struct tcf_em_cmp |
diff --git a/include/linux/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h index c50d2ba5caf0..dcfb733fa1f6 100644 --- a/include/linux/tc_ematch/tc_em_meta.h +++ b/include/linux/tc_ematch/tc_em_meta.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_TC_EM_META_H | 1 | #ifndef __LINUX_TC_EM_META_H |
| 2 | #define __LINUX_TC_EM_META_H | 2 | #define __LINUX_TC_EM_META_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
| 5 | 6 | ||
| 6 | enum | 7 | enum |
diff --git a/include/linux/tc_ematch/tc_em_nbyte.h b/include/linux/tc_ematch/tc_em_nbyte.h index f19d1f58ec9d..9ed8c2e58488 100644 --- a/include/linux/tc_ematch/tc_em_nbyte.h +++ b/include/linux/tc_ematch/tc_em_nbyte.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_TC_EM_NBYTE_H | 1 | #ifndef __LINUX_TC_EM_NBYTE_H |
| 2 | #define __LINUX_TC_EM_NBYTE_H | 2 | #define __LINUX_TC_EM_NBYTE_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
| 5 | 6 | ||
| 6 | struct tcf_em_nbyte | 7 | struct tcf_em_nbyte |
diff --git a/include/linux/tc_ematch/tc_em_text.h b/include/linux/tc_ematch/tc_em_text.h index 7cd43e99c7f5..d12a73a225fc 100644 --- a/include/linux/tc_ematch/tc_em_text.h +++ b/include/linux/tc_ematch/tc_em_text.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef __LINUX_TC_EM_TEXT_H | 1 | #ifndef __LINUX_TC_EM_TEXT_H |
| 2 | #define __LINUX_TC_EM_TEXT_H | 2 | #define __LINUX_TC_EM_TEXT_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
| 5 | 6 | ||
| 6 | #define TC_EM_TEXT_ALGOSIZ 16 | 7 | #define TC_EM_TEXT_ALGOSIZ 16 |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index fe77e1499ab7..9d5078bd23a3 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
| @@ -69,16 +69,16 @@ union tcp_word_hdr { | |||
| 69 | #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) | 69 | #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) |
| 70 | 70 | ||
| 71 | enum { | 71 | enum { |
| 72 | TCP_FLAG_CWR = __constant_htonl(0x00800000), | 72 | TCP_FLAG_CWR = __cpu_to_be32(0x00800000), |
| 73 | TCP_FLAG_ECE = __constant_htonl(0x00400000), | 73 | TCP_FLAG_ECE = __cpu_to_be32(0x00400000), |
| 74 | TCP_FLAG_URG = __constant_htonl(0x00200000), | 74 | TCP_FLAG_URG = __cpu_to_be32(0x00200000), |
| 75 | TCP_FLAG_ACK = __constant_htonl(0x00100000), | 75 | TCP_FLAG_ACK = __cpu_to_be32(0x00100000), |
| 76 | TCP_FLAG_PSH = __constant_htonl(0x00080000), | 76 | TCP_FLAG_PSH = __cpu_to_be32(0x00080000), |
| 77 | TCP_FLAG_RST = __constant_htonl(0x00040000), | 77 | TCP_FLAG_RST = __cpu_to_be32(0x00040000), |
| 78 | TCP_FLAG_SYN = __constant_htonl(0x00020000), | 78 | TCP_FLAG_SYN = __cpu_to_be32(0x00020000), |
| 79 | TCP_FLAG_FIN = __constant_htonl(0x00010000), | 79 | TCP_FLAG_FIN = __cpu_to_be32(0x00010000), |
| 80 | TCP_RESERVED_BITS = __constant_htonl(0x0F000000), | 80 | TCP_RESERVED_BITS = __cpu_to_be32(0x0F000000), |
| 81 | TCP_DATA_OFFSET = __constant_htonl(0xF0000000) | 81 | TCP_DATA_OFFSET = __cpu_to_be32(0xF0000000) |
| 82 | }; | 82 | }; |
| 83 | 83 | ||
| 84 | /* TCP socket options */ | 84 | /* TCP socket options */ |
| @@ -218,7 +218,6 @@ struct tcp_options_received { | |||
| 218 | snd_wscale : 4, /* Window scaling received from sender */ | 218 | snd_wscale : 4, /* Window scaling received from sender */ |
| 219 | rcv_wscale : 4; /* Window scaling to send to receiver */ | 219 | rcv_wscale : 4; /* Window scaling to send to receiver */ |
| 220 | /* SACKs data */ | 220 | /* SACKs data */ |
| 221 | u8 eff_sacks; /* Size of SACK array to send with next packet */ | ||
| 222 | u8 num_sacks; /* Number of SACK blocks */ | 221 | u8 num_sacks; /* Number of SACK blocks */ |
| 223 | u16 user_mss; /* mss requested by user in ioctl */ | 222 | u16 user_mss; /* mss requested by user in ioctl */ |
| 224 | u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ | 223 | u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ |
| @@ -249,7 +248,7 @@ struct tcp_sock { | |||
| 249 | /* inet_connection_sock has to be the first member of tcp_sock */ | 248 | /* inet_connection_sock has to be the first member of tcp_sock */ |
| 250 | struct inet_connection_sock inet_conn; | 249 | struct inet_connection_sock inet_conn; |
| 251 | u16 tcp_header_len; /* Bytes of tcp header to send */ | 250 | u16 tcp_header_len; /* Bytes of tcp header to send */ |
| 252 | u16 xmit_size_goal; /* Goal for segmenting output packets */ | 251 | u16 xmit_size_goal_segs; /* Goal for segmenting output packets */ |
| 253 | 252 | ||
| 254 | /* | 253 | /* |
| 255 | * Header prediction flags | 254 | * Header prediction flags |
diff --git a/include/linux/time.h b/include/linux/time.h index fbbd2a1c92ba..242f62499bb7 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
| @@ -12,14 +12,14 @@ | |||
| 12 | #ifndef _STRUCT_TIMESPEC | 12 | #ifndef _STRUCT_TIMESPEC |
| 13 | #define _STRUCT_TIMESPEC | 13 | #define _STRUCT_TIMESPEC |
| 14 | struct timespec { | 14 | struct timespec { |
| 15 | time_t tv_sec; /* seconds */ | 15 | __kernel_time_t tv_sec; /* seconds */ |
| 16 | long tv_nsec; /* nanoseconds */ | 16 | long tv_nsec; /* nanoseconds */ |
| 17 | }; | 17 | }; |
| 18 | #endif | 18 | #endif |
| 19 | 19 | ||
| 20 | struct timeval { | 20 | struct timeval { |
| 21 | time_t tv_sec; /* seconds */ | 21 | __kernel_time_t tv_sec; /* seconds */ |
| 22 | suseconds_t tv_usec; /* microseconds */ | 22 | __kernel_suseconds_t tv_usec; /* microseconds */ |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | struct timezone { | 25 | struct timezone { |
diff --git a/include/linux/timecompare.h b/include/linux/timecompare.h new file mode 100644 index 000000000000..546e2234e4b3 --- /dev/null +++ b/include/linux/timecompare.h | |||
| @@ -0,0 +1,125 @@ | |||
| 1 | /* | ||
| 2 | * Utility code which helps transforming between two different time | ||
| 3 | * bases, called "source" and "target" time in this code. | ||
| 4 | * | ||
| 5 | * Source time has to be provided via the timecounter API while target | ||
| 6 | * time is accessed via a function callback whose prototype | ||
| 7 | * intentionally matches ktime_get() and ktime_get_real(). These | ||
| 8 | * interfaces where chosen like this so that the code serves its | ||
| 9 | * initial purpose without additional glue code. | ||
| 10 | * | ||
| 11 | * This purpose is synchronizing a hardware clock in a NIC with system | ||
| 12 | * time, in order to implement the Precision Time Protocol (PTP, | ||
| 13 | * IEEE1588) with more accurate hardware assisted time stamping. In | ||
| 14 | * that context only synchronization against system time (= | ||
| 15 | * ktime_get_real()) is currently needed. But this utility code might | ||
| 16 | * become useful in other situations, which is why it was written as | ||
| 17 | * general purpose utility code. | ||
| 18 | * | ||
| 19 | * The source timecounter is assumed to return monotonically | ||
| 20 | * increasing time (but this code does its best to compensate if that | ||
| 21 | * is not the case) whereas target time may jump. | ||
| 22 | * | ||
| 23 | * The target time corresponding to a source time is determined by | ||
| 24 | * reading target time, reading source time, reading target time | ||
| 25 | * again, then assuming that average target time corresponds to source | ||
| 26 | * time. In other words, the assumption is that reading the source | ||
| 27 | * time is slow and involves equal time for sending the request and | ||
| 28 | * receiving the reply, whereas reading target time is assumed to be | ||
| 29 | * fast. | ||
| 30 | * | ||
| 31 | * Copyright (C) 2009 Intel Corporation. | ||
| 32 | * Author: Patrick Ohly <patrick.ohly@intel.com> | ||
| 33 | * | ||
| 34 | * This program is free software; you can redistribute it and/or modify it | ||
| 35 | * under the terms and conditions of the GNU General Public License, | ||
| 36 | * version 2, as published by the Free Software Foundation. | ||
| 37 | * | ||
| 38 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 39 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 40 | * FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for | ||
| 41 | * more details. | ||
| 42 | * | ||
| 43 | * You should have received a copy of the GNU General Public License along with | ||
| 44 | * this program; if not, write to the Free Software Foundation, Inc., | ||
| 45 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 46 | */ | ||
| 47 | #ifndef _LINUX_TIMECOMPARE_H | ||
| 48 | #define _LINUX_TIMECOMPARE_H | ||
| 49 | |||
| 50 | #include <linux/clocksource.h> | ||
| 51 | #include <linux/ktime.h> | ||
| 52 | |||
| 53 | /** | ||
| 54 | * struct timecompare - stores state and configuration for the two clocks | ||
| 55 | * | ||
| 56 | * Initialize to zero, then set source/target/num_samples. | ||
| 57 | * | ||
| 58 | * Transformation between source time and target time is done with: | ||
| 59 | * target_time = source_time + offset + | ||
| 60 | * (source_time - last_update) * skew / | ||
| 61 | * TIMECOMPARE_SKEW_RESOLUTION | ||
| 62 | * | ||
| 63 | * @source: used to get source time stamps via timecounter_read() | ||
| 64 | * @target: function returning target time (for example, ktime_get | ||
| 65 | * for monotonic time, or ktime_get_real for wall clock) | ||
| 66 | * @num_samples: number of times that source time and target time are to | ||
| 67 | * be compared when determining their offset | ||
| 68 | * @offset: (target time - source time) at the time of the last update | ||
| 69 | * @skew: average (target time - source time) / delta source time * | ||
| 70 | * TIMECOMPARE_SKEW_RESOLUTION | ||
| 71 | * @last_update: last source time stamp when time offset was measured | ||
| 72 | */ | ||
| 73 | struct timecompare { | ||
| 74 | struct timecounter *source; | ||
| 75 | ktime_t (*target)(void); | ||
| 76 | int num_samples; | ||
| 77 | |||
| 78 | s64 offset; | ||
| 79 | s64 skew; | ||
| 80 | u64 last_update; | ||
| 81 | }; | ||
| 82 | |||
| 83 | /** | ||
| 84 | * timecompare_transform - transform source time stamp into target time base | ||
| 85 | * @sync: context for time sync | ||
| 86 | * @source_tstamp: the result of timecounter_read() or | ||
| 87 | * timecounter_cyc2time() | ||
| 88 | */ | ||
| 89 | extern ktime_t timecompare_transform(struct timecompare *sync, | ||
| 90 | u64 source_tstamp); | ||
| 91 | |||
| 92 | /** | ||
| 93 | * timecompare_offset - measure current (target time - source time) offset | ||
| 94 | * @sync: context for time sync | ||
| 95 | * @offset: average offset during sample period returned here | ||
| 96 | * @source_tstamp: average source time during sample period returned here | ||
| 97 | * | ||
| 98 | * Returns number of samples used. Might be zero (= no result) in the | ||
| 99 | * unlikely case that target time was monotonically decreasing for all | ||
| 100 | * samples (= broken). | ||
| 101 | */ | ||
| 102 | extern int timecompare_offset(struct timecompare *sync, | ||
| 103 | s64 *offset, | ||
| 104 | u64 *source_tstamp); | ||
| 105 | |||
| 106 | extern void __timecompare_update(struct timecompare *sync, | ||
| 107 | u64 source_tstamp); | ||
| 108 | |||
| 109 | /** | ||
| 110 | * timecompare_update - update offset and skew by measuring current offset | ||
| 111 | * @sync: context for time sync | ||
| 112 | * @source_tstamp: the result of timecounter_read() or | ||
| 113 | * timecounter_cyc2time(), pass zero to force update | ||
| 114 | * | ||
| 115 | * Updates are only done at most once per second. | ||
| 116 | */ | ||
| 117 | static inline void timecompare_update(struct timecompare *sync, | ||
| 118 | u64 source_tstamp) | ||
| 119 | { | ||
| 120 | if (!source_tstamp || | ||
| 121 | (s64)(source_tstamp - sync->last_update) >= NSEC_PER_SEC) | ||
| 122 | __timecompare_update(sync, source_tstamp); | ||
| 123 | } | ||
| 124 | |||
| 125 | #endif /* _LINUX_TIMECOMPARE_H */ | ||
diff --git a/include/linux/timer.h b/include/linux/timer.h index daf9685b861c..e2d662e3416e 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
| @@ -86,8 +86,8 @@ static inline int timer_pending(const struct timer_list * timer) | |||
| 86 | 86 | ||
| 87 | extern void add_timer_on(struct timer_list *timer, int cpu); | 87 | extern void add_timer_on(struct timer_list *timer, int cpu); |
| 88 | extern int del_timer(struct timer_list * timer); | 88 | extern int del_timer(struct timer_list * timer); |
| 89 | extern int __mod_timer(struct timer_list *timer, unsigned long expires); | ||
| 90 | extern int mod_timer(struct timer_list *timer, unsigned long expires); | 89 | extern int mod_timer(struct timer_list *timer, unsigned long expires); |
| 90 | extern int mod_timer_pending(struct timer_list *timer, unsigned long expires); | ||
| 91 | 91 | ||
| 92 | /* | 92 | /* |
| 93 | * The jiffies value which is added to now, when there is no timer | 93 | * The jiffies value which is added to now, when there is no timer |
| @@ -146,25 +146,7 @@ static inline void timer_stats_timer_clear_start_info(struct timer_list *timer) | |||
| 146 | } | 146 | } |
| 147 | #endif | 147 | #endif |
| 148 | 148 | ||
| 149 | /** | 149 | extern void add_timer(struct timer_list *timer); |
| 150 | * add_timer - start a timer | ||
| 151 | * @timer: the timer to be added | ||
| 152 | * | ||
| 153 | * The kernel will do a ->function(->data) callback from the | ||
| 154 | * timer interrupt at the ->expires point in the future. The | ||
| 155 | * current time is 'jiffies'. | ||
| 156 | * | ||
| 157 | * The timer's ->expires, ->function (and if the handler uses it, ->data) | ||
| 158 | * fields must be set prior calling this function. | ||
| 159 | * | ||
| 160 | * Timers with an ->expires field in the past will be executed in the next | ||
| 161 | * timer tick. | ||
| 162 | */ | ||
| 163 | static inline void add_timer(struct timer_list *timer) | ||
| 164 | { | ||
| 165 | BUG_ON(timer_pending(timer)); | ||
| 166 | __mod_timer(timer, timer->expires); | ||
| 167 | } | ||
| 168 | 150 | ||
| 169 | #ifdef CONFIG_SMP | 151 | #ifdef CONFIG_SMP |
| 170 | extern int try_to_del_timer_sync(struct timer_list *timer); | 152 | extern int try_to_del_timer_sync(struct timer_list *timer); |
diff --git a/include/linux/timerfd.h b/include/linux/timerfd.h index 86cb0501d3e2..2d0792983f8c 100644 --- a/include/linux/timerfd.h +++ b/include/linux/timerfd.h | |||
| @@ -11,13 +11,21 @@ | |||
| 11 | /* For O_CLOEXEC and O_NONBLOCK */ | 11 | /* For O_CLOEXEC and O_NONBLOCK */ |
| 12 | #include <linux/fcntl.h> | 12 | #include <linux/fcntl.h> |
| 13 | 13 | ||
| 14 | /* Flags for timerfd_settime. */ | 14 | /* |
| 15 | * CAREFUL: Check include/asm-generic/fcntl.h when defining | ||
| 16 | * new flags, since they might collide with O_* ones. We want | ||
| 17 | * to re-use O_* flags that couldn't possibly have a meaning | ||
| 18 | * from eventfd, in order to leave a free define-space for | ||
| 19 | * shared O_* flags. | ||
| 20 | */ | ||
| 15 | #define TFD_TIMER_ABSTIME (1 << 0) | 21 | #define TFD_TIMER_ABSTIME (1 << 0) |
| 16 | |||
| 17 | /* Flags for timerfd_create. */ | ||
| 18 | #define TFD_CLOEXEC O_CLOEXEC | 22 | #define TFD_CLOEXEC O_CLOEXEC |
| 19 | #define TFD_NONBLOCK O_NONBLOCK | 23 | #define TFD_NONBLOCK O_NONBLOCK |
| 20 | 24 | ||
| 25 | #define TFD_SHARED_FCNTL_FLAGS (TFD_CLOEXEC | TFD_NONBLOCK) | ||
| 26 | /* Flags for timerfd_create. */ | ||
| 27 | #define TFD_CREATE_FLAGS TFD_SHARED_FCNTL_FLAGS | ||
| 28 | /* Flags for timerfd_settime. */ | ||
| 29 | #define TFD_SETTIME_FLAGS TFD_TIMER_ABSTIME | ||
| 21 | 30 | ||
| 22 | #endif /* _LINUX_TIMERFD_H */ | 31 | #endif /* _LINUX_TIMERFD_H */ |
| 23 | |||
diff --git a/include/linux/timeriomem-rng.h b/include/linux/timeriomem-rng.h new file mode 100644 index 000000000000..dd253177f65f --- /dev/null +++ b/include/linux/timeriomem-rng.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/linux/timeriomem-rng.h | ||
| 3 | * | ||
| 4 | * Copyright (c) 2009 Alexander Clouter <alex@digriz.org.uk> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #include <linux/completion.h> | ||
| 12 | |||
| 13 | struct timeriomem_rng_data { | ||
| 14 | struct completion completion; | ||
| 15 | unsigned int present:1; | ||
| 16 | |||
| 17 | u32 __iomem *address; | ||
| 18 | |||
| 19 | /* measures in usecs */ | ||
| 20 | unsigned int period; | ||
| 21 | }; | ||
diff --git a/include/linux/times.h b/include/linux/times.h index e2d3020742a6..87b62615cedd 100644 --- a/include/linux/times.h +++ b/include/linux/times.h | |||
| @@ -4,10 +4,10 @@ | |||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | 5 | ||
| 6 | struct tms { | 6 | struct tms { |
| 7 | clock_t tms_utime; | 7 | __kernel_clock_t tms_utime; |
| 8 | clock_t tms_stime; | 8 | __kernel_clock_t tms_stime; |
| 9 | clock_t tms_cutime; | 9 | __kernel_clock_t tms_cutime; |
| 10 | clock_t tms_cstime; | 10 | __kernel_clock_t tms_cstime; |
| 11 | }; | 11 | }; |
| 12 | 12 | ||
| 13 | #endif | 13 | #endif |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 998a55d80acf..aa3475fcff64 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
| @@ -190,7 +190,7 @@ struct timex { | |||
| 190 | * offset and maximum frequency tolerance. | 190 | * offset and maximum frequency tolerance. |
| 191 | */ | 191 | */ |
| 192 | #define SHIFT_USEC 16 /* frequency offset scale (shift) */ | 192 | #define SHIFT_USEC 16 /* frequency offset scale (shift) */ |
| 193 | #define PPM_SCALE (NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC)) | 193 | #define PPM_SCALE ((s64)NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC)) |
| 194 | #define PPM_SCALE_INV_SHIFT 19 | 194 | #define PPM_SCALE_INV_SHIFT 19 |
| 195 | #define PPM_SCALE_INV ((1ll << (PPM_SCALE_INV_SHIFT + NTP_SCALE_SHIFT)) / \ | 195 | #define PPM_SCALE_INV ((1ll << (PPM_SCALE_INV_SHIFT + NTP_SCALE_SHIFT)) / \ |
| 196 | PPM_SCALE + 1) | 196 | PPM_SCALE + 1) |
diff --git a/include/linux/tpm.h b/include/linux/tpm.h new file mode 100644 index 000000000000..3338b3f5c21a --- /dev/null +++ b/include/linux/tpm.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2004,2007,2008 IBM Corporation | ||
| 3 | * | ||
| 4 | * Authors: | ||
| 5 | * Leendert van Doorn <leendert@watson.ibm.com> | ||
| 6 | * Dave Safford <safford@watson.ibm.com> | ||
| 7 | * Reiner Sailer <sailer@watson.ibm.com> | ||
| 8 | * Kylene Hall <kjhall@us.ibm.com> | ||
| 9 | * Debora Velarde <dvelarde@us.ibm.com> | ||
| 10 | * | ||
| 11 | * Maintained by: <tpmdd_devel@lists.sourceforge.net> | ||
| 12 | * | ||
| 13 | * Device driver for TCG/TCPA TPM (trusted platform module). | ||
| 14 | * Specifications at www.trustedcomputinggroup.org | ||
| 15 | * | ||
| 16 | * This program is free software; you can redistribute it and/or | ||
| 17 | * modify it under the terms of the GNU General Public License as | ||
| 18 | * published by the Free Software Foundation, version 2 of the | ||
| 19 | * License. | ||
| 20 | * | ||
| 21 | */ | ||
| 22 | #ifndef __LINUX_TPM_H__ | ||
| 23 | #define __LINUX_TPM_H__ | ||
| 24 | |||
| 25 | /* | ||
| 26 | * Chip num is this value or a valid tpm idx | ||
| 27 | */ | ||
| 28 | #define TPM_ANY_NUM 0xFFFF | ||
| 29 | |||
| 30 | #if defined(CONFIG_TCG_TPM) | ||
| 31 | |||
| 32 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); | ||
| 33 | extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash); | ||
| 34 | #endif | ||
| 35 | #endif | ||
diff --git a/include/linux/types.h b/include/linux/types.h index 712ca53bc348..5abe354020f9 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | #ifndef _LINUX_TYPES_H | 1 | #ifndef _LINUX_TYPES_H |
| 2 | #define _LINUX_TYPES_H | 2 | #define _LINUX_TYPES_H |
| 3 | 3 | ||
| 4 | #include <asm/types.h> | ||
| 5 | |||
| 6 | #ifndef __ASSEMBLY__ | ||
| 4 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
| 5 | 8 | ||
| 6 | #define DECLARE_BITMAP(name,bits) \ | 9 | #define DECLARE_BITMAP(name,bits) \ |
| @@ -9,9 +12,8 @@ | |||
| 9 | #endif | 12 | #endif |
| 10 | 13 | ||
| 11 | #include <linux/posix_types.h> | 14 | #include <linux/posix_types.h> |
| 12 | #include <asm/types.h> | ||
| 13 | 15 | ||
| 14 | #ifndef __KERNEL_STRICT_NAMES | 16 | #ifdef __KERNEL__ |
| 15 | 17 | ||
| 16 | typedef __u32 __kernel_dev_t; | 18 | typedef __u32 __kernel_dev_t; |
| 17 | 19 | ||
| @@ -29,7 +31,6 @@ typedef __kernel_timer_t timer_t; | |||
| 29 | typedef __kernel_clockid_t clockid_t; | 31 | typedef __kernel_clockid_t clockid_t; |
| 30 | typedef __kernel_mqd_t mqd_t; | 32 | typedef __kernel_mqd_t mqd_t; |
| 31 | 33 | ||
| 32 | #ifdef __KERNEL__ | ||
| 33 | typedef _Bool bool; | 34 | typedef _Bool bool; |
| 34 | 35 | ||
| 35 | typedef __kernel_uid32_t uid_t; | 36 | typedef __kernel_uid32_t uid_t; |
| @@ -45,14 +46,6 @@ typedef __kernel_old_uid_t old_uid_t; | |||
| 45 | typedef __kernel_old_gid_t old_gid_t; | 46 | typedef __kernel_old_gid_t old_gid_t; |
| 46 | #endif /* CONFIG_UID16 */ | 47 | #endif /* CONFIG_UID16 */ |
| 47 | 48 | ||
| 48 | /* libc5 includes this file to define uid_t, thus uid_t can never change | ||
| 49 | * when it is included by non-kernel code | ||
| 50 | */ | ||
| 51 | #else | ||
| 52 | typedef __kernel_uid_t uid_t; | ||
| 53 | typedef __kernel_gid_t gid_t; | ||
| 54 | #endif /* __KERNEL__ */ | ||
| 55 | |||
| 56 | #if defined(__GNUC__) | 49 | #if defined(__GNUC__) |
| 57 | typedef __kernel_loff_t loff_t; | 50 | typedef __kernel_loff_t loff_t; |
| 58 | #endif | 51 | #endif |
| @@ -154,7 +147,7 @@ typedef unsigned long blkcnt_t; | |||
| 154 | #define pgoff_t unsigned long | 147 | #define pgoff_t unsigned long |
| 155 | #endif | 148 | #endif |
| 156 | 149 | ||
| 157 | #endif /* __KERNEL_STRICT_NAMES */ | 150 | #endif /* __KERNEL__ */ |
| 158 | 151 | ||
| 159 | /* | 152 | /* |
| 160 | * Below are truly Linux-specific types that should never collide with | 153 | * Below are truly Linux-specific types that should never collide with |
| @@ -212,5 +205,5 @@ struct ustat { | |||
| 212 | }; | 205 | }; |
| 213 | 206 | ||
| 214 | #endif /* __KERNEL__ */ | 207 | #endif /* __KERNEL__ */ |
| 215 | 208 | #endif /* __ASSEMBLY__ */ | |
| 216 | #endif /* _LINUX_TYPES_H */ | 209 | #endif /* _LINUX_TYPES_H */ |
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h index a0bb6bd2e5c1..5dcc9ff72f69 100644 --- a/include/linux/uio_driver.h +++ b/include/linux/uio_driver.h | |||
| @@ -22,6 +22,7 @@ struct uio_map; | |||
| 22 | 22 | ||
| 23 | /** | 23 | /** |
| 24 | * struct uio_mem - description of a UIO memory region | 24 | * struct uio_mem - description of a UIO memory region |
| 25 | * @name: name of the memory region for identification | ||
| 25 | * @addr: address of the device's memory | 26 | * @addr: address of the device's memory |
| 26 | * @size: size of IO | 27 | * @size: size of IO |
| 27 | * @memtype: type of memory addr points to | 28 | * @memtype: type of memory addr points to |
| @@ -29,6 +30,7 @@ struct uio_map; | |||
| 29 | * @map: for use by the UIO core only. | 30 | * @map: for use by the UIO core only. |
| 30 | */ | 31 | */ |
| 31 | struct uio_mem { | 32 | struct uio_mem { |
| 33 | const char *name; | ||
| 32 | unsigned long addr; | 34 | unsigned long addr; |
| 33 | unsigned long size; | 35 | unsigned long size; |
| 34 | int memtype; | 36 | int memtype; |
| @@ -42,12 +44,14 @@ struct uio_portio; | |||
| 42 | 44 | ||
| 43 | /** | 45 | /** |
| 44 | * struct uio_port - description of a UIO port region | 46 | * struct uio_port - description of a UIO port region |
| 47 | * @name: name of the port region for identification | ||
| 45 | * @start: start of port region | 48 | * @start: start of port region |
| 46 | * @size: size of port region | 49 | * @size: size of port region |
| 47 | * @porttype: type of port (see UIO_PORT_* below) | 50 | * @porttype: type of port (see UIO_PORT_* below) |
| 48 | * @portio: for use by the UIO core only. | 51 | * @portio: for use by the UIO core only. |
| 49 | */ | 52 | */ |
| 50 | struct uio_port { | 53 | struct uio_port { |
| 54 | const char *name; | ||
| 51 | unsigned long start; | 55 | unsigned long start; |
| 52 | unsigned long size; | 56 | unsigned long size; |
| 53 | int porttype; | 57 | int porttype; |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 85ee9be9361e..c6b2ab41b908 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -418,6 +418,8 @@ struct usb_tt; | |||
| 418 | * @autosuspend_disabled: autosuspend disabled by the user | 418 | * @autosuspend_disabled: autosuspend disabled by the user |
| 419 | * @autoresume_disabled: autoresume disabled by the user | 419 | * @autoresume_disabled: autoresume disabled by the user |
| 420 | * @skip_sys_resume: skip the next system resume | 420 | * @skip_sys_resume: skip the next system resume |
| 421 | * @wusb_dev: if this is a Wireless USB device, link to the WUSB | ||
| 422 | * specific data for the device. | ||
| 421 | * | 423 | * |
| 422 | * Notes: | 424 | * Notes: |
| 423 | * Usbcore drivers should not set usbdev->state directly. Instead use | 425 | * Usbcore drivers should not set usbdev->state directly. Instead use |
| @@ -641,186 +643,6 @@ static inline int usb_make_path(struct usb_device *dev, char *buf, size_t size) | |||
| 641 | 643 | ||
| 642 | /*-------------------------------------------------------------------------*/ | 644 | /*-------------------------------------------------------------------------*/ |
| 643 | 645 | ||
| 644 | /** | ||
| 645 | * usb_endpoint_num - get the endpoint's number | ||
| 646 | * @epd: endpoint to be checked | ||
| 647 | * | ||
| 648 | * Returns @epd's number: 0 to 15. | ||
| 649 | */ | ||
| 650 | static inline int usb_endpoint_num(const struct usb_endpoint_descriptor *epd) | ||
| 651 | { | ||
| 652 | return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; | ||
| 653 | } | ||
| 654 | |||
| 655 | /** | ||
| 656 | * usb_endpoint_type - get the endpoint's transfer type | ||
| 657 | * @epd: endpoint to be checked | ||
| 658 | * | ||
| 659 | * Returns one of USB_ENDPOINT_XFER_{CONTROL, ISOC, BULK, INT} according | ||
| 660 | * to @epd's transfer type. | ||
| 661 | */ | ||
| 662 | static inline int usb_endpoint_type(const struct usb_endpoint_descriptor *epd) | ||
| 663 | { | ||
| 664 | return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; | ||
| 665 | } | ||
| 666 | |||
| 667 | /** | ||
| 668 | * usb_endpoint_dir_in - check if the endpoint has IN direction | ||
| 669 | * @epd: endpoint to be checked | ||
| 670 | * | ||
| 671 | * Returns true if the endpoint is of type IN, otherwise it returns false. | ||
| 672 | */ | ||
| 673 | static inline int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) | ||
| 674 | { | ||
| 675 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN); | ||
| 676 | } | ||
| 677 | |||
| 678 | /** | ||
| 679 | * usb_endpoint_dir_out - check if the endpoint has OUT direction | ||
| 680 | * @epd: endpoint to be checked | ||
| 681 | * | ||
| 682 | * Returns true if the endpoint is of type OUT, otherwise it returns false. | ||
| 683 | */ | ||
| 684 | static inline int usb_endpoint_dir_out( | ||
| 685 | const struct usb_endpoint_descriptor *epd) | ||
| 686 | { | ||
| 687 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT); | ||
| 688 | } | ||
| 689 | |||
| 690 | /** | ||
| 691 | * usb_endpoint_xfer_bulk - check if the endpoint has bulk transfer type | ||
| 692 | * @epd: endpoint to be checked | ||
| 693 | * | ||
| 694 | * Returns true if the endpoint is of type bulk, otherwise it returns false. | ||
| 695 | */ | ||
| 696 | static inline int usb_endpoint_xfer_bulk( | ||
| 697 | const struct usb_endpoint_descriptor *epd) | ||
| 698 | { | ||
| 699 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
| 700 | USB_ENDPOINT_XFER_BULK); | ||
| 701 | } | ||
| 702 | |||
| 703 | /** | ||
| 704 | * usb_endpoint_xfer_control - check if the endpoint has control transfer type | ||
| 705 | * @epd: endpoint to be checked | ||
| 706 | * | ||
| 707 | * Returns true if the endpoint is of type control, otherwise it returns false. | ||
| 708 | */ | ||
| 709 | static inline int usb_endpoint_xfer_control( | ||
| 710 | const struct usb_endpoint_descriptor *epd) | ||
| 711 | { | ||
| 712 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
| 713 | USB_ENDPOINT_XFER_CONTROL); | ||
| 714 | } | ||
| 715 | |||
| 716 | /** | ||
| 717 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type | ||
| 718 | * @epd: endpoint to be checked | ||
| 719 | * | ||
| 720 | * Returns true if the endpoint is of type interrupt, otherwise it returns | ||
| 721 | * false. | ||
| 722 | */ | ||
| 723 | static inline int usb_endpoint_xfer_int( | ||
| 724 | const struct usb_endpoint_descriptor *epd) | ||
| 725 | { | ||
| 726 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
| 727 | USB_ENDPOINT_XFER_INT); | ||
| 728 | } | ||
| 729 | |||
| 730 | /** | ||
| 731 | * usb_endpoint_xfer_isoc - check if the endpoint has isochronous transfer type | ||
| 732 | * @epd: endpoint to be checked | ||
| 733 | * | ||
| 734 | * Returns true if the endpoint is of type isochronous, otherwise it returns | ||
| 735 | * false. | ||
| 736 | */ | ||
| 737 | static inline int usb_endpoint_xfer_isoc( | ||
| 738 | const struct usb_endpoint_descriptor *epd) | ||
| 739 | { | ||
| 740 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
| 741 | USB_ENDPOINT_XFER_ISOC); | ||
| 742 | } | ||
| 743 | |||
| 744 | /** | ||
| 745 | * usb_endpoint_is_bulk_in - check if the endpoint is bulk IN | ||
| 746 | * @epd: endpoint to be checked | ||
| 747 | * | ||
| 748 | * Returns true if the endpoint has bulk transfer type and IN direction, | ||
| 749 | * otherwise it returns false. | ||
| 750 | */ | ||
| 751 | static inline int usb_endpoint_is_bulk_in( | ||
| 752 | const struct usb_endpoint_descriptor *epd) | ||
| 753 | { | ||
| 754 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd)); | ||
| 755 | } | ||
| 756 | |||
| 757 | /** | ||
| 758 | * usb_endpoint_is_bulk_out - check if the endpoint is bulk OUT | ||
| 759 | * @epd: endpoint to be checked | ||
| 760 | * | ||
| 761 | * Returns true if the endpoint has bulk transfer type and OUT direction, | ||
| 762 | * otherwise it returns false. | ||
| 763 | */ | ||
| 764 | static inline int usb_endpoint_is_bulk_out( | ||
| 765 | const struct usb_endpoint_descriptor *epd) | ||
| 766 | { | ||
| 767 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd)); | ||
| 768 | } | ||
| 769 | |||
| 770 | /** | ||
| 771 | * usb_endpoint_is_int_in - check if the endpoint is interrupt IN | ||
| 772 | * @epd: endpoint to be checked | ||
| 773 | * | ||
| 774 | * Returns true if the endpoint has interrupt transfer type and IN direction, | ||
| 775 | * otherwise it returns false. | ||
| 776 | */ | ||
| 777 | static inline int usb_endpoint_is_int_in( | ||
| 778 | const struct usb_endpoint_descriptor *epd) | ||
| 779 | { | ||
| 780 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd)); | ||
| 781 | } | ||
| 782 | |||
| 783 | /** | ||
| 784 | * usb_endpoint_is_int_out - check if the endpoint is interrupt OUT | ||
| 785 | * @epd: endpoint to be checked | ||
| 786 | * | ||
| 787 | * Returns true if the endpoint has interrupt transfer type and OUT direction, | ||
| 788 | * otherwise it returns false. | ||
| 789 | */ | ||
| 790 | static inline int usb_endpoint_is_int_out( | ||
| 791 | const struct usb_endpoint_descriptor *epd) | ||
| 792 | { | ||
| 793 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd)); | ||
| 794 | } | ||
| 795 | |||
| 796 | /** | ||
| 797 | * usb_endpoint_is_isoc_in - check if the endpoint is isochronous IN | ||
| 798 | * @epd: endpoint to be checked | ||
| 799 | * | ||
| 800 | * Returns true if the endpoint has isochronous transfer type and IN direction, | ||
| 801 | * otherwise it returns false. | ||
| 802 | */ | ||
| 803 | static inline int usb_endpoint_is_isoc_in( | ||
| 804 | const struct usb_endpoint_descriptor *epd) | ||
| 805 | { | ||
| 806 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd)); | ||
| 807 | } | ||
| 808 | |||
| 809 | /** | ||
| 810 | * usb_endpoint_is_isoc_out - check if the endpoint is isochronous OUT | ||
| 811 | * @epd: endpoint to be checked | ||
| 812 | * | ||
| 813 | * Returns true if the endpoint has isochronous transfer type and OUT direction, | ||
| 814 | * otherwise it returns false. | ||
| 815 | */ | ||
| 816 | static inline int usb_endpoint_is_isoc_out( | ||
| 817 | const struct usb_endpoint_descriptor *epd) | ||
| 818 | { | ||
| 819 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd)); | ||
| 820 | } | ||
| 821 | |||
| 822 | /*-------------------------------------------------------------------------*/ | ||
| 823 | |||
| 824 | #define USB_DEVICE_ID_MATCH_DEVICE \ | 646 | #define USB_DEVICE_ID_MATCH_DEVICE \ |
| 825 | (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT) | 647 | (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT) |
| 826 | #define USB_DEVICE_ID_MATCH_DEV_RANGE \ | 648 | #define USB_DEVICE_ID_MATCH_DEV_RANGE \ |
| @@ -1355,8 +1177,8 @@ struct urb { | |||
| 1355 | unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/ | 1177 | unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/ |
| 1356 | void *transfer_buffer; /* (in) associated data buffer */ | 1178 | void *transfer_buffer; /* (in) associated data buffer */ |
| 1357 | dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */ | 1179 | dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */ |
| 1358 | int transfer_buffer_length; /* (in) data buffer length */ | 1180 | u32 transfer_buffer_length; /* (in) data buffer length */ |
| 1359 | int actual_length; /* (return) actual transfer length */ | 1181 | u32 actual_length; /* (return) actual transfer length */ |
| 1360 | unsigned char *setup_packet; /* (in) setup packet (control only) */ | 1182 | unsigned char *setup_packet; /* (in) setup packet (control only) */ |
| 1361 | dma_addr_t setup_dma; /* (in) dma addr for setup_packet */ | 1183 | dma_addr_t setup_dma; /* (in) dma addr for setup_packet */ |
| 1362 | int start_frame; /* (modify) start frame (ISO) */ | 1184 | int start_frame; /* (modify) start frame (ISO) */ |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 18a729343ffa..3c86ed25a04c 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
| @@ -9,6 +9,8 @@ | |||
| 9 | #ifndef __LINUX_USB_CDC_H | 9 | #ifndef __LINUX_USB_CDC_H |
| 10 | #define __LINUX_USB_CDC_H | 10 | #define __LINUX_USB_CDC_H |
| 11 | 11 | ||
| 12 | #include <linux/types.h> | ||
| 13 | |||
| 12 | #define USB_CDC_SUBCLASS_ACM 0x02 | 14 | #define USB_CDC_SUBCLASS_ACM 0x02 |
| 13 | #define USB_CDC_SUBCLASS_ETHERNET 0x06 | 15 | #define USB_CDC_SUBCLASS_ETHERNET 0x06 |
| 14 | #define USB_CDC_SUBCLASS_WHCM 0x08 | 16 | #define USB_CDC_SUBCLASS_WHCM 0x08 |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 9b42baed3900..b145119a90da 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
| @@ -102,7 +102,7 @@ | |||
| 102 | #define USB_REQ_LOOPBACK_DATA_READ 0x16 | 102 | #define USB_REQ_LOOPBACK_DATA_READ 0x16 |
| 103 | #define USB_REQ_SET_INTERFACE_DS 0x17 | 103 | #define USB_REQ_SET_INTERFACE_DS 0x17 |
| 104 | 104 | ||
| 105 | /* The Link Power Mangement (LPM) ECN defines USB_REQ_TEST_AND_SET command, | 105 | /* The Link Power Management (LPM) ECN defines USB_REQ_TEST_AND_SET command, |
| 106 | * used by hubs to put ports into a new L1 suspend state, except that it | 106 | * used by hubs to put ports into a new L1 suspend state, except that it |
| 107 | * forgot to define its number ... | 107 | * forgot to define its number ... |
| 108 | */ | 108 | */ |
| @@ -353,6 +353,185 @@ struct usb_endpoint_descriptor { | |||
| 353 | #define USB_ENDPOINT_XFER_INT 3 | 353 | #define USB_ENDPOINT_XFER_INT 3 |
| 354 | #define USB_ENDPOINT_MAX_ADJUSTABLE 0x80 | 354 | #define USB_ENDPOINT_MAX_ADJUSTABLE 0x80 |
| 355 | 355 | ||
| 356 | /*-------------------------------------------------------------------------*/ | ||
| 357 | |||
| 358 | /** | ||
| 359 | * usb_endpoint_num - get the endpoint's number | ||
| 360 | * @epd: endpoint to be checked | ||
| 361 | * | ||
| 362 | * Returns @epd's number: 0 to 15. | ||
| 363 | */ | ||
| 364 | static inline int usb_endpoint_num(const struct usb_endpoint_descriptor *epd) | ||
| 365 | { | ||
| 366 | return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; | ||
| 367 | } | ||
| 368 | |||
| 369 | /** | ||
| 370 | * usb_endpoint_type - get the endpoint's transfer type | ||
| 371 | * @epd: endpoint to be checked | ||
| 372 | * | ||
| 373 | * Returns one of USB_ENDPOINT_XFER_{CONTROL, ISOC, BULK, INT} according | ||
| 374 | * to @epd's transfer type. | ||
| 375 | */ | ||
| 376 | static inline int usb_endpoint_type(const struct usb_endpoint_descriptor *epd) | ||
| 377 | { | ||
| 378 | return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; | ||
| 379 | } | ||
| 380 | |||
| 381 | /** | ||
| 382 | * usb_endpoint_dir_in - check if the endpoint has IN direction | ||
| 383 | * @epd: endpoint to be checked | ||
| 384 | * | ||
| 385 | * Returns true if the endpoint is of type IN, otherwise it returns false. | ||
| 386 | */ | ||
| 387 | static inline int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) | ||
| 388 | { | ||
| 389 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN); | ||
| 390 | } | ||
| 391 | |||
| 392 | /** | ||
| 393 | * usb_endpoint_dir_out - check if the endpoint has OUT direction | ||
| 394 | * @epd: endpoint to be checked | ||
| 395 | * | ||
| 396 | * Returns true if the endpoint is of type OUT, otherwise it returns false. | ||
| 397 | */ | ||
| 398 | static inline int usb_endpoint_dir_out( | ||
| 399 | const struct usb_endpoint_descriptor *epd) | ||
| 400 | { | ||
| 401 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT); | ||
| 402 | } | ||
| 403 | |||
| 404 | /** | ||
| 405 | * usb_endpoint_xfer_bulk - check if the endpoint has bulk transfer type | ||
| 406 | * @epd: endpoint to be checked | ||
| 407 | * | ||
| 408 | * Returns true if the endpoint is of type bulk, otherwise it returns false. | ||
| 409 | */ | ||
| 410 | static inline int usb_endpoint_xfer_bulk( | ||
| 411 | const struct usb_endpoint_descriptor *epd) | ||
| 412 | { | ||
| 413 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
| 414 | USB_ENDPOINT_XFER_BULK); | ||
| 415 | } | ||
| 416 | |||
| 417 | /** | ||
| 418 | * usb_endpoint_xfer_control - check if the endpoint has control transfer type | ||
| 419 | * @epd: endpoint to be checked | ||
| 420 | * | ||
| 421 | * Returns true if the endpoint is of type control, otherwise it returns false. | ||
| 422 | */ | ||
| 423 | static inline int usb_endpoint_xfer_control( | ||
| 424 | const struct usb_endpoint_descriptor *epd) | ||
| 425 | { | ||
| 426 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
| 427 | USB_ENDPOINT_XFER_CONTROL); | ||
| 428 | } | ||
| 429 | |||
| 430 | /** | ||
| 431 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type | ||
| 432 | * @epd: endpoint to be checked | ||
| 433 | * | ||
| 434 | * Returns true if the endpoint is of type interrupt, otherwise it returns | ||
| 435 | * false. | ||
| 436 | */ | ||
| 437 | static inline int usb_endpoint_xfer_int( | ||
| 438 | const struct usb_endpoint_descriptor *epd) | ||
| 439 | { | ||
| 440 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
| 441 | USB_ENDPOINT_XFER_INT); | ||
| 442 | } | ||
| 443 | |||
| 444 | /** | ||
| 445 | * usb_endpoint_xfer_isoc - check if the endpoint has isochronous transfer type | ||
| 446 | * @epd: endpoint to be checked | ||
| 447 | * | ||
| 448 | * Returns true if the endpoint is of type isochronous, otherwise it returns | ||
| 449 | * false. | ||
| 450 | */ | ||
| 451 | static inline int usb_endpoint_xfer_isoc( | ||
| 452 | const struct usb_endpoint_descriptor *epd) | ||
| 453 | { | ||
| 454 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
| 455 | USB_ENDPOINT_XFER_ISOC); | ||
| 456 | } | ||
| 457 | |||
| 458 | /** | ||
| 459 | * usb_endpoint_is_bulk_in - check if the endpoint is bulk IN | ||
| 460 | * @epd: endpoint to be checked | ||
| 461 | * | ||
| 462 | * Returns true if the endpoint has bulk transfer type and IN direction, | ||
| 463 | * otherwise it returns false. | ||
| 464 | */ | ||
| 465 | static inline int usb_endpoint_is_bulk_in( | ||
| 466 | const struct usb_endpoint_descriptor *epd) | ||
| 467 | { | ||
| 468 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd)); | ||
| 469 | } | ||
| 470 | |||
| 471 | /** | ||
| 472 | * usb_endpoint_is_bulk_out - check if the endpoint is bulk OUT | ||
| 473 | * @epd: endpoint to be checked | ||
| 474 | * | ||
| 475 | * Returns true if the endpoint has bulk transfer type and OUT direction, | ||
| 476 | * otherwise it returns false. | ||
| 477 | */ | ||
| 478 | static inline int usb_endpoint_is_bulk_out( | ||
| 479 | const struct usb_endpoint_descriptor *epd) | ||
| 480 | { | ||
| 481 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd)); | ||
| 482 | } | ||
| 483 | |||
| 484 | /** | ||
| 485 | * usb_endpoint_is_int_in - check if the endpoint is interrupt IN | ||
| 486 | * @epd: endpoint to be checked | ||
| 487 | * | ||
| 488 | * Returns true if the endpoint has interrupt transfer type and IN direction, | ||
| 489 | * otherwise it returns false. | ||
| 490 | */ | ||
| 491 | static inline int usb_endpoint_is_int_in( | ||
| 492 | const struct usb_endpoint_descriptor *epd) | ||
| 493 | { | ||
| 494 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd)); | ||
| 495 | } | ||
| 496 | |||
| 497 | /** | ||
| 498 | * usb_endpoint_is_int_out - check if the endpoint is interrupt OUT | ||
| 499 | * @epd: endpoint to be checked | ||
| 500 | * | ||
| 501 | * Returns true if the endpoint has interrupt transfer type and OUT direction, | ||
| 502 | * otherwise it returns false. | ||
| 503 | */ | ||
| 504 | static inline int usb_endpoint_is_int_out( | ||
| 505 | const struct usb_endpoint_descriptor *epd) | ||
| 506 | { | ||
| 507 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd)); | ||
| 508 | } | ||
| 509 | |||
| 510 | /** | ||
| 511 | * usb_endpoint_is_isoc_in - check if the endpoint is isochronous IN | ||
| 512 | * @epd: endpoint to be checked | ||
| 513 | * | ||
| 514 | * Returns true if the endpoint has isochronous transfer type and IN direction, | ||
| 515 | * otherwise it returns false. | ||
| 516 | */ | ||
| 517 | static inline int usb_endpoint_is_isoc_in( | ||
| 518 | const struct usb_endpoint_descriptor *epd) | ||
| 519 | { | ||
| 520 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd)); | ||
| 521 | } | ||
| 522 | |||
| 523 | /** | ||
| 524 | * usb_endpoint_is_isoc_out - check if the endpoint is isochronous OUT | ||
| 525 | * @epd: endpoint to be checked | ||
| 526 | * | ||
| 527 | * Returns true if the endpoint has isochronous transfer type and OUT direction, | ||
| 528 | * otherwise it returns false. | ||
| 529 | */ | ||
| 530 | static inline int usb_endpoint_is_isoc_out( | ||
| 531 | const struct usb_endpoint_descriptor *epd) | ||
| 532 | { | ||
| 533 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd)); | ||
| 534 | } | ||
| 356 | 535 | ||
| 357 | /*-------------------------------------------------------------------------*/ | 536 | /*-------------------------------------------------------------------------*/ |
| 358 | 537 | ||
| @@ -584,8 +763,8 @@ enum usb_device_state { | |||
| 584 | /* chapter 9 and authentication (wireless) device states */ | 763 | /* chapter 9 and authentication (wireless) device states */ |
| 585 | USB_STATE_ATTACHED, | 764 | USB_STATE_ATTACHED, |
| 586 | USB_STATE_POWERED, /* wired */ | 765 | USB_STATE_POWERED, /* wired */ |
| 587 | USB_STATE_UNAUTHENTICATED, /* auth */ | ||
| 588 | USB_STATE_RECONNECTING, /* auth */ | 766 | USB_STATE_RECONNECTING, /* auth */ |
| 767 | USB_STATE_UNAUTHENTICATED, /* auth */ | ||
| 589 | USB_STATE_DEFAULT, /* limited function */ | 768 | USB_STATE_DEFAULT, /* limited function */ |
| 590 | USB_STATE_ADDRESS, | 769 | USB_STATE_ADDRESS, |
| 591 | USB_STATE_CONFIGURED, /* most functions */ | 770 | USB_STATE_CONFIGURED, /* most functions */ |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 935c380ffe47..acd7b0f06c8a 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
| @@ -244,6 +244,10 @@ int usb_add_config(struct usb_composite_dev *, | |||
| 244 | * value; it should return zero on successful initialization. | 244 | * value; it should return zero on successful initialization. |
| 245 | * @unbind: Reverses @bind(); called as a side effect of unregistering | 245 | * @unbind: Reverses @bind(); called as a side effect of unregistering |
| 246 | * this driver. | 246 | * this driver. |
| 247 | * @suspend: Notifies when the host stops sending USB traffic, | ||
| 248 | * after function notifications | ||
| 249 | * @resume: Notifies configuration when the host restarts USB traffic, | ||
| 250 | * before function notifications | ||
| 247 | * | 251 | * |
| 248 | * Devices default to reporting self powered operation. Devices which rely | 252 | * Devices default to reporting self powered operation. Devices which rely |
| 249 | * on bus powered operation should report this in their @bind() method. | 253 | * on bus powered operation should report this in their @bind() method. |
| @@ -268,6 +272,10 @@ struct usb_composite_driver { | |||
| 268 | 272 | ||
| 269 | int (*bind)(struct usb_composite_dev *); | 273 | int (*bind)(struct usb_composite_dev *); |
| 270 | int (*unbind)(struct usb_composite_dev *); | 274 | int (*unbind)(struct usb_composite_dev *); |
| 275 | |||
| 276 | /* global suspend hooks */ | ||
| 277 | void (*suspend)(struct usb_composite_dev *); | ||
| 278 | void (*resume)(struct usb_composite_dev *); | ||
| 271 | }; | 279 | }; |
| 272 | 280 | ||
| 273 | extern int usb_composite_register(struct usb_composite_driver *); | 281 | extern int usb_composite_register(struct usb_composite_driver *); |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 0460a746480c..bbf45d500b6d 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
| @@ -598,6 +598,7 @@ static inline int usb_gadget_clear_selfpowered(struct usb_gadget *gadget) | |||
| 598 | /** | 598 | /** |
| 599 | * usb_gadget_vbus_connect - Notify controller that VBUS is powered | 599 | * usb_gadget_vbus_connect - Notify controller that VBUS is powered |
| 600 | * @gadget:The device which now has VBUS power. | 600 | * @gadget:The device which now has VBUS power. |
| 601 | * Context: can sleep | ||
| 601 | * | 602 | * |
| 602 | * This call is used by a driver for an external transceiver (or GPIO) | 603 | * This call is used by a driver for an external transceiver (or GPIO) |
| 603 | * that detects a VBUS power session starting. Common responses include | 604 | * that detects a VBUS power session starting. Common responses include |
| @@ -636,6 +637,7 @@ static inline int usb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA) | |||
| 636 | /** | 637 | /** |
| 637 | * usb_gadget_vbus_disconnect - notify controller about VBUS session end | 638 | * usb_gadget_vbus_disconnect - notify controller about VBUS session end |
| 638 | * @gadget:the device whose VBUS supply is being described | 639 | * @gadget:the device whose VBUS supply is being described |
| 640 | * Context: can sleep | ||
| 639 | * | 641 | * |
| 640 | * This call is used by a driver for an external transceiver (or GPIO) | 642 | * This call is used by a driver for an external transceiver (or GPIO) |
| 641 | * that detects a VBUS power session ending. Common responses include | 643 | * that detects a VBUS power session ending. Common responses include |
| @@ -792,19 +794,20 @@ struct usb_gadget_driver { | |||
| 792 | /** | 794 | /** |
| 793 | * usb_gadget_register_driver - register a gadget driver | 795 | * usb_gadget_register_driver - register a gadget driver |
| 794 | * @driver:the driver being registered | 796 | * @driver:the driver being registered |
| 797 | * Context: can sleep | ||
| 795 | * | 798 | * |
| 796 | * Call this in your gadget driver's module initialization function, | 799 | * Call this in your gadget driver's module initialization function, |
| 797 | * to tell the underlying usb controller driver about your driver. | 800 | * to tell the underlying usb controller driver about your driver. |
| 798 | * The driver's bind() function will be called to bind it to a | 801 | * The driver's bind() function will be called to bind it to a |
| 799 | * gadget before this registration call returns. It's expected that | 802 | * gadget before this registration call returns. It's expected that |
| 800 | * the bind() functions will be in init sections. | 803 | * the bind() functions will be in init sections. |
| 801 | * This function must be called in a context that can sleep. | ||
| 802 | */ | 804 | */ |
| 803 | int usb_gadget_register_driver(struct usb_gadget_driver *driver); | 805 | int usb_gadget_register_driver(struct usb_gadget_driver *driver); |
| 804 | 806 | ||
| 805 | /** | 807 | /** |
| 806 | * usb_gadget_unregister_driver - unregister a gadget driver | 808 | * usb_gadget_unregister_driver - unregister a gadget driver |
| 807 | * @driver:the driver being unregistered | 809 | * @driver:the driver being unregistered |
| 810 | * Context: can sleep | ||
| 808 | * | 811 | * |
| 809 | * Call this in your gadget driver's module cleanup function, | 812 | * Call this in your gadget driver's module cleanup function, |
| 810 | * to tell the underlying usb controller that your driver is | 813 | * to tell the underlying usb controller that your driver is |
| @@ -813,7 +816,6 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver); | |||
| 813 | * to unbind() and clean up any device state, before this procedure | 816 | * to unbind() and clean up any device state, before this procedure |
| 814 | * finally returns. It's expected that the unbind() functions | 817 | * finally returns. It's expected that the unbind() functions |
| 815 | * will in in exit sections, so may not be linked in some kernels. | 818 | * will in in exit sections, so may not be linked in some kernels. |
| 816 | * This function must be called in a context that can sleep. | ||
| 817 | */ | 819 | */ |
| 818 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); | 820 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); |
| 819 | 821 | ||
diff --git a/include/linux/usb/gadgetfs.h b/include/linux/usb/gadgetfs.h index ea45f265ec05..612102e4d75e 100644 --- a/include/linux/usb/gadgetfs.h +++ b/include/linux/usb/gadgetfs.h | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #ifndef __LINUX_USB_GADGETFS_H | 18 | #ifndef __LINUX_USB_GADGETFS_H |
| 19 | #define __LINUX_USB_GADGETFS_H | 19 | #define __LINUX_USB_GADGETFS_H |
| 20 | 20 | ||
| 21 | #include <asm/types.h> | 21 | #include <linux/types.h> |
| 22 | #include <asm/ioctl.h> | 22 | #include <asm/ioctl.h> |
| 23 | 23 | ||
| 24 | #include <linux/usb/ch9.h> | 24 | #include <linux/usb/ch9.h> |
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 94df4fe6c6c0..1aaa826396a1 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
| @@ -80,12 +80,17 @@ struct otg_transceiver { | |||
| 80 | 80 | ||
| 81 | /* for board-specific init logic */ | 81 | /* for board-specific init logic */ |
| 82 | extern int otg_set_transceiver(struct otg_transceiver *); | 82 | extern int otg_set_transceiver(struct otg_transceiver *); |
| 83 | #ifdef CONFIG_NOP_USB_XCEIV | ||
| 84 | extern void usb_nop_xceiv_register(void); | ||
| 85 | extern void usb_nop_xceiv_unregister(void); | ||
| 86 | #endif | ||
| 83 | 87 | ||
| 84 | 88 | ||
| 85 | /* for usb host and peripheral controller drivers */ | 89 | /* for usb host and peripheral controller drivers */ |
| 86 | extern struct otg_transceiver *otg_get_transceiver(void); | 90 | extern struct otg_transceiver *otg_get_transceiver(void); |
| 87 | extern void otg_put_transceiver(struct otg_transceiver *); | 91 | extern void otg_put_transceiver(struct otg_transceiver *); |
| 88 | 92 | ||
| 93 | /* Context: can sleep */ | ||
| 89 | static inline int | 94 | static inline int |
| 90 | otg_start_hnp(struct otg_transceiver *otg) | 95 | otg_start_hnp(struct otg_transceiver *otg) |
| 91 | { | 96 | { |
| @@ -102,6 +107,8 @@ otg_set_host(struct otg_transceiver *otg, struct usb_bus *host) | |||
| 102 | 107 | ||
| 103 | 108 | ||
| 104 | /* for usb peripheral controller drivers */ | 109 | /* for usb peripheral controller drivers */ |
| 110 | |||
| 111 | /* Context: can sleep */ | ||
| 105 | static inline int | 112 | static inline int |
| 106 | otg_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *periph) | 113 | otg_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *periph) |
| 107 | { | 114 | { |
| @@ -114,6 +121,7 @@ otg_set_power(struct otg_transceiver *otg, unsigned mA) | |||
| 114 | return otg->set_power(otg, mA); | 121 | return otg->set_power(otg, mA); |
| 115 | } | 122 | } |
| 116 | 123 | ||
| 124 | /* Context: can sleep */ | ||
| 117 | static inline int | 125 | static inline int |
| 118 | otg_set_suspend(struct otg_transceiver *otg, int suspend) | 126 | otg_set_suspend(struct otg_transceiver *otg, int suspend) |
| 119 | { | 127 | { |
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index 7f6c603db654..2526f3bbd273 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h | |||
| @@ -16,4 +16,7 @@ | |||
| 16 | /* device can't handle Set-Interface requests */ | 16 | /* device can't handle Set-Interface requests */ |
| 17 | #define USB_QUIRK_NO_SET_INTF 0x00000004 | 17 | #define USB_QUIRK_NO_SET_INTF 0x00000004 |
| 18 | 18 | ||
| 19 | /* device can't handle its Configuration or Interface strings */ | ||
| 20 | #define USB_QUIRK_CONFIG_INTF_STRINGS 0x00000008 | ||
| 21 | |||
| 19 | #endif /* __LINUX_USB_QUIRKS_H */ | 22 | #endif /* __LINUX_USB_QUIRKS_H */ |
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h index 0a6e6d4b929a..37836b937d97 100644 --- a/include/linux/usb/rndis_host.h +++ b/include/linux/usb/rndis_host.h | |||
| @@ -49,48 +49,45 @@ struct rndis_msg_hdr { | |||
| 49 | */ | 49 | */ |
| 50 | #define RNDIS_CONTROL_TIMEOUT_MS (5 * 1000) | 50 | #define RNDIS_CONTROL_TIMEOUT_MS (5 * 1000) |
| 51 | 51 | ||
| 52 | 52 | #define RNDIS_MSG_COMPLETION cpu_to_le32(0x80000000) | |
| 53 | #define ccpu2 __constant_cpu_to_le32 | ||
| 54 | |||
| 55 | #define RNDIS_MSG_COMPLETION ccpu2(0x80000000) | ||
| 56 | 53 | ||
| 57 | /* codes for "msg_type" field of rndis messages; | 54 | /* codes for "msg_type" field of rndis messages; |
| 58 | * only the data channel uses packet messages (maybe batched); | 55 | * only the data channel uses packet messages (maybe batched); |
| 59 | * everything else goes on the control channel. | 56 | * everything else goes on the control channel. |
| 60 | */ | 57 | */ |
| 61 | #define RNDIS_MSG_PACKET ccpu2(0x00000001) /* 1-N packets */ | 58 | #define RNDIS_MSG_PACKET cpu_to_le32(0x00000001) /* 1-N packets */ |
| 62 | #define RNDIS_MSG_INIT ccpu2(0x00000002) | 59 | #define RNDIS_MSG_INIT cpu_to_le32(0x00000002) |
| 63 | #define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION) | 60 | #define RNDIS_MSG_INIT_C (RNDIS_MSG_INIT|RNDIS_MSG_COMPLETION) |
| 64 | #define RNDIS_MSG_HALT ccpu2(0x00000003) | 61 | #define RNDIS_MSG_HALT cpu_to_le32(0x00000003) |
| 65 | #define RNDIS_MSG_QUERY ccpu2(0x00000004) | 62 | #define RNDIS_MSG_QUERY cpu_to_le32(0x00000004) |
| 66 | #define RNDIS_MSG_QUERY_C (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION) | 63 | #define RNDIS_MSG_QUERY_C (RNDIS_MSG_QUERY|RNDIS_MSG_COMPLETION) |
| 67 | #define RNDIS_MSG_SET ccpu2(0x00000005) | 64 | #define RNDIS_MSG_SET cpu_to_le32(0x00000005) |
| 68 | #define RNDIS_MSG_SET_C (RNDIS_MSG_SET|RNDIS_MSG_COMPLETION) | 65 | #define RNDIS_MSG_SET_C (RNDIS_MSG_SET|RNDIS_MSG_COMPLETION) |
| 69 | #define RNDIS_MSG_RESET ccpu2(0x00000006) | 66 | #define RNDIS_MSG_RESET cpu_to_le32(0x00000006) |
| 70 | #define RNDIS_MSG_RESET_C (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION) | 67 | #define RNDIS_MSG_RESET_C (RNDIS_MSG_RESET|RNDIS_MSG_COMPLETION) |
| 71 | #define RNDIS_MSG_INDICATE ccpu2(0x00000007) | 68 | #define RNDIS_MSG_INDICATE cpu_to_le32(0x00000007) |
| 72 | #define RNDIS_MSG_KEEPALIVE ccpu2(0x00000008) | 69 | #define RNDIS_MSG_KEEPALIVE cpu_to_le32(0x00000008) |
| 73 | #define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) | 70 | #define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) |
| 74 | 71 | ||
| 75 | /* codes for "status" field of completion messages */ | 72 | /* codes for "status" field of completion messages */ |
| 76 | #define RNDIS_STATUS_SUCCESS ccpu2(0x00000000) | 73 | #define RNDIS_STATUS_SUCCESS cpu_to_le32(0x00000000) |
| 77 | #define RNDIS_STATUS_FAILURE ccpu2(0xc0000001) | 74 | #define RNDIS_STATUS_FAILURE cpu_to_le32(0xc0000001) |
| 78 | #define RNDIS_STATUS_INVALID_DATA ccpu2(0xc0010015) | 75 | #define RNDIS_STATUS_INVALID_DATA cpu_to_le32(0xc0010015) |
| 79 | #define RNDIS_STATUS_NOT_SUPPORTED ccpu2(0xc00000bb) | 76 | #define RNDIS_STATUS_NOT_SUPPORTED cpu_to_le32(0xc00000bb) |
| 80 | #define RNDIS_STATUS_MEDIA_CONNECT ccpu2(0x4001000b) | 77 | #define RNDIS_STATUS_MEDIA_CONNECT cpu_to_le32(0x4001000b) |
| 81 | #define RNDIS_STATUS_MEDIA_DISCONNECT ccpu2(0x4001000c) | 78 | #define RNDIS_STATUS_MEDIA_DISCONNECT cpu_to_le32(0x4001000c) |
| 82 | 79 | ||
| 83 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ | 80 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ |
| 84 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED ccpu2(0x00000000) | 81 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED cpu_to_le32(0x00000000) |
| 85 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN ccpu2(0x00000001) | 82 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN cpu_to_le32(0x00000001) |
| 86 | #define RNDIS_PHYSICAL_MEDIUM_CABLE_MODEM ccpu2(0x00000002) | 83 | #define RNDIS_PHYSICAL_MEDIUM_CABLE_MODEM cpu_to_le32(0x00000002) |
| 87 | #define RNDIS_PHYSICAL_MEDIUM_PHONE_LINE ccpu2(0x00000003) | 84 | #define RNDIS_PHYSICAL_MEDIUM_PHONE_LINE cpu_to_le32(0x00000003) |
| 88 | #define RNDIS_PHYSICAL_MEDIUM_POWER_LINE ccpu2(0x00000004) | 85 | #define RNDIS_PHYSICAL_MEDIUM_POWER_LINE cpu_to_le32(0x00000004) |
| 89 | #define RNDIS_PHYSICAL_MEDIUM_DSL ccpu2(0x00000005) | 86 | #define RNDIS_PHYSICAL_MEDIUM_DSL cpu_to_le32(0x00000005) |
| 90 | #define RNDIS_PHYSICAL_MEDIUM_FIBRE_CHANNEL ccpu2(0x00000006) | 87 | #define RNDIS_PHYSICAL_MEDIUM_FIBRE_CHANNEL cpu_to_le32(0x00000006) |
| 91 | #define RNDIS_PHYSICAL_MEDIUM_1394 ccpu2(0x00000007) | 88 | #define RNDIS_PHYSICAL_MEDIUM_1394 cpu_to_le32(0x00000007) |
| 92 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN ccpu2(0x00000008) | 89 | #define RNDIS_PHYSICAL_MEDIUM_WIRELESS_WAN cpu_to_le32(0x00000008) |
| 93 | #define RNDIS_PHYSICAL_MEDIUM_MAX ccpu2(0x00000009) | 90 | #define RNDIS_PHYSICAL_MEDIUM_MAX cpu_to_le32(0x00000009) |
| 94 | 91 | ||
| 95 | struct rndis_data_hdr { | 92 | struct rndis_data_hdr { |
| 96 | __le32 msg_type; /* RNDIS_MSG_PACKET */ | 93 | __le32 msg_type; /* RNDIS_MSG_PACKET */ |
| @@ -228,24 +225,24 @@ struct rndis_keepalive_c { /* IN (optionally OUT) */ | |||
| 228 | * there are gobs more that may optionally be supported. We'll avoid as much | 225 | * there are gobs more that may optionally be supported. We'll avoid as much |
| 229 | * of that mess as possible. | 226 | * of that mess as possible. |
| 230 | */ | 227 | */ |
| 231 | #define OID_802_3_PERMANENT_ADDRESS ccpu2(0x01010101) | 228 | #define OID_802_3_PERMANENT_ADDRESS cpu_to_le32(0x01010101) |
| 232 | #define OID_GEN_MAXIMUM_FRAME_SIZE ccpu2(0x00010106) | 229 | #define OID_GEN_MAXIMUM_FRAME_SIZE cpu_to_le32(0x00010106) |
| 233 | #define OID_GEN_CURRENT_PACKET_FILTER ccpu2(0x0001010e) | 230 | #define OID_GEN_CURRENT_PACKET_FILTER cpu_to_le32(0x0001010e) |
| 234 | #define OID_GEN_PHYSICAL_MEDIUM ccpu2(0x00010202) | 231 | #define OID_GEN_PHYSICAL_MEDIUM cpu_to_le32(0x00010202) |
| 235 | 232 | ||
| 236 | /* packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */ | 233 | /* packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */ |
| 237 | #define RNDIS_PACKET_TYPE_DIRECTED ccpu2(0x00000001) | 234 | #define RNDIS_PACKET_TYPE_DIRECTED cpu_to_le32(0x00000001) |
| 238 | #define RNDIS_PACKET_TYPE_MULTICAST ccpu2(0x00000002) | 235 | #define RNDIS_PACKET_TYPE_MULTICAST cpu_to_le32(0x00000002) |
| 239 | #define RNDIS_PACKET_TYPE_ALL_MULTICAST ccpu2(0x00000004) | 236 | #define RNDIS_PACKET_TYPE_ALL_MULTICAST cpu_to_le32(0x00000004) |
| 240 | #define RNDIS_PACKET_TYPE_BROADCAST ccpu2(0x00000008) | 237 | #define RNDIS_PACKET_TYPE_BROADCAST cpu_to_le32(0x00000008) |
| 241 | #define RNDIS_PACKET_TYPE_SOURCE_ROUTING ccpu2(0x00000010) | 238 | #define RNDIS_PACKET_TYPE_SOURCE_ROUTING cpu_to_le32(0x00000010) |
| 242 | #define RNDIS_PACKET_TYPE_PROMISCUOUS ccpu2(0x00000020) | 239 | #define RNDIS_PACKET_TYPE_PROMISCUOUS cpu_to_le32(0x00000020) |
| 243 | #define RNDIS_PACKET_TYPE_SMT ccpu2(0x00000040) | 240 | #define RNDIS_PACKET_TYPE_SMT cpu_to_le32(0x00000040) |
| 244 | #define RNDIS_PACKET_TYPE_ALL_LOCAL ccpu2(0x00000080) | 241 | #define RNDIS_PACKET_TYPE_ALL_LOCAL cpu_to_le32(0x00000080) |
| 245 | #define RNDIS_PACKET_TYPE_GROUP ccpu2(0x00001000) | 242 | #define RNDIS_PACKET_TYPE_GROUP cpu_to_le32(0x00001000) |
| 246 | #define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL ccpu2(0x00002000) | 243 | #define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL cpu_to_le32(0x00002000) |
| 247 | #define RNDIS_PACKET_TYPE_FUNCTIONAL ccpu2(0x00004000) | 244 | #define RNDIS_PACKET_TYPE_FUNCTIONAL cpu_to_le32(0x00004000) |
| 248 | #define RNDIS_PACKET_TYPE_MAC_FRAME ccpu2(0x00008000) | 245 | #define RNDIS_PACKET_TYPE_MAC_FRAME cpu_to_le32(0x00008000) |
| 249 | 246 | ||
| 250 | /* default filter used with RNDIS devices */ | 247 | /* default filter used with RNDIS devices */ |
| 251 | #define RNDIS_DEFAULT_FILTER ( \ | 248 | #define RNDIS_DEFAULT_FILTER ( \ |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 0b8617a9176d..b95842542590 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
| @@ -130,7 +130,8 @@ struct usb_serial { | |||
| 130 | struct usb_device *dev; | 130 | struct usb_device *dev; |
| 131 | struct usb_serial_driver *type; | 131 | struct usb_serial_driver *type; |
| 132 | struct usb_interface *interface; | 132 | struct usb_interface *interface; |
| 133 | unsigned char disconnected; | 133 | unsigned char disconnected:1; |
| 134 | unsigned char suspending:1; | ||
| 134 | unsigned char minor; | 135 | unsigned char minor; |
| 135 | unsigned char num_ports; | 136 | unsigned char num_ports; |
| 136 | unsigned char num_port_pointers; | 137 | unsigned char num_port_pointers; |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index ba09fe88adda..36fabb95c7d3 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
| @@ -176,6 +176,11 @@ struct skb_data { /* skb->cb is one of these */ | |||
| 176 | size_t length; | 176 | size_t length; |
| 177 | }; | 177 | }; |
| 178 | 178 | ||
| 179 | extern int usbnet_open (struct net_device *net); | ||
| 180 | extern int usbnet_stop (struct net_device *net); | ||
| 181 | extern int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net); | ||
| 182 | extern void usbnet_tx_timeout (struct net_device *net); | ||
| 183 | extern int usbnet_change_mtu (struct net_device *net, int new_mtu); | ||
| 179 | 184 | ||
| 180 | extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *); | 185 | extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *); |
| 181 | extern void usbnet_defer_kevent (struct usbnet *, int); | 186 | extern void usbnet_defer_kevent (struct usbnet *, int); |
| @@ -197,7 +202,9 @@ extern int usbnet_nway_reset(struct net_device *net); | |||
| 197 | #define devdbg(usbnet, fmt, arg...) \ | 202 | #define devdbg(usbnet, fmt, arg...) \ |
| 198 | printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg) | 203 | printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg) |
| 199 | #else | 204 | #else |
| 200 | #define devdbg(usbnet, fmt, arg...) do {} while(0) | 205 | #define devdbg(usbnet, fmt, arg...) \ |
| 206 | ({ if (0) printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , \ | ||
| 207 | ## arg); 0; }) | ||
| 201 | #endif | 208 | #endif |
| 202 | 209 | ||
| 203 | #define deverr(usbnet, fmt, arg...) \ | 210 | #define deverr(usbnet, fmt, arg...) \ |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 1eea1ab68dc4..3d15fb9bc116 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
| @@ -96,39 +96,26 @@ enum { US_DO_ALL_FLAGS }; | |||
| 96 | #define US_PR_CBI 0x00 /* Control/Bulk/Interrupt */ | 96 | #define US_PR_CBI 0x00 /* Control/Bulk/Interrupt */ |
| 97 | #define US_PR_CB 0x01 /* Control/Bulk w/o interrupt */ | 97 | #define US_PR_CB 0x01 /* Control/Bulk w/o interrupt */ |
| 98 | #define US_PR_BULK 0x50 /* bulk only */ | 98 | #define US_PR_BULK 0x50 /* bulk only */ |
| 99 | #ifdef CONFIG_USB_STORAGE_USBAT | 99 | |
| 100 | #define US_PR_USBAT 0x80 /* SCM-ATAPI bridge */ | 100 | #define US_PR_USBAT 0x80 /* SCM-ATAPI bridge */ |
| 101 | #endif | ||
| 102 | #ifdef CONFIG_USB_STORAGE_SDDR09 | ||
| 103 | #define US_PR_EUSB_SDDR09 0x81 /* SCM-SCSI bridge for SDDR-09 */ | 101 | #define US_PR_EUSB_SDDR09 0x81 /* SCM-SCSI bridge for SDDR-09 */ |
| 104 | #endif | ||
| 105 | #ifdef CONFIG_USB_STORAGE_SDDR55 | ||
| 106 | #define US_PR_SDDR55 0x82 /* SDDR-55 (made up) */ | 102 | #define US_PR_SDDR55 0x82 /* SDDR-55 (made up) */ |
| 107 | #endif | ||
| 108 | #define US_PR_DPCM_USB 0xf0 /* Combination CB/SDDR09 */ | 103 | #define US_PR_DPCM_USB 0xf0 /* Combination CB/SDDR09 */ |
| 109 | #ifdef CONFIG_USB_STORAGE_FREECOM | ||
| 110 | #define US_PR_FREECOM 0xf1 /* Freecom */ | 104 | #define US_PR_FREECOM 0xf1 /* Freecom */ |
| 111 | #endif | ||
| 112 | #ifdef CONFIG_USB_STORAGE_DATAFAB | ||
| 113 | #define US_PR_DATAFAB 0xf2 /* Datafab chipsets */ | 105 | #define US_PR_DATAFAB 0xf2 /* Datafab chipsets */ |
| 114 | #endif | ||
| 115 | #ifdef CONFIG_USB_STORAGE_JUMPSHOT | ||
| 116 | #define US_PR_JUMPSHOT 0xf3 /* Lexar Jumpshot */ | 106 | #define US_PR_JUMPSHOT 0xf3 /* Lexar Jumpshot */ |
| 117 | #endif | ||
| 118 | #ifdef CONFIG_USB_STORAGE_ALAUDA | ||
| 119 | #define US_PR_ALAUDA 0xf4 /* Alauda chipsets */ | 107 | #define US_PR_ALAUDA 0xf4 /* Alauda chipsets */ |
| 120 | #endif | ||
| 121 | #ifdef CONFIG_USB_STORAGE_KARMA | ||
| 122 | #define US_PR_KARMA 0xf5 /* Rio Karma */ | 108 | #define US_PR_KARMA 0xf5 /* Rio Karma */ |
| 123 | #endif | ||
| 124 | 109 | ||
| 125 | #define US_PR_DEVICE 0xff /* Use device's value */ | 110 | #define US_PR_DEVICE 0xff /* Use device's value */ |
| 126 | 111 | ||
| 127 | /* | 112 | /* |
| 128 | */ | 113 | */ |
| 114 | extern int usb_usual_ignore_device(struct usb_interface *intf); | ||
| 115 | extern struct usb_device_id usb_storage_usb_ids[]; | ||
| 116 | |||
| 129 | #ifdef CONFIG_USB_LIBUSUAL | 117 | #ifdef CONFIG_USB_LIBUSUAL |
| 130 | 118 | ||
| 131 | extern struct usb_device_id storage_usb_ids[]; | ||
| 132 | extern void usb_usual_set_present(int type); | 119 | extern void usb_usual_set_present(int type); |
| 133 | extern void usb_usual_clear_present(int type); | 120 | extern void usb_usual_clear_present(int type); |
| 134 | extern int usb_usual_check_type(const struct usb_device_id *, int type); | 121 | extern int usb_usual_check_type(const struct usb_device_id *, int type); |
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 315bcd375224..cc4f45361dbb 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h | |||
| @@ -13,6 +13,7 @@ struct user_namespace { | |||
| 13 | struct kref kref; | 13 | struct kref kref; |
| 14 | struct hlist_head uidhash_table[UIDHASH_SZ]; | 14 | struct hlist_head uidhash_table[UIDHASH_SZ]; |
| 15 | struct user_struct *creator; | 15 | struct user_struct *creator; |
| 16 | struct work_struct destroyer; | ||
| 16 | }; | 17 | }; |
| 17 | 18 | ||
| 18 | extern struct user_namespace init_user_ns; | 19 | extern struct user_namespace init_user_ns; |
diff --git a/include/linux/utime.h b/include/linux/utime.h index 640be6a1959e..5cdf673afbdb 100644 --- a/include/linux/utime.h +++ b/include/linux/utime.h | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | 5 | ||
| 6 | struct utimbuf { | 6 | struct utimbuf { |
| 7 | time_t actime; | 7 | __kernel_time_t actime; |
| 8 | time_t modtime; | 8 | __kernel_time_t modtime; |
| 9 | }; | 9 | }; |
| 10 | 10 | ||
| 11 | #endif | 11 | #endif |
diff --git a/include/linux/video_decoder.h b/include/linux/video_decoder.h index 121e26da2c18..e26c0c86a6ea 100644 --- a/include/linux/video_decoder.h +++ b/include/linux/video_decoder.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _LINUX_VIDEO_DECODER_H | 1 | #ifndef _LINUX_VIDEO_DECODER_H |
| 2 | #define _LINUX_VIDEO_DECODER_H | 2 | #define _LINUX_VIDEO_DECODER_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | #define HAVE_VIDEO_DECODER 1 | 6 | #define HAVE_VIDEO_DECODER 1 |
| 5 | 7 | ||
| 6 | struct video_decoder_capability { /* this name is too long */ | 8 | struct video_decoder_capability { /* this name is too long */ |
diff --git a/include/linux/video_encoder.h b/include/linux/video_encoder.h index 4b0e6907a7b4..b7b6423bbb8a 100644 --- a/include/linux/video_encoder.h +++ b/include/linux/video_encoder.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _LINUX_VIDEO_ENCODER_H | 1 | #ifndef _LINUX_VIDEO_ENCODER_H |
| 2 | #define _LINUX_VIDEO_ENCODER_H | 2 | #define _LINUX_VIDEO_ENCODER_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | struct video_encoder_capability { /* this name is too long */ | 6 | struct video_encoder_capability { /* this name is too long */ |
| 5 | __u32 flags; | 7 | __u32 flags; |
| 6 | #define VIDEO_ENCODER_PAL 1 /* can encode PAL signal */ | 8 | #define VIDEO_ENCODER_PAL 1 /* can encode PAL signal */ |
diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 15a653d41132..837f392fbe97 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #ifndef __LINUX_VIDEODEV_H | 12 | #ifndef __LINUX_VIDEODEV_H |
| 13 | #define __LINUX_VIDEODEV_H | 13 | #define __LINUX_VIDEODEV_H |
| 14 | 14 | ||
| 15 | #include <linux/types.h> | ||
| 15 | #include <linux/ioctl.h> | 16 | #include <linux/ioctl.h> |
| 16 | #include <linux/videodev2.h> | 17 | #include <linux/videodev2.h> |
| 17 | 18 | ||
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index c1aef85243bf..94c56d29869d 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _LINUX_VIRTIO_BLK_H | 2 | #define _LINUX_VIRTIO_BLK_H |
| 3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
| 4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
| 5 | #include <linux/types.h> | ||
| 5 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
| 6 | 7 | ||
| 7 | /* The ID for virtio_block */ | 8 | /* The ID for virtio_block */ |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index 7615ffcdd555..dc161115ae35 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | #ifndef _LINUX_VIRTIO_CONSOLE_H | 1 | #ifndef _LINUX_VIRTIO_CONSOLE_H |
| 2 | #define _LINUX_VIRTIO_CONSOLE_H | 2 | #define _LINUX_VIRTIO_CONSOLE_H |
| 3 | #include <linux/types.h> | ||
| 3 | #include <linux/virtio_config.h> | 4 | #include <linux/virtio_config.h> |
| 4 | /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so | 5 | /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so |
| 5 | * anyone can use the definitions to implement compatible drivers/servers. */ | 6 | * anyone can use the definitions to implement compatible drivers/servers. */ |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 5cdd0aa8bde9..242348bb3766 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _LINUX_VIRTIO_NET_H | 2 | #define _LINUX_VIRTIO_NET_H |
| 3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
| 4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
| 5 | #include <linux/types.h> | ||
| 5 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
| 6 | 7 | ||
| 7 | /* The ID for virtio_net */ | 8 | /* The ID for virtio_net */ |
| @@ -21,11 +22,19 @@ | |||
| 21 | #define VIRTIO_NET_F_HOST_ECN 13 /* Host can handle TSO[6] w/ ECN in. */ | 22 | #define VIRTIO_NET_F_HOST_ECN 13 /* Host can handle TSO[6] w/ ECN in. */ |
| 22 | #define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */ | 23 | #define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */ |
| 23 | #define VIRTIO_NET_F_MRG_RXBUF 15 /* Host can merge receive buffers. */ | 24 | #define VIRTIO_NET_F_MRG_RXBUF 15 /* Host can merge receive buffers. */ |
| 25 | #define VIRTIO_NET_F_STATUS 16 /* virtio_net_config.status available */ | ||
| 26 | #define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */ | ||
| 27 | #define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */ | ||
| 28 | #define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering */ | ||
| 29 | |||
| 30 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ | ||
| 24 | 31 | ||
| 25 | struct virtio_net_config | 32 | struct virtio_net_config |
| 26 | { | 33 | { |
| 27 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ | 34 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ |
| 28 | __u8 mac[6]; | 35 | __u8 mac[6]; |
| 36 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ | ||
| 37 | __u16 status; | ||
| 29 | } __attribute__((packed)); | 38 | } __attribute__((packed)); |
| 30 | 39 | ||
| 31 | /* This is the first element of the scatter-gather list. If you don't | 40 | /* This is the first element of the scatter-gather list. If you don't |
| @@ -53,4 +62,67 @@ struct virtio_net_hdr_mrg_rxbuf { | |||
| 53 | __u16 num_buffers; /* Number of merged rx buffers */ | 62 | __u16 num_buffers; /* Number of merged rx buffers */ |
| 54 | }; | 63 | }; |
| 55 | 64 | ||
| 65 | /* | ||
| 66 | * Control virtqueue data structures | ||
| 67 | * | ||
| 68 | * The control virtqueue expects a header in the first sg entry | ||
| 69 | * and an ack/status response in the last entry. Data for the | ||
| 70 | * command goes in between. | ||
| 71 | */ | ||
| 72 | struct virtio_net_ctrl_hdr { | ||
| 73 | __u8 class; | ||
| 74 | __u8 cmd; | ||
| 75 | } __attribute__((packed)); | ||
| 76 | |||
| 77 | typedef __u8 virtio_net_ctrl_ack; | ||
| 78 | |||
| 79 | #define VIRTIO_NET_OK 0 | ||
| 80 | #define VIRTIO_NET_ERR 1 | ||
| 81 | |||
| 82 | /* | ||
| 83 | * Control the RX mode, ie. promisucous and allmulti. PROMISC and | ||
| 84 | * ALLMULTI commands require an "out" sg entry containing a 1 byte | ||
| 85 | * state value, zero = disable, non-zero = enable. These commands | ||
| 86 | * are supported with the VIRTIO_NET_F_CTRL_RX feature. | ||
| 87 | */ | ||
| 88 | #define VIRTIO_NET_CTRL_RX 0 | ||
| 89 | #define VIRTIO_NET_CTRL_RX_PROMISC 0 | ||
| 90 | #define VIRTIO_NET_CTRL_RX_ALLMULTI 1 | ||
| 91 | |||
| 92 | /* | ||
| 93 | * Control the MAC filter table. | ||
| 94 | * | ||
| 95 | * The MAC filter table is managed by the hypervisor, the guest should | ||
| 96 | * assume the size is infinite. Filtering should be considered | ||
| 97 | * non-perfect, ie. based on hypervisor resources, the guest may | ||
| 98 | * received packets from sources not specified in the filter list. | ||
| 99 | * | ||
| 100 | * In addition to the class/cmd header, the TABLE_SET command requires | ||
| 101 | * two out scatterlists. Each contains a 4 byte count of entries followed | ||
| 102 | * by a concatenated byte stream of the ETH_ALEN MAC addresses. The | ||
| 103 | * first sg list contains unicast addresses, the second is for multicast. | ||
| 104 | * This functionality is present if the VIRTIO_NET_F_CTRL_RX feature | ||
| 105 | * is available. | ||
| 106 | */ | ||
| 107 | struct virtio_net_ctrl_mac { | ||
| 108 | __u32 entries; | ||
| 109 | __u8 macs[][ETH_ALEN]; | ||
| 110 | } __attribute__((packed)); | ||
| 111 | |||
| 112 | #define VIRTIO_NET_CTRL_MAC 1 | ||
| 113 | #define VIRTIO_NET_CTRL_MAC_TABLE_SET 0 | ||
| 114 | |||
| 115 | /* | ||
| 116 | * Control VLAN filtering | ||
| 117 | * | ||
| 118 | * The VLAN filter table is controlled via a simple ADD/DEL interface. | ||
| 119 | * VLAN IDs not added may be filterd by the hypervisor. Del is the | ||
| 120 | * opposite of add. Both commands expect an out entry containing a 2 | ||
| 121 | * byte VLAN ID. VLAN filterting is available with the | ||
| 122 | * VIRTIO_NET_F_CTRL_VLAN feature bit. | ||
| 123 | */ | ||
| 124 | #define VIRTIO_NET_CTRL_VLAN 2 | ||
| 125 | #define VIRTIO_NET_CTRL_VLAN_ADD 0 | ||
| 126 | #define VIRTIO_NET_CTRL_VLAN_DEL 1 | ||
| 127 | |||
| 56 | #endif /* _LINUX_VIRTIO_NET_H */ | 128 | #endif /* _LINUX_VIRTIO_NET_H */ |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 506e7620a986..9c0890c7a06a 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
| @@ -84,6 +84,10 @@ extern struct vm_struct *get_vm_area_caller(unsigned long size, | |||
| 84 | unsigned long flags, void *caller); | 84 | unsigned long flags, void *caller); |
| 85 | extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, | 85 | extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, |
| 86 | unsigned long start, unsigned long end); | 86 | unsigned long start, unsigned long end); |
| 87 | extern struct vm_struct *__get_vm_area_caller(unsigned long size, | ||
| 88 | unsigned long flags, | ||
| 89 | unsigned long start, unsigned long end, | ||
| 90 | void *caller); | ||
| 87 | extern struct vm_struct *get_vm_area_node(unsigned long size, | 91 | extern struct vm_struct *get_vm_area_node(unsigned long size, |
| 88 | unsigned long flags, int node, | 92 | unsigned long flags, int node, |
| 89 | gfp_t gfp_mask); | 93 | gfp_t gfp_mask); |
diff --git a/include/linux/wait.h b/include/linux/wait.h index ef609f842fac..a210ede73b56 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
| @@ -132,6 +132,8 @@ static inline void __remove_wait_queue(wait_queue_head_t *head, | |||
| 132 | list_del(&old->task_list); | 132 | list_del(&old->task_list); |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | void __wake_up_common(wait_queue_head_t *q, unsigned int mode, | ||
| 136 | int nr_exclusive, int sync, void *key); | ||
| 135 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); | 137 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); |
| 136 | extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); | 138 | extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); |
| 137 | extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); | 139 | extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); |
| @@ -333,16 +335,19 @@ do { \ | |||
| 333 | for (;;) { \ | 335 | for (;;) { \ |
| 334 | prepare_to_wait_exclusive(&wq, &__wait, \ | 336 | prepare_to_wait_exclusive(&wq, &__wait, \ |
| 335 | TASK_INTERRUPTIBLE); \ | 337 | TASK_INTERRUPTIBLE); \ |
| 336 | if (condition) \ | 338 | if (condition) { \ |
| 339 | finish_wait(&wq, &__wait); \ | ||
| 337 | break; \ | 340 | break; \ |
| 341 | } \ | ||
| 338 | if (!signal_pending(current)) { \ | 342 | if (!signal_pending(current)) { \ |
| 339 | schedule(); \ | 343 | schedule(); \ |
| 340 | continue; \ | 344 | continue; \ |
| 341 | } \ | 345 | } \ |
| 342 | ret = -ERESTARTSYS; \ | 346 | ret = -ERESTARTSYS; \ |
| 347 | abort_exclusive_wait(&wq, &__wait, \ | ||
| 348 | TASK_INTERRUPTIBLE, NULL); \ | ||
| 343 | break; \ | 349 | break; \ |
| 344 | } \ | 350 | } \ |
| 345 | finish_wait(&wq, &__wait); \ | ||
| 346 | } while (0) | 351 | } while (0) |
| 347 | 352 | ||
| 348 | #define wait_event_interruptible_exclusive(wq, condition) \ | 353 | #define wait_event_interruptible_exclusive(wq, condition) \ |
| @@ -431,6 +436,8 @@ extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, | |||
| 431 | void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state); | 436 | void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state); |
| 432 | void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state); | 437 | void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state); |
| 433 | void finish_wait(wait_queue_head_t *q, wait_queue_t *wait); | 438 | void finish_wait(wait_queue_head_t *q, wait_queue_t *wait); |
| 439 | void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait, | ||
| 440 | unsigned int mode, void *key); | ||
| 434 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 441 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
| 435 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 442 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
| 436 | 443 | ||
diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h index ba0c49399a83..c703e0340423 100644 --- a/include/linux/wimax/debug.h +++ b/include/linux/wimax/debug.h | |||
| @@ -178,7 +178,7 @@ void __d_head(char *head, size_t head_size, | |||
| 178 | WARN_ON(1); | 178 | WARN_ON(1); |
| 179 | } else | 179 | } else |
| 180 | snprintf(head, head_size, "%s %s: ", | 180 | snprintf(head, head_size, "%s %s: ", |
| 181 | dev_driver_string(dev), dev->bus_id); | 181 | dev_driver_string(dev), dev_name(dev)); |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | 184 | ||
diff --git a/include/linux/wimax/i2400m.h b/include/linux/wimax/i2400m.h index 74198f5bb4dc..d5148a7889a6 100644 --- a/include/linux/wimax/i2400m.h +++ b/include/linux/wimax/i2400m.h | |||
| @@ -207,6 +207,7 @@ enum i2400m_pt { | |||
| 207 | I2400M_PT_TRACE, /* For device debug */ | 207 | I2400M_PT_TRACE, /* For device debug */ |
| 208 | I2400M_PT_RESET_WARM, /* device reset */ | 208 | I2400M_PT_RESET_WARM, /* device reset */ |
| 209 | I2400M_PT_RESET_COLD, /* USB[transport] reset, like reconnect */ | 209 | I2400M_PT_RESET_COLD, /* USB[transport] reset, like reconnect */ |
| 210 | I2400M_PT_EDATA, /* Extended RX data */ | ||
| 210 | I2400M_PT_ILLEGAL | 211 | I2400M_PT_ILLEGAL |
| 211 | }; | 212 | }; |
| 212 | 213 | ||
| @@ -221,6 +222,48 @@ struct i2400m_pl_data_hdr { | |||
| 221 | } __attribute__((packed)); | 222 | } __attribute__((packed)); |
| 222 | 223 | ||
| 223 | 224 | ||
| 225 | /* | ||
| 226 | * Payload for an extended data packet | ||
| 227 | * | ||
| 228 | * New in fw v1.4 | ||
| 229 | * | ||
| 230 | * @reorder: if this payload has to be reorder or not (and how) | ||
| 231 | * @cs: the type of data in the packet, as defined per (802.16e | ||
| 232 | * T11.13.19.1). Currently only 2 (IPv4 packet) supported. | ||
| 233 | * | ||
| 234 | * This is prefixed to each and every INCOMING DATA packet. | ||
| 235 | */ | ||
| 236 | struct i2400m_pl_edata_hdr { | ||
| 237 | __le32 reorder; /* bits defined in i2400m_ro */ | ||
| 238 | __u8 cs; | ||
| 239 | __u8 reserved[11]; | ||
| 240 | } __attribute__((packed)); | ||
| 241 | |||
| 242 | enum i2400m_cs { | ||
| 243 | I2400M_CS_IPV4_0 = 0, | ||
| 244 | I2400M_CS_IPV4 = 2, | ||
| 245 | }; | ||
| 246 | |||
| 247 | enum i2400m_ro { | ||
| 248 | I2400M_RO_NEEDED = 0x01, | ||
| 249 | I2400M_RO_TYPE = 0x03, | ||
| 250 | I2400M_RO_TYPE_SHIFT = 1, | ||
| 251 | I2400M_RO_CIN = 0x0f, | ||
| 252 | I2400M_RO_CIN_SHIFT = 4, | ||
| 253 | I2400M_RO_FBN = 0x07ff, | ||
| 254 | I2400M_RO_FBN_SHIFT = 8, | ||
| 255 | I2400M_RO_SN = 0x07ff, | ||
| 256 | I2400M_RO_SN_SHIFT = 21, | ||
| 257 | }; | ||
| 258 | |||
| 259 | enum i2400m_ro_type { | ||
| 260 | I2400M_RO_TYPE_RESET = 0, | ||
| 261 | I2400M_RO_TYPE_PACKET, | ||
| 262 | I2400M_RO_TYPE_WS, | ||
| 263 | I2400M_RO_TYPE_PACKET_WS, | ||
| 264 | }; | ||
| 265 | |||
| 266 | |||
| 224 | /* Misc constants */ | 267 | /* Misc constants */ |
| 225 | enum { | 268 | enum { |
| 226 | I2400M_PL_PAD = 16, /* Payload data size alignment */ | 269 | I2400M_PL_PAD = 16, /* Payload data size alignment */ |
| @@ -381,6 +424,9 @@ enum i2400m_tlv { | |||
| 381 | I2400M_TLV_RF_STATUS = 163, | 424 | I2400M_TLV_RF_STATUS = 163, |
| 382 | I2400M_TLV_DEVICE_RESET_TYPE = 132, | 425 | I2400M_TLV_DEVICE_RESET_TYPE = 132, |
| 383 | I2400M_TLV_CONFIG_IDLE_PARAMETERS = 601, | 426 | I2400M_TLV_CONFIG_IDLE_PARAMETERS = 601, |
| 427 | I2400M_TLV_CONFIG_IDLE_TIMEOUT = 611, | ||
| 428 | I2400M_TLV_CONFIG_D2H_DATA_FORMAT = 614, | ||
| 429 | I2400M_TLV_CONFIG_DL_HOST_REORDER = 615, | ||
| 384 | }; | 430 | }; |
| 385 | 431 | ||
| 386 | 432 | ||
| @@ -509,4 +555,27 @@ struct i2400m_tlv_media_status { | |||
| 509 | __le32 media_status; | 555 | __le32 media_status; |
| 510 | } __attribute__((packed)); | 556 | } __attribute__((packed)); |
| 511 | 557 | ||
| 558 | |||
| 559 | /* New in v1.4 */ | ||
| 560 | struct i2400m_tlv_config_idle_timeout { | ||
| 561 | struct i2400m_tlv_hdr hdr; | ||
| 562 | __le32 timeout; /* 100 to 300000 ms [5min], 100 increments | ||
| 563 | * 0 disabled */ | ||
| 564 | } __attribute__((packed)); | ||
| 565 | |||
| 566 | /* New in v1.4 -- for backward compat, will be removed */ | ||
| 567 | struct i2400m_tlv_config_d2h_data_format { | ||
| 568 | struct i2400m_tlv_hdr hdr; | ||
| 569 | __u8 format; /* 0 old format, 1 enhanced */ | ||
| 570 | __u8 reserved[3]; | ||
| 571 | } __attribute__((packed)); | ||
| 572 | |||
| 573 | /* New in v1.4 */ | ||
| 574 | struct i2400m_tlv_config_dl_host_reorder { | ||
| 575 | struct i2400m_tlv_hdr hdr; | ||
| 576 | __u8 reorder; /* 0 disabled, 1 enabled */ | ||
| 577 | __u8 reserved[3]; | ||
| 578 | } __attribute__((packed)); | ||
| 579 | |||
| 580 | |||
| 512 | #endif /* #ifndef __LINUX__WIMAX__I2400M_H__ */ | 581 | #endif /* #ifndef __LINUX__WIMAX__I2400M_H__ */ |
diff --git a/include/linux/wireless.h b/include/linux/wireless.h index d7958f9b52cb..cb24204851f7 100644 --- a/include/linux/wireless.h +++ b/include/linux/wireless.h | |||
| @@ -577,18 +577,22 @@ | |||
| 577 | #define IW_AUTH_RX_UNENCRYPTED_EAPOL 8 | 577 | #define IW_AUTH_RX_UNENCRYPTED_EAPOL 8 |
| 578 | #define IW_AUTH_ROAMING_CONTROL 9 | 578 | #define IW_AUTH_ROAMING_CONTROL 9 |
| 579 | #define IW_AUTH_PRIVACY_INVOKED 10 | 579 | #define IW_AUTH_PRIVACY_INVOKED 10 |
| 580 | #define IW_AUTH_CIPHER_GROUP_MGMT 11 | ||
| 581 | #define IW_AUTH_MFP 12 | ||
| 580 | 582 | ||
| 581 | /* IW_AUTH_WPA_VERSION values (bit field) */ | 583 | /* IW_AUTH_WPA_VERSION values (bit field) */ |
| 582 | #define IW_AUTH_WPA_VERSION_DISABLED 0x00000001 | 584 | #define IW_AUTH_WPA_VERSION_DISABLED 0x00000001 |
| 583 | #define IW_AUTH_WPA_VERSION_WPA 0x00000002 | 585 | #define IW_AUTH_WPA_VERSION_WPA 0x00000002 |
| 584 | #define IW_AUTH_WPA_VERSION_WPA2 0x00000004 | 586 | #define IW_AUTH_WPA_VERSION_WPA2 0x00000004 |
| 585 | 587 | ||
| 586 | /* IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values (bit field) */ | 588 | /* IW_AUTH_PAIRWISE_CIPHER, IW_AUTH_GROUP_CIPHER, and IW_AUTH_CIPHER_GROUP_MGMT |
| 589 | * values (bit field) */ | ||
| 587 | #define IW_AUTH_CIPHER_NONE 0x00000001 | 590 | #define IW_AUTH_CIPHER_NONE 0x00000001 |
| 588 | #define IW_AUTH_CIPHER_WEP40 0x00000002 | 591 | #define IW_AUTH_CIPHER_WEP40 0x00000002 |
| 589 | #define IW_AUTH_CIPHER_TKIP 0x00000004 | 592 | #define IW_AUTH_CIPHER_TKIP 0x00000004 |
| 590 | #define IW_AUTH_CIPHER_CCMP 0x00000008 | 593 | #define IW_AUTH_CIPHER_CCMP 0x00000008 |
| 591 | #define IW_AUTH_CIPHER_WEP104 0x00000010 | 594 | #define IW_AUTH_CIPHER_WEP104 0x00000010 |
| 595 | #define IW_AUTH_CIPHER_AES_CMAC 0x00000020 | ||
| 592 | 596 | ||
| 593 | /* IW_AUTH_KEY_MGMT values (bit field) */ | 597 | /* IW_AUTH_KEY_MGMT values (bit field) */ |
| 594 | #define IW_AUTH_KEY_MGMT_802_1X 1 | 598 | #define IW_AUTH_KEY_MGMT_802_1X 1 |
| @@ -604,6 +608,11 @@ | |||
| 604 | #define IW_AUTH_ROAMING_DISABLE 1 /* user space program used for roaming | 608 | #define IW_AUTH_ROAMING_DISABLE 1 /* user space program used for roaming |
| 605 | * control */ | 609 | * control */ |
| 606 | 610 | ||
| 611 | /* IW_AUTH_MFP (management frame protection) values */ | ||
| 612 | #define IW_AUTH_MFP_DISABLED 0 /* MFP disabled */ | ||
| 613 | #define IW_AUTH_MFP_OPTIONAL 1 /* MFP optional */ | ||
| 614 | #define IW_AUTH_MFP_REQUIRED 2 /* MFP required */ | ||
| 615 | |||
| 607 | /* SIOCSIWENCODEEXT definitions */ | 616 | /* SIOCSIWENCODEEXT definitions */ |
| 608 | #define IW_ENCODE_SEQ_MAX_SIZE 8 | 617 | #define IW_ENCODE_SEQ_MAX_SIZE 8 |
| 609 | /* struct iw_encode_ext ->alg */ | 618 | /* struct iw_encode_ext ->alg */ |
| @@ -612,6 +621,7 @@ | |||
| 612 | #define IW_ENCODE_ALG_TKIP 2 | 621 | #define IW_ENCODE_ALG_TKIP 2 |
| 613 | #define IW_ENCODE_ALG_CCMP 3 | 622 | #define IW_ENCODE_ALG_CCMP 3 |
| 614 | #define IW_ENCODE_ALG_PMK 4 | 623 | #define IW_ENCODE_ALG_PMK 4 |
| 624 | #define IW_ENCODE_ALG_AES_CMAC 5 | ||
| 615 | /* struct iw_encode_ext ->ext_flags */ | 625 | /* struct iw_encode_ext ->ext_flags */ |
| 616 | #define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001 | 626 | #define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001 |
| 617 | #define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002 | 627 | #define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002 |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index b36291130f22..3cd51e579ab1 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -118,12 +118,24 @@ struct execute_work { | |||
| 118 | init_timer(&(_work)->timer); \ | 118 | init_timer(&(_work)->timer); \ |
| 119 | } while (0) | 119 | } while (0) |
| 120 | 120 | ||
| 121 | #define INIT_DELAYED_WORK_ON_STACK(_work, _func) \ | ||
| 122 | do { \ | ||
| 123 | INIT_WORK(&(_work)->work, (_func)); \ | ||
| 124 | init_timer_on_stack(&(_work)->timer); \ | ||
| 125 | } while (0) | ||
| 126 | |||
| 121 | #define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \ | 127 | #define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \ |
| 122 | do { \ | 128 | do { \ |
| 123 | INIT_WORK(&(_work)->work, (_func)); \ | 129 | INIT_WORK(&(_work)->work, (_func)); \ |
| 124 | init_timer_deferrable(&(_work)->timer); \ | 130 | init_timer_deferrable(&(_work)->timer); \ |
| 125 | } while (0) | 131 | } while (0) |
| 126 | 132 | ||
| 133 | #define INIT_DELAYED_WORK_ON_STACK(_work, _func) \ | ||
| 134 | do { \ | ||
| 135 | INIT_WORK(&(_work)->work, (_func)); \ | ||
| 136 | init_timer_on_stack(&(_work)->timer); \ | ||
| 137 | } while (0) | ||
| 138 | |||
| 127 | /** | 139 | /** |
| 128 | * work_pending - Find out whether a work item is currently pending | 140 | * work_pending - Find out whether a work item is currently pending |
| 129 | * @work: The work item in question | 141 | * @work: The work item in question |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 52f3abd453a1..2d4ec15abaca 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
| @@ -58,7 +58,7 @@ struct xfrm_selector | |||
| 58 | __u8 prefixlen_s; | 58 | __u8 prefixlen_s; |
| 59 | __u8 proto; | 59 | __u8 proto; |
| 60 | int ifindex; | 60 | int ifindex; |
| 61 | uid_t user; | 61 | __kernel_uid32_t user; |
| 62 | }; | 62 | }; |
| 63 | 63 | ||
| 64 | #define XFRM_INF (~(__u64)0) | 64 | #define XFRM_INF (~(__u64)0) |
