diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/ftrace_event.h | 16 | ||||
-rw-r--r-- | include/linux/gpio/driver.h | 14 | ||||
-rw-r--r-- | include/linux/hid-sensor-hub.h | 3 | ||||
-rw-r--r-- | include/linux/irqreturn.h | 2 | ||||
-rw-r--r-- | include/linux/padata.h | 3 | ||||
-rw-r--r-- | include/linux/sched.h | 2 | ||||
-rw-r--r-- | include/linux/slab.h | 102 | ||||
-rw-r--r-- | include/linux/tegra-powergate.h | 27 | ||||
-rw-r--r-- | include/linux/tracepoint.h | 4 |
9 files changed, 110 insertions, 63 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 9abbe630c456..8c9b7a1c4138 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -248,6 +248,9 @@ struct ftrace_event_call { | |||
248 | #ifdef CONFIG_PERF_EVENTS | 248 | #ifdef CONFIG_PERF_EVENTS |
249 | int perf_refcount; | 249 | int perf_refcount; |
250 | struct hlist_head __percpu *perf_events; | 250 | struct hlist_head __percpu *perf_events; |
251 | |||
252 | int (*perf_perm)(struct ftrace_event_call *, | ||
253 | struct perf_event *); | ||
251 | #endif | 254 | #endif |
252 | }; | 255 | }; |
253 | 256 | ||
@@ -317,6 +320,19 @@ struct ftrace_event_file { | |||
317 | } \ | 320 | } \ |
318 | early_initcall(trace_init_flags_##name); | 321 | early_initcall(trace_init_flags_##name); |
319 | 322 | ||
323 | #define __TRACE_EVENT_PERF_PERM(name, expr...) \ | ||
324 | static int perf_perm_##name(struct ftrace_event_call *tp_event, \ | ||
325 | struct perf_event *p_event) \ | ||
326 | { \ | ||
327 | return ({ expr; }); \ | ||
328 | } \ | ||
329 | static int __init trace_init_perf_perm_##name(void) \ | ||
330 | { \ | ||
331 | event_##name.perf_perm = &perf_perm_##name; \ | ||
332 | return 0; \ | ||
333 | } \ | ||
334 | early_initcall(trace_init_perf_perm_##name); | ||
335 | |||
320 | #define PERF_MAX_TRACE_SIZE 2048 | 336 | #define PERF_MAX_TRACE_SIZE 2048 |
321 | 337 | ||
322 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ | 338 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ |
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 656a27efb2c8..3ea2cf6b0e6c 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h | |||
@@ -2,9 +2,12 @@ | |||
2 | #define __LINUX_GPIO_DRIVER_H | 2 | #define __LINUX_GPIO_DRIVER_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/module.h> | ||
5 | 6 | ||
6 | struct device; | 7 | struct device; |
7 | struct gpio_desc; | 8 | struct gpio_desc; |
9 | struct of_phandle_args; | ||
10 | struct device_node; | ||
8 | struct seq_file; | 11 | struct seq_file; |
9 | 12 | ||
10 | /** | 13 | /** |
@@ -125,6 +128,13 @@ extern struct gpio_chip *gpiochip_find(void *data, | |||
125 | int gpiod_lock_as_irq(struct gpio_desc *desc); | 128 | int gpiod_lock_as_irq(struct gpio_desc *desc); |
126 | void gpiod_unlock_as_irq(struct gpio_desc *desc); | 129 | void gpiod_unlock_as_irq(struct gpio_desc *desc); |
127 | 130 | ||
131 | enum gpio_lookup_flags { | ||
132 | GPIO_ACTIVE_HIGH = (0 << 0), | ||
133 | GPIO_ACTIVE_LOW = (1 << 0), | ||
134 | GPIO_OPEN_DRAIN = (1 << 1), | ||
135 | GPIO_OPEN_SOURCE = (1 << 2), | ||
136 | }; | ||
137 | |||
128 | /** | 138 | /** |
129 | * Lookup table for associating GPIOs to specific devices and functions using | 139 | * Lookup table for associating GPIOs to specific devices and functions using |
130 | * platform data. | 140 | * platform data. |
@@ -152,9 +162,9 @@ struct gpiod_lookup { | |||
152 | */ | 162 | */ |
153 | unsigned int idx; | 163 | unsigned int idx; |
154 | /* | 164 | /* |
155 | * mask of GPIOF_* values | 165 | * mask of GPIO_* values |
156 | */ | 166 | */ |
157 | unsigned long flags; | 167 | enum gpio_lookup_flags flags; |
158 | }; | 168 | }; |
159 | 169 | ||
160 | /* | 170 | /* |
diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h index a265af294ea4..206a2af6b62b 100644 --- a/include/linux/hid-sensor-hub.h +++ b/include/linux/hid-sensor-hub.h | |||
@@ -21,6 +21,8 @@ | |||
21 | 21 | ||
22 | #include <linux/hid.h> | 22 | #include <linux/hid.h> |
23 | #include <linux/hid-sensor-ids.h> | 23 | #include <linux/hid-sensor-ids.h> |
24 | #include <linux/iio/iio.h> | ||
25 | #include <linux/iio/trigger.h> | ||
24 | 26 | ||
25 | /** | 27 | /** |
26 | * struct hid_sensor_hub_attribute_info - Attribute info | 28 | * struct hid_sensor_hub_attribute_info - Attribute info |
@@ -184,6 +186,7 @@ struct hid_sensor_common { | |||
184 | struct platform_device *pdev; | 186 | struct platform_device *pdev; |
185 | unsigned usage_id; | 187 | unsigned usage_id; |
186 | bool data_ready; | 188 | bool data_ready; |
189 | struct iio_trigger *trigger; | ||
187 | struct hid_sensor_hub_attribute_info poll; | 190 | struct hid_sensor_hub_attribute_info poll; |
188 | struct hid_sensor_hub_attribute_info report_state; | 191 | struct hid_sensor_hub_attribute_info report_state; |
189 | struct hid_sensor_hub_attribute_info power_state; | 192 | struct hid_sensor_hub_attribute_info power_state; |
diff --git a/include/linux/irqreturn.h b/include/linux/irqreturn.h index 714ba08dc092..e374e369fb2f 100644 --- a/include/linux/irqreturn.h +++ b/include/linux/irqreturn.h | |||
@@ -14,6 +14,6 @@ enum irqreturn { | |||
14 | }; | 14 | }; |
15 | 15 | ||
16 | typedef enum irqreturn irqreturn_t; | 16 | typedef enum irqreturn irqreturn_t; |
17 | #define IRQ_RETVAL(x) ((x) != IRQ_NONE) | 17 | #define IRQ_RETVAL(x) ((x) ? IRQ_HANDLED : IRQ_NONE) |
18 | 18 | ||
19 | #endif | 19 | #endif |
diff --git a/include/linux/padata.h b/include/linux/padata.h index 86292beebfe2..438694650471 100644 --- a/include/linux/padata.h +++ b/include/linux/padata.h | |||
@@ -129,10 +129,9 @@ struct parallel_data { | |||
129 | struct padata_serial_queue __percpu *squeue; | 129 | struct padata_serial_queue __percpu *squeue; |
130 | atomic_t reorder_objects; | 130 | atomic_t reorder_objects; |
131 | atomic_t refcnt; | 131 | atomic_t refcnt; |
132 | atomic_t seq_nr; | ||
132 | struct padata_cpumask cpumask; | 133 | struct padata_cpumask cpumask; |
133 | spinlock_t lock ____cacheline_aligned; | 134 | spinlock_t lock ____cacheline_aligned; |
134 | spinlock_t seq_lock; | ||
135 | unsigned int seq_nr; | ||
136 | unsigned int processed; | 135 | unsigned int processed; |
137 | struct timer_list timer; | 136 | struct timer_list timer; |
138 | }; | 137 | }; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 7e35d4b9e14a..768b037dfacb 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -831,8 +831,6 @@ struct sched_domain { | |||
831 | unsigned int balance_interval; /* initialise to 1. units in ms. */ | 831 | unsigned int balance_interval; /* initialise to 1. units in ms. */ |
832 | unsigned int nr_balance_failed; /* initialise to 0 */ | 832 | unsigned int nr_balance_failed; /* initialise to 0 */ |
833 | 833 | ||
834 | u64 last_update; | ||
835 | |||
836 | /* idle_balance() stats */ | 834 | /* idle_balance() stats */ |
837 | u64 max_newidle_lb_cost; | 835 | u64 max_newidle_lb_cost; |
838 | unsigned long next_decay_max_lb_cost; | 836 | unsigned long next_decay_max_lb_cost; |
diff --git a/include/linux/slab.h b/include/linux/slab.h index c2bba248fa63..1e2f4fe12773 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -388,10 +388,55 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags) | |||
388 | /** | 388 | /** |
389 | * kmalloc - allocate memory | 389 | * kmalloc - allocate memory |
390 | * @size: how many bytes of memory are required. | 390 | * @size: how many bytes of memory are required. |
391 | * @flags: the type of memory to allocate (see kcalloc). | 391 | * @flags: the type of memory to allocate. |
392 | * | 392 | * |
393 | * kmalloc is the normal method of allocating memory | 393 | * kmalloc is the normal method of allocating memory |
394 | * for objects smaller than page size in the kernel. | 394 | * for objects smaller than page size in the kernel. |
395 | * | ||
396 | * The @flags argument may be one of: | ||
397 | * | ||
398 | * %GFP_USER - Allocate memory on behalf of user. May sleep. | ||
399 | * | ||
400 | * %GFP_KERNEL - Allocate normal kernel ram. May sleep. | ||
401 | * | ||
402 | * %GFP_ATOMIC - Allocation will not sleep. May use emergency pools. | ||
403 | * For example, use this inside interrupt handlers. | ||
404 | * | ||
405 | * %GFP_HIGHUSER - Allocate pages from high memory. | ||
406 | * | ||
407 | * %GFP_NOIO - Do not do any I/O at all while trying to get memory. | ||
408 | * | ||
409 | * %GFP_NOFS - Do not make any fs calls while trying to get memory. | ||
410 | * | ||
411 | * %GFP_NOWAIT - Allocation will not sleep. | ||
412 | * | ||
413 | * %GFP_THISNODE - Allocate node-local memory only. | ||
414 | * | ||
415 | * %GFP_DMA - Allocation suitable for DMA. | ||
416 | * Should only be used for kmalloc() caches. Otherwise, use a | ||
417 | * slab created with SLAB_DMA. | ||
418 | * | ||
419 | * Also it is possible to set different flags by OR'ing | ||
420 | * in one or more of the following additional @flags: | ||
421 | * | ||
422 | * %__GFP_COLD - Request cache-cold pages instead of | ||
423 | * trying to return cache-warm pages. | ||
424 | * | ||
425 | * %__GFP_HIGH - This allocation has high priority and may use emergency pools. | ||
426 | * | ||
427 | * %__GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail | ||
428 | * (think twice before using). | ||
429 | * | ||
430 | * %__GFP_NORETRY - If memory is not immediately available, | ||
431 | * then give up at once. | ||
432 | * | ||
433 | * %__GFP_NOWARN - If allocation fails, don't issue any warnings. | ||
434 | * | ||
435 | * %__GFP_REPEAT - If allocation fails initially, try once more before failing. | ||
436 | * | ||
437 | * There are other flags available as well, but these are not intended | ||
438 | * for general use, and so are not documented here. For a full list of | ||
439 | * potential flags, always refer to linux/gfp.h. | ||
395 | */ | 440 | */ |
396 | static __always_inline void *kmalloc(size_t size, gfp_t flags) | 441 | static __always_inline void *kmalloc(size_t size, gfp_t flags) |
397 | { | 442 | { |
@@ -502,61 +547,6 @@ int cache_show(struct kmem_cache *s, struct seq_file *m); | |||
502 | void print_slabinfo_header(struct seq_file *m); | 547 | void print_slabinfo_header(struct seq_file *m); |
503 | 548 | ||
504 | /** | 549 | /** |
505 | * kmalloc - allocate memory | ||
506 | * @size: how many bytes of memory are required. | ||
507 | * @flags: the type of memory to allocate. | ||
508 | * | ||
509 | * The @flags argument may be one of: | ||
510 | * | ||
511 | * %GFP_USER - Allocate memory on behalf of user. May sleep. | ||
512 | * | ||
513 | * %GFP_KERNEL - Allocate normal kernel ram. May sleep. | ||
514 | * | ||
515 | * %GFP_ATOMIC - Allocation will not sleep. May use emergency pools. | ||
516 | * For example, use this inside interrupt handlers. | ||
517 | * | ||
518 | * %GFP_HIGHUSER - Allocate pages from high memory. | ||
519 | * | ||
520 | * %GFP_NOIO - Do not do any I/O at all while trying to get memory. | ||
521 | * | ||
522 | * %GFP_NOFS - Do not make any fs calls while trying to get memory. | ||
523 | * | ||
524 | * %GFP_NOWAIT - Allocation will not sleep. | ||
525 | * | ||
526 | * %GFP_THISNODE - Allocate node-local memory only. | ||
527 | * | ||
528 | * %GFP_DMA - Allocation suitable for DMA. | ||
529 | * Should only be used for kmalloc() caches. Otherwise, use a | ||
530 | * slab created with SLAB_DMA. | ||
531 | * | ||
532 | * Also it is possible to set different flags by OR'ing | ||
533 | * in one or more of the following additional @flags: | ||
534 | * | ||
535 | * %__GFP_COLD - Request cache-cold pages instead of | ||
536 | * trying to return cache-warm pages. | ||
537 | * | ||
538 | * %__GFP_HIGH - This allocation has high priority and may use emergency pools. | ||
539 | * | ||
540 | * %__GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail | ||
541 | * (think twice before using). | ||
542 | * | ||
543 | * %__GFP_NORETRY - If memory is not immediately available, | ||
544 | * then give up at once. | ||
545 | * | ||
546 | * %__GFP_NOWARN - If allocation fails, don't issue any warnings. | ||
547 | * | ||
548 | * %__GFP_REPEAT - If allocation fails initially, try once more before failing. | ||
549 | * | ||
550 | * There are other flags available as well, but these are not intended | ||
551 | * for general use, and so are not documented here. For a full list of | ||
552 | * potential flags, always refer to linux/gfp.h. | ||
553 | * | ||
554 | * kmalloc is the normal method of allocating memory | ||
555 | * in the kernel. | ||
556 | */ | ||
557 | static __always_inline void *kmalloc(size_t size, gfp_t flags); | ||
558 | |||
559 | /** | ||
560 | * kmalloc_array - allocate memory for an array. | 550 | * kmalloc_array - allocate memory for an array. |
561 | * @n: number of elements. | 551 | * @n: number of elements. |
562 | * @size: element size. | 552 | * @size: element size. |
diff --git a/include/linux/tegra-powergate.h b/include/linux/tegra-powergate.h index c98cfa406952..fd4498329c7c 100644 --- a/include/linux/tegra-powergate.h +++ b/include/linux/tegra-powergate.h | |||
@@ -45,6 +45,7 @@ struct clk; | |||
45 | 45 | ||
46 | #define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D | 46 | #define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D |
47 | 47 | ||
48 | #ifdef CONFIG_ARCH_TEGRA | ||
48 | int tegra_powergate_is_powered(int id); | 49 | int tegra_powergate_is_powered(int id); |
49 | int tegra_powergate_power_on(int id); | 50 | int tegra_powergate_power_on(int id); |
50 | int tegra_powergate_power_off(int id); | 51 | int tegra_powergate_power_off(int id); |
@@ -52,5 +53,31 @@ int tegra_powergate_remove_clamping(int id); | |||
52 | 53 | ||
53 | /* Must be called with clk disabled, and returns with clk enabled */ | 54 | /* Must be called with clk disabled, and returns with clk enabled */ |
54 | int tegra_powergate_sequence_power_up(int id, struct clk *clk); | 55 | int tegra_powergate_sequence_power_up(int id, struct clk *clk); |
56 | #else | ||
57 | static inline int tegra_powergate_is_powered(int id) | ||
58 | { | ||
59 | return -ENOSYS; | ||
60 | } | ||
61 | |||
62 | static inline int tegra_powergate_power_on(int id) | ||
63 | { | ||
64 | return -ENOSYS; | ||
65 | } | ||
66 | |||
67 | static inline int tegra_powergate_power_off(int id) | ||
68 | { | ||
69 | return -ENOSYS; | ||
70 | } | ||
71 | |||
72 | static inline int tegra_powergate_remove_clamping(int id) | ||
73 | { | ||
74 | return -ENOSYS; | ||
75 | } | ||
76 | |||
77 | static inline int tegra_powergate_sequence_power_up(int id, struct clk *clk) | ||
78 | { | ||
79 | return -ENOSYS; | ||
80 | } | ||
81 | #endif | ||
55 | 82 | ||
56 | #endif /* _MACH_TEGRA_POWERGATE_H_ */ | 83 | #endif /* _MACH_TEGRA_POWERGATE_H_ */ |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index ebeab360d851..f16dc0a40049 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -267,6 +267,8 @@ static inline void tracepoint_synchronize_unregister(void) | |||
267 | 267 | ||
268 | #define TRACE_EVENT_FLAGS(event, flag) | 268 | #define TRACE_EVENT_FLAGS(event, flag) |
269 | 269 | ||
270 | #define TRACE_EVENT_PERF_PERM(event, expr...) | ||
271 | |||
270 | #endif /* DECLARE_TRACE */ | 272 | #endif /* DECLARE_TRACE */ |
271 | 273 | ||
272 | #ifndef TRACE_EVENT | 274 | #ifndef TRACE_EVENT |
@@ -399,4 +401,6 @@ static inline void tracepoint_synchronize_unregister(void) | |||
399 | 401 | ||
400 | #define TRACE_EVENT_FLAGS(event, flag) | 402 | #define TRACE_EVENT_FLAGS(event, flag) |
401 | 403 | ||
404 | #define TRACE_EVENT_PERF_PERM(event, expr...) | ||
405 | |||
402 | #endif /* ifdef TRACE_EVENT (see note above) */ | 406 | #endif /* ifdef TRACE_EVENT (see note above) */ |