diff options
Diffstat (limited to 'include')
74 files changed, 2306 insertions, 560 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index c2c9ba032d46..f2d2faf4d9ae 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -165,10 +165,36 @@ extern void warn_slowpath_null(const char *file, const int line); | |||
165 | #define WARN_ON_RATELIMIT(condition, state) \ | 165 | #define WARN_ON_RATELIMIT(condition, state) \ |
166 | WARN_ON((condition) && __ratelimit(state)) | 166 | WARN_ON((condition) && __ratelimit(state)) |
167 | 167 | ||
168 | /* | ||
169 | * WARN_ON_SMP() is for cases that the warning is either | ||
170 | * meaningless for !SMP or may even cause failures. | ||
171 | * This is usually used for cases that we have | ||
172 | * WARN_ON(!spin_is_locked(&lock)) checks, as spin_is_locked() | ||
173 | * returns 0 for uniprocessor settings. | ||
174 | * It can also be used with values that are only defined | ||
175 | * on SMP: | ||
176 | * | ||
177 | * struct foo { | ||
178 | * [...] | ||
179 | * #ifdef CONFIG_SMP | ||
180 | * int bar; | ||
181 | * #endif | ||
182 | * }; | ||
183 | * | ||
184 | * void func(struct foo *zoot) | ||
185 | * { | ||
186 | * WARN_ON_SMP(!zoot->bar); | ||
187 | * | ||
188 | * For CONFIG_SMP, WARN_ON_SMP() should act the same as WARN_ON(), | ||
189 | * and should be a nop and return false for uniprocessor. | ||
190 | * | ||
191 | * if (WARN_ON_SMP(x)) returns true only when CONFIG_SMP is set | ||
192 | * and x is true. | ||
193 | */ | ||
168 | #ifdef CONFIG_SMP | 194 | #ifdef CONFIG_SMP |
169 | # define WARN_ON_SMP(x) WARN_ON(x) | 195 | # define WARN_ON_SMP(x) WARN_ON(x) |
170 | #else | 196 | #else |
171 | # define WARN_ON_SMP(x) do { } while (0) | 197 | # define WARN_ON_SMP(x) ({0;}) |
172 | #endif | 198 | #endif |
173 | 199 | ||
174 | #endif | 200 | #endif |
diff --git a/include/linux/bch.h b/include/linux/bch.h new file mode 100644 index 000000000000..295b4ef153bb --- /dev/null +++ b/include/linux/bch.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * Generic binary BCH encoding/decoding library | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License version 2 as published by | ||
6 | * the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that 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., 51 | ||
15 | * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
16 | * | ||
17 | * Copyright © 2011 Parrot S.A. | ||
18 | * | ||
19 | * Author: Ivan Djelic <ivan.djelic@parrot.com> | ||
20 | * | ||
21 | * Description: | ||
22 | * | ||
23 | * This library provides runtime configurable encoding/decoding of binary | ||
24 | * Bose-Chaudhuri-Hocquenghem (BCH) codes. | ||
25 | */ | ||
26 | #ifndef _BCH_H | ||
27 | #define _BCH_H | ||
28 | |||
29 | #include <linux/types.h> | ||
30 | |||
31 | /** | ||
32 | * struct bch_control - BCH control structure | ||
33 | * @m: Galois field order | ||
34 | * @n: maximum codeword size in bits (= 2^m-1) | ||
35 | * @t: error correction capability in bits | ||
36 | * @ecc_bits: ecc exact size in bits, i.e. generator polynomial degree (<=m*t) | ||
37 | * @ecc_bytes: ecc max size (m*t bits) in bytes | ||
38 | * @a_pow_tab: Galois field GF(2^m) exponentiation lookup table | ||
39 | * @a_log_tab: Galois field GF(2^m) log lookup table | ||
40 | * @mod8_tab: remainder generator polynomial lookup tables | ||
41 | * @ecc_buf: ecc parity words buffer | ||
42 | * @ecc_buf2: ecc parity words buffer | ||
43 | * @xi_tab: GF(2^m) base for solving degree 2 polynomial roots | ||
44 | * @syn: syndrome buffer | ||
45 | * @cache: log-based polynomial representation buffer | ||
46 | * @elp: error locator polynomial | ||
47 | * @poly_2t: temporary polynomials of degree 2t | ||
48 | */ | ||
49 | struct bch_control { | ||
50 | unsigned int m; | ||
51 | unsigned int n; | ||
52 | unsigned int t; | ||
53 | unsigned int ecc_bits; | ||
54 | unsigned int ecc_bytes; | ||
55 | /* private: */ | ||
56 | uint16_t *a_pow_tab; | ||
57 | uint16_t *a_log_tab; | ||
58 | uint32_t *mod8_tab; | ||
59 | uint32_t *ecc_buf; | ||
60 | uint32_t *ecc_buf2; | ||
61 | unsigned int *xi_tab; | ||
62 | unsigned int *syn; | ||
63 | int *cache; | ||
64 | struct gf_poly *elp; | ||
65 | struct gf_poly *poly_2t[4]; | ||
66 | }; | ||
67 | |||
68 | struct bch_control *init_bch(int m, int t, unsigned int prim_poly); | ||
69 | |||
70 | void free_bch(struct bch_control *bch); | ||
71 | |||
72 | void encode_bch(struct bch_control *bch, const uint8_t *data, | ||
73 | unsigned int len, uint8_t *ecc); | ||
74 | |||
75 | int decode_bch(struct bch_control *bch, const uint8_t *data, unsigned int len, | ||
76 | const uint8_t *recv_ecc, const uint8_t *calc_ecc, | ||
77 | const unsigned int *syn, unsigned int *errloc); | ||
78 | |||
79 | #endif /* _BCH_H */ | ||
diff --git a/include/linux/can/core.h b/include/linux/can/core.h index 6c507bea275f..6f70a6d3a16e 100644 --- a/include/linux/can/core.h +++ b/include/linux/can/core.h | |||
@@ -36,10 +36,10 @@ | |||
36 | * @prot: pointer to struct proto structure. | 36 | * @prot: pointer to struct proto structure. |
37 | */ | 37 | */ |
38 | struct can_proto { | 38 | struct can_proto { |
39 | int type; | 39 | int type; |
40 | int protocol; | 40 | int protocol; |
41 | struct proto_ops *ops; | 41 | const struct proto_ops *ops; |
42 | struct proto *prot; | 42 | struct proto *prot; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | /* function prototypes for the CAN networklayer core (af_can.c) */ | 45 | /* function prototypes for the CAN networklayer core (af_can.c) */ |
@@ -58,5 +58,6 @@ extern void can_rx_unregister(struct net_device *dev, canid_t can_id, | |||
58 | void *data); | 58 | void *data); |
59 | 59 | ||
60 | extern int can_send(struct sk_buff *skb, int loop); | 60 | extern int can_send(struct sk_buff *skb, int loop); |
61 | extern int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); | ||
61 | 62 | ||
62 | #endif /* CAN_CORE_H */ | 63 | #endif /* CAN_CORE_H */ |
diff --git a/include/linux/davinci_emac.h b/include/linux/davinci_emac.h index 5dd428532f79..542888504994 100644 --- a/include/linux/davinci_emac.h +++ b/include/linux/davinci_emac.h | |||
@@ -36,6 +36,7 @@ struct emac_platform_data { | |||
36 | 36 | ||
37 | u8 rmii_en; | 37 | u8 rmii_en; |
38 | u8 version; | 38 | u8 version; |
39 | bool no_bd_ram; | ||
39 | void (*interrupt_enable) (void); | 40 | void (*interrupt_enable) (void); |
40 | void (*interrupt_disable) (void); | 41 | void (*interrupt_disable) (void); |
41 | }; | 42 | }; |
diff --git a/include/linux/device.h b/include/linux/device.h index 144ec135875f..ab8dfc095709 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -633,8 +633,12 @@ static inline int devtmpfs_mount(const char *mountpoint) { return 0; } | |||
633 | /* drivers/base/power/shutdown.c */ | 633 | /* drivers/base/power/shutdown.c */ |
634 | extern void device_shutdown(void); | 634 | extern void device_shutdown(void); |
635 | 635 | ||
636 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
636 | /* drivers/base/sys.c */ | 637 | /* drivers/base/sys.c */ |
637 | extern void sysdev_shutdown(void); | 638 | extern void sysdev_shutdown(void); |
639 | #else | ||
640 | static inline void sysdev_shutdown(void) { } | ||
641 | #endif | ||
638 | 642 | ||
639 | /* debugging and troubleshooting/diagnostic helpers. */ | 643 | /* debugging and troubleshooting/diagnostic helpers. */ |
640 | extern const char *dev_driver_string(const struct device *dev); | 644 | extern const char *dev_driver_string(const struct device *dev); |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 78bbf47bbb96..3708455ee6c3 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
@@ -267,9 +267,9 @@ enum { | |||
267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
268 | 268 | ||
269 | #define DM_VERSION_MAJOR 4 | 269 | #define DM_VERSION_MAJOR 4 |
270 | #define DM_VERSION_MINOR 19 | 270 | #define DM_VERSION_MINOR 20 |
271 | #define DM_VERSION_PATCHLEVEL 1 | 271 | #define DM_VERSION_PATCHLEVEL 0 |
272 | #define DM_VERSION_EXTRA "-ioctl (2011-01-07)" | 272 | #define DM_VERSION_EXTRA "-ioctl (2011-02-02)" |
273 | 273 | ||
274 | /* Status bits */ | 274 | /* Status bits */ |
275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
@@ -328,4 +328,10 @@ enum { | |||
328 | */ | 328 | */ |
329 | #define DM_UUID_FLAG (1 << 14) /* In */ | 329 | #define DM_UUID_FLAG (1 << 14) /* In */ |
330 | 330 | ||
331 | /* | ||
332 | * If set, all buffers are wiped after use. Use when sending | ||
333 | * or requesting sensitive data such as an encryption key. | ||
334 | */ | ||
335 | #define DM_SECURE_DATA_FLAG (1 << 15) /* In */ | ||
336 | |||
331 | #endif /* _LINUX_DM_IOCTL_H */ | 337 | #endif /* _LINUX_DM_IOCTL_H */ |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index ef44c7a0638c..d18d673ebc78 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
@@ -53,10 +53,10 @@ | |||
53 | 53 | ||
54 | 54 | ||
55 | extern const char *drbd_buildtag(void); | 55 | extern const char *drbd_buildtag(void); |
56 | #define REL_VERSION "8.3.9" | 56 | #define REL_VERSION "8.3.10" |
57 | #define API_VERSION 88 | 57 | #define API_VERSION 88 |
58 | #define PRO_VERSION_MIN 86 | 58 | #define PRO_VERSION_MIN 86 |
59 | #define PRO_VERSION_MAX 95 | 59 | #define PRO_VERSION_MAX 96 |
60 | 60 | ||
61 | 61 | ||
62 | enum drbd_io_error_p { | 62 | enum drbd_io_error_p { |
@@ -96,8 +96,14 @@ enum drbd_on_no_data { | |||
96 | OND_SUSPEND_IO | 96 | OND_SUSPEND_IO |
97 | }; | 97 | }; |
98 | 98 | ||
99 | enum drbd_on_congestion { | ||
100 | OC_BLOCK, | ||
101 | OC_PULL_AHEAD, | ||
102 | OC_DISCONNECT, | ||
103 | }; | ||
104 | |||
99 | /* KEEP the order, do not delete or insert. Only append. */ | 105 | /* KEEP the order, do not delete or insert. Only append. */ |
100 | enum drbd_ret_codes { | 106 | enum drbd_ret_code { |
101 | ERR_CODE_BASE = 100, | 107 | ERR_CODE_BASE = 100, |
102 | NO_ERROR = 101, | 108 | NO_ERROR = 101, |
103 | ERR_LOCAL_ADDR = 102, | 109 | ERR_LOCAL_ADDR = 102, |
@@ -146,6 +152,9 @@ enum drbd_ret_codes { | |||
146 | ERR_PERM = 152, | 152 | ERR_PERM = 152, |
147 | ERR_NEED_APV_93 = 153, | 153 | ERR_NEED_APV_93 = 153, |
148 | ERR_STONITH_AND_PROT_A = 154, | 154 | ERR_STONITH_AND_PROT_A = 154, |
155 | ERR_CONG_NOT_PROTO_A = 155, | ||
156 | ERR_PIC_AFTER_DEP = 156, | ||
157 | ERR_PIC_PEER_DEP = 157, | ||
149 | 158 | ||
150 | /* insert new ones above this line */ | 159 | /* insert new ones above this line */ |
151 | AFTER_LAST_ERR_CODE | 160 | AFTER_LAST_ERR_CODE |
@@ -199,6 +208,10 @@ enum drbd_conns { | |||
199 | C_VERIFY_T, | 208 | C_VERIFY_T, |
200 | C_PAUSED_SYNC_S, | 209 | C_PAUSED_SYNC_S, |
201 | C_PAUSED_SYNC_T, | 210 | C_PAUSED_SYNC_T, |
211 | |||
212 | C_AHEAD, | ||
213 | C_BEHIND, | ||
214 | |||
202 | C_MASK = 31 | 215 | C_MASK = 31 |
203 | }; | 216 | }; |
204 | 217 | ||
@@ -259,7 +272,7 @@ union drbd_state { | |||
259 | unsigned int i; | 272 | unsigned int i; |
260 | }; | 273 | }; |
261 | 274 | ||
262 | enum drbd_state_ret_codes { | 275 | enum drbd_state_rv { |
263 | SS_CW_NO_NEED = 4, | 276 | SS_CW_NO_NEED = 4, |
264 | SS_CW_SUCCESS = 3, | 277 | SS_CW_SUCCESS = 3, |
265 | SS_NOTHING_TO_DO = 2, | 278 | SS_NOTHING_TO_DO = 2, |
@@ -290,7 +303,7 @@ enum drbd_state_ret_codes { | |||
290 | extern const char *drbd_conn_str(enum drbd_conns); | 303 | extern const char *drbd_conn_str(enum drbd_conns); |
291 | extern const char *drbd_role_str(enum drbd_role); | 304 | extern const char *drbd_role_str(enum drbd_role); |
292 | extern const char *drbd_disk_str(enum drbd_disk_state); | 305 | extern const char *drbd_disk_str(enum drbd_disk_state); |
293 | extern const char *drbd_set_st_err_str(enum drbd_state_ret_codes); | 306 | extern const char *drbd_set_st_err_str(enum drbd_state_rv); |
294 | 307 | ||
295 | #define SHARED_SECRET_MAX 64 | 308 | #define SHARED_SECRET_MAX 64 |
296 | 309 | ||
diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h index 4ac33f34b77e..bb264a5732de 100644 --- a/include/linux/drbd_limits.h +++ b/include/linux/drbd_limits.h | |||
@@ -16,7 +16,8 @@ | |||
16 | #define DEBUG_RANGE_CHECK 0 | 16 | #define DEBUG_RANGE_CHECK 0 |
17 | 17 | ||
18 | #define DRBD_MINOR_COUNT_MIN 1 | 18 | #define DRBD_MINOR_COUNT_MIN 1 |
19 | #define DRBD_MINOR_COUNT_MAX 255 | 19 | #define DRBD_MINOR_COUNT_MAX 256 |
20 | #define DRBD_MINOR_COUNT_DEF 32 | ||
20 | 21 | ||
21 | #define DRBD_DIALOG_REFRESH_MIN 0 | 22 | #define DRBD_DIALOG_REFRESH_MIN 0 |
22 | #define DRBD_DIALOG_REFRESH_MAX 600 | 23 | #define DRBD_DIALOG_REFRESH_MAX 600 |
@@ -129,6 +130,7 @@ | |||
129 | #define DRBD_AFTER_SB_2P_DEF ASB_DISCONNECT | 130 | #define DRBD_AFTER_SB_2P_DEF ASB_DISCONNECT |
130 | #define DRBD_RR_CONFLICT_DEF ASB_DISCONNECT | 131 | #define DRBD_RR_CONFLICT_DEF ASB_DISCONNECT |
131 | #define DRBD_ON_NO_DATA_DEF OND_IO_ERROR | 132 | #define DRBD_ON_NO_DATA_DEF OND_IO_ERROR |
133 | #define DRBD_ON_CONGESTION_DEF OC_BLOCK | ||
132 | 134 | ||
133 | #define DRBD_MAX_BIO_BVECS_MIN 0 | 135 | #define DRBD_MAX_BIO_BVECS_MIN 0 |
134 | #define DRBD_MAX_BIO_BVECS_MAX 128 | 136 | #define DRBD_MAX_BIO_BVECS_MAX 128 |
@@ -154,5 +156,13 @@ | |||
154 | #define DRBD_C_MIN_RATE_MAX (4 << 20) | 156 | #define DRBD_C_MIN_RATE_MAX (4 << 20) |
155 | #define DRBD_C_MIN_RATE_DEF 4096 | 157 | #define DRBD_C_MIN_RATE_DEF 4096 |
156 | 158 | ||
159 | #define DRBD_CONG_FILL_MIN 0 | ||
160 | #define DRBD_CONG_FILL_MAX (10<<21) /* 10GByte in sectors */ | ||
161 | #define DRBD_CONG_FILL_DEF 0 | ||
162 | |||
163 | #define DRBD_CONG_EXTENTS_MIN DRBD_AL_EXTENTS_MIN | ||
164 | #define DRBD_CONG_EXTENTS_MAX DRBD_AL_EXTENTS_MAX | ||
165 | #define DRBD_CONG_EXTENTS_DEF DRBD_AL_EXTENTS_DEF | ||
166 | |||
157 | #undef RANGE | 167 | #undef RANGE |
158 | #endif | 168 | #endif |
diff --git a/include/linux/drbd_nl.h b/include/linux/drbd_nl.h index ade91107c9a5..ab6159e4fcf0 100644 --- a/include/linux/drbd_nl.h +++ b/include/linux/drbd_nl.h | |||
@@ -56,6 +56,9 @@ NL_PACKET(net_conf, 5, | |||
56 | NL_INTEGER( 39, T_MAY_IGNORE, rr_conflict) | 56 | NL_INTEGER( 39, T_MAY_IGNORE, rr_conflict) |
57 | NL_INTEGER( 40, T_MAY_IGNORE, ping_timeo) | 57 | NL_INTEGER( 40, T_MAY_IGNORE, ping_timeo) |
58 | NL_INTEGER( 67, T_MAY_IGNORE, rcvbuf_size) | 58 | NL_INTEGER( 67, T_MAY_IGNORE, rcvbuf_size) |
59 | NL_INTEGER( 81, T_MAY_IGNORE, on_congestion) | ||
60 | NL_INTEGER( 82, T_MAY_IGNORE, cong_fill) | ||
61 | NL_INTEGER( 83, T_MAY_IGNORE, cong_extents) | ||
59 | /* 59 addr_family was available in GIT, never released */ | 62 | /* 59 addr_family was available in GIT, never released */ |
60 | NL_BIT( 60, T_MANDATORY, mind_af) | 63 | NL_BIT( 60, T_MANDATORY, mind_af) |
61 | NL_BIT( 27, T_MAY_IGNORE, want_lose) | 64 | NL_BIT( 27, T_MAY_IGNORE, want_lose) |
@@ -66,7 +69,9 @@ NL_PACKET(net_conf, 5, | |||
66 | NL_BIT( 70, T_MANDATORY, dry_run) | 69 | NL_BIT( 70, T_MANDATORY, dry_run) |
67 | ) | 70 | ) |
68 | 71 | ||
69 | NL_PACKET(disconnect, 6, ) | 72 | NL_PACKET(disconnect, 6, |
73 | NL_BIT( 84, T_MAY_IGNORE, force) | ||
74 | ) | ||
70 | 75 | ||
71 | NL_PACKET(resize, 7, | 76 | NL_PACKET(resize, 7, |
72 | NL_INT64( 29, T_MAY_IGNORE, resize_size) | 77 | NL_INT64( 29, T_MAY_IGNORE, resize_size) |
@@ -143,9 +148,13 @@ NL_PACKET(new_c_uuid, 26, | |||
143 | NL_BIT( 63, T_MANDATORY, clear_bm) | 148 | NL_BIT( 63, T_MANDATORY, clear_bm) |
144 | ) | 149 | ) |
145 | 150 | ||
151 | #ifdef NL_RESPONSE | ||
152 | NL_RESPONSE(return_code_only, 27) | ||
153 | #endif | ||
154 | |||
146 | #undef NL_PACKET | 155 | #undef NL_PACKET |
147 | #undef NL_INTEGER | 156 | #undef NL_INTEGER |
148 | #undef NL_INT64 | 157 | #undef NL_INT64 |
149 | #undef NL_BIT | 158 | #undef NL_BIT |
150 | #undef NL_STRING | 159 | #undef NL_STRING |
151 | 160 | #undef NL_RESPONSE | |
diff --git a/include/linux/drbd_tag_magic.h b/include/linux/drbd_tag_magic.h index fcdff8410e99..f14a165e82dc 100644 --- a/include/linux/drbd_tag_magic.h +++ b/include/linux/drbd_tag_magic.h | |||
@@ -7,6 +7,7 @@ | |||
7 | /* declare packet_type enums */ | 7 | /* declare packet_type enums */ |
8 | enum packet_types { | 8 | enum packet_types { |
9 | #define NL_PACKET(name, number, fields) P_ ## name = number, | 9 | #define NL_PACKET(name, number, fields) P_ ## name = number, |
10 | #define NL_RESPONSE(name, number) P_ ## name = number, | ||
10 | #define NL_INTEGER(pn, pr, member) | 11 | #define NL_INTEGER(pn, pr, member) |
11 | #define NL_INT64(pn, pr, member) | 12 | #define NL_INT64(pn, pr, member) |
12 | #define NL_BIT(pn, pr, member) | 13 | #define NL_BIT(pn, pr, member) |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index b297f288f6eb..c8fcbdd2b0e7 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -648,6 +648,9 @@ enum ethtool_sfeatures_retval_bits { | |||
648 | 648 | ||
649 | #include <linux/rculist.h> | 649 | #include <linux/rculist.h> |
650 | 650 | ||
651 | /* needed by dev_disable_lro() */ | ||
652 | extern int __ethtool_set_flags(struct net_device *dev, u32 flags); | ||
653 | |||
651 | struct ethtool_rx_ntuple_flow_spec_container { | 654 | struct ethtool_rx_ntuple_flow_spec_container { |
652 | struct ethtool_rx_ntuple_flow_spec fs; | 655 | struct ethtool_rx_ntuple_flow_spec fs; |
653 | struct list_head list; | 656 | struct list_head list; |
@@ -677,6 +680,7 @@ int ethtool_op_set_ufo(struct net_device *dev, u32 data); | |||
677 | u32 ethtool_op_get_flags(struct net_device *dev); | 680 | u32 ethtool_op_get_flags(struct net_device *dev); |
678 | int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported); | 681 | int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported); |
679 | void ethtool_ntuple_flush(struct net_device *dev); | 682 | void ethtool_ntuple_flush(struct net_device *dev); |
683 | bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported); | ||
680 | 684 | ||
681 | /** | 685 | /** |
682 | * ðtool_ops - Alter and report network device settings | 686 | * ðtool_ops - Alter and report network device settings |
diff --git a/include/linux/fs.h b/include/linux/fs.h index b677bd77f2d6..52f283c1edb2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -357,6 +357,8 @@ struct inodes_stat_t { | |||
357 | #define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ | 357 | #define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ |
358 | #define FS_EXTENT_FL 0x00080000 /* Extents */ | 358 | #define FS_EXTENT_FL 0x00080000 /* Extents */ |
359 | #define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */ | 359 | #define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */ |
360 | #define FS_NOCOW_FL 0x00800000 /* Do not cow file */ | ||
361 | #define FS_COW_FL 0x02000000 /* Cow file */ | ||
360 | #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ | 362 | #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ |
361 | 363 | ||
362 | #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ | 364 | #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ |
diff --git a/include/linux/input.h b/include/linux/input.h index 056ae8a5bd9b..f3a7794a18c4 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -664,6 +664,13 @@ struct input_keymap_entry { | |||
664 | #define KEY_TOUCHPAD_ON 0x213 | 664 | #define KEY_TOUCHPAD_ON 0x213 |
665 | #define KEY_TOUCHPAD_OFF 0x214 | 665 | #define KEY_TOUCHPAD_OFF 0x214 |
666 | 666 | ||
667 | #define KEY_CAMERA_ZOOMIN 0x215 | ||
668 | #define KEY_CAMERA_ZOOMOUT 0x216 | ||
669 | #define KEY_CAMERA_UP 0x217 | ||
670 | #define KEY_CAMERA_DOWN 0x218 | ||
671 | #define KEY_CAMERA_LEFT 0x219 | ||
672 | #define KEY_CAMERA_RIGHT 0x21a | ||
673 | |||
667 | #define BTN_TRIGGER_HAPPY 0x2c0 | 674 | #define BTN_TRIGGER_HAPPY 0x2c0 |
668 | #define BTN_TRIGGER_HAPPY1 0x2c0 | 675 | #define BTN_TRIGGER_HAPPY1 0x2c0 |
669 | #define BTN_TRIGGER_HAPPY2 0x2c1 | 676 | #define BTN_TRIGGER_HAPPY2 0x2c1 |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 1d3577f30d45..2a375a72ce3c 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/ptrace.h> | 28 | #include <asm/ptrace.h> |
29 | #include <asm/irq_regs.h> | 29 | #include <asm/irq_regs.h> |
30 | 30 | ||
31 | struct seq_file; | ||
31 | struct irq_desc; | 32 | struct irq_desc; |
32 | struct irq_data; | 33 | struct irq_data; |
33 | typedef void (*irq_flow_handler_t)(unsigned int irq, | 34 | typedef void (*irq_flow_handler_t)(unsigned int irq, |
@@ -91,18 +92,6 @@ enum { | |||
91 | IRQ_NO_BALANCING = (1 << 13), | 92 | IRQ_NO_BALANCING = (1 << 13), |
92 | IRQ_MOVE_PCNTXT = (1 << 14), | 93 | IRQ_MOVE_PCNTXT = (1 << 14), |
93 | IRQ_NESTED_THREAD = (1 << 15), | 94 | IRQ_NESTED_THREAD = (1 << 15), |
94 | |||
95 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
96 | IRQ_INPROGRESS = (1 << 16), | ||
97 | IRQ_REPLAY = (1 << 17), | ||
98 | IRQ_WAITING = (1 << 18), | ||
99 | IRQ_DISABLED = (1 << 19), | ||
100 | IRQ_PENDING = (1 << 20), | ||
101 | IRQ_MASKED = (1 << 21), | ||
102 | IRQ_MOVE_PENDING = (1 << 22), | ||
103 | IRQ_AFFINITY_SET = (1 << 23), | ||
104 | IRQ_WAKEUP = (1 << 24), | ||
105 | #endif | ||
106 | }; | 95 | }; |
107 | 96 | ||
108 | #define IRQF_MODIFY_MASK \ | 97 | #define IRQF_MODIFY_MASK \ |
@@ -134,7 +123,7 @@ struct msi_desc; | |||
134 | * struct irq_data - per irq and irq chip data passed down to chip functions | 123 | * struct irq_data - per irq and irq chip data passed down to chip functions |
135 | * @irq: interrupt number | 124 | * @irq: interrupt number |
136 | * @node: node index useful for balancing | 125 | * @node: node index useful for balancing |
137 | * @state_use_accessor: status information for irq chip functions. | 126 | * @state_use_accessors: status information for irq chip functions. |
138 | * Use accessor functions to deal with it | 127 | * Use accessor functions to deal with it |
139 | * @chip: low level interrupt hardware access | 128 | * @chip: low level interrupt hardware access |
140 | * @handler_data: per-IRQ data for the irq_chip methods | 129 | * @handler_data: per-IRQ data for the irq_chip methods |
@@ -173,6 +162,9 @@ struct irq_data { | |||
173 | * from suspend | 162 | * from suspend |
174 | * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process | 163 | * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process |
175 | * context | 164 | * context |
165 | * IRQD_IRQ_DISABLED - Disabled state of the interrupt | ||
166 | * IRQD_IRQ_MASKED - Masked state of the interrupt | ||
167 | * IRQD_IRQ_INPROGRESS - In progress state of the interrupt | ||
176 | */ | 168 | */ |
177 | enum { | 169 | enum { |
178 | IRQD_TRIGGER_MASK = 0xf, | 170 | IRQD_TRIGGER_MASK = 0xf, |
@@ -183,6 +175,9 @@ enum { | |||
183 | IRQD_LEVEL = (1 << 13), | 175 | IRQD_LEVEL = (1 << 13), |
184 | IRQD_WAKEUP_STATE = (1 << 14), | 176 | IRQD_WAKEUP_STATE = (1 << 14), |
185 | IRQD_MOVE_PCNTXT = (1 << 15), | 177 | IRQD_MOVE_PCNTXT = (1 << 15), |
178 | IRQD_IRQ_DISABLED = (1 << 16), | ||
179 | IRQD_IRQ_MASKED = (1 << 17), | ||
180 | IRQD_IRQ_INPROGRESS = (1 << 18), | ||
186 | }; | 181 | }; |
187 | 182 | ||
188 | static inline bool irqd_is_setaffinity_pending(struct irq_data *d) | 183 | static inline bool irqd_is_setaffinity_pending(struct irq_data *d) |
@@ -205,6 +200,11 @@ static inline bool irqd_affinity_was_set(struct irq_data *d) | |||
205 | return d->state_use_accessors & IRQD_AFFINITY_SET; | 200 | return d->state_use_accessors & IRQD_AFFINITY_SET; |
206 | } | 201 | } |
207 | 202 | ||
203 | static inline void irqd_mark_affinity_was_set(struct irq_data *d) | ||
204 | { | ||
205 | d->state_use_accessors |= IRQD_AFFINITY_SET; | ||
206 | } | ||
207 | |||
208 | static inline u32 irqd_get_trigger_type(struct irq_data *d) | 208 | static inline u32 irqd_get_trigger_type(struct irq_data *d) |
209 | { | 209 | { |
210 | return d->state_use_accessors & IRQD_TRIGGER_MASK; | 210 | return d->state_use_accessors & IRQD_TRIGGER_MASK; |
@@ -234,6 +234,36 @@ static inline bool irqd_can_move_in_process_context(struct irq_data *d) | |||
234 | return d->state_use_accessors & IRQD_MOVE_PCNTXT; | 234 | return d->state_use_accessors & IRQD_MOVE_PCNTXT; |
235 | } | 235 | } |
236 | 236 | ||
237 | static inline bool irqd_irq_disabled(struct irq_data *d) | ||
238 | { | ||
239 | return d->state_use_accessors & IRQD_IRQ_DISABLED; | ||
240 | } | ||
241 | |||
242 | static inline bool irqd_irq_masked(struct irq_data *d) | ||
243 | { | ||
244 | return d->state_use_accessors & IRQD_IRQ_MASKED; | ||
245 | } | ||
246 | |||
247 | static inline bool irqd_irq_inprogress(struct irq_data *d) | ||
248 | { | ||
249 | return d->state_use_accessors & IRQD_IRQ_INPROGRESS; | ||
250 | } | ||
251 | |||
252 | /* | ||
253 | * Functions for chained handlers which can be enabled/disabled by the | ||
254 | * standard disable_irq/enable_irq calls. Must be called with | ||
255 | * irq_desc->lock held. | ||
256 | */ | ||
257 | static inline void irqd_set_chained_irq_inprogress(struct irq_data *d) | ||
258 | { | ||
259 | d->state_use_accessors |= IRQD_IRQ_INPROGRESS; | ||
260 | } | ||
261 | |||
262 | static inline void irqd_clr_chained_irq_inprogress(struct irq_data *d) | ||
263 | { | ||
264 | d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS; | ||
265 | } | ||
266 | |||
237 | /** | 267 | /** |
238 | * struct irq_chip - hardware interrupt chip descriptor | 268 | * struct irq_chip - hardware interrupt chip descriptor |
239 | * | 269 | * |
@@ -270,34 +300,15 @@ static inline bool irqd_can_move_in_process_context(struct irq_data *d) | |||
270 | * @irq_set_wake: enable/disable power-management wake-on of an IRQ | 300 | * @irq_set_wake: enable/disable power-management wake-on of an IRQ |
271 | * @irq_bus_lock: function to lock access to slow bus (i2c) chips | 301 | * @irq_bus_lock: function to lock access to slow bus (i2c) chips |
272 | * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips | 302 | * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips |
303 | * @irq_cpu_online: configure an interrupt source for a secondary CPU | ||
304 | * @irq_cpu_offline: un-configure an interrupt source for a secondary CPU | ||
305 | * @irq_print_chip: optional to print special chip info in show_interrupts | ||
273 | * @flags: chip specific flags | 306 | * @flags: chip specific flags |
274 | * | 307 | * |
275 | * @release: release function solely used by UML | 308 | * @release: release function solely used by UML |
276 | */ | 309 | */ |
277 | struct irq_chip { | 310 | struct irq_chip { |
278 | const char *name; | 311 | const char *name; |
279 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED | ||
280 | unsigned int (*startup)(unsigned int irq); | ||
281 | void (*shutdown)(unsigned int irq); | ||
282 | void (*enable)(unsigned int irq); | ||
283 | void (*disable)(unsigned int irq); | ||
284 | |||
285 | void (*ack)(unsigned int irq); | ||
286 | void (*mask)(unsigned int irq); | ||
287 | void (*mask_ack)(unsigned int irq); | ||
288 | void (*unmask)(unsigned int irq); | ||
289 | void (*eoi)(unsigned int irq); | ||
290 | |||
291 | void (*end)(unsigned int irq); | ||
292 | int (*set_affinity)(unsigned int irq, | ||
293 | const struct cpumask *dest); | ||
294 | int (*retrigger)(unsigned int irq); | ||
295 | int (*set_type)(unsigned int irq, unsigned int flow_type); | ||
296 | int (*set_wake)(unsigned int irq, unsigned int on); | ||
297 | |||
298 | void (*bus_lock)(unsigned int irq); | ||
299 | void (*bus_sync_unlock)(unsigned int irq); | ||
300 | #endif | ||
301 | unsigned int (*irq_startup)(struct irq_data *data); | 312 | unsigned int (*irq_startup)(struct irq_data *data); |
302 | void (*irq_shutdown)(struct irq_data *data); | 313 | void (*irq_shutdown)(struct irq_data *data); |
303 | void (*irq_enable)(struct irq_data *data); | 314 | void (*irq_enable)(struct irq_data *data); |
@@ -317,6 +328,11 @@ struct irq_chip { | |||
317 | void (*irq_bus_lock)(struct irq_data *data); | 328 | void (*irq_bus_lock)(struct irq_data *data); |
318 | void (*irq_bus_sync_unlock)(struct irq_data *data); | 329 | void (*irq_bus_sync_unlock)(struct irq_data *data); |
319 | 330 | ||
331 | void (*irq_cpu_online)(struct irq_data *data); | ||
332 | void (*irq_cpu_offline)(struct irq_data *data); | ||
333 | |||
334 | void (*irq_print_chip)(struct irq_data *data, struct seq_file *p); | ||
335 | |||
320 | unsigned long flags; | 336 | unsigned long flags; |
321 | 337 | ||
322 | /* Currently used only by UML, might disappear one day.*/ | 338 | /* Currently used only by UML, might disappear one day.*/ |
@@ -331,11 +347,14 @@ struct irq_chip { | |||
331 | * IRQCHIP_SET_TYPE_MASKED: Mask before calling chip.irq_set_type() | 347 | * IRQCHIP_SET_TYPE_MASKED: Mask before calling chip.irq_set_type() |
332 | * IRQCHIP_EOI_IF_HANDLED: Only issue irq_eoi() when irq was handled | 348 | * IRQCHIP_EOI_IF_HANDLED: Only issue irq_eoi() when irq was handled |
333 | * IRQCHIP_MASK_ON_SUSPEND: Mask non wake irqs in the suspend path | 349 | * IRQCHIP_MASK_ON_SUSPEND: Mask non wake irqs in the suspend path |
350 | * IRQCHIP_ONOFFLINE_ENABLED: Only call irq_on/off_line callbacks | ||
351 | * when irq enabled | ||
334 | */ | 352 | */ |
335 | enum { | 353 | enum { |
336 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), | 354 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), |
337 | IRQCHIP_EOI_IF_HANDLED = (1 << 1), | 355 | IRQCHIP_EOI_IF_HANDLED = (1 << 1), |
338 | IRQCHIP_MASK_ON_SUSPEND = (1 << 2), | 356 | IRQCHIP_MASK_ON_SUSPEND = (1 << 2), |
357 | IRQCHIP_ONOFFLINE_ENABLED = (1 << 3), | ||
339 | }; | 358 | }; |
340 | 359 | ||
341 | /* This include will go away once we isolated irq_desc usage to core code */ | 360 | /* This include will go away once we isolated irq_desc usage to core code */ |
@@ -360,25 +379,22 @@ struct irqaction; | |||
360 | extern int setup_irq(unsigned int irq, struct irqaction *new); | 379 | extern int setup_irq(unsigned int irq, struct irqaction *new); |
361 | extern void remove_irq(unsigned int irq, struct irqaction *act); | 380 | extern void remove_irq(unsigned int irq, struct irqaction *act); |
362 | 381 | ||
382 | extern void irq_cpu_online(void); | ||
383 | extern void irq_cpu_offline(void); | ||
384 | extern int __irq_set_affinity_locked(struct irq_data *data, const struct cpumask *cpumask); | ||
385 | |||
363 | #ifdef CONFIG_GENERIC_HARDIRQS | 386 | #ifdef CONFIG_GENERIC_HARDIRQS |
364 | 387 | ||
365 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) | 388 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) |
366 | void move_native_irq(int irq); | ||
367 | void move_masked_irq(int irq); | ||
368 | void irq_move_irq(struct irq_data *data); | 389 | void irq_move_irq(struct irq_data *data); |
369 | void irq_move_masked_irq(struct irq_data *data); | 390 | void irq_move_masked_irq(struct irq_data *data); |
370 | #else | 391 | #else |
371 | static inline void move_native_irq(int irq) { } | ||
372 | static inline void move_masked_irq(int irq) { } | ||
373 | static inline void irq_move_irq(struct irq_data *data) { } | 392 | static inline void irq_move_irq(struct irq_data *data) { } |
374 | static inline void irq_move_masked_irq(struct irq_data *data) { } | 393 | static inline void irq_move_masked_irq(struct irq_data *data) { } |
375 | #endif | 394 | #endif |
376 | 395 | ||
377 | extern int no_irq_affinity; | 396 | extern int no_irq_affinity; |
378 | 397 | ||
379 | /* Handle irq action chains: */ | ||
380 | extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action); | ||
381 | |||
382 | /* | 398 | /* |
383 | * Built-in IRQ handlers for various IRQ types, | 399 | * Built-in IRQ handlers for various IRQ types, |
384 | * callable via desc->handle_irq() | 400 | * callable via desc->handle_irq() |
@@ -386,6 +402,7 @@ extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action); | |||
386 | extern void handle_level_irq(unsigned int irq, struct irq_desc *desc); | 402 | extern void handle_level_irq(unsigned int irq, struct irq_desc *desc); |
387 | extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); | 403 | extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); |
388 | extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc); | 404 | extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc); |
405 | extern void handle_edge_eoi_irq(unsigned int irq, struct irq_desc *desc); | ||
389 | extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc); | 406 | extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc); |
390 | extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc); | 407 | extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc); |
391 | extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); | 408 | extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); |
@@ -534,89 +551,6 @@ static inline struct msi_desc *irq_data_get_msi(struct irq_data *d) | |||
534 | return d->msi_desc; | 551 | return d->msi_desc; |
535 | } | 552 | } |
536 | 553 | ||
537 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
538 | /* Please do not use: Use the replacement functions instead */ | ||
539 | static inline int set_irq_chip(unsigned int irq, struct irq_chip *chip) | ||
540 | { | ||
541 | return irq_set_chip(irq, chip); | ||
542 | } | ||
543 | static inline int set_irq_data(unsigned int irq, void *data) | ||
544 | { | ||
545 | return irq_set_handler_data(irq, data); | ||
546 | } | ||
547 | static inline int set_irq_chip_data(unsigned int irq, void *data) | ||
548 | { | ||
549 | return irq_set_chip_data(irq, data); | ||
550 | } | ||
551 | static inline int set_irq_type(unsigned int irq, unsigned int type) | ||
552 | { | ||
553 | return irq_set_irq_type(irq, type); | ||
554 | } | ||
555 | static inline int set_irq_msi(unsigned int irq, struct msi_desc *entry) | ||
556 | { | ||
557 | return irq_set_msi_desc(irq, entry); | ||
558 | } | ||
559 | static inline struct irq_chip *get_irq_chip(unsigned int irq) | ||
560 | { | ||
561 | return irq_get_chip(irq); | ||
562 | } | ||
563 | static inline void *get_irq_chip_data(unsigned int irq) | ||
564 | { | ||
565 | return irq_get_chip_data(irq); | ||
566 | } | ||
567 | static inline void *get_irq_data(unsigned int irq) | ||
568 | { | ||
569 | return irq_get_handler_data(irq); | ||
570 | } | ||
571 | static inline void *irq_data_get_irq_data(struct irq_data *d) | ||
572 | { | ||
573 | return irq_data_get_irq_handler_data(d); | ||
574 | } | ||
575 | static inline struct msi_desc *get_irq_msi(unsigned int irq) | ||
576 | { | ||
577 | return irq_get_msi_desc(irq); | ||
578 | } | ||
579 | static inline void set_irq_noprobe(unsigned int irq) | ||
580 | { | ||
581 | irq_set_noprobe(irq); | ||
582 | } | ||
583 | static inline void set_irq_probe(unsigned int irq) | ||
584 | { | ||
585 | irq_set_probe(irq); | ||
586 | } | ||
587 | static inline void set_irq_nested_thread(unsigned int irq, int nest) | ||
588 | { | ||
589 | irq_set_nested_thread(irq, nest); | ||
590 | } | ||
591 | static inline void | ||
592 | set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, | ||
593 | irq_flow_handler_t handle, const char *name) | ||
594 | { | ||
595 | irq_set_chip_and_handler_name(irq, chip, handle, name); | ||
596 | } | ||
597 | static inline void | ||
598 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | ||
599 | irq_flow_handler_t handle) | ||
600 | { | ||
601 | irq_set_chip_and_handler(irq, chip, handle); | ||
602 | } | ||
603 | static inline void | ||
604 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | ||
605 | const char *name) | ||
606 | { | ||
607 | __irq_set_handler(irq, handle, is_chained, name); | ||
608 | } | ||
609 | static inline void set_irq_handler(unsigned int irq, irq_flow_handler_t handle) | ||
610 | { | ||
611 | irq_set_handler(irq, handle); | ||
612 | } | ||
613 | static inline void | ||
614 | set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle) | ||
615 | { | ||
616 | irq_set_chained_handler(irq, handle); | ||
617 | } | ||
618 | #endif | ||
619 | |||
620 | int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); | 554 | int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); |
621 | void irq_free_descs(unsigned int irq, unsigned int cnt); | 555 | void irq_free_descs(unsigned int irq, unsigned int cnt); |
622 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); | 556 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 00218371518b..a082905b5ebe 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
@@ -35,32 +35,7 @@ struct timer_rand_state; | |||
35 | * @name: flow handler name for /proc/interrupts output | 35 | * @name: flow handler name for /proc/interrupts output |
36 | */ | 36 | */ |
37 | struct irq_desc { | 37 | struct irq_desc { |
38 | |||
39 | #ifdef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED | ||
40 | struct irq_data irq_data; | 38 | struct irq_data irq_data; |
41 | #else | ||
42 | /* | ||
43 | * This union will go away, once we fixed the direct access to | ||
44 | * irq_desc all over the place. The direct fields are a 1:1 | ||
45 | * overlay of irq_data. | ||
46 | */ | ||
47 | union { | ||
48 | struct irq_data irq_data; | ||
49 | struct { | ||
50 | unsigned int irq; | ||
51 | unsigned int node; | ||
52 | unsigned int pad_do_not_even_think_about_it; | ||
53 | struct irq_chip *chip; | ||
54 | void *handler_data; | ||
55 | void *chip_data; | ||
56 | struct msi_desc *msi_desc; | ||
57 | #ifdef CONFIG_SMP | ||
58 | cpumask_var_t affinity; | ||
59 | #endif | ||
60 | }; | ||
61 | }; | ||
62 | #endif | ||
63 | |||
64 | struct timer_rand_state *timer_rand_state; | 39 | struct timer_rand_state *timer_rand_state; |
65 | unsigned int __percpu *kstat_irqs; | 40 | unsigned int __percpu *kstat_irqs; |
66 | irq_flow_handler_t handle_irq; | 41 | irq_flow_handler_t handle_irq; |
@@ -68,11 +43,7 @@ struct irq_desc { | |||
68 | irq_preflow_handler_t preflow_handler; | 43 | irq_preflow_handler_t preflow_handler; |
69 | #endif | 44 | #endif |
70 | struct irqaction *action; /* IRQ action list */ | 45 | struct irqaction *action; /* IRQ action list */ |
71 | #ifdef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
72 | unsigned int status_use_accessors; | 46 | unsigned int status_use_accessors; |
73 | #else | ||
74 | unsigned int status; /* IRQ status */ | ||
75 | #endif | ||
76 | unsigned int core_internal_state__do_not_mess_with_it; | 47 | unsigned int core_internal_state__do_not_mess_with_it; |
77 | unsigned int depth; /* nested irq disables */ | 48 | unsigned int depth; /* nested irq disables */ |
78 | unsigned int wake_depth; /* nested wake enables */ | 49 | unsigned int wake_depth; /* nested wake enables */ |
@@ -100,13 +71,6 @@ struct irq_desc { | |||
100 | extern struct irq_desc irq_desc[NR_IRQS]; | 71 | extern struct irq_desc irq_desc[NR_IRQS]; |
101 | #endif | 72 | #endif |
102 | 73 | ||
103 | /* Will be removed once the last users in power and sh are gone */ | ||
104 | extern struct irq_desc *irq_to_desc_alloc_node(unsigned int irq, int node); | ||
105 | static inline struct irq_desc *move_irq_desc(struct irq_desc *desc, int node) | ||
106 | { | ||
107 | return desc; | ||
108 | } | ||
109 | |||
110 | #ifdef CONFIG_GENERIC_HARDIRQS | 74 | #ifdef CONFIG_GENERIC_HARDIRQS |
111 | 75 | ||
112 | static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc) | 76 | static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc) |
@@ -134,27 +98,6 @@ static inline struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc) | |||
134 | return desc->irq_data.msi_desc; | 98 | return desc->irq_data.msi_desc; |
135 | } | 99 | } |
136 | 100 | ||
137 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
138 | static inline struct irq_chip *get_irq_desc_chip(struct irq_desc *desc) | ||
139 | { | ||
140 | return irq_desc_get_chip(desc); | ||
141 | } | ||
142 | static inline void *get_irq_desc_data(struct irq_desc *desc) | ||
143 | { | ||
144 | return irq_desc_get_handler_data(desc); | ||
145 | } | ||
146 | |||
147 | static inline void *get_irq_desc_chip_data(struct irq_desc *desc) | ||
148 | { | ||
149 | return irq_desc_get_chip_data(desc); | ||
150 | } | ||
151 | |||
152 | static inline struct msi_desc *get_irq_desc_msi(struct irq_desc *desc) | ||
153 | { | ||
154 | return irq_desc_get_msi_desc(desc); | ||
155 | } | ||
156 | #endif | ||
157 | |||
158 | /* | 101 | /* |
159 | * Architectures call this to let the generic IRQ layer | 102 | * Architectures call this to let the generic IRQ layer |
160 | * handle an interrupt. If the descriptor is attached to an | 103 | * handle an interrupt. If the descriptor is attached to an |
@@ -178,24 +121,44 @@ static inline int irq_has_action(unsigned int irq) | |||
178 | return desc->action != NULL; | 121 | return desc->action != NULL; |
179 | } | 122 | } |
180 | 123 | ||
181 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | 124 | /* caller has locked the irq_desc and both params are valid */ |
182 | static inline int irq_balancing_disabled(unsigned int irq) | 125 | static inline void __irq_set_handler_locked(unsigned int irq, |
126 | irq_flow_handler_t handler) | ||
183 | { | 127 | { |
184 | struct irq_desc *desc; | 128 | struct irq_desc *desc; |
185 | 129 | ||
186 | desc = irq_to_desc(irq); | 130 | desc = irq_to_desc(irq); |
187 | return desc->status & IRQ_NO_BALANCING_MASK; | 131 | desc->handle_irq = handler; |
188 | } | 132 | } |
189 | #endif | ||
190 | 133 | ||
191 | /* caller has locked the irq_desc and both params are valid */ | 134 | /* caller has locked the irq_desc and both params are valid */ |
192 | static inline void __set_irq_handler_unlocked(int irq, | 135 | static inline void |
193 | irq_flow_handler_t handler) | 136 | __irq_set_chip_handler_name_locked(unsigned int irq, struct irq_chip *chip, |
137 | irq_flow_handler_t handler, const char *name) | ||
194 | { | 138 | { |
195 | struct irq_desc *desc; | 139 | struct irq_desc *desc; |
196 | 140 | ||
197 | desc = irq_to_desc(irq); | 141 | desc = irq_to_desc(irq); |
142 | irq_desc_get_irq_data(desc)->chip = chip; | ||
198 | desc->handle_irq = handler; | 143 | desc->handle_irq = handler; |
144 | desc->name = name; | ||
145 | } | ||
146 | |||
147 | static inline int irq_balancing_disabled(unsigned int irq) | ||
148 | { | ||
149 | struct irq_desc *desc; | ||
150 | |||
151 | desc = irq_to_desc(irq); | ||
152 | return desc->status_use_accessors & IRQ_NO_BALANCING_MASK; | ||
153 | } | ||
154 | |||
155 | static inline void | ||
156 | irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) | ||
157 | { | ||
158 | struct irq_desc *desc = irq_to_desc(irq); | ||
159 | |||
160 | if (desc) | ||
161 | lockdep_set_class(&desc->lock, class); | ||
199 | } | 162 | } |
200 | 163 | ||
201 | #ifdef CONFIG_IRQ_PREFLOW_FASTEOI | 164 | #ifdef CONFIG_IRQ_PREFLOW_FASTEOI |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 27e79c27ba08..a32dcaec04e1 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -432,13 +432,35 @@ struct jbd2_journal_handle | |||
432 | int h_err; | 432 | int h_err; |
433 | 433 | ||
434 | /* Flags [no locking] */ | 434 | /* Flags [no locking] */ |
435 | unsigned int h_sync: 1; /* sync-on-close */ | 435 | unsigned int h_sync:1; /* sync-on-close */ |
436 | unsigned int h_jdata: 1; /* force data journaling */ | 436 | unsigned int h_jdata:1; /* force data journaling */ |
437 | unsigned int h_aborted: 1; /* fatal error on handle */ | 437 | unsigned int h_aborted:1; /* fatal error on handle */ |
438 | unsigned int h_cowing:1; /* COWing block to snapshot */ | ||
439 | |||
440 | /* Number of buffers requested by user: | ||
441 | * (before adding the COW credits factor) */ | ||
442 | unsigned int h_base_credits:14; | ||
443 | |||
444 | /* Number of buffers the user is allowed to dirty: | ||
445 | * (counts only buffers dirtied when !h_cowing) */ | ||
446 | unsigned int h_user_credits:14; | ||
447 | |||
438 | 448 | ||
439 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 449 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
440 | struct lockdep_map h_lockdep_map; | 450 | struct lockdep_map h_lockdep_map; |
441 | #endif | 451 | #endif |
452 | |||
453 | #ifdef CONFIG_JBD2_DEBUG | ||
454 | /* COW debugging counters: */ | ||
455 | unsigned int h_cow_moved; /* blocks moved to snapshot */ | ||
456 | unsigned int h_cow_copied; /* blocks copied to snapshot */ | ||
457 | unsigned int h_cow_ok_jh; /* blocks already COWed during current | ||
458 | transaction */ | ||
459 | unsigned int h_cow_ok_bitmap; /* blocks not set in COW bitmap */ | ||
460 | unsigned int h_cow_ok_mapped;/* blocks already mapped in snapshot */ | ||
461 | unsigned int h_cow_bitmaps; /* COW bitmaps created */ | ||
462 | unsigned int h_cow_excluded; /* blocks set in exclude bitmap */ | ||
463 | #endif | ||
442 | }; | 464 | }; |
443 | 465 | ||
444 | 466 | ||
diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h index 525aac3c97df..44e95d0a721f 100644 --- a/include/linux/journal-head.h +++ b/include/linux/journal-head.h | |||
@@ -41,6 +41,13 @@ struct journal_head { | |||
41 | unsigned b_modified; | 41 | unsigned b_modified; |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * This feild tracks the last transaction id in which this buffer | ||
45 | * has been cowed | ||
46 | * [jbd_lock_bh_state()] | ||
47 | */ | ||
48 | unsigned b_cow_tid; | ||
49 | |||
50 | /* | ||
44 | * Copy of the buffer data frozen for writing to the log. | 51 | * Copy of the buffer data frozen for writing to the log. |
45 | * [jbd_lock_bh_state()] | 52 | * [jbd_lock_bh_state()] |
46 | */ | 53 | */ |
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index d8e9b3d1c23c..0df513b7a9f8 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h | |||
@@ -36,6 +36,7 @@ const char *kallsyms_lookup(unsigned long addr, | |||
36 | 36 | ||
37 | /* Look up a kernel symbol and return it in a text buffer. */ | 37 | /* Look up a kernel symbol and return it in a text buffer. */ |
38 | extern int sprint_symbol(char *buffer, unsigned long address); | 38 | extern int sprint_symbol(char *buffer, unsigned long address); |
39 | extern int sprint_backtrace(char *buffer, unsigned long address); | ||
39 | 40 | ||
40 | /* Look up a kernel symbol and print it to the kernel messages. */ | 41 | /* Look up a kernel symbol and print it to the kernel messages. */ |
41 | extern void __print_symbol(const char *fmt, unsigned long address); | 42 | extern void __print_symbol(const char *fmt, unsigned long address); |
@@ -79,6 +80,12 @@ static inline int sprint_symbol(char *buffer, unsigned long addr) | |||
79 | return 0; | 80 | return 0; |
80 | } | 81 | } |
81 | 82 | ||
83 | static inline int sprint_backtrace(char *buffer, unsigned long addr) | ||
84 | { | ||
85 | *buffer = '\0'; | ||
86 | return 0; | ||
87 | } | ||
88 | |||
82 | static inline int lookup_symbol_name(unsigned long addr, char *symname) | 89 | static inline int lookup_symbol_name(unsigned long addr, char *symname) |
83 | { | 90 | { |
84 | return -ERANGE; | 91 | return -ERANGE; |
diff --git a/include/linux/leds.h b/include/linux/leds.h index 383811d9af83..61e0340a4b77 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -145,6 +145,9 @@ extern void led_trigger_register_simple(const char *name, | |||
145 | extern void led_trigger_unregister_simple(struct led_trigger *trigger); | 145 | extern void led_trigger_unregister_simple(struct led_trigger *trigger); |
146 | extern void led_trigger_event(struct led_trigger *trigger, | 146 | extern void led_trigger_event(struct led_trigger *trigger, |
147 | enum led_brightness event); | 147 | enum led_brightness event); |
148 | extern void led_trigger_blink(struct led_trigger *trigger, | ||
149 | unsigned long *delay_on, | ||
150 | unsigned long *delay_off); | ||
148 | 151 | ||
149 | #else | 152 | #else |
150 | 153 | ||
diff --git a/include/linux/mfd/ab8500.h b/include/linux/mfd/ab8500.h index 56f8dea72152..b31843075198 100644 --- a/include/linux/mfd/ab8500.h +++ b/include/linux/mfd/ab8500.h | |||
@@ -74,6 +74,45 @@ | |||
74 | #define AB8500_INT_ACC_DETECT_21DB_F 37 | 74 | #define AB8500_INT_ACC_DETECT_21DB_F 37 |
75 | #define AB8500_INT_ACC_DETECT_21DB_R 38 | 75 | #define AB8500_INT_ACC_DETECT_21DB_R 38 |
76 | #define AB8500_INT_GP_SW_ADC_CONV_END 39 | 76 | #define AB8500_INT_GP_SW_ADC_CONV_END 39 |
77 | #define AB8500_INT_ACC_DETECT_1DB_F 33 | ||
78 | #define AB8500_INT_ACC_DETECT_1DB_R 34 | ||
79 | #define AB8500_INT_ACC_DETECT_22DB_F 35 | ||
80 | #define AB8500_INT_ACC_DETECT_22DB_R 36 | ||
81 | #define AB8500_INT_ACC_DETECT_21DB_F 37 | ||
82 | #define AB8500_INT_ACC_DETECT_21DB_R 38 | ||
83 | #define AB8500_INT_GP_SW_ADC_CONV_END 39 | ||
84 | #define AB8500_INT_GPIO6R 40 | ||
85 | #define AB8500_INT_GPIO7R 41 | ||
86 | #define AB8500_INT_GPIO8R 42 | ||
87 | #define AB8500_INT_GPIO9R 43 | ||
88 | #define AB8500_INT_GPIO10R 44 | ||
89 | #define AB8500_INT_GPIO11R 45 | ||
90 | #define AB8500_INT_GPIO12R 46 | ||
91 | #define AB8500_INT_GPIO13R 47 | ||
92 | #define AB8500_INT_GPIO24R 48 | ||
93 | #define AB8500_INT_GPIO25R 49 | ||
94 | #define AB8500_INT_GPIO36R 50 | ||
95 | #define AB8500_INT_GPIO37R 51 | ||
96 | #define AB8500_INT_GPIO38R 52 | ||
97 | #define AB8500_INT_GPIO39R 53 | ||
98 | #define AB8500_INT_GPIO40R 54 | ||
99 | #define AB8500_INT_GPIO41R 55 | ||
100 | #define AB8500_INT_GPIO6F 56 | ||
101 | #define AB8500_INT_GPIO7F 57 | ||
102 | #define AB8500_INT_GPIO8F 58 | ||
103 | #define AB8500_INT_GPIO9F 59 | ||
104 | #define AB8500_INT_GPIO10F 60 | ||
105 | #define AB8500_INT_GPIO11F 61 | ||
106 | #define AB8500_INT_GPIO12F 62 | ||
107 | #define AB8500_INT_GPIO13F 63 | ||
108 | #define AB8500_INT_GPIO24F 64 | ||
109 | #define AB8500_INT_GPIO25F 65 | ||
110 | #define AB8500_INT_GPIO36F 66 | ||
111 | #define AB8500_INT_GPIO37F 67 | ||
112 | #define AB8500_INT_GPIO38F 68 | ||
113 | #define AB8500_INT_GPIO39F 69 | ||
114 | #define AB8500_INT_GPIO40F 70 | ||
115 | #define AB8500_INT_GPIO41F 71 | ||
77 | #define AB8500_INT_ADP_SOURCE_ERROR 72 | 116 | #define AB8500_INT_ADP_SOURCE_ERROR 72 |
78 | #define AB8500_INT_ADP_SINK_ERROR 73 | 117 | #define AB8500_INT_ADP_SINK_ERROR 73 |
79 | #define AB8500_INT_ADP_PROBE_PLUG 74 | 118 | #define AB8500_INT_ADP_PROBE_PLUG 74 |
@@ -139,19 +178,27 @@ struct ab8500 { | |||
139 | u8 oldmask[AB8500_NUM_IRQ_REGS]; | 178 | u8 oldmask[AB8500_NUM_IRQ_REGS]; |
140 | }; | 179 | }; |
141 | 180 | ||
181 | struct regulator_reg_init; | ||
142 | struct regulator_init_data; | 182 | struct regulator_init_data; |
183 | struct ab8500_gpio_platform_data; | ||
143 | 184 | ||
144 | /** | 185 | /** |
145 | * struct ab8500_platform_data - AB8500 platform data | 186 | * struct ab8500_platform_data - AB8500 platform data |
146 | * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used | 187 | * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used |
147 | * @init: board-specific initialization after detection of ab8500 | 188 | * @init: board-specific initialization after detection of ab8500 |
189 | * @num_regulator_reg_init: number of regulator init registers | ||
190 | * @regulator_reg_init: regulator init registers | ||
191 | * @num_regulator: number of regulators | ||
148 | * @regulator: machine-specific constraints for regulators | 192 | * @regulator: machine-specific constraints for regulators |
149 | */ | 193 | */ |
150 | struct ab8500_platform_data { | 194 | struct ab8500_platform_data { |
151 | int irq_base; | 195 | int irq_base; |
152 | void (*init) (struct ab8500 *); | 196 | void (*init) (struct ab8500 *); |
197 | int num_regulator_reg_init; | ||
198 | struct ab8500_regulator_reg_init *regulator_reg_init; | ||
153 | int num_regulator; | 199 | int num_regulator; |
154 | struct regulator_init_data *regulator; | 200 | struct regulator_init_data *regulator; |
201 | struct ab8500_gpio_platform_data *gpio; | ||
155 | }; | 202 | }; |
156 | 203 | ||
157 | extern int __devinit ab8500_init(struct ab8500 *ab8500); | 204 | extern int __devinit ab8500_init(struct ab8500 *ab8500); |
diff --git a/include/linux/mfd/ab8500/gpio.h b/include/linux/mfd/ab8500/gpio.h new file mode 100644 index 000000000000..488a8c920a29 --- /dev/null +++ b/include/linux/mfd/ab8500/gpio.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Copyright ST-Ericsson 2010. | ||
3 | * | ||
4 | * Author: Bibek Basu <bibek.basu@stericsson.com> | ||
5 | * Licensed under GPLv2. | ||
6 | */ | ||
7 | |||
8 | #ifndef _AB8500_GPIO_H | ||
9 | #define _AB8500_GPIO_H | ||
10 | |||
11 | /* | ||
12 | * Platform data to register a block: only the initial gpio/irq number. | ||
13 | */ | ||
14 | |||
15 | struct ab8500_gpio_platform_data { | ||
16 | int gpio_base; | ||
17 | u32 irq_base; | ||
18 | u8 config_reg[7]; | ||
19 | }; | ||
20 | |||
21 | #endif /* _AB8500_GPIO_H */ | ||
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 1408bf8eed5f..ad1b19aa6508 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
@@ -63,6 +63,24 @@ extern int mfd_cell_enable(struct platform_device *pdev); | |||
63 | extern int mfd_cell_disable(struct platform_device *pdev); | 63 | extern int mfd_cell_disable(struct platform_device *pdev); |
64 | 64 | ||
65 | /* | 65 | /* |
66 | * "Clone" multiple platform devices for a single cell. This is to be used | ||
67 | * for devices that have multiple users of a cell. For example, if an mfd | ||
68 | * driver wants the cell "foo" to be used by a GPIO driver, an MTD driver, | ||
69 | * and a platform driver, the following bit of code would be use after first | ||
70 | * calling mfd_add_devices(): | ||
71 | * | ||
72 | * const char *fclones[] = { "foo-gpio", "foo-mtd" }; | ||
73 | * err = mfd_clone_cells("foo", fclones, ARRAY_SIZE(fclones)); | ||
74 | * | ||
75 | * Each driver (MTD, GPIO, and platform driver) would then register | ||
76 | * platform_drivers for "foo-mtd", "foo-gpio", and "foo", respectively. | ||
77 | * The cell's .enable/.disable hooks should be used to deal with hardware | ||
78 | * resource contention. | ||
79 | */ | ||
80 | extern int mfd_clone_cell(const char *cell, const char **clones, | ||
81 | size_t n_clones); | ||
82 | |||
83 | /* | ||
66 | * Given a platform device that's been created by mfd_add_devices(), fetch | 84 | * Given a platform device that's been created by mfd_add_devices(), fetch |
67 | * the mfd_cell that created it. | 85 | * the mfd_cell that created it. |
68 | */ | 86 | */ |
@@ -87,13 +105,4 @@ extern int mfd_add_devices(struct device *parent, int id, | |||
87 | 105 | ||
88 | extern void mfd_remove_devices(struct device *parent); | 106 | extern void mfd_remove_devices(struct device *parent); |
89 | 107 | ||
90 | /* | ||
91 | * For MFD drivers with clients sharing access to resources, these create | ||
92 | * multiple platform devices per cell. Contention handling must still be | ||
93 | * handled via drivers (ie, with enable/disable hooks). | ||
94 | */ | ||
95 | extern int mfd_shared_platform_driver_register(struct platform_driver *drv, | ||
96 | const char *cellname); | ||
97 | extern void mfd_shared_platform_driver_unregister(struct platform_driver *drv); | ||
98 | |||
99 | #endif | 108 | #endif |
diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h index 93a9477e075f..69d1010e2e51 100644 --- a/include/linux/mfd/max8997-private.h +++ b/include/linux/mfd/max8997-private.h | |||
@@ -24,6 +24,8 @@ | |||
24 | 24 | ||
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | 26 | ||
27 | #define MAX8997_REG_INVALID (0xff) | ||
28 | |||
27 | enum max8997_pmic_reg { | 29 | enum max8997_pmic_reg { |
28 | MAX8997_REG_PMIC_ID0 = 0x00, | 30 | MAX8997_REG_PMIC_ID0 = 0x00, |
29 | MAX8997_REG_PMIC_ID1 = 0x01, | 31 | MAX8997_REG_PMIC_ID1 = 0x01, |
@@ -313,6 +315,7 @@ enum max8997_irq { | |||
313 | #define MAX8997_REG_BUCK2DVS(x) (MAX8997_REG_BUCK2DVS1 + (x) - 1) | 315 | #define MAX8997_REG_BUCK2DVS(x) (MAX8997_REG_BUCK2DVS1 + (x) - 1) |
314 | #define MAX8997_REG_BUCK5DVS(x) (MAX8997_REG_BUCK5DVS1 + (x) - 1) | 316 | #define MAX8997_REG_BUCK5DVS(x) (MAX8997_REG_BUCK5DVS1 + (x) - 1) |
315 | 317 | ||
318 | #define MAX8997_NUM_GPIO 12 | ||
316 | struct max8997_dev { | 319 | struct max8997_dev { |
317 | struct device *dev; | 320 | struct device *dev; |
318 | struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */ | 321 | struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */ |
@@ -324,11 +327,19 @@ struct max8997_dev { | |||
324 | int type; | 327 | int type; |
325 | struct platform_device *battery; /* battery control (not fuel gauge) */ | 328 | struct platform_device *battery; /* battery control (not fuel gauge) */ |
326 | 329 | ||
330 | int irq; | ||
331 | int ono; | ||
332 | int irq_base; | ||
327 | bool wakeup; | 333 | bool wakeup; |
334 | struct mutex irqlock; | ||
335 | int irq_masks_cur[MAX8997_IRQ_GROUP_NR]; | ||
336 | int irq_masks_cache[MAX8997_IRQ_GROUP_NR]; | ||
328 | 337 | ||
329 | /* For hibernation */ | 338 | /* For hibernation */ |
330 | u8 reg_dump[MAX8997_REG_PMIC_END + MAX8997_MUIC_REG_END + | 339 | u8 reg_dump[MAX8997_REG_PMIC_END + MAX8997_MUIC_REG_END + |
331 | MAX8997_HAPTIC_REG_END]; | 340 | MAX8997_HAPTIC_REG_END]; |
341 | |||
342 | bool gpio_status[MAX8997_NUM_GPIO]; | ||
332 | }; | 343 | }; |
333 | 344 | ||
334 | enum max8997_types { | 345 | enum max8997_types { |
@@ -336,6 +347,10 @@ enum max8997_types { | |||
336 | TYPE_MAX8966, | 347 | TYPE_MAX8966, |
337 | }; | 348 | }; |
338 | 349 | ||
350 | extern int max8997_irq_init(struct max8997_dev *max8997); | ||
351 | extern void max8997_irq_exit(struct max8997_dev *max8997); | ||
352 | extern int max8997_irq_resume(struct max8997_dev *max8997); | ||
353 | |||
339 | extern int max8997_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest); | 354 | extern int max8997_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest); |
340 | extern int max8997_bulk_read(struct i2c_client *i2c, u8 reg, int count, | 355 | extern int max8997_bulk_read(struct i2c_client *i2c, u8 reg, int count, |
341 | u8 *buf); | 356 | u8 *buf); |
@@ -344,4 +359,10 @@ extern int max8997_bulk_write(struct i2c_client *i2c, u8 reg, int count, | |||
344 | u8 *buf); | 359 | u8 *buf); |
345 | extern int max8997_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask); | 360 | extern int max8997_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask); |
346 | 361 | ||
362 | #define MAX8997_GPIO_INT_BOTH (0x3 << 4) | ||
363 | #define MAX8997_GPIO_INT_RISE (0x2 << 4) | ||
364 | #define MAX8997_GPIO_INT_FALL (0x1 << 4) | ||
365 | |||
366 | #define MAX8997_GPIO_INT_MASK (0x3 << 4) | ||
367 | #define MAX8997_GPIO_DATA_MASK (0x1 << 2) | ||
347 | #endif /* __LINUX_MFD_MAX8997_PRIV_H */ | 368 | #endif /* __LINUX_MFD_MAX8997_PRIV_H */ |
diff --git a/include/linux/mfd/max8997.h b/include/linux/mfd/max8997.h index cb671b3451bf..60931d089422 100644 --- a/include/linux/mfd/max8997.h +++ b/include/linux/mfd/max8997.h | |||
@@ -78,8 +78,11 @@ struct max8997_regulator_data { | |||
78 | }; | 78 | }; |
79 | 79 | ||
80 | struct max8997_platform_data { | 80 | struct max8997_platform_data { |
81 | bool wakeup; | 81 | /* IRQ */ |
82 | /* IRQ: Not implemented */ | 82 | int irq_base; |
83 | int ono; | ||
84 | int wakeup; | ||
85 | |||
83 | /* ---- PMIC ---- */ | 86 | /* ---- PMIC ---- */ |
84 | struct max8997_regulator_data *regulators; | 87 | struct max8997_regulator_data *regulators; |
85 | int num_regulators; | 88 | int num_regulators; |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 049214642036..8985768e2c0d 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -39,6 +39,11 @@ | |||
39 | 39 | ||
40 | #include <asm/atomic.h> | 40 | #include <asm/atomic.h> |
41 | 41 | ||
42 | #define MAX_MSIX_P_PORT 17 | ||
43 | #define MAX_MSIX 64 | ||
44 | #define MSIX_LEGACY_SZ 4 | ||
45 | #define MIN_MSIX_P_PORT 5 | ||
46 | |||
42 | enum { | 47 | enum { |
43 | MLX4_FLAG_MSI_X = 1 << 0, | 48 | MLX4_FLAG_MSI_X = 1 << 0, |
44 | MLX4_FLAG_OLD_PORT_CMDS = 1 << 1, | 49 | MLX4_FLAG_OLD_PORT_CMDS = 1 << 1, |
@@ -145,8 +150,10 @@ enum { | |||
145 | }; | 150 | }; |
146 | 151 | ||
147 | enum mlx4_protocol { | 152 | enum mlx4_protocol { |
148 | MLX4_PROTOCOL_IB, | 153 | MLX4_PROT_IB_IPV6 = 0, |
149 | MLX4_PROTOCOL_EN, | 154 | MLX4_PROT_ETH, |
155 | MLX4_PROT_IB_IPV4, | ||
156 | MLX4_PROT_FCOE | ||
150 | }; | 157 | }; |
151 | 158 | ||
152 | enum { | 159 | enum { |
@@ -173,6 +180,12 @@ enum mlx4_special_vlan_idx { | |||
173 | MLX4_VLAN_REGULAR | 180 | MLX4_VLAN_REGULAR |
174 | }; | 181 | }; |
175 | 182 | ||
183 | enum mlx4_steer_type { | ||
184 | MLX4_MC_STEER = 0, | ||
185 | MLX4_UC_STEER, | ||
186 | MLX4_NUM_STEERS | ||
187 | }; | ||
188 | |||
176 | enum { | 189 | enum { |
177 | MLX4_NUM_FEXCH = 64 * 1024, | 190 | MLX4_NUM_FEXCH = 64 * 1024, |
178 | }; | 191 | }; |
@@ -223,6 +236,7 @@ struct mlx4_caps { | |||
223 | int num_eqs; | 236 | int num_eqs; |
224 | int reserved_eqs; | 237 | int reserved_eqs; |
225 | int num_comp_vectors; | 238 | int num_comp_vectors; |
239 | int comp_pool; | ||
226 | int num_mpts; | 240 | int num_mpts; |
227 | int num_mtt_segs; | 241 | int num_mtt_segs; |
228 | int mtts_per_seg; | 242 | int mtts_per_seg; |
@@ -245,6 +259,9 @@ struct mlx4_caps { | |||
245 | u16 stat_rate_support; | 259 | u16 stat_rate_support; |
246 | int udp_rss; | 260 | int udp_rss; |
247 | int loopback_support; | 261 | int loopback_support; |
262 | int vep_uc_steering; | ||
263 | int vep_mc_steering; | ||
264 | int wol; | ||
248 | u8 port_width_cap[MLX4_MAX_PORTS + 1]; | 265 | u8 port_width_cap[MLX4_MAX_PORTS + 1]; |
249 | int max_gso_sz; | 266 | int max_gso_sz; |
250 | int reserved_qps_cnt[MLX4_NUM_QP_REGION]; | 267 | int reserved_qps_cnt[MLX4_NUM_QP_REGION]; |
@@ -334,6 +351,17 @@ struct mlx4_fmr { | |||
334 | struct mlx4_uar { | 351 | struct mlx4_uar { |
335 | unsigned long pfn; | 352 | unsigned long pfn; |
336 | int index; | 353 | int index; |
354 | struct list_head bf_list; | ||
355 | unsigned free_bf_bmap; | ||
356 | void __iomem *map; | ||
357 | void __iomem *bf_map; | ||
358 | }; | ||
359 | |||
360 | struct mlx4_bf { | ||
361 | unsigned long offset; | ||
362 | int buf_size; | ||
363 | struct mlx4_uar *uar; | ||
364 | void __iomem *reg; | ||
337 | }; | 365 | }; |
338 | 366 | ||
339 | struct mlx4_cq { | 367 | struct mlx4_cq { |
@@ -415,7 +443,7 @@ struct mlx4_dev { | |||
415 | unsigned long flags; | 443 | unsigned long flags; |
416 | struct mlx4_caps caps; | 444 | struct mlx4_caps caps; |
417 | struct radix_tree_root qp_table_tree; | 445 | struct radix_tree_root qp_table_tree; |
418 | u32 rev_id; | 446 | u8 rev_id; |
419 | char board_id[MLX4_BOARD_ID_LEN]; | 447 | char board_id[MLX4_BOARD_ID_LEN]; |
420 | }; | 448 | }; |
421 | 449 | ||
@@ -461,6 +489,8 @@ void mlx4_pd_free(struct mlx4_dev *dev, u32 pdn); | |||
461 | 489 | ||
462 | int mlx4_uar_alloc(struct mlx4_dev *dev, struct mlx4_uar *uar); | 490 | int mlx4_uar_alloc(struct mlx4_dev *dev, struct mlx4_uar *uar); |
463 | void mlx4_uar_free(struct mlx4_dev *dev, struct mlx4_uar *uar); | 491 | void mlx4_uar_free(struct mlx4_dev *dev, struct mlx4_uar *uar); |
492 | int mlx4_bf_alloc(struct mlx4_dev *dev, struct mlx4_bf *bf); | ||
493 | void mlx4_bf_free(struct mlx4_dev *dev, struct mlx4_bf *bf); | ||
464 | 494 | ||
465 | int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift, | 495 | int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift, |
466 | struct mlx4_mtt *mtt); | 496 | struct mlx4_mtt *mtt); |
@@ -508,9 +538,15 @@ int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | |||
508 | int block_mcast_loopback, enum mlx4_protocol protocol); | 538 | int block_mcast_loopback, enum mlx4_protocol protocol); |
509 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | 539 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], |
510 | enum mlx4_protocol protocol); | 540 | enum mlx4_protocol protocol); |
541 | int mlx4_multicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); | ||
542 | int mlx4_multicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); | ||
543 | int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); | ||
544 | int mlx4_unicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); | ||
545 | int mlx4_SET_MCAST_FLTR(struct mlx4_dev *dev, u8 port, u64 mac, u64 clear, u8 mode); | ||
511 | 546 | ||
512 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index); | 547 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn, u8 wrap); |
513 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index); | 548 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int qpn); |
549 | int mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac, u8 wrap); | ||
514 | 550 | ||
515 | int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); | 551 | int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); |
516 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); | 552 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); |
@@ -526,5 +562,10 @@ void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr, | |||
526 | int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr); | 562 | int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr); |
527 | int mlx4_SYNC_TPT(struct mlx4_dev *dev); | 563 | int mlx4_SYNC_TPT(struct mlx4_dev *dev); |
528 | int mlx4_test_interrupts(struct mlx4_dev *dev); | 564 | int mlx4_test_interrupts(struct mlx4_dev *dev); |
565 | int mlx4_assign_eq(struct mlx4_dev *dev, char* name , int* vector); | ||
566 | void mlx4_release_eq(struct mlx4_dev *dev, int vec); | ||
567 | |||
568 | int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port); | ||
569 | int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port); | ||
529 | 570 | ||
530 | #endif /* MLX4_DEVICE_H */ | 571 | #endif /* MLX4_DEVICE_H */ |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 0eeb2a1a867c..9e9eb21056ca 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -303,6 +303,7 @@ struct mlx4_wqe_data_seg { | |||
303 | 303 | ||
304 | enum { | 304 | enum { |
305 | MLX4_INLINE_ALIGN = 64, | 305 | MLX4_INLINE_ALIGN = 64, |
306 | MLX4_INLINE_SEG = 1 << 31, | ||
306 | }; | 307 | }; |
307 | 308 | ||
308 | struct mlx4_wqe_inline_seg { | 309 | struct mlx4_wqe_inline_seg { |
diff --git a/include/linux/mtd/blktrans.h b/include/linux/mtd/blktrans.h index 26529ebd59cc..1bbd9f289245 100644 --- a/include/linux/mtd/blktrans.h +++ b/include/linux/mtd/blktrans.h | |||
@@ -36,6 +36,7 @@ struct mtd_blktrans_dev { | |||
36 | struct mtd_info *mtd; | 36 | struct mtd_info *mtd; |
37 | struct mutex lock; | 37 | struct mutex lock; |
38 | int devnum; | 38 | int devnum; |
39 | bool bg_stop; | ||
39 | unsigned long size; | 40 | unsigned long size; |
40 | int readonly; | 41 | int readonly; |
41 | int open; | 42 | int open; |
@@ -62,6 +63,7 @@ struct mtd_blktrans_ops { | |||
62 | unsigned long block, char *buffer); | 63 | unsigned long block, char *buffer); |
63 | int (*discard)(struct mtd_blktrans_dev *dev, | 64 | int (*discard)(struct mtd_blktrans_dev *dev, |
64 | unsigned long block, unsigned nr_blocks); | 65 | unsigned long block, unsigned nr_blocks); |
66 | void (*background)(struct mtd_blktrans_dev *dev); | ||
65 | 67 | ||
66 | /* Block layer ioctls */ | 68 | /* Block layer ioctls */ |
67 | int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo); | 69 | int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo); |
@@ -85,6 +87,7 @@ extern int register_mtd_blktrans(struct mtd_blktrans_ops *tr); | |||
85 | extern int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr); | 87 | extern int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr); |
86 | extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); | 88 | extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); |
87 | extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); | 89 | extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); |
90 | extern int mtd_blktrans_cease_background(struct mtd_blktrans_dev *dev); | ||
88 | 91 | ||
89 | 92 | ||
90 | #endif /* __MTD_TRANS_H__ */ | 93 | #endif /* __MTD_TRANS_H__ */ |
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index a9baee6864af..0d823f2dd667 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
@@ -535,6 +535,7 @@ struct cfi_fixup { | |||
535 | #define CFI_MFR_CONTINUATION 0x007F | 535 | #define CFI_MFR_CONTINUATION 0x007F |
536 | 536 | ||
537 | #define CFI_MFR_AMD 0x0001 | 537 | #define CFI_MFR_AMD 0x0001 |
538 | #define CFI_MFR_AMIC 0x0037 | ||
538 | #define CFI_MFR_ATMEL 0x001F | 539 | #define CFI_MFR_ATMEL 0x001F |
539 | #define CFI_MFR_EON 0x001C | 540 | #define CFI_MFR_EON 0x001C |
540 | #define CFI_MFR_FUJITSU 0x0004 | 541 | #define CFI_MFR_FUJITSU 0x0004 |
diff --git a/include/linux/mtd/latch-addr-flash.h b/include/linux/mtd/latch-addr-flash.h new file mode 100644 index 000000000000..e94b8e128074 --- /dev/null +++ b/include/linux/mtd/latch-addr-flash.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * Interface for NOR flash driver whose high address lines are latched | ||
3 | * | ||
4 | * Copyright © 2008 MontaVista Software, Inc. <source@mvista.com> | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public License | ||
7 | * version 2. This program is licensed "as is" without any warranty of any | ||
8 | * kind, whether express or implied. | ||
9 | */ | ||
10 | #ifndef __LATCH_ADDR_FLASH__ | ||
11 | #define __LATCH_ADDR_FLASH__ | ||
12 | |||
13 | struct map_info; | ||
14 | struct mtd_partition; | ||
15 | |||
16 | struct latch_addr_flash_data { | ||
17 | unsigned int width; | ||
18 | unsigned int size; | ||
19 | |||
20 | int (*init)(void *data, int cs); | ||
21 | void (*done)(void *data); | ||
22 | void (*set_window)(unsigned long offset, void *data); | ||
23 | void *data; | ||
24 | |||
25 | unsigned int nr_parts; | ||
26 | struct mtd_partition *parts; | ||
27 | }; | ||
28 | |||
29 | #endif | ||
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 1f489b247a29..ae67ef56a8f5 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -140,6 +140,7 @@ typedef enum { | |||
140 | NAND_ECC_HW, | 140 | NAND_ECC_HW, |
141 | NAND_ECC_HW_SYNDROME, | 141 | NAND_ECC_HW_SYNDROME, |
142 | NAND_ECC_HW_OOB_FIRST, | 142 | NAND_ECC_HW_OOB_FIRST, |
143 | NAND_ECC_SOFT_BCH, | ||
143 | } nand_ecc_modes_t; | 144 | } nand_ecc_modes_t; |
144 | 145 | ||
145 | /* | 146 | /* |
@@ -339,6 +340,7 @@ struct nand_hw_control { | |||
339 | * @prepad: padding information for syndrome based ecc generators | 340 | * @prepad: padding information for syndrome based ecc generators |
340 | * @postpad: padding information for syndrome based ecc generators | 341 | * @postpad: padding information for syndrome based ecc generators |
341 | * @layout: ECC layout control struct pointer | 342 | * @layout: ECC layout control struct pointer |
343 | * @priv: pointer to private ecc control data | ||
342 | * @hwctl: function to control hardware ecc generator. Must only | 344 | * @hwctl: function to control hardware ecc generator. Must only |
343 | * be provided if an hardware ECC is available | 345 | * be provided if an hardware ECC is available |
344 | * @calculate: function for ecc calculation or readback from ecc hardware | 346 | * @calculate: function for ecc calculation or readback from ecc hardware |
@@ -362,6 +364,7 @@ struct nand_ecc_ctrl { | |||
362 | int prepad; | 364 | int prepad; |
363 | int postpad; | 365 | int postpad; |
364 | struct nand_ecclayout *layout; | 366 | struct nand_ecclayout *layout; |
367 | void *priv; | ||
365 | void (*hwctl)(struct mtd_info *mtd, int mode); | 368 | void (*hwctl)(struct mtd_info *mtd, int mode); |
366 | int (*calculate)(struct mtd_info *mtd, const uint8_t *dat, | 369 | int (*calculate)(struct mtd_info *mtd, const uint8_t *dat, |
367 | uint8_t *ecc_code); | 370 | uint8_t *ecc_code); |
diff --git a/include/linux/mtd/nand_bch.h b/include/linux/mtd/nand_bch.h new file mode 100644 index 000000000000..74acf5367556 --- /dev/null +++ b/include/linux/mtd/nand_bch.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * Copyright © 2011 Ivan Djelic <ivan.djelic@parrot.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * This file is the header for the NAND BCH ECC implementation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __MTD_NAND_BCH_H__ | ||
12 | #define __MTD_NAND_BCH_H__ | ||
13 | |||
14 | struct mtd_info; | ||
15 | struct nand_bch_control; | ||
16 | |||
17 | #if defined(CONFIG_MTD_NAND_ECC_BCH) | ||
18 | |||
19 | static inline int mtd_nand_has_bch(void) { return 1; } | ||
20 | |||
21 | /* | ||
22 | * Calculate BCH ecc code | ||
23 | */ | ||
24 | int nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat, | ||
25 | u_char *ecc_code); | ||
26 | |||
27 | /* | ||
28 | * Detect and correct bit errors | ||
29 | */ | ||
30 | int nand_bch_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, | ||
31 | u_char *calc_ecc); | ||
32 | /* | ||
33 | * Initialize BCH encoder/decoder | ||
34 | */ | ||
35 | struct nand_bch_control * | ||
36 | nand_bch_init(struct mtd_info *mtd, unsigned int eccsize, | ||
37 | unsigned int eccbytes, struct nand_ecclayout **ecclayout); | ||
38 | /* | ||
39 | * Release BCH encoder/decoder resources | ||
40 | */ | ||
41 | void nand_bch_free(struct nand_bch_control *nbc); | ||
42 | |||
43 | #else /* !CONFIG_MTD_NAND_ECC_BCH */ | ||
44 | |||
45 | static inline int mtd_nand_has_bch(void) { return 0; } | ||
46 | |||
47 | static inline int | ||
48 | nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat, | ||
49 | u_char *ecc_code) | ||
50 | { | ||
51 | return -1; | ||
52 | } | ||
53 | |||
54 | static inline int | ||
55 | nand_bch_correct_data(struct mtd_info *mtd, unsigned char *buf, | ||
56 | unsigned char *read_ecc, unsigned char *calc_ecc) | ||
57 | { | ||
58 | return -1; | ||
59 | } | ||
60 | |||
61 | static inline struct nand_bch_control * | ||
62 | nand_bch_init(struct mtd_info *mtd, unsigned int eccsize, | ||
63 | unsigned int eccbytes, struct nand_ecclayout **ecclayout) | ||
64 | { | ||
65 | return NULL; | ||
66 | } | ||
67 | |||
68 | static inline void nand_bch_free(struct nand_bch_control *nbc) {} | ||
69 | |||
70 | #endif /* CONFIG_MTD_NAND_ECC_BCH */ | ||
71 | |||
72 | #endif /* __MTD_NAND_BCH_H__ */ | ||
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index ae418e41d8f5..52b6f187bf49 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -198,6 +198,7 @@ struct onenand_chip { | |||
198 | #define ONENAND_SKIP_UNLOCK_CHECK (0x0100) | 198 | #define ONENAND_SKIP_UNLOCK_CHECK (0x0100) |
199 | #define ONENAND_PAGEBUF_ALLOC (0x1000) | 199 | #define ONENAND_PAGEBUF_ALLOC (0x1000) |
200 | #define ONENAND_OOBBUF_ALLOC (0x2000) | 200 | #define ONENAND_OOBBUF_ALLOC (0x2000) |
201 | #define ONENAND_SKIP_INITIAL_UNLOCKING (0x4000) | ||
201 | 202 | ||
202 | #define ONENAND_IS_4KB_PAGE(this) \ | 203 | #define ONENAND_IS_4KB_PAGE(this) \ |
203 | (this->options & ONENAND_HAS_4KB_PAGE) | 204 | (this->options & ONENAND_HAS_4KB_PAGE) |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 134716e5e350..b528f6d4b860 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -550,6 +550,7 @@ enum { | |||
550 | NFSPROC4_CLNT_SETACL, | 550 | NFSPROC4_CLNT_SETACL, |
551 | NFSPROC4_CLNT_FS_LOCATIONS, | 551 | NFSPROC4_CLNT_FS_LOCATIONS, |
552 | NFSPROC4_CLNT_RELEASE_LOCKOWNER, | 552 | NFSPROC4_CLNT_RELEASE_LOCKOWNER, |
553 | NFSPROC4_CLNT_SECINFO, | ||
553 | 554 | ||
554 | /* nfs41 */ | 555 | /* nfs41 */ |
555 | NFSPROC4_CLNT_EXCHANGE_ID, | 556 | NFSPROC4_CLNT_EXCHANGE_ID, |
@@ -560,6 +561,7 @@ enum { | |||
560 | NFSPROC4_CLNT_RECLAIM_COMPLETE, | 561 | NFSPROC4_CLNT_RECLAIM_COMPLETE, |
561 | NFSPROC4_CLNT_LAYOUTGET, | 562 | NFSPROC4_CLNT_LAYOUTGET, |
562 | NFSPROC4_CLNT_GETDEVICEINFO, | 563 | NFSPROC4_CLNT_GETDEVICEINFO, |
564 | NFSPROC4_CLNT_LAYOUTCOMMIT, | ||
563 | }; | 565 | }; |
564 | 566 | ||
565 | /* nfs41 types */ | 567 | /* nfs41 types */ |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index f88522b10a38..1b93b9c60e55 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -33,6 +33,8 @@ | |||
33 | #define FLUSH_STABLE 4 /* commit to stable storage */ | 33 | #define FLUSH_STABLE 4 /* commit to stable storage */ |
34 | #define FLUSH_LOWPRI 8 /* low priority background flush */ | 34 | #define FLUSH_LOWPRI 8 /* low priority background flush */ |
35 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ | 35 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ |
36 | #define FLUSH_COND_STABLE 32 /* conditional stable write - only stable | ||
37 | * if everything fits in one RPC */ | ||
36 | 38 | ||
37 | #ifdef __KERNEL__ | 39 | #ifdef __KERNEL__ |
38 | 40 | ||
@@ -93,8 +95,13 @@ struct nfs_open_context { | |||
93 | int error; | 95 | int error; |
94 | 96 | ||
95 | struct list_head list; | 97 | struct list_head list; |
98 | }; | ||
96 | 99 | ||
100 | struct nfs_open_dir_context { | ||
101 | struct rpc_cred *cred; | ||
97 | __u64 dir_cookie; | 102 | __u64 dir_cookie; |
103 | __u64 dup_cookie; | ||
104 | int duped; | ||
98 | }; | 105 | }; |
99 | 106 | ||
100 | /* | 107 | /* |
@@ -191,6 +198,7 @@ struct nfs_inode { | |||
191 | 198 | ||
192 | /* pNFS layout information */ | 199 | /* pNFS layout information */ |
193 | struct pnfs_layout_hdr *layout; | 200 | struct pnfs_layout_hdr *layout; |
201 | atomic_t commits_outstanding; | ||
194 | #endif /* CONFIG_NFS_V4*/ | 202 | #endif /* CONFIG_NFS_V4*/ |
195 | #ifdef CONFIG_NFS_FSCACHE | 203 | #ifdef CONFIG_NFS_FSCACHE |
196 | struct fscache_cookie *fscache; | 204 | struct fscache_cookie *fscache; |
@@ -219,6 +227,8 @@ struct nfs_inode { | |||
219 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ | 227 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ |
220 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ | 228 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ |
221 | #define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ | 229 | #define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ |
230 | #define NFS_INO_PNFS_COMMIT (8) /* use pnfs code for commit */ | ||
231 | #define NFS_INO_LAYOUTCOMMIT (9) /* layoutcommit required */ | ||
222 | 232 | ||
223 | static inline struct nfs_inode *NFS_I(const struct inode *inode) | 233 | static inline struct nfs_inode *NFS_I(const struct inode *inode) |
224 | { | 234 | { |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 90907ada6d52..91af2e49fa3a 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
@@ -33,11 +33,15 @@ enum { | |||
33 | PG_CLEAN, | 33 | PG_CLEAN, |
34 | PG_NEED_COMMIT, | 34 | PG_NEED_COMMIT, |
35 | PG_NEED_RESCHED, | 35 | PG_NEED_RESCHED, |
36 | PG_PNFS_COMMIT, | ||
36 | }; | 37 | }; |
37 | 38 | ||
38 | struct nfs_inode; | 39 | struct nfs_inode; |
39 | struct nfs_page { | 40 | struct nfs_page { |
40 | struct list_head wb_list; /* Defines state of page: */ | 41 | union { |
42 | struct list_head wb_list; /* Defines state of page: */ | ||
43 | struct pnfs_layout_segment *wb_commit_lseg; /* Used when PG_PNFS_COMMIT set */ | ||
44 | }; | ||
41 | struct page *wb_page; /* page to read in/write out */ | 45 | struct page *wb_page; /* page to read in/write out */ |
42 | struct nfs_open_context *wb_context; /* File state context info */ | 46 | struct nfs_open_context *wb_context; /* File state context info */ |
43 | struct nfs_lock_context *wb_lock_context; /* lock context info */ | 47 | struct nfs_lock_context *wb_lock_context; /* lock context info */ |
@@ -57,6 +61,7 @@ struct nfs_pageio_descriptor { | |||
57 | size_t pg_count; | 61 | size_t pg_count; |
58 | size_t pg_bsize; | 62 | size_t pg_bsize; |
59 | unsigned int pg_base; | 63 | unsigned int pg_base; |
64 | char pg_moreio; | ||
60 | 65 | ||
61 | struct inode *pg_inode; | 66 | struct inode *pg_inode; |
62 | int (*pg_doio)(struct nfs_pageio_descriptor *); | 67 | int (*pg_doio)(struct nfs_pageio_descriptor *); |
@@ -73,7 +78,6 @@ extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx, | |||
73 | struct page *page, | 78 | struct page *page, |
74 | unsigned int offset, | 79 | unsigned int offset, |
75 | unsigned int count); | 80 | unsigned int count); |
76 | extern void nfs_clear_request(struct nfs_page *req); | ||
77 | extern void nfs_release_request(struct nfs_page *req); | 81 | extern void nfs_release_request(struct nfs_page *req); |
78 | 82 | ||
79 | 83 | ||
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 2c2c67d2eb42..78b101e487ea 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/nfsacl.h> | 4 | #include <linux/nfsacl.h> |
5 | #include <linux/nfs3.h> | 5 | #include <linux/nfs3.h> |
6 | #include <linux/sunrpc/gss_api.h> | ||
6 | 7 | ||
7 | /* | 8 | /* |
8 | * To change the maximum rsize and wsize supported by the NFS client, adjust | 9 | * To change the maximum rsize and wsize supported by the NFS client, adjust |
@@ -14,6 +15,9 @@ | |||
14 | #define NFS_DEF_FILE_IO_SIZE (4096U) | 15 | #define NFS_DEF_FILE_IO_SIZE (4096U) |
15 | #define NFS_MIN_FILE_IO_SIZE (1024U) | 16 | #define NFS_MIN_FILE_IO_SIZE (1024U) |
16 | 17 | ||
18 | /* Forward declaration for NFS v3 */ | ||
19 | struct nfs4_secinfo_flavors; | ||
20 | |||
17 | struct nfs_fsid { | 21 | struct nfs_fsid { |
18 | uint64_t major; | 22 | uint64_t major; |
19 | uint64_t minor; | 23 | uint64_t minor; |
@@ -78,6 +82,7 @@ struct nfs_fattr { | |||
78 | #define NFS_ATTR_FATTR_CHANGE (1U << 17) | 82 | #define NFS_ATTR_FATTR_CHANGE (1U << 17) |
79 | #define NFS_ATTR_FATTR_PRECHANGE (1U << 18) | 83 | #define NFS_ATTR_FATTR_PRECHANGE (1U << 18) |
80 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ | 84 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ |
85 | #define NFS_ATTR_FATTR_MOUNTPOINT (1U << 20) /* Treat as mountpoint */ | ||
81 | 86 | ||
82 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ | 87 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ |
83 | | NFS_ATTR_FATTR_MODE \ | 88 | | NFS_ATTR_FATTR_MODE \ |
@@ -190,8 +195,9 @@ struct nfs4_get_lease_time_res { | |||
190 | #define PNFS_LAYOUT_MAXSIZE 4096 | 195 | #define PNFS_LAYOUT_MAXSIZE 4096 |
191 | 196 | ||
192 | struct nfs4_layoutdriver_data { | 197 | struct nfs4_layoutdriver_data { |
198 | struct page **pages; | ||
199 | __u32 pglen; | ||
193 | __u32 len; | 200 | __u32 len; |
194 | void *buf; | ||
195 | }; | 201 | }; |
196 | 202 | ||
197 | struct pnfs_layout_range { | 203 | struct pnfs_layout_range { |
@@ -209,6 +215,7 @@ struct nfs4_layoutget_args { | |||
209 | struct nfs_open_context *ctx; | 215 | struct nfs_open_context *ctx; |
210 | struct nfs4_sequence_args seq_args; | 216 | struct nfs4_sequence_args seq_args; |
211 | nfs4_stateid stateid; | 217 | nfs4_stateid stateid; |
218 | struct nfs4_layoutdriver_data layout; | ||
212 | }; | 219 | }; |
213 | 220 | ||
214 | struct nfs4_layoutget_res { | 221 | struct nfs4_layoutget_res { |
@@ -216,8 +223,8 @@ struct nfs4_layoutget_res { | |||
216 | struct pnfs_layout_range range; | 223 | struct pnfs_layout_range range; |
217 | __u32 type; | 224 | __u32 type; |
218 | nfs4_stateid stateid; | 225 | nfs4_stateid stateid; |
219 | struct nfs4_layoutdriver_data layout; | ||
220 | struct nfs4_sequence_res seq_res; | 226 | struct nfs4_sequence_res seq_res; |
227 | struct nfs4_layoutdriver_data *layoutp; | ||
221 | }; | 228 | }; |
222 | 229 | ||
223 | struct nfs4_layoutget { | 230 | struct nfs4_layoutget { |
@@ -236,6 +243,29 @@ struct nfs4_getdeviceinfo_res { | |||
236 | struct nfs4_sequence_res seq_res; | 243 | struct nfs4_sequence_res seq_res; |
237 | }; | 244 | }; |
238 | 245 | ||
246 | struct nfs4_layoutcommit_args { | ||
247 | nfs4_stateid stateid; | ||
248 | __u64 lastbytewritten; | ||
249 | struct inode *inode; | ||
250 | const u32 *bitmask; | ||
251 | struct nfs4_sequence_args seq_args; | ||
252 | }; | ||
253 | |||
254 | struct nfs4_layoutcommit_res { | ||
255 | struct nfs_fattr *fattr; | ||
256 | const struct nfs_server *server; | ||
257 | struct nfs4_sequence_res seq_res; | ||
258 | }; | ||
259 | |||
260 | struct nfs4_layoutcommit_data { | ||
261 | struct rpc_task task; | ||
262 | struct nfs_fattr fattr; | ||
263 | struct pnfs_layout_segment *lseg; | ||
264 | struct rpc_cred *cred; | ||
265 | struct nfs4_layoutcommit_args args; | ||
266 | struct nfs4_layoutcommit_res res; | ||
267 | }; | ||
268 | |||
239 | /* | 269 | /* |
240 | * Arguments to the open call. | 270 | * Arguments to the open call. |
241 | */ | 271 | */ |
@@ -936,6 +966,38 @@ struct nfs4_fs_locations_res { | |||
936 | struct nfs4_sequence_res seq_res; | 966 | struct nfs4_sequence_res seq_res; |
937 | }; | 967 | }; |
938 | 968 | ||
969 | struct nfs4_secinfo_oid { | ||
970 | unsigned int len; | ||
971 | char data[GSS_OID_MAX_LEN]; | ||
972 | }; | ||
973 | |||
974 | struct nfs4_secinfo_gss { | ||
975 | struct nfs4_secinfo_oid sec_oid4; | ||
976 | unsigned int qop4; | ||
977 | unsigned int service; | ||
978 | }; | ||
979 | |||
980 | struct nfs4_secinfo_flavor { | ||
981 | unsigned int flavor; | ||
982 | struct nfs4_secinfo_gss gss; | ||
983 | }; | ||
984 | |||
985 | struct nfs4_secinfo_flavors { | ||
986 | unsigned int num_flavors; | ||
987 | struct nfs4_secinfo_flavor flavors[0]; | ||
988 | }; | ||
989 | |||
990 | struct nfs4_secinfo_arg { | ||
991 | const struct nfs_fh *dir_fh; | ||
992 | const struct qstr *name; | ||
993 | struct nfs4_sequence_args seq_args; | ||
994 | }; | ||
995 | |||
996 | struct nfs4_secinfo_res { | ||
997 | struct nfs4_secinfo_flavors *flavors; | ||
998 | struct nfs4_sequence_res seq_res; | ||
999 | }; | ||
1000 | |||
939 | #endif /* CONFIG_NFS_V4 */ | 1001 | #endif /* CONFIG_NFS_V4 */ |
940 | 1002 | ||
941 | struct nfstime4 { | 1003 | struct nfstime4 { |
@@ -1040,6 +1102,7 @@ struct nfs_write_data { | |||
1040 | struct nfs_writeres res; /* result struct */ | 1102 | struct nfs_writeres res; /* result struct */ |
1041 | struct pnfs_layout_segment *lseg; | 1103 | struct pnfs_layout_segment *lseg; |
1042 | struct nfs_client *ds_clp; /* pNFS data server */ | 1104 | struct nfs_client *ds_clp; /* pNFS data server */ |
1105 | int ds_commit_index; | ||
1043 | const struct rpc_call_ops *mds_ops; | 1106 | const struct rpc_call_ops *mds_ops; |
1044 | int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data); | 1107 | int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data); |
1045 | #ifdef CONFIG_NFS_V4 | 1108 | #ifdef CONFIG_NFS_V4 |
@@ -1071,7 +1134,7 @@ struct nfs_rpc_ops { | |||
1071 | struct nfs_fattr *); | 1134 | struct nfs_fattr *); |
1072 | int (*setattr) (struct dentry *, struct nfs_fattr *, | 1135 | int (*setattr) (struct dentry *, struct nfs_fattr *, |
1073 | struct iattr *); | 1136 | struct iattr *); |
1074 | int (*lookup) (struct inode *, struct qstr *, | 1137 | int (*lookup) (struct rpc_clnt *clnt, struct inode *, struct qstr *, |
1075 | struct nfs_fh *, struct nfs_fattr *); | 1138 | struct nfs_fh *, struct nfs_fattr *); |
1076 | int (*access) (struct inode *, struct nfs_access_entry *); | 1139 | int (*access) (struct inode *, struct nfs_access_entry *); |
1077 | int (*readlink)(struct inode *, struct page *, unsigned int, | 1140 | int (*readlink)(struct inode *, struct page *, unsigned int, |
@@ -1118,6 +1181,7 @@ struct nfs_rpc_ops { | |||
1118 | struct iattr *iattr); | 1181 | struct iattr *iattr); |
1119 | int (*init_client) (struct nfs_client *, const struct rpc_timeout *, | 1182 | int (*init_client) (struct nfs_client *, const struct rpc_timeout *, |
1120 | const char *, rpc_authflavor_t, int); | 1183 | const char *, rpc_authflavor_t, int); |
1184 | int (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *); | ||
1121 | }; | 1185 | }; |
1122 | 1186 | ||
1123 | /* | 1187 | /* |
diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h index ce6810512c66..67cb3ae38016 100644 --- a/include/linux/pci-aspm.h +++ b/include/linux/pci-aspm.h | |||
@@ -26,6 +26,7 @@ | |||
26 | extern void pcie_aspm_init_link_state(struct pci_dev *pdev); | 26 | extern void pcie_aspm_init_link_state(struct pci_dev *pdev); |
27 | extern void pcie_aspm_exit_link_state(struct pci_dev *pdev); | 27 | extern void pcie_aspm_exit_link_state(struct pci_dev *pdev); |
28 | extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); | 28 | extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); |
29 | extern void pcie_aspm_powersave_config_link(struct pci_dev *pdev); | ||
29 | extern void pci_disable_link_state(struct pci_dev *pdev, int state); | 30 | extern void pci_disable_link_state(struct pci_dev *pdev, int state); |
30 | extern void pcie_clear_aspm(void); | 31 | extern void pcie_clear_aspm(void); |
31 | extern void pcie_no_aspm(void); | 32 | extern void pcie_no_aspm(void); |
@@ -39,6 +40,9 @@ static inline void pcie_aspm_exit_link_state(struct pci_dev *pdev) | |||
39 | static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) | 40 | static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) |
40 | { | 41 | { |
41 | } | 42 | } |
43 | static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev) | ||
44 | { | ||
45 | } | ||
42 | static inline void pci_disable_link_state(struct pci_dev *pdev, int state) | 46 | static inline void pci_disable_link_state(struct pci_dev *pdev, int state) |
43 | { | 47 | { |
44 | } | 48 | } |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 16c9f2e61977..96f70d7e058d 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1002,12 +1002,11 @@ extern bool pcie_ports_auto; | |||
1002 | #endif | 1002 | #endif |
1003 | 1003 | ||
1004 | #ifndef CONFIG_PCIEASPM | 1004 | #ifndef CONFIG_PCIEASPM |
1005 | static inline int pcie_aspm_enabled(void) | 1005 | static inline int pcie_aspm_enabled(void) { return 0; } |
1006 | { | 1006 | static inline bool pcie_aspm_support_enabled(void) { return false; } |
1007 | return 0; | ||
1008 | } | ||
1009 | #else | 1007 | #else |
1010 | extern int pcie_aspm_enabled(void); | 1008 | extern int pcie_aspm_enabled(void); |
1009 | extern bool pcie_aspm_support_enabled(void); | ||
1011 | #endif | 1010 | #endif |
1012 | 1011 | ||
1013 | #ifdef CONFIG_PCIEAER | 1012 | #ifdef CONFIG_PCIEAER |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index f495c0147240..311b4dc785a1 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -938,9 +938,7 @@ struct perf_cpu_context { | |||
938 | struct list_head rotation_list; | 938 | struct list_head rotation_list; |
939 | int jiffies_interval; | 939 | int jiffies_interval; |
940 | struct pmu *active_pmu; | 940 | struct pmu *active_pmu; |
941 | #ifdef CONFIG_CGROUP_PERF | ||
942 | struct perf_cgroup *cgrp; | 941 | struct perf_cgroup *cgrp; |
943 | #endif | ||
944 | }; | 942 | }; |
945 | 943 | ||
946 | struct perf_output_handle { | 944 | struct perf_output_handle { |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 6618216bb973..512e09177e57 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -529,13 +529,19 @@ struct dev_power_domain { | |||
529 | */ | 529 | */ |
530 | 530 | ||
531 | #ifdef CONFIG_PM_SLEEP | 531 | #ifdef CONFIG_PM_SLEEP |
532 | extern void device_pm_lock(void); | 532 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS |
533 | extern int sysdev_suspend(pm_message_t state); | ||
533 | extern int sysdev_resume(void); | 534 | extern int sysdev_resume(void); |
535 | #else | ||
536 | static inline int sysdev_suspend(pm_message_t state) { return 0; } | ||
537 | static inline int sysdev_resume(void) { return 0; } | ||
538 | #endif | ||
539 | |||
540 | extern void device_pm_lock(void); | ||
534 | extern void dpm_resume_noirq(pm_message_t state); | 541 | extern void dpm_resume_noirq(pm_message_t state); |
535 | extern void dpm_resume_end(pm_message_t state); | 542 | extern void dpm_resume_end(pm_message_t state); |
536 | 543 | ||
537 | extern void device_pm_unlock(void); | 544 | extern void device_pm_unlock(void); |
538 | extern int sysdev_suspend(pm_message_t state); | ||
539 | extern int dpm_suspend_noirq(pm_message_t state); | 545 | extern int dpm_suspend_noirq(pm_message_t state); |
540 | extern int dpm_suspend_start(pm_message_t state); | 546 | extern int dpm_suspend_start(pm_message_t state); |
541 | 547 | ||
diff --git a/include/linux/power/bq20z75.h b/include/linux/power/bq20z75.h new file mode 100644 index 000000000000..b0843b68af92 --- /dev/null +++ b/include/linux/power/bq20z75.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * Gas Gauge driver for TI's BQ20Z75 | ||
3 | * | ||
4 | * Copyright (c) 2010, NVIDIA Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __LINUX_POWER_BQ20Z75_H_ | ||
22 | #define __LINUX_POWER_BQ20Z75_H_ | ||
23 | |||
24 | #include <linux/power_supply.h> | ||
25 | #include <linux/types.h> | ||
26 | |||
27 | /** | ||
28 | * struct bq20z75_platform_data - platform data for bq20z75 devices | ||
29 | * @battery_detect: GPIO which is used to detect battery presence | ||
30 | * @battery_detect_present: gpio state when battery is present (0 / 1) | ||
31 | * @i2c_retry_count: # of times to retry on i2c IO failure | ||
32 | */ | ||
33 | struct bq20z75_platform_data { | ||
34 | int battery_detect; | ||
35 | int battery_detect_present; | ||
36 | int i2c_retry_count; | ||
37 | }; | ||
38 | |||
39 | #endif | ||
diff --git a/include/linux/power/bq27x00_battery.h b/include/linux/power/bq27x00_battery.h new file mode 100644 index 000000000000..a857f719bf40 --- /dev/null +++ b/include/linux/power/bq27x00_battery.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef __LINUX_BQ27X00_BATTERY_H__ | ||
2 | #define __LINUX_BQ27X00_BATTERY_H__ | ||
3 | |||
4 | /** | ||
5 | * struct bq27000_plaform_data - Platform data for bq27000 devices | ||
6 | * @name: Name of the battery. If NULL the driver will fallback to "bq27000". | ||
7 | * @read: HDQ read callback. | ||
8 | * This function should provide access to the HDQ bus the battery is | ||
9 | * connected to. | ||
10 | * The first parameter is a pointer to the battery device, the second the | ||
11 | * register to be read. The return value should either be the content of | ||
12 | * the passed register or an error value. | ||
13 | */ | ||
14 | struct bq27000_platform_data { | ||
15 | const char *name; | ||
16 | int (*read)(struct device *dev, unsigned int); | ||
17 | }; | ||
18 | |||
19 | #endif | ||
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 7d7325685c42..204c18dfdc9e 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
@@ -173,6 +173,8 @@ struct power_supply { | |||
173 | char *full_trig_name; | 173 | char *full_trig_name; |
174 | struct led_trigger *online_trig; | 174 | struct led_trigger *online_trig; |
175 | char *online_trig_name; | 175 | char *online_trig_name; |
176 | struct led_trigger *charging_blink_full_solid_trig; | ||
177 | char *charging_blink_full_solid_trig_name; | ||
176 | #endif | 178 | #endif |
177 | }; | 179 | }; |
178 | 180 | ||
@@ -213,4 +215,49 @@ extern void power_supply_unregister(struct power_supply *psy); | |||
213 | /* For APM emulation, think legacy userspace. */ | 215 | /* For APM emulation, think legacy userspace. */ |
214 | extern struct class *power_supply_class; | 216 | extern struct class *power_supply_class; |
215 | 217 | ||
218 | static inline bool power_supply_is_amp_property(enum power_supply_property psp) | ||
219 | { | ||
220 | switch (psp) { | ||
221 | case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN: | ||
222 | case POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN: | ||
223 | case POWER_SUPPLY_PROP_CHARGE_FULL: | ||
224 | case POWER_SUPPLY_PROP_CHARGE_EMPTY: | ||
225 | case POWER_SUPPLY_PROP_CHARGE_NOW: | ||
226 | case POWER_SUPPLY_PROP_CHARGE_AVG: | ||
227 | case POWER_SUPPLY_PROP_CHARGE_COUNTER: | ||
228 | case POWER_SUPPLY_PROP_CURRENT_MAX: | ||
229 | case POWER_SUPPLY_PROP_CURRENT_NOW: | ||
230 | case POWER_SUPPLY_PROP_CURRENT_AVG: | ||
231 | return 1; | ||
232 | default: | ||
233 | break; | ||
234 | } | ||
235 | |||
236 | return 0; | ||
237 | } | ||
238 | |||
239 | static inline bool power_supply_is_watt_property(enum power_supply_property psp) | ||
240 | { | ||
241 | switch (psp) { | ||
242 | case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN: | ||
243 | case POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN: | ||
244 | case POWER_SUPPLY_PROP_ENERGY_FULL: | ||
245 | case POWER_SUPPLY_PROP_ENERGY_EMPTY: | ||
246 | case POWER_SUPPLY_PROP_ENERGY_NOW: | ||
247 | case POWER_SUPPLY_PROP_ENERGY_AVG: | ||
248 | case POWER_SUPPLY_PROP_VOLTAGE_MAX: | ||
249 | case POWER_SUPPLY_PROP_VOLTAGE_MIN: | ||
250 | case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN: | ||
251 | case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: | ||
252 | case POWER_SUPPLY_PROP_VOLTAGE_NOW: | ||
253 | case POWER_SUPPLY_PROP_VOLTAGE_AVG: | ||
254 | case POWER_SUPPLY_PROP_POWER_NOW: | ||
255 | return 1; | ||
256 | default: | ||
257 | break; | ||
258 | } | ||
259 | |||
260 | return 0; | ||
261 | } | ||
262 | |||
216 | #endif /* __LINUX_POWER_SUPPLY_H__ */ | 263 | #endif /* __LINUX_POWER_SUPPLY_H__ */ |
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index 6a210f1511fc..76579f964a29 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * License Terms: GNU General Public License v2 | 4 | * License Terms: GNU General Public License v2 |
5 | * | 5 | * |
6 | * Author: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson | 6 | * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson |
7 | * | 7 | * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef __LINUX_MFD_AB8500_REGULATOR_H | 10 | #ifndef __LINUX_MFD_AB8500_REGULATOR_H |
@@ -17,6 +17,7 @@ enum ab8500_regulator_id { | |||
17 | AB8500_LDO_AUX3, | 17 | AB8500_LDO_AUX3, |
18 | AB8500_LDO_INTCORE, | 18 | AB8500_LDO_INTCORE, |
19 | AB8500_LDO_TVOUT, | 19 | AB8500_LDO_TVOUT, |
20 | AB8500_LDO_USB, | ||
20 | AB8500_LDO_AUDIO, | 21 | AB8500_LDO_AUDIO, |
21 | AB8500_LDO_ANAMIC1, | 22 | AB8500_LDO_ANAMIC1, |
22 | AB8500_LDO_ANAMIC2, | 23 | AB8500_LDO_ANAMIC2, |
@@ -24,4 +25,50 @@ enum ab8500_regulator_id { | |||
24 | AB8500_LDO_ANA, | 25 | AB8500_LDO_ANA, |
25 | AB8500_NUM_REGULATORS, | 26 | AB8500_NUM_REGULATORS, |
26 | }; | 27 | }; |
28 | |||
29 | /* AB8500 register initialization */ | ||
30 | struct ab8500_regulator_reg_init { | ||
31 | int id; | ||
32 | u8 value; | ||
33 | }; | ||
34 | |||
35 | #define INIT_REGULATOR_REGISTER(_id, _value) \ | ||
36 | { \ | ||
37 | .id = _id, \ | ||
38 | .value = _value, \ | ||
39 | } | ||
40 | |||
41 | /* AB8500 registers */ | ||
42 | enum ab8500_regulator_reg { | ||
43 | AB8500_REGUREQUESTCTRL2, | ||
44 | AB8500_REGUREQUESTCTRL3, | ||
45 | AB8500_REGUREQUESTCTRL4, | ||
46 | AB8500_REGUSYSCLKREQ1HPVALID1, | ||
47 | AB8500_REGUSYSCLKREQ1HPVALID2, | ||
48 | AB8500_REGUHWHPREQ1VALID1, | ||
49 | AB8500_REGUHWHPREQ1VALID2, | ||
50 | AB8500_REGUHWHPREQ2VALID1, | ||
51 | AB8500_REGUHWHPREQ2VALID2, | ||
52 | AB8500_REGUSWHPREQVALID1, | ||
53 | AB8500_REGUSWHPREQVALID2, | ||
54 | AB8500_REGUSYSCLKREQVALID1, | ||
55 | AB8500_REGUSYSCLKREQVALID2, | ||
56 | AB8500_REGUMISC1, | ||
57 | AB8500_VAUDIOSUPPLY, | ||
58 | AB8500_REGUCTRL1VAMIC, | ||
59 | AB8500_VPLLVANAREGU, | ||
60 | AB8500_VREFDDR, | ||
61 | AB8500_EXTSUPPLYREGU, | ||
62 | AB8500_VAUX12REGU, | ||
63 | AB8500_VRF1VAUX3REGU, | ||
64 | AB8500_VAUX1SEL, | ||
65 | AB8500_VAUX2SEL, | ||
66 | AB8500_VRF1VAUX3SEL, | ||
67 | AB8500_REGUCTRL2SPARE, | ||
68 | AB8500_REGUCTRLDISCH, | ||
69 | AB8500_REGUCTRLDISCH2, | ||
70 | AB8500_VSMPS1SEL1, | ||
71 | AB8500_NUM_REGULATOR_REGISTERS, | ||
72 | }; | ||
73 | |||
27 | #endif | 74 | #endif |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 7954f6bd7edb..9e87c1cb7270 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -153,6 +153,8 @@ int regulator_list_voltage(struct regulator *regulator, unsigned selector); | |||
153 | int regulator_is_supported_voltage(struct regulator *regulator, | 153 | int regulator_is_supported_voltage(struct regulator *regulator, |
154 | int min_uV, int max_uV); | 154 | int min_uV, int max_uV); |
155 | int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); | 155 | int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); |
156 | int regulator_set_voltage_time(struct regulator *regulator, | ||
157 | int old_uV, int new_uV); | ||
156 | int regulator_get_voltage(struct regulator *regulator); | 158 | int regulator_get_voltage(struct regulator *regulator); |
157 | int regulator_sync_voltage(struct regulator *regulator); | 159 | int regulator_sync_voltage(struct regulator *regulator); |
158 | int regulator_set_current_limit(struct regulator *regulator, | 160 | int regulator_set_current_limit(struct regulator *regulator, |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index b8ed16a33c47..6c433b89c80d 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -63,7 +63,11 @@ enum regulator_status { | |||
63 | * when running with the specified parameters. | 63 | * when running with the specified parameters. |
64 | * | 64 | * |
65 | * @enable_time: Time taken for the regulator voltage output voltage to | 65 | * @enable_time: Time taken for the regulator voltage output voltage to |
66 | * stabalise after being enabled, in microseconds. | 66 | * stabilise after being enabled, in microseconds. |
67 | * @set_voltage_time_sel: Time taken for the regulator voltage output voltage | ||
68 | * to stabilise after being set to a new value, in microseconds. | ||
69 | * The function provides the from and to voltage selector, the | ||
70 | * function should return the worst case. | ||
67 | * | 71 | * |
68 | * @set_suspend_voltage: Set the voltage for the regulator when the system | 72 | * @set_suspend_voltage: Set the voltage for the regulator when the system |
69 | * is suspended. | 73 | * is suspended. |
@@ -103,8 +107,11 @@ struct regulator_ops { | |||
103 | int (*set_mode) (struct regulator_dev *, unsigned int mode); | 107 | int (*set_mode) (struct regulator_dev *, unsigned int mode); |
104 | unsigned int (*get_mode) (struct regulator_dev *); | 108 | unsigned int (*get_mode) (struct regulator_dev *); |
105 | 109 | ||
106 | /* Time taken to enable the regulator */ | 110 | /* Time taken to enable or set voltage on the regulator */ |
107 | int (*enable_time) (struct regulator_dev *); | 111 | int (*enable_time) (struct regulator_dev *); |
112 | int (*set_voltage_time_sel) (struct regulator_dev *, | ||
113 | unsigned int old_selector, | ||
114 | unsigned int new_selector); | ||
108 | 115 | ||
109 | /* report regulator status ... most other accessors report | 116 | /* report regulator status ... most other accessors report |
110 | * control inputs, this reports results of combining inputs | 117 | * control inputs, this reports results of combining inputs |
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 761c745b9c24..c4c4fc45f856 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
@@ -186,6 +186,7 @@ struct regulator_init_data { | |||
186 | }; | 186 | }; |
187 | 187 | ||
188 | int regulator_suspend_prepare(suspend_state_t state); | 188 | int regulator_suspend_prepare(suspend_state_t state); |
189 | int regulator_suspend_finish(void); | ||
189 | 190 | ||
190 | #ifdef CONFIG_REGULATOR | 191 | #ifdef CONFIG_REGULATOR |
191 | void regulator_has_full_constraints(void); | 192 | void regulator_has_full_constraints(void); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index b8369d522bf8..83bd2e2982fc 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -517,7 +517,7 @@ struct thread_group_cputimer { | |||
517 | struct autogroup; | 517 | struct autogroup; |
518 | 518 | ||
519 | /* | 519 | /* |
520 | * NOTE! "signal_struct" does not have it's own | 520 | * NOTE! "signal_struct" does not have its own |
521 | * locking, because a shared signal_struct always | 521 | * locking, because a shared signal_struct always |
522 | * implies a shared sighand_struct, so locking | 522 | * implies a shared sighand_struct, so locking |
523 | * sighand_struct is always a proper superset of | 523 | * sighand_struct is always a proper superset of |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 24cfa626931e..239083bfea13 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -122,8 +122,14 @@ struct sk_buff_head { | |||
122 | 122 | ||
123 | struct sk_buff; | 123 | struct sk_buff; |
124 | 124 | ||
125 | /* To allow 64K frame to be packed as single skb without frag_list */ | 125 | /* To allow 64K frame to be packed as single skb without frag_list. Since |
126 | * GRO uses frags we allocate at least 16 regardless of page size. | ||
127 | */ | ||
128 | #if (65536/PAGE_SIZE + 2) < 16 | ||
129 | #define MAX_SKB_FRAGS 16 | ||
130 | #else | ||
126 | #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2) | 131 | #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2) |
132 | #endif | ||
127 | 133 | ||
128 | typedef struct skb_frag_struct skb_frag_t; | 134 | typedef struct skb_frag_struct skb_frag_t; |
129 | 135 | ||
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 0e6dc3891942..c0f87da78f8a 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | /* events the user application reading /dev/sonypi can use */ | 41 | /* events the user application reading /dev/sonypi can use */ |
42 | 42 | ||
43 | #define SONYPI_EVENT_IGNORE 0 | ||
43 | #define SONYPI_EVENT_JOGDIAL_DOWN 1 | 44 | #define SONYPI_EVENT_JOGDIAL_DOWN 1 |
44 | #define SONYPI_EVENT_JOGDIAL_UP 2 | 45 | #define SONYPI_EVENT_JOGDIAL_UP 2 |
45 | #define SONYPI_EVENT_JOGDIAL_DOWN_PRESSED 3 | 46 | #define SONYPI_EVENT_JOGDIAL_DOWN_PRESSED 3 |
diff --git a/include/linux/sunrpc/gss_api.h b/include/linux/sunrpc/gss_api.h index 5d8048beb051..332da61cf8b7 100644 --- a/include/linux/sunrpc/gss_api.h +++ b/include/linux/sunrpc/gss_api.h | |||
@@ -126,6 +126,9 @@ struct gss_api_mech *gss_mech_get_by_name(const char *); | |||
126 | /* Similar, but get by pseudoflavor. */ | 126 | /* Similar, but get by pseudoflavor. */ |
127 | struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32); | 127 | struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32); |
128 | 128 | ||
129 | /* Fill in an array with a list of supported pseudoflavors */ | ||
130 | int gss_mech_list_pseudoflavors(u32 *); | ||
131 | |||
129 | /* Just increments the mechanism's reference count and returns its input: */ | 132 | /* Just increments the mechanism's reference count and returns its input: */ |
130 | struct gss_api_mech * gss_mech_get(struct gss_api_mech *); | 133 | struct gss_api_mech * gss_mech_get(struct gss_api_mech *); |
131 | 134 | ||
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index 1154c29f4101..8a75da551e4e 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -33,12 +33,13 @@ struct sysdev_class { | |||
33 | const char *name; | 33 | const char *name; |
34 | struct list_head drivers; | 34 | struct list_head drivers; |
35 | struct sysdev_class_attribute **attrs; | 35 | struct sysdev_class_attribute **attrs; |
36 | 36 | struct kset kset; | |
37 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
37 | /* Default operations for these types of devices */ | 38 | /* Default operations for these types of devices */ |
38 | int (*shutdown)(struct sys_device *); | 39 | int (*shutdown)(struct sys_device *); |
39 | int (*suspend)(struct sys_device *, pm_message_t state); | 40 | int (*suspend)(struct sys_device *, pm_message_t state); |
40 | int (*resume)(struct sys_device *); | 41 | int (*resume)(struct sys_device *); |
41 | struct kset kset; | 42 | #endif |
42 | }; | 43 | }; |
43 | 44 | ||
44 | struct sysdev_class_attribute { | 45 | struct sysdev_class_attribute { |
@@ -76,9 +77,11 @@ struct sysdev_driver { | |||
76 | struct list_head entry; | 77 | struct list_head entry; |
77 | int (*add)(struct sys_device *); | 78 | int (*add)(struct sys_device *); |
78 | int (*remove)(struct sys_device *); | 79 | int (*remove)(struct sys_device *); |
80 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
79 | int (*shutdown)(struct sys_device *); | 81 | int (*shutdown)(struct sys_device *); |
80 | int (*suspend)(struct sys_device *, pm_message_t state); | 82 | int (*suspend)(struct sys_device *, pm_message_t state); |
81 | int (*resume)(struct sys_device *); | 83 | int (*resume)(struct sys_device *); |
84 | #endif | ||
82 | }; | 85 | }; |
83 | 86 | ||
84 | 87 | ||
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 4ed6fcd6b726..9332e52ea8c2 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -95,10 +95,27 @@ extern struct vm_struct *remove_vm_area(const void *addr); | |||
95 | 95 | ||
96 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, | 96 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, |
97 | struct page ***pages); | 97 | struct page ***pages); |
98 | #ifdef CONFIG_MMU | ||
98 | extern int map_kernel_range_noflush(unsigned long start, unsigned long size, | 99 | extern int map_kernel_range_noflush(unsigned long start, unsigned long size, |
99 | pgprot_t prot, struct page **pages); | 100 | pgprot_t prot, struct page **pages); |
100 | extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long size); | 101 | extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long size); |
101 | extern void unmap_kernel_range(unsigned long addr, unsigned long size); | 102 | extern void unmap_kernel_range(unsigned long addr, unsigned long size); |
103 | #else | ||
104 | static inline int | ||
105 | map_kernel_range_noflush(unsigned long start, unsigned long size, | ||
106 | pgprot_t prot, struct page **pages) | ||
107 | { | ||
108 | return size >> PAGE_SHIFT; | ||
109 | } | ||
110 | static inline void | ||
111 | unmap_kernel_range_noflush(unsigned long addr, unsigned long size) | ||
112 | { | ||
113 | } | ||
114 | static inline void | ||
115 | unmap_kernel_range(unsigned long addr, unsigned long size) | ||
116 | { | ||
117 | } | ||
118 | #endif | ||
102 | 119 | ||
103 | /* Allocate/destroy a 'vmalloc' VM area. */ | 120 | /* Allocate/destroy a 'vmalloc' VM area. */ |
104 | extern struct vm_struct *alloc_vm_area(size_t size); | 121 | extern struct vm_struct *alloc_vm_area(size_t size); |
@@ -116,11 +133,26 @@ extern struct vm_struct *vmlist; | |||
116 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); | 133 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); |
117 | 134 | ||
118 | #ifdef CONFIG_SMP | 135 | #ifdef CONFIG_SMP |
136 | # ifdef CONFIG_MMU | ||
119 | struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, | 137 | struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, |
120 | const size_t *sizes, int nr_vms, | 138 | const size_t *sizes, int nr_vms, |
121 | size_t align); | 139 | size_t align); |
122 | 140 | ||
123 | void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); | 141 | void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); |
142 | # else | ||
143 | static inline struct vm_struct ** | ||
144 | pcpu_get_vm_areas(const unsigned long *offsets, | ||
145 | const size_t *sizes, int nr_vms, | ||
146 | size_t align) | ||
147 | { | ||
148 | return NULL; | ||
149 | } | ||
150 | |||
151 | static inline void | ||
152 | pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms) | ||
153 | { | ||
154 | } | ||
155 | # endif | ||
124 | #endif | 156 | #endif |
125 | 157 | ||
126 | #endif /* _LINUX_VMALLOC_H */ | 158 | #endif /* _LINUX_VMALLOC_H */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 60f7876b6da8..b2b9d28cb4ab 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -486,7 +486,8 @@ struct rate_info { | |||
486 | * @plink_state: mesh peer link state | 486 | * @plink_state: mesh peer link state |
487 | * @signal: signal strength of last received packet in dBm | 487 | * @signal: signal strength of last received packet in dBm |
488 | * @signal_avg: signal strength average in dBm | 488 | * @signal_avg: signal strength average in dBm |
489 | * @txrate: current unicast bitrate to this station | 489 | * @txrate: current unicast bitrate from this station |
490 | * @rxrate: current unicast bitrate to this station | ||
490 | * @rx_packets: packets received from this station | 491 | * @rx_packets: packets received from this station |
491 | * @tx_packets: packets transmitted to this station | 492 | * @tx_packets: packets transmitted to this station |
492 | * @tx_retries: cumulative retry counts | 493 | * @tx_retries: cumulative retry counts |
diff --git a/include/net/dst.h b/include/net/dst.h index 2a46cbaef92d..75b95df4afe7 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -345,7 +345,7 @@ static inline void skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev) | |||
345 | 345 | ||
346 | static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) | 346 | static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) |
347 | { | 347 | { |
348 | struct dst_entry *child = skb_dst(skb)->child; | 348 | struct dst_entry *child = dst_clone(skb_dst(skb)->child); |
349 | 349 | ||
350 | skb_dst_drop(skb); | 350 | skb_dst_drop(skb); |
351 | return child; | 351 | return child; |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 642a80bb42cf..c850e5fb967c 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -70,7 +70,7 @@ static inline struct inet_peer *rt6_get_peer(struct rt6_info *rt) | |||
70 | extern void ip6_route_input(struct sk_buff *skb); | 70 | extern void ip6_route_input(struct sk_buff *skb); |
71 | 71 | ||
72 | extern struct dst_entry * ip6_route_output(struct net *net, | 72 | extern struct dst_entry * ip6_route_output(struct net *net, |
73 | struct sock *sk, | 73 | const struct sock *sk, |
74 | struct flowi6 *fl6); | 74 | struct flowi6 *fl6); |
75 | 75 | ||
76 | extern int ip6_route_init(void); | 76 | extern int ip6_route_init(void); |
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index a1a858035913..e5d66ec88cf6 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -51,7 +51,6 @@ struct fib_nh { | |||
51 | struct fib_info *nh_parent; | 51 | struct fib_info *nh_parent; |
52 | unsigned nh_flags; | 52 | unsigned nh_flags; |
53 | unsigned char nh_scope; | 53 | unsigned char nh_scope; |
54 | unsigned char nh_cfg_scope; | ||
55 | #ifdef CONFIG_IP_ROUTE_MULTIPATH | 54 | #ifdef CONFIG_IP_ROUTE_MULTIPATH |
56 | int nh_weight; | 55 | int nh_weight; |
57 | int nh_power; | 56 | int nh_power; |
@@ -62,6 +61,7 @@ struct fib_nh { | |||
62 | int nh_oif; | 61 | int nh_oif; |
63 | __be32 nh_gw; | 62 | __be32 nh_gw; |
64 | __be32 nh_saddr; | 63 | __be32 nh_saddr; |
64 | int nh_saddr_genid; | ||
65 | }; | 65 | }; |
66 | 66 | ||
67 | /* | 67 | /* |
@@ -74,9 +74,10 @@ struct fib_info { | |||
74 | struct net *fib_net; | 74 | struct net *fib_net; |
75 | int fib_treeref; | 75 | int fib_treeref; |
76 | atomic_t fib_clntref; | 76 | atomic_t fib_clntref; |
77 | int fib_dead; | ||
78 | unsigned fib_flags; | 77 | unsigned fib_flags; |
79 | int fib_protocol; | 78 | unsigned char fib_dead; |
79 | unsigned char fib_protocol; | ||
80 | unsigned char fib_scope; | ||
80 | __be32 fib_prefsrc; | 81 | __be32 fib_prefsrc; |
81 | u32 fib_priority; | 82 | u32 fib_priority; |
82 | u32 *fib_metrics; | 83 | u32 *fib_metrics; |
@@ -141,12 +142,19 @@ struct fib_result_nl { | |||
141 | 142 | ||
142 | #endif /* CONFIG_IP_ROUTE_MULTIPATH */ | 143 | #endif /* CONFIG_IP_ROUTE_MULTIPATH */ |
143 | 144 | ||
144 | #define FIB_RES_SADDR(res) (FIB_RES_NH(res).nh_saddr) | 145 | extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh); |
146 | |||
147 | #define FIB_RES_SADDR(net, res) \ | ||
148 | ((FIB_RES_NH(res).nh_saddr_genid == \ | ||
149 | atomic_read(&(net)->ipv4.dev_addr_genid)) ? \ | ||
150 | FIB_RES_NH(res).nh_saddr : \ | ||
151 | fib_info_update_nh_saddr((net), &FIB_RES_NH(res))) | ||
145 | #define FIB_RES_GW(res) (FIB_RES_NH(res).nh_gw) | 152 | #define FIB_RES_GW(res) (FIB_RES_NH(res).nh_gw) |
146 | #define FIB_RES_DEV(res) (FIB_RES_NH(res).nh_dev) | 153 | #define FIB_RES_DEV(res) (FIB_RES_NH(res).nh_dev) |
147 | #define FIB_RES_OIF(res) (FIB_RES_NH(res).nh_oif) | 154 | #define FIB_RES_OIF(res) (FIB_RES_NH(res).nh_oif) |
148 | 155 | ||
149 | #define FIB_RES_PREFSRC(res) ((res).fi->fib_prefsrc ? : FIB_RES_SADDR(res)) | 156 | #define FIB_RES_PREFSRC(net, res) ((res).fi->fib_prefsrc ? : \ |
157 | FIB_RES_SADDR(net, res)) | ||
150 | 158 | ||
151 | struct fib_table { | 159 | struct fib_table { |
152 | struct hlist_node tb_hlist; | 160 | struct hlist_node tb_hlist; |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 8650e7bf2ed0..cefe1b37c493 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1160,7 +1160,7 @@ enum ieee80211_hw_flags { | |||
1160 | * @napi_weight: weight used for NAPI polling. You must specify an | 1160 | * @napi_weight: weight used for NAPI polling. You must specify an |
1161 | * appropriate value here if a napi_poll operation is provided | 1161 | * appropriate value here if a napi_poll operation is provided |
1162 | * by your driver. | 1162 | * by your driver. |
1163 | 1163 | * | |
1164 | * @max_rx_aggregation_subframes: maximum buffer size (number of | 1164 | * @max_rx_aggregation_subframes: maximum buffer size (number of |
1165 | * sub-frames) to be used for A-MPDU block ack receiver | 1165 | * sub-frames) to be used for A-MPDU block ack receiver |
1166 | * aggregation. | 1166 | * aggregation. |
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index e2e2ef57eca2..542195d9469e 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
@@ -55,6 +55,7 @@ struct netns_ipv4 { | |||
55 | int current_rt_cache_rebuild_count; | 55 | int current_rt_cache_rebuild_count; |
56 | 56 | ||
57 | atomic_t rt_genid; | 57 | atomic_t rt_genid; |
58 | atomic_t dev_addr_genid; | ||
58 | 59 | ||
59 | #ifdef CONFIG_IP_MROUTE | 60 | #ifdef CONFIG_IP_MROUTE |
60 | #ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES | 61 | #ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES |
diff --git a/include/net/rose.h b/include/net/rose.h index 5ba9f02731eb..555dd198aab7 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -14,6 +14,12 @@ | |||
14 | 14 | ||
15 | #define ROSE_MIN_LEN 3 | 15 | #define ROSE_MIN_LEN 3 |
16 | 16 | ||
17 | #define ROSE_CALL_REQ_ADDR_LEN_OFF 3 | ||
18 | #define ROSE_CALL_REQ_ADDR_LEN_VAL 0xAA /* each address is 10 digits */ | ||
19 | #define ROSE_CALL_REQ_DEST_ADDR_OFF 4 | ||
20 | #define ROSE_CALL_REQ_SRC_ADDR_OFF 9 | ||
21 | #define ROSE_CALL_REQ_FACILITIES_OFF 14 | ||
22 | |||
17 | #define ROSE_GFI 0x10 | 23 | #define ROSE_GFI 0x10 |
18 | #define ROSE_Q_BIT 0x80 | 24 | #define ROSE_Q_BIT 0x80 |
19 | #define ROSE_D_BIT 0x40 | 25 | #define ROSE_D_BIT 0x40 |
@@ -214,7 +220,7 @@ extern void rose_requeue_frames(struct sock *); | |||
214 | extern int rose_validate_nr(struct sock *, unsigned short); | 220 | extern int rose_validate_nr(struct sock *, unsigned short); |
215 | extern void rose_write_internal(struct sock *, int); | 221 | extern void rose_write_internal(struct sock *, int); |
216 | extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *); | 222 | extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *); |
217 | extern int rose_parse_facilities(unsigned char *, struct rose_facilities_struct *); | 223 | extern int rose_parse_facilities(unsigned char *, unsigned int, struct rose_facilities_struct *); |
218 | extern void rose_disconnect(struct sock *, int, int, int); | 224 | extern void rose_disconnect(struct sock *, int, int, int); |
219 | 225 | ||
220 | /* rose_timer.c */ | 226 | /* rose_timer.c */ |
diff --git a/include/net/route.h b/include/net/route.h index 30d6cae3841a..f88429cad52a 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -207,6 +207,7 @@ extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); | |||
207 | 207 | ||
208 | struct in_ifaddr; | 208 | struct in_ifaddr; |
209 | extern void fib_add_ifaddr(struct in_ifaddr *); | 209 | extern void fib_add_ifaddr(struct in_ifaddr *); |
210 | extern void fib_del_ifaddr(struct in_ifaddr *, struct in_ifaddr *); | ||
210 | 211 | ||
211 | static inline void ip_rt_put(struct rtable * rt) | 212 | static inline void ip_rt_put(struct rtable * rt) |
212 | { | 213 | { |
@@ -269,8 +270,8 @@ static inline struct rtable *ip_route_newports(struct rtable *rt, | |||
269 | struct flowi4 fl4 = { | 270 | struct flowi4 fl4 = { |
270 | .flowi4_oif = rt->rt_oif, | 271 | .flowi4_oif = rt->rt_oif, |
271 | .flowi4_mark = rt->rt_mark, | 272 | .flowi4_mark = rt->rt_mark, |
272 | .daddr = rt->rt_key_dst, | 273 | .daddr = rt->rt_dst, |
273 | .saddr = rt->rt_key_src, | 274 | .saddr = rt->rt_src, |
274 | .flowi4_tos = rt->rt_tos, | 275 | .flowi4_tos = rt->rt_tos, |
275 | .flowi4_proto = protocol, | 276 | .flowi4_proto = protocol, |
276 | .fl4_sport = sport, | 277 | .fl4_sport = sport, |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index a9505b6a18e3..b931f021d7ab 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -25,6 +25,7 @@ struct qdisc_rate_table { | |||
25 | enum qdisc_state_t { | 25 | enum qdisc_state_t { |
26 | __QDISC_STATE_SCHED, | 26 | __QDISC_STATE_SCHED, |
27 | __QDISC_STATE_DEACTIVATED, | 27 | __QDISC_STATE_DEACTIVATED, |
28 | __QDISC_STATE_THROTTLED, | ||
28 | }; | 29 | }; |
29 | 30 | ||
30 | /* | 31 | /* |
@@ -32,7 +33,6 @@ enum qdisc_state_t { | |||
32 | */ | 33 | */ |
33 | enum qdisc___state_t { | 34 | enum qdisc___state_t { |
34 | __QDISC___STATE_RUNNING = 1, | 35 | __QDISC___STATE_RUNNING = 1, |
35 | __QDISC___STATE_THROTTLED = 2, | ||
36 | }; | 36 | }; |
37 | 37 | ||
38 | struct qdisc_size_table { | 38 | struct qdisc_size_table { |
@@ -106,17 +106,17 @@ static inline void qdisc_run_end(struct Qdisc *qdisc) | |||
106 | 106 | ||
107 | static inline bool qdisc_is_throttled(const struct Qdisc *qdisc) | 107 | static inline bool qdisc_is_throttled(const struct Qdisc *qdisc) |
108 | { | 108 | { |
109 | return (qdisc->__state & __QDISC___STATE_THROTTLED) ? true : false; | 109 | return test_bit(__QDISC_STATE_THROTTLED, &qdisc->state) ? true : false; |
110 | } | 110 | } |
111 | 111 | ||
112 | static inline void qdisc_throttled(struct Qdisc *qdisc) | 112 | static inline void qdisc_throttled(struct Qdisc *qdisc) |
113 | { | 113 | { |
114 | qdisc->__state |= __QDISC___STATE_THROTTLED; | 114 | set_bit(__QDISC_STATE_THROTTLED, &qdisc->state); |
115 | } | 115 | } |
116 | 116 | ||
117 | static inline void qdisc_unthrottled(struct Qdisc *qdisc) | 117 | static inline void qdisc_unthrottled(struct Qdisc *qdisc) |
118 | { | 118 | { |
119 | qdisc->__state &= ~__QDISC___STATE_THROTTLED; | 119 | clear_bit(__QDISC_STATE_THROTTLED, &qdisc->state); |
120 | } | 120 | } |
121 | 121 | ||
122 | struct Qdisc_class_ops { | 122 | struct Qdisc_class_ops { |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index cffa5dc66449..6ae4bc5ce8a7 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -1601,6 +1601,28 @@ static inline int xfrm_replay_state_esn_len(struct xfrm_replay_state_esn *replay | |||
1601 | } | 1601 | } |
1602 | 1602 | ||
1603 | #ifdef CONFIG_XFRM_MIGRATE | 1603 | #ifdef CONFIG_XFRM_MIGRATE |
1604 | static inline int xfrm_replay_clone(struct xfrm_state *x, | ||
1605 | struct xfrm_state *orig) | ||
1606 | { | ||
1607 | x->replay_esn = kzalloc(xfrm_replay_state_esn_len(orig->replay_esn), | ||
1608 | GFP_KERNEL); | ||
1609 | if (!x->replay_esn) | ||
1610 | return -ENOMEM; | ||
1611 | |||
1612 | x->replay_esn->bmp_len = orig->replay_esn->bmp_len; | ||
1613 | x->replay_esn->replay_window = orig->replay_esn->replay_window; | ||
1614 | |||
1615 | x->preplay_esn = kmemdup(x->replay_esn, | ||
1616 | xfrm_replay_state_esn_len(x->replay_esn), | ||
1617 | GFP_KERNEL); | ||
1618 | if (!x->preplay_esn) { | ||
1619 | kfree(x->replay_esn); | ||
1620 | return -ENOMEM; | ||
1621 | } | ||
1622 | |||
1623 | return 0; | ||
1624 | } | ||
1625 | |||
1604 | static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) | 1626 | static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) |
1605 | { | 1627 | { |
1606 | return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL); | 1628 | return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL); |
diff --git a/include/scsi/libiscsi_tcp.h b/include/scsi/libiscsi_tcp.h index 741ae7ed4394..e6b9fd2eea34 100644 --- a/include/scsi/libiscsi_tcp.h +++ b/include/scsi/libiscsi_tcp.h | |||
@@ -47,6 +47,7 @@ struct iscsi_segment { | |||
47 | struct scatterlist *sg; | 47 | struct scatterlist *sg; |
48 | void *sg_mapped; | 48 | void *sg_mapped; |
49 | unsigned int sg_offset; | 49 | unsigned int sg_offset; |
50 | bool atomic_mapped; | ||
50 | 51 | ||
51 | iscsi_segment_done_fn_t *done; | 52 | iscsi_segment_done_fn_t *done; |
52 | }; | 53 | }; |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index f171c65dc5a8..2d3ec5094685 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -462,7 +462,7 @@ static inline int scsi_device_qas(struct scsi_device *sdev) | |||
462 | } | 462 | } |
463 | static inline int scsi_device_enclosure(struct scsi_device *sdev) | 463 | static inline int scsi_device_enclosure(struct scsi_device *sdev) |
464 | { | 464 | { |
465 | return sdev->inquiry[6] & (1<<6); | 465 | return sdev->inquiry ? (sdev->inquiry[6] & (1<<6)) : 1; |
466 | } | 466 | } |
467 | 467 | ||
468 | static inline int scsi_device_protection(struct scsi_device *sdev) | 468 | static inline int scsi_device_protection(struct scsi_device *sdev) |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 430a9cc045e2..e1bad1130616 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -1031,9 +1031,7 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s | |||
1031 | #define snd_pcm_lib_mmap_iomem NULL | 1031 | #define snd_pcm_lib_mmap_iomem NULL |
1032 | #endif | 1032 | #endif |
1033 | 1033 | ||
1034 | int snd_pcm_lib_mmap_noncached(struct snd_pcm_substream *substream, | 1034 | #define snd_pcm_lib_mmap_vmalloc NULL |
1035 | struct vm_area_struct *area); | ||
1036 | #define snd_pcm_lib_mmap_vmalloc snd_pcm_lib_mmap_noncached | ||
1037 | 1035 | ||
1038 | static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) | 1036 | static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) |
1039 | { | 1037 | { |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 0828b6c8610a..c15ed5026fb5 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <net/sock.h> | 9 | #include <net/sock.h> |
10 | #include <net/tcp.h> | 10 | #include <net/tcp.h> |
11 | 11 | ||
12 | #define TARGET_CORE_MOD_VERSION "v4.0.0-rc6" | 12 | #define TARGET_CORE_MOD_VERSION "v4.0.0-rc7-ml" |
13 | #define SHUTDOWN_SIGS (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGABRT)) | 13 | #define SHUTDOWN_SIGS (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGABRT)) |
14 | 14 | ||
15 | /* Used by transport_generic_allocate_iovecs() */ | 15 | /* Used by transport_generic_allocate_iovecs() */ |
@@ -239,7 +239,7 @@ struct t10_alua_lu_gp { | |||
239 | } ____cacheline_aligned; | 239 | } ____cacheline_aligned; |
240 | 240 | ||
241 | struct t10_alua_lu_gp_member { | 241 | struct t10_alua_lu_gp_member { |
242 | int lu_gp_assoc:1; | 242 | bool lu_gp_assoc; |
243 | atomic_t lu_gp_mem_ref_cnt; | 243 | atomic_t lu_gp_mem_ref_cnt; |
244 | spinlock_t lu_gp_mem_lock; | 244 | spinlock_t lu_gp_mem_lock; |
245 | struct t10_alua_lu_gp *lu_gp; | 245 | struct t10_alua_lu_gp *lu_gp; |
@@ -271,7 +271,7 @@ struct t10_alua_tg_pt_gp { | |||
271 | } ____cacheline_aligned; | 271 | } ____cacheline_aligned; |
272 | 272 | ||
273 | struct t10_alua_tg_pt_gp_member { | 273 | struct t10_alua_tg_pt_gp_member { |
274 | int tg_pt_gp_assoc:1; | 274 | bool tg_pt_gp_assoc; |
275 | atomic_t tg_pt_gp_mem_ref_cnt; | 275 | atomic_t tg_pt_gp_mem_ref_cnt; |
276 | spinlock_t tg_pt_gp_mem_lock; | 276 | spinlock_t tg_pt_gp_mem_lock; |
277 | struct t10_alua_tg_pt_gp *tg_pt_gp; | 277 | struct t10_alua_tg_pt_gp *tg_pt_gp; |
@@ -336,7 +336,7 @@ struct t10_pr_registration { | |||
336 | int pr_res_type; | 336 | int pr_res_type; |
337 | int pr_res_scope; | 337 | int pr_res_scope; |
338 | /* Used for fabric initiator WWPNs using a ISID */ | 338 | /* Used for fabric initiator WWPNs using a ISID */ |
339 | int isid_present_at_reg:1; | 339 | bool isid_present_at_reg; |
340 | u32 pr_res_mapped_lun; | 340 | u32 pr_res_mapped_lun; |
341 | u32 pr_aptpl_target_lun; | 341 | u32 pr_aptpl_target_lun; |
342 | u32 pr_res_generation; | 342 | u32 pr_res_generation; |
@@ -418,7 +418,7 @@ struct se_transport_task { | |||
418 | unsigned long long t_task_lba; | 418 | unsigned long long t_task_lba; |
419 | int t_tasks_failed; | 419 | int t_tasks_failed; |
420 | int t_tasks_fua; | 420 | int t_tasks_fua; |
421 | int t_tasks_bidi:1; | 421 | bool t_tasks_bidi; |
422 | u32 t_task_cdbs; | 422 | u32 t_task_cdbs; |
423 | u32 t_tasks_check; | 423 | u32 t_tasks_check; |
424 | u32 t_tasks_no; | 424 | u32 t_tasks_no; |
@@ -470,7 +470,7 @@ struct se_task { | |||
470 | u8 task_flags; | 470 | u8 task_flags; |
471 | int task_error_status; | 471 | int task_error_status; |
472 | int task_state_flags; | 472 | int task_state_flags; |
473 | int task_padded_sg:1; | 473 | bool task_padded_sg; |
474 | unsigned long long task_lba; | 474 | unsigned long long task_lba; |
475 | u32 task_no; | 475 | u32 task_no; |
476 | u32 task_sectors; | 476 | u32 task_sectors; |
@@ -494,8 +494,8 @@ struct se_task { | |||
494 | struct list_head t_state_list; | 494 | struct list_head t_state_list; |
495 | } ____cacheline_aligned; | 495 | } ____cacheline_aligned; |
496 | 496 | ||
497 | #define TASK_CMD(task) ((struct se_cmd *)task->task_se_cmd) | 497 | #define TASK_CMD(task) ((task)->task_se_cmd) |
498 | #define TASK_DEV(task) ((struct se_device *)task->se_dev) | 498 | #define TASK_DEV(task) ((task)->se_dev) |
499 | 499 | ||
500 | struct se_cmd { | 500 | struct se_cmd { |
501 | /* SAM response code being sent to initiator */ | 501 | /* SAM response code being sent to initiator */ |
@@ -551,8 +551,8 @@ struct se_cmd { | |||
551 | void (*transport_complete_callback)(struct se_cmd *); | 551 | void (*transport_complete_callback)(struct se_cmd *); |
552 | } ____cacheline_aligned; | 552 | } ____cacheline_aligned; |
553 | 553 | ||
554 | #define T_TASK(cmd) ((struct se_transport_task *)(cmd->t_task)) | 554 | #define T_TASK(cmd) ((cmd)->t_task) |
555 | #define CMD_TFO(cmd) ((struct target_core_fabric_ops *)cmd->se_tfo) | 555 | #define CMD_TFO(cmd) ((cmd)->se_tfo) |
556 | 556 | ||
557 | struct se_tmr_req { | 557 | struct se_tmr_req { |
558 | /* Task Management function to be preformed */ | 558 | /* Task Management function to be preformed */ |
@@ -583,7 +583,7 @@ struct se_ua { | |||
583 | struct se_node_acl { | 583 | struct se_node_acl { |
584 | char initiatorname[TRANSPORT_IQN_LEN]; | 584 | char initiatorname[TRANSPORT_IQN_LEN]; |
585 | /* Used to signal demo mode created ACL, disabled by default */ | 585 | /* Used to signal demo mode created ACL, disabled by default */ |
586 | int dynamic_node_acl:1; | 586 | bool dynamic_node_acl; |
587 | u32 queue_depth; | 587 | u32 queue_depth; |
588 | u32 acl_index; | 588 | u32 acl_index; |
589 | u64 num_cmds; | 589 | u64 num_cmds; |
@@ -601,7 +601,8 @@ struct se_node_acl { | |||
601 | struct config_group acl_attrib_group; | 601 | struct config_group acl_attrib_group; |
602 | struct config_group acl_auth_group; | 602 | struct config_group acl_auth_group; |
603 | struct config_group acl_param_group; | 603 | struct config_group acl_param_group; |
604 | struct config_group *acl_default_groups[4]; | 604 | struct config_group acl_fabric_stat_group; |
605 | struct config_group *acl_default_groups[5]; | ||
605 | struct list_head acl_list; | 606 | struct list_head acl_list; |
606 | struct list_head acl_sess_list; | 607 | struct list_head acl_sess_list; |
607 | } ____cacheline_aligned; | 608 | } ____cacheline_aligned; |
@@ -615,13 +616,19 @@ struct se_session { | |||
615 | struct list_head sess_acl_list; | 616 | struct list_head sess_acl_list; |
616 | } ____cacheline_aligned; | 617 | } ____cacheline_aligned; |
617 | 618 | ||
618 | #define SE_SESS(cmd) ((struct se_session *)(cmd)->se_sess) | 619 | #define SE_SESS(cmd) ((cmd)->se_sess) |
619 | #define SE_NODE_ACL(sess) ((struct se_node_acl *)(sess)->se_node_acl) | 620 | #define SE_NODE_ACL(sess) ((sess)->se_node_acl) |
620 | 621 | ||
621 | struct se_device; | 622 | struct se_device; |
622 | struct se_transform_info; | 623 | struct se_transform_info; |
623 | struct scatterlist; | 624 | struct scatterlist; |
624 | 625 | ||
626 | struct se_ml_stat_grps { | ||
627 | struct config_group stat_group; | ||
628 | struct config_group scsi_auth_intr_group; | ||
629 | struct config_group scsi_att_intr_port_group; | ||
630 | }; | ||
631 | |||
625 | struct se_lun_acl { | 632 | struct se_lun_acl { |
626 | char initiatorname[TRANSPORT_IQN_LEN]; | 633 | char initiatorname[TRANSPORT_IQN_LEN]; |
627 | u32 mapped_lun; | 634 | u32 mapped_lun; |
@@ -629,10 +636,13 @@ struct se_lun_acl { | |||
629 | struct se_lun *se_lun; | 636 | struct se_lun *se_lun; |
630 | struct list_head lacl_list; | 637 | struct list_head lacl_list; |
631 | struct config_group se_lun_group; | 638 | struct config_group se_lun_group; |
639 | struct se_ml_stat_grps ml_stat_grps; | ||
632 | } ____cacheline_aligned; | 640 | } ____cacheline_aligned; |
633 | 641 | ||
642 | #define ML_STAT_GRPS(lacl) (&(lacl)->ml_stat_grps) | ||
643 | |||
634 | struct se_dev_entry { | 644 | struct se_dev_entry { |
635 | int def_pr_registered:1; | 645 | bool def_pr_registered; |
636 | /* See transport_lunflags_table */ | 646 | /* See transport_lunflags_table */ |
637 | u32 lun_flags; | 647 | u32 lun_flags; |
638 | u32 deve_cmds; | 648 | u32 deve_cmds; |
@@ -693,6 +703,13 @@ struct se_dev_attrib { | |||
693 | struct config_group da_group; | 703 | struct config_group da_group; |
694 | } ____cacheline_aligned; | 704 | } ____cacheline_aligned; |
695 | 705 | ||
706 | struct se_dev_stat_grps { | ||
707 | struct config_group stat_group; | ||
708 | struct config_group scsi_dev_group; | ||
709 | struct config_group scsi_tgt_dev_group; | ||
710 | struct config_group scsi_lu_group; | ||
711 | }; | ||
712 | |||
696 | struct se_subsystem_dev { | 713 | struct se_subsystem_dev { |
697 | /* Used for struct se_subsystem_dev-->se_dev_alias, must be less than PAGE_SIZE */ | 714 | /* Used for struct se_subsystem_dev-->se_dev_alias, must be less than PAGE_SIZE */ |
698 | #define SE_DEV_ALIAS_LEN 512 | 715 | #define SE_DEV_ALIAS_LEN 512 |
@@ -716,11 +733,14 @@ struct se_subsystem_dev { | |||
716 | struct config_group se_dev_group; | 733 | struct config_group se_dev_group; |
717 | /* For T10 Reservations */ | 734 | /* For T10 Reservations */ |
718 | struct config_group se_dev_pr_group; | 735 | struct config_group se_dev_pr_group; |
736 | /* For target_core_stat.c groups */ | ||
737 | struct se_dev_stat_grps dev_stat_grps; | ||
719 | } ____cacheline_aligned; | 738 | } ____cacheline_aligned; |
720 | 739 | ||
721 | #define T10_ALUA(su_dev) (&(su_dev)->t10_alua) | 740 | #define T10_ALUA(su_dev) (&(su_dev)->t10_alua) |
722 | #define T10_RES(su_dev) (&(su_dev)->t10_reservation) | 741 | #define T10_RES(su_dev) (&(su_dev)->t10_reservation) |
723 | #define T10_PR_OPS(su_dev) (&(su_dev)->t10_reservation.pr_ops) | 742 | #define T10_PR_OPS(su_dev) (&(su_dev)->t10_reservation.pr_ops) |
743 | #define DEV_STAT_GRP(dev) (&(dev)->dev_stat_grps) | ||
724 | 744 | ||
725 | struct se_device { | 745 | struct se_device { |
726 | /* Set to 1 if thread is NOT sleeping on thread_sem */ | 746 | /* Set to 1 if thread is NOT sleeping on thread_sem */ |
@@ -803,8 +823,8 @@ struct se_device { | |||
803 | struct list_head g_se_dev_list; | 823 | struct list_head g_se_dev_list; |
804 | } ____cacheline_aligned; | 824 | } ____cacheline_aligned; |
805 | 825 | ||
806 | #define SE_DEV(cmd) ((struct se_device *)(cmd)->se_lun->lun_se_dev) | 826 | #define SE_DEV(cmd) ((cmd)->se_lun->lun_se_dev) |
807 | #define SU_DEV(dev) ((struct se_subsystem_dev *)(dev)->se_sub_dev) | 827 | #define SU_DEV(dev) ((dev)->se_sub_dev) |
808 | #define DEV_ATTRIB(dev) (&(dev)->se_sub_dev->se_dev_attrib) | 828 | #define DEV_ATTRIB(dev) (&(dev)->se_sub_dev->se_dev_attrib) |
809 | #define DEV_T10_WWN(dev) (&(dev)->se_sub_dev->t10_wwn) | 829 | #define DEV_T10_WWN(dev) (&(dev)->se_sub_dev->t10_wwn) |
810 | 830 | ||
@@ -832,7 +852,14 @@ struct se_hba { | |||
832 | struct se_subsystem_api *transport; | 852 | struct se_subsystem_api *transport; |
833 | } ____cacheline_aligned; | 853 | } ____cacheline_aligned; |
834 | 854 | ||
835 | #define SE_HBA(d) ((struct se_hba *)(d)->se_hba) | 855 | #define SE_HBA(dev) ((dev)->se_hba) |
856 | |||
857 | struct se_port_stat_grps { | ||
858 | struct config_group stat_group; | ||
859 | struct config_group scsi_port_group; | ||
860 | struct config_group scsi_tgt_port_group; | ||
861 | struct config_group scsi_transport_group; | ||
862 | }; | ||
836 | 863 | ||
837 | struct se_lun { | 864 | struct se_lun { |
838 | /* See transport_lun_status_table */ | 865 | /* See transport_lun_status_table */ |
@@ -848,11 +875,13 @@ struct se_lun { | |||
848 | struct list_head lun_cmd_list; | 875 | struct list_head lun_cmd_list; |
849 | struct list_head lun_acl_list; | 876 | struct list_head lun_acl_list; |
850 | struct se_device *lun_se_dev; | 877 | struct se_device *lun_se_dev; |
878 | struct se_port *lun_sep; | ||
851 | struct config_group lun_group; | 879 | struct config_group lun_group; |
852 | struct se_port *lun_sep; | 880 | struct se_port_stat_grps port_stat_grps; |
853 | } ____cacheline_aligned; | 881 | } ____cacheline_aligned; |
854 | 882 | ||
855 | #define SE_LUN(c) ((struct se_lun *)(c)->se_lun) | 883 | #define SE_LUN(cmd) ((cmd)->se_lun) |
884 | #define PORT_STAT_GRP(lun) (&(lun)->port_stat_grps) | ||
856 | 885 | ||
857 | struct scsi_port_stats { | 886 | struct scsi_port_stats { |
858 | u64 cmd_pdus; | 887 | u64 cmd_pdus; |
@@ -919,11 +948,13 @@ struct se_portal_group { | |||
919 | struct config_group tpg_param_group; | 948 | struct config_group tpg_param_group; |
920 | } ____cacheline_aligned; | 949 | } ____cacheline_aligned; |
921 | 950 | ||
922 | #define TPG_TFO(se_tpg) ((struct target_core_fabric_ops *)(se_tpg)->se_tpg_tfo) | 951 | #define TPG_TFO(se_tpg) ((se_tpg)->se_tpg_tfo) |
923 | 952 | ||
924 | struct se_wwn { | 953 | struct se_wwn { |
925 | struct target_fabric_configfs *wwn_tf; | 954 | struct target_fabric_configfs *wwn_tf; |
926 | struct config_group wwn_group; | 955 | struct config_group wwn_group; |
956 | struct config_group *wwn_default_groups[2]; | ||
957 | struct config_group fabric_stat_group; | ||
927 | } ____cacheline_aligned; | 958 | } ____cacheline_aligned; |
928 | 959 | ||
929 | struct se_global { | 960 | struct se_global { |
diff --git a/include/target/target_core_configfs.h b/include/target/target_core_configfs.h index 40e6e740527c..612509592ffd 100644 --- a/include/target/target_core_configfs.h +++ b/include/target/target_core_configfs.h | |||
@@ -14,10 +14,12 @@ extern void target_fabric_configfs_deregister(struct target_fabric_configfs *); | |||
14 | struct target_fabric_configfs_template { | 14 | struct target_fabric_configfs_template { |
15 | struct config_item_type tfc_discovery_cit; | 15 | struct config_item_type tfc_discovery_cit; |
16 | struct config_item_type tfc_wwn_cit; | 16 | struct config_item_type tfc_wwn_cit; |
17 | struct config_item_type tfc_wwn_fabric_stats_cit; | ||
17 | struct config_item_type tfc_tpg_cit; | 18 | struct config_item_type tfc_tpg_cit; |
18 | struct config_item_type tfc_tpg_base_cit; | 19 | struct config_item_type tfc_tpg_base_cit; |
19 | struct config_item_type tfc_tpg_lun_cit; | 20 | struct config_item_type tfc_tpg_lun_cit; |
20 | struct config_item_type tfc_tpg_port_cit; | 21 | struct config_item_type tfc_tpg_port_cit; |
22 | struct config_item_type tfc_tpg_port_stat_cit; | ||
21 | struct config_item_type tfc_tpg_np_cit; | 23 | struct config_item_type tfc_tpg_np_cit; |
22 | struct config_item_type tfc_tpg_np_base_cit; | 24 | struct config_item_type tfc_tpg_np_base_cit; |
23 | struct config_item_type tfc_tpg_attrib_cit; | 25 | struct config_item_type tfc_tpg_attrib_cit; |
@@ -27,7 +29,9 @@ struct target_fabric_configfs_template { | |||
27 | struct config_item_type tfc_tpg_nacl_attrib_cit; | 29 | struct config_item_type tfc_tpg_nacl_attrib_cit; |
28 | struct config_item_type tfc_tpg_nacl_auth_cit; | 30 | struct config_item_type tfc_tpg_nacl_auth_cit; |
29 | struct config_item_type tfc_tpg_nacl_param_cit; | 31 | struct config_item_type tfc_tpg_nacl_param_cit; |
32 | struct config_item_type tfc_tpg_nacl_stat_cit; | ||
30 | struct config_item_type tfc_tpg_mappedlun_cit; | 33 | struct config_item_type tfc_tpg_mappedlun_cit; |
34 | struct config_item_type tfc_tpg_mappedlun_stat_cit; | ||
31 | }; | 35 | }; |
32 | 36 | ||
33 | struct target_fabric_configfs { | 37 | struct target_fabric_configfs { |
diff --git a/include/target/target_core_fabric_ops.h b/include/target/target_core_fabric_ops.h index f3ac12b019c2..5eb8b1ae59d1 100644 --- a/include/target/target_core_fabric_ops.h +++ b/include/target/target_core_fabric_ops.h | |||
@@ -8,7 +8,7 @@ struct target_core_fabric_ops { | |||
8 | * for scatterlist chaining using transport_do_task_sg_link(), | 8 | * for scatterlist chaining using transport_do_task_sg_link(), |
9 | * disabled by default | 9 | * disabled by default |
10 | */ | 10 | */ |
11 | int task_sg_chaining:1; | 11 | bool task_sg_chaining; |
12 | char *(*get_fabric_name)(void); | 12 | char *(*get_fabric_name)(void); |
13 | u8 (*get_fabric_proto_ident)(struct se_portal_group *); | 13 | u8 (*get_fabric_proto_ident)(struct se_portal_group *); |
14 | char *(*tpg_get_wwn)(struct se_portal_group *); | 14 | char *(*tpg_get_wwn)(struct se_portal_group *); |
diff --git a/include/target/target_core_tmr.h b/include/target/target_core_tmr.h index 6c8248bc2c66..bd5596807478 100644 --- a/include/target/target_core_tmr.h +++ b/include/target/target_core_tmr.h | |||
@@ -1,37 +1,29 @@ | |||
1 | #ifndef TARGET_CORE_TMR_H | 1 | #ifndef TARGET_CORE_TMR_H |
2 | #define TARGET_CORE_TMR_H | 2 | #define TARGET_CORE_TMR_H |
3 | 3 | ||
4 | /* task management function values */ | 4 | /* fabric independent task management function values */ |
5 | #ifdef ABORT_TASK | 5 | enum tcm_tmreq_table { |
6 | #undef ABORT_TASK | 6 | TMR_ABORT_TASK = 1, |
7 | #endif /* ABORT_TASK */ | 7 | TMR_ABORT_TASK_SET = 2, |
8 | #define ABORT_TASK 1 | 8 | TMR_CLEAR_ACA = 3, |
9 | #ifdef ABORT_TASK_SET | 9 | TMR_CLEAR_TASK_SET = 4, |
10 | #undef ABORT_TASK_SET | 10 | TMR_LUN_RESET = 5, |
11 | #endif /* ABORT_TASK_SET */ | 11 | TMR_TARGET_WARM_RESET = 6, |
12 | #define ABORT_TASK_SET 2 | 12 | TMR_TARGET_COLD_RESET = 7, |
13 | #ifdef CLEAR_ACA | 13 | TMR_FABRIC_TMR = 255, |
14 | #undef CLEAR_ACA | 14 | }; |
15 | #endif /* CLEAR_ACA */ | ||
16 | #define CLEAR_ACA 3 | ||
17 | #ifdef CLEAR_TASK_SET | ||
18 | #undef CLEAR_TASK_SET | ||
19 | #endif /* CLEAR_TASK_SET */ | ||
20 | #define CLEAR_TASK_SET 4 | ||
21 | #define LUN_RESET 5 | ||
22 | #define TARGET_WARM_RESET 6 | ||
23 | #define TARGET_COLD_RESET 7 | ||
24 | #define TASK_REASSIGN 8 | ||
25 | 15 | ||
26 | /* task management response values */ | 16 | /* fabric independent task management response values */ |
27 | #define TMR_FUNCTION_COMPLETE 0 | 17 | enum tcm_tmrsp_table { |
28 | #define TMR_TASK_DOES_NOT_EXIST 1 | 18 | TMR_FUNCTION_COMPLETE = 0, |
29 | #define TMR_LUN_DOES_NOT_EXIST 2 | 19 | TMR_TASK_DOES_NOT_EXIST = 1, |
30 | #define TMR_TASK_STILL_ALLEGIANT 3 | 20 | TMR_LUN_DOES_NOT_EXIST = 2, |
31 | #define TMR_TASK_FAILOVER_NOT_SUPPORTED 4 | 21 | TMR_TASK_STILL_ALLEGIANT = 3, |
32 | #define TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED 5 | 22 | TMR_TASK_FAILOVER_NOT_SUPPORTED = 4, |
33 | #define TMR_FUNCTION_AUTHORIZATION_FAILED 6 | 23 | TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED = 5, |
34 | #define TMR_FUNCTION_REJECTED 255 | 24 | TMR_FUNCTION_AUTHORIZATION_FAILED = 6, |
25 | TMR_FUNCTION_REJECTED = 255, | ||
26 | }; | ||
35 | 27 | ||
36 | extern struct kmem_cache *se_tmr_req_cache; | 28 | extern struct kmem_cache *se_tmr_req_cache; |
37 | 29 | ||
diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 2e8ec51f0615..59aa464f6ee2 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h | |||
@@ -109,6 +109,8 @@ | |||
109 | struct se_mem; | 109 | struct se_mem; |
110 | struct se_subsystem_api; | 110 | struct se_subsystem_api; |
111 | 111 | ||
112 | extern struct kmem_cache *se_mem_cache; | ||
113 | |||
112 | extern int init_se_global(void); | 114 | extern int init_se_global(void); |
113 | extern void release_se_global(void); | 115 | extern void release_se_global(void); |
114 | extern void init_scsi_index_table(void); | 116 | extern void init_scsi_index_table(void); |
@@ -190,6 +192,8 @@ extern void transport_generic_process_write(struct se_cmd *); | |||
190 | extern int transport_generic_do_tmr(struct se_cmd *); | 192 | extern int transport_generic_do_tmr(struct se_cmd *); |
191 | /* From target_core_alua.c */ | 193 | /* From target_core_alua.c */ |
192 | extern int core_alua_check_nonop_delay(struct se_cmd *); | 194 | extern int core_alua_check_nonop_delay(struct se_cmd *); |
195 | /* From target_core_cdb.c */ | ||
196 | extern int transport_emulate_control_cdb(struct se_task *); | ||
193 | 197 | ||
194 | /* | 198 | /* |
195 | * Each se_transport_task_t can have N number of possible struct se_task's | 199 | * Each se_transport_task_t can have N number of possible struct se_task's |
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h new file mode 100644 index 000000000000..f445cff66ab7 --- /dev/null +++ b/include/trace/events/btrfs.h | |||
@@ -0,0 +1,667 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM btrfs | ||
3 | |||
4 | #if !defined(_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_BTRFS_H | ||
6 | |||
7 | #include <linux/writeback.h> | ||
8 | #include <linux/tracepoint.h> | ||
9 | |||
10 | struct btrfs_root; | ||
11 | struct btrfs_fs_info; | ||
12 | struct btrfs_inode; | ||
13 | struct extent_map; | ||
14 | struct btrfs_ordered_extent; | ||
15 | struct btrfs_delayed_ref_node; | ||
16 | struct btrfs_delayed_tree_ref; | ||
17 | struct btrfs_delayed_data_ref; | ||
18 | struct btrfs_delayed_ref_head; | ||
19 | struct map_lookup; | ||
20 | struct extent_buffer; | ||
21 | |||
22 | #define show_ref_type(type) \ | ||
23 | __print_symbolic(type, \ | ||
24 | { BTRFS_TREE_BLOCK_REF_KEY, "TREE_BLOCK_REF" }, \ | ||
25 | { BTRFS_EXTENT_DATA_REF_KEY, "EXTENT_DATA_REF" }, \ | ||
26 | { BTRFS_EXTENT_REF_V0_KEY, "EXTENT_REF_V0" }, \ | ||
27 | { BTRFS_SHARED_BLOCK_REF_KEY, "SHARED_BLOCK_REF" }, \ | ||
28 | { BTRFS_SHARED_DATA_REF_KEY, "SHARED_DATA_REF" }) | ||
29 | |||
30 | #define __show_root_type(obj) \ | ||
31 | __print_symbolic(obj, \ | ||
32 | { BTRFS_ROOT_TREE_OBJECTID, "ROOT_TREE" }, \ | ||
33 | { BTRFS_EXTENT_TREE_OBJECTID, "EXTENT_TREE" }, \ | ||
34 | { BTRFS_CHUNK_TREE_OBJECTID, "CHUNK_TREE" }, \ | ||
35 | { BTRFS_DEV_TREE_OBJECTID, "DEV_TREE" }, \ | ||
36 | { BTRFS_FS_TREE_OBJECTID, "FS_TREE" }, \ | ||
37 | { BTRFS_ROOT_TREE_DIR_OBJECTID, "ROOT_TREE_DIR" }, \ | ||
38 | { BTRFS_CSUM_TREE_OBJECTID, "CSUM_TREE" }, \ | ||
39 | { BTRFS_TREE_LOG_OBJECTID, "TREE_LOG" }, \ | ||
40 | { BTRFS_TREE_RELOC_OBJECTID, "TREE_RELOC" }, \ | ||
41 | { BTRFS_DATA_RELOC_TREE_OBJECTID, "DATA_RELOC_TREE" }) | ||
42 | |||
43 | #define show_root_type(obj) \ | ||
44 | obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) || \ | ||
45 | (obj <= BTRFS_CSUM_TREE_OBJECTID )) ? __show_root_type(obj) : "-" | ||
46 | |||
47 | TRACE_EVENT(btrfs_transaction_commit, | ||
48 | |||
49 | TP_PROTO(struct btrfs_root *root), | ||
50 | |||
51 | TP_ARGS(root), | ||
52 | |||
53 | TP_STRUCT__entry( | ||
54 | __field( u64, generation ) | ||
55 | __field( u64, root_objectid ) | ||
56 | ), | ||
57 | |||
58 | TP_fast_assign( | ||
59 | __entry->generation = root->fs_info->generation; | ||
60 | __entry->root_objectid = root->root_key.objectid; | ||
61 | ), | ||
62 | |||
63 | TP_printk("root = %llu(%s), gen = %llu", | ||
64 | show_root_type(__entry->root_objectid), | ||
65 | (unsigned long long)__entry->generation) | ||
66 | ); | ||
67 | |||
68 | DECLARE_EVENT_CLASS(btrfs__inode, | ||
69 | |||
70 | TP_PROTO(struct inode *inode), | ||
71 | |||
72 | TP_ARGS(inode), | ||
73 | |||
74 | TP_STRUCT__entry( | ||
75 | __field( ino_t, ino ) | ||
76 | __field( blkcnt_t, blocks ) | ||
77 | __field( u64, disk_i_size ) | ||
78 | __field( u64, generation ) | ||
79 | __field( u64, last_trans ) | ||
80 | __field( u64, logged_trans ) | ||
81 | __field( u64, root_objectid ) | ||
82 | ), | ||
83 | |||
84 | TP_fast_assign( | ||
85 | __entry->ino = inode->i_ino; | ||
86 | __entry->blocks = inode->i_blocks; | ||
87 | __entry->disk_i_size = BTRFS_I(inode)->disk_i_size; | ||
88 | __entry->generation = BTRFS_I(inode)->generation; | ||
89 | __entry->last_trans = BTRFS_I(inode)->last_trans; | ||
90 | __entry->logged_trans = BTRFS_I(inode)->logged_trans; | ||
91 | __entry->root_objectid = | ||
92 | BTRFS_I(inode)->root->root_key.objectid; | ||
93 | ), | ||
94 | |||
95 | TP_printk("root = %llu(%s), gen = %llu, ino = %lu, blocks = %llu, " | ||
96 | "disk_i_size = %llu, last_trans = %llu, logged_trans = %llu", | ||
97 | show_root_type(__entry->root_objectid), | ||
98 | (unsigned long long)__entry->generation, | ||
99 | (unsigned long)__entry->ino, | ||
100 | (unsigned long long)__entry->blocks, | ||
101 | (unsigned long long)__entry->disk_i_size, | ||
102 | (unsigned long long)__entry->last_trans, | ||
103 | (unsigned long long)__entry->logged_trans) | ||
104 | ); | ||
105 | |||
106 | DEFINE_EVENT(btrfs__inode, btrfs_inode_new, | ||
107 | |||
108 | TP_PROTO(struct inode *inode), | ||
109 | |||
110 | TP_ARGS(inode) | ||
111 | ); | ||
112 | |||
113 | DEFINE_EVENT(btrfs__inode, btrfs_inode_request, | ||
114 | |||
115 | TP_PROTO(struct inode *inode), | ||
116 | |||
117 | TP_ARGS(inode) | ||
118 | ); | ||
119 | |||
120 | DEFINE_EVENT(btrfs__inode, btrfs_inode_evict, | ||
121 | |||
122 | TP_PROTO(struct inode *inode), | ||
123 | |||
124 | TP_ARGS(inode) | ||
125 | ); | ||
126 | |||
127 | #define __show_map_type(type) \ | ||
128 | __print_symbolic(type, \ | ||
129 | { EXTENT_MAP_LAST_BYTE, "LAST_BYTE" }, \ | ||
130 | { EXTENT_MAP_HOLE, "HOLE" }, \ | ||
131 | { EXTENT_MAP_INLINE, "INLINE" }, \ | ||
132 | { EXTENT_MAP_DELALLOC, "DELALLOC" }) | ||
133 | |||
134 | #define show_map_type(type) \ | ||
135 | type, (type >= EXTENT_MAP_LAST_BYTE) ? "-" : __show_map_type(type) | ||
136 | |||
137 | #define show_map_flags(flag) \ | ||
138 | __print_flags(flag, "|", \ | ||
139 | { EXTENT_FLAG_PINNED, "PINNED" }, \ | ||
140 | { EXTENT_FLAG_COMPRESSED, "COMPRESSED" }, \ | ||
141 | { EXTENT_FLAG_VACANCY, "VACANCY" }, \ | ||
142 | { EXTENT_FLAG_PREALLOC, "PREALLOC" }) | ||
143 | |||
144 | TRACE_EVENT(btrfs_get_extent, | ||
145 | |||
146 | TP_PROTO(struct btrfs_root *root, struct extent_map *map), | ||
147 | |||
148 | TP_ARGS(root, map), | ||
149 | |||
150 | TP_STRUCT__entry( | ||
151 | __field( u64, root_objectid ) | ||
152 | __field( u64, start ) | ||
153 | __field( u64, len ) | ||
154 | __field( u64, orig_start ) | ||
155 | __field( u64, block_start ) | ||
156 | __field( u64, block_len ) | ||
157 | __field( unsigned long, flags ) | ||
158 | __field( int, refs ) | ||
159 | __field( unsigned int, compress_type ) | ||
160 | ), | ||
161 | |||
162 | TP_fast_assign( | ||
163 | __entry->root_objectid = root->root_key.objectid; | ||
164 | __entry->start = map->start; | ||
165 | __entry->len = map->len; | ||
166 | __entry->orig_start = map->orig_start; | ||
167 | __entry->block_start = map->block_start; | ||
168 | __entry->block_len = map->block_len; | ||
169 | __entry->flags = map->flags; | ||
170 | __entry->refs = atomic_read(&map->refs); | ||
171 | __entry->compress_type = map->compress_type; | ||
172 | ), | ||
173 | |||
174 | TP_printk("root = %llu(%s), start = %llu, len = %llu, " | ||
175 | "orig_start = %llu, block_start = %llu(%s), " | ||
176 | "block_len = %llu, flags = %s, refs = %u, " | ||
177 | "compress_type = %u", | ||
178 | show_root_type(__entry->root_objectid), | ||
179 | (unsigned long long)__entry->start, | ||
180 | (unsigned long long)__entry->len, | ||
181 | (unsigned long long)__entry->orig_start, | ||
182 | show_map_type(__entry->block_start), | ||
183 | (unsigned long long)__entry->block_len, | ||
184 | show_map_flags(__entry->flags), | ||
185 | __entry->refs, __entry->compress_type) | ||
186 | ); | ||
187 | |||
188 | #define show_ordered_flags(flags) \ | ||
189 | __print_symbolic(flags, \ | ||
190 | { BTRFS_ORDERED_IO_DONE, "IO_DONE" }, \ | ||
191 | { BTRFS_ORDERED_COMPLETE, "COMPLETE" }, \ | ||
192 | { BTRFS_ORDERED_NOCOW, "NOCOW" }, \ | ||
193 | { BTRFS_ORDERED_COMPRESSED, "COMPRESSED" }, \ | ||
194 | { BTRFS_ORDERED_PREALLOC, "PREALLOC" }, \ | ||
195 | { BTRFS_ORDERED_DIRECT, "DIRECT" }) | ||
196 | |||
197 | DECLARE_EVENT_CLASS(btrfs__ordered_extent, | ||
198 | |||
199 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
200 | |||
201 | TP_ARGS(inode, ordered), | ||
202 | |||
203 | TP_STRUCT__entry( | ||
204 | __field( ino_t, ino ) | ||
205 | __field( u64, file_offset ) | ||
206 | __field( u64, start ) | ||
207 | __field( u64, len ) | ||
208 | __field( u64, disk_len ) | ||
209 | __field( u64, bytes_left ) | ||
210 | __field( unsigned long, flags ) | ||
211 | __field( int, compress_type ) | ||
212 | __field( int, refs ) | ||
213 | __field( u64, root_objectid ) | ||
214 | ), | ||
215 | |||
216 | TP_fast_assign( | ||
217 | __entry->ino = inode->i_ino; | ||
218 | __entry->file_offset = ordered->file_offset; | ||
219 | __entry->start = ordered->start; | ||
220 | __entry->len = ordered->len; | ||
221 | __entry->disk_len = ordered->disk_len; | ||
222 | __entry->bytes_left = ordered->bytes_left; | ||
223 | __entry->flags = ordered->flags; | ||
224 | __entry->compress_type = ordered->compress_type; | ||
225 | __entry->refs = atomic_read(&ordered->refs); | ||
226 | __entry->root_objectid = | ||
227 | BTRFS_I(inode)->root->root_key.objectid; | ||
228 | ), | ||
229 | |||
230 | TP_printk("root = %llu(%s), ino = %llu, file_offset = %llu, " | ||
231 | "start = %llu, len = %llu, disk_len = %llu, " | ||
232 | "bytes_left = %llu, flags = %s, compress_type = %d, " | ||
233 | "refs = %d", | ||
234 | show_root_type(__entry->root_objectid), | ||
235 | (unsigned long long)__entry->ino, | ||
236 | (unsigned long long)__entry->file_offset, | ||
237 | (unsigned long long)__entry->start, | ||
238 | (unsigned long long)__entry->len, | ||
239 | (unsigned long long)__entry->disk_len, | ||
240 | (unsigned long long)__entry->bytes_left, | ||
241 | show_ordered_flags(__entry->flags), | ||
242 | __entry->compress_type, __entry->refs) | ||
243 | ); | ||
244 | |||
245 | DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_add, | ||
246 | |||
247 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
248 | |||
249 | TP_ARGS(inode, ordered) | ||
250 | ); | ||
251 | |||
252 | DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_remove, | ||
253 | |||
254 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
255 | |||
256 | TP_ARGS(inode, ordered) | ||
257 | ); | ||
258 | |||
259 | DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_start, | ||
260 | |||
261 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
262 | |||
263 | TP_ARGS(inode, ordered) | ||
264 | ); | ||
265 | |||
266 | DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_put, | ||
267 | |||
268 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
269 | |||
270 | TP_ARGS(inode, ordered) | ||
271 | ); | ||
272 | |||
273 | DECLARE_EVENT_CLASS(btrfs__writepage, | ||
274 | |||
275 | TP_PROTO(struct page *page, struct inode *inode, | ||
276 | struct writeback_control *wbc), | ||
277 | |||
278 | TP_ARGS(page, inode, wbc), | ||
279 | |||
280 | TP_STRUCT__entry( | ||
281 | __field( ino_t, ino ) | ||
282 | __field( pgoff_t, index ) | ||
283 | __field( long, nr_to_write ) | ||
284 | __field( long, pages_skipped ) | ||
285 | __field( loff_t, range_start ) | ||
286 | __field( loff_t, range_end ) | ||
287 | __field( char, nonblocking ) | ||
288 | __field( char, for_kupdate ) | ||
289 | __field( char, for_reclaim ) | ||
290 | __field( char, range_cyclic ) | ||
291 | __field( pgoff_t, writeback_index ) | ||
292 | __field( u64, root_objectid ) | ||
293 | ), | ||
294 | |||
295 | TP_fast_assign( | ||
296 | __entry->ino = inode->i_ino; | ||
297 | __entry->index = page->index; | ||
298 | __entry->nr_to_write = wbc->nr_to_write; | ||
299 | __entry->pages_skipped = wbc->pages_skipped; | ||
300 | __entry->range_start = wbc->range_start; | ||
301 | __entry->range_end = wbc->range_end; | ||
302 | __entry->nonblocking = wbc->nonblocking; | ||
303 | __entry->for_kupdate = wbc->for_kupdate; | ||
304 | __entry->for_reclaim = wbc->for_reclaim; | ||
305 | __entry->range_cyclic = wbc->range_cyclic; | ||
306 | __entry->writeback_index = inode->i_mapping->writeback_index; | ||
307 | __entry->root_objectid = | ||
308 | BTRFS_I(inode)->root->root_key.objectid; | ||
309 | ), | ||
310 | |||
311 | TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, " | ||
312 | "nr_to_write = %ld, pages_skipped = %ld, range_start = %llu, " | ||
313 | "range_end = %llu, nonblocking = %d, for_kupdate = %d, " | ||
314 | "for_reclaim = %d, range_cyclic = %d, writeback_index = %lu", | ||
315 | show_root_type(__entry->root_objectid), | ||
316 | (unsigned long)__entry->ino, __entry->index, | ||
317 | __entry->nr_to_write, __entry->pages_skipped, | ||
318 | __entry->range_start, __entry->range_end, | ||
319 | __entry->nonblocking, __entry->for_kupdate, | ||
320 | __entry->for_reclaim, __entry->range_cyclic, | ||
321 | (unsigned long)__entry->writeback_index) | ||
322 | ); | ||
323 | |||
324 | DEFINE_EVENT(btrfs__writepage, __extent_writepage, | ||
325 | |||
326 | TP_PROTO(struct page *page, struct inode *inode, | ||
327 | struct writeback_control *wbc), | ||
328 | |||
329 | TP_ARGS(page, inode, wbc) | ||
330 | ); | ||
331 | |||
332 | TRACE_EVENT(btrfs_writepage_end_io_hook, | ||
333 | |||
334 | TP_PROTO(struct page *page, u64 start, u64 end, int uptodate), | ||
335 | |||
336 | TP_ARGS(page, start, end, uptodate), | ||
337 | |||
338 | TP_STRUCT__entry( | ||
339 | __field( ino_t, ino ) | ||
340 | __field( pgoff_t, index ) | ||
341 | __field( u64, start ) | ||
342 | __field( u64, end ) | ||
343 | __field( int, uptodate ) | ||
344 | __field( u64, root_objectid ) | ||
345 | ), | ||
346 | |||
347 | TP_fast_assign( | ||
348 | __entry->ino = page->mapping->host->i_ino; | ||
349 | __entry->index = page->index; | ||
350 | __entry->start = start; | ||
351 | __entry->end = end; | ||
352 | __entry->uptodate = uptodate; | ||
353 | __entry->root_objectid = | ||
354 | BTRFS_I(page->mapping->host)->root->root_key.objectid; | ||
355 | ), | ||
356 | |||
357 | TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, start = %llu, " | ||
358 | "end = %llu, uptodate = %d", | ||
359 | show_root_type(__entry->root_objectid), | ||
360 | (unsigned long)__entry->ino, (unsigned long)__entry->index, | ||
361 | (unsigned long long)__entry->start, | ||
362 | (unsigned long long)__entry->end, __entry->uptodate) | ||
363 | ); | ||
364 | |||
365 | TRACE_EVENT(btrfs_sync_file, | ||
366 | |||
367 | TP_PROTO(struct file *file, int datasync), | ||
368 | |||
369 | TP_ARGS(file, datasync), | ||
370 | |||
371 | TP_STRUCT__entry( | ||
372 | __field( ino_t, ino ) | ||
373 | __field( ino_t, parent ) | ||
374 | __field( int, datasync ) | ||
375 | __field( u64, root_objectid ) | ||
376 | ), | ||
377 | |||
378 | TP_fast_assign( | ||
379 | struct dentry *dentry = file->f_path.dentry; | ||
380 | struct inode *inode = dentry->d_inode; | ||
381 | |||
382 | __entry->ino = inode->i_ino; | ||
383 | __entry->parent = dentry->d_parent->d_inode->i_ino; | ||
384 | __entry->datasync = datasync; | ||
385 | __entry->root_objectid = | ||
386 | BTRFS_I(inode)->root->root_key.objectid; | ||
387 | ), | ||
388 | |||
389 | TP_printk("root = %llu(%s), ino = %ld, parent = %ld, datasync = %d", | ||
390 | show_root_type(__entry->root_objectid), | ||
391 | (unsigned long)__entry->ino, (unsigned long)__entry->parent, | ||
392 | __entry->datasync) | ||
393 | ); | ||
394 | |||
395 | TRACE_EVENT(btrfs_sync_fs, | ||
396 | |||
397 | TP_PROTO(int wait), | ||
398 | |||
399 | TP_ARGS(wait), | ||
400 | |||
401 | TP_STRUCT__entry( | ||
402 | __field( int, wait ) | ||
403 | ), | ||
404 | |||
405 | TP_fast_assign( | ||
406 | __entry->wait = wait; | ||
407 | ), | ||
408 | |||
409 | TP_printk("wait = %d", __entry->wait) | ||
410 | ); | ||
411 | |||
412 | #define show_ref_action(action) \ | ||
413 | __print_symbolic(action, \ | ||
414 | { BTRFS_ADD_DELAYED_REF, "ADD_DELAYED_REF" }, \ | ||
415 | { BTRFS_DROP_DELAYED_REF, "DROP_DELAYED_REF" }, \ | ||
416 | { BTRFS_ADD_DELAYED_EXTENT, "ADD_DELAYED_EXTENT" }, \ | ||
417 | { BTRFS_UPDATE_DELAYED_HEAD, "UPDATE_DELAYED_HEAD" }) | ||
418 | |||
419 | |||
420 | TRACE_EVENT(btrfs_delayed_tree_ref, | ||
421 | |||
422 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
423 | struct btrfs_delayed_tree_ref *full_ref, | ||
424 | int action), | ||
425 | |||
426 | TP_ARGS(ref, full_ref, action), | ||
427 | |||
428 | TP_STRUCT__entry( | ||
429 | __field( u64, bytenr ) | ||
430 | __field( u64, num_bytes ) | ||
431 | __field( int, action ) | ||
432 | __field( u64, parent ) | ||
433 | __field( u64, ref_root ) | ||
434 | __field( int, level ) | ||
435 | __field( int, type ) | ||
436 | ), | ||
437 | |||
438 | TP_fast_assign( | ||
439 | __entry->bytenr = ref->bytenr; | ||
440 | __entry->num_bytes = ref->num_bytes; | ||
441 | __entry->action = action; | ||
442 | __entry->parent = full_ref->parent; | ||
443 | __entry->ref_root = full_ref->root; | ||
444 | __entry->level = full_ref->level; | ||
445 | __entry->type = ref->type; | ||
446 | ), | ||
447 | |||
448 | TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, " | ||
449 | "parent = %llu(%s), ref_root = %llu(%s), level = %d, " | ||
450 | "type = %s", | ||
451 | (unsigned long long)__entry->bytenr, | ||
452 | (unsigned long long)__entry->num_bytes, | ||
453 | show_ref_action(__entry->action), | ||
454 | show_root_type(__entry->parent), | ||
455 | show_root_type(__entry->ref_root), | ||
456 | __entry->level, show_ref_type(__entry->type)) | ||
457 | ); | ||
458 | |||
459 | TRACE_EVENT(btrfs_delayed_data_ref, | ||
460 | |||
461 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
462 | struct btrfs_delayed_data_ref *full_ref, | ||
463 | int action), | ||
464 | |||
465 | TP_ARGS(ref, full_ref, action), | ||
466 | |||
467 | TP_STRUCT__entry( | ||
468 | __field( u64, bytenr ) | ||
469 | __field( u64, num_bytes ) | ||
470 | __field( int, action ) | ||
471 | __field( u64, parent ) | ||
472 | __field( u64, ref_root ) | ||
473 | __field( u64, owner ) | ||
474 | __field( u64, offset ) | ||
475 | __field( int, type ) | ||
476 | ), | ||
477 | |||
478 | TP_fast_assign( | ||
479 | __entry->bytenr = ref->bytenr; | ||
480 | __entry->num_bytes = ref->num_bytes; | ||
481 | __entry->action = action; | ||
482 | __entry->parent = full_ref->parent; | ||
483 | __entry->ref_root = full_ref->root; | ||
484 | __entry->owner = full_ref->objectid; | ||
485 | __entry->offset = full_ref->offset; | ||
486 | __entry->type = ref->type; | ||
487 | ), | ||
488 | |||
489 | TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, " | ||
490 | "parent = %llu(%s), ref_root = %llu(%s), owner = %llu, " | ||
491 | "offset = %llu, type = %s", | ||
492 | (unsigned long long)__entry->bytenr, | ||
493 | (unsigned long long)__entry->num_bytes, | ||
494 | show_ref_action(__entry->action), | ||
495 | show_root_type(__entry->parent), | ||
496 | show_root_type(__entry->ref_root), | ||
497 | (unsigned long long)__entry->owner, | ||
498 | (unsigned long long)__entry->offset, | ||
499 | show_ref_type(__entry->type)) | ||
500 | ); | ||
501 | |||
502 | TRACE_EVENT(btrfs_delayed_ref_head, | ||
503 | |||
504 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
505 | struct btrfs_delayed_ref_head *head_ref, | ||
506 | int action), | ||
507 | |||
508 | TP_ARGS(ref, head_ref, action), | ||
509 | |||
510 | TP_STRUCT__entry( | ||
511 | __field( u64, bytenr ) | ||
512 | __field( u64, num_bytes ) | ||
513 | __field( int, action ) | ||
514 | __field( int, is_data ) | ||
515 | ), | ||
516 | |||
517 | TP_fast_assign( | ||
518 | __entry->bytenr = ref->bytenr; | ||
519 | __entry->num_bytes = ref->num_bytes; | ||
520 | __entry->action = action; | ||
521 | __entry->is_data = head_ref->is_data; | ||
522 | ), | ||
523 | |||
524 | TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, is_data = %d", | ||
525 | (unsigned long long)__entry->bytenr, | ||
526 | (unsigned long long)__entry->num_bytes, | ||
527 | show_ref_action(__entry->action), | ||
528 | __entry->is_data) | ||
529 | ); | ||
530 | |||
531 | #define show_chunk_type(type) \ | ||
532 | __print_flags(type, "|", \ | ||
533 | { BTRFS_BLOCK_GROUP_DATA, "DATA" }, \ | ||
534 | { BTRFS_BLOCK_GROUP_SYSTEM, "SYSTEM"}, \ | ||
535 | { BTRFS_BLOCK_GROUP_METADATA, "METADATA"}, \ | ||
536 | { BTRFS_BLOCK_GROUP_RAID0, "RAID0" }, \ | ||
537 | { BTRFS_BLOCK_GROUP_RAID1, "RAID1" }, \ | ||
538 | { BTRFS_BLOCK_GROUP_DUP, "DUP" }, \ | ||
539 | { BTRFS_BLOCK_GROUP_RAID10, "RAID10"}) | ||
540 | |||
541 | DECLARE_EVENT_CLASS(btrfs__chunk, | ||
542 | |||
543 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | ||
544 | u64 offset, u64 size), | ||
545 | |||
546 | TP_ARGS(root, map, offset, size), | ||
547 | |||
548 | TP_STRUCT__entry( | ||
549 | __field( int, num_stripes ) | ||
550 | __field( u64, type ) | ||
551 | __field( int, sub_stripes ) | ||
552 | __field( u64, offset ) | ||
553 | __field( u64, size ) | ||
554 | __field( u64, root_objectid ) | ||
555 | ), | ||
556 | |||
557 | TP_fast_assign( | ||
558 | __entry->num_stripes = map->num_stripes; | ||
559 | __entry->type = map->type; | ||
560 | __entry->sub_stripes = map->sub_stripes; | ||
561 | __entry->offset = offset; | ||
562 | __entry->size = size; | ||
563 | __entry->root_objectid = root->root_key.objectid; | ||
564 | ), | ||
565 | |||
566 | TP_printk("root = %llu(%s), offset = %llu, size = %llu, " | ||
567 | "num_stripes = %d, sub_stripes = %d, type = %s", | ||
568 | show_root_type(__entry->root_objectid), | ||
569 | (unsigned long long)__entry->offset, | ||
570 | (unsigned long long)__entry->size, | ||
571 | __entry->num_stripes, __entry->sub_stripes, | ||
572 | show_chunk_type(__entry->type)) | ||
573 | ); | ||
574 | |||
575 | DEFINE_EVENT(btrfs__chunk, btrfs_chunk_alloc, | ||
576 | |||
577 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | ||
578 | u64 offset, u64 size), | ||
579 | |||
580 | TP_ARGS(root, map, offset, size) | ||
581 | ); | ||
582 | |||
583 | DEFINE_EVENT(btrfs__chunk, btrfs_chunk_free, | ||
584 | |||
585 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | ||
586 | u64 offset, u64 size), | ||
587 | |||
588 | TP_ARGS(root, map, offset, size) | ||
589 | ); | ||
590 | |||
591 | TRACE_EVENT(btrfs_cow_block, | ||
592 | |||
593 | TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf, | ||
594 | struct extent_buffer *cow), | ||
595 | |||
596 | TP_ARGS(root, buf, cow), | ||
597 | |||
598 | TP_STRUCT__entry( | ||
599 | __field( u64, root_objectid ) | ||
600 | __field( u64, buf_start ) | ||
601 | __field( int, refs ) | ||
602 | __field( u64, cow_start ) | ||
603 | __field( int, buf_level ) | ||
604 | __field( int, cow_level ) | ||
605 | ), | ||
606 | |||
607 | TP_fast_assign( | ||
608 | __entry->root_objectid = root->root_key.objectid; | ||
609 | __entry->buf_start = buf->start; | ||
610 | __entry->refs = atomic_read(&buf->refs); | ||
611 | __entry->cow_start = cow->start; | ||
612 | __entry->buf_level = btrfs_header_level(buf); | ||
613 | __entry->cow_level = btrfs_header_level(cow); | ||
614 | ), | ||
615 | |||
616 | TP_printk("root = %llu(%s), refs = %d, orig_buf = %llu " | ||
617 | "(orig_level = %d), cow_buf = %llu (cow_level = %d)", | ||
618 | show_root_type(__entry->root_objectid), | ||
619 | __entry->refs, | ||
620 | (unsigned long long)__entry->buf_start, | ||
621 | __entry->buf_level, | ||
622 | (unsigned long long)__entry->cow_start, | ||
623 | __entry->cow_level) | ||
624 | ); | ||
625 | |||
626 | DECLARE_EVENT_CLASS(btrfs__reserved_extent, | ||
627 | |||
628 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | ||
629 | |||
630 | TP_ARGS(root, start, len), | ||
631 | |||
632 | TP_STRUCT__entry( | ||
633 | __field( u64, root_objectid ) | ||
634 | __field( u64, start ) | ||
635 | __field( u64, len ) | ||
636 | ), | ||
637 | |||
638 | TP_fast_assign( | ||
639 | __entry->root_objectid = root->root_key.objectid; | ||
640 | __entry->start = start; | ||
641 | __entry->len = len; | ||
642 | ), | ||
643 | |||
644 | TP_printk("root = %llu(%s), start = %llu, len = %llu", | ||
645 | show_root_type(__entry->root_objectid), | ||
646 | (unsigned long long)__entry->start, | ||
647 | (unsigned long long)__entry->len) | ||
648 | ); | ||
649 | |||
650 | DEFINE_EVENT(btrfs__reserved_extent, btrfs_reserved_extent_alloc, | ||
651 | |||
652 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | ||
653 | |||
654 | TP_ARGS(root, start, len) | ||
655 | ); | ||
656 | |||
657 | DEFINE_EVENT(btrfs__reserved_extent, btrfs_reserved_extent_free, | ||
658 | |||
659 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | ||
660 | |||
661 | TP_ARGS(root, start, len) | ||
662 | ); | ||
663 | |||
664 | #endif /* _TRACE_BTRFS_H */ | ||
665 | |||
666 | /* This part must be outside protection */ | ||
667 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index e5e345fb2a5c..e09592d2f916 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -21,8 +21,7 @@ TRACE_EVENT(ext4_free_inode, | |||
21 | TP_ARGS(inode), | 21 | TP_ARGS(inode), |
22 | 22 | ||
23 | TP_STRUCT__entry( | 23 | TP_STRUCT__entry( |
24 | __field( int, dev_major ) | 24 | __field( dev_t, dev ) |
25 | __field( int, dev_minor ) | ||
26 | __field( ino_t, ino ) | 25 | __field( ino_t, ino ) |
27 | __field( umode_t, mode ) | 26 | __field( umode_t, mode ) |
28 | __field( uid_t, uid ) | 27 | __field( uid_t, uid ) |
@@ -31,8 +30,7 @@ TRACE_EVENT(ext4_free_inode, | |||
31 | ), | 30 | ), |
32 | 31 | ||
33 | TP_fast_assign( | 32 | TP_fast_assign( |
34 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 33 | __entry->dev = inode->i_sb->s_dev; |
35 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
36 | __entry->ino = inode->i_ino; | 34 | __entry->ino = inode->i_ino; |
37 | __entry->mode = inode->i_mode; | 35 | __entry->mode = inode->i_mode; |
38 | __entry->uid = inode->i_uid; | 36 | __entry->uid = inode->i_uid; |
@@ -41,9 +39,9 @@ TRACE_EVENT(ext4_free_inode, | |||
41 | ), | 39 | ), |
42 | 40 | ||
43 | TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu", | 41 | TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu", |
44 | __entry->dev_major, __entry->dev_minor, | 42 | MAJOR(__entry->dev), MINOR(__entry->dev), |
45 | (unsigned long) __entry->ino, __entry->mode, | 43 | (unsigned long) __entry->ino, |
46 | __entry->uid, __entry->gid, | 44 | __entry->mode, __entry->uid, __entry->gid, |
47 | (unsigned long long) __entry->blocks) | 45 | (unsigned long long) __entry->blocks) |
48 | ); | 46 | ); |
49 | 47 | ||
@@ -53,21 +51,19 @@ TRACE_EVENT(ext4_request_inode, | |||
53 | TP_ARGS(dir, mode), | 51 | TP_ARGS(dir, mode), |
54 | 52 | ||
55 | TP_STRUCT__entry( | 53 | TP_STRUCT__entry( |
56 | __field( int, dev_major ) | 54 | __field( dev_t, dev ) |
57 | __field( int, dev_minor ) | ||
58 | __field( ino_t, dir ) | 55 | __field( ino_t, dir ) |
59 | __field( umode_t, mode ) | 56 | __field( umode_t, mode ) |
60 | ), | 57 | ), |
61 | 58 | ||
62 | TP_fast_assign( | 59 | TP_fast_assign( |
63 | __entry->dev_major = MAJOR(dir->i_sb->s_dev); | 60 | __entry->dev = dir->i_sb->s_dev; |
64 | __entry->dev_minor = MINOR(dir->i_sb->s_dev); | ||
65 | __entry->dir = dir->i_ino; | 61 | __entry->dir = dir->i_ino; |
66 | __entry->mode = mode; | 62 | __entry->mode = mode; |
67 | ), | 63 | ), |
68 | 64 | ||
69 | TP_printk("dev %d,%d dir %lu mode 0%o", | 65 | TP_printk("dev %d,%d dir %lu mode 0%o", |
70 | __entry->dev_major, __entry->dev_minor, | 66 | MAJOR(__entry->dev), MINOR(__entry->dev), |
71 | (unsigned long) __entry->dir, __entry->mode) | 67 | (unsigned long) __entry->dir, __entry->mode) |
72 | ); | 68 | ); |
73 | 69 | ||
@@ -77,23 +73,21 @@ TRACE_EVENT(ext4_allocate_inode, | |||
77 | TP_ARGS(inode, dir, mode), | 73 | TP_ARGS(inode, dir, mode), |
78 | 74 | ||
79 | TP_STRUCT__entry( | 75 | TP_STRUCT__entry( |
80 | __field( int, dev_major ) | 76 | __field( dev_t, dev ) |
81 | __field( int, dev_minor ) | ||
82 | __field( ino_t, ino ) | 77 | __field( ino_t, ino ) |
83 | __field( ino_t, dir ) | 78 | __field( ino_t, dir ) |
84 | __field( umode_t, mode ) | 79 | __field( umode_t, mode ) |
85 | ), | 80 | ), |
86 | 81 | ||
87 | TP_fast_assign( | 82 | TP_fast_assign( |
88 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 83 | __entry->dev = inode->i_sb->s_dev; |
89 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
90 | __entry->ino = inode->i_ino; | 84 | __entry->ino = inode->i_ino; |
91 | __entry->dir = dir->i_ino; | 85 | __entry->dir = dir->i_ino; |
92 | __entry->mode = mode; | 86 | __entry->mode = mode; |
93 | ), | 87 | ), |
94 | 88 | ||
95 | TP_printk("dev %d,%d ino %lu dir %lu mode 0%o", | 89 | TP_printk("dev %d,%d ino %lu dir %lu mode 0%o", |
96 | __entry->dev_major, __entry->dev_minor, | 90 | MAJOR(__entry->dev), MINOR(__entry->dev), |
97 | (unsigned long) __entry->ino, | 91 | (unsigned long) __entry->ino, |
98 | (unsigned long) __entry->dir, __entry->mode) | 92 | (unsigned long) __entry->dir, __entry->mode) |
99 | ); | 93 | ); |
@@ -104,21 +98,19 @@ TRACE_EVENT(ext4_evict_inode, | |||
104 | TP_ARGS(inode), | 98 | TP_ARGS(inode), |
105 | 99 | ||
106 | TP_STRUCT__entry( | 100 | TP_STRUCT__entry( |
107 | __field( int, dev_major ) | 101 | __field( dev_t, dev ) |
108 | __field( int, dev_minor ) | ||
109 | __field( ino_t, ino ) | 102 | __field( ino_t, ino ) |
110 | __field( int, nlink ) | 103 | __field( int, nlink ) |
111 | ), | 104 | ), |
112 | 105 | ||
113 | TP_fast_assign( | 106 | TP_fast_assign( |
114 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 107 | __entry->dev = inode->i_sb->s_dev; |
115 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
116 | __entry->ino = inode->i_ino; | 108 | __entry->ino = inode->i_ino; |
117 | __entry->nlink = inode->i_nlink; | 109 | __entry->nlink = inode->i_nlink; |
118 | ), | 110 | ), |
119 | 111 | ||
120 | TP_printk("dev %d,%d ino %lu nlink %d", | 112 | TP_printk("dev %d,%d ino %lu nlink %d", |
121 | __entry->dev_major, __entry->dev_minor, | 113 | MAJOR(__entry->dev), MINOR(__entry->dev), |
122 | (unsigned long) __entry->ino, __entry->nlink) | 114 | (unsigned long) __entry->ino, __entry->nlink) |
123 | ); | 115 | ); |
124 | 116 | ||
@@ -128,21 +120,19 @@ TRACE_EVENT(ext4_drop_inode, | |||
128 | TP_ARGS(inode, drop), | 120 | TP_ARGS(inode, drop), |
129 | 121 | ||
130 | TP_STRUCT__entry( | 122 | TP_STRUCT__entry( |
131 | __field( int, dev_major ) | 123 | __field( dev_t, dev ) |
132 | __field( int, dev_minor ) | ||
133 | __field( ino_t, ino ) | 124 | __field( ino_t, ino ) |
134 | __field( int, drop ) | 125 | __field( int, drop ) |
135 | ), | 126 | ), |
136 | 127 | ||
137 | TP_fast_assign( | 128 | TP_fast_assign( |
138 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 129 | __entry->dev = inode->i_sb->s_dev; |
139 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
140 | __entry->ino = inode->i_ino; | 130 | __entry->ino = inode->i_ino; |
141 | __entry->drop = drop; | 131 | __entry->drop = drop; |
142 | ), | 132 | ), |
143 | 133 | ||
144 | TP_printk("dev %d,%d ino %lu drop %d", | 134 | TP_printk("dev %d,%d ino %lu drop %d", |
145 | __entry->dev_major, __entry->dev_minor, | 135 | MAJOR(__entry->dev), MINOR(__entry->dev), |
146 | (unsigned long) __entry->ino, __entry->drop) | 136 | (unsigned long) __entry->ino, __entry->drop) |
147 | ); | 137 | ); |
148 | 138 | ||
@@ -152,21 +142,19 @@ TRACE_EVENT(ext4_mark_inode_dirty, | |||
152 | TP_ARGS(inode, IP), | 142 | TP_ARGS(inode, IP), |
153 | 143 | ||
154 | TP_STRUCT__entry( | 144 | TP_STRUCT__entry( |
155 | __field( int, dev_major ) | 145 | __field( dev_t, dev ) |
156 | __field( int, dev_minor ) | ||
157 | __field( ino_t, ino ) | 146 | __field( ino_t, ino ) |
158 | __field(unsigned long, ip ) | 147 | __field(unsigned long, ip ) |
159 | ), | 148 | ), |
160 | 149 | ||
161 | TP_fast_assign( | 150 | TP_fast_assign( |
162 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 151 | __entry->dev = inode->i_sb->s_dev; |
163 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
164 | __entry->ino = inode->i_ino; | 152 | __entry->ino = inode->i_ino; |
165 | __entry->ip = IP; | 153 | __entry->ip = IP; |
166 | ), | 154 | ), |
167 | 155 | ||
168 | TP_printk("dev %d,%d ino %lu caller %pF", | 156 | TP_printk("dev %d,%d ino %lu caller %pF", |
169 | __entry->dev_major, __entry->dev_minor, | 157 | MAJOR(__entry->dev), MINOR(__entry->dev), |
170 | (unsigned long) __entry->ino, (void *)__entry->ip) | 158 | (unsigned long) __entry->ino, (void *)__entry->ip) |
171 | ); | 159 | ); |
172 | 160 | ||
@@ -176,21 +164,19 @@ TRACE_EVENT(ext4_begin_ordered_truncate, | |||
176 | TP_ARGS(inode, new_size), | 164 | TP_ARGS(inode, new_size), |
177 | 165 | ||
178 | TP_STRUCT__entry( | 166 | TP_STRUCT__entry( |
179 | __field( int, dev_major ) | 167 | __field( dev_t, dev ) |
180 | __field( int, dev_minor ) | ||
181 | __field( ino_t, ino ) | 168 | __field( ino_t, ino ) |
182 | __field( loff_t, new_size ) | 169 | __field( loff_t, new_size ) |
183 | ), | 170 | ), |
184 | 171 | ||
185 | TP_fast_assign( | 172 | TP_fast_assign( |
186 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 173 | __entry->dev = inode->i_sb->s_dev; |
187 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
188 | __entry->ino = inode->i_ino; | 174 | __entry->ino = inode->i_ino; |
189 | __entry->new_size = new_size; | 175 | __entry->new_size = new_size; |
190 | ), | 176 | ), |
191 | 177 | ||
192 | TP_printk("dev %d,%d ino %lu new_size %lld", | 178 | TP_printk("dev %d,%d ino %lu new_size %lld", |
193 | __entry->dev_major, __entry->dev_minor, | 179 | MAJOR(__entry->dev), MINOR(__entry->dev), |
194 | (unsigned long) __entry->ino, | 180 | (unsigned long) __entry->ino, |
195 | (long long) __entry->new_size) | 181 | (long long) __entry->new_size) |
196 | ); | 182 | ); |
@@ -203,8 +189,7 @@ DECLARE_EVENT_CLASS(ext4__write_begin, | |||
203 | TP_ARGS(inode, pos, len, flags), | 189 | TP_ARGS(inode, pos, len, flags), |
204 | 190 | ||
205 | TP_STRUCT__entry( | 191 | TP_STRUCT__entry( |
206 | __field( int, dev_major ) | 192 | __field( dev_t, dev ) |
207 | __field( int, dev_minor ) | ||
208 | __field( ino_t, ino ) | 193 | __field( ino_t, ino ) |
209 | __field( loff_t, pos ) | 194 | __field( loff_t, pos ) |
210 | __field( unsigned int, len ) | 195 | __field( unsigned int, len ) |
@@ -212,8 +197,7 @@ DECLARE_EVENT_CLASS(ext4__write_begin, | |||
212 | ), | 197 | ), |
213 | 198 | ||
214 | TP_fast_assign( | 199 | TP_fast_assign( |
215 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 200 | __entry->dev = inode->i_sb->s_dev; |
216 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
217 | __entry->ino = inode->i_ino; | 201 | __entry->ino = inode->i_ino; |
218 | __entry->pos = pos; | 202 | __entry->pos = pos; |
219 | __entry->len = len; | 203 | __entry->len = len; |
@@ -221,7 +205,7 @@ DECLARE_EVENT_CLASS(ext4__write_begin, | |||
221 | ), | 205 | ), |
222 | 206 | ||
223 | TP_printk("dev %d,%d ino %lu pos %llu len %u flags %u", | 207 | TP_printk("dev %d,%d ino %lu pos %llu len %u flags %u", |
224 | __entry->dev_major, __entry->dev_minor, | 208 | MAJOR(__entry->dev), MINOR(__entry->dev), |
225 | (unsigned long) __entry->ino, | 209 | (unsigned long) __entry->ino, |
226 | __entry->pos, __entry->len, __entry->flags) | 210 | __entry->pos, __entry->len, __entry->flags) |
227 | ); | 211 | ); |
@@ -249,8 +233,7 @@ DECLARE_EVENT_CLASS(ext4__write_end, | |||
249 | TP_ARGS(inode, pos, len, copied), | 233 | TP_ARGS(inode, pos, len, copied), |
250 | 234 | ||
251 | TP_STRUCT__entry( | 235 | TP_STRUCT__entry( |
252 | __field( int, dev_major ) | 236 | __field( dev_t, dev ) |
253 | __field( int, dev_minor ) | ||
254 | __field( ino_t, ino ) | 237 | __field( ino_t, ino ) |
255 | __field( loff_t, pos ) | 238 | __field( loff_t, pos ) |
256 | __field( unsigned int, len ) | 239 | __field( unsigned int, len ) |
@@ -258,8 +241,7 @@ DECLARE_EVENT_CLASS(ext4__write_end, | |||
258 | ), | 241 | ), |
259 | 242 | ||
260 | TP_fast_assign( | 243 | TP_fast_assign( |
261 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 244 | __entry->dev = inode->i_sb->s_dev; |
262 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
263 | __entry->ino = inode->i_ino; | 245 | __entry->ino = inode->i_ino; |
264 | __entry->pos = pos; | 246 | __entry->pos = pos; |
265 | __entry->len = len; | 247 | __entry->len = len; |
@@ -267,9 +249,9 @@ DECLARE_EVENT_CLASS(ext4__write_end, | |||
267 | ), | 249 | ), |
268 | 250 | ||
269 | TP_printk("dev %d,%d ino %lu pos %llu len %u copied %u", | 251 | TP_printk("dev %d,%d ino %lu pos %llu len %u copied %u", |
270 | __entry->dev_major, __entry->dev_minor, | 252 | MAJOR(__entry->dev), MINOR(__entry->dev), |
271 | (unsigned long) __entry->ino, __entry->pos, | 253 | (unsigned long) __entry->ino, |
272 | __entry->len, __entry->copied) | 254 | __entry->pos, __entry->len, __entry->copied) |
273 | ); | 255 | ); |
274 | 256 | ||
275 | DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, | 257 | DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, |
@@ -310,22 +292,20 @@ TRACE_EVENT(ext4_writepage, | |||
310 | TP_ARGS(inode, page), | 292 | TP_ARGS(inode, page), |
311 | 293 | ||
312 | TP_STRUCT__entry( | 294 | TP_STRUCT__entry( |
313 | __field( int, dev_major ) | 295 | __field( dev_t, dev ) |
314 | __field( int, dev_minor ) | ||
315 | __field( ino_t, ino ) | 296 | __field( ino_t, ino ) |
316 | __field( pgoff_t, index ) | 297 | __field( pgoff_t, index ) |
317 | 298 | ||
318 | ), | 299 | ), |
319 | 300 | ||
320 | TP_fast_assign( | 301 | TP_fast_assign( |
321 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 302 | __entry->dev = inode->i_sb->s_dev; |
322 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
323 | __entry->ino = inode->i_ino; | 303 | __entry->ino = inode->i_ino; |
324 | __entry->index = page->index; | 304 | __entry->index = page->index; |
325 | ), | 305 | ), |
326 | 306 | ||
327 | TP_printk("dev %d,%d ino %lu page_index %lu", | 307 | TP_printk("dev %d,%d ino %lu page_index %lu", |
328 | __entry->dev_major, __entry->dev_minor, | 308 | MAJOR(__entry->dev), MINOR(__entry->dev), |
329 | (unsigned long) __entry->ino, __entry->index) | 309 | (unsigned long) __entry->ino, __entry->index) |
330 | ); | 310 | ); |
331 | 311 | ||
@@ -335,43 +315,39 @@ TRACE_EVENT(ext4_da_writepages, | |||
335 | TP_ARGS(inode, wbc), | 315 | TP_ARGS(inode, wbc), |
336 | 316 | ||
337 | TP_STRUCT__entry( | 317 | TP_STRUCT__entry( |
338 | __field( int, dev_major ) | 318 | __field( dev_t, dev ) |
339 | __field( int, dev_minor ) | ||
340 | __field( ino_t, ino ) | 319 | __field( ino_t, ino ) |
341 | __field( long, nr_to_write ) | 320 | __field( long, nr_to_write ) |
342 | __field( long, pages_skipped ) | 321 | __field( long, pages_skipped ) |
343 | __field( loff_t, range_start ) | 322 | __field( loff_t, range_start ) |
344 | __field( loff_t, range_end ) | 323 | __field( loff_t, range_end ) |
324 | __field( int, sync_mode ) | ||
345 | __field( char, for_kupdate ) | 325 | __field( char, for_kupdate ) |
346 | __field( char, for_reclaim ) | ||
347 | __field( char, range_cyclic ) | 326 | __field( char, range_cyclic ) |
348 | __field( pgoff_t, writeback_index ) | 327 | __field( pgoff_t, writeback_index ) |
349 | ), | 328 | ), |
350 | 329 | ||
351 | TP_fast_assign( | 330 | TP_fast_assign( |
352 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 331 | __entry->dev = inode->i_sb->s_dev; |
353 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
354 | __entry->ino = inode->i_ino; | 332 | __entry->ino = inode->i_ino; |
355 | __entry->nr_to_write = wbc->nr_to_write; | 333 | __entry->nr_to_write = wbc->nr_to_write; |
356 | __entry->pages_skipped = wbc->pages_skipped; | 334 | __entry->pages_skipped = wbc->pages_skipped; |
357 | __entry->range_start = wbc->range_start; | 335 | __entry->range_start = wbc->range_start; |
358 | __entry->range_end = wbc->range_end; | 336 | __entry->range_end = wbc->range_end; |
337 | __entry->sync_mode = wbc->sync_mode; | ||
359 | __entry->for_kupdate = wbc->for_kupdate; | 338 | __entry->for_kupdate = wbc->for_kupdate; |
360 | __entry->for_reclaim = wbc->for_reclaim; | ||
361 | __entry->range_cyclic = wbc->range_cyclic; | 339 | __entry->range_cyclic = wbc->range_cyclic; |
362 | __entry->writeback_index = inode->i_mapping->writeback_index; | 340 | __entry->writeback_index = inode->i_mapping->writeback_index; |
363 | ), | 341 | ), |
364 | 342 | ||
365 | TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld " | 343 | TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld " |
366 | "range_start %llu range_end %llu " | 344 | "range_start %llu range_end %llu sync_mode %d" |
367 | "for_kupdate %d for_reclaim %d " | 345 | "for_kupdate %d range_cyclic %d writeback_index %lu", |
368 | "range_cyclic %d writeback_index %lu", | 346 | MAJOR(__entry->dev), MINOR(__entry->dev), |
369 | __entry->dev_major, __entry->dev_minor, | ||
370 | (unsigned long) __entry->ino, __entry->nr_to_write, | 347 | (unsigned long) __entry->ino, __entry->nr_to_write, |
371 | __entry->pages_skipped, __entry->range_start, | 348 | __entry->pages_skipped, __entry->range_start, |
372 | __entry->range_end, | 349 | __entry->range_end, __entry->sync_mode, |
373 | __entry->for_kupdate, __entry->for_reclaim, | 350 | __entry->for_kupdate, __entry->range_cyclic, |
374 | __entry->range_cyclic, | ||
375 | (unsigned long) __entry->writeback_index) | 351 | (unsigned long) __entry->writeback_index) |
376 | ); | 352 | ); |
377 | 353 | ||
@@ -381,8 +357,7 @@ TRACE_EVENT(ext4_da_write_pages, | |||
381 | TP_ARGS(inode, mpd), | 357 | TP_ARGS(inode, mpd), |
382 | 358 | ||
383 | TP_STRUCT__entry( | 359 | TP_STRUCT__entry( |
384 | __field( int, dev_major ) | 360 | __field( dev_t, dev ) |
385 | __field( int, dev_minor ) | ||
386 | __field( ino_t, ino ) | 361 | __field( ino_t, ino ) |
387 | __field( __u64, b_blocknr ) | 362 | __field( __u64, b_blocknr ) |
388 | __field( __u32, b_size ) | 363 | __field( __u32, b_size ) |
@@ -390,11 +365,11 @@ TRACE_EVENT(ext4_da_write_pages, | |||
390 | __field( unsigned long, first_page ) | 365 | __field( unsigned long, first_page ) |
391 | __field( int, io_done ) | 366 | __field( int, io_done ) |
392 | __field( int, pages_written ) | 367 | __field( int, pages_written ) |
368 | __field( int, sync_mode ) | ||
393 | ), | 369 | ), |
394 | 370 | ||
395 | TP_fast_assign( | 371 | TP_fast_assign( |
396 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 372 | __entry->dev = inode->i_sb->s_dev; |
397 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
398 | __entry->ino = inode->i_ino; | 373 | __entry->ino = inode->i_ino; |
399 | __entry->b_blocknr = mpd->b_blocknr; | 374 | __entry->b_blocknr = mpd->b_blocknr; |
400 | __entry->b_size = mpd->b_size; | 375 | __entry->b_size = mpd->b_size; |
@@ -402,14 +377,18 @@ TRACE_EVENT(ext4_da_write_pages, | |||
402 | __entry->first_page = mpd->first_page; | 377 | __entry->first_page = mpd->first_page; |
403 | __entry->io_done = mpd->io_done; | 378 | __entry->io_done = mpd->io_done; |
404 | __entry->pages_written = mpd->pages_written; | 379 | __entry->pages_written = mpd->pages_written; |
380 | __entry->sync_mode = mpd->wbc->sync_mode; | ||
405 | ), | 381 | ), |
406 | 382 | ||
407 | TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x first_page %lu io_done %d pages_written %d", | 383 | TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x " |
408 | __entry->dev_major, __entry->dev_minor, | 384 | "first_page %lu io_done %d pages_written %d sync_mode %d", |
385 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
409 | (unsigned long) __entry->ino, | 386 | (unsigned long) __entry->ino, |
410 | __entry->b_blocknr, __entry->b_size, | 387 | __entry->b_blocknr, __entry->b_size, |
411 | __entry->b_state, __entry->first_page, | 388 | __entry->b_state, __entry->first_page, |
412 | __entry->io_done, __entry->pages_written) | 389 | __entry->io_done, __entry->pages_written, |
390 | __entry->sync_mode | ||
391 | ) | ||
413 | ); | 392 | ); |
414 | 393 | ||
415 | TRACE_EVENT(ext4_da_writepages_result, | 394 | TRACE_EVENT(ext4_da_writepages_result, |
@@ -419,35 +398,100 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
419 | TP_ARGS(inode, wbc, ret, pages_written), | 398 | TP_ARGS(inode, wbc, ret, pages_written), |
420 | 399 | ||
421 | TP_STRUCT__entry( | 400 | TP_STRUCT__entry( |
422 | __field( int, dev_major ) | 401 | __field( dev_t, dev ) |
423 | __field( int, dev_minor ) | ||
424 | __field( ino_t, ino ) | 402 | __field( ino_t, ino ) |
425 | __field( int, ret ) | 403 | __field( int, ret ) |
426 | __field( int, pages_written ) | 404 | __field( int, pages_written ) |
427 | __field( long, pages_skipped ) | 405 | __field( long, pages_skipped ) |
406 | __field( int, sync_mode ) | ||
428 | __field( char, more_io ) | 407 | __field( char, more_io ) |
429 | __field( pgoff_t, writeback_index ) | 408 | __field( pgoff_t, writeback_index ) |
430 | ), | 409 | ), |
431 | 410 | ||
432 | TP_fast_assign( | 411 | TP_fast_assign( |
433 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 412 | __entry->dev = inode->i_sb->s_dev; |
434 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
435 | __entry->ino = inode->i_ino; | 413 | __entry->ino = inode->i_ino; |
436 | __entry->ret = ret; | 414 | __entry->ret = ret; |
437 | __entry->pages_written = pages_written; | 415 | __entry->pages_written = pages_written; |
438 | __entry->pages_skipped = wbc->pages_skipped; | 416 | __entry->pages_skipped = wbc->pages_skipped; |
417 | __entry->sync_mode = wbc->sync_mode; | ||
439 | __entry->more_io = wbc->more_io; | 418 | __entry->more_io = wbc->more_io; |
440 | __entry->writeback_index = inode->i_mapping->writeback_index; | 419 | __entry->writeback_index = inode->i_mapping->writeback_index; |
441 | ), | 420 | ), |
442 | 421 | ||
443 | TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld more_io %d writeback_index %lu", | 422 | TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld " |
444 | __entry->dev_major, __entry->dev_minor, | 423 | " more_io %d sync_mode %d writeback_index %lu", |
424 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
445 | (unsigned long) __entry->ino, __entry->ret, | 425 | (unsigned long) __entry->ino, __entry->ret, |
446 | __entry->pages_written, __entry->pages_skipped, | 426 | __entry->pages_written, __entry->pages_skipped, |
447 | __entry->more_io, | 427 | __entry->more_io, __entry->sync_mode, |
448 | (unsigned long) __entry->writeback_index) | 428 | (unsigned long) __entry->writeback_index) |
449 | ); | 429 | ); |
450 | 430 | ||
431 | DECLARE_EVENT_CLASS(ext4__page_op, | ||
432 | TP_PROTO(struct page *page), | ||
433 | |||
434 | TP_ARGS(page), | ||
435 | |||
436 | TP_STRUCT__entry( | ||
437 | __field( pgoff_t, index ) | ||
438 | __field( ino_t, ino ) | ||
439 | __field( dev_t, dev ) | ||
440 | |||
441 | ), | ||
442 | |||
443 | TP_fast_assign( | ||
444 | __entry->index = page->index; | ||
445 | __entry->ino = page->mapping->host->i_ino; | ||
446 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
447 | ), | ||
448 | |||
449 | TP_printk("dev %d,%d ino %lu page_index %lu", | ||
450 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
451 | (unsigned long) __entry->ino, | ||
452 | __entry->index) | ||
453 | ); | ||
454 | |||
455 | DEFINE_EVENT(ext4__page_op, ext4_readpage, | ||
456 | |||
457 | TP_PROTO(struct page *page), | ||
458 | |||
459 | TP_ARGS(page) | ||
460 | ); | ||
461 | |||
462 | DEFINE_EVENT(ext4__page_op, ext4_releasepage, | ||
463 | |||
464 | TP_PROTO(struct page *page), | ||
465 | |||
466 | TP_ARGS(page) | ||
467 | ); | ||
468 | |||
469 | TRACE_EVENT(ext4_invalidatepage, | ||
470 | TP_PROTO(struct page *page, unsigned long offset), | ||
471 | |||
472 | TP_ARGS(page, offset), | ||
473 | |||
474 | TP_STRUCT__entry( | ||
475 | __field( pgoff_t, index ) | ||
476 | __field( unsigned long, offset ) | ||
477 | __field( ino_t, ino ) | ||
478 | __field( dev_t, dev ) | ||
479 | |||
480 | ), | ||
481 | |||
482 | TP_fast_assign( | ||
483 | __entry->index = page->index; | ||
484 | __entry->offset = offset; | ||
485 | __entry->ino = page->mapping->host->i_ino; | ||
486 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
487 | ), | ||
488 | |||
489 | TP_printk("dev %d,%d ino %lu page_index %lu offset %lu", | ||
490 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
491 | (unsigned long) __entry->ino, | ||
492 | __entry->index, __entry->offset) | ||
493 | ); | ||
494 | |||
451 | TRACE_EVENT(ext4_discard_blocks, | 495 | TRACE_EVENT(ext4_discard_blocks, |
452 | TP_PROTO(struct super_block *sb, unsigned long long blk, | 496 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
453 | unsigned long long count), | 497 | unsigned long long count), |
@@ -455,22 +499,20 @@ TRACE_EVENT(ext4_discard_blocks, | |||
455 | TP_ARGS(sb, blk, count), | 499 | TP_ARGS(sb, blk, count), |
456 | 500 | ||
457 | TP_STRUCT__entry( | 501 | TP_STRUCT__entry( |
458 | __field( int, dev_major ) | 502 | __field( dev_t, dev ) |
459 | __field( int, dev_minor ) | ||
460 | __field( __u64, blk ) | 503 | __field( __u64, blk ) |
461 | __field( __u64, count ) | 504 | __field( __u64, count ) |
462 | 505 | ||
463 | ), | 506 | ), |
464 | 507 | ||
465 | TP_fast_assign( | 508 | TP_fast_assign( |
466 | __entry->dev_major = MAJOR(sb->s_dev); | 509 | __entry->dev = sb->s_dev; |
467 | __entry->dev_minor = MINOR(sb->s_dev); | ||
468 | __entry->blk = blk; | 510 | __entry->blk = blk; |
469 | __entry->count = count; | 511 | __entry->count = count; |
470 | ), | 512 | ), |
471 | 513 | ||
472 | TP_printk("dev %d,%d blk %llu count %llu", | 514 | TP_printk("dev %d,%d blk %llu count %llu", |
473 | __entry->dev_major, __entry->dev_minor, | 515 | MAJOR(__entry->dev), MINOR(__entry->dev), |
474 | __entry->blk, __entry->count) | 516 | __entry->blk, __entry->count) |
475 | ); | 517 | ); |
476 | 518 | ||
@@ -481,8 +523,7 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa, | |||
481 | TP_ARGS(ac, pa), | 523 | TP_ARGS(ac, pa), |
482 | 524 | ||
483 | TP_STRUCT__entry( | 525 | TP_STRUCT__entry( |
484 | __field( int, dev_major ) | 526 | __field( dev_t, dev ) |
485 | __field( int, dev_minor ) | ||
486 | __field( ino_t, ino ) | 527 | __field( ino_t, ino ) |
487 | __field( __u64, pa_pstart ) | 528 | __field( __u64, pa_pstart ) |
488 | __field( __u32, pa_len ) | 529 | __field( __u32, pa_len ) |
@@ -491,8 +532,7 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa, | |||
491 | ), | 532 | ), |
492 | 533 | ||
493 | TP_fast_assign( | 534 | TP_fast_assign( |
494 | __entry->dev_major = MAJOR(ac->ac_sb->s_dev); | 535 | __entry->dev = ac->ac_sb->s_dev; |
495 | __entry->dev_minor = MINOR(ac->ac_sb->s_dev); | ||
496 | __entry->ino = ac->ac_inode->i_ino; | 536 | __entry->ino = ac->ac_inode->i_ino; |
497 | __entry->pa_pstart = pa->pa_pstart; | 537 | __entry->pa_pstart = pa->pa_pstart; |
498 | __entry->pa_len = pa->pa_len; | 538 | __entry->pa_len = pa->pa_len; |
@@ -500,9 +540,9 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa, | |||
500 | ), | 540 | ), |
501 | 541 | ||
502 | TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu", | 542 | TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu", |
503 | __entry->dev_major, __entry->dev_minor, | 543 | MAJOR(__entry->dev), MINOR(__entry->dev), |
504 | (unsigned long) __entry->ino, __entry->pa_pstart, | 544 | (unsigned long) __entry->ino, |
505 | __entry->pa_len, __entry->pa_lstart) | 545 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) |
506 | ); | 546 | ); |
507 | 547 | ||
508 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, | 548 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, |
@@ -530,8 +570,7 @@ TRACE_EVENT(ext4_mb_release_inode_pa, | |||
530 | TP_ARGS(sb, inode, pa, block, count), | 570 | TP_ARGS(sb, inode, pa, block, count), |
531 | 571 | ||
532 | TP_STRUCT__entry( | 572 | TP_STRUCT__entry( |
533 | __field( int, dev_major ) | 573 | __field( dev_t, dev ) |
534 | __field( int, dev_minor ) | ||
535 | __field( ino_t, ino ) | 574 | __field( ino_t, ino ) |
536 | __field( __u64, block ) | 575 | __field( __u64, block ) |
537 | __field( __u32, count ) | 576 | __field( __u32, count ) |
@@ -539,16 +578,16 @@ TRACE_EVENT(ext4_mb_release_inode_pa, | |||
539 | ), | 578 | ), |
540 | 579 | ||
541 | TP_fast_assign( | 580 | TP_fast_assign( |
542 | __entry->dev_major = MAJOR(sb->s_dev); | 581 | __entry->dev = sb->s_dev; |
543 | __entry->dev_minor = MINOR(sb->s_dev); | ||
544 | __entry->ino = inode->i_ino; | 582 | __entry->ino = inode->i_ino; |
545 | __entry->block = block; | 583 | __entry->block = block; |
546 | __entry->count = count; | 584 | __entry->count = count; |
547 | ), | 585 | ), |
548 | 586 | ||
549 | TP_printk("dev %d,%d ino %lu block %llu count %u", | 587 | TP_printk("dev %d,%d ino %lu block %llu count %u", |
550 | __entry->dev_major, __entry->dev_minor, | 588 | MAJOR(__entry->dev), MINOR(__entry->dev), |
551 | (unsigned long) __entry->ino, __entry->block, __entry->count) | 589 | (unsigned long) __entry->ino, |
590 | __entry->block, __entry->count) | ||
552 | ); | 591 | ); |
553 | 592 | ||
554 | TRACE_EVENT(ext4_mb_release_group_pa, | 593 | TRACE_EVENT(ext4_mb_release_group_pa, |
@@ -558,22 +597,20 @@ TRACE_EVENT(ext4_mb_release_group_pa, | |||
558 | TP_ARGS(sb, pa), | 597 | TP_ARGS(sb, pa), |
559 | 598 | ||
560 | TP_STRUCT__entry( | 599 | TP_STRUCT__entry( |
561 | __field( int, dev_major ) | 600 | __field( dev_t, dev ) |
562 | __field( int, dev_minor ) | ||
563 | __field( __u64, pa_pstart ) | 601 | __field( __u64, pa_pstart ) |
564 | __field( __u32, pa_len ) | 602 | __field( __u32, pa_len ) |
565 | 603 | ||
566 | ), | 604 | ), |
567 | 605 | ||
568 | TP_fast_assign( | 606 | TP_fast_assign( |
569 | __entry->dev_major = MAJOR(sb->s_dev); | 607 | __entry->dev = sb->s_dev; |
570 | __entry->dev_minor = MINOR(sb->s_dev); | ||
571 | __entry->pa_pstart = pa->pa_pstart; | 608 | __entry->pa_pstart = pa->pa_pstart; |
572 | __entry->pa_len = pa->pa_len; | 609 | __entry->pa_len = pa->pa_len; |
573 | ), | 610 | ), |
574 | 611 | ||
575 | TP_printk("dev %d,%d pstart %llu len %u", | 612 | TP_printk("dev %d,%d pstart %llu len %u", |
576 | __entry->dev_major, __entry->dev_minor, | 613 | MAJOR(__entry->dev), MINOR(__entry->dev), |
577 | __entry->pa_pstart, __entry->pa_len) | 614 | __entry->pa_pstart, __entry->pa_len) |
578 | ); | 615 | ); |
579 | 616 | ||
@@ -583,20 +620,18 @@ TRACE_EVENT(ext4_discard_preallocations, | |||
583 | TP_ARGS(inode), | 620 | TP_ARGS(inode), |
584 | 621 | ||
585 | TP_STRUCT__entry( | 622 | TP_STRUCT__entry( |
586 | __field( int, dev_major ) | 623 | __field( dev_t, dev ) |
587 | __field( int, dev_minor ) | ||
588 | __field( ino_t, ino ) | 624 | __field( ino_t, ino ) |
589 | 625 | ||
590 | ), | 626 | ), |
591 | 627 | ||
592 | TP_fast_assign( | 628 | TP_fast_assign( |
593 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 629 | __entry->dev = inode->i_sb->s_dev; |
594 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
595 | __entry->ino = inode->i_ino; | 630 | __entry->ino = inode->i_ino; |
596 | ), | 631 | ), |
597 | 632 | ||
598 | TP_printk("dev %d,%d ino %lu", | 633 | TP_printk("dev %d,%d ino %lu", |
599 | __entry->dev_major, __entry->dev_minor, | 634 | MAJOR(__entry->dev), MINOR(__entry->dev), |
600 | (unsigned long) __entry->ino) | 635 | (unsigned long) __entry->ino) |
601 | ); | 636 | ); |
602 | 637 | ||
@@ -606,20 +641,19 @@ TRACE_EVENT(ext4_mb_discard_preallocations, | |||
606 | TP_ARGS(sb, needed), | 641 | TP_ARGS(sb, needed), |
607 | 642 | ||
608 | TP_STRUCT__entry( | 643 | TP_STRUCT__entry( |
609 | __field( int, dev_major ) | 644 | __field( dev_t, dev ) |
610 | __field( int, dev_minor ) | ||
611 | __field( int, needed ) | 645 | __field( int, needed ) |
612 | 646 | ||
613 | ), | 647 | ), |
614 | 648 | ||
615 | TP_fast_assign( | 649 | TP_fast_assign( |
616 | __entry->dev_major = MAJOR(sb->s_dev); | 650 | __entry->dev = sb->s_dev; |
617 | __entry->dev_minor = MINOR(sb->s_dev); | ||
618 | __entry->needed = needed; | 651 | __entry->needed = needed; |
619 | ), | 652 | ), |
620 | 653 | ||
621 | TP_printk("dev %d,%d needed %d", | 654 | TP_printk("dev %d,%d needed %d", |
622 | __entry->dev_major, __entry->dev_minor, __entry->needed) | 655 | MAJOR(__entry->dev), MINOR(__entry->dev), |
656 | __entry->needed) | ||
623 | ); | 657 | ); |
624 | 658 | ||
625 | TRACE_EVENT(ext4_request_blocks, | 659 | TRACE_EVENT(ext4_request_blocks, |
@@ -628,8 +662,7 @@ TRACE_EVENT(ext4_request_blocks, | |||
628 | TP_ARGS(ar), | 662 | TP_ARGS(ar), |
629 | 663 | ||
630 | TP_STRUCT__entry( | 664 | TP_STRUCT__entry( |
631 | __field( int, dev_major ) | 665 | __field( dev_t, dev ) |
632 | __field( int, dev_minor ) | ||
633 | __field( ino_t, ino ) | 666 | __field( ino_t, ino ) |
634 | __field( unsigned int, flags ) | 667 | __field( unsigned int, flags ) |
635 | __field( unsigned int, len ) | 668 | __field( unsigned int, len ) |
@@ -642,8 +675,7 @@ TRACE_EVENT(ext4_request_blocks, | |||
642 | ), | 675 | ), |
643 | 676 | ||
644 | TP_fast_assign( | 677 | TP_fast_assign( |
645 | __entry->dev_major = MAJOR(ar->inode->i_sb->s_dev); | 678 | __entry->dev = ar->inode->i_sb->s_dev; |
646 | __entry->dev_minor = MINOR(ar->inode->i_sb->s_dev); | ||
647 | __entry->ino = ar->inode->i_ino; | 679 | __entry->ino = ar->inode->i_ino; |
648 | __entry->flags = ar->flags; | 680 | __entry->flags = ar->flags; |
649 | __entry->len = ar->len; | 681 | __entry->len = ar->len; |
@@ -655,8 +687,9 @@ TRACE_EVENT(ext4_request_blocks, | |||
655 | __entry->pright = ar->pright; | 687 | __entry->pright = ar->pright; |
656 | ), | 688 | ), |
657 | 689 | ||
658 | TP_printk("dev %d,%d ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", | 690 | TP_printk("dev %d,%d ino %lu flags %u len %u lblk %llu goal %llu " |
659 | __entry->dev_major, __entry->dev_minor, | 691 | "lleft %llu lright %llu pleft %llu pright %llu ", |
692 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
660 | (unsigned long) __entry->ino, | 693 | (unsigned long) __entry->ino, |
661 | __entry->flags, __entry->len, | 694 | __entry->flags, __entry->len, |
662 | (unsigned long long) __entry->logical, | 695 | (unsigned long long) __entry->logical, |
@@ -673,8 +706,7 @@ TRACE_EVENT(ext4_allocate_blocks, | |||
673 | TP_ARGS(ar, block), | 706 | TP_ARGS(ar, block), |
674 | 707 | ||
675 | TP_STRUCT__entry( | 708 | TP_STRUCT__entry( |
676 | __field( int, dev_major ) | 709 | __field( dev_t, dev ) |
677 | __field( int, dev_minor ) | ||
678 | __field( ino_t, ino ) | 710 | __field( ino_t, ino ) |
679 | __field( __u64, block ) | 711 | __field( __u64, block ) |
680 | __field( unsigned int, flags ) | 712 | __field( unsigned int, flags ) |
@@ -688,8 +720,7 @@ TRACE_EVENT(ext4_allocate_blocks, | |||
688 | ), | 720 | ), |
689 | 721 | ||
690 | TP_fast_assign( | 722 | TP_fast_assign( |
691 | __entry->dev_major = MAJOR(ar->inode->i_sb->s_dev); | 723 | __entry->dev = ar->inode->i_sb->s_dev; |
692 | __entry->dev_minor = MINOR(ar->inode->i_sb->s_dev); | ||
693 | __entry->ino = ar->inode->i_ino; | 724 | __entry->ino = ar->inode->i_ino; |
694 | __entry->block = block; | 725 | __entry->block = block; |
695 | __entry->flags = ar->flags; | 726 | __entry->flags = ar->flags; |
@@ -702,10 +733,11 @@ TRACE_EVENT(ext4_allocate_blocks, | |||
702 | __entry->pright = ar->pright; | 733 | __entry->pright = ar->pright; |
703 | ), | 734 | ), |
704 | 735 | ||
705 | TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", | 736 | TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %llu " |
706 | __entry->dev_major, __entry->dev_minor, | 737 | "goal %llu lleft %llu lright %llu pleft %llu pright %llu", |
707 | (unsigned long) __entry->ino, __entry->flags, | 738 | MAJOR(__entry->dev), MINOR(__entry->dev), |
708 | __entry->len, __entry->block, | 739 | (unsigned long) __entry->ino, |
740 | __entry->flags, __entry->len, __entry->block, | ||
709 | (unsigned long long) __entry->logical, | 741 | (unsigned long long) __entry->logical, |
710 | (unsigned long long) __entry->goal, | 742 | (unsigned long long) __entry->goal, |
711 | (unsigned long long) __entry->lleft, | 743 | (unsigned long long) __entry->lleft, |
@@ -721,8 +753,7 @@ TRACE_EVENT(ext4_free_blocks, | |||
721 | TP_ARGS(inode, block, count, flags), | 753 | TP_ARGS(inode, block, count, flags), |
722 | 754 | ||
723 | TP_STRUCT__entry( | 755 | TP_STRUCT__entry( |
724 | __field( int, dev_major ) | 756 | __field( dev_t, dev ) |
725 | __field( int, dev_minor ) | ||
726 | __field( ino_t, ino ) | 757 | __field( ino_t, ino ) |
727 | __field( umode_t, mode ) | 758 | __field( umode_t, mode ) |
728 | __field( __u64, block ) | 759 | __field( __u64, block ) |
@@ -731,8 +762,7 @@ TRACE_EVENT(ext4_free_blocks, | |||
731 | ), | 762 | ), |
732 | 763 | ||
733 | TP_fast_assign( | 764 | TP_fast_assign( |
734 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 765 | __entry->dev = inode->i_sb->s_dev; |
735 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
736 | __entry->ino = inode->i_ino; | 766 | __entry->ino = inode->i_ino; |
737 | __entry->mode = inode->i_mode; | 767 | __entry->mode = inode->i_mode; |
738 | __entry->block = block; | 768 | __entry->block = block; |
@@ -741,20 +771,19 @@ TRACE_EVENT(ext4_free_blocks, | |||
741 | ), | 771 | ), |
742 | 772 | ||
743 | TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d", | 773 | TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d", |
744 | __entry->dev_major, __entry->dev_minor, | 774 | MAJOR(__entry->dev), MINOR(__entry->dev), |
745 | (unsigned long) __entry->ino, | 775 | (unsigned long) __entry->ino, |
746 | __entry->mode, __entry->block, __entry->count, | 776 | __entry->mode, __entry->block, __entry->count, |
747 | __entry->flags) | 777 | __entry->flags) |
748 | ); | 778 | ); |
749 | 779 | ||
750 | TRACE_EVENT(ext4_sync_file, | 780 | TRACE_EVENT(ext4_sync_file_enter, |
751 | TP_PROTO(struct file *file, int datasync), | 781 | TP_PROTO(struct file *file, int datasync), |
752 | 782 | ||
753 | TP_ARGS(file, datasync), | 783 | TP_ARGS(file, datasync), |
754 | 784 | ||
755 | TP_STRUCT__entry( | 785 | TP_STRUCT__entry( |
756 | __field( int, dev_major ) | 786 | __field( dev_t, dev ) |
757 | __field( int, dev_minor ) | ||
758 | __field( ino_t, ino ) | 787 | __field( ino_t, ino ) |
759 | __field( ino_t, parent ) | 788 | __field( ino_t, parent ) |
760 | __field( int, datasync ) | 789 | __field( int, datasync ) |
@@ -763,39 +792,60 @@ TRACE_EVENT(ext4_sync_file, | |||
763 | TP_fast_assign( | 792 | TP_fast_assign( |
764 | struct dentry *dentry = file->f_path.dentry; | 793 | struct dentry *dentry = file->f_path.dentry; |
765 | 794 | ||
766 | __entry->dev_major = MAJOR(dentry->d_inode->i_sb->s_dev); | 795 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
767 | __entry->dev_minor = MINOR(dentry->d_inode->i_sb->s_dev); | ||
768 | __entry->ino = dentry->d_inode->i_ino; | 796 | __entry->ino = dentry->d_inode->i_ino; |
769 | __entry->datasync = datasync; | 797 | __entry->datasync = datasync; |
770 | __entry->parent = dentry->d_parent->d_inode->i_ino; | 798 | __entry->parent = dentry->d_parent->d_inode->i_ino; |
771 | ), | 799 | ), |
772 | 800 | ||
773 | TP_printk("dev %d,%d ino %ld parent %ld datasync %d ", | 801 | TP_printk("dev %d,%d ino %ld parent %ld datasync %d ", |
774 | __entry->dev_major, __entry->dev_minor, | 802 | MAJOR(__entry->dev), MINOR(__entry->dev), |
775 | (unsigned long) __entry->ino, | 803 | (unsigned long) __entry->ino, |
776 | (unsigned long) __entry->parent, __entry->datasync) | 804 | (unsigned long) __entry->parent, __entry->datasync) |
777 | ); | 805 | ); |
778 | 806 | ||
807 | TRACE_EVENT(ext4_sync_file_exit, | ||
808 | TP_PROTO(struct inode *inode, int ret), | ||
809 | |||
810 | TP_ARGS(inode, ret), | ||
811 | |||
812 | TP_STRUCT__entry( | ||
813 | __field( int, ret ) | ||
814 | __field( ino_t, ino ) | ||
815 | __field( dev_t, dev ) | ||
816 | ), | ||
817 | |||
818 | TP_fast_assign( | ||
819 | __entry->ret = ret; | ||
820 | __entry->ino = inode->i_ino; | ||
821 | __entry->dev = inode->i_sb->s_dev; | ||
822 | ), | ||
823 | |||
824 | TP_printk("dev %d,%d ino %ld ret %d", | ||
825 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
826 | (unsigned long) __entry->ino, | ||
827 | __entry->ret) | ||
828 | ); | ||
829 | |||
779 | TRACE_EVENT(ext4_sync_fs, | 830 | TRACE_EVENT(ext4_sync_fs, |
780 | TP_PROTO(struct super_block *sb, int wait), | 831 | TP_PROTO(struct super_block *sb, int wait), |
781 | 832 | ||
782 | TP_ARGS(sb, wait), | 833 | TP_ARGS(sb, wait), |
783 | 834 | ||
784 | TP_STRUCT__entry( | 835 | TP_STRUCT__entry( |
785 | __field( int, dev_major ) | 836 | __field( dev_t, dev ) |
786 | __field( int, dev_minor ) | ||
787 | __field( int, wait ) | 837 | __field( int, wait ) |
788 | 838 | ||
789 | ), | 839 | ), |
790 | 840 | ||
791 | TP_fast_assign( | 841 | TP_fast_assign( |
792 | __entry->dev_major = MAJOR(sb->s_dev); | 842 | __entry->dev = sb->s_dev; |
793 | __entry->dev_minor = MINOR(sb->s_dev); | ||
794 | __entry->wait = wait; | 843 | __entry->wait = wait; |
795 | ), | 844 | ), |
796 | 845 | ||
797 | TP_printk("dev %d,%d wait %d", __entry->dev_major, | 846 | TP_printk("dev %d,%d wait %d", |
798 | __entry->dev_minor, __entry->wait) | 847 | MAJOR(__entry->dev), MINOR(__entry->dev), |
848 | __entry->wait) | ||
799 | ); | 849 | ); |
800 | 850 | ||
801 | TRACE_EVENT(ext4_alloc_da_blocks, | 851 | TRACE_EVENT(ext4_alloc_da_blocks, |
@@ -804,23 +854,21 @@ TRACE_EVENT(ext4_alloc_da_blocks, | |||
804 | TP_ARGS(inode), | 854 | TP_ARGS(inode), |
805 | 855 | ||
806 | TP_STRUCT__entry( | 856 | TP_STRUCT__entry( |
807 | __field( int, dev_major ) | 857 | __field( dev_t, dev ) |
808 | __field( int, dev_minor ) | ||
809 | __field( ino_t, ino ) | 858 | __field( ino_t, ino ) |
810 | __field( unsigned int, data_blocks ) | 859 | __field( unsigned int, data_blocks ) |
811 | __field( unsigned int, meta_blocks ) | 860 | __field( unsigned int, meta_blocks ) |
812 | ), | 861 | ), |
813 | 862 | ||
814 | TP_fast_assign( | 863 | TP_fast_assign( |
815 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 864 | __entry->dev = inode->i_sb->s_dev; |
816 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
817 | __entry->ino = inode->i_ino; | 865 | __entry->ino = inode->i_ino; |
818 | __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; | 866 | __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
819 | __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | 867 | __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
820 | ), | 868 | ), |
821 | 869 | ||
822 | TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u", | 870 | TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u", |
823 | __entry->dev_major, __entry->dev_minor, | 871 | MAJOR(__entry->dev), MINOR(__entry->dev), |
824 | (unsigned long) __entry->ino, | 872 | (unsigned long) __entry->ino, |
825 | __entry->data_blocks, __entry->meta_blocks) | 873 | __entry->data_blocks, __entry->meta_blocks) |
826 | ); | 874 | ); |
@@ -831,8 +879,7 @@ TRACE_EVENT(ext4_mballoc_alloc, | |||
831 | TP_ARGS(ac), | 879 | TP_ARGS(ac), |
832 | 880 | ||
833 | TP_STRUCT__entry( | 881 | TP_STRUCT__entry( |
834 | __field( int, dev_major ) | 882 | __field( dev_t, dev ) |
835 | __field( int, dev_minor ) | ||
836 | __field( ino_t, ino ) | 883 | __field( ino_t, ino ) |
837 | __field( __u16, found ) | 884 | __field( __u16, found ) |
838 | __field( __u16, groups ) | 885 | __field( __u16, groups ) |
@@ -855,8 +902,7 @@ TRACE_EVENT(ext4_mballoc_alloc, | |||
855 | ), | 902 | ), |
856 | 903 | ||
857 | TP_fast_assign( | 904 | TP_fast_assign( |
858 | __entry->dev_major = MAJOR(ac->ac_inode->i_sb->s_dev); | 905 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
859 | __entry->dev_minor = MINOR(ac->ac_inode->i_sb->s_dev); | ||
860 | __entry->ino = ac->ac_inode->i_ino; | 906 | __entry->ino = ac->ac_inode->i_ino; |
861 | __entry->found = ac->ac_found; | 907 | __entry->found = ac->ac_found; |
862 | __entry->flags = ac->ac_flags; | 908 | __entry->flags = ac->ac_flags; |
@@ -881,7 +927,7 @@ TRACE_EVENT(ext4_mballoc_alloc, | |||
881 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " | 927 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " |
882 | "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " | 928 | "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " |
883 | "tail %u broken %u", | 929 | "tail %u broken %u", |
884 | __entry->dev_major, __entry->dev_minor, | 930 | MAJOR(__entry->dev), MINOR(__entry->dev), |
885 | (unsigned long) __entry->ino, | 931 | (unsigned long) __entry->ino, |
886 | __entry->orig_group, __entry->orig_start, | 932 | __entry->orig_group, __entry->orig_start, |
887 | __entry->orig_len, __entry->orig_logical, | 933 | __entry->orig_len, __entry->orig_logical, |
@@ -900,8 +946,7 @@ TRACE_EVENT(ext4_mballoc_prealloc, | |||
900 | TP_ARGS(ac), | 946 | TP_ARGS(ac), |
901 | 947 | ||
902 | TP_STRUCT__entry( | 948 | TP_STRUCT__entry( |
903 | __field( int, dev_major ) | 949 | __field( dev_t, dev ) |
904 | __field( int, dev_minor ) | ||
905 | __field( ino_t, ino ) | 950 | __field( ino_t, ino ) |
906 | __field( __u32, orig_logical ) | 951 | __field( __u32, orig_logical ) |
907 | __field( int, orig_start ) | 952 | __field( int, orig_start ) |
@@ -914,8 +959,7 @@ TRACE_EVENT(ext4_mballoc_prealloc, | |||
914 | ), | 959 | ), |
915 | 960 | ||
916 | TP_fast_assign( | 961 | TP_fast_assign( |
917 | __entry->dev_major = MAJOR(ac->ac_inode->i_sb->s_dev); | 962 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
918 | __entry->dev_minor = MINOR(ac->ac_inode->i_sb->s_dev); | ||
919 | __entry->ino = ac->ac_inode->i_ino; | 963 | __entry->ino = ac->ac_inode->i_ino; |
920 | __entry->orig_logical = ac->ac_o_ex.fe_logical; | 964 | __entry->orig_logical = ac->ac_o_ex.fe_logical; |
921 | __entry->orig_start = ac->ac_o_ex.fe_start; | 965 | __entry->orig_start = ac->ac_o_ex.fe_start; |
@@ -928,7 +972,7 @@ TRACE_EVENT(ext4_mballoc_prealloc, | |||
928 | ), | 972 | ), |
929 | 973 | ||
930 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", | 974 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", |
931 | __entry->dev_major, __entry->dev_minor, | 975 | MAJOR(__entry->dev), MINOR(__entry->dev), |
932 | (unsigned long) __entry->ino, | 976 | (unsigned long) __entry->ino, |
933 | __entry->orig_group, __entry->orig_start, | 977 | __entry->orig_group, __entry->orig_start, |
934 | __entry->orig_len, __entry->orig_logical, | 978 | __entry->orig_len, __entry->orig_logical, |
@@ -946,8 +990,7 @@ DECLARE_EVENT_CLASS(ext4__mballoc, | |||
946 | TP_ARGS(sb, inode, group, start, len), | 990 | TP_ARGS(sb, inode, group, start, len), |
947 | 991 | ||
948 | TP_STRUCT__entry( | 992 | TP_STRUCT__entry( |
949 | __field( int, dev_major ) | 993 | __field( dev_t, dev ) |
950 | __field( int, dev_minor ) | ||
951 | __field( ino_t, ino ) | 994 | __field( ino_t, ino ) |
952 | __field( int, result_start ) | 995 | __field( int, result_start ) |
953 | __field( __u32, result_group ) | 996 | __field( __u32, result_group ) |
@@ -955,8 +998,7 @@ DECLARE_EVENT_CLASS(ext4__mballoc, | |||
955 | ), | 998 | ), |
956 | 999 | ||
957 | TP_fast_assign( | 1000 | TP_fast_assign( |
958 | __entry->dev_major = MAJOR(sb->s_dev); | 1001 | __entry->dev = sb->s_dev; |
959 | __entry->dev_minor = MINOR(sb->s_dev); | ||
960 | __entry->ino = inode ? inode->i_ino : 0; | 1002 | __entry->ino = inode ? inode->i_ino : 0; |
961 | __entry->result_start = start; | 1003 | __entry->result_start = start; |
962 | __entry->result_group = group; | 1004 | __entry->result_group = group; |
@@ -964,7 +1006,7 @@ DECLARE_EVENT_CLASS(ext4__mballoc, | |||
964 | ), | 1006 | ), |
965 | 1007 | ||
966 | TP_printk("dev %d,%d inode %lu extent %u/%d/%u ", | 1008 | TP_printk("dev %d,%d inode %lu extent %u/%d/%u ", |
967 | __entry->dev_major, __entry->dev_minor, | 1009 | MAJOR(__entry->dev), MINOR(__entry->dev), |
968 | (unsigned long) __entry->ino, | 1010 | (unsigned long) __entry->ino, |
969 | __entry->result_group, __entry->result_start, | 1011 | __entry->result_group, __entry->result_start, |
970 | __entry->result_len) | 1012 | __entry->result_len) |
@@ -998,8 +1040,7 @@ TRACE_EVENT(ext4_forget, | |||
998 | TP_ARGS(inode, is_metadata, block), | 1040 | TP_ARGS(inode, is_metadata, block), |
999 | 1041 | ||
1000 | TP_STRUCT__entry( | 1042 | TP_STRUCT__entry( |
1001 | __field( int, dev_major ) | 1043 | __field( dev_t, dev ) |
1002 | __field( int, dev_minor ) | ||
1003 | __field( ino_t, ino ) | 1044 | __field( ino_t, ino ) |
1004 | __field( umode_t, mode ) | 1045 | __field( umode_t, mode ) |
1005 | __field( int, is_metadata ) | 1046 | __field( int, is_metadata ) |
@@ -1007,8 +1048,7 @@ TRACE_EVENT(ext4_forget, | |||
1007 | ), | 1048 | ), |
1008 | 1049 | ||
1009 | TP_fast_assign( | 1050 | TP_fast_assign( |
1010 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 1051 | __entry->dev = inode->i_sb->s_dev; |
1011 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
1012 | __entry->ino = inode->i_ino; | 1052 | __entry->ino = inode->i_ino; |
1013 | __entry->mode = inode->i_mode; | 1053 | __entry->mode = inode->i_mode; |
1014 | __entry->is_metadata = is_metadata; | 1054 | __entry->is_metadata = is_metadata; |
@@ -1016,9 +1056,9 @@ TRACE_EVENT(ext4_forget, | |||
1016 | ), | 1056 | ), |
1017 | 1057 | ||
1018 | TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu", | 1058 | TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu", |
1019 | __entry->dev_major, __entry->dev_minor, | 1059 | MAJOR(__entry->dev), MINOR(__entry->dev), |
1020 | (unsigned long) __entry->ino, __entry->mode, | 1060 | (unsigned long) __entry->ino, |
1021 | __entry->is_metadata, __entry->block) | 1061 | __entry->mode, __entry->is_metadata, __entry->block) |
1022 | ); | 1062 | ); |
1023 | 1063 | ||
1024 | TRACE_EVENT(ext4_da_update_reserve_space, | 1064 | TRACE_EVENT(ext4_da_update_reserve_space, |
@@ -1027,8 +1067,7 @@ TRACE_EVENT(ext4_da_update_reserve_space, | |||
1027 | TP_ARGS(inode, used_blocks), | 1067 | TP_ARGS(inode, used_blocks), |
1028 | 1068 | ||
1029 | TP_STRUCT__entry( | 1069 | TP_STRUCT__entry( |
1030 | __field( int, dev_major ) | 1070 | __field( dev_t, dev ) |
1031 | __field( int, dev_minor ) | ||
1032 | __field( ino_t, ino ) | 1071 | __field( ino_t, ino ) |
1033 | __field( umode_t, mode ) | 1072 | __field( umode_t, mode ) |
1034 | __field( __u64, i_blocks ) | 1073 | __field( __u64, i_blocks ) |
@@ -1039,8 +1078,7 @@ TRACE_EVENT(ext4_da_update_reserve_space, | |||
1039 | ), | 1078 | ), |
1040 | 1079 | ||
1041 | TP_fast_assign( | 1080 | TP_fast_assign( |
1042 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 1081 | __entry->dev = inode->i_sb->s_dev; |
1043 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
1044 | __entry->ino = inode->i_ino; | 1082 | __entry->ino = inode->i_ino; |
1045 | __entry->mode = inode->i_mode; | 1083 | __entry->mode = inode->i_mode; |
1046 | __entry->i_blocks = inode->i_blocks; | 1084 | __entry->i_blocks = inode->i_blocks; |
@@ -1050,10 +1088,12 @@ TRACE_EVENT(ext4_da_update_reserve_space, | |||
1050 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; | 1088 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; |
1051 | ), | 1089 | ), |
1052 | 1090 | ||
1053 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", | 1091 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " |
1054 | __entry->dev_major, __entry->dev_minor, | 1092 | "reserved_data_blocks %d reserved_meta_blocks %d " |
1055 | (unsigned long) __entry->ino, __entry->mode, | 1093 | "allocated_meta_blocks %d", |
1056 | (unsigned long long) __entry->i_blocks, | 1094 | MAJOR(__entry->dev), MINOR(__entry->dev), |
1095 | (unsigned long) __entry->ino, | ||
1096 | __entry->mode, (unsigned long long) __entry->i_blocks, | ||
1057 | __entry->used_blocks, __entry->reserved_data_blocks, | 1097 | __entry->used_blocks, __entry->reserved_data_blocks, |
1058 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) | 1098 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) |
1059 | ); | 1099 | ); |
@@ -1064,8 +1104,7 @@ TRACE_EVENT(ext4_da_reserve_space, | |||
1064 | TP_ARGS(inode, md_needed), | 1104 | TP_ARGS(inode, md_needed), |
1065 | 1105 | ||
1066 | TP_STRUCT__entry( | 1106 | TP_STRUCT__entry( |
1067 | __field( int, dev_major ) | 1107 | __field( dev_t, dev ) |
1068 | __field( int, dev_minor ) | ||
1069 | __field( ino_t, ino ) | 1108 | __field( ino_t, ino ) |
1070 | __field( umode_t, mode ) | 1109 | __field( umode_t, mode ) |
1071 | __field( __u64, i_blocks ) | 1110 | __field( __u64, i_blocks ) |
@@ -1075,8 +1114,7 @@ TRACE_EVENT(ext4_da_reserve_space, | |||
1075 | ), | 1114 | ), |
1076 | 1115 | ||
1077 | TP_fast_assign( | 1116 | TP_fast_assign( |
1078 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 1117 | __entry->dev = inode->i_sb->s_dev; |
1079 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
1080 | __entry->ino = inode->i_ino; | 1118 | __entry->ino = inode->i_ino; |
1081 | __entry->mode = inode->i_mode; | 1119 | __entry->mode = inode->i_mode; |
1082 | __entry->i_blocks = inode->i_blocks; | 1120 | __entry->i_blocks = inode->i_blocks; |
@@ -1085,8 +1123,9 @@ TRACE_EVENT(ext4_da_reserve_space, | |||
1085 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | 1123 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
1086 | ), | 1124 | ), |
1087 | 1125 | ||
1088 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d reserved_data_blocks %d reserved_meta_blocks %d", | 1126 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d " |
1089 | __entry->dev_major, __entry->dev_minor, | 1127 | "reserved_data_blocks %d reserved_meta_blocks %d", |
1128 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1090 | (unsigned long) __entry->ino, | 1129 | (unsigned long) __entry->ino, |
1091 | __entry->mode, (unsigned long long) __entry->i_blocks, | 1130 | __entry->mode, (unsigned long long) __entry->i_blocks, |
1092 | __entry->md_needed, __entry->reserved_data_blocks, | 1131 | __entry->md_needed, __entry->reserved_data_blocks, |
@@ -1099,8 +1138,7 @@ TRACE_EVENT(ext4_da_release_space, | |||
1099 | TP_ARGS(inode, freed_blocks), | 1138 | TP_ARGS(inode, freed_blocks), |
1100 | 1139 | ||
1101 | TP_STRUCT__entry( | 1140 | TP_STRUCT__entry( |
1102 | __field( int, dev_major ) | 1141 | __field( dev_t, dev ) |
1103 | __field( int, dev_minor ) | ||
1104 | __field( ino_t, ino ) | 1142 | __field( ino_t, ino ) |
1105 | __field( umode_t, mode ) | 1143 | __field( umode_t, mode ) |
1106 | __field( __u64, i_blocks ) | 1144 | __field( __u64, i_blocks ) |
@@ -1111,8 +1149,7 @@ TRACE_EVENT(ext4_da_release_space, | |||
1111 | ), | 1149 | ), |
1112 | 1150 | ||
1113 | TP_fast_assign( | 1151 | TP_fast_assign( |
1114 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 1152 | __entry->dev = inode->i_sb->s_dev; |
1115 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
1116 | __entry->ino = inode->i_ino; | 1153 | __entry->ino = inode->i_ino; |
1117 | __entry->mode = inode->i_mode; | 1154 | __entry->mode = inode->i_mode; |
1118 | __entry->i_blocks = inode->i_blocks; | 1155 | __entry->i_blocks = inode->i_blocks; |
@@ -1122,8 +1159,10 @@ TRACE_EVENT(ext4_da_release_space, | |||
1122 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; | 1159 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; |
1123 | ), | 1160 | ), |
1124 | 1161 | ||
1125 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", | 1162 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d " |
1126 | __entry->dev_major, __entry->dev_minor, | 1163 | "reserved_data_blocks %d reserved_meta_blocks %d " |
1164 | "allocated_meta_blocks %d", | ||
1165 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1127 | (unsigned long) __entry->ino, | 1166 | (unsigned long) __entry->ino, |
1128 | __entry->mode, (unsigned long long) __entry->i_blocks, | 1167 | __entry->mode, (unsigned long long) __entry->i_blocks, |
1129 | __entry->freed_blocks, __entry->reserved_data_blocks, | 1168 | __entry->freed_blocks, __entry->reserved_data_blocks, |
@@ -1136,20 +1175,19 @@ DECLARE_EVENT_CLASS(ext4__bitmap_load, | |||
1136 | TP_ARGS(sb, group), | 1175 | TP_ARGS(sb, group), |
1137 | 1176 | ||
1138 | TP_STRUCT__entry( | 1177 | TP_STRUCT__entry( |
1139 | __field( int, dev_major ) | 1178 | __field( dev_t, dev ) |
1140 | __field( int, dev_minor ) | ||
1141 | __field( __u32, group ) | 1179 | __field( __u32, group ) |
1142 | 1180 | ||
1143 | ), | 1181 | ), |
1144 | 1182 | ||
1145 | TP_fast_assign( | 1183 | TP_fast_assign( |
1146 | __entry->dev_major = MAJOR(sb->s_dev); | 1184 | __entry->dev = sb->s_dev; |
1147 | __entry->dev_minor = MINOR(sb->s_dev); | ||
1148 | __entry->group = group; | 1185 | __entry->group = group; |
1149 | ), | 1186 | ), |
1150 | 1187 | ||
1151 | TP_printk("dev %d,%d group %u", | 1188 | TP_printk("dev %d,%d group %u", |
1152 | __entry->dev_major, __entry->dev_minor, __entry->group) | 1189 | MAJOR(__entry->dev), MINOR(__entry->dev), |
1190 | __entry->group) | ||
1153 | ); | 1191 | ); |
1154 | 1192 | ||
1155 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, | 1193 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, |
@@ -1166,6 +1204,349 @@ DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load, | |||
1166 | TP_ARGS(sb, group) | 1204 | TP_ARGS(sb, group) |
1167 | ); | 1205 | ); |
1168 | 1206 | ||
1207 | DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load, | ||
1208 | |||
1209 | TP_PROTO(struct super_block *sb, unsigned long group), | ||
1210 | |||
1211 | TP_ARGS(sb, group) | ||
1212 | ); | ||
1213 | |||
1214 | DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap, | ||
1215 | |||
1216 | TP_PROTO(struct super_block *sb, unsigned long group), | ||
1217 | |||
1218 | TP_ARGS(sb, group) | ||
1219 | ); | ||
1220 | |||
1221 | TRACE_EVENT(ext4_direct_IO_enter, | ||
1222 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), | ||
1223 | |||
1224 | TP_ARGS(inode, offset, len, rw), | ||
1225 | |||
1226 | TP_STRUCT__entry( | ||
1227 | __field( ino_t, ino ) | ||
1228 | __field( dev_t, dev ) | ||
1229 | __field( loff_t, pos ) | ||
1230 | __field( unsigned long, len ) | ||
1231 | __field( int, rw ) | ||
1232 | ), | ||
1233 | |||
1234 | TP_fast_assign( | ||
1235 | __entry->ino = inode->i_ino; | ||
1236 | __entry->dev = inode->i_sb->s_dev; | ||
1237 | __entry->pos = offset; | ||
1238 | __entry->len = len; | ||
1239 | __entry->rw = rw; | ||
1240 | ), | ||
1241 | |||
1242 | TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d", | ||
1243 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1244 | (unsigned long) __entry->ino, | ||
1245 | (unsigned long long) __entry->pos, __entry->len, __entry->rw) | ||
1246 | ); | ||
1247 | |||
1248 | TRACE_EVENT(ext4_direct_IO_exit, | ||
1249 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw, int ret), | ||
1250 | |||
1251 | TP_ARGS(inode, offset, len, rw, ret), | ||
1252 | |||
1253 | TP_STRUCT__entry( | ||
1254 | __field( ino_t, ino ) | ||
1255 | __field( dev_t, dev ) | ||
1256 | __field( loff_t, pos ) | ||
1257 | __field( unsigned long, len ) | ||
1258 | __field( int, rw ) | ||
1259 | __field( int, ret ) | ||
1260 | ), | ||
1261 | |||
1262 | TP_fast_assign( | ||
1263 | __entry->ino = inode->i_ino; | ||
1264 | __entry->dev = inode->i_sb->s_dev; | ||
1265 | __entry->pos = offset; | ||
1266 | __entry->len = len; | ||
1267 | __entry->rw = rw; | ||
1268 | __entry->ret = ret; | ||
1269 | ), | ||
1270 | |||
1271 | TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d ret %d", | ||
1272 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1273 | (unsigned long) __entry->ino, | ||
1274 | (unsigned long long) __entry->pos, __entry->len, | ||
1275 | __entry->rw, __entry->ret) | ||
1276 | ); | ||
1277 | |||
1278 | TRACE_EVENT(ext4_fallocate_enter, | ||
1279 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), | ||
1280 | |||
1281 | TP_ARGS(inode, offset, len, mode), | ||
1282 | |||
1283 | TP_STRUCT__entry( | ||
1284 | __field( ino_t, ino ) | ||
1285 | __field( dev_t, dev ) | ||
1286 | __field( loff_t, pos ) | ||
1287 | __field( loff_t, len ) | ||
1288 | __field( int, mode ) | ||
1289 | ), | ||
1290 | |||
1291 | TP_fast_assign( | ||
1292 | __entry->ino = inode->i_ino; | ||
1293 | __entry->dev = inode->i_sb->s_dev; | ||
1294 | __entry->pos = offset; | ||
1295 | __entry->len = len; | ||
1296 | __entry->mode = mode; | ||
1297 | ), | ||
1298 | |||
1299 | TP_printk("dev %d,%d ino %ld pos %llu len %llu mode %d", | ||
1300 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1301 | (unsigned long) __entry->ino, | ||
1302 | (unsigned long long) __entry->pos, | ||
1303 | (unsigned long long) __entry->len, __entry->mode) | ||
1304 | ); | ||
1305 | |||
1306 | TRACE_EVENT(ext4_fallocate_exit, | ||
1307 | TP_PROTO(struct inode *inode, loff_t offset, unsigned int max_blocks, int ret), | ||
1308 | |||
1309 | TP_ARGS(inode, offset, max_blocks, ret), | ||
1310 | |||
1311 | TP_STRUCT__entry( | ||
1312 | __field( ino_t, ino ) | ||
1313 | __field( dev_t, dev ) | ||
1314 | __field( loff_t, pos ) | ||
1315 | __field( unsigned, blocks ) | ||
1316 | __field( int, ret ) | ||
1317 | ), | ||
1318 | |||
1319 | TP_fast_assign( | ||
1320 | __entry->ino = inode->i_ino; | ||
1321 | __entry->dev = inode->i_sb->s_dev; | ||
1322 | __entry->pos = offset; | ||
1323 | __entry->blocks = max_blocks; | ||
1324 | __entry->ret = ret; | ||
1325 | ), | ||
1326 | |||
1327 | TP_printk("dev %d,%d ino %ld pos %llu blocks %d ret %d", | ||
1328 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1329 | (unsigned long) __entry->ino, | ||
1330 | (unsigned long long) __entry->pos, __entry->blocks, | ||
1331 | __entry->ret) | ||
1332 | ); | ||
1333 | |||
1334 | TRACE_EVENT(ext4_unlink_enter, | ||
1335 | TP_PROTO(struct inode *parent, struct dentry *dentry), | ||
1336 | |||
1337 | TP_ARGS(parent, dentry), | ||
1338 | |||
1339 | TP_STRUCT__entry( | ||
1340 | __field( ino_t, parent ) | ||
1341 | __field( ino_t, ino ) | ||
1342 | __field( loff_t, size ) | ||
1343 | __field( dev_t, dev ) | ||
1344 | ), | ||
1345 | |||
1346 | TP_fast_assign( | ||
1347 | __entry->parent = parent->i_ino; | ||
1348 | __entry->ino = dentry->d_inode->i_ino; | ||
1349 | __entry->size = dentry->d_inode->i_size; | ||
1350 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
1351 | ), | ||
1352 | |||
1353 | TP_printk("dev %d,%d ino %ld size %lld parent %ld", | ||
1354 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1355 | (unsigned long) __entry->ino, __entry->size, | ||
1356 | (unsigned long) __entry->parent) | ||
1357 | ); | ||
1358 | |||
1359 | TRACE_EVENT(ext4_unlink_exit, | ||
1360 | TP_PROTO(struct dentry *dentry, int ret), | ||
1361 | |||
1362 | TP_ARGS(dentry, ret), | ||
1363 | |||
1364 | TP_STRUCT__entry( | ||
1365 | __field( ino_t, ino ) | ||
1366 | __field( dev_t, dev ) | ||
1367 | __field( int, ret ) | ||
1368 | ), | ||
1369 | |||
1370 | TP_fast_assign( | ||
1371 | __entry->ino = dentry->d_inode->i_ino; | ||
1372 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
1373 | __entry->ret = ret; | ||
1374 | ), | ||
1375 | |||
1376 | TP_printk("dev %d,%d ino %ld ret %d", | ||
1377 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1378 | (unsigned long) __entry->ino, | ||
1379 | __entry->ret) | ||
1380 | ); | ||
1381 | |||
1382 | DECLARE_EVENT_CLASS(ext4__truncate, | ||
1383 | TP_PROTO(struct inode *inode), | ||
1384 | |||
1385 | TP_ARGS(inode), | ||
1386 | |||
1387 | TP_STRUCT__entry( | ||
1388 | __field( ino_t, ino ) | ||
1389 | __field( dev_t, dev ) | ||
1390 | __field( blkcnt_t, blocks ) | ||
1391 | ), | ||
1392 | |||
1393 | TP_fast_assign( | ||
1394 | __entry->ino = inode->i_ino; | ||
1395 | __entry->dev = inode->i_sb->s_dev; | ||
1396 | __entry->blocks = inode->i_blocks; | ||
1397 | ), | ||
1398 | |||
1399 | TP_printk("dev %d,%d ino %lu blocks %lu", | ||
1400 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1401 | (unsigned long) __entry->ino, (unsigned long) __entry->blocks) | ||
1402 | ); | ||
1403 | |||
1404 | DEFINE_EVENT(ext4__truncate, ext4_truncate_enter, | ||
1405 | |||
1406 | TP_PROTO(struct inode *inode), | ||
1407 | |||
1408 | TP_ARGS(inode) | ||
1409 | ); | ||
1410 | |||
1411 | DEFINE_EVENT(ext4__truncate, ext4_truncate_exit, | ||
1412 | |||
1413 | TP_PROTO(struct inode *inode), | ||
1414 | |||
1415 | TP_ARGS(inode) | ||
1416 | ); | ||
1417 | |||
1418 | DECLARE_EVENT_CLASS(ext4__map_blocks_enter, | ||
1419 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | ||
1420 | unsigned len, unsigned flags), | ||
1421 | |||
1422 | TP_ARGS(inode, lblk, len, flags), | ||
1423 | |||
1424 | TP_STRUCT__entry( | ||
1425 | __field( ino_t, ino ) | ||
1426 | __field( dev_t, dev ) | ||
1427 | __field( ext4_lblk_t, lblk ) | ||
1428 | __field( unsigned, len ) | ||
1429 | __field( unsigned, flags ) | ||
1430 | ), | ||
1431 | |||
1432 | TP_fast_assign( | ||
1433 | __entry->ino = inode->i_ino; | ||
1434 | __entry->dev = inode->i_sb->s_dev; | ||
1435 | __entry->lblk = lblk; | ||
1436 | __entry->len = len; | ||
1437 | __entry->flags = flags; | ||
1438 | ), | ||
1439 | |||
1440 | TP_printk("dev %d,%d ino %lu lblk %u len %u flags %u", | ||
1441 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1442 | (unsigned long) __entry->ino, | ||
1443 | (unsigned) __entry->lblk, __entry->len, __entry->flags) | ||
1444 | ); | ||
1445 | |||
1446 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter, | ||
1447 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | ||
1448 | unsigned len, unsigned flags), | ||
1449 | |||
1450 | TP_ARGS(inode, lblk, len, flags) | ||
1451 | ); | ||
1452 | |||
1453 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter, | ||
1454 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | ||
1455 | unsigned len, unsigned flags), | ||
1456 | |||
1457 | TP_ARGS(inode, lblk, len, flags) | ||
1458 | ); | ||
1459 | |||
1460 | DECLARE_EVENT_CLASS(ext4__map_blocks_exit, | ||
1461 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | ||
1462 | ext4_fsblk_t pblk, unsigned len, int ret), | ||
1463 | |||
1464 | TP_ARGS(inode, lblk, pblk, len, ret), | ||
1465 | |||
1466 | TP_STRUCT__entry( | ||
1467 | __field( ino_t, ino ) | ||
1468 | __field( dev_t, dev ) | ||
1469 | __field( ext4_lblk_t, lblk ) | ||
1470 | __field( ext4_fsblk_t, pblk ) | ||
1471 | __field( unsigned, len ) | ||
1472 | __field( int, ret ) | ||
1473 | ), | ||
1474 | |||
1475 | TP_fast_assign( | ||
1476 | __entry->ino = inode->i_ino; | ||
1477 | __entry->dev = inode->i_sb->s_dev; | ||
1478 | __entry->lblk = lblk; | ||
1479 | __entry->pblk = pblk; | ||
1480 | __entry->len = len; | ||
1481 | __entry->ret = ret; | ||
1482 | ), | ||
1483 | |||
1484 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d", | ||
1485 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1486 | (unsigned long) __entry->ino, | ||
1487 | (unsigned) __entry->lblk, (unsigned long long) __entry->pblk, | ||
1488 | __entry->len, __entry->ret) | ||
1489 | ); | ||
1490 | |||
1491 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, | ||
1492 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | ||
1493 | ext4_fsblk_t pblk, unsigned len, int ret), | ||
1494 | |||
1495 | TP_ARGS(inode, lblk, pblk, len, ret) | ||
1496 | ); | ||
1497 | |||
1498 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, | ||
1499 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | ||
1500 | ext4_fsblk_t pblk, unsigned len, int ret), | ||
1501 | |||
1502 | TP_ARGS(inode, lblk, pblk, len, ret) | ||
1503 | ); | ||
1504 | |||
1505 | TRACE_EVENT(ext4_ext_load_extent, | ||
1506 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk), | ||
1507 | |||
1508 | TP_ARGS(inode, lblk, pblk), | ||
1509 | |||
1510 | TP_STRUCT__entry( | ||
1511 | __field( ino_t, ino ) | ||
1512 | __field( dev_t, dev ) | ||
1513 | __field( ext4_lblk_t, lblk ) | ||
1514 | __field( ext4_fsblk_t, pblk ) | ||
1515 | ), | ||
1516 | |||
1517 | TP_fast_assign( | ||
1518 | __entry->ino = inode->i_ino; | ||
1519 | __entry->dev = inode->i_sb->s_dev; | ||
1520 | __entry->lblk = lblk; | ||
1521 | __entry->pblk = pblk; | ||
1522 | ), | ||
1523 | |||
1524 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu", | ||
1525 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1526 | (unsigned long) __entry->ino, | ||
1527 | (unsigned) __entry->lblk, (unsigned long long) __entry->pblk) | ||
1528 | ); | ||
1529 | |||
1530 | TRACE_EVENT(ext4_load_inode, | ||
1531 | TP_PROTO(struct inode *inode), | ||
1532 | |||
1533 | TP_ARGS(inode), | ||
1534 | |||
1535 | TP_STRUCT__entry( | ||
1536 | __field( ino_t, ino ) | ||
1537 | __field( dev_t, dev ) | ||
1538 | ), | ||
1539 | |||
1540 | TP_fast_assign( | ||
1541 | __entry->ino = inode->i_ino; | ||
1542 | __entry->dev = inode->i_sb->s_dev; | ||
1543 | ), | ||
1544 | |||
1545 | TP_printk("dev %d,%d ino %ld", | ||
1546 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1547 | (unsigned long) __entry->ino) | ||
1548 | ); | ||
1549 | |||
1169 | #endif /* _TRACE_EXT4_H */ | 1550 | #endif /* _TRACE_EXT4_H */ |
1170 | 1551 | ||
1171 | /* This part must be outside protection */ | 1552 | /* This part must be outside protection */ |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 7447ea9305b5..bf16545cc977 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
@@ -17,19 +17,17 @@ TRACE_EVENT(jbd2_checkpoint, | |||
17 | TP_ARGS(journal, result), | 17 | TP_ARGS(journal, result), |
18 | 18 | ||
19 | TP_STRUCT__entry( | 19 | TP_STRUCT__entry( |
20 | __field( int, dev_major ) | 20 | __field( dev_t, dev ) |
21 | __field( int, dev_minor ) | ||
22 | __field( int, result ) | 21 | __field( int, result ) |
23 | ), | 22 | ), |
24 | 23 | ||
25 | TP_fast_assign( | 24 | TP_fast_assign( |
26 | __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); | 25 | __entry->dev = journal->j_fs_dev->bd_dev; |
27 | __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev); | ||
28 | __entry->result = result; | 26 | __entry->result = result; |
29 | ), | 27 | ), |
30 | 28 | ||
31 | TP_printk("dev %d,%d result %d", | 29 | TP_printk("dev %s result %d", |
32 | __entry->dev_major, __entry->dev_minor, __entry->result) | 30 | jbd2_dev_to_name(__entry->dev), __entry->result) |
33 | ); | 31 | ); |
34 | 32 | ||
35 | DECLARE_EVENT_CLASS(jbd2_commit, | 33 | DECLARE_EVENT_CLASS(jbd2_commit, |
@@ -39,22 +37,20 @@ DECLARE_EVENT_CLASS(jbd2_commit, | |||
39 | TP_ARGS(journal, commit_transaction), | 37 | TP_ARGS(journal, commit_transaction), |
40 | 38 | ||
41 | TP_STRUCT__entry( | 39 | TP_STRUCT__entry( |
42 | __field( int, dev_major ) | 40 | __field( dev_t, dev ) |
43 | __field( int, dev_minor ) | ||
44 | __field( char, sync_commit ) | 41 | __field( char, sync_commit ) |
45 | __field( int, transaction ) | 42 | __field( int, transaction ) |
46 | ), | 43 | ), |
47 | 44 | ||
48 | TP_fast_assign( | 45 | TP_fast_assign( |
49 | __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); | 46 | __entry->dev = journal->j_fs_dev->bd_dev; |
50 | __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev); | ||
51 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | 47 | __entry->sync_commit = commit_transaction->t_synchronous_commit; |
52 | __entry->transaction = commit_transaction->t_tid; | 48 | __entry->transaction = commit_transaction->t_tid; |
53 | ), | 49 | ), |
54 | 50 | ||
55 | TP_printk("dev %d,%d transaction %d sync %d", | 51 | TP_printk("dev %s transaction %d sync %d", |
56 | __entry->dev_major, __entry->dev_minor, | 52 | jbd2_dev_to_name(__entry->dev), __entry->transaction, |
57 | __entry->transaction, __entry->sync_commit) | 53 | __entry->sync_commit) |
58 | ); | 54 | ); |
59 | 55 | ||
60 | DEFINE_EVENT(jbd2_commit, jbd2_start_commit, | 56 | DEFINE_EVENT(jbd2_commit, jbd2_start_commit, |
@@ -91,24 +87,22 @@ TRACE_EVENT(jbd2_end_commit, | |||
91 | TP_ARGS(journal, commit_transaction), | 87 | TP_ARGS(journal, commit_transaction), |
92 | 88 | ||
93 | TP_STRUCT__entry( | 89 | TP_STRUCT__entry( |
94 | __field( int, dev_major ) | 90 | __field( dev_t, dev ) |
95 | __field( int, dev_minor ) | ||
96 | __field( char, sync_commit ) | 91 | __field( char, sync_commit ) |
97 | __field( int, transaction ) | 92 | __field( int, transaction ) |
98 | __field( int, head ) | 93 | __field( int, head ) |
99 | ), | 94 | ), |
100 | 95 | ||
101 | TP_fast_assign( | 96 | TP_fast_assign( |
102 | __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); | 97 | __entry->dev = journal->j_fs_dev->bd_dev; |
103 | __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev); | ||
104 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | 98 | __entry->sync_commit = commit_transaction->t_synchronous_commit; |
105 | __entry->transaction = commit_transaction->t_tid; | 99 | __entry->transaction = commit_transaction->t_tid; |
106 | __entry->head = journal->j_tail_sequence; | 100 | __entry->head = journal->j_tail_sequence; |
107 | ), | 101 | ), |
108 | 102 | ||
109 | TP_printk("dev %d,%d transaction %d sync %d head %d", | 103 | TP_printk("dev %s transaction %d sync %d head %d", |
110 | __entry->dev_major, __entry->dev_minor, | 104 | jbd2_dev_to_name(__entry->dev), __entry->transaction, |
111 | __entry->transaction, __entry->sync_commit, __entry->head) | 105 | __entry->sync_commit, __entry->head) |
112 | ); | 106 | ); |
113 | 107 | ||
114 | TRACE_EVENT(jbd2_submit_inode_data, | 108 | TRACE_EVENT(jbd2_submit_inode_data, |
@@ -117,20 +111,17 @@ TRACE_EVENT(jbd2_submit_inode_data, | |||
117 | TP_ARGS(inode), | 111 | TP_ARGS(inode), |
118 | 112 | ||
119 | TP_STRUCT__entry( | 113 | TP_STRUCT__entry( |
120 | __field( int, dev_major ) | 114 | __field( dev_t, dev ) |
121 | __field( int, dev_minor ) | ||
122 | __field( ino_t, ino ) | 115 | __field( ino_t, ino ) |
123 | ), | 116 | ), |
124 | 117 | ||
125 | TP_fast_assign( | 118 | TP_fast_assign( |
126 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 119 | __entry->dev = inode->i_sb->s_dev; |
127 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
128 | __entry->ino = inode->i_ino; | 120 | __entry->ino = inode->i_ino; |
129 | ), | 121 | ), |
130 | 122 | ||
131 | TP_printk("dev %d,%d ino %lu", | 123 | TP_printk("dev %s ino %lu", |
132 | __entry->dev_major, __entry->dev_minor, | 124 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) |
133 | (unsigned long) __entry->ino) | ||
134 | ); | 125 | ); |
135 | 126 | ||
136 | TRACE_EVENT(jbd2_run_stats, | 127 | TRACE_EVENT(jbd2_run_stats, |
@@ -140,8 +131,7 @@ TRACE_EVENT(jbd2_run_stats, | |||
140 | TP_ARGS(dev, tid, stats), | 131 | TP_ARGS(dev, tid, stats), |
141 | 132 | ||
142 | TP_STRUCT__entry( | 133 | TP_STRUCT__entry( |
143 | __field( int, dev_major ) | 134 | __field( dev_t, dev ) |
144 | __field( int, dev_minor ) | ||
145 | __field( unsigned long, tid ) | 135 | __field( unsigned long, tid ) |
146 | __field( unsigned long, wait ) | 136 | __field( unsigned long, wait ) |
147 | __field( unsigned long, running ) | 137 | __field( unsigned long, running ) |
@@ -154,8 +144,7 @@ TRACE_EVENT(jbd2_run_stats, | |||
154 | ), | 144 | ), |
155 | 145 | ||
156 | TP_fast_assign( | 146 | TP_fast_assign( |
157 | __entry->dev_major = MAJOR(dev); | 147 | __entry->dev = dev; |
158 | __entry->dev_minor = MINOR(dev); | ||
159 | __entry->tid = tid; | 148 | __entry->tid = tid; |
160 | __entry->wait = stats->rs_wait; | 149 | __entry->wait = stats->rs_wait; |
161 | __entry->running = stats->rs_running; | 150 | __entry->running = stats->rs_running; |
@@ -167,9 +156,9 @@ TRACE_EVENT(jbd2_run_stats, | |||
167 | __entry->blocks_logged = stats->rs_blocks_logged; | 156 | __entry->blocks_logged = stats->rs_blocks_logged; |
168 | ), | 157 | ), |
169 | 158 | ||
170 | TP_printk("dev %d,%d tid %lu wait %u running %u locked %u flushing %u " | 159 | TP_printk("dev %s tid %lu wait %u running %u locked %u flushing %u " |
171 | "logging %u handle_count %u blocks %u blocks_logged %u", | 160 | "logging %u handle_count %u blocks %u blocks_logged %u", |
172 | __entry->dev_major, __entry->dev_minor, __entry->tid, | 161 | jbd2_dev_to_name(__entry->dev), __entry->tid, |
173 | jiffies_to_msecs(__entry->wait), | 162 | jiffies_to_msecs(__entry->wait), |
174 | jiffies_to_msecs(__entry->running), | 163 | jiffies_to_msecs(__entry->running), |
175 | jiffies_to_msecs(__entry->locked), | 164 | jiffies_to_msecs(__entry->locked), |
@@ -186,8 +175,7 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
186 | TP_ARGS(dev, tid, stats), | 175 | TP_ARGS(dev, tid, stats), |
187 | 176 | ||
188 | TP_STRUCT__entry( | 177 | TP_STRUCT__entry( |
189 | __field( int, dev_major ) | 178 | __field( dev_t, dev ) |
190 | __field( int, dev_minor ) | ||
191 | __field( unsigned long, tid ) | 179 | __field( unsigned long, tid ) |
192 | __field( unsigned long, chp_time ) | 180 | __field( unsigned long, chp_time ) |
193 | __field( __u32, forced_to_close ) | 181 | __field( __u32, forced_to_close ) |
@@ -196,8 +184,7 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
196 | ), | 184 | ), |
197 | 185 | ||
198 | TP_fast_assign( | 186 | TP_fast_assign( |
199 | __entry->dev_major = MAJOR(dev); | 187 | __entry->dev = dev; |
200 | __entry->dev_minor = MINOR(dev); | ||
201 | __entry->tid = tid; | 188 | __entry->tid = tid; |
202 | __entry->chp_time = stats->cs_chp_time; | 189 | __entry->chp_time = stats->cs_chp_time; |
203 | __entry->forced_to_close= stats->cs_forced_to_close; | 190 | __entry->forced_to_close= stats->cs_forced_to_close; |
@@ -205,9 +192,9 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
205 | __entry->dropped = stats->cs_dropped; | 192 | __entry->dropped = stats->cs_dropped; |
206 | ), | 193 | ), |
207 | 194 | ||
208 | TP_printk("dev %d,%d tid %lu chp_time %u forced_to_close %u " | 195 | TP_printk("dev %s tid %lu chp_time %u forced_to_close %u " |
209 | "written %u dropped %u", | 196 | "written %u dropped %u", |
210 | __entry->dev_major, __entry->dev_minor, __entry->tid, | 197 | jbd2_dev_to_name(__entry->dev), __entry->tid, |
211 | jiffies_to_msecs(__entry->chp_time), | 198 | jiffies_to_msecs(__entry->chp_time), |
212 | __entry->forced_to_close, __entry->written, __entry->dropped) | 199 | __entry->forced_to_close, __entry->written, __entry->dropped) |
213 | ); | 200 | ); |
@@ -220,8 +207,7 @@ TRACE_EVENT(jbd2_cleanup_journal_tail, | |||
220 | TP_ARGS(journal, first_tid, block_nr, freed), | 207 | TP_ARGS(journal, first_tid, block_nr, freed), |
221 | 208 | ||
222 | TP_STRUCT__entry( | 209 | TP_STRUCT__entry( |
223 | __field( int, dev_major ) | 210 | __field( dev_t, dev ) |
224 | __field( int, dev_minor ) | ||
225 | __field( tid_t, tail_sequence ) | 211 | __field( tid_t, tail_sequence ) |
226 | __field( tid_t, first_tid ) | 212 | __field( tid_t, first_tid ) |
227 | __field(unsigned long, block_nr ) | 213 | __field(unsigned long, block_nr ) |
@@ -229,18 +215,16 @@ TRACE_EVENT(jbd2_cleanup_journal_tail, | |||
229 | ), | 215 | ), |
230 | 216 | ||
231 | TP_fast_assign( | 217 | TP_fast_assign( |
232 | __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); | 218 | __entry->dev = journal->j_fs_dev->bd_dev; |
233 | __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev); | ||
234 | __entry->tail_sequence = journal->j_tail_sequence; | 219 | __entry->tail_sequence = journal->j_tail_sequence; |
235 | __entry->first_tid = first_tid; | 220 | __entry->first_tid = first_tid; |
236 | __entry->block_nr = block_nr; | 221 | __entry->block_nr = block_nr; |
237 | __entry->freed = freed; | 222 | __entry->freed = freed; |
238 | ), | 223 | ), |
239 | 224 | ||
240 | TP_printk("dev %d,%d from %u to %u offset %lu freed %lu", | 225 | TP_printk("dev %s from %u to %u offset %lu freed %lu", |
241 | __entry->dev_major, __entry->dev_minor, | 226 | jbd2_dev_to_name(__entry->dev), __entry->tail_sequence, |
242 | __entry->tail_sequence, __entry->first_tid, | 227 | __entry->first_tid, __entry->block_nr, __entry->freed) |
243 | __entry->block_nr, __entry->freed) | ||
244 | ); | 228 | ); |
245 | 229 | ||
246 | #endif /* _TRACE_JBD2_H */ | 230 | #endif /* _TRACE_JBD2_H */ |