diff options
Diffstat (limited to 'include')
35 files changed, 1498 insertions, 84 deletions
diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h new file mode 100644 index 000000000000..5406a601185c --- /dev/null +++ b/include/asm-generic/dma-mapping-common.h | |||
@@ -0,0 +1,190 @@ | |||
1 | #ifndef _ASM_GENERIC_DMA_MAPPING_H | ||
2 | #define _ASM_GENERIC_DMA_MAPPING_H | ||
3 | |||
4 | #include <linux/kmemcheck.h> | ||
5 | #include <linux/scatterlist.h> | ||
6 | #include <linux/dma-debug.h> | ||
7 | #include <linux/dma-attrs.h> | ||
8 | |||
9 | static inline dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr, | ||
10 | size_t size, | ||
11 | enum dma_data_direction dir, | ||
12 | struct dma_attrs *attrs) | ||
13 | { | ||
14 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
15 | dma_addr_t addr; | ||
16 | |||
17 | kmemcheck_mark_initialized(ptr, size); | ||
18 | BUG_ON(!valid_dma_direction(dir)); | ||
19 | addr = ops->map_page(dev, virt_to_page(ptr), | ||
20 | (unsigned long)ptr & ~PAGE_MASK, size, | ||
21 | dir, attrs); | ||
22 | debug_dma_map_page(dev, virt_to_page(ptr), | ||
23 | (unsigned long)ptr & ~PAGE_MASK, size, | ||
24 | dir, addr, true); | ||
25 | return addr; | ||
26 | } | ||
27 | |||
28 | static inline void dma_unmap_single_attrs(struct device *dev, dma_addr_t addr, | ||
29 | size_t size, | ||
30 | enum dma_data_direction dir, | ||
31 | struct dma_attrs *attrs) | ||
32 | { | ||
33 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
34 | |||
35 | BUG_ON(!valid_dma_direction(dir)); | ||
36 | if (ops->unmap_page) | ||
37 | ops->unmap_page(dev, addr, size, dir, attrs); | ||
38 | debug_dma_unmap_page(dev, addr, size, dir, true); | ||
39 | } | ||
40 | |||
41 | static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, | ||
42 | int nents, enum dma_data_direction dir, | ||
43 | struct dma_attrs *attrs) | ||
44 | { | ||
45 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
46 | int i, ents; | ||
47 | struct scatterlist *s; | ||
48 | |||
49 | for_each_sg(sg, s, nents, i) | ||
50 | kmemcheck_mark_initialized(sg_virt(s), s->length); | ||
51 | BUG_ON(!valid_dma_direction(dir)); | ||
52 | ents = ops->map_sg(dev, sg, nents, dir, attrs); | ||
53 | debug_dma_map_sg(dev, sg, nents, ents, dir); | ||
54 | |||
55 | return ents; | ||
56 | } | ||
57 | |||
58 | static inline void dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sg, | ||
59 | int nents, enum dma_data_direction dir, | ||
60 | struct dma_attrs *attrs) | ||
61 | { | ||
62 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
63 | |||
64 | BUG_ON(!valid_dma_direction(dir)); | ||
65 | debug_dma_unmap_sg(dev, sg, nents, dir); | ||
66 | if (ops->unmap_sg) | ||
67 | ops->unmap_sg(dev, sg, nents, dir, attrs); | ||
68 | } | ||
69 | |||
70 | static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, | ||
71 | size_t offset, size_t size, | ||
72 | enum dma_data_direction dir) | ||
73 | { | ||
74 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
75 | dma_addr_t addr; | ||
76 | |||
77 | kmemcheck_mark_initialized(page_address(page) + offset, size); | ||
78 | BUG_ON(!valid_dma_direction(dir)); | ||
79 | addr = ops->map_page(dev, page, offset, size, dir, NULL); | ||
80 | debug_dma_map_page(dev, page, offset, size, dir, addr, false); | ||
81 | |||
82 | return addr; | ||
83 | } | ||
84 | |||
85 | static inline void dma_unmap_page(struct device *dev, dma_addr_t addr, | ||
86 | size_t size, enum dma_data_direction dir) | ||
87 | { | ||
88 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
89 | |||
90 | BUG_ON(!valid_dma_direction(dir)); | ||
91 | if (ops->unmap_page) | ||
92 | ops->unmap_page(dev, addr, size, dir, NULL); | ||
93 | debug_dma_unmap_page(dev, addr, size, dir, false); | ||
94 | } | ||
95 | |||
96 | static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr, | ||
97 | size_t size, | ||
98 | enum dma_data_direction dir) | ||
99 | { | ||
100 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
101 | |||
102 | BUG_ON(!valid_dma_direction(dir)); | ||
103 | if (ops->sync_single_for_cpu) | ||
104 | ops->sync_single_for_cpu(dev, addr, size, dir); | ||
105 | debug_dma_sync_single_for_cpu(dev, addr, size, dir); | ||
106 | flush_write_buffers(); | ||
107 | } | ||
108 | |||
109 | static inline void dma_sync_single_for_device(struct device *dev, | ||
110 | dma_addr_t addr, size_t size, | ||
111 | enum dma_data_direction dir) | ||
112 | { | ||
113 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
114 | |||
115 | BUG_ON(!valid_dma_direction(dir)); | ||
116 | if (ops->sync_single_for_device) | ||
117 | ops->sync_single_for_device(dev, addr, size, dir); | ||
118 | debug_dma_sync_single_for_device(dev, addr, size, dir); | ||
119 | flush_write_buffers(); | ||
120 | } | ||
121 | |||
122 | static inline void dma_sync_single_range_for_cpu(struct device *dev, | ||
123 | dma_addr_t addr, | ||
124 | unsigned long offset, | ||
125 | size_t size, | ||
126 | enum dma_data_direction dir) | ||
127 | { | ||
128 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
129 | |||
130 | BUG_ON(!valid_dma_direction(dir)); | ||
131 | if (ops->sync_single_range_for_cpu) { | ||
132 | ops->sync_single_range_for_cpu(dev, addr, offset, size, dir); | ||
133 | debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); | ||
134 | |||
135 | flush_write_buffers(); | ||
136 | } else | ||
137 | dma_sync_single_for_cpu(dev, addr, size, dir); | ||
138 | } | ||
139 | |||
140 | static inline void dma_sync_single_range_for_device(struct device *dev, | ||
141 | dma_addr_t addr, | ||
142 | unsigned long offset, | ||
143 | size_t size, | ||
144 | enum dma_data_direction dir) | ||
145 | { | ||
146 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
147 | |||
148 | BUG_ON(!valid_dma_direction(dir)); | ||
149 | if (ops->sync_single_range_for_device) { | ||
150 | ops->sync_single_range_for_device(dev, addr, offset, size, dir); | ||
151 | debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir); | ||
152 | |||
153 | flush_write_buffers(); | ||
154 | } else | ||
155 | dma_sync_single_for_device(dev, addr, size, dir); | ||
156 | } | ||
157 | |||
158 | static inline void | ||
159 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | ||
160 | int nelems, enum dma_data_direction dir) | ||
161 | { | ||
162 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
163 | |||
164 | BUG_ON(!valid_dma_direction(dir)); | ||
165 | if (ops->sync_sg_for_cpu) | ||
166 | ops->sync_sg_for_cpu(dev, sg, nelems, dir); | ||
167 | debug_dma_sync_sg_for_cpu(dev, sg, nelems, dir); | ||
168 | flush_write_buffers(); | ||
169 | } | ||
170 | |||
171 | static inline void | ||
172 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | ||
173 | int nelems, enum dma_data_direction dir) | ||
174 | { | ||
175 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
176 | |||
177 | BUG_ON(!valid_dma_direction(dir)); | ||
178 | if (ops->sync_sg_for_device) | ||
179 | ops->sync_sg_for_device(dev, sg, nelems, dir); | ||
180 | debug_dma_sync_sg_for_device(dev, sg, nelems, dir); | ||
181 | |||
182 | flush_write_buffers(); | ||
183 | } | ||
184 | |||
185 | #define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, NULL) | ||
186 | #define dma_unmap_single(d, a, s, r) dma_unmap_single_attrs(d, a, s, r, NULL) | ||
187 | #define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, NULL) | ||
188 | #define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, NULL) | ||
189 | |||
190 | #endif | ||
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 4ce48e878530..d083561337f2 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
@@ -14,6 +14,9 @@ extern char __kprobes_text_start[], __kprobes_text_end[]; | |||
14 | extern char __initdata_begin[], __initdata_end[]; | 14 | extern char __initdata_begin[], __initdata_end[]; |
15 | extern char __start_rodata[], __end_rodata[]; | 15 | extern char __start_rodata[], __end_rodata[]; |
16 | 16 | ||
17 | /* Start and end of .ctors section - used for constructor calls. */ | ||
18 | extern char __ctors_start[], __ctors_end[]; | ||
19 | |||
17 | /* function descriptor handling (if any). Override | 20 | /* function descriptor handling (if any). Override |
18 | * in asm/sections.h */ | 21 | * in asm/sections.h */ |
19 | #ifndef dereference_function_descriptor | 22 | #ifndef dereference_function_descriptor |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 6bdba10fef4a..55413e568f07 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -440,12 +440,21 @@ | |||
440 | INIT_TASK \ | 440 | INIT_TASK \ |
441 | } | 441 | } |
442 | 442 | ||
443 | #ifdef CONFIG_CONSTRUCTORS | ||
444 | #define KERNEL_CTORS() VMLINUX_SYMBOL(__ctors_start) = .; \ | ||
445 | *(.ctors) \ | ||
446 | VMLINUX_SYMBOL(__ctors_end) = .; | ||
447 | #else | ||
448 | #define KERNEL_CTORS() | ||
449 | #endif | ||
450 | |||
443 | /* init and exit section handling */ | 451 | /* init and exit section handling */ |
444 | #define INIT_DATA \ | 452 | #define INIT_DATA \ |
445 | *(.init.data) \ | 453 | *(.init.data) \ |
446 | DEV_DISCARD(init.data) \ | 454 | DEV_DISCARD(init.data) \ |
447 | CPU_DISCARD(init.data) \ | 455 | CPU_DISCARD(init.data) \ |
448 | MEM_DISCARD(init.data) \ | 456 | MEM_DISCARD(init.data) \ |
457 | KERNEL_CTORS() \ | ||
449 | *(.init.rodata) \ | 458 | *(.init.rodata) \ |
450 | DEV_DISCARD(init.rodata) \ | 459 | DEV_DISCARD(init.rodata) \ |
451 | CPU_DISCARD(init.rodata) \ | 460 | CPU_DISCARD(init.rodata) \ |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index a2df7030d49d..03f22076381f 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -308,6 +308,7 @@ unifdef-y += pmu.h | |||
308 | unifdef-y += poll.h | 308 | unifdef-y += poll.h |
309 | unifdef-y += ppp_defs.h | 309 | unifdef-y += ppp_defs.h |
310 | unifdef-y += ppp-comp.h | 310 | unifdef-y += ppp-comp.h |
311 | unifdef-y += pps.h | ||
311 | unifdef-y += ptrace.h | 312 | unifdef-y += ptrace.h |
312 | unifdef-y += quota.h | 313 | unifdef-y += quota.h |
313 | unifdef-y += random.h | 314 | unifdef-y += random.h |
diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h new file mode 100644 index 000000000000..b4fbd9862606 --- /dev/null +++ b/include/linux/amba/pl061.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* platform data for the PL061 GPIO driver */ | ||
2 | |||
3 | struct pl061_platform_data { | ||
4 | /* number of the first GPIO */ | ||
5 | unsigned gpio_base; | ||
6 | |||
7 | /* number of the first IRQ. | ||
8 | * If the IRQ functionality in not desired this must be set to | ||
9 | * (unsigned) -1. | ||
10 | */ | ||
11 | unsigned irq_base; | ||
12 | |||
13 | u8 directions; /* startup directions, 1: out, 0: in */ | ||
14 | u8 values; /* startup values */ | ||
15 | }; | ||
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index 8005effc04f1..b721129e0469 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h | |||
@@ -16,6 +16,12 @@ | |||
16 | #define __must_check __attribute__((warn_unused_result)) | 16 | #define __must_check __attribute__((warn_unused_result)) |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | #ifdef CONFIG_GCOV_KERNEL | ||
20 | # if __GNUC_MINOR__ < 4 | ||
21 | # error "GCOV profiling support for gcc versions below 3.4 not included" | ||
22 | # endif /* __GNUC_MINOR__ */ | ||
23 | #endif /* CONFIG_GCOV_KERNEL */ | ||
24 | |||
19 | /* | 25 | /* |
20 | * A trick to suppress uninitialized variable warning without generating any | 26 | * A trick to suppress uninitialized variable warning without generating any |
21 | * code | 27 | * code |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 8083b6a36a38..07dfd460d286 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -63,24 +63,26 @@ struct dma_map_ops { | |||
63 | 63 | ||
64 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) | 64 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) |
65 | 65 | ||
66 | typedef u64 DMA_nnBIT_MASK __deprecated; | ||
67 | |||
66 | /* | 68 | /* |
67 | * NOTE: do not use the below macros in new code and do not add new definitions | 69 | * NOTE: do not use the below macros in new code and do not add new definitions |
68 | * here. | 70 | * here. |
69 | * | 71 | * |
70 | * Instead, just open-code DMA_BIT_MASK(n) within your driver | 72 | * Instead, just open-code DMA_BIT_MASK(n) within your driver |
71 | */ | 73 | */ |
72 | #define DMA_64BIT_MASK DMA_BIT_MASK(64) | 74 | #define DMA_64BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(64) |
73 | #define DMA_48BIT_MASK DMA_BIT_MASK(48) | 75 | #define DMA_48BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(48) |
74 | #define DMA_47BIT_MASK DMA_BIT_MASK(47) | 76 | #define DMA_47BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(47) |
75 | #define DMA_40BIT_MASK DMA_BIT_MASK(40) | 77 | #define DMA_40BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(40) |
76 | #define DMA_39BIT_MASK DMA_BIT_MASK(39) | 78 | #define DMA_39BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(39) |
77 | #define DMA_35BIT_MASK DMA_BIT_MASK(35) | 79 | #define DMA_35BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(35) |
78 | #define DMA_32BIT_MASK DMA_BIT_MASK(32) | 80 | #define DMA_32BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(32) |
79 | #define DMA_31BIT_MASK DMA_BIT_MASK(31) | 81 | #define DMA_31BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(31) |
80 | #define DMA_30BIT_MASK DMA_BIT_MASK(30) | 82 | #define DMA_30BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(30) |
81 | #define DMA_29BIT_MASK DMA_BIT_MASK(29) | 83 | #define DMA_29BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(29) |
82 | #define DMA_28BIT_MASK DMA_BIT_MASK(28) | 84 | #define DMA_28BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(28) |
83 | #define DMA_24BIT_MASK DMA_BIT_MASK(24) | 85 | #define DMA_24BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(24) |
84 | 86 | ||
85 | #define DMA_MASK_NONE 0x0ULL | 87 | #define DMA_MASK_NONE 0x0ULL |
86 | 88 | ||
@@ -107,9 +109,20 @@ static inline int is_buffer_dma_capable(u64 mask, dma_addr_t addr, size_t size) | |||
107 | #include <asm-generic/dma-mapping-broken.h> | 109 | #include <asm-generic/dma-mapping-broken.h> |
108 | #endif | 110 | #endif |
109 | 111 | ||
110 | /* Backwards compat, remove in 2.7.x */ | 112 | /* for backwards compatibility, removed soon */ |
111 | #define dma_sync_single dma_sync_single_for_cpu | 113 | static inline void __deprecated dma_sync_single(struct device *dev, |
112 | #define dma_sync_sg dma_sync_sg_for_cpu | 114 | dma_addr_t addr, size_t size, |
115 | enum dma_data_direction dir) | ||
116 | { | ||
117 | dma_sync_single_for_cpu(dev, addr, size, dir); | ||
118 | } | ||
119 | |||
120 | static inline void __deprecated dma_sync_sg(struct device *dev, | ||
121 | struct scatterlist *sg, int nelems, | ||
122 | enum dma_data_direction dir) | ||
123 | { | ||
124 | dma_sync_sg_for_cpu(dev, sg, nelems, dir); | ||
125 | } | ||
113 | 126 | ||
114 | static inline u64 dma_get_mask(struct device *dev) | 127 | static inline u64 dma_get_mask(struct device *dev) |
115 | { | 128 | { |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 244677cc082b..43fc95d822d5 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
@@ -79,10 +79,6 @@ struct fsl_spi_platform_data { | |||
79 | u16 max_chipselect; | 79 | u16 max_chipselect; |
80 | void (*cs_control)(struct spi_device *spi, bool on); | 80 | void (*cs_control)(struct spi_device *spi, bool on); |
81 | u32 sysclk; | 81 | u32 sysclk; |
82 | |||
83 | /* Legacy hooks, used by mpc52xx_psc_spi driver. */ | ||
84 | void (*activate_cs)(u8 cs, u8 polarity); | ||
85 | void (*deactivate_cs)(u8 cs, u8 polarity); | ||
86 | }; | 82 | }; |
87 | 83 | ||
88 | struct mpc8xx_pcmcia_ops { | 84 | struct mpc8xx_pcmcia_ops { |
diff --git a/include/linux/gcd.h b/include/linux/gcd.h new file mode 100644 index 000000000000..69f5e8a01bad --- /dev/null +++ b/include/linux/gcd.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _GCD_H | ||
2 | #define _GCD_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | |||
6 | unsigned long gcd(unsigned long a, unsigned long b) __attribute_const__; | ||
7 | |||
8 | #endif /* _GCD_H */ | ||
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index cfdb35d71bca..7c777a0da17a 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -99,7 +99,7 @@ struct vm_area_struct; | |||
99 | __GFP_NORETRY|__GFP_NOMEMALLOC) | 99 | __GFP_NORETRY|__GFP_NOMEMALLOC) |
100 | 100 | ||
101 | /* Control slab gfp mask during early boot */ | 101 | /* Control slab gfp mask during early boot */ |
102 | #define SLAB_GFP_BOOT_MASK __GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS) | 102 | #define GFP_BOOT_MASK __GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS) |
103 | 103 | ||
104 | /* Control allocation constraints */ | 104 | /* Control allocation constraints */ |
105 | #define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE) | 105 | #define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE) |
@@ -348,4 +348,11 @@ static inline void oom_killer_enable(void) | |||
348 | oom_killer_disabled = false; | 348 | oom_killer_disabled = false; |
349 | } | 349 | } |
350 | 350 | ||
351 | extern gfp_t gfp_allowed_mask; | ||
352 | |||
353 | static inline void set_gfp_allowed_mask(gfp_t mask) | ||
354 | { | ||
355 | gfp_allowed_mask = mask; | ||
356 | } | ||
357 | |||
351 | #endif /* __LINUX_GFP_H */ | 358 | #endif /* __LINUX_GFP_H */ |
diff --git a/include/linux/i2c/pca953x.h b/include/linux/i2c/pca953x.h index 3c7361217df8..81736d6a8db7 100644 --- a/include/linux/i2c/pca953x.h +++ b/include/linux/i2c/pca953x.h | |||
@@ -15,4 +15,5 @@ struct pca953x_platform_data { | |||
15 | int (*teardown)(struct i2c_client *client, | 15 | int (*teardown)(struct i2c_client *client, |
16 | unsigned gpio, unsigned ngpio, | 16 | unsigned gpio, unsigned ngpio, |
17 | void *context); | 17 | void *context); |
18 | char **names; | ||
18 | }; | 19 | }; |
diff --git a/include/linux/init.h b/include/linux/init.h index 8c2c9989626d..13b633ed695e 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -134,6 +134,9 @@ typedef void (*exitcall_t)(void); | |||
134 | extern initcall_t __con_initcall_start[], __con_initcall_end[]; | 134 | extern initcall_t __con_initcall_start[], __con_initcall_end[]; |
135 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; | 135 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; |
136 | 136 | ||
137 | /* Used for contructor calls. */ | ||
138 | typedef void (*ctor_fn_t)(void); | ||
139 | |||
137 | /* Defined in init/main.c */ | 140 | /* Defined in init/main.c */ |
138 | extern int do_one_initcall(initcall_t fn); | 141 | extern int do_one_initcall(initcall_t fn); |
139 | extern char __initdata boot_command_line[]; | 142 | extern char __initdata boot_command_line[]; |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 3bf40e246a80..e408722a84c7 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
@@ -94,13 +94,8 @@ static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; } | |||
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | #if defined(CONFIG_IPC_NS) | 96 | #if defined(CONFIG_IPC_NS) |
97 | extern void free_ipc_ns(struct ipc_namespace *ns); | ||
98 | extern struct ipc_namespace *copy_ipcs(unsigned long flags, | 97 | extern struct ipc_namespace *copy_ipcs(unsigned long flags, |
99 | struct ipc_namespace *ns); | 98 | struct ipc_namespace *ns); |
100 | extern void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids, | ||
101 | void (*free)(struct ipc_namespace *, | ||
102 | struct kern_ipc_perm *)); | ||
103 | |||
104 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | 99 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) |
105 | { | 100 | { |
106 | if (ns) | 101 | if (ns) |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index cc02393bfce8..d97eb652d6ca 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -1315,6 +1315,12 @@ extern int jbd_blocks_per_page(struct inode *inode); | |||
1315 | #define BUFFER_TRACE2(bh, bh2, info) do {} while (0) | 1315 | #define BUFFER_TRACE2(bh, bh2, info) do {} while (0) |
1316 | #define JBUFFER_TRACE(jh, info) do {} while (0) | 1316 | #define JBUFFER_TRACE(jh, info) do {} while (0) |
1317 | 1317 | ||
1318 | /* | ||
1319 | * jbd2_dev_to_name is a utility function used by the jbd2 and ext4 | ||
1320 | * tracing infrastructure to map a dev_t to a device name. | ||
1321 | */ | ||
1322 | extern const char *jbd2_dev_to_name(dev_t device); | ||
1323 | |||
1318 | #endif /* __KERNEL__ */ | 1324 | #endif /* __KERNEL__ */ |
1319 | 1325 | ||
1320 | #endif /* _LINUX_JBD2_H */ | 1326 | #endif /* _LINUX_JBD2_H */ |
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index a77c6007dc99..348fa8874b52 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/threads.h> | 5 | #include <linux/threads.h> |
6 | #include <linux/percpu.h> | 6 | #include <linux/percpu.h> |
7 | #include <linux/cpumask.h> | 7 | #include <linux/cpumask.h> |
8 | #include <linux/interrupt.h> | ||
8 | #include <asm/irq.h> | 9 | #include <asm/irq.h> |
9 | #include <asm/cputime.h> | 10 | #include <asm/cputime.h> |
10 | 11 | ||
@@ -31,6 +32,7 @@ struct kernel_stat { | |||
31 | #ifndef CONFIG_GENERIC_HARDIRQS | 32 | #ifndef CONFIG_GENERIC_HARDIRQS |
32 | unsigned int irqs[NR_IRQS]; | 33 | unsigned int irqs[NR_IRQS]; |
33 | #endif | 34 | #endif |
35 | unsigned int softirqs[NR_SOFTIRQS]; | ||
34 | }; | 36 | }; |
35 | 37 | ||
36 | DECLARE_PER_CPU(struct kernel_stat, kstat); | 38 | DECLARE_PER_CPU(struct kernel_stat, kstat); |
@@ -67,6 +69,16 @@ extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); | |||
67 | 69 | ||
68 | #endif | 70 | #endif |
69 | 71 | ||
72 | static inline void kstat_incr_softirqs_this_cpu(unsigned int irq) | ||
73 | { | ||
74 | kstat_this_cpu.softirqs[irq]++; | ||
75 | } | ||
76 | |||
77 | static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) | ||
78 | { | ||
79 | return kstat_cpu(cpu).softirqs[irq]; | ||
80 | } | ||
81 | |||
70 | /* | 82 | /* |
71 | * Number of interrupts per specific IRQ source, since bootup | 83 | * Number of interrupts per specific IRQ source, since bootup |
72 | */ | 84 | */ |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 45add35dda1b..e46a0734ab6e 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -117,7 +117,7 @@ static inline bool mem_cgroup_disabled(void) | |||
117 | } | 117 | } |
118 | 118 | ||
119 | extern bool mem_cgroup_oom_called(struct task_struct *task); | 119 | extern bool mem_cgroup_oom_called(struct task_struct *task); |
120 | 120 | void mem_cgroup_update_mapped_file_stat(struct page *page, int val); | |
121 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 121 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ |
122 | struct mem_cgroup; | 122 | struct mem_cgroup; |
123 | 123 | ||
@@ -271,6 +271,11 @@ mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p) | |||
271 | { | 271 | { |
272 | } | 272 | } |
273 | 273 | ||
274 | static inline void mem_cgroup_update_mapped_file_stat(struct page *page, | ||
275 | int val) | ||
276 | { | ||
277 | } | ||
278 | |||
274 | #endif /* CONFIG_CGROUP_MEM_CONT */ | 279 | #endif /* CONFIG_CGROUP_MEM_CONT */ |
275 | 280 | ||
276 | #endif /* _LINUX_MEMCONTROL_H */ | 281 | #endif /* _LINUX_MEMCONTROL_H */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 505f20dcc1c7..098bdb7bfacf 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -363,6 +363,12 @@ struct module | |||
363 | local_t ref; | 363 | local_t ref; |
364 | #endif | 364 | #endif |
365 | #endif | 365 | #endif |
366 | |||
367 | #ifdef CONFIG_CONSTRUCTORS | ||
368 | /* Constructor functions. */ | ||
369 | ctor_fn_t *ctors; | ||
370 | unsigned int num_ctors; | ||
371 | #endif | ||
366 | }; | 372 | }; |
367 | #ifndef MODULE_ARCH_INIT | 373 | #ifndef MODULE_ARCH_INIT |
368 | #define MODULE_ARCH_INIT {} | 374 | #define MODULE_ARCH_INIT {} |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9ea8d6dfe540..d4a4d9867794 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -224,6 +224,11 @@ struct netdev_hw_addr { | |||
224 | struct rcu_head rcu_head; | 224 | struct rcu_head rcu_head; |
225 | }; | 225 | }; |
226 | 226 | ||
227 | struct netdev_hw_addr_list { | ||
228 | struct list_head list; | ||
229 | int count; | ||
230 | }; | ||
231 | |||
227 | struct hh_cache | 232 | struct hh_cache |
228 | { | 233 | { |
229 | struct hh_cache *hh_next; /* Next entry */ | 234 | struct hh_cache *hh_next; /* Next entry */ |
@@ -776,9 +781,8 @@ struct net_device | |||
776 | unsigned char addr_len; /* hardware address length */ | 781 | unsigned char addr_len; /* hardware address length */ |
777 | unsigned short dev_id; /* for shared network cards */ | 782 | unsigned short dev_id; /* for shared network cards */ |
778 | 783 | ||
779 | struct list_head uc_list; /* Secondary unicast mac | 784 | struct netdev_hw_addr_list uc; /* Secondary unicast |
780 | addresses */ | 785 | mac addresses */ |
781 | int uc_count; /* Number of installed ucasts */ | ||
782 | int uc_promisc; | 786 | int uc_promisc; |
783 | spinlock_t addr_list_lock; | 787 | spinlock_t addr_list_lock; |
784 | struct dev_addr_list *mc_list; /* Multicast mac addresses */ | 788 | struct dev_addr_list *mc_list; /* Multicast mac addresses */ |
@@ -810,7 +814,8 @@ struct net_device | |||
810 | because most packets are | 814 | because most packets are |
811 | unicast) */ | 815 | unicast) */ |
812 | 816 | ||
813 | struct list_head dev_addr_list; /* list of device hw addresses */ | 817 | struct netdev_hw_addr_list dev_addrs; /* list of device |
818 | hw addresses */ | ||
814 | 819 | ||
815 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | 820 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ |
816 | 821 | ||
@@ -1806,11 +1811,11 @@ static inline void netif_addr_unlock_bh(struct net_device *dev) | |||
1806 | } | 1811 | } |
1807 | 1812 | ||
1808 | /* | 1813 | /* |
1809 | * dev_addr_list walker. Should be used only for read access. Call with | 1814 | * dev_addrs walker. Should be used only for read access. Call with |
1810 | * rcu_read_lock held. | 1815 | * rcu_read_lock held. |
1811 | */ | 1816 | */ |
1812 | #define for_each_dev_addr(dev, ha) \ | 1817 | #define for_each_dev_addr(dev, ha) \ |
1813 | list_for_each_entry_rcu(ha, &dev->dev_addr_list, list) | 1818 | list_for_each_entry_rcu(ha, &dev->dev_addrs.list, list) |
1814 | 1819 | ||
1815 | /* These functions live elsewhere (drivers/net/net_init.c, but related) */ | 1820 | /* These functions live elsewhere (drivers/net/net_init.c, but related) */ |
1816 | 1821 | ||
diff --git a/include/linux/pps.h b/include/linux/pps.h new file mode 100644 index 000000000000..cfe5c7214ec6 --- /dev/null +++ b/include/linux/pps.h | |||
@@ -0,0 +1,122 @@ | |||
1 | /* | ||
2 | * PPS API header | ||
3 | * | ||
4 | * Copyright (C) 2005-2009 Rodolfo Giometti <giometti@linux.it> | ||
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, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | |||
22 | #ifndef _PPS_H_ | ||
23 | #define _PPS_H_ | ||
24 | |||
25 | #define PPS_VERSION "5.3.6" | ||
26 | #define PPS_MAX_SOURCES 16 /* should be enough... */ | ||
27 | |||
28 | /* Implementation note: the logical states ``assert'' and ``clear'' | ||
29 | * are implemented in terms of the chip register, i.e. ``assert'' | ||
30 | * means the bit is set. */ | ||
31 | |||
32 | /* | ||
33 | * 3.2 New data structures | ||
34 | */ | ||
35 | |||
36 | #define PPS_API_VERS_1 1 | ||
37 | #define PPS_API_VERS PPS_API_VERS_1 /* we use API version 1 */ | ||
38 | #define PPS_MAX_NAME_LEN 32 | ||
39 | |||
40 | /* 32-bit vs. 64-bit compatibility. | ||
41 | * | ||
42 | * 0n i386, the alignment of a uint64_t is only 4 bytes, while on most other | ||
43 | * architectures it's 8 bytes. On i386, there will be no padding between the | ||
44 | * two consecutive 'struct pps_ktime' members of struct pps_kinfo and struct | ||
45 | * pps_kparams. But on most platforms there will be padding to ensure correct | ||
46 | * alignment. | ||
47 | * | ||
48 | * The simple fix is probably to add an explicit padding. | ||
49 | * [David Woodhouse] | ||
50 | */ | ||
51 | struct pps_ktime { | ||
52 | __s64 sec; | ||
53 | __s32 nsec; | ||
54 | __u32 flags; | ||
55 | }; | ||
56 | #define PPS_TIME_INVALID (1<<0) /* used to specify timeout==NULL */ | ||
57 | |||
58 | struct pps_kinfo { | ||
59 | __u32 assert_sequence; /* seq. num. of assert event */ | ||
60 | __u32 clear_sequence; /* seq. num. of clear event */ | ||
61 | struct pps_ktime assert_tu; /* time of assert event */ | ||
62 | struct pps_ktime clear_tu; /* time of clear event */ | ||
63 | int current_mode; /* current mode bits */ | ||
64 | }; | ||
65 | |||
66 | struct pps_kparams { | ||
67 | int api_version; /* API version # */ | ||
68 | int mode; /* mode bits */ | ||
69 | struct pps_ktime assert_off_tu; /* offset compensation for assert */ | ||
70 | struct pps_ktime clear_off_tu; /* offset compensation for clear */ | ||
71 | }; | ||
72 | |||
73 | /* | ||
74 | * 3.3 Mode bit definitions | ||
75 | */ | ||
76 | |||
77 | /* Device/implementation parameters */ | ||
78 | #define PPS_CAPTUREASSERT 0x01 /* capture assert events */ | ||
79 | #define PPS_CAPTURECLEAR 0x02 /* capture clear events */ | ||
80 | #define PPS_CAPTUREBOTH 0x03 /* capture assert and clear events */ | ||
81 | |||
82 | #define PPS_OFFSETASSERT 0x10 /* apply compensation for assert ev. */ | ||
83 | #define PPS_OFFSETCLEAR 0x20 /* apply compensation for clear ev. */ | ||
84 | |||
85 | #define PPS_CANWAIT 0x100 /* can we wait for an event? */ | ||
86 | #define PPS_CANPOLL 0x200 /* bit reserved for future use */ | ||
87 | |||
88 | /* Kernel actions */ | ||
89 | #define PPS_ECHOASSERT 0x40 /* feed back assert event to output */ | ||
90 | #define PPS_ECHOCLEAR 0x80 /* feed back clear event to output */ | ||
91 | |||
92 | /* Timestamp formats */ | ||
93 | #define PPS_TSFMT_TSPEC 0x1000 /* select timespec format */ | ||
94 | #define PPS_TSFMT_NTPFP 0x2000 /* select NTP format */ | ||
95 | |||
96 | /* | ||
97 | * 3.4.4 New functions: disciplining the kernel timebase | ||
98 | */ | ||
99 | |||
100 | /* Kernel consumers */ | ||
101 | #define PPS_KC_HARDPPS 0 /* hardpps() (or equivalent) */ | ||
102 | #define PPS_KC_HARDPPS_PLL 1 /* hardpps() constrained to | ||
103 | use a phase-locked loop */ | ||
104 | #define PPS_KC_HARDPPS_FLL 2 /* hardpps() constrained to | ||
105 | use a frequency-locked loop */ | ||
106 | /* | ||
107 | * Here begins the implementation-specific part! | ||
108 | */ | ||
109 | |||
110 | struct pps_fdata { | ||
111 | struct pps_kinfo info; | ||
112 | struct pps_ktime timeout; | ||
113 | }; | ||
114 | |||
115 | #include <linux/ioctl.h> | ||
116 | |||
117 | #define PPS_GETPARAMS _IOR('p', 0xa1, struct pps_kparams *) | ||
118 | #define PPS_SETPARAMS _IOW('p', 0xa2, struct pps_kparams *) | ||
119 | #define PPS_GETCAP _IOR('p', 0xa3, int *) | ||
120 | #define PPS_FETCH _IOWR('p', 0xa4, struct pps_fdata *) | ||
121 | |||
122 | #endif /* _PPS_H_ */ | ||
diff --git a/include/linux/pps_kernel.h b/include/linux/pps_kernel.h new file mode 100644 index 000000000000..e0a193f830ef --- /dev/null +++ b/include/linux/pps_kernel.h | |||
@@ -0,0 +1,89 @@ | |||
1 | /* | ||
2 | * PPS API kernel header | ||
3 | * | ||
4 | * Copyright (C) 2009 Rodolfo Giometti <giometti@linux.it> | ||
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, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/pps.h> | ||
22 | |||
23 | #include <linux/cdev.h> | ||
24 | #include <linux/device.h> | ||
25 | #include <linux/time.h> | ||
26 | |||
27 | /* | ||
28 | * Global defines | ||
29 | */ | ||
30 | |||
31 | /* The specific PPS source info */ | ||
32 | struct pps_source_info { | ||
33 | char name[PPS_MAX_NAME_LEN]; /* simbolic name */ | ||
34 | char path[PPS_MAX_NAME_LEN]; /* path of connected device */ | ||
35 | int mode; /* PPS's allowed mode */ | ||
36 | |||
37 | void (*echo)(int source, int event, void *data); /* PPS echo function */ | ||
38 | |||
39 | struct module *owner; | ||
40 | struct device *dev; | ||
41 | }; | ||
42 | |||
43 | /* The main struct */ | ||
44 | struct pps_device { | ||
45 | struct pps_source_info info; /* PSS source info */ | ||
46 | |||
47 | struct pps_kparams params; /* PPS's current params */ | ||
48 | |||
49 | __u32 assert_sequence; /* PPS' assert event seq # */ | ||
50 | __u32 clear_sequence; /* PPS' clear event seq # */ | ||
51 | struct pps_ktime assert_tu; | ||
52 | struct pps_ktime clear_tu; | ||
53 | int current_mode; /* PPS mode at event time */ | ||
54 | |||
55 | int go; /* PPS event is arrived? */ | ||
56 | wait_queue_head_t queue; /* PPS event queue */ | ||
57 | |||
58 | unsigned int id; /* PPS source unique ID */ | ||
59 | struct cdev cdev; | ||
60 | struct device *dev; | ||
61 | int devno; | ||
62 | struct fasync_struct *async_queue; /* fasync method */ | ||
63 | spinlock_t lock; | ||
64 | |||
65 | atomic_t usage; /* usage count */ | ||
66 | }; | ||
67 | |||
68 | /* | ||
69 | * Global variables | ||
70 | */ | ||
71 | |||
72 | extern spinlock_t pps_idr_lock; | ||
73 | extern struct idr pps_idr; | ||
74 | extern struct timespec pps_irq_ts[]; | ||
75 | |||
76 | extern struct device_attribute pps_attrs[]; | ||
77 | |||
78 | /* | ||
79 | * Exported functions | ||
80 | */ | ||
81 | |||
82 | struct pps_device *pps_get_source(int source); | ||
83 | extern void pps_put_source(struct pps_device *pps); | ||
84 | extern int pps_register_source(struct pps_source_info *info, | ||
85 | int default_params); | ||
86 | extern void pps_unregister_source(int source); | ||
87 | extern int pps_register_cdev(struct pps_device *pps); | ||
88 | extern void pps_unregister_cdev(struct pps_device *pps); | ||
89 | extern void pps_event(int source, struct pps_ktime *ts, int event, void *data); | ||
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 59e133d39d50..7456d7d87a19 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -81,7 +81,6 @@ | |||
81 | 81 | ||
82 | 82 | ||
83 | extern long arch_ptrace(struct task_struct *child, long request, long addr, long data); | 83 | extern long arch_ptrace(struct task_struct *child, long request, long addr, long data); |
84 | extern struct task_struct *ptrace_get_task_struct(pid_t pid); | ||
85 | extern int ptrace_traceme(void); | 84 | extern int ptrace_traceme(void); |
86 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); | 85 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); |
87 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); | 86 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); |
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index 6ba830fa8538..ffa2efbbe382 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
@@ -232,7 +232,7 @@ struct mdp_superblock_1 { | |||
232 | __le64 reshape_position; /* next address in array-space for reshape */ | 232 | __le64 reshape_position; /* next address in array-space for reshape */ |
233 | __le32 delta_disks; /* change in number of raid_disks */ | 233 | __le32 delta_disks; /* change in number of raid_disks */ |
234 | __le32 new_layout; /* new layout */ | 234 | __le32 new_layout; /* new layout */ |
235 | __le32 new_chunk; /* new chunk size (bytes) */ | 235 | __le32 new_chunk; /* new chunk size (512byte sectors) */ |
236 | __u8 pad1[128-124]; /* set to 0 when written */ | 236 | __u8 pad1[128-124]; /* set to 0 when written */ |
237 | 237 | ||
238 | /* constant this-device information - 64 bytes */ | 238 | /* constant this-device information - 64 bytes */ |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 2245c78d5876..dd31e7bae35c 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -660,23 +660,54 @@ static inline void set_le_key_k_type(int version, struct reiserfs_key *key, | |||
660 | cpu_to_le32(type2uniqueness(type))) | 660 | cpu_to_le32(type2uniqueness(type))) |
661 | : (void)(set_offset_v2_k_type(&(key->u.k_offset_v2), type)); | 661 | : (void)(set_offset_v2_k_type(&(key->u.k_offset_v2), type)); |
662 | } | 662 | } |
663 | |||
663 | static inline void set_le_ih_k_type(struct item_head *ih, int type) | 664 | static inline void set_le_ih_k_type(struct item_head *ih, int type) |
664 | { | 665 | { |
665 | set_le_key_k_type(ih_version(ih), &(ih->ih_key), type); | 666 | set_le_key_k_type(ih_version(ih), &(ih->ih_key), type); |
666 | } | 667 | } |
667 | 668 | ||
668 | #define is_direntry_le_key(version,key) (le_key_k_type (version, key) == TYPE_DIRENTRY) | 669 | static inline int is_direntry_le_key(int version, struct reiserfs_key *key) |
669 | #define is_direct_le_key(version,key) (le_key_k_type (version, key) == TYPE_DIRECT) | 670 | { |
670 | #define is_indirect_le_key(version,key) (le_key_k_type (version, key) == TYPE_INDIRECT) | 671 | return le_key_k_type(version, key) == TYPE_DIRENTRY; |
671 | #define is_statdata_le_key(version,key) (le_key_k_type (version, key) == TYPE_STAT_DATA) | 672 | } |
673 | |||
674 | static inline int is_direct_le_key(int version, struct reiserfs_key *key) | ||
675 | { | ||
676 | return le_key_k_type(version, key) == TYPE_DIRECT; | ||
677 | } | ||
678 | |||
679 | static inline int is_indirect_le_key(int version, struct reiserfs_key *key) | ||
680 | { | ||
681 | return le_key_k_type(version, key) == TYPE_INDIRECT; | ||
682 | } | ||
683 | |||
684 | static inline int is_statdata_le_key(int version, struct reiserfs_key *key) | ||
685 | { | ||
686 | return le_key_k_type(version, key) == TYPE_STAT_DATA; | ||
687 | } | ||
672 | 688 | ||
673 | // | 689 | // |
674 | // item header has version. | 690 | // item header has version. |
675 | // | 691 | // |
676 | #define is_direntry_le_ih(ih) is_direntry_le_key (ih_version (ih), &((ih)->ih_key)) | 692 | static inline int is_direntry_le_ih(struct item_head *ih) |
677 | #define is_direct_le_ih(ih) is_direct_le_key (ih_version (ih), &((ih)->ih_key)) | 693 | { |
678 | #define is_indirect_le_ih(ih) is_indirect_le_key (ih_version(ih), &((ih)->ih_key)) | 694 | return is_direntry_le_key(ih_version(ih), &ih->ih_key); |
679 | #define is_statdata_le_ih(ih) is_statdata_le_key (ih_version (ih), &((ih)->ih_key)) | 695 | } |
696 | |||
697 | static inline int is_direct_le_ih(struct item_head *ih) | ||
698 | { | ||
699 | return is_direct_le_key(ih_version(ih), &ih->ih_key); | ||
700 | } | ||
701 | |||
702 | static inline int is_indirect_le_ih(struct item_head *ih) | ||
703 | { | ||
704 | return is_indirect_le_key(ih_version(ih), &ih->ih_key); | ||
705 | } | ||
706 | |||
707 | static inline int is_statdata_le_ih(struct item_head *ih) | ||
708 | { | ||
709 | return is_statdata_le_key(ih_version(ih), &ih->ih_key); | ||
710 | } | ||
680 | 711 | ||
681 | // | 712 | // |
682 | // key is pointer to cpu key, result is cpu | 713 | // key is pointer to cpu key, result is cpu |
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index 4c5bcf6ca7e8..511f42fc6816 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
@@ -49,6 +49,8 @@ struct res_counter { | |||
49 | struct res_counter *parent; | 49 | struct res_counter *parent; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | #define RESOURCE_MAX (unsigned long long)LLONG_MAX | ||
53 | |||
52 | /** | 54 | /** |
53 | * Helpers to interact with userspace | 55 | * Helpers to interact with userspace |
54 | * res_counter_read_u64() - returns the value of the specified member. | 56 | * res_counter_read_u64() - returns the value of the specified member. |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 02042e7f2196..4d0754269884 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -92,7 +92,6 @@ struct sched_param { | |||
92 | 92 | ||
93 | #include <asm/processor.h> | 93 | #include <asm/processor.h> |
94 | 94 | ||
95 | struct mem_cgroup; | ||
96 | struct exec_domain; | 95 | struct exec_domain; |
97 | struct futex_pi_state; | 96 | struct futex_pi_state; |
98 | struct robust_list_head; | 97 | struct robust_list_head; |
@@ -1879,9 +1878,6 @@ extern struct pid_namespace init_pid_ns; | |||
1879 | /* | 1878 | /* |
1880 | * find a task by one of its numerical ids | 1879 | * find a task by one of its numerical ids |
1881 | * | 1880 | * |
1882 | * find_task_by_pid_type_ns(): | ||
1883 | * it is the most generic call - it finds a task by all id, | ||
1884 | * type and namespace specified | ||
1885 | * find_task_by_pid_ns(): | 1881 | * find_task_by_pid_ns(): |
1886 | * finds a task by its pid in the specified namespace | 1882 | * finds a task by its pid in the specified namespace |
1887 | * find_task_by_vpid(): | 1883 | * find_task_by_vpid(): |
@@ -1890,9 +1886,6 @@ extern struct pid_namespace init_pid_ns; | |||
1890 | * see also find_vpid() etc in include/linux/pid.h | 1886 | * see also find_vpid() etc in include/linux/pid.h |
1891 | */ | 1887 | */ |
1892 | 1888 | ||
1893 | extern struct task_struct *find_task_by_pid_type_ns(int type, int pid, | ||
1894 | struct pid_namespace *ns); | ||
1895 | |||
1896 | extern struct task_struct *find_task_by_vpid(pid_t nr); | 1889 | extern struct task_struct *find_task_by_vpid(pid_t nr); |
1897 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, | 1890 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, |
1898 | struct pid_namespace *ns); | 1891 | struct pid_namespace *ns); |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 004f3b3342c5..0c6a86b79596 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -43,6 +43,7 @@ int seq_release(struct inode *, struct file *); | |||
43 | int seq_escape(struct seq_file *, const char *, const char *); | 43 | int seq_escape(struct seq_file *, const char *, const char *); |
44 | int seq_putc(struct seq_file *m, char c); | 44 | int seq_putc(struct seq_file *m, char c); |
45 | int seq_puts(struct seq_file *m, const char *s); | 45 | int seq_puts(struct seq_file *m, const char *s); |
46 | int seq_write(struct seq_file *seq, const void *data, size_t len); | ||
46 | 47 | ||
47 | int seq_printf(struct seq_file *, const char *, ...) | 48 | int seq_printf(struct seq_file *, const char *, ...) |
48 | __attribute__ ((format (printf,2,3))); | 49 | __attribute__ ((format (printf,2,3))); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 63ef24bc01d0..b47b3f039d14 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -265,7 +265,7 @@ typedef unsigned char *sk_buff_data_t; | |||
265 | * @transport_header: Transport layer header | 265 | * @transport_header: Transport layer header |
266 | * @network_header: Network layer header | 266 | * @network_header: Network layer header |
267 | * @mac_header: Link layer header | 267 | * @mac_header: Link layer header |
268 | * @dst: destination entry | 268 | * @_skb_dst: destination entry |
269 | * @sp: the security path, used for xfrm | 269 | * @sp: the security path, used for xfrm |
270 | * @cb: Control buffer. Free for use by every layer. Put private vars here | 270 | * @cb: Control buffer. Free for use by every layer. Put private vars here |
271 | * @len: Length of actual data | 271 | * @len: Length of actual data |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index a0faa18f7b1b..9c4cd27f4685 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -245,6 +245,9 @@ struct spi_master { | |||
245 | */ | 245 | */ |
246 | u16 dma_alignment; | 246 | u16 dma_alignment; |
247 | 247 | ||
248 | /* spi_device.mode flags understood by this controller driver */ | ||
249 | u16 mode_bits; | ||
250 | |||
248 | /* Setup mode and clock, etc (spi driver may call many times). | 251 | /* Setup mode and clock, etc (spi driver may call many times). |
249 | * | 252 | * |
250 | * IMPORTANT: this may be called when transfers to another | 253 | * IMPORTANT: this may be called when transfers to another |
@@ -523,30 +526,7 @@ static inline void spi_message_free(struct spi_message *m) | |||
523 | kfree(m); | 526 | kfree(m); |
524 | } | 527 | } |
525 | 528 | ||
526 | /** | 529 | extern int spi_setup(struct spi_device *spi); |
527 | * spi_setup - setup SPI mode and clock rate | ||
528 | * @spi: the device whose settings are being modified | ||
529 | * Context: can sleep, and no requests are queued to the device | ||
530 | * | ||
531 | * SPI protocol drivers may need to update the transfer mode if the | ||
532 | * device doesn't work with its default. They may likewise need | ||
533 | * to update clock rates or word sizes from initial values. This function | ||
534 | * changes those settings, and must be called from a context that can sleep. | ||
535 | * Except for SPI_CS_HIGH, which takes effect immediately, the changes take | ||
536 | * effect the next time the device is selected and data is transferred to | ||
537 | * or from it. When this function returns, the spi device is deselected. | ||
538 | * | ||
539 | * Note that this call will fail if the protocol driver specifies an option | ||
540 | * that the underlying controller or its driver does not support. For | ||
541 | * example, not all hardware supports wire transfers using nine bit words, | ||
542 | * LSB-first wire encoding, or active-high chipselects. | ||
543 | */ | ||
544 | static inline int | ||
545 | spi_setup(struct spi_device *spi) | ||
546 | { | ||
547 | return spi->master->setup(spi); | ||
548 | } | ||
549 | |||
550 | 530 | ||
551 | /** | 531 | /** |
552 | * spi_async - asynchronous SPI transfer | 532 | * spi_async - asynchronous SPI transfer |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 0cedf31af0b0..c88b36665f79 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -319,10 +319,11 @@ static inline void disable_swap_token(void) | |||
319 | } | 319 | } |
320 | 320 | ||
321 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 321 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
322 | extern void mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent); | 322 | extern void |
323 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); | ||
323 | #else | 324 | #else |
324 | static inline void | 325 | static inline void |
325 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) | 326 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout) |
326 | { | 327 | { |
327 | } | 328 | } |
328 | #endif | 329 | #endif |
@@ -423,12 +424,6 @@ static inline swp_entry_t get_swap_page(void) | |||
423 | #define has_swap_token(x) 0 | 424 | #define has_swap_token(x) 0 |
424 | #define disable_swap_token() do { } while(0) | 425 | #define disable_swap_token() do { } while(0) |
425 | 426 | ||
426 | static inline int mem_cgroup_cache_charge_swapin(struct page *page, | ||
427 | struct mm_struct *mm, gfp_t mask, bool locked) | ||
428 | { | ||
429 | return 0; | ||
430 | } | ||
431 | |||
432 | static inline void | 427 | static inline void |
433 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) | 428 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) |
434 | { | 429 | { |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index eb96603d92db..17ba82efa483 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
@@ -143,7 +143,7 @@ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step) | |||
143 | * | 143 | * |
144 | * Return %LSM_UNSAFE_* bits applied to an exec because of tracing. | 144 | * Return %LSM_UNSAFE_* bits applied to an exec because of tracing. |
145 | * | 145 | * |
146 | * Called with task_lock() held on @task. | 146 | * @task->cred_guard_mutex is held by the caller through the do_execve(). |
147 | */ | 147 | */ |
148 | static inline int tracehook_unsafe_exec(struct task_struct *task) | 148 | static inline int tracehook_unsafe_exec(struct task_struct *task) |
149 | { | 149 | { |
diff --git a/include/linux/w1-gpio.h b/include/linux/w1-gpio.h index 9797fec7748a..3adeff82212f 100644 --- a/include/linux/w1-gpio.h +++ b/include/linux/w1-gpio.h | |||
@@ -18,6 +18,7 @@ | |||
18 | struct w1_gpio_platform_data { | 18 | struct w1_gpio_platform_data { |
19 | unsigned int pin; | 19 | unsigned int pin; |
20 | unsigned int is_open_drain:1; | 20 | unsigned int is_open_drain:1; |
21 | void (*enable_external_pullup)(int enable); | ||
21 | }; | 22 | }; |
22 | 23 | ||
23 | #endif /* _LINUX_W1_GPIO_H */ | 24 | #endif /* _LINUX_W1_GPIO_H */ |
diff --git a/include/net/sock.h b/include/net/sock.h index 95bd3fd75f94..07133c5e9868 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1208,6 +1208,39 @@ static inline int skb_copy_to_page(struct sock *sk, char __user *from, | |||
1208 | return 0; | 1208 | return 0; |
1209 | } | 1209 | } |
1210 | 1210 | ||
1211 | /** | ||
1212 | * sk_wmem_alloc_get - returns write allocations | ||
1213 | * @sk: socket | ||
1214 | * | ||
1215 | * Returns sk_wmem_alloc minus initial offset of one | ||
1216 | */ | ||
1217 | static inline int sk_wmem_alloc_get(const struct sock *sk) | ||
1218 | { | ||
1219 | return atomic_read(&sk->sk_wmem_alloc) - 1; | ||
1220 | } | ||
1221 | |||
1222 | /** | ||
1223 | * sk_rmem_alloc_get - returns read allocations | ||
1224 | * @sk: socket | ||
1225 | * | ||
1226 | * Returns sk_rmem_alloc | ||
1227 | */ | ||
1228 | static inline int sk_rmem_alloc_get(const struct sock *sk) | ||
1229 | { | ||
1230 | return atomic_read(&sk->sk_rmem_alloc); | ||
1231 | } | ||
1232 | |||
1233 | /** | ||
1234 | * sk_has_allocations - check if allocations are outstanding | ||
1235 | * @sk: socket | ||
1236 | * | ||
1237 | * Returns true if socket has write or read allocations | ||
1238 | */ | ||
1239 | static inline int sk_has_allocations(const struct sock *sk) | ||
1240 | { | ||
1241 | return sk_wmem_alloc_get(sk) || sk_rmem_alloc_get(sk); | ||
1242 | } | ||
1243 | |||
1211 | /* | 1244 | /* |
1212 | * Queue a received datagram if it will fit. Stream and sequenced | 1245 | * Queue a received datagram if it will fit. Stream and sequenced |
1213 | * protocols can't normally use this as they need to fit buffers in | 1246 | * protocols can't normally use this as they need to fit buffers in |
diff --git a/include/net/x25.h b/include/net/x25.h index fc3f03d976f8..2cda04011568 100644 --- a/include/net/x25.h +++ b/include/net/x25.h | |||
@@ -187,7 +187,7 @@ extern int x25_addr_ntoa(unsigned char *, struct x25_address *, | |||
187 | extern int x25_addr_aton(unsigned char *, struct x25_address *, | 187 | extern int x25_addr_aton(unsigned char *, struct x25_address *, |
188 | struct x25_address *); | 188 | struct x25_address *); |
189 | extern struct sock *x25_find_socket(unsigned int, struct x25_neigh *); | 189 | extern struct sock *x25_find_socket(unsigned int, struct x25_neigh *); |
190 | extern void x25_destroy_socket(struct sock *); | 190 | extern void x25_destroy_socket_from_timer(struct sock *); |
191 | extern int x25_rx_call_request(struct sk_buff *, struct x25_neigh *, unsigned int); | 191 | extern int x25_rx_call_request(struct sk_buff *, struct x25_neigh *, unsigned int); |
192 | extern void x25_kill_by_neigh(struct x25_neigh *); | 192 | extern void x25_kill_by_neigh(struct x25_neigh *); |
193 | 193 | ||
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h new file mode 100644 index 000000000000..acf4cc9cd36d --- /dev/null +++ b/include/trace/events/ext4.h | |||
@@ -0,0 +1,719 @@ | |||
1 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_EXT4_H | ||
3 | |||
4 | #undef TRACE_SYSTEM | ||
5 | #define TRACE_SYSTEM ext4 | ||
6 | |||
7 | #include <linux/writeback.h> | ||
8 | #include "../../../fs/ext4/ext4.h" | ||
9 | #include "../../../fs/ext4/mballoc.h" | ||
10 | #include <linux/tracepoint.h> | ||
11 | |||
12 | TRACE_EVENT(ext4_free_inode, | ||
13 | TP_PROTO(struct inode *inode), | ||
14 | |||
15 | TP_ARGS(inode), | ||
16 | |||
17 | TP_STRUCT__entry( | ||
18 | __field( dev_t, dev ) | ||
19 | __field( ino_t, ino ) | ||
20 | __field( umode_t, mode ) | ||
21 | __field( uid_t, uid ) | ||
22 | __field( gid_t, gid ) | ||
23 | __field( blkcnt_t, blocks ) | ||
24 | ), | ||
25 | |||
26 | TP_fast_assign( | ||
27 | __entry->dev = inode->i_sb->s_dev; | ||
28 | __entry->ino = inode->i_ino; | ||
29 | __entry->mode = inode->i_mode; | ||
30 | __entry->uid = inode->i_uid; | ||
31 | __entry->gid = inode->i_gid; | ||
32 | __entry->blocks = inode->i_blocks; | ||
33 | ), | ||
34 | |||
35 | TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", | ||
36 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->mode, | ||
37 | __entry->uid, __entry->gid, __entry->blocks) | ||
38 | ); | ||
39 | |||
40 | TRACE_EVENT(ext4_request_inode, | ||
41 | TP_PROTO(struct inode *dir, int mode), | ||
42 | |||
43 | TP_ARGS(dir, mode), | ||
44 | |||
45 | TP_STRUCT__entry( | ||
46 | __field( dev_t, dev ) | ||
47 | __field( ino_t, dir ) | ||
48 | __field( umode_t, mode ) | ||
49 | ), | ||
50 | |||
51 | TP_fast_assign( | ||
52 | __entry->dev = dir->i_sb->s_dev; | ||
53 | __entry->dir = dir->i_ino; | ||
54 | __entry->mode = mode; | ||
55 | ), | ||
56 | |||
57 | TP_printk("dev %s dir %lu mode %d", | ||
58 | jbd2_dev_to_name(__entry->dev), __entry->dir, __entry->mode) | ||
59 | ); | ||
60 | |||
61 | TRACE_EVENT(ext4_allocate_inode, | ||
62 | TP_PROTO(struct inode *inode, struct inode *dir, int mode), | ||
63 | |||
64 | TP_ARGS(inode, dir, mode), | ||
65 | |||
66 | TP_STRUCT__entry( | ||
67 | __field( dev_t, dev ) | ||
68 | __field( ino_t, ino ) | ||
69 | __field( ino_t, dir ) | ||
70 | __field( umode_t, mode ) | ||
71 | ), | ||
72 | |||
73 | TP_fast_assign( | ||
74 | __entry->dev = inode->i_sb->s_dev; | ||
75 | __entry->ino = inode->i_ino; | ||
76 | __entry->dir = dir->i_ino; | ||
77 | __entry->mode = mode; | ||
78 | ), | ||
79 | |||
80 | TP_printk("dev %s ino %lu dir %lu mode %d", | ||
81 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->dir, __entry->mode) | ||
82 | ); | ||
83 | |||
84 | TRACE_EVENT(ext4_write_begin, | ||
85 | |||
86 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
87 | unsigned int flags), | ||
88 | |||
89 | TP_ARGS(inode, pos, len, flags), | ||
90 | |||
91 | TP_STRUCT__entry( | ||
92 | __field( dev_t, dev ) | ||
93 | __field( ino_t, ino ) | ||
94 | __field( loff_t, pos ) | ||
95 | __field( unsigned int, len ) | ||
96 | __field( unsigned int, flags ) | ||
97 | ), | ||
98 | |||
99 | TP_fast_assign( | ||
100 | __entry->dev = inode->i_sb->s_dev; | ||
101 | __entry->ino = inode->i_ino; | ||
102 | __entry->pos = pos; | ||
103 | __entry->len = len; | ||
104 | __entry->flags = flags; | ||
105 | ), | ||
106 | |||
107 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", | ||
108 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
109 | __entry->flags) | ||
110 | ); | ||
111 | |||
112 | TRACE_EVENT(ext4_ordered_write_end, | ||
113 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
114 | unsigned int copied), | ||
115 | |||
116 | TP_ARGS(inode, pos, len, copied), | ||
117 | |||
118 | TP_STRUCT__entry( | ||
119 | __field( dev_t, dev ) | ||
120 | __field( ino_t, ino ) | ||
121 | __field( loff_t, pos ) | ||
122 | __field( unsigned int, len ) | ||
123 | __field( unsigned int, copied ) | ||
124 | ), | ||
125 | |||
126 | TP_fast_assign( | ||
127 | __entry->dev = inode->i_sb->s_dev; | ||
128 | __entry->ino = inode->i_ino; | ||
129 | __entry->pos = pos; | ||
130 | __entry->len = len; | ||
131 | __entry->copied = copied; | ||
132 | ), | ||
133 | |||
134 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | ||
135 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
136 | __entry->copied) | ||
137 | ); | ||
138 | |||
139 | TRACE_EVENT(ext4_writeback_write_end, | ||
140 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
141 | unsigned int copied), | ||
142 | |||
143 | TP_ARGS(inode, pos, len, copied), | ||
144 | |||
145 | TP_STRUCT__entry( | ||
146 | __field( dev_t, dev ) | ||
147 | __field( ino_t, ino ) | ||
148 | __field( loff_t, pos ) | ||
149 | __field( unsigned int, len ) | ||
150 | __field( unsigned int, copied ) | ||
151 | ), | ||
152 | |||
153 | TP_fast_assign( | ||
154 | __entry->dev = inode->i_sb->s_dev; | ||
155 | __entry->ino = inode->i_ino; | ||
156 | __entry->pos = pos; | ||
157 | __entry->len = len; | ||
158 | __entry->copied = copied; | ||
159 | ), | ||
160 | |||
161 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | ||
162 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
163 | __entry->copied) | ||
164 | ); | ||
165 | |||
166 | TRACE_EVENT(ext4_journalled_write_end, | ||
167 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
168 | unsigned int copied), | ||
169 | TP_ARGS(inode, pos, len, copied), | ||
170 | |||
171 | TP_STRUCT__entry( | ||
172 | __field( dev_t, dev ) | ||
173 | __field( ino_t, ino ) | ||
174 | __field( loff_t, pos ) | ||
175 | __field( unsigned int, len ) | ||
176 | __field( unsigned int, copied ) | ||
177 | ), | ||
178 | |||
179 | TP_fast_assign( | ||
180 | __entry->dev = inode->i_sb->s_dev; | ||
181 | __entry->ino = inode->i_ino; | ||
182 | __entry->pos = pos; | ||
183 | __entry->len = len; | ||
184 | __entry->copied = copied; | ||
185 | ), | ||
186 | |||
187 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | ||
188 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
189 | __entry->copied) | ||
190 | ); | ||
191 | |||
192 | TRACE_EVENT(ext4_da_writepage, | ||
193 | TP_PROTO(struct inode *inode, struct page *page), | ||
194 | |||
195 | TP_ARGS(inode, page), | ||
196 | |||
197 | TP_STRUCT__entry( | ||
198 | __field( dev_t, dev ) | ||
199 | __field( ino_t, ino ) | ||
200 | __field( pgoff_t, index ) | ||
201 | |||
202 | ), | ||
203 | |||
204 | TP_fast_assign( | ||
205 | __entry->dev = inode->i_sb->s_dev; | ||
206 | __entry->ino = inode->i_ino; | ||
207 | __entry->index = page->index; | ||
208 | ), | ||
209 | |||
210 | TP_printk("dev %s ino %lu page_index %lu", | ||
211 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) | ||
212 | ); | ||
213 | |||
214 | TRACE_EVENT(ext4_da_writepages, | ||
215 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), | ||
216 | |||
217 | TP_ARGS(inode, wbc), | ||
218 | |||
219 | TP_STRUCT__entry( | ||
220 | __field( dev_t, dev ) | ||
221 | __field( ino_t, ino ) | ||
222 | __field( long, nr_to_write ) | ||
223 | __field( long, pages_skipped ) | ||
224 | __field( loff_t, range_start ) | ||
225 | __field( loff_t, range_end ) | ||
226 | __field( char, nonblocking ) | ||
227 | __field( char, for_kupdate ) | ||
228 | __field( char, for_reclaim ) | ||
229 | __field( char, for_writepages ) | ||
230 | __field( char, range_cyclic ) | ||
231 | ), | ||
232 | |||
233 | TP_fast_assign( | ||
234 | __entry->dev = inode->i_sb->s_dev; | ||
235 | __entry->ino = inode->i_ino; | ||
236 | __entry->nr_to_write = wbc->nr_to_write; | ||
237 | __entry->pages_skipped = wbc->pages_skipped; | ||
238 | __entry->range_start = wbc->range_start; | ||
239 | __entry->range_end = wbc->range_end; | ||
240 | __entry->nonblocking = wbc->nonblocking; | ||
241 | __entry->for_kupdate = wbc->for_kupdate; | ||
242 | __entry->for_reclaim = wbc->for_reclaim; | ||
243 | __entry->for_writepages = wbc->for_writepages; | ||
244 | __entry->range_cyclic = wbc->range_cyclic; | ||
245 | ), | ||
246 | |||
247 | TP_printk("dev %s ino %lu nr_t_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d for_writepages %d range_cyclic %d", | ||
248 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->nr_to_write, | ||
249 | __entry->pages_skipped, __entry->range_start, | ||
250 | __entry->range_end, __entry->nonblocking, | ||
251 | __entry->for_kupdate, __entry->for_reclaim, | ||
252 | __entry->for_writepages, __entry->range_cyclic) | ||
253 | ); | ||
254 | |||
255 | TRACE_EVENT(ext4_da_writepages_result, | ||
256 | TP_PROTO(struct inode *inode, struct writeback_control *wbc, | ||
257 | int ret, int pages_written), | ||
258 | |||
259 | TP_ARGS(inode, wbc, ret, pages_written), | ||
260 | |||
261 | TP_STRUCT__entry( | ||
262 | __field( dev_t, dev ) | ||
263 | __field( ino_t, ino ) | ||
264 | __field( int, ret ) | ||
265 | __field( int, pages_written ) | ||
266 | __field( long, pages_skipped ) | ||
267 | __field( char, encountered_congestion ) | ||
268 | __field( char, more_io ) | ||
269 | __field( char, no_nrwrite_index_update ) | ||
270 | ), | ||
271 | |||
272 | TP_fast_assign( | ||
273 | __entry->dev = inode->i_sb->s_dev; | ||
274 | __entry->ino = inode->i_ino; | ||
275 | __entry->ret = ret; | ||
276 | __entry->pages_written = pages_written; | ||
277 | __entry->pages_skipped = wbc->pages_skipped; | ||
278 | __entry->encountered_congestion = wbc->encountered_congestion; | ||
279 | __entry->more_io = wbc->more_io; | ||
280 | __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; | ||
281 | ), | ||
282 | |||
283 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d", | ||
284 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->ret, | ||
285 | __entry->pages_written, __entry->pages_skipped, | ||
286 | __entry->encountered_congestion, __entry->more_io, | ||
287 | __entry->no_nrwrite_index_update) | ||
288 | ); | ||
289 | |||
290 | TRACE_EVENT(ext4_da_write_begin, | ||
291 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
292 | unsigned int flags), | ||
293 | |||
294 | TP_ARGS(inode, pos, len, flags), | ||
295 | |||
296 | TP_STRUCT__entry( | ||
297 | __field( dev_t, dev ) | ||
298 | __field( ino_t, ino ) | ||
299 | __field( loff_t, pos ) | ||
300 | __field( unsigned int, len ) | ||
301 | __field( unsigned int, flags ) | ||
302 | ), | ||
303 | |||
304 | TP_fast_assign( | ||
305 | __entry->dev = inode->i_sb->s_dev; | ||
306 | __entry->ino = inode->i_ino; | ||
307 | __entry->pos = pos; | ||
308 | __entry->len = len; | ||
309 | __entry->flags = flags; | ||
310 | ), | ||
311 | |||
312 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", | ||
313 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
314 | __entry->flags) | ||
315 | ); | ||
316 | |||
317 | TRACE_EVENT(ext4_da_write_end, | ||
318 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
319 | unsigned int copied), | ||
320 | |||
321 | TP_ARGS(inode, pos, len, copied), | ||
322 | |||
323 | TP_STRUCT__entry( | ||
324 | __field( dev_t, dev ) | ||
325 | __field( ino_t, ino ) | ||
326 | __field( loff_t, pos ) | ||
327 | __field( unsigned int, len ) | ||
328 | __field( unsigned int, copied ) | ||
329 | ), | ||
330 | |||
331 | TP_fast_assign( | ||
332 | __entry->dev = inode->i_sb->s_dev; | ||
333 | __entry->ino = inode->i_ino; | ||
334 | __entry->pos = pos; | ||
335 | __entry->len = len; | ||
336 | __entry->copied = copied; | ||
337 | ), | ||
338 | |||
339 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | ||
340 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
341 | __entry->copied) | ||
342 | ); | ||
343 | |||
344 | TRACE_EVENT(ext4_normal_writepage, | ||
345 | TP_PROTO(struct inode *inode, struct page *page), | ||
346 | |||
347 | TP_ARGS(inode, page), | ||
348 | |||
349 | TP_STRUCT__entry( | ||
350 | __field( dev_t, dev ) | ||
351 | __field( ino_t, ino ) | ||
352 | __field( pgoff_t, index ) | ||
353 | ), | ||
354 | |||
355 | TP_fast_assign( | ||
356 | __entry->dev = inode->i_sb->s_dev; | ||
357 | __entry->ino = inode->i_ino; | ||
358 | __entry->index = page->index; | ||
359 | ), | ||
360 | |||
361 | TP_printk("dev %s ino %lu page_index %lu", | ||
362 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) | ||
363 | ); | ||
364 | |||
365 | TRACE_EVENT(ext4_journalled_writepage, | ||
366 | TP_PROTO(struct inode *inode, struct page *page), | ||
367 | |||
368 | TP_ARGS(inode, page), | ||
369 | |||
370 | TP_STRUCT__entry( | ||
371 | __field( dev_t, dev ) | ||
372 | __field( ino_t, ino ) | ||
373 | __field( pgoff_t, index ) | ||
374 | |||
375 | ), | ||
376 | |||
377 | TP_fast_assign( | ||
378 | __entry->dev = inode->i_sb->s_dev; | ||
379 | __entry->ino = inode->i_ino; | ||
380 | __entry->index = page->index; | ||
381 | ), | ||
382 | |||
383 | TP_printk("dev %s ino %lu page_index %lu", | ||
384 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) | ||
385 | ); | ||
386 | |||
387 | TRACE_EVENT(ext4_discard_blocks, | ||
388 | TP_PROTO(struct super_block *sb, unsigned long long blk, | ||
389 | unsigned long long count), | ||
390 | |||
391 | TP_ARGS(sb, blk, count), | ||
392 | |||
393 | TP_STRUCT__entry( | ||
394 | __field( dev_t, dev ) | ||
395 | __field( __u64, blk ) | ||
396 | __field( __u64, count ) | ||
397 | |||
398 | ), | ||
399 | |||
400 | TP_fast_assign( | ||
401 | __entry->dev = sb->s_dev; | ||
402 | __entry->blk = blk; | ||
403 | __entry->count = count; | ||
404 | ), | ||
405 | |||
406 | TP_printk("dev %s blk %llu count %llu", | ||
407 | jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count) | ||
408 | ); | ||
409 | |||
410 | TRACE_EVENT(ext4_mb_new_inode_pa, | ||
411 | TP_PROTO(struct ext4_allocation_context *ac, | ||
412 | struct ext4_prealloc_space *pa), | ||
413 | |||
414 | TP_ARGS(ac, pa), | ||
415 | |||
416 | TP_STRUCT__entry( | ||
417 | __field( dev_t, dev ) | ||
418 | __field( ino_t, ino ) | ||
419 | __field( __u64, pa_pstart ) | ||
420 | __field( __u32, pa_len ) | ||
421 | __field( __u64, pa_lstart ) | ||
422 | |||
423 | ), | ||
424 | |||
425 | TP_fast_assign( | ||
426 | __entry->dev = ac->ac_sb->s_dev; | ||
427 | __entry->ino = ac->ac_inode->i_ino; | ||
428 | __entry->pa_pstart = pa->pa_pstart; | ||
429 | __entry->pa_len = pa->pa_len; | ||
430 | __entry->pa_lstart = pa->pa_lstart; | ||
431 | ), | ||
432 | |||
433 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", | ||
434 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, | ||
435 | __entry->pa_len, __entry->pa_lstart) | ||
436 | ); | ||
437 | |||
438 | TRACE_EVENT(ext4_mb_new_group_pa, | ||
439 | TP_PROTO(struct ext4_allocation_context *ac, | ||
440 | struct ext4_prealloc_space *pa), | ||
441 | |||
442 | TP_ARGS(ac, pa), | ||
443 | |||
444 | TP_STRUCT__entry( | ||
445 | __field( dev_t, dev ) | ||
446 | __field( ino_t, ino ) | ||
447 | __field( __u64, pa_pstart ) | ||
448 | __field( __u32, pa_len ) | ||
449 | __field( __u64, pa_lstart ) | ||
450 | |||
451 | ), | ||
452 | |||
453 | TP_fast_assign( | ||
454 | __entry->dev = ac->ac_sb->s_dev; | ||
455 | __entry->ino = ac->ac_inode->i_ino; | ||
456 | __entry->pa_pstart = pa->pa_pstart; | ||
457 | __entry->pa_len = pa->pa_len; | ||
458 | __entry->pa_lstart = pa->pa_lstart; | ||
459 | ), | ||
460 | |||
461 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", | ||
462 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, | ||
463 | __entry->pa_len, __entry->pa_lstart) | ||
464 | ); | ||
465 | |||
466 | TRACE_EVENT(ext4_mb_release_inode_pa, | ||
467 | TP_PROTO(struct ext4_allocation_context *ac, | ||
468 | struct ext4_prealloc_space *pa, | ||
469 | unsigned long long block, unsigned int count), | ||
470 | |||
471 | TP_ARGS(ac, pa, block, count), | ||
472 | |||
473 | TP_STRUCT__entry( | ||
474 | __field( dev_t, dev ) | ||
475 | __field( ino_t, ino ) | ||
476 | __field( __u64, block ) | ||
477 | __field( __u32, count ) | ||
478 | |||
479 | ), | ||
480 | |||
481 | TP_fast_assign( | ||
482 | __entry->dev = ac->ac_sb->s_dev; | ||
483 | __entry->ino = ac->ac_inode->i_ino; | ||
484 | __entry->block = block; | ||
485 | __entry->count = count; | ||
486 | ), | ||
487 | |||
488 | TP_printk("dev %s ino %lu block %llu count %u", | ||
489 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, | ||
490 | __entry->count) | ||
491 | ); | ||
492 | |||
493 | TRACE_EVENT(ext4_mb_release_group_pa, | ||
494 | TP_PROTO(struct ext4_allocation_context *ac, | ||
495 | struct ext4_prealloc_space *pa), | ||
496 | |||
497 | TP_ARGS(ac, pa), | ||
498 | |||
499 | TP_STRUCT__entry( | ||
500 | __field( dev_t, dev ) | ||
501 | __field( ino_t, ino ) | ||
502 | __field( __u64, pa_pstart ) | ||
503 | __field( __u32, pa_len ) | ||
504 | |||
505 | ), | ||
506 | |||
507 | TP_fast_assign( | ||
508 | __entry->dev = ac->ac_sb->s_dev; | ||
509 | __entry->ino = ac->ac_inode->i_ino; | ||
510 | __entry->pa_pstart = pa->pa_pstart; | ||
511 | __entry->pa_len = pa->pa_len; | ||
512 | ), | ||
513 | |||
514 | TP_printk("dev %s pstart %llu len %u", | ||
515 | jbd2_dev_to_name(__entry->dev), __entry->pa_pstart, __entry->pa_len) | ||
516 | ); | ||
517 | |||
518 | TRACE_EVENT(ext4_discard_preallocations, | ||
519 | TP_PROTO(struct inode *inode), | ||
520 | |||
521 | TP_ARGS(inode), | ||
522 | |||
523 | TP_STRUCT__entry( | ||
524 | __field( dev_t, dev ) | ||
525 | __field( ino_t, ino ) | ||
526 | |||
527 | ), | ||
528 | |||
529 | TP_fast_assign( | ||
530 | __entry->dev = inode->i_sb->s_dev; | ||
531 | __entry->ino = inode->i_ino; | ||
532 | ), | ||
533 | |||
534 | TP_printk("dev %s ino %lu", | ||
535 | jbd2_dev_to_name(__entry->dev), __entry->ino) | ||
536 | ); | ||
537 | |||
538 | TRACE_EVENT(ext4_mb_discard_preallocations, | ||
539 | TP_PROTO(struct super_block *sb, int needed), | ||
540 | |||
541 | TP_ARGS(sb, needed), | ||
542 | |||
543 | TP_STRUCT__entry( | ||
544 | __field( dev_t, dev ) | ||
545 | __field( int, needed ) | ||
546 | |||
547 | ), | ||
548 | |||
549 | TP_fast_assign( | ||
550 | __entry->dev = sb->s_dev; | ||
551 | __entry->needed = needed; | ||
552 | ), | ||
553 | |||
554 | TP_printk("dev %s needed %d", | ||
555 | jbd2_dev_to_name(__entry->dev), __entry->needed) | ||
556 | ); | ||
557 | |||
558 | TRACE_EVENT(ext4_request_blocks, | ||
559 | TP_PROTO(struct ext4_allocation_request *ar), | ||
560 | |||
561 | TP_ARGS(ar), | ||
562 | |||
563 | TP_STRUCT__entry( | ||
564 | __field( dev_t, dev ) | ||
565 | __field( ino_t, ino ) | ||
566 | __field( unsigned int, flags ) | ||
567 | __field( unsigned int, len ) | ||
568 | __field( __u64, logical ) | ||
569 | __field( __u64, goal ) | ||
570 | __field( __u64, lleft ) | ||
571 | __field( __u64, lright ) | ||
572 | __field( __u64, pleft ) | ||
573 | __field( __u64, pright ) | ||
574 | ), | ||
575 | |||
576 | TP_fast_assign( | ||
577 | __entry->dev = ar->inode->i_sb->s_dev; | ||
578 | __entry->ino = ar->inode->i_ino; | ||
579 | __entry->flags = ar->flags; | ||
580 | __entry->len = ar->len; | ||
581 | __entry->logical = ar->logical; | ||
582 | __entry->goal = ar->goal; | ||
583 | __entry->lleft = ar->lleft; | ||
584 | __entry->lright = ar->lright; | ||
585 | __entry->pleft = ar->pleft; | ||
586 | __entry->pright = ar->pright; | ||
587 | ), | ||
588 | |||
589 | TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", | ||
590 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags, | ||
591 | __entry->len, | ||
592 | (unsigned long long) __entry->logical, | ||
593 | (unsigned long long) __entry->goal, | ||
594 | (unsigned long long) __entry->lleft, | ||
595 | (unsigned long long) __entry->lright, | ||
596 | (unsigned long long) __entry->pleft, | ||
597 | (unsigned long long) __entry->pright) | ||
598 | ); | ||
599 | |||
600 | TRACE_EVENT(ext4_allocate_blocks, | ||
601 | TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block), | ||
602 | |||
603 | TP_ARGS(ar, block), | ||
604 | |||
605 | TP_STRUCT__entry( | ||
606 | __field( dev_t, dev ) | ||
607 | __field( ino_t, ino ) | ||
608 | __field( __u64, block ) | ||
609 | __field( unsigned int, flags ) | ||
610 | __field( unsigned int, len ) | ||
611 | __field( __u64, logical ) | ||
612 | __field( __u64, goal ) | ||
613 | __field( __u64, lleft ) | ||
614 | __field( __u64, lright ) | ||
615 | __field( __u64, pleft ) | ||
616 | __field( __u64, pright ) | ||
617 | ), | ||
618 | |||
619 | TP_fast_assign( | ||
620 | __entry->dev = ar->inode->i_sb->s_dev; | ||
621 | __entry->ino = ar->inode->i_ino; | ||
622 | __entry->block = block; | ||
623 | __entry->flags = ar->flags; | ||
624 | __entry->len = ar->len; | ||
625 | __entry->logical = ar->logical; | ||
626 | __entry->goal = ar->goal; | ||
627 | __entry->lleft = ar->lleft; | ||
628 | __entry->lright = ar->lright; | ||
629 | __entry->pleft = ar->pleft; | ||
630 | __entry->pright = ar->pright; | ||
631 | ), | ||
632 | |||
633 | TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", | ||
634 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags, | ||
635 | __entry->len, __entry->block, | ||
636 | (unsigned long long) __entry->logical, | ||
637 | (unsigned long long) __entry->goal, | ||
638 | (unsigned long long) __entry->lleft, | ||
639 | (unsigned long long) __entry->lright, | ||
640 | (unsigned long long) __entry->pleft, | ||
641 | (unsigned long long) __entry->pright) | ||
642 | ); | ||
643 | |||
644 | TRACE_EVENT(ext4_free_blocks, | ||
645 | TP_PROTO(struct inode *inode, __u64 block, unsigned long count, | ||
646 | int metadata), | ||
647 | |||
648 | TP_ARGS(inode, block, count, metadata), | ||
649 | |||
650 | TP_STRUCT__entry( | ||
651 | __field( dev_t, dev ) | ||
652 | __field( ino_t, ino ) | ||
653 | __field( __u64, block ) | ||
654 | __field( unsigned long, count ) | ||
655 | __field( int, metadata ) | ||
656 | |||
657 | ), | ||
658 | |||
659 | TP_fast_assign( | ||
660 | __entry->dev = inode->i_sb->s_dev; | ||
661 | __entry->ino = inode->i_ino; | ||
662 | __entry->block = block; | ||
663 | __entry->count = count; | ||
664 | __entry->metadata = metadata; | ||
665 | ), | ||
666 | |||
667 | TP_printk("dev %s ino %lu block %llu count %lu metadata %d", | ||
668 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, | ||
669 | __entry->count, __entry->metadata) | ||
670 | ); | ||
671 | |||
672 | TRACE_EVENT(ext4_sync_file, | ||
673 | TP_PROTO(struct file *file, struct dentry *dentry, int datasync), | ||
674 | |||
675 | TP_ARGS(file, dentry, datasync), | ||
676 | |||
677 | TP_STRUCT__entry( | ||
678 | __field( dev_t, dev ) | ||
679 | __field( ino_t, ino ) | ||
680 | __field( ino_t, parent ) | ||
681 | __field( int, datasync ) | ||
682 | ), | ||
683 | |||
684 | TP_fast_assign( | ||
685 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
686 | __entry->ino = dentry->d_inode->i_ino; | ||
687 | __entry->datasync = datasync; | ||
688 | __entry->parent = dentry->d_parent->d_inode->i_ino; | ||
689 | ), | ||
690 | |||
691 | TP_printk("dev %s ino %ld parent %ld datasync %d ", | ||
692 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->parent, | ||
693 | __entry->datasync) | ||
694 | ); | ||
695 | |||
696 | TRACE_EVENT(ext4_sync_fs, | ||
697 | TP_PROTO(struct super_block *sb, int wait), | ||
698 | |||
699 | TP_ARGS(sb, wait), | ||
700 | |||
701 | TP_STRUCT__entry( | ||
702 | __field( dev_t, dev ) | ||
703 | __field( int, wait ) | ||
704 | |||
705 | ), | ||
706 | |||
707 | TP_fast_assign( | ||
708 | __entry->dev = sb->s_dev; | ||
709 | __entry->wait = wait; | ||
710 | ), | ||
711 | |||
712 | TP_printk("dev %s wait %d", jbd2_dev_to_name(__entry->dev), | ||
713 | __entry->wait) | ||
714 | ); | ||
715 | |||
716 | #endif /* _TRACE_EXT4_H */ | ||
717 | |||
718 | /* This part must be outside protection */ | ||
719 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h new file mode 100644 index 000000000000..845b0b4b48fd --- /dev/null +++ b/include/trace/events/jbd2.h | |||
@@ -0,0 +1,168 @@ | |||
1 | #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_JBD2_H | ||
3 | |||
4 | #include <linux/jbd2.h> | ||
5 | #include <linux/tracepoint.h> | ||
6 | |||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM jbd2 | ||
9 | |||
10 | TRACE_EVENT(jbd2_checkpoint, | ||
11 | |||
12 | TP_PROTO(journal_t *journal, int result), | ||
13 | |||
14 | TP_ARGS(journal, result), | ||
15 | |||
16 | TP_STRUCT__entry( | ||
17 | __field( dev_t, dev ) | ||
18 | __field( int, result ) | ||
19 | ), | ||
20 | |||
21 | TP_fast_assign( | ||
22 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
23 | __entry->result = result; | ||
24 | ), | ||
25 | |||
26 | TP_printk("dev %s result %d", | ||
27 | jbd2_dev_to_name(__entry->dev), __entry->result) | ||
28 | ); | ||
29 | |||
30 | TRACE_EVENT(jbd2_start_commit, | ||
31 | |||
32 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
33 | |||
34 | TP_ARGS(journal, commit_transaction), | ||
35 | |||
36 | TP_STRUCT__entry( | ||
37 | __field( dev_t, dev ) | ||
38 | __field( char, sync_commit ) | ||
39 | __field( int, transaction ) | ||
40 | ), | ||
41 | |||
42 | TP_fast_assign( | ||
43 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
44 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
45 | __entry->transaction = commit_transaction->t_tid; | ||
46 | ), | ||
47 | |||
48 | TP_printk("dev %s transaction %d sync %d", | ||
49 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | ||
50 | __entry->sync_commit) | ||
51 | ); | ||
52 | |||
53 | TRACE_EVENT(jbd2_commit_locking, | ||
54 | |||
55 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
56 | |||
57 | TP_ARGS(journal, commit_transaction), | ||
58 | |||
59 | TP_STRUCT__entry( | ||
60 | __field( dev_t, dev ) | ||
61 | __field( char, sync_commit ) | ||
62 | __field( int, transaction ) | ||
63 | ), | ||
64 | |||
65 | TP_fast_assign( | ||
66 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
67 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
68 | __entry->transaction = commit_transaction->t_tid; | ||
69 | ), | ||
70 | |||
71 | TP_printk("dev %s transaction %d sync %d", | ||
72 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | ||
73 | __entry->sync_commit) | ||
74 | ); | ||
75 | |||
76 | TRACE_EVENT(jbd2_commit_flushing, | ||
77 | |||
78 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
79 | |||
80 | TP_ARGS(journal, commit_transaction), | ||
81 | |||
82 | TP_STRUCT__entry( | ||
83 | __field( dev_t, dev ) | ||
84 | __field( char, sync_commit ) | ||
85 | __field( int, transaction ) | ||
86 | ), | ||
87 | |||
88 | TP_fast_assign( | ||
89 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
90 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
91 | __entry->transaction = commit_transaction->t_tid; | ||
92 | ), | ||
93 | |||
94 | TP_printk("dev %s transaction %d sync %d", | ||
95 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | ||
96 | __entry->sync_commit) | ||
97 | ); | ||
98 | |||
99 | TRACE_EVENT(jbd2_commit_logging, | ||
100 | |||
101 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
102 | |||
103 | TP_ARGS(journal, commit_transaction), | ||
104 | |||
105 | TP_STRUCT__entry( | ||
106 | __field( dev_t, dev ) | ||
107 | __field( char, sync_commit ) | ||
108 | __field( int, transaction ) | ||
109 | ), | ||
110 | |||
111 | TP_fast_assign( | ||
112 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
113 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
114 | __entry->transaction = commit_transaction->t_tid; | ||
115 | ), | ||
116 | |||
117 | TP_printk("dev %s transaction %d sync %d", | ||
118 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | ||
119 | __entry->sync_commit) | ||
120 | ); | ||
121 | |||
122 | TRACE_EVENT(jbd2_end_commit, | ||
123 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
124 | |||
125 | TP_ARGS(journal, commit_transaction), | ||
126 | |||
127 | TP_STRUCT__entry( | ||
128 | __field( dev_t, dev ) | ||
129 | __field( char, sync_commit ) | ||
130 | __field( int, transaction ) | ||
131 | __field( int, head ) | ||
132 | ), | ||
133 | |||
134 | TP_fast_assign( | ||
135 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
136 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
137 | __entry->transaction = commit_transaction->t_tid; | ||
138 | __entry->head = journal->j_tail_sequence; | ||
139 | ), | ||
140 | |||
141 | TP_printk("dev %s transaction %d sync %d head %d", | ||
142 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | ||
143 | __entry->sync_commit, __entry->head) | ||
144 | ); | ||
145 | |||
146 | TRACE_EVENT(jbd2_submit_inode_data, | ||
147 | TP_PROTO(struct inode *inode), | ||
148 | |||
149 | TP_ARGS(inode), | ||
150 | |||
151 | TP_STRUCT__entry( | ||
152 | __field( dev_t, dev ) | ||
153 | __field( ino_t, ino ) | ||
154 | ), | ||
155 | |||
156 | TP_fast_assign( | ||
157 | __entry->dev = inode->i_sb->s_dev; | ||
158 | __entry->ino = inode->i_ino; | ||
159 | ), | ||
160 | |||
161 | TP_printk("dev %s ino %lu", | ||
162 | jbd2_dev_to_name(__entry->dev), __entry->ino) | ||
163 | ); | ||
164 | |||
165 | #endif /* _TRACE_JBD2_H */ | ||
166 | |||
167 | /* This part must be outside protection */ | ||
168 | #include <trace/define_trace.h> | ||