diff options
Diffstat (limited to 'include')
92 files changed, 1034 insertions, 263 deletions
diff --git a/include/asm-generic/bitops/builtin-__ffs.h b/include/asm-generic/bitops/builtin-__ffs.h new file mode 100644 index 000000000000..90041e3a41f0 --- /dev/null +++ b/include/asm-generic/bitops/builtin-__ffs.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #ifndef _ASM_GENERIC_BITOPS_BUILTIN___FFS_H_ | ||
| 2 | #define _ASM_GENERIC_BITOPS_BUILTIN___FFS_H_ | ||
| 3 | |||
| 4 | /** | ||
| 5 | * __ffs - find first bit in word. | ||
| 6 | * @word: The word to search | ||
| 7 | * | ||
| 8 | * Undefined if no bit exists, so code should check against 0 first. | ||
| 9 | */ | ||
| 10 | static __always_inline unsigned long __ffs(unsigned long word) | ||
| 11 | { | ||
| 12 | return __builtin_ctzl(word); | ||
| 13 | } | ||
| 14 | |||
| 15 | #endif | ||
diff --git a/include/asm-generic/bitops/builtin-__fls.h b/include/asm-generic/bitops/builtin-__fls.h new file mode 100644 index 000000000000..0248f386635f --- /dev/null +++ b/include/asm-generic/bitops/builtin-__fls.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #ifndef _ASM_GENERIC_BITOPS_BUILTIN___FLS_H_ | ||
| 2 | #define _ASM_GENERIC_BITOPS_BUILTIN___FLS_H_ | ||
| 3 | |||
| 4 | /** | ||
| 5 | * __fls - find last (most-significant) set bit in a long word | ||
| 6 | * @word: the word to search | ||
| 7 | * | ||
| 8 | * Undefined if no set bit exists, so code should check against 0 first. | ||
| 9 | */ | ||
| 10 | static __always_inline unsigned long __fls(unsigned long word) | ||
| 11 | { | ||
| 12 | return (sizeof(word) * 8) - 1 - __builtin_clzl(word); | ||
| 13 | } | ||
| 14 | |||
| 15 | #endif | ||
diff --git a/include/asm-generic/bitops/builtin-ffs.h b/include/asm-generic/bitops/builtin-ffs.h new file mode 100644 index 000000000000..064825829e1c --- /dev/null +++ b/include/asm-generic/bitops/builtin-ffs.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #ifndef _ASM_GENERIC_BITOPS_BUILTIN_FFS_H_ | ||
| 2 | #define _ASM_GENERIC_BITOPS_BUILTIN_FFS_H_ | ||
| 3 | |||
| 4 | /** | ||
| 5 | * ffs - find first bit set | ||
| 6 | * @x: the word to search | ||
| 7 | * | ||
| 8 | * This is defined the same way as | ||
| 9 | * the libc and compiler builtin ffs routines, therefore | ||
| 10 | * differs in spirit from the above ffz (man ffs). | ||
| 11 | */ | ||
| 12 | static __always_inline int ffs(int x) | ||
| 13 | { | ||
| 14 | return __builtin_ffs(x); | ||
| 15 | } | ||
| 16 | |||
| 17 | #endif | ||
diff --git a/include/asm-generic/bitops/builtin-fls.h b/include/asm-generic/bitops/builtin-fls.h new file mode 100644 index 000000000000..eda652d0ac7f --- /dev/null +++ b/include/asm-generic/bitops/builtin-fls.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef _ASM_GENERIC_BITOPS_BUILTIN_FLS_H_ | ||
| 2 | #define _ASM_GENERIC_BITOPS_BUILTIN_FLS_H_ | ||
| 3 | |||
| 4 | /** | ||
| 5 | * fls - find last (most-significant) bit set | ||
| 6 | * @x: the word to search | ||
| 7 | * | ||
| 8 | * This is defined the same way as ffs. | ||
| 9 | * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32. | ||
| 10 | */ | ||
| 11 | static __always_inline int fls(int x) | ||
| 12 | { | ||
| 13 | return x ? sizeof(x) * 8 - __builtin_clz(x) : 0; | ||
| 14 | } | ||
| 15 | |||
| 16 | #endif | ||
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h index 991ef01cd77e..3748ec92dcbc 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h | |||
| @@ -691,9 +691,11 @@ __SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \ | |||
| 691 | #define __NR_process_vm_writev 271 | 691 | #define __NR_process_vm_writev 271 |
| 692 | __SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \ | 692 | __SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \ |
| 693 | compat_sys_process_vm_writev) | 693 | compat_sys_process_vm_writev) |
| 694 | #define __NR_kcmp 272 | ||
| 695 | __SYSCALL(__NR_kcmp, sys_kcmp) | ||
| 694 | 696 | ||
| 695 | #undef __NR_syscalls | 697 | #undef __NR_syscalls |
| 696 | #define __NR_syscalls 272 | 698 | #define __NR_syscalls 273 |
| 697 | 699 | ||
| 698 | /* | 700 | /* |
| 699 | * All syscalls below here should go away really, | 701 | * All syscalls below here should go away really, |
diff --git a/include/clocksource/arm_generic.h b/include/clocksource/arm_generic.h new file mode 100644 index 000000000000..5b41b0d27f0f --- /dev/null +++ b/include/clocksource/arm_generic.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2012 ARM Ltd. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License version 2 as | ||
| 6 | * published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #ifndef __CLKSOURCE_ARM_GENERIC_H | ||
| 17 | #define __CLKSOURCE_ARM_GENERIC_H | ||
| 18 | |||
| 19 | extern int arm_generic_timer_init(void); | ||
| 20 | |||
| 21 | #endif | ||
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index ced362533e3c..bfacf0d5a225 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -118,7 +118,8 @@ enum drm_mode_status { | |||
| 118 | .hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \ | 118 | .hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \ |
| 119 | .htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \ | 119 | .htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \ |
| 120 | .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \ | 120 | .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \ |
| 121 | .vscan = (vs), .flags = (f), .vrefresh = 0 | 121 | .vscan = (vs), .flags = (f), .vrefresh = 0, \ |
| 122 | .base.type = DRM_MODE_OBJECT_MODE | ||
| 122 | 123 | ||
| 123 | #define CRTC_INTERLACE_HALVE_V 0x1 /* halve V values for interlacing */ | 124 | #define CRTC_INTERLACE_HALVE_V 0x1 /* halve V values for interlacing */ |
| 124 | 125 | ||
diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h index bdf0152cbbe9..f4621184a9b4 100644 --- a/include/drm/drm_fourcc.h +++ b/include/drm/drm_fourcc.h | |||
| @@ -107,8 +107,7 @@ | |||
| 107 | #define DRM_FORMAT_NV16 fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */ | 107 | #define DRM_FORMAT_NV16 fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */ |
| 108 | #define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */ | 108 | #define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */ |
| 109 | 109 | ||
| 110 | /* 2 non contiguous plane YCbCr */ | 110 | /* special NV12 tiled format */ |
| 111 | #define DRM_FORMAT_NV12M fourcc_code('N', 'M', '1', '2') /* 2x2 subsampled Cr:Cb plane */ | ||
| 112 | #define DRM_FORMAT_NV12MT fourcc_code('T', 'M', '1', '2') /* 2x2 subsampled Cr:Cb plane 64x32 macroblocks */ | 111 | #define DRM_FORMAT_NV12MT fourcc_code('T', 'M', '1', '2') /* 2x2 subsampled Cr:Cb plane 64x32 macroblocks */ |
| 113 | 112 | ||
| 114 | /* | 113 | /* |
| @@ -131,7 +130,4 @@ | |||
| 131 | #define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */ | 130 | #define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */ |
| 132 | #define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */ | 131 | #define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */ |
| 133 | 132 | ||
| 134 | /* 3 non contiguous plane YCbCr */ | ||
| 135 | #define DRM_FORMAT_YUV420M fourcc_code('Y', 'M', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes */ | ||
| 136 | |||
| 137 | #endif /* DRM_FOURCC_H */ | 133 | #endif /* DRM_FOURCC_H */ |
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 5581980b14f6..3d6301b6ec16 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h | |||
| @@ -359,8 +359,9 @@ struct drm_mode_mode_cmd { | |||
| 359 | struct drm_mode_modeinfo mode; | 359 | struct drm_mode_modeinfo mode; |
| 360 | }; | 360 | }; |
| 361 | 361 | ||
| 362 | #define DRM_MODE_CURSOR_BO (1<<0) | 362 | #define DRM_MODE_CURSOR_BO 0x01 |
| 363 | #define DRM_MODE_CURSOR_MOVE (1<<1) | 363 | #define DRM_MODE_CURSOR_MOVE 0x02 |
| 364 | #define DRM_MODE_CURSOR_FLAGS 0x03 | ||
| 364 | 365 | ||
| 365 | /* | 366 | /* |
| 366 | * depending on the value in flags different members are used. | 367 | * depending on the value in flags different members are used. |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 4f2a76224509..90be98981102 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -138,9 +138,9 @@ void acpi_penalize_isa_irq(int irq, int active); | |||
| 138 | void acpi_pci_irq_disable (struct pci_dev *dev); | 138 | void acpi_pci_irq_disable (struct pci_dev *dev); |
| 139 | 139 | ||
| 140 | struct acpi_pci_driver { | 140 | struct acpi_pci_driver { |
| 141 | struct acpi_pci_driver *next; | 141 | struct list_head node; |
| 142 | int (*add)(acpi_handle handle); | 142 | int (*add)(struct acpi_pci_root *root); |
| 143 | void (*remove)(acpi_handle handle); | 143 | void (*remove)(struct acpi_pci_root *root); |
| 144 | }; | 144 | }; |
| 145 | 145 | ||
| 146 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); | 146 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); |
diff --git a/include/linux/atmel-ssc.h b/include/linux/atmel-ssc.h index 06023393fba9..4eb31752e2b7 100644 --- a/include/linux/atmel-ssc.h +++ b/include/linux/atmel-ssc.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/platform_device.h> | 4 | #include <linux/platform_device.h> |
| 5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
| 6 | #include <linux/io.h> | ||
| 6 | 7 | ||
| 7 | struct ssc_device { | 8 | struct ssc_device { |
| 8 | struct list_head list; | 9 | struct list_head list; |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 4e72a9d48232..4a2ab7c85393 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -601,7 +601,7 @@ static inline void blk_clear_rl_full(struct request_list *rl, bool sync) | |||
| 601 | * it already be started by driver. | 601 | * it already be started by driver. |
| 602 | */ | 602 | */ |
| 603 | #define RQ_NOMERGE_FLAGS \ | 603 | #define RQ_NOMERGE_FLAGS \ |
| 604 | (REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA) | 604 | (REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA | REQ_DISCARD) |
| 605 | #define rq_mergeable(rq) \ | 605 | #define rq_mergeable(rq) \ |
| 606 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ | 606 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ |
| 607 | (((rq)->cmd_flags & REQ_DISCARD) || \ | 607 | (((rq)->cmd_flags & REQ_DISCARD) || \ |
| @@ -894,6 +894,8 @@ extern void blk_queue_flush_queueable(struct request_queue *q, bool queueable); | |||
| 894 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); | 894 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); |
| 895 | 895 | ||
| 896 | extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); | 896 | extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); |
| 897 | extern int blk_bio_map_sg(struct request_queue *q, struct bio *bio, | ||
| 898 | struct scatterlist *sglist); | ||
| 897 | extern void blk_dump_rq_flags(struct request *, char *); | 899 | extern void blk_dump_rq_flags(struct request *, char *); |
| 898 | extern long nr_blockdev_pages(void); | 900 | extern long nr_blockdev_pages(void); |
| 899 | 901 | ||
| @@ -1139,6 +1141,16 @@ static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector | |||
| 1139 | & (lim->discard_granularity - 1); | 1141 | & (lim->discard_granularity - 1); |
| 1140 | } | 1142 | } |
| 1141 | 1143 | ||
| 1144 | static inline int bdev_discard_alignment(struct block_device *bdev) | ||
| 1145 | { | ||
| 1146 | struct request_queue *q = bdev_get_queue(bdev); | ||
| 1147 | |||
| 1148 | if (bdev != bdev->bd_contains) | ||
| 1149 | return bdev->bd_part->discard_alignment; | ||
| 1150 | |||
| 1151 | return q->limits.discard_alignment; | ||
| 1152 | } | ||
| 1153 | |||
| 1142 | static inline unsigned int queue_discard_zeroes_data(struct request_queue *q) | 1154 | static inline unsigned int queue_discard_zeroes_data(struct request_queue *q) |
| 1143 | { | 1155 | { |
| 1144 | if (q->limits.max_discard_sectors && q->limits.discard_zeroes_data == 1) | 1156 | if (q->limits.max_discard_sectors && q->limits.discard_zeroes_data == 1) |
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 77335fac943e..c12731582920 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #define CLK_IGNORE_UNUSED BIT(3) /* do not gate even if unused */ | 26 | #define CLK_IGNORE_UNUSED BIT(3) /* do not gate even if unused */ |
| 27 | #define CLK_IS_ROOT BIT(4) /* root clk, has no parent */ | 27 | #define CLK_IS_ROOT BIT(4) /* root clk, has no parent */ |
| 28 | #define CLK_IS_BASIC BIT(5) /* Basic clk, can't do a to_clk_foo() */ | 28 | #define CLK_IS_BASIC BIT(5) /* Basic clk, can't do a to_clk_foo() */ |
| 29 | #define CLK_GET_RATE_NOCACHE BIT(6) /* do not use the cached clk rate */ | ||
| 29 | 30 | ||
| 30 | struct clk_hw; | 31 | struct clk_hw; |
| 31 | 32 | ||
| @@ -360,6 +361,11 @@ int of_clk_add_provider(struct device_node *np, | |||
| 360 | void of_clk_del_provider(struct device_node *np); | 361 | void of_clk_del_provider(struct device_node *np); |
| 361 | struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, | 362 | struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, |
| 362 | void *data); | 363 | void *data); |
| 364 | struct clk_onecell_data { | ||
| 365 | struct clk **clks; | ||
| 366 | unsigned int clk_num; | ||
| 367 | }; | ||
| 368 | struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data); | ||
| 363 | const char *of_clk_get_parent_name(struct device_node *np, int index); | 369 | const char *of_clk_get_parent_name(struct device_node *np, int index); |
| 364 | void of_clk_init(const struct of_device_id *matches); | 370 | void of_clk_init(const struct of_device_id *matches); |
| 365 | 371 | ||
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 2f4079175afb..934bc34d5f99 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
| @@ -49,6 +49,13 @@ | |||
| 49 | #endif | 49 | #endif |
| 50 | #endif | 50 | #endif |
| 51 | 51 | ||
| 52 | #if __GNUC_MINOR__ >= 6 | ||
| 53 | /* | ||
| 54 | * Tell the optimizer that something else uses this function or variable. | ||
| 55 | */ | ||
| 56 | #define __visible __attribute__((externally_visible)) | ||
| 57 | #endif | ||
| 58 | |||
| 52 | #if __GNUC_MINOR__ > 0 | 59 | #if __GNUC_MINOR__ > 0 |
| 53 | #define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | 60 | #define __compiletime_object_size(obj) __builtin_object_size(obj, 0) |
| 54 | #endif | 61 | #endif |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 923d093c9cea..f430e4162f41 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
| @@ -278,6 +278,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
| 278 | # define __section(S) __attribute__ ((__section__(#S))) | 278 | # define __section(S) __attribute__ ((__section__(#S))) |
| 279 | #endif | 279 | #endif |
| 280 | 280 | ||
| 281 | #ifndef __visible | ||
| 282 | #define __visible | ||
| 283 | #endif | ||
| 284 | |||
| 281 | /* Are two types/vars the same type (ignoring qualifiers)? */ | 285 | /* Are two types/vars the same type (ignoring qualifiers)? */ |
| 282 | #ifndef __same_type | 286 | #ifndef __same_type |
| 283 | # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | 287 | # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 040b13b5c14a..279b1eaa8b73 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
| @@ -194,6 +194,10 @@ static inline int cpuidle_play_dead(void) {return -ENODEV; } | |||
| 194 | 194 | ||
| 195 | #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED | 195 | #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED |
| 196 | void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a); | 196 | void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a); |
| 197 | #else | ||
| 198 | static inline void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a) | ||
| 199 | { | ||
| 200 | } | ||
| 197 | #endif | 201 | #endif |
| 198 | 202 | ||
| 199 | /****************************** | 203 | /****************************** |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index caa34e50537e..59200795482e 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -206,6 +206,8 @@ struct dentry_operations { | |||
| 206 | #define DCACHE_MANAGED_DENTRY \ | 206 | #define DCACHE_MANAGED_DENTRY \ |
| 207 | (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT) | 207 | (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT) |
| 208 | 208 | ||
| 209 | #define DCACHE_DENTRY_KILLED 0x100000 | ||
| 210 | |||
| 209 | extern seqlock_t rename_lock; | 211 | extern seqlock_t rename_lock; |
| 210 | 212 | ||
| 211 | static inline int dname_external(struct dentry *dentry) | 213 | static inline int dname_external(struct dentry *dentry) |
diff --git a/include/linux/efi-bgrt.h b/include/linux/efi-bgrt.h new file mode 100644 index 000000000000..051b21fedf68 --- /dev/null +++ b/include/linux/efi-bgrt.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #ifndef _LINUX_EFI_BGRT_H | ||
| 2 | #define _LINUX_EFI_BGRT_H | ||
| 3 | |||
| 4 | #ifdef CONFIG_ACPI_BGRT | ||
| 5 | |||
| 6 | #include <linux/acpi.h> | ||
| 7 | |||
| 8 | void efi_bgrt_init(void); | ||
| 9 | |||
| 10 | /* The BGRT data itself; only valid if bgrt_image != NULL. */ | ||
| 11 | extern void *bgrt_image; | ||
| 12 | extern size_t bgrt_image_size; | ||
| 13 | extern struct acpi_table_bgrt *bgrt_tab; | ||
| 14 | |||
| 15 | #else /* !CONFIG_ACPI_BGRT */ | ||
| 16 | |||
| 17 | static inline void efi_bgrt_init(void) {} | ||
| 18 | |||
| 19 | #endif /* !CONFIG_ACPI_BGRT */ | ||
| 20 | |||
| 21 | #endif /* _LINUX_EFI_BGRT_H */ | ||
diff --git a/include/linux/efi.h b/include/linux/efi.h index ec45ccd8708a..8670eb1eb8cd 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -496,6 +496,14 @@ extern void efi_map_pal_code (void); | |||
| 496 | extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg); | 496 | extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg); |
| 497 | extern void efi_gettimeofday (struct timespec *ts); | 497 | extern void efi_gettimeofday (struct timespec *ts); |
| 498 | extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */ | 498 | extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */ |
| 499 | #ifdef CONFIG_X86 | ||
| 500 | extern void efi_late_init(void); | ||
| 501 | extern void efi_free_boot_services(void); | ||
| 502 | #else | ||
| 503 | static inline void efi_late_init(void) {} | ||
| 504 | static inline void efi_free_boot_services(void) {} | ||
| 505 | #endif | ||
| 506 | extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr); | ||
| 499 | extern u64 efi_get_iobase (void); | 507 | extern u64 efi_get_iobase (void); |
| 500 | extern u32 efi_mem_type (unsigned long phys_addr); | 508 | extern u32 efi_mem_type (unsigned long phys_addr); |
| 501 | extern u64 efi_mem_attributes (unsigned long phys_addr); | 509 | extern u64 efi_mem_attributes (unsigned long phys_addr); |
diff --git a/include/linux/elf.h b/include/linux/elf.h index 999b4f52e8e5..0a05051a8924 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
| @@ -387,7 +387,11 @@ typedef struct elf64_shdr { | |||
| 387 | #define NT_S390_PREFIX 0x305 /* s390 prefix register */ | 387 | #define NT_S390_PREFIX 0x305 /* s390 prefix register */ |
| 388 | #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ | 388 | #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ |
| 389 | #define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */ | 389 | #define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */ |
| 390 | #define NT_S390_TDB 0x308 /* s390 transaction diagnostic block */ | ||
| 390 | #define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ | 391 | #define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ |
| 392 | #define NT_ARM_TLS 0x401 /* ARM TLS register */ | ||
| 393 | #define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ | ||
| 394 | #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ | ||
| 391 | 395 | ||
| 392 | 396 | ||
| 393 | /* Note header in a PT_NOTE section */ | 397 | /* Note header in a PT_NOTE section */ |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 55e6d63d46d0..a52f2f4fe030 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/kallsyms.h> | 10 | #include <linux/kallsyms.h> |
| 11 | #include <linux/linkage.h> | 11 | #include <linux/linkage.h> |
| 12 | #include <linux/bitops.h> | 12 | #include <linux/bitops.h> |
| 13 | #include <linux/ptrace.h> | ||
| 13 | #include <linux/ktime.h> | 14 | #include <linux/ktime.h> |
| 14 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
| 15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
| @@ -18,6 +19,28 @@ | |||
| 18 | 19 | ||
| 19 | #include <asm/ftrace.h> | 20 | #include <asm/ftrace.h> |
| 20 | 21 | ||
| 22 | /* | ||
| 23 | * If the arch supports passing the variable contents of | ||
| 24 | * function_trace_op as the third parameter back from the | ||
| 25 | * mcount call, then the arch should define this as 1. | ||
| 26 | */ | ||
| 27 | #ifndef ARCH_SUPPORTS_FTRACE_OPS | ||
| 28 | #define ARCH_SUPPORTS_FTRACE_OPS 0 | ||
| 29 | #endif | ||
| 30 | |||
| 31 | /* | ||
| 32 | * If the arch's mcount caller does not support all of ftrace's | ||
| 33 | * features, then it must call an indirect function that | ||
| 34 | * does. Or at least does enough to prevent any unwelcomed side effects. | ||
| 35 | */ | ||
| 36 | #if !defined(CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST) || \ | ||
| 37 | !ARCH_SUPPORTS_FTRACE_OPS | ||
| 38 | # define FTRACE_FORCE_LIST_FUNC 1 | ||
| 39 | #else | ||
| 40 | # define FTRACE_FORCE_LIST_FUNC 0 | ||
| 41 | #endif | ||
| 42 | |||
| 43 | |||
| 21 | struct module; | 44 | struct module; |
| 22 | struct ftrace_hash; | 45 | struct ftrace_hash; |
| 23 | 46 | ||
| @@ -29,7 +52,10 @@ ftrace_enable_sysctl(struct ctl_table *table, int write, | |||
| 29 | void __user *buffer, size_t *lenp, | 52 | void __user *buffer, size_t *lenp, |
| 30 | loff_t *ppos); | 53 | loff_t *ppos); |
| 31 | 54 | ||
| 32 | typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); | 55 | struct ftrace_ops; |
| 56 | |||
| 57 | typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip, | ||
| 58 | struct ftrace_ops *op, struct pt_regs *regs); | ||
| 33 | 59 | ||
| 34 | /* | 60 | /* |
| 35 | * FTRACE_OPS_FL_* bits denote the state of ftrace_ops struct and are | 61 | * FTRACE_OPS_FL_* bits denote the state of ftrace_ops struct and are |
| @@ -45,12 +71,33 @@ typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); | |||
| 45 | * could be controled by following calls: | 71 | * could be controled by following calls: |
| 46 | * ftrace_function_local_enable | 72 | * ftrace_function_local_enable |
| 47 | * ftrace_function_local_disable | 73 | * ftrace_function_local_disable |
| 74 | * SAVE_REGS - The ftrace_ops wants regs saved at each function called | ||
| 75 | * and passed to the callback. If this flag is set, but the | ||
| 76 | * architecture does not support passing regs | ||
| 77 | * (ARCH_SUPPORTS_FTRACE_SAVE_REGS is not defined), then the | ||
| 78 | * ftrace_ops will fail to register, unless the next flag | ||
| 79 | * is set. | ||
| 80 | * SAVE_REGS_IF_SUPPORTED - This is the same as SAVE_REGS, but if the | ||
| 81 | * handler can handle an arch that does not save regs | ||
| 82 | * (the handler tests if regs == NULL), then it can set | ||
| 83 | * this flag instead. It will not fail registering the ftrace_ops | ||
| 84 | * but, the regs field will be NULL if the arch does not support | ||
| 85 | * passing regs to the handler. | ||
| 86 | * Note, if this flag is set, the SAVE_REGS flag will automatically | ||
| 87 | * get set upon registering the ftrace_ops, if the arch supports it. | ||
| 88 | * RECURSION_SAFE - The ftrace_ops can set this to tell the ftrace infrastructure | ||
| 89 | * that the call back has its own recursion protection. If it does | ||
| 90 | * not set this, then the ftrace infrastructure will add recursion | ||
| 91 | * protection for the caller. | ||
| 48 | */ | 92 | */ |
| 49 | enum { | 93 | enum { |
| 50 | FTRACE_OPS_FL_ENABLED = 1 << 0, | 94 | FTRACE_OPS_FL_ENABLED = 1 << 0, |
| 51 | FTRACE_OPS_FL_GLOBAL = 1 << 1, | 95 | FTRACE_OPS_FL_GLOBAL = 1 << 1, |
| 52 | FTRACE_OPS_FL_DYNAMIC = 1 << 2, | 96 | FTRACE_OPS_FL_DYNAMIC = 1 << 2, |
| 53 | FTRACE_OPS_FL_CONTROL = 1 << 3, | 97 | FTRACE_OPS_FL_CONTROL = 1 << 3, |
| 98 | FTRACE_OPS_FL_SAVE_REGS = 1 << 4, | ||
| 99 | FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 1 << 5, | ||
| 100 | FTRACE_OPS_FL_RECURSION_SAFE = 1 << 6, | ||
| 54 | }; | 101 | }; |
| 55 | 102 | ||
| 56 | struct ftrace_ops { | 103 | struct ftrace_ops { |
| @@ -163,7 +210,8 @@ static inline int ftrace_function_local_disabled(struct ftrace_ops *ops) | |||
| 163 | return *this_cpu_ptr(ops->disabled); | 210 | return *this_cpu_ptr(ops->disabled); |
| 164 | } | 211 | } |
| 165 | 212 | ||
| 166 | extern void ftrace_stub(unsigned long a0, unsigned long a1); | 213 | extern void ftrace_stub(unsigned long a0, unsigned long a1, |
| 214 | struct ftrace_ops *op, struct pt_regs *regs); | ||
| 167 | 215 | ||
| 168 | #else /* !CONFIG_FUNCTION_TRACER */ | 216 | #else /* !CONFIG_FUNCTION_TRACER */ |
| 169 | /* | 217 | /* |
| @@ -172,6 +220,10 @@ extern void ftrace_stub(unsigned long a0, unsigned long a1); | |||
| 172 | */ | 220 | */ |
| 173 | #define register_ftrace_function(ops) ({ 0; }) | 221 | #define register_ftrace_function(ops) ({ 0; }) |
| 174 | #define unregister_ftrace_function(ops) ({ 0; }) | 222 | #define unregister_ftrace_function(ops) ({ 0; }) |
| 223 | static inline int ftrace_nr_registered_ops(void) | ||
| 224 | { | ||
| 225 | return 0; | ||
| 226 | } | ||
| 175 | static inline void clear_ftrace_function(void) { } | 227 | static inline void clear_ftrace_function(void) { } |
| 176 | static inline void ftrace_kill(void) { } | 228 | static inline void ftrace_kill(void) { } |
| 177 | static inline void ftrace_stop(void) { } | 229 | static inline void ftrace_stop(void) { } |
| @@ -227,12 +279,33 @@ extern void unregister_ftrace_function_probe_all(char *glob); | |||
| 227 | 279 | ||
| 228 | extern int ftrace_text_reserved(void *start, void *end); | 280 | extern int ftrace_text_reserved(void *start, void *end); |
| 229 | 281 | ||
| 282 | extern int ftrace_nr_registered_ops(void); | ||
| 283 | |||
| 284 | /* | ||
| 285 | * The dyn_ftrace record's flags field is split into two parts. | ||
| 286 | * the first part which is '0-FTRACE_REF_MAX' is a counter of | ||
| 287 | * the number of callbacks that have registered the function that | ||
| 288 | * the dyn_ftrace descriptor represents. | ||
| 289 | * | ||
| 290 | * The second part is a mask: | ||
| 291 | * ENABLED - the function is being traced | ||
| 292 | * REGS - the record wants the function to save regs | ||
| 293 | * REGS_EN - the function is set up to save regs. | ||
| 294 | * | ||
| 295 | * When a new ftrace_ops is registered and wants a function to save | ||
| 296 | * pt_regs, the rec->flag REGS is set. When the function has been | ||
| 297 | * set up to save regs, the REG_EN flag is set. Once a function | ||
| 298 | * starts saving regs it will do so until all ftrace_ops are removed | ||
| 299 | * from tracing that function. | ||
| 300 | */ | ||
| 230 | enum { | 301 | enum { |
| 231 | FTRACE_FL_ENABLED = (1 << 30), | 302 | FTRACE_FL_ENABLED = (1UL << 29), |
| 303 | FTRACE_FL_REGS = (1UL << 30), | ||
| 304 | FTRACE_FL_REGS_EN = (1UL << 31) | ||
| 232 | }; | 305 | }; |
| 233 | 306 | ||
| 234 | #define FTRACE_FL_MASK (0x3UL << 30) | 307 | #define FTRACE_FL_MASK (0x7UL << 29) |
| 235 | #define FTRACE_REF_MAX ((1 << 30) - 1) | 308 | #define FTRACE_REF_MAX ((1UL << 29) - 1) |
| 236 | 309 | ||
| 237 | struct dyn_ftrace { | 310 | struct dyn_ftrace { |
| 238 | union { | 311 | union { |
| @@ -244,6 +317,8 @@ struct dyn_ftrace { | |||
| 244 | }; | 317 | }; |
| 245 | 318 | ||
| 246 | int ftrace_force_update(void); | 319 | int ftrace_force_update(void); |
| 320 | int ftrace_set_filter_ip(struct ftrace_ops *ops, unsigned long ip, | ||
| 321 | int remove, int reset); | ||
| 247 | int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf, | 322 | int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf, |
| 248 | int len, int reset); | 323 | int len, int reset); |
| 249 | int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf, | 324 | int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf, |
| @@ -263,9 +338,23 @@ enum { | |||
| 263 | FTRACE_STOP_FUNC_RET = (1 << 4), | 338 | FTRACE_STOP_FUNC_RET = (1 << 4), |
| 264 | }; | 339 | }; |
| 265 | 340 | ||
| 341 | /* | ||
| 342 | * The FTRACE_UPDATE_* enum is used to pass information back | ||
| 343 | * from the ftrace_update_record() and ftrace_test_record() | ||
| 344 | * functions. These are called by the code update routines | ||
| 345 | * to find out what is to be done for a given function. | ||
| 346 | * | ||
| 347 | * IGNORE - The function is already what we want it to be | ||
| 348 | * MAKE_CALL - Start tracing the function | ||
| 349 | * MODIFY_CALL - Stop saving regs for the function | ||
| 350 | * MODIFY_CALL_REGS - Start saving regs for the function | ||
| 351 | * MAKE_NOP - Stop tracing the function | ||
| 352 | */ | ||
| 266 | enum { | 353 | enum { |
| 267 | FTRACE_UPDATE_IGNORE, | 354 | FTRACE_UPDATE_IGNORE, |
| 268 | FTRACE_UPDATE_MAKE_CALL, | 355 | FTRACE_UPDATE_MAKE_CALL, |
| 356 | FTRACE_UPDATE_MODIFY_CALL, | ||
| 357 | FTRACE_UPDATE_MODIFY_CALL_REGS, | ||
| 269 | FTRACE_UPDATE_MAKE_NOP, | 358 | FTRACE_UPDATE_MAKE_NOP, |
| 270 | }; | 359 | }; |
| 271 | 360 | ||
| @@ -317,7 +406,9 @@ extern int ftrace_dyn_arch_init(void *data); | |||
| 317 | extern void ftrace_replace_code(int enable); | 406 | extern void ftrace_replace_code(int enable); |
| 318 | extern int ftrace_update_ftrace_func(ftrace_func_t func); | 407 | extern int ftrace_update_ftrace_func(ftrace_func_t func); |
| 319 | extern void ftrace_caller(void); | 408 | extern void ftrace_caller(void); |
| 409 | extern void ftrace_regs_caller(void); | ||
| 320 | extern void ftrace_call(void); | 410 | extern void ftrace_call(void); |
| 411 | extern void ftrace_regs_call(void); | ||
| 321 | extern void mcount_call(void); | 412 | extern void mcount_call(void); |
| 322 | 413 | ||
| 323 | void ftrace_modify_all_code(int command); | 414 | void ftrace_modify_all_code(int command); |
| @@ -325,6 +416,15 @@ void ftrace_modify_all_code(int command); | |||
| 325 | #ifndef FTRACE_ADDR | 416 | #ifndef FTRACE_ADDR |
| 326 | #define FTRACE_ADDR ((unsigned long)ftrace_caller) | 417 | #define FTRACE_ADDR ((unsigned long)ftrace_caller) |
| 327 | #endif | 418 | #endif |
| 419 | |||
| 420 | #ifndef FTRACE_REGS_ADDR | ||
| 421 | #ifdef ARCH_SUPPORTS_FTRACE_SAVE_REGS | ||
| 422 | # define FTRACE_REGS_ADDR ((unsigned long)ftrace_regs_caller) | ||
| 423 | #else | ||
| 424 | # define FTRACE_REGS_ADDR FTRACE_ADDR | ||
| 425 | #endif | ||
| 426 | #endif | ||
| 427 | |||
| 328 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 428 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
| 329 | extern void ftrace_graph_caller(void); | 429 | extern void ftrace_graph_caller(void); |
| 330 | extern int ftrace_enable_ftrace_graph_caller(void); | 430 | extern int ftrace_enable_ftrace_graph_caller(void); |
| @@ -380,6 +480,39 @@ extern int ftrace_make_nop(struct module *mod, | |||
| 380 | */ | 480 | */ |
| 381 | extern int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr); | 481 | extern int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr); |
| 382 | 482 | ||
| 483 | #ifdef ARCH_SUPPORTS_FTRACE_SAVE_REGS | ||
| 484 | /** | ||
| 485 | * ftrace_modify_call - convert from one addr to another (no nop) | ||
| 486 | * @rec: the mcount call site record | ||
| 487 | * @old_addr: the address expected to be currently called to | ||
| 488 | * @addr: the address to change to | ||
| 489 | * | ||
| 490 | * This is a very sensitive operation and great care needs | ||
| 491 | * to be taken by the arch. The operation should carefully | ||
| 492 | * read the location, check to see if what is read is indeed | ||
| 493 | * what we expect it to be, and then on success of the compare, | ||
| 494 | * it should write to the location. | ||
| 495 | * | ||
| 496 | * The code segment at @rec->ip should be a caller to @old_addr | ||
| 497 | * | ||
| 498 | * Return must be: | ||
| 499 | * 0 on success | ||
| 500 | * -EFAULT on error reading the location | ||
| 501 | * -EINVAL on a failed compare of the contents | ||
| 502 | * -EPERM on error writing to the location | ||
| 503 | * Any other value will be considered a failure. | ||
| 504 | */ | ||
| 505 | extern int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_addr, | ||
| 506 | unsigned long addr); | ||
| 507 | #else | ||
| 508 | /* Should never be called */ | ||
| 509 | static inline int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_addr, | ||
| 510 | unsigned long addr) | ||
| 511 | { | ||
| 512 | return -EINVAL; | ||
| 513 | } | ||
| 514 | #endif | ||
| 515 | |||
| 383 | /* May be defined in arch */ | 516 | /* May be defined in arch */ |
| 384 | extern int ftrace_arch_read_dyn_info(char *buf, int size); | 517 | extern int ftrace_arch_read_dyn_info(char *buf, int size); |
| 385 | 518 | ||
| @@ -387,7 +520,7 @@ extern int skip_trace(unsigned long ip); | |||
| 387 | 520 | ||
| 388 | extern void ftrace_disable_daemon(void); | 521 | extern void ftrace_disable_daemon(void); |
| 389 | extern void ftrace_enable_daemon(void); | 522 | extern void ftrace_enable_daemon(void); |
| 390 | #else | 523 | #else /* CONFIG_DYNAMIC_FTRACE */ |
| 391 | static inline int skip_trace(unsigned long ip) { return 0; } | 524 | static inline int skip_trace(unsigned long ip) { return 0; } |
| 392 | static inline int ftrace_force_update(void) { return 0; } | 525 | static inline int ftrace_force_update(void) { return 0; } |
| 393 | static inline void ftrace_disable_daemon(void) { } | 526 | static inline void ftrace_disable_daemon(void) { } |
| @@ -405,6 +538,10 @@ static inline int ftrace_text_reserved(void *start, void *end) | |||
| 405 | { | 538 | { |
| 406 | return 0; | 539 | return 0; |
| 407 | } | 540 | } |
| 541 | static inline unsigned long ftrace_location(unsigned long ip) | ||
| 542 | { | ||
| 543 | return 0; | ||
| 544 | } | ||
| 408 | 545 | ||
| 409 | /* | 546 | /* |
| 410 | * Again users of functions that have ftrace_ops may not | 547 | * Again users of functions that have ftrace_ops may not |
| @@ -413,6 +550,7 @@ static inline int ftrace_text_reserved(void *start, void *end) | |||
| 413 | */ | 550 | */ |
| 414 | #define ftrace_regex_open(ops, flag, inod, file) ({ -ENODEV; }) | 551 | #define ftrace_regex_open(ops, flag, inod, file) ({ -ENODEV; }) |
| 415 | #define ftrace_set_early_filter(ops, buf, enable) do { } while (0) | 552 | #define ftrace_set_early_filter(ops, buf, enable) do { } while (0) |
| 553 | #define ftrace_set_filter_ip(ops, ip, remove, reset) ({ -ENODEV; }) | ||
| 416 | #define ftrace_set_filter(ops, buf, len, reset) ({ -ENODEV; }) | 554 | #define ftrace_set_filter(ops, buf, len, reset) ({ -ENODEV; }) |
| 417 | #define ftrace_set_notrace(ops, buf, len, reset) ({ -ENODEV; }) | 555 | #define ftrace_set_notrace(ops, buf, len, reset) ({ -ENODEV; }) |
| 418 | #define ftrace_free_filter(ops) do { } while (0) | 556 | #define ftrace_free_filter(ops) do { } while (0) |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 305f23cd7cff..cab3da3d0949 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
| @@ -132,11 +132,11 @@ extern void synchronize_irq(unsigned int irq); | |||
| 132 | struct task_struct; | 132 | struct task_struct; |
| 133 | 133 | ||
| 134 | #if !defined(CONFIG_VIRT_CPU_ACCOUNTING) && !defined(CONFIG_IRQ_TIME_ACCOUNTING) | 134 | #if !defined(CONFIG_VIRT_CPU_ACCOUNTING) && !defined(CONFIG_IRQ_TIME_ACCOUNTING) |
| 135 | static inline void account_system_vtime(struct task_struct *tsk) | 135 | static inline void vtime_account(struct task_struct *tsk) |
| 136 | { | 136 | { |
| 137 | } | 137 | } |
| 138 | #else | 138 | #else |
| 139 | extern void account_system_vtime(struct task_struct *tsk); | 139 | extern void vtime_account(struct task_struct *tsk); |
| 140 | #endif | 140 | #endif |
| 141 | 141 | ||
| 142 | #if defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU) | 142 | #if defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU) |
| @@ -162,7 +162,7 @@ extern void rcu_nmi_exit(void); | |||
| 162 | */ | 162 | */ |
| 163 | #define __irq_enter() \ | 163 | #define __irq_enter() \ |
| 164 | do { \ | 164 | do { \ |
| 165 | account_system_vtime(current); \ | 165 | vtime_account(current); \ |
| 166 | add_preempt_count(HARDIRQ_OFFSET); \ | 166 | add_preempt_count(HARDIRQ_OFFSET); \ |
| 167 | trace_hardirq_enter(); \ | 167 | trace_hardirq_enter(); \ |
| 168 | } while (0) | 168 | } while (0) |
| @@ -178,7 +178,7 @@ extern void irq_enter(void); | |||
| 178 | #define __irq_exit() \ | 178 | #define __irq_exit() \ |
| 179 | do { \ | 179 | do { \ |
| 180 | trace_hardirq_exit(); \ | 180 | trace_hardirq_exit(); \ |
| 181 | account_system_vtime(current); \ | 181 | vtime_account(current); \ |
| 182 | sub_preempt_count(HARDIRQ_OFFSET); \ | 182 | sub_preempt_count(HARDIRQ_OFFSET); \ |
| 183 | } while (0) | 183 | } while (0) |
| 184 | 184 | ||
diff --git a/include/linux/hid.h b/include/linux/hid.h index 42970de1b40c..7e1f37db7582 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
| @@ -414,7 +414,7 @@ struct hid_field { | |||
| 414 | __u16 dpad; /* dpad input code */ | 414 | __u16 dpad; /* dpad input code */ |
| 415 | }; | 415 | }; |
| 416 | 416 | ||
| 417 | #define HID_MAX_FIELDS 128 | 417 | #define HID_MAX_FIELDS 256 |
| 418 | 418 | ||
| 419 | struct hid_report { | 419 | struct hid_report { |
| 420 | struct list_head list; | 420 | struct list_head list; |
| @@ -626,6 +626,7 @@ struct hid_usage_id { | |||
| 626 | * @report_fixup: called before report descriptor parsing (NULL means nop) | 626 | * @report_fixup: called before report descriptor parsing (NULL means nop) |
| 627 | * @input_mapping: invoked on input registering before mapping an usage | 627 | * @input_mapping: invoked on input registering before mapping an usage |
| 628 | * @input_mapped: invoked on input registering after mapping an usage | 628 | * @input_mapped: invoked on input registering after mapping an usage |
| 629 | * @input_configured: invoked just before the device is registered | ||
| 629 | * @feature_mapping: invoked on feature registering | 630 | * @feature_mapping: invoked on feature registering |
| 630 | * @suspend: invoked on suspend (NULL means nop) | 631 | * @suspend: invoked on suspend (NULL means nop) |
| 631 | * @resume: invoked on resume if device was not reset (NULL means nop) | 632 | * @resume: invoked on resume if device was not reset (NULL means nop) |
| @@ -670,6 +671,8 @@ struct hid_driver { | |||
| 670 | int (*input_mapped)(struct hid_device *hdev, | 671 | int (*input_mapped)(struct hid_device *hdev, |
| 671 | struct hid_input *hidinput, struct hid_field *field, | 672 | struct hid_input *hidinput, struct hid_field *field, |
| 672 | struct hid_usage *usage, unsigned long **bit, int *max); | 673 | struct hid_usage *usage, unsigned long **bit, int *max); |
| 674 | void (*input_configured)(struct hid_device *hdev, | ||
| 675 | struct hid_input *hidinput); | ||
| 673 | void (*feature_mapping)(struct hid_device *hdev, | 676 | void (*feature_mapping)(struct hid_device *hdev, |
| 674 | struct hid_field *field, | 677 | struct hid_field *field, |
| 675 | struct hid_usage *usage); | 678 | struct hid_usage *usage); |
diff --git a/include/linux/i2c-pnx.h b/include/linux/i2c-pnx.h index 1bc74afe7a35..49ed17fdf055 100644 --- a/include/linux/i2c-pnx.h +++ b/include/linux/i2c-pnx.h | |||
| @@ -22,6 +22,7 @@ struct i2c_pnx_mif { | |||
| 22 | struct timer_list timer; /* Timeout */ | 22 | struct timer_list timer; /* Timeout */ |
| 23 | u8 * buf; /* Data buffer */ | 23 | u8 * buf; /* Data buffer */ |
| 24 | int len; /* Length of data buffer */ | 24 | int len; /* Length of data buffer */ |
| 25 | int order; /* RX Bytes to order via TX */ | ||
| 25 | }; | 26 | }; |
| 26 | 27 | ||
| 27 | struct i2c_pnx_algo_data { | 28 | struct i2c_pnx_algo_data { |
diff --git a/include/linux/input.h b/include/linux/input.h index 725dcd0f63a4..ba4874302939 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -1169,6 +1169,18 @@ struct ff_effect { | |||
| 1169 | #include <linux/mod_devicetable.h> | 1169 | #include <linux/mod_devicetable.h> |
| 1170 | 1170 | ||
| 1171 | /** | 1171 | /** |
| 1172 | * struct input_value - input value representation | ||
| 1173 | * @type: type of value (EV_KEY, EV_ABS, etc) | ||
| 1174 | * @code: the value code | ||
| 1175 | * @value: the value | ||
| 1176 | */ | ||
| 1177 | struct input_value { | ||
| 1178 | __u16 type; | ||
| 1179 | __u16 code; | ||
| 1180 | __s32 value; | ||
| 1181 | }; | ||
| 1182 | |||
| 1183 | /** | ||
| 1172 | * struct input_dev - represents an input device | 1184 | * struct input_dev - represents an input device |
| 1173 | * @name: name of the device | 1185 | * @name: name of the device |
| 1174 | * @phys: physical path to the device in the system hierarchy | 1186 | * @phys: physical path to the device in the system hierarchy |
| @@ -1203,11 +1215,7 @@ struct ff_effect { | |||
| 1203 | * software autorepeat | 1215 | * software autorepeat |
| 1204 | * @timer: timer for software autorepeat | 1216 | * @timer: timer for software autorepeat |
| 1205 | * @rep: current values for autorepeat parameters (delay, rate) | 1217 | * @rep: current values for autorepeat parameters (delay, rate) |
| 1206 | * @mt: pointer to array of struct input_mt_slot holding current values | 1218 | * @mt: pointer to multitouch state |
| 1207 | * of tracked contacts | ||
| 1208 | * @mtsize: number of MT slots the device uses | ||
| 1209 | * @slot: MT slot currently being transmitted | ||
| 1210 | * @trkid: stores MT tracking ID for the current contact | ||
| 1211 | * @absinfo: array of &struct input_absinfo elements holding information | 1219 | * @absinfo: array of &struct input_absinfo elements holding information |
| 1212 | * about absolute axes (current value, min, max, flat, fuzz, | 1220 | * about absolute axes (current value, min, max, flat, fuzz, |
| 1213 | * resolution) | 1221 | * resolution) |
| @@ -1244,7 +1252,6 @@ struct ff_effect { | |||
| 1244 | * last user closes the device | 1252 | * last user closes the device |
| 1245 | * @going_away: marks devices that are in a middle of unregistering and | 1253 | * @going_away: marks devices that are in a middle of unregistering and |
| 1246 | * causes input_open_device*() fail with -ENODEV. | 1254 | * causes input_open_device*() fail with -ENODEV. |
| 1247 | * @sync: set to %true when there were no new events since last EV_SYN | ||
| 1248 | * @dev: driver model's view of this device | 1255 | * @dev: driver model's view of this device |
| 1249 | * @h_list: list of input handles associated with the device. When | 1256 | * @h_list: list of input handles associated with the device. When |
| 1250 | * accessing the list dev->mutex must be held | 1257 | * accessing the list dev->mutex must be held |
| @@ -1287,10 +1294,7 @@ struct input_dev { | |||
| 1287 | 1294 | ||
| 1288 | int rep[REP_CNT]; | 1295 | int rep[REP_CNT]; |
| 1289 | 1296 | ||
| 1290 | struct input_mt_slot *mt; | 1297 | struct input_mt *mt; |
| 1291 | int mtsize; | ||
| 1292 | int slot; | ||
| 1293 | int trkid; | ||
| 1294 | 1298 | ||
| 1295 | struct input_absinfo *absinfo; | 1299 | struct input_absinfo *absinfo; |
| 1296 | 1300 | ||
| @@ -1312,12 +1316,14 @@ struct input_dev { | |||
| 1312 | unsigned int users; | 1316 | unsigned int users; |
| 1313 | bool going_away; | 1317 | bool going_away; |
| 1314 | 1318 | ||
| 1315 | bool sync; | ||
| 1316 | |||
| 1317 | struct device dev; | 1319 | struct device dev; |
| 1318 | 1320 | ||
| 1319 | struct list_head h_list; | 1321 | struct list_head h_list; |
| 1320 | struct list_head node; | 1322 | struct list_head node; |
| 1323 | |||
| 1324 | unsigned int num_vals; | ||
| 1325 | unsigned int max_vals; | ||
| 1326 | struct input_value *vals; | ||
| 1321 | }; | 1327 | }; |
| 1322 | #define to_input_dev(d) container_of(d, struct input_dev, dev) | 1328 | #define to_input_dev(d) container_of(d, struct input_dev, dev) |
| 1323 | 1329 | ||
| @@ -1378,6 +1384,9 @@ struct input_handle; | |||
| 1378 | * @event: event handler. This method is being called by input core with | 1384 | * @event: event handler. This method is being called by input core with |
| 1379 | * interrupts disabled and dev->event_lock spinlock held and so | 1385 | * interrupts disabled and dev->event_lock spinlock held and so |
| 1380 | * it may not sleep | 1386 | * it may not sleep |
| 1387 | * @events: event sequence handler. This method is being called by | ||
| 1388 | * input core with interrupts disabled and dev->event_lock | ||
| 1389 | * spinlock held and so it may not sleep | ||
| 1381 | * @filter: similar to @event; separates normal event handlers from | 1390 | * @filter: similar to @event; separates normal event handlers from |
| 1382 | * "filters". | 1391 | * "filters". |
| 1383 | * @match: called after comparing device's id with handler's id_table | 1392 | * @match: called after comparing device's id with handler's id_table |
| @@ -1414,6 +1423,8 @@ struct input_handler { | |||
| 1414 | void *private; | 1423 | void *private; |
| 1415 | 1424 | ||
| 1416 | void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); | 1425 | void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); |
| 1426 | void (*events)(struct input_handle *handle, | ||
| 1427 | const struct input_value *vals, unsigned int count); | ||
| 1417 | bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value); | 1428 | bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value); |
| 1418 | bool (*match)(struct input_handler *handler, struct input_dev *dev); | 1429 | bool (*match)(struct input_handler *handler, struct input_dev *dev); |
| 1419 | int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id); | 1430 | int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id); |
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h index f86737586e19..cc5cca774bab 100644 --- a/include/linux/input/mt.h +++ b/include/linux/input/mt.h | |||
| @@ -15,12 +15,41 @@ | |||
| 15 | 15 | ||
| 16 | #define TRKID_MAX 0xffff | 16 | #define TRKID_MAX 0xffff |
| 17 | 17 | ||
| 18 | #define INPUT_MT_POINTER 0x0001 /* pointer device, e.g. trackpad */ | ||
| 19 | #define INPUT_MT_DIRECT 0x0002 /* direct device, e.g. touchscreen */ | ||
| 20 | #define INPUT_MT_DROP_UNUSED 0x0004 /* drop contacts not seen in frame */ | ||
| 21 | #define INPUT_MT_TRACK 0x0008 /* use in-kernel tracking */ | ||
| 22 | |||
| 18 | /** | 23 | /** |
| 19 | * struct input_mt_slot - represents the state of an input MT slot | 24 | * struct input_mt_slot - represents the state of an input MT slot |
| 20 | * @abs: holds current values of ABS_MT axes for this slot | 25 | * @abs: holds current values of ABS_MT axes for this slot |
| 26 | * @frame: last frame at which input_mt_report_slot_state() was called | ||
| 27 | * @key: optional driver designation of this slot | ||
| 21 | */ | 28 | */ |
| 22 | struct input_mt_slot { | 29 | struct input_mt_slot { |
| 23 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; | 30 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; |
| 31 | unsigned int frame; | ||
| 32 | unsigned int key; | ||
| 33 | }; | ||
| 34 | |||
| 35 | /** | ||
| 36 | * struct input_mt - state of tracked contacts | ||
| 37 | * @trkid: stores MT tracking ID for the next contact | ||
| 38 | * @num_slots: number of MT slots the device uses | ||
| 39 | * @slot: MT slot currently being transmitted | ||
| 40 | * @flags: input_mt operation flags | ||
| 41 | * @frame: increases every time input_mt_sync_frame() is called | ||
| 42 | * @red: reduced cost matrix for in-kernel tracking | ||
| 43 | * @slots: array of slots holding current values of tracked contacts | ||
| 44 | */ | ||
| 45 | struct input_mt { | ||
| 46 | int trkid; | ||
| 47 | int num_slots; | ||
| 48 | int slot; | ||
| 49 | unsigned int flags; | ||
| 50 | unsigned int frame; | ||
| 51 | int *red; | ||
| 52 | struct input_mt_slot slots[]; | ||
| 24 | }; | 53 | }; |
| 25 | 54 | ||
| 26 | static inline void input_mt_set_value(struct input_mt_slot *slot, | 55 | static inline void input_mt_set_value(struct input_mt_slot *slot, |
| @@ -35,12 +64,18 @@ static inline int input_mt_get_value(const struct input_mt_slot *slot, | |||
| 35 | return slot->abs[code - ABS_MT_FIRST]; | 64 | return slot->abs[code - ABS_MT_FIRST]; |
| 36 | } | 65 | } |
| 37 | 66 | ||
| 38 | int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots); | 67 | static inline bool input_mt_is_active(const struct input_mt_slot *slot) |
| 68 | { | ||
| 69 | return input_mt_get_value(slot, ABS_MT_TRACKING_ID) >= 0; | ||
| 70 | } | ||
| 71 | |||
| 72 | int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots, | ||
| 73 | unsigned int flags); | ||
| 39 | void input_mt_destroy_slots(struct input_dev *dev); | 74 | void input_mt_destroy_slots(struct input_dev *dev); |
| 40 | 75 | ||
| 41 | static inline int input_mt_new_trkid(struct input_dev *dev) | 76 | static inline int input_mt_new_trkid(struct input_mt *mt) |
| 42 | { | 77 | { |
| 43 | return dev->trkid++ & TRKID_MAX; | 78 | return mt->trkid++ & TRKID_MAX; |
| 44 | } | 79 | } |
| 45 | 80 | ||
| 46 | static inline void input_mt_slot(struct input_dev *dev, int slot) | 81 | static inline void input_mt_slot(struct input_dev *dev, int slot) |
| @@ -64,4 +99,20 @@ void input_mt_report_slot_state(struct input_dev *dev, | |||
| 64 | void input_mt_report_finger_count(struct input_dev *dev, int count); | 99 | void input_mt_report_finger_count(struct input_dev *dev, int count); |
| 65 | void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count); | 100 | void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count); |
| 66 | 101 | ||
| 102 | void input_mt_sync_frame(struct input_dev *dev); | ||
| 103 | |||
| 104 | /** | ||
| 105 | * struct input_mt_pos - contact position | ||
| 106 | * @x: horizontal coordinate | ||
| 107 | * @y: vertical coordinate | ||
| 108 | */ | ||
| 109 | struct input_mt_pos { | ||
| 110 | s16 x, y; | ||
| 111 | }; | ||
| 112 | |||
| 113 | int input_mt_assign_slots(struct input_dev *dev, int *slots, | ||
| 114 | const struct input_mt_pos *pos, int num_pos); | ||
| 115 | |||
| 116 | int input_mt_get_slot_by_key(struct input_dev *dev, int key); | ||
| 117 | |||
| 67 | #endif | 118 | #endif |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index c5f856a040b9..5e4e6170f43a 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -430,6 +430,8 @@ enum | |||
| 430 | NR_SOFTIRQS | 430 | NR_SOFTIRQS |
| 431 | }; | 431 | }; |
| 432 | 432 | ||
| 433 | #define SOFTIRQ_STOP_IDLE_MASK (~(1 << RCU_SOFTIRQ)) | ||
| 434 | |||
| 433 | /* map softirq index to softirq name. update 'softirq_to_name' in | 435 | /* map softirq index to softirq name. update 'softirq_to_name' in |
| 434 | * kernel/softirq.c when adding a new softirq. | 436 | * kernel/softirq.c when adding a new softirq. |
| 435 | */ | 437 | */ |
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 7e83370e6fd2..f3b99e1c1042 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
| @@ -256,72 +256,78 @@ static inline void iommu_set_fault_handler(struct iommu_domain *domain, | |||
| 256 | { | 256 | { |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | int iommu_attach_group(struct iommu_domain *domain, struct iommu_group *group) | 259 | static inline int iommu_attach_group(struct iommu_domain *domain, |
| 260 | struct iommu_group *group) | ||
| 260 | { | 261 | { |
| 261 | return -ENODEV; | 262 | return -ENODEV; |
| 262 | } | 263 | } |
| 263 | 264 | ||
| 264 | void iommu_detach_group(struct iommu_domain *domain, struct iommu_group *group) | 265 | static inline void iommu_detach_group(struct iommu_domain *domain, |
| 266 | struct iommu_group *group) | ||
| 265 | { | 267 | { |
| 266 | } | 268 | } |
| 267 | 269 | ||
| 268 | struct iommu_group *iommu_group_alloc(void) | 270 | static inline struct iommu_group *iommu_group_alloc(void) |
| 269 | { | 271 | { |
| 270 | return ERR_PTR(-ENODEV); | 272 | return ERR_PTR(-ENODEV); |
| 271 | } | 273 | } |
| 272 | 274 | ||
| 273 | void *iommu_group_get_iommudata(struct iommu_group *group) | 275 | static inline void *iommu_group_get_iommudata(struct iommu_group *group) |
| 274 | { | 276 | { |
| 275 | return NULL; | 277 | return NULL; |
| 276 | } | 278 | } |
| 277 | 279 | ||
| 278 | void iommu_group_set_iommudata(struct iommu_group *group, void *iommu_data, | 280 | static inline void iommu_group_set_iommudata(struct iommu_group *group, |
| 279 | void (*release)(void *iommu_data)) | 281 | void *iommu_data, |
| 282 | void (*release)(void *iommu_data)) | ||
| 280 | { | 283 | { |
| 281 | } | 284 | } |
| 282 | 285 | ||
| 283 | int iommu_group_set_name(struct iommu_group *group, const char *name) | 286 | static inline int iommu_group_set_name(struct iommu_group *group, |
| 287 | const char *name) | ||
| 284 | { | 288 | { |
| 285 | return -ENODEV; | 289 | return -ENODEV; |
| 286 | } | 290 | } |
| 287 | 291 | ||
| 288 | int iommu_group_add_device(struct iommu_group *group, struct device *dev) | 292 | static inline int iommu_group_add_device(struct iommu_group *group, |
| 293 | struct device *dev) | ||
| 289 | { | 294 | { |
| 290 | return -ENODEV; | 295 | return -ENODEV; |
| 291 | } | 296 | } |
| 292 | 297 | ||
| 293 | void iommu_group_remove_device(struct device *dev) | 298 | static inline void iommu_group_remove_device(struct device *dev) |
| 294 | { | 299 | { |
| 295 | } | 300 | } |
| 296 | 301 | ||
| 297 | int iommu_group_for_each_dev(struct iommu_group *group, void *data, | 302 | static inline int iommu_group_for_each_dev(struct iommu_group *group, |
| 298 | int (*fn)(struct device *, void *)) | 303 | void *data, |
| 304 | int (*fn)(struct device *, void *)) | ||
| 299 | { | 305 | { |
| 300 | return -ENODEV; | 306 | return -ENODEV; |
| 301 | } | 307 | } |
| 302 | 308 | ||
| 303 | struct iommu_group *iommu_group_get(struct device *dev) | 309 | static inline struct iommu_group *iommu_group_get(struct device *dev) |
| 304 | { | 310 | { |
| 305 | return NULL; | 311 | return NULL; |
| 306 | } | 312 | } |
| 307 | 313 | ||
| 308 | void iommu_group_put(struct iommu_group *group) | 314 | static inline void iommu_group_put(struct iommu_group *group) |
| 309 | { | 315 | { |
| 310 | } | 316 | } |
| 311 | 317 | ||
| 312 | int iommu_group_register_notifier(struct iommu_group *group, | 318 | static inline int iommu_group_register_notifier(struct iommu_group *group, |
| 313 | struct notifier_block *nb) | 319 | struct notifier_block *nb) |
| 314 | { | 320 | { |
| 315 | return -ENODEV; | 321 | return -ENODEV; |
| 316 | } | 322 | } |
| 317 | 323 | ||
| 318 | int iommu_group_unregister_notifier(struct iommu_group *group, | 324 | static inline int iommu_group_unregister_notifier(struct iommu_group *group, |
| 319 | struct notifier_block *nb) | 325 | struct notifier_block *nb) |
| 320 | { | 326 | { |
| 321 | return 0; | 327 | return 0; |
| 322 | } | 328 | } |
| 323 | 329 | ||
| 324 | int iommu_group_id(struct iommu_group *group) | 330 | static inline int iommu_group_id(struct iommu_group *group) |
| 325 | { | 331 | { |
| 326 | return -ENODEV; | 332 | return -ENODEV; |
| 327 | } | 333 | } |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 9a323d12de1c..0ba014c55056 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
| @@ -10,12 +10,10 @@ | |||
| 10 | 10 | ||
| 11 | struct irq_affinity_notify; | 11 | struct irq_affinity_notify; |
| 12 | struct proc_dir_entry; | 12 | struct proc_dir_entry; |
| 13 | struct timer_rand_state; | ||
| 14 | struct module; | 13 | struct module; |
| 15 | /** | 14 | /** |
| 16 | * struct irq_desc - interrupt descriptor | 15 | * struct irq_desc - interrupt descriptor |
| 17 | * @irq_data: per irq and chip data passed down to chip functions | 16 | * @irq_data: per irq and chip data passed down to chip functions |
| 18 | * @timer_rand_state: pointer to timer rand state struct | ||
| 19 | * @kstat_irqs: irq stats per cpu | 17 | * @kstat_irqs: irq stats per cpu |
| 20 | * @handle_irq: highlevel irq-events handler | 18 | * @handle_irq: highlevel irq-events handler |
| 21 | * @preflow_handler: handler called before the flow handler (currently used by sparc) | 19 | * @preflow_handler: handler called before the flow handler (currently used by sparc) |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 604382143bcf..2451f1f7a1d9 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -82,10 +82,18 @@ | |||
| 82 | __x - (__x % (y)); \ | 82 | __x - (__x % (y)); \ |
| 83 | } \ | 83 | } \ |
| 84 | ) | 84 | ) |
| 85 | |||
| 86 | /* | ||
| 87 | * Divide positive or negative dividend by positive divisor and round | ||
| 88 | * to closest integer. Result is undefined for negative divisors. | ||
| 89 | */ | ||
| 85 | #define DIV_ROUND_CLOSEST(x, divisor)( \ | 90 | #define DIV_ROUND_CLOSEST(x, divisor)( \ |
| 86 | { \ | 91 | { \ |
| 87 | typeof(divisor) __divisor = divisor; \ | 92 | typeof(x) __x = x; \ |
| 88 | (((x) + ((__divisor) / 2)) / (__divisor)); \ | 93 | typeof(divisor) __d = divisor; \ |
| 94 | (((typeof(x))-1) > 0 || (__x) > 0) ? \ | ||
| 95 | (((__x) + ((__d) / 2)) / (__d)) : \ | ||
| 96 | (((__x) - ((__d) / 2)) / (__d)); \ | ||
| 89 | } \ | 97 | } \ |
| 90 | ) | 98 | ) |
| 91 | 99 | ||
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 2fbd9053c2df..36d12f0884c3 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
| @@ -130,4 +130,12 @@ extern void account_process_tick(struct task_struct *, int user); | |||
| 130 | extern void account_steal_ticks(unsigned long ticks); | 130 | extern void account_steal_ticks(unsigned long ticks); |
| 131 | extern void account_idle_ticks(unsigned long ticks); | 131 | extern void account_idle_ticks(unsigned long ticks); |
| 132 | 132 | ||
| 133 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
| 134 | extern void vtime_task_switch(struct task_struct *prev); | ||
| 135 | extern void vtime_account_system(struct task_struct *tsk); | ||
| 136 | extern void vtime_account_idle(struct task_struct *tsk); | ||
| 137 | #else | ||
| 138 | static inline void vtime_task_switch(struct task_struct *prev) { } | ||
| 139 | #endif | ||
| 140 | |||
| 133 | #endif /* _LINUX_KERNEL_STAT_H */ | 141 | #endif /* _LINUX_KERNEL_STAT_H */ |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index fc615a97e2d3..1e57449395b1 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -224,7 +224,7 @@ static inline int kobject_uevent_env(struct kobject *kobj, | |||
| 224 | 224 | ||
| 225 | static inline __printf(2, 3) | 225 | static inline __printf(2, 3) |
| 226 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) | 226 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) |
| 227 | { return 0; } | 227 | { return -ENOMEM; } |
| 228 | 228 | ||
| 229 | static inline int kobject_action_type(const char *buf, size_t count, | 229 | static inline int kobject_action_type(const char *buf, size_t count, |
| 230 | enum kobject_action *type) | 230 | enum kobject_action *type) |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index b6e1f8c00577..23755ba42abc 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #include <linux/spinlock.h> | 38 | #include <linux/spinlock.h> |
| 39 | #include <linux/rcupdate.h> | 39 | #include <linux/rcupdate.h> |
| 40 | #include <linux/mutex.h> | 40 | #include <linux/mutex.h> |
| 41 | #include <linux/ftrace.h> | ||
| 41 | 42 | ||
| 42 | #ifdef CONFIG_KPROBES | 43 | #ifdef CONFIG_KPROBES |
| 43 | #include <asm/kprobes.h> | 44 | #include <asm/kprobes.h> |
| @@ -48,14 +49,26 @@ | |||
| 48 | #define KPROBE_REENTER 0x00000004 | 49 | #define KPROBE_REENTER 0x00000004 |
| 49 | #define KPROBE_HIT_SSDONE 0x00000008 | 50 | #define KPROBE_HIT_SSDONE 0x00000008 |
| 50 | 51 | ||
| 52 | /* | ||
| 53 | * If function tracer is enabled and the arch supports full | ||
| 54 | * passing of pt_regs to function tracing, then kprobes can | ||
| 55 | * optimize on top of function tracing. | ||
| 56 | */ | ||
| 57 | #if defined(CONFIG_FUNCTION_TRACER) && defined(ARCH_SUPPORTS_FTRACE_SAVE_REGS) \ | ||
| 58 | && defined(ARCH_SUPPORTS_KPROBES_ON_FTRACE) | ||
| 59 | # define KPROBES_CAN_USE_FTRACE | ||
| 60 | #endif | ||
| 61 | |||
| 51 | /* Attach to insert probes on any functions which should be ignored*/ | 62 | /* Attach to insert probes on any functions which should be ignored*/ |
| 52 | #define __kprobes __attribute__((__section__(".kprobes.text"))) | 63 | #define __kprobes __attribute__((__section__(".kprobes.text"))) |
| 64 | |||
| 53 | #else /* CONFIG_KPROBES */ | 65 | #else /* CONFIG_KPROBES */ |
| 54 | typedef int kprobe_opcode_t; | 66 | typedef int kprobe_opcode_t; |
| 55 | struct arch_specific_insn { | 67 | struct arch_specific_insn { |
| 56 | int dummy; | 68 | int dummy; |
| 57 | }; | 69 | }; |
| 58 | #define __kprobes | 70 | #define __kprobes |
| 71 | |||
| 59 | #endif /* CONFIG_KPROBES */ | 72 | #endif /* CONFIG_KPROBES */ |
| 60 | 73 | ||
| 61 | struct kprobe; | 74 | struct kprobe; |
| @@ -128,6 +141,7 @@ struct kprobe { | |||
| 128 | * NOTE: | 141 | * NOTE: |
| 129 | * this flag is only for optimized_kprobe. | 142 | * this flag is only for optimized_kprobe. |
| 130 | */ | 143 | */ |
| 144 | #define KPROBE_FLAG_FTRACE 8 /* probe is using ftrace */ | ||
| 131 | 145 | ||
| 132 | /* Has this kprobe gone ? */ | 146 | /* Has this kprobe gone ? */ |
| 133 | static inline int kprobe_gone(struct kprobe *p) | 147 | static inline int kprobe_gone(struct kprobe *p) |
| @@ -146,6 +160,13 @@ static inline int kprobe_optimized(struct kprobe *p) | |||
| 146 | { | 160 | { |
| 147 | return p->flags & KPROBE_FLAG_OPTIMIZED; | 161 | return p->flags & KPROBE_FLAG_OPTIMIZED; |
| 148 | } | 162 | } |
| 163 | |||
| 164 | /* Is this kprobe uses ftrace ? */ | ||
| 165 | static inline int kprobe_ftrace(struct kprobe *p) | ||
| 166 | { | ||
| 167 | return p->flags & KPROBE_FLAG_FTRACE; | ||
| 168 | } | ||
| 169 | |||
| 149 | /* | 170 | /* |
| 150 | * Special probe type that uses setjmp-longjmp type tricks to resume | 171 | * Special probe type that uses setjmp-longjmp type tricks to resume |
| 151 | * execution at a specified entry with a matching prototype corresponding | 172 | * execution at a specified entry with a matching prototype corresponding |
| @@ -295,6 +316,12 @@ extern int proc_kprobes_optimization_handler(struct ctl_table *table, | |||
| 295 | #endif | 316 | #endif |
| 296 | 317 | ||
| 297 | #endif /* CONFIG_OPTPROBES */ | 318 | #endif /* CONFIG_OPTPROBES */ |
| 319 | #ifdef KPROBES_CAN_USE_FTRACE | ||
| 320 | extern void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip, | ||
| 321 | struct ftrace_ops *ops, struct pt_regs *regs); | ||
| 322 | extern int arch_prepare_kprobe_ftrace(struct kprobe *p); | ||
| 323 | #endif | ||
| 324 | |||
| 298 | 325 | ||
| 299 | /* Get the kprobe at this addr (if any) - called with preemption disabled */ | 326 | /* Get the kprobe at this addr (if any) - called with preemption disabled */ |
| 300 | struct kprobe *get_kprobe(void *addr); | 327 | struct kprobe *get_kprobe(void *addr); |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 22ccf9dee177..8d816646f766 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
| @@ -14,6 +14,11 @@ struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), | |||
| 14 | kthread_create_on_node(threadfn, data, -1, namefmt, ##arg) | 14 | kthread_create_on_node(threadfn, data, -1, namefmt, ##arg) |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | struct task_struct *kthread_create_on_cpu(int (*threadfn)(void *data), | ||
| 18 | void *data, | ||
| 19 | unsigned int cpu, | ||
| 20 | const char *namefmt); | ||
| 21 | |||
| 17 | /** | 22 | /** |
| 18 | * kthread_run - create and wake a thread. | 23 | * kthread_run - create and wake a thread. |
| 19 | * @threadfn: the function to run until signal_pending(current). | 24 | * @threadfn: the function to run until signal_pending(current). |
| @@ -34,9 +39,13 @@ struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), | |||
| 34 | 39 | ||
| 35 | void kthread_bind(struct task_struct *k, unsigned int cpu); | 40 | void kthread_bind(struct task_struct *k, unsigned int cpu); |
| 36 | int kthread_stop(struct task_struct *k); | 41 | int kthread_stop(struct task_struct *k); |
| 37 | int kthread_should_stop(void); | 42 | bool kthread_should_stop(void); |
| 43 | bool kthread_should_park(void); | ||
| 38 | bool kthread_freezable_should_stop(bool *was_frozen); | 44 | bool kthread_freezable_should_stop(bool *was_frozen); |
| 39 | void *kthread_data(struct task_struct *k); | 45 | void *kthread_data(struct task_struct *k); |
| 46 | int kthread_park(struct task_struct *k); | ||
| 47 | void kthread_unpark(struct task_struct *k); | ||
| 48 | void kthread_parkme(void); | ||
| 40 | 49 | ||
| 41 | int kthreadd(void *unused); | 50 | int kthreadd(void *unused); |
| 42 | extern struct task_struct *kthreadd_task; | 51 | extern struct task_struct *kthreadd_task; |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 603bec2913b0..06177ba10a16 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
| @@ -58,13 +58,6 @@ union ktime { | |||
| 58 | 58 | ||
| 59 | typedef union ktime ktime_t; /* Kill this */ | 59 | typedef union ktime ktime_t; /* Kill this */ |
| 60 | 60 | ||
| 61 | #define KTIME_MAX ((s64)~((u64)1 << 63)) | ||
| 62 | #if (BITS_PER_LONG == 64) | ||
| 63 | # define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) | ||
| 64 | #else | ||
| 65 | # define KTIME_SEC_MAX LONG_MAX | ||
| 66 | #endif | ||
| 67 | |||
| 68 | /* | 61 | /* |
| 69 | * ktime_t definitions when using the 64-bit scalar representation: | 62 | * ktime_t definitions when using the 64-bit scalar representation: |
| 70 | */ | 63 | */ |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index b70b48b01098..8a59e0abe5fa 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -685,7 +685,7 @@ static inline int kvm_deassign_device(struct kvm *kvm, | |||
| 685 | static inline void kvm_guest_enter(void) | 685 | static inline void kvm_guest_enter(void) |
| 686 | { | 686 | { |
| 687 | BUG_ON(preemptible()); | 687 | BUG_ON(preemptible()); |
| 688 | account_system_vtime(current); | 688 | vtime_account(current); |
| 689 | current->flags |= PF_VCPU; | 689 | current->flags |= PF_VCPU; |
| 690 | /* KVM does not hold any references to rcu protected data when it | 690 | /* KVM does not hold any references to rcu protected data when it |
| 691 | * switches CPU into a guest mode. In fact switching to a guest mode | 691 | * switches CPU into a guest mode. In fact switching to a guest mode |
| @@ -699,7 +699,7 @@ static inline void kvm_guest_enter(void) | |||
| 699 | 699 | ||
| 700 | static inline void kvm_guest_exit(void) | 700 | static inline void kvm_guest_exit(void) |
| 701 | { | 701 | { |
| 702 | account_system_vtime(current); | 702 | vtime_account(current); |
| 703 | current->flags &= ~PF_VCPU; | 703 | current->flags &= ~PF_VCPU; |
| 704 | } | 704 | } |
| 705 | 705 | ||
diff --git a/include/linux/mISDNhw.h b/include/linux/mISDNhw.h index d0752eca9b44..9d96d5d4dfed 100644 --- a/include/linux/mISDNhw.h +++ b/include/linux/mISDNhw.h | |||
| @@ -183,7 +183,7 @@ extern int mISDN_initbchannel(struct bchannel *, unsigned short, | |||
| 183 | unsigned short); | 183 | unsigned short); |
| 184 | extern int mISDN_freedchannel(struct dchannel *); | 184 | extern int mISDN_freedchannel(struct dchannel *); |
| 185 | extern void mISDN_clear_bchannel(struct bchannel *); | 185 | extern void mISDN_clear_bchannel(struct bchannel *); |
| 186 | extern int mISDN_freebchannel(struct bchannel *); | 186 | extern void mISDN_freebchannel(struct bchannel *); |
| 187 | extern int mISDN_ctrl_bchannel(struct bchannel *, struct mISDN_ctrl_req *); | 187 | extern int mISDN_ctrl_bchannel(struct bchannel *, struct mISDN_ctrl_req *); |
| 188 | extern void queue_ch_frame(struct mISDNchannel *, u_int, | 188 | extern void queue_ch_frame(struct mISDNchannel *, u_int, |
| 189 | int, struct sk_buff *); | 189 | int, struct sk_buff *); |
diff --git a/include/linux/memory.h b/include/linux/memory.h index 1ac7f6e405f9..ff9a9f8e0ed9 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | #include <linux/compiler.h> | 19 | #include <linux/compiler.h> |
| 20 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
| 21 | 21 | ||
| 22 | #define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS) | 22 | #define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS) |
| 23 | 23 | ||
| 24 | struct memory_block { | 24 | struct memory_block { |
| 25 | unsigned long start_section_nr; | 25 | unsigned long start_section_nr; |
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 3a8435a8058f..cebe97ee98b8 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | 16 | ||
| 17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
| 18 | 18 | ||
| 19 | struct irq_domain; | ||
| 20 | |||
| 19 | /* | 21 | /* |
| 20 | * This struct describes the MFD part ("cell"). | 22 | * This struct describes the MFD part ("cell"). |
| 21 | * After registration the copy of this structure will become the platform data | 23 | * After registration the copy of this structure will become the platform data |
| @@ -98,7 +100,7 @@ static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev) | |||
| 98 | extern int mfd_add_devices(struct device *parent, int id, | 100 | extern int mfd_add_devices(struct device *parent, int id, |
| 99 | struct mfd_cell *cells, int n_devs, | 101 | struct mfd_cell *cells, int n_devs, |
| 100 | struct resource *mem_base, | 102 | struct resource *mem_base, |
| 101 | int irq_base); | 103 | int irq_base, struct irq_domain *irq_domain); |
| 102 | 104 | ||
| 103 | extern void mfd_remove_devices(struct device *parent); | 105 | extern void mfd_remove_devices(struct device *parent); |
| 104 | 106 | ||
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h index 5b90e94399e1..c410d99bd667 100644 --- a/include/linux/mfd/dbx500-prcmu.h +++ b/include/linux/mfd/dbx500-prcmu.h | |||
| @@ -136,6 +136,7 @@ enum prcmu_clock { | |||
| 136 | PRCMU_TIMCLK, | 136 | PRCMU_TIMCLK, |
| 137 | PRCMU_PLLSOC0, | 137 | PRCMU_PLLSOC0, |
| 138 | PRCMU_PLLSOC1, | 138 | PRCMU_PLLSOC1, |
| 139 | PRCMU_ARMSS, | ||
| 139 | PRCMU_PLLDDR, | 140 | PRCMU_PLLDDR, |
| 140 | PRCMU_PLLDSI, | 141 | PRCMU_PLLDSI, |
| 141 | PRCMU_DSI0CLK, | 142 | PRCMU_DSI0CLK, |
diff --git a/include/linux/mfd/max77686.h b/include/linux/mfd/max77686.h index 3d7ae4d7fd36..46c0f320ed76 100644 --- a/include/linux/mfd/max77686.h +++ b/include/linux/mfd/max77686.h | |||
| @@ -74,6 +74,7 @@ enum max77686_regulators { | |||
| 74 | struct max77686_regulator_data { | 74 | struct max77686_regulator_data { |
| 75 | int id; | 75 | int id; |
| 76 | struct regulator_init_data *initdata; | 76 | struct regulator_init_data *initdata; |
| 77 | struct device_node *of_node; | ||
| 77 | }; | 78 | }; |
| 78 | 79 | ||
| 79 | enum max77686_opmode { | 80 | enum max77686_opmode { |
diff --git a/include/linux/mfd/max8998.h b/include/linux/mfd/max8998.h index f4f0dfa4698a..6823548d0c0a 100644 --- a/include/linux/mfd/max8998.h +++ b/include/linux/mfd/max8998.h | |||
| @@ -67,7 +67,7 @@ struct max8998_regulator_data { | |||
| 67 | /** | 67 | /** |
| 68 | * struct max8998_board - packages regulator init data | 68 | * struct max8998_board - packages regulator init data |
| 69 | * @regulators: array of defined regulators | 69 | * @regulators: array of defined regulators |
| 70 | * @num_regulators: number of regultors used | 70 | * @num_regulators: number of regulators used |
| 71 | * @irq_base: base IRQ number for max8998, required for IRQs | 71 | * @irq_base: base IRQ number for max8998, required for IRQs |
| 72 | * @ono: power onoff IRQ number for max8998 | 72 | * @ono: power onoff IRQ number for max8998 |
| 73 | * @buck_voltage_lock: Do NOT change the values of the following six | 73 | * @buck_voltage_lock: Do NOT change the values of the following six |
diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h index 12c06870829a..7cd83d826ed8 100644 --- a/include/linux/mfd/tps65217.h +++ b/include/linux/mfd/tps65217.h | |||
| @@ -22,6 +22,9 @@ | |||
| 22 | #include <linux/regulator/driver.h> | 22 | #include <linux/regulator/driver.h> |
| 23 | #include <linux/regulator/machine.h> | 23 | #include <linux/regulator/machine.h> |
| 24 | 24 | ||
| 25 | /* TPS chip id list */ | ||
| 26 | #define TPS65217 0xF0 | ||
| 27 | |||
| 25 | /* I2C ID for TPS65217 part */ | 28 | /* I2C ID for TPS65217 part */ |
| 26 | #define TPS65217_I2C_ID 0x24 | 29 | #define TPS65217_I2C_ID 0x24 |
| 27 | 30 | ||
| @@ -248,13 +251,11 @@ struct tps_info { | |||
| 248 | struct tps65217 { | 251 | struct tps65217 { |
| 249 | struct device *dev; | 252 | struct device *dev; |
| 250 | struct tps65217_board *pdata; | 253 | struct tps65217_board *pdata; |
| 254 | unsigned int id; | ||
| 251 | struct regulator_desc desc[TPS65217_NUM_REGULATOR]; | 255 | struct regulator_desc desc[TPS65217_NUM_REGULATOR]; |
| 252 | struct regulator_dev *rdev[TPS65217_NUM_REGULATOR]; | 256 | struct regulator_dev *rdev[TPS65217_NUM_REGULATOR]; |
| 253 | struct tps_info *info[TPS65217_NUM_REGULATOR]; | 257 | struct tps_info *info[TPS65217_NUM_REGULATOR]; |
| 254 | struct regmap *regmap; | 258 | struct regmap *regmap; |
| 255 | |||
| 256 | /* Client devices */ | ||
| 257 | struct platform_device *regulator_pdev[TPS65217_NUM_REGULATOR]; | ||
| 258 | }; | 259 | }; |
| 259 | 260 | ||
| 260 | static inline struct tps65217 *dev_to_tps65217(struct device *dev) | 261 | static inline struct tps65217 *dev_to_tps65217(struct device *dev) |
| @@ -262,6 +263,11 @@ static inline struct tps65217 *dev_to_tps65217(struct device *dev) | |||
| 262 | return dev_get_drvdata(dev); | 263 | return dev_get_drvdata(dev); |
| 263 | } | 264 | } |
| 264 | 265 | ||
| 266 | static inline int tps65217_chip_id(struct tps65217 *tps65217) | ||
| 267 | { | ||
| 268 | return tps65217->id; | ||
| 269 | } | ||
| 270 | |||
| 265 | int tps65217_reg_read(struct tps65217 *tps, unsigned int reg, | 271 | int tps65217_reg_read(struct tps65217 *tps, unsigned int reg, |
| 266 | unsigned int *val); | 272 | unsigned int *val); |
| 267 | int tps65217_reg_write(struct tps65217 *tps, unsigned int reg, | 273 | int tps65217_reg_write(struct tps65217 *tps, unsigned int reg, |
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h index f350fd0ba1df..94514710a03f 100644 --- a/include/linux/mfd/tps6586x.h +++ b/include/linux/mfd/tps6586x.h | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #define TPS6586X_SLEW_RATE_MASK 0x07 | 14 | #define TPS6586X_SLEW_RATE_MASK 0x07 |
| 15 | 15 | ||
| 16 | enum { | 16 | enum { |
| 17 | TPS6586X_ID_SYS, | ||
| 17 | TPS6586X_ID_SM_0, | 18 | TPS6586X_ID_SM_0, |
| 18 | TPS6586X_ID_SM_1, | 19 | TPS6586X_ID_SM_1, |
| 19 | TPS6586X_ID_SM_2, | 20 | TPS6586X_ID_SM_2, |
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h index 61f0905bdc48..de201203bc7c 100644 --- a/include/linux/micrel_phy.h +++ b/include/linux/micrel_phy.h | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/micrel_phy.h | ||
| 3 | * | ||
| 4 | * Micrel PHY IDs | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms of the GNU General Public License as published by the | ||
| 8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 9 | * option) any later version. | ||
| 10 | * | ||
| 11 | */ | ||
| 12 | |||
| 1 | #ifndef _MICREL_PHY_H | 13 | #ifndef _MICREL_PHY_H |
| 2 | #define _MICREL_PHY_H | 14 | #define _MICREL_PHY_H |
| 3 | 15 | ||
| @@ -5,10 +17,11 @@ | |||
| 5 | 17 | ||
| 6 | #define PHY_ID_KSZ9021 0x00221610 | 18 | #define PHY_ID_KSZ9021 0x00221610 |
| 7 | #define PHY_ID_KS8737 0x00221720 | 19 | #define PHY_ID_KS8737 0x00221720 |
| 8 | #define PHY_ID_KS8041 0x00221510 | 20 | #define PHY_ID_KSZ8021 0x00221555 |
| 9 | #define PHY_ID_KS8051 0x00221550 | 21 | #define PHY_ID_KSZ8041 0x00221510 |
| 22 | #define PHY_ID_KSZ8051 0x00221550 | ||
| 10 | /* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */ | 23 | /* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */ |
| 11 | #define PHY_ID_KS8001 0x0022161A | 24 | #define PHY_ID_KSZ8001 0x0022161A |
| 12 | 25 | ||
| 13 | /* struct phy_device dev_flags definitions */ | 26 | /* struct phy_device dev_flags definitions */ |
| 14 | #define MICREL_PHY_50MHZ_CLK 0x00000001 | 27 | #define MICREL_PHY_50MHZ_CLK 0x00000001 |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index bd6c9fcdf2dd..6e1b0f973a03 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -796,6 +796,19 @@ enum mlx4_net_trans_rule_id { | |||
| 796 | MLX4_NET_TRANS_RULE_NUM, /* should be last */ | 796 | MLX4_NET_TRANS_RULE_NUM, /* should be last */ |
| 797 | }; | 797 | }; |
| 798 | 798 | ||
| 799 | extern const u16 __sw_id_hw[]; | ||
| 800 | |||
| 801 | static inline int map_hw_to_sw_id(u16 header_id) | ||
| 802 | { | ||
| 803 | |||
| 804 | int i; | ||
| 805 | for (i = 0; i < MLX4_NET_TRANS_RULE_NUM; i++) { | ||
| 806 | if (header_id == __sw_id_hw[i]) | ||
| 807 | return i; | ||
| 808 | } | ||
| 809 | return -EINVAL; | ||
| 810 | } | ||
| 811 | |||
| 799 | enum mlx4_net_trans_promisc_mode { | 812 | enum mlx4_net_trans_promisc_mode { |
| 800 | MLX4_FS_PROMISC_NONE = 0, | 813 | MLX4_FS_PROMISC_NONE = 0, |
| 801 | MLX4_FS_PROMISC_UPLINK, | 814 | MLX4_FS_PROMISC_UPLINK, |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 111aca5e97f3..4b27f9f503e4 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
| @@ -239,6 +239,7 @@ struct mmc_card { | |||
| 239 | #define MMC_QUIRK_BLK_NO_CMD23 (1<<7) /* Avoid CMD23 for regular multiblock */ | 239 | #define MMC_QUIRK_BLK_NO_CMD23 (1<<7) /* Avoid CMD23 for regular multiblock */ |
| 240 | #define MMC_QUIRK_BROKEN_BYTE_MODE_512 (1<<8) /* Avoid sending 512 bytes in */ | 240 | #define MMC_QUIRK_BROKEN_BYTE_MODE_512 (1<<8) /* Avoid sending 512 bytes in */ |
| 241 | #define MMC_QUIRK_LONG_READ_TIME (1<<9) /* Data read time > CSD says */ | 241 | #define MMC_QUIRK_LONG_READ_TIME (1<<9) /* Data read time > CSD says */ |
| 242 | #define MMC_QUIRK_SEC_ERASE_TRIM_BROKEN (1<<10) /* Skip secure for erase/trim */ | ||
| 242 | /* byte mode */ | 243 | /* byte mode */ |
| 243 | unsigned int poweroff_notify_state; /* eMMC4.5 notify feature */ | 244 | unsigned int poweroff_notify_state; /* eMMC4.5 notify feature */ |
| 244 | #define MMC_NO_POWER_NOTIFICATION 0 | 245 | #define MMC_NO_POWER_NOTIFICATION 0 |
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h index 51bf8ada6dc0..49258e0ed1c6 100644 --- a/include/linux/mv643xx_eth.h +++ b/include/linux/mv643xx_eth.h | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #define MV643XX_ETH_SIZE_REG_4 0x2224 | 15 | #define MV643XX_ETH_SIZE_REG_4 0x2224 |
| 16 | #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290 | 16 | #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290 |
| 17 | 17 | ||
| 18 | #define MV643XX_TX_CSUM_DEFAULT_LIMIT 0 | ||
| 19 | |||
| 18 | struct mv643xx_eth_shared_platform_data { | 20 | struct mv643xx_eth_shared_platform_data { |
| 19 | struct mbus_dram_target_info *dram; | 21 | struct mbus_dram_target_info *dram; |
| 20 | struct platform_device *shared_smi; | 22 | struct platform_device *shared_smi; |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 1f8fc7f9bcd8..4b03f56e280e 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -265,11 +265,6 @@ static inline const struct nfs_rpc_ops *NFS_PROTO(const struct inode *inode) | |||
| 265 | return NFS_SERVER(inode)->nfs_client->rpc_ops; | 265 | return NFS_SERVER(inode)->nfs_client->rpc_ops; |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | static inline __be32 *NFS_COOKIEVERF(const struct inode *inode) | ||
| 269 | { | ||
| 270 | return NFS_I(inode)->cookieverf; | ||
| 271 | } | ||
| 272 | |||
| 273 | static inline unsigned NFS_MINATTRTIMEO(const struct inode *inode) | 268 | static inline unsigned NFS_MINATTRTIMEO(const struct inode *inode) |
| 274 | { | 269 | { |
| 275 | struct nfs_server *nfss = NFS_SERVER(inode); | 270 | struct nfs_server *nfss = NFS_SERVER(inode); |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index ac7c8ae254f2..be9cf3c7e79e 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -652,7 +652,7 @@ struct nfs_getaclargs { | |||
| 652 | }; | 652 | }; |
| 653 | 653 | ||
| 654 | /* getxattr ACL interface flags */ | 654 | /* getxattr ACL interface flags */ |
| 655 | #define NFS4_ACL_LEN_REQUEST 0x0001 /* zero length getxattr buffer */ | 655 | #define NFS4_ACL_TRUNC 0x0001 /* ACL was truncated */ |
| 656 | struct nfs_getaclres { | 656 | struct nfs_getaclres { |
| 657 | size_t acl_len; | 657 | size_t acl_len; |
| 658 | size_t acl_data_offset; | 658 | size_t acl_data_offset; |
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index 9490a00529f4..c25cccaa555a 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
| @@ -35,8 +35,10 @@ struct nvme_bar { | |||
| 35 | __u64 acq; /* Admin CQ Base Address */ | 35 | __u64 acq; /* Admin CQ Base Address */ |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | #define NVME_CAP_MQES(cap) ((cap) & 0xffff) | ||
| 38 | #define NVME_CAP_TIMEOUT(cap) (((cap) >> 24) & 0xff) | 39 | #define NVME_CAP_TIMEOUT(cap) (((cap) >> 24) & 0xff) |
| 39 | #define NVME_CAP_STRIDE(cap) (((cap) >> 32) & 0xf) | 40 | #define NVME_CAP_STRIDE(cap) (((cap) >> 32) & 0xf) |
| 41 | #define NVME_CAP_MPSMIN(cap) (((cap) >> 48) & 0xf) | ||
| 40 | 42 | ||
| 41 | enum { | 43 | enum { |
| 42 | NVME_CC_ENABLE = 1 << 0, | 44 | NVME_CC_ENABLE = 1 << 0, |
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 248fba2af98a..9a22b5efb384 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
| @@ -22,19 +22,24 @@ extern phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle); | |||
| 22 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | 22 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) |
| 23 | { | 23 | { |
| 24 | struct pci_bus *pbus = pdev->bus; | 24 | struct pci_bus *pbus = pdev->bus; |
| 25 | |||
| 25 | /* Find a PCI root bus */ | 26 | /* Find a PCI root bus */ |
| 26 | while (!pci_is_root_bus(pbus)) | 27 | while (!pci_is_root_bus(pbus)) |
| 27 | pbus = pbus->parent; | 28 | pbus = pbus->parent; |
| 28 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), | 29 | |
| 29 | pbus->number); | 30 | return DEVICE_ACPI_HANDLE(pbus->bridge); |
| 30 | } | 31 | } |
| 31 | 32 | ||
| 32 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) | 33 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) |
| 33 | { | 34 | { |
| 34 | if (!pci_is_root_bus(pbus)) | 35 | struct device *dev; |
| 35 | return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); | 36 | |
| 36 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), | 37 | if (pci_is_root_bus(pbus)) |
| 37 | pbus->number); | 38 | dev = pbus->bridge; |
| 39 | else | ||
| 40 | dev = &pbus->self->dev; | ||
| 41 | |||
| 42 | return DEVICE_ACPI_HANDLE(dev); | ||
| 38 | } | 43 | } |
| 39 | #endif | 44 | #endif |
| 40 | 45 | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 5faa8310eec9..be1de01de1c4 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -254,10 +254,10 @@ struct pci_dev { | |||
| 254 | u8 revision; /* PCI revision, low byte of class word */ | 254 | u8 revision; /* PCI revision, low byte of class word */ |
| 255 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ | 255 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ |
| 256 | u8 pcie_cap; /* PCI-E capability offset */ | 256 | u8 pcie_cap; /* PCI-E capability offset */ |
| 257 | u8 pcie_type:4; /* PCI-E device/port type */ | ||
| 258 | u8 pcie_mpss:3; /* PCI-E Max Payload Size Supported */ | 257 | u8 pcie_mpss:3; /* PCI-E Max Payload Size Supported */ |
| 259 | u8 rom_base_reg; /* which config register controls the ROM */ | 258 | u8 rom_base_reg; /* which config register controls the ROM */ |
| 260 | u8 pin; /* which interrupt pin this device uses */ | 259 | u8 pin; /* which interrupt pin this device uses */ |
| 260 | u16 pcie_flags_reg; /* cached PCI-E Capabilities Register */ | ||
| 261 | 261 | ||
| 262 | struct pci_driver *driver; /* which driver has allocated this device */ | 262 | struct pci_driver *driver; /* which driver has allocated this device */ |
| 263 | u64 dma_mask; /* Mask of the bits of bus address this | 263 | u64 dma_mask; /* Mask of the bits of bus address this |
| @@ -369,7 +369,6 @@ static inline struct pci_dev *pci_physfn(struct pci_dev *dev) | |||
| 369 | 369 | ||
| 370 | extern struct pci_dev *alloc_pci_dev(void); | 370 | extern struct pci_dev *alloc_pci_dev(void); |
| 371 | 371 | ||
| 372 | #define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list) | ||
| 373 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 372 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
| 374 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) | 373 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) |
| 375 | 374 | ||
| @@ -596,7 +595,7 @@ struct pci_driver { | |||
| 596 | int (*resume_early) (struct pci_dev *dev); | 595 | int (*resume_early) (struct pci_dev *dev); |
| 597 | int (*resume) (struct pci_dev *dev); /* Device woken up */ | 596 | int (*resume) (struct pci_dev *dev); /* Device woken up */ |
| 598 | void (*shutdown) (struct pci_dev *dev); | 597 | void (*shutdown) (struct pci_dev *dev); |
| 599 | struct pci_error_handlers *err_handler; | 598 | const struct pci_error_handlers *err_handler; |
| 600 | struct device_driver driver; | 599 | struct device_driver driver; |
| 601 | struct pci_dynids dynids; | 600 | struct pci_dynids dynids; |
| 602 | }; | 601 | }; |
| @@ -734,9 +733,7 @@ u8 pci_common_swizzle(struct pci_dev *dev, u8 *pinp); | |||
| 734 | extern struct pci_dev *pci_dev_get(struct pci_dev *dev); | 733 | extern struct pci_dev *pci_dev_get(struct pci_dev *dev); |
| 735 | extern void pci_dev_put(struct pci_dev *dev); | 734 | extern void pci_dev_put(struct pci_dev *dev); |
| 736 | extern void pci_remove_bus(struct pci_bus *b); | 735 | extern void pci_remove_bus(struct pci_bus *b); |
| 737 | extern void __pci_remove_bus_device(struct pci_dev *dev); | ||
| 738 | extern void pci_stop_and_remove_bus_device(struct pci_dev *dev); | 736 | extern void pci_stop_and_remove_bus_device(struct pci_dev *dev); |
| 739 | extern void pci_stop_bus_device(struct pci_dev *dev); | ||
| 740 | void pci_setup_cardbus(struct pci_bus *bus); | 737 | void pci_setup_cardbus(struct pci_bus *bus); |
| 741 | extern void pci_sort_breadthfirst(void); | 738 | extern void pci_sort_breadthfirst(void); |
| 742 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type) | 739 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type) |
| @@ -755,6 +752,7 @@ enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *dev); | |||
| 755 | int pci_find_capability(struct pci_dev *dev, int cap); | 752 | int pci_find_capability(struct pci_dev *dev, int cap); |
| 756 | int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap); | 753 | int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap); |
| 757 | int pci_find_ext_capability(struct pci_dev *dev, int cap); | 754 | int pci_find_ext_capability(struct pci_dev *dev, int cap); |
| 755 | int pci_find_next_ext_capability(struct pci_dev *dev, int pos, int cap); | ||
| 758 | int pci_find_ht_capability(struct pci_dev *dev, int ht_cap); | 756 | int pci_find_ht_capability(struct pci_dev *dev, int ht_cap); |
| 759 | int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap); | 757 | int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap); |
| 760 | struct pci_bus *pci_find_next_bus(const struct pci_bus *from); | 758 | struct pci_bus *pci_find_next_bus(const struct pci_bus *from); |
| @@ -816,6 +814,39 @@ static inline int pci_write_config_dword(const struct pci_dev *dev, int where, | |||
| 816 | return pci_bus_write_config_dword(dev->bus, dev->devfn, where, val); | 814 | return pci_bus_write_config_dword(dev->bus, dev->devfn, where, val); |
| 817 | } | 815 | } |
| 818 | 816 | ||
| 817 | int pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *val); | ||
| 818 | int pcie_capability_read_dword(struct pci_dev *dev, int pos, u32 *val); | ||
| 819 | int pcie_capability_write_word(struct pci_dev *dev, int pos, u16 val); | ||
| 820 | int pcie_capability_write_dword(struct pci_dev *dev, int pos, u32 val); | ||
| 821 | int pcie_capability_clear_and_set_word(struct pci_dev *dev, int pos, | ||
| 822 | u16 clear, u16 set); | ||
| 823 | int pcie_capability_clear_and_set_dword(struct pci_dev *dev, int pos, | ||
| 824 | u32 clear, u32 set); | ||
| 825 | |||
| 826 | static inline int pcie_capability_set_word(struct pci_dev *dev, int pos, | ||
| 827 | u16 set) | ||
| 828 | { | ||
| 829 | return pcie_capability_clear_and_set_word(dev, pos, 0, set); | ||
| 830 | } | ||
| 831 | |||
| 832 | static inline int pcie_capability_set_dword(struct pci_dev *dev, int pos, | ||
| 833 | u32 set) | ||
| 834 | { | ||
| 835 | return pcie_capability_clear_and_set_dword(dev, pos, 0, set); | ||
| 836 | } | ||
| 837 | |||
| 838 | static inline int pcie_capability_clear_word(struct pci_dev *dev, int pos, | ||
| 839 | u16 clear) | ||
| 840 | { | ||
| 841 | return pcie_capability_clear_and_set_word(dev, pos, clear, 0); | ||
| 842 | } | ||
| 843 | |||
| 844 | static inline int pcie_capability_clear_dword(struct pci_dev *dev, int pos, | ||
| 845 | u32 clear) | ||
| 846 | { | ||
| 847 | return pcie_capability_clear_and_set_dword(dev, pos, clear, 0); | ||
| 848 | } | ||
| 849 | |||
| 819 | /* user-space driven config access */ | 850 | /* user-space driven config access */ |
| 820 | int pci_user_read_config_byte(struct pci_dev *dev, int where, u8 *val); | 851 | int pci_user_read_config_byte(struct pci_dev *dev, int where, u8 *val); |
| 821 | int pci_user_read_config_word(struct pci_dev *dev, int where, u16 *val); | 852 | int pci_user_read_config_word(struct pci_dev *dev, int where, u16 *val); |
| @@ -1013,7 +1044,6 @@ void pci_unregister_driver(struct pci_driver *dev); | |||
| 1013 | module_driver(__pci_driver, pci_register_driver, \ | 1044 | module_driver(__pci_driver, pci_register_driver, \ |
| 1014 | pci_unregister_driver) | 1045 | pci_unregister_driver) |
| 1015 | 1046 | ||
| 1016 | void pci_stop_and_remove_behind_bridge(struct pci_dev *dev); | ||
| 1017 | struct pci_driver *pci_dev_driver(const struct pci_dev *dev); | 1047 | struct pci_driver *pci_dev_driver(const struct pci_dev *dev); |
| 1018 | int pci_add_dynid(struct pci_driver *drv, | 1048 | int pci_add_dynid(struct pci_driver *drv, |
| 1019 | unsigned int vendor, unsigned int device, | 1049 | unsigned int vendor, unsigned int device, |
| @@ -1031,6 +1061,8 @@ int pci_cfg_space_size_ext(struct pci_dev *dev); | |||
| 1031 | int pci_cfg_space_size(struct pci_dev *dev); | 1061 | int pci_cfg_space_size(struct pci_dev *dev); |
| 1032 | unsigned char pci_bus_max_busnr(struct pci_bus *bus); | 1062 | unsigned char pci_bus_max_busnr(struct pci_bus *bus); |
| 1033 | void pci_setup_bridge(struct pci_bus *bus); | 1063 | void pci_setup_bridge(struct pci_bus *bus); |
| 1064 | resource_size_t pcibios_window_alignment(struct pci_bus *bus, | ||
| 1065 | unsigned long type); | ||
| 1034 | 1066 | ||
| 1035 | #define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0) | 1067 | #define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0) |
| 1036 | #define PCI_VGA_STATE_CHANGE_DECODES (1 << 1) | 1068 | #define PCI_VGA_STATE_CHANGE_DECODES (1 << 1) |
| @@ -1472,7 +1504,7 @@ enum pci_fixup_pass { | |||
| 1472 | /* Anonymous variables would be nice... */ | 1504 | /* Anonymous variables would be nice... */ |
| 1473 | #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class, \ | 1505 | #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class, \ |
| 1474 | class_shift, hook) \ | 1506 | class_shift, hook) \ |
| 1475 | static const struct pci_fixup const __pci_fixup_##name __used \ | 1507 | static const struct pci_fixup __pci_fixup_##name __used \ |
| 1476 | __attribute__((__section__(#section), aligned((sizeof(void *))))) \ | 1508 | __attribute__((__section__(#section), aligned((sizeof(void *))))) \ |
| 1477 | = { vendor, device, class, class_shift, hook }; | 1509 | = { vendor, device, class, class_shift, hook }; |
| 1478 | 1510 | ||
| @@ -1650,6 +1682,15 @@ static inline bool pci_is_pcie(struct pci_dev *dev) | |||
| 1650 | return !!pci_pcie_cap(dev); | 1682 | return !!pci_pcie_cap(dev); |
| 1651 | } | 1683 | } |
| 1652 | 1684 | ||
| 1685 | /** | ||
| 1686 | * pci_pcie_type - get the PCIe device/port type | ||
| 1687 | * @dev: PCI device | ||
| 1688 | */ | ||
| 1689 | static inline int pci_pcie_type(const struct pci_dev *dev) | ||
| 1690 | { | ||
| 1691 | return (dev->pcie_flags_reg & PCI_EXP_FLAGS_TYPE) >> 4; | ||
| 1692 | } | ||
| 1693 | |||
| 1653 | void pci_request_acs(void); | 1694 | void pci_request_acs(void); |
| 1654 | bool pci_acs_enabled(struct pci_dev *pdev, u16 acs_flags); | 1695 | bool pci_acs_enabled(struct pci_dev *pdev, u16 acs_flags); |
| 1655 | bool pci_acs_path_enabled(struct pci_dev *start, | 1696 | bool pci_acs_path_enabled(struct pci_dev *start, |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index fc3526077348..6b4565c440c8 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2149,7 +2149,7 @@ | |||
| 2149 | #define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 | 2149 | #define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 |
| 2150 | #define PCI_DEVICE_ID_NX2_57800_VF 0x16a9 | 2150 | #define PCI_DEVICE_ID_NX2_57800_VF 0x16a9 |
| 2151 | #define PCI_DEVICE_ID_NX2_5706S 0x16aa | 2151 | #define PCI_DEVICE_ID_NX2_5706S 0x16aa |
| 2152 | #define PCI_DEVICE_ID_NX2_57840_MF 0x16ab | 2152 | #define PCI_DEVICE_ID_NX2_57840_MF 0x16a4 |
| 2153 | #define PCI_DEVICE_ID_NX2_5708S 0x16ac | 2153 | #define PCI_DEVICE_ID_NX2_5708S 0x16ac |
| 2154 | #define PCI_DEVICE_ID_NX2_57840_VF 0x16ad | 2154 | #define PCI_DEVICE_ID_NX2_57840_VF 0x16ad |
| 2155 | #define PCI_DEVICE_ID_NX2_57810_MF 0x16ae | 2155 | #define PCI_DEVICE_ID_NX2_57810_MF 0x16ae |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 7fb75b143755..20ae747ddf34 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
| @@ -549,6 +549,7 @@ | |||
| 549 | #define PCI_EXP_LNKCAP2_SLS_8_0GB 0x04 /* Current Link Speed 8.0GT/s */ | 549 | #define PCI_EXP_LNKCAP2_SLS_8_0GB 0x04 /* Current Link Speed 8.0GT/s */ |
| 550 | #define PCI_EXP_LNKCAP2_CROSSLINK 0x100 /* Crosslink supported */ | 550 | #define PCI_EXP_LNKCAP2_CROSSLINK 0x100 /* Crosslink supported */ |
| 551 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ | 551 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ |
| 552 | #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */ | ||
| 552 | #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ | 553 | #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ |
| 553 | 554 | ||
| 554 | /* Extended Capabilities (PCI-X 2.0 and Express) */ | 555 | /* Extended Capabilities (PCI-X 2.0 and Express) */ |
| @@ -677,6 +678,12 @@ | |||
| 677 | #define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */ | 678 | #define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */ |
| 678 | #define PCI_EXT_CAP_PWR_SIZEOF 16 | 679 | #define PCI_EXT_CAP_PWR_SIZEOF 16 |
| 679 | 680 | ||
| 681 | /* Vendor-Specific (VSEC, PCI_EXT_CAP_ID_VNDR) */ | ||
| 682 | #define PCI_VNDR_HEADER 4 /* Vendor-Specific Header */ | ||
| 683 | #define PCI_VNDR_HEADER_ID(x) ((x) & 0xffff) | ||
| 684 | #define PCI_VNDR_HEADER_REV(x) (((x) >> 16) & 0xf) | ||
| 685 | #define PCI_VNDR_HEADER_LEN(x) (((x) >> 20) & 0xfff) | ||
| 686 | |||
| 680 | /* | 687 | /* |
| 681 | * Hypertransport sub capability types | 688 | * Hypertransport sub capability types |
| 682 | * | 689 | * |
diff --git a/include/linux/pcieport_if.h b/include/linux/pcieport_if.h index 6775532b92a9..e6f91b1406d8 100644 --- a/include/linux/pcieport_if.h +++ b/include/linux/pcieport_if.h | |||
| @@ -49,7 +49,7 @@ struct pcie_port_service_driver { | |||
| 49 | int (*resume) (struct pcie_device *dev); | 49 | int (*resume) (struct pcie_device *dev); |
| 50 | 50 | ||
| 51 | /* Service Error Recovery Handler */ | 51 | /* Service Error Recovery Handler */ |
| 52 | struct pci_error_handlers *err_handler; | 52 | const struct pci_error_handlers *err_handler; |
| 53 | 53 | ||
| 54 | /* Link Reset Capability - AER service driver specific */ | 54 | /* Link Reset Capability - AER service driver specific */ |
| 55 | pci_ers_result_t (*reset_link) (struct pci_dev *dev); | 55 | pci_ers_result_t (*reset_link) (struct pci_dev *dev); |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 7602ccb3f40e..599afc4bb67e 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -130,8 +130,10 @@ enum perf_event_sample_format { | |||
| 130 | PERF_SAMPLE_STREAM_ID = 1U << 9, | 130 | PERF_SAMPLE_STREAM_ID = 1U << 9, |
| 131 | PERF_SAMPLE_RAW = 1U << 10, | 131 | PERF_SAMPLE_RAW = 1U << 10, |
| 132 | PERF_SAMPLE_BRANCH_STACK = 1U << 11, | 132 | PERF_SAMPLE_BRANCH_STACK = 1U << 11, |
| 133 | PERF_SAMPLE_REGS_USER = 1U << 12, | ||
| 134 | PERF_SAMPLE_STACK_USER = 1U << 13, | ||
| 133 | 135 | ||
| 134 | PERF_SAMPLE_MAX = 1U << 12, /* non-ABI */ | 136 | PERF_SAMPLE_MAX = 1U << 14, /* non-ABI */ |
| 135 | }; | 137 | }; |
| 136 | 138 | ||
| 137 | /* | 139 | /* |
| @@ -163,6 +165,15 @@ enum perf_branch_sample_type { | |||
| 163 | PERF_SAMPLE_BRANCH_HV) | 165 | PERF_SAMPLE_BRANCH_HV) |
| 164 | 166 | ||
| 165 | /* | 167 | /* |
| 168 | * Values to determine ABI of the registers dump. | ||
| 169 | */ | ||
| 170 | enum perf_sample_regs_abi { | ||
| 171 | PERF_SAMPLE_REGS_ABI_NONE = 0, | ||
| 172 | PERF_SAMPLE_REGS_ABI_32 = 1, | ||
| 173 | PERF_SAMPLE_REGS_ABI_64 = 2, | ||
| 174 | }; | ||
| 175 | |||
| 176 | /* | ||
| 166 | * The format of the data returned by read() on a perf event fd, | 177 | * The format of the data returned by read() on a perf event fd, |
| 167 | * as specified by attr.read_format: | 178 | * as specified by attr.read_format: |
| 168 | * | 179 | * |
| @@ -194,6 +205,8 @@ enum perf_event_read_format { | |||
| 194 | #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ | 205 | #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ |
| 195 | #define PERF_ATTR_SIZE_VER1 72 /* add: config2 */ | 206 | #define PERF_ATTR_SIZE_VER1 72 /* add: config2 */ |
| 196 | #define PERF_ATTR_SIZE_VER2 80 /* add: branch_sample_type */ | 207 | #define PERF_ATTR_SIZE_VER2 80 /* add: branch_sample_type */ |
| 208 | #define PERF_ATTR_SIZE_VER3 96 /* add: sample_regs_user */ | ||
| 209 | /* add: sample_stack_user */ | ||
| 197 | 210 | ||
| 198 | /* | 211 | /* |
| 199 | * Hardware event_id to monitor via a performance monitoring event: | 212 | * Hardware event_id to monitor via a performance monitoring event: |
| @@ -255,7 +268,10 @@ struct perf_event_attr { | |||
| 255 | exclude_host : 1, /* don't count in host */ | 268 | exclude_host : 1, /* don't count in host */ |
| 256 | exclude_guest : 1, /* don't count in guest */ | 269 | exclude_guest : 1, /* don't count in guest */ |
| 257 | 270 | ||
| 258 | __reserved_1 : 43; | 271 | exclude_callchain_kernel : 1, /* exclude kernel callchains */ |
| 272 | exclude_callchain_user : 1, /* exclude user callchains */ | ||
| 273 | |||
| 274 | __reserved_1 : 41; | ||
| 259 | 275 | ||
| 260 | union { | 276 | union { |
| 261 | __u32 wakeup_events; /* wakeup every n events */ | 277 | __u32 wakeup_events; /* wakeup every n events */ |
| @@ -271,9 +287,25 @@ struct perf_event_attr { | |||
| 271 | __u64 bp_len; | 287 | __u64 bp_len; |
| 272 | __u64 config2; /* extension of config1 */ | 288 | __u64 config2; /* extension of config1 */ |
| 273 | }; | 289 | }; |
| 274 | __u64 branch_sample_type; /* enum branch_sample_type */ | 290 | __u64 branch_sample_type; /* enum perf_branch_sample_type */ |
| 291 | |||
| 292 | /* | ||
| 293 | * Defines set of user regs to dump on samples. | ||
| 294 | * See asm/perf_regs.h for details. | ||
| 295 | */ | ||
| 296 | __u64 sample_regs_user; | ||
| 297 | |||
| 298 | /* | ||
| 299 | * Defines size of the user stack to dump on samples. | ||
| 300 | */ | ||
| 301 | __u32 sample_stack_user; | ||
| 302 | |||
| 303 | /* Align to u64. */ | ||
| 304 | __u32 __reserved_2; | ||
| 275 | }; | 305 | }; |
| 276 | 306 | ||
| 307 | #define perf_flags(attr) (*(&(attr)->read_format + 1)) | ||
| 308 | |||
| 277 | /* | 309 | /* |
| 278 | * Ioctls that can be done on a perf event fd: | 310 | * Ioctls that can be done on a perf event fd: |
| 279 | */ | 311 | */ |
| @@ -548,6 +580,13 @@ enum perf_event_type { | |||
| 548 | * char data[size];}&& PERF_SAMPLE_RAW | 580 | * char data[size];}&& PERF_SAMPLE_RAW |
| 549 | * | 581 | * |
| 550 | * { u64 from, to, flags } lbr[nr];} && PERF_SAMPLE_BRANCH_STACK | 582 | * { u64 from, to, flags } lbr[nr];} && PERF_SAMPLE_BRANCH_STACK |
| 583 | * | ||
| 584 | * { u64 abi; # enum perf_sample_regs_abi | ||
| 585 | * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_USER | ||
| 586 | * | ||
| 587 | * { u64 size; | ||
| 588 | * char data[size]; | ||
| 589 | * u64 dyn_size; } && PERF_SAMPLE_STACK_USER | ||
| 551 | * }; | 590 | * }; |
| 552 | */ | 591 | */ |
| 553 | PERF_RECORD_SAMPLE = 9, | 592 | PERF_RECORD_SAMPLE = 9, |
| @@ -609,6 +648,7 @@ struct perf_guest_info_callbacks { | |||
| 609 | #include <linux/static_key.h> | 648 | #include <linux/static_key.h> |
| 610 | #include <linux/atomic.h> | 649 | #include <linux/atomic.h> |
| 611 | #include <linux/sysfs.h> | 650 | #include <linux/sysfs.h> |
| 651 | #include <linux/perf_regs.h> | ||
| 612 | #include <asm/local.h> | 652 | #include <asm/local.h> |
| 613 | 653 | ||
| 614 | struct perf_callchain_entry { | 654 | struct perf_callchain_entry { |
| @@ -654,6 +694,11 @@ struct perf_branch_stack { | |||
| 654 | struct perf_branch_entry entries[0]; | 694 | struct perf_branch_entry entries[0]; |
| 655 | }; | 695 | }; |
| 656 | 696 | ||
| 697 | struct perf_regs_user { | ||
| 698 | __u64 abi; | ||
| 699 | struct pt_regs *regs; | ||
| 700 | }; | ||
| 701 | |||
| 657 | struct task_struct; | 702 | struct task_struct; |
| 658 | 703 | ||
| 659 | /* | 704 | /* |
| @@ -926,7 +971,7 @@ struct perf_event { | |||
| 926 | struct hw_perf_event hw; | 971 | struct hw_perf_event hw; |
| 927 | 972 | ||
| 928 | struct perf_event_context *ctx; | 973 | struct perf_event_context *ctx; |
| 929 | struct file *filp; | 974 | atomic_long_t refcount; |
| 930 | 975 | ||
| 931 | /* | 976 | /* |
| 932 | * These accumulate total time (in nanoseconds) that children | 977 | * These accumulate total time (in nanoseconds) that children |
| @@ -1133,6 +1178,8 @@ struct perf_sample_data { | |||
| 1133 | struct perf_callchain_entry *callchain; | 1178 | struct perf_callchain_entry *callchain; |
| 1134 | struct perf_raw_record *raw; | 1179 | struct perf_raw_record *raw; |
| 1135 | struct perf_branch_stack *br_stack; | 1180 | struct perf_branch_stack *br_stack; |
| 1181 | struct perf_regs_user regs_user; | ||
| 1182 | u64 stack_user_size; | ||
| 1136 | }; | 1183 | }; |
| 1137 | 1184 | ||
| 1138 | static inline void perf_sample_data_init(struct perf_sample_data *data, | 1185 | static inline void perf_sample_data_init(struct perf_sample_data *data, |
| @@ -1142,7 +1189,10 @@ static inline void perf_sample_data_init(struct perf_sample_data *data, | |||
| 1142 | data->addr = addr; | 1189 | data->addr = addr; |
| 1143 | data->raw = NULL; | 1190 | data->raw = NULL; |
| 1144 | data->br_stack = NULL; | 1191 | data->br_stack = NULL; |
| 1145 | data->period = period; | 1192 | data->period = period; |
| 1193 | data->regs_user.abi = PERF_SAMPLE_REGS_ABI_NONE; | ||
| 1194 | data->regs_user.regs = NULL; | ||
| 1195 | data->stack_user_size = 0; | ||
| 1146 | } | 1196 | } |
| 1147 | 1197 | ||
| 1148 | extern void perf_output_sample(struct perf_output_handle *handle, | 1198 | extern void perf_output_sample(struct perf_output_handle *handle, |
| @@ -1290,12 +1340,15 @@ static inline bool has_branch_stack(struct perf_event *event) | |||
| 1290 | extern int perf_output_begin(struct perf_output_handle *handle, | 1340 | extern int perf_output_begin(struct perf_output_handle *handle, |
| 1291 | struct perf_event *event, unsigned int size); | 1341 | struct perf_event *event, unsigned int size); |
| 1292 | extern void perf_output_end(struct perf_output_handle *handle); | 1342 | extern void perf_output_end(struct perf_output_handle *handle); |
| 1293 | extern void perf_output_copy(struct perf_output_handle *handle, | 1343 | extern unsigned int perf_output_copy(struct perf_output_handle *handle, |
| 1294 | const void *buf, unsigned int len); | 1344 | const void *buf, unsigned int len); |
| 1345 | extern unsigned int perf_output_skip(struct perf_output_handle *handle, | ||
| 1346 | unsigned int len); | ||
| 1295 | extern int perf_swevent_get_recursion_context(void); | 1347 | extern int perf_swevent_get_recursion_context(void); |
| 1296 | extern void perf_swevent_put_recursion_context(int rctx); | 1348 | extern void perf_swevent_put_recursion_context(int rctx); |
| 1297 | extern void perf_event_enable(struct perf_event *event); | 1349 | extern void perf_event_enable(struct perf_event *event); |
| 1298 | extern void perf_event_disable(struct perf_event *event); | 1350 | extern void perf_event_disable(struct perf_event *event); |
| 1351 | extern int __perf_event_disable(void *info); | ||
| 1299 | extern void perf_event_task_tick(void); | 1352 | extern void perf_event_task_tick(void); |
| 1300 | #else | 1353 | #else |
| 1301 | static inline void | 1354 | static inline void |
| @@ -1334,6 +1387,7 @@ static inline int perf_swevent_get_recursion_context(void) { return -1; } | |||
| 1334 | static inline void perf_swevent_put_recursion_context(int rctx) { } | 1387 | static inline void perf_swevent_put_recursion_context(int rctx) { } |
| 1335 | static inline void perf_event_enable(struct perf_event *event) { } | 1388 | static inline void perf_event_enable(struct perf_event *event) { } |
| 1336 | static inline void perf_event_disable(struct perf_event *event) { } | 1389 | static inline void perf_event_disable(struct perf_event *event) { } |
| 1390 | static inline int __perf_event_disable(void *info) { return -1; } | ||
| 1337 | static inline void perf_event_task_tick(void) { } | 1391 | static inline void perf_event_task_tick(void) { } |
| 1338 | #endif | 1392 | #endif |
| 1339 | 1393 | ||
diff --git a/include/linux/perf_regs.h b/include/linux/perf_regs.h new file mode 100644 index 000000000000..3c73d5fe18be --- /dev/null +++ b/include/linux/perf_regs.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #ifndef _LINUX_PERF_REGS_H | ||
| 2 | #define _LINUX_PERF_REGS_H | ||
| 3 | |||
| 4 | #ifdef CONFIG_HAVE_PERF_REGS | ||
| 5 | #include <asm/perf_regs.h> | ||
| 6 | u64 perf_reg_value(struct pt_regs *regs, int idx); | ||
| 7 | int perf_reg_validate(u64 mask); | ||
| 8 | u64 perf_reg_abi(struct task_struct *task); | ||
| 9 | #else | ||
| 10 | static inline u64 perf_reg_value(struct pt_regs *regs, int idx) | ||
| 11 | { | ||
| 12 | return 0; | ||
| 13 | } | ||
| 14 | |||
| 15 | static inline int perf_reg_validate(u64 mask) | ||
| 16 | { | ||
| 17 | return mask ? -ENOSYS : 0; | ||
| 18 | } | ||
| 19 | |||
| 20 | static inline u64 perf_reg_abi(struct task_struct *task) | ||
| 21 | { | ||
| 22 | return PERF_SAMPLE_REGS_ABI_NONE; | ||
| 23 | } | ||
| 24 | #endif /* CONFIG_HAVE_PERF_REGS */ | ||
| 25 | #endif /* _LINUX_PERF_REGS_H */ | ||
diff --git a/include/linux/platform_data/clk-realview.h b/include/linux/platform_data/clk-realview.h new file mode 100644 index 000000000000..2e426a7dbc51 --- /dev/null +++ b/include/linux/platform_data/clk-realview.h | |||
| @@ -0,0 +1 @@ | |||
| void realview_clk_init(void __iomem *sysbase, bool is_pb1176); | |||
diff --git a/include/linux/platform_data/clk-ux500.h b/include/linux/platform_data/clk-ux500.h new file mode 100644 index 000000000000..3af0da1f3be5 --- /dev/null +++ b/include/linux/platform_data/clk-ux500.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* | ||
| 2 | * Clock definitions for ux500 platforms | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 ST-Ericsson SA | ||
| 5 | * Author: Ulf Hansson <ulf.hansson@linaro.org> | ||
| 6 | * | ||
| 7 | * License terms: GNU General Public License (GPL) version 2 | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __CLK_UX500_H | ||
| 11 | #define __CLK_UX500_H | ||
| 12 | |||
| 13 | void u8500_clk_init(void); | ||
| 14 | void u9540_clk_init(void); | ||
| 15 | void u8540_clk_init(void); | ||
| 16 | |||
| 17 | #endif /* __CLK_UX500_H */ | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 115ead2b5155..7c968e4f929e 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -191,6 +191,21 @@ extern void rcu_idle_enter(void); | |||
| 191 | extern void rcu_idle_exit(void); | 191 | extern void rcu_idle_exit(void); |
| 192 | extern void rcu_irq_enter(void); | 192 | extern void rcu_irq_enter(void); |
| 193 | extern void rcu_irq_exit(void); | 193 | extern void rcu_irq_exit(void); |
| 194 | |||
| 195 | #ifdef CONFIG_RCU_USER_QS | ||
| 196 | extern void rcu_user_enter(void); | ||
| 197 | extern void rcu_user_exit(void); | ||
| 198 | extern void rcu_user_enter_after_irq(void); | ||
| 199 | extern void rcu_user_exit_after_irq(void); | ||
| 200 | extern void rcu_user_hooks_switch(struct task_struct *prev, | ||
| 201 | struct task_struct *next); | ||
| 202 | #else | ||
| 203 | static inline void rcu_user_enter(void) { } | ||
| 204 | static inline void rcu_user_exit(void) { } | ||
| 205 | static inline void rcu_user_enter_after_irq(void) { } | ||
| 206 | static inline void rcu_user_exit_after_irq(void) { } | ||
| 207 | #endif /* CONFIG_RCU_USER_QS */ | ||
| 208 | |||
| 194 | extern void exit_rcu(void); | 209 | extern void exit_rcu(void); |
| 195 | 210 | ||
| 196 | /** | 211 | /** |
| @@ -210,14 +225,12 @@ extern void exit_rcu(void); | |||
| 210 | * to nest RCU_NONIDLE() wrappers, but the nesting level is currently | 225 | * to nest RCU_NONIDLE() wrappers, but the nesting level is currently |
| 211 | * quite limited. If deeper nesting is required, it will be necessary | 226 | * quite limited. If deeper nesting is required, it will be necessary |
| 212 | * to adjust DYNTICK_TASK_NESTING_VALUE accordingly. | 227 | * to adjust DYNTICK_TASK_NESTING_VALUE accordingly. |
| 213 | * | ||
| 214 | * This macro may be used from process-level code only. | ||
| 215 | */ | 228 | */ |
| 216 | #define RCU_NONIDLE(a) \ | 229 | #define RCU_NONIDLE(a) \ |
| 217 | do { \ | 230 | do { \ |
| 218 | rcu_idle_exit(); \ | 231 | rcu_irq_enter(); \ |
| 219 | do { a; } while (0); \ | 232 | do { a; } while (0); \ |
| 220 | rcu_idle_enter(); \ | 233 | rcu_irq_exit(); \ |
| 221 | } while (0) | 234 | } while (0) |
| 222 | 235 | ||
| 223 | /* | 236 | /* |
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 7f7e00df3adf..e3bcc3f4dcb8 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
| @@ -285,6 +285,7 @@ struct regmap_irq { | |||
| 285 | * @ack_base: Base ack address. If zero then the chip is clear on read. | 285 | * @ack_base: Base ack address. If zero then the chip is clear on read. |
| 286 | * @wake_base: Base address for wake enables. If zero unsupported. | 286 | * @wake_base: Base address for wake enables. If zero unsupported. |
| 287 | * @irq_reg_stride: Stride to use for chips where registers are not contiguous. | 287 | * @irq_reg_stride: Stride to use for chips where registers are not contiguous. |
| 288 | * @runtime_pm: Hold a runtime PM lock on the device when accessing it. | ||
| 288 | * | 289 | * |
| 289 | * @num_regs: Number of registers in each control bank. | 290 | * @num_regs: Number of registers in each control bank. |
| 290 | * @irqs: Descriptors for individual IRQs. Interrupt numbers are | 291 | * @irqs: Descriptors for individual IRQs. Interrupt numbers are |
| @@ -299,6 +300,8 @@ struct regmap_irq_chip { | |||
| 299 | unsigned int ack_base; | 300 | unsigned int ack_base; |
| 300 | unsigned int wake_base; | 301 | unsigned int wake_base; |
| 301 | unsigned int irq_reg_stride; | 302 | unsigned int irq_reg_stride; |
| 303 | unsigned int mask_invert; | ||
| 304 | bool runtime_pm; | ||
| 302 | 305 | ||
| 303 | int num_regs; | 306 | int num_regs; |
| 304 | 307 | ||
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index da339fd8c755..c43cd3556b1f 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
| @@ -177,6 +177,8 @@ int regulator_set_mode(struct regulator *regulator, unsigned int mode); | |||
| 177 | unsigned int regulator_get_mode(struct regulator *regulator); | 177 | unsigned int regulator_get_mode(struct regulator *regulator); |
| 178 | int regulator_set_optimum_mode(struct regulator *regulator, int load_uA); | 178 | int regulator_set_optimum_mode(struct regulator *regulator, int load_uA); |
| 179 | 179 | ||
| 180 | int regulator_allow_bypass(struct regulator *regulator, bool allow); | ||
| 181 | |||
| 180 | /* regulator notifier block */ | 182 | /* regulator notifier block */ |
| 181 | int regulator_register_notifier(struct regulator *regulator, | 183 | int regulator_register_notifier(struct regulator *regulator, |
| 182 | struct notifier_block *nb); | 184 | struct notifier_block *nb); |
| @@ -328,6 +330,12 @@ static inline int regulator_set_optimum_mode(struct regulator *regulator, | |||
| 328 | return REGULATOR_MODE_NORMAL; | 330 | return REGULATOR_MODE_NORMAL; |
| 329 | } | 331 | } |
| 330 | 332 | ||
| 333 | static inline int regulator_allow_bypass(struct regulator *regulator, | ||
| 334 | bool allow) | ||
| 335 | { | ||
| 336 | return 0; | ||
| 337 | } | ||
| 338 | |||
| 331 | static inline int regulator_register_notifier(struct regulator *regulator, | 339 | static inline int regulator_register_notifier(struct regulator *regulator, |
| 332 | struct notifier_block *nb) | 340 | struct notifier_block *nb) |
| 333 | { | 341 | { |
| @@ -352,4 +360,11 @@ static inline void regulator_set_drvdata(struct regulator *regulator, | |||
| 352 | 360 | ||
| 353 | #endif | 361 | #endif |
| 354 | 362 | ||
| 363 | static inline int regulator_set_voltage_tol(struct regulator *regulator, | ||
| 364 | int new_uV, int tol_uV) | ||
| 365 | { | ||
| 366 | return regulator_set_voltage(regulator, | ||
| 367 | new_uV - tol_uV, new_uV + tol_uV); | ||
| 368 | } | ||
| 369 | |||
| 355 | #endif | 370 | #endif |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index bac4c871f3bd..7932a3bf21bd 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -32,6 +32,8 @@ enum regulator_status { | |||
| 32 | REGULATOR_STATUS_NORMAL, | 32 | REGULATOR_STATUS_NORMAL, |
| 33 | REGULATOR_STATUS_IDLE, | 33 | REGULATOR_STATUS_IDLE, |
| 34 | REGULATOR_STATUS_STANDBY, | 34 | REGULATOR_STATUS_STANDBY, |
| 35 | /* The regulator is enabled but not regulating */ | ||
| 36 | REGULATOR_STATUS_BYPASS, | ||
| 35 | /* in case that any other status doesn't apply */ | 37 | /* in case that any other status doesn't apply */ |
| 36 | REGULATOR_STATUS_UNDEFINED, | 38 | REGULATOR_STATUS_UNDEFINED, |
| 37 | }; | 39 | }; |
| @@ -58,6 +60,7 @@ enum regulator_status { | |||
| 58 | * regulator_desc.n_voltages. Voltages may be reported in any order. | 60 | * regulator_desc.n_voltages. Voltages may be reported in any order. |
| 59 | * | 61 | * |
| 60 | * @set_current_limit: Configure a limit for a current-limited regulator. | 62 | * @set_current_limit: Configure a limit for a current-limited regulator. |
| 63 | * The driver should select the current closest to max_uA. | ||
| 61 | * @get_current_limit: Get the configured limit for a current-limited regulator. | 64 | * @get_current_limit: Get the configured limit for a current-limited regulator. |
| 62 | * | 65 | * |
| 63 | * @set_mode: Set the configured operating mode for the regulator. | 66 | * @set_mode: Set the configured operating mode for the regulator. |
| @@ -67,6 +70,9 @@ enum regulator_status { | |||
| 67 | * @get_optimum_mode: Get the most efficient operating mode for the regulator | 70 | * @get_optimum_mode: Get the most efficient operating mode for the regulator |
| 68 | * when running with the specified parameters. | 71 | * when running with the specified parameters. |
| 69 | * | 72 | * |
| 73 | * @set_bypass: Set the regulator in bypass mode. | ||
| 74 | * @get_bypass: Get the regulator bypass mode state. | ||
| 75 | * | ||
| 70 | * @enable_time: Time taken for the regulator voltage output voltage to | 76 | * @enable_time: Time taken for the regulator voltage output voltage to |
| 71 | * stabilise after being enabled, in microseconds. | 77 | * stabilise after being enabled, in microseconds. |
| 72 | * @set_ramp_delay: Set the ramp delay for the regulator. The driver should | 78 | * @set_ramp_delay: Set the ramp delay for the regulator. The driver should |
| @@ -133,6 +139,10 @@ struct regulator_ops { | |||
| 133 | unsigned int (*get_optimum_mode) (struct regulator_dev *, int input_uV, | 139 | unsigned int (*get_optimum_mode) (struct regulator_dev *, int input_uV, |
| 134 | int output_uV, int load_uA); | 140 | int output_uV, int load_uA); |
| 135 | 141 | ||
| 142 | /* control and report on bypass mode */ | ||
| 143 | int (*set_bypass)(struct regulator_dev *dev, bool enable); | ||
| 144 | int (*get_bypass)(struct regulator_dev *dev, bool *enable); | ||
| 145 | |||
| 136 | /* the operations below are for configuration of regulator state when | 146 | /* the operations below are for configuration of regulator state when |
| 137 | * its parent PMIC enters a global STANDBY/HIBERNATE state */ | 147 | * its parent PMIC enters a global STANDBY/HIBERNATE state */ |
| 138 | 148 | ||
| @@ -205,6 +215,8 @@ struct regulator_desc { | |||
| 205 | unsigned int vsel_mask; | 215 | unsigned int vsel_mask; |
| 206 | unsigned int enable_reg; | 216 | unsigned int enable_reg; |
| 207 | unsigned int enable_mask; | 217 | unsigned int enable_mask; |
| 218 | unsigned int bypass_reg; | ||
| 219 | unsigned int bypass_mask; | ||
| 208 | 220 | ||
| 209 | unsigned int enable_time; | 221 | unsigned int enable_time; |
| 210 | }; | 222 | }; |
| @@ -221,7 +233,8 @@ struct regulator_desc { | |||
| 221 | * @driver_data: private regulator data | 233 | * @driver_data: private regulator data |
| 222 | * @of_node: OpenFirmware node to parse for device tree bindings (may be | 234 | * @of_node: OpenFirmware node to parse for device tree bindings (may be |
| 223 | * NULL). | 235 | * NULL). |
| 224 | * @regmap: regmap to use for core regmap helpers | 236 | * @regmap: regmap to use for core regmap helpers if dev_get_regulator() is |
| 237 | * insufficient. | ||
| 225 | * @ena_gpio: GPIO controlling regulator enable. | 238 | * @ena_gpio: GPIO controlling regulator enable. |
| 226 | * @ena_gpio_invert: Sense for GPIO enable control. | 239 | * @ena_gpio_invert: Sense for GPIO enable control. |
| 227 | * @ena_gpio_flags: Flags to use when calling gpio_request_one() | 240 | * @ena_gpio_flags: Flags to use when calling gpio_request_one() |
| @@ -253,6 +266,7 @@ struct regulator_dev { | |||
| 253 | int exclusive; | 266 | int exclusive; |
| 254 | u32 use_count; | 267 | u32 use_count; |
| 255 | u32 open_count; | 268 | u32 open_count; |
| 269 | u32 bypass_count; | ||
| 256 | 270 | ||
| 257 | /* lists we belong to */ | 271 | /* lists we belong to */ |
| 258 | struct list_head list; /* list of all regulators */ | 272 | struct list_head list; /* list of all regulators */ |
| @@ -310,6 +324,8 @@ int regulator_disable_regmap(struct regulator_dev *rdev); | |||
| 310 | int regulator_set_voltage_time_sel(struct regulator_dev *rdev, | 324 | int regulator_set_voltage_time_sel(struct regulator_dev *rdev, |
| 311 | unsigned int old_selector, | 325 | unsigned int old_selector, |
| 312 | unsigned int new_selector); | 326 | unsigned int new_selector); |
| 327 | int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable); | ||
| 328 | int regulator_get_bypass_regmap(struct regulator_dev *rdev, bool *enable); | ||
| 313 | 329 | ||
| 314 | void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data); | 330 | void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data); |
| 315 | 331 | ||
diff --git a/include/linux/regulator/fan53555.h b/include/linux/regulator/fan53555.h new file mode 100644 index 000000000000..5c45c85d52ca --- /dev/null +++ b/include/linux/regulator/fan53555.h | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | /* | ||
| 2 | * fan53555.h - Fairchild Regulator FAN53555 Driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Marvell Technology Ltd. | ||
| 5 | * Yunfan Zhang <yfzhang@marvell.com> | ||
| 6 | * | ||
| 7 | * This package is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __FAN53555_H__ | ||
| 14 | |||
| 15 | /* VSEL ID */ | ||
| 16 | enum { | ||
| 17 | FAN53555_VSEL_ID_0 = 0, | ||
| 18 | FAN53555_VSEL_ID_1, | ||
| 19 | }; | ||
| 20 | |||
| 21 | /* Transition slew rate limiting from a low to high voltage. | ||
| 22 | * ----------------------- | ||
| 23 | * Bin |Slew Rate(mV/uS) | ||
| 24 | * ------|---------------- | ||
| 25 | * 000 | 64.00 | ||
| 26 | * ------|---------------- | ||
| 27 | * 001 | 32.00 | ||
| 28 | * ------|---------------- | ||
| 29 | * 010 | 16.00 | ||
| 30 | * ------|---------------- | ||
| 31 | * 011 | 8.00 | ||
| 32 | * ------|---------------- | ||
| 33 | * 100 | 4.00 | ||
| 34 | * ------|---------------- | ||
| 35 | * 101 | 2.00 | ||
| 36 | * ------|---------------- | ||
| 37 | * 110 | 1.00 | ||
| 38 | * ------|---------------- | ||
| 39 | * 111 | 0.50 | ||
| 40 | * ----------------------- | ||
| 41 | */ | ||
| 42 | enum { | ||
| 43 | FAN53555_SLEW_RATE_64MV = 0, | ||
| 44 | FAN53555_SLEW_RATE_32MV, | ||
| 45 | FAN53555_SLEW_RATE_16MV, | ||
| 46 | FAN53555_SLEW_RATE_8MV, | ||
| 47 | FAN53555_SLEW_RATE_4MV, | ||
| 48 | FAN53555_SLEW_RATE_2MV, | ||
| 49 | FAN53555_SLEW_RATE_1MV, | ||
| 50 | FAN53555_SLEW_RATE_0_5MV, | ||
| 51 | }; | ||
| 52 | |||
| 53 | struct fan53555_platform_data { | ||
| 54 | struct regulator_init_data *regulator; | ||
| 55 | unsigned int slew_rate; | ||
| 56 | /* Sleep VSEL ID */ | ||
| 57 | unsigned int sleep_vsel_id; | ||
| 58 | }; | ||
| 59 | |||
| 60 | #endif /* __FAN53555_H__ */ | ||
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 40dd0a394cfa..36adbc82de6a 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
| @@ -32,6 +32,7 @@ struct regulator; | |||
| 32 | * board/machine. | 32 | * board/machine. |
| 33 | * STATUS: Regulator can be enabled and disabled. | 33 | * STATUS: Regulator can be enabled and disabled. |
| 34 | * DRMS: Dynamic Regulator Mode Switching is enabled for this regulator. | 34 | * DRMS: Dynamic Regulator Mode Switching is enabled for this regulator. |
| 35 | * BYPASS: Regulator can be put into bypass mode | ||
| 35 | */ | 36 | */ |
| 36 | 37 | ||
| 37 | #define REGULATOR_CHANGE_VOLTAGE 0x1 | 38 | #define REGULATOR_CHANGE_VOLTAGE 0x1 |
| @@ -39,6 +40,7 @@ struct regulator; | |||
| 39 | #define REGULATOR_CHANGE_MODE 0x4 | 40 | #define REGULATOR_CHANGE_MODE 0x4 |
| 40 | #define REGULATOR_CHANGE_STATUS 0x8 | 41 | #define REGULATOR_CHANGE_STATUS 0x8 |
| 41 | #define REGULATOR_CHANGE_DRMS 0x10 | 42 | #define REGULATOR_CHANGE_DRMS 0x10 |
| 43 | #define REGULATOR_CHANGE_BYPASS 0x20 | ||
| 42 | 44 | ||
| 43 | /** | 45 | /** |
| 44 | * struct regulator_state - regulator state during low power system states | 46 | * struct regulator_state - regulator state during low power system states |
diff --git a/include/linux/sched.h b/include/linux/sched.h index b8c86648a2f9..765dffbb085e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -273,11 +273,11 @@ extern void init_idle_bootup_task(struct task_struct *idle); | |||
| 273 | extern int runqueue_is_locked(int cpu); | 273 | extern int runqueue_is_locked(int cpu); |
| 274 | 274 | ||
| 275 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | 275 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) |
| 276 | extern void select_nohz_load_balancer(int stop_tick); | 276 | extern void nohz_balance_enter_idle(int cpu); |
| 277 | extern void set_cpu_sd_state_idle(void); | 277 | extern void set_cpu_sd_state_idle(void); |
| 278 | extern int get_nohz_timer_target(void); | 278 | extern int get_nohz_timer_target(void); |
| 279 | #else | 279 | #else |
| 280 | static inline void select_nohz_load_balancer(int stop_tick) { } | 280 | static inline void nohz_balance_enter_idle(int cpu) { } |
| 281 | static inline void set_cpu_sd_state_idle(void) { } | 281 | static inline void set_cpu_sd_state_idle(void) { } |
| 282 | #endif | 282 | #endif |
| 283 | 283 | ||
| @@ -446,6 +446,9 @@ extern int get_dumpable(struct mm_struct *mm); | |||
| 446 | #define MMF_VM_HUGEPAGE 17 /* set when VM_HUGEPAGE is set on vma */ | 446 | #define MMF_VM_HUGEPAGE 17 /* set when VM_HUGEPAGE is set on vma */ |
| 447 | #define MMF_EXE_FILE_CHANGED 18 /* see prctl_set_mm_exe_file() */ | 447 | #define MMF_EXE_FILE_CHANGED 18 /* see prctl_set_mm_exe_file() */ |
| 448 | 448 | ||
| 449 | #define MMF_HAS_UPROBES 19 /* has uprobes */ | ||
| 450 | #define MMF_RECALC_UPROBES 20 /* MMF_HAS_UPROBES can be wrong */ | ||
| 451 | |||
| 449 | #define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK) | 452 | #define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK) |
| 450 | 453 | ||
| 451 | struct sighand_struct { | 454 | struct sighand_struct { |
| @@ -678,11 +681,6 @@ struct signal_struct { | |||
| 678 | * (notably. ptrace) */ | 681 | * (notably. ptrace) */ |
| 679 | }; | 682 | }; |
| 680 | 683 | ||
| 681 | /* Context switch must be unlocked if interrupts are to be enabled */ | ||
| 682 | #ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW | ||
| 683 | # define __ARCH_WANT_UNLOCKED_CTXSW | ||
| 684 | #endif | ||
| 685 | |||
| 686 | /* | 684 | /* |
| 687 | * Bits in flags field of signal_struct. | 685 | * Bits in flags field of signal_struct. |
| 688 | */ | 686 | */ |
| @@ -860,7 +858,6 @@ enum cpu_idle_type { | |||
| 860 | #define SD_BALANCE_FORK 0x0008 /* Balance on fork, clone */ | 858 | #define SD_BALANCE_FORK 0x0008 /* Balance on fork, clone */ |
| 861 | #define SD_BALANCE_WAKE 0x0010 /* Balance on wakeup */ | 859 | #define SD_BALANCE_WAKE 0x0010 /* Balance on wakeup */ |
| 862 | #define SD_WAKE_AFFINE 0x0020 /* Wake task to waking CPU */ | 860 | #define SD_WAKE_AFFINE 0x0020 /* Wake task to waking CPU */ |
| 863 | #define SD_PREFER_LOCAL 0x0040 /* Prefer to keep tasks local to this domain */ | ||
| 864 | #define SD_SHARE_CPUPOWER 0x0080 /* Domain members share cpu power */ | 861 | #define SD_SHARE_CPUPOWER 0x0080 /* Domain members share cpu power */ |
| 865 | #define SD_SHARE_PKG_RESOURCES 0x0200 /* Domain members share cpu pkg resources */ | 862 | #define SD_SHARE_PKG_RESOURCES 0x0200 /* Domain members share cpu pkg resources */ |
| 866 | #define SD_SERIALIZE 0x0400 /* Only a single load balancing instance */ | 863 | #define SD_SERIALIZE 0x0400 /* Only a single load balancing instance */ |
| @@ -954,7 +951,6 @@ struct sched_domain { | |||
| 954 | unsigned int smt_gain; | 951 | unsigned int smt_gain; |
| 955 | int flags; /* See SD_* */ | 952 | int flags; /* See SD_* */ |
| 956 | int level; | 953 | int level; |
| 957 | int idle_buddy; /* cpu assigned to select_idle_sibling() */ | ||
| 958 | 954 | ||
| 959 | /* Runtime fields. */ | 955 | /* Runtime fields. */ |
| 960 | unsigned long last_balance; /* init to jiffies. units in jiffies */ | 956 | unsigned long last_balance; /* init to jiffies. units in jiffies */ |
| @@ -1886,6 +1882,14 @@ static inline void rcu_copy_process(struct task_struct *p) | |||
| 1886 | 1882 | ||
| 1887 | #endif | 1883 | #endif |
| 1888 | 1884 | ||
| 1885 | static inline void rcu_switch(struct task_struct *prev, | ||
| 1886 | struct task_struct *next) | ||
| 1887 | { | ||
| 1888 | #ifdef CONFIG_RCU_USER_QS | ||
| 1889 | rcu_user_hooks_switch(prev, next); | ||
| 1890 | #endif | ||
| 1891 | } | ||
| 1892 | |||
| 1889 | static inline void tsk_restore_flags(struct task_struct *task, | 1893 | static inline void tsk_restore_flags(struct task_struct *task, |
| 1890 | unsigned long orig_flags, unsigned long flags) | 1894 | unsigned long orig_flags, unsigned long flags) |
| 1891 | { | 1895 | { |
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h index 899fbb487c94..fb3c5a8fef3d 100644 --- a/include/linux/screen_info.h +++ b/include/linux/screen_info.h | |||
| @@ -68,6 +68,8 @@ struct screen_info { | |||
| 68 | 68 | ||
| 69 | #define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */ | 69 | #define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */ |
| 70 | 70 | ||
| 71 | #define VIDEO_CAPABILITY_SKIP_QUIRKS (1 << 0) | ||
| 72 | |||
| 71 | #ifdef __KERNEL__ | 73 | #ifdef __KERNEL__ |
| 72 | extern struct screen_info screen_info; | 74 | extern struct screen_info screen_info; |
| 73 | 75 | ||
diff --git a/include/linux/security.h b/include/linux/security.h index 3dea6a9d568f..d143b8e01954 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -118,6 +118,7 @@ void reset_security_ops(void); | |||
| 118 | extern unsigned long mmap_min_addr; | 118 | extern unsigned long mmap_min_addr; |
| 119 | extern unsigned long dac_mmap_min_addr; | 119 | extern unsigned long dac_mmap_min_addr; |
| 120 | #else | 120 | #else |
| 121 | #define mmap_min_addr 0UL | ||
| 121 | #define dac_mmap_min_addr 0UL | 122 | #define dac_mmap_min_addr 0UL |
| 122 | #endif | 123 | #endif |
| 123 | 124 | ||
diff --git a/include/linux/smpboot.h b/include/linux/smpboot.h new file mode 100644 index 000000000000..e0106d8581d3 --- /dev/null +++ b/include/linux/smpboot.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | #ifndef _LINUX_SMPBOOT_H | ||
| 2 | #define _LINUX_SMPBOOT_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | struct task_struct; | ||
| 7 | /* Cookie handed to the thread_fn*/ | ||
| 8 | struct smpboot_thread_data; | ||
| 9 | |||
| 10 | /** | ||
| 11 | * struct smp_hotplug_thread - CPU hotplug related thread descriptor | ||
| 12 | * @store: Pointer to per cpu storage for the task pointers | ||
| 13 | * @list: List head for core management | ||
| 14 | * @thread_should_run: Check whether the thread should run or not. Called with | ||
| 15 | * preemption disabled. | ||
| 16 | * @thread_fn: The associated thread function | ||
| 17 | * @setup: Optional setup function, called when the thread gets | ||
| 18 | * operational the first time | ||
| 19 | * @cleanup: Optional cleanup function, called when the thread | ||
| 20 | * should stop (module exit) | ||
| 21 | * @park: Optional park function, called when the thread is | ||
| 22 | * parked (cpu offline) | ||
| 23 | * @unpark: Optional unpark function, called when the thread is | ||
| 24 | * unparked (cpu online) | ||
| 25 | * @thread_comm: The base name of the thread | ||
| 26 | */ | ||
| 27 | struct smp_hotplug_thread { | ||
| 28 | struct task_struct __percpu **store; | ||
| 29 | struct list_head list; | ||
| 30 | int (*thread_should_run)(unsigned int cpu); | ||
| 31 | void (*thread_fn)(unsigned int cpu); | ||
| 32 | void (*setup)(unsigned int cpu); | ||
| 33 | void (*cleanup)(unsigned int cpu, bool online); | ||
| 34 | void (*park)(unsigned int cpu); | ||
| 35 | void (*unpark)(unsigned int cpu); | ||
| 36 | const char *thread_comm; | ||
| 37 | }; | ||
| 38 | |||
| 39 | int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread); | ||
| 40 | void smpboot_unregister_percpu_thread(struct smp_hotplug_thread *plug_thread); | ||
| 41 | int smpboot_thread_schedule(void); | ||
| 42 | |||
| 43 | #endif | ||
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index cff40aa7db62..bf8c49ff7530 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -114,6 +114,7 @@ struct rpc_xprt_ops { | |||
| 114 | void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); | 114 | void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); |
| 115 | int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); | 115 | int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); |
| 116 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); | 116 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); |
| 117 | void (*alloc_slot)(struct rpc_xprt *xprt, struct rpc_task *task); | ||
| 117 | void (*rpcbind)(struct rpc_task *task); | 118 | void (*rpcbind)(struct rpc_task *task); |
| 118 | void (*set_port)(struct rpc_xprt *xprt, unsigned short port); | 119 | void (*set_port)(struct rpc_xprt *xprt, unsigned short port); |
| 119 | void (*connect)(struct rpc_task *task); | 120 | void (*connect)(struct rpc_task *task); |
| @@ -281,6 +282,8 @@ void xprt_connect(struct rpc_task *task); | |||
| 281 | void xprt_reserve(struct rpc_task *task); | 282 | void xprt_reserve(struct rpc_task *task); |
| 282 | int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); | 283 | int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); |
| 283 | int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | 284 | int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); |
| 285 | void xprt_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task); | ||
| 286 | void xprt_lock_and_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task); | ||
| 284 | int xprt_prepare_transmit(struct rpc_task *task); | 287 | int xprt_prepare_transmit(struct rpc_task *task); |
| 285 | void xprt_transmit(struct rpc_task *task); | 288 | void xprt_transmit(struct rpc_task *task); |
| 286 | void xprt_end_transmit(struct rpc_task *task); | 289 | void xprt_end_transmit(struct rpc_task *task); |
diff --git a/include/linux/task_work.h b/include/linux/task_work.h index fb46b03b1852..ca5a1cf27dae 100644 --- a/include/linux/task_work.h +++ b/include/linux/task_work.h | |||
| @@ -18,8 +18,7 @@ void task_work_run(void); | |||
| 18 | 18 | ||
| 19 | static inline void exit_task_work(struct task_struct *task) | 19 | static inline void exit_task_work(struct task_struct *task) |
| 20 | { | 20 | { |
| 21 | if (unlikely(task->task_works)) | 21 | task_work_run(); |
| 22 | task_work_run(); | ||
| 23 | } | 22 | } |
| 24 | 23 | ||
| 25 | #endif /* _LINUX_TASK_WORK_H */ | 24 | #endif /* _LINUX_TASK_WORK_H */ |
diff --git a/include/linux/time.h b/include/linux/time.h index c81c5e40fcb5..b51e664c83e7 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
| @@ -107,11 +107,36 @@ static inline struct timespec timespec_sub(struct timespec lhs, | |||
| 107 | return ts_delta; | 107 | return ts_delta; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | #define KTIME_MAX ((s64)~((u64)1 << 63)) | ||
| 111 | #if (BITS_PER_LONG == 64) | ||
| 112 | # define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) | ||
| 113 | #else | ||
| 114 | # define KTIME_SEC_MAX LONG_MAX | ||
| 115 | #endif | ||
| 116 | |||
| 110 | /* | 117 | /* |
| 111 | * Returns true if the timespec is norm, false if denorm: | 118 | * Returns true if the timespec is norm, false if denorm: |
| 112 | */ | 119 | */ |
| 113 | #define timespec_valid(ts) \ | 120 | static inline bool timespec_valid(const struct timespec *ts) |
| 114 | (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) | 121 | { |
| 122 | /* Dates before 1970 are bogus */ | ||
| 123 | if (ts->tv_sec < 0) | ||
| 124 | return false; | ||
| 125 | /* Can't have more nanoseconds then a second */ | ||
| 126 | if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) | ||
| 127 | return false; | ||
| 128 | return true; | ||
| 129 | } | ||
| 130 | |||
| 131 | static inline bool timespec_valid_strict(const struct timespec *ts) | ||
| 132 | { | ||
| 133 | if (!timespec_valid(ts)) | ||
| 134 | return false; | ||
| 135 | /* Disallow values that could overflow ktime_t */ | ||
| 136 | if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX) | ||
| 137 | return false; | ||
| 138 | return true; | ||
| 139 | } | ||
| 115 | 140 | ||
| 116 | extern void read_persistent_clock(struct timespec *ts); | 141 | extern void read_persistent_clock(struct timespec *ts); |
| 117 | extern void read_boot_clock(struct timespec *ts); | 142 | extern void read_boot_clock(struct timespec *ts); |
diff --git a/include/linux/timer.h b/include/linux/timer.h index 6abd9138beda..8c5a197e1587 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
| @@ -49,147 +49,112 @@ extern struct tvec_base boot_tvec_bases; | |||
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| 51 | /* | 51 | /* |
| 52 | * Note that all tvec_bases are 2 byte aligned and lower bit of | 52 | * Note that all tvec_bases are at least 4 byte aligned and lower two bits |
| 53 | * base in timer_list is guaranteed to be zero. Use the LSB to | 53 | * of base in timer_list is guaranteed to be zero. Use them for flags. |
| 54 | * indicate whether the timer is deferrable. | ||
| 55 | * | 54 | * |
| 56 | * A deferrable timer will work normally when the system is busy, but | 55 | * A deferrable timer will work normally when the system is busy, but |
| 57 | * will not cause a CPU to come out of idle just to service it; instead, | 56 | * will not cause a CPU to come out of idle just to service it; instead, |
| 58 | * the timer will be serviced when the CPU eventually wakes up with a | 57 | * the timer will be serviced when the CPU eventually wakes up with a |
| 59 | * subsequent non-deferrable timer. | 58 | * subsequent non-deferrable timer. |
| 59 | * | ||
| 60 | * An irqsafe timer is executed with IRQ disabled and it's safe to wait for | ||
| 61 | * the completion of the running instance from IRQ handlers, for example, | ||
| 62 | * by calling del_timer_sync(). | ||
| 63 | * | ||
| 64 | * Note: The irq disabled callback execution is a special case for | ||
| 65 | * workqueue locking issues. It's not meant for executing random crap | ||
| 66 | * with interrupts disabled. Abuse is monitored! | ||
| 60 | */ | 67 | */ |
| 61 | #define TBASE_DEFERRABLE_FLAG (0x1) | 68 | #define TIMER_DEFERRABLE 0x1LU |
| 69 | #define TIMER_IRQSAFE 0x2LU | ||
| 62 | 70 | ||
| 63 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ | 71 | #define TIMER_FLAG_MASK 0x3LU |
| 72 | |||
| 73 | #define __TIMER_INITIALIZER(_function, _expires, _data, _flags) { \ | ||
| 64 | .entry = { .prev = TIMER_ENTRY_STATIC }, \ | 74 | .entry = { .prev = TIMER_ENTRY_STATIC }, \ |
| 65 | .function = (_function), \ | 75 | .function = (_function), \ |
| 66 | .expires = (_expires), \ | 76 | .expires = (_expires), \ |
| 67 | .data = (_data), \ | 77 | .data = (_data), \ |
| 68 | .base = &boot_tvec_bases, \ | 78 | .base = (void *)((unsigned long)&boot_tvec_bases + (_flags)), \ |
| 69 | .slack = -1, \ | 79 | .slack = -1, \ |
| 70 | __TIMER_LOCKDEP_MAP_INITIALIZER( \ | 80 | __TIMER_LOCKDEP_MAP_INITIALIZER( \ |
| 71 | __FILE__ ":" __stringify(__LINE__)) \ | 81 | __FILE__ ":" __stringify(__LINE__)) \ |
| 72 | } | 82 | } |
| 73 | 83 | ||
| 74 | #define TBASE_MAKE_DEFERRED(ptr) ((struct tvec_base *) \ | 84 | #define TIMER_INITIALIZER(_function, _expires, _data) \ |
| 75 | ((unsigned char *)(ptr) + TBASE_DEFERRABLE_FLAG)) | 85 | __TIMER_INITIALIZER((_function), (_expires), (_data), 0) |
| 76 | 86 | ||
| 77 | #define TIMER_DEFERRED_INITIALIZER(_function, _expires, _data) {\ | 87 | #define TIMER_DEFERRED_INITIALIZER(_function, _expires, _data) \ |
| 78 | .entry = { .prev = TIMER_ENTRY_STATIC }, \ | 88 | __TIMER_INITIALIZER((_function), (_expires), (_data), TIMER_DEFERRABLE) |
| 79 | .function = (_function), \ | ||
| 80 | .expires = (_expires), \ | ||
| 81 | .data = (_data), \ | ||
| 82 | .base = TBASE_MAKE_DEFERRED(&boot_tvec_bases), \ | ||
| 83 | __TIMER_LOCKDEP_MAP_INITIALIZER( \ | ||
| 84 | __FILE__ ":" __stringify(__LINE__)) \ | ||
| 85 | } | ||
| 86 | 89 | ||
| 87 | #define DEFINE_TIMER(_name, _function, _expires, _data) \ | 90 | #define DEFINE_TIMER(_name, _function, _expires, _data) \ |
| 88 | struct timer_list _name = \ | 91 | struct timer_list _name = \ |
| 89 | TIMER_INITIALIZER(_function, _expires, _data) | 92 | TIMER_INITIALIZER(_function, _expires, _data) |
| 90 | 93 | ||
| 91 | void init_timer_key(struct timer_list *timer, | 94 | void init_timer_key(struct timer_list *timer, unsigned int flags, |
| 92 | const char *name, | 95 | const char *name, struct lock_class_key *key); |
| 93 | struct lock_class_key *key); | 96 | |
| 94 | void init_timer_deferrable_key(struct timer_list *timer, | 97 | #ifdef CONFIG_DEBUG_OBJECTS_TIMERS |
| 95 | const char *name, | 98 | extern void init_timer_on_stack_key(struct timer_list *timer, |
| 96 | struct lock_class_key *key); | 99 | unsigned int flags, const char *name, |
| 100 | struct lock_class_key *key); | ||
| 101 | extern void destroy_timer_on_stack(struct timer_list *timer); | ||
| 102 | #else | ||
| 103 | static inline void destroy_timer_on_stack(struct timer_list *timer) { } | ||
| 104 | static inline void init_timer_on_stack_key(struct timer_list *timer, | ||
| 105 | unsigned int flags, const char *name, | ||
| 106 | struct lock_class_key *key) | ||
| 107 | { | ||
| 108 | init_timer_key(timer, flags, name, key); | ||
| 109 | } | ||
| 110 | #endif | ||
| 97 | 111 | ||
| 98 | #ifdef CONFIG_LOCKDEP | 112 | #ifdef CONFIG_LOCKDEP |
| 99 | #define init_timer(timer) \ | 113 | #define __init_timer(_timer, _flags) \ |
| 100 | do { \ | 114 | do { \ |
| 101 | static struct lock_class_key __key; \ | 115 | static struct lock_class_key __key; \ |
| 102 | init_timer_key((timer), #timer, &__key); \ | 116 | init_timer_key((_timer), (_flags), #_timer, &__key); \ |
| 103 | } while (0) | 117 | } while (0) |
| 104 | 118 | ||
| 105 | #define init_timer_deferrable(timer) \ | 119 | #define __init_timer_on_stack(_timer, _flags) \ |
| 106 | do { \ | 120 | do { \ |
| 107 | static struct lock_class_key __key; \ | 121 | static struct lock_class_key __key; \ |
| 108 | init_timer_deferrable_key((timer), #timer, &__key); \ | 122 | init_timer_on_stack_key((_timer), (_flags), #_timer, &__key); \ |
| 109 | } while (0) | 123 | } while (0) |
| 124 | #else | ||
| 125 | #define __init_timer(_timer, _flags) \ | ||
| 126 | init_timer_key((_timer), (_flags), NULL, NULL) | ||
| 127 | #define __init_timer_on_stack(_timer, _flags) \ | ||
| 128 | init_timer_on_stack_key((_timer), (_flags), NULL, NULL) | ||
| 129 | #endif | ||
| 110 | 130 | ||
| 131 | #define init_timer(timer) \ | ||
| 132 | __init_timer((timer), 0) | ||
| 133 | #define init_timer_deferrable(timer) \ | ||
| 134 | __init_timer((timer), TIMER_DEFERRABLE) | ||
| 111 | #define init_timer_on_stack(timer) \ | 135 | #define init_timer_on_stack(timer) \ |
| 136 | __init_timer_on_stack((timer), 0) | ||
| 137 | |||
| 138 | #define __setup_timer(_timer, _fn, _data, _flags) \ | ||
| 112 | do { \ | 139 | do { \ |
| 113 | static struct lock_class_key __key; \ | 140 | __init_timer((_timer), (_flags)); \ |
| 114 | init_timer_on_stack_key((timer), #timer, &__key); \ | 141 | (_timer)->function = (_fn); \ |
| 142 | (_timer)->data = (_data); \ | ||
| 115 | } while (0) | 143 | } while (0) |
| 116 | 144 | ||
| 117 | #define setup_timer(timer, fn, data) \ | 145 | #define __setup_timer_on_stack(_timer, _fn, _data, _flags) \ |
| 118 | do { \ | 146 | do { \ |
| 119 | static struct lock_class_key __key; \ | 147 | __init_timer_on_stack((_timer), (_flags)); \ |
| 120 | setup_timer_key((timer), #timer, &__key, (fn), (data));\ | 148 | (_timer)->function = (_fn); \ |
| 149 | (_timer)->data = (_data); \ | ||
| 121 | } while (0) | 150 | } while (0) |
| 122 | 151 | ||
| 152 | #define setup_timer(timer, fn, data) \ | ||
| 153 | __setup_timer((timer), (fn), (data), 0) | ||
| 123 | #define setup_timer_on_stack(timer, fn, data) \ | 154 | #define setup_timer_on_stack(timer, fn, data) \ |
| 124 | do { \ | 155 | __setup_timer_on_stack((timer), (fn), (data), 0) |
| 125 | static struct lock_class_key __key; \ | ||
| 126 | setup_timer_on_stack_key((timer), #timer, &__key, \ | ||
| 127 | (fn), (data)); \ | ||
| 128 | } while (0) | ||
| 129 | #define setup_deferrable_timer_on_stack(timer, fn, data) \ | 156 | #define setup_deferrable_timer_on_stack(timer, fn, data) \ |
| 130 | do { \ | 157 | __setup_timer_on_stack((timer), (fn), (data), TIMER_DEFERRABLE) |
| 131 | static struct lock_class_key __key; \ | ||
| 132 | setup_deferrable_timer_on_stack_key((timer), #timer, \ | ||
| 133 | &__key, (fn), \ | ||
| 134 | (data)); \ | ||
| 135 | } while (0) | ||
| 136 | #else | ||
| 137 | #define init_timer(timer)\ | ||
| 138 | init_timer_key((timer), NULL, NULL) | ||
| 139 | #define init_timer_deferrable(timer)\ | ||
| 140 | init_timer_deferrable_key((timer), NULL, NULL) | ||
| 141 | #define init_timer_on_stack(timer)\ | ||
| 142 | init_timer_on_stack_key((timer), NULL, NULL) | ||
| 143 | #define setup_timer(timer, fn, data)\ | ||
| 144 | setup_timer_key((timer), NULL, NULL, (fn), (data)) | ||
| 145 | #define setup_timer_on_stack(timer, fn, data)\ | ||
| 146 | setup_timer_on_stack_key((timer), NULL, NULL, (fn), (data)) | ||
| 147 | #define setup_deferrable_timer_on_stack(timer, fn, data)\ | ||
| 148 | setup_deferrable_timer_on_stack_key((timer), NULL, NULL, (fn), (data)) | ||
| 149 | #endif | ||
| 150 | |||
| 151 | #ifdef CONFIG_DEBUG_OBJECTS_TIMERS | ||
| 152 | extern void init_timer_on_stack_key(struct timer_list *timer, | ||
| 153 | const char *name, | ||
| 154 | struct lock_class_key *key); | ||
| 155 | extern void destroy_timer_on_stack(struct timer_list *timer); | ||
| 156 | #else | ||
| 157 | static inline void destroy_timer_on_stack(struct timer_list *timer) { } | ||
| 158 | static inline void init_timer_on_stack_key(struct timer_list *timer, | ||
| 159 | const char *name, | ||
| 160 | struct lock_class_key *key) | ||
| 161 | { | ||
| 162 | init_timer_key(timer, name, key); | ||
| 163 | } | ||
| 164 | #endif | ||
| 165 | |||
| 166 | static inline void setup_timer_key(struct timer_list * timer, | ||
| 167 | const char *name, | ||
| 168 | struct lock_class_key *key, | ||
| 169 | void (*function)(unsigned long), | ||
| 170 | unsigned long data) | ||
| 171 | { | ||
| 172 | timer->function = function; | ||
| 173 | timer->data = data; | ||
| 174 | init_timer_key(timer, name, key); | ||
| 175 | } | ||
| 176 | |||
| 177 | static inline void setup_timer_on_stack_key(struct timer_list *timer, | ||
| 178 | const char *name, | ||
| 179 | struct lock_class_key *key, | ||
| 180 | void (*function)(unsigned long), | ||
| 181 | unsigned long data) | ||
| 182 | { | ||
| 183 | timer->function = function; | ||
| 184 | timer->data = data; | ||
| 185 | init_timer_on_stack_key(timer, name, key); | ||
| 186 | } | ||
| 187 | |||
| 188 | extern void setup_deferrable_timer_on_stack_key(struct timer_list *timer, | ||
| 189 | const char *name, | ||
| 190 | struct lock_class_key *key, | ||
| 191 | void (*function)(unsigned long), | ||
| 192 | unsigned long data); | ||
| 193 | 158 | ||
| 194 | /** | 159 | /** |
| 195 | * timer_pending - is a timer pending? | 160 | * timer_pending - is a timer pending? |
diff --git a/include/linux/topology.h b/include/linux/topology.h index fec12d667211..d3cf0d6e7712 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
| @@ -129,7 +129,6 @@ int arch_update_cpu_topology(void); | |||
| 129 | | 1*SD_BALANCE_FORK \ | 129 | | 1*SD_BALANCE_FORK \ |
| 130 | | 0*SD_BALANCE_WAKE \ | 130 | | 0*SD_BALANCE_WAKE \ |
| 131 | | 1*SD_WAKE_AFFINE \ | 131 | | 1*SD_WAKE_AFFINE \ |
| 132 | | 0*SD_PREFER_LOCAL \ | ||
| 133 | | 0*SD_SHARE_CPUPOWER \ | 132 | | 0*SD_SHARE_CPUPOWER \ |
| 134 | | 1*SD_SHARE_PKG_RESOURCES \ | 133 | | 1*SD_SHARE_PKG_RESOURCES \ |
| 135 | | 0*SD_SERIALIZE \ | 134 | | 0*SD_SERIALIZE \ |
| @@ -160,7 +159,6 @@ int arch_update_cpu_topology(void); | |||
| 160 | | 1*SD_BALANCE_FORK \ | 159 | | 1*SD_BALANCE_FORK \ |
| 161 | | 0*SD_BALANCE_WAKE \ | 160 | | 0*SD_BALANCE_WAKE \ |
| 162 | | 1*SD_WAKE_AFFINE \ | 161 | | 1*SD_WAKE_AFFINE \ |
| 163 | | 0*SD_PREFER_LOCAL \ | ||
| 164 | | 0*SD_SHARE_CPUPOWER \ | 162 | | 0*SD_SHARE_CPUPOWER \ |
| 165 | | 0*SD_SHARE_PKG_RESOURCES \ | 163 | | 0*SD_SHARE_PKG_RESOURCES \ |
| 166 | | 0*SD_SERIALIZE \ | 164 | | 0*SD_SERIALIZE \ |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 802de56c41e8..2f322c38bd4d 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -136,6 +136,22 @@ static inline void tracepoint_synchronize_unregister(void) | |||
| 136 | postrcu; \ | 136 | postrcu; \ |
| 137 | } while (0) | 137 | } while (0) |
| 138 | 138 | ||
| 139 | #ifndef MODULE | ||
| 140 | #define __DECLARE_TRACE_RCU(name, proto, args, cond, data_proto, data_args) \ | ||
| 141 | static inline void trace_##name##_rcuidle(proto) \ | ||
| 142 | { \ | ||
| 143 | if (static_key_false(&__tracepoint_##name.key)) \ | ||
| 144 | __DO_TRACE(&__tracepoint_##name, \ | ||
| 145 | TP_PROTO(data_proto), \ | ||
| 146 | TP_ARGS(data_args), \ | ||
| 147 | TP_CONDITION(cond), \ | ||
| 148 | rcu_idle_exit(), \ | ||
| 149 | rcu_idle_enter()); \ | ||
| 150 | } | ||
| 151 | #else | ||
| 152 | #define __DECLARE_TRACE_RCU(name, proto, args, cond, data_proto, data_args) | ||
| 153 | #endif | ||
| 154 | |||
| 139 | /* | 155 | /* |
| 140 | * Make sure the alignment of the structure in the __tracepoints section will | 156 | * Make sure the alignment of the structure in the __tracepoints section will |
| 141 | * not add unwanted padding between the beginning of the section and the | 157 | * not add unwanted padding between the beginning of the section and the |
| @@ -151,16 +167,8 @@ static inline void tracepoint_synchronize_unregister(void) | |||
| 151 | TP_ARGS(data_args), \ | 167 | TP_ARGS(data_args), \ |
| 152 | TP_CONDITION(cond),,); \ | 168 | TP_CONDITION(cond),,); \ |
| 153 | } \ | 169 | } \ |
| 154 | static inline void trace_##name##_rcuidle(proto) \ | 170 | __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \ |
| 155 | { \ | 171 | PARAMS(cond), PARAMS(data_proto), PARAMS(data_args)) \ |
| 156 | if (static_key_false(&__tracepoint_##name.key)) \ | ||
| 157 | __DO_TRACE(&__tracepoint_##name, \ | ||
| 158 | TP_PROTO(data_proto), \ | ||
| 159 | TP_ARGS(data_args), \ | ||
| 160 | TP_CONDITION(cond), \ | ||
| 161 | rcu_idle_exit(), \ | ||
| 162 | rcu_idle_enter()); \ | ||
| 163 | } \ | ||
| 164 | static inline int \ | 172 | static inline int \ |
| 165 | register_trace_##name(void (*probe)(data_proto), void *data) \ | 173 | register_trace_##name(void (*probe)(data_proto), void *data) \ |
| 166 | { \ | 174 | { \ |
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h index efe4b3308c74..e6f0331e3d45 100644 --- a/include/linux/uprobes.h +++ b/include/linux/uprobes.h | |||
| @@ -99,25 +99,27 @@ struct xol_area { | |||
| 99 | 99 | ||
| 100 | struct uprobes_state { | 100 | struct uprobes_state { |
| 101 | struct xol_area *xol_area; | 101 | struct xol_area *xol_area; |
| 102 | atomic_t count; | ||
| 103 | }; | 102 | }; |
| 103 | |||
| 104 | extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); | 104 | extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); |
| 105 | extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr, bool verify); | 105 | extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); |
| 106 | extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); | 106 | extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); |
| 107 | extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); | 107 | extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); |
| 108 | extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); | 108 | extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); |
| 109 | extern int uprobe_mmap(struct vm_area_struct *vma); | 109 | extern int uprobe_mmap(struct vm_area_struct *vma); |
| 110 | extern void uprobe_munmap(struct vm_area_struct *vma, unsigned long start, unsigned long end); | 110 | extern void uprobe_munmap(struct vm_area_struct *vma, unsigned long start, unsigned long end); |
| 111 | extern void uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm); | ||
| 111 | extern void uprobe_free_utask(struct task_struct *t); | 112 | extern void uprobe_free_utask(struct task_struct *t); |
| 112 | extern void uprobe_copy_process(struct task_struct *t); | 113 | extern void uprobe_copy_process(struct task_struct *t); |
| 113 | extern unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs); | 114 | extern unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs); |
| 115 | extern void __weak arch_uprobe_enable_step(struct arch_uprobe *arch); | ||
| 116 | extern void __weak arch_uprobe_disable_step(struct arch_uprobe *arch); | ||
| 114 | extern int uprobe_post_sstep_notifier(struct pt_regs *regs); | 117 | extern int uprobe_post_sstep_notifier(struct pt_regs *regs); |
| 115 | extern int uprobe_pre_sstep_notifier(struct pt_regs *regs); | 118 | extern int uprobe_pre_sstep_notifier(struct pt_regs *regs); |
| 116 | extern void uprobe_notify_resume(struct pt_regs *regs); | 119 | extern void uprobe_notify_resume(struct pt_regs *regs); |
| 117 | extern bool uprobe_deny_signal(void); | 120 | extern bool uprobe_deny_signal(void); |
| 118 | extern bool __weak arch_uprobe_skip_sstep(struct arch_uprobe *aup, struct pt_regs *regs); | 121 | extern bool __weak arch_uprobe_skip_sstep(struct arch_uprobe *aup, struct pt_regs *regs); |
| 119 | extern void uprobe_clear_state(struct mm_struct *mm); | 122 | extern void uprobe_clear_state(struct mm_struct *mm); |
| 120 | extern void uprobe_reset_state(struct mm_struct *mm); | ||
| 121 | #else /* !CONFIG_UPROBES */ | 123 | #else /* !CONFIG_UPROBES */ |
| 122 | struct uprobes_state { | 124 | struct uprobes_state { |
| 123 | }; | 125 | }; |
| @@ -138,6 +140,10 @@ static inline void | |||
| 138 | uprobe_munmap(struct vm_area_struct *vma, unsigned long start, unsigned long end) | 140 | uprobe_munmap(struct vm_area_struct *vma, unsigned long start, unsigned long end) |
| 139 | { | 141 | { |
| 140 | } | 142 | } |
| 143 | static inline void | ||
| 144 | uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm) | ||
| 145 | { | ||
| 146 | } | ||
| 141 | static inline void uprobe_notify_resume(struct pt_regs *regs) | 147 | static inline void uprobe_notify_resume(struct pt_regs *regs) |
| 142 | { | 148 | { |
| 143 | } | 149 | } |
| @@ -158,8 +164,5 @@ static inline void uprobe_copy_process(struct task_struct *t) | |||
| 158 | static inline void uprobe_clear_state(struct mm_struct *mm) | 164 | static inline void uprobe_clear_state(struct mm_struct *mm) |
| 159 | { | 165 | { |
| 160 | } | 166 | } |
| 161 | static inline void uprobe_reset_state(struct mm_struct *mm) | ||
| 162 | { | ||
| 163 | } | ||
| 164 | #endif /* !CONFIG_UPROBES */ | 167 | #endif /* !CONFIG_UPROBES */ |
| 165 | #endif /* _LINUX_UPROBES_H */ | 168 | #endif /* _LINUX_UPROBES_H */ |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 22e61fdf75a2..28e493b5b94c 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
| @@ -84,6 +84,8 @@ struct xfrm_replay_state { | |||
| 84 | __u32 bitmap; | 84 | __u32 bitmap; |
| 85 | }; | 85 | }; |
| 86 | 86 | ||
| 87 | #define XFRMA_REPLAY_ESN_MAX 4096 | ||
| 88 | |||
| 87 | struct xfrm_replay_state_esn { | 89 | struct xfrm_replay_state_esn { |
| 88 | unsigned int bmp_len; | 90 | unsigned int bmp_len; |
| 89 | __u32 oseq; | 91 | __u32 oseq; |
diff --git a/include/net/bluetooth/smp.h b/include/net/bluetooth/smp.h index ca356a734920..8b27927b2a55 100644 --- a/include/net/bluetooth/smp.h +++ b/include/net/bluetooth/smp.h | |||
| @@ -136,7 +136,7 @@ struct smp_chan { | |||
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | /* SMP Commands */ | 138 | /* SMP Commands */ |
| 139 | int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level); | 139 | int smp_conn_security(struct hci_conn *hcon, __u8 sec_level); |
| 140 | int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb); | 140 | int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb); |
| 141 | int smp_distribute_keys(struct l2cap_conn *conn, __u8 force); | 141 | int smp_distribute_keys(struct l2cap_conn *conn, __u8 force); |
| 142 | int smp_user_confirm_reply(struct hci_conn *conn, u16 mgmt_op, __le32 passkey); | 142 | int smp_user_confirm_reply(struct hci_conn *conn, u16 mgmt_op, __le32 passkey); |
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 0fedbd8d747a..9fc7114159e8 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h | |||
| @@ -111,9 +111,8 @@ struct rt6_info { | |||
| 111 | struct inet6_dev *rt6i_idev; | 111 | struct inet6_dev *rt6i_idev; |
| 112 | unsigned long _rt6i_peer; | 112 | unsigned long _rt6i_peer; |
| 113 | 113 | ||
| 114 | #ifdef CONFIG_XFRM | 114 | u32 rt6i_genid; |
| 115 | u32 rt6i_flow_cache_genid; | 115 | |
| 116 | #endif | ||
| 117 | /* more non-fragment space at head required */ | 116 | /* more non-fragment space at head required */ |
| 118 | unsigned short rt6i_nfheader_len; | 117 | unsigned short rt6i_nfheader_len; |
| 119 | 118 | ||
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index ae1cd6c9ba52..fd87963a0ea5 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
| @@ -102,6 +102,7 @@ struct net { | |||
| 102 | #endif | 102 | #endif |
| 103 | struct netns_ipvs *ipvs; | 103 | struct netns_ipvs *ipvs; |
| 104 | struct sock *diag_nlsk; | 104 | struct sock *diag_nlsk; |
| 105 | atomic_t rt_genid; | ||
| 105 | }; | 106 | }; |
| 106 | 107 | ||
| 107 | 108 | ||
| @@ -300,5 +301,14 @@ static inline void unregister_net_sysctl_table(struct ctl_table_header *header) | |||
| 300 | } | 301 | } |
| 301 | #endif | 302 | #endif |
| 302 | 303 | ||
| 304 | static inline int rt_genid(struct net *net) | ||
| 305 | { | ||
| 306 | return atomic_read(&net->rt_genid); | ||
| 307 | } | ||
| 308 | |||
| 309 | static inline void rt_genid_bump(struct net *net) | ||
| 310 | { | ||
| 311 | atomic_inc(&net->rt_genid); | ||
| 312 | } | ||
| 303 | 313 | ||
| 304 | #endif /* __NET_NET_NAMESPACE_H */ | 314 | #endif /* __NET_NET_NAMESPACE_H */ |
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h index e1ce1048fe5f..4a045cda9c60 100644 --- a/include/net/netfilter/nf_conntrack_ecache.h +++ b/include/net/netfilter/nf_conntrack_ecache.h | |||
| @@ -18,6 +18,7 @@ struct nf_conntrack_ecache { | |||
| 18 | u16 ctmask; /* bitmask of ct events to be delivered */ | 18 | u16 ctmask; /* bitmask of ct events to be delivered */ |
| 19 | u16 expmask; /* bitmask of expect events to be delivered */ | 19 | u16 expmask; /* bitmask of expect events to be delivered */ |
| 20 | u32 pid; /* netlink pid of destroyer */ | 20 | u32 pid; /* netlink pid of destroyer */ |
| 21 | struct timer_list timeout; | ||
| 21 | }; | 22 | }; |
| 22 | 23 | ||
| 23 | static inline struct nf_conntrack_ecache * | 24 | static inline struct nf_conntrack_ecache * |
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 1474dd65c66f..eb24dbccd81e 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
| @@ -65,7 +65,6 @@ struct netns_ipv4 { | |||
| 65 | unsigned int sysctl_ping_group_range[2]; | 65 | unsigned int sysctl_ping_group_range[2]; |
| 66 | long sysctl_tcp_mem[3]; | 66 | long sysctl_tcp_mem[3]; |
| 67 | 67 | ||
| 68 | atomic_t rt_genid; | ||
| 69 | atomic_t dev_addr_genid; | 68 | atomic_t dev_addr_genid; |
| 70 | 69 | ||
| 71 | #ifdef CONFIG_IP_MROUTE | 70 | #ifdef CONFIG_IP_MROUTE |
diff --git a/include/net/route.h b/include/net/route.h index 776a27f1ab78..da22243d2760 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
| @@ -108,7 +108,7 @@ extern struct ip_rt_acct __percpu *ip_rt_acct; | |||
| 108 | 108 | ||
| 109 | struct in_device; | 109 | struct in_device; |
| 110 | extern int ip_rt_init(void); | 110 | extern int ip_rt_init(void); |
| 111 | extern void rt_cache_flush(struct net *net, int how); | 111 | extern void rt_cache_flush(struct net *net); |
| 112 | extern void rt_flush_dev(struct net_device *dev); | 112 | extern void rt_flush_dev(struct net_device *dev); |
| 113 | extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp); | 113 | extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp); |
| 114 | extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp, | 114 | extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp, |
diff --git a/include/net/sock.h b/include/net/sock.h index 72132aef53fc..adb7da20b5a1 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -1332,7 +1332,7 @@ static inline bool sk_wmem_schedule(struct sock *sk, int size) | |||
| 1332 | } | 1332 | } |
| 1333 | 1333 | ||
| 1334 | static inline bool | 1334 | static inline bool |
| 1335 | sk_rmem_schedule(struct sock *sk, struct sk_buff *skb, unsigned int size) | 1335 | sk_rmem_schedule(struct sock *sk, struct sk_buff *skb, int size) |
| 1336 | { | 1336 | { |
| 1337 | if (!sk_has_account(sk)) | 1337 | if (!sk_has_account(sk)) |
| 1338 | return true; | 1338 | return true; |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 976a81abe1a2..639dd1316d37 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
| @@ -273,6 +273,9 @@ struct xfrm_replay { | |||
| 273 | int (*check)(struct xfrm_state *x, | 273 | int (*check)(struct xfrm_state *x, |
| 274 | struct sk_buff *skb, | 274 | struct sk_buff *skb, |
| 275 | __be32 net_seq); | 275 | __be32 net_seq); |
| 276 | int (*recheck)(struct xfrm_state *x, | ||
| 277 | struct sk_buff *skb, | ||
| 278 | __be32 net_seq); | ||
| 276 | void (*notify)(struct xfrm_state *x, int event); | 279 | void (*notify)(struct xfrm_state *x, int event); |
| 277 | int (*overflow)(struct xfrm_state *x, struct sk_buff *skb); | 280 | int (*overflow)(struct xfrm_state *x, struct sk_buff *skb); |
| 278 | }; | 281 | }; |
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index f1405d335a96..941c84bf1065 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h | |||
| @@ -23,7 +23,9 @@ struct se_subsystem_api { | |||
| 23 | struct se_device *(*create_virtdevice)(struct se_hba *, | 23 | struct se_device *(*create_virtdevice)(struct se_hba *, |
| 24 | struct se_subsystem_dev *, void *); | 24 | struct se_subsystem_dev *, void *); |
| 25 | void (*free_device)(void *); | 25 | void (*free_device)(void *); |
| 26 | int (*transport_complete)(struct se_cmd *cmd, struct scatterlist *); | 26 | void (*transport_complete)(struct se_cmd *cmd, |
| 27 | struct scatterlist *, | ||
| 28 | unsigned char *); | ||
| 27 | 29 | ||
| 28 | int (*parse_cdb)(struct se_cmd *cmd); | 30 | int (*parse_cdb)(struct se_cmd *cmd); |
| 29 | ssize_t (*check_configfs_dev_params)(struct se_hba *, | 31 | ssize_t (*check_configfs_dev_params)(struct se_hba *, |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 015cea01ae39..5be89373ceac 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -121,6 +121,7 @@ | |||
| 121 | 121 | ||
| 122 | #define SE_INQUIRY_BUF 512 | 122 | #define SE_INQUIRY_BUF 512 |
| 123 | #define SE_MODE_PAGE_BUF 512 | 123 | #define SE_MODE_PAGE_BUF 512 |
| 124 | #define SE_SENSE_BUF 96 | ||
| 124 | 125 | ||
| 125 | /* struct se_hba->hba_flags */ | 126 | /* struct se_hba->hba_flags */ |
| 126 | enum hba_flags_table { | 127 | enum hba_flags_table { |
diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h index b0b4eb24d592..1905ca8dd399 100644 --- a/include/trace/define_trace.h +++ b/include/trace/define_trace.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Trace files that want to automate creationg of all tracepoints defined | 2 | * Trace files that want to automate creation of all tracepoints defined |
| 3 | * in their file should include this file. The following are macros that the | 3 | * in their file should include this file. The following are macros that the |
| 4 | * trace file may define: | 4 | * trace file may define: |
| 5 | * | 5 | * |
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index 5f889f16b0c8..08fa27244da7 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h | |||
| @@ -214,7 +214,7 @@ TRACE_EVENT(mm_page_alloc, | |||
| 214 | 214 | ||
| 215 | TP_printk("page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s", | 215 | TP_printk("page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s", |
| 216 | __entry->page, | 216 | __entry->page, |
| 217 | page_to_pfn(__entry->page), | 217 | __entry->page ? page_to_pfn(__entry->page) : 0, |
| 218 | __entry->order, | 218 | __entry->order, |
| 219 | __entry->migratetype, | 219 | __entry->migratetype, |
| 220 | show_gfp_flags(__entry->gfp_flags)) | 220 | show_gfp_flags(__entry->gfp_flags)) |
| @@ -240,7 +240,7 @@ DECLARE_EVENT_CLASS(mm_page, | |||
| 240 | 240 | ||
| 241 | TP_printk("page=%p pfn=%lu order=%u migratetype=%d percpu_refill=%d", | 241 | TP_printk("page=%p pfn=%lu order=%u migratetype=%d percpu_refill=%d", |
| 242 | __entry->page, | 242 | __entry->page, |
| 243 | page_to_pfn(__entry->page), | 243 | __entry->page ? page_to_pfn(__entry->page) : 0, |
| 244 | __entry->order, | 244 | __entry->order, |
| 245 | __entry->migratetype, | 245 | __entry->migratetype, |
| 246 | __entry->order == 0) | 246 | __entry->order == 0) |
diff --git a/include/xen/events.h b/include/xen/events.h index 9c641deb65d2..04399b28e821 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
| @@ -58,8 +58,6 @@ void notify_remote_via_irq(int irq); | |||
| 58 | 58 | ||
| 59 | void xen_irq_resume(void); | 59 | void xen_irq_resume(void); |
| 60 | 60 | ||
| 61 | void xen_hvm_prepare_kexec(struct shared_info *sip, unsigned long pfn); | ||
| 62 | |||
| 63 | /* Clear an irq's pending state, in preparation for polling on it */ | 61 | /* Clear an irq's pending state, in preparation for polling on it */ |
| 64 | void xen_clear_irq_pending(int irq); | 62 | void xen_clear_irq_pending(int irq); |
| 65 | void xen_set_irq_pending(int irq); | 63 | void xen_set_irq_pending(int irq); |
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h index 11e27c3af3cb..f19fff8650e9 100644 --- a/include/xen/grant_table.h +++ b/include/xen/grant_table.h | |||
| @@ -187,6 +187,7 @@ int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops, | |||
| 187 | struct gnttab_map_grant_ref *kmap_ops, | 187 | struct gnttab_map_grant_ref *kmap_ops, |
| 188 | struct page **pages, unsigned int count); | 188 | struct page **pages, unsigned int count); |
| 189 | int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops, | 189 | int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops, |
| 190 | struct page **pages, unsigned int count, bool clear_pte); | 190 | struct gnttab_map_grant_ref *kunmap_ops, |
| 191 | struct page **pages, unsigned int count); | ||
| 191 | 192 | ||
| 192 | #endif /* __ASM_GNTTAB_H__ */ | 193 | #endif /* __ASM_GNTTAB_H__ */ |
