aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-04-01 15:14:04 -0400
committerIngo Molnar <mingo@elte.hu>2011-04-01 15:14:04 -0400
commit5679027e74126e0dfc860869b0e7ceab1dd06318 (patch)
tree9a18b1a2f53be3bad8c9e4db01617fb51f067f64 /include
parentccd0d44fad38dc1bb4b26dcc7a30e9f2c3b36870 (diff)
parenta4dd99250dc49031e6a92a895dbcc230a4832083 (diff)
Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-2.6-rcu into core/urgent
Diffstat (limited to 'include')
-rw-r--r--include/linux/can/core.h9
-rw-r--r--include/linux/ethtool.h1
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/input.h7
-rw-r--r--include/linux/irq.h180
-rw-r--r--include/linux/irqdesc.h60
-rw-r--r--include/linux/mfd/ab8500.h41
-rw-r--r--include/linux/mfd/ab8500/gpio.h21
-rw-r--r--include/linux/mmc/sh_mobile_sdhi.h (renamed from include/linux/mfd/sh_mobile_sdhi.h)0
-rw-r--r--include/linux/mmc/tmio.h63
-rw-r--r--include/linux/nfs_page.h1
-rw-r--r--include/linux/rcupdate.h20
-rw-r--r--include/linux/skbuff.h8
-rw-r--r--include/linux/sonypi.h1
-rw-r--r--include/linux/vmalloc.h32
-rw-r--r--include/net/dst.h2
-rw-r--r--include/net/rose.h8
-rw-r--r--include/net/xfrm.h22
-rw-r--r--include/trace/events/btrfs.h667
19 files changed, 953 insertions, 192 deletions
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 */
38struct can_proto { 38struct 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
60extern int can_send(struct sk_buff *skb, int loop); 60extern int can_send(struct sk_buff *skb, int loop);
61extern 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/ethtool.h b/include/linux/ethtool.h
index ae757bcf1280..c8fcbdd2b0e7 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -680,6 +680,7 @@ int ethtool_op_set_ufo(struct net_device *dev, u32 data);
680u32 ethtool_op_get_flags(struct net_device *dev); 680u32 ethtool_op_get_flags(struct net_device *dev);
681int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported); 681int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported);
682void ethtool_ntuple_flush(struct net_device *dev); 682void ethtool_ntuple_flush(struct net_device *dev);
683bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported);
683 684
684/** 685/**
685 * &ethtool_ops - Alter and report network device settings 686 * &ethtool_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 5d876c9b3a3d..2a375a72ce3c 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -92,18 +92,6 @@ enum {
92 IRQ_NO_BALANCING = (1 << 13), 92 IRQ_NO_BALANCING = (1 << 13),
93 IRQ_MOVE_PCNTXT = (1 << 14), 93 IRQ_MOVE_PCNTXT = (1 << 14),
94 IRQ_NESTED_THREAD = (1 << 15), 94 IRQ_NESTED_THREAD = (1 << 15),
95
96#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
97 IRQ_INPROGRESS = (1 << 16),
98 IRQ_REPLAY = (1 << 17),
99 IRQ_WAITING = (1 << 18),
100 IRQ_DISABLED = (1 << 19),
101 IRQ_PENDING = (1 << 20),
102 IRQ_MASKED = (1 << 21),
103 IRQ_MOVE_PENDING = (1 << 22),
104 IRQ_AFFINITY_SET = (1 << 23),
105 IRQ_WAKEUP = (1 << 24),
106#endif
107}; 95};
108 96
109#define IRQF_MODIFY_MASK \ 97#define IRQF_MODIFY_MASK \
@@ -135,7 +123,7 @@ struct msi_desc;
135 * 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
136 * @irq: interrupt number 124 * @irq: interrupt number
137 * @node: node index useful for balancing 125 * @node: node index useful for balancing
138 * @state_use_accessor: status information for irq chip functions. 126 * @state_use_accessors: status information for irq chip functions.
139 * Use accessor functions to deal with it 127 * Use accessor functions to deal with it
140 * @chip: low level interrupt hardware access 128 * @chip: low level interrupt hardware access
141 * @handler_data: per-IRQ data for the irq_chip methods 129 * @handler_data: per-IRQ data for the irq_chip methods
@@ -174,6 +162,9 @@ struct irq_data {
174 * from suspend 162 * from suspend
175 * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process 163 * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process
176 * 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
177 */ 168 */
178enum { 169enum {
179 IRQD_TRIGGER_MASK = 0xf, 170 IRQD_TRIGGER_MASK = 0xf,
@@ -184,6 +175,9 @@ enum {
184 IRQD_LEVEL = (1 << 13), 175 IRQD_LEVEL = (1 << 13),
185 IRQD_WAKEUP_STATE = (1 << 14), 176 IRQD_WAKEUP_STATE = (1 << 14),
186 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),
187}; 181};
188 182
189static inline bool irqd_is_setaffinity_pending(struct irq_data *d) 183static inline bool irqd_is_setaffinity_pending(struct irq_data *d)
@@ -206,6 +200,11 @@ static inline bool irqd_affinity_was_set(struct irq_data *d)
206 return d->state_use_accessors & IRQD_AFFINITY_SET; 200 return d->state_use_accessors & IRQD_AFFINITY_SET;
207} 201}
208 202
203static inline void irqd_mark_affinity_was_set(struct irq_data *d)
204{
205 d->state_use_accessors |= IRQD_AFFINITY_SET;
206}
207
209static inline u32 irqd_get_trigger_type(struct irq_data *d) 208static inline u32 irqd_get_trigger_type(struct irq_data *d)
210{ 209{
211 return d->state_use_accessors & IRQD_TRIGGER_MASK; 210 return d->state_use_accessors & IRQD_TRIGGER_MASK;
@@ -235,6 +234,36 @@ static inline bool irqd_can_move_in_process_context(struct irq_data *d)
235 return d->state_use_accessors & IRQD_MOVE_PCNTXT; 234 return d->state_use_accessors & IRQD_MOVE_PCNTXT;
236} 235}
237 236
237static inline bool irqd_irq_disabled(struct irq_data *d)
238{
239 return d->state_use_accessors & IRQD_IRQ_DISABLED;
240}
241
242static inline bool irqd_irq_masked(struct irq_data *d)
243{
244 return d->state_use_accessors & IRQD_IRQ_MASKED;
245}
246
247static 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 */
257static inline void irqd_set_chained_irq_inprogress(struct irq_data *d)
258{
259 d->state_use_accessors |= IRQD_IRQ_INPROGRESS;
260}
261
262static inline void irqd_clr_chained_irq_inprogress(struct irq_data *d)
263{
264 d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS;
265}
266
238/** 267/**
239 * struct irq_chip - hardware interrupt chip descriptor 268 * struct irq_chip - hardware interrupt chip descriptor
240 * 269 *
@@ -271,6 +300,8 @@ static inline bool irqd_can_move_in_process_context(struct irq_data *d)
271 * @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
272 * @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
273 * @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
274 * @irq_print_chip: optional to print special chip info in show_interrupts 305 * @irq_print_chip: optional to print special chip info in show_interrupts
275 * @flags: chip specific flags 306 * @flags: chip specific flags
276 * 307 *
@@ -278,28 +309,6 @@ static inline bool irqd_can_move_in_process_context(struct irq_data *d)
278 */ 309 */
279struct irq_chip { 310struct irq_chip {
280 const char *name; 311 const char *name;
281#ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED
282 unsigned int (*startup)(unsigned int irq);
283 void (*shutdown)(unsigned int irq);
284 void (*enable)(unsigned int irq);
285 void (*disable)(unsigned int irq);
286
287 void (*ack)(unsigned int irq);
288 void (*mask)(unsigned int irq);
289 void (*mask_ack)(unsigned int irq);
290 void (*unmask)(unsigned int irq);
291 void (*eoi)(unsigned int irq);
292
293 void (*end)(unsigned int irq);
294 int (*set_affinity)(unsigned int irq,
295 const struct cpumask *dest);
296 int (*retrigger)(unsigned int irq);
297 int (*set_type)(unsigned int irq, unsigned int flow_type);
298 int (*set_wake)(unsigned int irq, unsigned int on);
299
300 void (*bus_lock)(unsigned int irq);
301 void (*bus_sync_unlock)(unsigned int irq);
302#endif
303 unsigned int (*irq_startup)(struct irq_data *data); 312 unsigned int (*irq_startup)(struct irq_data *data);
304 void (*irq_shutdown)(struct irq_data *data); 313 void (*irq_shutdown)(struct irq_data *data);
305 void (*irq_enable)(struct irq_data *data); 314 void (*irq_enable)(struct irq_data *data);
@@ -319,6 +328,9 @@ struct irq_chip {
319 void (*irq_bus_lock)(struct irq_data *data); 328 void (*irq_bus_lock)(struct irq_data *data);
320 void (*irq_bus_sync_unlock)(struct irq_data *data); 329 void (*irq_bus_sync_unlock)(struct irq_data *data);
321 330
331 void (*irq_cpu_online)(struct irq_data *data);
332 void (*irq_cpu_offline)(struct irq_data *data);
333
322 void (*irq_print_chip)(struct irq_data *data, struct seq_file *p); 334 void (*irq_print_chip)(struct irq_data *data, struct seq_file *p);
323 335
324 unsigned long flags; 336 unsigned long flags;
@@ -335,11 +347,14 @@ struct irq_chip {
335 * IRQCHIP_SET_TYPE_MASKED: Mask before calling chip.irq_set_type() 347 * IRQCHIP_SET_TYPE_MASKED: Mask before calling chip.irq_set_type()
336 * 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
337 * 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
338 */ 352 */
339enum { 353enum {
340 IRQCHIP_SET_TYPE_MASKED = (1 << 0), 354 IRQCHIP_SET_TYPE_MASKED = (1 << 0),
341 IRQCHIP_EOI_IF_HANDLED = (1 << 1), 355 IRQCHIP_EOI_IF_HANDLED = (1 << 1),
342 IRQCHIP_MASK_ON_SUSPEND = (1 << 2), 356 IRQCHIP_MASK_ON_SUSPEND = (1 << 2),
357 IRQCHIP_ONOFFLINE_ENABLED = (1 << 3),
343}; 358};
344 359
345/* 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 */
@@ -364,25 +379,22 @@ struct irqaction;
364extern int setup_irq(unsigned int irq, struct irqaction *new); 379extern int setup_irq(unsigned int irq, struct irqaction *new);
365extern void remove_irq(unsigned int irq, struct irqaction *act); 380extern void remove_irq(unsigned int irq, struct irqaction *act);
366 381
382extern void irq_cpu_online(void);
383extern void irq_cpu_offline(void);
384extern int __irq_set_affinity_locked(struct irq_data *data, const struct cpumask *cpumask);
385
367#ifdef CONFIG_GENERIC_HARDIRQS 386#ifdef CONFIG_GENERIC_HARDIRQS
368 387
369#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) 388#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ)
370void move_native_irq(int irq);
371void move_masked_irq(int irq);
372void irq_move_irq(struct irq_data *data); 389void irq_move_irq(struct irq_data *data);
373void irq_move_masked_irq(struct irq_data *data); 390void irq_move_masked_irq(struct irq_data *data);
374#else 391#else
375static inline void move_native_irq(int irq) { }
376static inline void move_masked_irq(int irq) { }
377static inline void irq_move_irq(struct irq_data *data) { } 392static inline void irq_move_irq(struct irq_data *data) { }
378static inline void irq_move_masked_irq(struct irq_data *data) { } 393static inline void irq_move_masked_irq(struct irq_data *data) { }
379#endif 394#endif
380 395
381extern int no_irq_affinity; 396extern int no_irq_affinity;
382 397
383/* Handle irq action chains: */
384extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action);
385
386/* 398/*
387 * Built-in IRQ handlers for various IRQ types, 399 * Built-in IRQ handlers for various IRQ types,
388 * callable via desc->handle_irq() 400 * callable via desc->handle_irq()
@@ -390,6 +402,7 @@ extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action);
390extern void handle_level_irq(unsigned int irq, struct irq_desc *desc); 402extern void handle_level_irq(unsigned int irq, struct irq_desc *desc);
391extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); 403extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc);
392extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc); 404extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc);
405extern void handle_edge_eoi_irq(unsigned int irq, struct irq_desc *desc);
393extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc); 406extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc);
394extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc); 407extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc);
395extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); 408extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc);
@@ -538,89 +551,6 @@ static inline struct msi_desc *irq_data_get_msi(struct irq_data *d)
538 return d->msi_desc; 551 return d->msi_desc;
539} 552}
540 553
541#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
542/* Please do not use: Use the replacement functions instead */
543static inline int set_irq_chip(unsigned int irq, struct irq_chip *chip)
544{
545 return irq_set_chip(irq, chip);
546}
547static inline int set_irq_data(unsigned int irq, void *data)
548{
549 return irq_set_handler_data(irq, data);
550}
551static inline int set_irq_chip_data(unsigned int irq, void *data)
552{
553 return irq_set_chip_data(irq, data);
554}
555static inline int set_irq_type(unsigned int irq, unsigned int type)
556{
557 return irq_set_irq_type(irq, type);
558}
559static inline int set_irq_msi(unsigned int irq, struct msi_desc *entry)
560{
561 return irq_set_msi_desc(irq, entry);
562}
563static inline struct irq_chip *get_irq_chip(unsigned int irq)
564{
565 return irq_get_chip(irq);
566}
567static inline void *get_irq_chip_data(unsigned int irq)
568{
569 return irq_get_chip_data(irq);
570}
571static inline void *get_irq_data(unsigned int irq)
572{
573 return irq_get_handler_data(irq);
574}
575static inline void *irq_data_get_irq_data(struct irq_data *d)
576{
577 return irq_data_get_irq_handler_data(d);
578}
579static inline struct msi_desc *get_irq_msi(unsigned int irq)
580{
581 return irq_get_msi_desc(irq);
582}
583static inline void set_irq_noprobe(unsigned int irq)
584{
585 irq_set_noprobe(irq);
586}
587static inline void set_irq_probe(unsigned int irq)
588{
589 irq_set_probe(irq);
590}
591static inline void set_irq_nested_thread(unsigned int irq, int nest)
592{
593 irq_set_nested_thread(irq, nest);
594}
595static inline void
596set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
597 irq_flow_handler_t handle, const char *name)
598{
599 irq_set_chip_and_handler_name(irq, chip, handle, name);
600}
601static inline void
602set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
603 irq_flow_handler_t handle)
604{
605 irq_set_chip_and_handler(irq, chip, handle);
606}
607static inline void
608__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
609 const char *name)
610{
611 __irq_set_handler(irq, handle, is_chained, name);
612}
613static inline void set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
614{
615 irq_set_handler(irq, handle);
616}
617static inline void
618set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle)
619{
620 irq_set_chained_handler(irq, handle);
621}
622#endif
623
624int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); 554int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node);
625void irq_free_descs(unsigned int irq, unsigned int cnt); 555void irq_free_descs(unsigned int irq, unsigned int cnt);
626int irq_reserve_irqs(unsigned int from, unsigned int cnt); 556int irq_reserve_irqs(unsigned int from, unsigned int cnt);
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 15e6c3905f41..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 */
37struct irq_desc { 37struct 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 */
@@ -127,27 +98,6 @@ static inline struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc)
127 return desc->irq_data.msi_desc; 98 return desc->irq_data.msi_desc;
128} 99}
129 100
130#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
131static inline struct irq_chip *get_irq_desc_chip(struct irq_desc *desc)
132{
133 return irq_desc_get_chip(desc);
134}
135static inline void *get_irq_desc_data(struct irq_desc *desc)
136{
137 return irq_desc_get_handler_data(desc);
138}
139
140static inline void *get_irq_desc_chip_data(struct irq_desc *desc)
141{
142 return irq_desc_get_chip_data(desc);
143}
144
145static inline struct msi_desc *get_irq_desc_msi(struct irq_desc *desc)
146{
147 return irq_desc_get_msi_desc(desc);
148}
149#endif
150
151/* 101/*
152 * Architectures call this to let the generic IRQ layer 102 * Architectures call this to let the generic IRQ layer
153 * handle an interrupt. If the descriptor is attached to an 103 * handle an interrupt. If the descriptor is attached to an
@@ -194,21 +144,13 @@ __irq_set_chip_handler_name_locked(unsigned int irq, struct irq_chip *chip,
194 desc->name = name; 144 desc->name = name;
195} 145}
196 146
197#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
198static inline void __set_irq_handler_unlocked(int irq,
199 irq_flow_handler_t handler)
200{
201 __irq_set_handler_locked(irq, handler);
202}
203
204static inline int irq_balancing_disabled(unsigned int irq) 147static inline int irq_balancing_disabled(unsigned int irq)
205{ 148{
206 struct irq_desc *desc; 149 struct irq_desc *desc;
207 150
208 desc = irq_to_desc(irq); 151 desc = irq_to_desc(irq);
209 return desc->status & IRQ_NO_BALANCING_MASK; 152 return desc->status_use_accessors & IRQ_NO_BALANCING_MASK;
210} 153}
211#endif
212 154
213static inline void 155static inline void
214irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) 156irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class)
diff --git a/include/linux/mfd/ab8500.h b/include/linux/mfd/ab8500.h
index 6e4f77ef4d20..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
@@ -141,6 +180,7 @@ struct ab8500 {
141 180
142struct regulator_reg_init; 181struct regulator_reg_init;
143struct regulator_init_data; 182struct regulator_init_data;
183struct ab8500_gpio_platform_data;
144 184
145/** 185/**
146 * struct ab8500_platform_data - AB8500 platform data 186 * struct ab8500_platform_data - AB8500 platform data
@@ -158,6 +198,7 @@ struct ab8500_platform_data {
158 struct ab8500_regulator_reg_init *regulator_reg_init; 198 struct ab8500_regulator_reg_init *regulator_reg_init;
159 int num_regulator; 199 int num_regulator;
160 struct regulator_init_data *regulator; 200 struct regulator_init_data *regulator;
201 struct ab8500_gpio_platform_data *gpio;
161}; 202};
162 203
163extern int __devinit ab8500_init(struct ab8500 *ab8500); 204extern 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
15struct 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/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
index c981b959760f..c981b959760f 100644
--- a/include/linux/mfd/sh_mobile_sdhi.h
+++ b/include/linux/mmc/sh_mobile_sdhi.h
diff --git a/include/linux/mmc/tmio.h b/include/linux/mmc/tmio.h
new file mode 100644
index 000000000000..19490b942db0
--- /dev/null
+++ b/include/linux/mmc/tmio.h
@@ -0,0 +1,63 @@
1/*
2 * include/linux/mmc/tmio.h
3 *
4 * Copyright (C) 2007 Ian Molton
5 * Copyright (C) 2004 Ian Molton
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Driver for the MMC / SD / SDIO cell found in:
12 *
13 * TC6393XB TC6391XB TC6387XB T7L66XB ASIC3
14 */
15#ifndef _LINUX_MMC_TMIO_H_
16#define _LINUX_MMC_TMIO_H_
17
18#define CTL_SD_CMD 0x00
19#define CTL_ARG_REG 0x04
20#define CTL_STOP_INTERNAL_ACTION 0x08
21#define CTL_XFER_BLK_COUNT 0xa
22#define CTL_RESPONSE 0x0c
23#define CTL_STATUS 0x1c
24#define CTL_IRQ_MASK 0x20
25#define CTL_SD_CARD_CLK_CTL 0x24
26#define CTL_SD_XFER_LEN 0x26
27#define CTL_SD_MEM_CARD_OPT 0x28
28#define CTL_SD_ERROR_DETAIL_STATUS 0x2c
29#define CTL_SD_DATA_PORT 0x30
30#define CTL_TRANSACTION_CTL 0x34
31#define CTL_SDIO_STATUS 0x36
32#define CTL_SDIO_IRQ_MASK 0x38
33#define CTL_RESET_SD 0xe0
34#define CTL_SDIO_REGS 0x100
35#define CTL_CLK_AND_WAIT_CTL 0x138
36#define CTL_RESET_SDIO 0x1e0
37
38/* Definitions for values the CTRL_STATUS register can take. */
39#define TMIO_STAT_CMDRESPEND 0x00000001
40#define TMIO_STAT_DATAEND 0x00000004
41#define TMIO_STAT_CARD_REMOVE 0x00000008
42#define TMIO_STAT_CARD_INSERT 0x00000010
43#define TMIO_STAT_SIGSTATE 0x00000020
44#define TMIO_STAT_WRPROTECT 0x00000080
45#define TMIO_STAT_CARD_REMOVE_A 0x00000100
46#define TMIO_STAT_CARD_INSERT_A 0x00000200
47#define TMIO_STAT_SIGSTATE_A 0x00000400
48#define TMIO_STAT_CMD_IDX_ERR 0x00010000
49#define TMIO_STAT_CRCFAIL 0x00020000
50#define TMIO_STAT_STOPBIT_ERR 0x00040000
51#define TMIO_STAT_DATATIMEOUT 0x00080000
52#define TMIO_STAT_RXOVERFLOW 0x00100000
53#define TMIO_STAT_TXUNDERRUN 0x00200000
54#define TMIO_STAT_CMDTIMEOUT 0x00400000
55#define TMIO_STAT_RXRDY 0x01000000
56#define TMIO_STAT_TXRQ 0x02000000
57#define TMIO_STAT_ILL_FUNC 0x20000000
58#define TMIO_STAT_CMD_BUSY 0x40000000
59#define TMIO_STAT_ILL_ACCESS 0x80000000
60
61#define TMIO_BBS 512 /* Boot block size */
62
63#endif /* _LINUX_MMC_TMIO_H_ */
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index 8023e4e25133..91af2e49fa3a 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -78,7 +78,6 @@ extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx,
78 struct page *page, 78 struct page *page,
79 unsigned int offset, 79 unsigned int offset,
80 unsigned int count); 80 unsigned int count);
81extern void nfs_clear_request(struct nfs_page *req);
82extern void nfs_release_request(struct nfs_page *req); 81extern void nfs_release_request(struct nfs_page *req);
83 82
84 83
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index af5614856285..ff422d2b7f90 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -339,6 +339,12 @@ extern int rcu_my_thread_group_empty(void);
339 ((typeof(*p) __force __kernel *)(p)); \ 339 ((typeof(*p) __force __kernel *)(p)); \
340 }) 340 })
341 341
342#define __rcu_access_index(p, space) \
343 ({ \
344 typeof(p) _________p1 = ACCESS_ONCE(p); \
345 rcu_dereference_sparse(p, space); \
346 (_________p1); \
347 })
342#define __rcu_dereference_index_check(p, c) \ 348#define __rcu_dereference_index_check(p, c) \
343 ({ \ 349 ({ \
344 typeof(p) _________p1 = ACCESS_ONCE(p); \ 350 typeof(p) _________p1 = ACCESS_ONCE(p); \
@@ -429,6 +435,20 @@ extern int rcu_my_thread_group_empty(void);
429#define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/ 435#define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/
430 436
431/** 437/**
438 * rcu_access_index() - fetch RCU index with no dereferencing
439 * @p: The index to read
440 *
441 * Return the value of the specified RCU-protected index, but omit the
442 * smp_read_barrier_depends() and keep the ACCESS_ONCE(). This is useful
443 * when the value of this index is accessed, but the index is not
444 * dereferenced, for example, when testing an RCU-protected index against
445 * -1. Although rcu_access_index() may also be used in cases where
446 * update-side locks prevent the value of the index from changing, you
447 * should instead use rcu_dereference_index_protected() for this use case.
448 */
449#define rcu_access_index(p) __rcu_access_index((p), __rcu)
450
451/**
432 * rcu_dereference_index_check() - rcu_dereference for indices with debug checking 452 * rcu_dereference_index_check() - rcu_dereference for indices with debug checking
433 * @p: The pointer to read, prior to dereferencing 453 * @p: The pointer to read, prior to dereferencing
434 * @c: The conditions under which the dereference will take place 454 * @c: The conditions under which the dereference will take place
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
123struct sk_buff; 123struct 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
128typedef struct skb_frag_struct skb_frag_t; 134typedef 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/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
96extern int map_vm_area(struct vm_struct *area, pgprot_t prot, 96extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
97 struct page ***pages); 97 struct page ***pages);
98#ifdef CONFIG_MMU
98extern int map_kernel_range_noflush(unsigned long start, unsigned long size, 99extern 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);
100extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long size); 101extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long size);
101extern void unmap_kernel_range(unsigned long addr, unsigned long size); 102extern void unmap_kernel_range(unsigned long addr, unsigned long size);
103#else
104static inline int
105map_kernel_range_noflush(unsigned long start, unsigned long size,
106 pgprot_t prot, struct page **pages)
107{
108 return size >> PAGE_SHIFT;
109}
110static inline void
111unmap_kernel_range_noflush(unsigned long addr, unsigned long size)
112{
113}
114static inline void
115unmap_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. */
104extern struct vm_struct *alloc_vm_area(size_t size); 121extern struct vm_struct *alloc_vm_area(size_t size);
@@ -116,11 +133,26 @@ extern struct vm_struct *vmlist;
116extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); 133extern __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
119struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, 137struct 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
123void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); 141void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms);
142# else
143static inline struct vm_struct **
144pcpu_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
151static inline void
152pcpu_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/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
346static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) 346static 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/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 *);
214extern int rose_validate_nr(struct sock *, unsigned short); 220extern int rose_validate_nr(struct sock *, unsigned short);
215extern void rose_write_internal(struct sock *, int); 221extern void rose_write_internal(struct sock *, int);
216extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *); 222extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *);
217extern int rose_parse_facilities(unsigned char *, struct rose_facilities_struct *); 223extern int rose_parse_facilities(unsigned char *, unsigned int, struct rose_facilities_struct *);
218extern void rose_disconnect(struct sock *, int, int, int); 224extern void rose_disconnect(struct sock *, int, int, int);
219 225
220/* rose_timer.c */ 226/* rose_timer.c */
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
1604static 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
1604static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) 1626static 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/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
10struct btrfs_root;
11struct btrfs_fs_info;
12struct btrfs_inode;
13struct extent_map;
14struct btrfs_ordered_extent;
15struct btrfs_delayed_ref_node;
16struct btrfs_delayed_tree_ref;
17struct btrfs_delayed_data_ref;
18struct btrfs_delayed_ref_head;
19struct map_lookup;
20struct 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
47TRACE_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
68DECLARE_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
106DEFINE_EVENT(btrfs__inode, btrfs_inode_new,
107
108 TP_PROTO(struct inode *inode),
109
110 TP_ARGS(inode)
111);
112
113DEFINE_EVENT(btrfs__inode, btrfs_inode_request,
114
115 TP_PROTO(struct inode *inode),
116
117 TP_ARGS(inode)
118);
119
120DEFINE_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
144TRACE_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
197DECLARE_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
245DEFINE_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
252DEFINE_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
259DEFINE_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
266DEFINE_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
273DECLARE_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
324DEFINE_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
332TRACE_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
365TRACE_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
395TRACE_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
420TRACE_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
459TRACE_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
502TRACE_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
541DECLARE_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
575DEFINE_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
583DEFINE_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
591TRACE_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
626DECLARE_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
650DEFINE_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
657DEFINE_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>