diff options
Diffstat (limited to 'include/linux')
141 files changed, 1844 insertions, 854 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index afae306b177c..bcf875e844fe 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -91,7 +91,6 @@ header-y += in6.h | |||
91 | header-y += in_route.h | 91 | header-y += in_route.h |
92 | header-y += ioctl.h | 92 | header-y += ioctl.h |
93 | header-y += ipmi_msgdefs.h | 93 | header-y += ipmi_msgdefs.h |
94 | header-y += ip_mp_alg.h | ||
95 | header-y += ipsec.h | 94 | header-y += ipsec.h |
96 | header-y += ipx.h | 95 | header-y += ipx.h |
97 | header-y += irda.h | 96 | header-y += irda.h |
@@ -226,6 +225,7 @@ unifdef-y += if_fddi.h | |||
226 | unifdef-y += if_frad.h | 225 | unifdef-y += if_frad.h |
227 | unifdef-y += if_ltalk.h | 226 | unifdef-y += if_ltalk.h |
228 | unifdef-y += if_link.h | 227 | unifdef-y += if_link.h |
228 | unifdef-y += if_pppol2tp.h | ||
229 | unifdef-y += if_pppox.h | 229 | unifdef-y += if_pppox.h |
230 | unifdef-y += if_shaper.h | 230 | unifdef-y += if_shaper.h |
231 | unifdef-y += if_tr.h | 231 | unifdef-y += if_tr.h |
@@ -247,7 +247,6 @@ unifdef-y += isdn.h | |||
247 | unifdef-y += isdnif.h | 247 | unifdef-y += isdnif.h |
248 | unifdef-y += isdn_divertif.h | 248 | unifdef-y += isdn_divertif.h |
249 | unifdef-y += isdn_ppp.h | 249 | unifdef-y += isdn_ppp.h |
250 | unifdef-y += isicom.h | ||
251 | unifdef-y += jbd.h | 250 | unifdef-y += jbd.h |
252 | unifdef-y += joystick.h | 251 | unifdef-y += joystick.h |
253 | unifdef-y += kdev_t.h | 252 | unifdef-y += kdev_t.h |
diff --git a/include/linux/aer.h b/include/linux/aer.h index 402e178b38eb..509656286e53 100644 --- a/include/linux/aer.h +++ b/include/linux/aer.h | |||
@@ -13,11 +13,13 @@ extern int pci_enable_pcie_error_reporting(struct pci_dev *dev); | |||
13 | extern int pci_find_aer_capability(struct pci_dev *dev); | 13 | extern int pci_find_aer_capability(struct pci_dev *dev); |
14 | extern int pci_disable_pcie_error_reporting(struct pci_dev *dev); | 14 | extern int pci_disable_pcie_error_reporting(struct pci_dev *dev); |
15 | extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); | 15 | extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); |
16 | extern int pci_cleanup_aer_correct_error_status(struct pci_dev *dev); | ||
16 | #else | 17 | #else |
17 | #define pci_enable_pcie_error_reporting(dev) do { } while (0) | 18 | #define pci_enable_pcie_error_reporting(dev) (-EINVAL) |
18 | #define pci_find_aer_capability(dev) do { } while (0) | 19 | #define pci_find_aer_capability(dev) (0) |
19 | #define pci_disable_pcie_error_reporting(dev) do { } while (0) | 20 | #define pci_disable_pcie_error_reporting(dev) (-EINVAL) |
20 | #define pci_cleanup_aer_uncorrect_error_status(dev) do { } while (0) | 21 | #define pci_cleanup_aer_uncorrect_error_status(dev) (-EINVAL) |
22 | #define pci_cleanup_aer_correct_error_status(dev) (-EINVAL) | ||
21 | #endif | 23 | #endif |
22 | 24 | ||
23 | #endif //_AER_H_ | 25 | #endif //_AER_H_ |
diff --git a/include/linux/async_tx.h b/include/linux/async_tx.h new file mode 100644 index 000000000000..ff1255079fa1 --- /dev/null +++ b/include/linux/async_tx.h | |||
@@ -0,0 +1,156 @@ | |||
1 | /* | ||
2 | * Copyright © 2006, Intel Corporation. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program; if not, write to the Free Software Foundation, Inc., | ||
15 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
16 | * | ||
17 | */ | ||
18 | #ifndef _ASYNC_TX_H_ | ||
19 | #define _ASYNC_TX_H_ | ||
20 | #include <linux/dmaengine.h> | ||
21 | #include <linux/spinlock.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | |||
24 | /** | ||
25 | * dma_chan_ref - object used to manage dma channels received from the | ||
26 | * dmaengine core. | ||
27 | * @chan - the channel being tracked | ||
28 | * @node - node for the channel to be placed on async_tx_master_list | ||
29 | * @rcu - for list_del_rcu | ||
30 | * @count - number of times this channel is listed in the pool | ||
31 | * (for channels with multiple capabiities) | ||
32 | */ | ||
33 | struct dma_chan_ref { | ||
34 | struct dma_chan *chan; | ||
35 | struct list_head node; | ||
36 | struct rcu_head rcu; | ||
37 | atomic_t count; | ||
38 | }; | ||
39 | |||
40 | /** | ||
41 | * async_tx_flags - modifiers for the async_* calls | ||
42 | * @ASYNC_TX_XOR_ZERO_DST: this flag must be used for xor operations where the | ||
43 | * the destination address is not a source. The asynchronous case handles this | ||
44 | * implicitly, the synchronous case needs to zero the destination block. | ||
45 | * @ASYNC_TX_XOR_DROP_DST: this flag must be used if the destination address is | ||
46 | * also one of the source addresses. In the synchronous case the destination | ||
47 | * address is an implied source, whereas the asynchronous case it must be listed | ||
48 | * as a source. The destination address must be the first address in the source | ||
49 | * array. | ||
50 | * @ASYNC_TX_ASSUME_COHERENT: skip cache maintenance operations | ||
51 | * @ASYNC_TX_ACK: immediately ack the descriptor, precludes setting up a | ||
52 | * dependency chain | ||
53 | * @ASYNC_TX_DEP_ACK: ack the dependency descriptor. Useful for chaining. | ||
54 | * @ASYNC_TX_KMAP_SRC: if the transaction is to be performed synchronously | ||
55 | * take an atomic mapping (KM_USER0) on the source page(s) | ||
56 | * @ASYNC_TX_KMAP_DST: if the transaction is to be performed synchronously | ||
57 | * take an atomic mapping (KM_USER0) on the dest page(s) | ||
58 | */ | ||
59 | enum async_tx_flags { | ||
60 | ASYNC_TX_XOR_ZERO_DST = (1 << 0), | ||
61 | ASYNC_TX_XOR_DROP_DST = (1 << 1), | ||
62 | ASYNC_TX_ASSUME_COHERENT = (1 << 2), | ||
63 | ASYNC_TX_ACK = (1 << 3), | ||
64 | ASYNC_TX_DEP_ACK = (1 << 4), | ||
65 | ASYNC_TX_KMAP_SRC = (1 << 5), | ||
66 | ASYNC_TX_KMAP_DST = (1 << 6), | ||
67 | }; | ||
68 | |||
69 | #ifdef CONFIG_DMA_ENGINE | ||
70 | void async_tx_issue_pending_all(void); | ||
71 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); | ||
72 | void async_tx_run_dependencies(struct dma_async_tx_descriptor *tx); | ||
73 | struct dma_chan * | ||
74 | async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | ||
75 | enum dma_transaction_type tx_type); | ||
76 | #else | ||
77 | static inline void async_tx_issue_pending_all(void) | ||
78 | { | ||
79 | do { } while (0); | ||
80 | } | ||
81 | |||
82 | static inline enum dma_status | ||
83 | dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) | ||
84 | { | ||
85 | return DMA_SUCCESS; | ||
86 | } | ||
87 | |||
88 | static inline void | ||
89 | async_tx_run_dependencies(struct dma_async_tx_descriptor *tx, | ||
90 | struct dma_chan *host_chan) | ||
91 | { | ||
92 | do { } while (0); | ||
93 | } | ||
94 | |||
95 | static inline struct dma_chan * | ||
96 | async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | ||
97 | enum dma_transaction_type tx_type) | ||
98 | { | ||
99 | return NULL; | ||
100 | } | ||
101 | #endif | ||
102 | |||
103 | /** | ||
104 | * async_tx_sync_epilog - actions to take if an operation is run synchronously | ||
105 | * @flags: async_tx flags | ||
106 | * @depend_tx: transaction depends on depend_tx | ||
107 | * @cb_fn: function to call when the transaction completes | ||
108 | * @cb_fn_param: parameter to pass to the callback routine | ||
109 | */ | ||
110 | static inline void | ||
111 | async_tx_sync_epilog(unsigned long flags, | ||
112 | struct dma_async_tx_descriptor *depend_tx, | ||
113 | dma_async_tx_callback cb_fn, void *cb_fn_param) | ||
114 | { | ||
115 | if (cb_fn) | ||
116 | cb_fn(cb_fn_param); | ||
117 | |||
118 | if (depend_tx && (flags & ASYNC_TX_DEP_ACK)) | ||
119 | async_tx_ack(depend_tx); | ||
120 | } | ||
121 | |||
122 | void | ||
123 | async_tx_submit(struct dma_chan *chan, struct dma_async_tx_descriptor *tx, | ||
124 | enum async_tx_flags flags, struct dma_async_tx_descriptor *depend_tx, | ||
125 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
126 | |||
127 | struct dma_async_tx_descriptor * | ||
128 | async_xor(struct page *dest, struct page **src_list, unsigned int offset, | ||
129 | int src_cnt, size_t len, enum async_tx_flags flags, | ||
130 | struct dma_async_tx_descriptor *depend_tx, | ||
131 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
132 | |||
133 | struct dma_async_tx_descriptor * | ||
134 | async_xor_zero_sum(struct page *dest, struct page **src_list, | ||
135 | unsigned int offset, int src_cnt, size_t len, | ||
136 | u32 *result, enum async_tx_flags flags, | ||
137 | struct dma_async_tx_descriptor *depend_tx, | ||
138 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
139 | |||
140 | struct dma_async_tx_descriptor * | ||
141 | async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset, | ||
142 | unsigned int src_offset, size_t len, enum async_tx_flags flags, | ||
143 | struct dma_async_tx_descriptor *depend_tx, | ||
144 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
145 | |||
146 | struct dma_async_tx_descriptor * | ||
147 | async_memset(struct page *dest, int val, unsigned int offset, | ||
148 | size_t len, enum async_tx_flags flags, | ||
149 | struct dma_async_tx_descriptor *depend_tx, | ||
150 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
151 | |||
152 | struct dma_async_tx_descriptor * | ||
153 | async_trigger_callback(enum async_tx_flags flags, | ||
154 | struct dma_async_tx_descriptor *depend_tx, | ||
155 | dma_async_tx_callback cb_fn, void *cb_fn_param); | ||
156 | #endif /* _ASYNC_TX_H_ */ | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 407dc7e098bc..b5a20162af32 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -164,6 +164,8 @@ enum { | |||
164 | ATA_CMD_SET_MAX = 0xF9, | 164 | ATA_CMD_SET_MAX = 0xF9, |
165 | ATA_CMD_SET_MAX_EXT = 0x37, | 165 | ATA_CMD_SET_MAX_EXT = 0x37, |
166 | ATA_CMD_READ_LOG_EXT = 0x2f, | 166 | ATA_CMD_READ_LOG_EXT = 0x2f, |
167 | ATA_CMD_PMP_READ = 0xE4, | ||
168 | ATA_CMD_PMP_WRITE = 0xE8, | ||
167 | 169 | ||
168 | /* READ_LOG_EXT pages */ | 170 | /* READ_LOG_EXT pages */ |
169 | ATA_LOG_SATA_NCQ = 0x10, | 171 | ATA_LOG_SATA_NCQ = 0x10, |
@@ -212,6 +214,28 @@ enum { | |||
212 | 0=to device, 1=to host */ | 214 | 0=to device, 1=to host */ |
213 | ATAPI_CDB_LEN = 16, | 215 | ATAPI_CDB_LEN = 16, |
214 | 216 | ||
217 | /* PMP stuff */ | ||
218 | SATA_PMP_MAX_PORTS = 15, | ||
219 | SATA_PMP_CTRL_PORT = 15, | ||
220 | |||
221 | SATA_PMP_GSCR_DWORDS = 128, | ||
222 | SATA_PMP_GSCR_PROD_ID = 0, | ||
223 | SATA_PMP_GSCR_REV = 1, | ||
224 | SATA_PMP_GSCR_PORT_INFO = 2, | ||
225 | SATA_PMP_GSCR_ERROR = 32, | ||
226 | SATA_PMP_GSCR_ERROR_EN = 33, | ||
227 | SATA_PMP_GSCR_FEAT = 64, | ||
228 | SATA_PMP_GSCR_FEAT_EN = 96, | ||
229 | |||
230 | SATA_PMP_PSCR_STATUS = 0, | ||
231 | SATA_PMP_PSCR_ERROR = 1, | ||
232 | SATA_PMP_PSCR_CONTROL = 2, | ||
233 | |||
234 | SATA_PMP_FEAT_BIST = (1 << 0), | ||
235 | SATA_PMP_FEAT_PMREQ = (1 << 1), | ||
236 | SATA_PMP_FEAT_DYNSSC = (1 << 2), | ||
237 | SATA_PMP_FEAT_NOTIFY = (1 << 3), | ||
238 | |||
215 | /* cable types */ | 239 | /* cable types */ |
216 | ATA_CBL_NONE = 0, | 240 | ATA_CBL_NONE = 0, |
217 | ATA_CBL_PATA40 = 1, | 241 | ATA_CBL_PATA40 = 1, |
@@ -418,4 +442,9 @@ static inline int lba_48_ok(u64 block, u32 n_block) | |||
418 | return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536); | 442 | return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536); |
419 | } | 443 | } |
420 | 444 | ||
445 | #define sata_pmp_gscr_vendor(gscr) ((gscr)[SATA_PMP_GSCR_PROD_ID] & 0xffff) | ||
446 | #define sata_pmp_gscr_devid(gscr) ((gscr)[SATA_PMP_GSCR_PROD_ID] >> 16) | ||
447 | #define sata_pmp_gscr_rev(gscr) (((gscr)[SATA_PMP_GSCR_REV] >> 8) & 0xff) | ||
448 | #define sata_pmp_gscr_ports(gscr) ((gscr)[SATA_PMP_GSCR_PORT_INFO] & 0xf) | ||
449 | |||
421 | #endif /* __LINUX_ATA_H__ */ | 450 | #endif /* __LINUX_ATA_H__ */ |
diff --git a/include/linux/attribute_container.h b/include/linux/attribute_container.h index 93bfb0beb62a..8ff274933948 100644 --- a/include/linux/attribute_container.h +++ b/include/linux/attribute_container.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/klist.h> | 14 | #include <linux/klist.h> |
15 | #include <linux/spinlock.h> | ||
16 | 15 | ||
17 | struct attribute_container { | 16 | struct attribute_container { |
18 | struct list_head node; | 17 | struct list_head node; |
diff --git a/include/linux/audit.h b/include/linux/audit.h index fccc6e50298a..8ca7ca0b47f0 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -63,9 +63,12 @@ | |||
63 | #define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */ | 63 | #define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */ |
64 | #define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */ | 64 | #define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */ |
65 | #define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */ | 65 | #define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */ |
66 | #define AUDIT_TTY_GET 1014 /* Get TTY auditing status */ | ||
67 | #define AUDIT_TTY_SET 1015 /* Set TTY auditing status */ | ||
66 | 68 | ||
67 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ | 69 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ |
68 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ | 70 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ |
71 | #define AUDIT_USER_TTY 1124 /* Non-ICANON TTY input meaning */ | ||
69 | #define AUDIT_LAST_USER_MSG 1199 | 72 | #define AUDIT_LAST_USER_MSG 1199 |
70 | #define AUDIT_FIRST_USER_MSG2 2100 /* More user space messages */ | 73 | #define AUDIT_FIRST_USER_MSG2 2100 /* More user space messages */ |
71 | #define AUDIT_LAST_USER_MSG2 2999 | 74 | #define AUDIT_LAST_USER_MSG2 2999 |
@@ -92,6 +95,7 @@ | |||
92 | #define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ | 95 | #define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ |
93 | #define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */ | 96 | #define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */ |
94 | #define AUDIT_OBJ_PID 1318 /* ptrace target */ | 97 | #define AUDIT_OBJ_PID 1318 /* ptrace target */ |
98 | #define AUDIT_TTY 1319 /* Input on an administrative TTY */ | ||
95 | 99 | ||
96 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 100 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
97 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 101 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
@@ -289,6 +293,10 @@ struct audit_status { | |||
289 | __u32 backlog; /* messages waiting in queue */ | 293 | __u32 backlog; /* messages waiting in queue */ |
290 | }; | 294 | }; |
291 | 295 | ||
296 | struct audit_tty_status { | ||
297 | __u32 enabled; /* 1 = enabled, 0 = disabled */ | ||
298 | }; | ||
299 | |||
292 | /* audit_rule_data supports filter rules with both integer and string | 300 | /* audit_rule_data supports filter rules with both integer and string |
293 | * fields. It corresponds with AUDIT_ADD_RULE, AUDIT_DEL_RULE and | 301 | * fields. It corresponds with AUDIT_ADD_RULE, AUDIT_DEL_RULE and |
294 | * AUDIT_LIST_RULES requests. | 302 | * AUDIT_LIST_RULES requests. |
@@ -515,11 +523,13 @@ extern void audit_log_d_path(struct audit_buffer *ab, | |||
515 | const char *prefix, | 523 | const char *prefix, |
516 | struct dentry *dentry, | 524 | struct dentry *dentry, |
517 | struct vfsmount *vfsmnt); | 525 | struct vfsmount *vfsmnt); |
526 | extern void audit_log_lost(const char *message); | ||
518 | /* Private API (for audit.c only) */ | 527 | /* Private API (for audit.c only) */ |
519 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); | 528 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); |
520 | extern int audit_filter_type(int type); | 529 | extern int audit_filter_type(int type); |
521 | extern int audit_receive_filter(int type, int pid, int uid, int seq, | 530 | extern int audit_receive_filter(int type, int pid, int uid, int seq, |
522 | void *data, size_t datasz, uid_t loginuid, u32 sid); | 531 | void *data, size_t datasz, uid_t loginuid, u32 sid); |
532 | extern int audit_enabled; | ||
523 | #else | 533 | #else |
524 | #define audit_log(c,g,t,f,...) do { ; } while (0) | 534 | #define audit_log(c,g,t,f,...) do { ; } while (0) |
525 | #define audit_log_start(c,g,t) ({ NULL; }) | 535 | #define audit_log_start(c,g,t) ({ NULL; }) |
@@ -530,6 +540,7 @@ extern int audit_receive_filter(int type, int pid, int uid, int seq, | |||
530 | #define audit_log_untrustedstring(a,s) do { ; } while (0) | 540 | #define audit_log_untrustedstring(a,s) do { ; } while (0) |
531 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) | 541 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) |
532 | #define audit_log_d_path(b,p,d,v) do { ; } while (0) | 542 | #define audit_log_d_path(b,p,d,v) do { ; } while (0) |
543 | #define audit_enabled 0 | ||
533 | #endif | 544 | #endif |
534 | #endif | 545 | #endif |
535 | #endif | 546 | #endif |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index f2542c24b328..7011d6255593 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -93,7 +93,6 @@ static inline int bdi_rw_congested(struct backing_dev_info *bdi) | |||
93 | void clear_bdi_congested(struct backing_dev_info *bdi, int rw); | 93 | void clear_bdi_congested(struct backing_dev_info *bdi, int rw); |
94 | void set_bdi_congested(struct backing_dev_info *bdi, int rw); | 94 | void set_bdi_congested(struct backing_dev_info *bdi, int rw); |
95 | long congestion_wait(int rw, long timeout); | 95 | long congestion_wait(int rw, long timeout); |
96 | long congestion_wait_interruptible(int rw, long timeout); | ||
97 | void congestion_end(int rw); | 96 | void congestion_end(int rw); |
98 | 97 | ||
99 | #define bdi_cap_writeback_dirty(bdi) \ | 98 | #define bdi_cap_writeback_dirty(bdi) \ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index fae138bd2207..b32564a1e105 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/bio.h> | 14 | #include <linux/bio.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/stringify.h> | 16 | #include <linux/stringify.h> |
17 | #include <linux/bsg.h> | ||
17 | 18 | ||
18 | #include <asm/scatterlist.h> | 19 | #include <asm/scatterlist.h> |
19 | 20 | ||
@@ -41,6 +42,8 @@ struct elevator_queue; | |||
41 | typedef struct elevator_queue elevator_t; | 42 | typedef struct elevator_queue elevator_t; |
42 | struct request_pm_state; | 43 | struct request_pm_state; |
43 | struct blk_trace; | 44 | struct blk_trace; |
45 | struct request; | ||
46 | struct sg_io_hdr; | ||
44 | 47 | ||
45 | #define BLKDEV_MIN_RQ 4 | 48 | #define BLKDEV_MIN_RQ 4 |
46 | #define BLKDEV_MAX_RQ 128 /* Default maximum */ | 49 | #define BLKDEV_MAX_RQ 128 /* Default maximum */ |
@@ -314,6 +317,9 @@ struct request { | |||
314 | */ | 317 | */ |
315 | rq_end_io_fn *end_io; | 318 | rq_end_io_fn *end_io; |
316 | void *end_io_data; | 319 | void *end_io_data; |
320 | |||
321 | /* for bidi */ | ||
322 | struct request *next_rq; | ||
317 | }; | 323 | }; |
318 | 324 | ||
319 | /* | 325 | /* |
@@ -468,6 +474,10 @@ struct request_queue | |||
468 | unsigned int bi_size; | 474 | unsigned int bi_size; |
469 | 475 | ||
470 | struct mutex sysfs_lock; | 476 | struct mutex sysfs_lock; |
477 | |||
478 | #if defined(CONFIG_BLK_DEV_BSG) | ||
479 | struct bsg_class_device bsg_dev; | ||
480 | #endif | ||
471 | }; | 481 | }; |
472 | 482 | ||
473 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ | 483 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ |
@@ -479,6 +489,7 @@ struct request_queue | |||
479 | #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ | 489 | #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ |
480 | #define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ | 490 | #define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ |
481 | #define QUEUE_FLAG_ELVSWITCH 8 /* don't use elevator, just do FIFO */ | 491 | #define QUEUE_FLAG_ELVSWITCH 8 /* don't use elevator, just do FIFO */ |
492 | #define QUEUE_FLAG_BIDI 9 /* queue supports bidi requests */ | ||
482 | 493 | ||
483 | enum { | 494 | enum { |
484 | /* | 495 | /* |
@@ -543,6 +554,7 @@ enum { | |||
543 | #define blk_sorted_rq(rq) ((rq)->cmd_flags & REQ_SORTED) | 554 | #define blk_sorted_rq(rq) ((rq)->cmd_flags & REQ_SORTED) |
544 | #define blk_barrier_rq(rq) ((rq)->cmd_flags & REQ_HARDBARRIER) | 555 | #define blk_barrier_rq(rq) ((rq)->cmd_flags & REQ_HARDBARRIER) |
545 | #define blk_fua_rq(rq) ((rq)->cmd_flags & REQ_FUA) | 556 | #define blk_fua_rq(rq) ((rq)->cmd_flags & REQ_FUA) |
557 | #define blk_bidi_rq(rq) ((rq)->next_rq != NULL) | ||
546 | 558 | ||
547 | #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist) | 559 | #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist) |
548 | 560 | ||
@@ -607,6 +619,11 @@ extern unsigned long blk_max_low_pfn, blk_max_pfn; | |||
607 | #define BLK_BOUNCE_ANY ((u64)blk_max_pfn << PAGE_SHIFT) | 619 | #define BLK_BOUNCE_ANY ((u64)blk_max_pfn << PAGE_SHIFT) |
608 | #define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD) | 620 | #define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD) |
609 | 621 | ||
622 | /* | ||
623 | * default timeout for SG_IO if none specified | ||
624 | */ | ||
625 | #define BLK_DEFAULT_SG_TIMEOUT (60 * HZ) | ||
626 | |||
610 | #ifdef CONFIG_MMU | 627 | #ifdef CONFIG_MMU |
611 | extern int init_emergency_isa_pool(void); | 628 | extern int init_emergency_isa_pool(void); |
612 | extern void blk_queue_bounce(request_queue_t *q, struct bio **bio); | 629 | extern void blk_queue_bounce(request_queue_t *q, struct bio **bio); |
@@ -637,7 +654,8 @@ extern void blk_requeue_request(request_queue_t *, struct request *); | |||
637 | extern void blk_plug_device(request_queue_t *); | 654 | extern void blk_plug_device(request_queue_t *); |
638 | extern int blk_remove_plug(request_queue_t *); | 655 | extern int blk_remove_plug(request_queue_t *); |
639 | extern void blk_recount_segments(request_queue_t *, struct bio *); | 656 | extern void blk_recount_segments(request_queue_t *, struct bio *); |
640 | extern int scsi_cmd_ioctl(struct file *, struct gendisk *, unsigned int, void __user *); | 657 | extern int scsi_cmd_ioctl(struct file *, struct request_queue *, |
658 | struct gendisk *, unsigned int, void __user *); | ||
641 | extern int sg_scsi_ioctl(struct file *, struct request_queue *, | 659 | extern int sg_scsi_ioctl(struct file *, struct request_queue *, |
642 | struct gendisk *, struct scsi_ioctl_command __user *); | 660 | struct gendisk *, struct scsi_ioctl_command __user *); |
643 | 661 | ||
@@ -680,6 +698,12 @@ extern int blk_execute_rq(request_queue_t *, struct gendisk *, | |||
680 | struct request *, int); | 698 | struct request *, int); |
681 | extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, | 699 | extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, |
682 | struct request *, int, rq_end_io_fn *); | 700 | struct request *, int, rq_end_io_fn *); |
701 | extern int blk_fill_sghdr_rq(request_queue_t *, struct request *, | ||
702 | struct sg_io_hdr *, int); | ||
703 | extern int blk_unmap_sghdr_rq(struct request *, struct sg_io_hdr *); | ||
704 | extern int blk_complete_sghdr_rq(struct request *, struct sg_io_hdr *, | ||
705 | struct bio *); | ||
706 | extern int blk_verify_command(unsigned char *, int); | ||
683 | 707 | ||
684 | static inline request_queue_t *bdev_get_queue(struct block_device *bdev) | 708 | static inline request_queue_t *bdev_get_queue(struct block_device *bdev) |
685 | { | 709 | { |
diff --git a/include/linux/bsg.h b/include/linux/bsg.h new file mode 100644 index 000000000000..bd998ca6cb2e --- /dev/null +++ b/include/linux/bsg.h | |||
@@ -0,0 +1,70 @@ | |||
1 | #ifndef BSG_H | ||
2 | #define BSG_H | ||
3 | |||
4 | #define BSG_PROTOCOL_SCSI 0 | ||
5 | |||
6 | #define BSG_SUB_PROTOCOL_SCSI_CMD 0 | ||
7 | #define BSG_SUB_PROTOCOL_SCSI_TMF 1 | ||
8 | #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 | ||
9 | |||
10 | struct sg_io_v4 { | ||
11 | __s32 guard; /* [i] 'Q' to differentiate from v3 */ | ||
12 | __u32 protocol; /* [i] 0 -> SCSI , .... */ | ||
13 | __u32 subprotocol; /* [i] 0 -> SCSI command, 1 -> SCSI task | ||
14 | management function, .... */ | ||
15 | |||
16 | __u32 request_len; /* [i] in bytes */ | ||
17 | __u64 request; /* [i], [*i] {SCSI: cdb} */ | ||
18 | __u32 request_attr; /* [i] {SCSI: task attribute} */ | ||
19 | __u32 request_tag; /* [i] {SCSI: task tag (only if flagged)} */ | ||
20 | __u32 request_priority; /* [i] {SCSI: task priority} */ | ||
21 | __u32 max_response_len; /* [i] in bytes */ | ||
22 | __u64 response; /* [i], [*o] {SCSI: (auto)sense data} */ | ||
23 | |||
24 | /* "din_" for data in (from device); "dout_" for data out (to device) */ | ||
25 | __u32 dout_xfer_len; /* [i] bytes to be transferred to device */ | ||
26 | __u32 din_xfer_len; /* [i] bytes to be transferred from device */ | ||
27 | __u64 dout_xferp; /* [i], [*i] */ | ||
28 | __u64 din_xferp; /* [i], [*o] */ | ||
29 | |||
30 | __u32 timeout; /* [i] units: millisecond */ | ||
31 | __u32 flags; /* [i] bit mask */ | ||
32 | __u64 usr_ptr; /* [i->o] unused internally */ | ||
33 | __u32 spare_in; /* [i] */ | ||
34 | |||
35 | __u32 driver_status; /* [o] 0 -> ok */ | ||
36 | __u32 transport_status; /* [o] 0 -> ok */ | ||
37 | __u32 device_status; /* [o] {SCSI: command completion status} */ | ||
38 | __u32 retry_delay; /* [o] {SCSI: status auxiliary information} */ | ||
39 | __u32 info; /* [o] additional information */ | ||
40 | __u32 duration; /* [o] time to complete, in milliseconds */ | ||
41 | __u32 response_len; /* [o] bytes of response actually written */ | ||
42 | __s32 din_resid; /* [o] actual_din_xfer_len - din_xfer_len */ | ||
43 | __u32 generated_tag; /* [o] {SCSI: task tag that transport chose} */ | ||
44 | __u32 spare_out; /* [o] */ | ||
45 | |||
46 | __u32 padding; | ||
47 | }; | ||
48 | |||
49 | #ifdef __KERNEL__ | ||
50 | |||
51 | #if defined(CONFIG_BLK_DEV_BSG) | ||
52 | struct bsg_class_device { | ||
53 | struct class_device *class_dev; | ||
54 | struct device *dev; | ||
55 | int minor; | ||
56 | struct list_head list; | ||
57 | struct request_queue *queue; | ||
58 | }; | ||
59 | |||
60 | extern int bsg_register_queue(struct request_queue *, const char *); | ||
61 | extern void bsg_unregister_queue(struct request_queue *); | ||
62 | #else | ||
63 | struct bsg_class_device { }; | ||
64 | #define bsg_register_queue(disk, name) (0) | ||
65 | #define bsg_unregister_queue(disk) do { } while (0) | ||
66 | #endif | ||
67 | |||
68 | #endif /* __KERNEL__ */ | ||
69 | |||
70 | #endif | ||
diff --git a/include/linux/bug.h b/include/linux/bug.h index 42aa0a54b6f4..54398d2c6d8d 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h | |||
@@ -10,6 +10,8 @@ enum bug_trap_type { | |||
10 | BUG_TRAP_TYPE_BUG = 2, | 10 | BUG_TRAP_TYPE_BUG = 2, |
11 | }; | 11 | }; |
12 | 12 | ||
13 | struct pt_regs; | ||
14 | |||
13 | #ifdef CONFIG_GENERIC_BUG | 15 | #ifdef CONFIG_GENERIC_BUG |
14 | #include <asm-generic/bug.h> | 16 | #include <asm-generic/bug.h> |
15 | 17 | ||
@@ -20,7 +22,7 @@ static inline int is_warning_bug(const struct bug_entry *bug) | |||
20 | 22 | ||
21 | const struct bug_entry *find_bug(unsigned long bugaddr); | 23 | const struct bug_entry *find_bug(unsigned long bugaddr); |
22 | 24 | ||
23 | enum bug_trap_type report_bug(unsigned long bug_addr); | 25 | enum bug_trap_type report_bug(unsigned long bug_addr, struct pt_regs *regs); |
24 | 26 | ||
25 | int module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, | 27 | int module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, |
26 | struct module *); | 28 | struct module *); |
@@ -31,7 +33,8 @@ int is_valid_bugaddr(unsigned long addr); | |||
31 | 33 | ||
32 | #else /* !CONFIG_GENERIC_BUG */ | 34 | #else /* !CONFIG_GENERIC_BUG */ |
33 | 35 | ||
34 | static inline enum bug_trap_type report_bug(unsigned long bug_addr) | 36 | static inline enum bug_trap_type report_bug(unsigned long bug_addr, |
37 | struct pt_regs *regs) | ||
35 | { | 38 | { |
36 | return BUG_TRAP_TYPE_BUG; | 39 | return BUG_TRAP_TYPE_BUG; |
37 | } | 40 | } |
diff --git a/include/linux/capability.h b/include/linux/capability.h index bbf8df7de28f..2dfa58555934 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -44,7 +44,6 @@ typedef struct __user_cap_data_struct { | |||
44 | 44 | ||
45 | #ifdef __KERNEL__ | 45 | #ifdef __KERNEL__ |
46 | 46 | ||
47 | #include <linux/spinlock.h> | ||
48 | #include <asm/current.h> | 47 | #include <asm/current.h> |
49 | 48 | ||
50 | /* #define STRICT_CAP_T_TYPECHECKS */ | 49 | /* #define STRICT_CAP_T_TYPECHECKS */ |
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index f50f04bdbc16..2b641b176e7f 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h | |||
@@ -414,8 +414,8 @@ struct cdrom_generic_command | |||
414 | #define CDO_CHECK_TYPE 0x10 /* check type on open for data */ | 414 | #define CDO_CHECK_TYPE 0x10 /* check type on open for data */ |
415 | 415 | ||
416 | /* Special codes used when specifying changer slots. */ | 416 | /* Special codes used when specifying changer slots. */ |
417 | #define CDSL_NONE ((int) (~0U>>1)-1) | 417 | #define CDSL_NONE (INT_MAX-1) |
418 | #define CDSL_CURRENT ((int) (~0U>>1)) | 418 | #define CDSL_CURRENT INT_MAX |
419 | 419 | ||
420 | /* For partition based multisession access. IDE can handle 64 partitions | 420 | /* For partition based multisession access. IDE can handle 64 partitions |
421 | * per drive - SCSI CD-ROM's use minors to differentiate between the | 421 | * per drive - SCSI CD-ROM's use minors to differentiate between the |
diff --git a/include/linux/cobalt-nvram.h b/include/linux/cobalt-nvram.h deleted file mode 100644 index ea429562ff36..000000000000 --- a/include/linux/cobalt-nvram.h +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | /* | ||
2 | * $Id: cobalt-nvram.h,v 1.20 2001/10/17 23:16:55 thockin Exp $ | ||
3 | * cobalt-nvram.h : defines for the various fields in the cobalt NVRAM | ||
4 | * | ||
5 | * Copyright 2001,2002 Sun Microsystems, Inc. | ||
6 | */ | ||
7 | |||
8 | #ifndef COBALT_NVRAM_H | ||
9 | #define COBALT_NVRAM_H | ||
10 | |||
11 | #include <linux/nvram.h> | ||
12 | |||
13 | #define COBT_CMOS_INFO_MAX 0x7f /* top address allowed */ | ||
14 | #define COBT_CMOS_BIOS_DRIVE_INFO 0x12 /* drive info would go here */ | ||
15 | |||
16 | #define COBT_CMOS_CKS_START NVRAM_OFFSET(0x0e) | ||
17 | #define COBT_CMOS_CKS_END NVRAM_OFFSET(0x7f) | ||
18 | |||
19 | /* flag bytes - 16 flags for now, leave room for more */ | ||
20 | #define COBT_CMOS_FLAG_BYTE_0 NVRAM_OFFSET(0x10) | ||
21 | #define COBT_CMOS_FLAG_BYTE_1 NVRAM_OFFSET(0x11) | ||
22 | |||
23 | /* flags in flag bytes - up to 16 */ | ||
24 | #define COBT_CMOS_FLAG_MIN 0x0001 | ||
25 | #define COBT_CMOS_CONSOLE_FLAG 0x0001 /* console on/off */ | ||
26 | #define COBT_CMOS_DEBUG_FLAG 0x0002 /* ROM debug messages */ | ||
27 | #define COBT_CMOS_AUTO_PROMPT_FLAG 0x0004 /* boot to ROM prompt? */ | ||
28 | #define COBT_CMOS_CLEAN_BOOT_FLAG 0x0008 /* set by a clean shutdown */ | ||
29 | #define COBT_CMOS_HW_NOPROBE_FLAG 0x0010 /* go easy on the probing */ | ||
30 | #define COBT_CMOS_SYSFAULT_FLAG 0x0020 /* system fault detected */ | ||
31 | #define COBT_CMOS_OOPSPANIC_FLAG 0x0040 /* panic on oops */ | ||
32 | #define COBT_CMOS_DELAY_CACHE_FLAG 0x0080 /* delay cache initialization */ | ||
33 | #define COBT_CMOS_NOLOGO_FLAG 0x0100 /* hide "C" logo @ boot */ | ||
34 | #define COBT_CMOS_VERSION_FLAG 0x0200 /* the version field is valid */ | ||
35 | #define COBT_CMOS_FLAG_MAX 0x0200 | ||
36 | |||
37 | /* leave byte 0x12 blank - Linux looks for drive info here */ | ||
38 | |||
39 | /* CMOS structure version, valid if COBT_CMOS_VERSION_FLAG is true */ | ||
40 | #define COBT_CMOS_VERSION NVRAM_OFFSET(0x13) | ||
41 | #define COBT_CMOS_VER_BTOCODE 1 /* min. version needed for btocode */ | ||
42 | |||
43 | /* index of default boot method */ | ||
44 | #define COBT_CMOS_BOOT_METHOD NVRAM_OFFSET(0x20) | ||
45 | #define COBT_CMOS_BOOT_METHOD_DISK 0 | ||
46 | #define COBT_CMOS_BOOT_METHOD_ROM 1 | ||
47 | #define COBT_CMOS_BOOT_METHOD_NET 2 | ||
48 | |||
49 | #define COBT_CMOS_BOOT_DEV_MIN NVRAM_OFFSET(0x21) | ||
50 | /* major #, minor # of first through fourth boot device */ | ||
51 | #define COBT_CMOS_BOOT_DEV0_MAJ NVRAM_OFFSET(0x21) | ||
52 | #define COBT_CMOS_BOOT_DEV0_MIN NVRAM_OFFSET(0x22) | ||
53 | #define COBT_CMOS_BOOT_DEV1_MAJ NVRAM_OFFSET(0x23) | ||
54 | #define COBT_CMOS_BOOT_DEV1_MIN NVRAM_OFFSET(0x24) | ||
55 | #define COBT_CMOS_BOOT_DEV2_MAJ NVRAM_OFFSET(0x25) | ||
56 | #define COBT_CMOS_BOOT_DEV2_MIN NVRAM_OFFSET(0x26) | ||
57 | #define COBT_CMOS_BOOT_DEV3_MAJ NVRAM_OFFSET(0x27) | ||
58 | #define COBT_CMOS_BOOT_DEV3_MIN NVRAM_OFFSET(0x28) | ||
59 | #define COBT_CMOS_BOOT_DEV_MAX NVRAM_OFFSET(0x28) | ||
60 | |||
61 | /* checksum of bytes 0xe-0x7f */ | ||
62 | #define COBT_CMOS_CHECKSUM NVRAM_OFFSET(0x2e) | ||
63 | |||
64 | /* running uptime counter, units of 5 minutes (32 bits =~ 41000 years) */ | ||
65 | #define COBT_CMOS_UPTIME_0 NVRAM_OFFSET(0x30) | ||
66 | #define COBT_CMOS_UPTIME_1 NVRAM_OFFSET(0x31) | ||
67 | #define COBT_CMOS_UPTIME_2 NVRAM_OFFSET(0x32) | ||
68 | #define COBT_CMOS_UPTIME_3 NVRAM_OFFSET(0x33) | ||
69 | |||
70 | /* count of successful boots (32 bits) */ | ||
71 | #define COBT_CMOS_BOOTCOUNT_0 NVRAM_OFFSET(0x38) | ||
72 | #define COBT_CMOS_BOOTCOUNT_1 NVRAM_OFFSET(0x39) | ||
73 | #define COBT_CMOS_BOOTCOUNT_2 NVRAM_OFFSET(0x3a) | ||
74 | #define COBT_CMOS_BOOTCOUNT_3 NVRAM_OFFSET(0x3b) | ||
75 | |||
76 | /* 13 bytes: system serial number, same as on the back of the system */ | ||
77 | #define COBT_CMOS_SYS_SERNUM_LEN 13 | ||
78 | #define COBT_CMOS_SYS_SERNUM_0 NVRAM_OFFSET(0x40) | ||
79 | #define COBT_CMOS_SYS_SERNUM_1 NVRAM_OFFSET(0x41) | ||
80 | #define COBT_CMOS_SYS_SERNUM_2 NVRAM_OFFSET(0x42) | ||
81 | #define COBT_CMOS_SYS_SERNUM_3 NVRAM_OFFSET(0x43) | ||
82 | #define COBT_CMOS_SYS_SERNUM_4 NVRAM_OFFSET(0x44) | ||
83 | #define COBT_CMOS_SYS_SERNUM_5 NVRAM_OFFSET(0x45) | ||
84 | #define COBT_CMOS_SYS_SERNUM_6 NVRAM_OFFSET(0x46) | ||
85 | #define COBT_CMOS_SYS_SERNUM_7 NVRAM_OFFSET(0x47) | ||
86 | #define COBT_CMOS_SYS_SERNUM_8 NVRAM_OFFSET(0x48) | ||
87 | #define COBT_CMOS_SYS_SERNUM_9 NVRAM_OFFSET(0x49) | ||
88 | #define COBT_CMOS_SYS_SERNUM_10 NVRAM_OFFSET(0x4a) | ||
89 | #define COBT_CMOS_SYS_SERNUM_11 NVRAM_OFFSET(0x4b) | ||
90 | #define COBT_CMOS_SYS_SERNUM_12 NVRAM_OFFSET(0x4c) | ||
91 | /* checksum for serial num - 1 byte */ | ||
92 | #define COBT_CMOS_SYS_SERNUM_CSUM NVRAM_OFFSET(0x4f) | ||
93 | |||
94 | #define COBT_CMOS_ROM_REV_MAJ NVRAM_OFFSET(0x50) | ||
95 | #define COBT_CMOS_ROM_REV_MIN NVRAM_OFFSET(0x51) | ||
96 | #define COBT_CMOS_ROM_REV_REV NVRAM_OFFSET(0x52) | ||
97 | |||
98 | #define COBT_CMOS_BTO_CODE_0 NVRAM_OFFSET(0x53) | ||
99 | #define COBT_CMOS_BTO_CODE_1 NVRAM_OFFSET(0x54) | ||
100 | #define COBT_CMOS_BTO_CODE_2 NVRAM_OFFSET(0x55) | ||
101 | #define COBT_CMOS_BTO_CODE_3 NVRAM_OFFSET(0x56) | ||
102 | |||
103 | #define COBT_CMOS_BTO_IP_CSUM NVRAM_OFFSET(0x57) | ||
104 | #define COBT_CMOS_BTO_IP_0 NVRAM_OFFSET(0x58) | ||
105 | #define COBT_CMOS_BTO_IP_1 NVRAM_OFFSET(0x59) | ||
106 | #define COBT_CMOS_BTO_IP_2 NVRAM_OFFSET(0x5a) | ||
107 | #define COBT_CMOS_BTO_IP_3 NVRAM_OFFSET(0x5b) | ||
108 | |||
109 | #endif /* COBALT_NVRAM_H */ | ||
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index fef6f3d0a4a7..8c6967f3fb11 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
@@ -40,9 +40,9 @@ | |||
40 | #include <linux/types.h> | 40 | #include <linux/types.h> |
41 | #include <linux/list.h> | 41 | #include <linux/list.h> |
42 | #include <linux/kref.h> | 42 | #include <linux/kref.h> |
43 | #include <linux/mutex.h> | ||
43 | 44 | ||
44 | #include <asm/atomic.h> | 45 | #include <asm/atomic.h> |
45 | #include <asm/semaphore.h> | ||
46 | 46 | ||
47 | #define CONFIGFS_ITEM_NAME_LEN 20 | 47 | #define CONFIGFS_ITEM_NAME_LEN 20 |
48 | 48 | ||
@@ -75,7 +75,6 @@ extern void config_item_init(struct config_item *); | |||
75 | extern void config_item_init_type_name(struct config_item *item, | 75 | extern void config_item_init_type_name(struct config_item *item, |
76 | const char *name, | 76 | const char *name, |
77 | struct config_item_type *type); | 77 | struct config_item_type *type); |
78 | extern void config_item_cleanup(struct config_item *); | ||
79 | 78 | ||
80 | extern struct config_item * config_item_get(struct config_item *); | 79 | extern struct config_item * config_item_get(struct config_item *); |
81 | extern void config_item_put(struct config_item *); | 80 | extern void config_item_put(struct config_item *); |
@@ -87,12 +86,10 @@ struct config_item_type { | |||
87 | struct configfs_attribute **ct_attrs; | 86 | struct configfs_attribute **ct_attrs; |
88 | }; | 87 | }; |
89 | 88 | ||
90 | |||
91 | /** | 89 | /** |
92 | * group - a group of config_items of a specific type, belonging | 90 | * group - a group of config_items of a specific type, belonging |
93 | * to a specific subsystem. | 91 | * to a specific subsystem. |
94 | */ | 92 | */ |
95 | |||
96 | struct config_group { | 93 | struct config_group { |
97 | struct config_item cg_item; | 94 | struct config_item cg_item; |
98 | struct list_head cg_children; | 95 | struct list_head cg_children; |
@@ -100,13 +97,11 @@ struct config_group { | |||
100 | struct config_group **default_groups; | 97 | struct config_group **default_groups; |
101 | }; | 98 | }; |
102 | 99 | ||
103 | |||
104 | extern void config_group_init(struct config_group *group); | 100 | extern void config_group_init(struct config_group *group); |
105 | extern void config_group_init_type_name(struct config_group *group, | 101 | extern void config_group_init_type_name(struct config_group *group, |
106 | const char *name, | 102 | const char *name, |
107 | struct config_item_type *type); | 103 | struct config_item_type *type); |
108 | 104 | ||
109 | |||
110 | static inline struct config_group *to_config_group(struct config_item *item) | 105 | static inline struct config_group *to_config_group(struct config_item *item) |
111 | { | 106 | { |
112 | return item ? container_of(item,struct config_group,cg_item) : NULL; | 107 | return item ? container_of(item,struct config_group,cg_item) : NULL; |
@@ -122,7 +117,8 @@ static inline void config_group_put(struct config_group *group) | |||
122 | config_item_put(&group->cg_item); | 117 | config_item_put(&group->cg_item); |
123 | } | 118 | } |
124 | 119 | ||
125 | extern struct config_item *config_group_find_obj(struct config_group *, const char *); | 120 | extern struct config_item *config_group_find_item(struct config_group *, |
121 | const char *); | ||
126 | 122 | ||
127 | 123 | ||
128 | struct configfs_attribute { | 124 | struct configfs_attribute { |
@@ -131,6 +127,22 @@ struct configfs_attribute { | |||
131 | mode_t ca_mode; | 127 | mode_t ca_mode; |
132 | }; | 128 | }; |
133 | 129 | ||
130 | /* | ||
131 | * Users often need to create attribute structures for their configurable | ||
132 | * attributes, containing a configfs_attribute member and function pointers | ||
133 | * for the show() and store() operations on that attribute. They can use | ||
134 | * this macro (similar to sysfs' __ATTR) to make defining attributes easier. | ||
135 | */ | ||
136 | #define __CONFIGFS_ATTR(_name, _mode, _show, _store) \ | ||
137 | { \ | ||
138 | .attr = { \ | ||
139 | .ca_name = __stringify(_name), \ | ||
140 | .ca_mode = _mode, \ | ||
141 | .ca_owner = THIS_MODULE, \ | ||
142 | }, \ | ||
143 | .show = _show, \ | ||
144 | .store = _store, \ | ||
145 | } | ||
134 | 146 | ||
135 | /* | 147 | /* |
136 | * If allow_link() exists, the item can symlink(2) out to other | 148 | * If allow_link() exists, the item can symlink(2) out to other |
@@ -157,12 +169,13 @@ struct configfs_group_operations { | |||
157 | struct config_item *(*make_item)(struct config_group *group, const char *name); | 169 | struct config_item *(*make_item)(struct config_group *group, const char *name); |
158 | struct config_group *(*make_group)(struct config_group *group, const char *name); | 170 | struct config_group *(*make_group)(struct config_group *group, const char *name); |
159 | int (*commit_item)(struct config_item *item); | 171 | int (*commit_item)(struct config_item *item); |
172 | void (*disconnect_notify)(struct config_group *group, struct config_item *item); | ||
160 | void (*drop_item)(struct config_group *group, struct config_item *item); | 173 | void (*drop_item)(struct config_group *group, struct config_item *item); |
161 | }; | 174 | }; |
162 | 175 | ||
163 | struct configfs_subsystem { | 176 | struct configfs_subsystem { |
164 | struct config_group su_group; | 177 | struct config_group su_group; |
165 | struct semaphore su_sem; | 178 | struct mutex su_mutex; |
166 | }; | 179 | }; |
167 | 180 | ||
168 | static inline struct configfs_subsystem *to_configfs_subsystem(struct config_group *group) | 181 | static inline struct configfs_subsystem *to_configfs_subsystem(struct config_group *group) |
@@ -175,6 +188,11 @@ static inline struct configfs_subsystem *to_configfs_subsystem(struct config_gro | |||
175 | int configfs_register_subsystem(struct configfs_subsystem *subsys); | 188 | int configfs_register_subsystem(struct configfs_subsystem *subsys); |
176 | void configfs_unregister_subsystem(struct configfs_subsystem *subsys); | 189 | void configfs_unregister_subsystem(struct configfs_subsystem *subsys); |
177 | 190 | ||
191 | /* These functions can sleep and can alloc with GFP_KERNEL */ | ||
192 | /* WARNING: These cannot be called underneath configfs callbacks!! */ | ||
193 | int configfs_depend_item(struct configfs_subsystem *subsys, struct config_item *target); | ||
194 | void configfs_undepend_item(struct configfs_subsystem *subsys, struct config_item *target); | ||
195 | |||
178 | #endif /* __KERNEL__ */ | 196 | #endif /* __KERNEL__ */ |
179 | 197 | ||
180 | #endif /* _CONFIGFS_H_ */ | 198 | #endif /* _CONFIGFS_H_ */ |
diff --git a/include/linux/console.h b/include/linux/console.h index 62ef6e11d0d2..56a7bcda49cb 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #define _LINUX_CONSOLE_H_ 1 | 15 | #define _LINUX_CONSOLE_H_ 1 |
16 | 16 | ||
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/spinlock.h> | ||
19 | 18 | ||
20 | struct vc_data; | 19 | struct vc_data; |
21 | struct console_font_op; | 20 | struct console_font_op; |
@@ -99,6 +98,7 @@ struct console { | |||
99 | struct tty_driver *(*device)(struct console *, int *); | 98 | struct tty_driver *(*device)(struct console *, int *); |
100 | void (*unblank)(void); | 99 | void (*unblank)(void); |
101 | int (*setup)(struct console *, char *); | 100 | int (*setup)(struct console *, char *); |
101 | int (*early_setup)(void); | ||
102 | short flags; | 102 | short flags; |
103 | short index; | 103 | short index; |
104 | int cflag; | 104 | int cflag; |
@@ -107,6 +107,7 @@ struct console { | |||
107 | }; | 107 | }; |
108 | 108 | ||
109 | extern int add_preferred_console(char *name, int idx, char *options); | 109 | extern int add_preferred_console(char *name, int idx, char *options); |
110 | extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options); | ||
110 | extern void register_console(struct console *); | 111 | extern void register_console(struct console *); |
111 | extern int unregister_console(struct console *); | 112 | extern int unregister_console(struct console *); |
112 | extern struct console *console_drivers; | 113 | extern struct console *console_drivers; |
diff --git a/include/linux/consolemap.h b/include/linux/consolemap.h index 82c9a1f11020..06b2768c603f 100644 --- a/include/linux/consolemap.h +++ b/include/linux/consolemap.h | |||
@@ -8,9 +8,12 @@ | |||
8 | #define IBMPC_MAP 2 | 8 | #define IBMPC_MAP 2 |
9 | #define USER_MAP 3 | 9 | #define USER_MAP 3 |
10 | 10 | ||
11 | #include <linux/types.h> | ||
12 | |||
11 | struct vc_data; | 13 | struct vc_data; |
12 | 14 | ||
13 | extern unsigned char inverse_translate(struct vc_data *conp, int glyph); | 15 | extern u16 inverse_translate(struct vc_data *conp, int glyph, int use_unicode); |
14 | extern unsigned short *set_translate(int m, struct vc_data *vc); | 16 | extern unsigned short *set_translate(int m, struct vc_data *vc); |
15 | extern int conv_uni_to_pc(struct vc_data *conp, long ucs); | 17 | extern int conv_uni_to_pc(struct vc_data *conp, long ucs); |
18 | extern u32 conv_8bit_to_uni(unsigned char c); | ||
16 | void console_map_init(void); | 19 | void console_map_init(void); |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 3b2df2523f1d..c2236bbff412 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -120,7 +120,6 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) | |||
120 | 120 | ||
121 | #define lock_cpu_hotplug() do { } while (0) | 121 | #define lock_cpu_hotplug() do { } while (0) |
122 | #define unlock_cpu_hotplug() do { } while (0) | 122 | #define unlock_cpu_hotplug() do { } while (0) |
123 | #define lock_cpu_hotplug_interruptible() 0 | ||
124 | #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) | 123 | #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) |
125 | #define register_hotcpu_notifier(nb) do { (void)(nb); } while (0) | 124 | #define register_hotcpu_notifier(nb) do { (void)(nb); } while (0) |
126 | #define unregister_hotcpu_notifier(nb) do { (void)(nb); } while (0) | 125 | #define unregister_hotcpu_notifier(nb) do { (void)(nb); } while (0) |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 0de7e2ace822..357e8cfedc37 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -295,28 +295,8 @@ struct blkcipher_tfm { | |||
295 | }; | 295 | }; |
296 | 296 | ||
297 | struct cipher_tfm { | 297 | struct cipher_tfm { |
298 | void *cit_iv; | ||
299 | unsigned int cit_ivsize; | ||
300 | u32 cit_mode; | ||
301 | int (*cit_setkey)(struct crypto_tfm *tfm, | 298 | int (*cit_setkey)(struct crypto_tfm *tfm, |
302 | const u8 *key, unsigned int keylen); | 299 | const u8 *key, unsigned int keylen); |
303 | int (*cit_encrypt)(struct crypto_tfm *tfm, | ||
304 | struct scatterlist *dst, | ||
305 | struct scatterlist *src, | ||
306 | unsigned int nbytes); | ||
307 | int (*cit_encrypt_iv)(struct crypto_tfm *tfm, | ||
308 | struct scatterlist *dst, | ||
309 | struct scatterlist *src, | ||
310 | unsigned int nbytes, u8 *iv); | ||
311 | int (*cit_decrypt)(struct crypto_tfm *tfm, | ||
312 | struct scatterlist *dst, | ||
313 | struct scatterlist *src, | ||
314 | unsigned int nbytes); | ||
315 | int (*cit_decrypt_iv)(struct crypto_tfm *tfm, | ||
316 | struct scatterlist *dst, | ||
317 | struct scatterlist *src, | ||
318 | unsigned int nbytes, u8 *iv); | ||
319 | void (*cit_xor_block)(u8 *dst, const u8 *src); | ||
320 | void (*cit_encrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); | 300 | void (*cit_encrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
321 | void (*cit_decrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); | 301 | void (*cit_decrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
322 | }; | 302 | }; |
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 5a9c49534d08..104e51e20e14 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
@@ -38,6 +38,9 @@ struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent, | |||
38 | 38 | ||
39 | void debugfs_remove(struct dentry *dentry); | 39 | void debugfs_remove(struct dentry *dentry); |
40 | 40 | ||
41 | struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, | ||
42 | struct dentry *new_dir, const char *new_name); | ||
43 | |||
41 | struct dentry *debugfs_create_u8(const char *name, mode_t mode, | 44 | struct dentry *debugfs_create_u8(const char *name, mode_t mode, |
42 | struct dentry *parent, u8 *value); | 45 | struct dentry *parent, u8 *value); |
43 | struct dentry *debugfs_create_u16(const char *name, mode_t mode, | 46 | struct dentry *debugfs_create_u16(const char *name, mode_t mode, |
@@ -85,6 +88,12 @@ static inline struct dentry *debugfs_create_symlink(const char *name, | |||
85 | static inline void debugfs_remove(struct dentry *dentry) | 88 | static inline void debugfs_remove(struct dentry *dentry) |
86 | { } | 89 | { } |
87 | 90 | ||
91 | static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, | ||
92 | struct dentry *new_dir, char *new_name) | ||
93 | { | ||
94 | return ERR_PTR(-ENODEV); | ||
95 | } | ||
96 | |||
88 | static inline struct dentry *debugfs_create_u8(const char *name, mode_t mode, | 97 | static inline struct dentry *debugfs_create_u8(const char *name, mode_t mode, |
89 | struct dentry *parent, | 98 | struct dentry *parent, |
90 | u8 *value) | 99 | u8 *value) |
diff --git a/include/linux/device.h b/include/linux/device.h index 2e1a2988b7e1..be2debed70d2 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -238,7 +238,6 @@ extern int __must_check class_device_create_file(struct class_device *, | |||
238 | * @devt: for internal use by the driver core only. | 238 | * @devt: for internal use by the driver core only. |
239 | * @node: for internal use by the driver core only. | 239 | * @node: for internal use by the driver core only. |
240 | * @kobj: for internal use by the driver core only. | 240 | * @kobj: for internal use by the driver core only. |
241 | * @devt_attr: for internal use by the driver core only. | ||
242 | * @groups: optional additional groups to be created | 241 | * @groups: optional additional groups to be created |
243 | * @dev: if set, a symlink to the struct device is created in the sysfs | 242 | * @dev: if set, a symlink to the struct device is created in the sysfs |
244 | * directory for this struct class device. | 243 | * directory for this struct class device. |
@@ -263,8 +262,6 @@ struct class_device { | |||
263 | struct kobject kobj; | 262 | struct kobject kobj; |
264 | struct class * class; /* required */ | 263 | struct class * class; /* required */ |
265 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 264 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
266 | struct class_device_attribute *devt_attr; | ||
267 | struct class_device_attribute uevent_attr; | ||
268 | struct device * dev; /* not necessary, but nice to have */ | 265 | struct device * dev; /* not necessary, but nice to have */ |
269 | void * class_data; /* class-specific data */ | 266 | void * class_data; /* class-specific data */ |
270 | struct class_device *parent; /* parent of this child device, if there is one */ | 267 | struct class_device *parent; /* parent of this child device, if there is one */ |
@@ -419,8 +416,6 @@ struct device { | |||
419 | struct device_type *type; | 416 | struct device_type *type; |
420 | unsigned is_registered:1; | 417 | unsigned is_registered:1; |
421 | unsigned uevent_suppress:1; | 418 | unsigned uevent_suppress:1; |
422 | struct device_attribute uevent_attr; | ||
423 | struct device_attribute *devt_attr; | ||
424 | 419 | ||
425 | struct semaphore sem; /* semaphore to synchronize calls to | 420 | struct semaphore sem; /* semaphore to synchronize calls to |
426 | * its driver. | 421 | * its driver. |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 9a663c6db16a..2dc21cbeb304 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -31,7 +31,11 @@ static inline int valid_dma_direction(int dma_direction) | |||
31 | (dma_direction == DMA_FROM_DEVICE)); | 31 | (dma_direction == DMA_FROM_DEVICE)); |
32 | } | 32 | } |
33 | 33 | ||
34 | #ifdef CONFIG_HAS_DMA | ||
34 | #include <asm/dma-mapping.h> | 35 | #include <asm/dma-mapping.h> |
36 | #else | ||
37 | #include <asm-generic/dma-mapping-broken.h> | ||
38 | #endif | ||
35 | 39 | ||
36 | /* Backwards compat, remove in 2.7.x */ | 40 | /* Backwards compat, remove in 2.7.x */ |
37 | #define dma_sync_single dma_sync_single_for_cpu | 41 | #define dma_sync_single dma_sync_single_for_cpu |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index c94d8f1d62e5..a3b6035b6c86 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -21,29 +21,40 @@ | |||
21 | #ifndef DMAENGINE_H | 21 | #ifndef DMAENGINE_H |
22 | #define DMAENGINE_H | 22 | #define DMAENGINE_H |
23 | 23 | ||
24 | #ifdef CONFIG_DMA_ENGINE | ||
25 | |||
26 | #include <linux/device.h> | 24 | #include <linux/device.h> |
27 | #include <linux/uio.h> | 25 | #include <linux/uio.h> |
28 | #include <linux/kref.h> | 26 | #include <linux/kref.h> |
29 | #include <linux/completion.h> | 27 | #include <linux/completion.h> |
30 | #include <linux/rcupdate.h> | 28 | #include <linux/rcupdate.h> |
29 | #include <linux/dma-mapping.h> | ||
31 | 30 | ||
32 | /** | 31 | /** |
33 | * enum dma_event - resource PNP/power managment events | 32 | * enum dma_state - resource PNP/power managment state |
34 | * @DMA_RESOURCE_SUSPEND: DMA device going into low power state | 33 | * @DMA_RESOURCE_SUSPEND: DMA device going into low power state |
35 | * @DMA_RESOURCE_RESUME: DMA device returning to full power | 34 | * @DMA_RESOURCE_RESUME: DMA device returning to full power |
36 | * @DMA_RESOURCE_ADDED: DMA device added to the system | 35 | * @DMA_RESOURCE_AVAILABLE: DMA device available to the system |
37 | * @DMA_RESOURCE_REMOVED: DMA device removed from the system | 36 | * @DMA_RESOURCE_REMOVED: DMA device removed from the system |
38 | */ | 37 | */ |
39 | enum dma_event { | 38 | enum dma_state { |
40 | DMA_RESOURCE_SUSPEND, | 39 | DMA_RESOURCE_SUSPEND, |
41 | DMA_RESOURCE_RESUME, | 40 | DMA_RESOURCE_RESUME, |
42 | DMA_RESOURCE_ADDED, | 41 | DMA_RESOURCE_AVAILABLE, |
43 | DMA_RESOURCE_REMOVED, | 42 | DMA_RESOURCE_REMOVED, |
44 | }; | 43 | }; |
45 | 44 | ||
46 | /** | 45 | /** |
46 | * enum dma_state_client - state of the channel in the client | ||
47 | * @DMA_ACK: client would like to use, or was using this channel | ||
48 | * @DMA_DUP: client has already seen this channel, or is not using this channel | ||
49 | * @DMA_NAK: client does not want to see any more channels | ||
50 | */ | ||
51 | enum dma_state_client { | ||
52 | DMA_ACK, | ||
53 | DMA_DUP, | ||
54 | DMA_NAK, | ||
55 | }; | ||
56 | |||
57 | /** | ||
47 | * typedef dma_cookie_t - an opaque DMA cookie | 58 | * typedef dma_cookie_t - an opaque DMA cookie |
48 | * | 59 | * |
49 | * if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code | 60 | * if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code |
@@ -65,6 +76,31 @@ enum dma_status { | |||
65 | }; | 76 | }; |
66 | 77 | ||
67 | /** | 78 | /** |
79 | * enum dma_transaction_type - DMA transaction types/indexes | ||
80 | */ | ||
81 | enum dma_transaction_type { | ||
82 | DMA_MEMCPY, | ||
83 | DMA_XOR, | ||
84 | DMA_PQ_XOR, | ||
85 | DMA_DUAL_XOR, | ||
86 | DMA_PQ_UPDATE, | ||
87 | DMA_ZERO_SUM, | ||
88 | DMA_PQ_ZERO_SUM, | ||
89 | DMA_MEMSET, | ||
90 | DMA_MEMCPY_CRC32C, | ||
91 | DMA_INTERRUPT, | ||
92 | }; | ||
93 | |||
94 | /* last transaction type for creation of the capabilities mask */ | ||
95 | #define DMA_TX_TYPE_END (DMA_INTERRUPT + 1) | ||
96 | |||
97 | /** | ||
98 | * dma_cap_mask_t - capabilities bitmap modeled after cpumask_t. | ||
99 | * See linux/cpumask.h | ||
100 | */ | ||
101 | typedef struct { DECLARE_BITMAP(bits, DMA_TX_TYPE_END); } dma_cap_mask_t; | ||
102 | |||
103 | /** | ||
68 | * struct dma_chan_percpu - the per-CPU part of struct dma_chan | 104 | * struct dma_chan_percpu - the per-CPU part of struct dma_chan |
69 | * @refcount: local_t used for open-coded "bigref" counting | 105 | * @refcount: local_t used for open-coded "bigref" counting |
70 | * @memcpy_count: transaction counter | 106 | * @memcpy_count: transaction counter |
@@ -80,7 +116,6 @@ struct dma_chan_percpu { | |||
80 | 116 | ||
81 | /** | 117 | /** |
82 | * struct dma_chan - devices supply DMA channels, clients use them | 118 | * struct dma_chan - devices supply DMA channels, clients use them |
83 | * @client: ptr to the client user of this chan, will be %NULL when unused | ||
84 | * @device: ptr to the dma device who supplies this channel, always !%NULL | 119 | * @device: ptr to the dma device who supplies this channel, always !%NULL |
85 | * @cookie: last cookie value returned to client | 120 | * @cookie: last cookie value returned to client |
86 | * @chan_id: channel ID for sysfs | 121 | * @chan_id: channel ID for sysfs |
@@ -88,12 +123,10 @@ struct dma_chan_percpu { | |||
88 | * @refcount: kref, used in "bigref" slow-mode | 123 | * @refcount: kref, used in "bigref" slow-mode |
89 | * @slow_ref: indicates that the DMA channel is free | 124 | * @slow_ref: indicates that the DMA channel is free |
90 | * @rcu: the DMA channel's RCU head | 125 | * @rcu: the DMA channel's RCU head |
91 | * @client_node: used to add this to the client chan list | ||
92 | * @device_node: used to add this to the device chan list | 126 | * @device_node: used to add this to the device chan list |
93 | * @local: per-cpu pointer to a struct dma_chan_percpu | 127 | * @local: per-cpu pointer to a struct dma_chan_percpu |
94 | */ | 128 | */ |
95 | struct dma_chan { | 129 | struct dma_chan { |
96 | struct dma_client *client; | ||
97 | struct dma_device *device; | 130 | struct dma_device *device; |
98 | dma_cookie_t cookie; | 131 | dma_cookie_t cookie; |
99 | 132 | ||
@@ -105,11 +138,11 @@ struct dma_chan { | |||
105 | int slow_ref; | 138 | int slow_ref; |
106 | struct rcu_head rcu; | 139 | struct rcu_head rcu; |
107 | 140 | ||
108 | struct list_head client_node; | ||
109 | struct list_head device_node; | 141 | struct list_head device_node; |
110 | struct dma_chan_percpu *local; | 142 | struct dma_chan_percpu *local; |
111 | }; | 143 | }; |
112 | 144 | ||
145 | |||
113 | void dma_chan_cleanup(struct kref *kref); | 146 | void dma_chan_cleanup(struct kref *kref); |
114 | 147 | ||
115 | static inline void dma_chan_get(struct dma_chan *chan) | 148 | static inline void dma_chan_get(struct dma_chan *chan) |
@@ -134,169 +167,206 @@ static inline void dma_chan_put(struct dma_chan *chan) | |||
134 | 167 | ||
135 | /* | 168 | /* |
136 | * typedef dma_event_callback - function pointer to a DMA event callback | 169 | * typedef dma_event_callback - function pointer to a DMA event callback |
170 | * For each channel added to the system this routine is called for each client. | ||
171 | * If the client would like to use the channel it returns '1' to signal (ack) | ||
172 | * the dmaengine core to take out a reference on the channel and its | ||
173 | * corresponding device. A client must not 'ack' an available channel more | ||
174 | * than once. When a channel is removed all clients are notified. If a client | ||
175 | * is using the channel it must 'ack' the removal. A client must not 'ack' a | ||
176 | * removed channel more than once. | ||
177 | * @client - 'this' pointer for the client context | ||
178 | * @chan - channel to be acted upon | ||
179 | * @state - available or removed | ||
137 | */ | 180 | */ |
138 | typedef void (*dma_event_callback) (struct dma_client *client, | 181 | struct dma_client; |
139 | struct dma_chan *chan, enum dma_event event); | 182 | typedef enum dma_state_client (*dma_event_callback) (struct dma_client *client, |
183 | struct dma_chan *chan, enum dma_state state); | ||
140 | 184 | ||
141 | /** | 185 | /** |
142 | * struct dma_client - info on the entity making use of DMA services | 186 | * struct dma_client - info on the entity making use of DMA services |
143 | * @event_callback: func ptr to call when something happens | 187 | * @event_callback: func ptr to call when something happens |
144 | * @chan_count: number of chans allocated | 188 | * @cap_mask: only return channels that satisfy the requested capabilities |
145 | * @chans_desired: number of chans requested. Can be +/- chan_count | 189 | * a value of zero corresponds to any capability |
146 | * @lock: protects access to the channels list | ||
147 | * @channels: the list of DMA channels allocated | ||
148 | * @global_node: list_head for global dma_client_list | 190 | * @global_node: list_head for global dma_client_list |
149 | */ | 191 | */ |
150 | struct dma_client { | 192 | struct dma_client { |
151 | dma_event_callback event_callback; | 193 | dma_event_callback event_callback; |
152 | unsigned int chan_count; | 194 | dma_cap_mask_t cap_mask; |
153 | unsigned int chans_desired; | ||
154 | |||
155 | spinlock_t lock; | ||
156 | struct list_head channels; | ||
157 | struct list_head global_node; | 195 | struct list_head global_node; |
158 | }; | 196 | }; |
159 | 197 | ||
198 | typedef void (*dma_async_tx_callback)(void *dma_async_param); | ||
199 | /** | ||
200 | * struct dma_async_tx_descriptor - async transaction descriptor | ||
201 | * ---dma generic offload fields--- | ||
202 | * @cookie: tracking cookie for this transaction, set to -EBUSY if | ||
203 | * this tx is sitting on a dependency list | ||
204 | * @ack: the descriptor can not be reused until the client acknowledges | ||
205 | * receipt, i.e. has has a chance to establish any dependency chains | ||
206 | * @phys: physical address of the descriptor | ||
207 | * @tx_list: driver common field for operations that require multiple | ||
208 | * descriptors | ||
209 | * @chan: target channel for this operation | ||
210 | * @tx_submit: set the prepared descriptor(s) to be executed by the engine | ||
211 | * @tx_set_dest: set a destination address in a hardware descriptor | ||
212 | * @tx_set_src: set a source address in a hardware descriptor | ||
213 | * @callback: routine to call after this operation is complete | ||
214 | * @callback_param: general parameter to pass to the callback routine | ||
215 | * ---async_tx api specific fields--- | ||
216 | * @depend_list: at completion this list of transactions are submitted | ||
217 | * @depend_node: allow this transaction to be executed after another | ||
218 | * transaction has completed, possibly on another channel | ||
219 | * @parent: pointer to the next level up in the dependency chain | ||
220 | * @lock: protect the dependency list | ||
221 | */ | ||
222 | struct dma_async_tx_descriptor { | ||
223 | dma_cookie_t cookie; | ||
224 | int ack; | ||
225 | dma_addr_t phys; | ||
226 | struct list_head tx_list; | ||
227 | struct dma_chan *chan; | ||
228 | dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx); | ||
229 | void (*tx_set_dest)(dma_addr_t addr, | ||
230 | struct dma_async_tx_descriptor *tx, int index); | ||
231 | void (*tx_set_src)(dma_addr_t addr, | ||
232 | struct dma_async_tx_descriptor *tx, int index); | ||
233 | dma_async_tx_callback callback; | ||
234 | void *callback_param; | ||
235 | struct list_head depend_list; | ||
236 | struct list_head depend_node; | ||
237 | struct dma_async_tx_descriptor *parent; | ||
238 | spinlock_t lock; | ||
239 | }; | ||
240 | |||
160 | /** | 241 | /** |
161 | * struct dma_device - info on the entity supplying DMA services | 242 | * struct dma_device - info on the entity supplying DMA services |
162 | * @chancnt: how many DMA channels are supported | 243 | * @chancnt: how many DMA channels are supported |
163 | * @channels: the list of struct dma_chan | 244 | * @channels: the list of struct dma_chan |
164 | * @global_node: list_head for global dma_device_list | 245 | * @global_node: list_head for global dma_device_list |
246 | * @cap_mask: one or more dma_capability flags | ||
247 | * @max_xor: maximum number of xor sources, 0 if no capability | ||
165 | * @refcount: reference count | 248 | * @refcount: reference count |
166 | * @done: IO completion struct | 249 | * @done: IO completion struct |
167 | * @dev_id: unique device ID | 250 | * @dev_id: unique device ID |
251 | * @dev: struct device reference for dma mapping api | ||
168 | * @device_alloc_chan_resources: allocate resources and return the | 252 | * @device_alloc_chan_resources: allocate resources and return the |
169 | * number of allocated descriptors | 253 | * number of allocated descriptors |
170 | * @device_free_chan_resources: release DMA channel's resources | 254 | * @device_free_chan_resources: release DMA channel's resources |
171 | * @device_memcpy_buf_to_buf: memcpy buf pointer to buf pointer | 255 | * @device_prep_dma_memcpy: prepares a memcpy operation |
172 | * @device_memcpy_buf_to_pg: memcpy buf pointer to struct page | 256 | * @device_prep_dma_xor: prepares a xor operation |
173 | * @device_memcpy_pg_to_pg: memcpy struct page/offset to struct page/offset | 257 | * @device_prep_dma_zero_sum: prepares a zero_sum operation |
174 | * @device_memcpy_complete: poll the status of an IOAT DMA transaction | 258 | * @device_prep_dma_memset: prepares a memset operation |
175 | * @device_memcpy_issue_pending: push appended descriptors to hardware | 259 | * @device_prep_dma_interrupt: prepares an end of chain interrupt operation |
260 | * @device_dependency_added: async_tx notifies the channel about new deps | ||
261 | * @device_issue_pending: push pending transactions to hardware | ||
176 | */ | 262 | */ |
177 | struct dma_device { | 263 | struct dma_device { |
178 | 264 | ||
179 | unsigned int chancnt; | 265 | unsigned int chancnt; |
180 | struct list_head channels; | 266 | struct list_head channels; |
181 | struct list_head global_node; | 267 | struct list_head global_node; |
268 | dma_cap_mask_t cap_mask; | ||
269 | int max_xor; | ||
182 | 270 | ||
183 | struct kref refcount; | 271 | struct kref refcount; |
184 | struct completion done; | 272 | struct completion done; |
185 | 273 | ||
186 | int dev_id; | 274 | int dev_id; |
275 | struct device *dev; | ||
187 | 276 | ||
188 | int (*device_alloc_chan_resources)(struct dma_chan *chan); | 277 | int (*device_alloc_chan_resources)(struct dma_chan *chan); |
189 | void (*device_free_chan_resources)(struct dma_chan *chan); | 278 | void (*device_free_chan_resources)(struct dma_chan *chan); |
190 | dma_cookie_t (*device_memcpy_buf_to_buf)(struct dma_chan *chan, | 279 | |
191 | void *dest, void *src, size_t len); | 280 | struct dma_async_tx_descriptor *(*device_prep_dma_memcpy)( |
192 | dma_cookie_t (*device_memcpy_buf_to_pg)(struct dma_chan *chan, | 281 | struct dma_chan *chan, size_t len, int int_en); |
193 | struct page *page, unsigned int offset, void *kdata, | 282 | struct dma_async_tx_descriptor *(*device_prep_dma_xor)( |
194 | size_t len); | 283 | struct dma_chan *chan, unsigned int src_cnt, size_t len, |
195 | dma_cookie_t (*device_memcpy_pg_to_pg)(struct dma_chan *chan, | 284 | int int_en); |
196 | struct page *dest_pg, unsigned int dest_off, | 285 | struct dma_async_tx_descriptor *(*device_prep_dma_zero_sum)( |
197 | struct page *src_pg, unsigned int src_off, size_t len); | 286 | struct dma_chan *chan, unsigned int src_cnt, size_t len, |
198 | enum dma_status (*device_memcpy_complete)(struct dma_chan *chan, | 287 | u32 *result, int int_en); |
288 | struct dma_async_tx_descriptor *(*device_prep_dma_memset)( | ||
289 | struct dma_chan *chan, int value, size_t len, int int_en); | ||
290 | struct dma_async_tx_descriptor *(*device_prep_dma_interrupt)( | ||
291 | struct dma_chan *chan); | ||
292 | |||
293 | void (*device_dependency_added)(struct dma_chan *chan); | ||
294 | enum dma_status (*device_is_tx_complete)(struct dma_chan *chan, | ||
199 | dma_cookie_t cookie, dma_cookie_t *last, | 295 | dma_cookie_t cookie, dma_cookie_t *last, |
200 | dma_cookie_t *used); | 296 | dma_cookie_t *used); |
201 | void (*device_memcpy_issue_pending)(struct dma_chan *chan); | 297 | void (*device_issue_pending)(struct dma_chan *chan); |
202 | }; | 298 | }; |
203 | 299 | ||
204 | /* --- public DMA engine API --- */ | 300 | /* --- public DMA engine API --- */ |
205 | 301 | ||
206 | struct dma_client *dma_async_client_register(dma_event_callback event_callback); | 302 | void dma_async_client_register(struct dma_client *client); |
207 | void dma_async_client_unregister(struct dma_client *client); | 303 | void dma_async_client_unregister(struct dma_client *client); |
208 | void dma_async_client_chan_request(struct dma_client *client, | 304 | void dma_async_client_chan_request(struct dma_client *client); |
209 | unsigned int number); | 305 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, |
306 | void *dest, void *src, size_t len); | ||
307 | dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, | ||
308 | struct page *page, unsigned int offset, void *kdata, size_t len); | ||
309 | dma_cookie_t dma_async_memcpy_pg_to_pg(struct dma_chan *chan, | ||
310 | struct page *dest_pg, unsigned int dest_off, struct page *src_pg, | ||
311 | unsigned int src_off, size_t len); | ||
312 | void dma_async_tx_descriptor_init(struct dma_async_tx_descriptor *tx, | ||
313 | struct dma_chan *chan); | ||
210 | 314 | ||
211 | /** | 315 | static inline void |
212 | * dma_async_memcpy_buf_to_buf - offloaded copy between virtual addresses | 316 | async_tx_ack(struct dma_async_tx_descriptor *tx) |
213 | * @chan: DMA channel to offload copy to | ||
214 | * @dest: destination address (virtual) | ||
215 | * @src: source address (virtual) | ||
216 | * @len: length | ||
217 | * | ||
218 | * Both @dest and @src must be mappable to a bus address according to the | ||
219 | * DMA mapping API rules for streaming mappings. | ||
220 | * Both @dest and @src must stay memory resident (kernel memory or locked | ||
221 | * user space pages). | ||
222 | */ | ||
223 | static inline dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, | ||
224 | void *dest, void *src, size_t len) | ||
225 | { | 317 | { |
226 | int cpu = get_cpu(); | 318 | tx->ack = 1; |
227 | per_cpu_ptr(chan->local, cpu)->bytes_transferred += len; | ||
228 | per_cpu_ptr(chan->local, cpu)->memcpy_count++; | ||
229 | put_cpu(); | ||
230 | |||
231 | return chan->device->device_memcpy_buf_to_buf(chan, dest, src, len); | ||
232 | } | 319 | } |
233 | 320 | ||
234 | /** | 321 | #define first_dma_cap(mask) __first_dma_cap(&(mask)) |
235 | * dma_async_memcpy_buf_to_pg - offloaded copy from address to page | 322 | static inline int __first_dma_cap(const dma_cap_mask_t *srcp) |
236 | * @chan: DMA channel to offload copy to | ||
237 | * @page: destination page | ||
238 | * @offset: offset in page to copy to | ||
239 | * @kdata: source address (virtual) | ||
240 | * @len: length | ||
241 | * | ||
242 | * Both @page/@offset and @kdata must be mappable to a bus address according | ||
243 | * to the DMA mapping API rules for streaming mappings. | ||
244 | * Both @page/@offset and @kdata must stay memory resident (kernel memory or | ||
245 | * locked user space pages) | ||
246 | */ | ||
247 | static inline dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, | ||
248 | struct page *page, unsigned int offset, void *kdata, size_t len) | ||
249 | { | 323 | { |
250 | int cpu = get_cpu(); | 324 | return min_t(int, DMA_TX_TYPE_END, |
251 | per_cpu_ptr(chan->local, cpu)->bytes_transferred += len; | 325 | find_first_bit(srcp->bits, DMA_TX_TYPE_END)); |
252 | per_cpu_ptr(chan->local, cpu)->memcpy_count++; | 326 | } |
253 | put_cpu(); | ||
254 | 327 | ||
255 | return chan->device->device_memcpy_buf_to_pg(chan, page, offset, | 328 | #define next_dma_cap(n, mask) __next_dma_cap((n), &(mask)) |
256 | kdata, len); | 329 | static inline int __next_dma_cap(int n, const dma_cap_mask_t *srcp) |
330 | { | ||
331 | return min_t(int, DMA_TX_TYPE_END, | ||
332 | find_next_bit(srcp->bits, DMA_TX_TYPE_END, n+1)); | ||
257 | } | 333 | } |
258 | 334 | ||
259 | /** | 335 | #define dma_cap_set(tx, mask) __dma_cap_set((tx), &(mask)) |
260 | * dma_async_memcpy_pg_to_pg - offloaded copy from page to page | 336 | static inline void |
261 | * @chan: DMA channel to offload copy to | 337 | __dma_cap_set(enum dma_transaction_type tx_type, dma_cap_mask_t *dstp) |
262 | * @dest_pg: destination page | ||
263 | * @dest_off: offset in page to copy to | ||
264 | * @src_pg: source page | ||
265 | * @src_off: offset in page to copy from | ||
266 | * @len: length | ||
267 | * | ||
268 | * Both @dest_page/@dest_off and @src_page/@src_off must be mappable to a bus | ||
269 | * address according to the DMA mapping API rules for streaming mappings. | ||
270 | * Both @dest_page/@dest_off and @src_page/@src_off must stay memory resident | ||
271 | * (kernel memory or locked user space pages). | ||
272 | */ | ||
273 | static inline dma_cookie_t dma_async_memcpy_pg_to_pg(struct dma_chan *chan, | ||
274 | struct page *dest_pg, unsigned int dest_off, struct page *src_pg, | ||
275 | unsigned int src_off, size_t len) | ||
276 | { | 338 | { |
277 | int cpu = get_cpu(); | 339 | set_bit(tx_type, dstp->bits); |
278 | per_cpu_ptr(chan->local, cpu)->bytes_transferred += len; | 340 | } |
279 | per_cpu_ptr(chan->local, cpu)->memcpy_count++; | ||
280 | put_cpu(); | ||
281 | 341 | ||
282 | return chan->device->device_memcpy_pg_to_pg(chan, dest_pg, dest_off, | 342 | #define dma_has_cap(tx, mask) __dma_has_cap((tx), &(mask)) |
283 | src_pg, src_off, len); | 343 | static inline int |
344 | __dma_has_cap(enum dma_transaction_type tx_type, dma_cap_mask_t *srcp) | ||
345 | { | ||
346 | return test_bit(tx_type, srcp->bits); | ||
284 | } | 347 | } |
285 | 348 | ||
349 | #define for_each_dma_cap_mask(cap, mask) \ | ||
350 | for ((cap) = first_dma_cap(mask); \ | ||
351 | (cap) < DMA_TX_TYPE_END; \ | ||
352 | (cap) = next_dma_cap((cap), (mask))) | ||
353 | |||
286 | /** | 354 | /** |
287 | * dma_async_memcpy_issue_pending - flush pending copies to HW | 355 | * dma_async_issue_pending - flush pending transactions to HW |
288 | * @chan: target DMA channel | 356 | * @chan: target DMA channel |
289 | * | 357 | * |
290 | * This allows drivers to push copies to HW in batches, | 358 | * This allows drivers to push copies to HW in batches, |
291 | * reducing MMIO writes where possible. | 359 | * reducing MMIO writes where possible. |
292 | */ | 360 | */ |
293 | static inline void dma_async_memcpy_issue_pending(struct dma_chan *chan) | 361 | static inline void dma_async_issue_pending(struct dma_chan *chan) |
294 | { | 362 | { |
295 | return chan->device->device_memcpy_issue_pending(chan); | 363 | return chan->device->device_issue_pending(chan); |
296 | } | 364 | } |
297 | 365 | ||
366 | #define dma_async_memcpy_issue_pending(chan) dma_async_issue_pending(chan) | ||
367 | |||
298 | /** | 368 | /** |
299 | * dma_async_memcpy_complete - poll for transaction completion | 369 | * dma_async_is_tx_complete - poll for transaction completion |
300 | * @chan: DMA channel | 370 | * @chan: DMA channel |
301 | * @cookie: transaction identifier to check status of | 371 | * @cookie: transaction identifier to check status of |
302 | * @last: returns last completed cookie, can be NULL | 372 | * @last: returns last completed cookie, can be NULL |
@@ -306,12 +376,15 @@ static inline void dma_async_memcpy_issue_pending(struct dma_chan *chan) | |||
306 | * internal state and can be used with dma_async_is_complete() to check | 376 | * internal state and can be used with dma_async_is_complete() to check |
307 | * the status of multiple cookies without re-checking hardware state. | 377 | * the status of multiple cookies without re-checking hardware state. |
308 | */ | 378 | */ |
309 | static inline enum dma_status dma_async_memcpy_complete(struct dma_chan *chan, | 379 | static inline enum dma_status dma_async_is_tx_complete(struct dma_chan *chan, |
310 | dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used) | 380 | dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used) |
311 | { | 381 | { |
312 | return chan->device->device_memcpy_complete(chan, cookie, last, used); | 382 | return chan->device->device_is_tx_complete(chan, cookie, last, used); |
313 | } | 383 | } |
314 | 384 | ||
385 | #define dma_async_memcpy_complete(chan, cookie, last, used)\ | ||
386 | dma_async_is_tx_complete(chan, cookie, last, used) | ||
387 | |||
315 | /** | 388 | /** |
316 | * dma_async_is_complete - test a cookie against chan state | 389 | * dma_async_is_complete - test a cookie against chan state |
317 | * @cookie: transaction identifier to test status of | 390 | * @cookie: transaction identifier to test status of |
@@ -334,6 +407,7 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie, | |||
334 | return DMA_IN_PROGRESS; | 407 | return DMA_IN_PROGRESS; |
335 | } | 408 | } |
336 | 409 | ||
410 | enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); | ||
337 | 411 | ||
338 | /* --- DMA device --- */ | 412 | /* --- DMA device --- */ |
339 | 413 | ||
@@ -362,5 +436,4 @@ dma_cookie_t dma_memcpy_pg_to_iovec(struct dma_chan *chan, struct iovec *iov, | |||
362 | struct dma_pinned_list *pinned_list, struct page *page, | 436 | struct dma_pinned_list *pinned_list, struct page *page, |
363 | unsigned int offset, size_t len); | 437 | unsigned int offset, size_t len); |
364 | 438 | ||
365 | #endif /* CONFIG_DMA_ENGINE */ | ||
366 | #endif /* DMAENGINE_H */ | 439 | #endif /* DMAENGINE_H */ |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index 904bf3d2d90b..b8ac7b01c45e 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -12,9 +12,17 @@ enum dmi_field { | |||
12 | DMI_PRODUCT_NAME, | 12 | DMI_PRODUCT_NAME, |
13 | DMI_PRODUCT_VERSION, | 13 | DMI_PRODUCT_VERSION, |
14 | DMI_PRODUCT_SERIAL, | 14 | DMI_PRODUCT_SERIAL, |
15 | DMI_PRODUCT_UUID, | ||
15 | DMI_BOARD_VENDOR, | 16 | DMI_BOARD_VENDOR, |
16 | DMI_BOARD_NAME, | 17 | DMI_BOARD_NAME, |
17 | DMI_BOARD_VERSION, | 18 | DMI_BOARD_VERSION, |
19 | DMI_BOARD_SERIAL, | ||
20 | DMI_BOARD_ASSET_TAG, | ||
21 | DMI_CHASSIS_VENDOR, | ||
22 | DMI_CHASSIS_TYPE, | ||
23 | DMI_CHASSIS_VERSION, | ||
24 | DMI_CHASSIS_SERIAL, | ||
25 | DMI_CHASSIS_ASSET_TAG, | ||
18 | DMI_STRING_MAX, | 26 | DMI_STRING_MAX, |
19 | }; | 27 | }; |
20 | 28 | ||
diff --git a/include/linux/ds17287rtc.h b/include/linux/ds17287rtc.h index c281ba42e28f..d85d3f497b96 100644 --- a/include/linux/ds17287rtc.h +++ b/include/linux/ds17287rtc.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #define __LINUX_DS17287RTC_H | 11 | #define __LINUX_DS17287RTC_H |
12 | 12 | ||
13 | #include <linux/rtc.h> /* get the user-level API */ | 13 | #include <linux/rtc.h> /* get the user-level API */ |
14 | #include <linux/spinlock.h> /* spinlock_t */ | ||
15 | #include <linux/mc146818rtc.h> | 14 | #include <linux/mc146818rtc.h> |
16 | 15 | ||
17 | /* Register A */ | 16 | /* Register A */ |
diff --git a/include/linux/edd.h b/include/linux/edd.h index b2b3e68aa512..7b647822d6dc 100644 --- a/include/linux/edd.h +++ b/include/linux/edd.h | |||
@@ -49,10 +49,6 @@ | |||
49 | #define EDD_MBR_SIG_MAX 16 /* max number of signatures to store */ | 49 | #define EDD_MBR_SIG_MAX 16 /* max number of signatures to store */ |
50 | #define EDD_MBR_SIG_NR_BUF 0x1ea /* addr of number of MBR signtaures at EDD_MBR_SIG_BUF | 50 | #define EDD_MBR_SIG_NR_BUF 0x1ea /* addr of number of MBR signtaures at EDD_MBR_SIG_BUF |
51 | in boot_params - treat this as 1 byte */ | 51 | in boot_params - treat this as 1 byte */ |
52 | #define EDD_CL_EQUALS 0x3d646465 /* "edd=" */ | ||
53 | #define EDD_CL_OFF 0x666f /* "of" for off */ | ||
54 | #define EDD_CL_SKIP 0x6b73 /* "sk" for skipmbr */ | ||
55 | #define EDD_CL_ON 0x6e6f /* "on" for on */ | ||
56 | 52 | ||
57 | #ifndef __ASSEMBLY__ | 53 | #ifndef __ASSEMBLY__ |
58 | 54 | ||
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 071c67abed86..6cdb97365e47 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -39,13 +39,8 @@ extern void eth_header_cache_update(struct hh_cache *hh, struct net_device *dev | |||
39 | extern int eth_header_cache(struct neighbour *neigh, | 39 | extern int eth_header_cache(struct neighbour *neigh, |
40 | struct hh_cache *hh); | 40 | struct hh_cache *hh); |
41 | 41 | ||
42 | extern struct net_device *alloc_etherdev(int sizeof_priv); | 42 | extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count); |
43 | static inline void eth_copy_and_sum (struct sk_buff *dest, | 43 | #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) |
44 | const unsigned char *src, | ||
45 | int len, int base) | ||
46 | { | ||
47 | memcpy (dest->data, src, len); | ||
48 | } | ||
49 | 44 | ||
50 | /** | 45 | /** |
51 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. | 46 | * is_zero_ether_addr - Determine if give Ethernet address is all zeros. |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index f2d248f8cc92..3a632244f31b 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -265,6 +265,7 @@ u32 ethtool_op_get_link(struct net_device *dev); | |||
265 | u32 ethtool_op_get_tx_csum(struct net_device *dev); | 265 | u32 ethtool_op_get_tx_csum(struct net_device *dev); |
266 | int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); | 266 | int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); |
267 | int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data); | 267 | int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data); |
268 | int ethtool_op_set_tx_ipv6_csum(struct net_device *dev, u32 data); | ||
268 | u32 ethtool_op_get_sg(struct net_device *dev); | 269 | u32 ethtool_op_get_sg(struct net_device *dev); |
269 | int ethtool_op_set_sg(struct net_device *dev, u32 data); | 270 | int ethtool_op_set_sg(struct net_device *dev, u32 data); |
270 | u32 ethtool_op_get_tso(struct net_device *dev); | 271 | u32 ethtool_op_get_tso(struct net_device *dev); |
diff --git a/include/linux/ext2_fs_sb.h b/include/linux/ext2_fs_sb.h index 4eda0ed76a48..d149f2959e67 100644 --- a/include/linux/ext2_fs_sb.h +++ b/include/linux/ext2_fs_sb.h | |||
@@ -33,6 +33,8 @@ struct ext2_sb_info { | |||
33 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ | 33 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ |
34 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ | 34 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ |
35 | unsigned long s_groups_count; /* Number of groups in the fs */ | 35 | unsigned long s_groups_count; /* Number of groups in the fs */ |
36 | unsigned long s_overhead_last; /* Last calculated overhead */ | ||
37 | unsigned long s_blocks_last; /* Last seen block count */ | ||
36 | struct buffer_head * s_sbh; /* Buffer containing the super block */ | 38 | struct buffer_head * s_sbh; /* Buffer containing the super block */ |
37 | struct ext2_super_block * s_es; /* Pointer to the super block in the buffer */ | 39 | struct ext2_super_block * s_es; /* Pointer to the super block in the buffer */ |
38 | struct buffer_head ** s_group_desc; | 40 | struct buffer_head ** s_group_desc; |
diff --git a/include/linux/ext3_fs_sb.h b/include/linux/ext3_fs_sb.h index f61309c81cc4..d3c08353edf6 100644 --- a/include/linux/ext3_fs_sb.h +++ b/include/linux/ext3_fs_sb.h | |||
@@ -38,6 +38,8 @@ struct ext3_sb_info { | |||
38 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ | 38 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ |
39 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ | 39 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ |
40 | unsigned long s_groups_count; /* Number of groups in the fs */ | 40 | unsigned long s_groups_count; /* Number of groups in the fs */ |
41 | unsigned long s_overhead_last; /* Last calculated overhead */ | ||
42 | unsigned long s_blocks_last; /* Last seen block count */ | ||
41 | struct buffer_head * s_sbh; /* Buffer containing the super block */ | 43 | struct buffer_head * s_sbh; /* Buffer containing the super block */ |
42 | struct ext3_super_block * s_es; /* Pointer to the super block in the buffer */ | 44 | struct ext3_super_block * s_es; /* Pointer to the super block in the buffer */ |
43 | struct buffer_head ** s_group_desc; | 45 | struct buffer_head ** s_group_desc; |
diff --git a/include/linux/ext4_fs_sb.h b/include/linux/ext4_fs_sb.h index 691a713139ce..2347557a327a 100644 --- a/include/linux/ext4_fs_sb.h +++ b/include/linux/ext4_fs_sb.h | |||
@@ -39,6 +39,8 @@ struct ext4_sb_info { | |||
39 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ | 39 | unsigned long s_gdb_count; /* Number of group descriptor blocks */ |
40 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ | 40 | unsigned long s_desc_per_block; /* Number of group descriptors per block */ |
41 | unsigned long s_groups_count; /* Number of groups in the fs */ | 41 | unsigned long s_groups_count; /* Number of groups in the fs */ |
42 | unsigned long s_overhead_last; /* Last calculated overhead */ | ||
43 | unsigned long s_blocks_last; /* Last seen block count */ | ||
42 | struct buffer_head * s_sbh; /* Buffer containing the super block */ | 44 | struct buffer_head * s_sbh; /* Buffer containing the super block */ |
43 | struct ext4_super_block * s_es; /* Pointer to the super block in the buffer */ | 45 | struct ext4_super_block * s_es; /* Pointer to the super block in the buffer */ |
44 | struct buffer_head ** s_group_desc; | 46 | struct buffer_head ** s_group_desc; |
diff --git a/include/linux/file.h b/include/linux/file.h index a59001e9ea58..0114fbc78061 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
@@ -73,6 +73,7 @@ extern struct file * FASTCALL(fget_light(unsigned int fd, int *fput_needed)); | |||
73 | extern void FASTCALL(set_close_on_exec(unsigned int fd, int flag)); | 73 | extern void FASTCALL(set_close_on_exec(unsigned int fd, int flag)); |
74 | extern void put_filp(struct file *); | 74 | extern void put_filp(struct file *); |
75 | extern int get_unused_fd(void); | 75 | extern int get_unused_fd(void); |
76 | extern int get_unused_fd_flags(int flags); | ||
76 | extern void FASTCALL(put_unused_fd(unsigned int fd)); | 77 | extern void FASTCALL(put_unused_fd(unsigned int fd)); |
77 | struct kmem_cache; | 78 | struct kmem_cache; |
78 | 79 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4f0b3bf5983c..e68780810279 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -44,7 +44,7 @@ extern int get_max_files(void); | |||
44 | struct inodes_stat_t { | 44 | struct inodes_stat_t { |
45 | int nr_inodes; | 45 | int nr_inodes; |
46 | int nr_unused; | 46 | int nr_unused; |
47 | int dummy[5]; | 47 | int dummy[5]; /* padding for sysctl ABI compatibility */ |
48 | }; | 48 | }; |
49 | extern struct inodes_stat_t inodes_stat; | 49 | extern struct inodes_stat_t inodes_stat; |
50 | 50 | ||
@@ -820,6 +820,10 @@ struct file_lock { | |||
820 | union { | 820 | union { |
821 | struct nfs_lock_info nfs_fl; | 821 | struct nfs_lock_info nfs_fl; |
822 | struct nfs4_lock_info nfs4_fl; | 822 | struct nfs4_lock_info nfs4_fl; |
823 | struct { | ||
824 | struct list_head link; /* link in AFS vnode's pending_locks list */ | ||
825 | int state; /* state of grant or error if -ve */ | ||
826 | } afs; | ||
823 | } fl_u; | 827 | } fl_u; |
824 | }; | 828 | }; |
825 | 829 | ||
@@ -1610,6 +1614,9 @@ extern int __invalidate_device(struct block_device *); | |||
1610 | extern int invalidate_partition(struct gendisk *, int); | 1614 | extern int invalidate_partition(struct gendisk *, int); |
1611 | #endif | 1615 | #endif |
1612 | extern int invalidate_inodes(struct super_block *); | 1616 | extern int invalidate_inodes(struct super_block *); |
1617 | unsigned long __invalidate_mapping_pages(struct address_space *mapping, | ||
1618 | pgoff_t start, pgoff_t end, | ||
1619 | bool be_atomic); | ||
1613 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 1620 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
1614 | pgoff_t start, pgoff_t end); | 1621 | pgoff_t start, pgoff_t end); |
1615 | 1622 | ||
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 534744efe30d..9fbe9d258e22 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -339,7 +339,7 @@ struct fuse_dirent { | |||
339 | char name[0]; | 339 | char name[0]; |
340 | }; | 340 | }; |
341 | 341 | ||
342 | #define FUSE_NAME_OFFSET ((unsigned) ((struct fuse_dirent *) 0)->name) | 342 | #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) |
343 | #define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1)) | 343 | #define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1)) |
344 | #define FUSE_DIRENT_SIZE(d) \ | 344 | #define FUSE_DIRENT_SIZE(d) \ |
345 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) | 345 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 17c29dca8354..540799bc85f8 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -329,12 +329,13 @@ extern void sysrq_timer_list_show(void); | |||
329 | #ifdef CONFIG_TIMER_STATS | 329 | #ifdef CONFIG_TIMER_STATS |
330 | 330 | ||
331 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | 331 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, |
332 | void *timerf, char * comm); | 332 | void *timerf, char *comm, |
333 | unsigned int timer_flag); | ||
333 | 334 | ||
334 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | 335 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) |
335 | { | 336 | { |
336 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | 337 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, |
337 | timer->function, timer->start_comm); | 338 | timer->function, timer->start_comm, 0); |
338 | } | 339 | } |
339 | 340 | ||
340 | extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, | 341 | extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index cae7d618030c..2eaba21b9b1a 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -90,7 +90,7 @@ extern s32 i2c_smbus_write_block_data(struct i2c_client * client, | |||
90 | const u8 *values); | 90 | const u8 *values); |
91 | /* Returns the number of read bytes */ | 91 | /* Returns the number of read bytes */ |
92 | extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, | 92 | extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, |
93 | u8 command, u8 *values); | 93 | u8 command, u8 length, u8 *values); |
94 | extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, | 94 | extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, |
95 | u8 command, u8 length, | 95 | u8 command, u8 length, |
96 | const u8 *values); | 96 | const u8 *values); |
@@ -150,15 +150,20 @@ struct i2c_driver { | |||
150 | 150 | ||
151 | /** | 151 | /** |
152 | * struct i2c_client - represent an I2C slave device | 152 | * struct i2c_client - represent an I2C slave device |
153 | * @flags: I2C_CLIENT_TEN indicates the device uses a ten bit chip address; | ||
154 | * I2C_CLIENT_PEC indicates it uses SMBus Packet Error Checking | ||
153 | * @addr: Address used on the I2C bus connected to the parent adapter. | 155 | * @addr: Address used on the I2C bus connected to the parent adapter. |
154 | * @name: Indicates the type of the device, usually a chip name that's | 156 | * @name: Indicates the type of the device, usually a chip name that's |
155 | * generic enough to hide second-sourcing and compatible revisions. | 157 | * generic enough to hide second-sourcing and compatible revisions. |
158 | * @adapter: manages the bus segment hosting this I2C device | ||
156 | * @dev: Driver model device node for the slave. | 159 | * @dev: Driver model device node for the slave. |
160 | * @irq: indicates the IRQ generated by this device (if any) | ||
157 | * @driver_name: Identifies new-style driver used with this device; also | 161 | * @driver_name: Identifies new-style driver used with this device; also |
158 | * used as the module name for hotplug/coldplug modprobe support. | 162 | * used as the module name for hotplug/coldplug modprobe support. |
159 | * | 163 | * |
160 | * An i2c_client identifies a single device (i.e. chip) connected to an | 164 | * An i2c_client identifies a single device (i.e. chip) connected to an |
161 | * i2c bus. The behaviour is defined by the routines of the driver. | 165 | * i2c bus. The behaviour exposed to Linux is defined by the driver |
166 | * managing the device. | ||
162 | */ | 167 | */ |
163 | struct i2c_client { | 168 | struct i2c_client { |
164 | unsigned short flags; /* div., see below */ | 169 | unsigned short flags; /* div., see below */ |
@@ -180,7 +185,8 @@ struct i2c_client { | |||
180 | 185 | ||
181 | static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) | 186 | static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) |
182 | { | 187 | { |
183 | return to_i2c_client(container_of(kobj, struct device, kobj)); | 188 | struct device * const dev = container_of(kobj, struct device, kobj); |
189 | return to_i2c_client(dev); | ||
184 | } | 190 | } |
185 | 191 | ||
186 | static inline void *i2c_get_clientdata (struct i2c_client *dev) | 192 | static inline void *i2c_get_clientdata (struct i2c_client *dev) |
@@ -201,7 +207,7 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data) | |||
201 | * @addr: stored in i2c_client.addr | 207 | * @addr: stored in i2c_client.addr |
202 | * @platform_data: stored in i2c_client.dev.platform_data | 208 | * @platform_data: stored in i2c_client.dev.platform_data |
203 | * @irq: stored in i2c_client.irq | 209 | * @irq: stored in i2c_client.irq |
204 | 210 | * | |
205 | * I2C doesn't actually support hardware probing, although controllers and | 211 | * I2C doesn't actually support hardware probing, although controllers and |
206 | * devices may be able to use I2C_SMBUS_QUICK to tell whether or not there's | 212 | * devices may be able to use I2C_SMBUS_QUICK to tell whether or not there's |
207 | * a device at a given address. Drivers commonly need more information than | 213 | * a device at a given address. Drivers commonly need more information than |
@@ -210,7 +216,7 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data) | |||
210 | * i2c_board_info is used to build tables of information listing I2C devices | 216 | * i2c_board_info is used to build tables of information listing I2C devices |
211 | * that are present. This information is used to grow the driver model tree | 217 | * that are present. This information is used to grow the driver model tree |
212 | * for "new style" I2C drivers. For mainboards this is done statically using | 218 | * for "new style" I2C drivers. For mainboards this is done statically using |
213 | * i2c_register_board_info(), where @bus_num represents an adapter that isn't | 219 | * i2c_register_board_info(); bus numbers identify adapters that aren't |
214 | * yet available. For add-on boards, i2c_new_device() does this dynamically | 220 | * yet available. For add-on boards, i2c_new_device() does this dynamically |
215 | * with the adapter already known. | 221 | * with the adapter already known. |
216 | */ | 222 | */ |
@@ -518,8 +524,9 @@ union i2c_smbus_data { | |||
518 | #define I2C_SMBUS_WORD_DATA 3 | 524 | #define I2C_SMBUS_WORD_DATA 3 |
519 | #define I2C_SMBUS_PROC_CALL 4 | 525 | #define I2C_SMBUS_PROC_CALL 4 |
520 | #define I2C_SMBUS_BLOCK_DATA 5 | 526 | #define I2C_SMBUS_BLOCK_DATA 5 |
521 | #define I2C_SMBUS_I2C_BLOCK_DATA 6 | 527 | #define I2C_SMBUS_I2C_BLOCK_BROKEN 6 |
522 | #define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */ | 528 | #define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */ |
529 | #define I2C_SMBUS_I2C_BLOCK_DATA 8 | ||
523 | 530 | ||
524 | 531 | ||
525 | /* ----- commands for the ioctl like i2c_command call: | 532 | /* ----- commands for the ioctl like i2c_command call: |
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 52f53e2e70c3..333a370a3bdc 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/workqueue.h> /* work_struct */ | 32 | #include <linux/workqueue.h> /* work_struct */ |
33 | #include <linux/mempool.h> | 33 | #include <linux/mempool.h> |
34 | #include <linux/mutex.h> | ||
34 | 35 | ||
35 | #include <asm/io.h> | 36 | #include <asm/io.h> |
36 | #include <asm/semaphore.h> /* Needed for MUTEX init macros */ | 37 | #include <asm/semaphore.h> /* Needed for MUTEX init macros */ |
@@ -425,7 +426,7 @@ struct i2o_device { | |||
425 | 426 | ||
426 | struct device device; | 427 | struct device device; |
427 | 428 | ||
428 | struct semaphore lock; /* device lock */ | 429 | struct mutex lock; /* device lock */ |
429 | }; | 430 | }; |
430 | 431 | ||
431 | /* | 432 | /* |
@@ -544,7 +545,7 @@ struct i2o_controller { | |||
544 | struct i2o_dma hrt; /* HW Resource Table */ | 545 | struct i2o_dma hrt; /* HW Resource Table */ |
545 | i2o_lct *lct; /* Logical Config Table */ | 546 | i2o_lct *lct; /* Logical Config Table */ |
546 | struct i2o_dma dlct; /* Temp LCT */ | 547 | struct i2o_dma dlct; /* Temp LCT */ |
547 | struct semaphore lct_lock; /* Lock for LCT updates */ | 548 | struct mutex lct_lock; /* Lock for LCT updates */ |
548 | struct i2o_dma status_block; /* IOP status block */ | 549 | struct i2o_dma status_block; /* IOP status block */ |
549 | 550 | ||
550 | struct i2o_io base; /* controller messaging unit */ | 551 | struct i2o_io base; /* controller messaging unit */ |
diff --git a/include/linux/idr.h b/include/linux/idr.h index 826803449db7..0edda411959c 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -78,9 +78,41 @@ void *idr_find(struct idr *idp, int id); | |||
78 | int idr_pre_get(struct idr *idp, gfp_t gfp_mask); | 78 | int idr_pre_get(struct idr *idp, gfp_t gfp_mask); |
79 | int idr_get_new(struct idr *idp, void *ptr, int *id); | 79 | int idr_get_new(struct idr *idp, void *ptr, int *id); |
80 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); | 80 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); |
81 | int idr_for_each(struct idr *idp, | ||
82 | int (*fn)(int id, void *p, void *data), void *data); | ||
81 | void *idr_replace(struct idr *idp, void *ptr, int id); | 83 | void *idr_replace(struct idr *idp, void *ptr, int id); |
82 | void idr_remove(struct idr *idp, int id); | 84 | void idr_remove(struct idr *idp, int id); |
85 | void idr_remove_all(struct idr *idp); | ||
83 | void idr_destroy(struct idr *idp); | 86 | void idr_destroy(struct idr *idp); |
84 | void idr_init(struct idr *idp); | 87 | void idr_init(struct idr *idp); |
85 | 88 | ||
89 | |||
90 | /* | ||
91 | * IDA - IDR based id allocator, use when translation from id to | ||
92 | * pointer isn't necessary. | ||
93 | */ | ||
94 | #define IDA_CHUNK_SIZE 128 /* 128 bytes per chunk */ | ||
95 | #define IDA_BITMAP_LONGS (128 / sizeof(long) - 1) | ||
96 | #define IDA_BITMAP_BITS (IDA_BITMAP_LONGS * sizeof(long) * 8) | ||
97 | |||
98 | struct ida_bitmap { | ||
99 | long nr_busy; | ||
100 | unsigned long bitmap[IDA_BITMAP_LONGS]; | ||
101 | }; | ||
102 | |||
103 | struct ida { | ||
104 | struct idr idr; | ||
105 | struct ida_bitmap *free_bitmap; | ||
106 | }; | ||
107 | |||
108 | #define IDA_INIT(name) { .idr = IDR_INIT(name), .free_bitmap = NULL, } | ||
109 | #define DEFINE_IDA(name) struct ida name = IDA_INIT(name) | ||
110 | |||
111 | int ida_pre_get(struct ida *ida, gfp_t gfp_mask); | ||
112 | int ida_get_new_above(struct ida *ida, int starting_id, int *p_id); | ||
113 | int ida_get_new(struct ida *ida, int *p_id); | ||
114 | void ida_remove(struct ida *ida, int id); | ||
115 | void ida_destroy(struct ida *ida); | ||
116 | void ida_init(struct ida *ida); | ||
117 | |||
86 | #endif /* __IDR_H__ */ | 118 | #endif /* __IDR_H__ */ |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index ecd61e8438a5..272f8c8c90da 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -227,6 +227,17 @@ struct ieee80211_cts { | |||
227 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10) | 227 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10) |
228 | #define WLAN_CAPABILITY_DSSS_OFDM (1<<13) | 228 | #define WLAN_CAPABILITY_DSSS_OFDM (1<<13) |
229 | 229 | ||
230 | /* 802.11g ERP information element */ | ||
231 | #define WLAN_ERP_NON_ERP_PRESENT (1<<0) | ||
232 | #define WLAN_ERP_USE_PROTECTION (1<<1) | ||
233 | #define WLAN_ERP_BARKER_PREAMBLE (1<<2) | ||
234 | |||
235 | /* WLAN_ERP_BARKER_PREAMBLE values */ | ||
236 | enum { | ||
237 | WLAN_ERP_PREAMBLE_SHORT = 0, | ||
238 | WLAN_ERP_PREAMBLE_LONG = 1, | ||
239 | }; | ||
240 | |||
230 | /* Status codes */ | 241 | /* Status codes */ |
231 | enum ieee80211_statuscode { | 242 | enum ieee80211_statuscode { |
232 | WLAN_STATUS_SUCCESS = 0, | 243 | WLAN_STATUS_SUCCESS = 0, |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 604c2434f71c..422084d18ce1 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -76,6 +76,8 @@ enum | |||
76 | #define IFLA_WEIGHT IFLA_WEIGHT | 76 | #define IFLA_WEIGHT IFLA_WEIGHT |
77 | IFLA_OPERSTATE, | 77 | IFLA_OPERSTATE, |
78 | IFLA_LINKMODE, | 78 | IFLA_LINKMODE, |
79 | IFLA_LINKINFO, | ||
80 | #define IFLA_LINKINFO IFLA_LINKINFO | ||
79 | __IFLA_MAX | 81 | __IFLA_MAX |
80 | }; | 82 | }; |
81 | 83 | ||
@@ -140,4 +142,49 @@ struct ifla_cacheinfo | |||
140 | __u32 retrans_time; | 142 | __u32 retrans_time; |
141 | }; | 143 | }; |
142 | 144 | ||
145 | enum | ||
146 | { | ||
147 | IFLA_INFO_UNSPEC, | ||
148 | IFLA_INFO_KIND, | ||
149 | IFLA_INFO_DATA, | ||
150 | IFLA_INFO_XSTATS, | ||
151 | __IFLA_INFO_MAX, | ||
152 | }; | ||
153 | |||
154 | #define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1) | ||
155 | |||
156 | /* VLAN section */ | ||
157 | |||
158 | enum | ||
159 | { | ||
160 | IFLA_VLAN_UNSPEC, | ||
161 | IFLA_VLAN_ID, | ||
162 | IFLA_VLAN_FLAGS, | ||
163 | IFLA_VLAN_EGRESS_QOS, | ||
164 | IFLA_VLAN_INGRESS_QOS, | ||
165 | __IFLA_VLAN_MAX, | ||
166 | }; | ||
167 | |||
168 | #define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1) | ||
169 | |||
170 | struct ifla_vlan_flags { | ||
171 | __u32 flags; | ||
172 | __u32 mask; | ||
173 | }; | ||
174 | |||
175 | enum | ||
176 | { | ||
177 | IFLA_VLAN_QOS_UNSPEC, | ||
178 | IFLA_VLAN_QOS_MAPPING, | ||
179 | __IFLA_VLAN_QOS_MAX | ||
180 | }; | ||
181 | |||
182 | #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1) | ||
183 | |||
184 | struct ifla_vlan_qos_mapping | ||
185 | { | ||
186 | __u32 from; | ||
187 | __u32 to; | ||
188 | }; | ||
189 | |||
143 | #endif /* _LINUX_IF_LINK_H */ | 190 | #endif /* _LINUX_IF_LINK_H */ |
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h new file mode 100644 index 000000000000..0d9d7ea2c1cc --- /dev/null +++ b/include/linux/if_macvlan.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef _LINUX_IF_MACVLAN_H | ||
2 | #define _LINUX_IF_MACVLAN_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | extern struct sk_buff *(*macvlan_handle_frame_hook)(struct sk_buff *); | ||
7 | |||
8 | #endif /* __KERNEL__ */ | ||
9 | #endif /* _LINUX_IF_MACVLAN_H */ | ||
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h index 768372f07caa..0f2f70d4e48c 100644 --- a/include/linux/if_ppp.h +++ b/include/linux/if_ppp.h | |||
@@ -110,6 +110,21 @@ struct ifpppcstatsreq { | |||
110 | struct ppp_comp_stats stats; | 110 | struct ppp_comp_stats stats; |
111 | }; | 111 | }; |
112 | 112 | ||
113 | /* For PPPIOCGL2TPSTATS */ | ||
114 | struct pppol2tp_ioc_stats { | ||
115 | __u16 tunnel_id; /* redundant */ | ||
116 | __u16 session_id; /* if zero, get tunnel stats */ | ||
117 | __u32 using_ipsec:1; /* valid only for session_id == 0 */ | ||
118 | aligned_u64 tx_packets; | ||
119 | aligned_u64 tx_bytes; | ||
120 | aligned_u64 tx_errors; | ||
121 | aligned_u64 rx_packets; | ||
122 | aligned_u64 rx_bytes; | ||
123 | aligned_u64 rx_seq_discards; | ||
124 | aligned_u64 rx_oos_packets; | ||
125 | aligned_u64 rx_errors; | ||
126 | }; | ||
127 | |||
113 | #define ifr__name b.ifr_ifrn.ifrn_name | 128 | #define ifr__name b.ifr_ifrn.ifrn_name |
114 | #define stats_ptr b.ifr_ifru.ifru_data | 129 | #define stats_ptr b.ifr_ifru.ifru_data |
115 | 130 | ||
@@ -146,6 +161,7 @@ struct ifpppcstatsreq { | |||
146 | #define PPPIOCDISCONN _IO('t', 57) /* disconnect channel */ | 161 | #define PPPIOCDISCONN _IO('t', 57) /* disconnect channel */ |
147 | #define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */ | 162 | #define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */ |
148 | #define PPPIOCGCHAN _IOR('t', 55, int) /* get ppp channel number */ | 163 | #define PPPIOCGCHAN _IOR('t', 55, int) /* get ppp channel number */ |
164 | #define PPPIOCGL2TPSTATS _IOR('t', 54, struct pppol2tp_ioc_stats) | ||
149 | 165 | ||
150 | #define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0) | 166 | #define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0) |
151 | #define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */ | 167 | #define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */ |
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h new file mode 100644 index 000000000000..516203b6fdeb --- /dev/null +++ b/include/linux/if_pppol2tp.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /*************************************************************************** | ||
2 | * Linux PPP over L2TP (PPPoL2TP) Socket Implementation (RFC 2661) | ||
3 | * | ||
4 | * This file supplies definitions required by the PPP over L2TP driver | ||
5 | * (pppol2tp.c). All version information wrt this file is located in pppol2tp.c | ||
6 | * | ||
7 | * License: | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version | ||
11 | * 2 of the License, or (at your option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef __LINUX_IF_PPPOL2TP_H | ||
16 | #define __LINUX_IF_PPPOL2TP_H | ||
17 | |||
18 | #include <asm/types.h> | ||
19 | |||
20 | #ifdef __KERNEL__ | ||
21 | #include <linux/in.h> | ||
22 | #endif | ||
23 | |||
24 | /* Structure used to connect() the socket to a particular tunnel UDP | ||
25 | * socket. | ||
26 | */ | ||
27 | struct pppol2tp_addr | ||
28 | { | ||
29 | pid_t pid; /* pid that owns the fd. | ||
30 | * 0 => current */ | ||
31 | int fd; /* FD of UDP socket to use */ | ||
32 | |||
33 | struct sockaddr_in addr; /* IP address and port to send to */ | ||
34 | |||
35 | __be16 s_tunnel, s_session; /* For matching incoming packets */ | ||
36 | __be16 d_tunnel, d_session; /* For sending outgoing packets */ | ||
37 | }; | ||
38 | |||
39 | /* Socket options: | ||
40 | * DEBUG - bitmask of debug message categories | ||
41 | * SENDSEQ - 0 => don't send packets with sequence numbers | ||
42 | * 1 => send packets with sequence numbers | ||
43 | * RECVSEQ - 0 => receive packet sequence numbers are optional | ||
44 | * 1 => drop receive packets without sequence numbers | ||
45 | * LNSMODE - 0 => act as LAC. | ||
46 | * 1 => act as LNS. | ||
47 | * REORDERTO - reorder timeout (in millisecs). If 0, don't try to reorder. | ||
48 | */ | ||
49 | enum { | ||
50 | PPPOL2TP_SO_DEBUG = 1, | ||
51 | PPPOL2TP_SO_RECVSEQ = 2, | ||
52 | PPPOL2TP_SO_SENDSEQ = 3, | ||
53 | PPPOL2TP_SO_LNSMODE = 4, | ||
54 | PPPOL2TP_SO_REORDERTO = 5, | ||
55 | }; | ||
56 | |||
57 | /* Debug message categories for the DEBUG socket option */ | ||
58 | enum { | ||
59 | PPPOL2TP_MSG_DEBUG = (1 << 0), /* verbose debug (if | ||
60 | * compiled in) */ | ||
61 | PPPOL2TP_MSG_CONTROL = (1 << 1), /* userspace - kernel | ||
62 | * interface */ | ||
63 | PPPOL2TP_MSG_SEQ = (1 << 2), /* sequence numbers */ | ||
64 | PPPOL2TP_MSG_DATA = (1 << 3), /* data packets */ | ||
65 | }; | ||
66 | |||
67 | |||
68 | |||
69 | #endif | ||
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 6f987be60fe2..25652545ba6e 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/semaphore.h> | 27 | #include <asm/semaphore.h> |
28 | #include <linux/ppp_channel.h> | 28 | #include <linux/ppp_channel.h> |
29 | #endif /* __KERNEL__ */ | 29 | #endif /* __KERNEL__ */ |
30 | #include <linux/if_pppol2tp.h> | ||
30 | 31 | ||
31 | /* For user-space programs to pick up these definitions | 32 | /* For user-space programs to pick up these definitions |
32 | * which they wouldn't get otherwise without defining __KERNEL__ | 33 | * which they wouldn't get otherwise without defining __KERNEL__ |
@@ -50,8 +51,9 @@ struct pppoe_addr{ | |||
50 | * Protocols supported by AF_PPPOX | 51 | * Protocols supported by AF_PPPOX |
51 | */ | 52 | */ |
52 | #define PX_PROTO_OE 0 /* Currently just PPPoE */ | 53 | #define PX_PROTO_OE 0 /* Currently just PPPoE */ |
53 | #define PX_MAX_PROTO 1 | 54 | #define PX_PROTO_OL2TP 1 /* Now L2TP also */ |
54 | 55 | #define PX_MAX_PROTO 2 | |
56 | |||
55 | struct sockaddr_pppox { | 57 | struct sockaddr_pppox { |
56 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 58 | sa_family_t sa_family; /* address family, AF_PPPOX */ |
57 | unsigned int sa_protocol; /* protocol identifier */ | 59 | unsigned int sa_protocol; /* protocol identifier */ |
@@ -60,6 +62,16 @@ struct sockaddr_pppox { | |||
60 | }sa_addr; | 62 | }sa_addr; |
61 | }__attribute__ ((packed)); | 63 | }__attribute__ ((packed)); |
62 | 64 | ||
65 | /* The use of the above union isn't viable because the size of this | ||
66 | * struct must stay fixed over time -- applications use sizeof(struct | ||
67 | * sockaddr_pppox) to fill it. We use a protocol specific sockaddr | ||
68 | * type instead. | ||
69 | */ | ||
70 | struct sockaddr_pppol2tp { | ||
71 | sa_family_t sa_family; /* address family, AF_PPPOX */ | ||
72 | unsigned int sa_protocol; /* protocol identifier */ | ||
73 | struct pppol2tp_addr pppol2tp; | ||
74 | }__attribute__ ((packed)); | ||
63 | 75 | ||
64 | /********************************************************************* | 76 | /********************************************************************* |
65 | * | 77 | * |
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 88aef7b86ef4..42eb6945b93e 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -36,6 +36,7 @@ struct tun_struct { | |||
36 | unsigned long flags; | 36 | unsigned long flags; |
37 | int attached; | 37 | int attached; |
38 | uid_t owner; | 38 | uid_t owner; |
39 | gid_t group; | ||
39 | 40 | ||
40 | wait_queue_head_t read_wait; | 41 | wait_queue_head_t read_wait; |
41 | struct sk_buff_head readq; | 42 | struct sk_buff_head readq; |
@@ -78,6 +79,7 @@ struct tun_struct { | |||
78 | #define TUNSETPERSIST _IOW('T', 203, int) | 79 | #define TUNSETPERSIST _IOW('T', 203, int) |
79 | #define TUNSETOWNER _IOW('T', 204, int) | 80 | #define TUNSETOWNER _IOW('T', 204, int) |
80 | #define TUNSETLINK _IOW('T', 205, int) | 81 | #define TUNSETLINK _IOW('T', 205, int) |
82 | #define TUNSETGROUP _IOW('T', 206, int) | ||
81 | 83 | ||
82 | /* TUNSETIFF ifr flags */ | 84 | /* TUNSETIFF ifr flags */ |
83 | #define IFF_TUN 0x0001 | 85 | #define IFF_TUN 0x0001 |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 81e9bc93569b..f8443fdb124a 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -99,7 +99,7 @@ static inline void vlan_group_set_device(struct vlan_group *vg, int vlan_id, | |||
99 | } | 99 | } |
100 | 100 | ||
101 | struct vlan_priority_tci_mapping { | 101 | struct vlan_priority_tci_mapping { |
102 | unsigned long priority; | 102 | u32 priority; |
103 | unsigned short vlan_qos; /* This should be shifted when first set, so we only do it | 103 | unsigned short vlan_qos; /* This should be shifted when first set, so we only do it |
104 | * at provisioning time. | 104 | * at provisioning time. |
105 | * ((skb->priority << 13) & 0xE000) | 105 | * ((skb->priority << 13) & 0xE000) |
@@ -112,7 +112,10 @@ struct vlan_dev_info { | |||
112 | /** This will be the mapping that correlates skb->priority to | 112 | /** This will be the mapping that correlates skb->priority to |
113 | * 3 bits of VLAN QOS tags... | 113 | * 3 bits of VLAN QOS tags... |
114 | */ | 114 | */ |
115 | unsigned long ingress_priority_map[8]; | 115 | unsigned int nr_ingress_mappings; |
116 | u32 ingress_priority_map[8]; | ||
117 | |||
118 | unsigned int nr_egress_mappings; | ||
116 | struct vlan_priority_tci_mapping *egress_priority_map[16]; /* hash table */ | 119 | struct vlan_priority_tci_mapping *egress_priority_map[16]; /* hash table */ |
117 | 120 | ||
118 | unsigned short vlan_id; /* The VLAN Identifier for this interface. */ | 121 | unsigned short vlan_id; /* The VLAN Identifier for this interface. */ |
@@ -124,14 +127,8 @@ struct vlan_dev_info { | |||
124 | * like DHCP that use packet-filtering and don't understand | 127 | * like DHCP that use packet-filtering and don't understand |
125 | * 802.1Q | 128 | * 802.1Q |
126 | */ | 129 | */ |
127 | struct dev_mc_list *old_mc_list; /* old multi-cast list for the VLAN interface.. | ||
128 | * we save this so we can tell what changes were | ||
129 | * made, in order to feed the right changes down | ||
130 | * to the real hardware... | ||
131 | */ | ||
132 | int old_allmulti; /* similar to above. */ | ||
133 | int old_promiscuity; /* similar to above. */ | ||
134 | struct net_device *real_dev; /* the underlying device/interface */ | 130 | struct net_device *real_dev; /* the underlying device/interface */ |
131 | unsigned char real_dev_addr[ETH_ALEN]; | ||
135 | struct proc_dir_entry *dent; /* Holds the proc data */ | 132 | struct proc_dir_entry *dent; /* Holds the proc data */ |
136 | unsigned long cnt_inc_headroom_on_tx; /* How many times did we have to grow the skb on TX. */ | 133 | unsigned long cnt_inc_headroom_on_tx; /* How many times did we have to grow the skb on TX. */ |
137 | unsigned long cnt_encap_on_xmit; /* How many times did we have to encapsulate the skb on TX. */ | 134 | unsigned long cnt_encap_on_xmit; /* How many times did we have to encapsulate the skb on TX. */ |
@@ -395,6 +392,10 @@ enum vlan_ioctl_cmds { | |||
395 | GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */ | 392 | GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */ |
396 | }; | 393 | }; |
397 | 394 | ||
395 | enum vlan_flags { | ||
396 | VLAN_FLAG_REORDER_HDR = 0x1, | ||
397 | }; | ||
398 | |||
398 | enum vlan_name_types { | 399 | enum vlan_name_types { |
399 | VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */ | 400 | VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */ |
400 | VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */ | 401 | VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */ |
diff --git a/include/linux/init.h b/include/linux/init.h index 56ec4c62eee0..5b5285316339 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -171,9 +171,6 @@ struct obs_kernel_param { | |||
171 | #define __setup(str, fn) \ | 171 | #define __setup(str, fn) \ |
172 | __setup_param(str, fn, fn, 0) | 172 | __setup_param(str, fn, fn, 0) |
173 | 173 | ||
174 | #define __obsolete_setup(str) \ | ||
175 | __setup_null_param(str, __LINE__) | ||
176 | |||
177 | /* NOTE: fn is as per module_param, not __setup! Emits warning if fn | 174 | /* NOTE: fn is as per module_param, not __setup! Emits warning if fn |
178 | * returns non-zero. */ | 175 | * returns non-zero. */ |
179 | #define early_param(str, fn) \ | 176 | #define early_param(str, fn) \ |
@@ -239,7 +236,6 @@ void __init parse_early_param(void); | |||
239 | #define __setup_param(str, unique_id, fn) /* nothing */ | 236 | #define __setup_param(str, unique_id, fn) /* nothing */ |
240 | #define __setup_null_param(str, unique_id) /* nothing */ | 237 | #define __setup_null_param(str, unique_id) /* nothing */ |
241 | #define __setup(str, func) /* nothing */ | 238 | #define __setup(str, func) /* nothing */ |
242 | #define __obsolete_setup(str) /* nothing */ | ||
243 | #endif | 239 | #endif |
244 | 240 | ||
245 | /* Data marked not to be saved by software suspend */ | 241 | /* Data marked not to be saved by software suspend */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 276ccaa2670c..cab741c2d603 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/lockdep.h> | 8 | #include <linux/lockdep.h> |
9 | #include <linux/ipc.h> | 9 | #include <linux/ipc.h> |
10 | #include <linux/pid_namespace.h> | 10 | #include <linux/pid_namespace.h> |
11 | #include <linux/user_namespace.h> | ||
11 | 12 | ||
12 | #define INIT_FDTABLE \ | 13 | #define INIT_FDTABLE \ |
13 | { \ | 14 | { \ |
@@ -78,6 +79,7 @@ extern struct nsproxy init_nsproxy; | |||
78 | .uts_ns = &init_uts_ns, \ | 79 | .uts_ns = &init_uts_ns, \ |
79 | .mnt_ns = NULL, \ | 80 | .mnt_ns = NULL, \ |
80 | INIT_IPC_NS(ipc_ns) \ | 81 | INIT_IPC_NS(ipc_ns) \ |
82 | .user_ns = &init_user_ns, \ | ||
81 | } | 83 | } |
82 | 84 | ||
83 | #define INIT_SIGHAND(sighand) { \ | 85 | #define INIT_SIGHAND(sighand) { \ |
diff --git a/include/linux/io.h b/include/linux/io.h index 8423dd376514..e3b2dda6c8eb 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
@@ -63,32 +63,7 @@ void __iomem * devm_ioremap(struct device *dev, unsigned long offset, | |||
63 | void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, | 63 | void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, |
64 | unsigned long size); | 64 | unsigned long size); |
65 | void devm_iounmap(struct device *dev, void __iomem *addr); | 65 | void devm_iounmap(struct device *dev, void __iomem *addr); |
66 | 66 | int check_signature(const volatile void __iomem *io_addr, | |
67 | /** | 67 | const unsigned char *signature, int length); |
68 | * check_signature - find BIOS signatures | ||
69 | * @io_addr: mmio address to check | ||
70 | * @signature: signature block | ||
71 | * @length: length of signature | ||
72 | * | ||
73 | * Perform a signature comparison with the mmio address io_addr. This | ||
74 | * address should have been obtained by ioremap. | ||
75 | * Returns 1 on a match. | ||
76 | */ | ||
77 | |||
78 | static inline int check_signature(const volatile void __iomem *io_addr, | ||
79 | const unsigned char *signature, int length) | ||
80 | { | ||
81 | int retval = 0; | ||
82 | do { | ||
83 | if (readb(io_addr) != *signature) | ||
84 | goto out; | ||
85 | io_addr++; | ||
86 | signature++; | ||
87 | length--; | ||
88 | } while (length); | ||
89 | retval = 1; | ||
90 | out: | ||
91 | return retval; | ||
92 | } | ||
93 | 68 | ||
94 | #endif /* _LINUX_IO_H */ | 69 | #endif /* _LINUX_IO_H */ |
diff --git a/include/linux/ip_mp_alg.h b/include/linux/ip_mp_alg.h deleted file mode 100644 index e234e2008f5d..000000000000 --- a/include/linux/ip_mp_alg.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* ip_mp_alg.h: IPV4 multipath algorithm support, user-visible values. | ||
2 | * | ||
3 | * Copyright (C) 2004, 2005 Einar Lueck <elueck@de.ibm.com> | ||
4 | * Copyright (C) 2005 David S. Miller <davem@davemloft.net> | ||
5 | */ | ||
6 | |||
7 | #ifndef _LINUX_IP_MP_ALG_H | ||
8 | #define _LINUX_IP_MP_ALG_H | ||
9 | |||
10 | enum ip_mp_alg { | ||
11 | IP_MP_ALG_NONE, | ||
12 | IP_MP_ALG_RR, | ||
13 | IP_MP_ALG_DRR, | ||
14 | IP_MP_ALG_RANDOM, | ||
15 | IP_MP_ALG_WRANDOM, | ||
16 | __IP_MP_ALG_MAX | ||
17 | }; | ||
18 | |||
19 | #define IP_MP_ALG_MAX (__IP_MP_ALG_MAX - 1) | ||
20 | |||
21 | #endif /* _LINUX_IP_MP_ALG_H */ | ||
22 | |||
diff --git a/include/linux/ipc.h b/include/linux/ipc.h index 1980867a64a4..3fd3ddd5f0d9 100644 --- a/include/linux/ipc.h +++ b/include/linux/ipc.h | |||
@@ -52,6 +52,7 @@ struct ipc_perm | |||
52 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
53 | 53 | ||
54 | #include <linux/kref.h> | 54 | #include <linux/kref.h> |
55 | #include <linux/spinlock.h> | ||
55 | 56 | ||
56 | #define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ | 57 | #define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ |
57 | 58 | ||
@@ -92,6 +93,7 @@ extern struct ipc_namespace init_ipc_ns; | |||
92 | 93 | ||
93 | #ifdef CONFIG_SYSVIPC | 94 | #ifdef CONFIG_SYSVIPC |
94 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, | 95 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, |
96 | extern void free_ipc_ns(struct kref *kref); | ||
95 | extern struct ipc_namespace *copy_ipcs(unsigned long flags, | 97 | extern struct ipc_namespace *copy_ipcs(unsigned long flags, |
96 | struct ipc_namespace *ns); | 98 | struct ipc_namespace *ns); |
97 | #else | 99 | #else |
@@ -103,13 +105,9 @@ static inline struct ipc_namespace *copy_ipcs(unsigned long flags, | |||
103 | } | 105 | } |
104 | #endif | 106 | #endif |
105 | 107 | ||
106 | #ifdef CONFIG_IPC_NS | ||
107 | extern void free_ipc_ns(struct kref *kref); | ||
108 | #endif | ||
109 | |||
110 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | 108 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) |
111 | { | 109 | { |
112 | #ifdef CONFIG_IPC_NS | 110 | #ifdef CONFIG_SYSVIPC |
113 | if (ns) | 111 | if (ns) |
114 | kref_get(&ns->kref); | 112 | kref_get(&ns->kref); |
115 | #endif | 113 | #endif |
@@ -118,7 +116,7 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | |||
118 | 116 | ||
119 | static inline void put_ipc_ns(struct ipc_namespace *ns) | 117 | static inline void put_ipc_ns(struct ipc_namespace *ns) |
120 | { | 118 | { |
121 | #ifdef CONFIG_IPC_NS | 119 | #ifdef CONFIG_SYSVIPC |
122 | kref_put(&ns->kref, free_ipc_ns); | 120 | kref_put(&ns->kref, free_ipc_ns); |
123 | #endif | 121 | #endif |
124 | } | 122 | } |
@@ -126,5 +124,3 @@ static inline void put_ipc_ns(struct ipc_namespace *ns) | |||
126 | #endif /* __KERNEL__ */ | 124 | #endif /* __KERNEL__ */ |
127 | 125 | ||
128 | #endif /* _LINUX_IPC_H */ | 126 | #endif /* _LINUX_IPC_H */ |
129 | |||
130 | |||
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 648bd1f0912d..97983dc9df13 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -27,8 +27,8 @@ struct in6_ifreq { | |||
27 | int ifr6_ifindex; | 27 | int ifr6_ifindex; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | #define IPV6_SRCRT_STRICT 0x01 /* this hop must be a neighbor */ | 30 | #define IPV6_SRCRT_STRICT 0x01 /* Deprecated; will be removed */ |
31 | #define IPV6_SRCRT_TYPE_0 0 /* IPv6 type 0 Routing Header */ | 31 | #define IPV6_SRCRT_TYPE_0 0 /* Deprecated; will be removed */ |
32 | #define IPV6_SRCRT_TYPE_2 2 /* IPv6 type 2 Routing Header */ | 32 | #define IPV6_SRCRT_TYPE_2 2 /* IPv6 type 2 Routing Header */ |
33 | 33 | ||
34 | /* | 34 | /* |
@@ -247,7 +247,7 @@ struct inet6_skb_parm { | |||
247 | __u16 lastopt; | 247 | __u16 lastopt; |
248 | __u32 nhoff; | 248 | __u32 nhoff; |
249 | __u16 flags; | 249 | __u16 flags; |
250 | #ifdef CONFIG_IPV6_MIP6 | 250 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) |
251 | __u16 dsthao; | 251 | __u16 dsthao; |
252 | #endif | 252 | #endif |
253 | 253 | ||
@@ -299,8 +299,8 @@ struct ipv6_pinfo { | |||
299 | /* pktoption flags */ | 299 | /* pktoption flags */ |
300 | union { | 300 | union { |
301 | struct { | 301 | struct { |
302 | __u16 srcrt:2, | 302 | __u16 srcrt:1, |
303 | osrcrt:2, | 303 | osrcrt:1, |
304 | rxinfo:1, | 304 | rxinfo:1, |
305 | rxoinfo:1, | 305 | rxoinfo:1, |
306 | rxhlim:1, | 306 | rxhlim:1, |
diff --git a/include/linux/irda.h b/include/linux/irda.h index 945ba3110874..8e3735714c1c 100644 --- a/include/linux/irda.h +++ b/include/linux/irda.h | |||
@@ -216,6 +216,34 @@ struct if_irda_req { | |||
216 | #define ifr_dtr ifr_ifru.ifru_line.dtr | 216 | #define ifr_dtr ifr_ifru.ifru_line.dtr |
217 | #define ifr_rts ifr_ifru.ifru_line.rts | 217 | #define ifr_rts ifr_ifru.ifru_line.rts |
218 | 218 | ||
219 | |||
220 | /* IrDA netlink definitions */ | ||
221 | #define IRDA_NL_NAME "irda" | ||
222 | #define IRDA_NL_VERSION 1 | ||
223 | |||
224 | enum irda_nl_commands { | ||
225 | IRDA_NL_CMD_UNSPEC, | ||
226 | IRDA_NL_CMD_SET_MODE, | ||
227 | IRDA_NL_CMD_GET_MODE, | ||
228 | |||
229 | __IRDA_NL_CMD_AFTER_LAST | ||
230 | }; | ||
231 | #define IRDA_NL_CMD_MAX (__IRDA_NL_CMD_AFTER_LAST - 1) | ||
232 | |||
233 | enum nl80211_attrs { | ||
234 | IRDA_NL_ATTR_UNSPEC, | ||
235 | IRDA_NL_ATTR_IFNAME, | ||
236 | IRDA_NL_ATTR_MODE, | ||
237 | |||
238 | __IRDA_NL_ATTR_AFTER_LAST | ||
239 | }; | ||
240 | #define IRDA_NL_ATTR_MAX (__IRDA_NL_ATTR_AFTER_LAST - 1) | ||
241 | |||
242 | /* IrDA modes */ | ||
243 | #define IRDA_MODE_PRIMARY 0x1 | ||
244 | #define IRDA_MODE_SECONDARY 0x2 | ||
245 | #define IRDA_MODE_MONITOR 0x4 | ||
246 | |||
219 | #endif /* KERNEL_IRDA_H */ | 247 | #endif /* KERNEL_IRDA_H */ |
220 | 248 | ||
221 | 249 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index 1695054e8c63..44657197fcb0 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -161,6 +161,7 @@ struct irq_desc { | |||
161 | unsigned int wake_depth; /* nested wake enables */ | 161 | unsigned int wake_depth; /* nested wake enables */ |
162 | unsigned int irq_count; /* For detecting broken IRQs */ | 162 | unsigned int irq_count; /* For detecting broken IRQs */ |
163 | unsigned int irqs_unhandled; | 163 | unsigned int irqs_unhandled; |
164 | unsigned long last_unhandled; /* Aging timer for unhandled count */ | ||
164 | spinlock_t lock; | 165 | spinlock_t lock; |
165 | #ifdef CONFIG_SMP | 166 | #ifdef CONFIG_SMP |
166 | cpumask_t affinity; | 167 | cpumask_t affinity; |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index c288e41ba331..06cbf41d32d2 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -55,7 +55,7 @@ struct kobject { | |||
55 | struct kobject * parent; | 55 | struct kobject * parent; |
56 | struct kset * kset; | 56 | struct kset * kset; |
57 | struct kobj_type * ktype; | 57 | struct kobj_type * ktype; |
58 | struct dentry * dentry; | 58 | struct sysfs_dirent * sd; |
59 | wait_queue_head_t poll; | 59 | wait_queue_head_t poll; |
60 | }; | 60 | }; |
61 | 61 | ||
@@ -71,13 +71,14 @@ extern void kobject_init(struct kobject *); | |||
71 | extern void kobject_cleanup(struct kobject *); | 71 | extern void kobject_cleanup(struct kobject *); |
72 | 72 | ||
73 | extern int __must_check kobject_add(struct kobject *); | 73 | extern int __must_check kobject_add(struct kobject *); |
74 | extern int __must_check kobject_shadow_add(struct kobject *, struct dentry *); | 74 | extern int __must_check kobject_shadow_add(struct kobject *kobj, |
75 | struct sysfs_dirent *shadow_parent); | ||
75 | extern void kobject_del(struct kobject *); | 76 | extern void kobject_del(struct kobject *); |
76 | 77 | ||
77 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); | 78 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); |
78 | extern int __must_check kobject_shadow_rename(struct kobject *kobj, | 79 | extern int __must_check kobject_shadow_rename(struct kobject *kobj, |
79 | struct dentry *new_parent, | 80 | struct sysfs_dirent *new_parent, |
80 | const char *new_name); | 81 | const char *new_name); |
81 | extern int __must_check kobject_move(struct kobject *, struct kobject *); | 82 | extern int __must_check kobject_move(struct kobject *, struct kobject *); |
82 | 83 | ||
83 | extern int __must_check kobject_register(struct kobject *); | 84 | extern int __must_check kobject_register(struct kobject *); |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 2b139f66027f..dae7143644fe 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -279,6 +279,16 @@ static inline s64 ktime_to_us(const ktime_t kt) | |||
279 | return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec; | 279 | return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec; |
280 | } | 280 | } |
281 | 281 | ||
282 | static inline s64 ktime_us_delta(const ktime_t later, const ktime_t earlier) | ||
283 | { | ||
284 | return ktime_to_us(ktime_sub(later, earlier)); | ||
285 | } | ||
286 | |||
287 | static inline ktime_t ktime_add_us(const ktime_t kt, const u64 usec) | ||
288 | { | ||
289 | return ktime_add_ns(kt, usec * 1000); | ||
290 | } | ||
291 | |||
282 | /* | 292 | /* |
283 | * The resolution of the clocks. The resolution value is returned in | 293 | * The resolution of the clocks. The resolution value is returned in |
284 | * the clock_getres() system call to give application programmers an | 294 | * the clock_getres() system call to give application programmers an |
diff --git a/include/linux/leds.h b/include/linux/leds.h index 88afceffb7cb..494bed7c2fc1 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #define __LINUX_LEDS_H_INCLUDED | 13 | #define __LINUX_LEDS_H_INCLUDED |
14 | 14 | ||
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/spinlock.h> | ||
17 | 16 | ||
18 | struct device; | 17 | struct device; |
19 | struct class_device; | 18 | struct class_device; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index a3df64677ac3..47cd2a1c5544 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -196,7 +196,6 @@ enum { | |||
196 | ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ | 196 | ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ |
197 | ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */ | 197 | ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */ |
198 | 198 | ||
199 | ATA_PFLAG_FLUSH_PORT_TASK = (1 << 16), /* flush port task */ | ||
200 | ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ | 199 | ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ |
201 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ | 200 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ |
202 | ATA_PFLAG_GTM_VALID = (1 << 19), /* acpi_gtm data valid */ | 201 | ATA_PFLAG_GTM_VALID = (1 << 19), /* acpi_gtm data valid */ |
@@ -435,6 +434,7 @@ struct ata_device { | |||
435 | struct ata_port *ap; | 434 | struct ata_port *ap; |
436 | unsigned int devno; /* 0 or 1 */ | 435 | unsigned int devno; /* 0 or 1 */ |
437 | unsigned long flags; /* ATA_DFLAG_xxx */ | 436 | unsigned long flags; /* ATA_DFLAG_xxx */ |
437 | unsigned int horkage; /* List of broken features */ | ||
438 | struct scsi_device *sdev; /* attached SCSI device */ | 438 | struct scsi_device *sdev; /* attached SCSI device */ |
439 | #ifdef CONFIG_ATA_ACPI | 439 | #ifdef CONFIG_ATA_ACPI |
440 | acpi_handle acpi_handle; | 440 | acpi_handle acpi_handle; |
@@ -466,7 +466,6 @@ struct ata_device { | |||
466 | /* error history */ | 466 | /* error history */ |
467 | struct ata_ering ering; | 467 | struct ata_ering ering; |
468 | int spdn_cnt; | 468 | int spdn_cnt; |
469 | unsigned int horkage; /* List of broken features */ | ||
470 | }; | 469 | }; |
471 | 470 | ||
472 | /* Offset into struct ata_device. Fields above it are maintained | 471 | /* Offset into struct ata_device. Fields above it are maintained |
@@ -794,7 +793,6 @@ extern void ata_id_string(const u16 *id, unsigned char *s, | |||
794 | extern void ata_id_c_string(const u16 *id, unsigned char *s, | 793 | extern void ata_id_c_string(const u16 *id, unsigned char *s, |
795 | unsigned int ofs, unsigned int len); | 794 | unsigned int ofs, unsigned int len); |
796 | extern void ata_id_to_dma_mode(struct ata_device *dev, u8 unknown); | 795 | extern void ata_id_to_dma_mode(struct ata_device *dev, u8 unknown); |
797 | extern unsigned long ata_device_blacklisted(const struct ata_device *dev); | ||
798 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); | 796 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); |
799 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); | 797 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); |
800 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 798 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |
@@ -871,11 +869,11 @@ struct pci_bits { | |||
871 | unsigned long val; | 869 | unsigned long val; |
872 | }; | 870 | }; |
873 | 871 | ||
874 | extern int ata_pci_init_native_host(struct ata_host *host); | 872 | extern int ata_pci_init_sff_host(struct ata_host *host); |
875 | extern int ata_pci_init_bmdma(struct ata_host *host); | 873 | extern int ata_pci_init_bmdma(struct ata_host *host); |
876 | extern int ata_pci_prepare_native_host(struct pci_dev *pdev, | 874 | extern int ata_pci_prepare_sff_host(struct pci_dev *pdev, |
877 | const struct ata_port_info * const * ppi, | 875 | const struct ata_port_info * const * ppi, |
878 | struct ata_host **r_host); | 876 | struct ata_host **r_host); |
879 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 877 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |
880 | extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long); | 878 | extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long); |
881 | #endif /* CONFIG_PCI */ | 879 | #endif /* CONFIG_PCI */ |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 05707e2fccae..e2d1ce36b367 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -39,6 +39,7 @@ | |||
39 | struct nlm_host { | 39 | struct nlm_host { |
40 | struct hlist_node h_hash; /* doubly linked list */ | 40 | struct hlist_node h_hash; /* doubly linked list */ |
41 | struct sockaddr_in h_addr; /* peer address */ | 41 | struct sockaddr_in h_addr; /* peer address */ |
42 | struct sockaddr_in h_saddr; /* our address (optional) */ | ||
42 | struct rpc_clnt * h_rpcclnt; /* RPC client to talk to peer */ | 43 | struct rpc_clnt * h_rpcclnt; /* RPC client to talk to peer */ |
43 | char * h_name; /* remote hostname */ | 44 | char * h_name; /* remote hostname */ |
44 | u32 h_version; /* interface version */ | 45 | u32 h_version; /* interface version */ |
diff --git a/include/linux/lzo.h b/include/linux/lzo.h index 582d8b711a13..d793497ec1ca 100644 --- a/include/linux/lzo.h +++ b/include/linux/lzo.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #define LZO1X_MEM_COMPRESS (16384 * sizeof(unsigned char *)) | 17 | #define LZO1X_MEM_COMPRESS (16384 * sizeof(unsigned char *)) |
18 | #define LZO1X_1_MEM_COMPRESS LZO1X_MEM_COMPRESS | 18 | #define LZO1X_1_MEM_COMPRESS LZO1X_MEM_COMPRESS |
19 | 19 | ||
20 | #define lzo1x_worst_compress(x) (x + (x / 64) + 16 + 3) | 20 | #define lzo1x_worst_compress(x) ((x) + ((x) / 16) + 64 + 3) |
21 | 21 | ||
22 | /* This requires 'workmem' of size LZO1X_1_MEM_COMPRESS */ | 22 | /* This requires 'workmem' of size LZO1X_1_MEM_COMPRESS */ |
23 | int lzo1x_1_compress(const unsigned char *src, size_t src_len, | 23 | int lzo1x_1_compress(const unsigned char *src, size_t src_len, |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index b372f5910fc1..cfb78fb2c046 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -172,6 +172,7 @@ struct mlx4_caps { | |||
172 | int num_pds; | 172 | int num_pds; |
173 | int reserved_pds; | 173 | int reserved_pds; |
174 | int mtt_entry_sz; | 174 | int mtt_entry_sz; |
175 | u32 max_msg_sz; | ||
175 | u32 page_size_cap; | 176 | u32 page_size_cap; |
176 | u32 flags; | 177 | u32 flags; |
177 | u16 stat_rate_support; | 178 | u16 stat_rate_support; |
@@ -322,6 +323,7 @@ int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, struct mlx4_mtt *mtt, | |||
322 | u64 db_rec, struct mlx4_srq *srq); | 323 | u64 db_rec, struct mlx4_srq *srq); |
323 | void mlx4_srq_free(struct mlx4_dev *dev, struct mlx4_srq *srq); | 324 | void mlx4_srq_free(struct mlx4_dev *dev, struct mlx4_srq *srq); |
324 | int mlx4_srq_arm(struct mlx4_dev *dev, struct mlx4_srq *srq, int limit_watermark); | 325 | int mlx4_srq_arm(struct mlx4_dev *dev, struct mlx4_srq *srq, int limit_watermark); |
326 | int mlx4_srq_query(struct mlx4_dev *dev, struct mlx4_srq *srq, int *limit_watermark); | ||
325 | 327 | ||
326 | int mlx4_INIT_PORT(struct mlx4_dev *dev, int port); | 328 | int mlx4_INIT_PORT(struct mlx4_dev *dev, int port); |
327 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); | 329 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 10c57d279144..3968b943259a 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -282,6 +282,9 @@ int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | |||
282 | struct mlx4_qp_context *context, enum mlx4_qp_optpar optpar, | 282 | struct mlx4_qp_context *context, enum mlx4_qp_optpar optpar, |
283 | int sqd_event, struct mlx4_qp *qp); | 283 | int sqd_event, struct mlx4_qp *qp); |
284 | 284 | ||
285 | int mlx4_qp_query(struct mlx4_dev *dev, struct mlx4_qp *qp, | ||
286 | struct mlx4_qp_context *context); | ||
287 | |||
285 | static inline struct mlx4_qp *__mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn) | 288 | static inline struct mlx4_qp *__mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn) |
286 | { | 289 | { |
287 | return radix_tree_lookup(&dev->qp_table_tree, qpn & (dev->caps.num_qps - 1)); | 290 | return radix_tree_lookup(&dev->qp_table_tree, qpn & (dev->caps.num_qps - 1)); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 1c1207472bb4..97d0cddfd223 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _LINUX_MM_H | 2 | #define _LINUX_MM_H |
3 | 3 | ||
4 | #include <linux/errno.h> | 4 | #include <linux/errno.h> |
5 | #include <linux/capability.h> | ||
6 | 5 | ||
7 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
8 | 7 | ||
@@ -27,7 +26,6 @@ extern unsigned long max_mapnr; | |||
27 | 26 | ||
28 | extern unsigned long num_physpages; | 27 | extern unsigned long num_physpages; |
29 | extern void * high_memory; | 28 | extern void * high_memory; |
30 | extern unsigned long vmalloc_earlyreserve; | ||
31 | extern int page_cluster; | 29 | extern int page_cluster; |
32 | 30 | ||
33 | #ifdef CONFIG_SYSCTL | 31 | #ifdef CONFIG_SYSCTL |
@@ -1072,6 +1070,10 @@ extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned lo | |||
1072 | extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | 1070 | extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, |
1073 | unsigned long len, unsigned long prot, | 1071 | unsigned long len, unsigned long prot, |
1074 | unsigned long flag, unsigned long pgoff); | 1072 | unsigned long flag, unsigned long pgoff); |
1073 | extern unsigned long mmap_region(struct file *file, unsigned long addr, | ||
1074 | unsigned long len, unsigned long flags, | ||
1075 | unsigned int vm_flags, unsigned long pgoff, | ||
1076 | int accountable); | ||
1075 | 1077 | ||
1076 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, | 1078 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, |
1077 | unsigned long len, unsigned long prot, | 1079 | unsigned long len, unsigned long prot, |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index d09b1345a3a1..04b1636a970b 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -566,6 +566,11 @@ int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int, | |||
566 | int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, | 566 | int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, |
567 | struct file *, void __user *, size_t *, loff_t *); | 567 | struct file *, void __user *, size_t *, loff_t *); |
568 | 568 | ||
569 | extern int numa_zonelist_order_handler(struct ctl_table *, int, | ||
570 | struct file *, void __user *, size_t *, loff_t *); | ||
571 | extern char numa_zonelist_order[]; | ||
572 | #define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */ | ||
573 | |||
569 | #include <linux/topology.h> | 574 | #include <linux/topology.h> |
570 | /* Returns the number of the current Node. */ | 575 | /* Returns the number of the current Node. */ |
571 | #ifndef numa_node_id | 576 | #ifndef numa_node_id |
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h index 1fa4d9813b31..8eed44f8ca73 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h | |||
@@ -14,7 +14,7 @@ struct mnt_namespace { | |||
14 | int event; | 14 | int event; |
15 | }; | 15 | }; |
16 | 16 | ||
17 | extern struct mnt_namespace *copy_mnt_ns(int, struct mnt_namespace *, | 17 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, |
18 | struct fs_struct *); | 18 | struct fs_struct *); |
19 | extern void __put_mnt_ns(struct mnt_namespace *ns); | 19 | extern void __put_mnt_ns(struct mnt_namespace *ns); |
20 | 20 | ||
diff --git a/include/linux/module.h b/include/linux/module.h index e6e0f86ef5fc..b6a646cea1cb 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 | 6 | * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 |
7 | * Rewritten again by Rusty Russell, 2002 | 7 | * Rewritten again by Rusty Russell, 2002 |
8 | */ | 8 | */ |
9 | #include <linux/spinlock.h> | ||
10 | #include <linux/list.h> | 9 | #include <linux/list.h> |
11 | #include <linux/stat.h> | 10 | #include <linux/stat.h> |
12 | #include <linux/compiler.h> | 11 | #include <linux/compiler.h> |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 0e09c005dda8..f950921523f5 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -146,7 +146,7 @@ struct fat_boot_fsinfo { | |||
146 | }; | 146 | }; |
147 | 147 | ||
148 | struct msdos_dir_entry { | 148 | struct msdos_dir_entry { |
149 | __u8 name[8],ext[3]; /* name and extension */ | 149 | __u8 name[MSDOS_NAME];/* name and extension */ |
150 | __u8 attr; /* attribute bits */ | 150 | __u8 attr; /* attribute bits */ |
151 | __u8 lcase; /* Case for base and extension */ | 151 | __u8 lcase; /* Case for base and extension */ |
152 | __u8 ctime_cs; /* Creation time, centiseconds (0-199) */ | 152 | __u8 ctime_cs; /* Creation time, centiseconds (0-199) */ |
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index 83e39eb054d3..88766e43e121 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
@@ -148,8 +148,6 @@ struct ncp_nls_ioctl | |||
148 | #include <linux/ncp_fs_i.h> | 148 | #include <linux/ncp_fs_i.h> |
149 | #include <linux/ncp_fs_sb.h> | 149 | #include <linux/ncp_fs_sb.h> |
150 | 150 | ||
151 | /* undef because public define in umsdos_fs.h (ncp_fs.h isn't public) */ | ||
152 | #undef PRINTK | ||
153 | /* define because it is easy to change PRINTK to {*}PRINTK */ | 151 | /* define because it is easy to change PRINTK to {*}PRINTK */ |
154 | #define PRINTK(format, args...) printk(KERN_DEBUG format , ## args) | 152 | #define PRINTK(format, args...) printk(KERN_DEBUG format , ## args) |
155 | 153 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 3a70f553b28f..da7a13c97eb8 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -108,6 +108,14 @@ struct wireless_dev; | |||
108 | #define MAX_HEADER (LL_MAX_HEADER + 48) | 108 | #define MAX_HEADER (LL_MAX_HEADER + 48) |
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | struct net_device_subqueue | ||
112 | { | ||
113 | /* Give a control state for each queue. This struct may contain | ||
114 | * per-queue locks in the future. | ||
115 | */ | ||
116 | unsigned long state; | ||
117 | }; | ||
118 | |||
111 | /* | 119 | /* |
112 | * Network device statistics. Akin to the 2.0 ether stats but | 120 | * Network device statistics. Akin to the 2.0 ether stats but |
113 | * with byte counters. | 121 | * with byte counters. |
@@ -177,19 +185,25 @@ struct netif_rx_stats | |||
177 | 185 | ||
178 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); | 186 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); |
179 | 187 | ||
188 | struct dev_addr_list | ||
189 | { | ||
190 | struct dev_addr_list *next; | ||
191 | u8 da_addr[MAX_ADDR_LEN]; | ||
192 | u8 da_addrlen; | ||
193 | u8 da_synced; | ||
194 | int da_users; | ||
195 | int da_gusers; | ||
196 | }; | ||
180 | 197 | ||
181 | /* | 198 | /* |
182 | * We tag multicasts with these structures. | 199 | * We tag multicasts with these structures. |
183 | */ | 200 | */ |
184 | 201 | ||
185 | struct dev_mc_list | 202 | #define dev_mc_list dev_addr_list |
186 | { | 203 | #define dmi_addr da_addr |
187 | struct dev_mc_list *next; | 204 | #define dmi_addrlen da_addrlen |
188 | __u8 dmi_addr[MAX_ADDR_LEN]; | 205 | #define dmi_users da_users |
189 | unsigned char dmi_addrlen; | 206 | #define dmi_gusers da_gusers |
190 | int dmi_users; | ||
191 | int dmi_gusers; | ||
192 | }; | ||
193 | 207 | ||
194 | struct hh_cache | 208 | struct hh_cache |
195 | { | 209 | { |
@@ -314,9 +328,10 @@ struct net_device | |||
314 | /* Net device features */ | 328 | /* Net device features */ |
315 | unsigned long features; | 329 | unsigned long features; |
316 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ | 330 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ |
317 | #define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ | 331 | #define NETIF_F_IP_CSUM 2 /* Can checksum TCP/UDP over IPv4. */ |
318 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ | 332 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ |
319 | #define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ | 333 | #define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ |
334 | #define NETIF_F_IPV6_CSUM 16 /* Can checksum TCP/UDP over IPV6 */ | ||
320 | #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ | 335 | #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ |
321 | #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ | 336 | #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ |
322 | #define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ | 337 | #define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ |
@@ -325,6 +340,7 @@ struct net_device | |||
325 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ | 340 | #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ |
326 | #define NETIF_F_GSO 2048 /* Enable software GSO. */ | 341 | #define NETIF_F_GSO 2048 /* Enable software GSO. */ |
327 | #define NETIF_F_LLTX 4096 /* LockLess TX */ | 342 | #define NETIF_F_LLTX 4096 /* LockLess TX */ |
343 | #define NETIF_F_MULTI_QUEUE 16384 /* Has multiple TX/RX queues */ | ||
328 | 344 | ||
329 | /* Segmentation offload features */ | 345 | /* Segmentation offload features */ |
330 | #define NETIF_F_GSO_SHIFT 16 | 346 | #define NETIF_F_GSO_SHIFT 16 |
@@ -338,8 +354,11 @@ struct net_device | |||
338 | /* List of features with software fallbacks. */ | 354 | /* List of features with software fallbacks. */ |
339 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) | 355 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) |
340 | 356 | ||
357 | |||
341 | #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) | 358 | #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) |
342 | #define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) | 359 | #define NETIF_F_V4_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IP_CSUM) |
360 | #define NETIF_F_V6_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM) | ||
361 | #define NETIF_F_ALL_CSUM (NETIF_F_V4_CSUM | NETIF_F_V6_CSUM) | ||
343 | 362 | ||
344 | struct net_device *next_sched; | 363 | struct net_device *next_sched; |
345 | 364 | ||
@@ -388,7 +407,10 @@ struct net_device | |||
388 | unsigned char addr_len; /* hardware address length */ | 407 | unsigned char addr_len; /* hardware address length */ |
389 | unsigned short dev_id; /* for shared network cards */ | 408 | unsigned short dev_id; /* for shared network cards */ |
390 | 409 | ||
391 | struct dev_mc_list *mc_list; /* Multicast mac addresses */ | 410 | struct dev_addr_list *uc_list; /* Secondary unicast mac addresses */ |
411 | int uc_count; /* Number of installed ucasts */ | ||
412 | int uc_promisc; | ||
413 | struct dev_addr_list *mc_list; /* Multicast mac addresses */ | ||
392 | int mc_count; /* Number of installed mcasts */ | 414 | int mc_count; /* Number of installed mcasts */ |
393 | int promiscuity; | 415 | int promiscuity; |
394 | int allmulti; | 416 | int allmulti; |
@@ -493,6 +515,11 @@ struct net_device | |||
493 | void *saddr, | 515 | void *saddr, |
494 | unsigned len); | 516 | unsigned len); |
495 | int (*rebuild_header)(struct sk_buff *skb); | 517 | int (*rebuild_header)(struct sk_buff *skb); |
518 | #define HAVE_CHANGE_RX_FLAGS | ||
519 | void (*change_rx_flags)(struct net_device *dev, | ||
520 | int flags); | ||
521 | #define HAVE_SET_RX_MODE | ||
522 | void (*set_rx_mode)(struct net_device *dev); | ||
496 | #define HAVE_MULTICAST | 523 | #define HAVE_MULTICAST |
497 | void (*set_multicast_list)(struct net_device *dev); | 524 | void (*set_multicast_list)(struct net_device *dev); |
498 | #define HAVE_SET_MAC_ADDR | 525 | #define HAVE_SET_MAC_ADDR |
@@ -535,22 +562,29 @@ struct net_device | |||
535 | 562 | ||
536 | /* bridge stuff */ | 563 | /* bridge stuff */ |
537 | struct net_bridge_port *br_port; | 564 | struct net_bridge_port *br_port; |
565 | /* macvlan */ | ||
566 | struct macvlan_port *macvlan_port; | ||
538 | 567 | ||
539 | /* class/net/name entry */ | 568 | /* class/net/name entry */ |
540 | struct device dev; | 569 | struct device dev; |
541 | /* space for optional statistics and wireless sysfs groups */ | 570 | /* space for optional statistics and wireless sysfs groups */ |
542 | struct attribute_group *sysfs_groups[3]; | 571 | struct attribute_group *sysfs_groups[3]; |
572 | |||
573 | /* rtnetlink link ops */ | ||
574 | const struct rtnl_link_ops *rtnl_link_ops; | ||
575 | |||
576 | /* The TX queue control structures */ | ||
577 | unsigned int egress_subqueue_count; | ||
578 | struct net_device_subqueue egress_subqueue[0]; | ||
543 | }; | 579 | }; |
544 | #define to_net_dev(d) container_of(d, struct net_device, dev) | 580 | #define to_net_dev(d) container_of(d, struct net_device, dev) |
545 | 581 | ||
546 | #define NETDEV_ALIGN 32 | 582 | #define NETDEV_ALIGN 32 |
547 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) | 583 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) |
548 | 584 | ||
549 | static inline void *netdev_priv(struct net_device *dev) | 585 | static inline void *netdev_priv(const struct net_device *dev) |
550 | { | 586 | { |
551 | return (char *)dev + ((sizeof(struct net_device) | 587 | return dev->priv; |
552 | + NETDEV_ALIGN_CONST) | ||
553 | & ~NETDEV_ALIGN_CONST); | ||
554 | } | 588 | } |
555 | 589 | ||
556 | #define SET_MODULE_OWNER(dev) do { } while (0) | 590 | #define SET_MODULE_OWNER(dev) do { } while (0) |
@@ -702,6 +736,62 @@ static inline int netif_running(const struct net_device *dev) | |||
702 | return test_bit(__LINK_STATE_START, &dev->state); | 736 | return test_bit(__LINK_STATE_START, &dev->state); |
703 | } | 737 | } |
704 | 738 | ||
739 | /* | ||
740 | * Routines to manage the subqueues on a device. We only need start | ||
741 | * stop, and a check if it's stopped. All other device management is | ||
742 | * done at the overall netdevice level. | ||
743 | * Also test the device if we're multiqueue. | ||
744 | */ | ||
745 | static inline void netif_start_subqueue(struct net_device *dev, u16 queue_index) | ||
746 | { | ||
747 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
748 | clear_bit(__LINK_STATE_XOFF, &dev->egress_subqueue[queue_index].state); | ||
749 | #endif | ||
750 | } | ||
751 | |||
752 | static inline void netif_stop_subqueue(struct net_device *dev, u16 queue_index) | ||
753 | { | ||
754 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
755 | #ifdef CONFIG_NETPOLL_TRAP | ||
756 | if (netpoll_trap()) | ||
757 | return; | ||
758 | #endif | ||
759 | set_bit(__LINK_STATE_XOFF, &dev->egress_subqueue[queue_index].state); | ||
760 | #endif | ||
761 | } | ||
762 | |||
763 | static inline int netif_subqueue_stopped(const struct net_device *dev, | ||
764 | u16 queue_index) | ||
765 | { | ||
766 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
767 | return test_bit(__LINK_STATE_XOFF, | ||
768 | &dev->egress_subqueue[queue_index].state); | ||
769 | #else | ||
770 | return 0; | ||
771 | #endif | ||
772 | } | ||
773 | |||
774 | static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index) | ||
775 | { | ||
776 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
777 | #ifdef CONFIG_NETPOLL_TRAP | ||
778 | if (netpoll_trap()) | ||
779 | return; | ||
780 | #endif | ||
781 | if (test_and_clear_bit(__LINK_STATE_XOFF, | ||
782 | &dev->egress_subqueue[queue_index].state)) | ||
783 | __netif_schedule(dev); | ||
784 | #endif | ||
785 | } | ||
786 | |||
787 | static inline int netif_is_multiqueue(const struct net_device *dev) | ||
788 | { | ||
789 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
790 | return (!!(NETIF_F_MULTI_QUEUE & dev->features)); | ||
791 | #else | ||
792 | return 0; | ||
793 | #endif | ||
794 | } | ||
705 | 795 | ||
706 | /* Use this variant when it is known for sure that it | 796 | /* Use this variant when it is known for sure that it |
707 | * is executing from interrupt context. | 797 | * is executing from interrupt context. |
@@ -992,15 +1082,26 @@ static inline void netif_tx_disable(struct net_device *dev) | |||
992 | extern void ether_setup(struct net_device *dev); | 1082 | extern void ether_setup(struct net_device *dev); |
993 | 1083 | ||
994 | /* Support for loadable net-drivers */ | 1084 | /* Support for loadable net-drivers */ |
995 | extern struct net_device *alloc_netdev(int sizeof_priv, const char *name, | 1085 | extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, |
996 | void (*setup)(struct net_device *)); | 1086 | void (*setup)(struct net_device *), |
1087 | unsigned int queue_count); | ||
1088 | #define alloc_netdev(sizeof_priv, name, setup) \ | ||
1089 | alloc_netdev_mq(sizeof_priv, name, setup, 1) | ||
997 | extern int register_netdev(struct net_device *dev); | 1090 | extern int register_netdev(struct net_device *dev); |
998 | extern void unregister_netdev(struct net_device *dev); | 1091 | extern void unregister_netdev(struct net_device *dev); |
999 | /* Functions used for multicast support */ | 1092 | /* Functions used for secondary unicast and multicast support */ |
1000 | extern void dev_mc_upload(struct net_device *dev); | 1093 | extern void dev_set_rx_mode(struct net_device *dev); |
1094 | extern void __dev_set_rx_mode(struct net_device *dev); | ||
1095 | extern int dev_unicast_delete(struct net_device *dev, void *addr, int alen); | ||
1096 | extern int dev_unicast_add(struct net_device *dev, void *addr, int alen); | ||
1001 | extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); | 1097 | extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); |
1002 | extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); | 1098 | extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); |
1099 | extern int dev_mc_sync(struct net_device *to, struct net_device *from); | ||
1100 | extern void dev_mc_unsync(struct net_device *to, struct net_device *from); | ||
1003 | extern void dev_mc_discard(struct net_device *dev); | 1101 | extern void dev_mc_discard(struct net_device *dev); |
1102 | extern int __dev_addr_delete(struct dev_addr_list **list, int *count, void *addr, int alen, int all); | ||
1103 | extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly); | ||
1104 | extern void __dev_addr_discard(struct dev_addr_list **list); | ||
1004 | extern void dev_set_promiscuity(struct net_device *dev, int inc); | 1105 | extern void dev_set_promiscuity(struct net_device *dev, int inc); |
1005 | extern void dev_set_allmulti(struct net_device *dev, int inc); | 1106 | extern void dev_set_allmulti(struct net_device *dev, int inc); |
1006 | extern void netdev_state_change(struct net_device *dev); | 1107 | extern void netdev_state_change(struct net_device *dev); |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 10b5c6275706..0eed0b7ab2df 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -275,7 +275,8 @@ struct nf_queue_handler { | |||
275 | }; | 275 | }; |
276 | extern int nf_register_queue_handler(int pf, | 276 | extern int nf_register_queue_handler(int pf, |
277 | struct nf_queue_handler *qh); | 277 | struct nf_queue_handler *qh); |
278 | extern int nf_unregister_queue_handler(int pf); | 278 | extern int nf_unregister_queue_handler(int pf, |
279 | struct nf_queue_handler *qh); | ||
279 | extern void nf_unregister_queue_handlers(struct nf_queue_handler *qh); | 280 | extern void nf_unregister_queue_handlers(struct nf_queue_handler *qh); |
280 | extern void nf_reinject(struct sk_buff *skb, | 281 | extern void nf_reinject(struct sk_buff *skb, |
281 | struct nf_info *info, | 282 | struct nf_info *info, |
diff --git a/include/linux/netfilter/nf_conntrack_pptp.h b/include/linux/netfilter/nf_conntrack_pptp.h index 9d8144a488cd..c93061f33144 100644 --- a/include/linux/netfilter/nf_conntrack_pptp.h +++ b/include/linux/netfilter/nf_conntrack_pptp.h | |||
@@ -4,6 +4,8 @@ | |||
4 | 4 | ||
5 | #include <linux/netfilter/nf_conntrack_common.h> | 5 | #include <linux/netfilter/nf_conntrack_common.h> |
6 | 6 | ||
7 | extern const char *pptp_msg_name[]; | ||
8 | |||
7 | /* state of the control session */ | 9 | /* state of the control session */ |
8 | enum pptp_ctrlsess_state { | 10 | enum pptp_ctrlsess_state { |
9 | PPTP_SESSION_NONE, /* no session present */ | 11 | PPTP_SESSION_NONE, /* no session present */ |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 7e733a6ba4f6..64f425a855bb 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -141,22 +141,22 @@ struct xt_match | |||
141 | /* Arguments changed since 2.6.9, as this must now handle | 141 | /* Arguments changed since 2.6.9, as this must now handle |
142 | non-linear skb, using skb_header_pointer and | 142 | non-linear skb, using skb_header_pointer and |
143 | skb_ip_make_writable. */ | 143 | skb_ip_make_writable. */ |
144 | int (*match)(const struct sk_buff *skb, | 144 | bool (*match)(const struct sk_buff *skb, |
145 | const struct net_device *in, | 145 | const struct net_device *in, |
146 | const struct net_device *out, | 146 | const struct net_device *out, |
147 | const struct xt_match *match, | 147 | const struct xt_match *match, |
148 | const void *matchinfo, | 148 | const void *matchinfo, |
149 | int offset, | 149 | int offset, |
150 | unsigned int protoff, | 150 | unsigned int protoff, |
151 | int *hotdrop); | 151 | bool *hotdrop); |
152 | 152 | ||
153 | /* Called when user tries to insert an entry of this type. */ | 153 | /* Called when user tries to insert an entry of this type. */ |
154 | /* Should return true or false. */ | 154 | /* Should return true or false. */ |
155 | int (*checkentry)(const char *tablename, | 155 | bool (*checkentry)(const char *tablename, |
156 | const void *ip, | 156 | const void *ip, |
157 | const struct xt_match *match, | 157 | const struct xt_match *match, |
158 | void *matchinfo, | 158 | void *matchinfo, |
159 | unsigned int hook_mask); | 159 | unsigned int hook_mask); |
160 | 160 | ||
161 | /* Called when entry of this type deleted. */ | 161 | /* Called when entry of this type deleted. */ |
162 | void (*destroy)(const struct xt_match *match, void *matchinfo); | 162 | void (*destroy)(const struct xt_match *match, void *matchinfo); |
@@ -202,11 +202,11 @@ struct xt_target | |||
202 | hook_mask is a bitmask of hooks from which it can be | 202 | hook_mask is a bitmask of hooks from which it can be |
203 | called. */ | 203 | called. */ |
204 | /* Should return true or false. */ | 204 | /* Should return true or false. */ |
205 | int (*checkentry)(const char *tablename, | 205 | bool (*checkentry)(const char *tablename, |
206 | const void *entry, | 206 | const void *entry, |
207 | const struct xt_target *target, | 207 | const struct xt_target *target, |
208 | void *targinfo, | 208 | void *targinfo, |
209 | unsigned int hook_mask); | 209 | unsigned int hook_mask); |
210 | 210 | ||
211 | /* Called when entry of this type deleted. */ | 211 | /* Called when entry of this type deleted. */ |
212 | void (*destroy)(const struct xt_target *target, void *targinfo); | 212 | void (*destroy)(const struct xt_target *target, void *targinfo); |
diff --git a/include/linux/netfilter/xt_connlimit.h b/include/linux/netfilter/xt_connlimit.h new file mode 100644 index 000000000000..90ae8b474cb8 --- /dev/null +++ b/include/linux/netfilter/xt_connlimit.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef _XT_CONNLIMIT_H | ||
2 | #define _XT_CONNLIMIT_H | ||
3 | |||
4 | struct xt_connlimit_data; | ||
5 | |||
6 | struct xt_connlimit_info { | ||
7 | union { | ||
8 | u_int32_t v4_mask; | ||
9 | u_int32_t v6_mask[4]; | ||
10 | }; | ||
11 | unsigned int limit, inverse; | ||
12 | |||
13 | /* this needs to be at the end */ | ||
14 | struct xt_connlimit_data *data __attribute__((aligned(8))); | ||
15 | }; | ||
16 | |||
17 | #endif /* _XT_CONNLIMIT_H */ | ||
diff --git a/include/linux/netfilter/xt_u32.h b/include/linux/netfilter/xt_u32.h new file mode 100644 index 000000000000..9947f56cdbdd --- /dev/null +++ b/include/linux/netfilter/xt_u32.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef _XT_U32_H | ||
2 | #define _XT_U32_H 1 | ||
3 | |||
4 | enum xt_u32_ops { | ||
5 | XT_U32_AND, | ||
6 | XT_U32_LEFTSH, | ||
7 | XT_U32_RIGHTSH, | ||
8 | XT_U32_AT, | ||
9 | }; | ||
10 | |||
11 | struct xt_u32_location_element { | ||
12 | u_int32_t number; | ||
13 | u_int8_t nextop; | ||
14 | }; | ||
15 | |||
16 | struct xt_u32_value_element { | ||
17 | u_int32_t min; | ||
18 | u_int32_t max; | ||
19 | }; | ||
20 | |||
21 | /* | ||
22 | * Any way to allow for an arbitrary number of elements? | ||
23 | * For now, I settle with a limit of 10 each. | ||
24 | */ | ||
25 | #define XT_U32_MAXSIZE 10 | ||
26 | |||
27 | struct xt_u32_test { | ||
28 | struct xt_u32_location_element location[XT_U32_MAXSIZE+1]; | ||
29 | struct xt_u32_value_element value[XT_U32_MAXSIZE+1]; | ||
30 | u_int8_t nnums; | ||
31 | u_int8_t nvalues; | ||
32 | }; | ||
33 | |||
34 | struct xt_u32 { | ||
35 | struct xt_u32_test tests[XT_U32_MAXSIZE+1]; | ||
36 | u_int8_t ntests; | ||
37 | u_int8_t invert; | ||
38 | }; | ||
39 | |||
40 | #endif /* _XT_U32_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h b/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h index d9bceedfb3dc..daf50be22c9d 100644 --- a/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h +++ b/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h | |||
@@ -18,13 +18,13 @@ struct clusterip_config; | |||
18 | struct ipt_clusterip_tgt_info { | 18 | struct ipt_clusterip_tgt_info { |
19 | 19 | ||
20 | u_int32_t flags; | 20 | u_int32_t flags; |
21 | 21 | ||
22 | /* only relevant for new ones */ | 22 | /* only relevant for new ones */ |
23 | u_int8_t clustermac[6]; | 23 | u_int8_t clustermac[6]; |
24 | u_int16_t num_total_nodes; | 24 | u_int16_t num_total_nodes; |
25 | u_int16_t num_local_nodes; | 25 | u_int16_t num_local_nodes; |
26 | u_int16_t local_nodes[CLUSTERIP_MAX_NODES]; | 26 | u_int16_t local_nodes[CLUSTERIP_MAX_NODES]; |
27 | enum clusterip_hashmode hash_mode; | 27 | u_int32_t hash_mode; |
28 | u_int32_t hash_initval; | 28 | u_int32_t hash_initval; |
29 | 29 | ||
30 | struct clusterip_config *config; | 30 | struct clusterip_config *config; |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 4686f8342cbd..9a720f05888f 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -44,8 +44,14 @@ struct ip6t_ip6 { | |||
44 | char iniface[IFNAMSIZ], outiface[IFNAMSIZ]; | 44 | char iniface[IFNAMSIZ], outiface[IFNAMSIZ]; |
45 | unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; | 45 | unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; |
46 | 46 | ||
47 | /* ARGH, HopByHop uses 0, so can't do 0 = ANY, | 47 | /* Upper protocol number |
48 | instead IP6T_F_NOPROTO must be set */ | 48 | * - The allowed value is 0 (any) or protocol number of last parsable |
49 | * header, which is 50 (ESP), 59 (No Next Header), 135 (MH), or | ||
50 | * the non IPv6 extension headers. | ||
51 | * - The protocol numbers of IPv6 extension headers except of ESP and | ||
52 | * MH do not match any packets. | ||
53 | * - You also need to set IP6T_FLAGS_PROTO to "flags" to check protocol. | ||
54 | */ | ||
49 | u_int16_t proto; | 55 | u_int16_t proto; |
50 | /* TOS to match iff flags & IP6T_F_TOS */ | 56 | /* TOS to match iff flags & IP6T_F_TOS */ |
51 | u_int8_t tos; | 57 | u_int8_t tos; |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 7e7f33a38fc0..8726491de154 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | 17 | ||
18 | #define NFS4_BITMAP_SIZE 2 | ||
18 | #define NFS4_VERIFIER_SIZE 8 | 19 | #define NFS4_VERIFIER_SIZE 8 |
19 | #define NFS4_STATEID_SIZE 16 | 20 | #define NFS4_STATEID_SIZE 16 |
20 | #define NFS4_FHSIZE 128 | 21 | #define NFS4_FHSIZE 128 |
diff --git a/include/linux/nfs4_mount.h b/include/linux/nfs4_mount.h index 26b4c83f831d..a0dcf6655657 100644 --- a/include/linux/nfs4_mount.h +++ b/include/linux/nfs4_mount.h | |||
@@ -65,6 +65,7 @@ struct nfs4_mount_data { | |||
65 | #define NFS4_MOUNT_NOCTO 0x0010 /* 1 */ | 65 | #define NFS4_MOUNT_NOCTO 0x0010 /* 1 */ |
66 | #define NFS4_MOUNT_NOAC 0x0020 /* 1 */ | 66 | #define NFS4_MOUNT_NOAC 0x0020 /* 1 */ |
67 | #define NFS4_MOUNT_STRICTLOCK 0x1000 /* 1 */ | 67 | #define NFS4_MOUNT_STRICTLOCK 0x1000 /* 1 */ |
68 | #define NFS4_MOUNT_FLAGMASK 0xFFFF | 68 | #define NFS4_MOUNT_UNSHARED 0x8000 /* 1 */ |
69 | #define NFS4_MOUNT_FLAGMASK 0x9033 | ||
69 | 70 | ||
70 | #endif | 71 | #endif |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 0543439a97af..c098ae194f79 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -30,7 +30,9 @@ | |||
30 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
31 | 31 | ||
32 | #include <linux/in.h> | 32 | #include <linux/in.h> |
33 | #include <linux/kref.h> | ||
33 | #include <linux/mm.h> | 34 | #include <linux/mm.h> |
35 | #include <linux/namei.h> | ||
34 | #include <linux/pagemap.h> | 36 | #include <linux/pagemap.h> |
35 | #include <linux/rbtree.h> | 37 | #include <linux/rbtree.h> |
36 | #include <linux/rwsem.h> | 38 | #include <linux/rwsem.h> |
@@ -69,9 +71,8 @@ struct nfs_access_entry { | |||
69 | 71 | ||
70 | struct nfs4_state; | 72 | struct nfs4_state; |
71 | struct nfs_open_context { | 73 | struct nfs_open_context { |
72 | atomic_t count; | 74 | struct kref kref; |
73 | struct vfsmount *vfsmnt; | 75 | struct path path; |
74 | struct dentry *dentry; | ||
75 | struct rpc_cred *cred; | 76 | struct rpc_cred *cred; |
76 | struct nfs4_state *state; | 77 | struct nfs4_state *state; |
77 | fl_owner_t lockowner; | 78 | fl_owner_t lockowner; |
@@ -155,13 +156,9 @@ struct nfs_inode { | |||
155 | /* | 156 | /* |
156 | * This is the list of dirty unwritten pages. | 157 | * This is the list of dirty unwritten pages. |
157 | */ | 158 | */ |
158 | spinlock_t req_lock; | ||
159 | struct list_head dirty; | ||
160 | struct list_head commit; | ||
161 | struct radix_tree_root nfs_page_tree; | 159 | struct radix_tree_root nfs_page_tree; |
162 | 160 | ||
163 | unsigned int ndirty, | 161 | unsigned long ncommit, |
164 | ncommit, | ||
165 | npages; | 162 | npages; |
166 | 163 | ||
167 | /* Open contexts for shared mmap writes */ | 164 | /* Open contexts for shared mmap writes */ |
@@ -187,6 +184,7 @@ struct nfs_inode { | |||
187 | #define NFS_INO_INVALID_ACCESS 0x0008 /* cached access cred invalid */ | 184 | #define NFS_INO_INVALID_ACCESS 0x0008 /* cached access cred invalid */ |
188 | #define NFS_INO_INVALID_ACL 0x0010 /* cached acls are invalid */ | 185 | #define NFS_INO_INVALID_ACL 0x0010 /* cached acls are invalid */ |
189 | #define NFS_INO_REVAL_PAGECACHE 0x0020 /* must revalidate pagecache */ | 186 | #define NFS_INO_REVAL_PAGECACHE 0x0020 /* must revalidate pagecache */ |
187 | #define NFS_INO_REVAL_FORCED 0x0040 /* force revalidation ignoring a delegation */ | ||
190 | 188 | ||
191 | /* | 189 | /* |
192 | * Bit offsets in flags field | 190 | * Bit offsets in flags field |
@@ -496,21 +494,18 @@ static inline void nfs3_forget_cached_acls(struct inode *inode) | |||
496 | 494 | ||
497 | /* | 495 | /* |
498 | * linux/fs/mount_clnt.c | 496 | * linux/fs/mount_clnt.c |
499 | * (Used only by nfsroot module) | ||
500 | */ | 497 | */ |
501 | extern int nfsroot_mount(struct sockaddr_in *, char *, struct nfs_fh *, | 498 | extern int nfs_mount(struct sockaddr *, size_t, char *, char *, |
502 | int, int); | 499 | int, int, struct nfs_fh *); |
503 | 500 | ||
504 | /* | 501 | /* |
505 | * inline functions | 502 | * inline functions |
506 | */ | 503 | */ |
507 | 504 | ||
508 | static inline loff_t | 505 | static inline loff_t nfs_size_to_loff_t(__u64 size) |
509 | nfs_size_to_loff_t(__u64 size) | ||
510 | { | 506 | { |
511 | loff_t maxsz = (((loff_t) ULONG_MAX) << PAGE_CACHE_SHIFT) + PAGE_CACHE_SIZE - 1; | 507 | if (size > (__u64) OFFSET_MAX - 1) |
512 | if (size > maxsz) | 508 | return OFFSET_MAX - 1; |
513 | return maxsz; | ||
514 | return (loff_t) size; | 509 | return (loff_t) size; |
515 | } | 510 | } |
516 | 511 | ||
@@ -557,6 +552,7 @@ extern void * nfs_root_data(void); | |||
557 | #define NFSDBG_ROOT 0x0080 | 552 | #define NFSDBG_ROOT 0x0080 |
558 | #define NFSDBG_CALLBACK 0x0100 | 553 | #define NFSDBG_CALLBACK 0x0100 |
559 | #define NFSDBG_CLIENT 0x0200 | 554 | #define NFSDBG_CLIENT 0x0200 |
555 | #define NFSDBG_MOUNT 0x0400 | ||
560 | #define NFSDBG_ALL 0xFFFF | 556 | #define NFSDBG_ALL 0xFFFF |
561 | 557 | ||
562 | #ifdef __KERNEL__ | 558 | #ifdef __KERNEL__ |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 52b4378311c8..0cac49bc0955 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -16,7 +16,6 @@ struct nfs_client { | |||
16 | #define NFS_CS_INITING 1 /* busy initialising */ | 16 | #define NFS_CS_INITING 1 /* busy initialising */ |
17 | int cl_nfsversion; /* NFS protocol version */ | 17 | int cl_nfsversion; /* NFS protocol version */ |
18 | unsigned long cl_res_state; /* NFS resources state */ | 18 | unsigned long cl_res_state; /* NFS resources state */ |
19 | #define NFS_CS_RPCIOD 0 /* - rpciod started */ | ||
20 | #define NFS_CS_CALLBACK 1 /* - callback started */ | 19 | #define NFS_CS_CALLBACK 1 /* - callback started */ |
21 | #define NFS_CS_IDMAP 2 /* - idmap started */ | 20 | #define NFS_CS_IDMAP 2 /* - idmap started */ |
22 | #define NFS_CS_RENEWD 3 /* - renewd started */ | 21 | #define NFS_CS_RENEWD 3 /* - renewd started */ |
@@ -35,7 +34,8 @@ struct nfs_client { | |||
35 | nfs4_verifier cl_confirm; | 34 | nfs4_verifier cl_confirm; |
36 | unsigned long cl_state; | 35 | unsigned long cl_state; |
37 | 36 | ||
38 | u32 cl_lockowner_id; | 37 | struct rb_root cl_openowner_id; |
38 | struct rb_root cl_lockowner_id; | ||
39 | 39 | ||
40 | /* | 40 | /* |
41 | * The following rwsem ensures exclusive access to the server | 41 | * The following rwsem ensures exclusive access to the server |
@@ -44,9 +44,7 @@ struct nfs_client { | |||
44 | struct rw_semaphore cl_sem; | 44 | struct rw_semaphore cl_sem; |
45 | 45 | ||
46 | struct list_head cl_delegations; | 46 | struct list_head cl_delegations; |
47 | struct list_head cl_state_owners; | 47 | struct rb_root cl_state_owners; |
48 | struct list_head cl_unused; | ||
49 | int cl_nunused; | ||
50 | spinlock_t cl_lock; | 48 | spinlock_t cl_lock; |
51 | 49 | ||
52 | unsigned long cl_lease_time; | 50 | unsigned long cl_lease_time; |
diff --git a/include/linux/nfs_mount.h b/include/linux/nfs_mount.h index cc8b9c59acb8..a3ade89a64d2 100644 --- a/include/linux/nfs_mount.h +++ b/include/linux/nfs_mount.h | |||
@@ -37,7 +37,7 @@ struct nfs_mount_data { | |||
37 | int acdirmin; /* 1 */ | 37 | int acdirmin; /* 1 */ |
38 | int acdirmax; /* 1 */ | 38 | int acdirmax; /* 1 */ |
39 | struct sockaddr_in addr; /* 1 */ | 39 | struct sockaddr_in addr; /* 1 */ |
40 | char hostname[256]; /* 1 */ | 40 | char hostname[NFS_MAXNAMLEN + 1]; /* 1 */ |
41 | int namlen; /* 2 */ | 41 | int namlen; /* 2 */ |
42 | unsigned int bsize; /* 3 */ | 42 | unsigned int bsize; /* 3 */ |
43 | struct nfs3_fh root; /* 4 */ | 43 | struct nfs3_fh root; /* 4 */ |
@@ -62,6 +62,7 @@ struct nfs_mount_data { | |||
62 | #define NFS_MOUNT_STRICTLOCK 0x1000 /* reserved for NFSv4 */ | 62 | #define NFS_MOUNT_STRICTLOCK 0x1000 /* reserved for NFSv4 */ |
63 | #define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ | 63 | #define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ |
64 | #define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */ | 64 | #define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */ |
65 | #define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ | ||
65 | #define NFS_MOUNT_FLAGMASK 0xFFFF | 66 | #define NFS_MOUNT_FLAGMASK 0xFFFF |
66 | 67 | ||
67 | #endif | 68 | #endif |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index bd193af80162..78e60798d10e 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
@@ -16,12 +16,13 @@ | |||
16 | #include <linux/sunrpc/auth.h> | 16 | #include <linux/sunrpc/auth.h> |
17 | #include <linux/nfs_xdr.h> | 17 | #include <linux/nfs_xdr.h> |
18 | 18 | ||
19 | #include <asm/atomic.h> | 19 | #include <linux/kref.h> |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * Valid flags for the radix tree | 22 | * Valid flags for the radix tree |
23 | */ | 23 | */ |
24 | #define NFS_PAGE_TAG_WRITEBACK 0 | 24 | #define NFS_PAGE_TAG_LOCKED 0 |
25 | #define NFS_PAGE_TAG_COMMIT 1 | ||
25 | 26 | ||
26 | /* | 27 | /* |
27 | * Valid flags for a dirty buffer | 28 | * Valid flags for a dirty buffer |
@@ -33,8 +34,7 @@ | |||
33 | 34 | ||
34 | struct nfs_inode; | 35 | struct nfs_inode; |
35 | struct nfs_page { | 36 | struct nfs_page { |
36 | struct list_head wb_list, /* Defines state of page: */ | 37 | struct list_head wb_list; /* Defines state of page: */ |
37 | *wb_list_head; /* read/write/commit */ | ||
38 | struct page *wb_page; /* page to read in/write out */ | 38 | struct page *wb_page; /* page to read in/write out */ |
39 | struct nfs_open_context *wb_context; /* File state context info */ | 39 | struct nfs_open_context *wb_context; /* File state context info */ |
40 | atomic_t wb_complete; /* i/os we're waiting for */ | 40 | atomic_t wb_complete; /* i/os we're waiting for */ |
@@ -42,7 +42,7 @@ struct nfs_page { | |||
42 | unsigned int wb_offset, /* Offset & ~PAGE_CACHE_MASK */ | 42 | unsigned int wb_offset, /* Offset & ~PAGE_CACHE_MASK */ |
43 | wb_pgbase, /* Start of page data */ | 43 | wb_pgbase, /* Start of page data */ |
44 | wb_bytes; /* Length of request */ | 44 | wb_bytes; /* Length of request */ |
45 | atomic_t wb_count; /* reference count */ | 45 | struct kref wb_kref; /* reference count */ |
46 | unsigned long wb_flags; | 46 | unsigned long wb_flags; |
47 | struct nfs_writeverf wb_verf; /* Commit cookie */ | 47 | struct nfs_writeverf wb_verf; /* Commit cookie */ |
48 | }; | 48 | }; |
@@ -71,8 +71,8 @@ extern void nfs_clear_request(struct nfs_page *req); | |||
71 | extern void nfs_release_request(struct nfs_page *req); | 71 | extern void nfs_release_request(struct nfs_page *req); |
72 | 72 | ||
73 | 73 | ||
74 | extern int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *head, struct list_head *dst, | 74 | extern int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *dst, |
75 | pgoff_t idx_start, unsigned int npages); | 75 | pgoff_t idx_start, unsigned int npages, int tag); |
76 | extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, | 76 | extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, |
77 | struct inode *inode, | 77 | struct inode *inode, |
78 | int (*doio)(struct inode *, struct list_head *, unsigned int, size_t, int), | 78 | int (*doio)(struct inode *, struct list_head *, unsigned int, size_t, int), |
@@ -84,12 +84,11 @@ extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc); | |||
84 | extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t); | 84 | extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t); |
85 | extern int nfs_wait_on_request(struct nfs_page *); | 85 | extern int nfs_wait_on_request(struct nfs_page *); |
86 | extern void nfs_unlock_request(struct nfs_page *req); | 86 | extern void nfs_unlock_request(struct nfs_page *req); |
87 | extern int nfs_set_page_writeback_locked(struct nfs_page *req); | 87 | extern void nfs_clear_page_tag_locked(struct nfs_page *req); |
88 | extern void nfs_clear_page_writeback(struct nfs_page *req); | ||
89 | 88 | ||
90 | 89 | ||
91 | /* | 90 | /* |
92 | * Lock the page of an asynchronous request without incrementing the wb_count | 91 | * Lock the page of an asynchronous request without getting a new reference |
93 | */ | 92 | */ |
94 | static inline int | 93 | static inline int |
95 | nfs_lock_request_dontget(struct nfs_page *req) | 94 | nfs_lock_request_dontget(struct nfs_page *req) |
@@ -98,14 +97,14 @@ nfs_lock_request_dontget(struct nfs_page *req) | |||
98 | } | 97 | } |
99 | 98 | ||
100 | /* | 99 | /* |
101 | * Lock the page of an asynchronous request | 100 | * Lock the page of an asynchronous request and take a reference |
102 | */ | 101 | */ |
103 | static inline int | 102 | static inline int |
104 | nfs_lock_request(struct nfs_page *req) | 103 | nfs_lock_request(struct nfs_page *req) |
105 | { | 104 | { |
106 | if (test_and_set_bit(PG_BUSY, &req->wb_flags)) | 105 | if (test_and_set_bit(PG_BUSY, &req->wb_flags)) |
107 | return 0; | 106 | return 0; |
108 | atomic_inc(&req->wb_count); | 107 | kref_get(&req->wb_kref); |
109 | return 1; | 108 | return 1; |
110 | } | 109 | } |
111 | 110 | ||
@@ -118,7 +117,6 @@ static inline void | |||
118 | nfs_list_add_request(struct nfs_page *req, struct list_head *head) | 117 | nfs_list_add_request(struct nfs_page *req, struct list_head *head) |
119 | { | 118 | { |
120 | list_add_tail(&req->wb_list, head); | 119 | list_add_tail(&req->wb_list, head); |
121 | req->wb_list_head = head; | ||
122 | } | 120 | } |
123 | 121 | ||
124 | 122 | ||
@@ -132,7 +130,6 @@ nfs_list_remove_request(struct nfs_page *req) | |||
132 | if (list_empty(&req->wb_list)) | 130 | if (list_empty(&req->wb_list)) |
133 | return; | 131 | return; |
134 | list_del_init(&req->wb_list); | 132 | list_del_init(&req->wb_list); |
135 | req->wb_list_head = NULL; | ||
136 | } | 133 | } |
137 | 134 | ||
138 | static inline struct nfs_page * | 135 | static inline struct nfs_page * |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 10c26ed0db71..38d77681cf27 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -119,7 +119,7 @@ struct nfs_openargs { | |||
119 | struct nfs_seqid * seqid; | 119 | struct nfs_seqid * seqid; |
120 | int open_flags; | 120 | int open_flags; |
121 | __u64 clientid; | 121 | __u64 clientid; |
122 | __u32 id; | 122 | __u64 id; |
123 | union { | 123 | union { |
124 | struct iattr * attrs; /* UNCHECKED, GUARDED */ | 124 | struct iattr * attrs; /* UNCHECKED, GUARDED */ |
125 | nfs4_verifier verifier; /* EXCLUSIVE */ | 125 | nfs4_verifier verifier; /* EXCLUSIVE */ |
@@ -144,6 +144,7 @@ struct nfs_openres { | |||
144 | nfs4_stateid delegation; | 144 | nfs4_stateid delegation; |
145 | __u32 do_recall; | 145 | __u32 do_recall; |
146 | __u64 maxsize; | 146 | __u64 maxsize; |
147 | __u32 attrset[NFS4_BITMAP_SIZE]; | ||
147 | }; | 148 | }; |
148 | 149 | ||
149 | /* | 150 | /* |
@@ -180,7 +181,7 @@ struct nfs_closeres { | |||
180 | * */ | 181 | * */ |
181 | struct nfs_lowner { | 182 | struct nfs_lowner { |
182 | __u64 clientid; | 183 | __u64 clientid; |
183 | u32 id; | 184 | __u64 id; |
184 | }; | 185 | }; |
185 | 186 | ||
186 | struct nfs_lock_args { | 187 | struct nfs_lock_args { |
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index 189e0dc993ab..ce06188b7a56 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h | |||
@@ -28,10 +28,11 @@ struct nsproxy { | |||
28 | struct ipc_namespace *ipc_ns; | 28 | struct ipc_namespace *ipc_ns; |
29 | struct mnt_namespace *mnt_ns; | 29 | struct mnt_namespace *mnt_ns; |
30 | struct pid_namespace *pid_ns; | 30 | struct pid_namespace *pid_ns; |
31 | struct user_namespace *user_ns; | ||
31 | }; | 32 | }; |
32 | extern struct nsproxy init_nsproxy; | 33 | extern struct nsproxy init_nsproxy; |
33 | 34 | ||
34 | int copy_namespaces(int flags, struct task_struct *tsk); | 35 | int copy_namespaces(unsigned long flags, struct task_struct *tsk); |
35 | void get_task_namespaces(struct task_struct *tsk); | 36 | void get_task_namespaces(struct task_struct *tsk); |
36 | void free_nsproxy(struct nsproxy *ns); | 37 | void free_nsproxy(struct nsproxy *ns); |
37 | int unshare_nsproxy_namespaces(unsigned long, struct nsproxy **, | 38 | int unshare_nsproxy_namespaces(unsigned long, struct nsproxy **, |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 086a0e5a6318..5e84f2e8d54c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -111,7 +111,8 @@ enum pcie_reset_state { | |||
111 | 111 | ||
112 | typedef unsigned short __bitwise pci_bus_flags_t; | 112 | typedef unsigned short __bitwise pci_bus_flags_t; |
113 | enum pci_bus_flags { | 113 | enum pci_bus_flags { |
114 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, | 114 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, |
115 | PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2, | ||
115 | }; | 116 | }; |
116 | 117 | ||
117 | struct pci_cap_saved_state { | 118 | struct pci_cap_saved_state { |
@@ -138,6 +139,7 @@ struct pci_dev { | |||
138 | unsigned short subsystem_vendor; | 139 | unsigned short subsystem_vendor; |
139 | unsigned short subsystem_device; | 140 | unsigned short subsystem_device; |
140 | unsigned int class; /* 3 bytes: (base,sub,prog-if) */ | 141 | unsigned int class; /* 3 bytes: (base,sub,prog-if) */ |
142 | u8 revision; /* PCI revision, low byte of class word */ | ||
141 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ | 143 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ |
142 | u8 rom_base_reg; /* which config register controls the ROM */ | 144 | u8 rom_base_reg; /* which config register controls the ROM */ |
143 | u8 pin; /* which interrupt pin this device uses */ | 145 | u8 pin; /* which interrupt pin this device uses */ |
@@ -313,7 +315,7 @@ struct pci_dynids { | |||
313 | 315 | ||
314 | /* ---------------------------------------------------------------- */ | 316 | /* ---------------------------------------------------------------- */ |
315 | /** PCI Error Recovery System (PCI-ERS). If a PCI device driver provides | 317 | /** PCI Error Recovery System (PCI-ERS). If a PCI device driver provides |
316 | * a set fof callbacks in struct pci_error_handlers, then that device driver | 318 | * a set of callbacks in struct pci_error_handlers, then that device driver |
317 | * will be notified of PCI bus errors, and will be driven to recovery | 319 | * will be notified of PCI bus errors, and will be driven to recovery |
318 | * when an error occurs. | 320 | * when an error occurs. |
319 | */ | 321 | */ |
@@ -370,7 +372,6 @@ struct pci_driver { | |||
370 | int (*suspend_late) (struct pci_dev *dev, pm_message_t state); | 372 | int (*suspend_late) (struct pci_dev *dev, pm_message_t state); |
371 | int (*resume_early) (struct pci_dev *dev); | 373 | int (*resume_early) (struct pci_dev *dev); |
372 | int (*resume) (struct pci_dev *dev); /* Device woken up */ | 374 | int (*resume) (struct pci_dev *dev); /* Device woken up */ |
373 | int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */ | ||
374 | void (*shutdown) (struct pci_dev *dev); | 375 | void (*shutdown) (struct pci_dev *dev); |
375 | 376 | ||
376 | struct pci_error_handlers *err_handler; | 377 | struct pci_error_handlers *err_handler; |
@@ -431,6 +432,8 @@ extern struct bus_type pci_bus_type; | |||
431 | * code, or pci core code. */ | 432 | * code, or pci core code. */ |
432 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ | 433 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ |
433 | extern struct list_head pci_devices; /* list of all devices */ | 434 | extern struct list_head pci_devices; /* list of all devices */ |
435 | /* Some device drivers need know if pci is initiated */ | ||
436 | extern int no_pci_devices(void); | ||
434 | 437 | ||
435 | void pcibios_fixup_bus(struct pci_bus *); | 438 | void pcibios_fixup_bus(struct pci_bus *); |
436 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); | 439 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); |
@@ -475,7 +478,7 @@ extern void pci_sort_breadthfirst(void); | |||
475 | /* Generic PCI functions exported to card drivers */ | 478 | /* Generic PCI functions exported to card drivers */ |
476 | 479 | ||
477 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); | 480 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); |
478 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | 481 | struct pci_dev __deprecated *pci_find_slot (unsigned int bus, unsigned int devfn); |
479 | int pci_find_capability (struct pci_dev *dev, int cap); | 482 | int pci_find_capability (struct pci_dev *dev, int cap); |
480 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 483 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |
481 | int pci_find_ext_capability (struct pci_dev *dev, int cap); | 484 | int pci_find_ext_capability (struct pci_dev *dev, int cap); |
@@ -544,11 +547,16 @@ void pci_set_master(struct pci_dev *dev); | |||
544 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); | 547 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); |
545 | #define HAVE_PCI_SET_MWI | 548 | #define HAVE_PCI_SET_MWI |
546 | int __must_check pci_set_mwi(struct pci_dev *dev); | 549 | int __must_check pci_set_mwi(struct pci_dev *dev); |
550 | int pci_try_set_mwi(struct pci_dev *dev); | ||
547 | void pci_clear_mwi(struct pci_dev *dev); | 551 | void pci_clear_mwi(struct pci_dev *dev); |
548 | void pci_intx(struct pci_dev *dev, int enable); | 552 | void pci_intx(struct pci_dev *dev, int enable); |
549 | void pci_msi_off(struct pci_dev *dev); | 553 | void pci_msi_off(struct pci_dev *dev); |
550 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); | 554 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); |
551 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | 555 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); |
556 | int pcix_get_max_mmrbc(struct pci_dev *dev); | ||
557 | int pcix_get_mmrbc(struct pci_dev *dev); | ||
558 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); | ||
559 | int pcie_set_readrq(struct pci_dev *dev, int rq); | ||
552 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | 560 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); |
553 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 561 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
554 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); | 562 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); |
@@ -560,6 +568,7 @@ void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); | |||
560 | void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size); | 568 | void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size); |
561 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); | 569 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); |
562 | void pci_remove_rom(struct pci_dev *pdev); | 570 | void pci_remove_rom(struct pci_dev *pdev); |
571 | size_t pci_get_rom_size(void __iomem *rom, size_t size); | ||
563 | 572 | ||
564 | /* Power management related routines */ | 573 | /* Power management related routines */ |
565 | int pci_save_state(struct pci_dev *dev); | 574 | int pci_save_state(struct pci_dev *dev); |
@@ -717,6 +726,7 @@ static inline struct pci_dev *pci_get_class(unsigned int class, struct pci_dev * | |||
717 | { return NULL; } | 726 | { return NULL; } |
718 | 727 | ||
719 | #define pci_dev_present(ids) (0) | 728 | #define pci_dev_present(ids) (0) |
729 | #define no_pci_devices() (1) | ||
720 | #define pci_find_present(ids) (NULL) | 730 | #define pci_find_present(ids) (NULL) |
721 | #define pci_dev_put(dev) do { } while (0) | 731 | #define pci_dev_put(dev) do { } while (0) |
722 | 732 | ||
@@ -876,5 +886,7 @@ extern int pci_pci_problems; | |||
876 | extern unsigned long pci_cardbus_io_size; | 886 | extern unsigned long pci_cardbus_io_size; |
877 | extern unsigned long pci_cardbus_mem_size; | 887 | extern unsigned long pci_cardbus_mem_size; |
878 | 888 | ||
889 | extern int pcibios_add_platform_entries(struct pci_dev *dev); | ||
890 | |||
879 | #endif /* __KERNEL__ */ | 891 | #endif /* __KERNEL__ */ |
880 | #endif /* LINUX_PCI_H */ | 892 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 75c4d4d06892..2c7add169539 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -133,6 +133,9 @@ | |||
133 | 133 | ||
134 | /* Vendors and devices. Sort key: vendor first, device next. */ | 134 | /* Vendors and devices. Sort key: vendor first, device next. */ |
135 | 135 | ||
136 | #define PCI_VENDOR_ID_TTTECH 0x0357 | ||
137 | #define PCI_DEVICE_ID_TTTECH_MC322 0x000a | ||
138 | |||
136 | #define PCI_VENDOR_ID_DYNALINK 0x0675 | 139 | #define PCI_VENDOR_ID_DYNALINK 0x0675 |
137 | #define PCI_DEVICE_ID_DYNALINK_IS64PH 0x1702 | 140 | #define PCI_DEVICE_ID_DYNALINK_IS64PH 0x1702 |
138 | 141 | ||
@@ -371,6 +374,7 @@ | |||
371 | #define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 | 374 | #define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 |
372 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c | 375 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c |
373 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 | 376 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 |
377 | #define PCI_DEVICE_ID_ATI_IXP700_SMBUS 0x4395 | ||
374 | #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c | 378 | #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c |
375 | 379 | ||
376 | #define PCI_VENDOR_ID_VLSI 0x1004 | 380 | #define PCI_VENDOR_ID_VLSI 0x1004 |
@@ -475,6 +479,9 @@ | |||
475 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM_PCIE 0x0361 | 479 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM_PCIE 0x0361 |
476 | #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252 | 480 | #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252 |
477 | 481 | ||
482 | #define PCI_VENDOR_ID_UNISYS 0x1018 | ||
483 | #define PCI_DEVICE_ID_UNISYS_DMA_DIRECTOR 0x001C | ||
484 | |||
478 | #define PCI_VENDOR_ID_COMPEX2 0x101a /* pci.ids says "AT&T GIS (NCR)" */ | 485 | #define PCI_VENDOR_ID_COMPEX2 0x101a /* pci.ids says "AT&T GIS (NCR)" */ |
479 | #define PCI_DEVICE_ID_COMPEX2_100VG 0x0005 | 486 | #define PCI_DEVICE_ID_COMPEX2_100VG 0x0005 |
480 | 487 | ||
@@ -732,7 +739,6 @@ | |||
732 | #define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 | 739 | #define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 |
733 | #define PCI_DEVICE_ID_ELSA_QS3000 0x3000 | 740 | #define PCI_DEVICE_ID_ELSA_QS3000 0x3000 |
734 | 741 | ||
735 | |||
736 | #define PCI_VENDOR_ID_BUSLOGIC 0x104B | 742 | #define PCI_VENDOR_ID_BUSLOGIC 0x104B |
737 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 | 743 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 |
738 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040 | 744 | #define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040 |
@@ -778,7 +784,6 @@ | |||
778 | 784 | ||
779 | #define PCI_VENDOR_ID_SONY 0x104d | 785 | #define PCI_VENDOR_ID_SONY 0x104d |
780 | 786 | ||
781 | |||
782 | /* Winbond have two vendor IDs! See 0x10ad as well */ | 787 | /* Winbond have two vendor IDs! See 0x10ad as well */ |
783 | #define PCI_VENDOR_ID_WINBOND2 0x1050 | 788 | #define PCI_VENDOR_ID_WINBOND2 0x1050 |
784 | #define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a | 789 | #define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a |
@@ -816,7 +821,6 @@ | |||
816 | #define PCI_DEVICE_ID_PROMISE_20276 0x5275 | 821 | #define PCI_DEVICE_ID_PROMISE_20276 0x5275 |
817 | #define PCI_DEVICE_ID_PROMISE_20277 0x7275 | 822 | #define PCI_DEVICE_ID_PROMISE_20277 0x7275 |
818 | 823 | ||
819 | |||
820 | #define PCI_VENDOR_ID_UMC 0x1060 | 824 | #define PCI_VENDOR_ID_UMC 0x1060 |
821 | #define PCI_DEVICE_ID_UMC_UM8673F 0x0101 | 825 | #define PCI_DEVICE_ID_UMC_UM8673F 0x0101 |
822 | #define PCI_DEVICE_ID_UMC_UM8886BF 0x673a | 826 | #define PCI_DEVICE_ID_UMC_UM8886BF 0x673a |
@@ -832,7 +836,6 @@ | |||
832 | #define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 | 836 | #define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 |
833 | #define PCI_DEVICE_ID_MYLEX_DAC960_GEM 0xB166 | 837 | #define PCI_DEVICE_ID_MYLEX_DAC960_GEM 0xB166 |
834 | 838 | ||
835 | |||
836 | #define PCI_VENDOR_ID_APPLE 0x106b | 839 | #define PCI_VENDOR_ID_APPLE 0x106b |
837 | #define PCI_DEVICE_ID_APPLE_BANDIT 0x0001 | 840 | #define PCI_DEVICE_ID_APPLE_BANDIT 0x0001 |
838 | #define PCI_DEVICE_ID_APPLE_HYDRA 0x000e | 841 | #define PCI_DEVICE_ID_APPLE_HYDRA 0x000e |
@@ -868,7 +871,6 @@ | |||
868 | #define PCI_DEVICE_ID_YAMAHA_744 0x0010 | 871 | #define PCI_DEVICE_ID_YAMAHA_744 0x0010 |
869 | #define PCI_DEVICE_ID_YAMAHA_754 0x0012 | 872 | #define PCI_DEVICE_ID_YAMAHA_754 0x0012 |
870 | 873 | ||
871 | |||
872 | #define PCI_VENDOR_ID_QLOGIC 0x1077 | 874 | #define PCI_VENDOR_ID_QLOGIC 0x1077 |
873 | #define PCI_DEVICE_ID_QLOGIC_ISP10160 0x1016 | 875 | #define PCI_DEVICE_ID_QLOGIC_ISP10160 0x1016 |
874 | #define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 | 876 | #define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 |
@@ -899,12 +901,9 @@ | |||
899 | #define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103 | 901 | #define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103 |
900 | #define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104 | 902 | #define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104 |
901 | 903 | ||
902 | |||
903 | |||
904 | #define PCI_VENDOR_ID_CONTAQ 0x1080 | 904 | #define PCI_VENDOR_ID_CONTAQ 0x1080 |
905 | #define PCI_DEVICE_ID_CONTAQ_82C693 0xc693 | 905 | #define PCI_DEVICE_ID_CONTAQ_82C693 0xc693 |
906 | 906 | ||
907 | |||
908 | #define PCI_VENDOR_ID_OLICOM 0x108d | 907 | #define PCI_VENDOR_ID_OLICOM 0x108d |
909 | #define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 | 908 | #define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 |
910 | #define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 | 909 | #define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 |
@@ -936,23 +935,19 @@ | |||
936 | #define PCI_DEVICE_ID_SII_3112 0x3112 | 935 | #define PCI_DEVICE_ID_SII_3112 0x3112 |
937 | #define PCI_DEVICE_ID_SII_1210SA 0x0240 | 936 | #define PCI_DEVICE_ID_SII_1210SA 0x0240 |
938 | 937 | ||
939 | |||
940 | #define PCI_VENDOR_ID_BROOKTREE 0x109e | 938 | #define PCI_VENDOR_ID_BROOKTREE 0x109e |
941 | #define PCI_DEVICE_ID_BROOKTREE_878 0x0878 | 939 | #define PCI_DEVICE_ID_BROOKTREE_878 0x0878 |
942 | #define PCI_DEVICE_ID_BROOKTREE_879 0x0879 | 940 | #define PCI_DEVICE_ID_BROOKTREE_879 0x0879 |
943 | 941 | ||
944 | |||
945 | #define PCI_VENDOR_ID_SGI 0x10a9 | 942 | #define PCI_VENDOR_ID_SGI 0x10a9 |
946 | #define PCI_DEVICE_ID_SGI_IOC3 0x0003 | 943 | #define PCI_DEVICE_ID_SGI_IOC3 0x0003 |
944 | #define PCI_DEVICE_ID_SGI_LITHIUM 0x1002 | ||
947 | #define PCI_DEVICE_ID_SGI_IOC4 0x100a | 945 | #define PCI_DEVICE_ID_SGI_IOC4 0x100a |
948 | #define PCI_VENDOR_ID_SGI_LITHIUM 0x1002 | ||
949 | |||
950 | 946 | ||
951 | #define PCI_VENDOR_ID_WINBOND 0x10ad | 947 | #define PCI_VENDOR_ID_WINBOND 0x10ad |
952 | #define PCI_DEVICE_ID_WINBOND_82C105 0x0105 | 948 | #define PCI_DEVICE_ID_WINBOND_82C105 0x0105 |
953 | #define PCI_DEVICE_ID_WINBOND_83C553 0x0565 | 949 | #define PCI_DEVICE_ID_WINBOND_83C553 0x0565 |
954 | 950 | ||
955 | |||
956 | #define PCI_VENDOR_ID_PLX 0x10b5 | 951 | #define PCI_VENDOR_ID_PLX 0x10b5 |
957 | #define PCI_DEVICE_ID_PLX_R685 0x1030 | 952 | #define PCI_DEVICE_ID_PLX_R685 0x1030 |
958 | #define PCI_DEVICE_ID_PLX_ROMULUS 0x106a | 953 | #define PCI_DEVICE_ID_PLX_ROMULUS 0x106a |
@@ -986,7 +981,6 @@ | |||
986 | #define PCI_DEVICE_ID_3COM_3CR990SVR97 0x9909 | 981 | #define PCI_DEVICE_ID_3COM_3CR990SVR97 0x9909 |
987 | #define PCI_DEVICE_ID_3COM_3CR990SVR 0x990a | 982 | #define PCI_DEVICE_ID_3COM_3CR990SVR 0x990a |
988 | 983 | ||
989 | |||
990 | #define PCI_VENDOR_ID_AL 0x10b9 | 984 | #define PCI_VENDOR_ID_AL 0x10b9 |
991 | #define PCI_DEVICE_ID_AL_M1533 0x1533 | 985 | #define PCI_DEVICE_ID_AL_M1533 0x1533 |
992 | #define PCI_DEVICE_ID_AL_M1535 0x1535 | 986 | #define PCI_DEVICE_ID_AL_M1535 0x1535 |
@@ -1009,18 +1003,14 @@ | |||
1009 | #define PCI_DEVICE_ID_AL_M5451 0x5451 | 1003 | #define PCI_DEVICE_ID_AL_M5451 0x5451 |
1010 | #define PCI_DEVICE_ID_AL_M7101 0x7101 | 1004 | #define PCI_DEVICE_ID_AL_M7101 0x7101 |
1011 | 1005 | ||
1012 | |||
1013 | |||
1014 | #define PCI_VENDOR_ID_NEOMAGIC 0x10c8 | 1006 | #define PCI_VENDOR_ID_NEOMAGIC 0x10c8 |
1015 | #define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005 | 1007 | #define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005 |
1016 | #define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006 | 1008 | #define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006 |
1017 | #define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016 | 1009 | #define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016 |
1018 | 1010 | ||
1019 | |||
1020 | #define PCI_VENDOR_ID_TCONRAD 0x10da | 1011 | #define PCI_VENDOR_ID_TCONRAD 0x10da |
1021 | #define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508 | 1012 | #define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508 |
1022 | 1013 | ||
1023 | |||
1024 | #define PCI_VENDOR_ID_NVIDIA 0x10de | 1014 | #define PCI_VENDOR_ID_NVIDIA 0x10de |
1025 | #define PCI_DEVICE_ID_NVIDIA_TNT 0x0020 | 1015 | #define PCI_DEVICE_ID_NVIDIA_TNT 0x0020 |
1026 | #define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028 | 1016 | #define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028 |
@@ -1241,9 +1231,6 @@ | |||
1241 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 | 1231 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 |
1242 | #define PCI_DEVICE_ID_IMS_TT3D 0x9135 | 1232 | #define PCI_DEVICE_ID_IMS_TT3D 0x9135 |
1243 | 1233 | ||
1244 | |||
1245 | |||
1246 | |||
1247 | #define PCI_VENDOR_ID_INTERG 0x10ea | 1234 | #define PCI_VENDOR_ID_INTERG 0x10ea |
1248 | #define PCI_DEVICE_ID_INTERG_1682 0x1682 | 1235 | #define PCI_DEVICE_ID_INTERG_1682 0x1682 |
1249 | #define PCI_DEVICE_ID_INTERG_2000 0x2000 | 1236 | #define PCI_DEVICE_ID_INTERG_2000 0x2000 |
@@ -1262,7 +1249,6 @@ | |||
1262 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP 0x3fc5 | 1249 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP 0x3fc5 |
1263 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI 0x3fc6 | 1250 | #define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI 0x3fc6 |
1264 | 1251 | ||
1265 | |||
1266 | #define PCI_VENDOR_ID_INIT 0x1101 | 1252 | #define PCI_VENDOR_ID_INIT 0x1101 |
1267 | 1253 | ||
1268 | #define PCI_VENDOR_ID_CREATIVE 0x1102 /* duplicate: ECTIVA */ | 1254 | #define PCI_VENDOR_ID_CREATIVE 0x1102 /* duplicate: ECTIVA */ |
@@ -1357,7 +1343,6 @@ | |||
1357 | #define PCI_VENDOR_ID_SIEMENS 0x110A | 1343 | #define PCI_VENDOR_ID_SIEMENS 0x110A |
1358 | #define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 | 1344 | #define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 |
1359 | 1345 | ||
1360 | |||
1361 | #define PCI_VENDOR_ID_VORTEX 0x1119 | 1346 | #define PCI_VENDOR_ID_VORTEX 0x1119 |
1362 | #define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000 | 1347 | #define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000 |
1363 | #define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001 | 1348 | #define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001 |
@@ -1383,8 +1368,8 @@ | |||
1383 | #define PCI_VENDOR_ID_EF 0x111a | 1368 | #define PCI_VENDOR_ID_EF 0x111a |
1384 | #define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 | 1369 | #define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 |
1385 | #define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 | 1370 | #define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 |
1386 | #define PCI_VENDOR_ID_EF_ATM_LANAI2 0x0003 | 1371 | #define PCI_DEVICE_ID_EF_ATM_LANAI2 0x0003 |
1387 | #define PCI_VENDOR_ID_EF_ATM_LANAIHB 0x0005 | 1372 | #define PCI_DEVICE_ID_EF_ATM_LANAIHB 0x0005 |
1388 | 1373 | ||
1389 | #define PCI_VENDOR_ID_IDT 0x111d | 1374 | #define PCI_VENDOR_ID_IDT 0x111d |
1390 | #define PCI_DEVICE_ID_IDT_IDT77201 0x0001 | 1375 | #define PCI_DEVICE_ID_IDT_IDT77201 0x0001 |
@@ -1392,7 +1377,6 @@ | |||
1392 | #define PCI_VENDOR_ID_FORE 0x1127 | 1377 | #define PCI_VENDOR_ID_FORE 0x1127 |
1393 | #define PCI_DEVICE_ID_FORE_PCA200E 0x0300 | 1378 | #define PCI_DEVICE_ID_FORE_PCA200E 0x0300 |
1394 | 1379 | ||
1395 | |||
1396 | #define PCI_VENDOR_ID_PHILIPS 0x1131 | 1380 | #define PCI_VENDOR_ID_PHILIPS 0x1131 |
1397 | #define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146 | 1381 | #define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146 |
1398 | #define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730 | 1382 | #define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730 |
@@ -1411,7 +1395,6 @@ | |||
1411 | #define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550 | 1395 | #define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550 |
1412 | 1396 | ||
1413 | 1397 | ||
1414 | |||
1415 | #define PCI_VENDOR_ID_SYSKONNECT 0x1148 | 1398 | #define PCI_VENDOR_ID_SYSKONNECT 0x1148 |
1416 | #define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200 | 1399 | #define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200 |
1417 | #define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300 | 1400 | #define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300 |
@@ -1419,7 +1402,6 @@ | |||
1419 | #define PCI_DEVICE_ID_SYSKONNECT_9DXX 0x4400 | 1402 | #define PCI_DEVICE_ID_SYSKONNECT_9DXX 0x4400 |
1420 | #define PCI_DEVICE_ID_SYSKONNECT_9MXX 0x4500 | 1403 | #define PCI_DEVICE_ID_SYSKONNECT_9MXX 0x4500 |
1421 | 1404 | ||
1422 | |||
1423 | #define PCI_VENDOR_ID_DIGI 0x114f | 1405 | #define PCI_VENDOR_ID_DIGI 0x114f |
1424 | #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070 | 1406 | #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070 |
1425 | #define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 | 1407 | #define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 |
@@ -1430,12 +1412,10 @@ | |||
1430 | #define PCI_DEVICE_ID_NEO_2RJ45 0x00CA | 1412 | #define PCI_DEVICE_ID_NEO_2RJ45 0x00CA |
1431 | #define PCI_DEVICE_ID_NEO_2RJ45PRI 0x00CB | 1413 | #define PCI_DEVICE_ID_NEO_2RJ45PRI 0x00CB |
1432 | 1414 | ||
1433 | |||
1434 | #define PCI_VENDOR_ID_XIRCOM 0x115d | 1415 | #define PCI_VENDOR_ID_XIRCOM 0x115d |
1435 | #define PCI_DEVICE_ID_XIRCOM_RBM56G 0x0101 | 1416 | #define PCI_DEVICE_ID_XIRCOM_RBM56G 0x0101 |
1436 | #define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103 | 1417 | #define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103 |
1437 | 1418 | ||
1438 | |||
1439 | #define PCI_VENDOR_ID_SERVERWORKS 0x1166 | 1419 | #define PCI_VENDOR_ID_SERVERWORKS 0x1166 |
1440 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 | 1420 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 |
1441 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 | 1421 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 |
@@ -1504,7 +1484,6 @@ | |||
1504 | #define PCI_DEVICE_ID_ZEITNET_1221 0x0001 | 1484 | #define PCI_DEVICE_ID_ZEITNET_1221 0x0001 |
1505 | #define PCI_DEVICE_ID_ZEITNET_1225 0x0002 | 1485 | #define PCI_DEVICE_ID_ZEITNET_1225 0x0002 |
1506 | 1486 | ||
1507 | |||
1508 | #define PCI_VENDOR_ID_FUJITSU_ME 0x119e | 1487 | #define PCI_VENDOR_ID_FUJITSU_ME 0x119e |
1509 | #define PCI_DEVICE_ID_FUJITSU_FS155 0x0001 | 1488 | #define PCI_DEVICE_ID_FUJITSU_FS155 0x0001 |
1510 | #define PCI_DEVICE_ID_FUJITSU_FS50 0x0003 | 1489 | #define PCI_DEVICE_ID_FUJITSU_FS50 0x0003 |
@@ -1522,28 +1501,23 @@ | |||
1522 | #define PCI_DEVICE_ID_V3_V960 0x0001 | 1501 | #define PCI_DEVICE_ID_V3_V960 0x0001 |
1523 | #define PCI_DEVICE_ID_V3_V351 0x0002 | 1502 | #define PCI_DEVICE_ID_V3_V351 0x0002 |
1524 | 1503 | ||
1525 | |||
1526 | #define PCI_VENDOR_ID_ATT 0x11c1 | 1504 | #define PCI_VENDOR_ID_ATT 0x11c1 |
1527 | #define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480 | 1505 | #define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480 |
1528 | 1506 | ||
1529 | |||
1530 | #define PCI_VENDOR_ID_SPECIALIX 0x11cb | 1507 | #define PCI_VENDOR_ID_SPECIALIX 0x11cb |
1531 | #define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000 | 1508 | #define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000 |
1532 | #define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 | 1509 | #define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 |
1533 | #define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004 | 1510 | #define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004 |
1534 | 1511 | ||
1535 | |||
1536 | #define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 | 1512 | #define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 |
1537 | #define PCI_DEVICE_ID_AD1889JS 0x1889 | 1513 | #define PCI_DEVICE_ID_AD1889JS 0x1889 |
1538 | 1514 | ||
1539 | |||
1540 | #define PCI_DEVICE_ID_SEGA_BBA 0x1234 | 1515 | #define PCI_DEVICE_ID_SEGA_BBA 0x1234 |
1541 | 1516 | ||
1542 | #define PCI_VENDOR_ID_ZORAN 0x11de | 1517 | #define PCI_VENDOR_ID_ZORAN 0x11de |
1543 | #define PCI_DEVICE_ID_ZORAN_36057 0x6057 | 1518 | #define PCI_DEVICE_ID_ZORAN_36057 0x6057 |
1544 | #define PCI_DEVICE_ID_ZORAN_36120 0x6120 | 1519 | #define PCI_DEVICE_ID_ZORAN_36120 0x6120 |
1545 | 1520 | ||
1546 | |||
1547 | #define PCI_VENDOR_ID_COMPEX 0x11f6 | 1521 | #define PCI_VENDOR_ID_COMPEX 0x11f6 |
1548 | #define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 | 1522 | #define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 |
1549 | 1523 | ||
@@ -1602,8 +1576,6 @@ | |||
1602 | #define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005 | 1576 | #define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005 |
1603 | #define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009 | 1577 | #define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009 |
1604 | 1578 | ||
1605 | |||
1606 | |||
1607 | #define PCI_VENDOR_ID_AVM 0x1244 | 1579 | #define PCI_VENDOR_ID_AVM 0x1244 |
1608 | #define PCI_DEVICE_ID_AVM_B1 0x0700 | 1580 | #define PCI_DEVICE_ID_AVM_B1 0x0700 |
1609 | #define PCI_DEVICE_ID_AVM_C4 0x0800 | 1581 | #define PCI_DEVICE_ID_AVM_C4 0x0800 |
@@ -1612,7 +1584,6 @@ | |||
1612 | #define PCI_DEVICE_ID_AVM_C2 0x1100 | 1584 | #define PCI_DEVICE_ID_AVM_C2 0x1100 |
1613 | #define PCI_DEVICE_ID_AVM_T1 0x1200 | 1585 | #define PCI_DEVICE_ID_AVM_T1 0x1200 |
1614 | 1586 | ||
1615 | |||
1616 | #define PCI_VENDOR_ID_STALLION 0x124d | 1587 | #define PCI_VENDOR_ID_STALLION 0x124d |
1617 | 1588 | ||
1618 | /* Allied Telesyn */ | 1589 | /* Allied Telesyn */ |
@@ -1635,7 +1606,6 @@ | |||
1635 | #define PCI_VENDOR_ID_SATSAGEM 0x1267 | 1606 | #define PCI_VENDOR_ID_SATSAGEM 0x1267 |
1636 | #define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 | 1607 | #define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 |
1637 | 1608 | ||
1638 | |||
1639 | #define PCI_VENDOR_ID_ENSONIQ 0x1274 | 1609 | #define PCI_VENDOR_ID_ENSONIQ 0x1274 |
1640 | #define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 | 1610 | #define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 |
1641 | #define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 | 1611 | #define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 |
@@ -1658,7 +1628,6 @@ | |||
1658 | 1628 | ||
1659 | #define PCI_VENDOR_ID_ALTEON 0x12ae | 1629 | #define PCI_VENDOR_ID_ALTEON 0x12ae |
1660 | 1630 | ||
1661 | |||
1662 | #define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4 | 1631 | #define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4 |
1663 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001 | 1632 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001 |
1664 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002 | 1633 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002 |
@@ -1689,7 +1658,6 @@ | |||
1689 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485 0x0331 | 1658 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485 0x0331 |
1690 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485 0x0332 | 1659 | #define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485 0x0332 |
1691 | 1660 | ||
1692 | |||
1693 | #define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 | 1661 | #define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 |
1694 | #define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018 | 1662 | #define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018 |
1695 | 1663 | ||
@@ -1799,7 +1767,6 @@ | |||
1799 | #define PCI_DEVICE_ID_LMC_SSI 0x0005 | 1767 | #define PCI_DEVICE_ID_LMC_SSI 0x0005 |
1800 | #define PCI_DEVICE_ID_LMC_T1 0x0006 | 1768 | #define PCI_DEVICE_ID_LMC_T1 0x0006 |
1801 | 1769 | ||
1802 | |||
1803 | #define PCI_VENDOR_ID_NETGEAR 0x1385 | 1770 | #define PCI_VENDOR_ID_NETGEAR 0x1385 |
1804 | #define PCI_DEVICE_ID_NETGEAR_GA620 0x620a | 1771 | #define PCI_DEVICE_ID_NETGEAR_GA620 0x620a |
1805 | 1772 | ||
@@ -1902,6 +1869,8 @@ | |||
1902 | #define PCI_DEVICE_ID_OXSEMI_16PCI952 0x9521 | 1869 | #define PCI_DEVICE_ID_OXSEMI_16PCI952 0x9521 |
1903 | #define PCI_DEVICE_ID_OXSEMI_16PCI952PP 0x9523 | 1870 | #define PCI_DEVICE_ID_OXSEMI_16PCI952PP 0x9523 |
1904 | 1871 | ||
1872 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | ||
1873 | |||
1905 | #define PCI_VENDOR_ID_SAMSUNG 0x144d | 1874 | #define PCI_VENDOR_ID_SAMSUNG 0x144d |
1906 | 1875 | ||
1907 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 | 1876 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 |
@@ -2010,13 +1979,10 @@ | |||
2010 | #define PCI_DEVICE_ID_ENE_720 0x1421 | 1979 | #define PCI_DEVICE_ID_ENE_720 0x1421 |
2011 | #define PCI_DEVICE_ID_ENE_722 0x1422 | 1980 | #define PCI_DEVICE_ID_ENE_722 0x1422 |
2012 | 1981 | ||
2013 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | ||
2014 | |||
2015 | #define PCI_SUBVENDOR_ID_PERLE 0x155f | 1982 | #define PCI_SUBVENDOR_ID_PERLE 0x155f |
2016 | #define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 | 1983 | #define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 |
2017 | #define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 | 1984 | #define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 |
2018 | 1985 | ||
2019 | |||
2020 | #define PCI_VENDOR_ID_SYBA 0x1592 | 1986 | #define PCI_VENDOR_ID_SYBA 0x1592 |
2021 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 | 1987 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 |
2022 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 | 1988 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 |
@@ -2035,8 +2001,10 @@ | |||
2035 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c | 2001 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c |
2036 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 | 2002 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 |
2037 | 2003 | ||
2038 | #define PCI_VENDOR_ID_PDC 0x15e9 | 2004 | #define PCI_VENDOR_ID_QUICKNET 0x15e2 |
2005 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 | ||
2039 | 2006 | ||
2007 | #define PCI_VENDOR_ID_PDC 0x15e9 | ||
2040 | 2008 | ||
2041 | #define PCI_VENDOR_ID_FARSITE 0x1619 | 2009 | #define PCI_VENDOR_ID_FARSITE 0x1619 |
2042 | #define PCI_DEVICE_ID_FARSITE_T2P 0x0400 | 2010 | #define PCI_DEVICE_ID_FARSITE_T2P 0x0400 |
@@ -2053,6 +2021,8 @@ | |||
2053 | #define PCI_DEVICE_ID_BCM1250_PCI 0x0001 | 2021 | #define PCI_DEVICE_ID_BCM1250_PCI 0x0001 |
2054 | #define PCI_DEVICE_ID_BCM1250_HT 0x0002 | 2022 | #define PCI_DEVICE_ID_BCM1250_HT 0x0002 |
2055 | 2023 | ||
2024 | #define PCI_VENDOR_ID_ATHEROS 0x168c | ||
2025 | |||
2056 | #define PCI_VENDOR_ID_NETCELL 0x169c | 2026 | #define PCI_VENDOR_ID_NETCELL 0x169c |
2057 | #define PCI_DEVICE_ID_REVOLUTION 0x0044 | 2027 | #define PCI_DEVICE_ID_REVOLUTION 0x0044 |
2058 | 2028 | ||
@@ -2091,7 +2061,6 @@ | |||
2091 | #define PCI_DEVICE_ID_HERC_WIN 0x5732 | 2061 | #define PCI_DEVICE_ID_HERC_WIN 0x5732 |
2092 | #define PCI_DEVICE_ID_HERC_UNI 0x5832 | 2062 | #define PCI_DEVICE_ID_HERC_UNI 0x5832 |
2093 | 2063 | ||
2094 | |||
2095 | #define PCI_VENDOR_ID_SITECOM 0x182d | 2064 | #define PCI_VENDOR_ID_SITECOM 0x182d |
2096 | #define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069 | 2065 | #define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069 |
2097 | 2066 | ||
@@ -2127,12 +2096,9 @@ | |||
2127 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 | 2096 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 |
2128 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 | 2097 | #define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 |
2129 | 2098 | ||
2130 | |||
2131 | #define PCI_VENDOR_ID_AKS 0x416c | 2099 | #define PCI_VENDOR_ID_AKS 0x416c |
2132 | #define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 | 2100 | #define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 |
2133 | 2101 | ||
2134 | |||
2135 | |||
2136 | #define PCI_VENDOR_ID_S3 0x5333 | 2102 | #define PCI_VENDOR_ID_S3 0x5333 |
2137 | #define PCI_DEVICE_ID_S3_TRIO 0x8811 | 2103 | #define PCI_DEVICE_ID_S3_TRIO 0x8811 |
2138 | #define PCI_DEVICE_ID_S3_868 0x8880 | 2104 | #define PCI_DEVICE_ID_S3_868 0x8880 |
@@ -2144,7 +2110,6 @@ | |||
2144 | #define PCI_VENDOR_ID_DUNORD 0x5544 | 2110 | #define PCI_VENDOR_ID_DUNORD 0x5544 |
2145 | #define PCI_DEVICE_ID_DUNORD_I3000 0x0001 | 2111 | #define PCI_DEVICE_ID_DUNORD_I3000 0x0001 |
2146 | 2112 | ||
2147 | |||
2148 | #define PCI_VENDOR_ID_DCI 0x6666 | 2113 | #define PCI_VENDOR_ID_DCI 0x6666 |
2149 | #define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 | 2114 | #define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 |
2150 | #define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 | 2115 | #define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 |
@@ -2388,7 +2353,6 @@ | |||
2388 | #define PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN 0x0500 | 2353 | #define PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN 0x0500 |
2389 | #define PCI_DEVICE_ID_ADAPTEC2_SCAMP 0x0503 | 2354 | #define PCI_DEVICE_ID_ADAPTEC2_SCAMP 0x0503 |
2390 | 2355 | ||
2391 | |||
2392 | #define PCI_VENDOR_ID_HOLTEK 0x9412 | 2356 | #define PCI_VENDOR_ID_HOLTEK 0x9412 |
2393 | #define PCI_DEVICE_ID_HOLTEK_6565 0x6565 | 2357 | #define PCI_DEVICE_ID_HOLTEK_6565 0x6565 |
2394 | 2358 | ||
@@ -2404,6 +2368,8 @@ | |||
2404 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 | 2368 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 |
2405 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 | 2369 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 |
2406 | 2370 | ||
2371 | #define PCI_VENDOR_ID_3COM_2 0xa727 | ||
2372 | |||
2407 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d | 2373 | #define PCI_SUBVENDOR_ID_EXSYS 0xd84d |
2408 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 | 2374 | #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 |
2409 | #define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055 | 2375 | #define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055 |
@@ -2412,13 +2378,7 @@ | |||
2412 | #define PCI_DEVICE_ID_TIGERJET_300 0x0001 | 2378 | #define PCI_DEVICE_ID_TIGERJET_300 0x0001 |
2413 | #define PCI_DEVICE_ID_TIGERJET_100 0x0002 | 2379 | #define PCI_DEVICE_ID_TIGERJET_100 0x0002 |
2414 | 2380 | ||
2415 | #define PCI_VENDOR_ID_TTTECH 0x0357 | ||
2416 | #define PCI_DEVICE_ID_TTTECH_MC322 0x000A | ||
2417 | |||
2418 | #define PCI_VENDOR_ID_XILINX_RME 0xea60 | 2381 | #define PCI_VENDOR_ID_XILINX_RME 0xea60 |
2419 | #define PCI_DEVICE_ID_RME_DIGI32 0x9896 | 2382 | #define PCI_DEVICE_ID_RME_DIGI32 0x9896 |
2420 | #define PCI_DEVICE_ID_RME_DIGI32_PRO 0x9897 | 2383 | #define PCI_DEVICE_ID_RME_DIGI32_PRO 0x9897 |
2421 | #define PCI_DEVICE_ID_RME_DIGI32_8 0x9898 | 2384 | #define PCI_DEVICE_ID_RME_DIGI32_8 0x9898 |
2422 | |||
2423 | #define PCI_VENDOR_ID_QUICKNET 0x15E2 | ||
2424 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 | ||
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index b72be2f79e6a..926adaae0f96 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __LINUX_PERCPU_H | 1 | #ifndef __LINUX_PERCPU_H |
2 | #define __LINUX_PERCPU_H | 2 | #define __LINUX_PERCPU_H |
3 | 3 | ||
4 | #include <linux/spinlock.h> /* For preempt_disable() */ | 4 | #include <linux/preempt.h> |
5 | #include <linux/slab.h> /* For kmalloc() */ | 5 | #include <linux/slab.h> /* For kmalloc() */ |
6 | #include <linux/smp.h> | 6 | #include <linux/smp.h> |
7 | #include <linux/string.h> /* For memset() */ | 7 | #include <linux/string.h> /* For memset() */ |
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index f5aa593ccf32..3d9f70972cdf 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/spinlock.h> | 9 | #include <linux/spinlock.h> |
10 | #include <linux/smp.h> | 10 | #include <linux/smp.h> |
11 | #include <linux/list.h> | ||
11 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
12 | #include <linux/percpu.h> | 13 | #include <linux/percpu.h> |
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
@@ -17,6 +18,9 @@ | |||
17 | struct percpu_counter { | 18 | struct percpu_counter { |
18 | spinlock_t lock; | 19 | spinlock_t lock; |
19 | s64 count; | 20 | s64 count; |
21 | #ifdef CONFIG_HOTPLUG_CPU | ||
22 | struct list_head list; /* All percpu_counters are on a list */ | ||
23 | #endif | ||
20 | s32 *counters; | 24 | s32 *counters; |
21 | }; | 25 | }; |
22 | 26 | ||
@@ -26,18 +30,8 @@ struct percpu_counter { | |||
26 | #define FBC_BATCH (NR_CPUS*4) | 30 | #define FBC_BATCH (NR_CPUS*4) |
27 | #endif | 31 | #endif |
28 | 32 | ||
29 | static inline void percpu_counter_init(struct percpu_counter *fbc, s64 amount) | 33 | void percpu_counter_init(struct percpu_counter *fbc, s64 amount); |
30 | { | 34 | void percpu_counter_destroy(struct percpu_counter *fbc); |
31 | spin_lock_init(&fbc->lock); | ||
32 | fbc->count = amount; | ||
33 | fbc->counters = alloc_percpu(s32); | ||
34 | } | ||
35 | |||
36 | static inline void percpu_counter_destroy(struct percpu_counter *fbc) | ||
37 | { | ||
38 | free_percpu(fbc->counters); | ||
39 | } | ||
40 | |||
41 | void percpu_counter_mod(struct percpu_counter *fbc, s32 amount); | 35 | void percpu_counter_mod(struct percpu_counter *fbc, s32 amount); |
42 | s64 percpu_counter_sum(struct percpu_counter *fbc); | 36 | s64 percpu_counter_sum(struct percpu_counter *fbc); |
43 | 37 | ||
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index 169c6c24209b..b9a17e08ff0f 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
@@ -29,7 +29,7 @@ static inline void get_pid_ns(struct pid_namespace *ns) | |||
29 | kref_get(&ns->kref); | 29 | kref_get(&ns->kref); |
30 | } | 30 | } |
31 | 31 | ||
32 | extern struct pid_namespace *copy_pid_ns(int flags, struct pid_namespace *ns); | 32 | extern struct pid_namespace *copy_pid_ns(unsigned long flags, struct pid_namespace *ns); |
33 | extern void free_pid_ns(struct kref *kref); | 33 | extern void free_pid_ns(struct kref *kref); |
34 | 34 | ||
35 | static inline void put_pid_ns(struct pid_namespace *ns) | 35 | static inline void put_pid_ns(struct pid_namespace *ns) |
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index c3f01b3085a4..30b8571e6b34 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h | |||
@@ -403,16 +403,13 @@ enum | |||
403 | * 1..32767 Reserved for ematches inside kernel tree | 403 | * 1..32767 Reserved for ematches inside kernel tree |
404 | * 32768..65535 Free to use, not reliable | 404 | * 32768..65535 Free to use, not reliable |
405 | */ | 405 | */ |
406 | enum | 406 | #define TCF_EM_CONTAINER 0 |
407 | { | 407 | #define TCF_EM_CMP 1 |
408 | TCF_EM_CONTAINER, | 408 | #define TCF_EM_NBYTE 2 |
409 | TCF_EM_CMP, | 409 | #define TCF_EM_U32 3 |
410 | TCF_EM_NBYTE, | 410 | #define TCF_EM_META 4 |
411 | TCF_EM_U32, | 411 | #define TCF_EM_TEXT 5 |
412 | TCF_EM_META, | 412 | #define TCF_EM_MAX 5 |
413 | TCF_EM_TEXT, | ||
414 | __TCF_EM_MAX | ||
415 | }; | ||
416 | 413 | ||
417 | enum | 414 | enum |
418 | { | 415 | { |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index d10f35338507..268c51599eb8 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -101,6 +101,15 @@ struct tc_prio_qopt | |||
101 | __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ | 101 | __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ |
102 | }; | 102 | }; |
103 | 103 | ||
104 | enum | ||
105 | { | ||
106 | TCA_PRIO_UNSPEC, | ||
107 | TCA_PRIO_MQ, | ||
108 | __TCA_PRIO_MAX | ||
109 | }; | ||
110 | |||
111 | #define TCA_PRIO_MAX (__TCA_PRIO_MAX - 1) | ||
112 | |||
104 | /* TBF section */ | 113 | /* TBF section */ |
105 | 114 | ||
106 | struct tc_tbf_qopt | 115 | struct tc_tbf_qopt |
diff --git a/include/linux/pm.h b/include/linux/pm.h index b2c4fde4e994..273781c82e4d 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -267,15 +267,10 @@ struct dev_pm_info { | |||
267 | unsigned can_wakeup:1; | 267 | unsigned can_wakeup:1; |
268 | #ifdef CONFIG_PM | 268 | #ifdef CONFIG_PM |
269 | unsigned should_wakeup:1; | 269 | unsigned should_wakeup:1; |
270 | pm_message_t prev_state; | ||
271 | void * saved_state; | ||
272 | struct device * pm_parent; | ||
273 | struct list_head entry; | 270 | struct list_head entry; |
274 | #endif | 271 | #endif |
275 | }; | 272 | }; |
276 | 273 | ||
277 | extern void device_pm_set_parent(struct device * dev, struct device * parent); | ||
278 | |||
279 | extern int device_power_down(pm_message_t state); | 274 | extern int device_power_down(pm_message_t state); |
280 | extern void device_power_up(void); | 275 | extern void device_power_up(void); |
281 | extern void device_resume(void); | 276 | extern void device_resume(void); |
diff --git a/include/linux/prctl.h b/include/linux/prctl.h index 52a9be41250d..e2eff9079fe9 100644 --- a/include/linux/prctl.h +++ b/include/linux/prctl.h | |||
@@ -59,4 +59,8 @@ | |||
59 | # define PR_ENDIAN_LITTLE 1 /* True little endian mode */ | 59 | # define PR_ENDIAN_LITTLE 1 /* True little endian mode */ |
60 | # define PR_ENDIAN_PPC_LITTLE 2 /* "PowerPC" pseudo little endian */ | 60 | # define PR_ENDIAN_PPC_LITTLE 2 /* "PowerPC" pseudo little endian */ |
61 | 61 | ||
62 | /* Get/set process seccomp mode */ | ||
63 | #define PR_GET_SECCOMP 21 | ||
64 | #define PR_SET_SECCOMP 22 | ||
65 | |||
62 | #endif /* _LINUX_PRCTL_H */ | 66 | #endif /* _LINUX_PRCTL_H */ |
diff --git a/include/linux/prefetch.h b/include/linux/prefetch.h index fc86f274147f..1adfe668d031 100644 --- a/include/linux/prefetch.h +++ b/include/linux/prefetch.h | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | prefetch(x) - prefetches the cacheline at "x" for read | 28 | prefetch(x) - prefetches the cacheline at "x" for read |
29 | prefetchw(x) - prefetches the cacheline at "x" for write | 29 | prefetchw(x) - prefetches the cacheline at "x" for write |
30 | spin_lock_prefetch(x) - prefectches the spinlock *x for taking | 30 | spin_lock_prefetch(x) - prefetches the spinlock *x for taking |
31 | 31 | ||
32 | there is also PREFETCH_STRIDE which is the architecure-prefered | 32 | there is also PREFETCH_STRIDE which is the architecure-prefered |
33 | "lookahead" size for prefetching streamed operations. | 33 | "lookahead" size for prefetching streamed operations. |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 3469f96bc8b2..28e3664fdf1b 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #include <linux/magic.h> | 7 | #include <linux/magic.h> |
8 | #include <asm/atomic.h> | 8 | #include <asm/atomic.h> |
9 | 9 | ||
10 | struct completion; | ||
11 | |||
10 | /* | 12 | /* |
11 | * The proc filesystem constants/structures | 13 | * The proc filesystem constants/structures |
12 | */ | 14 | */ |
@@ -56,6 +58,14 @@ struct proc_dir_entry { | |||
56 | gid_t gid; | 58 | gid_t gid; |
57 | loff_t size; | 59 | loff_t size; |
58 | const struct inode_operations *proc_iops; | 60 | const struct inode_operations *proc_iops; |
61 | /* | ||
62 | * NULL ->proc_fops means "PDE is going away RSN" or | ||
63 | * "PDE is just created". In either case, e.g. ->read_proc won't be | ||
64 | * called because it's too late or too early, respectively. | ||
65 | * | ||
66 | * If you're allocating ->proc_fops dynamically, save a pointer | ||
67 | * somewhere. | ||
68 | */ | ||
59 | const struct file_operations *proc_fops; | 69 | const struct file_operations *proc_fops; |
60 | get_info_t *get_info; | 70 | get_info_t *get_info; |
61 | struct module *owner; | 71 | struct module *owner; |
@@ -66,6 +76,9 @@ struct proc_dir_entry { | |||
66 | atomic_t count; /* use count */ | 76 | atomic_t count; /* use count */ |
67 | int deleted; /* delete flag */ | 77 | int deleted; /* delete flag */ |
68 | void *set; | 78 | void *set; |
79 | int pde_users; /* number of callers into module in progress */ | ||
80 | spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ | ||
81 | struct completion *pde_unload_completion; | ||
69 | }; | 82 | }; |
70 | 83 | ||
71 | struct kcore_list { | 84 | struct kcore_list { |
diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h index d8286db60b96..93678f57ccbe 100644 --- a/include/linux/raid/raid5.h +++ b/include/linux/raid/raid5.h | |||
@@ -116,13 +116,46 @@ | |||
116 | * attach a request to an active stripe (add_stripe_bh()) | 116 | * attach a request to an active stripe (add_stripe_bh()) |
117 | * lockdev attach-buffer unlockdev | 117 | * lockdev attach-buffer unlockdev |
118 | * handle a stripe (handle_stripe()) | 118 | * handle a stripe (handle_stripe()) |
119 | * lockstripe clrSTRIPE_HANDLE ... (lockdev check-buffers unlockdev) .. change-state .. record io needed unlockstripe schedule io | 119 | * lockstripe clrSTRIPE_HANDLE ... |
120 | * (lockdev check-buffers unlockdev) .. | ||
121 | * change-state .. | ||
122 | * record io/ops needed unlockstripe schedule io/ops | ||
120 | * release an active stripe (release_stripe()) | 123 | * release an active stripe (release_stripe()) |
121 | * lockdev if (!--cnt) { if STRIPE_HANDLE, add to handle_list else add to inactive-list } unlockdev | 124 | * lockdev if (!--cnt) { if STRIPE_HANDLE, add to handle_list else add to inactive-list } unlockdev |
122 | * | 125 | * |
123 | * The refcount counts each thread that have activated the stripe, | 126 | * The refcount counts each thread that have activated the stripe, |
124 | * plus raid5d if it is handling it, plus one for each active request | 127 | * plus raid5d if it is handling it, plus one for each active request |
125 | * on a cached buffer. | 128 | * on a cached buffer, and plus one if the stripe is undergoing stripe |
129 | * operations. | ||
130 | * | ||
131 | * Stripe operations are performed outside the stripe lock, | ||
132 | * the stripe operations are: | ||
133 | * -copying data between the stripe cache and user application buffers | ||
134 | * -computing blocks to save a disk access, or to recover a missing block | ||
135 | * -updating the parity on a write operation (reconstruct write and | ||
136 | * read-modify-write) | ||
137 | * -checking parity correctness | ||
138 | * -running i/o to disk | ||
139 | * These operations are carried out by raid5_run_ops which uses the async_tx | ||
140 | * api to (optionally) offload operations to dedicated hardware engines. | ||
141 | * When requesting an operation handle_stripe sets the pending bit for the | ||
142 | * operation and increments the count. raid5_run_ops is then run whenever | ||
143 | * the count is non-zero. | ||
144 | * There are some critical dependencies between the operations that prevent some | ||
145 | * from being requested while another is in flight. | ||
146 | * 1/ Parity check operations destroy the in cache version of the parity block, | ||
147 | * so we prevent parity dependent operations like writes and compute_blocks | ||
148 | * from starting while a check is in progress. Some dma engines can perform | ||
149 | * the check without damaging the parity block, in these cases the parity | ||
150 | * block is re-marked up to date (assuming the check was successful) and is | ||
151 | * not re-read from disk. | ||
152 | * 2/ When a write operation is requested we immediately lock the affected | ||
153 | * blocks, and mark them as not up to date. This causes new read requests | ||
154 | * to be held off, as well as parity checks and compute block operations. | ||
155 | * 3/ Once a compute block operation has been requested handle_stripe treats | ||
156 | * that block as if it is up to date. raid5_run_ops guaruntees that any | ||
157 | * operation that is dependent on the compute block result is initiated after | ||
158 | * the compute block completes. | ||
126 | */ | 159 | */ |
127 | 160 | ||
128 | struct stripe_head { | 161 | struct stripe_head { |
@@ -136,15 +169,46 @@ struct stripe_head { | |||
136 | spinlock_t lock; | 169 | spinlock_t lock; |
137 | int bm_seq; /* sequence number for bitmap flushes */ | 170 | int bm_seq; /* sequence number for bitmap flushes */ |
138 | int disks; /* disks in stripe */ | 171 | int disks; /* disks in stripe */ |
172 | /* stripe_operations | ||
173 | * @pending - pending ops flags (set for request->issue->complete) | ||
174 | * @ack - submitted ops flags (set for issue->complete) | ||
175 | * @complete - completed ops flags (set for complete) | ||
176 | * @target - STRIPE_OP_COMPUTE_BLK target | ||
177 | * @count - raid5_runs_ops is set to run when this is non-zero | ||
178 | */ | ||
179 | struct stripe_operations { | ||
180 | unsigned long pending; | ||
181 | unsigned long ack; | ||
182 | unsigned long complete; | ||
183 | int target; | ||
184 | int count; | ||
185 | u32 zero_sum_result; | ||
186 | } ops; | ||
139 | struct r5dev { | 187 | struct r5dev { |
140 | struct bio req; | 188 | struct bio req; |
141 | struct bio_vec vec; | 189 | struct bio_vec vec; |
142 | struct page *page; | 190 | struct page *page; |
143 | struct bio *toread, *towrite, *written; | 191 | struct bio *toread, *read, *towrite, *written; |
144 | sector_t sector; /* sector of this page */ | 192 | sector_t sector; /* sector of this page */ |
145 | unsigned long flags; | 193 | unsigned long flags; |
146 | } dev[1]; /* allocated with extra space depending of RAID geometry */ | 194 | } dev[1]; /* allocated with extra space depending of RAID geometry */ |
147 | }; | 195 | }; |
196 | |||
197 | /* stripe_head_state - collects and tracks the dynamic state of a stripe_head | ||
198 | * for handle_stripe. It is only valid under spin_lock(sh->lock); | ||
199 | */ | ||
200 | struct stripe_head_state { | ||
201 | int syncing, expanding, expanded; | ||
202 | int locked, uptodate, to_read, to_write, failed, written; | ||
203 | int to_fill, compute, req_compute, non_overwrite; | ||
204 | int failed_num; | ||
205 | }; | ||
206 | |||
207 | /* r6_state - extra state data only relevant to r6 */ | ||
208 | struct r6_state { | ||
209 | int p_failed, q_failed, qd_idx, failed_num[2]; | ||
210 | }; | ||
211 | |||
148 | /* Flags */ | 212 | /* Flags */ |
149 | #define R5_UPTODATE 0 /* page contains current data */ | 213 | #define R5_UPTODATE 0 /* page contains current data */ |
150 | #define R5_LOCKED 1 /* IO has been submitted on "req" */ | 214 | #define R5_LOCKED 1 /* IO has been submitted on "req" */ |
@@ -158,6 +222,15 @@ struct stripe_head { | |||
158 | #define R5_ReWrite 9 /* have tried to over-write the readerror */ | 222 | #define R5_ReWrite 9 /* have tried to over-write the readerror */ |
159 | 223 | ||
160 | #define R5_Expanded 10 /* This block now has post-expand data */ | 224 | #define R5_Expanded 10 /* This block now has post-expand data */ |
225 | #define R5_Wantcompute 11 /* compute_block in progress treat as | ||
226 | * uptodate | ||
227 | */ | ||
228 | #define R5_Wantfill 12 /* dev->toread contains a bio that needs | ||
229 | * filling | ||
230 | */ | ||
231 | #define R5_Wantprexor 13 /* distinguish blocks ready for rmw from | ||
232 | * other "towrites" | ||
233 | */ | ||
161 | /* | 234 | /* |
162 | * Write method | 235 | * Write method |
163 | */ | 236 | */ |
@@ -180,6 +253,24 @@ struct stripe_head { | |||
180 | #define STRIPE_EXPAND_SOURCE 10 | 253 | #define STRIPE_EXPAND_SOURCE 10 |
181 | #define STRIPE_EXPAND_READY 11 | 254 | #define STRIPE_EXPAND_READY 11 |
182 | /* | 255 | /* |
256 | * Operations flags (in issue order) | ||
257 | */ | ||
258 | #define STRIPE_OP_BIOFILL 0 | ||
259 | #define STRIPE_OP_COMPUTE_BLK 1 | ||
260 | #define STRIPE_OP_PREXOR 2 | ||
261 | #define STRIPE_OP_BIODRAIN 3 | ||
262 | #define STRIPE_OP_POSTXOR 4 | ||
263 | #define STRIPE_OP_CHECK 5 | ||
264 | #define STRIPE_OP_IO 6 | ||
265 | |||
266 | /* modifiers to the base operations | ||
267 | * STRIPE_OP_MOD_REPAIR_PD - compute the parity block and write it back | ||
268 | * STRIPE_OP_MOD_DMA_CHECK - parity is not corrupted by the check | ||
269 | */ | ||
270 | #define STRIPE_OP_MOD_REPAIR_PD 7 | ||
271 | #define STRIPE_OP_MOD_DMA_CHECK 8 | ||
272 | |||
273 | /* | ||
183 | * Plugging: | 274 | * Plugging: |
184 | * | 275 | * |
185 | * To improve write throughput, we need to delay the handling of some | 276 | * To improve write throughput, we need to delay the handling of some |
diff --git a/include/linux/raid/xor.h b/include/linux/raid/xor.h index f0d67cbdea40..3e120587eada 100644 --- a/include/linux/raid/xor.h +++ b/include/linux/raid/xor.h | |||
@@ -3,9 +3,10 @@ | |||
3 | 3 | ||
4 | #include <linux/raid/md.h> | 4 | #include <linux/raid/md.h> |
5 | 5 | ||
6 | #define MAX_XOR_BLOCKS 5 | 6 | #define MAX_XOR_BLOCKS 4 |
7 | 7 | ||
8 | extern void xor_block(unsigned int count, unsigned int bytes, void **ptr); | 8 | extern void xor_blocks(unsigned int count, unsigned int bytes, |
9 | void *dest, void **srcs); | ||
9 | 10 | ||
10 | struct xor_block_template { | 11 | struct xor_block_template { |
11 | struct xor_block_template *next; | 12 | struct xor_block_template *next; |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 1fae30af91f3..c91476ce314a 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -261,7 +261,7 @@ enum rtattr_type_t | |||
261 | RTA_FLOW, | 261 | RTA_FLOW, |
262 | RTA_CACHEINFO, | 262 | RTA_CACHEINFO, |
263 | RTA_SESSION, | 263 | RTA_SESSION, |
264 | RTA_MP_ALGO, | 264 | RTA_MP_ALGO, /* no longer used */ |
265 | RTA_TABLE, | 265 | RTA_TABLE, |
266 | __RTA_MAX | 266 | __RTA_MAX |
267 | }; | 267 | }; |
@@ -570,10 +570,16 @@ static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) | |||
570 | } | 570 | } |
571 | 571 | ||
572 | extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len); | 572 | extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len); |
573 | extern int __rtattr_parse_nested_compat(struct rtattr *tb[], int maxattr, | ||
574 | struct rtattr *rta, int len); | ||
573 | 575 | ||
574 | #define rtattr_parse_nested(tb, max, rta) \ | 576 | #define rtattr_parse_nested(tb, max, rta) \ |
575 | rtattr_parse((tb), (max), RTA_DATA((rta)), RTA_PAYLOAD((rta))) | 577 | rtattr_parse((tb), (max), RTA_DATA((rta)), RTA_PAYLOAD((rta))) |
576 | 578 | ||
579 | #define rtattr_parse_nested_compat(tb, max, rta, data, len) \ | ||
580 | ({ data = RTA_PAYLOAD(rta) >= len ? RTA_DATA(rta) : NULL; \ | ||
581 | __rtattr_parse_nested_compat(tb, max, rta, len); }) | ||
582 | |||
577 | extern int rtnetlink_send(struct sk_buff *skb, u32 pid, u32 group, int echo); | 583 | extern int rtnetlink_send(struct sk_buff *skb, u32 pid, u32 group, int echo); |
578 | extern int rtnl_unicast(struct sk_buff *skb, u32 pid); | 584 | extern int rtnl_unicast(struct sk_buff *skb, u32 pid); |
579 | extern int rtnl_notify(struct sk_buff *skb, u32 pid, u32 group, | 585 | extern int rtnl_notify(struct sk_buff *skb, u32 pid, u32 group, |
@@ -638,6 +644,18 @@ extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const voi | |||
638 | ({ (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \ | 644 | ({ (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \ |
639 | (skb)->len; }) | 645 | (skb)->len; }) |
640 | 646 | ||
647 | #define RTA_NEST_COMPAT(skb, type, attrlen, data) \ | ||
648 | ({ struct rtattr *__start = (struct rtattr *)skb_tail_pointer(skb); \ | ||
649 | RTA_PUT(skb, type, attrlen, data); \ | ||
650 | RTA_NEST(skb, type); \ | ||
651 | __start; }) | ||
652 | |||
653 | #define RTA_NEST_COMPAT_END(skb, start) \ | ||
654 | ({ struct rtattr *__nest = (void *)(start) + NLMSG_ALIGN((start)->rta_len); \ | ||
655 | (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \ | ||
656 | RTA_NEST_END(skb, __nest); \ | ||
657 | (skb)->len; }) | ||
658 | |||
641 | #define RTA_NEST_CANCEL(skb, start) \ | 659 | #define RTA_NEST_CANCEL(skb, start) \ |
642 | ({ if (start) \ | 660 | ({ if (start) \ |
643 | skb_trim(skb, (unsigned char *) (start) - (skb)->data); \ | 661 | skb_trim(skb, (unsigned char *) (start) - (skb)->data); \ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index cfb680585ab8..731edaca8ffd 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #define CLONE_STOPPED 0x02000000 /* Start in stopped state */ | 26 | #define CLONE_STOPPED 0x02000000 /* Start in stopped state */ |
27 | #define CLONE_NEWUTS 0x04000000 /* New utsname group? */ | 27 | #define CLONE_NEWUTS 0x04000000 /* New utsname group? */ |
28 | #define CLONE_NEWIPC 0x08000000 /* New ipcs */ | 28 | #define CLONE_NEWIPC 0x08000000 /* New ipcs */ |
29 | #define CLONE_NEWUSER 0x10000000 /* New user namespace */ | ||
29 | 30 | ||
30 | /* | 31 | /* |
31 | * Scheduling policies | 32 | * Scheduling policies |
@@ -287,6 +288,7 @@ extern signed long schedule_timeout_uninterruptible(signed long timeout); | |||
287 | asmlinkage void schedule(void); | 288 | asmlinkage void schedule(void); |
288 | 289 | ||
289 | struct nsproxy; | 290 | struct nsproxy; |
291 | struct user_namespace; | ||
290 | 292 | ||
291 | /* Maximum number of active map areas.. This is a random (large) number */ | 293 | /* Maximum number of active map areas.. This is a random (large) number */ |
292 | #define DEFAULT_MAX_MAP_COUNT 65536 | 294 | #define DEFAULT_MAX_MAP_COUNT 65536 |
@@ -529,6 +531,10 @@ struct signal_struct { | |||
529 | #ifdef CONFIG_TASKSTATS | 531 | #ifdef CONFIG_TASKSTATS |
530 | struct taskstats *stats; | 532 | struct taskstats *stats; |
531 | #endif | 533 | #endif |
534 | #ifdef CONFIG_AUDIT | ||
535 | unsigned audit_tty; | ||
536 | struct tty_audit_buf *tty_audit_buf; | ||
537 | #endif | ||
532 | }; | 538 | }; |
533 | 539 | ||
534 | /* Context switch must be unlocked if interrupts are to be enabled */ | 540 | /* Context switch must be unlocked if interrupts are to be enabled */ |
@@ -972,7 +978,8 @@ struct task_struct { | |||
972 | unsigned int rt_priority; | 978 | unsigned int rt_priority; |
973 | cputime_t utime, stime; | 979 | cputime_t utime, stime; |
974 | unsigned long nvcsw, nivcsw; /* context switch counts */ | 980 | unsigned long nvcsw, nivcsw; /* context switch counts */ |
975 | struct timespec start_time; | 981 | struct timespec start_time; /* monotonic time */ |
982 | struct timespec real_start_time; /* boot based time */ | ||
976 | /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ | 983 | /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ |
977 | unsigned long min_flt, maj_flt; | 984 | unsigned long min_flt, maj_flt; |
978 | 985 | ||
@@ -1403,7 +1410,7 @@ extern struct task_struct *find_task_by_pid_type(int type, int pid); | |||
1403 | extern void __set_special_pids(pid_t session, pid_t pgrp); | 1410 | extern void __set_special_pids(pid_t session, pid_t pgrp); |
1404 | 1411 | ||
1405 | /* per-UID process charging. */ | 1412 | /* per-UID process charging. */ |
1406 | extern struct user_struct * alloc_uid(uid_t); | 1413 | extern struct user_struct * alloc_uid(struct user_namespace *, uid_t); |
1407 | static inline struct user_struct *get_uid(struct user_struct *u) | 1414 | static inline struct user_struct *get_uid(struct user_struct *u) |
1408 | { | 1415 | { |
1409 | atomic_inc(&u->__count); | 1416 | atomic_inc(&u->__count); |
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h index b02308ee7667..3ee412bc00ec 100644 --- a/include/linux/screen_info.h +++ b/include/linux/screen_info.h | |||
@@ -10,7 +10,7 @@ | |||
10 | struct screen_info { | 10 | struct screen_info { |
11 | u8 orig_x; /* 0x00 */ | 11 | u8 orig_x; /* 0x00 */ |
12 | u8 orig_y; /* 0x01 */ | 12 | u8 orig_y; /* 0x01 */ |
13 | u16 dontuse1; /* 0x02 -- EXT_MEM_K sits here */ | 13 | u16 ext_mem_k; /* 0x02 */ |
14 | u16 orig_video_page; /* 0x04 */ | 14 | u16 orig_video_page; /* 0x04 */ |
15 | u8 orig_video_mode; /* 0x06 */ | 15 | u8 orig_video_mode; /* 0x06 */ |
16 | u8 orig_video_cols; /* 0x07 */ | 16 | u8 orig_video_cols; /* 0x07 */ |
@@ -27,7 +27,7 @@ struct screen_info { | |||
27 | u16 lfb_depth; /* 0x16 */ | 27 | u16 lfb_depth; /* 0x16 */ |
28 | u32 lfb_base; /* 0x18 */ | 28 | u32 lfb_base; /* 0x18 */ |
29 | u32 lfb_size; /* 0x1c */ | 29 | u32 lfb_size; /* 0x1c */ |
30 | u16 dontuse2, dontuse3; /* 0x20 -- CL_MAGIC and CL_OFFSET here */ | 30 | u16 cl_magic, cl_offset; /* 0x20 */ |
31 | u16 lfb_linelength; /* 0x24 */ | 31 | u16 lfb_linelength; /* 0x24 */ |
32 | u8 red_size; /* 0x26 */ | 32 | u8 red_size; /* 0x26 */ |
33 | u8 red_pos; /* 0x27 */ | 33 | u8 red_pos; /* 0x27 */ |
@@ -42,9 +42,8 @@ struct screen_info { | |||
42 | u16 pages; /* 0x32 */ | 42 | u16 pages; /* 0x32 */ |
43 | u16 vesa_attributes; /* 0x34 */ | 43 | u16 vesa_attributes; /* 0x34 */ |
44 | u32 capabilities; /* 0x36 */ | 44 | u32 capabilities; /* 0x36 */ |
45 | /* 0x3a -- 0x3b reserved for future expansion */ | 45 | u8 _reserved[6]; /* 0x3a */ |
46 | /* 0x3c -- 0x3f micro stack for relocatable kernels */ | 46 | } __attribute__((packed)); |
47 | }; | ||
48 | 47 | ||
49 | extern struct screen_info screen_info; | 48 | extern struct screen_info screen_info; |
50 | 49 | ||
diff --git a/include/linux/scx200_gpio.h b/include/linux/scx200_gpio.h index 1a82d30c4b17..d2b058130eb1 100644 --- a/include/linux/scx200_gpio.h +++ b/include/linux/scx200_gpio.h | |||
@@ -1,5 +1,3 @@ | |||
1 | #include <linux/spinlock.h> | ||
2 | |||
3 | u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); | 1 | u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); |
4 | 2 | ||
5 | extern unsigned scx200_gpio_base; | 3 | extern unsigned scx200_gpio_base; |
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 3e8b1cf54303..262a8dccfa81 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h | |||
@@ -4,8 +4,6 @@ | |||
4 | 4 | ||
5 | #ifdef CONFIG_SECCOMP | 5 | #ifdef CONFIG_SECCOMP |
6 | 6 | ||
7 | #define NR_SECCOMP_MODES 1 | ||
8 | |||
9 | #include <linux/thread_info.h> | 7 | #include <linux/thread_info.h> |
10 | #include <asm/seccomp.h> | 8 | #include <asm/seccomp.h> |
11 | 9 | ||
@@ -18,20 +16,23 @@ static inline void secure_computing(int this_syscall) | |||
18 | __secure_computing(this_syscall); | 16 | __secure_computing(this_syscall); |
19 | } | 17 | } |
20 | 18 | ||
21 | static inline int has_secure_computing(struct thread_info *ti) | 19 | extern long prctl_get_seccomp(void); |
22 | { | 20 | extern long prctl_set_seccomp(unsigned long); |
23 | return unlikely(test_ti_thread_flag(ti, TIF_SECCOMP)); | ||
24 | } | ||
25 | 21 | ||
26 | #else /* CONFIG_SECCOMP */ | 22 | #else /* CONFIG_SECCOMP */ |
27 | 23 | ||
28 | typedef struct { } seccomp_t; | 24 | typedef struct { } seccomp_t; |
29 | 25 | ||
30 | #define secure_computing(x) do { } while (0) | 26 | #define secure_computing(x) do { } while (0) |
31 | /* static inline to preserve typechecking */ | 27 | |
32 | static inline int has_secure_computing(struct thread_info *ti) | 28 | static inline long prctl_get_seccomp(void) |
29 | { | ||
30 | return -EINVAL; | ||
31 | } | ||
32 | |||
33 | static inline long prctl_set_seccomp(unsigned long arg2) | ||
33 | { | 34 | { |
34 | return 0; | 35 | return -EINVAL; |
35 | } | 36 | } |
36 | 37 | ||
37 | #endif /* CONFIG_SECCOMP */ | 38 | #endif /* CONFIG_SECCOMP */ |
diff --git a/include/linux/security.h b/include/linux/security.h index 9eb9e0fe0331..c11dc8aa0351 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -71,6 +71,7 @@ struct xfrm_user_sec_ctx; | |||
71 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); | 71 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); |
72 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); | 72 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); |
73 | 73 | ||
74 | extern unsigned long mmap_min_addr; | ||
74 | /* | 75 | /* |
75 | * Values used in the task_security_ops calls | 76 | * Values used in the task_security_ops calls |
76 | */ | 77 | */ |
@@ -1241,8 +1242,9 @@ struct security_operations { | |||
1241 | int (*file_ioctl) (struct file * file, unsigned int cmd, | 1242 | int (*file_ioctl) (struct file * file, unsigned int cmd, |
1242 | unsigned long arg); | 1243 | unsigned long arg); |
1243 | int (*file_mmap) (struct file * file, | 1244 | int (*file_mmap) (struct file * file, |
1244 | unsigned long reqprot, | 1245 | unsigned long reqprot, unsigned long prot, |
1245 | unsigned long prot, unsigned long flags); | 1246 | unsigned long flags, unsigned long addr, |
1247 | unsigned long addr_only); | ||
1246 | int (*file_mprotect) (struct vm_area_struct * vma, | 1248 | int (*file_mprotect) (struct vm_area_struct * vma, |
1247 | unsigned long reqprot, | 1249 | unsigned long reqprot, |
1248 | unsigned long prot); | 1250 | unsigned long prot); |
@@ -1814,9 +1816,12 @@ static inline int security_file_ioctl (struct file *file, unsigned int cmd, | |||
1814 | 1816 | ||
1815 | static inline int security_file_mmap (struct file *file, unsigned long reqprot, | 1817 | static inline int security_file_mmap (struct file *file, unsigned long reqprot, |
1816 | unsigned long prot, | 1818 | unsigned long prot, |
1817 | unsigned long flags) | 1819 | unsigned long flags, |
1820 | unsigned long addr, | ||
1821 | unsigned long addr_only) | ||
1818 | { | 1822 | { |
1819 | return security_ops->file_mmap (file, reqprot, prot, flags); | 1823 | return security_ops->file_mmap (file, reqprot, prot, flags, addr, |
1824 | addr_only); | ||
1820 | } | 1825 | } |
1821 | 1826 | ||
1822 | static inline int security_file_mprotect (struct vm_area_struct *vma, | 1827 | static inline int security_file_mprotect (struct vm_area_struct *vma, |
@@ -2489,7 +2494,9 @@ static inline int security_file_ioctl (struct file *file, unsigned int cmd, | |||
2489 | 2494 | ||
2490 | static inline int security_file_mmap (struct file *file, unsigned long reqprot, | 2495 | static inline int security_file_mmap (struct file *file, unsigned long reqprot, |
2491 | unsigned long prot, | 2496 | unsigned long prot, |
2492 | unsigned long flags) | 2497 | unsigned long flags, |
2498 | unsigned long addr, | ||
2499 | unsigned long addr_only) | ||
2493 | { | 2500 | { |
2494 | return 0; | 2501 | return 0; |
2495 | } | 2502 | } |
diff --git a/include/linux/serial.h b/include/linux/serial.h index 33fc8cb8ddfb..deb714314fb1 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h | |||
@@ -177,11 +177,5 @@ struct serial_icounter_struct { | |||
177 | #ifdef __KERNEL__ | 177 | #ifdef __KERNEL__ |
178 | #include <linux/compiler.h> | 178 | #include <linux/compiler.h> |
179 | 179 | ||
180 | /* Allow architectures to override entries in serial8250_ports[] at run time: */ | ||
181 | struct uart_port; /* forward declaration */ | ||
182 | extern int early_serial_setup(struct uart_port *port); | ||
183 | extern int early_serial_console_init(char *options); | ||
184 | extern int serial8250_start_console(struct uart_port *port, char *options); | ||
185 | |||
186 | #endif /* __KERNEL__ */ | 180 | #endif /* __KERNEL__ */ |
187 | #endif /* _LINUX_SERIAL_H */ | 181 | #endif /* _LINUX_SERIAL_H */ |
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 71310d80c09a..706ee9a4c80c 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
@@ -60,4 +60,8 @@ void serial8250_unregister_port(int line); | |||
60 | void serial8250_suspend_port(int line); | 60 | void serial8250_suspend_port(int line); |
61 | void serial8250_resume_port(int line); | 61 | void serial8250_resume_port(int line); |
62 | 62 | ||
63 | extern int serial8250_find_port(struct uart_port *p); | ||
64 | extern int serial8250_find_port_for_earlycon(void); | ||
65 | extern int setup_early_serial8250_console(char *cmdline); | ||
66 | |||
63 | #endif | 67 | #endif |
diff --git a/include/linux/serio.h b/include/linux/serio.h index 1ebf0455e224..d9377ce9ffd1 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -209,5 +209,6 @@ static inline void serio_unpin_driver(struct serio *serio) | |||
209 | #define SERIO_PENMOUNT 0x31 | 209 | #define SERIO_PENMOUNT 0x31 |
210 | #define SERIO_TOUCHRIGHT 0x32 | 210 | #define SERIO_TOUCHRIGHT 0x32 |
211 | #define SERIO_TOUCHWIN 0x33 | 211 | #define SERIO_TOUCHWIN 0x33 |
212 | #define SERIO_TAOSEVM 0x34 | ||
212 | 213 | ||
213 | #endif | 214 | #endif |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 9a5eac508e5e..ea91abe740da 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -6,7 +6,6 @@ | |||
6 | 6 | ||
7 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
8 | #include <linux/list.h> | 8 | #include <linux/list.h> |
9 | #include <linux/spinlock.h> | ||
10 | 9 | ||
11 | /* | 10 | /* |
12 | * Real Time signals may be queued. | 11 | * Real Time signals may be queued. |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 6f0b2f7d0010..ce256438e619 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -65,13 +65,20 @@ | |||
65 | * is able to produce some skb->csum, it MUST use COMPLETE, | 65 | * is able to produce some skb->csum, it MUST use COMPLETE, |
66 | * not UNNECESSARY. | 66 | * not UNNECESSARY. |
67 | * | 67 | * |
68 | * PARTIAL: identical to the case for output below. This may occur | ||
69 | * on a packet received directly from another Linux OS, e.g., | ||
70 | * a virtualised Linux kernel on the same host. The packet can | ||
71 | * be treated in the same way as UNNECESSARY except that on | ||
72 | * output (i.e., forwarding) the checksum must be filled in | ||
73 | * by the OS or the hardware. | ||
74 | * | ||
68 | * B. Checksumming on output. | 75 | * B. Checksumming on output. |
69 | * | 76 | * |
70 | * NONE: skb is checksummed by protocol or csum is not required. | 77 | * NONE: skb is checksummed by protocol or csum is not required. |
71 | * | 78 | * |
72 | * PARTIAL: device is required to csum packet as seen by hard_start_xmit | 79 | * PARTIAL: device is required to csum packet as seen by hard_start_xmit |
73 | * from skb->transport_header to the end and to record the checksum | 80 | * from skb->csum_start to the end and to record the checksum |
74 | * at skb->transport_header + skb->csum. | 81 | * at skb->csum_start + skb->csum_offset. |
75 | * | 82 | * |
76 | * Device must show its capabilities in dev->features, set | 83 | * Device must show its capabilities in dev->features, set |
77 | * at device setup time. | 84 | * at device setup time. |
@@ -82,6 +89,7 @@ | |||
82 | * TCP/UDP over IPv4. Sigh. Vendors like this | 89 | * TCP/UDP over IPv4. Sigh. Vendors like this |
83 | * way by an unknown reason. Though, see comment above | 90 | * way by an unknown reason. Though, see comment above |
84 | * about CHECKSUM_UNNECESSARY. 8) | 91 | * about CHECKSUM_UNNECESSARY. 8) |
92 | * NETIF_F_IPV6_CSUM about as dumb as the last one but does IPv6 instead. | ||
85 | * | 93 | * |
86 | * Any questions? No questions, good. --ANK | 94 | * Any questions? No questions, good. --ANK |
87 | */ | 95 | */ |
@@ -147,8 +155,8 @@ struct skb_shared_info { | |||
147 | 155 | ||
148 | /* We divide dataref into two halves. The higher 16 bits hold references | 156 | /* We divide dataref into two halves. The higher 16 bits hold references |
149 | * to the payload part of skb->data. The lower 16 bits hold references to | 157 | * to the payload part of skb->data. The lower 16 bits hold references to |
150 | * the entire skb->data. It is up to the users of the skb to agree on | 158 | * the entire skb->data. A clone of a headerless skb holds the length of |
151 | * where the payload starts. | 159 | * the header in skb->hdr_len. |
152 | * | 160 | * |
153 | * All users must obey the rule that the skb->data reference count must be | 161 | * All users must obey the rule that the skb->data reference count must be |
154 | * greater than or equal to the payload reference count. | 162 | * greater than or equal to the payload reference count. |
@@ -196,7 +204,6 @@ typedef unsigned char *sk_buff_data_t; | |||
196 | * @sk: Socket we are owned by | 204 | * @sk: Socket we are owned by |
197 | * @tstamp: Time we arrived | 205 | * @tstamp: Time we arrived |
198 | * @dev: Device we arrived on/are leaving by | 206 | * @dev: Device we arrived on/are leaving by |
199 | * @iif: ifindex of device we arrived on | ||
200 | * @transport_header: Transport layer header | 207 | * @transport_header: Transport layer header |
201 | * @network_header: Network layer header | 208 | * @network_header: Network layer header |
202 | * @mac_header: Link layer header | 209 | * @mac_header: Link layer header |
@@ -206,6 +213,7 @@ typedef unsigned char *sk_buff_data_t; | |||
206 | * @len: Length of actual data | 213 | * @len: Length of actual data |
207 | * @data_len: Data length | 214 | * @data_len: Data length |
208 | * @mac_len: Length of link layer header | 215 | * @mac_len: Length of link layer header |
216 | * @hdr_len: writable header length of cloned skb | ||
209 | * @csum: Checksum (must include start/offset pair) | 217 | * @csum: Checksum (must include start/offset pair) |
210 | * @csum_start: Offset from skb->head where checksumming should start | 218 | * @csum_start: Offset from skb->head where checksumming should start |
211 | * @csum_offset: Offset from csum_start where checksum should be stored | 219 | * @csum_offset: Offset from csum_start where checksum should be stored |
@@ -227,9 +235,12 @@ typedef unsigned char *sk_buff_data_t; | |||
227 | * @mark: Generic packet mark | 235 | * @mark: Generic packet mark |
228 | * @nfct: Associated connection, if any | 236 | * @nfct: Associated connection, if any |
229 | * @ipvs_property: skbuff is owned by ipvs | 237 | * @ipvs_property: skbuff is owned by ipvs |
238 | * @nf_trace: netfilter packet trace flag | ||
230 | * @nfctinfo: Relationship of this skb to the connection | 239 | * @nfctinfo: Relationship of this skb to the connection |
231 | * @nfct_reasm: netfilter conntrack re-assembly pointer | 240 | * @nfct_reasm: netfilter conntrack re-assembly pointer |
232 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c | 241 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c |
242 | * @iif: ifindex of device we arrived on | ||
243 | * @queue_mapping: Queue mapping for multiqueue devices | ||
233 | * @tc_index: Traffic control index | 244 | * @tc_index: Traffic control index |
234 | * @tc_verd: traffic control verdict | 245 | * @tc_verd: traffic control verdict |
235 | * @dma_cookie: a cookie to one of several possible DMA operations | 246 | * @dma_cookie: a cookie to one of several possible DMA operations |
@@ -245,8 +256,6 @@ struct sk_buff { | |||
245 | struct sock *sk; | 256 | struct sock *sk; |
246 | ktime_t tstamp; | 257 | ktime_t tstamp; |
247 | struct net_device *dev; | 258 | struct net_device *dev; |
248 | int iif; | ||
249 | /* 4 byte hole on 64 bit*/ | ||
250 | 259 | ||
251 | struct dst_entry *dst; | 260 | struct dst_entry *dst; |
252 | struct sec_path *sp; | 261 | struct sec_path *sp; |
@@ -260,8 +269,9 @@ struct sk_buff { | |||
260 | char cb[48]; | 269 | char cb[48]; |
261 | 270 | ||
262 | unsigned int len, | 271 | unsigned int len, |
263 | data_len, | 272 | data_len; |
264 | mac_len; | 273 | __u16 mac_len, |
274 | hdr_len; | ||
265 | union { | 275 | union { |
266 | __wsum csum; | 276 | __wsum csum; |
267 | struct { | 277 | struct { |
@@ -277,7 +287,8 @@ struct sk_buff { | |||
277 | nfctinfo:3; | 287 | nfctinfo:3; |
278 | __u8 pkt_type:3, | 288 | __u8 pkt_type:3, |
279 | fclone:2, | 289 | fclone:2, |
280 | ipvs_property:1; | 290 | ipvs_property:1, |
291 | nf_trace:1; | ||
281 | __be16 protocol; | 292 | __be16 protocol; |
282 | 293 | ||
283 | void (*destructor)(struct sk_buff *skb); | 294 | void (*destructor)(struct sk_buff *skb); |
@@ -288,12 +299,18 @@ struct sk_buff { | |||
288 | #ifdef CONFIG_BRIDGE_NETFILTER | 299 | #ifdef CONFIG_BRIDGE_NETFILTER |
289 | struct nf_bridge_info *nf_bridge; | 300 | struct nf_bridge_info *nf_bridge; |
290 | #endif | 301 | #endif |
302 | |||
303 | int iif; | ||
304 | __u16 queue_mapping; | ||
305 | |||
291 | #ifdef CONFIG_NET_SCHED | 306 | #ifdef CONFIG_NET_SCHED |
292 | __u16 tc_index; /* traffic control index */ | 307 | __u16 tc_index; /* traffic control index */ |
293 | #ifdef CONFIG_NET_CLS_ACT | 308 | #ifdef CONFIG_NET_CLS_ACT |
294 | __u16 tc_verd; /* traffic control verdict */ | 309 | __u16 tc_verd; /* traffic control verdict */ |
295 | #endif | 310 | #endif |
296 | #endif | 311 | #endif |
312 | /* 2 byte hole */ | ||
313 | |||
297 | #ifdef CONFIG_NET_DMA | 314 | #ifdef CONFIG_NET_DMA |
298 | dma_cookie_t dma_cookie; | 315 | dma_cookie_t dma_cookie; |
299 | #endif | 316 | #endif |
@@ -1322,6 +1339,20 @@ static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev, | |||
1322 | } | 1339 | } |
1323 | 1340 | ||
1324 | /** | 1341 | /** |
1342 | * skb_clone_writable - is the header of a clone writable | ||
1343 | * @skb: buffer to check | ||
1344 | * @len: length up to which to write | ||
1345 | * | ||
1346 | * Returns true if modifying the header part of the cloned buffer | ||
1347 | * does not requires the data to be copied. | ||
1348 | */ | ||
1349 | static inline int skb_clone_writable(struct sk_buff *skb, int len) | ||
1350 | { | ||
1351 | return !skb_header_cloned(skb) && | ||
1352 | skb_headroom(skb) + len <= skb->hdr_len; | ||
1353 | } | ||
1354 | |||
1355 | /** | ||
1325 | * skb_cow - copy header of skb when it is required | 1356 | * skb_cow - copy header of skb when it is required |
1326 | * @skb: buffer to cow | 1357 | * @skb: buffer to cow |
1327 | * @headroom: needed headroom | 1358 | * @headroom: needed headroom |
@@ -1608,7 +1639,7 @@ static inline int skb_csum_unnecessary(const struct sk_buff *skb) | |||
1608 | * if skb->ip_summed is CHECKSUM_UNNECESSARY which indicates that the | 1639 | * if skb->ip_summed is CHECKSUM_UNNECESSARY which indicates that the |
1609 | * hardware has already verified the correctness of the checksum. | 1640 | * hardware has already verified the correctness of the checksum. |
1610 | */ | 1641 | */ |
1611 | static inline unsigned int skb_checksum_complete(struct sk_buff *skb) | 1642 | static inline __sum16 skb_checksum_complete(struct sk_buff *skb) |
1612 | { | 1643 | { |
1613 | return skb_csum_unnecessary(skb) ? | 1644 | return skb_csum_unnecessary(skb) ? |
1614 | 0 : __skb_checksum_complete(skb); | 1645 | 0 : __skb_checksum_complete(skb); |
@@ -1709,6 +1740,20 @@ static inline void skb_init_secmark(struct sk_buff *skb) | |||
1709 | { } | 1740 | { } |
1710 | #endif | 1741 | #endif |
1711 | 1742 | ||
1743 | static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping) | ||
1744 | { | ||
1745 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
1746 | skb->queue_mapping = queue_mapping; | ||
1747 | #endif | ||
1748 | } | ||
1749 | |||
1750 | static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_buff *from) | ||
1751 | { | ||
1752 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | ||
1753 | to->queue_mapping = from->queue_mapping; | ||
1754 | #endif | ||
1755 | } | ||
1756 | |||
1712 | static inline int skb_is_gso(const struct sk_buff *skb) | 1757 | static inline int skb_is_gso(const struct sk_buff *skb) |
1713 | { | 1758 | { |
1714 | return skb_shinfo(skb)->gso_size; | 1759 | return skb_shinfo(skb)->gso_size; |
diff --git a/include/linux/slab.h b/include/linux/slab.h index cebcd3833c76..27402fea9b79 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -14,8 +14,6 @@ | |||
14 | #include <linux/gfp.h> | 14 | #include <linux/gfp.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | 16 | ||
17 | typedef struct kmem_cache kmem_cache_t __deprecated; | ||
18 | |||
19 | /* | 17 | /* |
20 | * Flags to pass to kmem_cache_create(). | 18 | * Flags to pass to kmem_cache_create(). |
21 | * The ones marked DEBUG are only valid if CONFIG_SLAB_DEBUG is set. | 19 | * The ones marked DEBUG are only valid if CONFIG_SLAB_DEBUG is set. |
@@ -44,7 +42,6 @@ struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, | |||
44 | void (*)(void *, struct kmem_cache *, unsigned long)); | 42 | void (*)(void *, struct kmem_cache *, unsigned long)); |
45 | void kmem_cache_destroy(struct kmem_cache *); | 43 | void kmem_cache_destroy(struct kmem_cache *); |
46 | int kmem_cache_shrink(struct kmem_cache *); | 44 | int kmem_cache_shrink(struct kmem_cache *); |
47 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | ||
48 | void *kmem_cache_zalloc(struct kmem_cache *, gfp_t); | 45 | void *kmem_cache_zalloc(struct kmem_cache *, gfp_t); |
49 | void kmem_cache_free(struct kmem_cache *, void *); | 46 | void kmem_cache_free(struct kmem_cache *, void *); |
50 | unsigned int kmem_cache_size(struct kmem_cache *); | 47 | unsigned int kmem_cache_size(struct kmem_cache *); |
@@ -63,16 +60,6 @@ int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | |||
63 | sizeof(struct __struct), __alignof__(struct __struct),\ | 60 | sizeof(struct __struct), __alignof__(struct __struct),\ |
64 | (__flags), NULL, NULL) | 61 | (__flags), NULL, NULL) |
65 | 62 | ||
66 | #ifdef CONFIG_NUMA | ||
67 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
68 | #else | ||
69 | static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | ||
70 | gfp_t flags, int node) | ||
71 | { | ||
72 | return kmem_cache_alloc(cachep, flags); | ||
73 | } | ||
74 | #endif | ||
75 | |||
76 | /* | 63 | /* |
77 | * The largest kmalloc size supported by the slab allocators is | 64 | * The largest kmalloc size supported by the slab allocators is |
78 | * 32 megabyte (2^25) or the maximum allocatable page order if that is | 65 | * 32 megabyte (2^25) or the maximum allocatable page order if that is |
@@ -91,7 +78,6 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | |||
91 | /* | 78 | /* |
92 | * Common kmalloc functions provided by all allocators | 79 | * Common kmalloc functions provided by all allocators |
93 | */ | 80 | */ |
94 | void *__kmalloc(size_t, gfp_t); | ||
95 | void *__kzalloc(size_t, gfp_t); | 81 | void *__kzalloc(size_t, gfp_t); |
96 | void * __must_check krealloc(const void *, size_t, gfp_t); | 82 | void * __must_check krealloc(const void *, size_t, gfp_t); |
97 | void kfree(const void *); | 83 | void kfree(const void *); |
@@ -102,40 +88,6 @@ size_t ksize(const void *); | |||
102 | * @n: number of elements. | 88 | * @n: number of elements. |
103 | * @size: element size. | 89 | * @size: element size. |
104 | * @flags: the type of memory to allocate. | 90 | * @flags: the type of memory to allocate. |
105 | */ | ||
106 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | ||
107 | { | ||
108 | if (n != 0 && size > ULONG_MAX / n) | ||
109 | return NULL; | ||
110 | return __kzalloc(n * size, flags); | ||
111 | } | ||
112 | |||
113 | /* | ||
114 | * Allocator specific definitions. These are mainly used to establish optimized | ||
115 | * ways to convert kmalloc() calls to kmem_cache_alloc() invocations by selecting | ||
116 | * the appropriate general cache at compile time. | ||
117 | */ | ||
118 | |||
119 | #if defined(CONFIG_SLAB) || defined(CONFIG_SLUB) | ||
120 | #ifdef CONFIG_SLUB | ||
121 | #include <linux/slub_def.h> | ||
122 | #else | ||
123 | #include <linux/slab_def.h> | ||
124 | #endif /* !CONFIG_SLUB */ | ||
125 | #else | ||
126 | |||
127 | /* | ||
128 | * Fallback definitions for an allocator not wanting to provide | ||
129 | * its own optimized kmalloc definitions (like SLOB). | ||
130 | */ | ||
131 | |||
132 | /** | ||
133 | * kmalloc - allocate memory | ||
134 | * @size: how many bytes of memory are required. | ||
135 | * @flags: the type of memory to allocate. | ||
136 | * | ||
137 | * kmalloc is the normal method of allocating memory | ||
138 | * in the kernel. | ||
139 | * | 91 | * |
140 | * The @flags argument may be one of: | 92 | * The @flags argument may be one of: |
141 | * | 93 | * |
@@ -143,7 +95,7 @@ static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | |||
143 | * | 95 | * |
144 | * %GFP_KERNEL - Allocate normal kernel ram. May sleep. | 96 | * %GFP_KERNEL - Allocate normal kernel ram. May sleep. |
145 | * | 97 | * |
146 | * %GFP_ATOMIC - Allocation will not sleep. | 98 | * %GFP_ATOMIC - Allocation will not sleep. May use emergency pools. |
147 | * For example, use this inside interrupt handlers. | 99 | * For example, use this inside interrupt handlers. |
148 | * | 100 | * |
149 | * %GFP_HIGHUSER - Allocate pages from high memory. | 101 | * %GFP_HIGHUSER - Allocate pages from high memory. |
@@ -152,18 +104,22 @@ static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | |||
152 | * | 104 | * |
153 | * %GFP_NOFS - Do not make any fs calls while trying to get memory. | 105 | * %GFP_NOFS - Do not make any fs calls while trying to get memory. |
154 | * | 106 | * |
107 | * %GFP_NOWAIT - Allocation will not sleep. | ||
108 | * | ||
109 | * %GFP_THISNODE - Allocate node-local memory only. | ||
110 | * | ||
111 | * %GFP_DMA - Allocation suitable for DMA. | ||
112 | * Should only be used for kmalloc() caches. Otherwise, use a | ||
113 | * slab created with SLAB_DMA. | ||
114 | * | ||
155 | * Also it is possible to set different flags by OR'ing | 115 | * Also it is possible to set different flags by OR'ing |
156 | * in one or more of the following additional @flags: | 116 | * in one or more of the following additional @flags: |
157 | * | 117 | * |
158 | * %__GFP_COLD - Request cache-cold pages instead of | 118 | * %__GFP_COLD - Request cache-cold pages instead of |
159 | * trying to return cache-warm pages. | 119 | * trying to return cache-warm pages. |
160 | * | 120 | * |
161 | * %__GFP_DMA - Request memory from the DMA-capable zone. | ||
162 | * | ||
163 | * %__GFP_HIGH - This allocation has high priority and may use emergency pools. | 121 | * %__GFP_HIGH - This allocation has high priority and may use emergency pools. |
164 | * | 122 | * |
165 | * %__GFP_HIGHMEM - Allocated memory may be from highmem. | ||
166 | * | ||
167 | * %__GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail | 123 | * %__GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail |
168 | * (think twice before using). | 124 | * (think twice before using). |
169 | * | 125 | * |
@@ -173,24 +129,57 @@ static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | |||
173 | * %__GFP_NOWARN - If allocation fails, don't issue any warnings. | 129 | * %__GFP_NOWARN - If allocation fails, don't issue any warnings. |
174 | * | 130 | * |
175 | * %__GFP_REPEAT - If allocation fails initially, try once more before failing. | 131 | * %__GFP_REPEAT - If allocation fails initially, try once more before failing. |
132 | * | ||
133 | * There are other flags available as well, but these are not intended | ||
134 | * for general use, and so are not documented here. For a full list of | ||
135 | * potential flags, always refer to linux/gfp.h. | ||
176 | */ | 136 | */ |
177 | static inline void *kmalloc(size_t size, gfp_t flags) | 137 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) |
178 | { | 138 | { |
179 | return __kmalloc(size, flags); | 139 | if (n != 0 && size > ULONG_MAX / n) |
140 | return NULL; | ||
141 | return __kzalloc(n * size, flags); | ||
180 | } | 142 | } |
181 | 143 | ||
182 | /** | 144 | /* |
183 | * kzalloc - allocate memory. The memory is set to zero. | 145 | * Allocator specific definitions. These are mainly used to establish optimized |
184 | * @size: how many bytes of memory are required. | 146 | * ways to convert kmalloc() calls to kmem_cache_alloc() invocations by |
185 | * @flags: the type of memory to allocate (see kmalloc). | 147 | * selecting the appropriate general cache at compile time. |
148 | * | ||
149 | * Allocators must define at least: | ||
150 | * | ||
151 | * kmem_cache_alloc() | ||
152 | * __kmalloc() | ||
153 | * kmalloc() | ||
154 | * kzalloc() | ||
155 | * | ||
156 | * Those wishing to support NUMA must also define: | ||
157 | * | ||
158 | * kmem_cache_alloc_node() | ||
159 | * kmalloc_node() | ||
160 | * | ||
161 | * See each allocator definition file for additional comments and | ||
162 | * implementation notes. | ||
186 | */ | 163 | */ |
187 | static inline void *kzalloc(size_t size, gfp_t flags) | 164 | #ifdef CONFIG_SLUB |
188 | { | 165 | #include <linux/slub_def.h> |
189 | return __kzalloc(size, flags); | 166 | #elif defined(CONFIG_SLOB) |
190 | } | 167 | #include <linux/slob_def.h> |
168 | #else | ||
169 | #include <linux/slab_def.h> | ||
191 | #endif | 170 | #endif |
192 | 171 | ||
193 | #ifndef CONFIG_NUMA | 172 | #if !defined(CONFIG_NUMA) && !defined(CONFIG_SLOB) |
173 | /** | ||
174 | * kmalloc_node - allocate memory from a specific node | ||
175 | * @size: how many bytes of memory are required. | ||
176 | * @flags: the type of memory to allocate (see kcalloc). | ||
177 | * @node: node to allocate from. | ||
178 | * | ||
179 | * kmalloc() for non-local nodes, used to allocate from a specific node | ||
180 | * if available. Equivalent to kmalloc() in the non-NUMA single-node | ||
181 | * case. | ||
182 | */ | ||
194 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 183 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
195 | { | 184 | { |
196 | return kmalloc(size, flags); | 185 | return kmalloc(size, flags); |
@@ -200,7 +189,15 @@ static inline void *__kmalloc_node(size_t size, gfp_t flags, int node) | |||
200 | { | 189 | { |
201 | return __kmalloc(size, flags); | 190 | return __kmalloc(size, flags); |
202 | } | 191 | } |
203 | #endif /* !CONFIG_NUMA */ | 192 | |
193 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | ||
194 | |||
195 | static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | ||
196 | gfp_t flags, int node) | ||
197 | { | ||
198 | return kmem_cache_alloc(cachep, flags); | ||
199 | } | ||
200 | #endif /* !CONFIG_NUMA && !CONFIG_SLOB */ | ||
204 | 201 | ||
205 | /* | 202 | /* |
206 | * kmalloc_track_caller is a special version of kmalloc that records the | 203 | * kmalloc_track_caller is a special version of kmalloc that records the |
@@ -247,4 +244,3 @@ extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *); | |||
247 | 244 | ||
248 | #endif /* __KERNEL__ */ | 245 | #endif /* __KERNEL__ */ |
249 | #endif /* _LINUX_SLAB_H */ | 246 | #endif /* _LINUX_SLAB_H */ |
250 | |||
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 8d81a60518e4..365d036c454a 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -25,6 +25,9 @@ struct cache_sizes { | |||
25 | }; | 25 | }; |
26 | extern struct cache_sizes malloc_sizes[]; | 26 | extern struct cache_sizes malloc_sizes[]; |
27 | 27 | ||
28 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | ||
29 | void *__kmalloc(size_t size, gfp_t flags); | ||
30 | |||
28 | static inline void *kmalloc(size_t size, gfp_t flags) | 31 | static inline void *kmalloc(size_t size, gfp_t flags) |
29 | { | 32 | { |
30 | if (__builtin_constant_p(size)) { | 33 | if (__builtin_constant_p(size)) { |
@@ -79,6 +82,7 @@ found: | |||
79 | 82 | ||
80 | #ifdef CONFIG_NUMA | 83 | #ifdef CONFIG_NUMA |
81 | extern void *__kmalloc_node(size_t size, gfp_t flags, int node); | 84 | extern void *__kmalloc_node(size_t size, gfp_t flags, int node); |
85 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
82 | 86 | ||
83 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 87 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
84 | { | 88 | { |
diff --git a/include/linux/slob_def.h b/include/linux/slob_def.h new file mode 100644 index 000000000000..a2daf2d418a9 --- /dev/null +++ b/include/linux/slob_def.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef __LINUX_SLOB_DEF_H | ||
2 | #define __LINUX_SLOB_DEF_H | ||
3 | |||
4 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
5 | |||
6 | static inline void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) | ||
7 | { | ||
8 | return kmem_cache_alloc_node(cachep, flags, -1); | ||
9 | } | ||
10 | |||
11 | void *__kmalloc_node(size_t size, gfp_t flags, int node); | ||
12 | |||
13 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | ||
14 | { | ||
15 | return __kmalloc_node(size, flags, node); | ||
16 | } | ||
17 | |||
18 | /** | ||
19 | * kmalloc - allocate memory | ||
20 | * @size: how many bytes of memory are required. | ||
21 | * @flags: the type of memory to allocate (see kcalloc). | ||
22 | * | ||
23 | * kmalloc is the normal method of allocating memory | ||
24 | * in the kernel. | ||
25 | */ | ||
26 | static inline void *kmalloc(size_t size, gfp_t flags) | ||
27 | { | ||
28 | return __kmalloc_node(size, flags, -1); | ||
29 | } | ||
30 | |||
31 | static inline void *__kmalloc(size_t size, gfp_t flags) | ||
32 | { | ||
33 | return kmalloc(size, flags); | ||
34 | } | ||
35 | |||
36 | /** | ||
37 | * kzalloc - allocate memory. The memory is set to zero. | ||
38 | * @size: how many bytes of memory are required. | ||
39 | * @flags: the type of memory to allocate (see kcalloc). | ||
40 | */ | ||
41 | static inline void *kzalloc(size_t size, gfp_t flags) | ||
42 | { | ||
43 | return __kzalloc(size, flags); | ||
44 | } | ||
45 | |||
46 | #endif /* __LINUX_SLOB_DEF_H */ | ||
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 6207a3d8da71..a582f6771525 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -171,6 +171,9 @@ static inline struct kmem_cache *kmalloc_slab(size_t size) | |||
171 | #define ZERO_SIZE_PTR ((void *)16) | 171 | #define ZERO_SIZE_PTR ((void *)16) |
172 | 172 | ||
173 | 173 | ||
174 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | ||
175 | void *__kmalloc(size_t size, gfp_t flags); | ||
176 | |||
174 | static inline void *kmalloc(size_t size, gfp_t flags) | 177 | static inline void *kmalloc(size_t size, gfp_t flags) |
175 | { | 178 | { |
176 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { | 179 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { |
@@ -198,7 +201,8 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
198 | } | 201 | } |
199 | 202 | ||
200 | #ifdef CONFIG_NUMA | 203 | #ifdef CONFIG_NUMA |
201 | extern void *__kmalloc_node(size_t size, gfp_t flags, int node); | 204 | void *__kmalloc_node(size_t size, gfp_t flags, int node); |
205 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
202 | 206 | ||
203 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | 207 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
204 | { | 208 | { |
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index cf715a40d833..58962c51dee1 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #ifdef CONFIG_LOCK_KERNEL | 4 | #ifdef CONFIG_LOCK_KERNEL |
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | #include <linux/spinlock.h> | ||
7 | 6 | ||
8 | #define kernel_locked() (current->lock_depth >= 0) | 7 | #define kernel_locked() (current->lock_depth >= 0) |
9 | 8 | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index 6e7c9483a6a6..f852e1afd65a 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -253,6 +253,9 @@ struct ucred { | |||
253 | 253 | ||
254 | #define MSG_EOF MSG_FIN | 254 | #define MSG_EOF MSG_FIN |
255 | 255 | ||
256 | #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exit for file | ||
257 | descriptor received through | ||
258 | SCM_RIGHTS */ | ||
256 | #if defined(CONFIG_COMPAT) | 259 | #if defined(CONFIG_COMPAT) |
257 | #define MSG_CMSG_COMPAT 0x80000000 /* This message needs 32 bit fixups */ | 260 | #define MSG_CMSG_COMPAT 0x80000000 /* This message needs 32 bit fixups */ |
258 | #else | 261 | #else |
@@ -287,6 +290,7 @@ struct ucred { | |||
287 | #define SOL_NETLINK 270 | 290 | #define SOL_NETLINK 270 |
288 | #define SOL_TIPC 271 | 291 | #define SOL_TIPC 271 |
289 | #define SOL_RXRPC 272 | 292 | #define SOL_RXRPC 272 |
293 | #define SOL_PPPOL2TP 273 | ||
290 | 294 | ||
291 | /* IPX options */ | 295 | /* IPX options */ |
292 | #define IPX_TYPE 1 | 296 | #define IPX_TYPE 1 |
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 34d4b075f7b8..40c7b5d993b9 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
@@ -153,8 +153,6 @@ | |||
153 | #define SONYPI_COMMAND_GETCAMERAROMVERSION 18 /* obsolete */ | 153 | #define SONYPI_COMMAND_GETCAMERAROMVERSION 18 /* obsolete */ |
154 | #define SONYPI_COMMAND_GETCAMERAREVISION 19 /* obsolete */ | 154 | #define SONYPI_COMMAND_GETCAMERAREVISION 19 /* obsolete */ |
155 | 155 | ||
156 | int sonypi_camera_command(int command, u8 value); | ||
157 | |||
158 | #endif /* __KERNEL__ */ | 156 | #endif /* __KERNEL__ */ |
159 | 157 | ||
160 | #endif /* _SONYPI_H_ */ | 158 | #endif /* _SONYPI_H_ */ |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index a946176db638..c376f3b36c89 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -282,6 +282,13 @@ do { \ | |||
282 | 1 : ({ local_irq_restore(flags); 0; }); \ | 282 | 1 : ({ local_irq_restore(flags); 0; }); \ |
283 | }) | 283 | }) |
284 | 284 | ||
285 | #define write_trylock_irqsave(lock, flags) \ | ||
286 | ({ \ | ||
287 | local_irq_save(flags); \ | ||
288 | write_trylock(lock) ? \ | ||
289 | 1 : ({ local_irq_restore(flags); 0; }); \ | ||
290 | }) | ||
291 | |||
285 | /* | 292 | /* |
286 | * Locks two spinlocks l1 and l2. | 293 | * Locks two spinlocks l1 and l2. |
287 | * l1_first indicates if spinlock l1 should be taken first. | 294 | * l1_first indicates if spinlock l1 should be taken first. |
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 534cdc7be58d..7a69ca3bebaf 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/sunrpc/xdr.h> | 16 | #include <linux/sunrpc/xdr.h> |
17 | 17 | ||
18 | #include <asm/atomic.h> | 18 | #include <asm/atomic.h> |
19 | #include <linux/rcupdate.h> | ||
19 | 20 | ||
20 | /* size of the nodename buffer */ | 21 | /* size of the nodename buffer */ |
21 | #define UNX_MAXNODENAME 32 | 22 | #define UNX_MAXNODENAME 32 |
@@ -30,22 +31,28 @@ struct auth_cred { | |||
30 | /* | 31 | /* |
31 | * Client user credentials | 32 | * Client user credentials |
32 | */ | 33 | */ |
34 | struct rpc_auth; | ||
35 | struct rpc_credops; | ||
33 | struct rpc_cred { | 36 | struct rpc_cred { |
34 | struct hlist_node cr_hash; /* hash chain */ | 37 | struct hlist_node cr_hash; /* hash chain */ |
35 | struct rpc_credops * cr_ops; | 38 | struct list_head cr_lru; /* lru garbage collection */ |
36 | unsigned long cr_expire; /* when to gc */ | 39 | struct rcu_head cr_rcu; |
37 | atomic_t cr_count; /* ref count */ | 40 | struct rpc_auth * cr_auth; |
38 | unsigned short cr_flags; /* various flags */ | 41 | const struct rpc_credops *cr_ops; |
39 | #ifdef RPC_DEBUG | 42 | #ifdef RPC_DEBUG |
40 | unsigned long cr_magic; /* 0x0f4aa4f0 */ | 43 | unsigned long cr_magic; /* 0x0f4aa4f0 */ |
41 | #endif | 44 | #endif |
45 | unsigned long cr_expire; /* when to gc */ | ||
46 | unsigned long cr_flags; /* various flags */ | ||
47 | atomic_t cr_count; /* ref count */ | ||
42 | 48 | ||
43 | uid_t cr_uid; | 49 | uid_t cr_uid; |
44 | 50 | ||
45 | /* per-flavor data */ | 51 | /* per-flavor data */ |
46 | }; | 52 | }; |
47 | #define RPCAUTH_CRED_NEW 0x0001 | 53 | #define RPCAUTH_CRED_NEW 0 |
48 | #define RPCAUTH_CRED_UPTODATE 0x0002 | 54 | #define RPCAUTH_CRED_UPTODATE 1 |
55 | #define RPCAUTH_CRED_HASHED 2 | ||
49 | 56 | ||
50 | #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 | 57 | #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 |
51 | 58 | ||
@@ -56,10 +63,10 @@ struct rpc_cred { | |||
56 | #define RPC_CREDCACHE_MASK (RPC_CREDCACHE_NR - 1) | 63 | #define RPC_CREDCACHE_MASK (RPC_CREDCACHE_NR - 1) |
57 | struct rpc_cred_cache { | 64 | struct rpc_cred_cache { |
58 | struct hlist_head hashtable[RPC_CREDCACHE_NR]; | 65 | struct hlist_head hashtable[RPC_CREDCACHE_NR]; |
59 | unsigned long nextgc; /* next garbage collection */ | 66 | spinlock_t lock; |
60 | unsigned long expire; /* cache expiry interval */ | ||
61 | }; | 67 | }; |
62 | 68 | ||
69 | struct rpc_authops; | ||
63 | struct rpc_auth { | 70 | struct rpc_auth { |
64 | unsigned int au_cslack; /* call cred size estimate */ | 71 | unsigned int au_cslack; /* call cred size estimate */ |
65 | /* guess at number of u32's auth adds before | 72 | /* guess at number of u32's auth adds before |
@@ -69,7 +76,7 @@ struct rpc_auth { | |||
69 | unsigned int au_verfsize; | 76 | unsigned int au_verfsize; |
70 | 77 | ||
71 | unsigned int au_flags; /* various flags */ | 78 | unsigned int au_flags; /* various flags */ |
72 | struct rpc_authops * au_ops; /* operations */ | 79 | const struct rpc_authops *au_ops; /* operations */ |
73 | rpc_authflavor_t au_flavor; /* pseudoflavor (note may | 80 | rpc_authflavor_t au_flavor; /* pseudoflavor (note may |
74 | * differ from the flavor in | 81 | * differ from the flavor in |
75 | * au_ops->au_flavor in gss | 82 | * au_ops->au_flavor in gss |
@@ -115,17 +122,19 @@ struct rpc_credops { | |||
115 | void *, __be32 *, void *); | 122 | void *, __be32 *, void *); |
116 | }; | 123 | }; |
117 | 124 | ||
118 | extern struct rpc_authops authunix_ops; | 125 | extern const struct rpc_authops authunix_ops; |
119 | extern struct rpc_authops authnull_ops; | 126 | extern const struct rpc_authops authnull_ops; |
120 | #ifdef CONFIG_SUNRPC_SECURE | 127 | |
121 | extern struct rpc_authops authdes_ops; | 128 | void __init rpc_init_authunix(void); |
122 | #endif | 129 | void __init rpcauth_init_module(void); |
130 | void __exit rpcauth_remove_module(void); | ||
123 | 131 | ||
124 | int rpcauth_register(struct rpc_authops *); | 132 | int rpcauth_register(const struct rpc_authops *); |
125 | int rpcauth_unregister(struct rpc_authops *); | 133 | int rpcauth_unregister(const struct rpc_authops *); |
126 | struct rpc_auth * rpcauth_create(rpc_authflavor_t, struct rpc_clnt *); | 134 | struct rpc_auth * rpcauth_create(rpc_authflavor_t, struct rpc_clnt *); |
127 | void rpcauth_destroy(struct rpc_auth *); | 135 | void rpcauth_release(struct rpc_auth *); |
128 | struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int); | 136 | struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int); |
137 | void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *); | ||
129 | struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); | 138 | struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); |
130 | struct rpc_cred * rpcauth_bindcred(struct rpc_task *); | 139 | struct rpc_cred * rpcauth_bindcred(struct rpc_task *); |
131 | void rpcauth_holdcred(struct rpc_task *); | 140 | void rpcauth_holdcred(struct rpc_task *); |
@@ -138,8 +147,9 @@ int rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, | |||
138 | int rpcauth_refreshcred(struct rpc_task *); | 147 | int rpcauth_refreshcred(struct rpc_task *); |
139 | void rpcauth_invalcred(struct rpc_task *); | 148 | void rpcauth_invalcred(struct rpc_task *); |
140 | int rpcauth_uptodatecred(struct rpc_task *); | 149 | int rpcauth_uptodatecred(struct rpc_task *); |
141 | int rpcauth_init_credcache(struct rpc_auth *, unsigned long); | 150 | int rpcauth_init_credcache(struct rpc_auth *); |
142 | void rpcauth_free_credcache(struct rpc_auth *); | 151 | void rpcauth_destroy_credcache(struct rpc_auth *); |
152 | void rpcauth_clear_credcache(struct rpc_cred_cache *); | ||
143 | 153 | ||
144 | static inline | 154 | static inline |
145 | struct rpc_cred * get_rpccred(struct rpc_cred *cred) | 155 | struct rpc_cred * get_rpccred(struct rpc_cred *cred) |
diff --git a/include/linux/sunrpc/auth_gss.h b/include/linux/sunrpc/auth_gss.h index 2db2fbf34947..67658e17a375 100644 --- a/include/linux/sunrpc/auth_gss.h +++ b/include/linux/sunrpc/auth_gss.h | |||
@@ -75,6 +75,7 @@ struct gss_cl_ctx { | |||
75 | struct xdr_netobj gc_wire_ctx; | 75 | struct xdr_netobj gc_wire_ctx; |
76 | u32 gc_win; | 76 | u32 gc_win; |
77 | unsigned long gc_expiry; | 77 | unsigned long gc_expiry; |
78 | struct rcu_head gc_rcu; | ||
78 | }; | 79 | }; |
79 | 80 | ||
80 | struct gss_upcall_msg; | 81 | struct gss_upcall_msg; |
@@ -85,11 +86,6 @@ struct gss_cred { | |||
85 | struct gss_upcall_msg *gc_upcall; | 86 | struct gss_upcall_msg *gc_upcall; |
86 | }; | 87 | }; |
87 | 88 | ||
88 | #define gc_uid gc_base.cr_uid | ||
89 | #define gc_count gc_base.cr_count | ||
90 | #define gc_flags gc_base.cr_flags | ||
91 | #define gc_expire gc_base.cr_expire | ||
92 | |||
93 | #endif /* __KERNEL__ */ | 89 | #endif /* __KERNEL__ */ |
94 | #endif /* _LINUX_SUNRPC_AUTH_GSS_H */ | 90 | #endif /* _LINUX_SUNRPC_AUTH_GSS_H */ |
95 | 91 | ||
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 66611423c8ee..c0d9d14983b3 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -24,8 +24,10 @@ struct rpc_inode; | |||
24 | * The high-level client handle | 24 | * The high-level client handle |
25 | */ | 25 | */ |
26 | struct rpc_clnt { | 26 | struct rpc_clnt { |
27 | atomic_t cl_count; /* Number of clones */ | 27 | struct kref cl_kref; /* Number of references */ |
28 | atomic_t cl_users; /* number of references */ | 28 | struct list_head cl_clients; /* Global list of clients */ |
29 | struct list_head cl_tasks; /* List of tasks */ | ||
30 | spinlock_t cl_lock; /* spinlock */ | ||
29 | struct rpc_xprt * cl_xprt; /* transport */ | 31 | struct rpc_xprt * cl_xprt; /* transport */ |
30 | struct rpc_procinfo * cl_procinfo; /* procedure info */ | 32 | struct rpc_procinfo * cl_procinfo; /* procedure info */ |
31 | u32 cl_prog, /* RPC program number */ | 33 | u32 cl_prog, /* RPC program number */ |
@@ -41,9 +43,7 @@ struct rpc_clnt { | |||
41 | unsigned int cl_softrtry : 1,/* soft timeouts */ | 43 | unsigned int cl_softrtry : 1,/* soft timeouts */ |
42 | cl_intr : 1,/* interruptible */ | 44 | cl_intr : 1,/* interruptible */ |
43 | cl_discrtry : 1,/* disconnect before retry */ | 45 | cl_discrtry : 1,/* disconnect before retry */ |
44 | cl_autobind : 1,/* use getport() */ | 46 | cl_autobind : 1;/* use getport() */ |
45 | cl_oneshot : 1,/* dispose after use */ | ||
46 | cl_dead : 1;/* abandoned */ | ||
47 | 47 | ||
48 | struct rpc_rtt * cl_rtt; /* RTO estimator data */ | 48 | struct rpc_rtt * cl_rtt; /* RTO estimator data */ |
49 | 49 | ||
@@ -98,6 +98,7 @@ struct rpc_create_args { | |||
98 | int protocol; | 98 | int protocol; |
99 | struct sockaddr *address; | 99 | struct sockaddr *address; |
100 | size_t addrsize; | 100 | size_t addrsize; |
101 | struct sockaddr *saddress; | ||
101 | struct rpc_timeout *timeout; | 102 | struct rpc_timeout *timeout; |
102 | char *servername; | 103 | char *servername; |
103 | struct rpc_program *program; | 104 | struct rpc_program *program; |
@@ -110,20 +111,20 @@ struct rpc_create_args { | |||
110 | #define RPC_CLNT_CREATE_HARDRTRY (1UL << 0) | 111 | #define RPC_CLNT_CREATE_HARDRTRY (1UL << 0) |
111 | #define RPC_CLNT_CREATE_INTR (1UL << 1) | 112 | #define RPC_CLNT_CREATE_INTR (1UL << 1) |
112 | #define RPC_CLNT_CREATE_AUTOBIND (1UL << 2) | 113 | #define RPC_CLNT_CREATE_AUTOBIND (1UL << 2) |
113 | #define RPC_CLNT_CREATE_ONESHOT (1UL << 3) | 114 | #define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 3) |
114 | #define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 4) | 115 | #define RPC_CLNT_CREATE_NOPING (1UL << 4) |
115 | #define RPC_CLNT_CREATE_NOPING (1UL << 5) | 116 | #define RPC_CLNT_CREATE_DISCRTRY (1UL << 5) |
116 | #define RPC_CLNT_CREATE_DISCRTRY (1UL << 6) | ||
117 | 117 | ||
118 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | 118 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
119 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 119 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
120 | struct rpc_program *, int); | 120 | struct rpc_program *, int); |
121 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); | 121 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); |
122 | int rpc_shutdown_client(struct rpc_clnt *); | 122 | void rpc_shutdown_client(struct rpc_clnt *); |
123 | int rpc_destroy_client(struct rpc_clnt *); | ||
124 | void rpc_release_client(struct rpc_clnt *); | 123 | void rpc_release_client(struct rpc_clnt *); |
124 | |||
125 | int rpcb_register(u32, u32, int, unsigned short, int *); | 125 | int rpcb_register(u32, u32, int, unsigned short, int *); |
126 | void rpcb_getport(struct rpc_task *); | 126 | int rpcb_getport_sync(struct sockaddr_in *, __u32, __u32, int); |
127 | void rpcb_getport_async(struct rpc_task *); | ||
127 | 128 | ||
128 | void rpc_call_setup(struct rpc_task *, struct rpc_message *, int); | 129 | void rpc_call_setup(struct rpc_task *, struct rpc_message *, int); |
129 | 130 | ||
@@ -132,20 +133,16 @@ int rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg, | |||
132 | void *calldata); | 133 | void *calldata); |
133 | int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, | 134 | int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, |
134 | int flags); | 135 | int flags); |
136 | struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, | ||
137 | int flags); | ||
135 | void rpc_restart_call(struct rpc_task *); | 138 | void rpc_restart_call(struct rpc_task *); |
136 | void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset); | 139 | void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset); |
137 | void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); | 140 | void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); |
138 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); | 141 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); |
139 | size_t rpc_max_payload(struct rpc_clnt *); | 142 | size_t rpc_max_payload(struct rpc_clnt *); |
140 | void rpc_force_rebind(struct rpc_clnt *); | 143 | void rpc_force_rebind(struct rpc_clnt *); |
141 | int rpc_ping(struct rpc_clnt *clnt, int flags); | ||
142 | size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); | 144 | size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); |
143 | char * rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); | 145 | char * rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); |
144 | 146 | ||
145 | /* | ||
146 | * Helper function for NFSroot support | ||
147 | */ | ||
148 | int rpcb_getport_external(struct sockaddr_in *, __u32, __u32, int); | ||
149 | |||
150 | #endif /* __KERNEL__ */ | 147 | #endif /* __KERNEL__ */ |
151 | #endif /* _LINUX_SUNRPC_CLNT_H */ | 148 | #endif /* _LINUX_SUNRPC_CLNT_H */ |
diff --git a/include/linux/sunrpc/gss_api.h b/include/linux/sunrpc/gss_api.h index 5eca9e442051..bbac101ac372 100644 --- a/include/linux/sunrpc/gss_api.h +++ b/include/linux/sunrpc/gss_api.h | |||
@@ -77,7 +77,7 @@ struct gss_api_mech { | |||
77 | struct module *gm_owner; | 77 | struct module *gm_owner; |
78 | struct xdr_netobj gm_oid; | 78 | struct xdr_netobj gm_oid; |
79 | char *gm_name; | 79 | char *gm_name; |
80 | struct gss_api_ops *gm_ops; | 80 | const struct gss_api_ops *gm_ops; |
81 | /* pseudoflavors supported by this mechanism: */ | 81 | /* pseudoflavors supported by this mechanism: */ |
82 | int gm_pf_num; | 82 | int gm_pf_num; |
83 | struct pf_desc * gm_pfs; | 83 | struct pf_desc * gm_pfs; |
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h index ad293760f6eb..51b977a4ca20 100644 --- a/include/linux/sunrpc/rpc_pipe_fs.h +++ b/include/linux/sunrpc/rpc_pipe_fs.h | |||
@@ -23,9 +23,11 @@ struct rpc_inode { | |||
23 | void *private; | 23 | void *private; |
24 | struct list_head pipe; | 24 | struct list_head pipe; |
25 | struct list_head in_upcall; | 25 | struct list_head in_upcall; |
26 | struct list_head in_downcall; | ||
26 | int pipelen; | 27 | int pipelen; |
27 | int nreaders; | 28 | int nreaders; |
28 | int nwriters; | 29 | int nwriters; |
30 | int nkern_readwriters; | ||
29 | wait_queue_head_t waitq; | 31 | wait_queue_head_t waitq; |
30 | #define RPC_PIPE_WAIT_FOR_OPEN 1 | 32 | #define RPC_PIPE_WAIT_FOR_OPEN 1 |
31 | int flags; | 33 | int flags; |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 2047fb202a13..8ea077db0099 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -98,7 +98,6 @@ struct rpc_task { | |||
98 | unsigned short tk_pid; /* debugging aid */ | 98 | unsigned short tk_pid; /* debugging aid */ |
99 | #endif | 99 | #endif |
100 | }; | 100 | }; |
101 | #define tk_auth tk_client->cl_auth | ||
102 | #define tk_xprt tk_client->cl_xprt | 101 | #define tk_xprt tk_client->cl_xprt |
103 | 102 | ||
104 | /* support walking a list of tasks on a wait queue */ | 103 | /* support walking a list of tasks on a wait queue */ |
@@ -110,11 +109,6 @@ struct rpc_task { | |||
110 | if (!list_empty(head) && \ | 109 | if (!list_empty(head) && \ |
111 | ((task=list_entry((head)->next, struct rpc_task, u.tk_wait.list)),1)) | 110 | ((task=list_entry((head)->next, struct rpc_task, u.tk_wait.list)),1)) |
112 | 111 | ||
113 | /* .. and walking list of all tasks */ | ||
114 | #define alltask_for_each(task, pos, head) \ | ||
115 | list_for_each(pos, head) \ | ||
116 | if ((task=list_entry(pos, struct rpc_task, tk_task)),1) | ||
117 | |||
118 | typedef void (*rpc_action)(struct rpc_task *); | 112 | typedef void (*rpc_action)(struct rpc_task *); |
119 | 113 | ||
120 | struct rpc_call_ops { | 114 | struct rpc_call_ops { |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index e21dd93ac4b7..a53e0fa855d2 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -59,6 +59,7 @@ struct svc_sock { | |||
59 | /* cache of various info for TCP sockets */ | 59 | /* cache of various info for TCP sockets */ |
60 | void *sk_info_authunix; | 60 | void *sk_info_authunix; |
61 | 61 | ||
62 | struct sockaddr_storage sk_local; /* local address */ | ||
62 | struct sockaddr_storage sk_remote; /* remote peer's address */ | 63 | struct sockaddr_storage sk_remote; /* remote peer's address */ |
63 | int sk_remotelen; /* length of address */ | 64 | int sk_remotelen; /* length of address */ |
64 | }; | 65 | }; |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 34f7590506fa..d11cedd14f0f 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/sunrpc/xdr.h> | 17 | #include <linux/sunrpc/xdr.h> |
18 | #include <linux/sunrpc/msg_prot.h> | 18 | #include <linux/sunrpc/msg_prot.h> |
19 | 19 | ||
20 | #ifdef __KERNEL__ | ||
21 | |||
20 | extern unsigned int xprt_udp_slot_table_entries; | 22 | extern unsigned int xprt_udp_slot_table_entries; |
21 | extern unsigned int xprt_tcp_slot_table_entries; | 23 | extern unsigned int xprt_tcp_slot_table_entries; |
22 | 24 | ||
@@ -194,7 +196,13 @@ struct rpc_xprt { | |||
194 | char * address_strings[RPC_DISPLAY_MAX]; | 196 | char * address_strings[RPC_DISPLAY_MAX]; |
195 | }; | 197 | }; |
196 | 198 | ||
197 | #ifdef __KERNEL__ | 199 | struct rpc_xprtsock_create { |
200 | int proto; /* IPPROTO_UDP or IPPROTO_TCP */ | ||
201 | struct sockaddr * srcaddr; /* optional local address */ | ||
202 | struct sockaddr * dstaddr; /* remote peer address */ | ||
203 | size_t addrlen; | ||
204 | struct rpc_timeout * timeout; /* optional timeout parameters */ | ||
205 | }; | ||
198 | 206 | ||
199 | /* | 207 | /* |
200 | * Transport operations used by ULPs | 208 | * Transport operations used by ULPs |
@@ -204,7 +212,7 @@ void xprt_set_timeout(struct rpc_timeout *to, unsigned int retr, unsigned long | |||
204 | /* | 212 | /* |
205 | * Generic internal transport functions | 213 | * Generic internal transport functions |
206 | */ | 214 | */ |
207 | struct rpc_xprt * xprt_create_transport(int proto, struct sockaddr *addr, size_t size, struct rpc_timeout *toparms); | 215 | struct rpc_xprt * xprt_create_transport(struct rpc_xprtsock_create *args); |
208 | void xprt_connect(struct rpc_task *task); | 216 | void xprt_connect(struct rpc_task *task); |
209 | void xprt_reserve(struct rpc_task *task); | 217 | void xprt_reserve(struct rpc_task *task); |
210 | int xprt_reserve_xprt(struct rpc_task *task); | 218 | int xprt_reserve_xprt(struct rpc_task *task); |
@@ -242,8 +250,8 @@ void xprt_disconnect(struct rpc_xprt *xprt); | |||
242 | /* | 250 | /* |
243 | * Socket transport setup operations | 251 | * Socket transport setup operations |
244 | */ | 252 | */ |
245 | struct rpc_xprt * xs_setup_udp(struct sockaddr *addr, size_t addrlen, struct rpc_timeout *to); | 253 | struct rpc_xprt * xs_setup_udp(struct rpc_xprtsock_create *args); |
246 | struct rpc_xprt * xs_setup_tcp(struct sockaddr *addr, size_t addrlen, struct rpc_timeout *to); | 254 | struct rpc_xprt * xs_setup_tcp(struct rpc_xprtsock_create *args); |
247 | int init_socket_xprt(void); | 255 | int init_socket_xprt(void); |
248 | void cleanup_socket_xprt(void); | 256 | void cleanup_socket_xprt(void); |
249 | 257 | ||
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index e699ab279c2c..e285746588d6 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -101,8 +101,7 @@ struct sysdev_attribute { | |||
101 | 101 | ||
102 | #define _SYSDEV_ATTR(_name,_mode,_show,_store) \ | 102 | #define _SYSDEV_ATTR(_name,_mode,_show,_store) \ |
103 | { \ | 103 | { \ |
104 | .attr = { .name = __stringify(_name), .mode = _mode, \ | 104 | .attr = { .name = __stringify(_name), .mode = _mode }, \ |
105 | .owner = THIS_MODULE }, \ | ||
106 | .show = _show, \ | 105 | .show = _show, \ |
107 | .store = _store, \ | 106 | .store = _store, \ |
108 | } | 107 | } |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 7d5d1ec95c2e..be8228e50a27 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -19,10 +19,15 @@ struct kobject; | |||
19 | struct module; | 19 | struct module; |
20 | struct nameidata; | 20 | struct nameidata; |
21 | struct dentry; | 21 | struct dentry; |
22 | struct sysfs_dirent; | ||
22 | 23 | ||
24 | /* FIXME | ||
25 | * The *owner field is no longer used, but leave around | ||
26 | * until the tree gets cleaned up fully. | ||
27 | */ | ||
23 | struct attribute { | 28 | struct attribute { |
24 | const char * name; | 29 | const char * name; |
25 | struct module * owner; | 30 | struct module * owner; |
26 | mode_t mode; | 31 | mode_t mode; |
27 | }; | 32 | }; |
28 | 33 | ||
@@ -39,14 +44,14 @@ struct attribute_group { | |||
39 | */ | 44 | */ |
40 | 45 | ||
41 | #define __ATTR(_name,_mode,_show,_store) { \ | 46 | #define __ATTR(_name,_mode,_show,_store) { \ |
42 | .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, \ | 47 | .attr = {.name = __stringify(_name), .mode = _mode }, \ |
43 | .show = _show, \ | 48 | .show = _show, \ |
44 | .store = _store, \ | 49 | .store = _store, \ |
45 | } | 50 | } |
46 | 51 | ||
47 | #define __ATTR_RO(_name) { \ | 52 | #define __ATTR_RO(_name) { \ |
48 | .attr = { .name = __stringify(_name), .mode = 0444, .owner = THIS_MODULE }, \ | 53 | .attr = { .name = __stringify(_name), .mode = 0444 }, \ |
49 | .show = _name##_show, \ | 54 | .show = _name##_show, \ |
50 | } | 55 | } |
51 | 56 | ||
52 | #define __ATTR_NULL { .attr = { .name = NULL } } | 57 | #define __ATTR_NULL { .attr = { .name = NULL } } |
@@ -59,8 +64,10 @@ struct bin_attribute { | |||
59 | struct attribute attr; | 64 | struct attribute attr; |
60 | size_t size; | 65 | size_t size; |
61 | void *private; | 66 | void *private; |
62 | ssize_t (*read)(struct kobject *, char *, loff_t, size_t); | 67 | ssize_t (*read)(struct kobject *, struct bin_attribute *, |
63 | ssize_t (*write)(struct kobject *, char *, loff_t, size_t); | 68 | char *, loff_t, size_t); |
69 | ssize_t (*write)(struct kobject *, struct bin_attribute *, | ||
70 | char *, loff_t, size_t); | ||
64 | int (*mmap)(struct kobject *, struct bin_attribute *attr, | 71 | int (*mmap)(struct kobject *, struct bin_attribute *attr, |
65 | struct vm_area_struct *vma); | 72 | struct vm_area_struct *vma); |
66 | }; | 73 | }; |
@@ -70,12 +77,16 @@ struct sysfs_ops { | |||
70 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); | 77 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); |
71 | }; | 78 | }; |
72 | 79 | ||
80 | #define SYSFS_TYPE_MASK 0x00ff | ||
73 | #define SYSFS_ROOT 0x0001 | 81 | #define SYSFS_ROOT 0x0001 |
74 | #define SYSFS_DIR 0x0002 | 82 | #define SYSFS_DIR 0x0002 |
75 | #define SYSFS_KOBJ_ATTR 0x0004 | 83 | #define SYSFS_KOBJ_ATTR 0x0004 |
76 | #define SYSFS_KOBJ_BIN_ATTR 0x0008 | 84 | #define SYSFS_KOBJ_BIN_ATTR 0x0008 |
77 | #define SYSFS_KOBJ_LINK 0x0020 | 85 | #define SYSFS_KOBJ_LINK 0x0020 |
78 | #define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_LINK) | 86 | #define SYSFS_COPY_NAME (SYSFS_DIR | SYSFS_KOBJ_LINK) |
87 | |||
88 | #define SYSFS_FLAG_MASK ~SYSFS_TYPE_MASK | ||
89 | #define SYSFS_FLAG_REMOVED 0x0100 | ||
79 | 90 | ||
80 | #ifdef CONFIG_SYSFS | 91 | #ifdef CONFIG_SYSFS |
81 | 92 | ||
@@ -83,13 +94,14 @@ extern int sysfs_schedule_callback(struct kobject *kobj, | |||
83 | void (*func)(void *), void *data, struct module *owner); | 94 | void (*func)(void *), void *data, struct module *owner); |
84 | 95 | ||
85 | extern int __must_check | 96 | extern int __must_check |
86 | sysfs_create_dir(struct kobject *, struct dentry *); | 97 | sysfs_create_dir(struct kobject *kobj, struct sysfs_dirent *shadow_parent_sd); |
87 | 98 | ||
88 | extern void | 99 | extern void |
89 | sysfs_remove_dir(struct kobject *); | 100 | sysfs_remove_dir(struct kobject *); |
90 | 101 | ||
91 | extern int __must_check | 102 | extern int __must_check |
92 | sysfs_rename_dir(struct kobject *, struct dentry *, const char *new_name); | 103 | sysfs_rename_dir(struct kobject *kobj, struct sysfs_dirent *new_parent_sd, |
104 | const char *new_name); | ||
93 | 105 | ||
94 | extern int __must_check | 106 | extern int __must_check |
95 | sysfs_move_dir(struct kobject *, struct kobject *); | 107 | sysfs_move_dir(struct kobject *, struct kobject *); |
@@ -129,8 +141,8 @@ void sysfs_notify(struct kobject * k, char *dir, char *attr); | |||
129 | 141 | ||
130 | extern int sysfs_make_shadowed_dir(struct kobject *kobj, | 142 | extern int sysfs_make_shadowed_dir(struct kobject *kobj, |
131 | void * (*follow_link)(struct dentry *, struct nameidata *)); | 143 | void * (*follow_link)(struct dentry *, struct nameidata *)); |
132 | extern struct dentry *sysfs_create_shadow_dir(struct kobject *kobj); | 144 | extern struct sysfs_dirent *sysfs_create_shadow_dir(struct kobject *kobj); |
133 | extern void sysfs_remove_shadow_dir(struct dentry *dir); | 145 | extern void sysfs_remove_shadow_dir(struct sysfs_dirent *shadow_sd); |
134 | 146 | ||
135 | extern int __must_check sysfs_init(void); | 147 | extern int __must_check sysfs_init(void); |
136 | 148 | ||
@@ -142,7 +154,8 @@ static inline int sysfs_schedule_callback(struct kobject *kobj, | |||
142 | return -ENOSYS; | 154 | return -ENOSYS; |
143 | } | 155 | } |
144 | 156 | ||
145 | static inline int sysfs_create_dir(struct kobject * k, struct dentry *shadow) | 157 | static inline int sysfs_create_dir(struct kobject *kobj, |
158 | struct sysfs_dirent *shadow_parent_sd) | ||
146 | { | 159 | { |
147 | return 0; | 160 | return 0; |
148 | } | 161 | } |
@@ -152,9 +165,9 @@ static inline void sysfs_remove_dir(struct kobject * k) | |||
152 | ; | 165 | ; |
153 | } | 166 | } |
154 | 167 | ||
155 | static inline int sysfs_rename_dir(struct kobject * k, | 168 | static inline int sysfs_rename_dir(struct kobject *kobj, |
156 | struct dentry *new_parent, | 169 | struct sysfs_dirent *new_parent_sd, |
157 | const char *new_name) | 170 | const char *new_name) |
158 | { | 171 | { |
159 | return 0; | 172 | return 0; |
160 | } | 173 | } |
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h index a46104a28f66..dce1ed204972 100644 --- a/include/linux/taskstats.h +++ b/include/linux/taskstats.h | |||
@@ -31,7 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | 33 | ||
34 | #define TASKSTATS_VERSION 4 | 34 | #define TASKSTATS_VERSION 5 |
35 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN | 35 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN |
36 | * in linux/sched.h */ | 36 | * in linux/sched.h */ |
37 | 37 | ||
@@ -149,6 +149,9 @@ struct taskstats { | |||
149 | __u64 read_bytes; /* bytes of read I/O */ | 149 | __u64 read_bytes; /* bytes of read I/O */ |
150 | __u64 write_bytes; /* bytes of write I/O */ | 150 | __u64 write_bytes; /* bytes of write I/O */ |
151 | __u64 cancelled_write_bytes; /* bytes of cancelled write I/O */ | 151 | __u64 cancelled_write_bytes; /* bytes of cancelled write I/O */ |
152 | |||
153 | __u64 nvcsw; /* voluntary_ctxt_switches */ | ||
154 | __u64 nivcsw; /* nonvoluntary_ctxt_switches */ | ||
152 | }; | 155 | }; |
153 | 156 | ||
154 | 157 | ||
diff --git a/include/linux/time.h b/include/linux/time.h index dda9be685ab6..4bb05a829be9 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -116,6 +116,8 @@ extern int do_setitimer(int which, struct itimerval *value, | |||
116 | extern unsigned int alarm_setitimer(unsigned int seconds); | 116 | extern unsigned int alarm_setitimer(unsigned int seconds); |
117 | extern int do_getitimer(int which, struct itimerval *value); | 117 | extern int do_getitimer(int which, struct itimerval *value); |
118 | extern void getnstimeofday(struct timespec *tv); | 118 | extern void getnstimeofday(struct timespec *tv); |
119 | extern void getboottime(struct timespec *ts); | ||
120 | extern void monotonic_to_bootbased(struct timespec *ts); | ||
119 | 121 | ||
120 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | 122 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); |
121 | extern int timekeeping_is_continuous(void); | 123 | extern int timekeeping_is_continuous(void); |
diff --git a/include/linux/timer.h b/include/linux/timer.h index c661710d3627..78cf899b4409 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/ktime.h> | 5 | #include <linux/ktime.h> |
6 | #include <linux/spinlock.h> | ||
7 | #include <linux/stddef.h> | 6 | #include <linux/stddef.h> |
8 | 7 | ||
9 | struct tvec_t_base_s; | 8 | struct tvec_t_base_s; |
@@ -91,16 +90,13 @@ extern unsigned long get_next_timer_interrupt(unsigned long now); | |||
91 | */ | 90 | */ |
92 | #ifdef CONFIG_TIMER_STATS | 91 | #ifdef CONFIG_TIMER_STATS |
93 | 92 | ||
93 | #define TIMER_STATS_FLAG_DEFERRABLE 0x1 | ||
94 | |||
94 | extern void init_timer_stats(void); | 95 | extern void init_timer_stats(void); |
95 | 96 | ||
96 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | 97 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, |
97 | void *timerf, char * comm); | 98 | void *timerf, char *comm, |
98 | 99 | unsigned int timer_flag); | |
99 | static inline void timer_stats_account_timer(struct timer_list *timer) | ||
100 | { | ||
101 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | ||
102 | timer->function, timer->start_comm); | ||
103 | } | ||
104 | 100 | ||
105 | extern void __timer_stats_timer_set_start_info(struct timer_list *timer, | 101 | extern void __timer_stats_timer_set_start_info(struct timer_list *timer, |
106 | void *addr); | 102 | void *addr); |
@@ -119,10 +115,6 @@ static inline void init_timer_stats(void) | |||
119 | { | 115 | { |
120 | } | 116 | } |
121 | 117 | ||
122 | static inline void timer_stats_account_timer(struct timer_list *timer) | ||
123 | { | ||
124 | } | ||
125 | |||
126 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) | 118 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) |
127 | { | 119 | { |
128 | } | 120 | } |
diff --git a/include/linux/topology.h b/include/linux/topology.h index da6c39b2d051..d0890a7e5bab 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -50,10 +50,10 @@ | |||
50 | for_each_online_node(node) \ | 50 | for_each_online_node(node) \ |
51 | if (nr_cpus_node(node)) | 51 | if (nr_cpus_node(node)) |
52 | 52 | ||
53 | #ifndef node_distance | ||
54 | /* Conform to ACPI 2.0 SLIT distance definitions */ | 53 | /* Conform to ACPI 2.0 SLIT distance definitions */ |
55 | #define LOCAL_DISTANCE 10 | 54 | #define LOCAL_DISTANCE 10 |
56 | #define REMOTE_DISTANCE 20 | 55 | #define REMOTE_DISTANCE 20 |
56 | #ifndef node_distance | ||
57 | #define node_distance(from,to) ((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE) | 57 | #define node_distance(from,to) ((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE) |
58 | #endif | 58 | #endif |
59 | #ifndef RECLAIM_DISTANCE | 59 | #ifndef RECLAIM_DISTANCE |
diff --git a/include/linux/tty.h b/include/linux/tty.h index bb4576085203..691a1748d9d2 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -178,6 +178,7 @@ struct tty_bufhead { | |||
178 | #define L_IEXTEN(tty) _L_FLAG((tty),IEXTEN) | 178 | #define L_IEXTEN(tty) _L_FLAG((tty),IEXTEN) |
179 | 179 | ||
180 | struct device; | 180 | struct device; |
181 | struct signal_struct; | ||
181 | /* | 182 | /* |
182 | * Where all of the state associated with a tty is kept while the tty | 183 | * Where all of the state associated with a tty is kept while the tty |
183 | * is open. Since the termios state should be kept even if the tty | 184 | * is open. Since the termios state should be kept even if the tty |
@@ -310,6 +311,7 @@ extern void tty_hangup(struct tty_struct * tty); | |||
310 | extern void tty_vhangup(struct tty_struct * tty); | 311 | extern void tty_vhangup(struct tty_struct * tty); |
311 | extern void tty_unhangup(struct file *filp); | 312 | extern void tty_unhangup(struct file *filp); |
312 | extern int tty_hung_up_p(struct file * filp); | 313 | extern int tty_hung_up_p(struct file * filp); |
314 | extern int is_tty(struct file *filp); | ||
313 | extern void do_SAK(struct tty_struct *tty); | 315 | extern void do_SAK(struct tty_struct *tty); |
314 | extern void __do_SAK(struct tty_struct *tty); | 316 | extern void __do_SAK(struct tty_struct *tty); |
315 | extern void disassociate_ctty(int priv); | 317 | extern void disassociate_ctty(int priv); |
@@ -338,9 +340,46 @@ extern struct tty_struct *get_current_tty(void); | |||
338 | 340 | ||
339 | extern struct mutex tty_mutex; | 341 | extern struct mutex tty_mutex; |
340 | 342 | ||
343 | extern void tty_write_unlock(struct tty_struct *tty); | ||
344 | extern int tty_write_lock(struct tty_struct *tty, int ndelay); | ||
345 | #define tty_is_writelocked(tty) (mutex_is_locked(&tty->atomic_write_lock)) | ||
346 | |||
347 | |||
348 | |||
341 | /* n_tty.c */ | 349 | /* n_tty.c */ |
342 | extern struct tty_ldisc tty_ldisc_N_TTY; | 350 | extern struct tty_ldisc tty_ldisc_N_TTY; |
343 | 351 | ||
352 | /* tty_audit.c */ | ||
353 | #ifdef CONFIG_AUDIT | ||
354 | extern void tty_audit_add_data(struct tty_struct *tty, unsigned char *data, | ||
355 | size_t size); | ||
356 | extern void tty_audit_exit(void); | ||
357 | extern void tty_audit_fork(struct signal_struct *sig); | ||
358 | extern void tty_audit_push(struct tty_struct *tty); | ||
359 | extern void tty_audit_push_task(struct task_struct *tsk, uid_t loginuid); | ||
360 | extern void tty_audit_opening(void); | ||
361 | #else | ||
362 | static inline void tty_audit_add_data(struct tty_struct *tty, | ||
363 | unsigned char *data, size_t size) | ||
364 | { | ||
365 | } | ||
366 | static inline void tty_audit_exit(void) | ||
367 | { | ||
368 | } | ||
369 | static inline void tty_audit_fork(struct signal_struct *sig) | ||
370 | { | ||
371 | } | ||
372 | static inline void tty_audit_push(struct tty_struct *tty) | ||
373 | { | ||
374 | } | ||
375 | static inline void tty_audit_push_task(struct task_struct *tsk, uid_t loginuid) | ||
376 | { | ||
377 | } | ||
378 | static inline void tty_audit_opening(void) | ||
379 | { | ||
380 | } | ||
381 | #endif | ||
382 | |||
344 | /* tty_ioctl.c */ | 383 | /* tty_ioctl.c */ |
345 | extern int n_tty_ioctl(struct tty_struct * tty, struct file * file, | 384 | extern int n_tty_ioctl(struct tty_struct * tty, struct file * file, |
346 | unsigned int cmd, unsigned long arg); | 385 | unsigned int cmd, unsigned long arg); |
diff --git a/include/linux/udp.h b/include/linux/udp.h index 6de445c31a64..8ec703f462da 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h | |||
@@ -42,6 +42,7 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb) | |||
42 | /* UDP encapsulation types */ | 42 | /* UDP encapsulation types */ |
43 | #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ | 43 | #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ |
44 | #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ | 44 | #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ |
45 | #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ | ||
45 | 46 | ||
46 | #ifdef __KERNEL__ | 47 | #ifdef __KERNEL__ |
47 | #include <linux/types.h> | 48 | #include <linux/types.h> |
@@ -70,6 +71,11 @@ struct udp_sock { | |||
70 | #define UDPLITE_SEND_CC 0x2 /* set via udplite setsockopt */ | 71 | #define UDPLITE_SEND_CC 0x2 /* set via udplite setsockopt */ |
71 | #define UDPLITE_RECV_CC 0x4 /* set via udplite setsocktopt */ | 72 | #define UDPLITE_RECV_CC 0x4 /* set via udplite setsocktopt */ |
72 | __u8 pcflag; /* marks socket as UDP-Lite if > 0 */ | 73 | __u8 pcflag; /* marks socket as UDP-Lite if > 0 */ |
74 | __u8 unused[3]; | ||
75 | /* | ||
76 | * For encapsulation sockets. | ||
77 | */ | ||
78 | int (*encap_rcv)(struct sock *sk, struct sk_buff *skb); | ||
73 | }; | 79 | }; |
74 | 80 | ||
75 | static inline struct udp_sock *udp_sk(const struct sock *sk) | 81 | static inline struct udp_sock *udp_sk(const struct sock *sk) |
diff --git a/include/linux/uio.h b/include/linux/uio.h index 9af8bbcd8963..b7fe13883bdb 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
@@ -13,10 +13,6 @@ | |||
13 | * 2 of the License, or (at your option) any later version. | 13 | * 2 of the License, or (at your option) any later version. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | |||
17 | /* A word of warning: Our uio structure will clash with the C library one (which is now obsolete). Remove the C | ||
18 | library one from sys/uio.h if you have a very old library set */ | ||
19 | |||
20 | struct iovec | 16 | struct iovec |
21 | { | 17 | { |
22 | void __user *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ | 18 | void __user *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ |
@@ -38,11 +34,6 @@ struct kvec { | |||
38 | 34 | ||
39 | #define UIO_FASTIOV 8 | 35 | #define UIO_FASTIOV 8 |
40 | #define UIO_MAXIOV 1024 | 36 | #define UIO_MAXIOV 1024 |
41 | #if 0 | ||
42 | #define UIO_MAXIOV 16 /* Maximum iovec's in one operation | ||
43 | 16 matches BSD */ | ||
44 | /* Beg pardon: BSD has 1024 --ANK */ | ||
45 | #endif | ||
46 | 37 | ||
47 | /* | 38 | /* |
48 | * Total number of bytes covered by an iovec. | 39 | * Total number of bytes covered by an iovec. |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 56aa2ee21f1b..7a60946df3b6 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -146,6 +146,10 @@ struct usb_interface { | |||
146 | * active alternate setting */ | 146 | * active alternate setting */ |
147 | unsigned num_altsetting; /* number of alternate settings */ | 147 | unsigned num_altsetting; /* number of alternate settings */ |
148 | 148 | ||
149 | /* If there is an interface association descriptor then it will list | ||
150 | * the associated interfaces */ | ||
151 | struct usb_interface_assoc_descriptor *intf_assoc; | ||
152 | |||
149 | int minor; /* minor number this interface is | 153 | int minor; /* minor number this interface is |
150 | * bound to */ | 154 | * bound to */ |
151 | enum usb_interface_condition condition; /* state of binding */ | 155 | enum usb_interface_condition condition; /* state of binding */ |
@@ -175,6 +179,7 @@ void usb_put_intf(struct usb_interface *intf); | |||
175 | 179 | ||
176 | /* this maximum is arbitrary */ | 180 | /* this maximum is arbitrary */ |
177 | #define USB_MAXINTERFACES 32 | 181 | #define USB_MAXINTERFACES 32 |
182 | #define USB_MAXIADS USB_MAXINTERFACES/2 | ||
178 | 183 | ||
179 | /** | 184 | /** |
180 | * struct usb_interface_cache - long-term representation of a device interface | 185 | * struct usb_interface_cache - long-term representation of a device interface |
@@ -245,6 +250,11 @@ struct usb_host_config { | |||
245 | struct usb_config_descriptor desc; | 250 | struct usb_config_descriptor desc; |
246 | 251 | ||
247 | char *string; /* iConfiguration string, if present */ | 252 | char *string; /* iConfiguration string, if present */ |
253 | |||
254 | /* List of any Interface Association Descriptors in this | ||
255 | * configuration. */ | ||
256 | struct usb_interface_assoc_descriptor *intf_assoc[USB_MAXIADS]; | ||
257 | |||
248 | /* the interfaces associated with this configuration, | 258 | /* the interfaces associated with this configuration, |
249 | * stored in no particular order */ | 259 | * stored in no particular order */ |
250 | struct usb_interface *interface[USB_MAXINTERFACES]; | 260 | struct usb_interface *interface[USB_MAXINTERFACES]; |
@@ -403,6 +413,8 @@ struct usb_device { | |||
403 | 413 | ||
404 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | 414 | unsigned auto_pm:1; /* autosuspend/resume in progress */ |
405 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ | 415 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ |
416 | unsigned reset_resume:1; /* needs reset instead of resume */ | ||
417 | unsigned persist_enabled:1; /* USB_PERSIST enabled for this dev */ | ||
406 | unsigned autosuspend_disabled:1; /* autosuspend and autoresume */ | 418 | unsigned autosuspend_disabled:1; /* autosuspend and autoresume */ |
407 | unsigned autoresume_disabled:1; /* disabled by the user */ | 419 | unsigned autoresume_disabled:1; /* disabled by the user */ |
408 | #endif | 420 | #endif |
@@ -770,6 +782,28 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor | |||
770 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), \ | 782 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), \ |
771 | .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) | 783 | .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) |
772 | 784 | ||
785 | /** | ||
786 | * USB_DEVICE_AND_INTERFACE_INFO - macro used to describe a specific usb device | ||
787 | * with a class of usb interfaces | ||
788 | * @vend: the 16 bit USB Vendor ID | ||
789 | * @prod: the 16 bit USB Product ID | ||
790 | * @cl: bInterfaceClass value | ||
791 | * @sc: bInterfaceSubClass value | ||
792 | * @pr: bInterfaceProtocol value | ||
793 | * | ||
794 | * This macro is used to create a struct usb_device_id that matches a | ||
795 | * specific device with a specific class of interfaces. | ||
796 | * | ||
797 | * This is especially useful when explicitly matching devices that have | ||
798 | * vendor specific bDeviceClass values, but standards-compliant interfaces. | ||
799 | */ | ||
800 | #define USB_DEVICE_AND_INTERFACE_INFO(vend,prod,cl,sc,pr) \ | ||
801 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \ | ||
802 | | USB_DEVICE_ID_MATCH_DEVICE, \ | ||
803 | .idVendor = (vend), .idProduct = (prod), \ | ||
804 | .bInterfaceClass = (cl), \ | ||
805 | .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) | ||
806 | |||
773 | /* ----------------------------------------------------------------------- */ | 807 | /* ----------------------------------------------------------------------- */ |
774 | 808 | ||
775 | /* Stuff for dynamic usb ids */ | 809 | /* Stuff for dynamic usb ids */ |
@@ -816,10 +850,15 @@ struct usbdrv_wrap { | |||
816 | * do (or don't) show up otherwise in the filesystem. | 850 | * do (or don't) show up otherwise in the filesystem. |
817 | * @suspend: Called when the device is going to be suspended by the system. | 851 | * @suspend: Called when the device is going to be suspended by the system. |
818 | * @resume: Called when the device is being resumed by the system. | 852 | * @resume: Called when the device is being resumed by the system. |
853 | * @reset_resume: Called when the suspended device has been reset instead | ||
854 | * of being resumed. | ||
819 | * @pre_reset: Called by usb_reset_composite_device() when the device | 855 | * @pre_reset: Called by usb_reset_composite_device() when the device |
820 | * is about to be reset. | 856 | * is about to be reset. |
821 | * @post_reset: Called by usb_reset_composite_device() after the device | 857 | * @post_reset: Called by usb_reset_composite_device() after the device |
822 | * has been reset. | 858 | * has been reset, or in lieu of @resume following a reset-resume |
859 | * (i.e., the device is reset instead of being resumed, as might | ||
860 | * happen if power was lost). The second argument tells which is | ||
861 | * the reason. | ||
823 | * @id_table: USB drivers use ID table to support hotplugging. | 862 | * @id_table: USB drivers use ID table to support hotplugging. |
824 | * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set | 863 | * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set |
825 | * or your driver's probe function will never get called. | 864 | * or your driver's probe function will never get called. |
@@ -859,9 +898,10 @@ struct usb_driver { | |||
859 | 898 | ||
860 | int (*suspend) (struct usb_interface *intf, pm_message_t message); | 899 | int (*suspend) (struct usb_interface *intf, pm_message_t message); |
861 | int (*resume) (struct usb_interface *intf); | 900 | int (*resume) (struct usb_interface *intf); |
901 | int (*reset_resume)(struct usb_interface *intf); | ||
862 | 902 | ||
863 | void (*pre_reset) (struct usb_interface *intf); | 903 | int (*pre_reset)(struct usb_interface *intf); |
864 | void (*post_reset) (struct usb_interface *intf); | 904 | int (*post_reset)(struct usb_interface *intf); |
865 | 905 | ||
866 | const struct usb_device_id *id_table; | 906 | const struct usb_device_id *id_table; |
867 | 907 | ||
@@ -964,6 +1004,7 @@ extern int usb_disabled(void); | |||
964 | #define URB_ZERO_PACKET 0x0040 /* Finish bulk OUT with short packet */ | 1004 | #define URB_ZERO_PACKET 0x0040 /* Finish bulk OUT with short packet */ |
965 | #define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt | 1005 | #define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt |
966 | * needed */ | 1006 | * needed */ |
1007 | #define URB_FREE_BUFFER 0x0100 /* Free transfer buffer with the URB */ | ||
967 | 1008 | ||
968 | struct usb_iso_packet_descriptor { | 1009 | struct usb_iso_packet_descriptor { |
969 | unsigned int offset; | 1010 | unsigned int offset; |
@@ -974,11 +1015,26 @@ struct usb_iso_packet_descriptor { | |||
974 | 1015 | ||
975 | struct urb; | 1016 | struct urb; |
976 | 1017 | ||
1018 | struct usb_anchor { | ||
1019 | struct list_head urb_list; | ||
1020 | wait_queue_head_t wait; | ||
1021 | spinlock_t lock; | ||
1022 | }; | ||
1023 | |||
1024 | static inline void init_usb_anchor(struct usb_anchor *anchor) | ||
1025 | { | ||
1026 | INIT_LIST_HEAD(&anchor->urb_list); | ||
1027 | init_waitqueue_head(&anchor->wait); | ||
1028 | spin_lock_init(&anchor->lock); | ||
1029 | } | ||
1030 | |||
977 | typedef void (*usb_complete_t)(struct urb *); | 1031 | typedef void (*usb_complete_t)(struct urb *); |
978 | 1032 | ||
979 | /** | 1033 | /** |
980 | * struct urb - USB Request Block | 1034 | * struct urb - USB Request Block |
981 | * @urb_list: For use by current owner of the URB. | 1035 | * @urb_list: For use by current owner of the URB. |
1036 | * @anchor_list: membership in the list of an anchor | ||
1037 | * @anchor: to anchor URBs to a common mooring | ||
982 | * @pipe: Holds endpoint number, direction, type, and more. | 1038 | * @pipe: Holds endpoint number, direction, type, and more. |
983 | * Create these values with the eight macros available; | 1039 | * Create these values with the eight macros available; |
984 | * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the TYPE is "ctrl" | 1040 | * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the TYPE is "ctrl" |
@@ -1151,6 +1207,8 @@ struct urb | |||
1151 | /* public: documented fields in the urb that can be used by drivers */ | 1207 | /* public: documented fields in the urb that can be used by drivers */ |
1152 | struct list_head urb_list; /* list head for use by the urb's | 1208 | struct list_head urb_list; /* list head for use by the urb's |
1153 | * current owner */ | 1209 | * current owner */ |
1210 | struct list_head anchor_list; /* the URB may be anchored by the driver */ | ||
1211 | struct usb_anchor *anchor; | ||
1154 | struct usb_device *dev; /* (in) pointer to associated device */ | 1212 | struct usb_device *dev; /* (in) pointer to associated device */ |
1155 | unsigned int pipe; /* (in) pipe information */ | 1213 | unsigned int pipe; /* (in) pipe information */ |
1156 | int status; /* (return) non-ISO status */ | 1214 | int status; /* (return) non-ISO status */ |
@@ -1286,6 +1344,11 @@ extern struct urb *usb_get_urb(struct urb *urb); | |||
1286 | extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags); | 1344 | extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags); |
1287 | extern int usb_unlink_urb(struct urb *urb); | 1345 | extern int usb_unlink_urb(struct urb *urb); |
1288 | extern void usb_kill_urb(struct urb *urb); | 1346 | extern void usb_kill_urb(struct urb *urb); |
1347 | extern void usb_kill_anchored_urbs(struct usb_anchor *anchor); | ||
1348 | extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor); | ||
1349 | extern void usb_unanchor_urb(struct urb *urb); | ||
1350 | extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, | ||
1351 | unsigned int timeout); | ||
1289 | 1352 | ||
1290 | void *usb_buffer_alloc (struct usb_device *dev, size_t size, | 1353 | void *usb_buffer_alloc (struct usb_device *dev, size_t size, |
1291 | gfp_t mem_flags, dma_addr_t *dma); | 1354 | gfp_t mem_flags, dma_addr_t *dma); |
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild index 43f160cfe003..6ce42bf9f743 100644 --- a/include/linux/usb/Kbuild +++ b/include/linux/usb/Kbuild | |||
@@ -1,5 +1,6 @@ | |||
1 | unifdef-y += audio.h | 1 | unifdef-y += audio.h |
2 | unifdef-y += cdc.h | 2 | unifdef-y += cdc.h |
3 | unifdef-y += ch9.h | 3 | unifdef-y += ch9.h |
4 | unifdef-y += gadgetfs.h | ||
4 | unifdef-y += midi.h | 5 | unifdef-y += midi.h |
5 | 6 | ||
diff --git a/include/linux/usb_gadgetfs.h b/include/linux/usb/gadgetfs.h index 8086d5a9b94e..e8654c338729 100644 --- a/include/linux/usb_gadgetfs.h +++ b/include/linux/usb/gadgetfs.h | |||
@@ -1,3 +1,5 @@ | |||
1 | #ifndef __LINUX_USB_GADGETFS_H | ||
2 | #define __LINUX_USB_GADGETFS_H | ||
1 | 3 | ||
2 | #include <asm/types.h> | 4 | #include <asm/types.h> |
3 | #include <asm/ioctl.h> | 5 | #include <asm/ioctl.h> |
@@ -7,11 +9,12 @@ | |||
7 | /* | 9 | /* |
8 | * Filesystem based user-mode API to USB Gadget controller hardware | 10 | * Filesystem based user-mode API to USB Gadget controller hardware |
9 | * | 11 | * |
10 | * Almost everything can be done with only read and write operations, | 12 | * Other than ep0 operations, most things are done by read() and write() |
11 | * on endpoint files found in one directory. They are configured by | 13 | * on endpoint files found in one directory. They are configured by |
12 | * writing descriptors, and then may be used for normal stream style | 14 | * writing descriptors, and then may be used for normal stream style |
13 | * i/o requests. When ep0 is configured, the device can enumerate; | 15 | * i/o requests. When ep0 is configured, the device can enumerate; |
14 | * when it's closed, the device disconnects from usb. | 16 | * when it's closed, the device disconnects from usb. Operations on |
17 | * ep0 require ioctl() operations. | ||
15 | * | 18 | * |
16 | * Configuration and device descriptors get written to /dev/gadget/$CHIP, | 19 | * Configuration and device descriptors get written to /dev/gadget/$CHIP, |
17 | * which may then be used to read usb_gadgetfs_event structs. The driver | 20 | * which may then be used to read usb_gadgetfs_event structs. The driver |
@@ -21,9 +24,9 @@ | |||
21 | */ | 24 | */ |
22 | 25 | ||
23 | /* | 26 | /* |
24 | * Events are delivered on the ep0 file descriptor, if the user mode driver | 27 | * Events are delivered on the ep0 file descriptor, when the user mode driver |
25 | * reads from this file descriptor after writing the descriptors. Don't | 28 | * reads from this file descriptor after writing the descriptors. Don't |
26 | * stop polling this descriptor, if you write that kind of driver. | 29 | * stop polling this descriptor. |
27 | */ | 30 | */ |
28 | 31 | ||
29 | enum usb_gadgetfs_event_type { | 32 | enum usb_gadgetfs_event_type { |
@@ -36,8 +39,10 @@ enum usb_gadgetfs_event_type { | |||
36 | // and likely more ! | 39 | // and likely more ! |
37 | }; | 40 | }; |
38 | 41 | ||
42 | /* NOTE: this structure must stay the same size and layout on | ||
43 | * both 32-bit and 64-bit kernels. | ||
44 | */ | ||
39 | struct usb_gadgetfs_event { | 45 | struct usb_gadgetfs_event { |
40 | enum usb_gadgetfs_event_type type; | ||
41 | union { | 46 | union { |
42 | // NOP, DISCONNECT, SUSPEND: nothing | 47 | // NOP, DISCONNECT, SUSPEND: nothing |
43 | // ... some hardware can't report disconnection | 48 | // ... some hardware can't report disconnection |
@@ -46,19 +51,20 @@ struct usb_gadgetfs_event { | |||
46 | enum usb_device_speed speed; | 51 | enum usb_device_speed speed; |
47 | 52 | ||
48 | // SETUP: packet; DATA phase i/o precedes next event | 53 | // SETUP: packet; DATA phase i/o precedes next event |
49 | // (setup.bmRequestType & USB_DIR_IN) flags direction | 54 | // (setup.bmRequestType & USB_DIR_IN) flags direction |
50 | // ... includes SET_CONFIGURATION, SET_INTERFACE | 55 | // ... includes SET_CONFIGURATION, SET_INTERFACE |
51 | struct usb_ctrlrequest setup; | 56 | struct usb_ctrlrequest setup; |
52 | } u; | 57 | } u; |
58 | enum usb_gadgetfs_event_type type; | ||
53 | }; | 59 | }; |
54 | 60 | ||
55 | 61 | ||
56 | /* endpoint ioctls */ | 62 | /* endpoint ioctls */ |
57 | 63 | ||
58 | /* IN transfers may be reported to the gadget driver as complete | 64 | /* IN transfers may be reported to the gadget driver as complete |
59 | * when the fifo is loaded, before the host reads the data; | 65 | * when the fifo is loaded, before the host reads the data; |
60 | * OUT transfers may be reported to the host's "client" driver as | 66 | * OUT transfers may be reported to the host's "client" driver as |
61 | * complete when they're sitting in the FIFO unread. | 67 | * complete when they're sitting in the FIFO unread. |
62 | * THIS returns how many bytes are "unclaimed" in the endpoint fifo | 68 | * THIS returns how many bytes are "unclaimed" in the endpoint fifo |
63 | * (needed for precise fault handling, when the hardware allows it) | 69 | * (needed for precise fault handling, when the hardware allows it) |
64 | */ | 70 | */ |
@@ -72,4 +78,4 @@ struct usb_gadgetfs_event { | |||
72 | */ | 78 | */ |
73 | #define GADGETFS_CLEAR_HALT _IO('g',3) | 79 | #define GADGETFS_CLEAR_HALT _IO('g',3) |
74 | 80 | ||
75 | 81 | #endif /* __LINUX_USB_GADGETFS_H */ | |
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index 6bac8faacbc6..8da374caf582 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h | |||
@@ -9,3 +9,6 @@ | |||
9 | 9 | ||
10 | /* string descriptors must not be fetched using a 255-byte read */ | 10 | /* string descriptors must not be fetched using a 255-byte read */ |
11 | #define USB_QUIRK_STRING_FETCH_255 0x00000002 | 11 | #define USB_QUIRK_STRING_FETCH_255 0x00000002 |
12 | |||
13 | /* device can't resume correctly so reset it instead */ | ||
14 | #define USB_QUIRK_RESET_RESUME 0x00000004 | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 32acbae28d24..e8b8928232c8 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -221,6 +221,9 @@ struct usb_serial_driver { | |||
221 | int (*port_probe) (struct usb_serial_port *port); | 221 | int (*port_probe) (struct usb_serial_port *port); |
222 | int (*port_remove) (struct usb_serial_port *port); | 222 | int (*port_remove) (struct usb_serial_port *port); |
223 | 223 | ||
224 | int (*suspend) (struct usb_serial *serial, pm_message_t message); | ||
225 | int (*resume) (struct usb_serial *serial); | ||
226 | |||
224 | /* serial function calls */ | 227 | /* serial function calls */ |
225 | int (*open) (struct usb_serial_port *port, struct file * filp); | 228 | int (*open) (struct usb_serial_port *port, struct file * filp); |
226 | void (*close) (struct usb_serial_port *port, struct file * filp); | 229 | void (*close) (struct usb_serial_port *port, struct file * filp); |
@@ -249,6 +252,9 @@ extern void usb_serial_port_softint(struct usb_serial_port *port); | |||
249 | extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id); | 252 | extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id); |
250 | extern void usb_serial_disconnect(struct usb_interface *iface); | 253 | extern void usb_serial_disconnect(struct usb_interface *iface); |
251 | 254 | ||
255 | extern int usb_serial_suspend(struct usb_interface *intf, pm_message_t message); | ||
256 | extern int usb_serial_resume(struct usb_interface *intf); | ||
257 | |||
252 | extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest); | 258 | extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest); |
253 | extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit); | 259 | extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit); |
254 | 260 | ||
@@ -269,6 +275,7 @@ extern void usb_serial_put(struct usb_serial *serial); | |||
269 | extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp); | 275 | extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp); |
270 | extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count); | 276 | extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count); |
271 | extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp); | 277 | extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp); |
278 | extern int usb_serial_generic_resume (struct usb_serial *serial); | ||
272 | extern int usb_serial_generic_write_room (struct usb_serial_port *port); | 279 | extern int usb_serial_generic_write_room (struct usb_serial_port *port); |
273 | extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port); | 280 | extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port); |
274 | extern void usb_serial_generic_read_bulk_callback (struct urb *urb); | 281 | extern void usb_serial_generic_read_bulk_callback (struct urb *urb); |
diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h index e17186dbcdca..4f59b2aa8a9e 100644 --- a/include/linux/usb_gadget.h +++ b/include/linux/usb_gadget.h | |||
@@ -110,13 +110,6 @@ struct usb_ep_ops { | |||
110 | gfp_t gfp_flags); | 110 | gfp_t gfp_flags); |
111 | void (*free_request) (struct usb_ep *ep, struct usb_request *req); | 111 | void (*free_request) (struct usb_ep *ep, struct usb_request *req); |
112 | 112 | ||
113 | void *(*alloc_buffer) (struct usb_ep *ep, unsigned bytes, | ||
114 | dma_addr_t *dma, gfp_t gfp_flags); | ||
115 | void (*free_buffer) (struct usb_ep *ep, void *buf, dma_addr_t dma, | ||
116 | unsigned bytes); | ||
117 | // NOTE: on 2.6, drivers may also use dma_map() and | ||
118 | // dma_sync_single_*() to directly manage dma overhead. | ||
119 | |||
120 | int (*queue) (struct usb_ep *ep, struct usb_request *req, | 113 | int (*queue) (struct usb_ep *ep, struct usb_request *req, |
121 | gfp_t gfp_flags); | 114 | gfp_t gfp_flags); |
122 | int (*dequeue) (struct usb_ep *ep, struct usb_request *req); | 115 | int (*dequeue) (struct usb_ep *ep, struct usb_request *req); |
@@ -235,47 +228,6 @@ usb_ep_free_request (struct usb_ep *ep, struct usb_request *req) | |||
235 | } | 228 | } |
236 | 229 | ||
237 | /** | 230 | /** |
238 | * usb_ep_alloc_buffer - allocate an I/O buffer | ||
239 | * @ep:the endpoint associated with the buffer | ||
240 | * @len:length of the desired buffer | ||
241 | * @dma:pointer to the buffer's DMA address; must be valid | ||
242 | * @gfp_flags:GFP_* flags to use | ||
243 | * | ||
244 | * Returns a new buffer, or null if one could not be allocated. | ||
245 | * The buffer is suitably aligned for dma, if that endpoint uses DMA, | ||
246 | * and the caller won't have to care about dma-inconsistency | ||
247 | * or any hidden "bounce buffer" mechanism. No additional per-request | ||
248 | * DMA mapping will be required for such buffers. | ||
249 | * Free it later with usb_ep_free_buffer(). | ||
250 | * | ||
251 | * You don't need to use this call to allocate I/O buffers unless you | ||
252 | * want to make sure drivers don't incur costs for such "bounce buffer" | ||
253 | * copies or per-request DMA mappings. | ||
254 | */ | ||
255 | static inline void * | ||
256 | usb_ep_alloc_buffer (struct usb_ep *ep, unsigned len, dma_addr_t *dma, | ||
257 | gfp_t gfp_flags) | ||
258 | { | ||
259 | return ep->ops->alloc_buffer (ep, len, dma, gfp_flags); | ||
260 | } | ||
261 | |||
262 | /** | ||
263 | * usb_ep_free_buffer - frees an i/o buffer | ||
264 | * @ep:the endpoint associated with the buffer | ||
265 | * @buf:CPU view address of the buffer | ||
266 | * @dma:the buffer's DMA address | ||
267 | * @len:length of the buffer | ||
268 | * | ||
269 | * reverses the effect of usb_ep_alloc_buffer(). | ||
270 | * caller guarantees the buffer will no longer be accessed | ||
271 | */ | ||
272 | static inline void | ||
273 | usb_ep_free_buffer (struct usb_ep *ep, void *buf, dma_addr_t dma, unsigned len) | ||
274 | { | ||
275 | ep->ops->free_buffer (ep, buf, dma, len); | ||
276 | } | ||
277 | |||
278 | /** | ||
279 | * usb_ep_queue - queues (submits) an I/O request to an endpoint. | 231 | * usb_ep_queue - queues (submits) an I/O request to an endpoint. |
280 | * @ep:the endpoint associated with the request | 232 | * @ep:the endpoint associated with the request |
281 | * @req:the request being submitted | 233 | * @req:the request being submitted |
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h new file mode 100644 index 000000000000..bb320573bb9e --- /dev/null +++ b/include/linux/user_namespace.h | |||
@@ -0,0 +1,61 @@ | |||
1 | #ifndef _LINUX_USER_NAMESPACE_H | ||
2 | #define _LINUX_USER_NAMESPACE_H | ||
3 | |||
4 | #include <linux/kref.h> | ||
5 | #include <linux/nsproxy.h> | ||
6 | #include <linux/sched.h> | ||
7 | #include <linux/err.h> | ||
8 | |||
9 | #define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 8) | ||
10 | #define UIDHASH_SZ (1 << UIDHASH_BITS) | ||
11 | |||
12 | struct user_namespace { | ||
13 | struct kref kref; | ||
14 | struct list_head uidhash_table[UIDHASH_SZ]; | ||
15 | struct user_struct *root_user; | ||
16 | }; | ||
17 | |||
18 | extern struct user_namespace init_user_ns; | ||
19 | |||
20 | #ifdef CONFIG_USER_NS | ||
21 | |||
22 | static inline struct user_namespace *get_user_ns(struct user_namespace *ns) | ||
23 | { | ||
24 | if (ns) | ||
25 | kref_get(&ns->kref); | ||
26 | return ns; | ||
27 | } | ||
28 | |||
29 | extern struct user_namespace *copy_user_ns(int flags, | ||
30 | struct user_namespace *old_ns); | ||
31 | extern void free_user_ns(struct kref *kref); | ||
32 | |||
33 | static inline void put_user_ns(struct user_namespace *ns) | ||
34 | { | ||
35 | if (ns) | ||
36 | kref_put(&ns->kref, free_user_ns); | ||
37 | } | ||
38 | |||
39 | #else | ||
40 | |||
41 | static inline struct user_namespace *get_user_ns(struct user_namespace *ns) | ||
42 | { | ||
43 | return &init_user_ns; | ||
44 | } | ||
45 | |||
46 | static inline struct user_namespace *copy_user_ns(int flags, | ||
47 | struct user_namespace *old_ns) | ||
48 | { | ||
49 | if (flags & CLONE_NEWUSER) | ||
50 | return ERR_PTR(-EINVAL); | ||
51 | |||
52 | return NULL; | ||
53 | } | ||
54 | |||
55 | static inline void put_user_ns(struct user_namespace *ns) | ||
56 | { | ||
57 | } | ||
58 | |||
59 | #endif | ||
60 | |||
61 | #endif /* _LINUX_USER_H */ | ||
diff --git a/include/linux/utsname.h b/include/linux/utsname.h index f8d3b326e93a..923db99175f2 100644 --- a/include/linux/utsname.h +++ b/include/linux/utsname.h | |||
@@ -48,26 +48,14 @@ static inline void get_uts_ns(struct uts_namespace *ns) | |||
48 | kref_get(&ns->kref); | 48 | kref_get(&ns->kref); |
49 | } | 49 | } |
50 | 50 | ||
51 | #ifdef CONFIG_UTS_NS | 51 | extern struct uts_namespace *copy_utsname(unsigned long flags, |
52 | extern struct uts_namespace *copy_utsname(int flags, struct uts_namespace *ns); | 52 | struct uts_namespace *ns); |
53 | extern void free_uts_ns(struct kref *kref); | 53 | extern void free_uts_ns(struct kref *kref); |
54 | 54 | ||
55 | static inline void put_uts_ns(struct uts_namespace *ns) | 55 | static inline void put_uts_ns(struct uts_namespace *ns) |
56 | { | 56 | { |
57 | kref_put(&ns->kref, free_uts_ns); | 57 | kref_put(&ns->kref, free_uts_ns); |
58 | } | 58 | } |
59 | #else | ||
60 | static inline struct uts_namespace *copy_utsname(int flags, | ||
61 | struct uts_namespace *ns) | ||
62 | { | ||
63 | return ns; | ||
64 | } | ||
65 | |||
66 | static inline void put_uts_ns(struct uts_namespace *ns) | ||
67 | { | ||
68 | } | ||
69 | #endif | ||
70 | |||
71 | static inline struct new_utsname *utsname(void) | 59 | static inline struct new_utsname *utsname(void) |
72 | { | 60 | { |
73 | return ¤t->nsproxy->uts_ns->name; | 61 | return ¤t->nsproxy->uts_ns->name; |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index ce0719a2cfeb..ce6badc98f6d 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -148,7 +148,7 @@ extern int keventd_up(void); | |||
148 | extern void init_workqueues(void); | 148 | extern void init_workqueues(void); |
149 | int execute_in_process_context(work_func_t fn, struct execute_work *); | 149 | int execute_in_process_context(work_func_t fn, struct execute_work *); |
150 | 150 | ||
151 | extern void cancel_work_sync(struct work_struct *work); | 151 | extern int cancel_work_sync(struct work_struct *work); |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * Kill off a pending schedule_delayed_work(). Note that the work callback | 154 | * Kill off a pending schedule_delayed_work(). Note that the work callback |
@@ -166,14 +166,21 @@ static inline int cancel_delayed_work(struct delayed_work *work) | |||
166 | return ret; | 166 | return ret; |
167 | } | 167 | } |
168 | 168 | ||
169 | extern void cancel_rearming_delayed_work(struct delayed_work *work); | 169 | extern int cancel_delayed_work_sync(struct delayed_work *work); |
170 | 170 | ||
171 | /* Obsolete. use cancel_rearming_delayed_work() */ | 171 | /* Obsolete. use cancel_delayed_work_sync() */ |
172 | static inline | 172 | static inline |
173 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, | 173 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, |
174 | struct delayed_work *work) | 174 | struct delayed_work *work) |
175 | { | 175 | { |
176 | cancel_rearming_delayed_work(work); | 176 | cancel_delayed_work_sync(work); |
177 | } | ||
178 | |||
179 | /* Obsolete. use cancel_delayed_work_sync() */ | ||
180 | static inline | ||
181 | void cancel_rearming_delayed_work(struct delayed_work *work) | ||
182 | { | ||
183 | cancel_delayed_work_sync(work); | ||
177 | } | 184 | } |
178 | 185 | ||
179 | #endif | 186 | #endif |