diff options
Diffstat (limited to 'include/linux')
258 files changed, 5287 insertions, 2363 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 106c3ba50844..a67b6227d272 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -115,6 +115,7 @@ header-y += mqueue.h | |||
115 | header-y += mtio.h | 115 | header-y += mtio.h |
116 | header-y += ncp_no.h | 116 | header-y += ncp_no.h |
117 | header-y += neighbour.h | 117 | header-y += neighbour.h |
118 | header-y += net_dropmon.h | ||
118 | header-y += netfilter_arp.h | 119 | header-y += netfilter_arp.h |
119 | header-y += netrom.h | 120 | header-y += netrom.h |
120 | header-y += nfs2.h | 121 | header-y += nfs2.h |
@@ -157,8 +158,6 @@ header-y += ultrasound.h | |||
157 | header-y += un.h | 158 | header-y += un.h |
158 | header-y += utime.h | 159 | header-y += utime.h |
159 | header-y += veth.h | 160 | header-y += veth.h |
160 | header-y += video_decoder.h | ||
161 | header-y += video_encoder.h | ||
162 | header-y += videotext.h | 161 | header-y += videotext.h |
163 | header-y += x25.h | 162 | header-y += x25.h |
164 | 163 | ||
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 78199151c00b..d047f846c3ed 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -257,6 +257,40 @@ void __init acpi_no_s4_hw_signature(void); | |||
257 | void __init acpi_old_suspend_ordering(void); | 257 | void __init acpi_old_suspend_ordering(void); |
258 | void __init acpi_s4_no_nvs(void); | 258 | void __init acpi_s4_no_nvs(void); |
259 | #endif /* CONFIG_PM_SLEEP */ | 259 | #endif /* CONFIG_PM_SLEEP */ |
260 | |||
261 | #define OSC_QUERY_TYPE 0 | ||
262 | #define OSC_SUPPORT_TYPE 1 | ||
263 | #define OSC_CONTROL_TYPE 2 | ||
264 | #define OSC_SUPPORT_MASKS 0x1f | ||
265 | |||
266 | /* _OSC DW0 Definition */ | ||
267 | #define OSC_QUERY_ENABLE 1 | ||
268 | #define OSC_REQUEST_ERROR 2 | ||
269 | #define OSC_INVALID_UUID_ERROR 4 | ||
270 | #define OSC_INVALID_REVISION_ERROR 8 | ||
271 | #define OSC_CAPABILITIES_MASK_ERROR 16 | ||
272 | |||
273 | /* _OSC DW1 Definition (OS Support Fields) */ | ||
274 | #define OSC_EXT_PCI_CONFIG_SUPPORT 1 | ||
275 | #define OSC_ACTIVE_STATE_PWR_SUPPORT 2 | ||
276 | #define OSC_CLOCK_PWR_CAPABILITY_SUPPORT 4 | ||
277 | #define OSC_PCI_SEGMENT_GROUPS_SUPPORT 8 | ||
278 | #define OSC_MSI_SUPPORT 16 | ||
279 | |||
280 | /* _OSC DW1 Definition (OS Control Fields) */ | ||
281 | #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL 1 | ||
282 | #define OSC_SHPC_NATIVE_HP_CONTROL 2 | ||
283 | #define OSC_PCI_EXPRESS_PME_CONTROL 4 | ||
284 | #define OSC_PCI_EXPRESS_AER_CONTROL 8 | ||
285 | #define OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL 16 | ||
286 | |||
287 | #define OSC_CONTROL_MASKS (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | \ | ||
288 | OSC_SHPC_NATIVE_HP_CONTROL | \ | ||
289 | OSC_PCI_EXPRESS_PME_CONTROL | \ | ||
290 | OSC_PCI_EXPRESS_AER_CONTROL | \ | ||
291 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) | ||
292 | |||
293 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 flags); | ||
260 | #else /* CONFIG_ACPI */ | 294 | #else /* CONFIG_ACPI */ |
261 | 295 | ||
262 | static inline int early_acpi_boot_init(void) | 296 | static inline int early_acpi_boot_init(void) |
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/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/ata.h b/include/linux/ata.h index 9a061accd8b8..6617c9f8f2ca 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -108,6 +108,8 @@ enum { | |||
108 | ATA_PIO5 = ATA_PIO4 | (1 << 5), | 108 | ATA_PIO5 = ATA_PIO4 | (1 << 5), |
109 | ATA_PIO6 = ATA_PIO5 | (1 << 6), | 109 | ATA_PIO6 = ATA_PIO5 | (1 << 6), |
110 | 110 | ||
111 | ATA_PIO4_ONLY = (1 << 4), | ||
112 | |||
111 | ATA_SWDMA0 = (1 << 0), | 113 | ATA_SWDMA0 = (1 << 0), |
112 | ATA_SWDMA1 = ATA_SWDMA0 | (1 << 1), | 114 | ATA_SWDMA1 = ATA_SWDMA0 | (1 << 1), |
113 | ATA_SWDMA2 = ATA_SWDMA1 | (1 << 2), | 115 | ATA_SWDMA2 = ATA_SWDMA1 | (1 << 2), |
@@ -117,6 +119,8 @@ enum { | |||
117 | ATA_MWDMA0 = (1 << 0), | 119 | ATA_MWDMA0 = (1 << 0), |
118 | ATA_MWDMA1 = ATA_MWDMA0 | (1 << 1), | 120 | ATA_MWDMA1 = ATA_MWDMA0 | (1 << 1), |
119 | 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), | ||
120 | 124 | ||
121 | ATA_MWDMA12_ONLY = (1 << 1) | (1 << 2), | 125 | ATA_MWDMA12_ONLY = (1 << 1) | (1 << 2), |
122 | ATA_MWDMA2_ONLY = (1 << 2), | 126 | ATA_MWDMA2_ONLY = (1 << 2), |
@@ -131,6 +135,8 @@ enum { | |||
131 | ATA_UDMA7 = ATA_UDMA6 | (1 << 7), | 135 | ATA_UDMA7 = ATA_UDMA6 | (1 << 7), |
132 | /* ATA_UDMA7 is just for completeness... doesn't exist (yet?). */ | 136 | /* ATA_UDMA7 is just for completeness... doesn't exist (yet?). */ |
133 | 137 | ||
138 | ATA_UDMA24_ONLY = (1 << 2) | (1 << 4), | ||
139 | |||
134 | ATA_UDMA_MASK_40C = ATA_UDMA2, /* udma0-2 */ | 140 | ATA_UDMA_MASK_40C = ATA_UDMA2, /* udma0-2 */ |
135 | 141 | ||
136 | /* DMA-related */ | 142 | /* DMA-related */ |
@@ -244,8 +250,6 @@ enum { | |||
244 | ATA_CMD_MEDIA_UNLOCK = 0xDF, | 250 | ATA_CMD_MEDIA_UNLOCK = 0xDF, |
245 | /* marked obsolete in the ATA/ATAPI-7 spec */ | 251 | /* marked obsolete in the ATA/ATAPI-7 spec */ |
246 | ATA_CMD_RESTORE = 0x10, | 252 | ATA_CMD_RESTORE = 0x10, |
247 | /* EXABYTE specific */ | ||
248 | ATA_EXABYTE_ENABLE_NEST = 0xF0, | ||
249 | 253 | ||
250 | /* READ_LOG_EXT pages */ | 254 | /* READ_LOG_EXT pages */ |
251 | ATA_LOG_SATA_NCQ = 0x10, | 255 | ATA_LOG_SATA_NCQ = 0x10, |
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/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_dev-ioctl.h b/include/linux/auto_dev-ioctl.h index 91a773993a5c..850f39b33e74 100644 --- a/include/linux/auto_dev-ioctl.h +++ b/include/linux/auto_dev-ioctl.h | |||
@@ -10,8 +10,13 @@ | |||
10 | #ifndef _LINUX_AUTO_DEV_IOCTL_H | 10 | #ifndef _LINUX_AUTO_DEV_IOCTL_H |
11 | #define _LINUX_AUTO_DEV_IOCTL_H | 11 | #define _LINUX_AUTO_DEV_IOCTL_H |
12 | 12 | ||
13 | #include <linux/auto_fs.h> | ||
14 | |||
15 | #ifdef __KERNEL__ | ||
13 | #include <linux/string.h> | 16 | #include <linux/string.h> |
14 | #include <linux/types.h> | 17 | #else |
18 | #include <string.h> | ||
19 | #endif /* __KERNEL__ */ | ||
15 | 20 | ||
16 | #define AUTOFS_DEVICE_NAME "autofs" | 21 | #define AUTOFS_DEVICE_NAME "autofs" |
17 | 22 | ||
diff --git a/include/linux/auto_fs.h b/include/linux/auto_fs.h index c21e5972a3e8..63265852b7d1 100644 --- a/include/linux/auto_fs.h +++ b/include/linux/auto_fs.h | |||
@@ -17,11 +17,13 @@ | |||
17 | #ifdef __KERNEL__ | 17 | #ifdef __KERNEL__ |
18 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
19 | #include <linux/limits.h> | 19 | #include <linux/limits.h> |
20 | #include <linux/types.h> | ||
21 | #include <linux/ioctl.h> | ||
22 | #else | ||
20 | #include <asm/types.h> | 23 | #include <asm/types.h> |
24 | #include <sys/ioctl.h> | ||
21 | #endif /* __KERNEL__ */ | 25 | #endif /* __KERNEL__ */ |
22 | 26 | ||
23 | #include <linux/ioctl.h> | ||
24 | |||
25 | /* This file describes autofs v3 */ | 27 | /* This file describes autofs v3 */ |
26 | #define AUTOFS_PROTO_VERSION 3 | 28 | #define AUTOFS_PROTO_VERSION 3 |
27 | 29 | ||
diff --git a/include/linux/bio.h b/include/linux/bio.h index d8bd43bfdcf5..b05b1d4d17d2 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -426,9 +426,6 @@ struct bio_set { | |||
426 | unsigned int front_pad; | 426 | unsigned int front_pad; |
427 | 427 | ||
428 | mempool_t *bio_pool; | 428 | mempool_t *bio_pool; |
429 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
430 | mempool_t *bio_integrity_pool; | ||
431 | #endif | ||
432 | mempool_t *bvec_pool; | 429 | mempool_t *bvec_pool; |
433 | }; | 430 | }; |
434 | 431 | ||
@@ -519,9 +516,8 @@ static inline int bio_has_data(struct bio *bio) | |||
519 | 516 | ||
520 | #define bio_integrity(bio) (bio->bi_integrity != NULL) | 517 | #define bio_integrity(bio) (bio->bi_integrity != NULL) |
521 | 518 | ||
522 | extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *); | ||
523 | 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); |
524 | extern void bio_integrity_free(struct bio *, struct bio_set *); | 520 | extern void bio_integrity_free(struct bio *); |
525 | 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); |
526 | extern int bio_integrity_enabled(struct bio *bio); | 522 | extern int bio_integrity_enabled(struct bio *bio); |
527 | extern int bio_integrity_set_tag(struct bio *, void *, unsigned int); | 523 | extern int bio_integrity_set_tag(struct bio *, void *, unsigned int); |
@@ -531,27 +527,21 @@ extern void bio_integrity_endio(struct bio *, int); | |||
531 | extern void bio_integrity_advance(struct bio *, unsigned int); | 527 | extern void bio_integrity_advance(struct bio *, unsigned int); |
532 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); | 528 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); |
533 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); | 529 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); |
534 | extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t, struct bio_set *); | 530 | extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t); |
535 | extern int bioset_integrity_create(struct bio_set *, int); | ||
536 | extern void bioset_integrity_free(struct bio_set *); | ||
537 | extern void bio_integrity_init_slab(void); | ||
538 | 531 | ||
539 | #else /* CONFIG_BLK_DEV_INTEGRITY */ | 532 | #else /* CONFIG_BLK_DEV_INTEGRITY */ |
540 | 533 | ||
541 | #define bio_integrity(a) (0) | 534 | #define bio_integrity(a) (0) |
542 | #define bioset_integrity_create(a, b) (0) | ||
543 | #define bio_integrity_prep(a) (0) | 535 | #define bio_integrity_prep(a) (0) |
544 | #define bio_integrity_enabled(a) (0) | 536 | #define bio_integrity_enabled(a) (0) |
545 | #define bio_integrity_clone(a, b, c,d ) (0) | 537 | #define bio_integrity_clone(a, b, c) (0) |
546 | #define bioset_integrity_free(a) do { } while (0) | 538 | #define bio_integrity_free(a) do { } while (0) |
547 | #define bio_integrity_free(a, b) do { } while (0) | ||
548 | #define bio_integrity_endio(a, b) do { } while (0) | 539 | #define bio_integrity_endio(a, b) do { } while (0) |
549 | #define bio_integrity_advance(a, b) do { } while (0) | 540 | #define bio_integrity_advance(a, b) do { } while (0) |
550 | #define bio_integrity_trim(a, b, c) do { } while (0) | 541 | #define bio_integrity_trim(a, b, c) do { } while (0) |
551 | #define bio_integrity_split(a, b, c) do { } while (0) | 542 | #define bio_integrity_split(a, b, c) do { } while (0) |
552 | #define bio_integrity_set_tag(a, b, c) do { } while (0) | 543 | #define bio_integrity_set_tag(a, b, c) do { } while (0) |
553 | #define bio_integrity_get_tag(a, b, c) do { } while (0) | 544 | #define bio_integrity_get_tag(a, b, c) do { } while (0) |
554 | #define bio_integrity_init_slab(a) do { } while (0) | ||
555 | 545 | ||
556 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 546 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
557 | 547 | ||
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 455d83219fae..bc3ab7073695 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -146,10 +146,10 @@ extern void *alloc_large_system_hash(const char *tablename, | |||
146 | 146 | ||
147 | #define HASH_EARLY 0x00000001 /* Allocating during early boot? */ | 147 | #define HASH_EARLY 0x00000001 /* Allocating during early boot? */ |
148 | 148 | ||
149 | /* Only NUMA needs hash distribution. | 149 | /* Only NUMA needs hash distribution. 64bit NUMA architectures have |
150 | * IA64 and x86_64 have sufficient vmalloc space. | 150 | * sufficient vmalloc space. |
151 | */ | 151 | */ |
152 | #if defined(CONFIG_NUMA) && (defined(CONFIG_IA64) || defined(CONFIG_X86_64)) | 152 | #if defined(CONFIG_NUMA) && defined(CONFIG_64BIT) |
153 | #define HASHDIST_DEFAULT 1 | 153 | #define HASHDIST_DEFAULT 1 |
154 | #else | 154 | #else |
155 | #define HASHDIST_DEFAULT 0 | 155 | #define HASHDIST_DEFAULT 0 |
diff --git a/include/linux/bsg.h b/include/linux/bsg.h index cf0303a60611..ecb4730d0868 100644 --- a/include/linux/bsg.h +++ b/include/linux/bsg.h | |||
@@ -1,12 +1,22 @@ | |||
1 | #ifndef BSG_H | 1 | #ifndef BSG_H |
2 | #define BSG_H | 2 | #define BSG_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | #define BSG_PROTOCOL_SCSI 0 | 6 | #define BSG_PROTOCOL_SCSI 0 |
5 | 7 | ||
6 | #define BSG_SUB_PROTOCOL_SCSI_CMD 0 | 8 | #define BSG_SUB_PROTOCOL_SCSI_CMD 0 |
7 | #define BSG_SUB_PROTOCOL_SCSI_TMF 1 | 9 | #define BSG_SUB_PROTOCOL_SCSI_TMF 1 |
8 | #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 | 10 | #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 |
9 | 11 | ||
12 | /* | ||
13 | * For flags member below | ||
14 | * sg.h sg_io_hdr also has bits defined for it's flags member. However | ||
15 | * none of these bits are implemented/used by bsg. The bits below are | ||
16 | * allocated to not conflict with sg.h ones anyway. | ||
17 | */ | ||
18 | #define BSG_FLAG_Q_AT_TAIL 0x10 /* default, == 0 at this bit, is Q_AT_HEAD */ | ||
19 | |||
10 | struct sg_io_v4 { | 20 | struct sg_io_v4 { |
11 | __s32 guard; /* [i] 'Q' to differentiate from v3 */ | 21 | __s32 guard; /* [i] 'Q' to differentiate from v3 */ |
12 | __u32 protocol; /* [i] 0 -> SCSI , .... */ | 22 | __u32 protocol; /* [i] 0 -> SCSI , .... */ |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index bd7ac793be19..3d7bcde2e332 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -165,15 +165,8 @@ int sync_mapping_buffers(struct address_space *mapping); | |||
165 | void unmap_underlying_metadata(struct block_device *bdev, sector_t block); | 165 | void unmap_underlying_metadata(struct block_device *bdev, sector_t block); |
166 | 166 | ||
167 | void mark_buffer_async_write(struct buffer_head *bh); | 167 | void mark_buffer_async_write(struct buffer_head *bh); |
168 | void invalidate_bdev(struct block_device *); | ||
169 | int sync_blockdev(struct block_device *bdev); | ||
170 | void __wait_on_buffer(struct buffer_head *); | 168 | void __wait_on_buffer(struct buffer_head *); |
171 | wait_queue_head_t *bh_waitq_head(struct buffer_head *bh); | 169 | wait_queue_head_t *bh_waitq_head(struct buffer_head *bh); |
172 | int fsync_bdev(struct block_device *); | ||
173 | struct super_block *freeze_bdev(struct block_device *); | ||
174 | int thaw_bdev(struct block_device *, struct super_block *); | ||
175 | int fsync_super(struct super_block *); | ||
176 | int fsync_no_super(struct block_device *); | ||
177 | struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, | 170 | struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, |
178 | unsigned size); | 171 | unsigned size); |
179 | struct buffer_head *__getblk(struct block_device *bdev, sector_t block, | 172 | struct buffer_head *__getblk(struct block_device *bdev, sector_t block, |
@@ -223,7 +216,7 @@ int cont_write_begin(struct file *, struct address_space *, loff_t, | |||
223 | get_block_t *, loff_t *); | 216 | get_block_t *, loff_t *); |
224 | int generic_cont_expand_simple(struct inode *inode, loff_t size); | 217 | int generic_cont_expand_simple(struct inode *inode, loff_t size); |
225 | int block_commit_write(struct page *page, unsigned from, unsigned to); | 218 | int block_commit_write(struct page *page, unsigned from, unsigned to); |
226 | int block_page_mkwrite(struct vm_area_struct *vma, struct page *page, | 219 | int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, |
227 | get_block_t get_block); | 220 | get_block_t get_block); |
228 | void block_sync_page(struct page *); | 221 | void block_sync_page(struct page *); |
229 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); | 222 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); |
diff --git a/include/linux/clk.h b/include/linux/clk.h index 778777316ea4..1db9bbf444a3 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h | |||
@@ -125,4 +125,21 @@ int clk_set_parent(struct clk *clk, struct clk *parent); | |||
125 | */ | 125 | */ |
126 | struct clk *clk_get_parent(struct clk *clk); | 126 | struct clk *clk_get_parent(struct clk *clk); |
127 | 127 | ||
128 | /** | ||
129 | * clk_get_sys - get a clock based upon the device name | ||
130 | * @dev_id: device name | ||
131 | * @con_id: connection ID | ||
132 | * | ||
133 | * Returns a struct clk corresponding to the clock producer, or | ||
134 | * valid IS_ERR() condition containing errno. The implementation | ||
135 | * uses @dev_id and @con_id to determine the clock consumer, and | ||
136 | * thereby the clock producer. In contrast to clk_get() this function | ||
137 | * takes the device name instead of the device itself for identification. | ||
138 | * | ||
139 | * Drivers must assume that the clock source is not enabled. | ||
140 | * | ||
141 | * clk_get_sys should not be called from within interrupt context. | ||
142 | */ | ||
143 | struct clk *clk_get_sys(const char *dev_id, const char *con_id); | ||
144 | |||
128 | #endif | 145 | #endif |
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/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/compat.h b/include/linux/compat.h index 3fd2194ff573..b880864672de 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -125,6 +125,13 @@ struct compat_dirent { | |||
125 | char d_name[256]; | 125 | char d_name[256]; |
126 | }; | 126 | }; |
127 | 127 | ||
128 | struct compat_ustat { | ||
129 | compat_daddr_t f_tfree; | ||
130 | compat_ino_t f_tinode; | ||
131 | char f_fname[6]; | ||
132 | char f_fpack[6]; | ||
133 | }; | ||
134 | |||
128 | typedef union compat_sigval { | 135 | typedef union compat_sigval { |
129 | compat_int_t sival_int; | 136 | compat_int_t sival_int; |
130 | compat_uptr_t sival_ptr; | 137 | compat_uptr_t sival_ptr; |
@@ -178,6 +185,7 @@ long compat_sys_semtimedop(int semid, struct sembuf __user *tsems, | |||
178 | unsigned nsems, const struct compat_timespec __user *timeout); | 185 | unsigned nsems, const struct compat_timespec __user *timeout); |
179 | asmlinkage long compat_sys_keyctl(u32 option, | 186 | asmlinkage long compat_sys_keyctl(u32 option, |
180 | u32 arg2, u32 arg3, u32 arg4, u32 arg5); | 187 | u32 arg2, u32 arg3, u32 arg4, u32 arg5); |
188 | asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32); | ||
181 | 189 | ||
182 | asmlinkage ssize_t compat_sys_readv(unsigned long fd, | 190 | asmlinkage ssize_t compat_sys_readv(unsigned long fd, |
183 | const struct compat_iovec __user *vec, unsigned long vlen); | 191 | const struct compat_iovec __user *vec, unsigned long vlen); |
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/cpuset.h b/include/linux/cpuset.h index 90c6074a36ca..2e0d79678deb 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -90,12 +90,12 @@ static inline void cpuset_init_smp(void) {} | |||
90 | static inline void cpuset_cpus_allowed(struct task_struct *p, | 90 | static inline void cpuset_cpus_allowed(struct task_struct *p, |
91 | struct cpumask *mask) | 91 | struct cpumask *mask) |
92 | { | 92 | { |
93 | *mask = cpu_possible_map; | 93 | cpumask_copy(mask, cpu_possible_mask); |
94 | } | 94 | } |
95 | static inline void cpuset_cpus_allowed_locked(struct task_struct *p, | 95 | static inline void cpuset_cpus_allowed_locked(struct task_struct *p, |
96 | struct cpumask *mask) | 96 | struct cpumask *mask) |
97 | { | 97 | { |
98 | *mask = cpu_possible_map; | 98 | cpumask_copy(mask, cpu_possible_mask); |
99 | } | 99 | } |
100 | 100 | ||
101 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) | 101 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 1f2e9020acc6..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,9 +549,6 @@ 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_destroy_tfm(void *mem, struct crypto_tfm *tfm); | 553 | void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm); |
556 | 554 | ||
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/dcache.h b/include/linux/dcache.h index c66d22487bf8..15156364d196 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -112,7 +112,7 @@ struct dentry { | |||
112 | struct list_head d_subdirs; /* our children */ | 112 | struct list_head d_subdirs; /* our children */ |
113 | struct list_head d_alias; /* inode alias list */ | 113 | struct list_head d_alias; /* inode alias list */ |
114 | unsigned long d_time; /* used by d_revalidate */ | 114 | unsigned long d_time; /* used by d_revalidate */ |
115 | struct dentry_operations *d_op; | 115 | const struct dentry_operations *d_op; |
116 | struct super_block *d_sb; /* The root of the dentry tree */ | 116 | struct super_block *d_sb; /* The root of the dentry tree */ |
117 | void *d_fsdata; /* fs-specific data */ | 117 | void *d_fsdata; /* fs-specific data */ |
118 | 118 | ||
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/device.h b/include/linux/device.h index 47f343c7bdda..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,7 +148,7 @@ 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); |
150 | extern int wait_for_device_probe(void); | 151 | extern void wait_for_device_probe(void); |
151 | 152 | ||
152 | 153 | ||
153 | /* sysfs interface for exporting driver attributes */ | 154 | /* sysfs interface for exporting driver attributes */ |
@@ -367,15 +368,11 @@ struct device_dma_parameters { | |||
367 | }; | 368 | }; |
368 | 369 | ||
369 | struct device { | 370 | struct device { |
370 | struct klist klist_children; | ||
371 | struct klist_node knode_parent; /* node in sibling list */ | ||
372 | struct klist_node knode_driver; | ||
373 | struct klist_node knode_bus; | ||
374 | struct device *parent; | 371 | struct device *parent; |
375 | 372 | ||
373 | struct device_private *p; | ||
374 | |||
376 | struct kobject kobj; | 375 | struct kobject kobj; |
377 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ | ||
378 | unsigned uevent_suppress:1; | ||
379 | const char *init_name; /* initial name of the device */ | 376 | const char *init_name; /* initial name of the device */ |
380 | struct device_type *type; | 377 | struct device_type *type; |
381 | 378 | ||
@@ -387,8 +384,13 @@ struct device { | |||
387 | struct device_driver *driver; /* which driver has allocated this | 384 | struct device_driver *driver; /* which driver has allocated this |
388 | device */ | 385 | device */ |
389 | void *driver_data; /* data private to the driver */ | 386 | void *driver_data; /* data private to the driver */ |
390 | void *platform_data; /* Platform specific data, device | 387 | |
391 | 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. */ | ||
392 | struct dev_pm_info power; | 394 | struct dev_pm_info power; |
393 | 395 | ||
394 | #ifdef CONFIG_NUMA | 396 | #ifdef CONFIG_NUMA |
@@ -427,8 +429,7 @@ struct device { | |||
427 | 429 | ||
428 | static inline const char *dev_name(const struct device *dev) | 430 | static inline const char *dev_name(const struct device *dev) |
429 | { | 431 | { |
430 | /* will be changed into kobject_name(&dev->kobj) in the near future */ | 432 | return kobject_name(&dev->kobj); |
431 | return dev->bus_id; | ||
432 | } | 433 | } |
433 | 434 | ||
434 | extern int dev_set_name(struct device *dev, const char *name, ...) | 435 | extern int dev_set_name(struct device *dev, const char *name, ...) |
@@ -463,6 +464,16 @@ static inline void dev_set_drvdata(struct device *dev, void *data) | |||
463 | dev->driver_data = data; | 464 | dev->driver_data = data; |
464 | } | 465 | } |
465 | 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 | |||
466 | static inline int device_is_registered(struct device *dev) | 477 | static inline int device_is_registered(struct device *dev) |
467 | { | 478 | { |
468 | return dev->kobj.state_in_sysfs; | 479 | return dev->kobj.state_in_sysfs; |
@@ -483,7 +494,8 @@ extern int device_for_each_child(struct device *dev, void *data, | |||
483 | extern struct device *device_find_child(struct device *dev, void *data, | 494 | extern struct device *device_find_child(struct device *dev, void *data, |
484 | int (*match)(struct device *dev, void *data)); | 495 | int (*match)(struct device *dev, void *data)); |
485 | extern int device_rename(struct device *dev, char *new_name); | 496 | extern int device_rename(struct device *dev, char *new_name); |
486 | 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); | ||
487 | 499 | ||
488 | /* | 500 | /* |
489 | * Root device objects for grouping under /sys/devices | 501 | * Root device objects for grouping under /sys/devices |
@@ -570,7 +582,7 @@ extern const char *dev_driver_string(const struct device *dev); | |||
570 | #if defined(DEBUG) | 582 | #if defined(DEBUG) |
571 | #define dev_dbg(dev, format, arg...) \ | 583 | #define dev_dbg(dev, format, arg...) \ |
572 | dev_printk(KERN_DEBUG , dev , format , ## arg) | 584 | dev_printk(KERN_DEBUG , dev , format , ## arg) |
573 | #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 585 | #elif defined(CONFIG_DYNAMIC_DEBUG) |
574 | #define dev_dbg(dev, format, ...) do { \ | 586 | #define dev_dbg(dev, format, ...) do { \ |
575 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ | 587 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ |
576 | } 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/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/dma-debug.h b/include/linux/dma-debug.h new file mode 100644 index 000000000000..28d53cb7b5a2 --- /dev/null +++ b/include/linux/dma-debug.h | |||
@@ -0,0 +1,174 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Advanced Micro Devices, Inc. | ||
3 | * | ||
4 | * Author: Joerg Roedel <joerg.roedel@amd.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published | ||
8 | * by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __DMA_DEBUG_H | ||
21 | #define __DMA_DEBUG_H | ||
22 | |||
23 | #include <linux/types.h> | ||
24 | |||
25 | struct device; | ||
26 | struct scatterlist; | ||
27 | struct bus_type; | ||
28 | |||
29 | #ifdef CONFIG_DMA_API_DEBUG | ||
30 | |||
31 | extern void dma_debug_add_bus(struct bus_type *bus); | ||
32 | |||
33 | extern void dma_debug_init(u32 num_entries); | ||
34 | |||
35 | extern void debug_dma_map_page(struct device *dev, struct page *page, | ||
36 | size_t offset, size_t size, | ||
37 | int direction, dma_addr_t dma_addr, | ||
38 | bool map_single); | ||
39 | |||
40 | extern void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, | ||
41 | size_t size, int direction, bool map_single); | ||
42 | |||
43 | extern void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, | ||
44 | int nents, int mapped_ents, int direction); | ||
45 | |||
46 | extern void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, | ||
47 | int nelems, int dir); | ||
48 | |||
49 | extern void debug_dma_alloc_coherent(struct device *dev, size_t size, | ||
50 | dma_addr_t dma_addr, void *virt); | ||
51 | |||
52 | extern void debug_dma_free_coherent(struct device *dev, size_t size, | ||
53 | void *virt, dma_addr_t addr); | ||
54 | |||
55 | extern void debug_dma_sync_single_for_cpu(struct device *dev, | ||
56 | dma_addr_t dma_handle, size_t size, | ||
57 | int direction); | ||
58 | |||
59 | extern void debug_dma_sync_single_for_device(struct device *dev, | ||
60 | dma_addr_t dma_handle, | ||
61 | size_t size, int direction); | ||
62 | |||
63 | extern void debug_dma_sync_single_range_for_cpu(struct device *dev, | ||
64 | dma_addr_t dma_handle, | ||
65 | unsigned long offset, | ||
66 | size_t size, | ||
67 | int direction); | ||
68 | |||
69 | extern void debug_dma_sync_single_range_for_device(struct device *dev, | ||
70 | dma_addr_t dma_handle, | ||
71 | unsigned long offset, | ||
72 | size_t size, int direction); | ||
73 | |||
74 | extern void debug_dma_sync_sg_for_cpu(struct device *dev, | ||
75 | struct scatterlist *sg, | ||
76 | int nelems, int direction); | ||
77 | |||
78 | extern void debug_dma_sync_sg_for_device(struct device *dev, | ||
79 | struct scatterlist *sg, | ||
80 | int nelems, int direction); | ||
81 | |||
82 | extern void debug_dma_dump_mappings(struct device *dev); | ||
83 | |||
84 | #else /* CONFIG_DMA_API_DEBUG */ | ||
85 | |||
86 | static inline void dma_debug_add_bus(struct bus_type *bus) | ||
87 | { | ||
88 | } | ||
89 | |||
90 | static inline void dma_debug_init(u32 num_entries) | ||
91 | { | ||
92 | } | ||
93 | |||
94 | static inline void debug_dma_map_page(struct device *dev, struct page *page, | ||
95 | size_t offset, size_t size, | ||
96 | int direction, dma_addr_t dma_addr, | ||
97 | bool map_single) | ||
98 | { | ||
99 | } | ||
100 | |||
101 | static inline void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, | ||
102 | size_t size, int direction, | ||
103 | bool map_single) | ||
104 | { | ||
105 | } | ||
106 | |||
107 | static inline void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, | ||
108 | int nents, int mapped_ents, int direction) | ||
109 | { | ||
110 | } | ||
111 | |||
112 | static inline void debug_dma_unmap_sg(struct device *dev, | ||
113 | struct scatterlist *sglist, | ||
114 | int nelems, int dir) | ||
115 | { | ||
116 | } | ||
117 | |||
118 | static inline void debug_dma_alloc_coherent(struct device *dev, size_t size, | ||
119 | dma_addr_t dma_addr, void *virt) | ||
120 | { | ||
121 | } | ||
122 | |||
123 | static inline void debug_dma_free_coherent(struct device *dev, size_t size, | ||
124 | void *virt, dma_addr_t addr) | ||
125 | { | ||
126 | } | ||
127 | |||
128 | static inline void debug_dma_sync_single_for_cpu(struct device *dev, | ||
129 | dma_addr_t dma_handle, | ||
130 | size_t size, int direction) | ||
131 | { | ||
132 | } | ||
133 | |||
134 | static inline void debug_dma_sync_single_for_device(struct device *dev, | ||
135 | dma_addr_t dma_handle, | ||
136 | size_t size, int direction) | ||
137 | { | ||
138 | } | ||
139 | |||
140 | static inline void debug_dma_sync_single_range_for_cpu(struct device *dev, | ||
141 | dma_addr_t dma_handle, | ||
142 | unsigned long offset, | ||
143 | size_t size, | ||
144 | int direction) | ||
145 | { | ||
146 | } | ||
147 | |||
148 | static inline void debug_dma_sync_single_range_for_device(struct device *dev, | ||
149 | dma_addr_t dma_handle, | ||
150 | unsigned long offset, | ||
151 | size_t size, | ||
152 | int direction) | ||
153 | { | ||
154 | } | ||
155 | |||
156 | static inline void debug_dma_sync_sg_for_cpu(struct device *dev, | ||
157 | struct scatterlist *sg, | ||
158 | int nelems, int direction) | ||
159 | { | ||
160 | } | ||
161 | |||
162 | static inline void debug_dma_sync_sg_for_device(struct device *dev, | ||
163 | struct scatterlist *sg, | ||
164 | int nelems, int direction) | ||
165 | { | ||
166 | } | ||
167 | |||
168 | static inline void debug_dma_dump_mappings(struct device *dev) | ||
169 | { | ||
170 | } | ||
171 | |||
172 | #endif /* CONFIG_DMA_API_DEBUG */ | ||
173 | |||
174 | #endif /* __DMA_DEBUG_H */ | ||
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index ba9114ec5d3a..d7d090d21031 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #include <linux/device.h> | 4 | #include <linux/device.h> |
5 | #include <linux/err.h> | 5 | #include <linux/err.h> |
6 | #include <linux/dma-attrs.h> | ||
7 | #include <linux/scatterlist.h> | ||
6 | 8 | ||
7 | /* These definitions mirror those in pci.h, so they can be used | 9 | /* These definitions mirror those in pci.h, so they can be used |
8 | * interchangeably with their PCI_ counterparts */ | 10 | * interchangeably with their PCI_ counterparts */ |
@@ -13,6 +15,52 @@ enum dma_data_direction { | |||
13 | DMA_NONE = 3, | 15 | DMA_NONE = 3, |
14 | }; | 16 | }; |
15 | 17 | ||
18 | struct dma_map_ops { | ||
19 | void* (*alloc_coherent)(struct device *dev, size_t size, | ||
20 | dma_addr_t *dma_handle, gfp_t gfp); | ||
21 | void (*free_coherent)(struct device *dev, size_t size, | ||
22 | void *vaddr, dma_addr_t dma_handle); | ||
23 | dma_addr_t (*map_page)(struct device *dev, struct page *page, | ||
24 | unsigned long offset, size_t size, | ||
25 | enum dma_data_direction dir, | ||
26 | struct dma_attrs *attrs); | ||
27 | void (*unmap_page)(struct device *dev, dma_addr_t dma_handle, | ||
28 | size_t size, enum dma_data_direction dir, | ||
29 | struct dma_attrs *attrs); | ||
30 | int (*map_sg)(struct device *dev, struct scatterlist *sg, | ||
31 | int nents, enum dma_data_direction dir, | ||
32 | struct dma_attrs *attrs); | ||
33 | void (*unmap_sg)(struct device *dev, | ||
34 | struct scatterlist *sg, int nents, | ||
35 | enum dma_data_direction dir, | ||
36 | struct dma_attrs *attrs); | ||
37 | void (*sync_single_for_cpu)(struct device *dev, | ||
38 | dma_addr_t dma_handle, size_t size, | ||
39 | enum dma_data_direction dir); | ||
40 | void (*sync_single_for_device)(struct device *dev, | ||
41 | dma_addr_t dma_handle, size_t size, | ||
42 | enum dma_data_direction dir); | ||
43 | void (*sync_single_range_for_cpu)(struct device *dev, | ||
44 | dma_addr_t dma_handle, | ||
45 | unsigned long offset, | ||
46 | size_t size, | ||
47 | enum dma_data_direction dir); | ||
48 | void (*sync_single_range_for_device)(struct device *dev, | ||
49 | dma_addr_t dma_handle, | ||
50 | unsigned long offset, | ||
51 | size_t size, | ||
52 | enum dma_data_direction dir); | ||
53 | void (*sync_sg_for_cpu)(struct device *dev, | ||
54 | struct scatterlist *sg, int nents, | ||
55 | enum dma_data_direction dir); | ||
56 | void (*sync_sg_for_device)(struct device *dev, | ||
57 | struct scatterlist *sg, int nents, | ||
58 | enum dma_data_direction dir); | ||
59 | int (*mapping_error)(struct device *dev, dma_addr_t dma_addr); | ||
60 | int (*dma_supported)(struct device *dev, u64 mask); | ||
61 | int is_phys; | ||
62 | }; | ||
63 | |||
16 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) | 64 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) |
17 | 65 | ||
18 | /* | 66 | /* |
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index f28440784cf0..2f3427468956 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
@@ -24,10 +24,10 @@ | |||
24 | #include <linux/acpi.h> | 24 | #include <linux/acpi.h> |
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/msi.h> | 26 | #include <linux/msi.h> |
27 | #include <linux/irqreturn.h> | ||
27 | 28 | ||
28 | #if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP) | ||
29 | struct intel_iommu; | 29 | struct intel_iommu; |
30 | 30 | #if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP) | |
31 | struct dmar_drhd_unit { | 31 | struct dmar_drhd_unit { |
32 | struct list_head list; /* list of drhd units */ | 32 | struct list_head list; /* list of drhd units */ |
33 | struct acpi_dmar_header *hdr; /* ACPI header */ | 33 | struct acpi_dmar_header *hdr; /* ACPI header */ |
@@ -49,7 +49,7 @@ extern int dmar_dev_scope_init(void); | |||
49 | 49 | ||
50 | /* Intel IOMMU detection */ | 50 | /* Intel IOMMU detection */ |
51 | extern void detect_intel_iommu(void); | 51 | extern void detect_intel_iommu(void); |
52 | 52 | extern int enable_drhd_fault_handling(void); | |
53 | 53 | ||
54 | extern int parse_ioapics_under_ir(void); | 54 | extern int parse_ioapics_under_ir(void); |
55 | extern int alloc_iommu(struct dmar_drhd_unit *); | 55 | extern int alloc_iommu(struct dmar_drhd_unit *); |
@@ -63,12 +63,12 @@ static inline int dmar_table_init(void) | |||
63 | { | 63 | { |
64 | return -ENODEV; | 64 | return -ENODEV; |
65 | } | 65 | } |
66 | static inline int enable_drhd_fault_handling(void) | ||
67 | { | ||
68 | return -1; | ||
69 | } | ||
66 | #endif /* !CONFIG_DMAR && !CONFIG_INTR_REMAP */ | 70 | #endif /* !CONFIG_DMAR && !CONFIG_INTR_REMAP */ |
67 | 71 | ||
68 | #ifdef CONFIG_INTR_REMAP | ||
69 | extern int intr_remapping_enabled; | ||
70 | extern int enable_intr_remapping(int); | ||
71 | |||
72 | struct irte { | 72 | struct irte { |
73 | union { | 73 | union { |
74 | struct { | 74 | struct { |
@@ -97,6 +97,10 @@ struct irte { | |||
97 | __u64 high; | 97 | __u64 high; |
98 | }; | 98 | }; |
99 | }; | 99 | }; |
100 | #ifdef CONFIG_INTR_REMAP | ||
101 | extern int intr_remapping_enabled; | ||
102 | extern int enable_intr_remapping(int); | ||
103 | |||
100 | extern int get_irte(int irq, struct irte *entry); | 104 | extern int get_irte(int irq, struct irte *entry); |
101 | extern int modify_irte(int irq, struct irte *irte_modified); | 105 | extern int modify_irte(int irq, struct irte *irte_modified); |
102 | extern int alloc_irte(struct intel_iommu *iommu, int irq, u16 count); | 106 | extern int alloc_irte(struct intel_iommu *iommu, int irq, u16 count); |
@@ -111,14 +115,40 @@ extern int irq_remapped(int irq); | |||
111 | extern struct intel_iommu *map_dev_to_ir(struct pci_dev *dev); | 115 | extern struct intel_iommu *map_dev_to_ir(struct pci_dev *dev); |
112 | extern struct intel_iommu *map_ioapic_to_ir(int apic); | 116 | extern struct intel_iommu *map_ioapic_to_ir(int apic); |
113 | #else | 117 | #else |
118 | static inline int alloc_irte(struct intel_iommu *iommu, int irq, u16 count) | ||
119 | { | ||
120 | return -1; | ||
121 | } | ||
122 | static inline int modify_irte(int irq, struct irte *irte_modified) | ||
123 | { | ||
124 | return -1; | ||
125 | } | ||
126 | static inline int free_irte(int irq) | ||
127 | { | ||
128 | return -1; | ||
129 | } | ||
130 | static inline int map_irq_to_irte_handle(int irq, u16 *sub_handle) | ||
131 | { | ||
132 | return -1; | ||
133 | } | ||
134 | static inline int set_irte_irq(int irq, struct intel_iommu *iommu, u16 index, | ||
135 | u16 sub_handle) | ||
136 | { | ||
137 | return -1; | ||
138 | } | ||
139 | static inline struct intel_iommu *map_dev_to_ir(struct pci_dev *dev) | ||
140 | { | ||
141 | return NULL; | ||
142 | } | ||
143 | static inline struct intel_iommu *map_ioapic_to_ir(int apic) | ||
144 | { | ||
145 | return NULL; | ||
146 | } | ||
114 | #define irq_remapped(irq) (0) | 147 | #define irq_remapped(irq) (0) |
115 | #define enable_intr_remapping(mode) (-1) | 148 | #define enable_intr_remapping(mode) (-1) |
116 | #define intr_remapping_enabled (0) | 149 | #define intr_remapping_enabled (0) |
117 | #endif | 150 | #endif |
118 | 151 | ||
119 | #ifdef CONFIG_DMAR | ||
120 | extern const char *dmar_get_fault_reason(u8 fault_reason); | ||
121 | |||
122 | /* Can't use the common MSI interrupt functions | 152 | /* Can't use the common MSI interrupt functions |
123 | * since DMAR is not a pci device | 153 | * since DMAR is not a pci device |
124 | */ | 154 | */ |
@@ -127,8 +157,10 @@ extern void dmar_msi_mask(unsigned int irq); | |||
127 | extern void dmar_msi_read(int irq, struct msi_msg *msg); | 157 | extern void dmar_msi_read(int irq, struct msi_msg *msg); |
128 | extern void dmar_msi_write(int irq, struct msi_msg *msg); | 158 | extern void dmar_msi_write(int irq, struct msi_msg *msg); |
129 | extern int dmar_set_interrupt(struct intel_iommu *iommu); | 159 | extern int dmar_set_interrupt(struct intel_iommu *iommu); |
160 | extern irqreturn_t dmar_fault(int irq, void *dev_id); | ||
130 | extern int arch_setup_dmar_msi(unsigned int irq); | 161 | extern int arch_setup_dmar_msi(unsigned int irq); |
131 | 162 | ||
163 | #ifdef CONFIG_DMAR | ||
132 | extern int iommu_detected, no_iommu; | 164 | extern int iommu_detected, no_iommu; |
133 | extern struct list_head dmar_rmrr_units; | 165 | extern struct list_head dmar_rmrr_units; |
134 | struct dmar_rmrr_unit { | 166 | struct dmar_rmrr_unit { |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index d741b9ceb0e0..bb5489c82c99 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -47,7 +47,8 @@ extern int dmi_get_year(int field); | |||
47 | extern int dmi_name_in_vendors(const char *str); | 47 | extern int dmi_name_in_vendors(const char *str); |
48 | extern int dmi_name_in_serial(const char *str); | 48 | extern int dmi_name_in_serial(const char *str); |
49 | extern int dmi_available; | 49 | extern int dmi_available; |
50 | extern int dmi_walk(void (*decode)(const struct dmi_header *)); | 50 | extern int dmi_walk(void (*decode)(const struct dmi_header *, void *), |
51 | void *private_data); | ||
51 | extern bool dmi_match(enum dmi_field f, const char *str); | 52 | extern bool dmi_match(enum dmi_field f, const char *str); |
52 | 53 | ||
53 | #else | 54 | #else |
@@ -61,8 +62,8 @@ static inline int dmi_get_year(int year) { return 0; } | |||
61 | static inline int dmi_name_in_vendors(const char *s) { return 0; } | 62 | static inline int dmi_name_in_vendors(const char *s) { return 0; } |
62 | static inline int dmi_name_in_serial(const char *s) { return 0; } | 63 | static inline int dmi_name_in_serial(const char *s) { return 0; } |
63 | #define dmi_available 0 | 64 | #define dmi_available 0 |
64 | static inline int dmi_walk(void (*decode)(const struct dmi_header *)) | 65 | static inline int dmi_walk(void (*decode)(const struct dmi_header *, void *), |
65 | { return -1; } | 66 | void *private_data) { return -1; } |
66 | static inline bool dmi_match(enum dmi_field f, const char *str) | 67 | static inline bool dmi_match(enum dmi_field f, const char *str) |
67 | { return false; } | 68 | { return false; } |
68 | static inline const struct dmi_system_id * | 69 | static inline const struct dmi_system_id * |
diff --git a/include/linux/dvb/audio.h b/include/linux/dvb/audio.h index bb0df2aaebfa..fec66bd24f22 100644 --- a/include/linux/dvb/audio.h +++ b/include/linux/dvb/audio.h | |||
@@ -76,7 +76,7 @@ struct audio_karaoke{ /* if Vocal1 or Vocal2 are non-zero, they get mixed */ | |||
76 | } audio_karaoke_t; /* into left and right */ | 76 | } audio_karaoke_t; /* into left and right */ |
77 | 77 | ||
78 | 78 | ||
79 | typedef uint16_t audio_attributes_t; | 79 | typedef __u16 audio_attributes_t; |
80 | /* bits: descr. */ | 80 | /* bits: descr. */ |
81 | /* 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, */ |
82 | /* 12 multichannel extension */ | 82 | /* 12 multichannel extension */ |
diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index bd49c3ebf916..1d750c0fd86e 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h | |||
@@ -132,12 +132,12 @@ struct video_command { | |||
132 | #define VIDEO_VSYNC_FIELD_PROGRESSIVE (3) | 132 | #define VIDEO_VSYNC_FIELD_PROGRESSIVE (3) |
133 | 133 | ||
134 | struct video_event { | 134 | struct video_event { |
135 | int32_t type; | 135 | __s32 type; |
136 | #define VIDEO_EVENT_SIZE_CHANGED 1 | 136 | #define VIDEO_EVENT_SIZE_CHANGED 1 |
137 | #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 | 137 | #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 |
138 | #define VIDEO_EVENT_DECODER_STOPPED 3 | 138 | #define VIDEO_EVENT_DECODER_STOPPED 3 |
139 | #define VIDEO_EVENT_VSYNC 4 | 139 | #define VIDEO_EVENT_VSYNC 4 |
140 | time_t timestamp; | 140 | __kernel_time_t timestamp; |
141 | union { | 141 | union { |
142 | video_size_t size; | 142 | video_size_t size; |
143 | unsigned int frame_rate; /* in frames per 1000sec */ | 143 | unsigned int frame_rate; /* in frames per 1000sec */ |
@@ -157,25 +157,25 @@ struct video_status { | |||
157 | 157 | ||
158 | struct video_still_picture { | 158 | struct video_still_picture { |
159 | char __user *iFrame; /* pointer to a single iframe in memory */ | 159 | char __user *iFrame; /* pointer to a single iframe in memory */ |
160 | int32_t size; | 160 | __s32 size; |
161 | }; | 161 | }; |
162 | 162 | ||
163 | 163 | ||
164 | typedef | 164 | typedef |
165 | struct video_highlight { | 165 | struct video_highlight { |
166 | int active; /* 1=show highlight, 0=hide highlight */ | 166 | int active; /* 1=show highlight, 0=hide highlight */ |
167 | uint8_t contrast1; /* 7- 4 Pattern pixel contrast */ | 167 | __u8 contrast1; /* 7- 4 Pattern pixel contrast */ |
168 | /* 3- 0 Background pixel contrast */ | 168 | /* 3- 0 Background pixel contrast */ |
169 | uint8_t contrast2; /* 7- 4 Emphasis pixel-2 contrast */ | 169 | __u8 contrast2; /* 7- 4 Emphasis pixel-2 contrast */ |
170 | /* 3- 0 Emphasis pixel-1 contrast */ | 170 | /* 3- 0 Emphasis pixel-1 contrast */ |
171 | uint8_t color1; /* 7- 4 Pattern pixel color */ | 171 | __u8 color1; /* 7- 4 Pattern pixel color */ |
172 | /* 3- 0 Background pixel color */ | 172 | /* 3- 0 Background pixel color */ |
173 | uint8_t color2; /* 7- 4 Emphasis pixel-2 color */ | 173 | __u8 color2; /* 7- 4 Emphasis pixel-2 color */ |
174 | /* 3- 0 Emphasis pixel-1 color */ | 174 | /* 3- 0 Emphasis pixel-1 color */ |
175 | uint32_t ypos; /* 23-22 auto action mode */ | 175 | __u32 ypos; /* 23-22 auto action mode */ |
176 | /* 21-12 start y */ | 176 | /* 21-12 start y */ |
177 | /* 9- 0 end y */ | 177 | /* 9- 0 end y */ |
178 | uint32_t xpos; /* 23-22 button color number */ | 178 | __u32 xpos; /* 23-22 button color number */ |
179 | /* 21-12 start x */ | 179 | /* 21-12 start x */ |
180 | /* 9- 0 end x */ | 180 | /* 9- 0 end x */ |
181 | } video_highlight_t; | 181 | } video_highlight_t; |
@@ -189,17 +189,17 @@ typedef struct video_spu { | |||
189 | 189 | ||
190 | typedef struct video_spu_palette { /* SPU Palette information */ | 190 | typedef struct video_spu_palette { /* SPU Palette information */ |
191 | int length; | 191 | int length; |
192 | uint8_t __user *palette; | 192 | __u8 __user *palette; |
193 | } video_spu_palette_t; | 193 | } video_spu_palette_t; |
194 | 194 | ||
195 | 195 | ||
196 | typedef struct video_navi_pack { | 196 | typedef struct video_navi_pack { |
197 | int length; /* 0 ... 1024 */ | 197 | int length; /* 0 ... 1024 */ |
198 | uint8_t data[1024]; | 198 | __u8 data[1024]; |
199 | } video_navi_pack_t; | 199 | } video_navi_pack_t; |
200 | 200 | ||
201 | 201 | ||
202 | typedef uint16_t video_attributes_t; | 202 | typedef __u16 video_attributes_t; |
203 | /* bits: descr. */ | 203 | /* bits: descr. */ |
204 | /* 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */ | 204 | /* 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */ |
205 | /* 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/errqueue.h b/include/linux/errqueue.h index ceb1454b6977..ec12cc74366f 100644 --- a/include/linux/errqueue.h +++ b/include/linux/errqueue.h | |||
@@ -18,6 +18,7 @@ struct sock_extended_err | |||
18 | #define SO_EE_ORIGIN_LOCAL 1 | 18 | #define SO_EE_ORIGIN_LOCAL 1 |
19 | #define SO_EE_ORIGIN_ICMP 2 | 19 | #define SO_EE_ORIGIN_ICMP 2 |
20 | #define SO_EE_ORIGIN_ICMP6 3 | 20 | #define SO_EE_ORIGIN_ICMP6 3 |
21 | #define SO_EE_ORIGIN_TIMESTAMPING 4 | ||
21 | 22 | ||
22 | #define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1)) | 23 | #define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1)) |
23 | 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/eventfd.h b/include/linux/eventfd.h index a667637b54e3..f45a8ae5f828 100644 --- a/include/linux/eventfd.h +++ b/include/linux/eventfd.h | |||
@@ -13,10 +13,20 @@ | |||
13 | /* For O_CLOEXEC and O_NONBLOCK */ | 13 | /* For O_CLOEXEC and O_NONBLOCK */ |
14 | #include <linux/fcntl.h> | 14 | #include <linux/fcntl.h> |
15 | 15 | ||
16 | /* Flags for eventfd2. */ | 16 | /* |
17 | * CAREFUL: Check include/asm-generic/fcntl.h when defining | ||
18 | * new flags, since they might collide with O_* ones. We want | ||
19 | * to re-use O_* flags that couldn't possibly have a meaning | ||
20 | * from eventfd, in order to leave a free define-space for | ||
21 | * shared O_* flags. | ||
22 | */ | ||
23 | #define EFD_SEMAPHORE (1 << 0) | ||
17 | #define EFD_CLOEXEC O_CLOEXEC | 24 | #define EFD_CLOEXEC O_CLOEXEC |
18 | #define EFD_NONBLOCK O_NONBLOCK | 25 | #define EFD_NONBLOCK O_NONBLOCK |
19 | 26 | ||
27 | #define EFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK) | ||
28 | #define EFD_FLAGS_SET (EFD_SHARED_FCNTL_FLAGS | EFD_SEMAPHORE) | ||
29 | |||
20 | struct file *eventfd_fget(int fd); | 30 | struct file *eventfd_fget(int fd); |
21 | int eventfd_signal(struct file *file, int n); | 31 | int eventfd_signal(struct file *file, int n); |
22 | 32 | ||
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 31527e17076b..f563c5013932 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -123,6 +123,7 @@ struct dentry; | |||
123 | #define FB_ACCEL_TRIDENT_3DIMAGE 51 /* Trident 3DImage */ | 123 | #define FB_ACCEL_TRIDENT_3DIMAGE 51 /* Trident 3DImage */ |
124 | #define FB_ACCEL_TRIDENT_BLADE3D 52 /* Trident Blade3D */ | 124 | #define FB_ACCEL_TRIDENT_BLADE3D 52 /* Trident Blade3D */ |
125 | #define FB_ACCEL_TRIDENT_BLADEXP 53 /* Trident BladeXP */ | 125 | #define FB_ACCEL_TRIDENT_BLADEXP 53 /* Trident BladeXP */ |
126 | #define FB_ACCEL_CIRRUS_ALPINE 53 /* Cirrus Logic 543x/544x/5480 */ | ||
126 | #define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ | 127 | #define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ |
127 | #define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ | 128 | #define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ |
128 | #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ | 129 | #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ |
@@ -960,15 +961,7 @@ extern struct fb_info *registered_fb[FB_MAX]; | |||
960 | extern int num_registered_fb; | 961 | extern int num_registered_fb; |
961 | extern struct class *fb_class; | 962 | extern struct class *fb_class; |
962 | 963 | ||
963 | static inline int lock_fb_info(struct fb_info *info) | 964 | extern 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 | 965 | ||
973 | static inline void unlock_fb_info(struct fb_info *info) | 966 | static inline void unlock_fb_info(struct fb_info *info) |
974 | { | 967 | { |
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 4d078e99c017..c6b3ca3af6df 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
@@ -25,10 +25,12 @@ | |||
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/firewire-constants.h> | 26 | #include <linux/firewire-constants.h> |
27 | 27 | ||
28 | #define FW_CDEV_EVENT_BUS_RESET 0x00 | 28 | #define FW_CDEV_EVENT_BUS_RESET 0x00 |
29 | #define FW_CDEV_EVENT_RESPONSE 0x01 | 29 | #define FW_CDEV_EVENT_RESPONSE 0x01 |
30 | #define FW_CDEV_EVENT_REQUEST 0x02 | 30 | #define FW_CDEV_EVENT_REQUEST 0x02 |
31 | #define FW_CDEV_EVENT_ISO_INTERRUPT 0x03 | 31 | #define FW_CDEV_EVENT_ISO_INTERRUPT 0x03 |
32 | #define FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED 0x04 | ||
33 | #define FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED 0x05 | ||
32 | 34 | ||
33 | /** | 35 | /** |
34 | * struct fw_cdev_event_common - Common part of all fw_cdev_event_ types | 36 | * struct fw_cdev_event_common - Common part of all fw_cdev_event_ types |
@@ -136,7 +138,24 @@ struct fw_cdev_event_request { | |||
136 | * This event is sent when the controller has completed an &fw_cdev_iso_packet | 138 | * This event is sent when the controller has completed an &fw_cdev_iso_packet |
137 | * with the %FW_CDEV_ISO_INTERRUPT bit set. In the receive case, the headers | 139 | * with the %FW_CDEV_ISO_INTERRUPT bit set. In the receive case, the headers |
138 | * stripped of all packets up until and including the interrupt packet are | 140 | * stripped of all packets up until and including the interrupt packet are |
139 | * returned in the @header field. | 141 | * returned in the @header field. The amount of header data per packet is as |
142 | * specified at iso context creation by &fw_cdev_create_iso_context.header_size. | ||
143 | * | ||
144 | * In version 1 of this ABI, header data consisted of the 1394 isochronous | ||
145 | * packet header, followed by quadlets from the packet payload if | ||
146 | * &fw_cdev_create_iso_context.header_size > 4. | ||
147 | * | ||
148 | * In version 2 of this ABI, header data consist of the 1394 isochronous | ||
149 | * packet header, followed by a timestamp quadlet if | ||
150 | * &fw_cdev_create_iso_context.header_size > 4, followed by quadlets from the | ||
151 | * packet payload if &fw_cdev_create_iso_context.header_size > 8. | ||
152 | * | ||
153 | * Behaviour of ver. 1 of this ABI is no longer available since ABI ver. 2. | ||
154 | * | ||
155 | * Format of 1394 iso packet header: 16 bits len, 2 bits tag, 6 bits channel, | ||
156 | * 4 bits tcode, 4 bits sy, in big endian byte order. Format of timestamp: | ||
157 | * 16 bits invalid, 3 bits cycleSeconds, 13 bits cycleCount, in big endian byte | ||
158 | * order. | ||
140 | */ | 159 | */ |
141 | struct fw_cdev_event_iso_interrupt { | 160 | struct fw_cdev_event_iso_interrupt { |
142 | __u64 closure; | 161 | __u64 closure; |
@@ -147,12 +166,44 @@ struct fw_cdev_event_iso_interrupt { | |||
147 | }; | 166 | }; |
148 | 167 | ||
149 | /** | 168 | /** |
169 | * struct fw_cdev_event_iso_resource - Iso resources were allocated or freed | ||
170 | * @closure: See &fw_cdev_event_common; | ||
171 | * set by %FW_CDEV_IOC_(DE)ALLOCATE_ISO_RESOURCE(_ONCE) ioctl | ||
172 | * @type: %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED or | ||
173 | * %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED | ||
174 | * @handle: Reference by which an allocated resource can be deallocated | ||
175 | * @channel: Isochronous channel which was (de)allocated, if any | ||
176 | * @bandwidth: Bandwidth allocation units which were (de)allocated, if any | ||
177 | * | ||
178 | * An %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED event is sent after an isochronous | ||
179 | * resource was allocated at the IRM. The client has to check @channel and | ||
180 | * @bandwidth for whether the allocation actually succeeded. | ||
181 | * | ||
182 | * An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event is sent after an isochronous | ||
183 | * resource was deallocated at the IRM. It is also sent when automatic | ||
184 | * reallocation after a bus reset failed. | ||
185 | * | ||
186 | * @channel is <0 if no channel was (de)allocated or if reallocation failed. | ||
187 | * @bandwidth is 0 if no bandwidth was (de)allocated or if reallocation failed. | ||
188 | */ | ||
189 | struct fw_cdev_event_iso_resource { | ||
190 | __u64 closure; | ||
191 | __u32 type; | ||
192 | __u32 handle; | ||
193 | __s32 channel; | ||
194 | __s32 bandwidth; | ||
195 | }; | ||
196 | |||
197 | /** | ||
150 | * union fw_cdev_event - Convenience union of fw_cdev_event_ types | 198 | * union fw_cdev_event - Convenience union of fw_cdev_event_ types |
151 | * @common: Valid for all types | 199 | * @common: Valid for all types |
152 | * @bus_reset: Valid if @common.type == %FW_CDEV_EVENT_BUS_RESET | 200 | * @bus_reset: Valid if @common.type == %FW_CDEV_EVENT_BUS_RESET |
153 | * @response: Valid if @common.type == %FW_CDEV_EVENT_RESPONSE | 201 | * @response: Valid if @common.type == %FW_CDEV_EVENT_RESPONSE |
154 | * @request: Valid if @common.type == %FW_CDEV_EVENT_REQUEST | 202 | * @request: Valid if @common.type == %FW_CDEV_EVENT_REQUEST |
155 | * @iso_interrupt: Valid if @common.type == %FW_CDEV_EVENT_ISO_INTERRUPT | 203 | * @iso_interrupt: Valid if @common.type == %FW_CDEV_EVENT_ISO_INTERRUPT |
204 | * @iso_resource: Valid if @common.type == | ||
205 | * %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED or | ||
206 | * %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED | ||
156 | * | 207 | * |
157 | * Convenience union for userspace use. Events could be read(2) into an | 208 | * Convenience union for userspace use. Events could be read(2) into an |
158 | * appropriately aligned char buffer and then cast to this union for further | 209 | * appropriately aligned char buffer and then cast to this union for further |
@@ -163,33 +214,47 @@ struct fw_cdev_event_iso_interrupt { | |||
163 | * not fit will be discarded so that the next read(2) will return a new event. | 214 | * not fit will be discarded so that the next read(2) will return a new event. |
164 | */ | 215 | */ |
165 | union fw_cdev_event { | 216 | union fw_cdev_event { |
166 | struct fw_cdev_event_common common; | 217 | struct fw_cdev_event_common common; |
167 | struct fw_cdev_event_bus_reset bus_reset; | 218 | struct fw_cdev_event_bus_reset bus_reset; |
168 | struct fw_cdev_event_response response; | 219 | struct fw_cdev_event_response response; |
169 | struct fw_cdev_event_request request; | 220 | struct fw_cdev_event_request request; |
170 | struct fw_cdev_event_iso_interrupt iso_interrupt; | 221 | struct fw_cdev_event_iso_interrupt iso_interrupt; |
222 | struct fw_cdev_event_iso_resource iso_resource; | ||
171 | }; | 223 | }; |
172 | 224 | ||
173 | #define FW_CDEV_IOC_GET_INFO _IOWR('#', 0x00, struct fw_cdev_get_info) | 225 | /* available since kernel version 2.6.22 */ |
174 | #define FW_CDEV_IOC_SEND_REQUEST _IOW('#', 0x01, struct fw_cdev_send_request) | 226 | #define FW_CDEV_IOC_GET_INFO _IOWR('#', 0x00, struct fw_cdev_get_info) |
175 | #define FW_CDEV_IOC_ALLOCATE _IOWR('#', 0x02, struct fw_cdev_allocate) | 227 | #define FW_CDEV_IOC_SEND_REQUEST _IOW('#', 0x01, struct fw_cdev_send_request) |
176 | #define FW_CDEV_IOC_DEALLOCATE _IOW('#', 0x03, struct fw_cdev_deallocate) | 228 | #define FW_CDEV_IOC_ALLOCATE _IOWR('#', 0x02, struct fw_cdev_allocate) |
177 | #define FW_CDEV_IOC_SEND_RESPONSE _IOW('#', 0x04, struct fw_cdev_send_response) | 229 | #define FW_CDEV_IOC_DEALLOCATE _IOW('#', 0x03, struct fw_cdev_deallocate) |
178 | #define FW_CDEV_IOC_INITIATE_BUS_RESET _IOW('#', 0x05, struct fw_cdev_initiate_bus_reset) | 230 | #define FW_CDEV_IOC_SEND_RESPONSE _IOW('#', 0x04, struct fw_cdev_send_response) |
179 | #define FW_CDEV_IOC_ADD_DESCRIPTOR _IOWR('#', 0x06, struct fw_cdev_add_descriptor) | 231 | #define FW_CDEV_IOC_INITIATE_BUS_RESET _IOW('#', 0x05, struct fw_cdev_initiate_bus_reset) |
180 | #define FW_CDEV_IOC_REMOVE_DESCRIPTOR _IOW('#', 0x07, struct fw_cdev_remove_descriptor) | 232 | #define FW_CDEV_IOC_ADD_DESCRIPTOR _IOWR('#', 0x06, struct fw_cdev_add_descriptor) |
233 | #define FW_CDEV_IOC_REMOVE_DESCRIPTOR _IOW('#', 0x07, struct fw_cdev_remove_descriptor) | ||
234 | #define FW_CDEV_IOC_CREATE_ISO_CONTEXT _IOWR('#', 0x08, struct fw_cdev_create_iso_context) | ||
235 | #define FW_CDEV_IOC_QUEUE_ISO _IOWR('#', 0x09, struct fw_cdev_queue_iso) | ||
236 | #define FW_CDEV_IOC_START_ISO _IOW('#', 0x0a, struct fw_cdev_start_iso) | ||
237 | #define FW_CDEV_IOC_STOP_ISO _IOW('#', 0x0b, struct fw_cdev_stop_iso) | ||
181 | 238 | ||
182 | #define FW_CDEV_IOC_CREATE_ISO_CONTEXT _IOWR('#', 0x08, struct fw_cdev_create_iso_context) | 239 | /* available since kernel version 2.6.24 */ |
183 | #define FW_CDEV_IOC_QUEUE_ISO _IOWR('#', 0x09, struct fw_cdev_queue_iso) | 240 | #define FW_CDEV_IOC_GET_CYCLE_TIMER _IOR('#', 0x0c, struct fw_cdev_get_cycle_timer) |
184 | #define FW_CDEV_IOC_START_ISO _IOW('#', 0x0a, struct fw_cdev_start_iso) | ||
185 | #define FW_CDEV_IOC_STOP_ISO _IOW('#', 0x0b, struct fw_cdev_stop_iso) | ||
186 | #define FW_CDEV_IOC_GET_CYCLE_TIMER _IOR('#', 0x0c, struct fw_cdev_get_cycle_timer) | ||
187 | 241 | ||
188 | /* FW_CDEV_VERSION History | 242 | /* available since kernel version 2.6.30 */ |
189 | * | 243 | #define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE _IOWR('#', 0x0d, struct fw_cdev_allocate_iso_resource) |
190 | * 1 Feb 18, 2007: Initial version. | 244 | #define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE _IOW('#', 0x0e, struct fw_cdev_deallocate) |
245 | #define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x0f, struct fw_cdev_allocate_iso_resource) | ||
246 | #define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x10, struct fw_cdev_allocate_iso_resource) | ||
247 | #define FW_CDEV_IOC_GET_SPEED _IO('#', 0x11) /* returns speed code */ | ||
248 | #define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request) | ||
249 | #define FW_CDEV_IOC_SEND_STREAM_PACKET _IOW('#', 0x13, struct fw_cdev_send_stream_packet) | ||
250 | |||
251 | /* | ||
252 | * FW_CDEV_VERSION History | ||
253 | * 1 (2.6.22) - initial version | ||
254 | * 2 (2.6.30) - changed &fw_cdev_event_iso_interrupt.header if | ||
255 | * &fw_cdev_create_iso_context.header_size is 8 or more | ||
191 | */ | 256 | */ |
192 | #define FW_CDEV_VERSION 1 | 257 | #define FW_CDEV_VERSION 2 |
193 | 258 | ||
194 | /** | 259 | /** |
195 | * struct fw_cdev_get_info - General purpose information ioctl | 260 | * struct fw_cdev_get_info - General purpose information ioctl |
@@ -201,7 +266,7 @@ union fw_cdev_event { | |||
201 | * case, @rom_length is updated with the actual length of the | 266 | * case, @rom_length is updated with the actual length of the |
202 | * configuration ROM. | 267 | * configuration ROM. |
203 | * @rom: If non-zero, address of a buffer to be filled by a copy of the | 268 | * @rom: If non-zero, address of a buffer to be filled by a copy of the |
204 | * local node's configuration ROM | 269 | * device's configuration ROM |
205 | * @bus_reset: If non-zero, address of a buffer to be filled by a | 270 | * @bus_reset: If non-zero, address of a buffer to be filled by a |
206 | * &struct fw_cdev_event_bus_reset with the current state | 271 | * &struct fw_cdev_event_bus_reset with the current state |
207 | * of the bus. This does not cause a bus reset to happen. | 272 | * of the bus. This does not cause a bus reset to happen. |
@@ -229,7 +294,7 @@ struct fw_cdev_get_info { | |||
229 | * Send a request to the device. This ioctl implements all outgoing requests. | 294 | * Send a request to the device. This ioctl implements all outgoing requests. |
230 | * Both quadlet and block request specify the payload as a pointer to the data | 295 | * Both quadlet and block request specify the payload as a pointer to the data |
231 | * in the @data field. Once the transaction completes, the kernel writes an | 296 | * in the @data field. Once the transaction completes, the kernel writes an |
232 | * &fw_cdev_event_request event back. The @closure field is passed back to | 297 | * &fw_cdev_event_response event back. The @closure field is passed back to |
233 | * user space in the response event. | 298 | * user space in the response event. |
234 | */ | 299 | */ |
235 | struct fw_cdev_send_request { | 300 | struct fw_cdev_send_request { |
@@ -284,9 +349,9 @@ struct fw_cdev_allocate { | |||
284 | }; | 349 | }; |
285 | 350 | ||
286 | /** | 351 | /** |
287 | * struct fw_cdev_deallocate - Free an address range allocation | 352 | * struct fw_cdev_deallocate - Free a CSR address range or isochronous resource |
288 | * @handle: Handle to the address range, as returned by the kernel when the | 353 | * @handle: Handle to the address range or iso resource, as returned by the |
289 | * range was allocated | 354 | * kernel when the range or resource was allocated |
290 | */ | 355 | */ |
291 | struct fw_cdev_deallocate { | 356 | struct fw_cdev_deallocate { |
292 | __u32 handle; | 357 | __u32 handle; |
@@ -329,6 +394,9 @@ struct fw_cdev_initiate_bus_reset { | |||
329 | * If successful, the kernel adds the descriptor and writes back a handle to the | 394 | * If successful, the kernel adds the descriptor and writes back a handle to the |
330 | * kernel-side object to be used for later removal of the descriptor block and | 395 | * kernel-side object to be used for later removal of the descriptor block and |
331 | * immediate key. | 396 | * immediate key. |
397 | * | ||
398 | * This ioctl affects the configuration ROMs of all local nodes. | ||
399 | * The ioctl only succeeds on device files which represent a local node. | ||
332 | */ | 400 | */ |
333 | struct fw_cdev_add_descriptor { | 401 | struct fw_cdev_add_descriptor { |
334 | __u32 immediate; | 402 | __u32 immediate; |
@@ -344,7 +412,7 @@ struct fw_cdev_add_descriptor { | |||
344 | * descriptor was added | 412 | * descriptor was added |
345 | * | 413 | * |
346 | * Remove a descriptor block and accompanying immediate key from the local | 414 | * Remove a descriptor block and accompanying immediate key from the local |
347 | * node's configuration ROM. | 415 | * nodes' configuration ROMs. |
348 | */ | 416 | */ |
349 | struct fw_cdev_remove_descriptor { | 417 | struct fw_cdev_remove_descriptor { |
350 | __u32 handle; | 418 | __u32 handle; |
@@ -370,6 +438,9 @@ struct fw_cdev_remove_descriptor { | |||
370 | * | 438 | * |
371 | * If a context was successfully created, the kernel writes back a handle to the | 439 | * If a context was successfully created, the kernel writes back a handle to the |
372 | * context, which must be passed in for subsequent operations on that context. | 440 | * context, which must be passed in for subsequent operations on that context. |
441 | * | ||
442 | * Note that the effect of a @header_size > 4 depends on | ||
443 | * &fw_cdev_get_info.version, as documented at &fw_cdev_event_iso_interrupt. | ||
373 | */ | 444 | */ |
374 | struct fw_cdev_create_iso_context { | 445 | struct fw_cdev_create_iso_context { |
375 | __u32 type; | 446 | __u32 type; |
@@ -473,10 +544,91 @@ struct fw_cdev_stop_iso { | |||
473 | * The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer | 544 | * The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer |
474 | * and also the system clock. This allows to express the receive time of an | 545 | * and also the system clock. This allows to express the receive time of an |
475 | * isochronous packet as a system time with microsecond accuracy. | 546 | * isochronous packet as a system time with microsecond accuracy. |
547 | * | ||
548 | * @cycle_timer consists of 7 bits cycleSeconds, 13 bits cycleCount, and | ||
549 | * 12 bits cycleOffset, in host byte order. | ||
476 | */ | 550 | */ |
477 | struct fw_cdev_get_cycle_timer { | 551 | struct fw_cdev_get_cycle_timer { |
478 | __u64 local_time; | 552 | __u64 local_time; |
479 | __u32 cycle_timer; | 553 | __u32 cycle_timer; |
480 | }; | 554 | }; |
481 | 555 | ||
556 | /** | ||
557 | * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth | ||
558 | * @closure: Passed back to userspace in correponding iso resource events | ||
559 | * @channels: Isochronous channels of which one is to be (de)allocated | ||
560 | * @bandwidth: Isochronous bandwidth units to be (de)allocated | ||
561 | * @handle: Handle to the allocation, written by the kernel (only valid in | ||
562 | * case of %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE ioctls) | ||
563 | * | ||
564 | * The %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE ioctl initiates allocation of an | ||
565 | * isochronous channel and/or of isochronous bandwidth at the isochronous | ||
566 | * resource manager (IRM). Only one of the channels specified in @channels is | ||
567 | * allocated. An %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED is sent after | ||
568 | * communication with the IRM, indicating success or failure in the event data. | ||
569 | * The kernel will automatically reallocate the resources after bus resets. | ||
570 | * Should a reallocation fail, an %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event | ||
571 | * will be sent. The kernel will also automatically deallocate the resources | ||
572 | * when the file descriptor is closed. | ||
573 | * | ||
574 | * The %FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE ioctl can be used to initiate | ||
575 | * deallocation of resources which were allocated as described above. | ||
576 | * An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event concludes this operation. | ||
577 | * | ||
578 | * The %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE ioctl is a variant of allocation | ||
579 | * without automatic re- or deallocation. | ||
580 | * An %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED event concludes this operation, | ||
581 | * indicating success or failure in its data. | ||
582 | * | ||
583 | * The %FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE ioctl works like | ||
584 | * %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE except that resources are freed | ||
585 | * instead of allocated. | ||
586 | * An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event concludes this operation. | ||
587 | * | ||
588 | * To summarize, %FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE allocates iso resources | ||
589 | * for the lifetime of the fd or handle. | ||
590 | * In contrast, %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE allocates iso resources | ||
591 | * for the duration of a bus generation. | ||
592 | * | ||
593 | * @channels is a host-endian bitfield with the least significant bit | ||
594 | * representing channel 0 and the most significant bit representing channel 63: | ||
595 | * 1ULL << c for each channel c that is a candidate for (de)allocation. | ||
596 | * | ||
597 | * @bandwidth is expressed in bandwidth allocation units, i.e. the time to send | ||
598 | * one quadlet of data (payload or header data) at speed S1600. | ||
599 | */ | ||
600 | struct fw_cdev_allocate_iso_resource { | ||
601 | __u64 closure; | ||
602 | __u64 channels; | ||
603 | __u32 bandwidth; | ||
604 | __u32 handle; | ||
605 | }; | ||
606 | |||
607 | /** | ||
608 | * struct fw_cdev_send_stream_packet - send an asynchronous stream packet | ||
609 | * @length: Length of outgoing payload, in bytes | ||
610 | * @tag: Data format tag | ||
611 | * @channel: Isochronous channel to transmit to | ||
612 | * @sy: Synchronization code | ||
613 | * @closure: Passed back to userspace in the response event | ||
614 | * @data: Userspace pointer to payload | ||
615 | * @generation: The bus generation where packet is valid | ||
616 | * @speed: Speed to transmit at | ||
617 | * | ||
618 | * The %FW_CDEV_IOC_SEND_STREAM_PACKET ioctl sends an asynchronous stream packet | ||
619 | * to every device which is listening to the specified channel. The kernel | ||
620 | * writes an &fw_cdev_event_response event which indicates success or failure of | ||
621 | * the transmission. | ||
622 | */ | ||
623 | struct fw_cdev_send_stream_packet { | ||
624 | __u32 length; | ||
625 | __u32 tag; | ||
626 | __u32 channel; | ||
627 | __u32 sy; | ||
628 | __u64 closure; | ||
629 | __u64 data; | ||
630 | __u32 generation; | ||
631 | __u32 speed; | ||
632 | }; | ||
633 | |||
482 | #endif /* _LINUX_FIREWIRE_CDEV_H */ | 634 | #endif /* _LINUX_FIREWIRE_CDEV_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 92734c0012e6..61211ad823fe 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -141,6 +141,7 @@ struct inodes_stat_t { | |||
141 | #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ | 141 | #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ |
142 | #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ | 142 | #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ |
143 | #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 */ | ||
144 | #define MS_ACTIVE (1<<30) | 145 | #define MS_ACTIVE (1<<30) |
145 | #define MS_NOUSER (1<<31) | 146 | #define MS_NOUSER (1<<31) |
146 | 147 | ||
@@ -848,6 +849,7 @@ struct file { | |||
848 | #define f_dentry f_path.dentry | 849 | #define f_dentry f_path.dentry |
849 | #define f_vfsmnt f_path.mnt | 850 | #define f_vfsmnt f_path.mnt |
850 | const struct file_operations *f_op; | 851 | const struct file_operations *f_op; |
852 | spinlock_t f_lock; /* f_ep_links, f_flags, no IRQ */ | ||
851 | atomic_long_t f_count; | 853 | atomic_long_t f_count; |
852 | unsigned int f_flags; | 854 | unsigned int f_flags; |
853 | fmode_t f_mode; | 855 | fmode_t f_mode; |
@@ -866,7 +868,6 @@ struct file { | |||
866 | #ifdef CONFIG_EPOLL | 868 | #ifdef CONFIG_EPOLL |
867 | /* 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 */ |
868 | struct list_head f_ep_links; | 870 | struct list_head f_ep_links; |
869 | spinlock_t f_ep_lock; | ||
870 | #endif /* #ifdef CONFIG_EPOLL */ | 871 | #endif /* #ifdef CONFIG_EPOLL */ |
871 | struct address_space *f_mapping; | 872 | struct address_space *f_mapping; |
872 | #ifdef CONFIG_DEBUG_WRITECOUNT | 873 | #ifdef CONFIG_DEBUG_WRITECOUNT |
@@ -1063,34 +1064,147 @@ extern int lease_modify(struct file_lock **, int); | |||
1063 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); | 1064 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); |
1064 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); | 1065 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); |
1065 | #else /* !CONFIG_FILE_LOCKING */ | 1066 | #else /* !CONFIG_FILE_LOCKING */ |
1066 | #define fcntl_getlk(a, b) ({ -EINVAL; }) | 1067 | static inline int fcntl_getlk(struct file *file, struct flock __user *user) |
1067 | #define fcntl_setlk(a, b, c, d) ({ -EACCES; }) | 1068 | { |
1069 | return -EINVAL; | ||
1070 | } | ||
1071 | |||
1072 | static inline int fcntl_setlk(unsigned int fd, struct file *file, | ||
1073 | unsigned int cmd, struct flock __user *user) | ||
1074 | { | ||
1075 | return -EACCES; | ||
1076 | } | ||
1077 | |||
1068 | #if BITS_PER_LONG == 32 | 1078 | #if BITS_PER_LONG == 32 |
1069 | #define fcntl_getlk64(a, b) ({ -EINVAL; }) | 1079 | static inline int fcntl_getlk64(struct file *file, struct flock64 __user *user) |
1070 | #define fcntl_setlk64(a, b, c, d) ({ -EACCES; }) | 1080 | { |
1081 | return -EINVAL; | ||
1082 | } | ||
1083 | |||
1084 | static inline int fcntl_setlk64(unsigned int fd, struct file *file, | ||
1085 | unsigned int cmd, struct flock64 __user *user) | ||
1086 | { | ||
1087 | return -EACCES; | ||
1088 | } | ||
1071 | #endif | 1089 | #endif |
1072 | #define fcntl_setlease(a, b, c) ({ 0; }) | 1090 | static inline int fcntl_setlease(unsigned int fd, struct file *filp, long arg) |
1073 | #define fcntl_getlease(a) ({ 0; }) | 1091 | { |
1074 | #define locks_init_lock(a) ({ }) | 1092 | return 0; |
1075 | #define __locks_copy_lock(a, b) ({ }) | 1093 | } |
1076 | #define locks_copy_lock(a, b) ({ }) | 1094 | |
1077 | #define locks_remove_posix(a, b) ({ }) | 1095 | static inline int fcntl_getlease(struct file *filp) |
1078 | #define locks_remove_flock(a) ({ }) | 1096 | { |
1079 | #define posix_test_lock(a, b) ({ 0; }) | 1097 | return 0; |
1080 | #define posix_lock_file(a, b, c) ({ -ENOLCK; }) | 1098 | } |
1081 | #define posix_lock_file_wait(a, b) ({ -ENOLCK; }) | 1099 | |
1082 | #define posix_unblock_lock(a, b) (-ENOENT) | 1100 | static inline void locks_init_lock(struct file_lock *fl) |
1083 | #define vfs_test_lock(a, b) ({ 0; }) | 1101 | { |
1084 | #define vfs_lock_file(a, b, c, d) (-ENOLCK) | 1102 | return; |
1085 | #define vfs_cancel_lock(a, b) ({ 0; }) | 1103 | } |
1086 | #define flock_lock_file_wait(a, b) ({ -ENOLCK; }) | 1104 | |
1087 | #define __break_lease(a, b) ({ 0; }) | 1105 | static inline void __locks_copy_lock(struct file_lock *new, struct file_lock *fl) |
1088 | #define lease_get_mtime(a, b) ({ }) | 1106 | { |
1089 | #define generic_setlease(a, b, c) ({ -EINVAL; }) | 1107 | return; |
1090 | #define vfs_setlease(a, b, c) ({ -EINVAL; }) | 1108 | } |
1091 | #define lease_modify(a, b) ({ -EINVAL; }) | 1109 | |
1092 | #define lock_may_read(a, b, c) ({ 1; }) | 1110 | static inline void locks_copy_lock(struct file_lock *new, struct file_lock *fl) |
1093 | #define lock_may_write(a, b, c) ({ 1; }) | 1111 | { |
1112 | return; | ||
1113 | } | ||
1114 | |||
1115 | static inline void locks_remove_posix(struct file *filp, fl_owner_t owner) | ||
1116 | { | ||
1117 | return; | ||
1118 | } | ||
1119 | |||
1120 | static inline void locks_remove_flock(struct file *filp) | ||
1121 | { | ||
1122 | return; | ||
1123 | } | ||
1124 | |||
1125 | static inline void posix_test_lock(struct file *filp, struct file_lock *fl) | ||
1126 | { | ||
1127 | return; | ||
1128 | } | ||
1129 | |||
1130 | static inline int posix_lock_file(struct file *filp, struct file_lock *fl, | ||
1131 | struct file_lock *conflock) | ||
1132 | { | ||
1133 | return -ENOLCK; | ||
1134 | } | ||
1135 | |||
1136 | static inline int posix_lock_file_wait(struct file *filp, struct file_lock *fl) | ||
1137 | { | ||
1138 | return -ENOLCK; | ||
1139 | } | ||
1140 | |||
1141 | static inline int posix_unblock_lock(struct file *filp, | ||
1142 | struct file_lock *waiter) | ||
1143 | { | ||
1144 | return -ENOENT; | ||
1145 | } | ||
1146 | |||
1147 | static inline int vfs_test_lock(struct file *filp, struct file_lock *fl) | ||
1148 | { | ||
1149 | return 0; | ||
1150 | } | ||
1151 | |||
1152 | static inline int vfs_lock_file(struct file *filp, unsigned int cmd, | ||
1153 | struct file_lock *fl, struct file_lock *conf) | ||
1154 | { | ||
1155 | return -ENOLCK; | ||
1156 | } | ||
1157 | |||
1158 | static inline int vfs_cancel_lock(struct file *filp, struct file_lock *fl) | ||
1159 | { | ||
1160 | return 0; | ||
1161 | } | ||
1162 | |||
1163 | static inline int flock_lock_file_wait(struct file *filp, | ||
1164 | struct file_lock *request) | ||
1165 | { | ||
1166 | return -ENOLCK; | ||
1167 | } | ||
1168 | |||
1169 | static inline int __break_lease(struct inode *inode, unsigned int mode) | ||
1170 | { | ||
1171 | return 0; | ||
1172 | } | ||
1173 | |||
1174 | static inline void lease_get_mtime(struct inode *inode, struct timespec *time) | ||
1175 | { | ||
1176 | return; | ||
1177 | } | ||
1178 | |||
1179 | static inline int generic_setlease(struct file *filp, long arg, | ||
1180 | struct file_lock **flp) | ||
1181 | { | ||
1182 | return -EINVAL; | ||
1183 | } | ||
1184 | |||
1185 | static inline int vfs_setlease(struct file *filp, long arg, | ||
1186 | struct file_lock **lease) | ||
1187 | { | ||
1188 | return -EINVAL; | ||
1189 | } | ||
1190 | |||
1191 | static inline int lease_modify(struct file_lock **before, int arg) | ||
1192 | { | ||
1193 | return -EINVAL; | ||
1194 | } | ||
1195 | |||
1196 | static inline int lock_may_read(struct inode *inode, loff_t start, | ||
1197 | unsigned long len) | ||
1198 | { | ||
1199 | return 1; | ||
1200 | } | ||
1201 | |||
1202 | static inline int lock_may_write(struct inode *inode, loff_t start, | ||
1203 | unsigned long len) | ||
1204 | { | ||
1205 | return 1; | ||
1206 | } | ||
1207 | |||
1094 | #endif /* !CONFIG_FILE_LOCKING */ | 1208 | #endif /* !CONFIG_FILE_LOCKING */ |
1095 | 1209 | ||
1096 | 1210 | ||
@@ -1606,7 +1720,7 @@ struct super_block *sget(struct file_system_type *type, | |||
1606 | extern int get_sb_pseudo(struct file_system_type *, char *, | 1720 | extern int get_sb_pseudo(struct file_system_type *, char *, |
1607 | const struct super_operations *ops, unsigned long, | 1721 | const struct super_operations *ops, unsigned long, |
1608 | struct vfsmount *mnt); | 1722 | struct vfsmount *mnt); |
1609 | extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); | 1723 | extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); |
1610 | int __put_super_and_need_restart(struct super_block *sb); | 1724 | int __put_super_and_need_restart(struct super_block *sb); |
1611 | 1725 | ||
1612 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ | 1726 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ |
@@ -1687,13 +1801,44 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
1687 | return 0; | 1801 | return 0; |
1688 | } | 1802 | } |
1689 | #else /* !CONFIG_FILE_LOCKING */ | 1803 | #else /* !CONFIG_FILE_LOCKING */ |
1690 | #define locks_mandatory_locked(a) ({ 0; }) | 1804 | static inline int locks_mandatory_locked(struct inode *inode) |
1691 | #define locks_mandatory_area(a, b, c, d, e) ({ 0; }) | 1805 | { |
1692 | #define __mandatory_lock(a) ({ 0; }) | 1806 | return 0; |
1693 | #define mandatory_lock(a) ({ 0; }) | 1807 | } |
1694 | #define locks_verify_locked(a) ({ 0; }) | 1808 | |
1695 | #define locks_verify_truncate(a, b, c) ({ 0; }) | 1809 | static inline int locks_mandatory_area(int rw, struct inode *inode, |
1696 | #define break_lease(a, b) ({ 0; }) | 1810 | struct file *filp, loff_t offset, |
1811 | size_t count) | ||
1812 | { | ||
1813 | return 0; | ||
1814 | } | ||
1815 | |||
1816 | static inline int __mandatory_lock(struct inode *inode) | ||
1817 | { | ||
1818 | return 0; | ||
1819 | } | ||
1820 | |||
1821 | static inline int mandatory_lock(struct inode *inode) | ||
1822 | { | ||
1823 | return 0; | ||
1824 | } | ||
1825 | |||
1826 | static inline int locks_verify_locked(struct inode *inode) | ||
1827 | { | ||
1828 | return 0; | ||
1829 | } | ||
1830 | |||
1831 | static inline int locks_verify_truncate(struct inode *inode, struct file *filp, | ||
1832 | size_t size) | ||
1833 | { | ||
1834 | return 0; | ||
1835 | } | ||
1836 | |||
1837 | static inline int break_lease(struct inode *inode, unsigned int mode) | ||
1838 | { | ||
1839 | return 0; | ||
1840 | } | ||
1841 | |||
1697 | #endif /* CONFIG_FILE_LOCKING */ | 1842 | #endif /* CONFIG_FILE_LOCKING */ |
1698 | 1843 | ||
1699 | /* fs/open.c */ | 1844 | /* fs/open.c */ |
@@ -1730,6 +1875,14 @@ extern void bd_set_size(struct block_device *, loff_t size); | |||
1730 | extern void bd_forget(struct inode *inode); | 1875 | extern void bd_forget(struct inode *inode); |
1731 | extern void bdput(struct block_device *); | 1876 | extern void bdput(struct block_device *); |
1732 | extern struct block_device *open_by_devnum(dev_t, fmode_t); | 1877 | extern struct block_device *open_by_devnum(dev_t, fmode_t); |
1878 | extern void invalidate_bdev(struct block_device *); | ||
1879 | extern int sync_blockdev(struct block_device *bdev); | ||
1880 | extern struct super_block *freeze_bdev(struct block_device *); | ||
1881 | extern void emergency_thaw_all(void); | ||
1882 | extern int thaw_bdev(struct block_device *bdev, struct super_block *sb); | ||
1883 | extern int fsync_bdev(struct block_device *); | ||
1884 | extern int fsync_super(struct super_block *); | ||
1885 | extern int fsync_no_super(struct block_device *); | ||
1733 | #else | 1886 | #else |
1734 | static inline void bd_forget(struct inode *inode) {} | 1887 | static inline void bd_forget(struct inode *inode) {} |
1735 | #endif | 1888 | #endif |
@@ -1881,7 +2034,6 @@ static inline void allow_write_access(struct file *file) | |||
1881 | if (file) | 2034 | if (file) |
1882 | atomic_inc(&file->f_path.dentry->d_inode->i_writecount); | 2035 | atomic_inc(&file->f_path.dentry->d_inode->i_writecount); |
1883 | } | 2036 | } |
1884 | extern int do_pipe(int *); | ||
1885 | extern int do_pipe_flags(int *, int); | 2037 | extern int do_pipe_flags(int *, int); |
1886 | extern struct file *create_read_pipe(struct file *f, int flags); | 2038 | extern struct file *create_read_pipe(struct file *f, int flags); |
1887 | extern struct file *create_write_pipe(int flags); | 2039 | extern struct file *create_write_pipe(int flags); |
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index a97c053d3a9a..18b467dbe278 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h | |||
@@ -4,7 +4,10 @@ | |||
4 | #include <linux/path.h> | 4 | #include <linux/path.h> |
5 | 5 | ||
6 | struct fs_struct { | 6 | struct fs_struct { |
7 | atomic_t count; | 7 | atomic_t count; /* This usage count is used by check_unsafe_exec() for |
8 | * security checking purposes - therefore it may not be | ||
9 | * incremented, except by clone(CLONE_FS). | ||
10 | */ | ||
8 | rwlock_t lock; | 11 | rwlock_t lock; |
9 | int umask; | 12 | int umask; |
10 | struct path root, pwd; | 13 | struct path root, pwd; |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index d9051d717d27..7ef1caf50269 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
@@ -95,14 +95,15 @@ struct fsl_usb2_platform_data { | |||
95 | #define FSL_USB2_PORT0_ENABLED 0x00000001 | 95 | #define FSL_USB2_PORT0_ENABLED 0x00000001 |
96 | #define FSL_USB2_PORT1_ENABLED 0x00000002 | 96 | #define FSL_USB2_PORT1_ENABLED 0x00000002 |
97 | 97 | ||
98 | struct spi_device; | ||
99 | |||
98 | struct fsl_spi_platform_data { | 100 | struct fsl_spi_platform_data { |
99 | u32 initial_spmode; /* initial SPMODE value */ | 101 | u32 initial_spmode; /* initial SPMODE value */ |
100 | u16 bus_num; | 102 | s16 bus_num; |
101 | bool qe_mode; | 103 | bool qe_mode; |
102 | /* board specific information */ | 104 | /* board specific information */ |
103 | u16 max_chipselect; | 105 | u16 max_chipselect; |
104 | void (*activate_cs)(u8 cs, u8 polarity); | 106 | void (*cs_control)(struct spi_device *spi, bool on); |
105 | void (*deactivate_cs)(u8 cs, u8 polarity); | ||
106 | u32 sysclk; | 107 | u32 sysclk; |
107 | }; | 108 | }; |
108 | 109 | ||
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/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/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/highmem.h b/include/linux/highmem.h index 13875ce9112a..7ff5c55f9b55 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
@@ -187,4 +187,16 @@ static inline void copy_highpage(struct page *to, struct page *from) | |||
187 | kunmap_atomic(vto, KM_USER1); | 187 | kunmap_atomic(vto, KM_USER1); |
188 | } | 188 | } |
189 | 189 | ||
190 | #if defined(CONFIG_DEBUG_HIGHMEM) && defined(CONFIG_TRACE_IRQFLAGS_SUPPORT) | ||
191 | |||
192 | void debug_kmap_atomic(enum km_type type); | ||
193 | |||
194 | #else | ||
195 | |||
196 | static inline void debug_kmap_atomic(enum km_type type) | ||
197 | { | ||
198 | } | ||
199 | |||
200 | #endif | ||
201 | |||
190 | #endif /* _LINUX_HIGHMEM_H */ | 202 | #endif /* _LINUX_HIGHMEM_H */ |
diff --git a/include/linux/i2c-algo-pca.h b/include/linux/i2c-algo-pca.h index adcb3dc7ac26..1364d62e2fbe 100644 --- a/include/linux/i2c-algo-pca.h +++ b/include/linux/i2c-algo-pca.h | |||
@@ -1,7 +1,14 @@ | |||
1 | #ifndef _LINUX_I2C_ALGO_PCA_H | 1 | #ifndef _LINUX_I2C_ALGO_PCA_H |
2 | #define _LINUX_I2C_ALGO_PCA_H | 2 | #define _LINUX_I2C_ALGO_PCA_H |
3 | 3 | ||
4 | /* Clock speeds for the bus */ | 4 | /* Chips known to the pca algo */ |
5 | #define I2C_PCA_CHIP_9564 0x00 | ||
6 | #define I2C_PCA_CHIP_9665 0x01 | ||
7 | |||
8 | /* Internal period for PCA9665 oscilator */ | ||
9 | #define I2C_PCA_OSC_PER 3 /* e10-8s */ | ||
10 | |||
11 | /* Clock speeds for the bus for PCA9564*/ | ||
5 | #define I2C_PCA_CON_330kHz 0x00 | 12 | #define I2C_PCA_CON_330kHz 0x00 |
6 | #define I2C_PCA_CON_288kHz 0x01 | 13 | #define I2C_PCA_CON_288kHz 0x01 |
7 | #define I2C_PCA_CON_217kHz 0x02 | 14 | #define I2C_PCA_CON_217kHz 0x02 |
@@ -18,6 +25,26 @@ | |||
18 | #define I2C_PCA_ADR 0x02 /* OWN ADR Read/Write */ | 25 | #define I2C_PCA_ADR 0x02 /* OWN ADR Read/Write */ |
19 | #define I2C_PCA_CON 0x03 /* CONTROL Read/Write */ | 26 | #define I2C_PCA_CON 0x03 /* CONTROL Read/Write */ |
20 | 27 | ||
28 | /* PCA9665 registers */ | ||
29 | #define I2C_PCA_INDPTR 0x00 /* INDIRECT Pointer Write Only */ | ||
30 | #define I2C_PCA_IND 0x02 /* INDIRECT Read/Write */ | ||
31 | |||
32 | /* PCA9665 indirect registers */ | ||
33 | #define I2C_PCA_ICOUNT 0x00 /* Byte Count for buffered mode */ | ||
34 | #define I2C_PCA_IADR 0x01 /* OWN ADR */ | ||
35 | #define I2C_PCA_ISCLL 0x02 /* SCL LOW period */ | ||
36 | #define I2C_PCA_ISCLH 0x03 /* SCL HIGH period */ | ||
37 | #define I2C_PCA_ITO 0x04 /* TIMEOUT */ | ||
38 | #define I2C_PCA_IPRESET 0x05 /* Parallel bus reset */ | ||
39 | #define I2C_PCA_IMODE 0x06 /* I2C Bus mode */ | ||
40 | |||
41 | /* PCA9665 I2C bus mode */ | ||
42 | #define I2C_PCA_MODE_STD 0x00 /* Standard mode */ | ||
43 | #define I2C_PCA_MODE_FAST 0x01 /* Fast mode */ | ||
44 | #define I2C_PCA_MODE_FASTP 0x02 /* Fast Plus mode */ | ||
45 | #define I2C_PCA_MODE_TURBO 0x03 /* Turbo mode */ | ||
46 | |||
47 | |||
21 | #define I2C_PCA_CON_AA 0x80 /* Assert Acknowledge */ | 48 | #define I2C_PCA_CON_AA 0x80 /* Assert Acknowledge */ |
22 | #define I2C_PCA_CON_ENSIO 0x40 /* Enable */ | 49 | #define I2C_PCA_CON_ENSIO 0x40 /* Enable */ |
23 | #define I2C_PCA_CON_STA 0x20 /* Start */ | 50 | #define I2C_PCA_CON_STA 0x20 /* Start */ |
@@ -31,7 +58,9 @@ struct i2c_algo_pca_data { | |||
31 | int (*read_byte) (void *data, int reg); | 58 | int (*read_byte) (void *data, int reg); |
32 | int (*wait_for_completion) (void *data); | 59 | int (*wait_for_completion) (void *data); |
33 | void (*reset_chip) (void *data); | 60 | void (*reset_chip) (void *data); |
34 | /* i2c_clock values are defined in linux/i2c-algo-pca.h */ | 61 | /* For PCA9564, use one of the predefined frequencies: |
62 | * 330000, 288000, 217000, 146000, 88000, 59000, 44000, 36000 | ||
63 | * For PCA9665, use the frequency you want here. */ | ||
35 | unsigned int i2c_clock; | 64 | unsigned int i2c_clock; |
36 | }; | 65 | }; |
37 | 66 | ||
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 1ffc23bc5d1e..f27604af8378 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -71,6 +71,7 @@ | |||
71 | #define I2C_DRIVERID_VP27SMPX 93 /* Panasonic VP27s tuner internal MPX */ | 71 | #define I2C_DRIVERID_VP27SMPX 93 /* Panasonic VP27s tuner internal MPX */ |
72 | #define I2C_DRIVERID_M52790 95 /* Mitsubishi M52790SP/FP AV switch */ | 72 | #define I2C_DRIVERID_M52790 95 /* Mitsubishi M52790SP/FP AV switch */ |
73 | #define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */ | 73 | #define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */ |
74 | #define I2C_DRIVERID_AU8522 97 /* Auvitek au8522 */ | ||
74 | 75 | ||
75 | #define I2C_DRIVERID_OV7670 1048 /* Omnivision 7670 camera */ | 76 | #define I2C_DRIVERID_OV7670 1048 /* Omnivision 7670 camera */ |
76 | 77 | ||
@@ -87,6 +88,7 @@ | |||
87 | #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ | 88 | #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ |
88 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ | 89 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ |
89 | #define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */ | 90 | #define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */ |
91 | #define I2C_HW_B_HDPVR 0x010025 /* Hauppauge HD PVR */ | ||
90 | 92 | ||
91 | /* --- SGI adapters */ | 93 | /* --- SGI adapters */ |
92 | #define I2C_HW_SGI_VINO 0x160000 | 94 | #define I2C_HW_SGI_VINO 0x160000 |
diff --git a/include/linux/i2c-pca-platform.h b/include/linux/i2c-pca-platform.h index 3d191873f2d1..aba33759dec4 100644 --- a/include/linux/i2c-pca-platform.h +++ b/include/linux/i2c-pca-platform.h | |||
@@ -6,7 +6,7 @@ struct i2c_pca9564_pf_platform_data { | |||
6 | * not supplied (negative value), but it | 6 | * not supplied (negative value), but it |
7 | * cannot exit some error conditions then */ | 7 | * cannot exit some error conditions then */ |
8 | int i2c_clock_speed; /* values are defined in linux/i2c-algo-pca.h */ | 8 | int i2c_clock_speed; /* values are defined in linux/i2c-algo-pca.h */ |
9 | int timeout; /* timeout = this value * 10us */ | 9 | int timeout; /* timeout in jiffies */ |
10 | }; | 10 | }; |
11 | 11 | ||
12 | #endif /* I2C_PCA9564_PLATFORM_H */ | 12 | #endif /* I2C_PCA9564_PLATFORM_H */ |
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/ide.h b/include/linux/ide.h index 25087aead657..a5d26f66ef78 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 |
@@ -40,6 +40,13 @@ | |||
40 | #define ERROR_RESET 3 /* Reset controller every 4th retry */ | 40 | #define ERROR_RESET 3 /* Reset controller every 4th retry */ |
41 | #define ERROR_RECAL 1 /* Recalibrate every 2nd retry */ | 41 | #define ERROR_RECAL 1 /* Recalibrate every 2nd retry */ |
42 | 42 | ||
43 | /* Error codes returned in rq->errors to the higher part of the driver. */ | ||
44 | enum { | ||
45 | IDE_DRV_ERROR_GENERAL = 101, | ||
46 | IDE_DRV_ERROR_FILEMARK = 102, | ||
47 | IDE_DRV_ERROR_EOD = 103, | ||
48 | }; | ||
49 | |||
43 | /* | 50 | /* |
44 | * Definitions for accessing IDE controller registers | 51 | * Definitions for accessing IDE controller registers |
45 | */ | 52 | */ |
@@ -193,42 +200,8 @@ static inline void ide_std_init_ports(hw_regs_t *hw, | |||
193 | hw->io_ports.ctl_addr = ctl_addr; | 200 | hw->io_ports.ctl_addr = ctl_addr; |
194 | } | 201 | } |
195 | 202 | ||
196 | /* for IDE PCI controllers in legacy mode, temporary */ | ||
197 | static inline int __ide_default_irq(unsigned long base) | ||
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> | ||
215 | #else | ||
216 | #include <asm-generic/ide_iops.h> | ||
217 | #endif | ||
218 | |||
219 | #define MAX_HWIFS 10 | 203 | #define MAX_HWIFS 10 |
220 | 204 | ||
221 | /* Currently only m68k, apus and m8xx need it */ | ||
222 | #ifndef IDE_ARCH_ACK_INTR | ||
223 | # define ide_ack_intr(hwif) (1) | ||
224 | #endif | ||
225 | |||
226 | /* Currently only Atari needs it */ | ||
227 | #ifndef IDE_ARCH_LOCK | ||
228 | # define ide_release_lock() do {} while (0) | ||
229 | # define ide_get_lock(hdlr, data) do {} while (0) | ||
230 | #endif /* IDE_ARCH_LOCK */ | ||
231 | |||
232 | /* | 205 | /* |
233 | * Now for the data we need to maintain per-drive: ide_drive_t | 206 | * Now for the data we need to maintain per-drive: ide_drive_t |
234 | */ | 207 | */ |
@@ -268,56 +241,52 @@ typedef enum { | |||
268 | 241 | ||
269 | enum { | 242 | enum { |
270 | IDE_TFLAG_LBA48 = (1 << 0), | 243 | IDE_TFLAG_LBA48 = (1 << 0), |
271 | IDE_TFLAG_FLAGGED = (1 << 2), | 244 | IDE_TFLAG_OUT_HOB_FEATURE = (1 << 1), |
272 | IDE_TFLAG_OUT_DATA = (1 << 3), | 245 | IDE_TFLAG_OUT_HOB_NSECT = (1 << 2), |
273 | IDE_TFLAG_OUT_HOB_FEATURE = (1 << 4), | 246 | IDE_TFLAG_OUT_HOB_LBAL = (1 << 3), |
274 | IDE_TFLAG_OUT_HOB_NSECT = (1 << 5), | 247 | IDE_TFLAG_OUT_HOB_LBAM = (1 << 4), |
275 | IDE_TFLAG_OUT_HOB_LBAL = (1 << 6), | 248 | IDE_TFLAG_OUT_HOB_LBAH = (1 << 5), |
276 | IDE_TFLAG_OUT_HOB_LBAM = (1 << 7), | ||
277 | IDE_TFLAG_OUT_HOB_LBAH = (1 << 8), | ||
278 | IDE_TFLAG_OUT_HOB = IDE_TFLAG_OUT_HOB_FEATURE | | 249 | IDE_TFLAG_OUT_HOB = IDE_TFLAG_OUT_HOB_FEATURE | |
279 | IDE_TFLAG_OUT_HOB_NSECT | | 250 | IDE_TFLAG_OUT_HOB_NSECT | |
280 | IDE_TFLAG_OUT_HOB_LBAL | | 251 | IDE_TFLAG_OUT_HOB_LBAL | |
281 | IDE_TFLAG_OUT_HOB_LBAM | | 252 | IDE_TFLAG_OUT_HOB_LBAM | |
282 | IDE_TFLAG_OUT_HOB_LBAH, | 253 | IDE_TFLAG_OUT_HOB_LBAH, |
283 | IDE_TFLAG_OUT_FEATURE = (1 << 9), | 254 | IDE_TFLAG_OUT_FEATURE = (1 << 6), |
284 | IDE_TFLAG_OUT_NSECT = (1 << 10), | 255 | IDE_TFLAG_OUT_NSECT = (1 << 7), |
285 | IDE_TFLAG_OUT_LBAL = (1 << 11), | 256 | IDE_TFLAG_OUT_LBAL = (1 << 8), |
286 | IDE_TFLAG_OUT_LBAM = (1 << 12), | 257 | IDE_TFLAG_OUT_LBAM = (1 << 9), |
287 | IDE_TFLAG_OUT_LBAH = (1 << 13), | 258 | IDE_TFLAG_OUT_LBAH = (1 << 10), |
288 | IDE_TFLAG_OUT_TF = IDE_TFLAG_OUT_FEATURE | | 259 | IDE_TFLAG_OUT_TF = IDE_TFLAG_OUT_FEATURE | |
289 | IDE_TFLAG_OUT_NSECT | | 260 | IDE_TFLAG_OUT_NSECT | |
290 | IDE_TFLAG_OUT_LBAL | | 261 | IDE_TFLAG_OUT_LBAL | |
291 | IDE_TFLAG_OUT_LBAM | | 262 | IDE_TFLAG_OUT_LBAM | |
292 | IDE_TFLAG_OUT_LBAH, | 263 | IDE_TFLAG_OUT_LBAH, |
293 | IDE_TFLAG_OUT_DEVICE = (1 << 14), | 264 | IDE_TFLAG_OUT_DEVICE = (1 << 11), |
294 | IDE_TFLAG_WRITE = (1 << 15), | 265 | IDE_TFLAG_WRITE = (1 << 12), |
295 | IDE_TFLAG_FLAGGED_SET_IN_FLAGS = (1 << 16), | 266 | IDE_TFLAG_CUSTOM_HANDLER = (1 << 13), |
296 | IDE_TFLAG_IN_DATA = (1 << 17), | 267 | IDE_TFLAG_DMA_PIO_FALLBACK = (1 << 14), |
297 | IDE_TFLAG_CUSTOM_HANDLER = (1 << 18), | 268 | IDE_TFLAG_IN_HOB_ERROR = (1 << 15), |
298 | IDE_TFLAG_DMA_PIO_FALLBACK = (1 << 19), | 269 | IDE_TFLAG_IN_HOB_NSECT = (1 << 16), |
299 | IDE_TFLAG_IN_HOB_FEATURE = (1 << 20), | 270 | IDE_TFLAG_IN_HOB_LBAL = (1 << 17), |
300 | IDE_TFLAG_IN_HOB_NSECT = (1 << 21), | 271 | IDE_TFLAG_IN_HOB_LBAM = (1 << 18), |
301 | IDE_TFLAG_IN_HOB_LBAL = (1 << 22), | 272 | IDE_TFLAG_IN_HOB_LBAH = (1 << 19), |
302 | IDE_TFLAG_IN_HOB_LBAM = (1 << 23), | ||
303 | IDE_TFLAG_IN_HOB_LBAH = (1 << 24), | ||
304 | IDE_TFLAG_IN_HOB_LBA = IDE_TFLAG_IN_HOB_LBAL | | 273 | IDE_TFLAG_IN_HOB_LBA = IDE_TFLAG_IN_HOB_LBAL | |
305 | IDE_TFLAG_IN_HOB_LBAM | | 274 | IDE_TFLAG_IN_HOB_LBAM | |
306 | IDE_TFLAG_IN_HOB_LBAH, | 275 | IDE_TFLAG_IN_HOB_LBAH, |
307 | IDE_TFLAG_IN_HOB = IDE_TFLAG_IN_HOB_FEATURE | | 276 | IDE_TFLAG_IN_HOB = IDE_TFLAG_IN_HOB_ERROR | |
308 | IDE_TFLAG_IN_HOB_NSECT | | 277 | IDE_TFLAG_IN_HOB_NSECT | |
309 | IDE_TFLAG_IN_HOB_LBA, | 278 | IDE_TFLAG_IN_HOB_LBA, |
310 | IDE_TFLAG_IN_FEATURE = (1 << 1), | 279 | IDE_TFLAG_IN_ERROR = (1 << 20), |
311 | IDE_TFLAG_IN_NSECT = (1 << 25), | 280 | IDE_TFLAG_IN_NSECT = (1 << 21), |
312 | IDE_TFLAG_IN_LBAL = (1 << 26), | 281 | IDE_TFLAG_IN_LBAL = (1 << 22), |
313 | IDE_TFLAG_IN_LBAM = (1 << 27), | 282 | IDE_TFLAG_IN_LBAM = (1 << 23), |
314 | IDE_TFLAG_IN_LBAH = (1 << 28), | 283 | IDE_TFLAG_IN_LBAH = (1 << 24), |
315 | IDE_TFLAG_IN_LBA = IDE_TFLAG_IN_LBAL | | 284 | IDE_TFLAG_IN_LBA = IDE_TFLAG_IN_LBAL | |
316 | IDE_TFLAG_IN_LBAM | | 285 | IDE_TFLAG_IN_LBAM | |
317 | IDE_TFLAG_IN_LBAH, | 286 | IDE_TFLAG_IN_LBAH, |
318 | IDE_TFLAG_IN_TF = IDE_TFLAG_IN_NSECT | | 287 | IDE_TFLAG_IN_TF = IDE_TFLAG_IN_NSECT | |
319 | IDE_TFLAG_IN_LBA, | 288 | IDE_TFLAG_IN_LBA, |
320 | IDE_TFLAG_IN_DEVICE = (1 << 29), | 289 | IDE_TFLAG_IN_DEVICE = (1 << 25), |
321 | IDE_TFLAG_HOB = IDE_TFLAG_OUT_HOB | | 290 | IDE_TFLAG_HOB = IDE_TFLAG_OUT_HOB | |
322 | IDE_TFLAG_IN_HOB, | 291 | IDE_TFLAG_IN_HOB, |
323 | IDE_TFLAG_TF = IDE_TFLAG_OUT_TF | | 292 | IDE_TFLAG_TF = IDE_TFLAG_OUT_TF | |
@@ -325,15 +294,28 @@ enum { | |||
325 | IDE_TFLAG_DEVICE = IDE_TFLAG_OUT_DEVICE | | 294 | IDE_TFLAG_DEVICE = IDE_TFLAG_OUT_DEVICE | |
326 | IDE_TFLAG_IN_DEVICE, | 295 | IDE_TFLAG_IN_DEVICE, |
327 | /* force 16-bit I/O operations */ | 296 | /* force 16-bit I/O operations */ |
328 | IDE_TFLAG_IO_16BIT = (1 << 30), | 297 | IDE_TFLAG_IO_16BIT = (1 << 26), |
329 | /* ide_task_t was allocated using kmalloc() */ | 298 | /* struct ide_cmd was allocated using kmalloc() */ |
330 | IDE_TFLAG_DYN = (1 << 31), | 299 | IDE_TFLAG_DYN = (1 << 27), |
300 | IDE_TFLAG_FS = (1 << 28), | ||
301 | IDE_TFLAG_MULTI_PIO = (1 << 29), | ||
302 | }; | ||
303 | |||
304 | enum { | ||
305 | IDE_FTFLAG_FLAGGED = (1 << 0), | ||
306 | IDE_FTFLAG_SET_IN_FLAGS = (1 << 1), | ||
307 | IDE_FTFLAG_OUT_DATA = (1 << 2), | ||
308 | IDE_FTFLAG_IN_DATA = (1 << 3), | ||
331 | }; | 309 | }; |
332 | 310 | ||
333 | struct ide_taskfile { | 311 | struct ide_taskfile { |
334 | u8 hob_data; /* 0: high data byte (for TASKFILE IOCTL) */ | 312 | u8 hob_data; /* 0: high data byte (for TASKFILE IOCTL) */ |
313 | /* 1-5: additional data to support LBA48 */ | ||
314 | union { | ||
315 | u8 hob_error; /* read: error */ | ||
316 | u8 hob_feature; /* write: feature */ | ||
317 | }; | ||
335 | 318 | ||
336 | u8 hob_feature; /* 1-5: additional data to support LBA48 */ | ||
337 | u8 hob_nsect; | 319 | u8 hob_nsect; |
338 | u8 hob_lbal; | 320 | u8 hob_lbal; |
339 | u8 hob_lbam; | 321 | u8 hob_lbam; |
@@ -359,16 +341,29 @@ struct ide_taskfile { | |||
359 | }; | 341 | }; |
360 | }; | 342 | }; |
361 | 343 | ||
362 | typedef struct ide_task_s { | 344 | struct ide_cmd { |
363 | union { | 345 | union { |
364 | struct ide_taskfile tf; | 346 | struct ide_taskfile tf; |
365 | u8 tf_array[14]; | 347 | u8 tf_array[14]; |
366 | }; | 348 | }; |
349 | u8 ftf_flags; /* for TASKFILE ioctl */ | ||
367 | u32 tf_flags; | 350 | u32 tf_flags; |
368 | int data_phase; | 351 | int protocol; |
352 | |||
353 | int sg_nents; /* number of sg entries */ | ||
354 | int orig_sg_nents; | ||
355 | int sg_dma_direction; /* DMA transfer direction */ | ||
356 | |||
357 | unsigned int nbytes; | ||
358 | unsigned int nleft; | ||
359 | unsigned int last_xfer_len; | ||
360 | |||
361 | struct scatterlist *cursg; | ||
362 | unsigned int cursg_ofs; | ||
363 | |||
369 | struct request *rq; /* copy of request */ | 364 | struct request *rq; /* copy of request */ |
370 | void *special; /* valid_t generally */ | 365 | void *special; /* valid_t generally */ |
371 | } ide_task_t; | 366 | }; |
372 | 367 | ||
373 | /* ATAPI packet command flags */ | 368 | /* ATAPI packet command flags */ |
374 | enum { | 369 | enum { |
@@ -380,15 +375,13 @@ enum { | |||
380 | PC_FLAG_DMA_IN_PROGRESS = (1 << 4), | 375 | PC_FLAG_DMA_IN_PROGRESS = (1 << 4), |
381 | PC_FLAG_DMA_ERROR = (1 << 5), | 376 | PC_FLAG_DMA_ERROR = (1 << 5), |
382 | PC_FLAG_WRITING = (1 << 6), | 377 | PC_FLAG_WRITING = (1 << 6), |
383 | /* command timed out */ | ||
384 | PC_FLAG_TIMEDOUT = (1 << 7), | ||
385 | }; | 378 | }; |
386 | 379 | ||
387 | /* | 380 | /* |
388 | * With each packet command, we allocate a buffer of IDE_PC_BUFFER_SIZE bytes. | 381 | * With each packet command, we allocate a buffer of IDE_PC_BUFFER_SIZE bytes. |
389 | * This is used for several packet commands (not for READ/WRITE commands). | 382 | * This is used for several packet commands (not for READ/WRITE commands). |
390 | */ | 383 | */ |
391 | #define IDE_PC_BUFFER_SIZE 256 | 384 | #define IDE_PC_BUFFER_SIZE 64 |
392 | #define ATAPI_WAIT_PC (60 * HZ) | 385 | #define ATAPI_WAIT_PC (60 * HZ) |
393 | 386 | ||
394 | struct ide_atapi_pc { | 387 | struct ide_atapi_pc { |
@@ -426,9 +419,6 @@ struct ide_atapi_pc { | |||
426 | struct idetape_bh *bh; | 419 | struct idetape_bh *bh; |
427 | char *b_data; | 420 | char *b_data; |
428 | 421 | ||
429 | struct scatterlist *sg; | ||
430 | unsigned int sg_cnt; | ||
431 | |||
432 | unsigned long timeout; | 422 | unsigned long timeout; |
433 | }; | 423 | }; |
434 | 424 | ||
@@ -452,7 +442,6 @@ struct ide_disk_ops { | |||
452 | int); | 442 | int); |
453 | ide_startstop_t (*do_request)(struct ide_drive_s *, struct request *, | 443 | ide_startstop_t (*do_request)(struct ide_drive_s *, struct request *, |
454 | sector_t); | 444 | sector_t); |
455 | int (*end_request)(struct ide_drive_s *, int, int); | ||
456 | int (*ioctl)(struct ide_drive_s *, struct block_device *, | 445 | int (*ioctl)(struct ide_drive_s *, struct block_device *, |
457 | fmode_t, unsigned int, unsigned long); | 446 | fmode_t, unsigned int, unsigned long); |
458 | }; | 447 | }; |
@@ -470,11 +459,6 @@ enum { | |||
470 | IDE_AFLAG_TOCADDR_AS_BCD = (1 << 3), | 459 | IDE_AFLAG_TOCADDR_AS_BCD = (1 << 3), |
471 | /* TOC track numbers are in BCD. */ | 460 | /* TOC track numbers are in BCD. */ |
472 | IDE_AFLAG_TOCTRACKS_AS_BCD = (1 << 4), | 461 | IDE_AFLAG_TOCTRACKS_AS_BCD = (1 << 4), |
473 | /* | ||
474 | * Drive does not provide data in multiples of SECTOR_SIZE | ||
475 | * when more than one interrupt is needed. | ||
476 | */ | ||
477 | IDE_AFLAG_LIMIT_NFRAMES = (1 << 5), | ||
478 | /* Saved TOC information is current. */ | 462 | /* Saved TOC information is current. */ |
479 | IDE_AFLAG_TOC_VALID = (1 << 6), | 463 | IDE_AFLAG_TOC_VALID = (1 << 6), |
480 | /* We think that the drive door is locked. */ | 464 | /* We think that the drive door is locked. */ |
@@ -528,8 +512,6 @@ enum { | |||
528 | IDE_DFLAG_NICE1 = (1 << 5), | 512 | IDE_DFLAG_NICE1 = (1 << 5), |
529 | /* device is physically present */ | 513 | /* device is physically present */ |
530 | IDE_DFLAG_PRESENT = (1 << 6), | 514 | IDE_DFLAG_PRESENT = (1 << 6), |
531 | /* device ejected hint */ | ||
532 | IDE_DFLAG_DEAD = (1 << 7), | ||
533 | /* id read from device (synthetic if not set) */ | 515 | /* id read from device (synthetic if not set) */ |
534 | IDE_DFLAG_ID_READ = (1 << 8), | 516 | IDE_DFLAG_ID_READ = (1 << 8), |
535 | IDE_DFLAG_NOPROBE = (1 << 9), | 517 | IDE_DFLAG_NOPROBE = (1 << 9), |
@@ -621,7 +603,7 @@ struct ide_drive_s { | |||
621 | 603 | ||
622 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ | 604 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ |
623 | unsigned int cyl; /* "real" number of cyls */ | 605 | unsigned int cyl; /* "real" number of cyls */ |
624 | unsigned int drive_data; /* used by set_pio_mode/selectproc */ | 606 | unsigned int drive_data; /* used by set_pio_mode/dev_select() */ |
625 | unsigned int failures; /* current failure count */ | 607 | unsigned int failures; /* current failure count */ |
626 | unsigned int max_failures; /* maximum allowed failure count */ | 608 | unsigned int max_failures; /* maximum allowed failure count */ |
627 | u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ | 609 | u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ |
@@ -643,8 +625,11 @@ struct ide_drive_s { | |||
643 | /* current packet command */ | 625 | /* current packet command */ |
644 | struct ide_atapi_pc *pc; | 626 | struct ide_atapi_pc *pc; |
645 | 627 | ||
628 | /* last failed packet command */ | ||
629 | struct ide_atapi_pc *failed_pc; | ||
630 | |||
646 | /* callback for packet commands */ | 631 | /* callback for packet commands */ |
647 | void (*pc_callback)(struct ide_drive_s *, int); | 632 | int (*pc_callback)(struct ide_drive_s *, int); |
648 | 633 | ||
649 | void (*pc_update_buffers)(struct ide_drive_s *, struct ide_atapi_pc *); | 634 | void (*pc_update_buffers)(struct ide_drive_s *, struct ide_atapi_pc *); |
650 | int (*pc_io_buffers)(struct ide_drive_s *, struct ide_atapi_pc *, | 635 | int (*pc_io_buffers)(struct ide_drive_s *, struct ide_atapi_pc *, |
@@ -674,16 +659,16 @@ struct ide_tp_ops { | |||
674 | void (*exec_command)(struct hwif_s *, u8); | 659 | void (*exec_command)(struct hwif_s *, u8); |
675 | u8 (*read_status)(struct hwif_s *); | 660 | u8 (*read_status)(struct hwif_s *); |
676 | u8 (*read_altstatus)(struct hwif_s *); | 661 | u8 (*read_altstatus)(struct hwif_s *); |
662 | void (*write_devctl)(struct hwif_s *, u8); | ||
677 | 663 | ||
678 | void (*set_irq)(struct hwif_s *, int); | 664 | void (*dev_select)(ide_drive_t *); |
665 | void (*tf_load)(ide_drive_t *, struct ide_cmd *); | ||
666 | void (*tf_read)(ide_drive_t *, struct ide_cmd *); | ||
679 | 667 | ||
680 | void (*tf_load)(ide_drive_t *, struct ide_task_s *); | 668 | void (*input_data)(ide_drive_t *, struct ide_cmd *, |
681 | void (*tf_read)(ide_drive_t *, struct ide_task_s *); | 669 | void *, unsigned int); |
682 | 670 | void (*output_data)(ide_drive_t *, struct ide_cmd *, | |
683 | void (*input_data)(ide_drive_t *, struct request *, void *, | 671 | void *, unsigned int); |
684 | unsigned int); | ||
685 | void (*output_data)(ide_drive_t *, struct request *, void *, | ||
686 | unsigned int); | ||
687 | }; | 672 | }; |
688 | 673 | ||
689 | extern const struct ide_tp_ops default_tp_ops; | 674 | extern const struct ide_tp_ops default_tp_ops; |
@@ -694,7 +679,6 @@ extern const struct ide_tp_ops default_tp_ops; | |||
694 | * @init_dev: host specific initialization of a device | 679 | * @init_dev: host specific initialization of a device |
695 | * @set_pio_mode: routine to program host for PIO mode | 680 | * @set_pio_mode: routine to program host for PIO mode |
696 | * @set_dma_mode: routine to program host for DMA mode | 681 | * @set_dma_mode: routine to program host for DMA mode |
697 | * @selectproc: tweaks hardware to select drive | ||
698 | * @reset_poll: chipset polling based on hba specifics | 682 | * @reset_poll: chipset polling based on hba specifics |
699 | * @pre_reset: chipset specific changes to default for device-hba resets | 683 | * @pre_reset: chipset specific changes to default for device-hba resets |
700 | * @resetproc: routine to reset controller after a disk reset | 684 | * @resetproc: routine to reset controller after a disk reset |
@@ -711,7 +695,6 @@ struct ide_port_ops { | |||
711 | void (*init_dev)(ide_drive_t *); | 695 | void (*init_dev)(ide_drive_t *); |
712 | void (*set_pio_mode)(ide_drive_t *, const u8); | 696 | void (*set_pio_mode)(ide_drive_t *, const u8); |
713 | void (*set_dma_mode)(ide_drive_t *, const u8); | 697 | void (*set_dma_mode)(ide_drive_t *, const u8); |
714 | void (*selectproc)(ide_drive_t *); | ||
715 | int (*reset_poll)(ide_drive_t *); | 698 | int (*reset_poll)(ide_drive_t *); |
716 | void (*pre_reset)(ide_drive_t *); | 699 | void (*pre_reset)(ide_drive_t *); |
717 | void (*resetproc)(ide_drive_t *); | 700 | void (*resetproc)(ide_drive_t *); |
@@ -727,13 +710,15 @@ struct ide_port_ops { | |||
727 | 710 | ||
728 | struct ide_dma_ops { | 711 | struct ide_dma_ops { |
729 | void (*dma_host_set)(struct ide_drive_s *, int); | 712 | void (*dma_host_set)(struct ide_drive_s *, int); |
730 | int (*dma_setup)(struct ide_drive_s *); | 713 | int (*dma_setup)(struct ide_drive_s *, struct ide_cmd *); |
731 | void (*dma_exec_cmd)(struct ide_drive_s *, u8); | ||
732 | void (*dma_start)(struct ide_drive_s *); | 714 | void (*dma_start)(struct ide_drive_s *); |
733 | int (*dma_end)(struct ide_drive_s *); | 715 | int (*dma_end)(struct ide_drive_s *); |
734 | int (*dma_test_irq)(struct ide_drive_s *); | 716 | int (*dma_test_irq)(struct ide_drive_s *); |
735 | void (*dma_lost_irq)(struct ide_drive_s *); | 717 | void (*dma_lost_irq)(struct ide_drive_s *); |
736 | void (*dma_timeout)(struct ide_drive_s *); | 718 | /* below ones are optional */ |
719 | int (*dma_check)(struct ide_drive_s *, struct ide_cmd *); | ||
720 | int (*dma_timer_expiry)(struct ide_drive_s *); | ||
721 | void (*dma_clear)(struct ide_drive_s *); | ||
737 | /* | 722 | /* |
738 | * The following method is optional and only required to be | 723 | * The following method is optional and only required to be |
739 | * implemented for the SFF-8038i compatible controllers. | 724 | * implemented for the SFF-8038i compatible controllers. |
@@ -796,19 +781,8 @@ typedef struct hwif_s { | |||
796 | /* Scatter-gather list used to build the above */ | 781 | /* Scatter-gather list used to build the above */ |
797 | struct scatterlist *sg_table; | 782 | struct scatterlist *sg_table; |
798 | int sg_max_nents; /* Maximum number of entries in it */ | 783 | int sg_max_nents; /* Maximum number of entries in it */ |
799 | int sg_nents; /* Current number of entries in it */ | ||
800 | int orig_sg_nents; | ||
801 | int sg_dma_direction; /* dma transfer direction */ | ||
802 | |||
803 | /* data phase of the active command (currently only valid for PIO/DMA) */ | ||
804 | int data_phase; | ||
805 | 784 | ||
806 | struct ide_task_s task; /* current command */ | 785 | struct ide_cmd cmd; /* current command */ |
807 | |||
808 | unsigned int nsect; | ||
809 | unsigned int nleft; | ||
810 | struct scatterlist *cursg; | ||
811 | unsigned int cursg_ofs; | ||
812 | 786 | ||
813 | int rqsize; /* max sectors per request */ | 787 | int rqsize; /* max sectors per request */ |
814 | int irq; /* our irq number */ | 788 | int irq; /* our irq number */ |
@@ -866,9 +840,18 @@ struct ide_host { | |||
866 | ide_hwif_t *ports[MAX_HOST_PORTS + 1]; | 840 | ide_hwif_t *ports[MAX_HOST_PORTS + 1]; |
867 | unsigned int n_ports; | 841 | unsigned int n_ports; |
868 | struct device *dev[2]; | 842 | struct device *dev[2]; |
869 | unsigned int (*init_chipset)(struct pci_dev *); | 843 | |
844 | int (*init_chipset)(struct pci_dev *); | ||
845 | |||
846 | void (*get_lock)(irq_handler_t, void *); | ||
847 | void (*release_lock)(void); | ||
848 | |||
870 | irq_handler_t irq_handler; | 849 | irq_handler_t irq_handler; |
850 | |||
871 | unsigned long host_flags; | 851 | unsigned long host_flags; |
852 | |||
853 | int irq_flags; | ||
854 | |||
872 | void *host_priv; | 855 | void *host_priv; |
873 | ide_hwif_t *cur_port; /* for hosts requiring serialization */ | 856 | ide_hwif_t *cur_port; /* for hosts requiring serialization */ |
874 | 857 | ||
@@ -885,7 +868,7 @@ typedef ide_startstop_t (ide_handler_t)(ide_drive_t *); | |||
885 | typedef int (ide_expiry_t)(ide_drive_t *); | 868 | typedef int (ide_expiry_t)(ide_drive_t *); |
886 | 869 | ||
887 | /* used by ide-cd, ide-floppy, etc. */ | 870 | /* used by ide-cd, ide-floppy, etc. */ |
888 | typedef void (xfer_func_t)(ide_drive_t *, struct request *rq, void *, unsigned); | 871 | typedef void (xfer_func_t)(ide_drive_t *, struct ide_cmd *, void *, unsigned); |
889 | 872 | ||
890 | extern struct mutex ide_setting_mtx; | 873 | extern struct mutex ide_setting_mtx; |
891 | 874 | ||
@@ -1061,10 +1044,11 @@ enum { | |||
1061 | }; | 1044 | }; |
1062 | 1045 | ||
1063 | /* DRV_NAME has to be defined in the driver before using the macro below */ | 1046 | /* DRV_NAME has to be defined in the driver before using the macro below */ |
1064 | #define __ide_debug_log(lvl, fmt, args...) \ | 1047 | #define __ide_debug_log(lvl, fmt, args...) \ |
1065 | { \ | 1048 | { \ |
1066 | if (unlikely(drive->debug_mask & lvl)) \ | 1049 | if (unlikely(drive->debug_mask & lvl)) \ |
1067 | printk(KERN_INFO DRV_NAME ": " fmt, ## args); \ | 1050 | printk(KERN_INFO DRV_NAME ": %s: " fmt "\n", \ |
1051 | __func__, ## args); \ | ||
1068 | } | 1052 | } |
1069 | 1053 | ||
1070 | /* | 1054 | /* |
@@ -1103,7 +1087,7 @@ int generic_ide_resume(struct device *); | |||
1103 | 1087 | ||
1104 | void ide_complete_power_step(ide_drive_t *, struct request *); | 1088 | void ide_complete_power_step(ide_drive_t *, struct request *); |
1105 | ide_startstop_t ide_start_power_step(ide_drive_t *, struct request *); | 1089 | ide_startstop_t ide_start_power_step(ide_drive_t *, struct request *); |
1106 | void ide_complete_pm_request(ide_drive_t *, struct request *); | 1090 | void ide_complete_pm_rq(ide_drive_t *, struct request *); |
1107 | void ide_check_pm_state(ide_drive_t *, struct request *); | 1091 | void ide_check_pm_state(ide_drive_t *, struct request *); |
1108 | 1092 | ||
1109 | /* | 1093 | /* |
@@ -1115,7 +1099,6 @@ void ide_check_pm_state(ide_drive_t *, struct request *); | |||
1115 | struct ide_driver { | 1099 | struct ide_driver { |
1116 | const char *version; | 1100 | const char *version; |
1117 | ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t); | 1101 | ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t); |
1118 | int (*end_request)(ide_drive_t *, int, int); | ||
1119 | struct device_driver gen_driver; | 1102 | struct device_driver gen_driver; |
1120 | int (*probe)(ide_drive_t *); | 1103 | int (*probe)(ide_drive_t *); |
1121 | void (*remove)(ide_drive_t *); | 1104 | void (*remove)(ide_drive_t *); |
@@ -1146,16 +1129,15 @@ int generic_ide_ioctl(ide_drive_t *, struct block_device *, unsigned, unsigned l | |||
1146 | extern int ide_vlb_clk; | 1129 | extern int ide_vlb_clk; |
1147 | extern int ide_pci_clk; | 1130 | extern int ide_pci_clk; |
1148 | 1131 | ||
1149 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); | 1132 | unsigned int ide_rq_bytes(struct request *); |
1150 | int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, | 1133 | int ide_end_rq(ide_drive_t *, struct request *, int, unsigned int); |
1151 | int uptodate, int nr_sectors); | 1134 | void ide_kill_rq(ide_drive_t *, struct request *); |
1152 | |||
1153 | extern void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry); | ||
1154 | 1135 | ||
1155 | void ide_execute_command(ide_drive_t *, u8, ide_handler_t *, unsigned int, | 1136 | void __ide_set_handler(ide_drive_t *, ide_handler_t *, unsigned int); |
1156 | ide_expiry_t *); | 1137 | void ide_set_handler(ide_drive_t *, ide_handler_t *, unsigned int); |
1157 | 1138 | ||
1158 | void ide_execute_pkt_cmd(ide_drive_t *); | 1139 | void ide_execute_command(ide_drive_t *, struct ide_cmd *, ide_handler_t *, |
1140 | unsigned int); | ||
1159 | 1141 | ||
1160 | void ide_pad_transfer(ide_drive_t *, int, int); | 1142 | void ide_pad_transfer(ide_drive_t *, int, int); |
1161 | 1143 | ||
@@ -1169,41 +1151,36 @@ int ide_busy_sleep(ide_hwif_t *, unsigned long, int); | |||
1169 | 1151 | ||
1170 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); | 1152 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); |
1171 | 1153 | ||
1154 | ide_startstop_t ide_do_park_unpark(ide_drive_t *, struct request *); | ||
1155 | ide_startstop_t ide_do_devset(ide_drive_t *, struct request *); | ||
1156 | |||
1172 | extern ide_startstop_t ide_do_reset (ide_drive_t *); | 1157 | extern ide_startstop_t ide_do_reset (ide_drive_t *); |
1173 | 1158 | ||
1174 | extern int ide_devset_execute(ide_drive_t *drive, | 1159 | extern int ide_devset_execute(ide_drive_t *drive, |
1175 | const struct ide_devset *setting, int arg); | 1160 | const struct ide_devset *setting, int arg); |
1176 | 1161 | ||
1177 | extern void ide_do_drive_cmd(ide_drive_t *, struct request *); | 1162 | void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8); |
1178 | 1163 | int ide_complete_rq(ide_drive_t *, int, unsigned int); | |
1179 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); | ||
1180 | 1164 | ||
1181 | void ide_tf_dump(const char *, struct ide_taskfile *); | 1165 | void ide_tf_dump(const char *, struct ide_taskfile *); |
1182 | 1166 | ||
1183 | void ide_exec_command(ide_hwif_t *, u8); | 1167 | void ide_exec_command(ide_hwif_t *, u8); |
1184 | u8 ide_read_status(ide_hwif_t *); | 1168 | u8 ide_read_status(ide_hwif_t *); |
1185 | u8 ide_read_altstatus(ide_hwif_t *); | 1169 | u8 ide_read_altstatus(ide_hwif_t *); |
1170 | void ide_write_devctl(ide_hwif_t *, u8); | ||
1186 | 1171 | ||
1187 | void ide_set_irq(ide_hwif_t *, int); | 1172 | void ide_dev_select(ide_drive_t *); |
1173 | void ide_tf_load(ide_drive_t *, struct ide_cmd *); | ||
1174 | void ide_tf_read(ide_drive_t *, struct ide_cmd *); | ||
1188 | 1175 | ||
1189 | void ide_tf_load(ide_drive_t *, ide_task_t *); | 1176 | void ide_input_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int); |
1190 | void ide_tf_read(ide_drive_t *, ide_task_t *); | 1177 | void ide_output_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int); |
1191 | 1178 | ||
1192 | void ide_input_data(ide_drive_t *, struct request *, void *, unsigned int); | ||
1193 | void ide_output_data(ide_drive_t *, struct request *, void *, unsigned int); | ||
1194 | |||
1195 | int ide_io_buffers(ide_drive_t *, struct ide_atapi_pc *, unsigned int, int); | ||
1196 | |||
1197 | extern void SELECT_DRIVE(ide_drive_t *); | ||
1198 | void SELECT_MASK(ide_drive_t *, int); | 1179 | void SELECT_MASK(ide_drive_t *, int); |
1199 | 1180 | ||
1200 | u8 ide_read_error(ide_drive_t *); | 1181 | u8 ide_read_error(ide_drive_t *); |
1201 | void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); | 1182 | void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); |
1202 | 1183 | ||
1203 | extern int drive_is_ready(ide_drive_t *); | ||
1204 | |||
1205 | void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8); | ||
1206 | |||
1207 | int ide_check_atapi_device(ide_drive_t *, const char *); | 1184 | int ide_check_atapi_device(ide_drive_t *, const char *); |
1208 | 1185 | ||
1209 | void ide_init_pc(struct ide_atapi_pc *); | 1186 | void ide_init_pc(struct ide_atapi_pc *); |
@@ -1240,16 +1217,20 @@ int ide_cd_expiry(ide_drive_t *); | |||
1240 | 1217 | ||
1241 | int ide_cd_get_xferlen(struct request *); | 1218 | int ide_cd_get_xferlen(struct request *); |
1242 | 1219 | ||
1243 | ide_startstop_t ide_issue_pc(ide_drive_t *); | 1220 | ide_startstop_t ide_issue_pc(ide_drive_t *, struct ide_cmd *); |
1221 | |||
1222 | ide_startstop_t do_rw_taskfile(ide_drive_t *, struct ide_cmd *); | ||
1244 | 1223 | ||
1245 | ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *); | 1224 | void ide_pio_bytes(ide_drive_t *, struct ide_cmd *, unsigned int, unsigned int); |
1246 | 1225 | ||
1247 | void task_end_request(ide_drive_t *, struct request *, u8); | 1226 | void ide_finish_cmd(ide_drive_t *, struct ide_cmd *, u8); |
1248 | 1227 | ||
1249 | int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16); | 1228 | int ide_raw_taskfile(ide_drive_t *, struct ide_cmd *, u8 *, u16); |
1250 | int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); | 1229 | int ide_no_data_taskfile(ide_drive_t *, struct ide_cmd *); |
1251 | 1230 | ||
1252 | int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long); | 1231 | int ide_taskfile_ioctl(ide_drive_t *, unsigned long); |
1232 | |||
1233 | int ide_dev_read_id(ide_drive_t *, u8, u16 *); | ||
1253 | 1234 | ||
1254 | extern int ide_driveid_update(ide_drive_t *); | 1235 | extern int ide_driveid_update(ide_drive_t *); |
1255 | extern int ide_config_drive_speed(ide_drive_t *, u8); | 1236 | extern int ide_config_drive_speed(ide_drive_t *, u8); |
@@ -1280,7 +1261,7 @@ static inline int ide_pci_is_in_compatibility_mode(struct pci_dev *dev) | |||
1280 | return 0; | 1261 | return 0; |
1281 | } | 1262 | } |
1282 | 1263 | ||
1283 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, | 1264 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, |
1284 | hw_regs_t *, hw_regs_t **); | 1265 | hw_regs_t *, hw_regs_t **); |
1285 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); | 1266 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); |
1286 | 1267 | ||
@@ -1349,10 +1330,10 @@ enum { | |||
1349 | IDE_HFLAG_ERROR_STOPS_FIFO = (1 << 19), | 1330 | IDE_HFLAG_ERROR_STOPS_FIFO = (1 << 19), |
1350 | /* serialize ports */ | 1331 | /* serialize ports */ |
1351 | IDE_HFLAG_SERIALIZE = (1 << 20), | 1332 | IDE_HFLAG_SERIALIZE = (1 << 20), |
1352 | /* use legacy IRQs */ | 1333 | /* host is DTC2278 */ |
1353 | IDE_HFLAG_LEGACY_IRQS = (1 << 21), | 1334 | IDE_HFLAG_DTC2278 = (1 << 21), |
1354 | /* force use of legacy IRQs */ | 1335 | /* 4 devices on a single set of I/O ports */ |
1355 | IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22), | 1336 | IDE_HFLAG_4DRIVES = (1 << 22), |
1356 | /* host is TRM290 */ | 1337 | /* host is TRM290 */ |
1357 | IDE_HFLAG_TRM290 = (1 << 23), | 1338 | IDE_HFLAG_TRM290 = (1 << 23), |
1358 | /* use 32-bit I/O ops */ | 1339 | /* use 32-bit I/O ops */ |
@@ -1380,7 +1361,12 @@ enum { | |||
1380 | 1361 | ||
1381 | struct ide_port_info { | 1362 | struct ide_port_info { |
1382 | char *name; | 1363 | char *name; |
1383 | unsigned int (*init_chipset)(struct pci_dev *); | 1364 | |
1365 | int (*init_chipset)(struct pci_dev *); | ||
1366 | |||
1367 | void (*get_lock)(irq_handler_t, void *); | ||
1368 | void (*release_lock)(void); | ||
1369 | |||
1384 | void (*init_iops)(ide_hwif_t *); | 1370 | void (*init_iops)(ide_hwif_t *); |
1385 | void (*init_hwif)(ide_hwif_t *); | 1371 | void (*init_hwif)(ide_hwif_t *); |
1386 | int (*init_dma)(ide_hwif_t *, | 1372 | int (*init_dma)(ide_hwif_t *, |
@@ -1397,6 +1383,9 @@ struct ide_port_info { | |||
1397 | u16 max_sectors; /* if < than the default one */ | 1383 | u16 max_sectors; /* if < than the default one */ |
1398 | 1384 | ||
1399 | u32 host_flags; | 1385 | u32 host_flags; |
1386 | |||
1387 | int irq_flags; | ||
1388 | |||
1400 | u8 pio_mask; | 1389 | u8 pio_mask; |
1401 | u8 swdma_mask; | 1390 | u8 swdma_mask; |
1402 | u8 mwdma_mask; | 1391 | u8 mwdma_mask; |
@@ -1416,8 +1405,8 @@ int ide_pci_resume(struct pci_dev *); | |||
1416 | #define ide_pci_resume NULL | 1405 | #define ide_pci_resume NULL |
1417 | #endif | 1406 | #endif |
1418 | 1407 | ||
1419 | void ide_map_sg(ide_drive_t *, struct request *); | 1408 | void ide_map_sg(ide_drive_t *, struct ide_cmd *); |
1420 | void ide_init_sg_cmd(ide_drive_t *, struct request *); | 1409 | void ide_init_sg_cmd(struct ide_cmd *, unsigned int); |
1421 | 1410 | ||
1422 | #define BAD_DMA_DRIVE 0 | 1411 | #define BAD_DMA_DRIVE 0 |
1423 | #define GOOD_DMA_DRIVE 1 | 1412 | #define GOOD_DMA_DRIVE 1 |
@@ -1451,18 +1440,18 @@ ide_startstop_t ide_dma_intr(ide_drive_t *); | |||
1451 | int ide_allocate_dma_engine(ide_hwif_t *); | 1440 | int ide_allocate_dma_engine(ide_hwif_t *); |
1452 | void ide_release_dma_engine(ide_hwif_t *); | 1441 | void ide_release_dma_engine(ide_hwif_t *); |
1453 | 1442 | ||
1454 | int ide_build_sglist(ide_drive_t *, struct request *); | 1443 | int ide_dma_prepare(ide_drive_t *, struct ide_cmd *); |
1455 | void ide_destroy_dmatable(ide_drive_t *); | 1444 | void ide_dma_unmap_sg(ide_drive_t *, struct ide_cmd *); |
1456 | 1445 | ||
1457 | #ifdef CONFIG_BLK_DEV_IDEDMA_SFF | 1446 | #ifdef CONFIG_BLK_DEV_IDEDMA_SFF |
1458 | int config_drive_for_dma(ide_drive_t *); | 1447 | int config_drive_for_dma(ide_drive_t *); |
1459 | extern int ide_build_dmatable(ide_drive_t *, struct request *); | 1448 | int ide_build_dmatable(ide_drive_t *, struct ide_cmd *); |
1460 | void ide_dma_host_set(ide_drive_t *, int); | 1449 | void ide_dma_host_set(ide_drive_t *, int); |
1461 | extern int ide_dma_setup(ide_drive_t *); | 1450 | int ide_dma_setup(ide_drive_t *, struct ide_cmd *); |
1462 | void ide_dma_exec_cmd(ide_drive_t *, u8); | ||
1463 | extern void ide_dma_start(ide_drive_t *); | 1451 | extern void ide_dma_start(ide_drive_t *); |
1464 | int ide_dma_end(ide_drive_t *); | 1452 | int ide_dma_end(ide_drive_t *); |
1465 | int ide_dma_test_irq(ide_drive_t *); | 1453 | int ide_dma_test_irq(ide_drive_t *); |
1454 | int ide_dma_sff_timer_expiry(ide_drive_t *); | ||
1466 | u8 ide_dma_sff_read_status(ide_hwif_t *); | 1455 | u8 ide_dma_sff_read_status(ide_hwif_t *); |
1467 | extern const struct ide_dma_ops sff_dma_ops; | 1456 | extern const struct ide_dma_ops sff_dma_ops; |
1468 | #else | 1457 | #else |
@@ -1470,7 +1459,7 @@ static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; } | |||
1470 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ | 1459 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ |
1471 | 1460 | ||
1472 | void ide_dma_lost_irq(ide_drive_t *); | 1461 | void ide_dma_lost_irq(ide_drive_t *); |
1473 | void ide_dma_timeout(ide_drive_t *); | 1462 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); |
1474 | 1463 | ||
1475 | #else | 1464 | #else |
1476 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } | 1465 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } |
@@ -1482,21 +1471,29 @@ static inline void ide_dma_on(ide_drive_t *drive) { ; } | |||
1482 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } | 1471 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } |
1483 | static inline int ide_set_dma(ide_drive_t *drive) { return 1; } | 1472 | static inline int ide_set_dma(ide_drive_t *drive) { return 1; } |
1484 | static inline void ide_check_dma_crc(ide_drive_t *drive) { ; } | 1473 | static inline void ide_check_dma_crc(ide_drive_t *drive) { ; } |
1474 | static inline ide_startstop_t ide_dma_intr(ide_drive_t *drive) { return ide_stopped; } | ||
1475 | static inline ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) { return ide_stopped; } | ||
1485 | static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; } | 1476 | static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; } |
1477 | static inline int ide_dma_prepare(ide_drive_t *drive, | ||
1478 | struct ide_cmd *cmd) { return 1; } | ||
1479 | static inline void ide_dma_unmap_sg(ide_drive_t *drive, | ||
1480 | struct ide_cmd *cmd) { ; } | ||
1486 | #endif /* CONFIG_BLK_DEV_IDEDMA */ | 1481 | #endif /* CONFIG_BLK_DEV_IDEDMA */ |
1487 | 1482 | ||
1488 | #ifdef CONFIG_BLK_DEV_IDEACPI | 1483 | #ifdef CONFIG_BLK_DEV_IDEACPI |
1484 | int ide_acpi_init(void); | ||
1489 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); | 1485 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); |
1490 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); | 1486 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); |
1491 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); | 1487 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); |
1492 | extern void ide_acpi_init(ide_hwif_t *hwif); | 1488 | void ide_acpi_init_port(ide_hwif_t *); |
1493 | void ide_acpi_port_init_devices(ide_hwif_t *); | 1489 | void ide_acpi_port_init_devices(ide_hwif_t *); |
1494 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); | 1490 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); |
1495 | #else | 1491 | #else |
1492 | static inline int ide_acpi_init(void) { return 0; } | ||
1496 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } | 1493 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } |
1497 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } | 1494 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } |
1498 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } | 1495 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } |
1499 | static inline void ide_acpi_init(ide_hwif_t *hwif) { ; } | 1496 | static inline void ide_acpi_init_port(ide_hwif_t *hwif) { ; } |
1500 | static inline void ide_acpi_port_init_devices(ide_hwif_t *hwif) { ; } | 1497 | static inline void ide_acpi_port_init_devices(ide_hwif_t *hwif) { ; } |
1501 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} | 1498 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} |
1502 | #endif | 1499 | #endif |
@@ -1530,9 +1527,7 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data) | |||
1530 | hwif->hwif_data = data; | 1527 | hwif->hwif_data = data; |
1531 | } | 1528 | } |
1532 | 1529 | ||
1533 | const char *ide_xfer_verbose(u8 mode); | ||
1534 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); | 1530 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); |
1535 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); | ||
1536 | 1531 | ||
1537 | u64 ide_get_lba_addr(struct ide_taskfile *, int); | 1532 | u64 ide_get_lba_addr(struct ide_taskfile *, int); |
1538 | u8 ide_dump_status(ide_drive_t *, const char *, u8); | 1533 | u8 ide_dump_status(ide_drive_t *, const char *, u8); |
@@ -1571,14 +1566,18 @@ void ide_timing_merge(struct ide_timing *, struct ide_timing *, | |||
1571 | struct ide_timing *, unsigned int); | 1566 | struct ide_timing *, unsigned int); |
1572 | int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); | 1567 | int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); |
1573 | 1568 | ||
1569 | #ifdef CONFIG_IDE_XFER_MODE | ||
1574 | int ide_scan_pio_blacklist(char *); | 1570 | int ide_scan_pio_blacklist(char *); |
1575 | 1571 | const char *ide_xfer_verbose(u8); | |
1576 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); | 1572 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); |
1577 | |||
1578 | int ide_set_pio_mode(ide_drive_t *, u8); | 1573 | int ide_set_pio_mode(ide_drive_t *, u8); |
1579 | int ide_set_dma_mode(ide_drive_t *, u8); | 1574 | int ide_set_dma_mode(ide_drive_t *, u8); |
1580 | |||
1581 | void ide_set_pio(ide_drive_t *, u8); | 1575 | void ide_set_pio(ide_drive_t *, u8); |
1576 | int ide_set_xfer_rate(ide_drive_t *, u8); | ||
1577 | #else | ||
1578 | static inline void ide_set_pio(ide_drive_t *drive, u8 pio) { ; } | ||
1579 | static inline int ide_set_xfer_rate(ide_drive_t *drive, u8 rate) { return -1; } | ||
1580 | #endif | ||
1582 | 1581 | ||
1583 | static inline void ide_set_max_pio(ide_drive_t *drive) | 1582 | static inline void ide_set_max_pio(ide_drive_t *drive) |
1584 | { | 1583 | { |
@@ -1611,6 +1610,10 @@ static inline ide_drive_t *ide_get_pair_dev(ide_drive_t *drive) | |||
1611 | #define ide_port_for_each_dev(i, dev, port) \ | 1610 | #define ide_port_for_each_dev(i, dev, port) \ |
1612 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) | 1611 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) |
1613 | 1612 | ||
1613 | #define ide_port_for_each_present_dev(i, dev, port) \ | ||
1614 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) \ | ||
1615 | if ((dev)->dev_flags & IDE_DFLAG_PRESENT) | ||
1616 | |||
1614 | #define ide_host_for_each_port(i, port, host) \ | 1617 | #define ide_host_for_each_port(i, port, host) \ |
1615 | for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) | 1618 | for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) |
1616 | 1619 | ||
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index c4e6ca1a6306..4b501b48ce86 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -18,6 +18,22 @@ | |||
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <asm/byteorder.h> | 19 | #include <asm/byteorder.h> |
20 | 20 | ||
21 | /* | ||
22 | * DS bit usage | ||
23 | * | ||
24 | * TA = transmitter address | ||
25 | * RA = receiver address | ||
26 | * DA = destination address | ||
27 | * SA = source address | ||
28 | * | ||
29 | * ToDS FromDS A1(RA) A2(TA) A3 A4 Use | ||
30 | * ----------------------------------------------------------------- | ||
31 | * 0 0 DA SA BSSID - IBSS/DLS | ||
32 | * 0 1 DA BSSID SA - AP -> STA | ||
33 | * 1 0 BSSID SA DA - AP <- STA | ||
34 | * 1 1 RA TA DA SA unspecified (WDS) | ||
35 | */ | ||
36 | |||
21 | #define FCS_LEN 4 | 37 | #define FCS_LEN 4 |
22 | 38 | ||
23 | #define IEEE80211_FCTL_VERS 0x0003 | 39 | #define IEEE80211_FCTL_VERS 0x0003 |
@@ -527,6 +543,8 @@ struct ieee80211_tim_ie { | |||
527 | u8 virtual_map[0]; | 543 | u8 virtual_map[0]; |
528 | } __attribute__ ((packed)); | 544 | } __attribute__ ((packed)); |
529 | 545 | ||
546 | #define WLAN_SA_QUERY_TR_ID_LEN 16 | ||
547 | |||
530 | struct ieee80211_mgmt { | 548 | struct ieee80211_mgmt { |
531 | __le16 frame_control; | 549 | __le16 frame_control; |
532 | __le16 duration; | 550 | __le16 duration; |
@@ -646,6 +664,10 @@ struct ieee80211_mgmt { | |||
646 | u8 action_code; | 664 | u8 action_code; |
647 | u8 variable[0]; | 665 | u8 variable[0]; |
648 | } __attribute__((packed)) mesh_action; | 666 | } __attribute__((packed)) mesh_action; |
667 | struct { | ||
668 | u8 action; | ||
669 | u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; | ||
670 | } __attribute__ ((packed)) sa_query; | ||
649 | } u; | 671 | } u; |
650 | } __attribute__ ((packed)) action; | 672 | } __attribute__ ((packed)) action; |
651 | } u; | 673 | } u; |
@@ -655,6 +677,15 @@ struct ieee80211_mgmt { | |||
655 | #define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u) | 677 | #define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u) |
656 | 678 | ||
657 | 679 | ||
680 | /* Management MIC information element (IEEE 802.11w) */ | ||
681 | struct ieee80211_mmie { | ||
682 | u8 element_id; | ||
683 | u8 length; | ||
684 | __le16 key_id; | ||
685 | u8 sequence_number[6]; | ||
686 | u8 mic[8]; | ||
687 | } __attribute__ ((packed)); | ||
688 | |||
658 | /* Control frames */ | 689 | /* Control frames */ |
659 | struct ieee80211_rts { | 690 | struct ieee80211_rts { |
660 | __le16 frame_control; | 691 | __le16 frame_control; |
@@ -836,6 +867,7 @@ struct ieee80211_ht_info { | |||
836 | /* Authentication algorithms */ | 867 | /* Authentication algorithms */ |
837 | #define WLAN_AUTH_OPEN 0 | 868 | #define WLAN_AUTH_OPEN 0 |
838 | #define WLAN_AUTH_SHARED_KEY 1 | 869 | #define WLAN_AUTH_SHARED_KEY 1 |
870 | #define WLAN_AUTH_FT 2 | ||
839 | #define WLAN_AUTH_LEAP 128 | 871 | #define WLAN_AUTH_LEAP 128 |
840 | 872 | ||
841 | #define WLAN_AUTH_CHALLENGE_LEN 128 | 873 | #define WLAN_AUTH_CHALLENGE_LEN 128 |
@@ -899,6 +931,9 @@ enum ieee80211_statuscode { | |||
899 | /* 802.11g */ | 931 | /* 802.11g */ |
900 | WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME = 25, | 932 | WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME = 25, |
901 | WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM = 26, | 933 | WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM = 26, |
934 | /* 802.11w */ | ||
935 | WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY = 30, | ||
936 | WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION = 31, | ||
902 | /* 802.11i */ | 937 | /* 802.11i */ |
903 | WLAN_STATUS_INVALID_IE = 40, | 938 | WLAN_STATUS_INVALID_IE = 40, |
904 | WLAN_STATUS_INVALID_GROUP_CIPHER = 41, | 939 | WLAN_STATUS_INVALID_GROUP_CIPHER = 41, |
@@ -1018,6 +1053,8 @@ enum ieee80211_eid { | |||
1018 | WLAN_EID_HT_INFORMATION = 61, | 1053 | WLAN_EID_HT_INFORMATION = 61, |
1019 | /* 802.11i */ | 1054 | /* 802.11i */ |
1020 | WLAN_EID_RSN = 48, | 1055 | WLAN_EID_RSN = 48, |
1056 | WLAN_EID_TIMEOUT_INTERVAL = 56, | ||
1057 | WLAN_EID_MMIE = 76 /* 802.11w */, | ||
1021 | WLAN_EID_WPA = 221, | 1058 | WLAN_EID_WPA = 221, |
1022 | WLAN_EID_GENERIC = 221, | 1059 | WLAN_EID_GENERIC = 221, |
1023 | WLAN_EID_VENDOR_SPECIFIC = 221, | 1060 | WLAN_EID_VENDOR_SPECIFIC = 221, |
@@ -1030,6 +1067,8 @@ enum ieee80211_category { | |||
1030 | WLAN_CATEGORY_QOS = 1, | 1067 | WLAN_CATEGORY_QOS = 1, |
1031 | WLAN_CATEGORY_DLS = 2, | 1068 | WLAN_CATEGORY_DLS = 2, |
1032 | WLAN_CATEGORY_BACK = 3, | 1069 | WLAN_CATEGORY_BACK = 3, |
1070 | WLAN_CATEGORY_PUBLIC = 4, | ||
1071 | WLAN_CATEGORY_SA_QUERY = 8, | ||
1033 | WLAN_CATEGORY_WMM = 17, | 1072 | WLAN_CATEGORY_WMM = 17, |
1034 | }; | 1073 | }; |
1035 | 1074 | ||
@@ -1104,6 +1143,12 @@ struct ieee80211_country_ie_triplet { | |||
1104 | }; | 1143 | }; |
1105 | } __attribute__ ((packed)); | 1144 | } __attribute__ ((packed)); |
1106 | 1145 | ||
1146 | enum ieee80211_timeout_interval_type { | ||
1147 | WLAN_TIMEOUT_REASSOC_DEADLINE = 1 /* 802.11r */, | ||
1148 | WLAN_TIMEOUT_KEY_LIFETIME = 2 /* 802.11r */, | ||
1149 | WLAN_TIMEOUT_ASSOC_COMEBACK = 3 /* 802.11w */, | ||
1150 | }; | ||
1151 | |||
1107 | /* BACK action code */ | 1152 | /* BACK action code */ |
1108 | enum ieee80211_back_actioncode { | 1153 | enum ieee80211_back_actioncode { |
1109 | WLAN_ACTION_ADDBA_REQ = 0, | 1154 | WLAN_ACTION_ADDBA_REQ = 0, |
@@ -1118,6 +1163,13 @@ enum ieee80211_back_parties { | |||
1118 | WLAN_BACK_TIMER = 2, | 1163 | WLAN_BACK_TIMER = 2, |
1119 | }; | 1164 | }; |
1120 | 1165 | ||
1166 | /* SA Query action */ | ||
1167 | enum ieee80211_sa_query_action { | ||
1168 | WLAN_ACTION_SA_QUERY_REQUEST = 0, | ||
1169 | WLAN_ACTION_SA_QUERY_RESPONSE = 1, | ||
1170 | }; | ||
1171 | |||
1172 | |||
1121 | /* A-MSDU 802.11n */ | 1173 | /* A-MSDU 802.11n */ |
1122 | #define IEEE80211_QOS_CONTROL_A_MSDU_PRESENT 0x0080 | 1174 | #define IEEE80211_QOS_CONTROL_A_MSDU_PRESENT 0x0080 |
1123 | 1175 | ||
@@ -1128,6 +1180,7 @@ enum ieee80211_back_parties { | |||
1128 | /* reserved: 0x000FAC03 */ | 1180 | /* reserved: 0x000FAC03 */ |
1129 | #define WLAN_CIPHER_SUITE_CCMP 0x000FAC04 | 1181 | #define WLAN_CIPHER_SUITE_CCMP 0x000FAC04 |
1130 | #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05 | 1182 | #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05 |
1183 | #define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06 | ||
1131 | 1184 | ||
1132 | #define WLAN_MAX_KEY_LEN 32 | 1185 | #define WLAN_MAX_KEY_LEN 32 |
1133 | 1186 | ||
@@ -1185,4 +1238,149 @@ static inline u8 *ieee80211_get_DA(struct ieee80211_hdr *hdr) | |||
1185 | return hdr->addr1; | 1238 | return hdr->addr1; |
1186 | } | 1239 | } |
1187 | 1240 | ||
1241 | /** | ||
1242 | * ieee80211_is_robust_mgmt_frame - check if frame is a robust management frame | ||
1243 | * @hdr: the frame (buffer must include at least the first octet of payload) | ||
1244 | */ | ||
1245 | static inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr) | ||
1246 | { | ||
1247 | if (ieee80211_is_disassoc(hdr->frame_control) || | ||
1248 | ieee80211_is_deauth(hdr->frame_control)) | ||
1249 | return true; | ||
1250 | |||
1251 | if (ieee80211_is_action(hdr->frame_control)) { | ||
1252 | u8 *category; | ||
1253 | |||
1254 | /* | ||
1255 | * Action frames, excluding Public Action frames, are Robust | ||
1256 | * Management Frames. However, if we are looking at a Protected | ||
1257 | * frame, skip the check since the data may be encrypted and | ||
1258 | * the frame has already been found to be a Robust Management | ||
1259 | * Frame (by the other end). | ||
1260 | */ | ||
1261 | if (ieee80211_has_protected(hdr->frame_control)) | ||
1262 | return true; | ||
1263 | category = ((u8 *) hdr) + 24; | ||
1264 | return *category != WLAN_CATEGORY_PUBLIC; | ||
1265 | } | ||
1266 | |||
1267 | return false; | ||
1268 | } | ||
1269 | |||
1270 | /** | ||
1271 | * ieee80211_fhss_chan_to_freq - get channel frequency | ||
1272 | * @channel: the FHSS channel | ||
1273 | * | ||
1274 | * Convert IEEE802.11 FHSS channel to frequency (MHz) | ||
1275 | * Ref IEEE 802.11-2007 section 14.6 | ||
1276 | */ | ||
1277 | static inline int ieee80211_fhss_chan_to_freq(int channel) | ||
1278 | { | ||
1279 | if ((channel > 1) && (channel < 96)) | ||
1280 | return channel + 2400; | ||
1281 | else | ||
1282 | return -1; | ||
1283 | } | ||
1284 | |||
1285 | /** | ||
1286 | * ieee80211_freq_to_fhss_chan - get channel | ||
1287 | * @freq: the channels frequency | ||
1288 | * | ||
1289 | * Convert frequency (MHz) to IEEE802.11 FHSS channel | ||
1290 | * Ref IEEE 802.11-2007 section 14.6 | ||
1291 | */ | ||
1292 | static inline int ieee80211_freq_to_fhss_chan(int freq) | ||
1293 | { | ||
1294 | if ((freq > 2401) && (freq < 2496)) | ||
1295 | return freq - 2400; | ||
1296 | else | ||
1297 | return -1; | ||
1298 | } | ||
1299 | |||
1300 | /** | ||
1301 | * ieee80211_dsss_chan_to_freq - get channel center frequency | ||
1302 | * @channel: the DSSS channel | ||
1303 | * | ||
1304 | * Convert IEEE802.11 DSSS channel to the center frequency (MHz). | ||
1305 | * Ref IEEE 802.11-2007 section 15.6 | ||
1306 | */ | ||
1307 | static inline int ieee80211_dsss_chan_to_freq(int channel) | ||
1308 | { | ||
1309 | if ((channel > 0) && (channel < 14)) | ||
1310 | return 2407 + (channel * 5); | ||
1311 | else if (channel == 14) | ||
1312 | return 2484; | ||
1313 | else | ||
1314 | return -1; | ||
1315 | } | ||
1316 | |||
1317 | /** | ||
1318 | * ieee80211_freq_to_dsss_chan - get channel | ||
1319 | * @freq: the frequency | ||
1320 | * | ||
1321 | * Convert frequency (MHz) to IEEE802.11 DSSS channel | ||
1322 | * Ref IEEE 802.11-2007 section 15.6 | ||
1323 | * | ||
1324 | * This routine selects the channel with the closest center frequency. | ||
1325 | */ | ||
1326 | static inline int ieee80211_freq_to_dsss_chan(int freq) | ||
1327 | { | ||
1328 | if ((freq >= 2410) && (freq < 2475)) | ||
1329 | return (freq - 2405) / 5; | ||
1330 | else if ((freq >= 2482) && (freq < 2487)) | ||
1331 | return 14; | ||
1332 | else | ||
1333 | return -1; | ||
1334 | } | ||
1335 | |||
1336 | /* Convert IEEE802.11 HR DSSS channel to frequency (MHz) and back | ||
1337 | * Ref IEEE 802.11-2007 section 18.4.6.2 | ||
1338 | * | ||
1339 | * The channels and frequencies are the same as those defined for DSSS | ||
1340 | */ | ||
1341 | #define ieee80211_hr_chan_to_freq(chan) ieee80211_dsss_chan_to_freq(chan) | ||
1342 | #define ieee80211_freq_to_hr_chan(freq) ieee80211_freq_to_dsss_chan(freq) | ||
1343 | |||
1344 | /* Convert IEEE802.11 ERP channel to frequency (MHz) and back | ||
1345 | * Ref IEEE 802.11-2007 section 19.4.2 | ||
1346 | */ | ||
1347 | #define ieee80211_erp_chan_to_freq(chan) ieee80211_hr_chan_to_freq(chan) | ||
1348 | #define ieee80211_freq_to_erp_chan(freq) ieee80211_freq_to_hr_chan(freq) | ||
1349 | |||
1350 | /** | ||
1351 | * ieee80211_ofdm_chan_to_freq - get channel center frequency | ||
1352 | * @s_freq: starting frequency == (dotChannelStartingFactor/2) MHz | ||
1353 | * @channel: the OFDM channel | ||
1354 | * | ||
1355 | * Convert IEEE802.11 OFDM channel to center frequency (MHz) | ||
1356 | * Ref IEEE 802.11-2007 section 17.3.8.3.2 | ||
1357 | */ | ||
1358 | static inline int ieee80211_ofdm_chan_to_freq(int s_freq, int channel) | ||
1359 | { | ||
1360 | if ((channel > 0) && (channel <= 200) && | ||
1361 | (s_freq >= 4000)) | ||
1362 | return s_freq + (channel * 5); | ||
1363 | else | ||
1364 | return -1; | ||
1365 | } | ||
1366 | |||
1367 | /** | ||
1368 | * ieee80211_freq_to_ofdm_channel - get channel | ||
1369 | * @s_freq: starting frequency == (dotChannelStartingFactor/2) MHz | ||
1370 | * @freq: the frequency | ||
1371 | * | ||
1372 | * Convert frequency (MHz) to IEEE802.11 OFDM channel | ||
1373 | * Ref IEEE 802.11-2007 section 17.3.8.3.2 | ||
1374 | * | ||
1375 | * This routine selects the channel with the closest center frequency. | ||
1376 | */ | ||
1377 | static inline int ieee80211_freq_to_ofdm_chan(int s_freq, int freq) | ||
1378 | { | ||
1379 | if ((freq > (s_freq + 2)) && (freq <= (s_freq + 1202)) && | ||
1380 | (s_freq >= 4000)) | ||
1381 | return (freq + 2 - s_freq) / 5; | ||
1382 | else | ||
1383 | return -1; | ||
1384 | } | ||
1385 | |||
1188 | #endif /* LINUX_IEEE80211_H */ | 1386 | #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_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..cfe4fe1b7132 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 */ |
@@ -78,12 +78,13 @@ | |||
78 | #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ | 78 | #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ |
79 | #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ | 79 | #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ |
80 | #define ETH_P_TIPC 0x88CA /* TIPC */ | 80 | #define ETH_P_TIPC 0x88CA /* TIPC */ |
81 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ | ||
81 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ | 82 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ |
82 | 83 | ||
83 | /* | 84 | /* |
84 | * Non DIX types. Won't clash for 1500 types. | 85 | * Non DIX types. Won't clash for 1500 types. |
85 | */ | 86 | */ |
86 | 87 | ||
87 | #define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */ | 88 | #define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */ |
88 | #define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */ | 89 | #define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */ |
89 | #define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */ | 90 | #define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */ |
@@ -109,7 +110,7 @@ | |||
109 | /* | 110 | /* |
110 | * This is an Ethernet frame header. | 111 | * This is an Ethernet frame header. |
111 | */ | 112 | */ |
112 | 113 | ||
113 | struct ethhdr { | 114 | struct ethhdr { |
114 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ | 115 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ |
115 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ | 116 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ |
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h index 60e16a551dd6..673f2209453d 100644 --- a/include/linux/if_frad.h +++ b/include/linux/if_frad.h | |||
@@ -153,7 +153,6 @@ struct frhdr | |||
153 | 153 | ||
154 | struct dlci_local | 154 | struct dlci_local |
155 | { | 155 | { |
156 | struct net_device_stats stats; | ||
157 | struct net_device *master; | 156 | struct net_device *master; |
158 | struct net_device *slave; | 157 | struct net_device *slave; |
159 | struct dlci_conf config; | 158 | struct dlci_conf config; |
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_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 82c43624c067..5a9aae4adb44 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -16,14 +16,14 @@ | |||
16 | #define SIOCDELPRL (SIOCDEVPRIVATE + 6) | 16 | #define SIOCDELPRL (SIOCDEVPRIVATE + 6) |
17 | #define SIOCCHGPRL (SIOCDEVPRIVATE + 7) | 17 | #define SIOCCHGPRL (SIOCDEVPRIVATE + 7) |
18 | 18 | ||
19 | #define GRE_CSUM __constant_htons(0x8000) | 19 | #define GRE_CSUM __cpu_to_be16(0x8000) |
20 | #define GRE_ROUTING __constant_htons(0x4000) | 20 | #define GRE_ROUTING __cpu_to_be16(0x4000) |
21 | #define GRE_KEY __constant_htons(0x2000) | 21 | #define GRE_KEY __cpu_to_be16(0x2000) |
22 | #define GRE_SEQ __constant_htons(0x1000) | 22 | #define GRE_SEQ __cpu_to_be16(0x1000) |
23 | #define GRE_STRICT __constant_htons(0x0800) | 23 | #define GRE_STRICT __cpu_to_be16(0x0800) |
24 | #define GRE_REC __constant_htons(0x0700) | 24 | #define GRE_REC __cpu_to_be16(0x0700) |
25 | #define GRE_FLAGS __constant_htons(0x00F8) | 25 | #define GRE_FLAGS __cpu_to_be16(0x00F8) |
26 | #define GRE_VERSION __constant_htons(0x0007) | 26 | #define GRE_VERSION __cpu_to_be16(0x0007) |
27 | 27 | ||
28 | struct ip_tunnel_parm | 28 | struct ip_tunnel_parm |
29 | { | 29 | { |
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/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 e752d973fa21..af1de95e711e 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -147,6 +147,7 @@ extern struct cred init_cred; | |||
147 | .nr_cpus_allowed = NR_CPUS, \ | 147 | .nr_cpus_allowed = NR_CPUS, \ |
148 | }, \ | 148 | }, \ |
149 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ | 149 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ |
150 | .pushable_tasks = PLIST_NODE_INIT(tsk.pushable_tasks, MAX_PRIO), \ | ||
150 | .ptraced = LIST_HEAD_INIT(tsk.ptraced), \ | 151 | .ptraced = LIST_HEAD_INIT(tsk.ptraced), \ |
151 | .ptrace_entry = LIST_HEAD_INIT(tsk.ptrace_entry), \ | 152 | .ptrace_entry = LIST_HEAD_INIT(tsk.ptrace_entry), \ |
152 | .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 d2e3cbfba14f..1d6c71d96ede 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h | |||
@@ -292,6 +292,8 @@ struct intel_iommu { | |||
292 | spinlock_t register_lock; /* protect register handling */ | 292 | spinlock_t register_lock; /* protect register handling */ |
293 | int seq_id; /* sequence id of the iommu */ | 293 | int seq_id; /* sequence id of the iommu */ |
294 | int agaw; /* agaw of this iommu */ | 294 | int agaw; /* agaw of this iommu */ |
295 | unsigned int irq; | ||
296 | unsigned char name[13]; /* Device Name */ | ||
295 | 297 | ||
296 | #ifdef CONFIG_DMAR | 298 | #ifdef CONFIG_DMAR |
297 | unsigned long *domain_ids; /* bitmap of domains */ | 299 | unsigned long *domain_ids; /* bitmap of domains */ |
@@ -299,8 +301,6 @@ struct intel_iommu { | |||
299 | spinlock_t lock; /* protect context, domain ids */ | 301 | spinlock_t lock; /* protect context, domain ids */ |
300 | struct root_entry *root_entry; /* virtual address */ | 302 | struct root_entry *root_entry; /* virtual address */ |
301 | 303 | ||
302 | unsigned int irq; | ||
303 | unsigned char name[7]; /* Device Name */ | ||
304 | struct iommu_flush flush; | 304 | struct iommu_flush flush; |
305 | #endif | 305 | #endif |
306 | struct q_inval *qi; /* Queued invalidation info */ | 306 | struct q_inval *qi; /* Queued invalidation info */ |
@@ -321,6 +321,7 @@ extern struct dmar_drhd_unit * dmar_find_matched_drhd_unit(struct pci_dev *dev); | |||
321 | extern int alloc_iommu(struct dmar_drhd_unit *drhd); | 321 | extern int alloc_iommu(struct dmar_drhd_unit *drhd); |
322 | extern void free_iommu(struct intel_iommu *iommu); | 322 | extern void free_iommu(struct intel_iommu *iommu); |
323 | extern int dmar_enable_qi(struct intel_iommu *iommu); | 323 | extern int dmar_enable_qi(struct intel_iommu *iommu); |
324 | extern void dmar_disable_qi(struct intel_iommu *iommu); | ||
324 | extern void qi_global_iec(struct intel_iommu *iommu); | 325 | extern void qi_global_iec(struct intel_iommu *iommu); |
325 | 326 | ||
326 | extern int qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid, | 327 | extern int qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid, |
@@ -331,11 +332,4 @@ extern int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr, | |||
331 | 332 | ||
332 | extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); | 333 | extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); |
333 | 334 | ||
334 | extern void *intel_alloc_coherent(struct device *, size_t, dma_addr_t *, gfp_t); | ||
335 | extern void intel_free_coherent(struct device *, size_t, void *, dma_addr_t); | ||
336 | extern dma_addr_t intel_map_single(struct device *, phys_addr_t, size_t, int); | ||
337 | extern void intel_unmap_single(struct device *, dma_addr_t, size_t, int); | ||
338 | extern int intel_map_sg(struct device *, struct scatterlist *, int, int); | ||
339 | extern void intel_unmap_sg(struct device *, struct scatterlist *, int, int); | ||
340 | |||
341 | #endif | 335 | #endif |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 9b7e9d743476..ce2c07d99fc3 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; |
@@ -106,6 +117,15 @@ extern void disable_irq_nosync(unsigned int irq); | |||
106 | extern void disable_irq(unsigned int irq); | 117 | extern void disable_irq(unsigned int irq); |
107 | extern void enable_irq(unsigned int irq); | 118 | extern void enable_irq(unsigned int irq); |
108 | 119 | ||
120 | /* The following three functions are for the core kernel use only. */ | ||
121 | extern void suspend_device_irqs(void); | ||
122 | extern void resume_device_irqs(void); | ||
123 | #ifdef CONFIG_PM_SLEEP | ||
124 | extern int check_wakeup_irqs(void); | ||
125 | #else | ||
126 | static inline int check_wakeup_irqs(void) { return 0; } | ||
127 | #endif | ||
128 | |||
109 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS) | 129 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS) |
110 | 130 | ||
111 | extern cpumask_var_t irq_default_affinity; | 131 | extern cpumask_var_t irq_default_affinity; |
@@ -467,6 +487,12 @@ static inline void init_irq_proc(void) | |||
467 | } | 487 | } |
468 | #endif | 488 | #endif |
469 | 489 | ||
490 | #if defined(CONFIG_GENERIC_HARDIRQS) && defined(CONFIG_DEBUG_SHIRQ) | ||
491 | extern void debug_poll_all_shared_irqs(void); | ||
492 | #else | ||
493 | static inline void debug_poll_all_shared_irqs(void) { } | ||
494 | #endif | ||
495 | |||
470 | int show_interrupts(struct seq_file *p, void *v); | 496 | int show_interrupts(struct seq_file *p, void *v); |
471 | 497 | ||
472 | struct irq_desc; | 498 | struct irq_desc; |
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/ipmi_smi.h b/include/linux/ipmi_smi.h index 62b73668b602..f7c9c75a2775 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
@@ -230,6 +230,6 @@ static inline void ipmi_free_smi_msg(struct ipmi_smi_msg *msg) | |||
230 | automatically be dstroyed when the interface is destroyed. */ | 230 | automatically be dstroyed when the interface is destroyed. */ |
231 | int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name, | 231 | int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name, |
232 | read_proc_t *read_proc, | 232 | read_proc_t *read_proc, |
233 | void *data, struct module *owner); | 233 | void *data); |
234 | 234 | ||
235 | #endif /* __LINUX_IPMI_SMI_H */ | 235 | #endif /* __LINUX_IPMI_SMI_H */ |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 27a67536511e..974890b3c52f 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -17,9 +17,11 @@ | |||
17 | #include <linux/cache.h> | 17 | #include <linux/cache.h> |
18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
19 | #include <linux/cpumask.h> | 19 | #include <linux/cpumask.h> |
20 | #include <linux/gfp.h> | ||
20 | #include <linux/irqreturn.h> | 21 | #include <linux/irqreturn.h> |
21 | #include <linux/irqnr.h> | 22 | #include <linux/irqnr.h> |
22 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <linux/topology.h> | ||
23 | 25 | ||
24 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
25 | #include <asm/ptrace.h> | 27 | #include <asm/ptrace.h> |
@@ -65,6 +67,7 @@ typedef void (*irq_flow_handler_t)(unsigned int irq, | |||
65 | #define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ | 67 | #define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ |
66 | #define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */ | 68 | #define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */ |
67 | #define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/ | 69 | #define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/ |
70 | #define IRQ_SUSPENDED 0x04000000 /* IRQ has gone through suspend sequence */ | ||
68 | 71 | ||
69 | #ifdef CONFIG_IRQ_PER_CPU | 72 | #ifdef CONFIG_IRQ_PER_CPU |
70 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 73 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
@@ -160,12 +163,10 @@ struct irq_2_iommu; | |||
160 | */ | 163 | */ |
161 | struct irq_desc { | 164 | struct irq_desc { |
162 | unsigned int irq; | 165 | unsigned int irq; |
163 | #ifdef CONFIG_SPARSE_IRQ | ||
164 | struct timer_rand_state *timer_rand_state; | 166 | struct timer_rand_state *timer_rand_state; |
165 | unsigned int *kstat_irqs; | 167 | unsigned int *kstat_irqs; |
166 | # ifdef CONFIG_INTR_REMAP | 168 | #ifdef CONFIG_INTR_REMAP |
167 | struct irq_2_iommu *irq_2_iommu; | 169 | struct irq_2_iommu *irq_2_iommu; |
168 | # endif | ||
169 | #endif | 170 | #endif |
170 | irq_flow_handler_t handle_irq; | 171 | irq_flow_handler_t handle_irq; |
171 | struct irq_chip *chip; | 172 | struct irq_chip *chip; |
@@ -202,12 +203,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]; | 203 | extern struct irq_desc irq_desc[NR_IRQS]; |
203 | #else /* CONFIG_SPARSE_IRQ */ | 204 | #else /* CONFIG_SPARSE_IRQ */ |
204 | extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu); | 205 | 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 */ | 206 | #endif /* CONFIG_SPARSE_IRQ */ |
212 | 207 | ||
213 | extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu); | 208 | extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu); |
@@ -226,7 +221,6 @@ irq_remap_to_desc(unsigned int irq, struct irq_desc *desc) | |||
226 | * Migration helpers for obsolete names, they will go away: | 221 | * Migration helpers for obsolete names, they will go away: |
227 | */ | 222 | */ |
228 | #define hw_interrupt_type irq_chip | 223 | #define hw_interrupt_type irq_chip |
229 | typedef struct irq_chip hw_irq_controller; | ||
230 | #define no_irq_type no_irq_chip | 224 | #define no_irq_type no_irq_chip |
231 | typedef struct irq_desc irq_desc_t; | 225 | typedef struct irq_desc irq_desc_t; |
232 | 226 | ||
@@ -236,6 +230,7 @@ typedef struct irq_desc irq_desc_t; | |||
236 | #include <asm/hw_irq.h> | 230 | #include <asm/hw_irq.h> |
237 | 231 | ||
238 | extern int setup_irq(unsigned int irq, struct irqaction *new); | 232 | extern int setup_irq(unsigned int irq, struct irqaction *new); |
233 | extern void remove_irq(unsigned int irq, struct irqaction *act); | ||
239 | 234 | ||
240 | #ifdef CONFIG_GENERIC_HARDIRQS | 235 | #ifdef CONFIG_GENERIC_HARDIRQS |
241 | 236 | ||
@@ -280,7 +275,7 @@ static inline int irq_balancing_disabled(unsigned int irq) | |||
280 | } | 275 | } |
281 | 276 | ||
282 | /* Handle irq action chains: */ | 277 | /* Handle irq action chains: */ |
283 | extern int handle_IRQ_event(unsigned int irq, struct irqaction *action); | 278 | extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action); |
284 | 279 | ||
285 | /* | 280 | /* |
286 | * Built-in IRQ handlers for various IRQ types, | 281 | * Built-in IRQ handlers for various IRQ types, |
@@ -325,7 +320,7 @@ static inline void generic_handle_irq(unsigned int irq) | |||
325 | 320 | ||
326 | /* Handling of unhandled and spurious interrupts: */ | 321 | /* Handling of unhandled and spurious interrupts: */ |
327 | extern void note_interrupt(unsigned int irq, struct irq_desc *desc, | 322 | extern void note_interrupt(unsigned int irq, struct irq_desc *desc, |
328 | int action_ret); | 323 | irqreturn_t action_ret); |
329 | 324 | ||
330 | /* Resending of interrupts :*/ | 325 | /* Resending of interrupts :*/ |
331 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); | 326 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); |
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index 887477bc2ab0..ec87b212ff7d 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h | |||
@@ -29,13 +29,17 @@ extern struct irq_desc *irq_to_desc(unsigned int irq); | |||
29 | # define for_each_irq_desc(irq, desc) \ | 29 | # define for_each_irq_desc(irq, desc) \ |
30 | for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \ | 30 | for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \ |
31 | irq++, desc = irq_to_desc(irq)) \ | 31 | irq++, desc = irq_to_desc(irq)) \ |
32 | if (desc) | 32 | if (!desc) \ |
33 | ; \ | ||
34 | else | ||
33 | 35 | ||
34 | 36 | ||
35 | # define for_each_irq_desc_reverse(irq, desc) \ | 37 | # define for_each_irq_desc_reverse(irq, desc) \ |
36 | for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \ | 38 | for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \ |
37 | irq--, desc = irq_to_desc(irq)) \ | 39 | irq--, desc = irq_to_desc(irq)) \ |
38 | if (desc) | 40 | if (!desc) \ |
41 | ; \ | ||
42 | else | ||
39 | 43 | ||
40 | #endif /* CONFIG_GENERIC_HARDIRQS */ | 44 | #endif /* CONFIG_GENERIC_HARDIRQS */ |
41 | 45 | ||
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/ivtv.h b/include/linux/ivtv.h index f2720280b9ec..062d20f74322 100644 --- a/include/linux/ivtv.h +++ b/include/linux/ivtv.h | |||
@@ -60,10 +60,10 @@ struct ivtv_dma_frame { | |||
60 | 60 | ||
61 | #define IVTV_IOC_DMA_FRAME _IOW ('V', BASE_VIDIOC_PRIVATE+0, struct ivtv_dma_frame) | 61 | #define IVTV_IOC_DMA_FRAME _IOW ('V', BASE_VIDIOC_PRIVATE+0, struct ivtv_dma_frame) |
62 | 62 | ||
63 | /* These are the VBI types as they appear in the embedded VBI private packets. */ | 63 | /* Deprecated defines: applications should use the defines from videodev2.h */ |
64 | #define IVTV_SLICED_TYPE_TELETEXT_B (1) | 64 | #define IVTV_SLICED_TYPE_TELETEXT_B V4L2_MPEG_VBI_IVTV_TELETEXT_B |
65 | #define IVTV_SLICED_TYPE_CAPTION_525 (4) | 65 | #define IVTV_SLICED_TYPE_CAPTION_525 V4L2_MPEG_VBI_IVTV_CAPTION_525 |
66 | #define IVTV_SLICED_TYPE_WSS_625 (5) | 66 | #define IVTV_SLICED_TYPE_WSS_625 V4L2_MPEG_VBI_IVTV_WSS_625 |
67 | #define IVTV_SLICED_TYPE_VPS (7) | 67 | #define IVTV_SLICED_TYPE_VPS V4L2_MPEG_VBI_IVTV_VPS |
68 | 68 | ||
69 | #endif /* _LINUX_IVTV_H */ | 69 | #endif /* _LINUX_IVTV_H */ |
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 4d248b3f1323..8815a3456b3b 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -649,6 +649,12 @@ struct transaction_s | |||
649 | int t_handle_count; | 649 | int t_handle_count; |
650 | 650 | ||
651 | /* | 651 | /* |
652 | * This transaction is being forced and some process is | ||
653 | * waiting for it to finish. | ||
654 | */ | ||
655 | int t_synchronous_commit:1; | ||
656 | |||
657 | /* | ||
652 | * For use by the filesystem to store fs-specific data | 658 | * For use by the filesystem to store fs-specific data |
653 | * structures associated with the transaction | 659 | * structures associated with the transaction |
654 | */ | 660 | */ |
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 1daca3b062bb..e81f2637fdef 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 | ||
@@ -370,14 +370,17 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
370 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | 370 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) |
371 | #define pr_info(fmt, ...) \ | 371 | #define pr_info(fmt, ...) \ |
372 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | 372 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) |
373 | #define pr_cont(fmt, ...) \ | ||
374 | printk(KERN_CONT fmt, ##__VA_ARGS__) | ||
373 | 375 | ||
374 | /* If you are writing a driver, please use dev_dbg instead */ | 376 | /* If you are writing a driver, please use dev_dbg instead */ |
375 | #if defined(DEBUG) | 377 | #if defined(DEBUG) |
376 | #define pr_debug(fmt, ...) \ | 378 | #define pr_debug(fmt, ...) \ |
377 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | 379 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) |
378 | #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 380 | #elif defined(CONFIG_DYNAMIC_DEBUG) |
381 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | ||
379 | #define pr_debug(fmt, ...) do { \ | 382 | #define pr_debug(fmt, ...) do { \ |
380 | dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ | 383 | dynamic_pr_debug(fmt, ##__VA_ARGS__); \ |
381 | } while (0) | 384 | } while (0) |
382 | #else | 385 | #else |
383 | #define pr_debug(fmt, ...) \ | 386 | #define pr_debug(fmt, ...) \ |
@@ -528,18 +531,6 @@ static inline void ftrace_dump(void) { } | |||
528 | ((unsigned char *)&addr)[3] | 531 | ((unsigned char *)&addr)[3] |
529 | #define NIPQUAD_FMT "%u.%u.%u.%u" | 532 | #define NIPQUAD_FMT "%u.%u.%u.%u" |
530 | 533 | ||
531 | #if defined(__LITTLE_ENDIAN) | ||
532 | #define HIPQUAD(addr) \ | ||
533 | ((unsigned char *)&addr)[3], \ | ||
534 | ((unsigned char *)&addr)[2], \ | ||
535 | ((unsigned char *)&addr)[1], \ | ||
536 | ((unsigned char *)&addr)[0] | ||
537 | #elif defined(__BIG_ENDIAN) | ||
538 | #define HIPQUAD NIPQUAD | ||
539 | #else | ||
540 | #error "Please fix asm/byteorder.h" | ||
541 | #endif /* __LITTLE_ENDIAN */ | ||
542 | |||
543 | /* | 534 | /* |
544 | * min()/max()/clamp() macros that also do | 535 | * min()/max()/clamp() macros that also do |
545 | * strict type-checking.. See the | 536 | * strict type-checking.. See the |
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/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/kvm.h b/include/linux/kvm.h index 0424326f1679..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 | ||
@@ -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 |
@@ -396,6 +396,57 @@ struct kvm_trace_rec { | |||
396 | #ifdef __KVM_HAVE_USER_NMI | 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 bf6f703642fc..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); |
@@ -310,7 +329,6 @@ struct kvm_assigned_dev_kernel { | |||
310 | int host_irq; | 329 | int host_irq; |
311 | bool host_irq_disabled; | 330 | bool host_irq_disabled; |
312 | int guest_irq; | 331 | int guest_irq; |
313 | struct msi_msg guest_msi; | ||
314 | #define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) | 332 | #define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) |
315 | #define KVM_ASSIGNED_DEV_GUEST_MSI (1 << 1) | 333 | #define KVM_ASSIGNED_DEV_GUEST_MSI (1 << 1) |
316 | #define KVM_ASSIGNED_DEV_HOST_INTX (1 << 8) | 334 | #define KVM_ASSIGNED_DEV_HOST_INTX (1 << 8) |
@@ -321,8 +339,21 @@ struct kvm_assigned_dev_kernel { | |||
321 | struct pci_dev *dev; | 339 | struct pci_dev *dev; |
322 | struct kvm *kvm; | 340 | struct kvm *kvm; |
323 | }; | 341 | }; |
324 | void kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level); | 342 | |
325 | 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); | ||
326 | void kvm_register_irq_ack_notifier(struct kvm *kvm, | 357 | void kvm_register_irq_ack_notifier(struct kvm *kvm, |
327 | struct kvm_irq_ack_notifier *kian); | 358 | struct kvm_irq_ack_notifier *kian); |
328 | 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); |
@@ -464,4 +495,21 @@ static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_se | |||
464 | } | 495 | } |
465 | #endif | 496 | #endif |
466 | 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 | |||
467 | #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 dc18b87ed722..76262d83656b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -795,6 +795,7 @@ struct ata_port_operations { | |||
795 | ata_reset_fn_t pmp_hardreset; | 795 | ata_reset_fn_t pmp_hardreset; |
796 | ata_postreset_fn_t pmp_postreset; | 796 | ata_postreset_fn_t pmp_postreset; |
797 | void (*error_handler)(struct ata_port *ap); | 797 | void (*error_handler)(struct ata_port *ap); |
798 | void (*lost_interrupt)(struct ata_port *ap); | ||
798 | void (*post_internal_cmd)(struct ata_queued_cmd *qc); | 799 | void (*post_internal_cmd)(struct ata_queued_cmd *qc); |
799 | 800 | ||
800 | /* | 801 | /* |
@@ -836,6 +837,8 @@ struct ata_port_operations { | |||
836 | void (*bmdma_start)(struct ata_queued_cmd *qc); | 837 | void (*bmdma_start)(struct ata_queued_cmd *qc); |
837 | void (*bmdma_stop)(struct ata_queued_cmd *qc); | 838 | void (*bmdma_stop)(struct ata_queued_cmd *qc); |
838 | 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); | ||
839 | #endif /* CONFIG_ATA_SFF */ | 842 | #endif /* CONFIG_ATA_SFF */ |
840 | 843 | ||
841 | ssize_t (*em_show)(struct ata_port *ap, char *buf); | 844 | ssize_t (*em_show)(struct ata_port *ap, char *buf); |
@@ -1008,6 +1011,9 @@ extern int ata_cable_sata(struct ata_port *ap); | |||
1008 | extern int ata_cable_ignore(struct ata_port *ap); | 1011 | extern int ata_cable_ignore(struct ata_port *ap); |
1009 | extern int ata_cable_unknown(struct ata_port *ap); | 1012 | extern int ata_cable_unknown(struct ata_port *ap); |
1010 | 1013 | ||
1014 | extern void ata_pio_queue_task(struct ata_port *ap, void *data, | ||
1015 | unsigned long delay); | ||
1016 | |||
1011 | /* Timing helpers */ | 1017 | /* Timing helpers */ |
1012 | extern unsigned int ata_pio_need_iordy(const struct ata_device *); | 1018 | extern unsigned int ata_pio_need_iordy(const struct ata_device *); |
1013 | 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); |
@@ -1572,6 +1578,7 @@ extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); | |||
1572 | extern unsigned int ata_sff_host_intr(struct ata_port *ap, | 1578 | extern unsigned int ata_sff_host_intr(struct ata_port *ap, |
1573 | struct ata_queued_cmd *qc); | 1579 | struct ata_queued_cmd *qc); |
1574 | 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); | ||
1575 | extern void ata_sff_freeze(struct ata_port *ap); | 1582 | extern void ata_sff_freeze(struct ata_port *ap); |
1576 | extern void ata_sff_thaw(struct ata_port *ap); | 1583 | extern void ata_sff_thaw(struct ata_port *ap); |
1577 | 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); |
@@ -1584,6 +1591,7 @@ extern int ata_sff_softreset(struct ata_link *link, unsigned int *classes, | |||
1584 | 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, |
1585 | unsigned long deadline); | 1592 | unsigned long deadline); |
1586 | 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); | ||
1587 | extern void ata_sff_error_handler(struct ata_port *ap); | 1595 | extern void ata_sff_error_handler(struct ata_port *ap); |
1588 | 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); |
1589 | 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/loop.h b/include/linux/loop.h index 6ffd6db5bb0d..40725447f5e0 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h | |||
@@ -160,5 +160,6 @@ int loop_unregister_transfer(int number); | |||
160 | #define LOOP_SET_STATUS64 0x4C04 | 160 | #define LOOP_SET_STATUS64 0x4C04 |
161 | #define LOOP_GET_STATUS64 0x4C05 | 161 | #define LOOP_GET_STATUS64 0x4C05 |
162 | #define LOOP_CHANGE_FD 0x4C06 | 162 | #define LOOP_CHANGE_FD 0x4C06 |
163 | #define LOOP_SET_CAPACITY 0x4C07 | ||
163 | 164 | ||
164 | #endif | 165 | #endif |
diff --git a/include/linux/major.h b/include/linux/major.h index 88249452b935..058ec15dd060 100644 --- a/include/linux/major.h +++ b/include/linux/major.h | |||
@@ -171,5 +171,6 @@ | |||
171 | #define VIOTAPE_MAJOR 230 | 171 | #define VIOTAPE_MAJOR 230 |
172 | 172 | ||
173 | #define BLOCK_EXT_MAJOR 259 | 173 | #define BLOCK_EXT_MAJOR 259 |
174 | #define SCSI_OSD_MAJOR 260 /* open-osd's OSD scsi device */ | ||
174 | 175 | ||
175 | #endif | 176 | #endif |
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/miscdevice.h b/include/linux/miscdevice.h index a820f816a49e..beb6ec99cfef 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #define TUN_MINOR 200 | 26 | #define TUN_MINOR 200 |
27 | #define MWAVE_MINOR 219 /* ACP/Mwave Modem */ | 27 | #define MWAVE_MINOR 219 /* ACP/Mwave Modem */ |
28 | #define MPT_MINOR 220 | 28 | #define MPT_MINOR 220 |
29 | #define MPT2SAS_MINOR 221 | ||
29 | #define HPET_MINOR 228 | 30 | #define HPET_MINOR 228 |
30 | #define FUSE_MINOR 229 | 31 | #define FUSE_MINOR 229 |
31 | #define KVM_MINOR 232 | 32 | #define KVM_MINOR 232 |
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 065cdf8c09fb..aeabe953ba4f 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -104,6 +104,7 @@ extern unsigned int kobjsize(const void *objp); | |||
104 | #define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */ | 104 | #define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */ |
105 | #define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */ | 105 | #define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */ |
106 | #define VM_SAO 0x20000000 /* Strong Access Ordering (powerpc) */ | 106 | #define VM_SAO 0x20000000 /* Strong Access Ordering (powerpc) */ |
107 | #define VM_PFN_AT_MMAP 0x40000000 /* PFNMAP vma that is fully mapped at mmap time */ | ||
107 | 108 | ||
108 | #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ | 109 | #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ |
109 | #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS | 110 | #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS |
@@ -134,6 +135,7 @@ extern pgprot_t protection_map[16]; | |||
134 | 135 | ||
135 | #define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */ | 136 | #define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */ |
136 | #define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ | 137 | #define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ |
138 | #define FAULT_FLAG_MKWRITE 0x04 /* Fault was mkwrite of existing pte */ | ||
137 | 139 | ||
138 | /* | 140 | /* |
139 | * This interface is used by x86 PAT code to identify a pfn mapping that is | 141 | * This interface is used by x86 PAT code to identify a pfn mapping that is |
@@ -145,7 +147,7 @@ extern pgprot_t protection_map[16]; | |||
145 | */ | 147 | */ |
146 | static inline int is_linear_pfn_mapping(struct vm_area_struct *vma) | 148 | static inline int is_linear_pfn_mapping(struct vm_area_struct *vma) |
147 | { | 149 | { |
148 | return ((vma->vm_flags & VM_PFNMAP) && vma->vm_pgoff); | 150 | return (vma->vm_flags & VM_PFN_AT_MMAP); |
149 | } | 151 | } |
150 | 152 | ||
151 | static inline int is_pfn_mapping(struct vm_area_struct *vma) | 153 | static inline int is_pfn_mapping(struct vm_area_struct *vma) |
@@ -186,7 +188,7 @@ struct vm_operations_struct { | |||
186 | 188 | ||
187 | /* notification that a previously read-only page is about to become | 189 | /* notification that a previously read-only page is about to become |
188 | * writable, if an error is returned it will cause a SIGBUS */ | 190 | * writable, if an error is returned it will cause a SIGBUS */ |
189 | int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page); | 191 | int (*page_mkwrite)(struct vm_area_struct *vma, struct vm_fault *vmf); |
190 | 192 | ||
191 | /* called by access_process_vm when get_user_pages() fails, typically | 193 | /* called by access_process_vm when get_user_pages() fails, typically |
192 | * for use by special VMAs that can switch between memory and hardware | 194 | * for use by special VMAs that can switch between memory and hardware |
@@ -833,6 +835,7 @@ int __set_page_dirty_nobuffers(struct page *page); | |||
833 | int __set_page_dirty_no_writeback(struct page *page); | 835 | int __set_page_dirty_no_writeback(struct page *page); |
834 | int redirty_page_for_writepage(struct writeback_control *wbc, | 836 | int redirty_page_for_writepage(struct writeback_control *wbc, |
835 | struct page *page); | 837 | struct page *page); |
838 | void account_page_dirtied(struct page *page, struct address_space *mapping); | ||
836 | int set_page_dirty(struct page *page); | 839 | int set_page_dirty(struct page *page); |
837 | int set_page_dirty_lock(struct page *page); | 840 | int set_page_dirty_lock(struct page *page); |
838 | int clear_page_dirty_for_io(struct page *page); | 841 | int clear_page_dirty_for_io(struct page *page); |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index d84feb7bdbf0..ddadb4defe00 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/rwsem.h> | 11 | #include <linux/rwsem.h> |
12 | #include <linux/completion.h> | 12 | #include <linux/completion.h> |
13 | #include <linux/cpumask.h> | 13 | #include <linux/cpumask.h> |
14 | #include <linux/page-debug-flags.h> | ||
14 | #include <asm/page.h> | 15 | #include <asm/page.h> |
15 | #include <asm/mmu.h> | 16 | #include <asm/mmu.h> |
16 | 17 | ||
@@ -174,6 +175,9 @@ struct vm_area_struct { | |||
174 | #ifdef CONFIG_NUMA | 175 | #ifdef CONFIG_NUMA |
175 | struct mempolicy *vm_policy; /* NUMA policy for the VMA */ | 176 | struct mempolicy *vm_policy; /* NUMA policy for the VMA */ |
176 | #endif | 177 | #endif |
178 | #ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS | ||
179 | unsigned long debug_flags; /* Use atomic bitops on this */ | ||
180 | #endif | ||
177 | }; | 181 | }; |
178 | 182 | ||
179 | struct core_thread { | 183 | struct core_thread { |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 1aca6cebbb78..26ef24076b76 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -806,6 +806,14 @@ extern struct zone *next_zone(struct zone *zone); | |||
806 | zone; \ | 806 | zone; \ |
807 | zone = next_zone(zone)) | 807 | zone = next_zone(zone)) |
808 | 808 | ||
809 | #define for_each_populated_zone(zone) \ | ||
810 | for (zone = (first_online_pgdat())->node_zones; \ | ||
811 | zone; \ | ||
812 | zone = next_zone(zone)) \ | ||
813 | if (!populated_zone(zone)) \ | ||
814 | ; /* do nothing */ \ | ||
815 | else | ||
816 | |||
809 | static inline struct zone *zonelist_zone(struct zoneref *zoneref) | 817 | static inline struct zone *zonelist_zone(struct zoneref *zoneref) |
810 | { | 818 | { |
811 | return zoneref->zone; | 819 | return zoneref->zone; |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index fde86671f48f..1bf5900ffe43 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -454,4 +454,13 @@ struct dmi_system_id { | |||
454 | 454 | ||
455 | #define DMI_MATCH(a, b) { a, b } | 455 | #define DMI_MATCH(a, b) { a, b } |
456 | 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 | |||
457 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 466 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
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/msi.h b/include/linux/msi.h index d2b8a1e8ca11..6991ab5b24d1 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -20,20 +20,23 @@ extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); | |||
20 | 20 | ||
21 | struct msi_desc { | 21 | struct msi_desc { |
22 | struct { | 22 | struct { |
23 | __u8 type : 5; /* {0: unused, 5h:MSI, 11h:MSI-X} */ | 23 | __u8 is_msix : 1; |
24 | __u8 multiple: 3; /* log2 number of messages */ | ||
24 | __u8 maskbit : 1; /* mask-pending bit supported ? */ | 25 | __u8 maskbit : 1; /* mask-pending bit supported ? */ |
25 | __u8 masked : 1; | ||
26 | __u8 is_64 : 1; /* Address size: 0=32bit 1=64bit */ | 26 | __u8 is_64 : 1; /* Address size: 0=32bit 1=64bit */ |
27 | __u8 pos; /* Location of the msi capability */ | 27 | __u8 pos; /* Location of the msi capability */ |
28 | __u32 maskbits_mask; /* mask bits mask */ | ||
29 | __u16 entry_nr; /* specific enabled entry */ | 28 | __u16 entry_nr; /* specific enabled entry */ |
30 | unsigned default_irq; /* default pre-assigned irq */ | 29 | unsigned default_irq; /* default pre-assigned irq */ |
31 | }msi_attrib; | 30 | } msi_attrib; |
32 | 31 | ||
32 | u32 masked; /* mask bits */ | ||
33 | unsigned int irq; | 33 | unsigned int irq; |
34 | struct list_head list; | 34 | struct list_head list; |
35 | 35 | ||
36 | void __iomem *mask_base; | 36 | union { |
37 | void __iomem *mask_base; | ||
38 | u8 mask_pos; | ||
39 | }; | ||
37 | struct pci_dev *dev; | 40 | struct pci_dev *dev; |
38 | 41 | ||
39 | /* Last set MSI message */ | 42 | /* Last set MSI message */ |
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index f69e66d151cc..30b06c893944 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
@@ -204,7 +204,7 @@ void ncp_update_inode2(struct inode *, struct ncp_entry_info *); | |||
204 | /* linux/fs/ncpfs/dir.c */ | 204 | /* linux/fs/ncpfs/dir.c */ |
205 | extern const struct inode_operations ncp_dir_inode_operations; | 205 | extern const struct inode_operations ncp_dir_inode_operations; |
206 | extern const struct file_operations ncp_dir_operations; | 206 | extern const struct file_operations ncp_dir_operations; |
207 | extern struct dentry_operations ncp_root_dentry_operations; | 207 | extern const struct dentry_operations ncp_root_dentry_operations; |
208 | int ncp_conn_logged_in(struct super_block *); | 208 | int ncp_conn_logged_in(struct super_block *); |
209 | int ncp_date_dos2unix(__le16 time, __le16 date); | 209 | int ncp_date_dos2unix(__le16 time, __le16 date); |
210 | void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date); | 210 | void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date); |
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 8730d5dae1bc..12c9de138451 100644 --- a/include/linux/neighbour.h +++ b/include/linux/neighbour.h | |||
@@ -31,6 +31,7 @@ enum | |||
31 | * Neighbor Cache Entry Flags | 31 | * Neighbor Cache Entry Flags |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #define NTF_USE 0x01 | ||
34 | #define NTF_PROXY 0x08 /* == ATF_PUBL */ | 35 | #define NTF_PROXY 0x08 /* == ATF_PUBL */ |
35 | #define NTF_ROUTER 0x80 | 36 | #define NTF_ROUTER 0x80 |
36 | 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 659366734f3f..2e7783f4a755 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
33 | #include <linux/timer.h> | 33 | #include <linux/timer.h> |
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/mm.h> | ||
35 | #include <asm/atomic.h> | 36 | #include <asm/atomic.h> |
36 | #include <asm/cache.h> | 37 | #include <asm/cache.h> |
37 | #include <asm/byteorder.h> | 38 | #include <asm/byteorder.h> |
@@ -96,7 +97,7 @@ struct wireless_dev; | |||
96 | * Compute the worst case header length according to the protocols | 97 | * Compute the worst case header length according to the protocols |
97 | * used. | 98 | * used. |
98 | */ | 99 | */ |
99 | 100 | ||
100 | #if defined(CONFIG_WLAN_80211) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | 101 | #if defined(CONFIG_WLAN_80211) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) |
101 | # if defined(CONFIG_MAC80211_MESH) | 102 | # if defined(CONFIG_MAC80211_MESH) |
102 | # define LL_MAX_HEADER 128 | 103 | # define LL_MAX_HEADER 128 |
@@ -124,7 +125,7 @@ struct wireless_dev; | |||
124 | * Network device statistics. Akin to the 2.0 ether stats but | 125 | * Network device statistics. Akin to the 2.0 ether stats but |
125 | * with byte counters. | 126 | * with byte counters. |
126 | */ | 127 | */ |
127 | 128 | ||
128 | struct net_device_stats | 129 | struct net_device_stats |
129 | { | 130 | { |
130 | unsigned long rx_packets; /* total packets received */ | 131 | unsigned long rx_packets; /* total packets received */ |
@@ -285,7 +286,7 @@ enum netdev_state_t | |||
285 | 286 | ||
286 | /* | 287 | /* |
287 | * This structure holds at boot time configured netdevice settings. They | 288 | * This structure holds at boot time configured netdevice settings. They |
288 | * are then used in the device probing. | 289 | * are then used in the device probing. |
289 | */ | 290 | */ |
290 | struct netdev_boot_setup { | 291 | struct netdev_boot_setup { |
291 | char name[IFNAMSIZ]; | 292 | char name[IFNAMSIZ]; |
@@ -314,6 +315,9 @@ struct napi_struct { | |||
314 | spinlock_t poll_lock; | 315 | spinlock_t poll_lock; |
315 | int poll_owner; | 316 | int poll_owner; |
316 | #endif | 317 | #endif |
318 | |||
319 | unsigned int gro_count; | ||
320 | |||
317 | struct net_device *dev; | 321 | struct net_device *dev; |
318 | struct list_head dev_list; | 322 | struct list_head dev_list; |
319 | struct sk_buff *gro_list; | 323 | struct sk_buff *gro_list; |
@@ -327,6 +331,14 @@ enum | |||
327 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ | 331 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ |
328 | }; | 332 | }; |
329 | 333 | ||
334 | enum { | ||
335 | GRO_MERGED, | ||
336 | GRO_MERGED_FREE, | ||
337 | GRO_HELD, | ||
338 | GRO_NORMAL, | ||
339 | GRO_DROP, | ||
340 | }; | ||
341 | |||
330 | extern void __napi_schedule(struct napi_struct *n); | 342 | extern void __napi_schedule(struct napi_struct *n); |
331 | 343 | ||
332 | static inline int napi_disable_pending(struct napi_struct *n) | 344 | static inline int napi_disable_pending(struct napi_struct *n) |
@@ -582,6 +594,14 @@ struct net_device_ops { | |||
582 | #define HAVE_NETDEV_POLL | 594 | #define HAVE_NETDEV_POLL |
583 | void (*ndo_poll_controller)(struct net_device *dev); | 595 | void (*ndo_poll_controller)(struct net_device *dev); |
584 | #endif | 596 | #endif |
597 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) | ||
598 | int (*ndo_fcoe_ddp_setup)(struct net_device *dev, | ||
599 | u16 xid, | ||
600 | struct scatterlist *sgl, | ||
601 | unsigned int sgc); | ||
602 | int (*ndo_fcoe_ddp_done)(struct net_device *dev, | ||
603 | u16 xid); | ||
604 | #endif | ||
585 | }; | 605 | }; |
586 | 606 | ||
587 | /* | 607 | /* |
@@ -650,14 +670,17 @@ struct net_device | |||
650 | #define NETIF_F_GRO 16384 /* Generic receive offload */ | 670 | #define NETIF_F_GRO 16384 /* Generic receive offload */ |
651 | #define NETIF_F_LRO 32768 /* large receive offload */ | 671 | #define NETIF_F_LRO 32768 /* large receive offload */ |
652 | 672 | ||
673 | #define NETIF_F_FCOE_CRC (1 << 24) /* FCoE CRC32 */ | ||
674 | |||
653 | /* Segmentation offload features */ | 675 | /* Segmentation offload features */ |
654 | #define NETIF_F_GSO_SHIFT 16 | 676 | #define NETIF_F_GSO_SHIFT 16 |
655 | #define NETIF_F_GSO_MASK 0xffff0000 | 677 | #define NETIF_F_GSO_MASK 0x00ff0000 |
656 | #define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) | 678 | #define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) |
657 | #define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT) | 679 | #define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT) |
658 | #define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT) | 680 | #define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT) |
659 | #define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT) | 681 | #define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT) |
660 | #define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) | 682 | #define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) |
683 | #define NETIF_F_FSO (SKB_GSO_FCOE << NETIF_F_GSO_SHIFT) | ||
661 | 684 | ||
662 | /* List of features with software fallbacks. */ | 685 | /* List of features with software fallbacks. */ |
663 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) | 686 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) |
@@ -740,7 +763,7 @@ struct net_device | |||
740 | void *dsa_ptr; /* dsa specific data */ | 763 | void *dsa_ptr; /* dsa specific data */ |
741 | #endif | 764 | #endif |
742 | void *atalk_ptr; /* AppleTalk link */ | 765 | void *atalk_ptr; /* AppleTalk link */ |
743 | void *ip_ptr; /* IPv4 specific data */ | 766 | void *ip_ptr; /* IPv4 specific data */ |
744 | void *dn_ptr; /* DECnet specific data */ | 767 | void *dn_ptr; /* DECnet specific data */ |
745 | void *ip6_ptr; /* IPv6 specific data */ | 768 | void *ip6_ptr; /* IPv6 specific data */ |
746 | void *ec_ptr; /* Econet specific data */ | 769 | void *ec_ptr; /* Econet specific data */ |
@@ -753,7 +776,7 @@ struct net_device | |||
753 | */ | 776 | */ |
754 | unsigned long last_rx; /* Time of last Rx */ | 777 | unsigned long last_rx; /* Time of last Rx */ |
755 | /* Interface address info used in eth_type_trans() */ | 778 | /* Interface address info used in eth_type_trans() */ |
756 | unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast | 779 | unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast |
757 | because most packets are unicast) */ | 780 | because most packets are unicast) */ |
758 | 781 | ||
759 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | 782 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ |
@@ -840,6 +863,11 @@ struct net_device | |||
840 | struct dcbnl_rtnl_ops *dcbnl_ops; | 863 | struct dcbnl_rtnl_ops *dcbnl_ops; |
841 | #endif | 864 | #endif |
842 | 865 | ||
866 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) | ||
867 | /* max exchange id for FCoE LRO by ddp */ | ||
868 | unsigned int fcoe_ddp_xid; | ||
869 | #endif | ||
870 | |||
843 | #ifdef CONFIG_COMPAT_NET_DEV_OPS | 871 | #ifdef CONFIG_COMPAT_NET_DEV_OPS |
844 | struct { | 872 | struct { |
845 | int (*init)(struct net_device *dev); | 873 | int (*init)(struct net_device *dev); |
@@ -984,6 +1012,9 @@ void netif_napi_add(struct net_device *dev, struct napi_struct *napi, | |||
984 | void netif_napi_del(struct napi_struct *napi); | 1012 | void netif_napi_del(struct napi_struct *napi); |
985 | 1013 | ||
986 | struct napi_gro_cb { | 1014 | struct napi_gro_cb { |
1015 | /* This indicates where we are processing relative to skb->data. */ | ||
1016 | int data_offset; | ||
1017 | |||
987 | /* This is non-zero if the packet may be of the same flow. */ | 1018 | /* This is non-zero if the packet may be of the same flow. */ |
988 | int same_flow; | 1019 | int same_flow; |
989 | 1020 | ||
@@ -1088,6 +1119,36 @@ extern int dev_restart(struct net_device *dev); | |||
1088 | #ifdef CONFIG_NETPOLL_TRAP | 1119 | #ifdef CONFIG_NETPOLL_TRAP |
1089 | extern int netpoll_trap(void); | 1120 | extern int netpoll_trap(void); |
1090 | #endif | 1121 | #endif |
1122 | extern void *skb_gro_header(struct sk_buff *skb, unsigned int hlen); | ||
1123 | extern int skb_gro_receive(struct sk_buff **head, | ||
1124 | struct sk_buff *skb); | ||
1125 | |||
1126 | static inline unsigned int skb_gro_offset(const struct sk_buff *skb) | ||
1127 | { | ||
1128 | return NAPI_GRO_CB(skb)->data_offset; | ||
1129 | } | ||
1130 | |||
1131 | static inline unsigned int skb_gro_len(const struct sk_buff *skb) | ||
1132 | { | ||
1133 | return skb->len - NAPI_GRO_CB(skb)->data_offset; | ||
1134 | } | ||
1135 | |||
1136 | static inline void skb_gro_pull(struct sk_buff *skb, unsigned int len) | ||
1137 | { | ||
1138 | NAPI_GRO_CB(skb)->data_offset += len; | ||
1139 | } | ||
1140 | |||
1141 | static inline void skb_gro_reset_offset(struct sk_buff *skb) | ||
1142 | { | ||
1143 | NAPI_GRO_CB(skb)->data_offset = 0; | ||
1144 | } | ||
1145 | |||
1146 | static inline void *skb_gro_mac_header(struct sk_buff *skb) | ||
1147 | { | ||
1148 | return skb_mac_header(skb) < skb->data ? skb_mac_header(skb) : | ||
1149 | page_address(skb_shinfo(skb)->frags[0].page) + | ||
1150 | skb_shinfo(skb)->frags[0].page_offset; | ||
1151 | } | ||
1091 | 1152 | ||
1092 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, | 1153 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, |
1093 | unsigned short type, | 1154 | unsigned short type, |
@@ -1376,12 +1437,15 @@ extern int netif_receive_skb(struct sk_buff *skb); | |||
1376 | extern void napi_gro_flush(struct napi_struct *napi); | 1437 | extern void napi_gro_flush(struct napi_struct *napi); |
1377 | extern int dev_gro_receive(struct napi_struct *napi, | 1438 | extern int dev_gro_receive(struct napi_struct *napi, |
1378 | struct sk_buff *skb); | 1439 | struct sk_buff *skb); |
1440 | extern int napi_skb_finish(int ret, struct sk_buff *skb); | ||
1379 | extern int napi_gro_receive(struct napi_struct *napi, | 1441 | extern int napi_gro_receive(struct napi_struct *napi, |
1380 | struct sk_buff *skb); | 1442 | struct sk_buff *skb); |
1381 | extern void napi_reuse_skb(struct napi_struct *napi, | 1443 | extern void napi_reuse_skb(struct napi_struct *napi, |
1382 | struct sk_buff *skb); | 1444 | struct sk_buff *skb); |
1383 | extern struct sk_buff * napi_fraginfo_skb(struct napi_struct *napi, | 1445 | extern struct sk_buff * napi_fraginfo_skb(struct napi_struct *napi, |
1384 | struct napi_gro_fraginfo *info); | 1446 | struct napi_gro_fraginfo *info); |
1447 | extern int napi_frags_finish(struct napi_struct *napi, | ||
1448 | struct sk_buff *skb, int ret); | ||
1385 | extern int napi_gro_frags(struct napi_struct *napi, | 1449 | extern int napi_gro_frags(struct napi_struct *napi, |
1386 | struct napi_gro_fraginfo *info); | 1450 | struct napi_gro_fraginfo *info); |
1387 | extern void netif_nit_deliver(struct sk_buff *skb); | 1451 | extern void netif_nit_deliver(struct sk_buff *skb); |
@@ -1575,56 +1639,6 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) | |||
1575 | return (1 << debug_value) - 1; | 1639 | return (1 << debug_value) - 1; |
1576 | } | 1640 | } |
1577 | 1641 | ||
1578 | /* Test if receive needs to be scheduled but only if up */ | ||
1579 | static inline int netif_rx_schedule_prep(struct napi_struct *napi) | ||
1580 | { | ||
1581 | return napi_schedule_prep(napi); | ||
1582 | } | ||
1583 | |||
1584 | /* Add interface to tail of rx poll list. This assumes that _prep has | ||
1585 | * already been called and returned 1. | ||
1586 | */ | ||
1587 | static inline void __netif_rx_schedule(struct napi_struct *napi) | ||
1588 | { | ||
1589 | __napi_schedule(napi); | ||
1590 | } | ||
1591 | |||
1592 | /* Try to reschedule poll. Called by irq handler. */ | ||
1593 | |||
1594 | static inline void netif_rx_schedule(struct napi_struct *napi) | ||
1595 | { | ||
1596 | if (netif_rx_schedule_prep(napi)) | ||
1597 | __netif_rx_schedule(napi); | ||
1598 | } | ||
1599 | |||
1600 | /* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). */ | ||
1601 | static inline int netif_rx_reschedule(struct napi_struct *napi) | ||
1602 | { | ||
1603 | if (napi_schedule_prep(napi)) { | ||
1604 | __netif_rx_schedule(napi); | ||
1605 | return 1; | ||
1606 | } | ||
1607 | return 0; | ||
1608 | } | ||
1609 | |||
1610 | /* same as netif_rx_complete, except that local_irq_save(flags) | ||
1611 | * has already been issued | ||
1612 | */ | ||
1613 | static inline void __netif_rx_complete(struct napi_struct *napi) | ||
1614 | { | ||
1615 | __napi_complete(napi); | ||
1616 | } | ||
1617 | |||
1618 | /* Remove interface from poll list: it must be in the poll list | ||
1619 | * on current cpu. This primitive is called by dev->poll(), when | ||
1620 | * it completes the work. The device cannot be out of poll list at this | ||
1621 | * moment, it is BUG(). | ||
1622 | */ | ||
1623 | static inline void netif_rx_complete(struct napi_struct *napi) | ||
1624 | { | ||
1625 | napi_complete(napi); | ||
1626 | } | ||
1627 | |||
1628 | static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu) | 1642 | static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu) |
1629 | { | 1643 | { |
1630 | spin_lock(&txq->_xmit_lock); | 1644 | spin_lock(&txq->_xmit_lock); |
@@ -1875,7 +1889,7 @@ static inline int skb_bond_should_drop(struct sk_buff *skb) | |||
1875 | 1889 | ||
1876 | if (dev->priv_flags & IFF_SLAVE_INACTIVE) { | 1890 | if (dev->priv_flags & IFF_SLAVE_INACTIVE) { |
1877 | if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && | 1891 | if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && |
1878 | skb->protocol == __constant_htons(ETH_P_ARP)) | 1892 | skb->protocol == __cpu_to_be16(ETH_P_ARP)) |
1879 | return 0; | 1893 | return 0; |
1880 | 1894 | ||
1881 | if (master->priv_flags & IFF_MASTER_ALB) { | 1895 | if (master->priv_flags & IFF_MASTER_ALB) { |
@@ -1884,7 +1898,7 @@ static inline int skb_bond_should_drop(struct sk_buff *skb) | |||
1884 | return 0; | 1898 | return 0; |
1885 | } | 1899 | } |
1886 | if (master->priv_flags & IFF_MASTER_8023AD && | 1900 | if (master->priv_flags & IFF_MASTER_8023AD && |
1887 | skb->protocol == __constant_htons(ETH_P_SLOW)) | 1901 | skb->protocol == __cpu_to_be16(ETH_P_SLOW)) |
1888 | return 0; | 1902 | return 0; |
1889 | 1903 | ||
1890 | return 1; | 1904 | 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..7b1a652066c0 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,31 @@ 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); | ||
439 | |||
440 | /* | ||
441 | * This helper is performance critical and must be inlined | ||
442 | */ | ||
443 | static inline unsigned long ifname_compare_aligned(const char *_a, | ||
444 | const char *_b, | ||
445 | const char *_mask) | ||
446 | { | ||
447 | const unsigned long *a = (const unsigned long *)_a; | ||
448 | const unsigned long *b = (const unsigned long *)_b; | ||
449 | const unsigned long *mask = (const unsigned long *)_mask; | ||
450 | unsigned long ret; | ||
451 | |||
452 | ret = (a[0] ^ b[0]) & mask[0]; | ||
453 | if (IFNAMSIZ > sizeof(unsigned long)) | ||
454 | ret |= (a[1] ^ b[1]) & mask[1]; | ||
455 | if (IFNAMSIZ > 2 * sizeof(unsigned long)) | ||
456 | ret |= (a[2] ^ b[2]) & mask[2]; | ||
457 | if (IFNAMSIZ > 3 * sizeof(unsigned long)) | ||
458 | ret |= (a[3] ^ b[3]) & mask[3]; | ||
459 | BUILD_BUG_ON(IFNAMSIZ > 4 * sizeof(unsigned long)); | ||
460 | return ret; | ||
461 | } | ||
436 | 462 | ||
437 | #ifdef CONFIG_COMPAT | 463 | #ifdef CONFIG_COMPAT |
438 | #include <net/compat.h> | 464 | #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 4b36aeb46a10..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 0 | 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 8f5345275393..3430c7751948 100644 --- a/include/linux/netfilter/xt_conntrack.h +++ b/include/linux/netfilter/xt_conntrack.h | |||
@@ -63,9 +63,9 @@ struct xt_conntrack_info | |||
63 | unsigned long expires_min, expires_max; | 63 | unsigned long expires_min, expires_max; |
64 | 64 | ||
65 | /* Flags word */ | 65 | /* Flags word */ |
66 | u_int8_t flags; | 66 | __u8 flags; |
67 | /* Inverse flags */ | 67 | /* Inverse flags */ |
68 | u_int8_t invflags; | 68 | __u8 invflags; |
69 | }; | 69 | }; |
70 | 70 | ||
71 | struct xt_conntrack_mtinfo1 { | 71 | struct xt_conntrack_mtinfo1 { |
@@ -73,12 +73,12 @@ struct xt_conntrack_mtinfo1 { | |||
73 | union nf_inet_addr origdst_addr, origdst_mask; | 73 | union nf_inet_addr origdst_addr, origdst_mask; |
74 | union nf_inet_addr replsrc_addr, replsrc_mask; | 74 | union nf_inet_addr replsrc_addr, replsrc_mask; |
75 | union nf_inet_addr repldst_addr, repldst_mask; | 75 | union nf_inet_addr repldst_addr, repldst_mask; |
76 | u_int32_t expires_min, expires_max; | 76 | __u32 expires_min, expires_max; |
77 | u_int16_t l4proto; | 77 | __u16 l4proto; |
78 | __be16 origsrc_port, origdst_port; | 78 | __be16 origsrc_port, origdst_port; |
79 | __be16 replsrc_port, repldst_port; | 79 | __be16 replsrc_port, repldst_port; |
80 | u_int16_t match_flags, invert_flags; | 80 | __u16 match_flags, invert_flags; |
81 | u_int8_t state_mask, status_mask; | 81 | __u8 state_mask, status_mask; |
82 | }; | 82 | }; |
83 | 83 | ||
84 | #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..2524267210d3 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -18,7 +18,7 @@ struct netpoll { | |||
18 | const char *name; | 18 | const char *name; |
19 | void (*rx_hook)(struct netpoll *, int, char *, int); | 19 | void (*rx_hook)(struct netpoll *, int, char *, int); |
20 | 20 | ||
21 | u32 local_ip, remote_ip; | 21 | __be32 local_ip, remote_ip; |
22 | u16 local_port, remote_port; | 22 | u16 local_port, remote_port; |
23 | u8 remote_mac[ETH_ALEN]; | 23 | u8 remote_mac[ETH_ALEN]; |
24 | }; | 24 | }; |
@@ -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_fs.h b/include/linux/nfs_fs.h index db867b04ac3c..bde2557c2a9c 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -166,8 +166,7 @@ struct nfs_inode { | |||
166 | */ | 166 | */ |
167 | struct radix_tree_root nfs_page_tree; | 167 | struct radix_tree_root nfs_page_tree; |
168 | 168 | ||
169 | unsigned long ncommit, | 169 | unsigned long npages; |
170 | npages; | ||
171 | 170 | ||
172 | /* Open contexts for shared mmap writes */ | 171 | /* Open contexts for shared mmap writes */ |
173 | struct list_head open_files; | 172 | struct list_head open_files; |
@@ -207,6 +206,7 @@ struct nfs_inode { | |||
207 | #define NFS_INO_STALE (1) /* possible stale inode */ | 206 | #define NFS_INO_STALE (1) /* possible stale inode */ |
208 | #define NFS_INO_ACL_LRU_SET (2) /* Inode is on the LRU list */ | 207 | #define NFS_INO_ACL_LRU_SET (2) /* Inode is on the LRU list */ |
209 | #define NFS_INO_MOUNTPOINT (3) /* inode is remote mountpoint */ | 208 | #define NFS_INO_MOUNTPOINT (3) /* inode is remote mountpoint */ |
209 | #define NFS_INO_FLUSHING (4) /* inode is flushing out data */ | ||
210 | 210 | ||
211 | static inline struct nfs_inode *NFS_I(const struct inode *inode) | 211 | static inline struct nfs_inode *NFS_I(const struct inode *inode) |
212 | { | 212 | { |
@@ -415,7 +415,7 @@ extern const struct inode_operations nfs_dir_inode_operations; | |||
415 | extern const struct inode_operations nfs3_dir_inode_operations; | 415 | extern const struct inode_operations nfs3_dir_inode_operations; |
416 | #endif /* CONFIG_NFS_V3 */ | 416 | #endif /* CONFIG_NFS_V3 */ |
417 | extern const struct file_operations nfs_dir_operations; | 417 | extern const struct file_operations nfs_dir_operations; |
418 | extern struct dentry_operations nfs_dentry_operations; | 418 | extern const struct dentry_operations nfs_dentry_operations; |
419 | 419 | ||
420 | extern void nfs_force_lookup_revalidate(struct inode *dir); | 420 | extern void nfs_force_lookup_revalidate(struct inode *dir); |
421 | extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr); | 421 | extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr); |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 9bb81aec91cf..29b1e40dce99 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -106,6 +106,11 @@ struct nfs_server { | |||
106 | u32 attr_bitmask[2];/* V4 bitmask representing the set | 106 | u32 attr_bitmask[2];/* V4 bitmask representing the set |
107 | of attributes supported on this | 107 | of attributes supported on this |
108 | filesystem */ | 108 | filesystem */ |
109 | u32 cache_consistency_bitmask[2]; | ||
110 | /* V4 bitmask representing the subset | ||
111 | of change attribute, size, ctime | ||
112 | and mtime attributes supported by | ||
113 | the server */ | ||
109 | u32 acl_bitmask; /* V4 bitmask representing the ACEs | 114 | u32 acl_bitmask; /* V4 bitmask representing the ACEs |
110 | that are supported on this | 115 | that are supported on this |
111 | filesystem */ | 116 | filesystem */ |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 2e5f00066afd..b89c34e40bc2 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -27,12 +27,8 @@ static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid | |||
27 | } | 27 | } |
28 | 28 | ||
29 | struct nfs_fattr { | 29 | struct nfs_fattr { |
30 | unsigned short valid; /* which fields are valid */ | 30 | unsigned int valid; /* which fields are valid */ |
31 | __u64 pre_size; /* pre_op_attr.size */ | 31 | umode_t mode; |
32 | struct timespec pre_mtime; /* pre_op_attr.mtime */ | ||
33 | struct timespec pre_ctime; /* pre_op_attr.ctime */ | ||
34 | enum nfs_ftype type; /* always use NFSv2 types */ | ||
35 | __u32 mode; | ||
36 | __u32 nlink; | 32 | __u32 nlink; |
37 | __u32 uid; | 33 | __u32 uid; |
38 | __u32 gid; | 34 | __u32 gid; |
@@ -52,19 +48,55 @@ struct nfs_fattr { | |||
52 | struct timespec atime; | 48 | struct timespec atime; |
53 | struct timespec mtime; | 49 | struct timespec mtime; |
54 | struct timespec ctime; | 50 | struct timespec ctime; |
55 | __u32 bitmap[2]; /* NFSv4 returned attribute bitmap */ | ||
56 | __u64 change_attr; /* NFSv4 change attribute */ | 51 | __u64 change_attr; /* NFSv4 change attribute */ |
57 | __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ | 52 | __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ |
53 | __u64 pre_size; /* pre_op_attr.size */ | ||
54 | struct timespec pre_mtime; /* pre_op_attr.mtime */ | ||
55 | struct timespec pre_ctime; /* pre_op_attr.ctime */ | ||
58 | unsigned long time_start; | 56 | unsigned long time_start; |
59 | unsigned long gencount; | 57 | unsigned long gencount; |
60 | }; | 58 | }; |
61 | 59 | ||
62 | #define NFS_ATTR_WCC 0x0001 /* pre-op WCC data */ | 60 | #define NFS_ATTR_FATTR_TYPE (1U << 0) |
63 | #define NFS_ATTR_FATTR 0x0002 /* post-op attributes */ | 61 | #define NFS_ATTR_FATTR_MODE (1U << 1) |
64 | #define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */ | 62 | #define NFS_ATTR_FATTR_NLINK (1U << 2) |
65 | #define NFS_ATTR_FATTR_V4 0x0008 /* NFSv4 change attribute */ | 63 | #define NFS_ATTR_FATTR_OWNER (1U << 3) |
66 | #define NFS_ATTR_WCC_V4 0x0010 /* pre-op change attribute */ | 64 | #define NFS_ATTR_FATTR_GROUP (1U << 4) |
67 | #define NFS_ATTR_FATTR_V4_REFERRAL 0x0020 /* NFSv4 referral */ | 65 | #define NFS_ATTR_FATTR_RDEV (1U << 5) |
66 | #define NFS_ATTR_FATTR_SIZE (1U << 6) | ||
67 | #define NFS_ATTR_FATTR_PRESIZE (1U << 7) | ||
68 | #define NFS_ATTR_FATTR_BLOCKS_USED (1U << 8) | ||
69 | #define NFS_ATTR_FATTR_SPACE_USED (1U << 9) | ||
70 | #define NFS_ATTR_FATTR_FSID (1U << 10) | ||
71 | #define NFS_ATTR_FATTR_FILEID (1U << 11) | ||
72 | #define NFS_ATTR_FATTR_ATIME (1U << 12) | ||
73 | #define NFS_ATTR_FATTR_MTIME (1U << 13) | ||
74 | #define NFS_ATTR_FATTR_CTIME (1U << 14) | ||
75 | #define NFS_ATTR_FATTR_PREMTIME (1U << 15) | ||
76 | #define NFS_ATTR_FATTR_PRECTIME (1U << 16) | ||
77 | #define NFS_ATTR_FATTR_CHANGE (1U << 17) | ||
78 | #define NFS_ATTR_FATTR_PRECHANGE (1U << 18) | ||
79 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ | ||
80 | |||
81 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ | ||
82 | | NFS_ATTR_FATTR_MODE \ | ||
83 | | NFS_ATTR_FATTR_NLINK \ | ||
84 | | NFS_ATTR_FATTR_OWNER \ | ||
85 | | NFS_ATTR_FATTR_GROUP \ | ||
86 | | NFS_ATTR_FATTR_RDEV \ | ||
87 | | NFS_ATTR_FATTR_SIZE \ | ||
88 | | NFS_ATTR_FATTR_FSID \ | ||
89 | | NFS_ATTR_FATTR_FILEID \ | ||
90 | | NFS_ATTR_FATTR_ATIME \ | ||
91 | | NFS_ATTR_FATTR_MTIME \ | ||
92 | | NFS_ATTR_FATTR_CTIME) | ||
93 | #define NFS_ATTR_FATTR_V2 (NFS_ATTR_FATTR \ | ||
94 | | NFS_ATTR_FATTR_BLOCKS_USED) | ||
95 | #define NFS_ATTR_FATTR_V3 (NFS_ATTR_FATTR \ | ||
96 | | NFS_ATTR_FATTR_SPACE_USED) | ||
97 | #define NFS_ATTR_FATTR_V4 (NFS_ATTR_FATTR \ | ||
98 | | NFS_ATTR_FATTR_SPACE_USED \ | ||
99 | | NFS_ATTR_FATTR_CHANGE) | ||
68 | 100 | ||
69 | /* | 101 | /* |
70 | * Info on the file system | 102 | * Info on the file system |
@@ -785,7 +817,7 @@ struct nfs_access_entry; | |||
785 | */ | 817 | */ |
786 | struct nfs_rpc_ops { | 818 | struct nfs_rpc_ops { |
787 | u32 version; /* Protocol version */ | 819 | u32 version; /* Protocol version */ |
788 | struct dentry_operations *dentry_ops; | 820 | const struct dentry_operations *dentry_ops; |
789 | const struct inode_operations *dir_inode_ops; | 821 | const struct inode_operations *dir_inode_ops; |
790 | const struct inode_operations *file_inode_ops; | 822 | const struct inode_operations *file_inode_ops; |
791 | 823 | ||
@@ -836,6 +868,7 @@ struct nfs_rpc_ops { | |||
836 | int (*lock)(struct file *, int, struct file_lock *); | 868 | int (*lock)(struct file *, int, struct file_lock *); |
837 | int (*lock_check_bounds)(const struct file_lock *); | 869 | int (*lock_check_bounds)(const struct file_lock *); |
838 | void (*clear_acl_cache)(struct inode *); | 870 | void (*clear_acl_cache)(struct inode *); |
871 | void (*close_context)(struct nfs_open_context *ctx, int); | ||
839 | }; | 872 | }; |
840 | 873 | ||
841 | /* | 874 | /* |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index e86ed59f9ad5..cbe8ce3bf486 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,70 @@ | |||
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 | * Note: This command has been removed and it is only reserved at this | ||
146 | * point to avoid re-using existing command number. The functionality this | ||
147 | * command was planned for has been provided with cleaner design with the | ||
148 | * option to specify additional IEs in NL80211_CMD_TRIGGER_SCAN, | ||
149 | * NL80211_CMD_AUTHENTICATE, NL80211_CMD_ASSOCIATE, | ||
150 | * NL80211_CMD_DEAUTHENTICATE, and NL80211_CMD_DISASSOCIATE. | ||
151 | * | ||
152 | * @NL80211_CMD_GET_SCAN: get scan results | ||
153 | * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters | ||
154 | * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to | ||
155 | * NL80211_CMD_GET_SCAN and on the "scan" multicast group) | ||
156 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, | ||
157 | * partial scan results may be available | ||
158 | * | ||
159 | * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain | ||
160 | * has been changed and provides details of the request information | ||
161 | * that caused the change such as who initiated the regulatory request | ||
162 | * (%NL80211_ATTR_REG_INITIATOR), the wiphy_idx | ||
163 | * (%NL80211_ATTR_REG_ALPHA2) on which the request was made from if | ||
164 | * the initiator was %NL80211_REGDOM_SET_BY_COUNTRY_IE or | ||
165 | * %NL80211_REGDOM_SET_BY_DRIVER, the type of regulatory domain | ||
166 | * set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is | ||
167 | * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on | ||
168 | * to (%NL80211_ATTR_REG_ALPHA2). | ||
169 | * | ||
170 | * @NL80211_CMD_AUTHENTICATE: authentication request and notification. | ||
171 | * This command is used both as a command (request to authenticate) and | ||
172 | * as an event on the "mlme" multicast group indicating completion of the | ||
173 | * authentication process. | ||
174 | * When used as a command, %NL80211_ATTR_IFINDEX is used to identify the | ||
175 | * interface. %NL80211_ATTR_MAC is used to specify PeerSTAAddress (and | ||
176 | * BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify | ||
177 | * the SSID (mainly for association, but is included in authentication | ||
178 | * request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ is used | ||
179 | * to specify the frequence of the channel in MHz. %NL80211_ATTR_AUTH_TYPE | ||
180 | * is used to specify the authentication type. %NL80211_ATTR_IE is used to | ||
181 | * define IEs (VendorSpecificInfo, but also including RSN IE and FT IEs) | ||
182 | * to be added to the frame. | ||
183 | * When used as an event, this reports reception of an Authentication | ||
184 | * frame in station and IBSS modes when the local MLME processed the | ||
185 | * frame, i.e., it was for the local STA and was received in correct | ||
186 | * state. This is similar to MLME-AUTHENTICATE.confirm primitive in the | ||
187 | * MLME SAP interface (kernel providing MLME, userspace SME). The | ||
188 | * included NL80211_ATTR_FRAME attribute contains the management frame | ||
189 | * (including both the header and frame body, but not FCS). | ||
190 | * @NL80211_CMD_ASSOCIATE: association request and notification; like | ||
191 | * NL80211_CMD_AUTHENTICATE but for Association and Reassociation | ||
192 | * (similar to MLME-ASSOCIATE.request, MLME-REASSOCIATE.request, | ||
193 | * MLME-ASSOCIATE.confirm or MLME-REASSOCIATE.confirm primitives). | ||
194 | * @NL80211_CMD_DEAUTHENTICATE: deauthentication request and notification; like | ||
195 | * NL80211_CMD_AUTHENTICATE but for Deauthentication frames (similar to | ||
196 | * MLME-DEAUTHENTICATION.request and MLME-DEAUTHENTICATE.indication | ||
197 | * primitives). | ||
198 | * @NL80211_CMD_DISASSOCIATE: disassociation request and notification; like | ||
199 | * NL80211_CMD_AUTHENTICATE but for Disassociation frames (similar to | ||
200 | * MLME-DISASSOCIATE.request and MLME-DISASSOCIATE.indication primitives). | ||
201 | * | ||
136 | * @NL80211_CMD_MAX: highest used command number | 202 | * @NL80211_CMD_MAX: highest used command number |
137 | * @__NL80211_CMD_AFTER_LAST: internal use | 203 | * @__NL80211_CMD_AFTER_LAST: internal use |
138 | */ | 204 | */ |
@@ -178,6 +244,22 @@ enum nl80211_commands { | |||
178 | NL80211_CMD_GET_MESH_PARAMS, | 244 | NL80211_CMD_GET_MESH_PARAMS, |
179 | NL80211_CMD_SET_MESH_PARAMS, | 245 | NL80211_CMD_SET_MESH_PARAMS, |
180 | 246 | ||
247 | NL80211_CMD_SET_MGMT_EXTRA_IE /* reserved; not used */, | ||
248 | |||
249 | NL80211_CMD_GET_REG, | ||
250 | |||
251 | NL80211_CMD_GET_SCAN, | ||
252 | NL80211_CMD_TRIGGER_SCAN, | ||
253 | NL80211_CMD_NEW_SCAN_RESULTS, | ||
254 | NL80211_CMD_SCAN_ABORTED, | ||
255 | |||
256 | NL80211_CMD_REG_CHANGE, | ||
257 | |||
258 | NL80211_CMD_AUTHENTICATE, | ||
259 | NL80211_CMD_ASSOCIATE, | ||
260 | NL80211_CMD_DEAUTHENTICATE, | ||
261 | NL80211_CMD_DISASSOCIATE, | ||
262 | |||
181 | /* add new commands above here */ | 263 | /* add new commands above here */ |
182 | 264 | ||
183 | /* used to define NL80211_CMD_MAX below */ | 265 | /* used to define NL80211_CMD_MAX below */ |
@@ -190,6 +272,12 @@ enum nl80211_commands { | |||
190 | * here | 272 | * here |
191 | */ | 273 | */ |
192 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS | 274 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS |
275 | #define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE | ||
276 | #define NL80211_CMD_REG_CHANGE NL80211_CMD_REG_CHANGE | ||
277 | #define NL80211_CMD_AUTHENTICATE NL80211_CMD_AUTHENTICATE | ||
278 | #define NL80211_CMD_ASSOCIATE NL80211_CMD_ASSOCIATE | ||
279 | #define NL80211_CMD_DEAUTHENTICATE NL80211_CMD_DEAUTHENTICATE | ||
280 | #define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE | ||
193 | 281 | ||
194 | /** | 282 | /** |
195 | * enum nl80211_attrs - nl80211 netlink attributes | 283 | * enum nl80211_attrs - nl80211 netlink attributes |
@@ -284,6 +372,42 @@ enum nl80211_commands { | |||
284 | * supported interface types, each a flag attribute with the number | 372 | * supported interface types, each a flag attribute with the number |
285 | * of the interface mode. | 373 | * of the interface mode. |
286 | * | 374 | * |
375 | * @NL80211_ATTR_MGMT_SUBTYPE: Management frame subtype for | ||
376 | * %NL80211_CMD_SET_MGMT_EXTRA_IE. | ||
377 | * | ||
378 | * @NL80211_ATTR_IE: Information element(s) data (used, e.g., with | ||
379 | * %NL80211_CMD_SET_MGMT_EXTRA_IE). | ||
380 | * | ||
381 | * @NL80211_ATTR_MAX_NUM_SCAN_SSIDS: number of SSIDs you can scan with | ||
382 | * a single scan request, a wiphy attribute. | ||
383 | * | ||
384 | * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz) | ||
385 | * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive | ||
386 | * scanning and include a zero-length SSID (wildcard) for wildcard scan | ||
387 | * @NL80211_ATTR_SCAN_GENERATION: the scan generation increases whenever the | ||
388 | * scan result list changes (BSS expired or added) so that applications | ||
389 | * can verify that they got a single, consistent snapshot (when all dump | ||
390 | * messages carried the same generation number) | ||
391 | * @NL80211_ATTR_BSS: scan result BSS | ||
392 | * | ||
393 | * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain | ||
394 | * currently in effect. This could be any of the %NL80211_REGDOM_SET_BY_* | ||
395 | * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently | ||
396 | * set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*) | ||
397 | * | ||
398 | * @NL80211_ATTR_SUPPORTED_COMMANDS: wiphy attribute that specifies | ||
399 | * an array of command numbers (i.e. a mapping index to command number) | ||
400 | * that the driver for the given wiphy supports. | ||
401 | * | ||
402 | * @NL80211_ATTR_FRAME: frame data (binary attribute), including frame header | ||
403 | * and body, but not FCS; used, e.g., with NL80211_CMD_AUTHENTICATE and | ||
404 | * NL80211_CMD_ASSOCIATE events | ||
405 | * @NL80211_ATTR_SSID: SSID (binary attribute, 0..32 octets) | ||
406 | * @NL80211_ATTR_AUTH_TYPE: AuthenticationType, see &enum nl80211_auth_type, | ||
407 | * represented as a u32 | ||
408 | * @NL80211_ATTR_REASON_CODE: ReasonCode for %NL80211_CMD_DEAUTHENTICATE and | ||
409 | * %NL80211_CMD_DISASSOCIATE, u16 | ||
410 | * | ||
287 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 411 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
288 | * @__NL80211_ATTR_AFTER_LAST: internal use | 412 | * @__NL80211_ATTR_AFTER_LAST: internal use |
289 | */ | 413 | */ |
@@ -346,6 +470,28 @@ enum nl80211_attrs { | |||
346 | NL80211_ATTR_WIPHY_FREQ, | 470 | NL80211_ATTR_WIPHY_FREQ, |
347 | NL80211_ATTR_WIPHY_CHANNEL_TYPE, | 471 | NL80211_ATTR_WIPHY_CHANNEL_TYPE, |
348 | 472 | ||
473 | NL80211_ATTR_KEY_DEFAULT_MGMT, | ||
474 | |||
475 | NL80211_ATTR_MGMT_SUBTYPE, | ||
476 | NL80211_ATTR_IE, | ||
477 | |||
478 | NL80211_ATTR_MAX_NUM_SCAN_SSIDS, | ||
479 | |||
480 | NL80211_ATTR_SCAN_FREQUENCIES, | ||
481 | NL80211_ATTR_SCAN_SSIDS, | ||
482 | NL80211_ATTR_SCAN_GENERATION, | ||
483 | NL80211_ATTR_BSS, | ||
484 | |||
485 | NL80211_ATTR_REG_INITIATOR, | ||
486 | NL80211_ATTR_REG_TYPE, | ||
487 | |||
488 | NL80211_ATTR_SUPPORTED_COMMANDS, | ||
489 | |||
490 | NL80211_ATTR_FRAME, | ||
491 | NL80211_ATTR_SSID, | ||
492 | NL80211_ATTR_AUTH_TYPE, | ||
493 | NL80211_ATTR_REASON_CODE, | ||
494 | |||
349 | /* add attributes here, update the policy in nl80211.c */ | 495 | /* add attributes here, update the policy in nl80211.c */ |
350 | 496 | ||
351 | __NL80211_ATTR_AFTER_LAST, | 497 | __NL80211_ATTR_AFTER_LAST, |
@@ -360,7 +506,15 @@ enum nl80211_attrs { | |||
360 | #define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES | 506 | #define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES |
361 | #define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS | 507 | #define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS |
362 | #define NL80211_ATTR_WIPHY_FREQ NL80211_ATTR_WIPHY_FREQ | 508 | #define NL80211_ATTR_WIPHY_FREQ NL80211_ATTR_WIPHY_FREQ |
363 | #define NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET | 509 | #define NL80211_ATTR_WIPHY_CHANNEL_TYPE NL80211_ATTR_WIPHY_CHANNEL_TYPE |
510 | #define NL80211_ATTR_MGMT_SUBTYPE NL80211_ATTR_MGMT_SUBTYPE | ||
511 | #define NL80211_ATTR_IE NL80211_ATTR_IE | ||
512 | #define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR | ||
513 | #define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE | ||
514 | #define NL80211_ATTR_FRAME NL80211_ATTR_FRAME | ||
515 | #define NL80211_ATTR_SSID NL80211_ATTR_SSID | ||
516 | #define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE | ||
517 | #define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE | ||
364 | 518 | ||
365 | #define NL80211_MAX_SUPP_RATES 32 | 519 | #define NL80211_MAX_SUPP_RATES 32 |
366 | #define NL80211_MAX_SUPP_REG_RULES 32 | 520 | #define NL80211_MAX_SUPP_REG_RULES 32 |
@@ -412,12 +566,14 @@ enum nl80211_iftype { | |||
412 | * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames | 566 | * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames |
413 | * with short barker preamble | 567 | * with short barker preamble |
414 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable | 568 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable |
569 | * @NL80211_STA_FLAG_MFP: station uses management frame protection | ||
415 | */ | 570 | */ |
416 | enum nl80211_sta_flags { | 571 | enum nl80211_sta_flags { |
417 | __NL80211_STA_FLAG_INVALID, | 572 | __NL80211_STA_FLAG_INVALID, |
418 | NL80211_STA_FLAG_AUTHORIZED, | 573 | NL80211_STA_FLAG_AUTHORIZED, |
419 | NL80211_STA_FLAG_SHORT_PREAMBLE, | 574 | NL80211_STA_FLAG_SHORT_PREAMBLE, |
420 | NL80211_STA_FLAG_WME, | 575 | NL80211_STA_FLAG_WME, |
576 | NL80211_STA_FLAG_MFP, | ||
421 | 577 | ||
422 | /* keep last */ | 578 | /* keep last */ |
423 | __NL80211_STA_FLAG_AFTER_LAST, | 579 | __NL80211_STA_FLAG_AFTER_LAST, |
@@ -465,6 +621,9 @@ enum nl80211_rate_info { | |||
465 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) | 621 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) |
466 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute | 622 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute |
467 | * containing info as possible, see &enum nl80211_sta_info_txrate. | 623 | * containing info as possible, see &enum nl80211_sta_info_txrate. |
624 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station) | ||
625 | * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this | ||
626 | * station) | ||
468 | */ | 627 | */ |
469 | enum nl80211_sta_info { | 628 | enum nl80211_sta_info { |
470 | __NL80211_STA_INFO_INVALID, | 629 | __NL80211_STA_INFO_INVALID, |
@@ -476,6 +635,8 @@ enum nl80211_sta_info { | |||
476 | NL80211_STA_INFO_PLINK_STATE, | 635 | NL80211_STA_INFO_PLINK_STATE, |
477 | NL80211_STA_INFO_SIGNAL, | 636 | NL80211_STA_INFO_SIGNAL, |
478 | NL80211_STA_INFO_TX_BITRATE, | 637 | NL80211_STA_INFO_TX_BITRATE, |
638 | NL80211_STA_INFO_RX_PACKETS, | ||
639 | NL80211_STA_INFO_TX_PACKETS, | ||
479 | 640 | ||
480 | /* keep last */ | 641 | /* keep last */ |
481 | __NL80211_STA_INFO_AFTER_LAST, | 642 | __NL80211_STA_INFO_AFTER_LAST, |
@@ -607,6 +768,48 @@ enum nl80211_bitrate_attr { | |||
607 | }; | 768 | }; |
608 | 769 | ||
609 | /** | 770 | /** |
771 | * enum nl80211_initiator - Indicates the initiator of a reg domain request | ||
772 | * @NL80211_REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world | ||
773 | * regulatory domain. | ||
774 | * @NL80211_REGDOM_SET_BY_USER: User asked the wireless core to set the | ||
775 | * regulatory domain. | ||
776 | * @NL80211_REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the | ||
777 | * wireless core it thinks its knows the regulatory domain we should be in. | ||
778 | * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an | ||
779 | * 802.11 country information element with regulatory information it | ||
780 | * thinks we should consider. | ||
781 | */ | ||
782 | enum nl80211_reg_initiator { | ||
783 | NL80211_REGDOM_SET_BY_CORE, | ||
784 | NL80211_REGDOM_SET_BY_USER, | ||
785 | NL80211_REGDOM_SET_BY_DRIVER, | ||
786 | NL80211_REGDOM_SET_BY_COUNTRY_IE, | ||
787 | }; | ||
788 | |||
789 | /** | ||
790 | * enum nl80211_reg_type - specifies the type of regulatory domain | ||
791 | * @NL80211_REGDOM_TYPE_COUNTRY: the regulatory domain set is one that pertains | ||
792 | * to a specific country. When this is set you can count on the | ||
793 | * ISO / IEC 3166 alpha2 country code being valid. | ||
794 | * @NL80211_REGDOM_TYPE_WORLD: the regulatory set domain is the world regulatory | ||
795 | * domain. | ||
796 | * @NL80211_REGDOM_TYPE_CUSTOM_WORLD: the regulatory domain set is a custom | ||
797 | * driver specific world regulatory domain. These do not apply system-wide | ||
798 | * and are only applicable to the individual devices which have requested | ||
799 | * them to be applied. | ||
800 | * @NL80211_REGDOM_TYPE_INTERSECTION: the regulatory domain set is the product | ||
801 | * of an intersection between two regulatory domains -- the previously | ||
802 | * set regulatory domain on the system and the last accepted regulatory | ||
803 | * domain request to be processed. | ||
804 | */ | ||
805 | enum nl80211_reg_type { | ||
806 | NL80211_REGDOM_TYPE_COUNTRY, | ||
807 | NL80211_REGDOM_TYPE_WORLD, | ||
808 | NL80211_REGDOM_TYPE_CUSTOM_WORLD, | ||
809 | NL80211_REGDOM_TYPE_INTERSECTION, | ||
810 | }; | ||
811 | |||
812 | /** | ||
610 | * enum nl80211_reg_rule_attr - regulatory rule attributes | 813 | * enum nl80211_reg_rule_attr - regulatory rule attributes |
611 | * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional | 814 | * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional |
612 | * considerations for a given frequency range. These are the | 815 | * considerations for a given frequency range. These are the |
@@ -811,4 +1014,52 @@ enum nl80211_channel_type { | |||
811 | NL80211_CHAN_HT40MINUS, | 1014 | NL80211_CHAN_HT40MINUS, |
812 | NL80211_CHAN_HT40PLUS | 1015 | NL80211_CHAN_HT40PLUS |
813 | }; | 1016 | }; |
1017 | |||
1018 | /** | ||
1019 | * enum nl80211_bss - netlink attributes for a BSS | ||
1020 | * | ||
1021 | * @__NL80211_BSS_INVALID: invalid | ||
1022 | * @NL80211_BSS_FREQUENCY: frequency in MHz (u32) | ||
1023 | * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64) | ||
1024 | * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16) | ||
1025 | * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16) | ||
1026 | * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the | ||
1027 | * raw information elements from the probe response/beacon (bin) | ||
1028 | * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon | ||
1029 | * in mBm (100 * dBm) (s32) | ||
1030 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon | ||
1031 | * in unspecified units, scaled to 0..100 (u8) | ||
1032 | * @__NL80211_BSS_AFTER_LAST: internal | ||
1033 | * @NL80211_BSS_MAX: highest BSS attribute | ||
1034 | */ | ||
1035 | enum nl80211_bss { | ||
1036 | __NL80211_BSS_INVALID, | ||
1037 | NL80211_BSS_BSSID, | ||
1038 | NL80211_BSS_FREQUENCY, | ||
1039 | NL80211_BSS_TSF, | ||
1040 | NL80211_BSS_BEACON_INTERVAL, | ||
1041 | NL80211_BSS_CAPABILITY, | ||
1042 | NL80211_BSS_INFORMATION_ELEMENTS, | ||
1043 | NL80211_BSS_SIGNAL_MBM, | ||
1044 | NL80211_BSS_SIGNAL_UNSPEC, | ||
1045 | |||
1046 | /* keep last */ | ||
1047 | __NL80211_BSS_AFTER_LAST, | ||
1048 | NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1 | ||
1049 | }; | ||
1050 | |||
1051 | /** | ||
1052 | * enum nl80211_auth_type - AuthenticationType | ||
1053 | * | ||
1054 | * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication | ||
1055 | * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only) | ||
1056 | * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) | ||
1057 | * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) | ||
1058 | */ | ||
1059 | enum nl80211_auth_type { | ||
1060 | NL80211_AUTHTYPE_OPEN_SYSTEM, | ||
1061 | NL80211_AUTHTYPE_SHARED_KEY, | ||
1062 | NL80211_AUTHTYPE_FT, | ||
1063 | NL80211_AUTHTYPE_NETWORK_EAP, | ||
1064 | }; | ||
814 | #endif /* __LINUX_NL80211_H */ | 1065 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/page-debug-flags.h b/include/linux/page-debug-flags.h new file mode 100644 index 000000000000..b0638fd91e92 --- /dev/null +++ b/include/linux/page-debug-flags.h | |||
@@ -0,0 +1,30 @@ | |||
1 | #ifndef LINUX_PAGE_DEBUG_FLAGS_H | ||
2 | #define LINUX_PAGE_DEBUG_FLAGS_H | ||
3 | |||
4 | /* | ||
5 | * page->debug_flags bits: | ||
6 | * | ||
7 | * PAGE_DEBUG_FLAG_POISON is set for poisoned pages. This is used to | ||
8 | * implement generic debug pagealloc feature. The pages are filled with | ||
9 | * poison patterns and set this flag after free_pages(). The poisoned | ||
10 | * pages are verified whether the patterns are not corrupted and clear | ||
11 | * the flag before alloc_pages(). | ||
12 | */ | ||
13 | |||
14 | enum page_debug_flags { | ||
15 | PAGE_DEBUG_FLAG_POISON, /* Page is poisoned */ | ||
16 | }; | ||
17 | |||
18 | /* | ||
19 | * Ensure that CONFIG_WANT_PAGE_DEBUG_FLAGS reliably | ||
20 | * gets turned off when no debug features are enabling it! | ||
21 | */ | ||
22 | |||
23 | #ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS | ||
24 | #if !defined(CONFIG_PAGE_POISONING) \ | ||
25 | /* && !defined(CONFIG_PAGE_DEBUG_SOMETHING_ELSE) && ... */ | ||
26 | #error WANT_PAGE_DEBUG_FLAGS is turned on with no debug features! | ||
27 | #endif | ||
28 | #endif /* CONFIG_WANT_PAGE_DEBUG_FLAGS */ | ||
29 | |||
30 | #endif /* LINUX_PAGE_DEBUG_FLAGS_H */ | ||
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 219a523ecdb0..61df1779b2a5 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -96,6 +96,8 @@ enum pageflags { | |||
96 | PG_swapbacked, /* Page is backed by RAM/swap */ | 96 | PG_swapbacked, /* Page is backed by RAM/swap */ |
97 | #ifdef CONFIG_UNEVICTABLE_LRU | 97 | #ifdef CONFIG_UNEVICTABLE_LRU |
98 | PG_unevictable, /* Page is "unevictable" */ | 98 | PG_unevictable, /* Page is "unevictable" */ |
99 | #endif | ||
100 | #ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT | ||
99 | PG_mlocked, /* Page is vma mlocked */ | 101 | PG_mlocked, /* Page is vma mlocked */ |
100 | #endif | 102 | #endif |
101 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR | 103 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR |
@@ -234,20 +236,20 @@ PAGEFLAG_FALSE(SwapCache) | |||
234 | #ifdef CONFIG_UNEVICTABLE_LRU | 236 | #ifdef CONFIG_UNEVICTABLE_LRU |
235 | PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) | 237 | PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) |
236 | TESTCLEARFLAG(Unevictable, unevictable) | 238 | TESTCLEARFLAG(Unevictable, unevictable) |
239 | #else | ||
240 | PAGEFLAG_FALSE(Unevictable) TESTCLEARFLAG_FALSE(Unevictable) | ||
241 | SETPAGEFLAG_NOOP(Unevictable) CLEARPAGEFLAG_NOOP(Unevictable) | ||
242 | __CLEARPAGEFLAG_NOOP(Unevictable) | ||
243 | #endif | ||
237 | 244 | ||
245 | #ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT | ||
238 | #define MLOCK_PAGES 1 | 246 | #define MLOCK_PAGES 1 |
239 | PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked) | 247 | PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked) |
240 | TESTSCFLAG(Mlocked, mlocked) | 248 | TESTSCFLAG(Mlocked, mlocked) |
241 | |||
242 | #else | 249 | #else |
243 | |||
244 | #define MLOCK_PAGES 0 | 250 | #define MLOCK_PAGES 0 |
245 | PAGEFLAG_FALSE(Mlocked) | 251 | PAGEFLAG_FALSE(Mlocked) |
246 | SETPAGEFLAG_NOOP(Mlocked) TESTCLEARFLAG_FALSE(Mlocked) | 252 | SETPAGEFLAG_NOOP(Mlocked) TESTCLEARFLAG_FALSE(Mlocked) |
247 | |||
248 | PAGEFLAG_FALSE(Unevictable) TESTCLEARFLAG_FALSE(Unevictable) | ||
249 | SETPAGEFLAG_NOOP(Unevictable) CLEARPAGEFLAG_NOOP(Unevictable) | ||
250 | __CLEARPAGEFLAG_NOOP(Unevictable) | ||
251 | #endif | 253 | #endif |
252 | 254 | ||
253 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR | 255 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR |
@@ -367,9 +369,13 @@ static inline void __ClearPageTail(struct page *page) | |||
367 | 369 | ||
368 | #ifdef CONFIG_UNEVICTABLE_LRU | 370 | #ifdef CONFIG_UNEVICTABLE_LRU |
369 | #define __PG_UNEVICTABLE (1 << PG_unevictable) | 371 | #define __PG_UNEVICTABLE (1 << PG_unevictable) |
370 | #define __PG_MLOCKED (1 << PG_mlocked) | ||
371 | #else | 372 | #else |
372 | #define __PG_UNEVICTABLE 0 | 373 | #define __PG_UNEVICTABLE 0 |
374 | #endif | ||
375 | |||
376 | #ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT | ||
377 | #define __PG_MLOCKED (1 << PG_mlocked) | ||
378 | #else | ||
373 | #define __PG_MLOCKED 0 | 379 | #define __PG_MLOCKED 0 |
374 | #endif | 380 | #endif |
375 | 381 | ||
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index 7b2886fa7fdc..bab82f4c571c 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h | |||
@@ -24,7 +24,6 @@ void __pagevec_release(struct pagevec *pvec); | |||
24 | void __pagevec_free(struct pagevec *pvec); | 24 | void __pagevec_free(struct pagevec *pvec); |
25 | void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru); | 25 | void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru); |
26 | void pagevec_strip(struct pagevec *pvec); | 26 | void pagevec_strip(struct pagevec *pvec); |
27 | void pagevec_swap_free(struct pagevec *pvec); | ||
28 | unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, | 27 | unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, |
29 | pgoff_t start, unsigned nr_pages); | 28 | pgoff_t start, unsigned nr_pages); |
30 | unsigned pagevec_lookup_tag(struct pagevec *pvec, | 29 | unsigned pagevec_lookup_tag(struct pagevec *pvec, |
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 042c166f65d5..092e82e0048c 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
@@ -10,72 +10,25 @@ | |||
10 | 10 | ||
11 | #include <linux/acpi.h> | 11 | #include <linux/acpi.h> |
12 | 12 | ||
13 | #define OSC_QUERY_TYPE 0 | ||
14 | #define OSC_SUPPORT_TYPE 1 | ||
15 | #define OSC_CONTROL_TYPE 2 | ||
16 | #define OSC_SUPPORT_MASKS 0x1f | ||
17 | |||
18 | /* | ||
19 | * _OSC DW0 Definition | ||
20 | */ | ||
21 | #define OSC_QUERY_ENABLE 1 | ||
22 | #define OSC_REQUEST_ERROR 2 | ||
23 | #define OSC_INVALID_UUID_ERROR 4 | ||
24 | #define OSC_INVALID_REVISION_ERROR 8 | ||
25 | #define OSC_CAPABILITIES_MASK_ERROR 16 | ||
26 | |||
27 | /* | ||
28 | * _OSC DW1 Definition (OS Support Fields) | ||
29 | */ | ||
30 | #define OSC_EXT_PCI_CONFIG_SUPPORT 1 | ||
31 | #define OSC_ACTIVE_STATE_PWR_SUPPORT 2 | ||
32 | #define OSC_CLOCK_PWR_CAPABILITY_SUPPORT 4 | ||
33 | #define OSC_PCI_SEGMENT_GROUPS_SUPPORT 8 | ||
34 | #define OSC_MSI_SUPPORT 16 | ||
35 | |||
36 | /* | ||
37 | * _OSC DW1 Definition (OS Control Fields) | ||
38 | */ | ||
39 | #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL 1 | ||
40 | #define OSC_SHPC_NATIVE_HP_CONTROL 2 | ||
41 | #define OSC_PCI_EXPRESS_PME_CONTROL 4 | ||
42 | #define OSC_PCI_EXPRESS_AER_CONTROL 8 | ||
43 | #define OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL 16 | ||
44 | |||
45 | #define OSC_CONTROL_MASKS (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | \ | ||
46 | OSC_SHPC_NATIVE_HP_CONTROL | \ | ||
47 | OSC_PCI_EXPRESS_PME_CONTROL | \ | ||
48 | OSC_PCI_EXPRESS_AER_CONTROL | \ | ||
49 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) | ||
50 | |||
51 | #ifdef CONFIG_ACPI | 13 | #ifdef CONFIG_ACPI |
52 | extern acpi_status pci_osc_control_set(acpi_handle handle, u32 flags); | ||
53 | int pci_acpi_osc_support(acpi_handle handle, u32 flags); | ||
54 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | 14 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) |
55 | { | 15 | { |
56 | /* Find root host bridge */ | 16 | struct pci_bus *pbus = pdev->bus; |
57 | while (pdev->bus->self) | 17 | /* Find a PCI root bus */ |
58 | pdev = pdev->bus->self; | 18 | while (pbus->parent) |
59 | 19 | pbus = pbus->parent; | |
60 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pdev->bus), | 20 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), |
61 | pdev->bus->number); | 21 | pbus->number); |
62 | } | 22 | } |
63 | 23 | ||
64 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) | 24 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) |
65 | { | 25 | { |
66 | int seg = pci_domain_nr(pbus), busnr = pbus->number; | 26 | if (pbus->parent) |
67 | struct pci_dev *bridge = pbus->self; | 27 | return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); |
68 | if (bridge) | 28 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), |
69 | return DEVICE_ACPI_HANDLE(&(bridge->dev)); | 29 | pbus->number); |
70 | return acpi_get_pci_rootbridge_handle(seg, busnr); | ||
71 | } | 30 | } |
72 | #else | 31 | #else |
73 | #if !defined(AE_ERROR) | ||
74 | typedef u32 acpi_status; | ||
75 | #define AE_ERROR (acpi_status) (0x0001) | ||
76 | #endif | ||
77 | static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags) | ||
78 | {return AE_ERROR;} | ||
79 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | 32 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) |
80 | { return NULL; } | 33 | { return NULL; } |
81 | #endif | 34 | #endif |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 7bd624bfdcfd..a7fe4bbd7ff1 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <asm/atomic.h> | 52 | #include <asm/atomic.h> |
53 | #include <linux/device.h> | 53 | #include <linux/device.h> |
54 | #include <linux/io.h> | 54 | #include <linux/io.h> |
55 | #include <linux/irqreturn.h> | ||
55 | 56 | ||
56 | /* Include the ID list */ | 57 | /* Include the ID list */ |
57 | #include <linux/pci_ids.h> | 58 | #include <linux/pci_ids.h> |
@@ -93,6 +94,12 @@ enum { | |||
93 | /* #6: expansion ROM resource */ | 94 | /* #6: expansion ROM resource */ |
94 | PCI_ROM_RESOURCE, | 95 | PCI_ROM_RESOURCE, |
95 | 96 | ||
97 | /* device specific resources */ | ||
98 | #ifdef CONFIG_PCI_IOV | ||
99 | PCI_IOV_RESOURCES, | ||
100 | PCI_IOV_RESOURCE_END = PCI_IOV_RESOURCES + PCI_SRIOV_NUM_BARS - 1, | ||
101 | #endif | ||
102 | |||
96 | /* resources assigned to buses behind the bridge */ | 103 | /* resources assigned to buses behind the bridge */ |
97 | #define PCI_BRIDGE_RESOURCE_NUM 4 | 104 | #define PCI_BRIDGE_RESOURCE_NUM 4 |
98 | 105 | ||
@@ -180,6 +187,7 @@ struct pci_cap_saved_state { | |||
180 | 187 | ||
181 | struct pcie_link_state; | 188 | struct pcie_link_state; |
182 | struct pci_vpd; | 189 | struct pci_vpd; |
190 | struct pci_sriov; | ||
183 | 191 | ||
184 | /* | 192 | /* |
185 | * The pci_dev structure is used to describe PCI devices. | 193 | * The pci_dev structure is used to describe PCI devices. |
@@ -257,6 +265,8 @@ struct pci_dev { | |||
257 | unsigned int is_managed:1; | 265 | unsigned int is_managed:1; |
258 | unsigned int is_pcie:1; | 266 | unsigned int is_pcie:1; |
259 | unsigned int state_saved:1; | 267 | unsigned int state_saved:1; |
268 | unsigned int is_physfn:1; | ||
269 | unsigned int is_virtfn:1; | ||
260 | pci_dev_flags_t dev_flags; | 270 | pci_dev_flags_t dev_flags; |
261 | atomic_t enable_cnt; /* pci_enable_device has been called */ | 271 | atomic_t enable_cnt; /* pci_enable_device has been called */ |
262 | 272 | ||
@@ -270,6 +280,12 @@ struct pci_dev { | |||
270 | struct list_head msi_list; | 280 | struct list_head msi_list; |
271 | #endif | 281 | #endif |
272 | struct pci_vpd *vpd; | 282 | struct pci_vpd *vpd; |
283 | #ifdef CONFIG_PCI_IOV | ||
284 | union { | ||
285 | struct pci_sriov *sriov; /* SR-IOV capability related */ | ||
286 | struct pci_dev *physfn; /* the PF this VF is associated with */ | ||
287 | }; | ||
288 | #endif | ||
273 | }; | 289 | }; |
274 | 290 | ||
275 | extern struct pci_dev *alloc_pci_dev(void); | 291 | extern struct pci_dev *alloc_pci_dev(void); |
@@ -341,6 +357,15 @@ struct pci_bus { | |||
341 | #define pci_bus_b(n) list_entry(n, struct pci_bus, node) | 357 | #define pci_bus_b(n) list_entry(n, struct pci_bus, node) |
342 | #define to_pci_bus(n) container_of(n, struct pci_bus, dev) | 358 | #define to_pci_bus(n) container_of(n, struct pci_bus, dev) |
343 | 359 | ||
360 | /* | ||
361 | * Returns true if the pci bus is root (behind host-pci bridge), | ||
362 | * false otherwise | ||
363 | */ | ||
364 | static inline bool pci_is_root_bus(struct pci_bus *pbus) | ||
365 | { | ||
366 | return !(pbus->parent); | ||
367 | } | ||
368 | |||
344 | #ifdef CONFIG_PCI_MSI | 369 | #ifdef CONFIG_PCI_MSI |
345 | static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) | 370 | static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) |
346 | { | 371 | { |
@@ -528,7 +553,7 @@ void pcibios_update_irq(struct pci_dev *, int irq); | |||
528 | /* Generic PCI functions used internally */ | 553 | /* Generic PCI functions used internally */ |
529 | 554 | ||
530 | extern struct pci_bus *pci_find_bus(int domain, int busnr); | 555 | extern struct pci_bus *pci_find_bus(int domain, int busnr); |
531 | void pci_bus_add_devices(struct pci_bus *bus); | 556 | void pci_bus_add_devices(const struct pci_bus *bus); |
532 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, | 557 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, |
533 | struct pci_ops *ops, void *sysdata); | 558 | struct pci_ops *ops, void *sysdata); |
534 | static inline struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops, | 559 | static inline struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops, |
@@ -689,6 +714,7 @@ size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size); | |||
689 | /* Power management related routines */ | 714 | /* Power management related routines */ |
690 | int pci_save_state(struct pci_dev *dev); | 715 | int pci_save_state(struct pci_dev *dev); |
691 | int pci_restore_state(struct pci_dev *dev); | 716 | int pci_restore_state(struct pci_dev *dev); |
717 | int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state); | ||
692 | int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | 718 | int pci_set_power_state(struct pci_dev *dev, pci_power_t state); |
693 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 719 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
694 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); | 720 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); |
@@ -701,6 +727,9 @@ int pci_back_from_sleep(struct pci_dev *dev); | |||
701 | 727 | ||
702 | /* Functions for PCI Hotplug drivers to use */ | 728 | /* Functions for PCI Hotplug drivers to use */ |
703 | int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap); | 729 | int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap); |
730 | #ifdef CONFIG_HOTPLUG | ||
731 | unsigned int pci_rescan_bus(struct pci_bus *bus); | ||
732 | #endif | ||
704 | 733 | ||
705 | /* Vital product data routines */ | 734 | /* Vital product data routines */ |
706 | ssize_t pci_read_vpd(struct pci_dev *dev, loff_t pos, size_t count, void *buf); | 735 | ssize_t pci_read_vpd(struct pci_dev *dev, loff_t pos, size_t count, void *buf); |
@@ -708,7 +737,7 @@ ssize_t pci_write_vpd(struct pci_dev *dev, loff_t pos, size_t count, const void | |||
708 | int pci_vpd_truncate(struct pci_dev *dev, size_t size); | 737 | int pci_vpd_truncate(struct pci_dev *dev, size_t size); |
709 | 738 | ||
710 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ | 739 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ |
711 | void pci_bus_assign_resources(struct pci_bus *bus); | 740 | void pci_bus_assign_resources(const struct pci_bus *bus); |
712 | void pci_bus_size_bridges(struct pci_bus *bus); | 741 | void pci_bus_size_bridges(struct pci_bus *bus); |
713 | int pci_claim_resource(struct pci_dev *, int); | 742 | int pci_claim_resource(struct pci_dev *, int); |
714 | void pci_assign_unassigned_resources(void); | 743 | void pci_assign_unassigned_resources(void); |
@@ -789,7 +818,7 @@ struct msix_entry { | |||
789 | 818 | ||
790 | 819 | ||
791 | #ifndef CONFIG_PCI_MSI | 820 | #ifndef CONFIG_PCI_MSI |
792 | static inline int pci_enable_msi(struct pci_dev *dev) | 821 | static inline int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec) |
793 | { | 822 | { |
794 | return -1; | 823 | return -1; |
795 | } | 824 | } |
@@ -799,6 +828,10 @@ static inline void pci_msi_shutdown(struct pci_dev *dev) | |||
799 | static inline void pci_disable_msi(struct pci_dev *dev) | 828 | static inline void pci_disable_msi(struct pci_dev *dev) |
800 | { } | 829 | { } |
801 | 830 | ||
831 | static inline int pci_msix_table_size(struct pci_dev *dev) | ||
832 | { | ||
833 | return 0; | ||
834 | } | ||
802 | static inline int pci_enable_msix(struct pci_dev *dev, | 835 | static inline int pci_enable_msix(struct pci_dev *dev, |
803 | struct msix_entry *entries, int nvec) | 836 | struct msix_entry *entries, int nvec) |
804 | { | 837 | { |
@@ -820,9 +853,10 @@ static inline int pci_msi_enabled(void) | |||
820 | return 0; | 853 | return 0; |
821 | } | 854 | } |
822 | #else | 855 | #else |
823 | extern int pci_enable_msi(struct pci_dev *dev); | 856 | extern int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec); |
824 | extern void pci_msi_shutdown(struct pci_dev *dev); | 857 | extern void pci_msi_shutdown(struct pci_dev *dev); |
825 | extern void pci_disable_msi(struct pci_dev *dev); | 858 | extern void pci_disable_msi(struct pci_dev *dev); |
859 | extern int pci_msix_table_size(struct pci_dev *dev); | ||
826 | extern int pci_enable_msix(struct pci_dev *dev, | 860 | extern int pci_enable_msix(struct pci_dev *dev, |
827 | struct msix_entry *entries, int nvec); | 861 | struct msix_entry *entries, int nvec); |
828 | extern void pci_msix_shutdown(struct pci_dev *dev); | 862 | extern void pci_msix_shutdown(struct pci_dev *dev); |
@@ -841,6 +875,8 @@ static inline int pcie_aspm_enabled(void) | |||
841 | extern int pcie_aspm_enabled(void); | 875 | extern int pcie_aspm_enabled(void); |
842 | #endif | 876 | #endif |
843 | 877 | ||
878 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) | ||
879 | |||
844 | #ifdef CONFIG_HT_IRQ | 880 | #ifdef CONFIG_HT_IRQ |
845 | /* The functions a driver should call */ | 881 | /* The functions a driver should call */ |
846 | int ht_create_irq(struct pci_dev *dev, int idx); | 882 | int ht_create_irq(struct pci_dev *dev, int idx); |
@@ -1194,5 +1230,23 @@ int pci_ext_cfg_avail(struct pci_dev *dev); | |||
1194 | 1230 | ||
1195 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); | 1231 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); |
1196 | 1232 | ||
1233 | #ifdef CONFIG_PCI_IOV | ||
1234 | extern int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); | ||
1235 | extern void pci_disable_sriov(struct pci_dev *dev); | ||
1236 | extern irqreturn_t pci_sriov_migration(struct pci_dev *dev); | ||
1237 | #else | ||
1238 | static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) | ||
1239 | { | ||
1240 | return -ENODEV; | ||
1241 | } | ||
1242 | static inline void pci_disable_sriov(struct pci_dev *dev) | ||
1243 | { | ||
1244 | } | ||
1245 | static inline irqreturn_t pci_sriov_migration(struct pci_dev *dev) | ||
1246 | { | ||
1247 | return IRQ_NONE; | ||
1248 | } | ||
1249 | #endif | ||
1250 | |||
1197 | #endif /* __KERNEL__ */ | 1251 | #endif /* __KERNEL__ */ |
1198 | #endif /* LINUX_PCI_H */ | 1252 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index aca8c458aa8a..cb14fd260837 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 |
@@ -1235,6 +1237,7 @@ | |||
1235 | #define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 | 1237 | #define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 |
1236 | #define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 | 1238 | #define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 |
1237 | #define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453 | 1239 | #define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453 |
1240 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_SMBUS 0x0542 | ||
1238 | #define PCI_DEVICE_ID_NVIDIA_NVENET_24 0x054C | 1241 | #define PCI_DEVICE_ID_NVIDIA_NVENET_24 0x054C |
1239 | #define PCI_DEVICE_ID_NVIDIA_NVENET_25 0x054D | 1242 | #define PCI_DEVICE_ID_NVIDIA_NVENET_25 0x054D |
1240 | #define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E | 1243 | #define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E |
@@ -1245,11 +1248,14 @@ | |||
1245 | #define PCI_DEVICE_ID_NVIDIA_NVENET_31 0x07DF | 1248 | #define PCI_DEVICE_ID_NVIDIA_NVENET_31 0x07DF |
1246 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 | 1249 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 |
1247 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C | 1250 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C |
1251 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP78S_SMBUS 0x0752 | ||
1248 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 | 1252 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 |
1249 | #define PCI_DEVICE_ID_NVIDIA_NVENET_32 0x0760 | 1253 | #define PCI_DEVICE_ID_NVIDIA_NVENET_32 0x0760 |
1250 | #define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761 | 1254 | #define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761 |
1251 | #define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762 | 1255 | #define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762 |
1252 | #define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763 | 1256 | #define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763 |
1257 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_SMBUS 0x07D8 | ||
1258 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2 | ||
1253 | #define PCI_DEVICE_ID_NVIDIA_NVENET_36 0x0AB0 | 1259 | #define PCI_DEVICE_ID_NVIDIA_NVENET_36 0x0AB0 |
1254 | #define PCI_DEVICE_ID_NVIDIA_NVENET_37 0x0AB1 | 1260 | #define PCI_DEVICE_ID_NVIDIA_NVENET_37 0x0AB1 |
1255 | #define PCI_DEVICE_ID_NVIDIA_NVENET_38 0x0AB2 | 1261 | #define PCI_DEVICE_ID_NVIDIA_NVENET_38 0x0AB2 |
@@ -1473,6 +1479,7 @@ | |||
1473 | #define PCI_DEVICE_ID_SERVERWORKS_HT1000IDE 0x0214 | 1479 | #define PCI_DEVICE_ID_SERVERWORKS_HT1000IDE 0x0214 |
1474 | #define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2 0x0217 | 1480 | #define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2 0x0217 |
1475 | #define PCI_DEVICE_ID_SERVERWORKS_CSB6LPC 0x0227 | 1481 | #define PCI_DEVICE_ID_SERVERWORKS_CSB6LPC 0x0227 |
1482 | #define PCI_DEVICE_ID_SERVERWORKS_HT1100LD 0x0408 | ||
1476 | 1483 | ||
1477 | #define PCI_VENDOR_ID_SBE 0x1176 | 1484 | #define PCI_VENDOR_ID_SBE 0x1176 |
1478 | #define PCI_DEVICE_ID_SBE_WANXL100 0x0301 | 1485 | #define PCI_DEVICE_ID_SBE_WANXL100 0x0301 |
@@ -1971,6 +1978,8 @@ | |||
1971 | 1978 | ||
1972 | #define PCI_VENDOR_ID_SAMSUNG 0x144d | 1979 | #define PCI_VENDOR_ID_SAMSUNG 0x144d |
1973 | 1980 | ||
1981 | #define PCI_VENDOR_ID_AMBIT 0x1468 | ||
1982 | |||
1974 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 | 1983 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 |
1975 | 1984 | ||
1976 | #define PCI_VENDOR_ID_TITAN 0x14D2 | 1985 | #define PCI_VENDOR_ID_TITAN 0x14D2 |
@@ -2112,6 +2121,8 @@ | |||
2112 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c | 2121 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c |
2113 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 | 2122 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 |
2114 | 2123 | ||
2124 | #define PCI_VENDOR_ID_DFI 0x15bd | ||
2125 | |||
2115 | #define PCI_VENDOR_ID_QUICKNET 0x15e2 | 2126 | #define PCI_VENDOR_ID_QUICKNET 0x15e2 |
2116 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 | 2127 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 |
2117 | 2128 | ||
@@ -2215,10 +2226,20 @@ | |||
2215 | 2226 | ||
2216 | #define PCI_VENDOR_ID_TOPSPIN 0x1867 | 2227 | #define PCI_VENDOR_ID_TOPSPIN 0x1867 |
2217 | 2228 | ||
2229 | #define PCI_VENDOR_ID_SILAN 0x1904 | ||
2230 | |||
2218 | #define PCI_VENDOR_ID_TDI 0x192E | 2231 | #define PCI_VENDOR_ID_TDI 0x192E |
2219 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 | 2232 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 |
2220 | 2233 | ||
2221 | #define PCI_VENDOR_ID_FREESCALE 0x1957 | 2234 | #define PCI_VENDOR_ID_FREESCALE 0x1957 |
2235 | #define PCI_DEVICE_ID_MPC8315E 0x00b4 | ||
2236 | #define PCI_DEVICE_ID_MPC8315 0x00b5 | ||
2237 | #define PCI_DEVICE_ID_MPC8314E 0x00b6 | ||
2238 | #define PCI_DEVICE_ID_MPC8314 0x00b7 | ||
2239 | #define PCI_DEVICE_ID_MPC8378E 0x00c4 | ||
2240 | #define PCI_DEVICE_ID_MPC8378 0x00c5 | ||
2241 | #define PCI_DEVICE_ID_MPC8377E 0x00c6 | ||
2242 | #define PCI_DEVICE_ID_MPC8377 0x00c7 | ||
2222 | #define PCI_DEVICE_ID_MPC8548E 0x0012 | 2243 | #define PCI_DEVICE_ID_MPC8548E 0x0012 |
2223 | #define PCI_DEVICE_ID_MPC8548 0x0013 | 2244 | #define PCI_DEVICE_ID_MPC8548 0x0013 |
2224 | #define PCI_DEVICE_ID_MPC8543E 0x0014 | 2245 | #define PCI_DEVICE_ID_MPC8543E 0x0014 |
@@ -2263,6 +2284,8 @@ | |||
2263 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 | 2284 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 |
2264 | #define PCI_DEVICE_ID_KORENIX_JETCARDF1 0x16ff | 2285 | #define PCI_DEVICE_ID_KORENIX_JETCARDF1 0x16ff |
2265 | 2286 | ||
2287 | #define PCI_VENDOR_ID_QMI 0x1a32 | ||
2288 | |||
2266 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 | 2289 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 |
2267 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 | 2290 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 |
2268 | 2291 | ||
@@ -2373,6 +2396,7 @@ | |||
2373 | #define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c | 2396 | #define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c |
2374 | #define PCI_DEVICE_ID_INTEL_82801DB_0 0x24c0 | 2397 | #define PCI_DEVICE_ID_INTEL_82801DB_0 0x24c0 |
2375 | #define PCI_DEVICE_ID_INTEL_82801DB_1 0x24c1 | 2398 | #define PCI_DEVICE_ID_INTEL_82801DB_1 0x24c1 |
2399 | #define PCI_DEVICE_ID_INTEL_82801DB_2 0x24c2 | ||
2376 | #define PCI_DEVICE_ID_INTEL_82801DB_3 0x24c3 | 2400 | #define PCI_DEVICE_ID_INTEL_82801DB_3 0x24c3 |
2377 | #define PCI_DEVICE_ID_INTEL_82801DB_5 0x24c5 | 2401 | #define PCI_DEVICE_ID_INTEL_82801DB_5 0x24c5 |
2378 | #define PCI_DEVICE_ID_INTEL_82801DB_6 0x24c6 | 2402 | #define PCI_DEVICE_ID_INTEL_82801DB_6 0x24c6 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 027815b4635e..e4d08c1b2e0b 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -235,7 +235,7 @@ | |||
235 | #define PCI_PM_CAP_PME_SHIFT 11 /* Start of the PME Mask in PMC */ | 235 | #define PCI_PM_CAP_PME_SHIFT 11 /* Start of the PME Mask in PMC */ |
236 | #define PCI_PM_CTRL 4 /* PM control and status register */ | 236 | #define PCI_PM_CTRL 4 /* PM control and status register */ |
237 | #define PCI_PM_CTRL_STATE_MASK 0x0003 /* Current power state (D0 to D3) */ | 237 | #define PCI_PM_CTRL_STATE_MASK 0x0003 /* Current power state (D0 to D3) */ |
238 | #define PCI_PM_CTRL_NO_SOFT_RESET 0x0004 /* No reset for D3hot->D0 */ | 238 | #define PCI_PM_CTRL_NO_SOFT_RESET 0x0008 /* No reset for D3hot->D0 */ |
239 | #define PCI_PM_CTRL_PME_ENABLE 0x0100 /* PME pin enable */ | 239 | #define PCI_PM_CTRL_PME_ENABLE 0x0100 /* PME pin enable */ |
240 | #define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00 /* Data select (??) */ | 240 | #define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00 /* Data select (??) */ |
241 | #define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000 /* Data scale (??) */ | 241 | #define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000 /* Data scale (??) */ |
@@ -375,6 +375,7 @@ | |||
375 | #define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ | 375 | #define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ |
376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ | 376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ |
377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ | 377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ |
378 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ | ||
378 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ | 379 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ |
379 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ | 380 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ |
380 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ | 381 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ |
@@ -487,6 +488,8 @@ | |||
487 | #define PCI_EXP_DEVCAP2_ARI 0x20 /* Alternative Routing-ID */ | 488 | #define PCI_EXP_DEVCAP2_ARI 0x20 /* Alternative Routing-ID */ |
488 | #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ | 489 | #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ |
489 | #define PCI_EXP_DEVCTL2_ARI 0x20 /* Alternative Routing-ID */ | 490 | #define PCI_EXP_DEVCTL2_ARI 0x20 /* Alternative Routing-ID */ |
491 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ | ||
492 | #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ | ||
490 | 493 | ||
491 | /* Extended Capabilities (PCI-X 2.0 and Express) */ | 494 | /* Extended Capabilities (PCI-X 2.0 and Express) */ |
492 | #define PCI_EXT_CAP_ID(header) (header & 0x0000ffff) | 495 | #define PCI_EXT_CAP_ID(header) (header & 0x0000ffff) |
@@ -498,6 +501,7 @@ | |||
498 | #define PCI_EXT_CAP_ID_DSN 3 | 501 | #define PCI_EXT_CAP_ID_DSN 3 |
499 | #define PCI_EXT_CAP_ID_PWR 4 | 502 | #define PCI_EXT_CAP_ID_PWR 4 |
500 | #define PCI_EXT_CAP_ID_ARI 14 | 503 | #define PCI_EXT_CAP_ID_ARI 14 |
504 | #define PCI_EXT_CAP_ID_SRIOV 16 | ||
501 | 505 | ||
502 | /* Advanced Error Reporting */ | 506 | /* Advanced Error Reporting */ |
503 | #define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ | 507 | #define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ |
@@ -615,4 +619,35 @@ | |||
615 | #define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */ | 619 | #define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */ |
616 | #define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */ | 620 | #define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */ |
617 | 621 | ||
622 | /* Single Root I/O Virtualization */ | ||
623 | #define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */ | ||
624 | #define PCI_SRIOV_CAP_VFM 0x01 /* VF Migration Capable */ | ||
625 | #define PCI_SRIOV_CAP_INTR(x) ((x) >> 21) /* Interrupt Message Number */ | ||
626 | #define PCI_SRIOV_CTRL 0x08 /* SR-IOV Control */ | ||
627 | #define PCI_SRIOV_CTRL_VFE 0x01 /* VF Enable */ | ||
628 | #define PCI_SRIOV_CTRL_VFM 0x02 /* VF Migration Enable */ | ||
629 | #define PCI_SRIOV_CTRL_INTR 0x04 /* VF Migration Interrupt Enable */ | ||
630 | #define PCI_SRIOV_CTRL_MSE 0x08 /* VF Memory Space Enable */ | ||
631 | #define PCI_SRIOV_CTRL_ARI 0x10 /* ARI Capable Hierarchy */ | ||
632 | #define PCI_SRIOV_STATUS 0x0a /* SR-IOV Status */ | ||
633 | #define PCI_SRIOV_STATUS_VFM 0x01 /* VF Migration Status */ | ||
634 | #define PCI_SRIOV_INITIAL_VF 0x0c /* Initial VFs */ | ||
635 | #define PCI_SRIOV_TOTAL_VF 0x0e /* Total VFs */ | ||
636 | #define PCI_SRIOV_NUM_VF 0x10 /* Number of VFs */ | ||
637 | #define PCI_SRIOV_FUNC_LINK 0x12 /* Function Dependency Link */ | ||
638 | #define PCI_SRIOV_VF_OFFSET 0x14 /* First VF Offset */ | ||
639 | #define PCI_SRIOV_VF_STRIDE 0x16 /* Following VF Stride */ | ||
640 | #define PCI_SRIOV_VF_DID 0x1a /* VF Device ID */ | ||
641 | #define PCI_SRIOV_SUP_PGSIZE 0x1c /* Supported Page Sizes */ | ||
642 | #define PCI_SRIOV_SYS_PGSIZE 0x20 /* System Page Size */ | ||
643 | #define PCI_SRIOV_BAR 0x24 /* VF BAR0 */ | ||
644 | #define PCI_SRIOV_NUM_BARS 6 /* Number of VF BARs */ | ||
645 | #define PCI_SRIOV_VFM 0x3c /* VF Migration State Array Offset*/ | ||
646 | #define PCI_SRIOV_VFM_BIR(x) ((x) & 7) /* State BIR */ | ||
647 | #define PCI_SRIOV_VFM_OFFSET(x) ((x) & ~7) /* State Offset */ | ||
648 | #define PCI_SRIOV_VFM_UA 0x0 /* Inactive.Unavailable */ | ||
649 | #define PCI_SRIOV_VFM_MI 0x1 /* Dormant.MigrateIn */ | ||
650 | #define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */ | ||
651 | #define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */ | ||
652 | |||
618 | #endif /* LINUX_PCI_REGS_H */ | 653 | #endif /* LINUX_PCI_REGS_H */ |
diff --git a/include/linux/pcieport_if.h b/include/linux/pcieport_if.h index 6cd91e3f9820..b4c79545330b 100644 --- a/include/linux/pcieport_if.h +++ b/include/linux/pcieport_if.h | |||
@@ -16,29 +16,30 @@ | |||
16 | #define PCIE_ANY_PORT 7 | 16 | #define PCIE_ANY_PORT 7 |
17 | 17 | ||
18 | /* Service Type */ | 18 | /* Service Type */ |
19 | #define PCIE_PORT_SERVICE_PME 1 /* Power Management Event */ | 19 | #define PCIE_PORT_SERVICE_PME_SHIFT 0 /* Power Management Event */ |
20 | #define PCIE_PORT_SERVICE_AER 2 /* Advanced Error Reporting */ | 20 | #define PCIE_PORT_SERVICE_PME (1 << PCIE_PORT_SERVICE_PME_SHIFT) |
21 | #define PCIE_PORT_SERVICE_HP 4 /* Native Hotplug */ | 21 | #define PCIE_PORT_SERVICE_AER_SHIFT 1 /* Advanced Error Reporting */ |
22 | #define PCIE_PORT_SERVICE_VC 8 /* Virtual Channel */ | 22 | #define PCIE_PORT_SERVICE_AER (1 << PCIE_PORT_SERVICE_AER_SHIFT) |
23 | #define PCIE_PORT_SERVICE_HP_SHIFT 2 /* Native Hotplug */ | ||
24 | #define PCIE_PORT_SERVICE_HP (1 << PCIE_PORT_SERVICE_HP_SHIFT) | ||
25 | #define PCIE_PORT_SERVICE_VC_SHIFT 3 /* Virtual Channel */ | ||
26 | #define PCIE_PORT_SERVICE_VC (1 << PCIE_PORT_SERVICE_VC_SHIFT) | ||
23 | 27 | ||
24 | /* Root/Upstream/Downstream Port's Interrupt Mode */ | 28 | /* Root/Upstream/Downstream Port's Interrupt Mode */ |
29 | #define PCIE_PORT_NO_IRQ (-1) | ||
25 | #define PCIE_PORT_INTx_MODE 0 | 30 | #define PCIE_PORT_INTx_MODE 0 |
26 | #define PCIE_PORT_MSI_MODE 1 | 31 | #define PCIE_PORT_MSI_MODE 1 |
27 | #define PCIE_PORT_MSIX_MODE 2 | 32 | #define PCIE_PORT_MSIX_MODE 2 |
28 | 33 | ||
29 | struct pcie_port_service_id { | 34 | struct pcie_port_data { |
30 | __u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/ | 35 | int port_type; /* Type of the port */ |
31 | __u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */ | 36 | int port_irq_mode; /* [0:INTx | 1:MSI | 2:MSI-X] */ |
32 | __u32 class, class_mask; /* (class,subclass,prog-if) triplet */ | ||
33 | __u32 port_type, service_type; /* Port Entity */ | ||
34 | kernel_ulong_t driver_data; | ||
35 | }; | 37 | }; |
36 | 38 | ||
37 | struct pcie_device { | 39 | struct pcie_device { |
38 | int irq; /* Service IRQ/MSI/MSI-X Vector */ | 40 | int irq; /* Service IRQ/MSI/MSI-X Vector */ |
39 | int interrupt_mode; /* [0:INTx | 1:MSI | 2:MSI-X] */ | 41 | struct pci_dev *port; /* Root/Upstream/Downstream Port */ |
40 | struct pcie_port_service_id id; /* Service ID */ | 42 | u32 service; /* Port service this device represents */ |
41 | struct pci_dev *port; /* Root/Upstream/Downstream Port */ | ||
42 | void *priv_data; /* Service Private Data */ | 43 | void *priv_data; /* Service Private Data */ |
43 | struct device device; /* Generic Device Interface */ | 44 | struct device device; /* Generic Device Interface */ |
44 | }; | 45 | }; |
@@ -56,10 +57,9 @@ static inline void* get_service_data(struct pcie_device *dev) | |||
56 | 57 | ||
57 | struct pcie_port_service_driver { | 58 | struct pcie_port_service_driver { |
58 | const char *name; | 59 | const char *name; |
59 | int (*probe) (struct pcie_device *dev, | 60 | int (*probe) (struct pcie_device *dev); |
60 | const struct pcie_port_service_id *id); | ||
61 | void (*remove) (struct pcie_device *dev); | 61 | void (*remove) (struct pcie_device *dev); |
62 | int (*suspend) (struct pcie_device *dev, pm_message_t state); | 62 | int (*suspend) (struct pcie_device *dev); |
63 | int (*resume) (struct pcie_device *dev); | 63 | int (*resume) (struct pcie_device *dev); |
64 | 64 | ||
65 | /* Service Error Recovery Handler */ | 65 | /* Service Error Recovery Handler */ |
@@ -68,7 +68,9 @@ struct pcie_port_service_driver { | |||
68 | /* Link Reset Capability - AER service driver specific */ | 68 | /* Link Reset Capability - AER service driver specific */ |
69 | pci_ers_result_t (*reset_link) (struct pci_dev *dev); | 69 | pci_ers_result_t (*reset_link) (struct pci_dev *dev); |
70 | 70 | ||
71 | const struct pcie_port_service_id *id_table; | 71 | int port_type; /* Type of the port this driver can handle */ |
72 | u32 service; /* Port service this device represents */ | ||
73 | |||
72 | struct device_driver driver; | 74 | struct device_driver driver; |
73 | }; | 75 | }; |
74 | #define to_service_driver(d) \ | 76 | #define to_service_driver(d) \ |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 54a968b4b924..ee5615d65211 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -107,10 +107,14 @@ typedef void (*pcpu_populate_pte_fn_t)(unsigned long addr); | |||
107 | 107 | ||
108 | extern size_t __init pcpu_setup_first_chunk(pcpu_get_page_fn_t get_page_fn, | 108 | extern size_t __init pcpu_setup_first_chunk(pcpu_get_page_fn_t get_page_fn, |
109 | size_t static_size, size_t reserved_size, | 109 | size_t static_size, size_t reserved_size, |
110 | ssize_t unit_size, ssize_t dyn_size, | 110 | ssize_t dyn_size, ssize_t unit_size, |
111 | void *base_addr, | 111 | void *base_addr, |
112 | pcpu_populate_pte_fn_t populate_pte_fn); | 112 | pcpu_populate_pte_fn_t populate_pte_fn); |
113 | 113 | ||
114 | extern ssize_t __init pcpu_embed_first_chunk( | ||
115 | size_t static_size, size_t reserved_size, | ||
116 | ssize_t dyn_size, ssize_t unit_size); | ||
117 | |||
114 | /* | 118 | /* |
115 | * Use this to get to a cpu's version of the per-cpu object | 119 | * Use this to get to a cpu's version of the per-cpu object |
116 | * dynamically allocated. Non-atomic access to the current CPU's | 120 | * dynamically allocated. Non-atomic access to the current CPU's |
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/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/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 24ba5f67b3a3..1d4e2d289821 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -400,6 +400,9 @@ extern void __suspend_report_result(const char *function, void *fn, int ret); | |||
400 | 400 | ||
401 | #else /* !CONFIG_PM_SLEEP */ | 401 | #else /* !CONFIG_PM_SLEEP */ |
402 | 402 | ||
403 | #define device_pm_lock() do {} while (0) | ||
404 | #define device_pm_unlock() do {} while (0) | ||
405 | |||
403 | static inline int device_suspend(pm_message_t state) | 406 | static inline int device_suspend(pm_message_t state) |
404 | { | 407 | { |
405 | return 0; | 408 | return 0; |
@@ -409,6 +412,14 @@ static inline int device_suspend(pm_message_t state) | |||
409 | 412 | ||
410 | #endif /* !CONFIG_PM_SLEEP */ | 413 | #endif /* !CONFIG_PM_SLEEP */ |
411 | 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 | |||
412 | /* | 423 | /* |
413 | * Global Power Management flags | 424 | * Global Power Management flags |
414 | * 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/poison.h b/include/linux/poison.h index 9f31683728fd..6729f7dcd60e 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h | |||
@@ -17,6 +17,9 @@ | |||
17 | */ | 17 | */ |
18 | #define TIMER_ENTRY_STATIC ((void *) 0x74737461) | 18 | #define TIMER_ENTRY_STATIC ((void *) 0x74737461) |
19 | 19 | ||
20 | /********** mm/debug-pagealloc.c **********/ | ||
21 | #define PAGE_POISON 0xaa | ||
22 | |||
20 | /********** mm/slab.c **********/ | 23 | /********** mm/slab.c **********/ |
21 | /* | 24 | /* |
22 | * Magic nums for obj red zoning. | 25 | * Magic nums for obj red zoning. |
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 1c866bda2018..0f93ed6b4a88 100644 --- a/include/linux/ppp_defs.h +++ b/include/linux/ppp_defs.h | |||
@@ -177,8 +177,8 @@ struct ppp_comp_stats { | |||
177 | * the last NP packet was sent or received. | 177 | * the last NP packet was sent or received. |
178 | */ | 178 | */ |
179 | struct ppp_idle { | 179 | struct ppp_idle { |
180 | time_t xmit_idle; /* time since last NP packet sent */ | 180 | __kernel_time_t xmit_idle; /* time since last NP packet sent */ |
181 | time_t recv_idle; /* time since last NP packet received */ | 181 | __kernel_time_t recv_idle; /* time since last NP packet received */ |
182 | }; | 182 | }; |
183 | 183 | ||
184 | #endif /* _PPP_DEFS_H_ */ | 184 | #endif /* _PPP_DEFS_H_ */ |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index b8bdb96eff78..fbfa3d44d33d 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -41,9 +41,6 @@ enum { | |||
41 | * while parent/subdir create the directory structure (every | 41 | * while parent/subdir create the directory structure (every |
42 | * /proc file has a parent, but "subdir" is NULL for all | 42 | * /proc file has a parent, but "subdir" is NULL for all |
43 | * non-directory entries). | 43 | * non-directory entries). |
44 | * | ||
45 | * "owner" is used to protect module | ||
46 | * from unloading while proc_dir_entry is in use | ||
47 | */ | 44 | */ |
48 | 45 | ||
49 | typedef int (read_proc_t)(char *page, char **start, off_t off, | 46 | typedef int (read_proc_t)(char *page, char **start, off_t off, |
@@ -70,7 +67,6 @@ struct proc_dir_entry { | |||
70 | * somewhere. | 67 | * somewhere. |
71 | */ | 68 | */ |
72 | const struct file_operations *proc_fops; | 69 | const struct file_operations *proc_fops; |
73 | struct module *owner; | ||
74 | struct proc_dir_entry *next, *parent, *subdir; | 70 | struct proc_dir_entry *next, *parent, *subdir; |
75 | void *data; | 71 | void *data; |
76 | read_proc_t *read_proc; | 72 | read_proc_t *read_proc; |
diff --git a/include/linux/quota.h b/include/linux/quota.h index d72d5d84fde5..78c48895b12a 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -198,6 +198,7 @@ struct mem_dqblk { | |||
198 | qsize_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ | 198 | qsize_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ |
199 | qsize_t dqb_bsoftlimit; /* preferred limit on disk blks */ | 199 | qsize_t dqb_bsoftlimit; /* preferred limit on disk blks */ |
200 | qsize_t dqb_curspace; /* current used space */ | 200 | qsize_t dqb_curspace; /* current used space */ |
201 | qsize_t dqb_rsvspace; /* current reserved space for delalloc*/ | ||
201 | qsize_t dqb_ihardlimit; /* absolute limit on allocated inodes */ | 202 | qsize_t dqb_ihardlimit; /* absolute limit on allocated inodes */ |
202 | qsize_t dqb_isoftlimit; /* preferred inode limit */ | 203 | qsize_t dqb_isoftlimit; /* preferred inode limit */ |
203 | qsize_t dqb_curinodes; /* current # allocated inodes */ | 204 | qsize_t dqb_curinodes; /* current # allocated inodes */ |
@@ -276,8 +277,6 @@ struct dquot { | |||
276 | struct mem_dqblk dq_dqb; /* Diskquota usage */ | 277 | struct mem_dqblk dq_dqb; /* Diskquota usage */ |
277 | }; | 278 | }; |
278 | 279 | ||
279 | #define NODQUOT (struct dquot *)NULL | ||
280 | |||
281 | #define QUOTA_OK 0 | 280 | #define QUOTA_OK 0 |
282 | #define NO_QUOTA 1 | 281 | #define NO_QUOTA 1 |
283 | 282 | ||
@@ -308,6 +307,14 @@ struct dquot_operations { | |||
308 | int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */ | 307 | int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */ |
309 | int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */ | 308 | int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */ |
310 | int (*write_info) (struct super_block *, int); /* Write of quota "superblock" */ | 309 | int (*write_info) (struct super_block *, int); /* Write of quota "superblock" */ |
310 | /* reserve quota for delayed block allocation */ | ||
311 | int (*reserve_space) (struct inode *, qsize_t, int); | ||
312 | /* claim reserved quota for delayed alloc */ | ||
313 | int (*claim_space) (struct inode *, qsize_t); | ||
314 | /* release rsved quota for delayed alloc */ | ||
315 | void (*release_rsv) (struct inode *, qsize_t); | ||
316 | /* get reserved quota for delayed alloc */ | ||
317 | qsize_t (*get_reserved_space) (struct inode *); | ||
311 | }; | 318 | }; |
312 | 319 | ||
313 | /* Operations handling requests from userspace */ | 320 | /* Operations handling requests from userspace */ |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 0b35b3a1be05..36353d95c8db 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -35,6 +35,11 @@ void dquot_destroy(struct dquot *dquot); | |||
35 | int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); | 35 | int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); |
36 | int dquot_alloc_inode(const struct inode *inode, qsize_t number); | 36 | int dquot_alloc_inode(const struct inode *inode, qsize_t number); |
37 | 37 | ||
38 | int dquot_reserve_space(struct inode *inode, qsize_t number, int prealloc); | ||
39 | int dquot_claim_space(struct inode *inode, qsize_t number); | ||
40 | void dquot_release_reserved_space(struct inode *inode, qsize_t number); | ||
41 | qsize_t dquot_get_reserved_space(struct inode *inode); | ||
42 | |||
38 | int dquot_free_space(struct inode *inode, qsize_t number); | 43 | int dquot_free_space(struct inode *inode, qsize_t number); |
39 | int dquot_free_inode(const struct inode *inode, qsize_t number); | 44 | int dquot_free_inode(const struct inode *inode, qsize_t number); |
40 | 45 | ||
@@ -183,6 +188,16 @@ static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr) | |||
183 | return ret; | 188 | return ret; |
184 | } | 189 | } |
185 | 190 | ||
191 | static inline int vfs_dq_reserve_space(struct inode *inode, qsize_t nr) | ||
192 | { | ||
193 | if (sb_any_quota_active(inode->i_sb)) { | ||
194 | /* Used space is updated in alloc_space() */ | ||
195 | if (inode->i_sb->dq_op->reserve_space(inode, nr, 0) == NO_QUOTA) | ||
196 | return 1; | ||
197 | } | ||
198 | return 0; | ||
199 | } | ||
200 | |||
186 | static inline int vfs_dq_alloc_inode(struct inode *inode) | 201 | static inline int vfs_dq_alloc_inode(struct inode *inode) |
187 | { | 202 | { |
188 | if (sb_any_quota_active(inode->i_sb)) { | 203 | if (sb_any_quota_active(inode->i_sb)) { |
@@ -193,6 +208,31 @@ static inline int vfs_dq_alloc_inode(struct inode *inode) | |||
193 | return 0; | 208 | return 0; |
194 | } | 209 | } |
195 | 210 | ||
211 | /* | ||
212 | * Convert in-memory reserved quotas to real consumed quotas | ||
213 | */ | ||
214 | static inline int vfs_dq_claim_space(struct inode *inode, qsize_t nr) | ||
215 | { | ||
216 | if (sb_any_quota_active(inode->i_sb)) { | ||
217 | if (inode->i_sb->dq_op->claim_space(inode, nr) == NO_QUOTA) | ||
218 | return 1; | ||
219 | } else | ||
220 | inode_add_bytes(inode, nr); | ||
221 | |||
222 | mark_inode_dirty(inode); | ||
223 | return 0; | ||
224 | } | ||
225 | |||
226 | /* | ||
227 | * Release reserved (in-memory) quotas | ||
228 | */ | ||
229 | static inline | ||
230 | void vfs_dq_release_reservation_space(struct inode *inode, qsize_t nr) | ||
231 | { | ||
232 | if (sb_any_quota_active(inode->i_sb)) | ||
233 | inode->i_sb->dq_op->release_rsv(inode, nr); | ||
234 | } | ||
235 | |||
196 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) | 236 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) |
197 | { | 237 | { |
198 | if (sb_any_quota_active(inode->i_sb)) | 238 | if (sb_any_quota_active(inode->i_sb)) |
@@ -339,6 +379,22 @@ static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr) | |||
339 | return 0; | 379 | return 0; |
340 | } | 380 | } |
341 | 381 | ||
382 | static inline int vfs_dq_reserve_space(struct inode *inode, qsize_t nr) | ||
383 | { | ||
384 | return 0; | ||
385 | } | ||
386 | |||
387 | static inline int vfs_dq_claim_space(struct inode *inode, qsize_t nr) | ||
388 | { | ||
389 | return vfs_dq_alloc_space(inode, nr); | ||
390 | } | ||
391 | |||
392 | static inline | ||
393 | int vfs_dq_release_reservation_space(struct inode *inode, qsize_t nr) | ||
394 | { | ||
395 | return 0; | ||
396 | } | ||
397 | |||
342 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) | 398 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) |
343 | { | 399 | { |
344 | inode_sub_bytes(inode, nr); | 400 | inode_sub_bytes(inode, nr); |
@@ -354,67 +410,48 @@ static inline void vfs_dq_free_space(struct inode *inode, qsize_t nr) | |||
354 | 410 | ||
355 | static inline int vfs_dq_prealloc_block_nodirty(struct inode *inode, qsize_t nr) | 411 | static inline int vfs_dq_prealloc_block_nodirty(struct inode *inode, qsize_t nr) |
356 | { | 412 | { |
357 | return vfs_dq_prealloc_space_nodirty(inode, | 413 | return vfs_dq_prealloc_space_nodirty(inode, nr << inode->i_blkbits); |
358 | nr << inode->i_sb->s_blocksize_bits); | ||
359 | } | 414 | } |
360 | 415 | ||
361 | static inline int vfs_dq_prealloc_block(struct inode *inode, qsize_t nr) | 416 | static inline int vfs_dq_prealloc_block(struct inode *inode, qsize_t nr) |
362 | { | 417 | { |
363 | return vfs_dq_prealloc_space(inode, | 418 | return vfs_dq_prealloc_space(inode, nr << inode->i_blkbits); |
364 | nr << inode->i_sb->s_blocksize_bits); | ||
365 | } | 419 | } |
366 | 420 | ||
367 | static inline int vfs_dq_alloc_block_nodirty(struct inode *inode, qsize_t nr) | 421 | static inline int vfs_dq_alloc_block_nodirty(struct inode *inode, qsize_t nr) |
368 | { | 422 | { |
369 | return vfs_dq_alloc_space_nodirty(inode, | 423 | return vfs_dq_alloc_space_nodirty(inode, nr << inode->i_blkbits); |
370 | nr << inode->i_sb->s_blocksize_bits); | ||
371 | } | 424 | } |
372 | 425 | ||
373 | static inline int vfs_dq_alloc_block(struct inode *inode, qsize_t nr) | 426 | static inline int vfs_dq_alloc_block(struct inode *inode, qsize_t nr) |
374 | { | 427 | { |
375 | return vfs_dq_alloc_space(inode, | 428 | return vfs_dq_alloc_space(inode, nr << inode->i_blkbits); |
376 | nr << inode->i_sb->s_blocksize_bits); | 429 | } |
430 | |||
431 | static inline int vfs_dq_reserve_block(struct inode *inode, qsize_t nr) | ||
432 | { | ||
433 | return vfs_dq_reserve_space(inode, nr << inode->i_blkbits); | ||
434 | } | ||
435 | |||
436 | static inline int vfs_dq_claim_block(struct inode *inode, qsize_t nr) | ||
437 | { | ||
438 | return vfs_dq_claim_space(inode, nr << inode->i_blkbits); | ||
439 | } | ||
440 | |||
441 | static inline | ||
442 | void vfs_dq_release_reservation_block(struct inode *inode, qsize_t nr) | ||
443 | { | ||
444 | vfs_dq_release_reservation_space(inode, nr << inode->i_blkbits); | ||
377 | } | 445 | } |
378 | 446 | ||
379 | static inline void vfs_dq_free_block_nodirty(struct inode *inode, qsize_t nr) | 447 | static inline void vfs_dq_free_block_nodirty(struct inode *inode, qsize_t nr) |
380 | { | 448 | { |
381 | vfs_dq_free_space_nodirty(inode, nr << inode->i_sb->s_blocksize_bits); | 449 | vfs_dq_free_space_nodirty(inode, nr << inode->i_blkbits); |
382 | } | 450 | } |
383 | 451 | ||
384 | static inline void vfs_dq_free_block(struct inode *inode, qsize_t nr) | 452 | static inline void vfs_dq_free_block(struct inode *inode, qsize_t nr) |
385 | { | 453 | { |
386 | vfs_dq_free_space(inode, nr << inode->i_sb->s_blocksize_bits); | 454 | vfs_dq_free_space(inode, nr << inode->i_blkbits); |
387 | } | 455 | } |
388 | 456 | ||
389 | /* | ||
390 | * Define uppercase equivalents for compatibility with old function names | ||
391 | * Can go away when we think all users have been converted (15/04/2008) | ||
392 | */ | ||
393 | #define DQUOT_INIT(inode) vfs_dq_init(inode) | ||
394 | #define DQUOT_DROP(inode) vfs_dq_drop(inode) | ||
395 | #define DQUOT_PREALLOC_SPACE_NODIRTY(inode, nr) \ | ||
396 | vfs_dq_prealloc_space_nodirty(inode, nr) | ||
397 | #define DQUOT_PREALLOC_SPACE(inode, nr) vfs_dq_prealloc_space(inode, nr) | ||
398 | #define DQUOT_ALLOC_SPACE_NODIRTY(inode, nr) \ | ||
399 | vfs_dq_alloc_space_nodirty(inode, nr) | ||
400 | #define DQUOT_ALLOC_SPACE(inode, nr) vfs_dq_alloc_space(inode, nr) | ||
401 | #define DQUOT_PREALLOC_BLOCK_NODIRTY(inode, nr) \ | ||
402 | vfs_dq_prealloc_block_nodirty(inode, nr) | ||
403 | #define DQUOT_PREALLOC_BLOCK(inode, nr) vfs_dq_prealloc_block(inode, nr) | ||
404 | #define DQUOT_ALLOC_BLOCK_NODIRTY(inode, nr) \ | ||
405 | vfs_dq_alloc_block_nodirty(inode, nr) | ||
406 | #define DQUOT_ALLOC_BLOCK(inode, nr) vfs_dq_alloc_block(inode, nr) | ||
407 | #define DQUOT_ALLOC_INODE(inode) vfs_dq_alloc_inode(inode) | ||
408 | #define DQUOT_FREE_SPACE_NODIRTY(inode, nr) \ | ||
409 | vfs_dq_free_space_nodirty(inode, nr) | ||
410 | #define DQUOT_FREE_SPACE(inode, nr) vfs_dq_free_space(inode, nr) | ||
411 | #define DQUOT_FREE_BLOCK_NODIRTY(inode, nr) \ | ||
412 | vfs_dq_free_block_nodirty(inode, nr) | ||
413 | #define DQUOT_FREE_BLOCK(inode, nr) vfs_dq_free_block(inode, nr) | ||
414 | #define DQUOT_FREE_INODE(inode) vfs_dq_free_inode(inode) | ||
415 | #define DQUOT_TRANSFER(inode, iattr) vfs_dq_transfer(inode, iattr) | ||
416 | #define DQUOT_SYNC(sb) vfs_dq_sync(sb) | ||
417 | #define DQUOT_OFF(sb, remount) vfs_dq_off(sb, remount) | ||
418 | #define DQUOT_ON_REMOUNT(sb) vfs_dq_quota_on_remount(sb) | ||
419 | |||
420 | #endif /* _LINUX_QUOTAOPS_ */ | 457 | #endif /* _LINUX_QUOTAOPS_ */ |
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_acl.h b/include/linux/reiserfs_acl.h index fe00f781a622..8cc65757e47a 100644 --- a/include/linux/reiserfs_acl.h +++ b/include/linux/reiserfs_acl.h | |||
@@ -49,13 +49,12 @@ static inline int reiserfs_acl_count(size_t size) | |||
49 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL | 49 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL |
50 | struct posix_acl *reiserfs_get_acl(struct inode *inode, int type); | 50 | struct posix_acl *reiserfs_get_acl(struct inode *inode, int type); |
51 | int reiserfs_acl_chmod(struct inode *inode); | 51 | int reiserfs_acl_chmod(struct inode *inode); |
52 | int reiserfs_inherit_default_acl(struct inode *dir, struct dentry *dentry, | 52 | int reiserfs_inherit_default_acl(struct reiserfs_transaction_handle *th, |
53 | struct inode *dir, struct dentry *dentry, | ||
53 | struct inode *inode); | 54 | struct inode *inode); |
54 | int reiserfs_cache_default_acl(struct inode *dir); | 55 | int reiserfs_cache_default_acl(struct inode *dir); |
55 | extern int reiserfs_xattr_posix_acl_init(void) __init; | 56 | extern struct xattr_handler reiserfs_posix_acl_default_handler; |
56 | extern int reiserfs_xattr_posix_acl_exit(void); | 57 | extern struct xattr_handler reiserfs_posix_acl_access_handler; |
57 | extern struct reiserfs_xattr_handler posix_acl_default_handler; | ||
58 | extern struct reiserfs_xattr_handler posix_acl_access_handler; | ||
59 | 58 | ||
60 | static inline void reiserfs_init_acl_access(struct inode *inode) | 59 | static inline void reiserfs_init_acl_access(struct inode *inode) |
61 | { | 60 | { |
@@ -75,23 +74,14 @@ static inline struct posix_acl *reiserfs_get_acl(struct inode *inode, int type) | |||
75 | return NULL; | 74 | return NULL; |
76 | } | 75 | } |
77 | 76 | ||
78 | static inline int reiserfs_xattr_posix_acl_init(void) | ||
79 | { | ||
80 | return 0; | ||
81 | } | ||
82 | |||
83 | static inline int reiserfs_xattr_posix_acl_exit(void) | ||
84 | { | ||
85 | return 0; | ||
86 | } | ||
87 | |||
88 | static inline int reiserfs_acl_chmod(struct inode *inode) | 77 | static inline int reiserfs_acl_chmod(struct inode *inode) |
89 | { | 78 | { |
90 | return 0; | 79 | return 0; |
91 | } | 80 | } |
92 | 81 | ||
93 | static inline int | 82 | static inline int |
94 | reiserfs_inherit_default_acl(const struct inode *dir, struct dentry *dentry, | 83 | reiserfs_inherit_default_acl(struct reiserfs_transaction_handle *th, |
84 | const struct inode *dir, struct dentry *dentry, | ||
95 | struct inode *inode) | 85 | struct inode *inode) |
96 | { | 86 | { |
97 | return 0; | 87 | return 0; |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index e356c99f0659..2245c78d5876 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -58,8 +58,6 @@ | |||
58 | #define reiserfs_write_lock( sb ) lock_kernel() | 58 | #define reiserfs_write_lock( sb ) lock_kernel() |
59 | #define reiserfs_write_unlock( sb ) unlock_kernel() | 59 | #define reiserfs_write_unlock( sb ) unlock_kernel() |
60 | 60 | ||
61 | /* xattr stuff */ | ||
62 | #define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem) | ||
63 | struct fid; | 61 | struct fid; |
64 | 62 | ||
65 | /* in reading the #defines, it may help to understand that they employ | 63 | /* in reading the #defines, it may help to understand that they employ |
@@ -104,15 +102,21 @@ struct fid; | |||
104 | */ | 102 | */ |
105 | #define REISERFS_DEBUG_CODE 5 /* extra messages to help find/debug errors */ | 103 | #define REISERFS_DEBUG_CODE 5 /* extra messages to help find/debug errors */ |
106 | 104 | ||
107 | void reiserfs_warning(struct super_block *s, const char *fmt, ...); | 105 | void __reiserfs_warning(struct super_block *s, const char *id, |
106 | const char *func, const char *fmt, ...); | ||
107 | #define reiserfs_warning(s, id, fmt, args...) \ | ||
108 | __reiserfs_warning(s, id, __func__, fmt, ##args) | ||
108 | /* assertions handling */ | 109 | /* assertions handling */ |
109 | 110 | ||
110 | /** always check a condition and panic if it's false. */ | 111 | /** always check a condition and panic if it's false. */ |
111 | #define __RASSERT( cond, scond, format, args... ) \ | 112 | #define __RASSERT(cond, scond, format, args...) \ |
112 | if( !( cond ) ) \ | 113 | do { \ |
113 | reiserfs_panic( NULL, "reiserfs[%i]: assertion " scond " failed at " \ | 114 | if (!(cond)) \ |
114 | __FILE__ ":%i:%s: " format "\n", \ | 115 | reiserfs_panic(NULL, "assertion failure", "(" #cond ") at " \ |
115 | in_interrupt() ? -1 : task_pid_nr(current), __LINE__ , __func__ , ##args ) | 116 | __FILE__ ":%i:%s: " format "\n", \ |
117 | in_interrupt() ? -1 : task_pid_nr(current), \ | ||
118 | __LINE__, __func__ , ##args); \ | ||
119 | } while (0) | ||
116 | 120 | ||
117 | #define RASSERT(cond, format, args...) __RASSERT(cond, #cond, format, ##args) | 121 | #define RASSERT(cond, format, args...) __RASSERT(cond, #cond, format, ##args) |
118 | 122 | ||
@@ -196,7 +200,11 @@ struct reiserfs_super_block { | |||
196 | __le32 s_flags; /* Right now used only by inode-attributes, if enabled */ | 200 | __le32 s_flags; /* Right now used only by inode-attributes, if enabled */ |
197 | unsigned char s_uuid[16]; /* filesystem unique identifier */ | 201 | unsigned char s_uuid[16]; /* filesystem unique identifier */ |
198 | unsigned char s_label[16]; /* filesystem volume label */ | 202 | unsigned char s_label[16]; /* filesystem volume label */ |
199 | char s_unused[88]; /* zero filled by mkreiserfs and | 203 | __le16 s_mnt_count; /* Count of mounts since last fsck */ |
204 | __le16 s_max_mnt_count; /* Maximum mounts before check */ | ||
205 | __le32 s_lastcheck; /* Timestamp of last fsck */ | ||
206 | __le32 s_check_interval; /* Interval between checks */ | ||
207 | char s_unused[76]; /* zero filled by mkreiserfs and | ||
200 | * reiserfs_convert_objectid_map_v1() | 208 | * reiserfs_convert_objectid_map_v1() |
201 | * so any additions must be updated | 209 | * so any additions must be updated |
202 | * there as well. */ | 210 | * there as well. */ |
@@ -578,10 +586,8 @@ static inline int uniqueness2type(__u32 uniqueness) | |||
578 | return TYPE_DIRECT; | 586 | return TYPE_DIRECT; |
579 | case V1_DIRENTRY_UNIQUENESS: | 587 | case V1_DIRENTRY_UNIQUENESS: |
580 | return TYPE_DIRENTRY; | 588 | return TYPE_DIRENTRY; |
581 | default: | ||
582 | reiserfs_warning(NULL, "vs-500: unknown uniqueness %d", | ||
583 | uniqueness); | ||
584 | case V1_ANY_UNIQUENESS: | 589 | case V1_ANY_UNIQUENESS: |
590 | default: | ||
585 | return TYPE_ANY; | 591 | return TYPE_ANY; |
586 | } | 592 | } |
587 | } | 593 | } |
@@ -598,9 +604,8 @@ static inline __u32 type2uniqueness(int type) | |||
598 | return V1_DIRECT_UNIQUENESS; | 604 | return V1_DIRECT_UNIQUENESS; |
599 | case TYPE_DIRENTRY: | 605 | case TYPE_DIRENTRY: |
600 | return V1_DIRENTRY_UNIQUENESS; | 606 | return V1_DIRENTRY_UNIQUENESS; |
601 | default: | ||
602 | reiserfs_warning(NULL, "vs-501: unknown type %d", type); | ||
603 | case TYPE_ANY: | 607 | case TYPE_ANY: |
608 | default: | ||
604 | return V1_ANY_UNIQUENESS; | 609 | return V1_ANY_UNIQUENESS; |
605 | } | 610 | } |
606 | } | 611 | } |
@@ -712,9 +717,9 @@ static inline void cpu_key_k_offset_dec(struct cpu_key *key) | |||
712 | #define is_indirect_cpu_ih(ih) (is_indirect_cpu_key (&((ih)->ih_key))) | 717 | #define is_indirect_cpu_ih(ih) (is_indirect_cpu_key (&((ih)->ih_key))) |
713 | #define is_statdata_cpu_ih(ih) (is_statdata_cpu_key (&((ih)->ih_key))) | 718 | #define is_statdata_cpu_ih(ih) (is_statdata_cpu_key (&((ih)->ih_key))) |
714 | 719 | ||
715 | #define I_K_KEY_IN_ITEM(p_s_ih, p_s_key, n_blocksize) \ | 720 | #define I_K_KEY_IN_ITEM(ih, key, n_blocksize) \ |
716 | ( ! COMP_SHORT_KEYS(p_s_ih, p_s_key) && \ | 721 | (!COMP_SHORT_KEYS(ih, key) && \ |
717 | I_OFF_BYTE_IN_ITEM(p_s_ih, k_offset (p_s_key), n_blocksize) ) | 722 | I_OFF_BYTE_IN_ITEM(ih, k_offset(key), n_blocksize)) |
718 | 723 | ||
719 | /* maximal length of item */ | 724 | /* maximal length of item */ |
720 | #define MAX_ITEM_LEN(block_size) (block_size - BLKH_SIZE - IH_SIZE) | 725 | #define MAX_ITEM_LEN(block_size) (block_size - BLKH_SIZE - IH_SIZE) |
@@ -770,25 +775,25 @@ struct block_head { | |||
770 | #define DISK_LEAF_NODE_LEVEL 1 /* Leaf node level. */ | 775 | #define DISK_LEAF_NODE_LEVEL 1 /* Leaf node level. */ |
771 | 776 | ||
772 | /* Given the buffer head of a formatted node, resolve to the block head of that node. */ | 777 | /* Given the buffer head of a formatted node, resolve to the block head of that node. */ |
773 | #define B_BLK_HEAD(p_s_bh) ((struct block_head *)((p_s_bh)->b_data)) | 778 | #define B_BLK_HEAD(bh) ((struct block_head *)((bh)->b_data)) |
774 | /* Number of items that are in buffer. */ | 779 | /* Number of items that are in buffer. */ |
775 | #define B_NR_ITEMS(p_s_bh) (blkh_nr_item(B_BLK_HEAD(p_s_bh))) | 780 | #define B_NR_ITEMS(bh) (blkh_nr_item(B_BLK_HEAD(bh))) |
776 | #define B_LEVEL(p_s_bh) (blkh_level(B_BLK_HEAD(p_s_bh))) | 781 | #define B_LEVEL(bh) (blkh_level(B_BLK_HEAD(bh))) |
777 | #define B_FREE_SPACE(p_s_bh) (blkh_free_space(B_BLK_HEAD(p_s_bh))) | 782 | #define B_FREE_SPACE(bh) (blkh_free_space(B_BLK_HEAD(bh))) |
778 | 783 | ||
779 | #define PUT_B_NR_ITEMS(p_s_bh,val) do { set_blkh_nr_item(B_BLK_HEAD(p_s_bh),val); } while (0) | 784 | #define PUT_B_NR_ITEMS(bh, val) do { set_blkh_nr_item(B_BLK_HEAD(bh), val); } while (0) |
780 | #define PUT_B_LEVEL(p_s_bh,val) do { set_blkh_level(B_BLK_HEAD(p_s_bh),val); } while (0) | 785 | #define PUT_B_LEVEL(bh, val) do { set_blkh_level(B_BLK_HEAD(bh), val); } while (0) |
781 | #define PUT_B_FREE_SPACE(p_s_bh,val) do { set_blkh_free_space(B_BLK_HEAD(p_s_bh),val); } while (0) | 786 | #define PUT_B_FREE_SPACE(bh, val) do { set_blkh_free_space(B_BLK_HEAD(bh), val); } while (0) |
782 | 787 | ||
783 | /* Get right delimiting key. -- little endian */ | 788 | /* Get right delimiting key. -- little endian */ |
784 | #define B_PRIGHT_DELIM_KEY(p_s_bh) (&(blk_right_delim_key(B_BLK_HEAD(p_s_bh)))) | 789 | #define B_PRIGHT_DELIM_KEY(bh) (&(blk_right_delim_key(B_BLK_HEAD(bh)))) |
785 | 790 | ||
786 | /* Does the buffer contain a disk leaf. */ | 791 | /* Does the buffer contain a disk leaf. */ |
787 | #define B_IS_ITEMS_LEVEL(p_s_bh) (B_LEVEL(p_s_bh) == DISK_LEAF_NODE_LEVEL) | 792 | #define B_IS_ITEMS_LEVEL(bh) (B_LEVEL(bh) == DISK_LEAF_NODE_LEVEL) |
788 | 793 | ||
789 | /* Does the buffer contain a disk internal node */ | 794 | /* Does the buffer contain a disk internal node */ |
790 | #define B_IS_KEYS_LEVEL(p_s_bh) (B_LEVEL(p_s_bh) > DISK_LEAF_NODE_LEVEL \ | 795 | #define B_IS_KEYS_LEVEL(bh) (B_LEVEL(bh) > DISK_LEAF_NODE_LEVEL \ |
791 | && B_LEVEL(p_s_bh) <= MAX_HEIGHT) | 796 | && B_LEVEL(bh) <= MAX_HEIGHT) |
792 | 797 | ||
793 | /***************************************************************************/ | 798 | /***************************************************************************/ |
794 | /* STAT DATA */ | 799 | /* STAT DATA */ |
@@ -1138,12 +1143,13 @@ struct disk_child { | |||
1138 | #define put_dc_size(dc_p, val) do { (dc_p)->dc_size = cpu_to_le16(val); } while(0) | 1143 | #define put_dc_size(dc_p, val) do { (dc_p)->dc_size = cpu_to_le16(val); } while(0) |
1139 | 1144 | ||
1140 | /* Get disk child by buffer header and position in the tree node. */ | 1145 | /* Get disk child by buffer header and position in the tree node. */ |
1141 | #define B_N_CHILD(p_s_bh,n_pos) ((struct disk_child *)\ | 1146 | #define B_N_CHILD(bh, n_pos) ((struct disk_child *)\ |
1142 | ((p_s_bh)->b_data+BLKH_SIZE+B_NR_ITEMS(p_s_bh)*KEY_SIZE+DC_SIZE*(n_pos))) | 1147 | ((bh)->b_data + BLKH_SIZE + B_NR_ITEMS(bh) * KEY_SIZE + DC_SIZE * (n_pos))) |
1143 | 1148 | ||
1144 | /* Get disk child number by buffer header and position in the tree node. */ | 1149 | /* Get disk child number by buffer header and position in the tree node. */ |
1145 | #define B_N_CHILD_NUM(p_s_bh,n_pos) (dc_block_number(B_N_CHILD(p_s_bh,n_pos))) | 1150 | #define B_N_CHILD_NUM(bh, n_pos) (dc_block_number(B_N_CHILD(bh, n_pos))) |
1146 | #define PUT_B_N_CHILD_NUM(p_s_bh,n_pos, val) (put_dc_block_number(B_N_CHILD(p_s_bh,n_pos), val )) | 1151 | #define PUT_B_N_CHILD_NUM(bh, n_pos, val) \ |
1152 | (put_dc_block_number(B_N_CHILD(bh, n_pos), val)) | ||
1147 | 1153 | ||
1148 | /* maximal value of field child_size in structure disk_child */ | 1154 | /* maximal value of field child_size in structure disk_child */ |
1149 | /* child size is the combined size of all items and their headers */ | 1155 | /* child size is the combined size of all items and their headers */ |
@@ -1214,33 +1220,33 @@ struct treepath { | |||
1214 | struct treepath var = {.path_length = ILLEGAL_PATH_ELEMENT_OFFSET, .reada = 0,} | 1220 | struct treepath var = {.path_length = ILLEGAL_PATH_ELEMENT_OFFSET, .reada = 0,} |
1215 | 1221 | ||
1216 | /* Get path element by path and path position. */ | 1222 | /* Get path element by path and path position. */ |
1217 | #define PATH_OFFSET_PELEMENT(p_s_path,n_offset) ((p_s_path)->path_elements +(n_offset)) | 1223 | #define PATH_OFFSET_PELEMENT(path, n_offset) ((path)->path_elements + (n_offset)) |
1218 | 1224 | ||
1219 | /* Get buffer header at the path by path and path position. */ | 1225 | /* Get buffer header at the path by path and path position. */ |
1220 | #define PATH_OFFSET_PBUFFER(p_s_path,n_offset) (PATH_OFFSET_PELEMENT(p_s_path,n_offset)->pe_buffer) | 1226 | #define PATH_OFFSET_PBUFFER(path, n_offset) (PATH_OFFSET_PELEMENT(path, n_offset)->pe_buffer) |
1221 | 1227 | ||
1222 | /* Get position in the element at the path by path and path position. */ | 1228 | /* Get position in the element at the path by path and path position. */ |
1223 | #define PATH_OFFSET_POSITION(p_s_path,n_offset) (PATH_OFFSET_PELEMENT(p_s_path,n_offset)->pe_position) | 1229 | #define PATH_OFFSET_POSITION(path, n_offset) (PATH_OFFSET_PELEMENT(path, n_offset)->pe_position) |
1224 | 1230 | ||
1225 | #define PATH_PLAST_BUFFER(p_s_path) (PATH_OFFSET_PBUFFER((p_s_path), (p_s_path)->path_length)) | 1231 | #define PATH_PLAST_BUFFER(path) (PATH_OFFSET_PBUFFER((path), (path)->path_length)) |
1226 | /* you know, to the person who didn't | 1232 | /* you know, to the person who didn't |
1227 | write this the macro name does not | 1233 | write this the macro name does not |
1228 | at first suggest what it does. | 1234 | at first suggest what it does. |
1229 | Maybe POSITION_FROM_PATH_END? Or | 1235 | Maybe POSITION_FROM_PATH_END? Or |
1230 | maybe we should just focus on | 1236 | maybe we should just focus on |
1231 | dumping paths... -Hans */ | 1237 | dumping paths... -Hans */ |
1232 | #define PATH_LAST_POSITION(p_s_path) (PATH_OFFSET_POSITION((p_s_path), (p_s_path)->path_length)) | 1238 | #define PATH_LAST_POSITION(path) (PATH_OFFSET_POSITION((path), (path)->path_length)) |
1233 | 1239 | ||
1234 | #define PATH_PITEM_HEAD(p_s_path) B_N_PITEM_HEAD(PATH_PLAST_BUFFER(p_s_path),PATH_LAST_POSITION(p_s_path)) | 1240 | #define PATH_PITEM_HEAD(path) B_N_PITEM_HEAD(PATH_PLAST_BUFFER(path), PATH_LAST_POSITION(path)) |
1235 | 1241 | ||
1236 | /* in do_balance leaf has h == 0 in contrast with path structure, | 1242 | /* in do_balance leaf has h == 0 in contrast with path structure, |
1237 | where root has level == 0. That is why we need these defines */ | 1243 | where root has level == 0. That is why we need these defines */ |
1238 | #define PATH_H_PBUFFER(p_s_path, h) PATH_OFFSET_PBUFFER (p_s_path, p_s_path->path_length - (h)) /* tb->S[h] */ | 1244 | #define PATH_H_PBUFFER(path, h) PATH_OFFSET_PBUFFER (path, path->path_length - (h)) /* tb->S[h] */ |
1239 | #define PATH_H_PPARENT(path, h) PATH_H_PBUFFER (path, (h) + 1) /* tb->F[h] or tb->S[0]->b_parent */ | 1245 | #define PATH_H_PPARENT(path, h) PATH_H_PBUFFER (path, (h) + 1) /* tb->F[h] or tb->S[0]->b_parent */ |
1240 | #define PATH_H_POSITION(path, h) PATH_OFFSET_POSITION (path, path->path_length - (h)) | 1246 | #define PATH_H_POSITION(path, h) PATH_OFFSET_POSITION (path, path->path_length - (h)) |
1241 | #define PATH_H_B_ITEM_ORDER(path, h) PATH_H_POSITION(path, h + 1) /* tb->S[h]->b_item_order */ | 1247 | #define PATH_H_B_ITEM_ORDER(path, h) PATH_H_POSITION(path, h + 1) /* tb->S[h]->b_item_order */ |
1242 | 1248 | ||
1243 | #define PATH_H_PATH_OFFSET(p_s_path, n_h) ((p_s_path)->path_length - (n_h)) | 1249 | #define PATH_H_PATH_OFFSET(path, n_h) ((path)->path_length - (n_h)) |
1244 | 1250 | ||
1245 | #define get_last_bh(path) PATH_PLAST_BUFFER(path) | 1251 | #define get_last_bh(path) PATH_PLAST_BUFFER(path) |
1246 | #define get_ih(path) PATH_PITEM_HEAD(path) | 1252 | #define get_ih(path) PATH_PITEM_HEAD(path) |
@@ -1470,6 +1476,16 @@ struct buffer_info { | |||
1470 | int bi_position; | 1476 | int bi_position; |
1471 | }; | 1477 | }; |
1472 | 1478 | ||
1479 | static inline struct super_block *sb_from_tb(struct tree_balance *tb) | ||
1480 | { | ||
1481 | return tb ? tb->tb_sb : NULL; | ||
1482 | } | ||
1483 | |||
1484 | static inline struct super_block *sb_from_bi(struct buffer_info *bi) | ||
1485 | { | ||
1486 | return bi ? sb_from_tb(bi->tb) : NULL; | ||
1487 | } | ||
1488 | |||
1473 | /* there are 4 types of items: stat data, directory item, indirect, direct. | 1489 | /* there are 4 types of items: stat data, directory item, indirect, direct. |
1474 | +-------------------+------------+--------------+------------+ | 1490 | +-------------------+------------+--------------+------------+ |
1475 | | | k_offset | k_uniqueness | mergeable? | | 1491 | | | k_offset | k_uniqueness | mergeable? | |
@@ -1520,7 +1536,7 @@ extern struct item_operations *item_ops[TYPE_ANY + 1]; | |||
1520 | #define COMP_SHORT_KEYS comp_short_keys | 1536 | #define COMP_SHORT_KEYS comp_short_keys |
1521 | 1537 | ||
1522 | /* number of blocks pointed to by the indirect item */ | 1538 | /* number of blocks pointed to by the indirect item */ |
1523 | #define I_UNFM_NUM(p_s_ih) ( ih_item_len(p_s_ih) / UNFM_P_SIZE ) | 1539 | #define I_UNFM_NUM(ih) (ih_item_len(ih) / UNFM_P_SIZE) |
1524 | 1540 | ||
1525 | /* the used space within the unformatted node corresponding to pos within the item pointed to by ih */ | 1541 | /* the used space within the unformatted node corresponding to pos within the item pointed to by ih */ |
1526 | #define I_POS_UNFM_SIZE(ih,pos,size) (((pos) == I_UNFM_NUM(ih) - 1 ) ? (size) - ih_free_space(ih) : (size)) | 1542 | #define I_POS_UNFM_SIZE(ih,pos,size) (((pos) == I_UNFM_NUM(ih) - 1 ) ? (size) - ih_free_space(ih) : (size)) |
@@ -1623,6 +1639,10 @@ struct reiserfs_journal_header { | |||
1623 | #define JOURNAL_MAX_COMMIT_AGE 30 | 1639 | #define JOURNAL_MAX_COMMIT_AGE 30 |
1624 | #define JOURNAL_MAX_TRANS_AGE 30 | 1640 | #define JOURNAL_MAX_TRANS_AGE 30 |
1625 | #define JOURNAL_PER_BALANCE_CNT (3 * (MAX_HEIGHT-2) + 9) | 1641 | #define JOURNAL_PER_BALANCE_CNT (3 * (MAX_HEIGHT-2) + 9) |
1642 | #define JOURNAL_BLOCKS_PER_OBJECT(sb) (JOURNAL_PER_BALANCE_CNT * 3 + \ | ||
1643 | 2 * (REISERFS_QUOTA_INIT_BLOCKS(sb) + \ | ||
1644 | REISERFS_QUOTA_TRANS_BLOCKS(sb))) | ||
1645 | |||
1626 | #ifdef CONFIG_QUOTA | 1646 | #ifdef CONFIG_QUOTA |
1627 | /* We need to update data and inode (atime) */ | 1647 | /* We need to update data and inode (atime) */ |
1628 | #define REISERFS_QUOTA_TRANS_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & (1<<REISERFS_QUOTA) ? 2 : 0) | 1648 | #define REISERFS_QUOTA_TRANS_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & (1<<REISERFS_QUOTA) ? 2 : 0) |
@@ -1697,7 +1717,7 @@ struct reiserfs_transaction_handle { | |||
1697 | int t_refcount; | 1717 | int t_refcount; |
1698 | int t_blocks_logged; /* number of blocks this writer has logged */ | 1718 | int t_blocks_logged; /* number of blocks this writer has logged */ |
1699 | int t_blocks_allocated; /* number of blocks this writer allocated */ | 1719 | int t_blocks_allocated; /* number of blocks this writer allocated */ |
1700 | unsigned long t_trans_id; /* sanity check, equals the current trans id */ | 1720 | unsigned int t_trans_id; /* sanity check, equals the current trans id */ |
1701 | void *t_handle_save; /* save existing current->journal_info */ | 1721 | void *t_handle_save; /* save existing current->journal_info */ |
1702 | unsigned displace_new_blocks:1; /* if new block allocation occurres, that block | 1722 | unsigned displace_new_blocks:1; /* if new block allocation occurres, that block |
1703 | should be displaced from others */ | 1723 | should be displaced from others */ |
@@ -1773,13 +1793,13 @@ int journal_end_sync(struct reiserfs_transaction_handle *, struct super_block *, | |||
1773 | int journal_mark_freed(struct reiserfs_transaction_handle *, | 1793 | int journal_mark_freed(struct reiserfs_transaction_handle *, |
1774 | struct super_block *, b_blocknr_t blocknr); | 1794 | struct super_block *, b_blocknr_t blocknr); |
1775 | int journal_transaction_should_end(struct reiserfs_transaction_handle *, int); | 1795 | int journal_transaction_should_end(struct reiserfs_transaction_handle *, int); |
1776 | int reiserfs_in_journal(struct super_block *p_s_sb, unsigned int bmap_nr, | 1796 | int reiserfs_in_journal(struct super_block *sb, unsigned int bmap_nr, |
1777 | int bit_nr, int searchall, b_blocknr_t *next); | 1797 | int bit_nr, int searchall, b_blocknr_t *next); |
1778 | int journal_begin(struct reiserfs_transaction_handle *, | 1798 | int journal_begin(struct reiserfs_transaction_handle *, |
1779 | struct super_block *p_s_sb, unsigned long); | 1799 | struct super_block *sb, unsigned long); |
1780 | int journal_join_abort(struct reiserfs_transaction_handle *, | 1800 | int journal_join_abort(struct reiserfs_transaction_handle *, |
1781 | struct super_block *p_s_sb, unsigned long); | 1801 | struct super_block *sb, unsigned long); |
1782 | void reiserfs_journal_abort(struct super_block *sb, int errno); | 1802 | void reiserfs_abort_journal(struct super_block *sb, int errno); |
1783 | void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...); | 1803 | void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...); |
1784 | int reiserfs_allocate_list_bitmaps(struct super_block *s, | 1804 | int reiserfs_allocate_list_bitmaps(struct super_block *s, |
1785 | struct reiserfs_list_bitmap *, unsigned int); | 1805 | struct reiserfs_list_bitmap *, unsigned int); |
@@ -1796,8 +1816,8 @@ int reiserfs_convert_objectid_map_v1(struct super_block *); | |||
1796 | 1816 | ||
1797 | /* stree.c */ | 1817 | /* stree.c */ |
1798 | int B_IS_IN_TREE(const struct buffer_head *); | 1818 | int B_IS_IN_TREE(const struct buffer_head *); |
1799 | extern void copy_item_head(struct item_head *p_v_to, | 1819 | extern void copy_item_head(struct item_head *to, |
1800 | const struct item_head *p_v_from); | 1820 | const struct item_head *from); |
1801 | 1821 | ||
1802 | // first key is in cpu form, second - le | 1822 | // first key is in cpu form, second - le |
1803 | extern int comp_short_keys(const struct reiserfs_key *le_key, | 1823 | extern int comp_short_keys(const struct reiserfs_key *le_key, |
@@ -1832,20 +1852,20 @@ static inline void copy_key(struct reiserfs_key *to, | |||
1832 | memcpy(to, from, KEY_SIZE); | 1852 | memcpy(to, from, KEY_SIZE); |
1833 | } | 1853 | } |
1834 | 1854 | ||
1835 | int comp_items(const struct item_head *stored_ih, const struct treepath *p_s_path); | 1855 | int comp_items(const struct item_head *stored_ih, const struct treepath *path); |
1836 | const struct reiserfs_key *get_rkey(const struct treepath *p_s_chk_path, | 1856 | const struct reiserfs_key *get_rkey(const struct treepath *chk_path, |
1837 | const struct super_block *p_s_sb); | 1857 | const struct super_block *sb); |
1838 | int search_by_key(struct super_block *, const struct cpu_key *, | 1858 | int search_by_key(struct super_block *, const struct cpu_key *, |
1839 | struct treepath *, int); | 1859 | struct treepath *, int); |
1840 | #define search_item(s,key,path) search_by_key (s, key, path, DISK_LEAF_NODE_LEVEL) | 1860 | #define search_item(s,key,path) search_by_key (s, key, path, DISK_LEAF_NODE_LEVEL) |
1841 | int search_for_position_by_key(struct super_block *p_s_sb, | 1861 | int search_for_position_by_key(struct super_block *sb, |
1842 | const struct cpu_key *p_s_cpu_key, | 1862 | const struct cpu_key *cpu_key, |
1843 | struct treepath *p_s_search_path); | 1863 | struct treepath *search_path); |
1844 | extern void decrement_bcount(struct buffer_head *p_s_bh); | 1864 | extern void decrement_bcount(struct buffer_head *bh); |
1845 | void decrement_counters_in_path(struct treepath *p_s_search_path); | 1865 | void decrement_counters_in_path(struct treepath *search_path); |
1846 | void pathrelse(struct treepath *p_s_search_path); | 1866 | void pathrelse(struct treepath *search_path); |
1847 | int reiserfs_check_path(struct treepath *p); | 1867 | int reiserfs_check_path(struct treepath *p); |
1848 | void pathrelse_and_restore(struct super_block *s, struct treepath *p_s_search_path); | 1868 | void pathrelse_and_restore(struct super_block *s, struct treepath *search_path); |
1849 | 1869 | ||
1850 | int reiserfs_insert_item(struct reiserfs_transaction_handle *th, | 1870 | int reiserfs_insert_item(struct reiserfs_transaction_handle *th, |
1851 | struct treepath *path, | 1871 | struct treepath *path, |
@@ -1868,14 +1888,14 @@ int reiserfs_cut_from_item(struct reiserfs_transaction_handle *th, | |||
1868 | int reiserfs_delete_item(struct reiserfs_transaction_handle *th, | 1888 | int reiserfs_delete_item(struct reiserfs_transaction_handle *th, |
1869 | struct treepath *path, | 1889 | struct treepath *path, |
1870 | const struct cpu_key *key, | 1890 | const struct cpu_key *key, |
1871 | struct inode *inode, struct buffer_head *p_s_un_bh); | 1891 | struct inode *inode, struct buffer_head *un_bh); |
1872 | 1892 | ||
1873 | void reiserfs_delete_solid_item(struct reiserfs_transaction_handle *th, | 1893 | void reiserfs_delete_solid_item(struct reiserfs_transaction_handle *th, |
1874 | struct inode *inode, struct reiserfs_key *key); | 1894 | struct inode *inode, struct reiserfs_key *key); |
1875 | int reiserfs_delete_object(struct reiserfs_transaction_handle *th, | 1895 | int reiserfs_delete_object(struct reiserfs_transaction_handle *th, |
1876 | struct inode *p_s_inode); | 1896 | struct inode *inode); |
1877 | int reiserfs_do_truncate(struct reiserfs_transaction_handle *th, | 1897 | int reiserfs_do_truncate(struct reiserfs_transaction_handle *th, |
1878 | struct inode *p_s_inode, struct page *, | 1898 | struct inode *inode, struct page *, |
1879 | int update_timestamps); | 1899 | int update_timestamps); |
1880 | 1900 | ||
1881 | #define i_block_size(inode) ((inode)->i_sb->s_blocksize) | 1901 | #define i_block_size(inode) ((inode)->i_sb->s_blocksize) |
@@ -1919,10 +1939,12 @@ void make_le_item_head(struct item_head *ih, const struct cpu_key *key, | |||
1919 | loff_t offset, int type, int length, int entry_count); | 1939 | loff_t offset, int type, int length, int entry_count); |
1920 | struct inode *reiserfs_iget(struct super_block *s, const struct cpu_key *key); | 1940 | struct inode *reiserfs_iget(struct super_block *s, const struct cpu_key *key); |
1921 | 1941 | ||
1942 | struct reiserfs_security_handle; | ||
1922 | int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | 1943 | int reiserfs_new_inode(struct reiserfs_transaction_handle *th, |
1923 | struct inode *dir, int mode, | 1944 | struct inode *dir, int mode, |
1924 | const char *symname, loff_t i_size, | 1945 | const char *symname, loff_t i_size, |
1925 | struct dentry *dentry, struct inode *inode); | 1946 | struct dentry *dentry, struct inode *inode, |
1947 | struct reiserfs_security_handle *security); | ||
1926 | 1948 | ||
1927 | void reiserfs_update_sd_size(struct reiserfs_transaction_handle *th, | 1949 | void reiserfs_update_sd_size(struct reiserfs_transaction_handle *th, |
1928 | struct inode *inode, loff_t size); | 1950 | struct inode *inode, loff_t size); |
@@ -1980,7 +2002,7 @@ int reiserfs_global_version_in_proc(char *buffer, char **start, off_t offset, | |||
1980 | #define PROC_INFO_MAX( sb, field, value ) VOID_V | 2002 | #define PROC_INFO_MAX( sb, field, value ) VOID_V |
1981 | #define PROC_INFO_INC( sb, field ) VOID_V | 2003 | #define PROC_INFO_INC( sb, field ) VOID_V |
1982 | #define PROC_INFO_ADD( sb, field, val ) VOID_V | 2004 | #define PROC_INFO_ADD( sb, field, val ) VOID_V |
1983 | #define PROC_INFO_BH_STAT( p_s_sb, p_s_bh, n_node_level ) VOID_V | 2005 | #define PROC_INFO_BH_STAT(sb, bh, n_node_level) VOID_V |
1984 | #endif | 2006 | #endif |
1985 | 2007 | ||
1986 | /* dir.c */ | 2008 | /* dir.c */ |
@@ -1988,6 +2010,7 @@ extern const struct inode_operations reiserfs_dir_inode_operations; | |||
1988 | extern const struct inode_operations reiserfs_symlink_inode_operations; | 2010 | extern const struct inode_operations reiserfs_symlink_inode_operations; |
1989 | extern const struct inode_operations reiserfs_special_inode_operations; | 2011 | extern const struct inode_operations reiserfs_special_inode_operations; |
1990 | extern const struct file_operations reiserfs_dir_operations; | 2012 | extern const struct file_operations reiserfs_dir_operations; |
2013 | int reiserfs_readdir_dentry(struct dentry *, void *, filldir_t, loff_t *); | ||
1991 | 2014 | ||
1992 | /* tail_conversion.c */ | 2015 | /* tail_conversion.c */ |
1993 | int direct2indirect(struct reiserfs_transaction_handle *, struct inode *, | 2016 | int direct2indirect(struct reiserfs_transaction_handle *, struct inode *, |
@@ -2004,13 +2027,20 @@ extern const struct address_space_operations reiserfs_address_space_operations; | |||
2004 | 2027 | ||
2005 | /* fix_nodes.c */ | 2028 | /* fix_nodes.c */ |
2006 | 2029 | ||
2007 | int fix_nodes(int n_op_mode, struct tree_balance *p_s_tb, | 2030 | int fix_nodes(int n_op_mode, struct tree_balance *tb, |
2008 | struct item_head *p_s_ins_ih, const void *); | 2031 | struct item_head *ins_ih, const void *); |
2009 | void unfix_nodes(struct tree_balance *); | 2032 | void unfix_nodes(struct tree_balance *); |
2010 | 2033 | ||
2011 | /* prints.c */ | 2034 | /* prints.c */ |
2012 | void reiserfs_panic(struct super_block *s, const char *fmt, ...) | 2035 | void __reiserfs_panic(struct super_block *s, const char *id, |
2036 | const char *function, const char *fmt, ...) | ||
2013 | __attribute__ ((noreturn)); | 2037 | __attribute__ ((noreturn)); |
2038 | #define reiserfs_panic(s, id, fmt, args...) \ | ||
2039 | __reiserfs_panic(s, id, __func__, fmt, ##args) | ||
2040 | void __reiserfs_error(struct super_block *s, const char *id, | ||
2041 | const char *function, const char *fmt, ...); | ||
2042 | #define reiserfs_error(s, id, fmt, args...) \ | ||
2043 | __reiserfs_error(s, id, __func__, fmt, ##args) | ||
2014 | void reiserfs_info(struct super_block *s, const char *fmt, ...); | 2044 | void reiserfs_info(struct super_block *s, const char *fmt, ...); |
2015 | void reiserfs_debug(struct super_block *s, int level, const char *fmt, ...); | 2045 | void reiserfs_debug(struct super_block *s, int level, const char *fmt, ...); |
2016 | void print_indirect_item(struct buffer_head *bh, int item_num); | 2046 | void print_indirect_item(struct buffer_head *bh, int item_num); |
@@ -2047,7 +2077,7 @@ void leaf_paste_in_buffer(struct buffer_info *bi, int pasted_item_num, | |||
2047 | int zeros_number); | 2077 | int zeros_number); |
2048 | void leaf_cut_from_buffer(struct buffer_info *bi, int cut_item_num, | 2078 | void leaf_cut_from_buffer(struct buffer_info *bi, int cut_item_num, |
2049 | int pos_in_item, int cut_size); | 2079 | int pos_in_item, int cut_size); |
2050 | void leaf_paste_entries(struct buffer_head *bh, int item_num, int before, | 2080 | void leaf_paste_entries(struct buffer_info *bi, int item_num, int before, |
2051 | int new_entry_count, struct reiserfs_de_head *new_dehs, | 2081 | int new_entry_count, struct reiserfs_de_head *new_dehs, |
2052 | const char *records, int paste_size); | 2082 | const char *records, int paste_size); |
2053 | /* ibalance.c */ | 2083 | /* ibalance.c */ |
@@ -2203,6 +2233,6 @@ long reiserfs_compat_ioctl(struct file *filp, | |||
2203 | unsigned int cmd, unsigned long arg); | 2233 | unsigned int cmd, unsigned long arg); |
2204 | int reiserfs_unpack(struct inode *inode, struct file *filp); | 2234 | int reiserfs_unpack(struct inode *inode, struct file *filp); |
2205 | 2235 | ||
2206 | |||
2207 | #endif /* __KERNEL__ */ | 2236 | #endif /* __KERNEL__ */ |
2237 | |||
2208 | #endif /* _LINUX_REISER_FS_H */ | 2238 | #endif /* _LINUX_REISER_FS_H */ |
diff --git a/include/linux/reiserfs_fs_i.h b/include/linux/reiserfs_fs_i.h index ce3663fb0101..76360b36ac33 100644 --- a/include/linux/reiserfs_fs_i.h +++ b/include/linux/reiserfs_fs_i.h | |||
@@ -51,7 +51,7 @@ struct reiserfs_inode_info { | |||
51 | /* we use these for fsync or O_SYNC to decide which transaction | 51 | /* we use these for fsync or O_SYNC to decide which transaction |
52 | ** needs to be committed in order for this inode to be properly | 52 | ** needs to be committed in order for this inode to be properly |
53 | ** flushed */ | 53 | ** flushed */ |
54 | unsigned long i_trans_id; | 54 | unsigned int i_trans_id; |
55 | struct reiserfs_journal_list *i_jl; | 55 | struct reiserfs_journal_list *i_jl; |
56 | struct mutex i_mmap; | 56 | struct mutex i_mmap; |
57 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL | 57 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL |
@@ -59,7 +59,7 @@ struct reiserfs_inode_info { | |||
59 | struct posix_acl *i_acl_default; | 59 | struct posix_acl *i_acl_default; |
60 | #endif | 60 | #endif |
61 | #ifdef CONFIG_REISERFS_FS_XATTR | 61 | #ifdef CONFIG_REISERFS_FS_XATTR |
62 | struct rw_semaphore xattr_sem; | 62 | struct rw_semaphore i_xattr_sem; |
63 | #endif | 63 | #endif |
64 | struct inode vfs_inode; | 64 | struct inode vfs_inode; |
65 | }; | 65 | }; |
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index bda6b562a1e0..5621d87c4479 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
@@ -14,7 +14,7 @@ typedef enum { | |||
14 | } reiserfs_super_block_flags; | 14 | } reiserfs_super_block_flags; |
15 | 15 | ||
16 | /* struct reiserfs_super_block accessors/mutators | 16 | /* struct reiserfs_super_block accessors/mutators |
17 | * since this is a disk structure, it will always be in | 17 | * since this is a disk structure, it will always be in |
18 | * little endian format. */ | 18 | * little endian format. */ |
19 | #define sb_block_count(sbp) (le32_to_cpu((sbp)->s_v1.s_block_count)) | 19 | #define sb_block_count(sbp) (le32_to_cpu((sbp)->s_v1.s_block_count)) |
20 | #define set_sb_block_count(sbp,v) ((sbp)->s_v1.s_block_count = cpu_to_le32(v)) | 20 | #define set_sb_block_count(sbp,v) ((sbp)->s_v1.s_block_count = cpu_to_le32(v)) |
@@ -73,6 +73,9 @@ typedef enum { | |||
73 | #define sb_version(sbp) (le16_to_cpu((sbp)->s_v1.s_version)) | 73 | #define sb_version(sbp) (le16_to_cpu((sbp)->s_v1.s_version)) |
74 | #define set_sb_version(sbp,v) ((sbp)->s_v1.s_version = cpu_to_le16(v)) | 74 | #define set_sb_version(sbp,v) ((sbp)->s_v1.s_version = cpu_to_le16(v)) |
75 | 75 | ||
76 | #define sb_mnt_count(sbp) (le16_to_cpu((sbp)->s_mnt_count)) | ||
77 | #define set_sb_mnt_count(sbp, v) ((sbp)->s_mnt_count = cpu_to_le16(v)) | ||
78 | |||
76 | #define sb_reserved_for_journal(sbp) \ | 79 | #define sb_reserved_for_journal(sbp) \ |
77 | (le16_to_cpu((sbp)->s_v1.s_reserved_for_journal)) | 80 | (le16_to_cpu((sbp)->s_v1.s_reserved_for_journal)) |
78 | #define set_sb_reserved_for_journal(sbp,v) \ | 81 | #define set_sb_reserved_for_journal(sbp,v) \ |
@@ -80,16 +83,16 @@ typedef enum { | |||
80 | 83 | ||
81 | /* LOGGING -- */ | 84 | /* LOGGING -- */ |
82 | 85 | ||
83 | /* These all interelate for performance. | 86 | /* These all interelate for performance. |
84 | ** | 87 | ** |
85 | ** If the journal block count is smaller than n transactions, you lose speed. | 88 | ** If the journal block count is smaller than n transactions, you lose speed. |
86 | ** I don't know what n is yet, I'm guessing 8-16. | 89 | ** I don't know what n is yet, I'm guessing 8-16. |
87 | ** | 90 | ** |
88 | ** typical transaction size depends on the application, how often fsync is | 91 | ** typical transaction size depends on the application, how often fsync is |
89 | ** called, and how many metadata blocks you dirty in a 30 second period. | 92 | ** called, and how many metadata blocks you dirty in a 30 second period. |
90 | ** The more small files (<16k) you use, the larger your transactions will | 93 | ** The more small files (<16k) you use, the larger your transactions will |
91 | ** be. | 94 | ** be. |
92 | ** | 95 | ** |
93 | ** If your journal fills faster than dirty buffers get flushed to disk, it must flush them before allowing the journal | 96 | ** If your journal fills faster than dirty buffers get flushed to disk, it must flush them before allowing the journal |
94 | ** to wrap, which slows things down. If you need high speed meta data updates, the journal should be big enough | 97 | ** to wrap, which slows things down. If you need high speed meta data updates, the journal should be big enough |
95 | ** to prevent wrapping before dirty meta blocks get to disk. | 98 | ** to prevent wrapping before dirty meta blocks get to disk. |
@@ -153,7 +156,7 @@ struct reiserfs_journal_list { | |||
153 | atomic_t j_commit_left; | 156 | atomic_t j_commit_left; |
154 | atomic_t j_older_commits_done; /* all commits older than this on disk */ | 157 | atomic_t j_older_commits_done; /* all commits older than this on disk */ |
155 | struct mutex j_commit_mutex; | 158 | struct mutex j_commit_mutex; |
156 | unsigned long j_trans_id; | 159 | unsigned int j_trans_id; |
157 | time_t j_timestamp; | 160 | time_t j_timestamp; |
158 | struct reiserfs_list_bitmap *j_list_bitmap; | 161 | struct reiserfs_list_bitmap *j_list_bitmap; |
159 | struct buffer_head *j_commit_bh; /* commit buffer head */ | 162 | struct buffer_head *j_commit_bh; /* commit buffer head */ |
@@ -182,7 +185,7 @@ struct reiserfs_journal { | |||
182 | int j_1st_reserved_block; /* first block on s_dev of reserved area journal */ | 185 | int j_1st_reserved_block; /* first block on s_dev of reserved area journal */ |
183 | 186 | ||
184 | unsigned long j_state; | 187 | unsigned long j_state; |
185 | unsigned long j_trans_id; | 188 | unsigned int j_trans_id; |
186 | unsigned long j_mount_id; | 189 | unsigned long j_mount_id; |
187 | unsigned long j_start; /* start of current waiting commit (index into j_ap_blocks) */ | 190 | unsigned long j_start; /* start of current waiting commit (index into j_ap_blocks) */ |
188 | unsigned long j_len; /* length of current waiting commit */ | 191 | unsigned long j_len; /* length of current waiting commit */ |
@@ -223,10 +226,10 @@ struct reiserfs_journal { | |||
223 | int j_num_work_lists; /* number that need attention from kreiserfsd */ | 226 | int j_num_work_lists; /* number that need attention from kreiserfsd */ |
224 | 227 | ||
225 | /* debugging to make sure things are flushed in order */ | 228 | /* debugging to make sure things are flushed in order */ |
226 | int j_last_flush_id; | 229 | unsigned int j_last_flush_id; |
227 | 230 | ||
228 | /* debugging to make sure things are committed in order */ | 231 | /* debugging to make sure things are committed in order */ |
229 | int j_last_commit_id; | 232 | unsigned int j_last_commit_id; |
230 | 233 | ||
231 | struct list_head j_bitmap_nodes; | 234 | struct list_head j_bitmap_nodes; |
232 | struct list_head j_dirty_buffers; | 235 | struct list_head j_dirty_buffers; |
@@ -239,7 +242,7 @@ struct reiserfs_journal { | |||
239 | 242 | ||
240 | struct reiserfs_list_bitmap j_list_bitmap[JOURNAL_NUM_BITMAPS]; /* array of bitmaps to record the deleted blocks */ | 243 | struct reiserfs_list_bitmap j_list_bitmap[JOURNAL_NUM_BITMAPS]; /* array of bitmaps to record the deleted blocks */ |
241 | struct reiserfs_journal_cnode *j_hash_table[JOURNAL_HASH_SIZE]; /* hash table for real buffer heads in current trans */ | 244 | struct reiserfs_journal_cnode *j_hash_table[JOURNAL_HASH_SIZE]; /* hash table for real buffer heads in current trans */ |
242 | struct reiserfs_journal_cnode *j_list_hash_table[JOURNAL_HASH_SIZE]; /* hash table for all the real buffer heads in all | 245 | struct reiserfs_journal_cnode *j_list_hash_table[JOURNAL_HASH_SIZE]; /* hash table for all the real buffer heads in all |
243 | the transactions */ | 246 | the transactions */ |
244 | struct list_head j_prealloc_list; /* list of inodes which have preallocated blocks */ | 247 | struct list_head j_prealloc_list; /* list of inodes which have preallocated blocks */ |
245 | int j_persistent_trans; | 248 | int j_persistent_trans; |
@@ -399,10 +402,7 @@ struct reiserfs_sb_info { | |||
399 | int reserved_blocks; /* amount of blocks reserved for further allocations */ | 402 | int reserved_blocks; /* amount of blocks reserved for further allocations */ |
400 | spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */ | 403 | spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */ |
401 | struct dentry *priv_root; /* root of /.reiserfs_priv */ | 404 | struct dentry *priv_root; /* root of /.reiserfs_priv */ |
402 | #ifdef CONFIG_REISERFS_FS_XATTR | ||
403 | struct dentry *xattr_root; /* root of /.reiserfs_priv/.xa */ | 405 | struct dentry *xattr_root; /* root of /.reiserfs_priv/.xa */ |
404 | struct rw_semaphore xattr_dir_sem; | ||
405 | #endif | ||
406 | int j_errno; | 406 | int j_errno; |
407 | #ifdef CONFIG_QUOTA | 407 | #ifdef CONFIG_QUOTA |
408 | char *s_qf_names[MAXQUOTAS]; | 408 | char *s_qf_names[MAXQUOTAS]; |
@@ -426,7 +426,7 @@ enum reiserfs_mount_options { | |||
426 | partition will be dealt with in a | 426 | partition will be dealt with in a |
427 | manner of 3.5.x */ | 427 | manner of 3.5.x */ |
428 | 428 | ||
429 | /* -o hash={tea, rupasov, r5, detect} is meant for properly mounting | 429 | /* -o hash={tea, rupasov, r5, detect} is meant for properly mounting |
430 | ** reiserfs disks from 3.5.19 or earlier. 99% of the time, this option | 430 | ** reiserfs disks from 3.5.19 or earlier. 99% of the time, this option |
431 | ** is not required. If the normal autodection code can't determine which | 431 | ** is not required. If the normal autodection code can't determine which |
432 | ** hash to use (because both hashes had the same value for a file) | 432 | ** hash to use (because both hashes had the same value for a file) |
@@ -451,7 +451,6 @@ enum reiserfs_mount_options { | |||
451 | REISERFS_NO_UNHASHED_RELOCATION, | 451 | REISERFS_NO_UNHASHED_RELOCATION, |
452 | REISERFS_HASHED_RELOCATION, | 452 | REISERFS_HASHED_RELOCATION, |
453 | REISERFS_ATTRS, | 453 | REISERFS_ATTRS, |
454 | REISERFS_XATTRS, | ||
455 | REISERFS_XATTRS_USER, | 454 | REISERFS_XATTRS_USER, |
456 | REISERFS_POSIXACL, | 455 | REISERFS_POSIXACL, |
457 | REISERFS_BARRIER_NONE, | 456 | REISERFS_BARRIER_NONE, |
@@ -489,7 +488,7 @@ enum reiserfs_mount_options { | |||
489 | #define reiserfs_data_log(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_LOG)) | 488 | #define reiserfs_data_log(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_LOG)) |
490 | #define reiserfs_data_ordered(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_ORDERED)) | 489 | #define reiserfs_data_ordered(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_ORDERED)) |
491 | #define reiserfs_data_writeback(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_WRITEBACK)) | 490 | #define reiserfs_data_writeback(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_WRITEBACK)) |
492 | #define reiserfs_xattrs(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_XATTRS)) | 491 | #define reiserfs_xattrs(s) ((s)->s_xattr != NULL) |
493 | #define reiserfs_xattrs_user(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_XATTRS_USER)) | 492 | #define reiserfs_xattrs_user(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_XATTRS_USER)) |
494 | #define reiserfs_posixacl(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_POSIXACL)) | 493 | #define reiserfs_posixacl(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_POSIXACL)) |
495 | #define reiserfs_xattrs_optional(s) (reiserfs_xattrs_user(s) || reiserfs_posixacl(s)) | 494 | #define reiserfs_xattrs_optional(s) (reiserfs_xattrs_user(s) || reiserfs_posixacl(s)) |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index af135ae895db..dcae01e63e40 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -15,6 +15,12 @@ struct reiserfs_xattr_header { | |||
15 | __le32 h_hash; /* hash of the value */ | 15 | __le32 h_hash; /* hash of the value */ |
16 | }; | 16 | }; |
17 | 17 | ||
18 | struct reiserfs_security_handle { | ||
19 | char *name; | ||
20 | void *value; | ||
21 | size_t length; | ||
22 | }; | ||
23 | |||
18 | #ifdef __KERNEL__ | 24 | #ifdef __KERNEL__ |
19 | 25 | ||
20 | #include <linux/init.h> | 26 | #include <linux/init.h> |
@@ -29,22 +35,13 @@ struct iattr; | |||
29 | struct super_block; | 35 | struct super_block; |
30 | struct nameidata; | 36 | struct nameidata; |
31 | 37 | ||
32 | struct reiserfs_xattr_handler { | 38 | int reiserfs_xattr_register_handlers(void) __init; |
33 | char *prefix; | 39 | void reiserfs_xattr_unregister_handlers(void); |
34 | int (*init) (void); | 40 | int reiserfs_xattr_init(struct super_block *sb, int mount_flags); |
35 | void (*exit) (void); | 41 | int reiserfs_delete_xattrs(struct inode *inode); |
36 | int (*get) (struct inode * inode, const char *name, void *buffer, | 42 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); |
37 | size_t size); | ||
38 | int (*set) (struct inode * inode, const char *name, const void *buffer, | ||
39 | size_t size, int flags); | ||
40 | int (*del) (struct inode * inode, const char *name); | ||
41 | int (*list) (struct inode * inode, const char *name, int namelen, | ||
42 | char *out); | ||
43 | struct list_head handlers; | ||
44 | }; | ||
45 | 43 | ||
46 | #ifdef CONFIG_REISERFS_FS_XATTR | 44 | #ifdef CONFIG_REISERFS_FS_XATTR |
47 | #define is_reiserfs_priv_object(inode) IS_PRIVATE(inode) | ||
48 | #define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir) | 45 | #define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir) |
49 | ssize_t reiserfs_getxattr(struct dentry *dentry, const char *name, | 46 | ssize_t reiserfs_getxattr(struct dentry *dentry, const char *name, |
50 | void *buffer, size_t size); | 47 | void *buffer, size_t size); |
@@ -52,104 +49,97 @@ int reiserfs_setxattr(struct dentry *dentry, const char *name, | |||
52 | const void *value, size_t size, int flags); | 49 | const void *value, size_t size, int flags); |
53 | ssize_t reiserfs_listxattr(struct dentry *dentry, char *buffer, size_t size); | 50 | ssize_t reiserfs_listxattr(struct dentry *dentry, char *buffer, size_t size); |
54 | int reiserfs_removexattr(struct dentry *dentry, const char *name); | 51 | int reiserfs_removexattr(struct dentry *dentry, const char *name); |
55 | int reiserfs_delete_xattrs(struct inode *inode); | ||
56 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); | ||
57 | int reiserfs_xattr_init(struct super_block *sb, int mount_flags); | ||
58 | int reiserfs_permission(struct inode *inode, int mask); | 52 | int reiserfs_permission(struct inode *inode, int mask); |
59 | 53 | ||
60 | int reiserfs_xattr_del(struct inode *, const char *); | 54 | int reiserfs_xattr_get(struct inode *, const char *, void *, size_t); |
61 | int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t); | ||
62 | int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int); | 55 | int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int); |
63 | 56 | int reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *, | |
64 | extern struct reiserfs_xattr_handler user_handler; | 57 | struct inode *, const char *, const void *, |
65 | extern struct reiserfs_xattr_handler trusted_handler; | 58 | size_t, int); |
66 | extern struct reiserfs_xattr_handler security_handler; | 59 | |
67 | 60 | extern struct xattr_handler reiserfs_xattr_user_handler; | |
68 | int reiserfs_xattr_register_handlers(void) __init; | 61 | extern struct xattr_handler reiserfs_xattr_trusted_handler; |
69 | void reiserfs_xattr_unregister_handlers(void); | 62 | extern struct xattr_handler reiserfs_xattr_security_handler; |
70 | 63 | #ifdef CONFIG_REISERFS_FS_SECURITY | |
71 | static inline void reiserfs_write_lock_xattrs(struct super_block *sb) | 64 | int reiserfs_security_init(struct inode *dir, struct inode *inode, |
72 | { | 65 | struct reiserfs_security_handle *sec); |
73 | down_write(&REISERFS_XATTR_DIR_SEM(sb)); | 66 | int reiserfs_security_write(struct reiserfs_transaction_handle *th, |
74 | } | 67 | struct inode *inode, |
75 | static inline void reiserfs_write_unlock_xattrs(struct super_block *sb) | 68 | struct reiserfs_security_handle *sec); |
76 | { | 69 | void reiserfs_security_free(struct reiserfs_security_handle *sec); |
77 | up_write(&REISERFS_XATTR_DIR_SEM(sb)); | 70 | #endif |
78 | } | 71 | |
79 | static inline void reiserfs_read_lock_xattrs(struct super_block *sb) | 72 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) |
80 | { | 73 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) |
81 | down_read(&REISERFS_XATTR_DIR_SEM(sb)); | ||
82 | } | ||
83 | |||
84 | static inline void reiserfs_read_unlock_xattrs(struct super_block *sb) | ||
85 | { | 74 | { |
86 | up_read(&REISERFS_XATTR_DIR_SEM(sb)); | 75 | loff_t ret = 0; |
76 | if (reiserfs_file_data_log(inode)) { | ||
77 | ret = _ROUND_UP(xattr_size(size), inode->i_sb->s_blocksize); | ||
78 | ret >>= inode->i_sb->s_blocksize_bits; | ||
79 | } | ||
80 | return ret; | ||
87 | } | 81 | } |
88 | 82 | ||
89 | static inline void reiserfs_write_lock_xattr_i(struct inode *inode) | 83 | /* We may have to create up to 3 objects: xattr root, xattr dir, xattr file. |
90 | { | 84 | * Let's try to be smart about it. |
91 | down_write(&REISERFS_I(inode)->xattr_sem); | 85 | * xattr root: We cache it. If it's not cached, we may need to create it. |
92 | } | 86 | * xattr dir: If anything has been loaded for this inode, we can set a flag |
93 | static inline void reiserfs_write_unlock_xattr_i(struct inode *inode) | 87 | * saying so. |
88 | * xattr file: Since we don't cache xattrs, we can't tell. We always include | ||
89 | * blocks for it. | ||
90 | * | ||
91 | * However, since root and dir can be created between calls - YOU MUST SAVE | ||
92 | * THIS VALUE. | ||
93 | */ | ||
94 | static inline size_t reiserfs_xattr_jcreate_nblocks(struct inode *inode) | ||
94 | { | 95 | { |
95 | up_write(&REISERFS_I(inode)->xattr_sem); | 96 | size_t nblocks = JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb); |
96 | } | ||
97 | static inline void reiserfs_read_lock_xattr_i(struct inode *inode) | ||
98 | { | ||
99 | down_read(&REISERFS_I(inode)->xattr_sem); | ||
100 | } | ||
101 | 97 | ||
102 | static inline void reiserfs_read_unlock_xattr_i(struct inode *inode) | 98 | if ((REISERFS_I(inode)->i_flags & i_has_xattr_dir) == 0) { |
103 | { | 99 | nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb); |
104 | up_read(&REISERFS_I(inode)->xattr_sem); | 100 | if (REISERFS_SB(inode->i_sb)->xattr_root == NULL) |
105 | } | 101 | nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb); |
102 | } | ||
106 | 103 | ||
107 | static inline void reiserfs_mark_inode_private(struct inode *inode) | 104 | return nblocks; |
108 | { | ||
109 | inode->i_flags |= S_PRIVATE; | ||
110 | } | 105 | } |
111 | 106 | ||
112 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) | 107 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) |
113 | { | 108 | { |
114 | init_rwsem(&REISERFS_I(inode)->xattr_sem); | 109 | init_rwsem(&REISERFS_I(inode)->i_xattr_sem); |
115 | } | 110 | } |
116 | 111 | ||
117 | #else | 112 | #else |
118 | 113 | ||
119 | #define is_reiserfs_priv_object(inode) 0 | ||
120 | #define reiserfs_mark_inode_private(inode) do {;} while(0) | ||
121 | #define reiserfs_getxattr NULL | 114 | #define reiserfs_getxattr NULL |
122 | #define reiserfs_setxattr NULL | 115 | #define reiserfs_setxattr NULL |
123 | #define reiserfs_listxattr NULL | 116 | #define reiserfs_listxattr NULL |
124 | #define reiserfs_removexattr NULL | 117 | #define reiserfs_removexattr NULL |
125 | #define reiserfs_write_lock_xattrs(sb) do {;} while(0) | ||
126 | #define reiserfs_write_unlock_xattrs(sb) do {;} while(0) | ||
127 | #define reiserfs_read_lock_xattrs(sb) | ||
128 | #define reiserfs_read_unlock_xattrs(sb) | ||
129 | 118 | ||
130 | #define reiserfs_permission NULL | 119 | #define reiserfs_permission NULL |
131 | 120 | ||
132 | #define reiserfs_xattr_register_handlers() 0 | 121 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) |
133 | #define reiserfs_xattr_unregister_handlers() | ||
134 | |||
135 | static inline int reiserfs_delete_xattrs(struct inode *inode) | ||
136 | { | 122 | { |
137 | return 0; | 123 | } |
138 | }; | 124 | #endif /* CONFIG_REISERFS_FS_XATTR */ |
139 | static inline int reiserfs_chown_xattrs(struct inode *inode, | 125 | |
140 | struct iattr *attrs) | 126 | #ifndef CONFIG_REISERFS_FS_SECURITY |
127 | static inline int reiserfs_security_init(struct inode *dir, | ||
128 | struct inode *inode, | ||
129 | struct reiserfs_security_handle *sec) | ||
141 | { | 130 | { |
142 | return 0; | 131 | return 0; |
143 | }; | 132 | } |
144 | static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags) | 133 | static inline int |
134 | reiserfs_security_write(struct reiserfs_transaction_handle *th, | ||
135 | struct inode *inode, | ||
136 | struct reiserfs_security_handle *sec) | ||
145 | { | 137 | { |
146 | sb->s_flags = (sb->s_flags & ~MS_POSIXACL); /* to be sure */ | ||
147 | return 0; | 138 | return 0; |
148 | }; | ||
149 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) | ||
150 | { | ||
151 | } | 139 | } |
152 | #endif /* CONFIG_REISERFS_FS_XATTR */ | 140 | static inline void reiserfs_security_free(struct reiserfs_security_handle *sec) |
141 | {} | ||
142 | #endif | ||
153 | 143 | ||
154 | #endif /* __KERNEL__ */ | 144 | #endif /* __KERNEL__ */ |
155 | 145 | ||
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 4046b75563c1..60f88a7fb13d 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -99,6 +99,7 @@ struct rtc_pll_info { | |||
99 | 99 | ||
100 | #ifdef __KERNEL__ | 100 | #ifdef __KERNEL__ |
101 | 101 | ||
102 | #include <linux/types.h> | ||
102 | #include <linux/interrupt.h> | 103 | #include <linux/interrupt.h> |
103 | 104 | ||
104 | extern int rtc_month_days(unsigned int month, unsigned int year); | 105 | extern int rtc_month_days(unsigned int month, unsigned int year); |
@@ -232,6 +233,11 @@ int rtc_register(rtc_task_t *task); | |||
232 | int rtc_unregister(rtc_task_t *task); | 233 | int rtc_unregister(rtc_task_t *task); |
233 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); | 234 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); |
234 | 235 | ||
236 | static inline bool is_leap_year(unsigned int year) | ||
237 | { | ||
238 | return (!(year % 4) && (year % 100)) || !(year % 400); | ||
239 | } | ||
240 | |||
235 | #endif /* __KERNEL__ */ | 241 | #endif /* __KERNEL__ */ |
236 | 242 | ||
237 | #endif /* _LINUX_RTC_H_ */ | 243 | #endif /* _LINUX_RTC_H_ */ |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 1e5f6730ff31..ba3254ecf7fb 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -217,6 +217,7 @@ enum | |||
217 | #define RTPROT_DNROUTED 13 /* DECnet routing daemon */ | 217 | #define RTPROT_DNROUTED 13 /* DECnet routing daemon */ |
218 | #define RTPROT_XORP 14 /* XORP */ | 218 | #define RTPROT_XORP 14 /* XORP */ |
219 | #define RTPROT_NTK 15 /* Netsukuku */ | 219 | #define RTPROT_NTK 15 /* Netsukuku */ |
220 | #define RTPROT_DHCP 16 /* DHCP client */ | ||
220 | 221 | ||
221 | /* rtm_scope | 222 | /* rtm_scope |
222 | 223 | ||
@@ -622,8 +623,8 @@ static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) | |||
622 | 623 | ||
623 | 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); |
624 | 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); |
625 | 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, |
626 | struct nlmsghdr *nlh, gfp_t flags); | 627 | u32 group, struct nlmsghdr *nlh, gfp_t flags); |
627 | 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); |
628 | extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics); | 629 | extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics); |
629 | 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 471e36d30123..5a50fdef5be5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -393,8 +393,15 @@ extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); | |||
393 | (mm)->hiwater_vm = (mm)->total_vm; \ | 393 | (mm)->hiwater_vm = (mm)->total_vm; \ |
394 | } while (0) | 394 | } while (0) |
395 | 395 | ||
396 | #define get_mm_hiwater_rss(mm) max((mm)->hiwater_rss, get_mm_rss(mm)) | 396 | static inline unsigned long get_mm_hiwater_rss(struct mm_struct *mm) |
397 | #define get_mm_hiwater_vm(mm) max((mm)->hiwater_vm, (mm)->total_vm) | 397 | { |
398 | return max(mm->hiwater_rss, get_mm_rss(mm)); | ||
399 | } | ||
400 | |||
401 | static inline unsigned long get_mm_hiwater_vm(struct mm_struct *mm) | ||
402 | { | ||
403 | return max(mm->hiwater_vm, mm->total_vm); | ||
404 | } | ||
398 | 405 | ||
399 | extern void set_dumpable(struct mm_struct *mm, int value); | 406 | extern void set_dumpable(struct mm_struct *mm, int value); |
400 | extern int get_dumpable(struct mm_struct *mm); | 407 | extern int get_dumpable(struct mm_struct *mm); |
@@ -1002,6 +1009,7 @@ struct sched_class { | |||
1002 | struct rq *busiest, struct sched_domain *sd, | 1009 | struct rq *busiest, struct sched_domain *sd, |
1003 | enum cpu_idle_type idle); | 1010 | enum cpu_idle_type idle); |
1004 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | 1011 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); |
1012 | int (*needs_post_schedule) (struct rq *this_rq); | ||
1005 | void (*post_schedule) (struct rq *this_rq); | 1013 | void (*post_schedule) (struct rq *this_rq); |
1006 | void (*task_wake_up) (struct rq *this_rq, struct task_struct *task); | 1014 | void (*task_wake_up) (struct rq *this_rq, struct task_struct *task); |
1007 | 1015 | ||
@@ -1056,6 +1064,10 @@ struct sched_entity { | |||
1056 | u64 last_wakeup; | 1064 | u64 last_wakeup; |
1057 | u64 avg_overlap; | 1065 | u64 avg_overlap; |
1058 | 1066 | ||
1067 | u64 start_runtime; | ||
1068 | u64 avg_wakeup; | ||
1069 | u64 nr_migrations; | ||
1070 | |||
1059 | #ifdef CONFIG_SCHEDSTATS | 1071 | #ifdef CONFIG_SCHEDSTATS |
1060 | u64 wait_start; | 1072 | u64 wait_start; |
1061 | u64 wait_max; | 1073 | u64 wait_max; |
@@ -1071,7 +1083,6 @@ struct sched_entity { | |||
1071 | u64 exec_max; | 1083 | u64 exec_max; |
1072 | u64 slice_max; | 1084 | u64 slice_max; |
1073 | 1085 | ||
1074 | u64 nr_migrations; | ||
1075 | u64 nr_migrations_cold; | 1086 | u64 nr_migrations_cold; |
1076 | u64 nr_failed_migrations_affine; | 1087 | u64 nr_failed_migrations_affine; |
1077 | u64 nr_failed_migrations_running; | 1088 | u64 nr_failed_migrations_running; |
@@ -1168,6 +1179,7 @@ struct task_struct { | |||
1168 | #endif | 1179 | #endif |
1169 | 1180 | ||
1170 | struct list_head tasks; | 1181 | struct list_head tasks; |
1182 | struct plist_node pushable_tasks; | ||
1171 | 1183 | ||
1172 | struct mm_struct *mm, *active_mm; | 1184 | struct mm_struct *mm, *active_mm; |
1173 | 1185 | ||
@@ -1179,6 +1191,8 @@ struct task_struct { | |||
1179 | /* ??? */ | 1191 | /* ??? */ |
1180 | unsigned int personality; | 1192 | unsigned int personality; |
1181 | unsigned did_exec:1; | 1193 | unsigned did_exec:1; |
1194 | unsigned in_execve:1; /* Tell the LSMs that the process is doing an | ||
1195 | * execve */ | ||
1182 | pid_t pid; | 1196 | pid_t pid; |
1183 | pid_t tgid; | 1197 | pid_t tgid; |
1184 | 1198 | ||
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/security.h b/include/linux/security.h index 1f2ab6353c00..54ed15799a83 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -880,11 +880,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
880 | * @sock contains the listening socket structure. | 880 | * @sock contains the listening socket structure. |
881 | * @newsock contains the newly created server socket for connection. | 881 | * @newsock contains the newly created server socket for connection. |
882 | * Return 0 if permission is granted. | 882 | * Return 0 if permission is granted. |
883 | * @socket_post_accept: | ||
884 | * This hook allows a security module to copy security | ||
885 | * information into the newly created socket's inode. | ||
886 | * @sock contains the listening socket structure. | ||
887 | * @newsock contains the newly created server socket for connection. | ||
888 | * @socket_sendmsg: | 883 | * @socket_sendmsg: |
889 | * Check permission before transmitting a message to another socket. | 884 | * Check permission before transmitting a message to another socket. |
890 | * @sock contains the socket structure. | 885 | * @sock contains the socket structure. |
@@ -1554,8 +1549,6 @@ struct security_operations { | |||
1554 | struct sockaddr *address, int addrlen); | 1549 | struct sockaddr *address, int addrlen); |
1555 | int (*socket_listen) (struct socket *sock, int backlog); | 1550 | int (*socket_listen) (struct socket *sock, int backlog); |
1556 | int (*socket_accept) (struct socket *sock, struct socket *newsock); | 1551 | int (*socket_accept) (struct socket *sock, struct socket *newsock); |
1557 | void (*socket_post_accept) (struct socket *sock, | ||
1558 | struct socket *newsock); | ||
1559 | int (*socket_sendmsg) (struct socket *sock, | 1552 | int (*socket_sendmsg) (struct socket *sock, |
1560 | struct msghdr *msg, int size); | 1553 | struct msghdr *msg, int size); |
1561 | int (*socket_recvmsg) (struct socket *sock, | 1554 | int (*socket_recvmsg) (struct socket *sock, |
@@ -2537,7 +2530,6 @@ int security_socket_bind(struct socket *sock, struct sockaddr *address, int addr | |||
2537 | int security_socket_connect(struct socket *sock, struct sockaddr *address, int addrlen); | 2530 | int security_socket_connect(struct socket *sock, struct sockaddr *address, int addrlen); |
2538 | int security_socket_listen(struct socket *sock, int backlog); | 2531 | int security_socket_listen(struct socket *sock, int backlog); |
2539 | int security_socket_accept(struct socket *sock, struct socket *newsock); | 2532 | int security_socket_accept(struct socket *sock, struct socket *newsock); |
2540 | void security_socket_post_accept(struct socket *sock, struct socket *newsock); | ||
2541 | int security_socket_sendmsg(struct socket *sock, struct msghdr *msg, int size); | 2533 | int security_socket_sendmsg(struct socket *sock, struct msghdr *msg, int size); |
2542 | int security_socket_recvmsg(struct socket *sock, struct msghdr *msg, | 2534 | int security_socket_recvmsg(struct socket *sock, struct msghdr *msg, |
2543 | int size, int flags); | 2535 | int size, int flags); |
@@ -2616,11 +2608,6 @@ static inline int security_socket_accept(struct socket *sock, | |||
2616 | return 0; | 2608 | return 0; |
2617 | } | 2609 | } |
2618 | 2610 | ||
2619 | static inline void security_socket_post_accept(struct socket *sock, | ||
2620 | struct socket *newsock) | ||
2621 | { | ||
2622 | } | ||
2623 | |||
2624 | static inline int security_socket_sendmsg(struct socket *sock, | 2611 | static inline int security_socket_sendmsg(struct socket *sock, |
2625 | struct msghdr *msg, int size) | 2612 | struct msghdr *msg, int size) |
2626 | { | 2613 | { |
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 f616f31576d7..004f3b3342c5 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -55,7 +55,7 @@ int seq_bitmap(struct seq_file *m, const unsigned long *bits, | |||
55 | unsigned int nr_bits); | 55 | unsigned int nr_bits); |
56 | static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask) | 56 | static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask) |
57 | { | 57 | { |
58 | return seq_bitmap(m, mask->bits, nr_cpu_ids); | 58 | return seq_bitmap(m, cpumask_bits(mask), nr_cpu_ids); |
59 | } | 59 | } |
60 | 60 | ||
61 | static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) | 61 | static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) |
@@ -63,12 +63,13 @@ static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) | |||
63 | return seq_bitmap(m, mask->bits, MAX_NUMNODES); | 63 | return seq_bitmap(m, mask->bits, MAX_NUMNODES); |
64 | } | 64 | } |
65 | 65 | ||
66 | int seq_bitmap_list(struct seq_file *m, unsigned long *bits, | 66 | int seq_bitmap_list(struct seq_file *m, const unsigned long *bits, |
67 | unsigned int nr_bits); | 67 | unsigned int nr_bits); |
68 | 68 | ||
69 | static inline int seq_cpumask_list(struct seq_file *m, cpumask_t *mask) | 69 | static inline int seq_cpumask_list(struct seq_file *m, |
70 | const struct cpumask *mask) | ||
70 | { | 71 | { |
71 | return seq_bitmap_list(m, mask->bits, NR_CPUS); | 72 | return seq_bitmap_list(m, cpumask_bits(mask), nr_cpu_ids); |
72 | } | 73 | } |
73 | 74 | ||
74 | static inline int seq_nodemask_list(struct seq_file *m, nodemask_t *mask) | 75 | static inline int seq_nodemask_list(struct seq_file *m, nodemask_t *mask) |
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/skbuff.h b/include/linux/skbuff.h index 9dcf956ad18a..5fd389162f01 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,56 @@ 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 | * @flags: all shared_tx flags | ||
172 | * | ||
173 | * These flags are attached to packets as part of the | ||
174 | * &skb_shared_info. Use skb_tx() to get a pointer. | ||
175 | */ | ||
176 | union skb_shared_tx { | ||
177 | struct { | ||
178 | __u8 hardware:1, | ||
179 | software:1, | ||
180 | in_progress:1; | ||
181 | }; | ||
182 | __u8 flags; | ||
183 | }; | ||
184 | |||
138 | /* This data is invariant across clones and lives at | 185 | /* This data is invariant across clones and lives at |
139 | * the end of the header data, ie. at skb->end. | 186 | * the end of the header data, ie. at skb->end. |
140 | */ | 187 | */ |
@@ -146,10 +193,12 @@ struct skb_shared_info { | |||
146 | unsigned short gso_segs; | 193 | unsigned short gso_segs; |
147 | unsigned short gso_type; | 194 | unsigned short gso_type; |
148 | __be32 ip6_frag_id; | 195 | __be32 ip6_frag_id; |
196 | union skb_shared_tx tx_flags; | ||
149 | #ifdef CONFIG_HAS_DMA | 197 | #ifdef CONFIG_HAS_DMA |
150 | unsigned int num_dma_maps; | 198 | unsigned int num_dma_maps; |
151 | #endif | 199 | #endif |
152 | struct sk_buff *frag_list; | 200 | struct sk_buff *frag_list; |
201 | struct skb_shared_hwtstamps hwtstamps; | ||
153 | skb_frag_t frags[MAX_SKB_FRAGS]; | 202 | skb_frag_t frags[MAX_SKB_FRAGS]; |
154 | #ifdef CONFIG_HAS_DMA | 203 | #ifdef CONFIG_HAS_DMA |
155 | dma_addr_t dma_maps[MAX_SKB_FRAGS + 1]; | 204 | dma_addr_t dma_maps[MAX_SKB_FRAGS + 1]; |
@@ -188,6 +237,8 @@ enum { | |||
188 | SKB_GSO_TCP_ECN = 1 << 3, | 237 | SKB_GSO_TCP_ECN = 1 << 3, |
189 | 238 | ||
190 | SKB_GSO_TCPV6 = 1 << 4, | 239 | SKB_GSO_TCPV6 = 1 << 4, |
240 | |||
241 | SKB_GSO_FCOE = 1 << 5, | ||
191 | }; | 242 | }; |
192 | 243 | ||
193 | #if BITS_PER_LONG > 32 | 244 | #if BITS_PER_LONG > 32 |
@@ -373,6 +424,7 @@ extern void skb_dma_unmap(struct device *dev, struct sk_buff *skb, | |||
373 | #endif | 424 | #endif |
374 | 425 | ||
375 | extern void kfree_skb(struct sk_buff *skb); | 426 | extern void kfree_skb(struct sk_buff *skb); |
427 | extern void consume_skb(struct sk_buff *skb); | ||
376 | extern void __kfree_skb(struct sk_buff *skb); | 428 | extern void __kfree_skb(struct sk_buff *skb); |
377 | extern struct sk_buff *__alloc_skb(unsigned int size, | 429 | extern struct sk_buff *__alloc_skb(unsigned int size, |
378 | gfp_t priority, int fclone, int node); | 430 | gfp_t priority, int fclone, int node); |
@@ -411,7 +463,8 @@ extern int skb_to_sgvec(struct sk_buff *skb, | |||
411 | extern int skb_cow_data(struct sk_buff *skb, int tailbits, | 463 | extern int skb_cow_data(struct sk_buff *skb, int tailbits, |
412 | struct sk_buff **trailer); | 464 | struct sk_buff **trailer); |
413 | extern int skb_pad(struct sk_buff *skb, int pad); | 465 | extern int skb_pad(struct sk_buff *skb, int pad); |
414 | #define dev_kfree_skb(a) kfree_skb(a) | 466 | #define dev_kfree_skb(a) consume_skb(a) |
467 | #define dev_consume_skb(a) kfree_skb_clean(a) | ||
415 | extern void skb_over_panic(struct sk_buff *skb, int len, | 468 | extern void skb_over_panic(struct sk_buff *skb, int len, |
416 | void *here); | 469 | void *here); |
417 | extern void skb_under_panic(struct sk_buff *skb, int len, | 470 | extern void skb_under_panic(struct sk_buff *skb, int len, |
@@ -459,6 +512,16 @@ static inline unsigned char *skb_end_pointer(const struct sk_buff *skb) | |||
459 | /* Internal */ | 512 | /* Internal */ |
460 | #define skb_shinfo(SKB) ((struct skb_shared_info *)(skb_end_pointer(SKB))) | 513 | #define skb_shinfo(SKB) ((struct skb_shared_info *)(skb_end_pointer(SKB))) |
461 | 514 | ||
515 | static inline struct skb_shared_hwtstamps *skb_hwtstamps(struct sk_buff *skb) | ||
516 | { | ||
517 | return &skb_shinfo(skb)->hwtstamps; | ||
518 | } | ||
519 | |||
520 | static inline union skb_shared_tx *skb_tx(struct sk_buff *skb) | ||
521 | { | ||
522 | return &skb_shinfo(skb)->tx_flags; | ||
523 | } | ||
524 | |||
462 | /** | 525 | /** |
463 | * skb_queue_empty - check if a queue is empty | 526 | * skb_queue_empty - check if a queue is empty |
464 | * @list: queue head | 527 | * @list: queue head |
@@ -1278,7 +1341,7 @@ static inline int skb_network_offset(const struct sk_buff *skb) | |||
1278 | * The networking layer reserves some headroom in skb data (via | 1341 | * The networking layer reserves some headroom in skb data (via |
1279 | * dev_alloc_skb). This is used to avoid having to reallocate skb data when | 1342 | * dev_alloc_skb). This is used to avoid having to reallocate skb data when |
1280 | * the header has to grow. In the default case, if the header has to grow | 1343 | * the header has to grow. In the default case, if the header has to grow |
1281 | * 16 bytes or less we avoid the reallocation. | 1344 | * 32 bytes or less we avoid the reallocation. |
1282 | * | 1345 | * |
1283 | * Unfortunately this headroom changes the DMA alignment of the resulting | 1346 | * Unfortunately this headroom changes the DMA alignment of the resulting |
1284 | * network packet. As for NET_IP_ALIGN, this unaligned DMA is expensive | 1347 | * network packet. As for NET_IP_ALIGN, this unaligned DMA is expensive |
@@ -1286,11 +1349,11 @@ static inline int skb_network_offset(const struct sk_buff *skb) | |||
1286 | * perhaps setting it to a cacheline in size (since that will maintain | 1349 | * perhaps setting it to a cacheline in size (since that will maintain |
1287 | * cacheline alignment of the DMA). It must be a power of 2. | 1350 | * cacheline alignment of the DMA). It must be a power of 2. |
1288 | * | 1351 | * |
1289 | * Various parts of the networking layer expect at least 16 bytes of | 1352 | * Various parts of the networking layer expect at least 32 bytes of |
1290 | * headroom, you should not reduce this. | 1353 | * headroom, you should not reduce this. |
1291 | */ | 1354 | */ |
1292 | #ifndef NET_SKB_PAD | 1355 | #ifndef NET_SKB_PAD |
1293 | #define NET_SKB_PAD 16 | 1356 | #define NET_SKB_PAD 32 |
1294 | #endif | 1357 | #endif |
1295 | 1358 | ||
1296 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); | 1359 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); |
@@ -1678,8 +1741,6 @@ extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, | |||
1678 | int shiftlen); | 1741 | int shiftlen); |
1679 | 1742 | ||
1680 | extern struct sk_buff *skb_segment(struct sk_buff *skb, int features); | 1743 | extern struct sk_buff *skb_segment(struct sk_buff *skb, int features); |
1681 | extern int skb_gro_receive(struct sk_buff **head, | ||
1682 | struct sk_buff *skb); | ||
1683 | 1744 | ||
1684 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, | 1745 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, |
1685 | int len, void *buffer) | 1746 | int len, void *buffer) |
@@ -1726,6 +1787,11 @@ static inline void skb_copy_to_linear_data_offset(struct sk_buff *skb, | |||
1726 | 1787 | ||
1727 | extern void skb_init(void); | 1788 | extern void skb_init(void); |
1728 | 1789 | ||
1790 | static inline ktime_t skb_get_ktime(const struct sk_buff *skb) | ||
1791 | { | ||
1792 | return skb->tstamp; | ||
1793 | } | ||
1794 | |||
1729 | /** | 1795 | /** |
1730 | * skb_get_timestamp - get timestamp from a skb | 1796 | * skb_get_timestamp - get timestamp from a skb |
1731 | * @skb: skb to get stamp from | 1797 | * @skb: skb to get stamp from |
@@ -1735,11 +1801,18 @@ extern void skb_init(void); | |||
1735 | * This function converts the offset back to a struct timeval and stores | 1801 | * This function converts the offset back to a struct timeval and stores |
1736 | * it in stamp. | 1802 | * it in stamp. |
1737 | */ | 1803 | */ |
1738 | static inline void skb_get_timestamp(const struct sk_buff *skb, struct timeval *stamp) | 1804 | static inline void skb_get_timestamp(const struct sk_buff *skb, |
1805 | struct timeval *stamp) | ||
1739 | { | 1806 | { |
1740 | *stamp = ktime_to_timeval(skb->tstamp); | 1807 | *stamp = ktime_to_timeval(skb->tstamp); |
1741 | } | 1808 | } |
1742 | 1809 | ||
1810 | static inline void skb_get_timestampns(const struct sk_buff *skb, | ||
1811 | struct timespec *stamp) | ||
1812 | { | ||
1813 | *stamp = ktime_to_timespec(skb->tstamp); | ||
1814 | } | ||
1815 | |||
1743 | static inline void __net_timestamp(struct sk_buff *skb) | 1816 | static inline void __net_timestamp(struct sk_buff *skb) |
1744 | { | 1817 | { |
1745 | skb->tstamp = ktime_get_real(); | 1818 | skb->tstamp = ktime_get_real(); |
@@ -1755,6 +1828,20 @@ static inline ktime_t net_invalid_timestamp(void) | |||
1755 | return ktime_set(0, 0); | 1828 | return ktime_set(0, 0); |
1756 | } | 1829 | } |
1757 | 1830 | ||
1831 | /** | ||
1832 | * skb_tstamp_tx - queue clone of skb with send time stamps | ||
1833 | * @orig_skb: the original outgoing packet | ||
1834 | * @hwtstamps: hardware time stamps, may be NULL if not available | ||
1835 | * | ||
1836 | * If the skb has a socket associated, then this function clones the | ||
1837 | * skb (thus sharing the actual data and optional structures), stores | ||
1838 | * the optional hardware time stamping information (if non NULL) or | ||
1839 | * generates a software time stamp (otherwise), then queues the clone | ||
1840 | * to the error queue of the socket. Errors are silently ignored. | ||
1841 | */ | ||
1842 | extern void skb_tstamp_tx(struct sk_buff *orig_skb, | ||
1843 | struct skb_shared_hwtstamps *hwtstamps); | ||
1844 | |||
1758 | extern __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len); | 1845 | extern __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len); |
1759 | extern __sum16 __skb_checksum_complete(struct sk_buff *skb); | 1846 | extern __sum16 __skb_checksum_complete(struct sk_buff *skb); |
1760 | 1847 | ||
@@ -1885,7 +1972,7 @@ static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping) | |||
1885 | skb->queue_mapping = queue_mapping; | 1972 | skb->queue_mapping = queue_mapping; |
1886 | } | 1973 | } |
1887 | 1974 | ||
1888 | static inline u16 skb_get_queue_mapping(struct sk_buff *skb) | 1975 | static inline u16 skb_get_queue_mapping(const struct sk_buff *skb) |
1889 | { | 1976 | { |
1890 | return skb->queue_mapping; | 1977 | return skb->queue_mapping; |
1891 | } | 1978 | } |
@@ -1895,6 +1982,24 @@ static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_bu | |||
1895 | to->queue_mapping = from->queue_mapping; | 1982 | to->queue_mapping = from->queue_mapping; |
1896 | } | 1983 | } |
1897 | 1984 | ||
1985 | static inline void skb_record_rx_queue(struct sk_buff *skb, u16 rx_queue) | ||
1986 | { | ||
1987 | skb->queue_mapping = rx_queue + 1; | ||
1988 | } | ||
1989 | |||
1990 | static inline u16 skb_get_rx_queue(const struct sk_buff *skb) | ||
1991 | { | ||
1992 | return skb->queue_mapping - 1; | ||
1993 | } | ||
1994 | |||
1995 | static inline bool skb_rx_queue_recorded(const struct sk_buff *skb) | ||
1996 | { | ||
1997 | return (skb->queue_mapping != 0); | ||
1998 | } | ||
1999 | |||
2000 | extern u16 skb_tx_hash(const struct net_device *dev, | ||
2001 | const struct sk_buff *skb); | ||
2002 | |||
1898 | #ifdef CONFIG_XFRM | 2003 | #ifdef CONFIG_XFRM |
1899 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) | 2004 | static inline struct sec_path *skb_sec_path(struct sk_buff *skb) |
1900 | { | 2005 | { |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 9e3a575b2c30..a1f90528e70b 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -47,7 +47,6 @@ struct kmem_cache_cpu { | |||
47 | struct kmem_cache_node { | 47 | struct kmem_cache_node { |
48 | spinlock_t list_lock; /* Protect partial list and nr_partial */ | 48 | spinlock_t list_lock; /* Protect partial list and nr_partial */ |
49 | unsigned long nr_partial; | 49 | unsigned long nr_partial; |
50 | unsigned long min_partial; | ||
51 | struct list_head partial; | 50 | struct list_head partial; |
52 | #ifdef CONFIG_SLUB_DEBUG | 51 | #ifdef CONFIG_SLUB_DEBUG |
53 | atomic_long_t nr_slabs; | 52 | atomic_long_t nr_slabs; |
@@ -90,6 +89,7 @@ struct kmem_cache { | |||
90 | void (*ctor)(void *); | 89 | void (*ctor)(void *); |
91 | int inuse; /* Offset to metadata */ | 90 | int inuse; /* Offset to metadata */ |
92 | int align; /* Alignment */ | 91 | int align; /* Alignment */ |
92 | unsigned long min_partial; | ||
93 | const char *name; /* Name (only for display!) */ | 93 | const char *name; /* Name (only for display!) */ |
94 | struct list_head list; /* List of slab caches */ | 94 | struct list_head list; /* List of slab caches */ |
95 | #ifdef CONFIG_SLUB_DEBUG | 95 | #ifdef CONFIG_SLUB_DEBUG |
@@ -130,9 +130,9 @@ struct kmem_cache { | |||
130 | * This should be dropped to PAGE_SIZE / 2 once the page allocator | 130 | * This should be dropped to PAGE_SIZE / 2 once the page allocator |
131 | * "fastpath" becomes competitive with the slab allocator fastpaths. | 131 | * "fastpath" becomes competitive with the slab allocator fastpaths. |
132 | */ | 132 | */ |
133 | #define SLUB_MAX_SIZE (PAGE_SIZE) | 133 | #define SLUB_MAX_SIZE (2 * PAGE_SIZE) |
134 | 134 | ||
135 | #define SLUB_PAGE_SHIFT (PAGE_SHIFT + 1) | 135 | #define SLUB_PAGE_SHIFT (PAGE_SHIFT + 2) |
136 | 136 | ||
137 | /* | 137 | /* |
138 | * We keep the general caches in an array of slab caches that are used for | 138 | * We keep the general caches in an array of slab caches that are used for |
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 afc01909a428..421afb4d29b0 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -181,6 +181,7 @@ struct ucred { | |||
181 | #define AF_ASH 18 /* Ash */ | 181 | #define AF_ASH 18 /* Ash */ |
182 | #define AF_ECONET 19 /* Acorn Econet */ | 182 | #define AF_ECONET 19 /* Acorn Econet */ |
183 | #define AF_ATMSVC 20 /* ATM SVCs */ | 183 | #define AF_ATMSVC 20 /* ATM SVCs */ |
184 | #define AF_RDS 21 /* RDS sockets */ | ||
184 | #define AF_SNA 22 /* Linux SNA Project (nutters!) */ | 185 | #define AF_SNA 22 /* Linux SNA Project (nutters!) */ |
185 | #define AF_IRDA 23 /* IRDA sockets */ | 186 | #define AF_IRDA 23 /* IRDA sockets */ |
186 | #define AF_PPPOX 24 /* PPPoX sockets */ | 187 | #define AF_PPPOX 24 /* PPPoX sockets */ |
@@ -219,6 +220,7 @@ struct ucred { | |||
219 | #define PF_ASH AF_ASH | 220 | #define PF_ASH AF_ASH |
220 | #define PF_ECONET AF_ECONET | 221 | #define PF_ECONET AF_ECONET |
221 | #define PF_ATMSVC AF_ATMSVC | 222 | #define PF_ATMSVC AF_ATMSVC |
223 | #define PF_RDS AF_RDS | ||
222 | #define PF_SNA AF_SNA | 224 | #define PF_SNA AF_SNA |
223 | #define PF_IRDA AF_IRDA | 225 | #define PF_IRDA AF_IRDA |
224 | #define PF_PPPOX AF_PPPOX | 226 | #define PF_PPPOX AF_PPPOX |
@@ -300,6 +302,7 @@ struct ucred { | |||
300 | #define SOL_PPPOL2TP 273 | 302 | #define SOL_PPPOL2TP 273 |
301 | #define SOL_BLUETOOTH 274 | 303 | #define SOL_BLUETOOTH 274 |
302 | #define SOL_PNPIPE 275 | 304 | #define SOL_PNPIPE 275 |
305 | #define SOL_RDS 276 | ||
303 | 306 | ||
304 | /* IPX options */ | 307 | /* IPX options */ |
305 | #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/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/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/string.h b/include/linux/string.h index 27ac31784ad2..3c877d686375 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <stdarg.h> | 13 | #include <stdarg.h> |
14 | 14 | ||
15 | extern char *strndup_user(const char __user *, long); | 15 | extern char *strndup_user(const char __user *, long); |
16 | extern void *memdup_user(const void __user *, size_t); | ||
16 | 17 | ||
17 | /* | 18 | /* |
18 | * Include machine specific inline routines | 19 | * Include machine specific inline routines |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 3435d24bfe55..d3a4c0231933 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -69,7 +69,6 @@ struct svc_serv { | |||
69 | struct list_head sv_tempsocks; /* all temporary sockets */ | 69 | struct list_head sv_tempsocks; /* all temporary sockets */ |
70 | int sv_tmpcnt; /* count of temporary sockets */ | 70 | int sv_tmpcnt; /* count of temporary sockets */ |
71 | struct timer_list sv_temptimer; /* timer for aging temporary sockets */ | 71 | struct timer_list sv_temptimer; /* timer for aging temporary sockets */ |
72 | sa_family_t sv_family; /* listener's address family */ | ||
73 | 72 | ||
74 | char * sv_name; /* service name */ | 73 | char * sv_name; /* service name */ |
75 | 74 | ||
@@ -385,19 +384,19 @@ struct svc_procedure { | |||
385 | /* | 384 | /* |
386 | * Function prototypes. | 385 | * Function prototypes. |
387 | */ | 386 | */ |
388 | struct svc_serv *svc_create(struct svc_program *, unsigned int, sa_family_t, | 387 | struct svc_serv *svc_create(struct svc_program *, unsigned int, |
389 | void (*shutdown)(struct svc_serv *)); | 388 | void (*shutdown)(struct svc_serv *)); |
390 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, | 389 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, |
391 | struct svc_pool *pool); | 390 | struct svc_pool *pool); |
392 | void svc_exit_thread(struct svc_rqst *); | 391 | void svc_exit_thread(struct svc_rqst *); |
393 | struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, | 392 | struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, |
394 | sa_family_t, void (*shutdown)(struct svc_serv *), | 393 | void (*shutdown)(struct svc_serv *), |
395 | svc_thread_fn, struct module *); | 394 | svc_thread_fn, struct module *); |
396 | int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); | 395 | int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); |
397 | void svc_destroy(struct svc_serv *); | 396 | void svc_destroy(struct svc_serv *); |
398 | int svc_process(struct svc_rqst *); | 397 | int svc_process(struct svc_rqst *); |
399 | int svc_register(const struct svc_serv *, const unsigned short, | 398 | int svc_register(const struct svc_serv *, const int, |
400 | const unsigned short); | 399 | const unsigned short, const unsigned short); |
401 | 400 | ||
402 | void svc_wake_up(struct svc_serv *); | 401 | void svc_wake_up(struct svc_serv *); |
403 | void svc_reserve(struct svc_rqst *rqstp, int space); | 402 | void svc_reserve(struct svc_rqst *rqstp, int space); |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index 0127daca4354..0d9cb6ef28b0 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
@@ -71,7 +71,8 @@ int svc_reg_xprt_class(struct svc_xprt_class *); | |||
71 | void svc_unreg_xprt_class(struct svc_xprt_class *); | 71 | void svc_unreg_xprt_class(struct svc_xprt_class *); |
72 | void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *, | 72 | void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *, |
73 | struct svc_serv *); | 73 | struct svc_serv *); |
74 | int svc_create_xprt(struct svc_serv *, char *, unsigned short, int); | 74 | int svc_create_xprt(struct svc_serv *, const char *, const int, |
75 | const unsigned short, int); | ||
75 | void svc_xprt_enqueue(struct svc_xprt *xprt); | 76 | void svc_xprt_enqueue(struct svc_xprt *xprt); |
76 | void svc_xprt_received(struct svc_xprt *); | 77 | void svc_xprt_received(struct svc_xprt *); |
77 | void svc_xprt_put(struct svc_xprt *xprt); | 78 | void svc_xprt_put(struct svc_xprt *xprt); |
@@ -80,7 +81,8 @@ void svc_close_xprt(struct svc_xprt *xprt); | |||
80 | void svc_delete_xprt(struct svc_xprt *xprt); | 81 | void svc_delete_xprt(struct svc_xprt *xprt); |
81 | int svc_port_is_privileged(struct sockaddr *sin); | 82 | int svc_port_is_privileged(struct sockaddr *sin); |
82 | int svc_print_xprts(char *buf, int maxlen); | 83 | int svc_print_xprts(char *buf, int maxlen); |
83 | struct svc_xprt *svc_find_xprt(struct svc_serv *, char *, int, int); | 84 | struct svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name, |
85 | const sa_family_t af, const unsigned short port); | ||
84 | int svc_xprt_names(struct svc_serv *serv, char *buf, int buflen); | 86 | int svc_xprt_names(struct svc_serv *serv, char *buf, int buflen); |
85 | 87 | ||
86 | static inline void svc_xprt_get(struct svc_xprt *xprt) | 88 | static inline void svc_xprt_get(struct svc_xprt *xprt) |
@@ -88,29 +90,32 @@ static inline void svc_xprt_get(struct svc_xprt *xprt) | |||
88 | kref_get(&xprt->xpt_ref); | 90 | kref_get(&xprt->xpt_ref); |
89 | } | 91 | } |
90 | static inline void svc_xprt_set_local(struct svc_xprt *xprt, | 92 | static inline void svc_xprt_set_local(struct svc_xprt *xprt, |
91 | struct sockaddr *sa, int salen) | 93 | const struct sockaddr *sa, |
94 | const size_t salen) | ||
92 | { | 95 | { |
93 | memcpy(&xprt->xpt_local, sa, salen); | 96 | memcpy(&xprt->xpt_local, sa, salen); |
94 | xprt->xpt_locallen = salen; | 97 | xprt->xpt_locallen = salen; |
95 | } | 98 | } |
96 | static inline void svc_xprt_set_remote(struct svc_xprt *xprt, | 99 | static inline void svc_xprt_set_remote(struct svc_xprt *xprt, |
97 | struct sockaddr *sa, int salen) | 100 | const struct sockaddr *sa, |
101 | const size_t salen) | ||
98 | { | 102 | { |
99 | memcpy(&xprt->xpt_remote, sa, salen); | 103 | memcpy(&xprt->xpt_remote, sa, salen); |
100 | xprt->xpt_remotelen = salen; | 104 | xprt->xpt_remotelen = salen; |
101 | } | 105 | } |
102 | static inline unsigned short svc_addr_port(struct sockaddr *sa) | 106 | static inline unsigned short svc_addr_port(const struct sockaddr *sa) |
103 | { | 107 | { |
104 | unsigned short ret = 0; | 108 | const struct sockaddr_in *sin = (const struct sockaddr_in *)sa; |
109 | const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sa; | ||
110 | |||
105 | switch (sa->sa_family) { | 111 | switch (sa->sa_family) { |
106 | case AF_INET: | 112 | case AF_INET: |
107 | ret = ntohs(((struct sockaddr_in *)sa)->sin_port); | 113 | return ntohs(sin->sin_port); |
108 | break; | ||
109 | case AF_INET6: | 114 | case AF_INET6: |
110 | ret = ntohs(((struct sockaddr_in6 *)sa)->sin6_port); | 115 | return ntohs(sin6->sin6_port); |
111 | break; | ||
112 | } | 116 | } |
113 | return ret; | 117 | |
118 | return 0; | ||
114 | } | 119 | } |
115 | 120 | ||
116 | static inline size_t svc_addr_len(struct sockaddr *sa) | 121 | static inline size_t svc_addr_len(struct sockaddr *sa) |
@@ -124,36 +129,39 @@ static inline size_t svc_addr_len(struct sockaddr *sa) | |||
124 | return -EAFNOSUPPORT; | 129 | return -EAFNOSUPPORT; |
125 | } | 130 | } |
126 | 131 | ||
127 | static inline unsigned short svc_xprt_local_port(struct svc_xprt *xprt) | 132 | static inline unsigned short svc_xprt_local_port(const struct svc_xprt *xprt) |
128 | { | 133 | { |
129 | return svc_addr_port((struct sockaddr *)&xprt->xpt_local); | 134 | return svc_addr_port((const struct sockaddr *)&xprt->xpt_local); |
130 | } | 135 | } |
131 | 136 | ||
132 | static inline unsigned short svc_xprt_remote_port(struct svc_xprt *xprt) | 137 | static inline unsigned short svc_xprt_remote_port(const struct svc_xprt *xprt) |
133 | { | 138 | { |
134 | return svc_addr_port((struct sockaddr *)&xprt->xpt_remote); | 139 | return svc_addr_port((const struct sockaddr *)&xprt->xpt_remote); |
135 | } | 140 | } |
136 | 141 | ||
137 | static inline char *__svc_print_addr(struct sockaddr *addr, | 142 | static inline char *__svc_print_addr(const struct sockaddr *addr, |
138 | char *buf, size_t len) | 143 | char *buf, const size_t len) |
139 | { | 144 | { |
145 | const struct sockaddr_in *sin = (const struct sockaddr_in *)addr; | ||
146 | const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)addr; | ||
147 | |||
140 | switch (addr->sa_family) { | 148 | switch (addr->sa_family) { |
141 | case AF_INET: | 149 | case AF_INET: |
142 | snprintf(buf, len, "%pI4, port=%u", | 150 | snprintf(buf, len, "%pI4, port=%u", &sin->sin_addr, |
143 | &((struct sockaddr_in *)addr)->sin_addr, | 151 | ntohs(sin->sin_port)); |
144 | ntohs(((struct sockaddr_in *) addr)->sin_port)); | ||
145 | break; | 152 | break; |
146 | 153 | ||
147 | case AF_INET6: | 154 | case AF_INET6: |
148 | snprintf(buf, len, "%pI6, port=%u", | 155 | snprintf(buf, len, "%pI6, port=%u", |
149 | &((struct sockaddr_in6 *)addr)->sin6_addr, | 156 | &sin6->sin6_addr, |
150 | ntohs(((struct sockaddr_in6 *) addr)->sin6_port)); | 157 | ntohs(sin6->sin6_port)); |
151 | break; | 158 | break; |
152 | 159 | ||
153 | default: | 160 | default: |
154 | snprintf(buf, len, "unknown address type: %d", addr->sa_family); | 161 | snprintf(buf, len, "unknown address type: %d", addr->sa_family); |
155 | break; | 162 | break; |
156 | } | 163 | } |
164 | |||
157 | return buf; | 165 | return buf; |
158 | } | 166 | } |
159 | #endif /* SUNRPC_SVC_XPRT_H */ | 167 | #endif /* SUNRPC_SVC_XPRT_H */ |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 11fc71d50c1e..1758d9f5b5c3 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -235,6 +235,7 @@ static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 * | |||
235 | */ | 235 | */ |
236 | int xprt_register_transport(struct xprt_class *type); | 236 | int xprt_register_transport(struct xprt_class *type); |
237 | int xprt_unregister_transport(struct xprt_class *type); | 237 | int xprt_unregister_transport(struct xprt_class *type); |
238 | int xprt_load_transport(const char *); | ||
238 | void xprt_set_retrans_timeout_def(struct rpc_task *task); | 239 | void xprt_set_retrans_timeout_def(struct rpc_task *task); |
239 | void xprt_set_retrans_timeout_rtt(struct rpc_task *task); | 240 | void xprt_set_retrans_timeout_rtt(struct rpc_task *task); |
240 | void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); | 241 | void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); |
@@ -259,6 +260,7 @@ void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); | |||
259 | #define XPRT_BOUND (4) | 260 | #define XPRT_BOUND (4) |
260 | #define XPRT_BINDING (5) | 261 | #define XPRT_BINDING (5) |
261 | #define XPRT_CLOSING (6) | 262 | #define XPRT_CLOSING (6) |
263 | #define XPRT_CONNECTION_ABORT (7) | ||
262 | 264 | ||
263 | static inline void xprt_set_connected(struct rpc_xprt *xprt) | 265 | static inline void xprt_set_connected(struct rpc_xprt *xprt) |
264 | { | 266 | { |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index c7d9bb1832ba..3e3a4364cbff 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef _LINUX_SUSPEND_H | 1 | #ifndef _LINUX_SUSPEND_H |
2 | #define _LINUX_SUSPEND_H | 2 | #define _LINUX_SUSPEND_H |
3 | 3 | ||
4 | #if defined(CONFIG_X86) || defined(CONFIG_FRV) || defined(CONFIG_PPC32) || defined(CONFIG_PPC64) | ||
5 | #include <asm/suspend.h> | ||
6 | #endif | ||
7 | #include <linux/swap.h> | 4 | #include <linux/swap.h> |
8 | #include <linux/notifier.h> | 5 | #include <linux/notifier.h> |
9 | #include <linux/init.h> | 6 | #include <linux/init.h> |
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/swap.h b/include/linux/swap.h index d30215578877..62d81435347a 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -212,7 +212,7 @@ static inline void lru_cache_add_active_file(struct page *page) | |||
212 | 212 | ||
213 | /* linux/mm/vmscan.c */ | 213 | /* linux/mm/vmscan.c */ |
214 | extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, | 214 | extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, |
215 | gfp_t gfp_mask); | 215 | gfp_t gfp_mask, nodemask_t *mask); |
216 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, | 216 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, |
217 | gfp_t gfp_mask, bool noswap, | 217 | gfp_t gfp_mask, bool noswap, |
218 | unsigned int swappiness); | 218 | unsigned int swappiness); |
@@ -382,6 +382,11 @@ static inline struct page *swapin_readahead(swp_entry_t swp, gfp_t gfp_mask, | |||
382 | return NULL; | 382 | return NULL; |
383 | } | 383 | } |
384 | 384 | ||
385 | static inline int swap_writepage(struct page *p, struct writeback_control *wbc) | ||
386 | { | ||
387 | return 0; | ||
388 | } | ||
389 | |||
385 | static inline struct page *lookup_swap_cache(swp_entry_t swp) | 390 | static inline struct page *lookup_swap_cache(swp_entry_t swp) |
386 | { | 391 | { |
387 | return NULL; | 392 | return NULL; |
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index dedd3c0cfe30..ac9ff54f7cb3 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h | |||
@@ -31,7 +31,7 @@ extern dma_addr_t swiotlb_phys_to_bus(struct device *hwdev, | |||
31 | phys_addr_t address); | 31 | phys_addr_t address); |
32 | extern phys_addr_t swiotlb_bus_to_phys(dma_addr_t address); | 32 | extern phys_addr_t swiotlb_bus_to_phys(dma_addr_t address); |
33 | 33 | ||
34 | extern int swiotlb_arch_range_needs_mapping(void *ptr, size_t size); | 34 | extern int swiotlb_arch_range_needs_mapping(phys_addr_t paddr, size_t size); |
35 | 35 | ||
36 | extern void | 36 | extern void |
37 | *swiotlb_alloc_coherent(struct device *hwdev, size_t size, | 37 | *swiotlb_alloc_coherent(struct device *hwdev, size_t size, |
@@ -41,20 +41,13 @@ extern void | |||
41 | swiotlb_free_coherent(struct device *hwdev, size_t size, | 41 | swiotlb_free_coherent(struct device *hwdev, size_t size, |
42 | void *vaddr, dma_addr_t dma_handle); | 42 | void *vaddr, dma_addr_t dma_handle); |
43 | 43 | ||
44 | extern dma_addr_t | 44 | extern dma_addr_t swiotlb_map_page(struct device *dev, struct page *page, |
45 | swiotlb_map_single(struct device *hwdev, void *ptr, size_t size, int dir); | 45 | unsigned long offset, size_t size, |
46 | 46 | enum dma_data_direction dir, | |
47 | extern void | 47 | struct dma_attrs *attrs); |
48 | swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr, | 48 | extern void swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, |
49 | size_t size, int dir); | 49 | size_t size, enum dma_data_direction dir, |
50 | 50 | struct dma_attrs *attrs); | |
51 | extern dma_addr_t | ||
52 | swiotlb_map_single_attrs(struct device *hwdev, void *ptr, size_t size, | ||
53 | int dir, struct dma_attrs *attrs); | ||
54 | |||
55 | extern void | ||
56 | swiotlb_unmap_single_attrs(struct device *hwdev, dma_addr_t dev_addr, | ||
57 | size_t size, int dir, struct dma_attrs *attrs); | ||
58 | 51 | ||
59 | extern int | 52 | extern int |
60 | swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, | 53 | swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, |
@@ -66,36 +59,38 @@ swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents, | |||
66 | 59 | ||
67 | extern int | 60 | extern int |
68 | swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems, | 61 | swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems, |
69 | int dir, struct dma_attrs *attrs); | 62 | enum dma_data_direction dir, struct dma_attrs *attrs); |
70 | 63 | ||
71 | extern void | 64 | extern void |
72 | swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl, | 65 | swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl, |
73 | int nelems, int dir, struct dma_attrs *attrs); | 66 | int nelems, enum dma_data_direction dir, |
67 | struct dma_attrs *attrs); | ||
74 | 68 | ||
75 | extern void | 69 | extern void |
76 | swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr, | 70 | swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr, |
77 | size_t size, int dir); | 71 | size_t size, enum dma_data_direction dir); |
78 | 72 | ||
79 | extern void | 73 | extern void |
80 | swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, | 74 | swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, |
81 | int nelems, int dir); | 75 | int nelems, enum dma_data_direction dir); |
82 | 76 | ||
83 | extern void | 77 | extern void |
84 | swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr, | 78 | swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr, |
85 | size_t size, int dir); | 79 | size_t size, enum dma_data_direction dir); |
86 | 80 | ||
87 | extern void | 81 | extern void |
88 | swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, | 82 | swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, |
89 | int nelems, int dir); | 83 | int nelems, enum dma_data_direction dir); |
90 | 84 | ||
91 | extern void | 85 | extern void |
92 | swiotlb_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dev_addr, | 86 | swiotlb_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dev_addr, |
93 | unsigned long offset, size_t size, int dir); | 87 | unsigned long offset, size_t size, |
88 | enum dma_data_direction dir); | ||
94 | 89 | ||
95 | extern void | 90 | extern void |
96 | swiotlb_sync_single_range_for_device(struct device *hwdev, dma_addr_t dev_addr, | 91 | swiotlb_sync_single_range_for_device(struct device *hwdev, dma_addr_t dev_addr, |
97 | unsigned long offset, size_t size, | 92 | unsigned long offset, size_t size, |
98 | int dir); | 93 | enum dma_data_direction dir); |
99 | 94 | ||
100 | extern int | 95 | extern int |
101 | swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr); | 96 | swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr); |
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/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 51774eb87cc6..6cdb6f3331f1 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -161,8 +161,8 @@ static inline int timer_pending(const struct timer_list * timer) | |||
161 | 161 | ||
162 | extern void add_timer_on(struct timer_list *timer, int cpu); | 162 | extern void add_timer_on(struct timer_list *timer, int cpu); |
163 | extern int del_timer(struct timer_list * timer); | 163 | extern int del_timer(struct timer_list * timer); |
164 | extern int __mod_timer(struct timer_list *timer, unsigned long expires); | ||
165 | extern int mod_timer(struct timer_list *timer, unsigned long expires); | 164 | extern int mod_timer(struct timer_list *timer, unsigned long expires); |
165 | extern int mod_timer_pending(struct timer_list *timer, unsigned long expires); | ||
166 | 166 | ||
167 | /* | 167 | /* |
168 | * The jiffies value which is added to now, when there is no timer | 168 | * The jiffies value which is added to now, when there is no timer |
@@ -221,25 +221,7 @@ static inline void timer_stats_timer_clear_start_info(struct timer_list *timer) | |||
221 | } | 221 | } |
222 | #endif | 222 | #endif |
223 | 223 | ||
224 | /** | 224 | extern void add_timer(struct timer_list *timer); |
225 | * add_timer - start a timer | ||
226 | * @timer: the timer to be added | ||
227 | * | ||
228 | * The kernel will do a ->function(->data) callback from the | ||
229 | * timer interrupt at the ->expires point in the future. The | ||
230 | * current time is 'jiffies'. | ||
231 | * | ||
232 | * The timer's ->expires, ->function (and if the handler uses it, ->data) | ||
233 | * fields must be set prior calling this function. | ||
234 | * | ||
235 | * Timers with an ->expires field in the past will be executed in the next | ||
236 | * timer tick. | ||
237 | */ | ||
238 | static inline void add_timer(struct timer_list *timer) | ||
239 | { | ||
240 | BUG_ON(timer_pending(timer)); | ||
241 | __mod_timer(timer, timer->expires); | ||
242 | } | ||
243 | 225 | ||
244 | #ifdef CONFIG_SMP | 226 | #ifdef CONFIG_SMP |
245 | extern int try_to_del_timer_sync(struct timer_list *timer); | 227 | extern int try_to_del_timer_sync(struct timer_list *timer); |
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/tty_driver.h b/include/linux/tty_driver.h index 08e088334dba..8615d661ab60 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -252,8 +252,6 @@ struct tty_operations { | |||
252 | void (*set_ldisc)(struct tty_struct *tty); | 252 | void (*set_ldisc)(struct tty_struct *tty); |
253 | void (*wait_until_sent)(struct tty_struct *tty, int timeout); | 253 | void (*wait_until_sent)(struct tty_struct *tty, int timeout); |
254 | void (*send_xchar)(struct tty_struct *tty, char ch); | 254 | void (*send_xchar)(struct tty_struct *tty, char ch); |
255 | int (*read_proc)(char *page, char **start, off_t off, | ||
256 | int count, int *eof, void *data); | ||
257 | int (*tiocmget)(struct tty_struct *tty, struct file *file); | 255 | int (*tiocmget)(struct tty_struct *tty, struct file *file); |
258 | int (*tiocmset)(struct tty_struct *tty, struct file *file, | 256 | int (*tiocmset)(struct tty_struct *tty, struct file *file, |
259 | unsigned int set, unsigned int clear); | 257 | unsigned int set, unsigned int clear); |
@@ -264,6 +262,7 @@ struct tty_operations { | |||
264 | int (*poll_get_char)(struct tty_driver *driver, int line); | 262 | int (*poll_get_char)(struct tty_driver *driver, int line); |
265 | void (*poll_put_char)(struct tty_driver *driver, int line, char ch); | 263 | void (*poll_put_char)(struct tty_driver *driver, int line, char ch); |
266 | #endif | 264 | #endif |
265 | const struct file_operations *proc_fops; | ||
267 | }; | 266 | }; |
268 | 267 | ||
269 | struct tty_driver { | 268 | struct tty_driver { |
diff --git a/include/linux/types.h b/include/linux/types.h index fca82ed55f49..5abe354020f9 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/posix_types.h> | 14 | #include <linux/posix_types.h> |
15 | 15 | ||
16 | #ifndef __KERNEL_STRICT_NAMES | 16 | #ifdef __KERNEL__ |
17 | 17 | ||
18 | typedef __u32 __kernel_dev_t; | 18 | typedef __u32 __kernel_dev_t; |
19 | 19 | ||
@@ -31,7 +31,6 @@ typedef __kernel_timer_t timer_t; | |||
31 | typedef __kernel_clockid_t clockid_t; | 31 | typedef __kernel_clockid_t clockid_t; |
32 | typedef __kernel_mqd_t mqd_t; | 32 | typedef __kernel_mqd_t mqd_t; |
33 | 33 | ||
34 | #ifdef __KERNEL__ | ||
35 | typedef _Bool bool; | 34 | typedef _Bool bool; |
36 | 35 | ||
37 | typedef __kernel_uid32_t uid_t; | 36 | typedef __kernel_uid32_t uid_t; |
@@ -47,14 +46,6 @@ typedef __kernel_old_uid_t old_uid_t; | |||
47 | typedef __kernel_old_gid_t old_gid_t; | 46 | typedef __kernel_old_gid_t old_gid_t; |
48 | #endif /* CONFIG_UID16 */ | 47 | #endif /* CONFIG_UID16 */ |
49 | 48 | ||
50 | /* libc5 includes this file to define uid_t, thus uid_t can never change | ||
51 | * when it is included by non-kernel code | ||
52 | */ | ||
53 | #else | ||
54 | typedef __kernel_uid_t uid_t; | ||
55 | typedef __kernel_gid_t gid_t; | ||
56 | #endif /* __KERNEL__ */ | ||
57 | |||
58 | #if defined(__GNUC__) | 49 | #if defined(__GNUC__) |
59 | typedef __kernel_loff_t loff_t; | 50 | typedef __kernel_loff_t loff_t; |
60 | #endif | 51 | #endif |
@@ -156,7 +147,7 @@ typedef unsigned long blkcnt_t; | |||
156 | #define pgoff_t unsigned long | 147 | #define pgoff_t unsigned long |
157 | #endif | 148 | #endif |
158 | 149 | ||
159 | #endif /* __KERNEL_STRICT_NAMES */ | 150 | #endif /* __KERNEL__ */ |
160 | 151 | ||
161 | /* | 152 | /* |
162 | * Below are truly Linux-specific types that should never collide with | 153 | * Below are truly Linux-specific types that should never collide with |
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 88079fd60235..c6b2ab41b908 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -643,186 +643,6 @@ static inline int usb_make_path(struct usb_device *dev, char *buf, size_t size) | |||
643 | 643 | ||
644 | /*-------------------------------------------------------------------------*/ | 644 | /*-------------------------------------------------------------------------*/ |
645 | 645 | ||
646 | /** | ||
647 | * usb_endpoint_num - get the endpoint's number | ||
648 | * @epd: endpoint to be checked | ||
649 | * | ||
650 | * Returns @epd's number: 0 to 15. | ||
651 | */ | ||
652 | static inline int usb_endpoint_num(const struct usb_endpoint_descriptor *epd) | ||
653 | { | ||
654 | return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; | ||
655 | } | ||
656 | |||
657 | /** | ||
658 | * usb_endpoint_type - get the endpoint's transfer type | ||
659 | * @epd: endpoint to be checked | ||
660 | * | ||
661 | * Returns one of USB_ENDPOINT_XFER_{CONTROL, ISOC, BULK, INT} according | ||
662 | * to @epd's transfer type. | ||
663 | */ | ||
664 | static inline int usb_endpoint_type(const struct usb_endpoint_descriptor *epd) | ||
665 | { | ||
666 | return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; | ||
667 | } | ||
668 | |||
669 | /** | ||
670 | * usb_endpoint_dir_in - check if the endpoint has IN direction | ||
671 | * @epd: endpoint to be checked | ||
672 | * | ||
673 | * Returns true if the endpoint is of type IN, otherwise it returns false. | ||
674 | */ | ||
675 | static inline int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) | ||
676 | { | ||
677 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN); | ||
678 | } | ||
679 | |||
680 | /** | ||
681 | * usb_endpoint_dir_out - check if the endpoint has OUT direction | ||
682 | * @epd: endpoint to be checked | ||
683 | * | ||
684 | * Returns true if the endpoint is of type OUT, otherwise it returns false. | ||
685 | */ | ||
686 | static inline int usb_endpoint_dir_out( | ||
687 | const struct usb_endpoint_descriptor *epd) | ||
688 | { | ||
689 | return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT); | ||
690 | } | ||
691 | |||
692 | /** | ||
693 | * usb_endpoint_xfer_bulk - check if the endpoint has bulk transfer type | ||
694 | * @epd: endpoint to be checked | ||
695 | * | ||
696 | * Returns true if the endpoint is of type bulk, otherwise it returns false. | ||
697 | */ | ||
698 | static inline int usb_endpoint_xfer_bulk( | ||
699 | const struct usb_endpoint_descriptor *epd) | ||
700 | { | ||
701 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
702 | USB_ENDPOINT_XFER_BULK); | ||
703 | } | ||
704 | |||
705 | /** | ||
706 | * usb_endpoint_xfer_control - check if the endpoint has control transfer type | ||
707 | * @epd: endpoint to be checked | ||
708 | * | ||
709 | * Returns true if the endpoint is of type control, otherwise it returns false. | ||
710 | */ | ||
711 | static inline int usb_endpoint_xfer_control( | ||
712 | const struct usb_endpoint_descriptor *epd) | ||
713 | { | ||
714 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
715 | USB_ENDPOINT_XFER_CONTROL); | ||
716 | } | ||
717 | |||
718 | /** | ||
719 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type | ||
720 | * @epd: endpoint to be checked | ||
721 | * | ||
722 | * Returns true if the endpoint is of type interrupt, otherwise it returns | ||
723 | * false. | ||
724 | */ | ||
725 | static inline int usb_endpoint_xfer_int( | ||
726 | const struct usb_endpoint_descriptor *epd) | ||
727 | { | ||
728 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
729 | USB_ENDPOINT_XFER_INT); | ||
730 | } | ||
731 | |||
732 | /** | ||
733 | * usb_endpoint_xfer_isoc - check if the endpoint has isochronous transfer type | ||
734 | * @epd: endpoint to be checked | ||
735 | * | ||
736 | * Returns true if the endpoint is of type isochronous, otherwise it returns | ||
737 | * false. | ||
738 | */ | ||
739 | static inline int usb_endpoint_xfer_isoc( | ||
740 | const struct usb_endpoint_descriptor *epd) | ||
741 | { | ||
742 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
743 | USB_ENDPOINT_XFER_ISOC); | ||
744 | } | ||
745 | |||
746 | /** | ||
747 | * usb_endpoint_is_bulk_in - check if the endpoint is bulk IN | ||
748 | * @epd: endpoint to be checked | ||
749 | * | ||
750 | * Returns true if the endpoint has bulk transfer type and IN direction, | ||
751 | * otherwise it returns false. | ||
752 | */ | ||
753 | static inline int usb_endpoint_is_bulk_in( | ||
754 | const struct usb_endpoint_descriptor *epd) | ||
755 | { | ||
756 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd)); | ||
757 | } | ||
758 | |||
759 | /** | ||
760 | * usb_endpoint_is_bulk_out - check if the endpoint is bulk OUT | ||
761 | * @epd: endpoint to be checked | ||
762 | * | ||
763 | * Returns true if the endpoint has bulk transfer type and OUT direction, | ||
764 | * otherwise it returns false. | ||
765 | */ | ||
766 | static inline int usb_endpoint_is_bulk_out( | ||
767 | const struct usb_endpoint_descriptor *epd) | ||
768 | { | ||
769 | return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd)); | ||
770 | } | ||
771 | |||
772 | /** | ||
773 | * usb_endpoint_is_int_in - check if the endpoint is interrupt IN | ||
774 | * @epd: endpoint to be checked | ||
775 | * | ||
776 | * Returns true if the endpoint has interrupt transfer type and IN direction, | ||
777 | * otherwise it returns false. | ||
778 | */ | ||
779 | static inline int usb_endpoint_is_int_in( | ||
780 | const struct usb_endpoint_descriptor *epd) | ||
781 | { | ||
782 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd)); | ||
783 | } | ||
784 | |||
785 | /** | ||
786 | * usb_endpoint_is_int_out - check if the endpoint is interrupt OUT | ||
787 | * @epd: endpoint to be checked | ||
788 | * | ||
789 | * Returns true if the endpoint has interrupt transfer type and OUT direction, | ||
790 | * otherwise it returns false. | ||
791 | */ | ||
792 | static inline int usb_endpoint_is_int_out( | ||
793 | const struct usb_endpoint_descriptor *epd) | ||
794 | { | ||
795 | return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd)); | ||
796 | } | ||
797 | |||
798 | /** | ||
799 | * usb_endpoint_is_isoc_in - check if the endpoint is isochronous IN | ||
800 | * @epd: endpoint to be checked | ||
801 | * | ||
802 | * Returns true if the endpoint has isochronous transfer type and IN direction, | ||
803 | * otherwise it returns false. | ||
804 | */ | ||
805 | static inline int usb_endpoint_is_isoc_in( | ||
806 | const struct usb_endpoint_descriptor *epd) | ||
807 | { | ||
808 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd)); | ||
809 | } | ||
810 | |||
811 | /** | ||
812 | * usb_endpoint_is_isoc_out - check if the endpoint is isochronous OUT | ||
813 | * @epd: endpoint to be checked | ||
814 | * | ||
815 | * Returns true if the endpoint has isochronous transfer type and OUT direction, | ||
816 | * otherwise it returns false. | ||
817 | */ | ||
818 | static inline int usb_endpoint_is_isoc_out( | ||
819 | const struct usb_endpoint_descriptor *epd) | ||
820 | { | ||
821 | return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd)); | ||
822 | } | ||
823 | |||
824 | /*-------------------------------------------------------------------------*/ | ||
825 | |||
826 | #define USB_DEVICE_ID_MATCH_DEVICE \ | 646 | #define USB_DEVICE_ID_MATCH_DEVICE \ |
827 | (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT) | 647 | (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT) |
828 | #define USB_DEVICE_ID_MATCH_DEV_RANGE \ | 648 | #define USB_DEVICE_ID_MATCH_DEV_RANGE \ |
@@ -1357,8 +1177,8 @@ struct urb { | |||
1357 | unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/ | 1177 | unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/ |
1358 | void *transfer_buffer; /* (in) associated data buffer */ | 1178 | void *transfer_buffer; /* (in) associated data buffer */ |
1359 | dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */ | 1179 | dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */ |
1360 | int transfer_buffer_length; /* (in) data buffer length */ | 1180 | u32 transfer_buffer_length; /* (in) data buffer length */ |
1361 | int actual_length; /* (return) actual transfer length */ | 1181 | u32 actual_length; /* (return) actual transfer length */ |
1362 | unsigned char *setup_packet; /* (in) setup packet (control only) */ | 1182 | unsigned char *setup_packet; /* (in) setup packet (control only) */ |
1363 | dma_addr_t setup_dma; /* (in) dma addr for setup_packet */ | 1183 | dma_addr_t setup_dma; /* (in) dma addr for setup_packet */ |
1364 | int start_frame; /* (modify) start frame (ISO) */ | 1184 | int start_frame; /* (modify) start frame (ISO) */ |
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/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 7d3822243074..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); |
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/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 deleted file mode 100644 index e26c0c86a6ea..000000000000 --- a/include/linux/video_decoder.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | #ifndef _LINUX_VIDEO_DECODER_H | ||
2 | #define _LINUX_VIDEO_DECODER_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | #define HAVE_VIDEO_DECODER 1 | ||
7 | |||
8 | struct video_decoder_capability { /* this name is too long */ | ||
9 | __u32 flags; | ||
10 | #define VIDEO_DECODER_PAL 1 /* can decode PAL signal */ | ||
11 | #define VIDEO_DECODER_NTSC 2 /* can decode NTSC */ | ||
12 | #define VIDEO_DECODER_SECAM 4 /* can decode SECAM */ | ||
13 | #define VIDEO_DECODER_AUTO 8 /* can autosense norm */ | ||
14 | #define VIDEO_DECODER_CCIR 16 /* CCIR-601 pixel rate (720 pixels per line) instead of square pixel rate */ | ||
15 | int inputs; /* number of inputs */ | ||
16 | int outputs; /* number of outputs */ | ||
17 | }; | ||
18 | |||
19 | /* | ||
20 | DECODER_GET_STATUS returns the following flags. The only one you need is | ||
21 | DECODER_STATUS_GOOD, the others are just nice things to know. | ||
22 | */ | ||
23 | #define DECODER_STATUS_GOOD 1 /* receiving acceptable input */ | ||
24 | #define DECODER_STATUS_COLOR 2 /* receiving color information */ | ||
25 | #define DECODER_STATUS_PAL 4 /* auto detected */ | ||
26 | #define DECODER_STATUS_NTSC 8 /* auto detected */ | ||
27 | #define DECODER_STATUS_SECAM 16 /* auto detected */ | ||
28 | |||
29 | struct video_decoder_init { | ||
30 | unsigned char len; | ||
31 | const unsigned char *data; | ||
32 | }; | ||
33 | |||
34 | #define DECODER_GET_CAPABILITIES _IOR('d', 1, struct video_decoder_capability) | ||
35 | #define DECODER_GET_STATUS _IOR('d', 2, int) | ||
36 | #define DECODER_SET_NORM _IOW('d', 3, int) | ||
37 | #define DECODER_SET_INPUT _IOW('d', 4, int) /* 0 <= input < #inputs */ | ||
38 | #define DECODER_SET_OUTPUT _IOW('d', 5, int) /* 0 <= output < #outputs */ | ||
39 | #define DECODER_ENABLE_OUTPUT _IOW('d', 6, int) /* boolean output enable control */ | ||
40 | #define DECODER_SET_PICTURE _IOW('d', 7, struct video_picture) | ||
41 | #define DECODER_SET_GPIO _IOW('d', 8, int) /* switch general purpose pin */ | ||
42 | #define DECODER_INIT _IOW('d', 9, struct video_decoder_init) /* init internal registers at once */ | ||
43 | #define DECODER_SET_VBI_BYPASS _IOW('d', 10, int) /* switch vbi bypass */ | ||
44 | |||
45 | #define DECODER_DUMP _IO('d', 192) /* debug hook */ | ||
46 | |||
47 | |||
48 | #endif | ||
diff --git a/include/linux/video_encoder.h b/include/linux/video_encoder.h deleted file mode 100644 index b7b6423bbb8a..000000000000 --- a/include/linux/video_encoder.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #ifndef _LINUX_VIDEO_ENCODER_H | ||
2 | #define _LINUX_VIDEO_ENCODER_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct video_encoder_capability { /* this name is too long */ | ||
7 | __u32 flags; | ||
8 | #define VIDEO_ENCODER_PAL 1 /* can encode PAL signal */ | ||
9 | #define VIDEO_ENCODER_NTSC 2 /* can encode NTSC */ | ||
10 | #define VIDEO_ENCODER_SECAM 4 /* can encode SECAM */ | ||
11 | #define VIDEO_ENCODER_CCIR 16 /* CCIR-601 pixel rate (720 pixels per line) instead of square pixel rate */ | ||
12 | int inputs; /* number of inputs */ | ||
13 | int outputs; /* number of outputs */ | ||
14 | }; | ||
15 | |||
16 | #define ENCODER_GET_CAPABILITIES _IOR('e', 1, struct video_encoder_capability) | ||
17 | #define ENCODER_SET_NORM _IOW('e', 2, int) | ||
18 | #define ENCODER_SET_INPUT _IOW('e', 3, int) /* 0 <= input < #inputs */ | ||
19 | #define ENCODER_SET_OUTPUT _IOW('e', 4, int) /* 0 <= output < #outputs */ | ||
20 | #define ENCODER_ENABLE_OUTPUT _IOW('e', 5, int) /* boolean output enable control */ | ||
21 | |||
22 | |||
23 | #endif | ||
diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 837f392fbe97..b19eab140977 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h | |||
@@ -16,6 +16,23 @@ | |||
16 | #include <linux/ioctl.h> | 16 | #include <linux/ioctl.h> |
17 | #include <linux/videodev2.h> | 17 | #include <linux/videodev2.h> |
18 | 18 | ||
19 | #if defined(__MIN_V4L1) && defined (__KERNEL__) | ||
20 | |||
21 | /* | ||
22 | * Used by those V4L2 core functions that need a minimum V4L1 support, | ||
23 | * in order to allow V4L1 Compatibilty code compilation. | ||
24 | */ | ||
25 | |||
26 | struct video_mbuf | ||
27 | { | ||
28 | int size; /* Total memory to map */ | ||
29 | int frames; /* Frames */ | ||
30 | int offsets[VIDEO_MAX_FRAME]; | ||
31 | }; | ||
32 | |||
33 | #define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */ | ||
34 | |||
35 | #else | ||
19 | #if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) | 36 | #if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) |
20 | 37 | ||
21 | #define VID_TYPE_CAPTURE 1 /* Can capture */ | 38 | #define VID_TYPE_CAPTURE 1 /* Can capture */ |
@@ -312,6 +329,7 @@ struct video_code | |||
312 | #define VID_PLAY_END_MARK 14 | 329 | #define VID_PLAY_END_MARK 14 |
313 | 330 | ||
314 | #endif /* CONFIG_VIDEO_V4L1_COMPAT */ | 331 | #endif /* CONFIG_VIDEO_V4L1_COMPAT */ |
332 | #endif /* __MIN_V4L1 */ | ||
315 | 333 | ||
316 | #endif /* __LINUX_VIDEODEV_H */ | 334 | #endif /* __LINUX_VIDEODEV_H */ |
317 | 335 | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 5571dbe1c0ad..139d234923cd 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -344,6 +344,8 @@ struct v4l2_pix_format { | |||
344 | #define V4L2_PIX_FMT_SPCA508 v4l2_fourcc('S', '5', '0', '8') /* YUVY per line */ | 344 | #define V4L2_PIX_FMT_SPCA508 v4l2_fourcc('S', '5', '0', '8') /* YUVY per line */ |
345 | #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ | 345 | #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ |
346 | #define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ | 346 | #define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ |
347 | #define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ | ||
348 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ | ||
347 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ | 349 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ |
348 | #define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ | 350 | #define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ |
349 | 351 | ||
@@ -829,6 +831,7 @@ struct v4l2_querymenu { | |||
829 | #define V4L2_CTRL_FLAG_UPDATE 0x0008 | 831 | #define V4L2_CTRL_FLAG_UPDATE 0x0008 |
830 | #define V4L2_CTRL_FLAG_INACTIVE 0x0010 | 832 | #define V4L2_CTRL_FLAG_INACTIVE 0x0010 |
831 | #define V4L2_CTRL_FLAG_SLIDER 0x0020 | 833 | #define V4L2_CTRL_FLAG_SLIDER 0x0020 |
834 | #define V4L2_CTRL_FLAG_WRITE_ONLY 0x0040 | ||
832 | 835 | ||
833 | /* Query flag, to be ORed with the control ID */ | 836 | /* Query flag, to be ORed with the control ID */ |
834 | #define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000 | 837 | #define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000 |
@@ -879,8 +882,15 @@ enum v4l2_power_line_frequency { | |||
879 | #define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28) | 882 | #define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28) |
880 | #define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29) | 883 | #define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29) |
881 | #define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30) | 884 | #define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30) |
885 | #define V4L2_CID_COLORFX (V4L2_CID_BASE+31) | ||
886 | enum v4l2_colorfx { | ||
887 | V4L2_COLORFX_NONE = 0, | ||
888 | V4L2_COLORFX_BW = 1, | ||
889 | V4L2_COLORFX_SEPIA = 2, | ||
890 | }; | ||
891 | |||
882 | /* last CID + 1 */ | 892 | /* last CID + 1 */ |
883 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+31) | 893 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+32) |
884 | 894 | ||
885 | /* MPEG-class control IDs defined by V4L2 */ | 895 | /* MPEG-class control IDs defined by V4L2 */ |
886 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 896 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |
@@ -1339,6 +1349,53 @@ struct v4l2_sliced_vbi_data { | |||
1339 | }; | 1349 | }; |
1340 | 1350 | ||
1341 | /* | 1351 | /* |
1352 | * Sliced VBI data inserted into MPEG Streams | ||
1353 | */ | ||
1354 | |||
1355 | /* | ||
1356 | * V4L2_MPEG_STREAM_VBI_FMT_IVTV: | ||
1357 | * | ||
1358 | * Structure of payload contained in an MPEG 2 Private Stream 1 PES Packet in an | ||
1359 | * MPEG-2 Program Pack that contains V4L2_MPEG_STREAM_VBI_FMT_IVTV Sliced VBI | ||
1360 | * data | ||
1361 | * | ||
1362 | * Note, the MPEG-2 Program Pack and Private Stream 1 PES packet header | ||
1363 | * definitions are not included here. See the MPEG-2 specifications for details | ||
1364 | * on these headers. | ||
1365 | */ | ||
1366 | |||
1367 | /* Line type IDs */ | ||
1368 | #define V4L2_MPEG_VBI_IVTV_TELETEXT_B (1) | ||
1369 | #define V4L2_MPEG_VBI_IVTV_CAPTION_525 (4) | ||
1370 | #define V4L2_MPEG_VBI_IVTV_WSS_625 (5) | ||
1371 | #define V4L2_MPEG_VBI_IVTV_VPS (7) | ||
1372 | |||
1373 | struct v4l2_mpeg_vbi_itv0_line { | ||
1374 | __u8 id; /* One of V4L2_MPEG_VBI_IVTV_* above */ | ||
1375 | __u8 data[42]; /* Sliced VBI data for the line */ | ||
1376 | } __attribute__ ((packed)); | ||
1377 | |||
1378 | struct v4l2_mpeg_vbi_itv0 { | ||
1379 | __le32 linemask[2]; /* Bitmasks of VBI service lines present */ | ||
1380 | struct v4l2_mpeg_vbi_itv0_line line[35]; | ||
1381 | } __attribute__ ((packed)); | ||
1382 | |||
1383 | struct v4l2_mpeg_vbi_ITV0 { | ||
1384 | struct v4l2_mpeg_vbi_itv0_line line[36]; | ||
1385 | } __attribute__ ((packed)); | ||
1386 | |||
1387 | #define V4L2_MPEG_VBI_IVTV_MAGIC0 "itv0" | ||
1388 | #define V4L2_MPEG_VBI_IVTV_MAGIC1 "ITV0" | ||
1389 | |||
1390 | struct v4l2_mpeg_vbi_fmt_ivtv { | ||
1391 | __u8 magic[4]; | ||
1392 | union { | ||
1393 | struct v4l2_mpeg_vbi_itv0 itv0; | ||
1394 | struct v4l2_mpeg_vbi_ITV0 ITV0; | ||
1395 | }; | ||
1396 | } __attribute__ ((packed)); | ||
1397 | |||
1398 | /* | ||
1342 | * A G G R E G A T E S T R U C T U R E S | 1399 | * A G G R E G A T E S T R U C T U R E S |
1343 | */ | 1400 | */ |
1344 | 1401 | ||
@@ -1403,14 +1460,6 @@ struct v4l2_dbg_chip_ident { | |||
1403 | __u32 revision; /* chip revision, chip specific */ | 1460 | __u32 revision; /* chip revision, chip specific */ |
1404 | } __attribute__ ((packed)); | 1461 | } __attribute__ ((packed)); |
1405 | 1462 | ||
1406 | /* VIDIOC_G_CHIP_IDENT_OLD: Deprecated, do not use */ | ||
1407 | struct v4l2_chip_ident_old { | ||
1408 | __u32 match_type; /* Match type */ | ||
1409 | __u32 match_chip; /* Match this chip, meaning determined by match_type */ | ||
1410 | __u32 ident; /* chip identifier as specified in <media/v4l2-chip-ident.h> */ | ||
1411 | __u32 revision; /* chip revision, chip specific */ | ||
1412 | }; | ||
1413 | |||
1414 | /* | 1463 | /* |
1415 | * I O C T L C O D E S F O R V I D E O D E V I C E S | 1464 | * I O C T L C O D E S F O R V I D E O D E V I C E S |
1416 | * | 1465 | * |
@@ -1488,8 +1537,6 @@ struct v4l2_chip_ident_old { | |||
1488 | /* Experimental, meant for debugging, testing and internal use. | 1537 | /* Experimental, meant for debugging, testing and internal use. |
1489 | Never use this ioctl in applications! */ | 1538 | Never use this ioctl in applications! */ |
1490 | #define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident) | 1539 | #define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident) |
1491 | /* This is deprecated and will go away in 2.6.30 */ | ||
1492 | #define VIDIOC_G_CHIP_IDENT_OLD _IOWR('V', 81, struct v4l2_chip_ident_old) | ||
1493 | #endif | 1540 | #endif |
1494 | 1541 | ||
1495 | #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) | 1542 | #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 3efa86c3ecb3..242348bb3766 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -22,11 +22,19 @@ | |||
22 | #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. */ |
23 | #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. */ |
24 | #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 */ | ||
25 | 31 | ||
26 | struct virtio_net_config | 32 | struct virtio_net_config |
27 | { | 33 | { |
28 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ | 34 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ |
29 | __u8 mac[6]; | 35 | __u8 mac[6]; |
36 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ | ||
37 | __u16 status; | ||
30 | } __attribute__((packed)); | 38 | } __attribute__((packed)); |
31 | 39 | ||
32 | /* 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 |
@@ -54,4 +62,67 @@ struct virtio_net_hdr_mrg_rxbuf { | |||
54 | __u16 num_buffers; /* Number of merged rx buffers */ | 62 | __u16 num_buffers; /* Number of merged rx buffers */ |
55 | }; | 63 | }; |
56 | 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 | |||
57 | #endif /* _LINUX_VIRTIO_NET_H */ | 128 | #endif /* _LINUX_VIRTIO_NET_H */ |
diff --git a/include/linux/wait.h b/include/linux/wait.h index a210ede73b56..5d631c17eaee 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -135,8 +135,11 @@ static inline void __remove_wait_queue(wait_queue_head_t *head, | |||
135 | void __wake_up_common(wait_queue_head_t *q, unsigned int mode, | 135 | void __wake_up_common(wait_queue_head_t *q, unsigned int mode, |
136 | int nr_exclusive, int sync, void *key); | 136 | int nr_exclusive, int sync, void *key); |
137 | 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); |
138 | extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); | 138 | void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key); |
139 | extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); | 139 | void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr, |
140 | void *key); | ||
141 | void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); | ||
142 | void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); | ||
140 | void __wake_up_bit(wait_queue_head_t *, void *, int); | 143 | void __wake_up_bit(wait_queue_head_t *, void *, int); |
141 | int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); | 144 | int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); |
142 | int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); | 145 | int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); |
@@ -155,21 +158,17 @@ wait_queue_head_t *bit_waitqueue(void *, int); | |||
155 | #define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL) | 158 | #define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL) |
156 | #define wake_up_interruptible_sync(x) __wake_up_sync((x), TASK_INTERRUPTIBLE, 1) | 159 | #define wake_up_interruptible_sync(x) __wake_up_sync((x), TASK_INTERRUPTIBLE, 1) |
157 | 160 | ||
158 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
159 | /* | 161 | /* |
160 | * macro to avoid include hell | 162 | * Wakeup macros to be used to report events to the targets. |
161 | */ | 163 | */ |
162 | #define wake_up_nested(x, s) \ | 164 | #define wake_up_poll(x, m) \ |
163 | do { \ | 165 | __wake_up(x, TASK_NORMAL, 1, (void *) (m)) |
164 | unsigned long flags; \ | 166 | #define wake_up_locked_poll(x, m) \ |
165 | \ | 167 | __wake_up_locked_key((x), TASK_NORMAL, (void *) (m)) |
166 | spin_lock_irqsave_nested(&(x)->lock, flags, (s)); \ | 168 | #define wake_up_interruptible_poll(x, m) \ |
167 | wake_up_locked(x); \ | 169 | __wake_up(x, TASK_INTERRUPTIBLE, 1, (void *) (m)) |
168 | spin_unlock_irqrestore(&(x)->lock, flags); \ | 170 | #define wake_up_interruptible_sync_poll(x, m) \ |
169 | } while (0) | 171 | __wake_up_sync_key((x), TASK_INTERRUPTIBLE, 1, (void *) (m)) |
170 | #else | ||
171 | #define wake_up_nested(x, s) wake_up(x) | ||
172 | #endif | ||
173 | 172 | ||
174 | #define __wait_event(wq, condition) \ | 173 | #define __wait_event(wq, condition) \ |
175 | do { \ | 174 | do { \ |
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/writeback.h b/include/linux/writeback.h index 7300ecdc480c..93445477f86a 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -109,8 +109,8 @@ extern int dirty_background_ratio; | |||
109 | extern unsigned long dirty_background_bytes; | 109 | extern unsigned long dirty_background_bytes; |
110 | extern int vm_dirty_ratio; | 110 | extern int vm_dirty_ratio; |
111 | extern unsigned long vm_dirty_bytes; | 111 | extern unsigned long vm_dirty_bytes; |
112 | extern int dirty_writeback_interval; | 112 | extern unsigned int dirty_writeback_interval; |
113 | extern int dirty_expire_interval; | 113 | extern unsigned int dirty_expire_interval; |
114 | extern int vm_highmem_is_dirtyable; | 114 | extern int vm_highmem_is_dirtyable; |
115 | extern int block_dump; | 115 | extern int block_dump; |
116 | extern int laptop_mode; | 116 | extern int laptop_mode; |
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) |