diff options
Diffstat (limited to 'include')
72 files changed, 1716 insertions, 337 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index b09c4fde9725..4927c063347c 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -84,7 +84,6 @@ struct acpi_processor_power { | |||
84 | struct acpi_processor_cx *state; | 84 | struct acpi_processor_cx *state; |
85 | unsigned long bm_check_timestamp; | 85 | unsigned long bm_check_timestamp; |
86 | u32 default_state; | 86 | u32 default_state; |
87 | u32 bm_activity; | ||
88 | int count; | 87 | int count; |
89 | struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER]; | 88 | struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER]; |
90 | int timer_broadcast_on_state; | 89 | int timer_broadcast_on_state; |
diff --git a/include/acpi/video.h b/include/acpi/video.h index f0275bb79ce4..af6fe95fd3d0 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h | |||
@@ -3,8 +3,10 @@ | |||
3 | 3 | ||
4 | #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) | 4 | #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) |
5 | extern int acpi_video_register(void); | 5 | extern int acpi_video_register(void); |
6 | extern int acpi_video_exit(void); | ||
6 | #else | 7 | #else |
7 | static inline int acpi_video_register(void) { return 0; } | 8 | static inline int acpi_video_register(void) { return 0; } |
9 | static inline void acpi_video_exit(void) { return; } | ||
8 | #endif | 10 | #endif |
9 | 11 | ||
10 | #endif | 12 | #endif |
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index 7abdaa91ccd3..3673a13b6703 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h | |||
@@ -132,9 +132,9 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u) | |||
132 | #define atomic_long_inc_not_zero(l) atomic64_inc_not_zero((atomic64_t *)(l)) | 132 | #define atomic_long_inc_not_zero(l) atomic64_inc_not_zero((atomic64_t *)(l)) |
133 | 133 | ||
134 | #define atomic_long_cmpxchg(l, old, new) \ | 134 | #define atomic_long_cmpxchg(l, old, new) \ |
135 | (atomic_cmpxchg((atomic64_t *)(l), (old), (new))) | 135 | (atomic64_cmpxchg((atomic64_t *)(l), (old), (new))) |
136 | #define atomic_long_xchg(v, new) \ | 136 | #define atomic_long_xchg(v, new) \ |
137 | (atomic_xchg((atomic64_t *)(l), (new))) | 137 | (atomic64_xchg((atomic64_t *)(l), (new))) |
138 | 138 | ||
139 | #else /* BITS_PER_LONG == 64 */ | 139 | #else /* BITS_PER_LONG == 64 */ |
140 | 140 | ||
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 7fa660fd449c..f1736ca7922c 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -1,3 +1,5 @@ | |||
1 | #include <linux/section-names.h> | ||
2 | |||
1 | #ifndef LOAD_OFFSET | 3 | #ifndef LOAD_OFFSET |
2 | #define LOAD_OFFSET 0 | 4 | #define LOAD_OFFSET 0 |
3 | #endif | 5 | #endif |
@@ -61,7 +63,7 @@ | |||
61 | #define BRANCH_PROFILE() | 63 | #define BRANCH_PROFILE() |
62 | #endif | 64 | #endif |
63 | 65 | ||
64 | #ifdef CONFIG_EVENT_TRACER | 66 | #ifdef CONFIG_EVENT_TRACING |
65 | #define FTRACE_EVENTS() VMLINUX_SYMBOL(__start_ftrace_events) = .; \ | 67 | #define FTRACE_EVENTS() VMLINUX_SYMBOL(__start_ftrace_events) = .; \ |
66 | *(_ftrace_events) \ | 68 | *(_ftrace_events) \ |
67 | VMLINUX_SYMBOL(__stop_ftrace_events) = .; | 69 | VMLINUX_SYMBOL(__stop_ftrace_events) = .; |
@@ -88,7 +90,6 @@ | |||
88 | /* .data section */ | 90 | /* .data section */ |
89 | #define DATA_DATA \ | 91 | #define DATA_DATA \ |
90 | *(.data) \ | 92 | *(.data) \ |
91 | *(.data.init.refok) \ | ||
92 | *(.ref.data) \ | 93 | *(.ref.data) \ |
93 | DEV_KEEP(init.data) \ | 94 | DEV_KEEP(init.data) \ |
94 | DEV_KEEP(exit.data) \ | 95 | DEV_KEEP(exit.data) \ |
@@ -287,8 +288,6 @@ | |||
287 | *(.text.hot) \ | 288 | *(.text.hot) \ |
288 | *(.text) \ | 289 | *(.text) \ |
289 | *(.ref.text) \ | 290 | *(.ref.text) \ |
290 | *(.text.init.refok) \ | ||
291 | *(.exit.text.refok) \ | ||
292 | DEV_KEEP(init.text) \ | 291 | DEV_KEEP(init.text) \ |
293 | DEV_KEEP(exit.text) \ | 292 | DEV_KEEP(exit.text) \ |
294 | CPU_KEEP(init.text) \ | 293 | CPU_KEEP(init.text) \ |
@@ -331,7 +330,7 @@ | |||
331 | #endif | 330 | #endif |
332 | 331 | ||
333 | /* Section used for early init (in .S files) */ | 332 | /* Section used for early init (in .S files) */ |
334 | #define HEAD_TEXT *(.head.text) | 333 | #define HEAD_TEXT *(HEAD_TEXT_SECTION) |
335 | 334 | ||
336 | /* init and exit section handling */ | 335 | /* init and exit section handling */ |
337 | #define INIT_DATA \ | 336 | #define INIT_DATA \ |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 9477af01a639..fc55db780199 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -532,6 +532,7 @@ | |||
532 | {0x8086, 0x2e02, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 532 | {0x8086, 0x2e02, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
533 | {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 533 | {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
534 | {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 534 | {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
535 | {0x8086, 0x2e32, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | ||
535 | {0x8086, 0xa001, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 536 | {0x8086, 0xa001, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
536 | {0x8086, 0xa011, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 537 | {0x8086, 0xa011, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
537 | {0x8086, 0x35e8, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 538 | {0x8086, 0x35e8, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 6586cbd0d4af..88be890ee3c7 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -111,6 +111,7 @@ int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); | |||
111 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); | 111 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); |
112 | void acpi_irq_stats_init(void); | 112 | void acpi_irq_stats_init(void); |
113 | extern u32 acpi_irq_handled; | 113 | extern u32 acpi_irq_handled; |
114 | extern u32 acpi_irq_not_handled; | ||
114 | 115 | ||
115 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; | 116 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; |
116 | extern int pci_mmcfg_config_num; | 117 | extern int pci_mmcfg_config_num; |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 6638b8148de7..61ee18c1bdb4 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -82,7 +82,19 @@ struct linux_binfmt { | |||
82 | int hasvdso; | 82 | int hasvdso; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | extern int register_binfmt(struct linux_binfmt *); | 85 | extern int __register_binfmt(struct linux_binfmt *fmt, int insert); |
86 | |||
87 | /* Registration of default binfmt handlers */ | ||
88 | static inline int register_binfmt(struct linux_binfmt *fmt) | ||
89 | { | ||
90 | return __register_binfmt(fmt, 0); | ||
91 | } | ||
92 | /* Same as above, but adds a new binfmt at the top of the list */ | ||
93 | static inline int insert_binfmt(struct linux_binfmt *fmt) | ||
94 | { | ||
95 | return __register_binfmt(fmt, 1); | ||
96 | } | ||
97 | |||
86 | extern void unregister_binfmt(struct linux_binfmt *); | 98 | extern void unregister_binfmt(struct linux_binfmt *); |
87 | 99 | ||
88 | extern int prepare_binprm(struct linux_binprm *); | 100 | extern int prepare_binprm(struct linux_binprm *); |
diff --git a/include/linux/bio.h b/include/linux/bio.h index b89cf2d82898..7b214fd672a2 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -132,6 +132,7 @@ struct bio { | |||
132 | * top 4 bits of bio flags indicate the pool this bio came from | 132 | * top 4 bits of bio flags indicate the pool this bio came from |
133 | */ | 133 | */ |
134 | #define BIO_POOL_BITS (4) | 134 | #define BIO_POOL_BITS (4) |
135 | #define BIO_POOL_NONE ((1UL << BIO_POOL_BITS) - 1) | ||
135 | #define BIO_POOL_OFFSET (BITS_PER_LONG - BIO_POOL_BITS) | 136 | #define BIO_POOL_OFFSET (BITS_PER_LONG - BIO_POOL_BITS) |
136 | #define BIO_POOL_MASK (1UL << BIO_POOL_OFFSET) | 137 | #define BIO_POOL_MASK (1UL << BIO_POOL_OFFSET) |
137 | #define BIO_POOL_IDX(bio) ((bio)->bi_flags >> BIO_POOL_OFFSET) | 138 | #define BIO_POOL_IDX(bio) ((bio)->bi_flags >> BIO_POOL_OFFSET) |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 61829139795a..c05a29cb9bb2 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -112,6 +112,25 @@ static inline unsigned fls_long(unsigned long l) | |||
112 | return fls64(l); | 112 | return fls64(l); |
113 | } | 113 | } |
114 | 114 | ||
115 | /** | ||
116 | * __ffs64 - find first set bit in a 64 bit word | ||
117 | * @word: The 64 bit word | ||
118 | * | ||
119 | * On 64 bit arches this is a synomyn for __ffs | ||
120 | * The result is not defined if no bits are set, so check that @word | ||
121 | * is non-zero before calling this. | ||
122 | */ | ||
123 | static inline unsigned long __ffs64(u64 word) | ||
124 | { | ||
125 | #if BITS_PER_LONG == 32 | ||
126 | if (((u32)word) == 0UL) | ||
127 | return __ffs((u32)(word >> 32)) + 32; | ||
128 | #elif BITS_PER_LONG != 64 | ||
129 | #error BITS_PER_LONG not 32 or 64 | ||
130 | #endif | ||
131 | return __ffs((unsigned long)word); | ||
132 | } | ||
133 | |||
115 | #ifdef __KERNEL__ | 134 | #ifdef __KERNEL__ |
116 | #ifdef CONFIG_GENERIC_FIND_FIRST_BIT | 135 | #ifdef CONFIG_GENERIC_FIND_FIRST_BIT |
117 | 136 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ba54c834a590..b4f71f1a4af7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -118,6 +118,7 @@ enum rq_flag_bits { | |||
118 | __REQ_COPY_USER, /* contains copies of user pages */ | 118 | __REQ_COPY_USER, /* contains copies of user pages */ |
119 | __REQ_INTEGRITY, /* integrity metadata has been remapped */ | 119 | __REQ_INTEGRITY, /* integrity metadata has been remapped */ |
120 | __REQ_NOIDLE, /* Don't anticipate more IO after this one */ | 120 | __REQ_NOIDLE, /* Don't anticipate more IO after this one */ |
121 | __REQ_IO_STAT, /* account I/O stat */ | ||
121 | __REQ_NR_BITS, /* stops here */ | 122 | __REQ_NR_BITS, /* stops here */ |
122 | }; | 123 | }; |
123 | 124 | ||
@@ -145,6 +146,7 @@ enum rq_flag_bits { | |||
145 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) | 146 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) |
146 | #define REQ_INTEGRITY (1 << __REQ_INTEGRITY) | 147 | #define REQ_INTEGRITY (1 << __REQ_INTEGRITY) |
147 | #define REQ_NOIDLE (1 << __REQ_NOIDLE) | 148 | #define REQ_NOIDLE (1 << __REQ_NOIDLE) |
149 | #define REQ_IO_STAT (1 << __REQ_IO_STAT) | ||
148 | 150 | ||
149 | #define BLK_MAX_CDB 16 | 151 | #define BLK_MAX_CDB 16 |
150 | 152 | ||
@@ -598,6 +600,8 @@ enum { | |||
598 | blk_failfast_transport(rq) || \ | 600 | blk_failfast_transport(rq) || \ |
599 | blk_failfast_driver(rq)) | 601 | blk_failfast_driver(rq)) |
600 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) | 602 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) |
603 | #define blk_rq_io_stat(rq) ((rq)->cmd_flags & REQ_IO_STAT) | ||
604 | #define blk_rq_quiet(rq) ((rq)->cmd_flags & REQ_QUIET) | ||
601 | 605 | ||
602 | #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) | 606 | #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) |
603 | 607 | ||
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index d960889e92ef..82b4636030e9 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -116,9 +116,9 @@ struct blk_io_trace { | |||
116 | * The remap event | 116 | * The remap event |
117 | */ | 117 | */ |
118 | struct blk_io_trace_remap { | 118 | struct blk_io_trace_remap { |
119 | __be32 device; | ||
120 | __be32 device_from; | 119 | __be32 device_from; |
121 | __be64 sector; | 120 | __be32 device_to; |
121 | __be64 sector_from; | ||
122 | }; | 122 | }; |
123 | 123 | ||
124 | enum { | 124 | enum { |
@@ -165,8 +165,9 @@ struct blk_trace { | |||
165 | 165 | ||
166 | extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *); | 166 | extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *); |
167 | extern void blk_trace_shutdown(struct request_queue *); | 167 | extern void blk_trace_shutdown(struct request_queue *); |
168 | extern int do_blk_trace_setup(struct request_queue *q, | 168 | extern int do_blk_trace_setup(struct request_queue *q, char *name, |
169 | char *name, dev_t dev, struct blk_user_trace_setup *buts); | 169 | dev_t dev, struct block_device *bdev, |
170 | struct blk_user_trace_setup *buts); | ||
170 | extern void __trace_note_message(struct blk_trace *, const char *fmt, ...); | 171 | extern void __trace_note_message(struct blk_trace *, const char *fmt, ...); |
171 | 172 | ||
172 | /** | 173 | /** |
@@ -193,22 +194,29 @@ extern void __trace_note_message(struct blk_trace *, const char *fmt, ...); | |||
193 | extern void blk_add_driver_data(struct request_queue *q, struct request *rq, | 194 | extern void blk_add_driver_data(struct request_queue *q, struct request *rq, |
194 | void *data, size_t len); | 195 | void *data, size_t len); |
195 | extern int blk_trace_setup(struct request_queue *q, char *name, dev_t dev, | 196 | extern int blk_trace_setup(struct request_queue *q, char *name, dev_t dev, |
197 | struct block_device *bdev, | ||
196 | char __user *arg); | 198 | char __user *arg); |
197 | extern int blk_trace_startstop(struct request_queue *q, int start); | 199 | extern int blk_trace_startstop(struct request_queue *q, int start); |
198 | extern int blk_trace_remove(struct request_queue *q); | 200 | extern int blk_trace_remove(struct request_queue *q); |
201 | extern int blk_trace_init_sysfs(struct device *dev); | ||
199 | 202 | ||
200 | extern struct attribute_group blk_trace_attr_group; | 203 | extern struct attribute_group blk_trace_attr_group; |
201 | 204 | ||
202 | #else /* !CONFIG_BLK_DEV_IO_TRACE */ | 205 | #else /* !CONFIG_BLK_DEV_IO_TRACE */ |
203 | #define blk_trace_ioctl(bdev, cmd, arg) (-ENOTTY) | 206 | # define blk_trace_ioctl(bdev, cmd, arg) (-ENOTTY) |
204 | #define blk_trace_shutdown(q) do { } while (0) | 207 | # define blk_trace_shutdown(q) do { } while (0) |
205 | #define do_blk_trace_setup(q, name, dev, buts) (-ENOTTY) | 208 | # define do_blk_trace_setup(q, name, dev, bdev, buts) (-ENOTTY) |
206 | #define blk_add_driver_data(q, rq, data, len) do {} while (0) | 209 | # define blk_add_driver_data(q, rq, data, len) do {} while (0) |
207 | #define blk_trace_setup(q, name, dev, arg) (-ENOTTY) | 210 | # define blk_trace_setup(q, name, dev, bdev, arg) (-ENOTTY) |
208 | #define blk_trace_startstop(q, start) (-ENOTTY) | 211 | # define blk_trace_startstop(q, start) (-ENOTTY) |
209 | #define blk_trace_remove(q) (-ENOTTY) | 212 | # define blk_trace_remove(q) (-ENOTTY) |
210 | #define blk_add_trace_msg(q, fmt, ...) do { } while (0) | 213 | # define blk_add_trace_msg(q, fmt, ...) do { } while (0) |
214 | static inline int blk_trace_init_sysfs(struct device *dev) | ||
215 | { | ||
216 | return 0; | ||
217 | } | ||
211 | 218 | ||
212 | #endif /* CONFIG_BLK_DEV_IO_TRACE */ | 219 | #endif /* CONFIG_BLK_DEV_IO_TRACE */ |
220 | |||
213 | #endif /* __KERNEL__ */ | 221 | #endif /* __KERNEL__ */ |
214 | #endif | 222 | #endif |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 43fc95d822d5..244677cc082b 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
@@ -79,6 +79,10 @@ 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); | ||
82 | }; | 86 | }; |
83 | 87 | ||
84 | struct mpc8xx_pcmcia_ops { | 88 | struct mpc8xx_pcmcia_ops { |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 8a0c2f221e6b..39b95c56587e 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -233,8 +233,6 @@ extern int ftrace_arch_read_dyn_info(char *buf, int size); | |||
233 | 233 | ||
234 | extern int skip_trace(unsigned long ip); | 234 | extern int skip_trace(unsigned long ip); |
235 | 235 | ||
236 | extern void ftrace_release(void *start, unsigned long size); | ||
237 | |||
238 | extern void ftrace_disable_daemon(void); | 236 | extern void ftrace_disable_daemon(void); |
239 | extern void ftrace_enable_daemon(void); | 237 | extern void ftrace_enable_daemon(void); |
240 | #else | 238 | #else |
@@ -325,13 +323,8 @@ static inline void __ftrace_enabled_restore(int enabled) | |||
325 | 323 | ||
326 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | 324 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD |
327 | extern void ftrace_init(void); | 325 | extern void ftrace_init(void); |
328 | extern void ftrace_init_module(struct module *mod, | ||
329 | unsigned long *start, unsigned long *end); | ||
330 | #else | 326 | #else |
331 | static inline void ftrace_init(void) { } | 327 | static inline void ftrace_init(void) { } |
332 | static inline void | ||
333 | ftrace_init_module(struct module *mod, | ||
334 | unsigned long *start, unsigned long *end) { } | ||
335 | #endif | 328 | #endif |
336 | 329 | ||
337 | /* | 330 | /* |
@@ -368,6 +361,7 @@ struct ftrace_ret_stack { | |||
368 | unsigned long ret; | 361 | unsigned long ret; |
369 | unsigned long func; | 362 | unsigned long func; |
370 | unsigned long long calltime; | 363 | unsigned long long calltime; |
364 | unsigned long long subtime; | ||
371 | }; | 365 | }; |
372 | 366 | ||
373 | /* | 367 | /* |
@@ -379,8 +373,6 @@ extern void return_to_handler(void); | |||
379 | 373 | ||
380 | extern int | 374 | extern int |
381 | ftrace_push_return_trace(unsigned long ret, unsigned long func, int *depth); | 375 | ftrace_push_return_trace(unsigned long ret, unsigned long func, int *depth); |
382 | extern void | ||
383 | ftrace_pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret); | ||
384 | 376 | ||
385 | /* | 377 | /* |
386 | * Sometimes we don't want to trace a function with the function | 378 | * Sometimes we don't want to trace a function with the function |
@@ -496,8 +488,15 @@ static inline int test_tsk_trace_graph(struct task_struct *tsk) | |||
496 | 488 | ||
497 | extern int ftrace_dump_on_oops; | 489 | extern int ftrace_dump_on_oops; |
498 | 490 | ||
491 | #ifdef CONFIG_PREEMPT | ||
492 | #define INIT_TRACE_RECURSION .trace_recursion = 0, | ||
493 | #endif | ||
494 | |||
499 | #endif /* CONFIG_TRACING */ | 495 | #endif /* CONFIG_TRACING */ |
500 | 496 | ||
497 | #ifndef INIT_TRACE_RECURSION | ||
498 | #define INIT_TRACE_RECURSION | ||
499 | #endif | ||
501 | 500 | ||
502 | #ifdef CONFIG_HW_BRANCH_TRACER | 501 | #ifdef CONFIG_HW_BRANCH_TRACER |
503 | 502 | ||
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h new file mode 100644 index 000000000000..662c1becf367 --- /dev/null +++ b/include/linux/ftrace_event.h | |||
@@ -0,0 +1,156 @@ | |||
1 | #ifndef _LINUX_FTRACE_EVENT_H | ||
2 | #define _LINUX_FTRACE_EVENT_H | ||
3 | |||
4 | #include <linux/trace_seq.h> | ||
5 | #include <linux/ring_buffer.h> | ||
6 | |||
7 | |||
8 | struct trace_array; | ||
9 | struct tracer; | ||
10 | struct dentry; | ||
11 | |||
12 | /* | ||
13 | * The trace entry - the most basic unit of tracing. This is what | ||
14 | * is printed in the end as a single line in the trace output, such as: | ||
15 | * | ||
16 | * bash-15816 [01] 235.197585: idle_cpu <- irq_enter | ||
17 | */ | ||
18 | struct trace_entry { | ||
19 | unsigned short type; | ||
20 | unsigned char flags; | ||
21 | unsigned char preempt_count; | ||
22 | int pid; | ||
23 | int tgid; | ||
24 | }; | ||
25 | |||
26 | #define FTRACE_MAX_EVENT \ | ||
27 | ((1 << (sizeof(((struct trace_entry *)0)->type) * 8)) - 1) | ||
28 | |||
29 | /* | ||
30 | * Trace iterator - used by printout routines who present trace | ||
31 | * results to users and which routines might sleep, etc: | ||
32 | */ | ||
33 | struct trace_iterator { | ||
34 | struct trace_array *tr; | ||
35 | struct tracer *trace; | ||
36 | void *private; | ||
37 | int cpu_file; | ||
38 | struct mutex mutex; | ||
39 | struct ring_buffer_iter *buffer_iter[NR_CPUS]; | ||
40 | |||
41 | /* The below is zeroed out in pipe_read */ | ||
42 | struct trace_seq seq; | ||
43 | struct trace_entry *ent; | ||
44 | int cpu; | ||
45 | u64 ts; | ||
46 | |||
47 | unsigned long iter_flags; | ||
48 | loff_t pos; | ||
49 | long idx; | ||
50 | |||
51 | cpumask_var_t started; | ||
52 | }; | ||
53 | |||
54 | |||
55 | typedef enum print_line_t (*trace_print_func)(struct trace_iterator *iter, | ||
56 | int flags); | ||
57 | struct trace_event { | ||
58 | struct hlist_node node; | ||
59 | struct list_head list; | ||
60 | int type; | ||
61 | trace_print_func trace; | ||
62 | trace_print_func raw; | ||
63 | trace_print_func hex; | ||
64 | trace_print_func binary; | ||
65 | }; | ||
66 | |||
67 | extern int register_ftrace_event(struct trace_event *event); | ||
68 | extern int unregister_ftrace_event(struct trace_event *event); | ||
69 | |||
70 | /* Return values for print_line callback */ | ||
71 | enum print_line_t { | ||
72 | TRACE_TYPE_PARTIAL_LINE = 0, /* Retry after flushing the seq */ | ||
73 | TRACE_TYPE_HANDLED = 1, | ||
74 | TRACE_TYPE_UNHANDLED = 2, /* Relay to other output functions */ | ||
75 | TRACE_TYPE_NO_CONSUME = 3 /* Handled but ask to not consume */ | ||
76 | }; | ||
77 | |||
78 | |||
79 | struct ring_buffer_event * | ||
80 | trace_current_buffer_lock_reserve(int type, unsigned long len, | ||
81 | unsigned long flags, int pc); | ||
82 | void trace_current_buffer_unlock_commit(struct ring_buffer_event *event, | ||
83 | unsigned long flags, int pc); | ||
84 | void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event, | ||
85 | unsigned long flags, int pc); | ||
86 | void trace_current_buffer_discard_commit(struct ring_buffer_event *event); | ||
87 | |||
88 | void tracing_record_cmdline(struct task_struct *tsk); | ||
89 | |||
90 | struct ftrace_event_call { | ||
91 | struct list_head list; | ||
92 | char *name; | ||
93 | char *system; | ||
94 | struct dentry *dir; | ||
95 | struct trace_event *event; | ||
96 | int enabled; | ||
97 | int (*regfunc)(void); | ||
98 | void (*unregfunc)(void); | ||
99 | int id; | ||
100 | int (*raw_init)(void); | ||
101 | int (*show_format)(struct trace_seq *s); | ||
102 | int (*define_fields)(void); | ||
103 | struct list_head fields; | ||
104 | int filter_active; | ||
105 | void *filter; | ||
106 | void *mod; | ||
107 | |||
108 | #ifdef CONFIG_EVENT_PROFILE | ||
109 | atomic_t profile_count; | ||
110 | int (*profile_enable)(struct ftrace_event_call *); | ||
111 | void (*profile_disable)(struct ftrace_event_call *); | ||
112 | #endif | ||
113 | }; | ||
114 | |||
115 | #define MAX_FILTER_PRED 32 | ||
116 | #define MAX_FILTER_STR_VAL 128 | ||
117 | |||
118 | extern int init_preds(struct ftrace_event_call *call); | ||
119 | extern void destroy_preds(struct ftrace_event_call *call); | ||
120 | extern int filter_match_preds(struct ftrace_event_call *call, void *rec); | ||
121 | extern int filter_current_check_discard(struct ftrace_event_call *call, | ||
122 | void *rec, | ||
123 | struct ring_buffer_event *event); | ||
124 | |||
125 | extern int trace_define_field(struct ftrace_event_call *call, char *type, | ||
126 | char *name, int offset, int size, int is_signed); | ||
127 | |||
128 | #define is_signed_type(type) (((type)(-1)) < 0) | ||
129 | |||
130 | /* | ||
131 | * The double __builtin_constant_p is because gcc will give us an error | ||
132 | * if we try to allocate the static variable to fmt if it is not a | ||
133 | * constant. Even with the outer if statement optimizing out. | ||
134 | */ | ||
135 | #define event_trace_printk(ip, fmt, args...) \ | ||
136 | do { \ | ||
137 | __trace_printk_check_format(fmt, ##args); \ | ||
138 | tracing_record_cmdline(current); \ | ||
139 | if (__builtin_constant_p(fmt)) { \ | ||
140 | static const char *trace_printk_fmt \ | ||
141 | __attribute__((section("__trace_printk_fmt"))) = \ | ||
142 | __builtin_constant_p(fmt) ? fmt : NULL; \ | ||
143 | \ | ||
144 | __trace_bprintk(ip, trace_printk_fmt, ##args); \ | ||
145 | } else \ | ||
146 | __trace_printk(ip, fmt, ##args); \ | ||
147 | } while (0) | ||
148 | |||
149 | #define __common_field(type, item, is_signed) \ | ||
150 | ret = trace_define_field(event_call, #type, "common_" #item, \ | ||
151 | offsetof(typeof(field.ent), item), \ | ||
152 | sizeof(field.ent.item), is_signed); \ | ||
153 | if (ret) \ | ||
154 | return ret; | ||
155 | |||
156 | #endif /* _LINUX_FTRACE_EVENT_H */ | ||
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 634c53028fb8..a1a28caed23d 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -214,6 +214,7 @@ static inline void disk_put_part(struct hd_struct *part) | |||
214 | #define DISK_PITER_REVERSE (1 << 0) /* iterate in the reverse direction */ | 214 | #define DISK_PITER_REVERSE (1 << 0) /* iterate in the reverse direction */ |
215 | #define DISK_PITER_INCL_EMPTY (1 << 1) /* include 0-sized parts */ | 215 | #define DISK_PITER_INCL_EMPTY (1 << 1) /* include 0-sized parts */ |
216 | #define DISK_PITER_INCL_PART0 (1 << 2) /* include partition 0 */ | 216 | #define DISK_PITER_INCL_PART0 (1 << 2) /* include partition 0 */ |
217 | #define DISK_PITER_INCL_EMPTY_PART0 (1 << 3) /* include empty partition 0 */ | ||
217 | 218 | ||
218 | struct disk_part_iter { | 219 | struct disk_part_iter { |
219 | struct gendisk *disk; | 220 | struct gendisk *disk; |
diff --git a/include/linux/init.h b/include/linux/init.h index f121a7a10c3d..0e06c176f185 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -2,6 +2,8 @@ | |||
2 | #define _LINUX_INIT_H | 2 | #define _LINUX_INIT_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/section-names.h> | ||
6 | #include <linux/stringify.h> | ||
5 | 7 | ||
6 | /* These macros are used to mark some functions or | 8 | /* These macros are used to mark some functions or |
7 | * initialized data (doesn't apply to uninitialized data) | 9 | * initialized data (doesn't apply to uninitialized data) |
@@ -60,14 +62,6 @@ | |||
60 | #define __refdata __section(.ref.data) | 62 | #define __refdata __section(.ref.data) |
61 | #define __refconst __section(.ref.rodata) | 63 | #define __refconst __section(.ref.rodata) |
62 | 64 | ||
63 | /* backward compatibility note | ||
64 | * A few places hardcode the old section names: | ||
65 | * .text.init.refok | ||
66 | * .data.init.refok | ||
67 | * .exit.text.refok | ||
68 | * They should be converted to use the defines from this file | ||
69 | */ | ||
70 | |||
71 | /* compatibility defines */ | 65 | /* compatibility defines */ |
72 | #define __init_refok __ref | 66 | #define __init_refok __ref |
73 | #define __initdata_refok __refdata | 67 | #define __initdata_refok __refdata |
@@ -107,7 +101,7 @@ | |||
107 | #define __memexitconst __section(.memexit.rodata) | 101 | #define __memexitconst __section(.memexit.rodata) |
108 | 102 | ||
109 | /* For assembly routines */ | 103 | /* For assembly routines */ |
110 | #define __HEAD .section ".head.text","ax" | 104 | #define __HEAD .section __stringify(HEAD_TEXT_SECTION),"ax" |
111 | #define __INIT .section ".init.text","ax" | 105 | #define __INIT .section ".init.text","ax" |
112 | #define __FINIT .previous | 106 | #define __FINIT .previous |
113 | 107 | ||
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index d87247d2641f..889bf99eca6d 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -174,6 +174,7 @@ extern struct cred init_cred; | |||
174 | INIT_TRACE_IRQFLAGS \ | 174 | INIT_TRACE_IRQFLAGS \ |
175 | INIT_LOCKDEP \ | 175 | INIT_LOCKDEP \ |
176 | INIT_FTRACE_GRAPH \ | 176 | INIT_FTRACE_GRAPH \ |
177 | INIT_TRACE_RECURSION \ | ||
177 | } | 178 | } |
178 | 179 | ||
179 | 180 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index 6b28048fc568..0e6ff5de3588 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -106,6 +106,7 @@ struct input_absinfo { | |||
106 | 106 | ||
107 | #define SYN_REPORT 0 | 107 | #define SYN_REPORT 0 |
108 | #define SYN_CONFIG 1 | 108 | #define SYN_CONFIG 1 |
109 | #define SYN_MT_REPORT 2 | ||
109 | 110 | ||
110 | /* | 111 | /* |
111 | * Keys and buttons | 112 | * Keys and buttons |
@@ -445,6 +446,7 @@ struct input_absinfo { | |||
445 | #define BTN_STYLUS2 0x14c | 446 | #define BTN_STYLUS2 0x14c |
446 | #define BTN_TOOL_DOUBLETAP 0x14d | 447 | #define BTN_TOOL_DOUBLETAP 0x14d |
447 | #define BTN_TOOL_TRIPLETAP 0x14e | 448 | #define BTN_TOOL_TRIPLETAP 0x14e |
449 | #define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ | ||
448 | 450 | ||
449 | #define BTN_WHEEL 0x150 | 451 | #define BTN_WHEEL 0x150 |
450 | #define BTN_GEAR_DOWN 0x150 | 452 | #define BTN_GEAR_DOWN 0x150 |
@@ -644,6 +646,17 @@ struct input_absinfo { | |||
644 | #define ABS_TOOL_WIDTH 0x1c | 646 | #define ABS_TOOL_WIDTH 0x1c |
645 | #define ABS_VOLUME 0x20 | 647 | #define ABS_VOLUME 0x20 |
646 | #define ABS_MISC 0x28 | 648 | #define ABS_MISC 0x28 |
649 | |||
650 | #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ | ||
651 | #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ | ||
652 | #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ | ||
653 | #define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ | ||
654 | #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ | ||
655 | #define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */ | ||
656 | #define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */ | ||
657 | #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ | ||
658 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ | ||
659 | |||
647 | #define ABS_MAX 0x3f | 660 | #define ABS_MAX 0x3f |
648 | #define ABS_CNT (ABS_MAX+1) | 661 | #define ABS_CNT (ABS_MAX+1) |
649 | 662 | ||
@@ -743,6 +756,12 @@ struct input_absinfo { | |||
743 | #define BUS_ATARI 0x1B | 756 | #define BUS_ATARI 0x1B |
744 | 757 | ||
745 | /* | 758 | /* |
759 | * MT_TOOL types | ||
760 | */ | ||
761 | #define MT_TOOL_FINGER 0 | ||
762 | #define MT_TOOL_PEN 1 | ||
763 | |||
764 | /* | ||
746 | * Values describing the status of a force-feedback effect | 765 | * Values describing the status of a force-feedback effect |
747 | */ | 766 | */ |
748 | #define FF_STATUS_STOPPED 0x00 | 767 | #define FF_STATUS_STOPPED 0x00 |
@@ -1311,6 +1330,11 @@ static inline void input_sync(struct input_dev *dev) | |||
1311 | input_event(dev, EV_SYN, SYN_REPORT, 0); | 1330 | input_event(dev, EV_SYN, SYN_REPORT, 0); |
1312 | } | 1331 | } |
1313 | 1332 | ||
1333 | static inline void input_mt_sync(struct input_dev *dev) | ||
1334 | { | ||
1335 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); | ||
1336 | } | ||
1337 | |||
1314 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); | 1338 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); |
1315 | 1339 | ||
1316 | static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) | 1340 | static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 53ae4399da2d..c2049a04fa0b 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -978,7 +978,8 @@ extern void journal_destroy_revoke(journal_t *); | |||
978 | extern int journal_revoke (handle_t *, | 978 | extern int journal_revoke (handle_t *, |
979 | unsigned long, struct buffer_head *); | 979 | unsigned long, struct buffer_head *); |
980 | extern int journal_cancel_revoke(handle_t *, struct journal_head *); | 980 | extern int journal_cancel_revoke(handle_t *, struct journal_head *); |
981 | extern void journal_write_revoke_records(journal_t *, transaction_t *); | 981 | extern void journal_write_revoke_records(journal_t *, |
982 | transaction_t *, int); | ||
982 | 983 | ||
983 | /* Recovery revoke support */ | 984 | /* Recovery revoke support */ |
984 | extern int journal_set_revoke(journal_t *, unsigned long, tid_t); | 985 | extern int journal_set_revoke(journal_t *, unsigned long, tid_t); |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 8815a3456b3b..cc02393bfce8 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -1193,7 +1193,8 @@ extern int jbd2_journal_init_revoke_caches(void); | |||
1193 | extern void jbd2_journal_destroy_revoke(journal_t *); | 1193 | extern void jbd2_journal_destroy_revoke(journal_t *); |
1194 | extern int jbd2_journal_revoke (handle_t *, unsigned long long, struct buffer_head *); | 1194 | extern int jbd2_journal_revoke (handle_t *, unsigned long long, struct buffer_head *); |
1195 | extern int jbd2_journal_cancel_revoke(handle_t *, struct journal_head *); | 1195 | extern int jbd2_journal_cancel_revoke(handle_t *, struct journal_head *); |
1196 | extern void jbd2_journal_write_revoke_records(journal_t *, transaction_t *); | 1196 | extern void jbd2_journal_write_revoke_records(journal_t *, |
1197 | transaction_t *, int); | ||
1197 | 1198 | ||
1198 | /* Recovery revoke support */ | 1199 | /* Recovery revoke support */ |
1199 | extern int jbd2_journal_set_revoke(journal_t *, unsigned long long, tid_t); | 1200 | extern int jbd2_journal_set_revoke(journal_t *, unsigned long long, tid_t); |
diff --git a/include/linux/kmemtrace.h b/include/linux/kmemtrace.h new file mode 100644 index 000000000000..b616d3930c3b --- /dev/null +++ b/include/linux/kmemtrace.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Eduard - Gabriel Munteanu | ||
3 | * | ||
4 | * This file is released under GPL version 2. | ||
5 | */ | ||
6 | |||
7 | #ifndef _LINUX_KMEMTRACE_H | ||
8 | #define _LINUX_KMEMTRACE_H | ||
9 | |||
10 | #ifdef __KERNEL__ | ||
11 | |||
12 | #include <trace/events/kmem.h> | ||
13 | |||
14 | #ifdef CONFIG_KMEMTRACE | ||
15 | extern void kmemtrace_init(void); | ||
16 | #else | ||
17 | static inline void kmemtrace_init(void) | ||
18 | { | ||
19 | } | ||
20 | #endif | ||
21 | |||
22 | #endif /* __KERNEL__ */ | ||
23 | |||
24 | #endif /* _LINUX_KMEMTRACE_H */ | ||
25 | |||
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 311a073afe8a..8cc137911b34 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -409,6 +409,8 @@ struct kvm_trace_rec { | |||
409 | #ifdef __KVM_HAVE_DEVICE_ASSIGNMENT | 409 | #ifdef __KVM_HAVE_DEVICE_ASSIGNMENT |
410 | #define KVM_CAP_DEVICE_DEASSIGNMENT 27 | 410 | #define KVM_CAP_DEVICE_DEASSIGNMENT 27 |
411 | #endif | 411 | #endif |
412 | /* Another bug in KVM_SET_USER_MEMORY_REGION fixed: */ | ||
413 | #define KVM_CAP_JOIN_MEMORY_REGIONS_WORKS 30 | ||
412 | 414 | ||
413 | #ifdef KVM_CAP_IRQ_ROUTING | 415 | #ifdef KVM_CAP_IRQ_ROUTING |
414 | 416 | ||
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index a9e3b76aa884..25b9ca93d232 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -56,7 +56,7 @@ extern void mem_cgroup_move_lists(struct page *page, | |||
56 | enum lru_list from, enum lru_list to); | 56 | enum lru_list from, enum lru_list to); |
57 | extern void mem_cgroup_uncharge_page(struct page *page); | 57 | extern void mem_cgroup_uncharge_page(struct page *page); |
58 | extern void mem_cgroup_uncharge_cache_page(struct page *page); | 58 | extern void mem_cgroup_uncharge_cache_page(struct page *page); |
59 | extern int mem_cgroup_shrink_usage(struct page *page, | 59 | extern int mem_cgroup_shmem_charge_fallback(struct page *page, |
60 | struct mm_struct *mm, gfp_t gfp_mask); | 60 | struct mm_struct *mm, gfp_t gfp_mask); |
61 | 61 | ||
62 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | 62 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, |
@@ -155,7 +155,7 @@ static inline void mem_cgroup_uncharge_cache_page(struct page *page) | |||
155 | { | 155 | { |
156 | } | 156 | } |
157 | 157 | ||
158 | static inline int mem_cgroup_shrink_usage(struct page *page, | 158 | static inline int mem_cgroup_shmem_charge_fallback(struct page *page, |
159 | struct mm_struct *mm, gfp_t gfp_mask) | 159 | struct mm_struct *mm, gfp_t gfp_mask) |
160 | { | 160 | { |
161 | return 0; | 161 | return 0; |
diff --git a/include/linux/mman.h b/include/linux/mman.h index 30d1073bac3b..9872d6ca58ae 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
@@ -12,21 +12,18 @@ | |||
12 | 12 | ||
13 | #ifdef __KERNEL__ | 13 | #ifdef __KERNEL__ |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/percpu_counter.h> | ||
15 | 16 | ||
16 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
17 | 18 | ||
18 | extern int sysctl_overcommit_memory; | 19 | extern int sysctl_overcommit_memory; |
19 | extern int sysctl_overcommit_ratio; | 20 | extern int sysctl_overcommit_ratio; |
20 | extern atomic_long_t vm_committed_space; | 21 | extern struct percpu_counter vm_committed_as; |
21 | 22 | ||
22 | #ifdef CONFIG_SMP | ||
23 | extern void vm_acct_memory(long pages); | ||
24 | #else | ||
25 | static inline void vm_acct_memory(long pages) | 23 | static inline void vm_acct_memory(long pages) |
26 | { | 24 | { |
27 | atomic_long_add(pages, &vm_committed_space); | 25 | percpu_counter_add(&vm_committed_as, pages); |
28 | } | 26 | } |
29 | #endif | ||
30 | 27 | ||
31 | static inline void vm_unacct_memory(long pages) | 28 | static inline void vm_unacct_memory(long pages) |
32 | { | 29 | { |
diff --git a/include/linux/mmiotrace.h b/include/linux/mmiotrace.h index 3d1b7bde1283..97491f78b08c 100644 --- a/include/linux/mmiotrace.h +++ b/include/linux/mmiotrace.h | |||
@@ -30,6 +30,8 @@ extern unsigned int kmmio_count; | |||
30 | 30 | ||
31 | extern int register_kmmio_probe(struct kmmio_probe *p); | 31 | extern int register_kmmio_probe(struct kmmio_probe *p); |
32 | extern void unregister_kmmio_probe(struct kmmio_probe *p); | 32 | extern void unregister_kmmio_probe(struct kmmio_probe *p); |
33 | extern int kmmio_init(void); | ||
34 | extern void kmmio_cleanup(void); | ||
33 | 35 | ||
34 | #ifdef CONFIG_MMIOTRACE | 36 | #ifdef CONFIG_MMIOTRACE |
35 | /* kmmio is active by some kmmio_probes? */ | 37 | /* kmmio is active by some kmmio_probes? */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 627ac082e2a6..a8f2c0aa4c32 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -337,6 +337,14 @@ struct module | |||
337 | const char **trace_bprintk_fmt_start; | 337 | const char **trace_bprintk_fmt_start; |
338 | unsigned int num_trace_bprintk_fmt; | 338 | unsigned int num_trace_bprintk_fmt; |
339 | #endif | 339 | #endif |
340 | #ifdef CONFIG_EVENT_TRACING | ||
341 | struct ftrace_event_call *trace_events; | ||
342 | unsigned int num_trace_events; | ||
343 | #endif | ||
344 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | ||
345 | unsigned long *ftrace_callsites; | ||
346 | unsigned int num_ftrace_callsites; | ||
347 | #endif | ||
340 | 348 | ||
341 | #ifdef CONFIG_MODULE_UNLOAD | 349 | #ifdef CONFIG_MODULE_UNLOAD |
342 | /* What modules depend on me? */ | 350 | /* What modules depend on me? */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 2e7783f4a755..5a96a1a406e9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -104,7 +104,7 @@ struct wireless_dev; | |||
104 | # else | 104 | # else |
105 | # define LL_MAX_HEADER 96 | 105 | # define LL_MAX_HEADER 96 |
106 | # endif | 106 | # endif |
107 | #elif defined(CONFIG_TR) | 107 | #elif defined(CONFIG_TR) || defined(CONFIG_TR_MODULE) |
108 | # define LL_MAX_HEADER 48 | 108 | # define LL_MAX_HEADER 48 |
109 | #else | 109 | #else |
110 | # define LL_MAX_HEADER 32 | 110 | # define LL_MAX_HEADER 32 |
@@ -500,7 +500,7 @@ struct netdev_queue { | |||
500 | * | 500 | * |
501 | * int (*ndo_set_mac_address)(struct net_device *dev, void *addr); | 501 | * int (*ndo_set_mac_address)(struct net_device *dev, void *addr); |
502 | * This function is called when the Media Access Control address | 502 | * This function is called when the Media Access Control address |
503 | * needs to be changed. If not this interface is not defined, the | 503 | * needs to be changed. If this interface is not defined, the |
504 | * mac address can not be changed. | 504 | * mac address can not be changed. |
505 | * | 505 | * |
506 | * int (*ndo_validate_addr)(struct net_device *dev); | 506 | * int (*ndo_validate_addr)(struct net_device *dev); |
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h index 29fe9ea1d346..1a865e48b8eb 100644 --- a/include/linux/netfilter/nfnetlink_conntrack.h +++ b/include/linux/netfilter/nfnetlink_conntrack.h | |||
@@ -100,6 +100,7 @@ enum ctattr_protoinfo_tcp { | |||
100 | enum ctattr_protoinfo_dccp { | 100 | enum ctattr_protoinfo_dccp { |
101 | CTA_PROTOINFO_DCCP_UNSPEC, | 101 | CTA_PROTOINFO_DCCP_UNSPEC, |
102 | CTA_PROTOINFO_DCCP_STATE, | 102 | CTA_PROTOINFO_DCCP_STATE, |
103 | CTA_PROTOINFO_DCCP_ROLE, | ||
103 | __CTA_PROTOINFO_DCCP_MAX, | 104 | __CTA_PROTOINFO_DCCP_MAX, |
104 | }; | 105 | }; |
105 | #define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) | 106 | #define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 7b1a652066c0..c9efe039dc57 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -354,9 +354,6 @@ struct xt_table | |||
354 | /* What hooks you will enter on */ | 354 | /* What hooks you will enter on */ |
355 | unsigned int valid_hooks; | 355 | unsigned int valid_hooks; |
356 | 356 | ||
357 | /* Lock for the curtain */ | ||
358 | struct mutex lock; | ||
359 | |||
360 | /* Man behind the curtain... */ | 357 | /* Man behind the curtain... */ |
361 | struct xt_table_info *private; | 358 | struct xt_table_info *private; |
362 | 359 | ||
@@ -434,8 +431,74 @@ extern void xt_proto_fini(struct net *net, u_int8_t af); | |||
434 | 431 | ||
435 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); | 432 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); |
436 | extern void xt_free_table_info(struct xt_table_info *info); | 433 | extern void xt_free_table_info(struct xt_table_info *info); |
437 | extern void xt_table_entry_swap_rcu(struct xt_table_info *old, | 434 | |
438 | struct xt_table_info *new); | 435 | /* |
436 | * Per-CPU spinlock associated with per-cpu table entries, and | ||
437 | * with a counter for the "reading" side that allows a recursive | ||
438 | * reader to avoid taking the lock and deadlocking. | ||
439 | * | ||
440 | * "reading" is used by ip/arp/ip6 tables rule processing which runs per-cpu. | ||
441 | * It needs to ensure that the rules are not being changed while the packet | ||
442 | * is being processed. In some cases, the read lock will be acquired | ||
443 | * twice on the same CPU; this is okay because of the count. | ||
444 | * | ||
445 | * "writing" is used when reading counters. | ||
446 | * During replace any readers that are using the old tables have to complete | ||
447 | * before freeing the old table. This is handled by the write locking | ||
448 | * necessary for reading the counters. | ||
449 | */ | ||
450 | struct xt_info_lock { | ||
451 | spinlock_t lock; | ||
452 | unsigned char readers; | ||
453 | }; | ||
454 | DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks); | ||
455 | |||
456 | /* | ||
457 | * Note: we need to ensure that preemption is disabled before acquiring | ||
458 | * the per-cpu-variable, so we do it as a two step process rather than | ||
459 | * using "spin_lock_bh()". | ||
460 | * | ||
461 | * We _also_ need to disable bottom half processing before updating our | ||
462 | * nesting count, to make sure that the only kind of re-entrancy is this | ||
463 | * code being called by itself: since the count+lock is not an atomic | ||
464 | * operation, we can allow no races. | ||
465 | * | ||
466 | * _Only_ that special combination of being per-cpu and never getting | ||
467 | * re-entered asynchronously means that the count is safe. | ||
468 | */ | ||
469 | static inline void xt_info_rdlock_bh(void) | ||
470 | { | ||
471 | struct xt_info_lock *lock; | ||
472 | |||
473 | local_bh_disable(); | ||
474 | lock = &__get_cpu_var(xt_info_locks); | ||
475 | if (likely(!lock->readers++)) | ||
476 | spin_lock(&lock->lock); | ||
477 | } | ||
478 | |||
479 | static inline void xt_info_rdunlock_bh(void) | ||
480 | { | ||
481 | struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); | ||
482 | |||
483 | if (likely(!--lock->readers)) | ||
484 | spin_unlock(&lock->lock); | ||
485 | local_bh_enable(); | ||
486 | } | ||
487 | |||
488 | /* | ||
489 | * The "writer" side needs to get exclusive access to the lock, | ||
490 | * regardless of readers. This must be called with bottom half | ||
491 | * processing (and thus also preemption) disabled. | ||
492 | */ | ||
493 | static inline void xt_info_wrlock(unsigned int cpu) | ||
494 | { | ||
495 | spin_lock(&per_cpu(xt_info_locks, cpu).lock); | ||
496 | } | ||
497 | |||
498 | static inline void xt_info_wrunlock(unsigned int cpu) | ||
499 | { | ||
500 | spin_unlock(&per_cpu(xt_info_locks, cpu).lock); | ||
501 | } | ||
439 | 502 | ||
440 | /* | 503 | /* |
441 | * This helper is performance critical and must be inlined | 504 | * This helper is performance critical and must be inlined |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 3d327b67d7e2..908406651330 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -51,6 +51,16 @@ extern int of_register_driver(struct of_platform_driver *drv, | |||
51 | struct bus_type *bus); | 51 | struct bus_type *bus); |
52 | extern void of_unregister_driver(struct of_platform_driver *drv); | 52 | extern void of_unregister_driver(struct of_platform_driver *drv); |
53 | 53 | ||
54 | /* Platform drivers register/unregister */ | ||
55 | static inline int of_register_platform_driver(struct of_platform_driver *drv) | ||
56 | { | ||
57 | return of_register_driver(drv, &of_platform_bus_type); | ||
58 | } | ||
59 | static inline void of_unregister_platform_driver(struct of_platform_driver *drv) | ||
60 | { | ||
61 | of_unregister_driver(drv); | ||
62 | } | ||
63 | |||
54 | #include <asm/of_platform.h> | 64 | #include <asm/of_platform.h> |
55 | 65 | ||
56 | extern struct of_device *of_find_device_by_node(struct device_node *np); | 66 | extern struct of_device *of_find_device_by_node(struct device_node *np); |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index e4d08c1b2e0b..616bf8b3c8b5 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -376,6 +376,7 @@ | |||
376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ | 376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ |
377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ | 377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ |
378 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ | 378 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ |
379 | #define PCI_EXP_TYPE_RC_EC 0x10 /* Root Complex Event Collector */ | ||
379 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ | 380 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ |
380 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ | 381 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ |
381 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ | 382 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ |
diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index 04b4d7330e6d..d745f5b6c7b0 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h | |||
@@ -113,6 +113,7 @@ struct pkt_ctrl_command { | |||
113 | #include <linux/cdrom.h> | 113 | #include <linux/cdrom.h> |
114 | #include <linux/kobject.h> | 114 | #include <linux/kobject.h> |
115 | #include <linux/sysfs.h> | 115 | #include <linux/sysfs.h> |
116 | #include <linux/mempool.h> | ||
116 | 117 | ||
117 | /* default bio write queue congestion marks */ | 118 | /* default bio write queue congestion marks */ |
118 | #define PKT_WRITE_CONGESTION_ON 10000 | 119 | #define PKT_WRITE_CONGESTION_ON 10000 |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 4848d8dacd90..225f733e7533 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -50,6 +50,7 @@ enum regulator_status { | |||
50 | * @set_current_limit: Configure a limit for a current-limited regulator. | 50 | * @set_current_limit: Configure a limit for a current-limited regulator. |
51 | * @get_current_limit: Get the configured limit for a current-limited regulator. | 51 | * @get_current_limit: Get the configured limit for a current-limited regulator. |
52 | * | 52 | * |
53 | * @set_mode: Set the configured operating mode for the regulator. | ||
53 | * @get_mode: Get the configured operating mode for the regulator. | 54 | * @get_mode: Get the configured operating mode for the regulator. |
54 | * @get_status: Return actual (not as-configured) status of regulator, as a | 55 | * @get_status: Return actual (not as-configured) status of regulator, as a |
55 | * REGULATOR_STATUS value (or negative errno) | 56 | * REGULATOR_STATUS value (or negative errno) |
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index e1b7b2173885..f1345828c7c5 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
@@ -11,7 +11,7 @@ struct ring_buffer_iter; | |||
11 | * Don't refer to this struct directly, use functions below. | 11 | * Don't refer to this struct directly, use functions below. |
12 | */ | 12 | */ |
13 | struct ring_buffer_event { | 13 | struct ring_buffer_event { |
14 | u32 type:2, len:3, time_delta:27; | 14 | u32 type_len:5, time_delta:27; |
15 | u32 array[]; | 15 | u32 array[]; |
16 | }; | 16 | }; |
17 | 17 | ||
@@ -24,7 +24,8 @@ struct ring_buffer_event { | |||
24 | * size is variable depending on how much | 24 | * size is variable depending on how much |
25 | * padding is needed | 25 | * padding is needed |
26 | * If time_delta is non zero: | 26 | * If time_delta is non zero: |
27 | * everything else same as RINGBUF_TYPE_DATA | 27 | * array[0] holds the actual length |
28 | * size = 4 + length (bytes) | ||
28 | * | 29 | * |
29 | * @RINGBUF_TYPE_TIME_EXTEND: Extend the time delta | 30 | * @RINGBUF_TYPE_TIME_EXTEND: Extend the time delta |
30 | * array[0] = time delta (28 .. 59) | 31 | * array[0] = time delta (28 .. 59) |
@@ -35,22 +36,23 @@ struct ring_buffer_event { | |||
35 | * array[1..2] = tv_sec | 36 | * array[1..2] = tv_sec |
36 | * size = 16 bytes | 37 | * size = 16 bytes |
37 | * | 38 | * |
38 | * @RINGBUF_TYPE_DATA: Data record | 39 | * <= @RINGBUF_TYPE_DATA_TYPE_LEN_MAX: |
39 | * If len is zero: | 40 | * Data record |
41 | * If type_len is zero: | ||
40 | * array[0] holds the actual length | 42 | * array[0] holds the actual length |
41 | * array[1..(length+3)/4] holds data | 43 | * array[1..(length+3)/4] holds data |
42 | * size = 4 + 4 + length (bytes) | 44 | * size = 4 + length (bytes) |
43 | * else | 45 | * else |
44 | * length = len << 2 | 46 | * length = type_len << 2 |
45 | * array[0..(length+3)/4-1] holds data | 47 | * array[0..(length+3)/4-1] holds data |
46 | * size = 4 + length (bytes) | 48 | * size = 4 + length (bytes) |
47 | */ | 49 | */ |
48 | enum ring_buffer_type { | 50 | enum ring_buffer_type { |
51 | RINGBUF_TYPE_DATA_TYPE_LEN_MAX = 28, | ||
49 | RINGBUF_TYPE_PADDING, | 52 | RINGBUF_TYPE_PADDING, |
50 | RINGBUF_TYPE_TIME_EXTEND, | 53 | RINGBUF_TYPE_TIME_EXTEND, |
51 | /* FIXME: RINGBUF_TYPE_TIME_STAMP not implemented */ | 54 | /* FIXME: RINGBUF_TYPE_TIME_STAMP not implemented */ |
52 | RINGBUF_TYPE_TIME_STAMP, | 55 | RINGBUF_TYPE_TIME_STAMP, |
53 | RINGBUF_TYPE_DATA, | ||
54 | }; | 56 | }; |
55 | 57 | ||
56 | unsigned ring_buffer_event_length(struct ring_buffer_event *event); | 58 | unsigned ring_buffer_event_length(struct ring_buffer_event *event); |
@@ -68,9 +70,38 @@ ring_buffer_event_time_delta(struct ring_buffer_event *event) | |||
68 | return event->time_delta; | 70 | return event->time_delta; |
69 | } | 71 | } |
70 | 72 | ||
73 | /* | ||
74 | * ring_buffer_event_discard can discard any event in the ring buffer. | ||
75 | * it is up to the caller to protect against a reader from | ||
76 | * consuming it or a writer from wrapping and replacing it. | ||
77 | * | ||
78 | * No external protection is needed if this is called before | ||
79 | * the event is commited. But in that case it would be better to | ||
80 | * use ring_buffer_discard_commit. | ||
81 | * | ||
82 | * Note, if an event that has not been committed is discarded | ||
83 | * with ring_buffer_event_discard, it must still be committed. | ||
84 | */ | ||
71 | void ring_buffer_event_discard(struct ring_buffer_event *event); | 85 | void ring_buffer_event_discard(struct ring_buffer_event *event); |
72 | 86 | ||
73 | /* | 87 | /* |
88 | * ring_buffer_discard_commit will remove an event that has not | ||
89 | * ben committed yet. If this is used, then ring_buffer_unlock_commit | ||
90 | * must not be called on the discarded event. This function | ||
91 | * will try to remove the event from the ring buffer completely | ||
92 | * if another event has not been written after it. | ||
93 | * | ||
94 | * Example use: | ||
95 | * | ||
96 | * if (some_condition) | ||
97 | * ring_buffer_discard_commit(buffer, event); | ||
98 | * else | ||
99 | * ring_buffer_unlock_commit(buffer, event); | ||
100 | */ | ||
101 | void ring_buffer_discard_commit(struct ring_buffer *buffer, | ||
102 | struct ring_buffer_event *event); | ||
103 | |||
104 | /* | ||
74 | * size is in bytes for each per CPU buffer. | 105 | * size is in bytes for each per CPU buffer. |
75 | */ | 106 | */ |
76 | struct ring_buffer * | 107 | struct ring_buffer * |
@@ -122,6 +153,8 @@ unsigned long ring_buffer_entries(struct ring_buffer *buffer); | |||
122 | unsigned long ring_buffer_overruns(struct ring_buffer *buffer); | 153 | unsigned long ring_buffer_overruns(struct ring_buffer *buffer); |
123 | unsigned long ring_buffer_entries_cpu(struct ring_buffer *buffer, int cpu); | 154 | unsigned long ring_buffer_entries_cpu(struct ring_buffer *buffer, int cpu); |
124 | unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu); | 155 | unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu); |
156 | unsigned long ring_buffer_commit_overrun_cpu(struct ring_buffer *buffer, int cpu); | ||
157 | unsigned long ring_buffer_nmi_dropped_cpu(struct ring_buffer *buffer, int cpu); | ||
125 | 158 | ||
126 | u64 ring_buffer_time_stamp(struct ring_buffer *buffer, int cpu); | 159 | u64 ring_buffer_time_stamp(struct ring_buffer *buffer, int cpu); |
127 | void ring_buffer_normalize_time_stamp(struct ring_buffer *buffer, | 160 | void ring_buffer_normalize_time_stamp(struct ring_buffer *buffer, |
@@ -137,6 +170,11 @@ void ring_buffer_free_read_page(struct ring_buffer *buffer, void *data); | |||
137 | int ring_buffer_read_page(struct ring_buffer *buffer, void **data_page, | 170 | int ring_buffer_read_page(struct ring_buffer *buffer, void **data_page, |
138 | size_t len, int cpu, int full); | 171 | size_t len, int cpu, int full); |
139 | 172 | ||
173 | struct trace_seq; | ||
174 | |||
175 | int ring_buffer_print_entry_header(struct trace_seq *s); | ||
176 | int ring_buffer_print_page_header(struct trace_seq *s); | ||
177 | |||
140 | enum ring_buffer_flags { | 178 | enum ring_buffer_flags { |
141 | RB_FL_OVERWRITE = 1 << 0, | 179 | RB_FL_OVERWRITE = 1 << 0, |
142 | }; | 180 | }; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index f4e3985c8593..1ed4ef520680 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1421,7 +1421,9 @@ struct task_struct { | |||
1421 | #ifdef CONFIG_TRACING | 1421 | #ifdef CONFIG_TRACING |
1422 | /* state flags for use by tracers */ | 1422 | /* state flags for use by tracers */ |
1423 | unsigned long trace; | 1423 | unsigned long trace; |
1424 | #endif | 1424 | /* bitmask of trace recursion */ |
1425 | unsigned long trace_recursion; | ||
1426 | #endif /* CONFIG_TRACING */ | ||
1425 | }; | 1427 | }; |
1426 | 1428 | ||
1427 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ | 1429 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ |
diff --git a/include/linux/section-names.h b/include/linux/section-names.h new file mode 100644 index 000000000000..c956f4eb2adf --- /dev/null +++ b/include/linux/section-names.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __LINUX_SECTION_NAMES_H | ||
2 | #define __LINUX_SECTION_NAMES_H | ||
3 | |||
4 | #define HEAD_TEXT_SECTION .head.text | ||
5 | |||
6 | #endif /* !__LINUX_SECTION_NAMES_H */ | ||
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 5ac9b0bcaf9a..713f841ecaa9 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <asm/page.h> /* kmalloc_sizes.h needs PAGE_SIZE */ | 14 | #include <asm/page.h> /* kmalloc_sizes.h needs PAGE_SIZE */ |
15 | #include <asm/cache.h> /* kmalloc_sizes.h needs L1_CACHE_BYTES */ | 15 | #include <asm/cache.h> /* kmalloc_sizes.h needs L1_CACHE_BYTES */ |
16 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
17 | #include <trace/kmemtrace.h> | 17 | #include <linux/kmemtrace.h> |
18 | 18 | ||
19 | /* Size description struct for general caches. */ | 19 | /* Size description struct for general caches. */ |
20 | struct cache_sizes { | 20 | struct cache_sizes { |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 5046f90c1171..be5d40c43bd2 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/gfp.h> | 10 | #include <linux/gfp.h> |
11 | #include <linux/workqueue.h> | 11 | #include <linux/workqueue.h> |
12 | #include <linux/kobject.h> | 12 | #include <linux/kobject.h> |
13 | #include <trace/kmemtrace.h> | 13 | #include <linux/kmemtrace.h> |
14 | 14 | ||
15 | enum stat_item { | 15 | enum stat_item { |
16 | ALLOC_FASTPATH, /* Allocation from cpu slab */ | 16 | ALLOC_FASTPATH, /* Allocation from cpu slab */ |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 1758d9f5b5c3..08afe43118f4 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -261,6 +261,7 @@ void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); | |||
261 | #define XPRT_BINDING (5) | 261 | #define XPRT_BINDING (5) |
262 | #define XPRT_CLOSING (6) | 262 | #define XPRT_CLOSING (6) |
263 | #define XPRT_CONNECTION_ABORT (7) | 263 | #define XPRT_CONNECTION_ABORT (7) |
264 | #define XPRT_CONNECTION_CLOSE (8) | ||
264 | 265 | ||
265 | static inline void xprt_set_connected(struct rpc_xprt *xprt) | 266 | static inline void xprt_set_connected(struct rpc_xprt *xprt) |
266 | { | 267 | { |
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h new file mode 100644 index 000000000000..ba9627f00d3f --- /dev/null +++ b/include/linux/trace_seq.h | |||
@@ -0,0 +1,90 @@ | |||
1 | #ifndef _LINUX_TRACE_SEQ_H | ||
2 | #define _LINUX_TRACE_SEQ_H | ||
3 | |||
4 | #include <linux/fs.h> | ||
5 | |||
6 | /* | ||
7 | * Trace sequences are used to allow a function to call several other functions | ||
8 | * to create a string of data to use (up to a max of PAGE_SIZE. | ||
9 | */ | ||
10 | |||
11 | struct trace_seq { | ||
12 | unsigned char buffer[PAGE_SIZE]; | ||
13 | unsigned int len; | ||
14 | unsigned int readpos; | ||
15 | }; | ||
16 | |||
17 | static inline void | ||
18 | trace_seq_init(struct trace_seq *s) | ||
19 | { | ||
20 | s->len = 0; | ||
21 | s->readpos = 0; | ||
22 | } | ||
23 | |||
24 | /* | ||
25 | * Currently only defined when tracing is enabled. | ||
26 | */ | ||
27 | #ifdef CONFIG_TRACING | ||
28 | extern int trace_seq_printf(struct trace_seq *s, const char *fmt, ...) | ||
29 | __attribute__ ((format (printf, 2, 3))); | ||
30 | extern int | ||
31 | trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary); | ||
32 | extern void trace_print_seq(struct seq_file *m, struct trace_seq *s); | ||
33 | extern ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, | ||
34 | size_t cnt); | ||
35 | extern int trace_seq_puts(struct trace_seq *s, const char *str); | ||
36 | extern int trace_seq_putc(struct trace_seq *s, unsigned char c); | ||
37 | extern int trace_seq_putmem(struct trace_seq *s, const void *mem, size_t len); | ||
38 | extern int trace_seq_putmem_hex(struct trace_seq *s, const void *mem, | ||
39 | size_t len); | ||
40 | extern void *trace_seq_reserve(struct trace_seq *s, size_t len); | ||
41 | extern int trace_seq_path(struct trace_seq *s, struct path *path); | ||
42 | |||
43 | #else /* CONFIG_TRACING */ | ||
44 | static inline int trace_seq_printf(struct trace_seq *s, const char *fmt, ...) | ||
45 | { | ||
46 | return 0; | ||
47 | } | ||
48 | static inline int | ||
49 | trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary) | ||
50 | { | ||
51 | return 0; | ||
52 | } | ||
53 | |||
54 | static inline void trace_print_seq(struct seq_file *m, struct trace_seq *s) | ||
55 | { | ||
56 | } | ||
57 | static inline ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, | ||
58 | size_t cnt) | ||
59 | { | ||
60 | return 0; | ||
61 | } | ||
62 | static inline int trace_seq_puts(struct trace_seq *s, const char *str) | ||
63 | { | ||
64 | return 0; | ||
65 | } | ||
66 | static inline int trace_seq_putc(struct trace_seq *s, unsigned char c) | ||
67 | { | ||
68 | return 0; | ||
69 | } | ||
70 | static inline int | ||
71 | trace_seq_putmem(struct trace_seq *s, const void *mem, size_t len) | ||
72 | { | ||
73 | return 0; | ||
74 | } | ||
75 | static inline int trace_seq_putmem_hex(struct trace_seq *s, const void *mem, | ||
76 | size_t len) | ||
77 | { | ||
78 | return 0; | ||
79 | } | ||
80 | static inline void *trace_seq_reserve(struct trace_seq *s, size_t len) | ||
81 | { | ||
82 | return NULL; | ||
83 | } | ||
84 | static inline int trace_seq_path(struct trace_seq *s, struct path *path) | ||
85 | { | ||
86 | return 0; | ||
87 | } | ||
88 | #endif /* CONFIG_TRACING */ | ||
89 | |||
90 | #endif /* _LINUX_TRACE_SEQ_H */ | ||
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index d35a7ee7611f..14df7e635d43 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -31,6 +31,8 @@ struct tracepoint { | |||
31 | * Keep in sync with vmlinux.lds.h. | 31 | * Keep in sync with vmlinux.lds.h. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #ifndef DECLARE_TRACE | ||
35 | |||
34 | #define TP_PROTO(args...) args | 36 | #define TP_PROTO(args...) args |
35 | #define TP_ARGS(args...) args | 37 | #define TP_ARGS(args...) args |
36 | 38 | ||
@@ -114,6 +116,7 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
114 | struct tracepoint *end) | 116 | struct tracepoint *end) |
115 | { } | 117 | { } |
116 | #endif /* CONFIG_TRACEPOINTS */ | 118 | #endif /* CONFIG_TRACEPOINTS */ |
119 | #endif /* DECLARE_TRACE */ | ||
117 | 120 | ||
118 | /* | 121 | /* |
119 | * Connect a probe to a tracepoint. | 122 | * Connect a probe to a tracepoint. |
@@ -154,10 +157,8 @@ static inline void tracepoint_synchronize_unregister(void) | |||
154 | } | 157 | } |
155 | 158 | ||
156 | #define PARAMS(args...) args | 159 | #define PARAMS(args...) args |
157 | #define TRACE_FORMAT(name, proto, args, fmt) \ | ||
158 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | ||
159 | |||
160 | 160 | ||
161 | #ifndef TRACE_EVENT | ||
161 | /* | 162 | /* |
162 | * For use with the TRACE_EVENT macro: | 163 | * For use with the TRACE_EVENT macro: |
163 | * | 164 | * |
@@ -262,5 +263,6 @@ static inline void tracepoint_synchronize_unregister(void) | |||
262 | 263 | ||
263 | #define TRACE_EVENT(name, proto, args, struct, assign, print) \ | 264 | #define TRACE_EVENT(name, proto, args, struct, assign, print) \ |
264 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | 265 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) |
266 | #endif | ||
265 | 267 | ||
266 | #endif | 268 | #endif |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 3c86ed25a04c..c24124a42ce5 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define USB_CDC_SUBCLASS_DMM 0x09 | 17 | #define USB_CDC_SUBCLASS_DMM 0x09 |
18 | #define USB_CDC_SUBCLASS_MDLM 0x0a | 18 | #define USB_CDC_SUBCLASS_MDLM 0x0a |
19 | #define USB_CDC_SUBCLASS_OBEX 0x0b | 19 | #define USB_CDC_SUBCLASS_OBEX 0x0b |
20 | #define USB_CDC_SUBCLASS_EEM 0x0c | ||
20 | 21 | ||
21 | #define USB_CDC_PROTO_NONE 0 | 22 | #define USB_CDC_PROTO_NONE 0 |
22 | 23 | ||
@@ -28,6 +29,8 @@ | |||
28 | #define USB_CDC_ACM_PROTO_AT_CDMA 6 | 29 | #define USB_CDC_ACM_PROTO_AT_CDMA 6 |
29 | #define USB_CDC_ACM_PROTO_VENDOR 0xff | 30 | #define USB_CDC_ACM_PROTO_VENDOR 0xff |
30 | 31 | ||
32 | #define USB_CDC_PROTO_EEM 7 | ||
33 | |||
31 | /*-------------------------------------------------------------------------*/ | 34 | /*-------------------------------------------------------------------------*/ |
32 | 35 | ||
33 | /* | 36 | /* |
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index d6aad0ea6033..d43755669261 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h | |||
@@ -7,6 +7,9 @@ | |||
7 | * key configuration differences between boards. | 7 | * key configuration differences between boards. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef __LINUX_USB_MUSB_H | ||
11 | #define __LINUX_USB_MUSB_H | ||
12 | |||
10 | /* The USB role is defined by the connector used on the board, so long as | 13 | /* The USB role is defined by the connector used on the board, so long as |
11 | * standards are being followed. (Developer boards sometimes won't.) | 14 | * standards are being followed. (Developer boards sometimes won't.) |
12 | */ | 15 | */ |
@@ -101,3 +104,5 @@ extern int __init tusb6010_setup_interface( | |||
101 | extern int tusb6010_platform_retime(unsigned is_refclk); | 104 | extern int tusb6010_platform_retime(unsigned is_refclk); |
102 | 105 | ||
103 | #endif /* OMAP2 */ | 106 | #endif /* OMAP2 */ |
107 | |||
108 | #endif /* __LINUX_USB_MUSB_H */ | ||
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 242348bb3766..cec79adbe3ea 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
7 | #include <linux/if_ether.h> | ||
7 | 8 | ||
8 | /* The ID for virtio_net */ | 9 | /* The ID for virtio_net */ |
9 | #define VIRTIO_ID_NET 1 | 10 | #define VIRTIO_ID_NET 1 |
diff --git a/include/linux/wait.h b/include/linux/wait.h index 5d631c17eaee..bc024632f365 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -440,13 +440,15 @@ void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait, | |||
440 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 440 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
441 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 441 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
442 | 442 | ||
443 | #define DEFINE_WAIT(name) \ | 443 | #define DEFINE_WAIT_FUNC(name, function) \ |
444 | wait_queue_t name = { \ | 444 | wait_queue_t name = { \ |
445 | .private = current, \ | 445 | .private = current, \ |
446 | .func = autoremove_wake_function, \ | 446 | .func = function, \ |
447 | .task_list = LIST_HEAD_INIT((name).task_list), \ | 447 | .task_list = LIST_HEAD_INIT((name).task_list), \ |
448 | } | 448 | } |
449 | 449 | ||
450 | #define DEFINE_WAIT(name) DEFINE_WAIT_FUNC(name, autoremove_wake_function) | ||
451 | |||
450 | #define DEFINE_WAIT_BIT(name, word, bit) \ | 452 | #define DEFINE_WAIT_BIT(name, word, bit) \ |
451 | struct wait_bit_queue name = { \ | 453 | struct wait_bit_queue name = { \ |
452 | .key = __WAIT_BIT_KEY_INITIALIZER(word, bit), \ | 454 | .key = __WAIT_BIT_KEY_INITIALIZER(word, bit), \ |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 4012e07162e5..e26812274b75 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -98,7 +98,6 @@ enum p9_req_status_t { | |||
98 | struct p9_req_t { | 98 | struct p9_req_t { |
99 | int status; | 99 | int status; |
100 | int t_err; | 100 | int t_err; |
101 | u16 flush_tag; | ||
102 | wait_queue_head_t *wq; | 101 | wait_queue_head_t *wq; |
103 | struct p9_fcall *tc; | 102 | struct p9_fcall *tc; |
104 | struct p9_fcall *rc; | 103 | struct p9_fcall *rc; |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index f69f015bbcc0..ed3aea1605e8 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -101,6 +101,7 @@ enum { | |||
101 | /* HCI timeouts */ | 101 | /* HCI timeouts */ |
102 | #define HCI_CONNECT_TIMEOUT (40000) /* 40 seconds */ | 102 | #define HCI_CONNECT_TIMEOUT (40000) /* 40 seconds */ |
103 | #define HCI_DISCONN_TIMEOUT (2000) /* 2 seconds */ | 103 | #define HCI_DISCONN_TIMEOUT (2000) /* 2 seconds */ |
104 | #define HCI_PAIRING_TIMEOUT (60000) /* 60 seconds */ | ||
104 | #define HCI_IDLE_TIMEOUT (6000) /* 6 seconds */ | 105 | #define HCI_IDLE_TIMEOUT (6000) /* 6 seconds */ |
105 | #define HCI_INIT_TIMEOUT (10000) /* 10 seconds */ | 106 | #define HCI_INIT_TIMEOUT (10000) /* 10 seconds */ |
106 | 107 | ||
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 01f9316b4c23..73aead222b32 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -171,6 +171,7 @@ struct hci_conn { | |||
171 | __u8 auth_type; | 171 | __u8 auth_type; |
172 | __u8 sec_level; | 172 | __u8 sec_level; |
173 | __u8 power_save; | 173 | __u8 power_save; |
174 | __u16 disc_timeout; | ||
174 | unsigned long pend; | 175 | unsigned long pend; |
175 | 176 | ||
176 | unsigned int sent; | 177 | unsigned int sent; |
@@ -180,7 +181,8 @@ struct hci_conn { | |||
180 | struct timer_list disc_timer; | 181 | struct timer_list disc_timer; |
181 | struct timer_list idle_timer; | 182 | struct timer_list idle_timer; |
182 | 183 | ||
183 | struct work_struct work; | 184 | struct work_struct work_add; |
185 | struct work_struct work_del; | ||
184 | 186 | ||
185 | struct device dev; | 187 | struct device dev; |
186 | 188 | ||
@@ -348,9 +350,9 @@ static inline void hci_conn_put(struct hci_conn *conn) | |||
348 | if (conn->type == ACL_LINK) { | 350 | if (conn->type == ACL_LINK) { |
349 | del_timer(&conn->idle_timer); | 351 | del_timer(&conn->idle_timer); |
350 | if (conn->state == BT_CONNECTED) { | 352 | if (conn->state == BT_CONNECTED) { |
351 | timeo = msecs_to_jiffies(HCI_DISCONN_TIMEOUT); | 353 | timeo = msecs_to_jiffies(conn->disc_timeout); |
352 | if (!conn->out) | 354 | if (!conn->out) |
353 | timeo *= 5; | 355 | timeo *= 2; |
354 | } else | 356 | } else |
355 | timeo = msecs_to_jiffies(10); | 357 | timeo = msecs_to_jiffies(10); |
356 | } else | 358 | } else |
@@ -455,6 +457,7 @@ int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count); | |||
455 | 457 | ||
456 | int hci_register_sysfs(struct hci_dev *hdev); | 458 | int hci_register_sysfs(struct hci_dev *hdev); |
457 | void hci_unregister_sysfs(struct hci_dev *hdev); | 459 | void hci_unregister_sysfs(struct hci_dev *hdev); |
460 | void hci_conn_init_sysfs(struct hci_conn *conn); | ||
458 | void hci_conn_add_sysfs(struct hci_conn *conn); | 461 | void hci_conn_add_sysfs(struct hci_conn *conn); |
459 | void hci_conn_del_sysfs(struct hci_conn *conn); | 462 | void hci_conn_del_sysfs(struct hci_conn *conn); |
460 | 463 | ||
diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h index 9dc1039ff78b..8df0b7f7fc6e 100644 --- a/include/net/netfilter/nf_nat.h +++ b/include/net/netfilter/nf_nat.h | |||
@@ -18,6 +18,7 @@ enum nf_nat_manip_type | |||
18 | #define IP_NAT_RANGE_MAP_IPS 1 | 18 | #define IP_NAT_RANGE_MAP_IPS 1 |
19 | #define IP_NAT_RANGE_PROTO_SPECIFIED 2 | 19 | #define IP_NAT_RANGE_PROTO_SPECIFIED 2 |
20 | #define IP_NAT_RANGE_PROTO_RANDOM 4 | 20 | #define IP_NAT_RANGE_PROTO_RANDOM 4 |
21 | #define IP_NAT_RANGE_PERSISTENT 8 | ||
21 | 22 | ||
22 | /* NAT sequence number modifications */ | 23 | /* NAT sequence number modifications */ |
23 | struct nf_nat_seq { | 24 | struct nf_nat_seq { |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 1b94b9bfe2dc..646dbe3962ea 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <net/ip.h> | 41 | #include <net/ip.h> |
42 | #include <net/tcp_states.h> | 42 | #include <net/tcp_states.h> |
43 | #include <net/inet_ecn.h> | 43 | #include <net/inet_ecn.h> |
44 | #include <net/dst.h> | ||
44 | 45 | ||
45 | #include <linux/seq_file.h> | 46 | #include <linux/seq_file.h> |
46 | 47 | ||
@@ -530,6 +531,17 @@ static inline void tcp_fast_path_check(struct sock *sk) | |||
530 | tcp_fast_path_on(tp); | 531 | tcp_fast_path_on(tp); |
531 | } | 532 | } |
532 | 533 | ||
534 | /* Compute the actual rto_min value */ | ||
535 | static inline u32 tcp_rto_min(struct sock *sk) | ||
536 | { | ||
537 | struct dst_entry *dst = __sk_dst_get(sk); | ||
538 | u32 rto_min = TCP_RTO_MIN; | ||
539 | |||
540 | if (dst && dst_metric_locked(dst, RTAX_RTO_MIN)) | ||
541 | rto_min = dst_metric_rtt(dst, RTAX_RTO_MIN); | ||
542 | return rto_min; | ||
543 | } | ||
544 | |||
533 | /* Compute the actual receive window we are currently advertising. | 545 | /* Compute the actual receive window we are currently advertising. |
534 | * Rcv_nxt can be after the window if our peer push more data | 546 | * Rcv_nxt can be after the window if our peer push more data |
535 | * than the offered window. | 547 | * than the offered window. |
@@ -895,7 +907,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb) | |||
895 | wake_up_interruptible(sk->sk_sleep); | 907 | wake_up_interruptible(sk->sk_sleep); |
896 | if (!inet_csk_ack_scheduled(sk)) | 908 | if (!inet_csk_ack_scheduled(sk)) |
897 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, | 909 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, |
898 | (3 * TCP_RTO_MIN) / 4, | 910 | (3 * tcp_rto_min(sk)) / 4, |
899 | TCP_RTO_MAX); | 911 | TCP_RTO_MAX); |
900 | } | 912 | } |
901 | return 1; | 913 | return 1; |
diff --git a/include/scsi/fc/fc_fs.h b/include/scsi/fc/fc_fs.h index 1b7af3a64c7c..ac4cd38c860e 100644 --- a/include/scsi/fc/fc_fs.h +++ b/include/scsi/fc/fc_fs.h | |||
@@ -149,6 +149,7 @@ enum fc_rctl { | |||
149 | * Well-known fabric addresses. | 149 | * Well-known fabric addresses. |
150 | */ | 150 | */ |
151 | enum fc_well_known_fid { | 151 | enum fc_well_known_fid { |
152 | FC_FID_NONE = 0x000000, /* No destination */ | ||
152 | FC_FID_BCAST = 0xffffff, /* broadcast */ | 153 | FC_FID_BCAST = 0xffffff, /* broadcast */ |
153 | FC_FID_FLOGI = 0xfffffe, /* fabric login */ | 154 | FC_FID_FLOGI = 0xfffffe, /* fabric login */ |
154 | FC_FID_FCTRL = 0xfffffd, /* fabric controller */ | 155 | FC_FID_FCTRL = 0xfffffd, /* fabric controller */ |
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 0303a6a098cc..45f9cc642c46 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -637,6 +637,7 @@ struct fc_disc { | |||
637 | enum fc_disc_event); | 637 | enum fc_disc_event); |
638 | 638 | ||
639 | struct list_head rports; | 639 | struct list_head rports; |
640 | struct list_head rogue_rports; | ||
640 | struct fc_lport *lport; | 641 | struct fc_lport *lport; |
641 | struct mutex disc_mutex; | 642 | struct mutex disc_mutex; |
642 | struct fc_gpn_ft_resp partial_buf; /* partial name buffer */ | 643 | struct fc_gpn_ft_resp partial_buf; /* partial name buffer */ |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 7ffaed2f94dd..0289f5745fb9 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -36,6 +36,7 @@ struct scsi_transport_template; | |||
36 | struct scsi_host_template; | 36 | struct scsi_host_template; |
37 | struct scsi_device; | 37 | struct scsi_device; |
38 | struct Scsi_Host; | 38 | struct Scsi_Host; |
39 | struct scsi_target; | ||
39 | struct scsi_cmnd; | 40 | struct scsi_cmnd; |
40 | struct socket; | 41 | struct socket; |
41 | struct iscsi_transport; | 42 | struct iscsi_transport; |
@@ -350,6 +351,7 @@ extern struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht, | |||
350 | bool xmit_can_sleep); | 351 | bool xmit_can_sleep); |
351 | extern void iscsi_host_remove(struct Scsi_Host *shost); | 352 | extern void iscsi_host_remove(struct Scsi_Host *shost); |
352 | extern void iscsi_host_free(struct Scsi_Host *shost); | 353 | extern void iscsi_host_free(struct Scsi_Host *shost); |
354 | extern int iscsi_target_alloc(struct scsi_target *starget); | ||
353 | 355 | ||
354 | /* | 356 | /* |
355 | * session management | 357 | * session management |
diff --git a/include/scsi/osd_protocol.h b/include/scsi/osd_protocol.h index cd3cbf764650..62b2ab8c69d4 100644 --- a/include/scsi/osd_protocol.h +++ b/include/scsi/osd_protocol.h | |||
@@ -24,17 +24,18 @@ enum { | |||
24 | OSDv1_ADDITIONAL_CDB_LENGTH = 192, | 24 | OSDv1_ADDITIONAL_CDB_LENGTH = 192, |
25 | OSDv1_TOTAL_CDB_LEN = OSDv1_ADDITIONAL_CDB_LENGTH + 8, | 25 | OSDv1_TOTAL_CDB_LEN = OSDv1_ADDITIONAL_CDB_LENGTH + 8, |
26 | OSDv1_CAP_LEN = 80, | 26 | OSDv1_CAP_LEN = 80, |
27 | |||
27 | /* Latest supported version */ | 28 | /* Latest supported version */ |
28 | /* OSD_ADDITIONAL_CDB_LENGTH = 216,*/ | 29 | OSDv2_ADDITIONAL_CDB_LENGTH = 228, |
29 | OSD_ADDITIONAL_CDB_LENGTH = | 30 | OSD_ADDITIONAL_CDB_LENGTH = |
30 | OSDv1_ADDITIONAL_CDB_LENGTH, /* FIXME: Pete rev-001 sup */ | 31 | OSDv2_ADDITIONAL_CDB_LENGTH, |
31 | OSD_TOTAL_CDB_LEN = OSD_ADDITIONAL_CDB_LENGTH + 8, | 32 | OSD_TOTAL_CDB_LEN = OSD_ADDITIONAL_CDB_LENGTH + 8, |
32 | /* OSD_CAP_LEN = 104,*/ | 33 | OSD_CAP_LEN = 104, |
33 | OSD_CAP_LEN = OSDv1_CAP_LEN,/* FIXME: Pete rev-001 sup */ | ||
34 | 34 | ||
35 | OSD_SYSTEMID_LEN = 20, | 35 | OSD_SYSTEMID_LEN = 20, |
36 | OSD_CRYPTO_KEYID_SIZE = 20, | 36 | OSDv1_CRYPTO_KEYID_SIZE = 20, |
37 | /*FIXME: OSDv2_CRYPTO_KEYID_SIZE = 32,*/ | 37 | OSDv2_CRYPTO_KEYID_SIZE = 32, |
38 | OSD_CRYPTO_KEYID_SIZE = OSDv2_CRYPTO_KEYID_SIZE, | ||
38 | OSD_CRYPTO_SEED_SIZE = 4, | 39 | OSD_CRYPTO_SEED_SIZE = 4, |
39 | OSD_CRYPTO_NONCE_SIZE = 12, | 40 | OSD_CRYPTO_NONCE_SIZE = 12, |
40 | OSD_MAX_SENSE_LEN = 252, /* from SPC-3 */ | 41 | OSD_MAX_SENSE_LEN = 252, /* from SPC-3 */ |
@@ -164,7 +165,11 @@ struct osd_cdb_head { | |||
164 | /* called allocation_length in some commands */ | 165 | /* called allocation_length in some commands */ |
165 | /*32*/ __be64 length; | 166 | /*32*/ __be64 length; |
166 | /*40*/ __be64 start_address; | 167 | /*40*/ __be64 start_address; |
167 | /*48*/ __be32 list_identifier;/* Rarely used */ | 168 | union { |
169 | /*48*/ __be32 list_identifier;/* Rarely used */ | ||
170 | /* OSD2r05 5.2.5 CDB continuation length */ | ||
171 | /*48*/ __be32 cdb_continuation_length; | ||
172 | }; | ||
168 | } __packed v2; | 173 | } __packed v2; |
169 | }; | 174 | }; |
170 | /*52*/ union { /* selected attributes mode Page/List/Single */ | 175 | /*52*/ union { /* selected attributes mode Page/List/Single */ |
@@ -204,29 +209,40 @@ struct osd_cdb_head { | |||
204 | /*80*/ | 209 | /*80*/ |
205 | 210 | ||
206 | /*160 v1*/ | 211 | /*160 v1*/ |
207 | /*184 v2*/ | 212 | struct osdv1_security_parameters { |
208 | struct osd_security_parameters { | 213 | /*160*/u8 integrity_check_value[OSDv1_CRYPTO_KEYID_SIZE]; |
209 | /*160*/u8 integrity_check_value[OSD_CRYPTO_KEYID_SIZE]; | ||
210 | /*180*/u8 request_nonce[OSD_CRYPTO_NONCE_SIZE]; | 214 | /*180*/u8 request_nonce[OSD_CRYPTO_NONCE_SIZE]; |
211 | /*192*/osd_cdb_offset data_in_integrity_check_offset; | 215 | /*192*/osd_cdb_offset data_in_integrity_check_offset; |
212 | /*196*/osd_cdb_offset data_out_integrity_check_offset; | 216 | /*196*/osd_cdb_offset data_out_integrity_check_offset; |
213 | } __packed; | 217 | } __packed; |
214 | /*200 v1*/ | 218 | /*200 v1*/ |
215 | /*224 v2*/ | ||
216 | 219 | ||
217 | /* FIXME: osdv2_security_parameters */ | 220 | /*184 v2*/ |
221 | struct osdv2_security_parameters { | ||
222 | /*184*/u8 integrity_check_value[OSDv2_CRYPTO_KEYID_SIZE]; | ||
223 | /*216*/u8 request_nonce[OSD_CRYPTO_NONCE_SIZE]; | ||
224 | /*228*/osd_cdb_offset data_in_integrity_check_offset; | ||
225 | /*232*/osd_cdb_offset data_out_integrity_check_offset; | ||
226 | } __packed; | ||
227 | /*236 v2*/ | ||
228 | |||
229 | struct osd_security_parameters { | ||
230 | union { | ||
231 | struct osdv1_security_parameters v1; | ||
232 | struct osdv2_security_parameters v2; | ||
233 | }; | ||
234 | }; | ||
218 | 235 | ||
219 | struct osdv1_cdb { | 236 | struct osdv1_cdb { |
220 | struct osd_cdb_head h; | 237 | struct osd_cdb_head h; |
221 | u8 caps[OSDv1_CAP_LEN]; | 238 | u8 caps[OSDv1_CAP_LEN]; |
222 | struct osd_security_parameters sec_params; | 239 | struct osdv1_security_parameters sec_params; |
223 | } __packed; | 240 | } __packed; |
224 | 241 | ||
225 | struct osdv2_cdb { | 242 | struct osdv2_cdb { |
226 | struct osd_cdb_head h; | 243 | struct osd_cdb_head h; |
227 | u8 caps[OSD_CAP_LEN]; | 244 | u8 caps[OSD_CAP_LEN]; |
228 | struct osd_security_parameters sec_params; | 245 | struct osdv2_security_parameters sec_params; |
229 | /* FIXME: osdv2_security_parameters */ | ||
230 | } __packed; | 246 | } __packed; |
231 | 247 | ||
232 | struct osd_cdb { | 248 | struct osd_cdb { |
@@ -301,14 +317,25 @@ struct osd_attributes_list_attrid { | |||
301 | } __packed; | 317 | } __packed; |
302 | 318 | ||
303 | /* | 319 | /* |
320 | * NOTE: v1: is not aligned. | ||
321 | */ | ||
322 | struct osdv1_attributes_list_element { | ||
323 | __be32 attr_page; | ||
324 | __be32 attr_id; | ||
325 | __be16 attr_bytes; /* valid bytes at attr_val without padding */ | ||
326 | u8 attr_val[0]; | ||
327 | } __packed; | ||
328 | |||
329 | /* | ||
304 | * osd2r03: 7.1.3.3 List entry format for retrieved attributes and | 330 | * osd2r03: 7.1.3.3 List entry format for retrieved attributes and |
305 | * for setting attributes | 331 | * for setting attributes |
306 | * NOTE: v2 is 8-bytes aligned, v1 is not aligned. | 332 | * NOTE: v2 is 8-bytes aligned |
307 | */ | 333 | */ |
308 | struct osd_attributes_list_element { | 334 | struct osdv2_attributes_list_element { |
309 | __be32 attr_page; | 335 | __be32 attr_page; |
310 | __be32 attr_id; | 336 | __be32 attr_id; |
311 | __be16 attr_bytes; | 337 | u8 reserved[6]; |
338 | __be16 attr_bytes; /* valid bytes at attr_val without padding */ | ||
312 | u8 attr_val[0]; | 339 | u8 attr_val[0]; |
313 | } __packed; | 340 | } __packed; |
314 | 341 | ||
@@ -324,13 +351,13 @@ enum { | |||
324 | 351 | ||
325 | static inline unsigned osdv1_attr_list_elem_size(unsigned len) | 352 | static inline unsigned osdv1_attr_list_elem_size(unsigned len) |
326 | { | 353 | { |
327 | return ALIGN(len + sizeof(struct osd_attributes_list_element), | 354 | return ALIGN(len + sizeof(struct osdv1_attributes_list_element), |
328 | OSDv1_ATTRIBUTES_ELEM_ALIGN); | 355 | OSDv1_ATTRIBUTES_ELEM_ALIGN); |
329 | } | 356 | } |
330 | 357 | ||
331 | static inline unsigned osdv2_attr_list_elem_size(unsigned len) | 358 | static inline unsigned osdv2_attr_list_elem_size(unsigned len) |
332 | { | 359 | { |
333 | return ALIGN(len + sizeof(struct osd_attributes_list_element), | 360 | return ALIGN(len + sizeof(struct osdv2_attributes_list_element), |
334 | OSD_ATTRIBUTES_ELEM_ALIGN); | 361 | OSD_ATTRIBUTES_ELEM_ALIGN); |
335 | } | 362 | } |
336 | 363 | ||
@@ -419,15 +446,35 @@ struct osd_data_out_integrity_info { | |||
419 | __be64 data_bytes; | 446 | __be64 data_bytes; |
420 | __be64 set_attributes_bytes; | 447 | __be64 set_attributes_bytes; |
421 | __be64 get_attributes_bytes; | 448 | __be64 get_attributes_bytes; |
422 | __be64 integrity_check_value; | 449 | __u8 integrity_check_value[OSD_CRYPTO_KEYID_SIZE]; |
423 | } __packed; | 450 | } __packed; |
424 | 451 | ||
452 | /* Same osd_data_out_integrity_info is used for OSD2/OSD1. The only difference | ||
453 | * Is the sizeof the structure since in OSD1 the last array is smaller. Use | ||
454 | * below for version independent handling of this structure | ||
455 | */ | ||
456 | static inline int osd_data_out_integrity_info_sizeof(bool is_ver1) | ||
457 | { | ||
458 | return sizeof(struct osd_data_out_integrity_info) - | ||
459 | (is_ver1 * (OSDv2_CRYPTO_KEYID_SIZE - OSDv1_CRYPTO_KEYID_SIZE)); | ||
460 | } | ||
461 | |||
425 | struct osd_data_in_integrity_info { | 462 | struct osd_data_in_integrity_info { |
426 | __be64 data_bytes; | 463 | __be64 data_bytes; |
427 | __be64 retrieved_attributes_bytes; | 464 | __be64 retrieved_attributes_bytes; |
428 | __be64 integrity_check_value; | 465 | __u8 integrity_check_value[OSD_CRYPTO_KEYID_SIZE]; |
429 | } __packed; | 466 | } __packed; |
430 | 467 | ||
468 | /* Same osd_data_in_integrity_info is used for OSD2/OSD1. The only difference | ||
469 | * Is the sizeof the structure since in OSD1 the last array is smaller. Use | ||
470 | * below for version independent handling of this structure | ||
471 | */ | ||
472 | static inline int osd_data_in_integrity_info_sizeof(bool is_ver1) | ||
473 | { | ||
474 | return sizeof(struct osd_data_in_integrity_info) - | ||
475 | (is_ver1 * (OSDv2_CRYPTO_KEYID_SIZE - OSDv1_CRYPTO_KEYID_SIZE)); | ||
476 | } | ||
477 | |||
431 | struct osd_timestamp { | 478 | struct osd_timestamp { |
432 | u8 time[6]; /* number of milliseconds since 1/1/1970 UT (big endian) */ | 479 | u8 time[6]; /* number of milliseconds since 1/1/1970 UT (big endian) */ |
433 | } __packed; | 480 | } __packed; |
@@ -477,7 +524,7 @@ enum osd_capability_bit_masks { | |||
477 | 524 | ||
478 | OSD_SEC_CAP_NONE1 = BIT(8), | 525 | OSD_SEC_CAP_NONE1 = BIT(8), |
479 | OSD_SEC_CAP_NONE2 = BIT(9), | 526 | OSD_SEC_CAP_NONE2 = BIT(9), |
480 | OSD_SEC_CAP_NONE3 = BIT(10), | 527 | OSD_SEC_GBL_REM = BIT(10), /*v2 only*/ |
481 | OSD_SEC_CAP_QUERY = BIT(11), /*v2 only*/ | 528 | OSD_SEC_CAP_QUERY = BIT(11), /*v2 only*/ |
482 | OSD_SEC_CAP_M_OBJECT = BIT(12), /*v2 only*/ | 529 | OSD_SEC_CAP_M_OBJECT = BIT(12), /*v2 only*/ |
483 | OSD_SEC_CAP_POL_SEC = BIT(13), | 530 | OSD_SEC_CAP_POL_SEC = BIT(13), |
@@ -552,8 +599,7 @@ struct osdv1_capability { | |||
552 | 599 | ||
553 | struct osd_capability { | 600 | struct osd_capability { |
554 | struct osd_capability_head h; | 601 | struct osd_capability_head h; |
555 | /* struct osd_cap_object_descriptor od;*/ | 602 | struct osd_cap_object_descriptor od; |
556 | struct osdv1_cap_object_descriptor od; /* FIXME: Pete rev-001 sup */ | ||
557 | } __packed; | 603 | } __packed; |
558 | 604 | ||
559 | /** | 605 | /** |
diff --git a/include/sound/pxa2xx-lib.h b/include/sound/pxa2xx-lib.h index 2c894b600e5b..2fd3d251d9a5 100644 --- a/include/sound/pxa2xx-lib.h +++ b/include/sound/pxa2xx-lib.h | |||
@@ -42,19 +42,4 @@ extern int pxa2xx_ac97_hw_resume(void); | |||
42 | extern int pxa2xx_ac97_hw_probe(struct platform_device *dev); | 42 | extern int pxa2xx_ac97_hw_probe(struct platform_device *dev); |
43 | extern void pxa2xx_ac97_hw_remove(struct platform_device *dev); | 43 | extern void pxa2xx_ac97_hw_remove(struct platform_device *dev); |
44 | 44 | ||
45 | /* AC97 platform_data */ | ||
46 | /** | ||
47 | * struct pxa2xx_ac97_platform_data - pxa ac97 platform data | ||
48 | * @reset_gpio: AC97 reset gpio (normally gpio113 or gpio95) | ||
49 | * a -1 value means no gpio will be used for reset | ||
50 | * | ||
51 | * Platform data should only be specified for pxa27x CPUs where a silicon bug | ||
52 | * prevents correct operation of the reset line. If not specified, the default | ||
53 | * behaviour is to consider gpio 113 as the AC97 reset line, which is the | ||
54 | * default on most boards. | ||
55 | */ | ||
56 | struct pxa2xx_ac97_platform_data { | ||
57 | int reset_gpio; | ||
58 | }; | ||
59 | |||
60 | #endif | 45 | #endif |
diff --git a/include/trace/block.h b/include/trace/block.h index 25b7068b819e..8ac945b7746e 100644 --- a/include/trace/block.h +++ b/include/trace/block.h | |||
@@ -70,7 +70,7 @@ DECLARE_TRACE(block_split, | |||
70 | 70 | ||
71 | DECLARE_TRACE(block_remap, | 71 | DECLARE_TRACE(block_remap, |
72 | TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev, | 72 | TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev, |
73 | sector_t from, sector_t to), | 73 | sector_t to), |
74 | TP_ARGS(q, bio, dev, from, to)); | 74 | TP_ARGS(q, bio, dev, to)); |
75 | 75 | ||
76 | #endif | 76 | #endif |
diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h new file mode 100644 index 000000000000..f7a7ae1e8f90 --- /dev/null +++ b/include/trace/define_trace.h | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * Trace files that want to automate creationg of all tracepoints defined | ||
3 | * in their file should include this file. The following are macros that the | ||
4 | * trace file may define: | ||
5 | * | ||
6 | * TRACE_SYSTEM defines the system the tracepoint is for | ||
7 | * | ||
8 | * TRACE_INCLUDE_FILE if the file name is something other than TRACE_SYSTEM.h | ||
9 | * This macro may be defined to tell define_trace.h what file to include. | ||
10 | * Note, leave off the ".h". | ||
11 | * | ||
12 | * TRACE_INCLUDE_PATH if the path is something other than core kernel include/trace | ||
13 | * then this macro can define the path to use. Note, the path is relative to | ||
14 | * define_trace.h, not the file including it. Full path names for out of tree | ||
15 | * modules must be used. | ||
16 | */ | ||
17 | |||
18 | #ifdef CREATE_TRACE_POINTS | ||
19 | |||
20 | /* Prevent recursion */ | ||
21 | #undef CREATE_TRACE_POINTS | ||
22 | |||
23 | #include <linux/stringify.h> | ||
24 | |||
25 | #undef TRACE_EVENT | ||
26 | #define TRACE_EVENT(name, proto, args, tstruct, assign, print) \ | ||
27 | DEFINE_TRACE(name) | ||
28 | |||
29 | #undef DECLARE_TRACE | ||
30 | #define DECLARE_TRACE(name, proto, args) \ | ||
31 | DEFINE_TRACE(name) | ||
32 | |||
33 | #undef TRACE_INCLUDE | ||
34 | #undef __TRACE_INCLUDE | ||
35 | |||
36 | #ifndef TRACE_INCLUDE_FILE | ||
37 | # define TRACE_INCLUDE_FILE TRACE_SYSTEM | ||
38 | # define UNDEF_TRACE_INCLUDE_FILE | ||
39 | #endif | ||
40 | |||
41 | #ifndef TRACE_INCLUDE_PATH | ||
42 | # define __TRACE_INCLUDE(system) <trace/events/system.h> | ||
43 | # define UNDEF_TRACE_INCLUDE_PATH | ||
44 | #else | ||
45 | # define __TRACE_INCLUDE(system) __stringify(TRACE_INCLUDE_PATH/system.h) | ||
46 | #endif | ||
47 | |||
48 | # define TRACE_INCLUDE(system) __TRACE_INCLUDE(system) | ||
49 | |||
50 | /* Let the trace headers be reread */ | ||
51 | #define TRACE_HEADER_MULTI_READ | ||
52 | |||
53 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ||
54 | |||
55 | #ifdef CONFIG_EVENT_TRACING | ||
56 | #include <trace/ftrace.h> | ||
57 | #endif | ||
58 | |||
59 | #undef TRACE_HEADER_MULTI_READ | ||
60 | |||
61 | /* Only undef what we defined in this file */ | ||
62 | #ifdef UNDEF_TRACE_INCLUDE_FILE | ||
63 | # undef TRACE_INCLUDE_FILE | ||
64 | # undef UNDEF_TRACE_INCLUDE_FILE | ||
65 | #endif | ||
66 | |||
67 | #ifdef UNDEF_TRACE_INCLUDE_PATH | ||
68 | # undef TRACE_INCLUDE_PATH | ||
69 | # undef UNDEF_TRACE_INCLUDE_PATH | ||
70 | #endif | ||
71 | |||
72 | /* We may be processing more files */ | ||
73 | #define CREATE_TRACE_POINTS | ||
74 | |||
75 | #endif /* CREATE_TRACE_POINTS */ | ||
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h new file mode 100644 index 000000000000..32a9f7ef432b --- /dev/null +++ b/include/trace/events/irq.h | |||
@@ -0,0 +1,134 @@ | |||
1 | #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_IRQ_H | ||
3 | |||
4 | #include <linux/tracepoint.h> | ||
5 | #include <linux/interrupt.h> | ||
6 | |||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM irq | ||
9 | |||
10 | /** | ||
11 | * irq_handler_entry - called immediately before the irq action handler | ||
12 | * @irq: irq number | ||
13 | * @action: pointer to struct irqaction | ||
14 | * | ||
15 | * The struct irqaction pointed to by @action contains various | ||
16 | * information about the handler, including the device name, | ||
17 | * @action->name, and the device id, @action->dev_id. When used in | ||
18 | * conjunction with the irq_handler_exit tracepoint, we can figure | ||
19 | * out irq handler latencies. | ||
20 | */ | ||
21 | TRACE_EVENT(irq_handler_entry, | ||
22 | |||
23 | TP_PROTO(int irq, struct irqaction *action), | ||
24 | |||
25 | TP_ARGS(irq, action), | ||
26 | |||
27 | TP_STRUCT__entry( | ||
28 | __field( int, irq ) | ||
29 | __string( name, action->name ) | ||
30 | ), | ||
31 | |||
32 | TP_fast_assign( | ||
33 | __entry->irq = irq; | ||
34 | __assign_str(name, action->name); | ||
35 | ), | ||
36 | |||
37 | TP_printk("irq=%d handler=%s", __entry->irq, __get_str(name)) | ||
38 | ); | ||
39 | |||
40 | /** | ||
41 | * irq_handler_exit - called immediately after the irq action handler returns | ||
42 | * @irq: irq number | ||
43 | * @action: pointer to struct irqaction | ||
44 | * @ret: return value | ||
45 | * | ||
46 | * If the @ret value is set to IRQ_HANDLED, then we know that the corresponding | ||
47 | * @action->handler scuccessully handled this irq. Otherwise, the irq might be | ||
48 | * a shared irq line, or the irq was not handled successfully. Can be used in | ||
49 | * conjunction with the irq_handler_entry to understand irq handler latencies. | ||
50 | */ | ||
51 | TRACE_EVENT(irq_handler_exit, | ||
52 | |||
53 | TP_PROTO(int irq, struct irqaction *action, int ret), | ||
54 | |||
55 | TP_ARGS(irq, action, ret), | ||
56 | |||
57 | TP_STRUCT__entry( | ||
58 | __field( int, irq ) | ||
59 | __field( int, ret ) | ||
60 | ), | ||
61 | |||
62 | TP_fast_assign( | ||
63 | __entry->irq = irq; | ||
64 | __entry->ret = ret; | ||
65 | ), | ||
66 | |||
67 | TP_printk("irq=%d return=%s", | ||
68 | __entry->irq, __entry->ret ? "handled" : "unhandled") | ||
69 | ); | ||
70 | |||
71 | /** | ||
72 | * softirq_entry - called immediately before the softirq handler | ||
73 | * @h: pointer to struct softirq_action | ||
74 | * @vec: pointer to first struct softirq_action in softirq_vec array | ||
75 | * | ||
76 | * The @h parameter, contains a pointer to the struct softirq_action | ||
77 | * which has a pointer to the action handler that is called. By subtracting | ||
78 | * the @vec pointer from the @h pointer, we can determine the softirq | ||
79 | * number. Also, when used in combination with the softirq_exit tracepoint | ||
80 | * we can determine the softirq latency. | ||
81 | */ | ||
82 | TRACE_EVENT(softirq_entry, | ||
83 | |||
84 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | ||
85 | |||
86 | TP_ARGS(h, vec), | ||
87 | |||
88 | TP_STRUCT__entry( | ||
89 | __field( int, vec ) | ||
90 | __string( name, softirq_to_name[h-vec] ) | ||
91 | ), | ||
92 | |||
93 | TP_fast_assign( | ||
94 | __entry->vec = (int)(h - vec); | ||
95 | __assign_str(name, softirq_to_name[h-vec]); | ||
96 | ), | ||
97 | |||
98 | TP_printk("softirq=%d action=%s", __entry->vec, __get_str(name)) | ||
99 | ); | ||
100 | |||
101 | /** | ||
102 | * softirq_exit - called immediately after the softirq handler returns | ||
103 | * @h: pointer to struct softirq_action | ||
104 | * @vec: pointer to first struct softirq_action in softirq_vec array | ||
105 | * | ||
106 | * The @h parameter contains a pointer to the struct softirq_action | ||
107 | * that has handled the softirq. By subtracting the @vec pointer from | ||
108 | * the @h pointer, we can determine the softirq number. Also, when used in | ||
109 | * combination with the softirq_entry tracepoint we can determine the softirq | ||
110 | * latency. | ||
111 | */ | ||
112 | TRACE_EVENT(softirq_exit, | ||
113 | |||
114 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | ||
115 | |||
116 | TP_ARGS(h, vec), | ||
117 | |||
118 | TP_STRUCT__entry( | ||
119 | __field( int, vec ) | ||
120 | __string( name, softirq_to_name[h-vec] ) | ||
121 | ), | ||
122 | |||
123 | TP_fast_assign( | ||
124 | __entry->vec = (int)(h - vec); | ||
125 | __assign_str(name, softirq_to_name[h-vec]); | ||
126 | ), | ||
127 | |||
128 | TP_printk("softirq=%d action=%s", __entry->vec, __get_str(name)) | ||
129 | ); | ||
130 | |||
131 | #endif /* _TRACE_IRQ_H */ | ||
132 | |||
133 | /* This part must be outside protection */ | ||
134 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h new file mode 100644 index 000000000000..c22c42f980b5 --- /dev/null +++ b/include/trace/events/kmem.h | |||
@@ -0,0 +1,194 @@ | |||
1 | #if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_KMEM_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/tracepoint.h> | ||
6 | |||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM kmem | ||
9 | |||
10 | TRACE_EVENT(kmalloc, | ||
11 | |||
12 | TP_PROTO(unsigned long call_site, | ||
13 | const void *ptr, | ||
14 | size_t bytes_req, | ||
15 | size_t bytes_alloc, | ||
16 | gfp_t gfp_flags), | ||
17 | |||
18 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags), | ||
19 | |||
20 | TP_STRUCT__entry( | ||
21 | __field( unsigned long, call_site ) | ||
22 | __field( const void *, ptr ) | ||
23 | __field( size_t, bytes_req ) | ||
24 | __field( size_t, bytes_alloc ) | ||
25 | __field( gfp_t, gfp_flags ) | ||
26 | ), | ||
27 | |||
28 | TP_fast_assign( | ||
29 | __entry->call_site = call_site; | ||
30 | __entry->ptr = ptr; | ||
31 | __entry->bytes_req = bytes_req; | ||
32 | __entry->bytes_alloc = bytes_alloc; | ||
33 | __entry->gfp_flags = gfp_flags; | ||
34 | ), | ||
35 | |||
36 | TP_printk("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%08x", | ||
37 | __entry->call_site, | ||
38 | __entry->ptr, | ||
39 | __entry->bytes_req, | ||
40 | __entry->bytes_alloc, | ||
41 | __entry->gfp_flags) | ||
42 | ); | ||
43 | |||
44 | TRACE_EVENT(kmem_cache_alloc, | ||
45 | |||
46 | TP_PROTO(unsigned long call_site, | ||
47 | const void *ptr, | ||
48 | size_t bytes_req, | ||
49 | size_t bytes_alloc, | ||
50 | gfp_t gfp_flags), | ||
51 | |||
52 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags), | ||
53 | |||
54 | TP_STRUCT__entry( | ||
55 | __field( unsigned long, call_site ) | ||
56 | __field( const void *, ptr ) | ||
57 | __field( size_t, bytes_req ) | ||
58 | __field( size_t, bytes_alloc ) | ||
59 | __field( gfp_t, gfp_flags ) | ||
60 | ), | ||
61 | |||
62 | TP_fast_assign( | ||
63 | __entry->call_site = call_site; | ||
64 | __entry->ptr = ptr; | ||
65 | __entry->bytes_req = bytes_req; | ||
66 | __entry->bytes_alloc = bytes_alloc; | ||
67 | __entry->gfp_flags = gfp_flags; | ||
68 | ), | ||
69 | |||
70 | TP_printk("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%08x", | ||
71 | __entry->call_site, | ||
72 | __entry->ptr, | ||
73 | __entry->bytes_req, | ||
74 | __entry->bytes_alloc, | ||
75 | __entry->gfp_flags) | ||
76 | ); | ||
77 | |||
78 | TRACE_EVENT(kmalloc_node, | ||
79 | |||
80 | TP_PROTO(unsigned long call_site, | ||
81 | const void *ptr, | ||
82 | size_t bytes_req, | ||
83 | size_t bytes_alloc, | ||
84 | gfp_t gfp_flags, | ||
85 | int node), | ||
86 | |||
87 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node), | ||
88 | |||
89 | TP_STRUCT__entry( | ||
90 | __field( unsigned long, call_site ) | ||
91 | __field( const void *, ptr ) | ||
92 | __field( size_t, bytes_req ) | ||
93 | __field( size_t, bytes_alloc ) | ||
94 | __field( gfp_t, gfp_flags ) | ||
95 | __field( int, node ) | ||
96 | ), | ||
97 | |||
98 | TP_fast_assign( | ||
99 | __entry->call_site = call_site; | ||
100 | __entry->ptr = ptr; | ||
101 | __entry->bytes_req = bytes_req; | ||
102 | __entry->bytes_alloc = bytes_alloc; | ||
103 | __entry->gfp_flags = gfp_flags; | ||
104 | __entry->node = node; | ||
105 | ), | ||
106 | |||
107 | TP_printk("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%08x node=%d", | ||
108 | __entry->call_site, | ||
109 | __entry->ptr, | ||
110 | __entry->bytes_req, | ||
111 | __entry->bytes_alloc, | ||
112 | __entry->gfp_flags, | ||
113 | __entry->node) | ||
114 | ); | ||
115 | |||
116 | TRACE_EVENT(kmem_cache_alloc_node, | ||
117 | |||
118 | TP_PROTO(unsigned long call_site, | ||
119 | const void *ptr, | ||
120 | size_t bytes_req, | ||
121 | size_t bytes_alloc, | ||
122 | gfp_t gfp_flags, | ||
123 | int node), | ||
124 | |||
125 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node), | ||
126 | |||
127 | TP_STRUCT__entry( | ||
128 | __field( unsigned long, call_site ) | ||
129 | __field( const void *, ptr ) | ||
130 | __field( size_t, bytes_req ) | ||
131 | __field( size_t, bytes_alloc ) | ||
132 | __field( gfp_t, gfp_flags ) | ||
133 | __field( int, node ) | ||
134 | ), | ||
135 | |||
136 | TP_fast_assign( | ||
137 | __entry->call_site = call_site; | ||
138 | __entry->ptr = ptr; | ||
139 | __entry->bytes_req = bytes_req; | ||
140 | __entry->bytes_alloc = bytes_alloc; | ||
141 | __entry->gfp_flags = gfp_flags; | ||
142 | __entry->node = node; | ||
143 | ), | ||
144 | |||
145 | TP_printk("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%08x node=%d", | ||
146 | __entry->call_site, | ||
147 | __entry->ptr, | ||
148 | __entry->bytes_req, | ||
149 | __entry->bytes_alloc, | ||
150 | __entry->gfp_flags, | ||
151 | __entry->node) | ||
152 | ); | ||
153 | |||
154 | TRACE_EVENT(kfree, | ||
155 | |||
156 | TP_PROTO(unsigned long call_site, const void *ptr), | ||
157 | |||
158 | TP_ARGS(call_site, ptr), | ||
159 | |||
160 | TP_STRUCT__entry( | ||
161 | __field( unsigned long, call_site ) | ||
162 | __field( const void *, ptr ) | ||
163 | ), | ||
164 | |||
165 | TP_fast_assign( | ||
166 | __entry->call_site = call_site; | ||
167 | __entry->ptr = ptr; | ||
168 | ), | ||
169 | |||
170 | TP_printk("call_site=%lx ptr=%p", __entry->call_site, __entry->ptr) | ||
171 | ); | ||
172 | |||
173 | TRACE_EVENT(kmem_cache_free, | ||
174 | |||
175 | TP_PROTO(unsigned long call_site, const void *ptr), | ||
176 | |||
177 | TP_ARGS(call_site, ptr), | ||
178 | |||
179 | TP_STRUCT__entry( | ||
180 | __field( unsigned long, call_site ) | ||
181 | __field( const void *, ptr ) | ||
182 | ), | ||
183 | |||
184 | TP_fast_assign( | ||
185 | __entry->call_site = call_site; | ||
186 | __entry->ptr = ptr; | ||
187 | ), | ||
188 | |||
189 | TP_printk("call_site=%lx ptr=%p", __entry->call_site, __entry->ptr) | ||
190 | ); | ||
191 | #endif /* _TRACE_KMEM_H */ | ||
192 | |||
193 | /* This part must be outside protection */ | ||
194 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/lockdep.h b/include/trace/events/lockdep.h new file mode 100644 index 000000000000..0e956c9dfd7e --- /dev/null +++ b/include/trace/events/lockdep.h | |||
@@ -0,0 +1,96 @@ | |||
1 | #if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_LOCKDEP_H | ||
3 | |||
4 | #include <linux/lockdep.h> | ||
5 | #include <linux/tracepoint.h> | ||
6 | |||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM lockdep | ||
9 | |||
10 | #ifdef CONFIG_LOCKDEP | ||
11 | |||
12 | TRACE_EVENT(lock_acquire, | ||
13 | |||
14 | TP_PROTO(struct lockdep_map *lock, unsigned int subclass, | ||
15 | int trylock, int read, int check, | ||
16 | struct lockdep_map *next_lock, unsigned long ip), | ||
17 | |||
18 | TP_ARGS(lock, subclass, trylock, read, check, next_lock, ip), | ||
19 | |||
20 | TP_STRUCT__entry( | ||
21 | __field(unsigned int, flags) | ||
22 | __string(name, lock->name) | ||
23 | ), | ||
24 | |||
25 | TP_fast_assign( | ||
26 | __entry->flags = (trylock ? 1 : 0) | (read ? 2 : 0); | ||
27 | __assign_str(name, lock->name); | ||
28 | ), | ||
29 | |||
30 | TP_printk("%s%s%s", (__entry->flags & 1) ? "try " : "", | ||
31 | (__entry->flags & 2) ? "read " : "", | ||
32 | __get_str(name)) | ||
33 | ); | ||
34 | |||
35 | TRACE_EVENT(lock_release, | ||
36 | |||
37 | TP_PROTO(struct lockdep_map *lock, int nested, unsigned long ip), | ||
38 | |||
39 | TP_ARGS(lock, nested, ip), | ||
40 | |||
41 | TP_STRUCT__entry( | ||
42 | __string(name, lock->name) | ||
43 | ), | ||
44 | |||
45 | TP_fast_assign( | ||
46 | __assign_str(name, lock->name); | ||
47 | ), | ||
48 | |||
49 | TP_printk("%s", __get_str(name)) | ||
50 | ); | ||
51 | |||
52 | #ifdef CONFIG_LOCK_STAT | ||
53 | |||
54 | TRACE_EVENT(lock_contended, | ||
55 | |||
56 | TP_PROTO(struct lockdep_map *lock, unsigned long ip), | ||
57 | |||
58 | TP_ARGS(lock, ip), | ||
59 | |||
60 | TP_STRUCT__entry( | ||
61 | __string(name, lock->name) | ||
62 | ), | ||
63 | |||
64 | TP_fast_assign( | ||
65 | __assign_str(name, lock->name); | ||
66 | ), | ||
67 | |||
68 | TP_printk("%s", __get_str(name)) | ||
69 | ); | ||
70 | |||
71 | TRACE_EVENT(lock_acquired, | ||
72 | TP_PROTO(struct lockdep_map *lock, unsigned long ip, s64 waittime), | ||
73 | |||
74 | TP_ARGS(lock, ip, waittime), | ||
75 | |||
76 | TP_STRUCT__entry( | ||
77 | __string(name, lock->name) | ||
78 | __field(unsigned long, wait_usec) | ||
79 | __field(unsigned long, wait_nsec_rem) | ||
80 | ), | ||
81 | TP_fast_assign( | ||
82 | __assign_str(name, lock->name); | ||
83 | __entry->wait_nsec_rem = do_div(waittime, NSEC_PER_USEC); | ||
84 | __entry->wait_usec = (unsigned long) waittime; | ||
85 | ), | ||
86 | TP_printk("%s (%lu.%03lu us)", __get_str(name), __entry->wait_usec, | ||
87 | __entry->wait_nsec_rem) | ||
88 | ); | ||
89 | |||
90 | #endif | ||
91 | #endif | ||
92 | |||
93 | #endif /* _TRACE_LOCKDEP_H */ | ||
94 | |||
95 | /* This part must be outside protection */ | ||
96 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/sched_event_types.h b/include/trace/events/sched.h index 63547dc1125f..dd4033cf5b09 100644 --- a/include/trace/sched_event_types.h +++ b/include/trace/events/sched.h | |||
@@ -1,9 +1,8 @@ | |||
1 | #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_SCHED_H | ||
1 | 3 | ||
2 | /* use <trace/sched.h> instead */ | 4 | #include <linux/sched.h> |
3 | #ifndef TRACE_EVENT | 5 | #include <linux/tracepoint.h> |
4 | # error Do not include this file directly. | ||
5 | # error Unless you know what you are doing. | ||
6 | #endif | ||
7 | 6 | ||
8 | #undef TRACE_SYSTEM | 7 | #undef TRACE_SYSTEM |
9 | #define TRACE_SYSTEM sched | 8 | #define TRACE_SYSTEM sched |
@@ -181,9 +180,9 @@ TRACE_EVENT(sched_switch, | |||
181 | */ | 180 | */ |
182 | TRACE_EVENT(sched_migrate_task, | 181 | TRACE_EVENT(sched_migrate_task, |
183 | 182 | ||
184 | TP_PROTO(struct task_struct *p, int orig_cpu, int dest_cpu), | 183 | TP_PROTO(struct task_struct *p, int dest_cpu), |
185 | 184 | ||
186 | TP_ARGS(p, orig_cpu, dest_cpu), | 185 | TP_ARGS(p, dest_cpu), |
187 | 186 | ||
188 | TP_STRUCT__entry( | 187 | TP_STRUCT__entry( |
189 | __array( char, comm, TASK_COMM_LEN ) | 188 | __array( char, comm, TASK_COMM_LEN ) |
@@ -197,7 +196,7 @@ TRACE_EVENT(sched_migrate_task, | |||
197 | memcpy(__entry->comm, p->comm, TASK_COMM_LEN); | 196 | memcpy(__entry->comm, p->comm, TASK_COMM_LEN); |
198 | __entry->pid = p->pid; | 197 | __entry->pid = p->pid; |
199 | __entry->prio = p->prio; | 198 | __entry->prio = p->prio; |
200 | __entry->orig_cpu = orig_cpu; | 199 | __entry->orig_cpu = task_cpu(p); |
201 | __entry->dest_cpu = dest_cpu; | 200 | __entry->dest_cpu = dest_cpu; |
202 | ), | 201 | ), |
203 | 202 | ||
@@ -334,4 +333,7 @@ TRACE_EVENT(sched_signal_send, | |||
334 | __entry->sig, __entry->comm, __entry->pid) | 333 | __entry->sig, __entry->comm, __entry->pid) |
335 | ); | 334 | ); |
336 | 335 | ||
337 | #undef TRACE_SYSTEM | 336 | #endif /* _TRACE_SCHED_H */ |
337 | |||
338 | /* This part must be outside protection */ | ||
339 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h new file mode 100644 index 000000000000..1e8fabb57c06 --- /dev/null +++ b/include/trace/events/skb.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_SKB_H | ||
3 | |||
4 | #include <linux/skbuff.h> | ||
5 | #include <linux/tracepoint.h> | ||
6 | |||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM skb | ||
9 | |||
10 | /* | ||
11 | * Tracepoint for free an sk_buff: | ||
12 | */ | ||
13 | TRACE_EVENT(kfree_skb, | ||
14 | |||
15 | TP_PROTO(struct sk_buff *skb, void *location), | ||
16 | |||
17 | TP_ARGS(skb, location), | ||
18 | |||
19 | TP_STRUCT__entry( | ||
20 | __field( void *, skbaddr ) | ||
21 | __field( unsigned short, protocol ) | ||
22 | __field( void *, location ) | ||
23 | ), | ||
24 | |||
25 | TP_fast_assign( | ||
26 | __entry->skbaddr = skb; | ||
27 | if (skb) { | ||
28 | __entry->protocol = ntohs(skb->protocol); | ||
29 | } | ||
30 | __entry->location = location; | ||
31 | ), | ||
32 | |||
33 | TP_printk("skbaddr=%p protocol=%u location=%p", | ||
34 | __entry->skbaddr, __entry->protocol, __entry->location) | ||
35 | ); | ||
36 | |||
37 | #endif /* _TRACE_SKB_H */ | ||
38 | |||
39 | /* This part must be outside protection */ | ||
40 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h new file mode 100644 index 000000000000..edb02bc9f8ff --- /dev/null +++ b/include/trace/ftrace.h | |||
@@ -0,0 +1,509 @@ | |||
1 | /* | ||
2 | * Stage 1 of the trace events. | ||
3 | * | ||
4 | * Override the macros in <trace/trace_events.h> to include the following: | ||
5 | * | ||
6 | * struct ftrace_raw_<call> { | ||
7 | * struct trace_entry ent; | ||
8 | * <type> <item>; | ||
9 | * <type2> <item2>[<len>]; | ||
10 | * [...] | ||
11 | * }; | ||
12 | * | ||
13 | * The <type> <item> is created by the __field(type, item) macro or | ||
14 | * the __array(type2, item2, len) macro. | ||
15 | * We simply do "type item;", and that will create the fields | ||
16 | * in the structure. | ||
17 | */ | ||
18 | |||
19 | #include <linux/ftrace_event.h> | ||
20 | |||
21 | #undef __array | ||
22 | #define __array(type, item, len) type item[len]; | ||
23 | |||
24 | #undef __field | ||
25 | #define __field(type, item) type item; | ||
26 | |||
27 | #undef __string | ||
28 | #define __string(item, src) int __str_loc_##item; | ||
29 | |||
30 | #undef TP_STRUCT__entry | ||
31 | #define TP_STRUCT__entry(args...) args | ||
32 | |||
33 | #undef TRACE_EVENT | ||
34 | #define TRACE_EVENT(name, proto, args, tstruct, assign, print) \ | ||
35 | struct ftrace_raw_##name { \ | ||
36 | struct trace_entry ent; \ | ||
37 | tstruct \ | ||
38 | char __str_data[0]; \ | ||
39 | }; \ | ||
40 | static struct ftrace_event_call event_##name | ||
41 | |||
42 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ||
43 | |||
44 | |||
45 | /* | ||
46 | * Stage 2 of the trace events. | ||
47 | * | ||
48 | * Include the following: | ||
49 | * | ||
50 | * struct ftrace_str_offsets_<call> { | ||
51 | * int <str1>; | ||
52 | * int <str2>; | ||
53 | * [...] | ||
54 | * }; | ||
55 | * | ||
56 | * The __string() macro will create each int <str>, this is to | ||
57 | * keep the offset of each string from the beggining of the event | ||
58 | * once we perform the strlen() of the src strings. | ||
59 | * | ||
60 | */ | ||
61 | |||
62 | #undef __array | ||
63 | #define __array(type, item, len) | ||
64 | |||
65 | #undef __field | ||
66 | #define __field(type, item); | ||
67 | |||
68 | #undef __string | ||
69 | #define __string(item, src) int item; | ||
70 | |||
71 | #undef TRACE_EVENT | ||
72 | #define TRACE_EVENT(call, proto, args, tstruct, assign, print) \ | ||
73 | struct ftrace_str_offsets_##call { \ | ||
74 | tstruct; \ | ||
75 | }; | ||
76 | |||
77 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ||
78 | |||
79 | /* | ||
80 | * Stage 3 of the trace events. | ||
81 | * | ||
82 | * Override the macros in <trace/trace_events.h> to include the following: | ||
83 | * | ||
84 | * enum print_line_t | ||
85 | * ftrace_raw_output_<call>(struct trace_iterator *iter, int flags) | ||
86 | * { | ||
87 | * struct trace_seq *s = &iter->seq; | ||
88 | * struct ftrace_raw_<call> *field; <-- defined in stage 1 | ||
89 | * struct trace_entry *entry; | ||
90 | * int ret; | ||
91 | * | ||
92 | * entry = iter->ent; | ||
93 | * | ||
94 | * if (entry->type != event_<call>.id) { | ||
95 | * WARN_ON_ONCE(1); | ||
96 | * return TRACE_TYPE_UNHANDLED; | ||
97 | * } | ||
98 | * | ||
99 | * field = (typeof(field))entry; | ||
100 | * | ||
101 | * ret = trace_seq_printf(s, <TP_printk> "\n"); | ||
102 | * if (!ret) | ||
103 | * return TRACE_TYPE_PARTIAL_LINE; | ||
104 | * | ||
105 | * return TRACE_TYPE_HANDLED; | ||
106 | * } | ||
107 | * | ||
108 | * This is the method used to print the raw event to the trace | ||
109 | * output format. Note, this is not needed if the data is read | ||
110 | * in binary. | ||
111 | */ | ||
112 | |||
113 | #undef __entry | ||
114 | #define __entry field | ||
115 | |||
116 | #undef TP_printk | ||
117 | #define TP_printk(fmt, args...) fmt "\n", args | ||
118 | |||
119 | #undef __get_str | ||
120 | #define __get_str(field) ((char *)__entry + __entry->__str_loc_##field) | ||
121 | |||
122 | #undef TRACE_EVENT | ||
123 | #define TRACE_EVENT(call, proto, args, tstruct, assign, print) \ | ||
124 | enum print_line_t \ | ||
125 | ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ | ||
126 | { \ | ||
127 | struct trace_seq *s = &iter->seq; \ | ||
128 | struct ftrace_raw_##call *field; \ | ||
129 | struct trace_entry *entry; \ | ||
130 | int ret; \ | ||
131 | \ | ||
132 | entry = iter->ent; \ | ||
133 | \ | ||
134 | if (entry->type != event_##call.id) { \ | ||
135 | WARN_ON_ONCE(1); \ | ||
136 | return TRACE_TYPE_UNHANDLED; \ | ||
137 | } \ | ||
138 | \ | ||
139 | field = (typeof(field))entry; \ | ||
140 | \ | ||
141 | ret = trace_seq_printf(s, #call ": " print); \ | ||
142 | if (!ret) \ | ||
143 | return TRACE_TYPE_PARTIAL_LINE; \ | ||
144 | \ | ||
145 | return TRACE_TYPE_HANDLED; \ | ||
146 | } | ||
147 | |||
148 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ||
149 | |||
150 | /* | ||
151 | * Setup the showing format of trace point. | ||
152 | * | ||
153 | * int | ||
154 | * ftrace_format_##call(struct trace_seq *s) | ||
155 | * { | ||
156 | * struct ftrace_raw_##call field; | ||
157 | * int ret; | ||
158 | * | ||
159 | * ret = trace_seq_printf(s, #type " " #item ";" | ||
160 | * " offset:%u; size:%u;\n", | ||
161 | * offsetof(struct ftrace_raw_##call, item), | ||
162 | * sizeof(field.type)); | ||
163 | * | ||
164 | * } | ||
165 | */ | ||
166 | |||
167 | #undef TP_STRUCT__entry | ||
168 | #define TP_STRUCT__entry(args...) args | ||
169 | |||
170 | #undef __field | ||
171 | #define __field(type, item) \ | ||
172 | ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \ | ||
173 | "offset:%u;\tsize:%u;\n", \ | ||
174 | (unsigned int)offsetof(typeof(field), item), \ | ||
175 | (unsigned int)sizeof(field.item)); \ | ||
176 | if (!ret) \ | ||
177 | return 0; | ||
178 | |||
179 | #undef __array | ||
180 | #define __array(type, item, len) \ | ||
181 | ret = trace_seq_printf(s, "\tfield:" #type " " #item "[" #len "];\t" \ | ||
182 | "offset:%u;\tsize:%u;\n", \ | ||
183 | (unsigned int)offsetof(typeof(field), item), \ | ||
184 | (unsigned int)sizeof(field.item)); \ | ||
185 | if (!ret) \ | ||
186 | return 0; | ||
187 | |||
188 | #undef __string | ||
189 | #define __string(item, src) \ | ||
190 | ret = trace_seq_printf(s, "\tfield: __str_loc " #item ";\t" \ | ||
191 | "offset:%u;tsize:%u;\n", \ | ||
192 | (unsigned int)offsetof(typeof(field), \ | ||
193 | __str_loc_##item), \ | ||
194 | (unsigned int)sizeof(field.__str_loc_##item)); \ | ||
195 | if (!ret) \ | ||
196 | return 0; | ||
197 | |||
198 | #undef __entry | ||
199 | #define __entry REC | ||
200 | |||
201 | #undef TP_printk | ||
202 | #define TP_printk(fmt, args...) "%s, %s\n", #fmt, __stringify(args) | ||
203 | |||
204 | #undef TP_fast_assign | ||
205 | #define TP_fast_assign(args...) args | ||
206 | |||
207 | #undef TRACE_EVENT | ||
208 | #define TRACE_EVENT(call, proto, args, tstruct, func, print) \ | ||
209 | static int \ | ||
210 | ftrace_format_##call(struct trace_seq *s) \ | ||
211 | { \ | ||
212 | struct ftrace_raw_##call field __attribute__((unused)); \ | ||
213 | int ret = 0; \ | ||
214 | \ | ||
215 | tstruct; \ | ||
216 | \ | ||
217 | trace_seq_printf(s, "\nprint fmt: " print); \ | ||
218 | \ | ||
219 | return ret; \ | ||
220 | } | ||
221 | |||
222 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ||
223 | |||
224 | #undef __field | ||
225 | #define __field(type, item) \ | ||
226 | ret = trace_define_field(event_call, #type, #item, \ | ||
227 | offsetof(typeof(field), item), \ | ||
228 | sizeof(field.item), is_signed_type(type)); \ | ||
229 | if (ret) \ | ||
230 | return ret; | ||
231 | |||
232 | #undef __array | ||
233 | #define __array(type, item, len) \ | ||
234 | BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ | ||
235 | ret = trace_define_field(event_call, #type "[" #len "]", #item, \ | ||
236 | offsetof(typeof(field), item), \ | ||
237 | sizeof(field.item), 0); \ | ||
238 | if (ret) \ | ||
239 | return ret; | ||
240 | |||
241 | #undef __string | ||
242 | #define __string(item, src) \ | ||
243 | ret = trace_define_field(event_call, "__str_loc", #item, \ | ||
244 | offsetof(typeof(field), __str_loc_##item), \ | ||
245 | sizeof(field.__str_loc_##item), 0); | ||
246 | |||
247 | #undef TRACE_EVENT | ||
248 | #define TRACE_EVENT(call, proto, args, tstruct, func, print) \ | ||
249 | int \ | ||
250 | ftrace_define_fields_##call(void) \ | ||
251 | { \ | ||
252 | struct ftrace_raw_##call field; \ | ||
253 | struct ftrace_event_call *event_call = &event_##call; \ | ||
254 | int ret; \ | ||
255 | \ | ||
256 | __common_field(int, type, 1); \ | ||
257 | __common_field(unsigned char, flags, 0); \ | ||
258 | __common_field(unsigned char, preempt_count, 0); \ | ||
259 | __common_field(int, pid, 1); \ | ||
260 | __common_field(int, tgid, 1); \ | ||
261 | \ | ||
262 | tstruct; \ | ||
263 | \ | ||
264 | return ret; \ | ||
265 | } | ||
266 | |||
267 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ||
268 | |||
269 | /* | ||
270 | * Stage 4 of the trace events. | ||
271 | * | ||
272 | * Override the macros in <trace/trace_events.h> to include the following: | ||
273 | * | ||
274 | * static void ftrace_event_<call>(proto) | ||
275 | * { | ||
276 | * event_trace_printk(_RET_IP_, "<call>: " <fmt>); | ||
277 | * } | ||
278 | * | ||
279 | * static int ftrace_reg_event_<call>(void) | ||
280 | * { | ||
281 | * int ret; | ||
282 | * | ||
283 | * ret = register_trace_<call>(ftrace_event_<call>); | ||
284 | * if (!ret) | ||
285 | * pr_info("event trace: Could not activate trace point " | ||
286 | * "probe to <call>"); | ||
287 | * return ret; | ||
288 | * } | ||
289 | * | ||
290 | * static void ftrace_unreg_event_<call>(void) | ||
291 | * { | ||
292 | * unregister_trace_<call>(ftrace_event_<call>); | ||
293 | * } | ||
294 | * | ||
295 | * | ||
296 | * For those macros defined with TRACE_EVENT: | ||
297 | * | ||
298 | * static struct ftrace_event_call event_<call>; | ||
299 | * | ||
300 | * static void ftrace_raw_event_<call>(proto) | ||
301 | * { | ||
302 | * struct ring_buffer_event *event; | ||
303 | * struct ftrace_raw_<call> *entry; <-- defined in stage 1 | ||
304 | * unsigned long irq_flags; | ||
305 | * int pc; | ||
306 | * | ||
307 | * local_save_flags(irq_flags); | ||
308 | * pc = preempt_count(); | ||
309 | * | ||
310 | * event = trace_current_buffer_lock_reserve(event_<call>.id, | ||
311 | * sizeof(struct ftrace_raw_<call>), | ||
312 | * irq_flags, pc); | ||
313 | * if (!event) | ||
314 | * return; | ||
315 | * entry = ring_buffer_event_data(event); | ||
316 | * | ||
317 | * <assign>; <-- Here we assign the entries by the __field and | ||
318 | * __array macros. | ||
319 | * | ||
320 | * trace_current_buffer_unlock_commit(event, irq_flags, pc); | ||
321 | * } | ||
322 | * | ||
323 | * static int ftrace_raw_reg_event_<call>(void) | ||
324 | * { | ||
325 | * int ret; | ||
326 | * | ||
327 | * ret = register_trace_<call>(ftrace_raw_event_<call>); | ||
328 | * if (!ret) | ||
329 | * pr_info("event trace: Could not activate trace point " | ||
330 | * "probe to <call>"); | ||
331 | * return ret; | ||
332 | * } | ||
333 | * | ||
334 | * static void ftrace_unreg_event_<call>(void) | ||
335 | * { | ||
336 | * unregister_trace_<call>(ftrace_raw_event_<call>); | ||
337 | * } | ||
338 | * | ||
339 | * static struct trace_event ftrace_event_type_<call> = { | ||
340 | * .trace = ftrace_raw_output_<call>, <-- stage 2 | ||
341 | * }; | ||
342 | * | ||
343 | * static int ftrace_raw_init_event_<call>(void) | ||
344 | * { | ||
345 | * int id; | ||
346 | * | ||
347 | * id = register_ftrace_event(&ftrace_event_type_<call>); | ||
348 | * if (!id) | ||
349 | * return -ENODEV; | ||
350 | * event_<call>.id = id; | ||
351 | * return 0; | ||
352 | * } | ||
353 | * | ||
354 | * static struct ftrace_event_call __used | ||
355 | * __attribute__((__aligned__(4))) | ||
356 | * __attribute__((section("_ftrace_events"))) event_<call> = { | ||
357 | * .name = "<call>", | ||
358 | * .system = "<system>", | ||
359 | * .raw_init = ftrace_raw_init_event_<call>, | ||
360 | * .regfunc = ftrace_reg_event_<call>, | ||
361 | * .unregfunc = ftrace_unreg_event_<call>, | ||
362 | * .show_format = ftrace_format_<call>, | ||
363 | * } | ||
364 | * | ||
365 | */ | ||
366 | |||
367 | #undef TP_FMT | ||
368 | #define TP_FMT(fmt, args...) fmt "\n", ##args | ||
369 | |||
370 | #ifdef CONFIG_EVENT_PROFILE | ||
371 | #define _TRACE_PROFILE(call, proto, args) \ | ||
372 | static void ftrace_profile_##call(proto) \ | ||
373 | { \ | ||
374 | extern void perf_tpcounter_event(int); \ | ||
375 | perf_tpcounter_event(event_##call.id); \ | ||
376 | } \ | ||
377 | \ | ||
378 | static int ftrace_profile_enable_##call(struct ftrace_event_call *call) \ | ||
379 | { \ | ||
380 | int ret = 0; \ | ||
381 | \ | ||
382 | if (!atomic_inc_return(&call->profile_count)) \ | ||
383 | ret = register_trace_##call(ftrace_profile_##call); \ | ||
384 | \ | ||
385 | return ret; \ | ||
386 | } \ | ||
387 | \ | ||
388 | static void ftrace_profile_disable_##call(struct ftrace_event_call *call) \ | ||
389 | { \ | ||
390 | if (atomic_add_negative(-1, &call->profile_count)) \ | ||
391 | unregister_trace_##call(ftrace_profile_##call); \ | ||
392 | } | ||
393 | |||
394 | #define _TRACE_PROFILE_INIT(call) \ | ||
395 | .profile_count = ATOMIC_INIT(-1), \ | ||
396 | .profile_enable = ftrace_profile_enable_##call, \ | ||
397 | .profile_disable = ftrace_profile_disable_##call, | ||
398 | |||
399 | #else | ||
400 | #define _TRACE_PROFILE(call, proto, args) | ||
401 | #define _TRACE_PROFILE_INIT(call) | ||
402 | #endif | ||
403 | |||
404 | #undef __entry | ||
405 | #define __entry entry | ||
406 | |||
407 | #undef __field | ||
408 | #define __field(type, item) | ||
409 | |||
410 | #undef __array | ||
411 | #define __array(type, item, len) | ||
412 | |||
413 | #undef __string | ||
414 | #define __string(item, src) \ | ||
415 | __str_offsets.item = __str_size + \ | ||
416 | offsetof(typeof(*entry), __str_data); \ | ||
417 | __str_size += strlen(src) + 1; | ||
418 | |||
419 | #undef __assign_str | ||
420 | #define __assign_str(dst, src) \ | ||
421 | __entry->__str_loc_##dst = __str_offsets.dst; \ | ||
422 | strcpy(__get_str(dst), src); | ||
423 | |||
424 | #undef TRACE_EVENT | ||
425 | #define TRACE_EVENT(call, proto, args, tstruct, assign, print) \ | ||
426 | _TRACE_PROFILE(call, PARAMS(proto), PARAMS(args)) \ | ||
427 | \ | ||
428 | static struct ftrace_event_call event_##call; \ | ||
429 | \ | ||
430 | static void ftrace_raw_event_##call(proto) \ | ||
431 | { \ | ||
432 | struct ftrace_str_offsets_##call __maybe_unused __str_offsets; \ | ||
433 | struct ftrace_event_call *call = &event_##call; \ | ||
434 | struct ring_buffer_event *event; \ | ||
435 | struct ftrace_raw_##call *entry; \ | ||
436 | unsigned long irq_flags; \ | ||
437 | int __str_size = 0; \ | ||
438 | int pc; \ | ||
439 | \ | ||
440 | local_save_flags(irq_flags); \ | ||
441 | pc = preempt_count(); \ | ||
442 | \ | ||
443 | tstruct; \ | ||
444 | \ | ||
445 | event = trace_current_buffer_lock_reserve(event_##call.id, \ | ||
446 | sizeof(struct ftrace_raw_##call) + __str_size,\ | ||
447 | irq_flags, pc); \ | ||
448 | if (!event) \ | ||
449 | return; \ | ||
450 | entry = ring_buffer_event_data(event); \ | ||
451 | \ | ||
452 | assign; \ | ||
453 | \ | ||
454 | if (!filter_current_check_discard(call, entry, event)) \ | ||
455 | trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \ | ||
456 | } \ | ||
457 | \ | ||
458 | static int ftrace_raw_reg_event_##call(void) \ | ||
459 | { \ | ||
460 | int ret; \ | ||
461 | \ | ||
462 | ret = register_trace_##call(ftrace_raw_event_##call); \ | ||
463 | if (ret) \ | ||
464 | pr_info("event trace: Could not activate trace point " \ | ||
465 | "probe to " #call "\n"); \ | ||
466 | return ret; \ | ||
467 | } \ | ||
468 | \ | ||
469 | static void ftrace_raw_unreg_event_##call(void) \ | ||
470 | { \ | ||
471 | unregister_trace_##call(ftrace_raw_event_##call); \ | ||
472 | } \ | ||
473 | \ | ||
474 | static struct trace_event ftrace_event_type_##call = { \ | ||
475 | .trace = ftrace_raw_output_##call, \ | ||
476 | }; \ | ||
477 | \ | ||
478 | static int ftrace_raw_init_event_##call(void) \ | ||
479 | { \ | ||
480 | int id; \ | ||
481 | \ | ||
482 | id = register_ftrace_event(&ftrace_event_type_##call); \ | ||
483 | if (!id) \ | ||
484 | return -ENODEV; \ | ||
485 | event_##call.id = id; \ | ||
486 | INIT_LIST_HEAD(&event_##call.fields); \ | ||
487 | init_preds(&event_##call); \ | ||
488 | return 0; \ | ||
489 | } \ | ||
490 | \ | ||
491 | static struct ftrace_event_call __used \ | ||
492 | __attribute__((__aligned__(4))) \ | ||
493 | __attribute__((section("_ftrace_events"))) event_##call = { \ | ||
494 | .name = #call, \ | ||
495 | .system = __stringify(TRACE_SYSTEM), \ | ||
496 | .event = &ftrace_event_type_##call, \ | ||
497 | .raw_init = ftrace_raw_init_event_##call, \ | ||
498 | .regfunc = ftrace_raw_reg_event_##call, \ | ||
499 | .unregfunc = ftrace_raw_unreg_event_##call, \ | ||
500 | .show_format = ftrace_format_##call, \ | ||
501 | .define_fields = ftrace_define_fields_##call, \ | ||
502 | _TRACE_PROFILE_INIT(call) \ | ||
503 | } | ||
504 | |||
505 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ||
506 | |||
507 | #undef _TRACE_PROFILE | ||
508 | #undef _TRACE_PROFILE_INIT | ||
509 | |||
diff --git a/include/trace/irq.h b/include/trace/irq.h deleted file mode 100644 index ff5d4495dc37..000000000000 --- a/include/trace/irq.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _TRACE_IRQ_H | ||
2 | #define _TRACE_IRQ_H | ||
3 | |||
4 | #include <linux/interrupt.h> | ||
5 | #include <linux/tracepoint.h> | ||
6 | |||
7 | #include <trace/irq_event_types.h> | ||
8 | |||
9 | #endif | ||
diff --git a/include/trace/irq_event_types.h b/include/trace/irq_event_types.h deleted file mode 100644 index 85964ebd47ec..000000000000 --- a/include/trace/irq_event_types.h +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | |||
2 | /* use <trace/irq.h> instead */ | ||
3 | #ifndef TRACE_FORMAT | ||
4 | # error Do not include this file directly. | ||
5 | # error Unless you know what you are doing. | ||
6 | #endif | ||
7 | |||
8 | #undef TRACE_SYSTEM | ||
9 | #define TRACE_SYSTEM irq | ||
10 | |||
11 | /* | ||
12 | * Tracepoint for entry of interrupt handler: | ||
13 | */ | ||
14 | TRACE_FORMAT(irq_handler_entry, | ||
15 | TP_PROTO(int irq, struct irqaction *action), | ||
16 | TP_ARGS(irq, action), | ||
17 | TP_FMT("irq=%d handler=%s", irq, action->name) | ||
18 | ); | ||
19 | |||
20 | /* | ||
21 | * Tracepoint for return of an interrupt handler: | ||
22 | */ | ||
23 | TRACE_EVENT(irq_handler_exit, | ||
24 | |||
25 | TP_PROTO(int irq, struct irqaction *action, int ret), | ||
26 | |||
27 | TP_ARGS(irq, action, ret), | ||
28 | |||
29 | TP_STRUCT__entry( | ||
30 | __field( int, irq ) | ||
31 | __field( int, ret ) | ||
32 | ), | ||
33 | |||
34 | TP_fast_assign( | ||
35 | __entry->irq = irq; | ||
36 | __entry->ret = ret; | ||
37 | ), | ||
38 | |||
39 | TP_printk("irq=%d return=%s", | ||
40 | __entry->irq, __entry->ret ? "handled" : "unhandled") | ||
41 | ); | ||
42 | |||
43 | TRACE_FORMAT(softirq_entry, | ||
44 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | ||
45 | TP_ARGS(h, vec), | ||
46 | TP_FMT("softirq=%d action=%s", (int)(h - vec), softirq_to_name[h-vec]) | ||
47 | ); | ||
48 | |||
49 | TRACE_FORMAT(softirq_exit, | ||
50 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | ||
51 | TP_ARGS(h, vec), | ||
52 | TP_FMT("softirq=%d action=%s", (int)(h - vec), softirq_to_name[h-vec]) | ||
53 | ); | ||
54 | |||
55 | #undef TRACE_SYSTEM | ||
diff --git a/include/trace/kmemtrace.h b/include/trace/kmemtrace.h deleted file mode 100644 index 28ee69f9cd46..000000000000 --- a/include/trace/kmemtrace.h +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Eduard - Gabriel Munteanu | ||
3 | * | ||
4 | * This file is released under GPL version 2. | ||
5 | */ | ||
6 | |||
7 | #ifndef _LINUX_KMEMTRACE_H | ||
8 | #define _LINUX_KMEMTRACE_H | ||
9 | |||
10 | #ifdef __KERNEL__ | ||
11 | |||
12 | #include <linux/tracepoint.h> | ||
13 | #include <linux/types.h> | ||
14 | |||
15 | #ifdef CONFIG_KMEMTRACE | ||
16 | extern void kmemtrace_init(void); | ||
17 | #else | ||
18 | static inline void kmemtrace_init(void) | ||
19 | { | ||
20 | } | ||
21 | #endif | ||
22 | |||
23 | DECLARE_TRACE(kmalloc, | ||
24 | TP_PROTO(unsigned long call_site, | ||
25 | const void *ptr, | ||
26 | size_t bytes_req, | ||
27 | size_t bytes_alloc, | ||
28 | gfp_t gfp_flags), | ||
29 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags)); | ||
30 | DECLARE_TRACE(kmem_cache_alloc, | ||
31 | TP_PROTO(unsigned long call_site, | ||
32 | const void *ptr, | ||
33 | size_t bytes_req, | ||
34 | size_t bytes_alloc, | ||
35 | gfp_t gfp_flags), | ||
36 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags)); | ||
37 | DECLARE_TRACE(kmalloc_node, | ||
38 | TP_PROTO(unsigned long call_site, | ||
39 | const void *ptr, | ||
40 | size_t bytes_req, | ||
41 | size_t bytes_alloc, | ||
42 | gfp_t gfp_flags, | ||
43 | int node), | ||
44 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node)); | ||
45 | DECLARE_TRACE(kmem_cache_alloc_node, | ||
46 | TP_PROTO(unsigned long call_site, | ||
47 | const void *ptr, | ||
48 | size_t bytes_req, | ||
49 | size_t bytes_alloc, | ||
50 | gfp_t gfp_flags, | ||
51 | int node), | ||
52 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node)); | ||
53 | DECLARE_TRACE(kfree, | ||
54 | TP_PROTO(unsigned long call_site, const void *ptr), | ||
55 | TP_ARGS(call_site, ptr)); | ||
56 | DECLARE_TRACE(kmem_cache_free, | ||
57 | TP_PROTO(unsigned long call_site, const void *ptr), | ||
58 | TP_ARGS(call_site, ptr)); | ||
59 | |||
60 | #endif /* __KERNEL__ */ | ||
61 | |||
62 | #endif /* _LINUX_KMEMTRACE_H */ | ||
63 | |||
diff --git a/include/trace/lockdep.h b/include/trace/lockdep.h deleted file mode 100644 index 5ca67df87f2a..000000000000 --- a/include/trace/lockdep.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _TRACE_LOCKDEP_H | ||
2 | #define _TRACE_LOCKDEP_H | ||
3 | |||
4 | #include <linux/lockdep.h> | ||
5 | #include <linux/tracepoint.h> | ||
6 | |||
7 | #include <trace/lockdep_event_types.h> | ||
8 | |||
9 | #endif | ||
diff --git a/include/trace/lockdep_event_types.h b/include/trace/lockdep_event_types.h deleted file mode 100644 index adccfcd2ec8f..000000000000 --- a/include/trace/lockdep_event_types.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | |||
2 | #ifndef TRACE_FORMAT | ||
3 | # error Do not include this file directly. | ||
4 | # error Unless you know what you are doing. | ||
5 | #endif | ||
6 | |||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM lock | ||
9 | |||
10 | #ifdef CONFIG_LOCKDEP | ||
11 | |||
12 | TRACE_FORMAT(lock_acquire, | ||
13 | TP_PROTO(struct lockdep_map *lock, unsigned int subclass, | ||
14 | int trylock, int read, int check, | ||
15 | struct lockdep_map *next_lock, unsigned long ip), | ||
16 | TP_ARGS(lock, subclass, trylock, read, check, next_lock, ip), | ||
17 | TP_FMT("%s%s%s", trylock ? "try " : "", | ||
18 | read ? "read " : "", lock->name) | ||
19 | ); | ||
20 | |||
21 | TRACE_FORMAT(lock_release, | ||
22 | TP_PROTO(struct lockdep_map *lock, int nested, unsigned long ip), | ||
23 | TP_ARGS(lock, nested, ip), | ||
24 | TP_FMT("%s", lock->name) | ||
25 | ); | ||
26 | |||
27 | #ifdef CONFIG_LOCK_STAT | ||
28 | |||
29 | TRACE_FORMAT(lock_contended, | ||
30 | TP_PROTO(struct lockdep_map *lock, unsigned long ip), | ||
31 | TP_ARGS(lock, ip), | ||
32 | TP_FMT("%s", lock->name) | ||
33 | ); | ||
34 | |||
35 | TRACE_FORMAT(lock_acquired, | ||
36 | TP_PROTO(struct lockdep_map *lock, unsigned long ip), | ||
37 | TP_ARGS(lock, ip), | ||
38 | TP_FMT("%s", lock->name) | ||
39 | ); | ||
40 | |||
41 | #endif | ||
42 | #endif | ||
43 | |||
44 | #undef TRACE_SYSTEM | ||
diff --git a/include/trace/sched.h b/include/trace/sched.h deleted file mode 100644 index 4e372a1a29bf..000000000000 --- a/include/trace/sched.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _TRACE_SCHED_H | ||
2 | #define _TRACE_SCHED_H | ||
3 | |||
4 | #include <linux/sched.h> | ||
5 | #include <linux/tracepoint.h> | ||
6 | |||
7 | #include <trace/sched_event_types.h> | ||
8 | |||
9 | #endif | ||
diff --git a/include/trace/skb.h b/include/trace/skb.h deleted file mode 100644 index b66206d9be72..000000000000 --- a/include/trace/skb.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef _TRACE_SKB_H_ | ||
2 | #define _TRACE_SKB_H_ | ||
3 | |||
4 | #include <linux/skbuff.h> | ||
5 | #include <linux/tracepoint.h> | ||
6 | |||
7 | DECLARE_TRACE(kfree_skb, | ||
8 | TP_PROTO(struct sk_buff *skb, void *location), | ||
9 | TP_ARGS(skb, location)); | ||
10 | |||
11 | #endif | ||
diff --git a/include/trace/trace_event_types.h b/include/trace/trace_event_types.h deleted file mode 100644 index df56f5694be6..000000000000 --- a/include/trace/trace_event_types.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* trace/<type>_event_types.h here */ | ||
2 | |||
3 | #include <trace/sched_event_types.h> | ||
4 | #include <trace/irq_event_types.h> | ||
5 | #include <trace/lockdep_event_types.h> | ||
diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h deleted file mode 100644 index fd13750ca4ba..000000000000 --- a/include/trace/trace_events.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* trace/<type>.h here */ | ||
2 | |||
3 | #include <trace/sched.h> | ||
4 | #include <trace/irq.h> | ||
5 | #include <trace/lockdep.h> | ||