diff options
Diffstat (limited to 'include')
61 files changed, 368 insertions, 186 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index b5714580801a..bcfd808b1098 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -315,12 +315,19 @@ struct acpi_device_wakeup_flags { | |||
315 | u8 notifier_present:1; /* Wake-up notify handler has been installed */ | 315 | u8 notifier_present:1; /* Wake-up notify handler has been installed */ |
316 | }; | 316 | }; |
317 | 317 | ||
318 | struct acpi_device_wakeup_context { | ||
319 | struct work_struct work; | ||
320 | struct device *dev; | ||
321 | }; | ||
322 | |||
318 | struct acpi_device_wakeup { | 323 | struct acpi_device_wakeup { |
319 | acpi_handle gpe_device; | 324 | acpi_handle gpe_device; |
320 | u64 gpe_number; | 325 | u64 gpe_number; |
321 | u64 sleep_state; | 326 | u64 sleep_state; |
322 | struct list_head resources; | 327 | struct list_head resources; |
323 | struct acpi_device_wakeup_flags flags; | 328 | struct acpi_device_wakeup_flags flags; |
329 | struct acpi_device_wakeup_context context; | ||
330 | struct wakeup_source *ws; | ||
324 | int prepare_count; | 331 | int prepare_count; |
325 | }; | 332 | }; |
326 | 333 | ||
@@ -372,15 +379,9 @@ static inline void acpi_set_device_status(struct acpi_device *adev, u32 sta) | |||
372 | } | 379 | } |
373 | 380 | ||
374 | static inline void acpi_set_hp_context(struct acpi_device *adev, | 381 | static inline void acpi_set_hp_context(struct acpi_device *adev, |
375 | struct acpi_hotplug_context *hp, | 382 | struct acpi_hotplug_context *hp) |
376 | int (*notify)(struct acpi_device *, u32), | ||
377 | void (*uevent)(struct acpi_device *, u32), | ||
378 | void (*fixup)(struct acpi_device *)) | ||
379 | { | 383 | { |
380 | hp->self = adev; | 384 | hp->self = adev; |
381 | hp->notify = notify; | ||
382 | hp->uevent = uevent; | ||
383 | hp->fixup = fixup; | ||
384 | adev->hp = hp; | 385 | adev->hp = hp; |
385 | } | 386 | } |
386 | 387 | ||
@@ -487,6 +488,8 @@ struct acpi_bus_type { | |||
487 | }; | 488 | }; |
488 | int register_acpi_bus_type(struct acpi_bus_type *); | 489 | int register_acpi_bus_type(struct acpi_bus_type *); |
489 | int unregister_acpi_bus_type(struct acpi_bus_type *); | 490 | int unregister_acpi_bus_type(struct acpi_bus_type *); |
491 | int acpi_bind_one(struct device *dev, struct acpi_device *adev); | ||
492 | int acpi_unbind_one(struct device *dev); | ||
490 | 493 | ||
491 | struct acpi_pci_root { | 494 | struct acpi_pci_root { |
492 | struct acpi_device * device; | 495 | struct acpi_device * device; |
@@ -510,20 +513,18 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); | |||
510 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); | 513 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); |
511 | 514 | ||
512 | #ifdef CONFIG_PM | 515 | #ifdef CONFIG_PM |
513 | acpi_status acpi_add_pm_notifier(struct acpi_device *adev, | 516 | acpi_status acpi_add_pm_notifier(struct acpi_device *adev, struct device *dev, |
514 | acpi_notify_handler handler, void *context); | 517 | void (*work_func)(struct work_struct *work)); |
515 | acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, | 518 | acpi_status acpi_remove_pm_notifier(struct acpi_device *adev); |
516 | acpi_notify_handler handler); | ||
517 | int acpi_pm_device_sleep_state(struct device *, int *, int); | 519 | int acpi_pm_device_sleep_state(struct device *, int *, int); |
518 | #else | 520 | #else |
519 | static inline acpi_status acpi_add_pm_notifier(struct acpi_device *adev, | 521 | static inline acpi_status acpi_add_pm_notifier(struct acpi_device *adev, |
520 | acpi_notify_handler handler, | 522 | struct device *dev, |
521 | void *context) | 523 | void (*work_func)(struct work_struct *work)) |
522 | { | 524 | { |
523 | return AE_SUPPORT; | 525 | return AE_SUPPORT; |
524 | } | 526 | } |
525 | static inline acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, | 527 | static inline acpi_status acpi_remove_pm_notifier(struct acpi_device *adev) |
526 | acpi_notify_handler handler) | ||
527 | { | 528 | { |
528 | return AE_SUPPORT; | 529 | return AE_SUPPORT; |
529 | } | 530 | } |
@@ -538,13 +539,8 @@ static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m) | |||
538 | #endif | 539 | #endif |
539 | 540 | ||
540 | #ifdef CONFIG_PM_RUNTIME | 541 | #ifdef CONFIG_PM_RUNTIME |
541 | int __acpi_device_run_wake(struct acpi_device *, bool); | ||
542 | int acpi_pm_device_run_wake(struct device *, bool); | 542 | int acpi_pm_device_run_wake(struct device *, bool); |
543 | #else | 543 | #else |
544 | static inline int __acpi_device_run_wake(struct acpi_device *adev, bool en) | ||
545 | { | ||
546 | return -ENODEV; | ||
547 | } | ||
548 | static inline int acpi_pm_device_run_wake(struct device *dev, bool enable) | 544 | static inline int acpi_pm_device_run_wake(struct device *dev, bool enable) |
549 | { | 545 | { |
550 | return -ENODEV; | 546 | return -ENODEV; |
@@ -552,14 +548,8 @@ static inline int acpi_pm_device_run_wake(struct device *dev, bool enable) | |||
552 | #endif | 548 | #endif |
553 | 549 | ||
554 | #ifdef CONFIG_PM_SLEEP | 550 | #ifdef CONFIG_PM_SLEEP |
555 | int __acpi_device_sleep_wake(struct acpi_device *, u32, bool); | ||
556 | int acpi_pm_device_sleep_wake(struct device *, bool); | 551 | int acpi_pm_device_sleep_wake(struct device *, bool); |
557 | #else | 552 | #else |
558 | static inline int __acpi_device_sleep_wake(struct acpi_device *adev, | ||
559 | u32 target_state, bool enable) | ||
560 | { | ||
561 | return -ENODEV; | ||
562 | } | ||
563 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) | 553 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) |
564 | { | 554 | { |
565 | return -ENODEV; | 555 | return -ENODEV; |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 04b2c5d5a8ed..b7c89d47efbe 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -53,8 +53,6 @@ | |||
53 | #include <acpi/actbl.h> | 53 | #include <acpi/actbl.h> |
54 | #include <acpi/acbuffer.h> | 54 | #include <acpi/acbuffer.h> |
55 | 55 | ||
56 | extern u8 acpi_gbl_permanent_mmap; | ||
57 | |||
58 | /***************************************************************************** | 56 | /***************************************************************************** |
59 | * | 57 | * |
60 | * Macros used for ACPICA globals and configuration | 58 | * Macros used for ACPICA globals and configuration |
@@ -889,17 +887,25 @@ ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1) | |||
889 | /* | 887 | /* |
890 | * Divergences | 888 | * Divergences |
891 | */ | 889 | */ |
892 | acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type); | 890 | ACPI_GLOBAL(u8, acpi_gbl_permanent_mmap); |
891 | |||
892 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status | ||
893 | acpi_get_id(acpi_handle object, | ||
894 | acpi_owner_id * out_type)) | ||
893 | 895 | ||
894 | acpi_status acpi_unload_table_id(acpi_owner_id id); | 896 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_unload_table_id(acpi_owner_id id)) |
895 | 897 | ||
896 | acpi_status | 898 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
897 | acpi_get_table_with_size(acpi_string signature, | 899 | acpi_get_table_with_size(acpi_string signature, |
898 | u32 instance, struct acpi_table_header **out_table, | 900 | u32 instance, |
899 | acpi_size *tbl_size); | 901 | struct acpi_table_header |
902 | **out_table, | ||
903 | acpi_size *tbl_size)) | ||
900 | 904 | ||
901 | acpi_status | 905 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
902 | acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data, | 906 | acpi_get_data_full(acpi_handle object, |
903 | void (*callback)(void *)); | 907 | acpi_object_handler handler, |
908 | void **data, | ||
909 | void (*callback)(void *))) | ||
904 | 910 | ||
905 | #endif /* __ACXFACE_H__ */ | 911 | #endif /* __ACXFACE_H__ */ |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index cd1f052d55bb..1ba7c190c2cc 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -44,6 +44,16 @@ | |||
44 | #ifndef __ACLINUX_H__ | 44 | #ifndef __ACLINUX_H__ |
45 | #define __ACLINUX_H__ | 45 | #define __ACLINUX_H__ |
46 | 46 | ||
47 | #ifdef __KERNEL__ | ||
48 | |||
49 | /* ACPICA external files should not include ACPICA headers directly. */ | ||
50 | |||
51 | #if !defined(BUILDING_ACPICA) && !defined(_LINUX_ACPI_H) | ||
52 | #error "Please don't include <acpi/acpi.h> directly, include <linux/acpi.h> instead." | ||
53 | #endif | ||
54 | |||
55 | #endif | ||
56 | |||
47 | /* Common (in-kernel/user-space) ACPICA configuration */ | 57 | /* Common (in-kernel/user-space) ACPICA configuration */ |
48 | 58 | ||
49 | #define ACPI_USE_SYSTEM_CLIBRARY | 59 | #define ACPI_USE_SYSTEM_CLIBRARY |
@@ -70,7 +80,9 @@ | |||
70 | #ifdef EXPORT_ACPI_INTERFACES | 80 | #ifdef EXPORT_ACPI_INTERFACES |
71 | #include <linux/export.h> | 81 | #include <linux/export.h> |
72 | #endif | 82 | #endif |
83 | #ifdef CONFIG_ACPI | ||
73 | #include <asm/acenv.h> | 84 | #include <asm/acenv.h> |
85 | #endif | ||
74 | 86 | ||
75 | #ifndef CONFIG_ACPI | 87 | #ifndef CONFIG_ACPI |
76 | 88 | ||
diff --git a/include/acpi/platform/aclinuxex.h b/include/acpi/platform/aclinuxex.h index 191e741cfa0e..568d4b886712 100644 --- a/include/acpi/platform/aclinuxex.h +++ b/include/acpi/platform/aclinuxex.h | |||
@@ -46,6 +46,28 @@ | |||
46 | 46 | ||
47 | #ifdef __KERNEL__ | 47 | #ifdef __KERNEL__ |
48 | 48 | ||
49 | #ifndef ACPI_USE_NATIVE_DIVIDE | ||
50 | |||
51 | #ifndef ACPI_DIV_64_BY_32 | ||
52 | #define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ | ||
53 | do { \ | ||
54 | u64 (__n) = ((u64) n_hi) << 32 | (n_lo); \ | ||
55 | (r32) = do_div ((__n), (d32)); \ | ||
56 | (q32) = (u32) (__n); \ | ||
57 | } while (0) | ||
58 | #endif | ||
59 | |||
60 | #ifndef ACPI_SHIFT_RIGHT_64 | ||
61 | #define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ | ||
62 | do { \ | ||
63 | (n_lo) >>= 1; \ | ||
64 | (n_lo) |= (((n_hi) & 1) << 31); \ | ||
65 | (n_hi) >>= 1; \ | ||
66 | } while (0) | ||
67 | #endif | ||
68 | |||
69 | #endif | ||
70 | |||
49 | /* | 71 | /* |
50 | * Overrides for in-kernel ACPICA | 72 | * Overrides for in-kernel ACPICA |
51 | */ | 73 | */ |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 6eb1d3cb5104..9b9b6f29bbf3 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -53,7 +53,7 @@ struct acpi_power_register { | |||
53 | u8 bit_offset; | 53 | u8 bit_offset; |
54 | u8 access_size; | 54 | u8 access_size; |
55 | u64 address; | 55 | u64 address; |
56 | } __attribute__ ((packed)); | 56 | } __packed; |
57 | 57 | ||
58 | struct acpi_processor_cx { | 58 | struct acpi_processor_cx { |
59 | u8 valid; | 59 | u8 valid; |
@@ -83,7 +83,7 @@ struct acpi_psd_package { | |||
83 | u64 domain; | 83 | u64 domain; |
84 | u64 coord_type; | 84 | u64 coord_type; |
85 | u64 num_processors; | 85 | u64 num_processors; |
86 | } __attribute__ ((packed)); | 86 | } __packed; |
87 | 87 | ||
88 | struct acpi_pct_register { | 88 | struct acpi_pct_register { |
89 | u8 descriptor; | 89 | u8 descriptor; |
@@ -93,7 +93,7 @@ struct acpi_pct_register { | |||
93 | u8 bit_offset; | 93 | u8 bit_offset; |
94 | u8 reserved; | 94 | u8 reserved; |
95 | u64 address; | 95 | u64 address; |
96 | } __attribute__ ((packed)); | 96 | } __packed; |
97 | 97 | ||
98 | struct acpi_processor_px { | 98 | struct acpi_processor_px { |
99 | u64 core_frequency; /* megahertz */ | 99 | u64 core_frequency; /* megahertz */ |
@@ -124,7 +124,7 @@ struct acpi_tsd_package { | |||
124 | u64 domain; | 124 | u64 domain; |
125 | u64 coord_type; | 125 | u64 coord_type; |
126 | u64 num_processors; | 126 | u64 num_processors; |
127 | } __attribute__ ((packed)); | 127 | } __packed; |
128 | 128 | ||
129 | struct acpi_ptc_register { | 129 | struct acpi_ptc_register { |
130 | u8 descriptor; | 130 | u8 descriptor; |
@@ -134,7 +134,7 @@ struct acpi_ptc_register { | |||
134 | u8 bit_offset; | 134 | u8 bit_offset; |
135 | u8 reserved; | 135 | u8 reserved; |
136 | u64 address; | 136 | u64 address; |
137 | } __attribute__ ((packed)); | 137 | } __packed; |
138 | 138 | ||
139 | struct acpi_processor_tx_tss { | 139 | struct acpi_processor_tx_tss { |
140 | u64 freqpercentage; /* */ | 140 | u64 freqpercentage; /* */ |
diff --git a/include/acpi/video.h b/include/acpi/video.h index ea4c7bbded4d..843ef1adfbfa 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h | |||
@@ -22,6 +22,7 @@ extern void acpi_video_unregister(void); | |||
22 | extern void acpi_video_unregister_backlight(void); | 22 | extern void acpi_video_unregister_backlight(void); |
23 | extern int acpi_video_get_edid(struct acpi_device *device, int type, | 23 | extern int acpi_video_get_edid(struct acpi_device *device, int type, |
24 | int device_id, void **edid); | 24 | int device_id, void **edid); |
25 | extern bool acpi_video_verify_backlight_support(void); | ||
25 | #else | 26 | #else |
26 | static inline int acpi_video_register(void) { return 0; } | 27 | static inline int acpi_video_register(void) { return 0; } |
27 | static inline void acpi_video_unregister(void) { return; } | 28 | static inline void acpi_video_unregister(void) { return; } |
@@ -31,6 +32,7 @@ static inline int acpi_video_get_edid(struct acpi_device *device, int type, | |||
31 | { | 32 | { |
32 | return -ENODEV; | 33 | return -ENODEV; |
33 | } | 34 | } |
35 | static inline bool acpi_video_verify_backlight_support(void) { return false; } | ||
34 | #endif | 36 | #endif |
35 | 37 | ||
36 | #endif | 38 | #endif |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 471ba48c7ae4..c1c0b0cf39b4 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -693,7 +693,7 @@ | |||
693 | . = ALIGN(PAGE_SIZE); \ | 693 | . = ALIGN(PAGE_SIZE); \ |
694 | *(.data..percpu..page_aligned) \ | 694 | *(.data..percpu..page_aligned) \ |
695 | . = ALIGN(cacheline); \ | 695 | . = ALIGN(cacheline); \ |
696 | *(.data..percpu..readmostly) \ | 696 | *(.data..percpu..read_mostly) \ |
697 | . = ALIGN(cacheline); \ | 697 | . = ALIGN(cacheline); \ |
698 | *(.data..percpu) \ | 698 | *(.data..percpu) \ |
699 | *(.data..percpu..shared_aligned) \ | 699 | *(.data..percpu..shared_aligned) \ |
diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h index 0572035673f3..a70d45647898 100644 --- a/include/drm/i915_pciids.h +++ b/include/drm/i915_pciids.h | |||
@@ -237,13 +237,21 @@ | |||
237 | #define INTEL_BDW_GT3D_IDS(info) \ | 237 | #define INTEL_BDW_GT3D_IDS(info) \ |
238 | _INTEL_BDW_D_IDS(3, info) | 238 | _INTEL_BDW_D_IDS(3, info) |
239 | 239 | ||
240 | #define INTEL_BDW_RSVDM_IDS(info) \ | ||
241 | _INTEL_BDW_M_IDS(4, info) | ||
242 | |||
243 | #define INTEL_BDW_RSVDD_IDS(info) \ | ||
244 | _INTEL_BDW_D_IDS(4, info) | ||
245 | |||
240 | #define INTEL_BDW_M_IDS(info) \ | 246 | #define INTEL_BDW_M_IDS(info) \ |
241 | INTEL_BDW_GT12M_IDS(info), \ | 247 | INTEL_BDW_GT12M_IDS(info), \ |
242 | INTEL_BDW_GT3M_IDS(info) | 248 | INTEL_BDW_GT3M_IDS(info), \ |
249 | INTEL_BDW_RSVDM_IDS(info) | ||
243 | 250 | ||
244 | #define INTEL_BDW_D_IDS(info) \ | 251 | #define INTEL_BDW_D_IDS(info) \ |
245 | INTEL_BDW_GT12D_IDS(info), \ | 252 | INTEL_BDW_GT12D_IDS(info), \ |
246 | INTEL_BDW_GT3D_IDS(info) | 253 | INTEL_BDW_GT3D_IDS(info), \ |
254 | INTEL_BDW_RSVDD_IDS(info) | ||
247 | 255 | ||
248 | #define INTEL_CHV_IDS(info) \ | 256 | #define INTEL_CHV_IDS(info) \ |
249 | INTEL_VGA_DEVICE(0x22b0, info), \ | 257 | INTEL_VGA_DEVICE(0x22b0, info), \ |
diff --git a/include/drm/i915_powerwell.h b/include/drm/i915_powerwell.h index cfdc884405b7..baa6f11b1837 100644 --- a/include/drm/i915_powerwell.h +++ b/include/drm/i915_powerwell.h | |||
@@ -30,7 +30,8 @@ | |||
30 | #define _I915_POWERWELL_H_ | 30 | #define _I915_POWERWELL_H_ |
31 | 31 | ||
32 | /* For use by hda_i915 driver */ | 32 | /* For use by hda_i915 driver */ |
33 | extern void i915_request_power_well(void); | 33 | extern int i915_request_power_well(void); |
34 | extern void i915_release_power_well(void); | 34 | extern int i915_release_power_well(void); |
35 | extern int i915_get_cdclk_freq(void); | ||
35 | 36 | ||
36 | #endif /* _I915_POWERWELL_H_ */ | 37 | #endif /* _I915_POWERWELL_H_ */ |
diff --git a/include/dt-bindings/clock/exynos5420.h b/include/dt-bindings/clock/exynos5420.h index 97dcb89d37d3..21d51ae1d242 100644 --- a/include/dt-bindings/clock/exynos5420.h +++ b/include/dt-bindings/clock/exynos5420.h | |||
@@ -63,7 +63,6 @@ | |||
63 | #define CLK_SCLK_MPHY_IXTAL24 161 | 63 | #define CLK_SCLK_MPHY_IXTAL24 161 |
64 | 64 | ||
65 | /* gate clocks */ | 65 | /* gate clocks */ |
66 | #define CLK_ACLK66_PERIC 256 | ||
67 | #define CLK_UART0 257 | 66 | #define CLK_UART0 257 |
68 | #define CLK_UART1 258 | 67 | #define CLK_UART1 258 |
69 | #define CLK_UART2 259 | 68 | #define CLK_UART2 259 |
@@ -203,6 +202,8 @@ | |||
203 | #define CLK_MOUT_G3D 641 | 202 | #define CLK_MOUT_G3D 641 |
204 | #define CLK_MOUT_VPLL 642 | 203 | #define CLK_MOUT_VPLL 642 |
205 | #define CLK_MOUT_MAUDIO0 643 | 204 | #define CLK_MOUT_MAUDIO0 643 |
205 | #define CLK_MOUT_USER_ACLK333 644 | ||
206 | #define CLK_MOUT_SW_ACLK333 645 | ||
206 | 207 | ||
207 | /* divider clocks */ | 208 | /* divider clocks */ |
208 | #define CLK_DOUT_PIXEL 768 | 209 | #define CLK_DOUT_PIXEL 768 |
diff --git a/include/dt-bindings/clock/imx6sl-clock.h b/include/dt-bindings/clock/imx6sl-clock.h index 7cf5c9969336..b91dd462ba85 100644 --- a/include/dt-bindings/clock/imx6sl-clock.h +++ b/include/dt-bindings/clock/imx6sl-clock.h | |||
@@ -145,6 +145,7 @@ | |||
145 | #define IMX6SL_CLK_USDHC4 132 | 145 | #define IMX6SL_CLK_USDHC4 132 |
146 | #define IMX6SL_CLK_PLL4_AUDIO_DIV 133 | 146 | #define IMX6SL_CLK_PLL4_AUDIO_DIV 133 |
147 | #define IMX6SL_CLK_SPBA 134 | 147 | #define IMX6SL_CLK_SPBA 134 |
148 | #define IMX6SL_CLK_END 135 | 148 | #define IMX6SL_CLK_ENET 135 |
149 | #define IMX6SL_CLK_END 136 | ||
149 | 150 | ||
150 | #endif /* __DT_BINDINGS_CLOCK_IMX6SL_H */ | 151 | #endif /* __DT_BINDINGS_CLOCK_IMX6SL_H */ |
diff --git a/include/dt-bindings/clock/stih415-clks.h b/include/dt-bindings/clock/stih415-clks.h index 0d2c7397e028..d80caa68aebd 100644 --- a/include/dt-bindings/clock/stih415-clks.h +++ b/include/dt-bindings/clock/stih415-clks.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #define CLK_ETH1_PHY 4 | 10 | #define CLK_ETH1_PHY 4 |
11 | 11 | ||
12 | /* CLOCKGEN A1 */ | 12 | /* CLOCKGEN A1 */ |
13 | #define CLK_ICN_IF_2 0 | ||
13 | #define CLK_GMAC0_PHY 3 | 14 | #define CLK_GMAC0_PHY 3 |
14 | 15 | ||
15 | #endif | 16 | #endif |
diff --git a/include/dt-bindings/clock/stih416-clks.h b/include/dt-bindings/clock/stih416-clks.h index 552c779eb6af..f9bdbd13568d 100644 --- a/include/dt-bindings/clock/stih416-clks.h +++ b/include/dt-bindings/clock/stih416-clks.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #define CLK_ETH1_PHY 4 | 10 | #define CLK_ETH1_PHY 4 |
11 | 11 | ||
12 | /* CLOCKGEN A1 */ | 12 | /* CLOCKGEN A1 */ |
13 | #define CLK_ICN_IF_2 0 | ||
13 | #define CLK_GMAC0_PHY 3 | 14 | #define CLK_GMAC0_PHY 3 |
14 | 15 | ||
15 | #endif | 16 | #endif |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 358c01b971db..5320153c311b 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -29,17 +29,17 @@ | |||
29 | #include <linux/ioport.h> /* for struct resource */ | 29 | #include <linux/ioport.h> /* for struct resource */ |
30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
31 | 31 | ||
32 | #ifdef CONFIG_ACPI | ||
33 | |||
34 | #ifndef _LINUX | 32 | #ifndef _LINUX |
35 | #define _LINUX | 33 | #define _LINUX |
36 | #endif | 34 | #endif |
35 | #include <acpi/acpi.h> | ||
36 | |||
37 | #ifdef CONFIG_ACPI | ||
37 | 38 | ||
38 | #include <linux/list.h> | 39 | #include <linux/list.h> |
39 | #include <linux/mod_devicetable.h> | 40 | #include <linux/mod_devicetable.h> |
40 | #include <linux/dynamic_debug.h> | 41 | #include <linux/dynamic_debug.h> |
41 | 42 | ||
42 | #include <acpi/acpi.h> | ||
43 | #include <acpi/acpi_bus.h> | 43 | #include <acpi/acpi_bus.h> |
44 | #include <acpi/acpi_drivers.h> | 44 | #include <acpi/acpi_drivers.h> |
45 | #include <acpi/acpi_numa.h> | 45 | #include <acpi/acpi_numa.h> |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 5a645769f020..d2633ee099d9 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -186,6 +186,15 @@ static inline void *bio_data(struct bio *bio) | |||
186 | #define BIOVEC_SEG_BOUNDARY(q, b1, b2) \ | 186 | #define BIOVEC_SEG_BOUNDARY(q, b1, b2) \ |
187 | __BIO_SEG_BOUNDARY(bvec_to_phys((b1)), bvec_to_phys((b2)) + (b2)->bv_len, queue_segment_boundary((q))) | 187 | __BIO_SEG_BOUNDARY(bvec_to_phys((b1)), bvec_to_phys((b2)) + (b2)->bv_len, queue_segment_boundary((q))) |
188 | 188 | ||
189 | /* | ||
190 | * Check if adding a bio_vec after bprv with offset would create a gap in | ||
191 | * the SG list. Most drivers don't care about this, but some do. | ||
192 | */ | ||
193 | static inline bool bvec_gap_to_prev(struct bio_vec *bprv, unsigned int offset) | ||
194 | { | ||
195 | return offset || ((bprv->bv_offset + bprv->bv_len) & (PAGE_SIZE - 1)); | ||
196 | } | ||
197 | |||
189 | #define bio_io_error(bio) bio_endio((bio), -EIO) | 198 | #define bio_io_error(bio) bio_endio((bio), -EIO) |
190 | 199 | ||
191 | /* | 200 | /* |
@@ -644,10 +653,6 @@ struct biovec_slab { | |||
644 | 653 | ||
645 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | 654 | #if defined(CONFIG_BLK_DEV_INTEGRITY) |
646 | 655 | ||
647 | |||
648 | |||
649 | #define bip_vec_idx(bip, idx) (&(bip->bip_vec[(idx)])) | ||
650 | |||
651 | #define bip_for_each_vec(bvl, bip, iter) \ | 656 | #define bip_for_each_vec(bvl, bip, iter) \ |
652 | for_each_bvec(bvl, (bip)->bip_vec, iter, (bip)->bip_iter) | 657 | for_each_bvec(bvl, (bip)->bip_vec, iter, (bip)->bip_iter) |
653 | 658 | ||
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index a002cf191427..eb726b9c5762 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h | |||
@@ -42,7 +42,7 @@ struct blk_mq_hw_ctx { | |||
42 | unsigned int nr_ctx; | 42 | unsigned int nr_ctx; |
43 | struct blk_mq_ctx **ctxs; | 43 | struct blk_mq_ctx **ctxs; |
44 | 44 | ||
45 | unsigned int wait_index; | 45 | atomic_t wait_index; |
46 | 46 | ||
47 | struct blk_mq_tags *tags; | 47 | struct blk_mq_tags *tags; |
48 | 48 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 31e11051f1ba..8699bcf5f099 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -512,6 +512,7 @@ struct request_queue { | |||
512 | #define QUEUE_FLAG_DEAD 19 /* queue tear-down finished */ | 512 | #define QUEUE_FLAG_DEAD 19 /* queue tear-down finished */ |
513 | #define QUEUE_FLAG_INIT_DONE 20 /* queue is initialized */ | 513 | #define QUEUE_FLAG_INIT_DONE 20 /* queue is initialized */ |
514 | #define QUEUE_FLAG_NO_SG_MERGE 21 /* don't attempt to merge SG segments*/ | 514 | #define QUEUE_FLAG_NO_SG_MERGE 21 /* don't attempt to merge SG segments*/ |
515 | #define QUEUE_FLAG_SG_GAPS 22 /* queue doesn't support SG gaps */ | ||
515 | 516 | ||
516 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | 517 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ |
517 | (1 << QUEUE_FLAG_STACKABLE) | \ | 518 | (1 << QUEUE_FLAG_STACKABLE) | \ |
@@ -920,7 +921,7 @@ static inline unsigned int blk_max_size_offset(struct request_queue *q, | |||
920 | sector_t offset) | 921 | sector_t offset) |
921 | { | 922 | { |
922 | if (!q->limits.chunk_sectors) | 923 | if (!q->limits.chunk_sectors) |
923 | return q->limits.max_hw_sectors; | 924 | return q->limits.max_sectors; |
924 | 925 | ||
925 | return q->limits.chunk_sectors - | 926 | return q->limits.chunk_sectors - |
926 | (offset & (q->limits.chunk_sectors - 1)); | 927 | (offset & (q->limits.chunk_sectors - 1)); |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index ec4112d257bc..7d1955afa62c 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -176,6 +176,7 @@ static inline void disable_cpufreq(void) { } | |||
176 | 176 | ||
177 | #define CPUFREQ_RELATION_L 0 /* lowest frequency at or above target */ | 177 | #define CPUFREQ_RELATION_L 0 /* lowest frequency at or above target */ |
178 | #define CPUFREQ_RELATION_H 1 /* highest frequency below or at target */ | 178 | #define CPUFREQ_RELATION_H 1 /* highest frequency below or at target */ |
179 | #define CPUFREQ_RELATION_C 2 /* closest frequency to target */ | ||
179 | 180 | ||
180 | struct freq_attr { | 181 | struct freq_attr { |
181 | struct attribute attr; | 182 | struct attribute attr; |
@@ -482,8 +483,8 @@ extern struct cpufreq_governor cpufreq_gov_conservative; | |||
482 | *********************************************************************/ | 483 | *********************************************************************/ |
483 | 484 | ||
484 | /* Special Values of .frequency field */ | 485 | /* Special Values of .frequency field */ |
485 | #define CPUFREQ_ENTRY_INVALID ~0 | 486 | #define CPUFREQ_ENTRY_INVALID ~0u |
486 | #define CPUFREQ_TABLE_END ~1 | 487 | #define CPUFREQ_TABLE_END ~1u |
487 | /* Special Values of .flags field */ | 488 | /* Special Values of .flags field */ |
488 | #define CPUFREQ_BOOST_FREQ (1 << 0) | 489 | #define CPUFREQ_BOOST_FREQ (1 << 0) |
489 | 490 | ||
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 4ff262e2bf37..45a91474487d 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -133,7 +133,6 @@ extern struct request *elv_latter_request(struct request_queue *, struct request | |||
133 | extern int elv_register_queue(struct request_queue *q); | 133 | extern int elv_register_queue(struct request_queue *q); |
134 | extern void elv_unregister_queue(struct request_queue *q); | 134 | extern void elv_unregister_queue(struct request_queue *q); |
135 | extern int elv_may_queue(struct request_queue *, int); | 135 | extern int elv_may_queue(struct request_queue *, int); |
136 | extern void elv_abort_queue(struct request_queue *); | ||
137 | extern void elv_completed_request(struct request_queue *, struct request *); | 136 | extern void elv_completed_request(struct request_queue *, struct request *); |
138 | extern int elv_set_request(struct request_queue *q, struct request *rq, | 137 | extern int elv_set_request(struct request_queue *q, struct request *rq, |
139 | struct bio *bio, gfp_t gfp_mask); | 138 | struct bio *bio, gfp_t gfp_mask); |
@@ -144,7 +143,7 @@ extern void elv_drain_elevator(struct request_queue *); | |||
144 | * io scheduler registration | 143 | * io scheduler registration |
145 | */ | 144 | */ |
146 | extern void __init load_default_elevator_module(void); | 145 | extern void __init load_default_elevator_module(void); |
147 | extern int __init elv_register(struct elevator_type *); | 146 | extern int elv_register(struct elevator_type *); |
148 | extern void elv_unregister(struct elevator_type *); | 147 | extern void elv_unregister(struct elevator_type *); |
149 | 148 | ||
150 | /* | 149 | /* |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 338e6f758c6d..e11d60cc867b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1921,6 +1921,12 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
1921 | 1921 | ||
1922 | static inline int break_deleg(struct inode *inode, unsigned int mode) | 1922 | static inline int break_deleg(struct inode *inode, unsigned int mode) |
1923 | { | 1923 | { |
1924 | /* | ||
1925 | * Since this check is lockless, we must ensure that any refcounts | ||
1926 | * taken are done before checking inode->i_flock. Otherwise, we could | ||
1927 | * end up racing with tasks trying to set a new lease on this file. | ||
1928 | */ | ||
1929 | smp_mb(); | ||
1924 | if (inode->i_flock) | 1930 | if (inode->i_flock) |
1925 | return __break_lease(inode, mode, FL_DELEG); | 1931 | return __break_lease(inode, mode, FL_DELEG); |
1926 | return 0; | 1932 | return 0; |
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index 17aa1cce6f8e..30faf797c2c3 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h | |||
@@ -91,6 +91,7 @@ struct kernfs_elem_attr { | |||
91 | const struct kernfs_ops *ops; | 91 | const struct kernfs_ops *ops; |
92 | struct kernfs_open_node *open; | 92 | struct kernfs_open_node *open; |
93 | loff_t size; | 93 | loff_t size; |
94 | struct kernfs_node *notify_next; /* for kernfs_notify() */ | ||
94 | }; | 95 | }; |
95 | 96 | ||
96 | /* | 97 | /* |
@@ -304,6 +305,7 @@ struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, | |||
304 | struct kernfs_root *root, unsigned long magic, | 305 | struct kernfs_root *root, unsigned long magic, |
305 | bool *new_sb_created, const void *ns); | 306 | bool *new_sb_created, const void *ns); |
306 | void kernfs_kill_sb(struct super_block *sb); | 307 | void kernfs_kill_sb(struct super_block *sb); |
308 | struct super_block *kernfs_pin_sb(struct kernfs_root *root, const void *ns); | ||
307 | 309 | ||
308 | void kernfs_init(void); | 310 | void kernfs_init(void); |
309 | 311 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index 5ab4e3a76721..92abb497ab14 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -593,6 +593,7 @@ struct ata_host { | |||
593 | struct device *dev; | 593 | struct device *dev; |
594 | void __iomem * const *iomap; | 594 | void __iomem * const *iomap; |
595 | unsigned int n_ports; | 595 | unsigned int n_ports; |
596 | unsigned int n_tags; /* nr of NCQ tags */ | ||
596 | void *private_data; | 597 | void *private_data; |
597 | struct ata_port_operations *ops; | 598 | struct ata_port_operations *ops; |
598 | unsigned long flags; | 599 | unsigned long flags; |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index b12f4bbd064c..35b51e7af886 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -578,8 +578,6 @@ struct mlx4_cq { | |||
578 | u32 cons_index; | 578 | u32 cons_index; |
579 | 579 | ||
580 | u16 irq; | 580 | u16 irq; |
581 | bool irq_affinity_change; | ||
582 | |||
583 | __be32 *set_ci_db; | 581 | __be32 *set_ci_db; |
584 | __be32 *arm_db; | 582 | __be32 *arm_db; |
585 | int arm_sn; | 583 | int arm_sn; |
@@ -1167,6 +1165,8 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char *name, struct cpu_rmap *rmap, | |||
1167 | int *vector); | 1165 | int *vector); |
1168 | void mlx4_release_eq(struct mlx4_dev *dev, int vec); | 1166 | void mlx4_release_eq(struct mlx4_dev *dev, int vec); |
1169 | 1167 | ||
1168 | int mlx4_eq_get_irq(struct mlx4_dev *dev, int vec); | ||
1169 | |||
1170 | int mlx4_get_phys_port_id(struct mlx4_dev *dev); | 1170 | int mlx4_get_phys_port_id(struct mlx4_dev *dev); |
1171 | int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port); | 1171 | int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port); |
1172 | int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port); | 1172 | int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port); |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 11692dea18aa..42aa9b9ecd5f 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/lockdep.h> | 17 | #include <linux/lockdep.h> |
18 | #include <linux/atomic.h> | 18 | #include <linux/atomic.h> |
19 | #include <asm/processor.h> | 19 | #include <asm/processor.h> |
20 | #include <linux/osq_lock.h> | ||
20 | 21 | ||
21 | /* | 22 | /* |
22 | * Simple, straightforward mutexes with strict semantics: | 23 | * Simple, straightforward mutexes with strict semantics: |
@@ -46,7 +47,6 @@ | |||
46 | * - detects multi-task circular deadlocks and prints out all affected | 47 | * - detects multi-task circular deadlocks and prints out all affected |
47 | * locks and tasks (and only those tasks) | 48 | * locks and tasks (and only those tasks) |
48 | */ | 49 | */ |
49 | struct optimistic_spin_queue; | ||
50 | struct mutex { | 50 | struct mutex { |
51 | /* 1: unlocked, 0: locked, negative: locked, possible waiters */ | 51 | /* 1: unlocked, 0: locked, negative: locked, possible waiters */ |
52 | atomic_t count; | 52 | atomic_t count; |
@@ -56,7 +56,7 @@ struct mutex { | |||
56 | struct task_struct *owner; | 56 | struct task_struct *owner; |
57 | #endif | 57 | #endif |
58 | #ifdef CONFIG_MUTEX_SPIN_ON_OWNER | 58 | #ifdef CONFIG_MUTEX_SPIN_ON_OWNER |
59 | struct optimistic_spin_queue *osq; /* Spinner MCS lock */ | 59 | struct optimistic_spin_queue osq; /* Spinner MCS lock */ |
60 | #endif | 60 | #endif |
61 | #ifdef CONFIG_DEBUG_MUTEXES | 61 | #ifdef CONFIG_DEBUG_MUTEXES |
62 | const char *name; | 62 | const char *name; |
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index 6a45fb583ff1..447775ee2c4b 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h | |||
@@ -32,15 +32,24 @@ static inline void touch_nmi_watchdog(void) | |||
32 | #ifdef arch_trigger_all_cpu_backtrace | 32 | #ifdef arch_trigger_all_cpu_backtrace |
33 | static inline bool trigger_all_cpu_backtrace(void) | 33 | static inline bool trigger_all_cpu_backtrace(void) |
34 | { | 34 | { |
35 | arch_trigger_all_cpu_backtrace(); | 35 | arch_trigger_all_cpu_backtrace(true); |
36 | 36 | ||
37 | return true; | 37 | return true; |
38 | } | 38 | } |
39 | static inline bool trigger_allbutself_cpu_backtrace(void) | ||
40 | { | ||
41 | arch_trigger_all_cpu_backtrace(false); | ||
42 | return true; | ||
43 | } | ||
39 | #else | 44 | #else |
40 | static inline bool trigger_all_cpu_backtrace(void) | 45 | static inline bool trigger_all_cpu_backtrace(void) |
41 | { | 46 | { |
42 | return false; | 47 | return false; |
43 | } | 48 | } |
49 | static inline bool trigger_allbutself_cpu_backtrace(void) | ||
50 | { | ||
51 | return false; | ||
52 | } | ||
44 | #endif | 53 | #endif |
45 | 54 | ||
46 | #ifdef CONFIG_LOCKUP_DETECTOR | 55 | #ifdef CONFIG_LOCKUP_DETECTOR |
@@ -48,6 +57,7 @@ int hw_nmi_is_cpu_stuck(struct pt_regs *); | |||
48 | u64 hw_nmi_get_sample_period(int watchdog_thresh); | 57 | u64 hw_nmi_get_sample_period(int watchdog_thresh); |
49 | extern int watchdog_user_enabled; | 58 | extern int watchdog_user_enabled; |
50 | extern int watchdog_thresh; | 59 | extern int watchdog_thresh; |
60 | extern int sysctl_softlockup_all_cpu_backtrace; | ||
51 | struct ctl_table; | 61 | struct ctl_table; |
52 | extern int proc_dowatchdog(struct ctl_table *, int , | 62 | extern int proc_dowatchdog(struct ctl_table *, int , |
53 | void __user *, size_t *, loff_t *); | 63 | void __user *, size_t *, loff_t *); |
diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h index a70c9493d55a..d449018d0726 100644 --- a/include/linux/of_mdio.h +++ b/include/linux/of_mdio.h | |||
@@ -25,9 +25,6 @@ struct phy_device *of_phy_attach(struct net_device *dev, | |||
25 | 25 | ||
26 | extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); | 26 | extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); |
27 | 27 | ||
28 | extern void of_mdiobus_link_phydev(struct mii_bus *mdio, | ||
29 | struct phy_device *phydev); | ||
30 | |||
31 | #else /* CONFIG_OF */ | 28 | #else /* CONFIG_OF */ |
32 | static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) | 29 | static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) |
33 | { | 30 | { |
@@ -63,11 +60,6 @@ static inline struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np) | |||
63 | { | 60 | { |
64 | return NULL; | 61 | return NULL; |
65 | } | 62 | } |
66 | |||
67 | static inline void of_mdiobus_link_phydev(struct mii_bus *mdio, | ||
68 | struct phy_device *phydev) | ||
69 | { | ||
70 | } | ||
71 | #endif /* CONFIG_OF */ | 63 | #endif /* CONFIG_OF */ |
72 | 64 | ||
73 | #if defined(CONFIG_OF) && defined(CONFIG_FIXED_PHY) | 65 | #if defined(CONFIG_OF) && defined(CONFIG_FIXED_PHY) |
diff --git a/include/linux/osq_lock.h b/include/linux/osq_lock.h new file mode 100644 index 000000000000..90230d5811c5 --- /dev/null +++ b/include/linux/osq_lock.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef __LINUX_OSQ_LOCK_H | ||
2 | #define __LINUX_OSQ_LOCK_H | ||
3 | |||
4 | /* | ||
5 | * An MCS like lock especially tailored for optimistic spinning for sleeping | ||
6 | * lock implementations (mutex, rwsem, etc). | ||
7 | */ | ||
8 | |||
9 | #define OSQ_UNLOCKED_VAL (0) | ||
10 | |||
11 | struct optimistic_spin_queue { | ||
12 | /* | ||
13 | * Stores an encoded value of the CPU # of the tail node in the queue. | ||
14 | * If the queue is empty, then it's set to OSQ_UNLOCKED_VAL. | ||
15 | */ | ||
16 | atomic_t tail; | ||
17 | }; | ||
18 | |||
19 | /* Init macro and function. */ | ||
20 | #define OSQ_LOCK_UNLOCKED { ATOMIC_INIT(OSQ_UNLOCKED_VAL) } | ||
21 | |||
22 | static inline void osq_lock_init(struct optimistic_spin_queue *lock) | ||
23 | { | ||
24 | atomic_set(&lock->tail, OSQ_UNLOCKED_VAL); | ||
25 | } | ||
26 | |||
27 | #endif | ||
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 3c545b48aeab..8304959ad336 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -360,6 +360,9 @@ static inline void ClearPageCompound(struct page *page) | |||
360 | ClearPageHead(page); | 360 | ClearPageHead(page); |
361 | } | 361 | } |
362 | #endif | 362 | #endif |
363 | |||
364 | #define PG_head_mask ((1L << PG_head)) | ||
365 | |||
363 | #else | 366 | #else |
364 | /* | 367 | /* |
365 | * Reduce page flag use as much as possible by overlapping | 368 | * Reduce page flag use as much as possible by overlapping |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 0a97b583ee8d..e1474ae18c88 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -399,6 +399,18 @@ static inline struct page *read_mapping_page(struct address_space *mapping, | |||
399 | } | 399 | } |
400 | 400 | ||
401 | /* | 401 | /* |
402 | * Get the offset in PAGE_SIZE. | ||
403 | * (TODO: hugepage should have ->index in PAGE_SIZE) | ||
404 | */ | ||
405 | static inline pgoff_t page_to_pgoff(struct page *page) | ||
406 | { | ||
407 | if (unlikely(PageHeadHuge(page))) | ||
408 | return page->index << compound_order(page); | ||
409 | else | ||
410 | return page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); | ||
411 | } | ||
412 | |||
413 | /* | ||
402 | * Return byte-offset into filesystem object for page. | 414 | * Return byte-offset into filesystem object for page. |
403 | */ | 415 | */ |
404 | static inline loff_t page_offset(struct page *page) | 416 | static inline loff_t page_offset(struct page *page) |
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 637a608ded0b..64dacb7288a6 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
@@ -11,12 +11,17 @@ | |||
11 | #include <linux/acpi.h> | 11 | #include <linux/acpi.h> |
12 | 12 | ||
13 | #ifdef CONFIG_ACPI | 13 | #ifdef CONFIG_ACPI |
14 | extern acpi_status pci_acpi_add_bus_pm_notifier(struct acpi_device *dev, | 14 | extern acpi_status pci_acpi_add_bus_pm_notifier(struct acpi_device *dev); |
15 | struct pci_bus *pci_bus); | 15 | static inline acpi_status pci_acpi_remove_bus_pm_notifier(struct acpi_device *dev) |
16 | extern acpi_status pci_acpi_remove_bus_pm_notifier(struct acpi_device *dev); | 16 | { |
17 | return acpi_remove_pm_notifier(dev); | ||
18 | } | ||
17 | extern acpi_status pci_acpi_add_pm_notifier(struct acpi_device *dev, | 19 | extern acpi_status pci_acpi_add_pm_notifier(struct acpi_device *dev, |
18 | struct pci_dev *pci_dev); | 20 | struct pci_dev *pci_dev); |
19 | extern acpi_status pci_acpi_remove_pm_notifier(struct acpi_device *dev); | 21 | static inline acpi_status pci_acpi_remove_pm_notifier(struct acpi_device *dev) |
22 | { | ||
23 | return acpi_remove_pm_notifier(dev); | ||
24 | } | ||
20 | extern phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle); | 25 | extern phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle); |
21 | 26 | ||
22 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | 27 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) |
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index a5fc7d01aad6..dec01d6c3f80 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h | |||
@@ -146,10 +146,10 @@ | |||
146 | * Declaration/definition used for per-CPU variables that must be read mostly. | 146 | * Declaration/definition used for per-CPU variables that must be read mostly. |
147 | */ | 147 | */ |
148 | #define DECLARE_PER_CPU_READ_MOSTLY(type, name) \ | 148 | #define DECLARE_PER_CPU_READ_MOSTLY(type, name) \ |
149 | DECLARE_PER_CPU_SECTION(type, name, "..readmostly") | 149 | DECLARE_PER_CPU_SECTION(type, name, "..read_mostly") |
150 | 150 | ||
151 | #define DEFINE_PER_CPU_READ_MOSTLY(type, name) \ | 151 | #define DEFINE_PER_CPU_READ_MOSTLY(type, name) \ |
152 | DEFINE_PER_CPU_SECTION(type, name, "..readmostly") | 152 | DEFINE_PER_CPU_SECTION(type, name, "..read_mostly") |
153 | 153 | ||
154 | /* | 154 | /* |
155 | * Intermodule exports for per-CPU variables. sparse forgets about | 155 | * Intermodule exports for per-CPU variables. sparse forgets about |
diff --git a/include/linux/phy.h b/include/linux/phy.h index 864ddafad8cc..68041446c450 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -536,6 +536,15 @@ struct phy_driver { | |||
536 | /* See set_wol, but for checking whether Wake on LAN is enabled. */ | 536 | /* See set_wol, but for checking whether Wake on LAN is enabled. */ |
537 | void (*get_wol)(struct phy_device *dev, struct ethtool_wolinfo *wol); | 537 | void (*get_wol)(struct phy_device *dev, struct ethtool_wolinfo *wol); |
538 | 538 | ||
539 | /* | ||
540 | * Called to inform a PHY device driver when the core is about to | ||
541 | * change the link state. This callback is supposed to be used as | ||
542 | * fixup hook for drivers that need to take action when the link | ||
543 | * state changes. Drivers are by no means allowed to mess with the | ||
544 | * PHY device structure in their implementations. | ||
545 | */ | ||
546 | void (*link_change_notify)(struct phy_device *dev); | ||
547 | |||
539 | struct device_driver driver; | 548 | struct device_driver driver; |
540 | }; | 549 | }; |
541 | #define to_phy_driver(d) container_of(d, struct phy_driver, driver) | 550 | #define to_phy_driver(d) container_of(d, struct phy_driver, driver) |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 43fd6716f662..367f49b9a1c9 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
@@ -24,11 +24,20 @@ | |||
24 | #define RPM_AUTO 0x08 /* Use autosuspend_delay */ | 24 | #define RPM_AUTO 0x08 /* Use autosuspend_delay */ |
25 | 25 | ||
26 | #ifdef CONFIG_PM | 26 | #ifdef CONFIG_PM |
27 | extern struct workqueue_struct *pm_wq; | ||
28 | |||
29 | static inline bool queue_pm_work(struct work_struct *work) | ||
30 | { | ||
31 | return queue_work(pm_wq, work); | ||
32 | } | ||
33 | |||
27 | extern int pm_generic_runtime_suspend(struct device *dev); | 34 | extern int pm_generic_runtime_suspend(struct device *dev); |
28 | extern int pm_generic_runtime_resume(struct device *dev); | 35 | extern int pm_generic_runtime_resume(struct device *dev); |
29 | extern int pm_runtime_force_suspend(struct device *dev); | 36 | extern int pm_runtime_force_suspend(struct device *dev); |
30 | extern int pm_runtime_force_resume(struct device *dev); | 37 | extern int pm_runtime_force_resume(struct device *dev); |
31 | #else | 38 | #else |
39 | static inline bool queue_pm_work(struct work_struct *work) { return false; } | ||
40 | |||
32 | static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } | 41 | static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } |
33 | static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } | 42 | static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } |
34 | static inline int pm_runtime_force_suspend(struct device *dev) { return 0; } | 43 | static inline int pm_runtime_force_suspend(struct device *dev) { return 0; } |
@@ -37,8 +46,6 @@ static inline int pm_runtime_force_resume(struct device *dev) { return 0; } | |||
37 | 46 | ||
38 | #ifdef CONFIG_PM_RUNTIME | 47 | #ifdef CONFIG_PM_RUNTIME |
39 | 48 | ||
40 | extern struct workqueue_struct *pm_wq; | ||
41 | |||
42 | extern int __pm_runtime_idle(struct device *dev, int rpmflags); | 49 | extern int __pm_runtime_idle(struct device *dev, int rpmflags); |
43 | extern int __pm_runtime_suspend(struct device *dev, int rpmflags); | 50 | extern int __pm_runtime_suspend(struct device *dev, int rpmflags); |
44 | extern int __pm_runtime_resume(struct device *dev, int rpmflags); | 51 | extern int __pm_runtime_resume(struct device *dev, int rpmflags); |
diff --git a/include/linux/profile.h b/include/linux/profile.h index aaad3861beb8..b537a25ffa17 100644 --- a/include/linux/profile.h +++ b/include/linux/profile.h | |||
@@ -44,6 +44,7 @@ extern int prof_on __read_mostly; | |||
44 | int profile_init(void); | 44 | int profile_init(void); |
45 | int profile_setup(char *str); | 45 | int profile_setup(char *str); |
46 | void profile_tick(int type); | 46 | void profile_tick(int type); |
47 | int setup_profiling_timer(unsigned int multiplier); | ||
47 | 48 | ||
48 | /* | 49 | /* |
49 | * Add multiple profiler hits to a given address: | 50 | * Add multiple profiler hits to a given address: |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 077904c8b70d..cc79eff4a1ad 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -334,6 +334,9 @@ static inline void user_single_step_siginfo(struct task_struct *tsk, | |||
334 | * calling arch_ptrace_stop() when it would be superfluous. For example, | 334 | * calling arch_ptrace_stop() when it would be superfluous. For example, |
335 | * if the thread has not been back to user mode since the last stop, the | 335 | * if the thread has not been back to user mode since the last stop, the |
336 | * thread state might indicate that nothing needs to be done. | 336 | * thread state might indicate that nothing needs to be done. |
337 | * | ||
338 | * This is guaranteed to be invoked once before a task stops for ptrace and | ||
339 | * may include arch-specific operations necessary prior to a ptrace stop. | ||
337 | */ | 340 | */ |
338 | #define arch_ptrace_stop_needed(code, info) (0) | 341 | #define arch_ptrace_stop_needed(code, info) (0) |
339 | #endif | 342 | #endif |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 5a75d19aa661..6a94cc8b1ca0 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <linux/debugobjects.h> | 44 | #include <linux/debugobjects.h> |
45 | #include <linux/bug.h> | 45 | #include <linux/bug.h> |
46 | #include <linux/compiler.h> | 46 | #include <linux/compiler.h> |
47 | #include <linux/percpu.h> | ||
48 | #include <asm/barrier.h> | 47 | #include <asm/barrier.h> |
49 | 48 | ||
50 | extern int rcu_expedited; /* for sysctl */ | 49 | extern int rcu_expedited; /* for sysctl */ |
@@ -300,41 +299,6 @@ bool __rcu_is_watching(void); | |||
300 | #endif /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) */ | 299 | #endif /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) */ |
301 | 300 | ||
302 | /* | 301 | /* |
303 | * Hooks for cond_resched() and friends to avoid RCU CPU stall warnings. | ||
304 | */ | ||
305 | |||
306 | #define RCU_COND_RESCHED_LIM 256 /* ms vs. 100s of ms. */ | ||
307 | DECLARE_PER_CPU(int, rcu_cond_resched_count); | ||
308 | void rcu_resched(void); | ||
309 | |||
310 | /* | ||
311 | * Is it time to report RCU quiescent states? | ||
312 | * | ||
313 | * Note unsynchronized access to rcu_cond_resched_count. Yes, we might | ||
314 | * increment some random CPU's count, and possibly also load the result from | ||
315 | * yet another CPU's count. We might even clobber some other CPU's attempt | ||
316 | * to zero its counter. This is all OK because the goal is not precision, | ||
317 | * but rather reasonable amortization of rcu_note_context_switch() overhead | ||
318 | * and extremely high probability of avoiding RCU CPU stall warnings. | ||
319 | * Note that this function has to be preempted in just the wrong place, | ||
320 | * many thousands of times in a row, for anything bad to happen. | ||
321 | */ | ||
322 | static inline bool rcu_should_resched(void) | ||
323 | { | ||
324 | return raw_cpu_inc_return(rcu_cond_resched_count) >= | ||
325 | RCU_COND_RESCHED_LIM; | ||
326 | } | ||
327 | |||
328 | /* | ||
329 | * Report quiscent states to RCU if it is time to do so. | ||
330 | */ | ||
331 | static inline void rcu_cond_resched(void) | ||
332 | { | ||
333 | if (unlikely(rcu_should_resched())) | ||
334 | rcu_resched(); | ||
335 | } | ||
336 | |||
337 | /* | ||
338 | * Infrastructure to implement the synchronize_() primitives in | 302 | * Infrastructure to implement the synchronize_() primitives in |
339 | * TREE_RCU and rcu_barrier_() primitives in TINY_RCU. | 303 | * TREE_RCU and rcu_barrier_() primitives in TINY_RCU. |
340 | */ | 304 | */ |
@@ -358,9 +322,19 @@ void wait_rcu_gp(call_rcu_func_t crf); | |||
358 | * initialization. | 322 | * initialization. |
359 | */ | 323 | */ |
360 | #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD | 324 | #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD |
325 | void init_rcu_head(struct rcu_head *head); | ||
326 | void destroy_rcu_head(struct rcu_head *head); | ||
361 | void init_rcu_head_on_stack(struct rcu_head *head); | 327 | void init_rcu_head_on_stack(struct rcu_head *head); |
362 | void destroy_rcu_head_on_stack(struct rcu_head *head); | 328 | void destroy_rcu_head_on_stack(struct rcu_head *head); |
363 | #else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ | 329 | #else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ |
330 | static inline void init_rcu_head(struct rcu_head *head) | ||
331 | { | ||
332 | } | ||
333 | |||
334 | static inline void destroy_rcu_head(struct rcu_head *head) | ||
335 | { | ||
336 | } | ||
337 | |||
364 | static inline void init_rcu_head_on_stack(struct rcu_head *head) | 338 | static inline void init_rcu_head_on_stack(struct rcu_head *head) |
365 | { | 339 | { |
366 | } | 340 | } |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index a2d9d81038d1..14ec18d5e18b 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -395,6 +395,11 @@ static inline void regulator_bulk_free(int num_consumers, | |||
395 | { | 395 | { |
396 | } | 396 | } |
397 | 397 | ||
398 | static inline int regulator_can_change_voltage(struct regulator *regulator) | ||
399 | { | ||
400 | return 0; | ||
401 | } | ||
402 | |||
398 | static inline int regulator_set_voltage(struct regulator *regulator, | 403 | static inline int regulator_set_voltage(struct regulator *regulator, |
399 | int min_uV, int max_uV) | 404 | int min_uV, int max_uV) |
400 | { | 405 | { |
diff --git a/include/linux/rwsem-spinlock.h b/include/linux/rwsem-spinlock.h index d5b13bc07a0b..561e8615528d 100644 --- a/include/linux/rwsem-spinlock.h +++ b/include/linux/rwsem-spinlock.h | |||
@@ -15,13 +15,13 @@ | |||
15 | #ifdef __KERNEL__ | 15 | #ifdef __KERNEL__ |
16 | /* | 16 | /* |
17 | * the rw-semaphore definition | 17 | * the rw-semaphore definition |
18 | * - if activity is 0 then there are no active readers or writers | 18 | * - if count is 0 then there are no active readers or writers |
19 | * - if activity is +ve then that is the number of active readers | 19 | * - if count is +ve then that is the number of active readers |
20 | * - if activity is -1 then there is one active writer | 20 | * - if count is -1 then there is one active writer |
21 | * - if wait_list is not empty, then there are processes waiting for the semaphore | 21 | * - if wait_list is not empty, then there are processes waiting for the semaphore |
22 | */ | 22 | */ |
23 | struct rw_semaphore { | 23 | struct rw_semaphore { |
24 | __s32 activity; | 24 | __s32 count; |
25 | raw_spinlock_t wait_lock; | 25 | raw_spinlock_t wait_lock; |
26 | struct list_head wait_list; | 26 | struct list_head wait_list; |
27 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 27 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index 8d79708146aa..035d3c57fc8a 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h | |||
@@ -13,10 +13,11 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/list.h> | 14 | #include <linux/list.h> |
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | |||
17 | #include <linux/atomic.h> | 16 | #include <linux/atomic.h> |
17 | #ifdef CONFIG_RWSEM_SPIN_ON_OWNER | ||
18 | #include <linux/osq_lock.h> | ||
19 | #endif | ||
18 | 20 | ||
19 | struct optimistic_spin_queue; | ||
20 | struct rw_semaphore; | 21 | struct rw_semaphore; |
21 | 22 | ||
22 | #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK | 23 | #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK |
@@ -25,15 +26,15 @@ struct rw_semaphore; | |||
25 | /* All arch specific implementations share the same struct */ | 26 | /* All arch specific implementations share the same struct */ |
26 | struct rw_semaphore { | 27 | struct rw_semaphore { |
27 | long count; | 28 | long count; |
28 | raw_spinlock_t wait_lock; | ||
29 | struct list_head wait_list; | 29 | struct list_head wait_list; |
30 | #ifdef CONFIG_SMP | 30 | raw_spinlock_t wait_lock; |
31 | #ifdef CONFIG_RWSEM_SPIN_ON_OWNER | ||
32 | struct optimistic_spin_queue osq; /* spinner MCS lock */ | ||
31 | /* | 33 | /* |
32 | * Write owner. Used as a speculative check to see | 34 | * Write owner. Used as a speculative check to see |
33 | * if the owner is running on the cpu. | 35 | * if the owner is running on the cpu. |
34 | */ | 36 | */ |
35 | struct task_struct *owner; | 37 | struct task_struct *owner; |
36 | struct optimistic_spin_queue *osq; /* spinner MCS lock */ | ||
37 | #endif | 38 | #endif |
38 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 39 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
39 | struct lockdep_map dep_map; | 40 | struct lockdep_map dep_map; |
@@ -64,22 +65,19 @@ static inline int rwsem_is_locked(struct rw_semaphore *sem) | |||
64 | # define __RWSEM_DEP_MAP_INIT(lockname) | 65 | # define __RWSEM_DEP_MAP_INIT(lockname) |
65 | #endif | 66 | #endif |
66 | 67 | ||
67 | #if defined(CONFIG_SMP) && !defined(CONFIG_RWSEM_GENERIC_SPINLOCK) | 68 | #ifdef CONFIG_RWSEM_SPIN_ON_OWNER |
68 | #define __RWSEM_INITIALIZER(name) \ | 69 | #define __RWSEM_OPT_INIT(lockname) , .osq = OSQ_LOCK_UNLOCKED, .owner = NULL |
69 | { RWSEM_UNLOCKED_VALUE, \ | ||
70 | __RAW_SPIN_LOCK_UNLOCKED(name.wait_lock), \ | ||
71 | LIST_HEAD_INIT((name).wait_list), \ | ||
72 | NULL, /* owner */ \ | ||
73 | NULL /* mcs lock */ \ | ||
74 | __RWSEM_DEP_MAP_INIT(name) } | ||
75 | #else | 70 | #else |
76 | #define __RWSEM_INITIALIZER(name) \ | 71 | #define __RWSEM_OPT_INIT(lockname) |
77 | { RWSEM_UNLOCKED_VALUE, \ | ||
78 | __RAW_SPIN_LOCK_UNLOCKED(name.wait_lock), \ | ||
79 | LIST_HEAD_INIT((name).wait_list) \ | ||
80 | __RWSEM_DEP_MAP_INIT(name) } | ||
81 | #endif | 72 | #endif |
82 | 73 | ||
74 | #define __RWSEM_INITIALIZER(name) \ | ||
75 | { .count = RWSEM_UNLOCKED_VALUE, \ | ||
76 | .wait_list = LIST_HEAD_INIT((name).wait_list), \ | ||
77 | .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(name.wait_lock) \ | ||
78 | __RWSEM_OPT_INIT(name) \ | ||
79 | __RWSEM_DEP_MAP_INIT(name) } | ||
80 | |||
83 | #define DECLARE_RWSEM(name) \ | 81 | #define DECLARE_RWSEM(name) \ |
84 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | 82 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) |
85 | 83 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 306f4f0c987a..0376b054a0d0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -872,21 +872,21 @@ enum cpu_idle_type { | |||
872 | #define SD_NUMA 0x4000 /* cross-node balancing */ | 872 | #define SD_NUMA 0x4000 /* cross-node balancing */ |
873 | 873 | ||
874 | #ifdef CONFIG_SCHED_SMT | 874 | #ifdef CONFIG_SCHED_SMT |
875 | static inline const int cpu_smt_flags(void) | 875 | static inline int cpu_smt_flags(void) |
876 | { | 876 | { |
877 | return SD_SHARE_CPUCAPACITY | SD_SHARE_PKG_RESOURCES; | 877 | return SD_SHARE_CPUCAPACITY | SD_SHARE_PKG_RESOURCES; |
878 | } | 878 | } |
879 | #endif | 879 | #endif |
880 | 880 | ||
881 | #ifdef CONFIG_SCHED_MC | 881 | #ifdef CONFIG_SCHED_MC |
882 | static inline const int cpu_core_flags(void) | 882 | static inline int cpu_core_flags(void) |
883 | { | 883 | { |
884 | return SD_SHARE_PKG_RESOURCES; | 884 | return SD_SHARE_PKG_RESOURCES; |
885 | } | 885 | } |
886 | #endif | 886 | #endif |
887 | 887 | ||
888 | #ifdef CONFIG_NUMA | 888 | #ifdef CONFIG_NUMA |
889 | static inline const int cpu_numa_flags(void) | 889 | static inline int cpu_numa_flags(void) |
890 | { | 890 | { |
891 | return SD_NUMA; | 891 | return SD_NUMA; |
892 | } | 892 | } |
@@ -999,7 +999,7 @@ void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms); | |||
999 | bool cpus_share_cache(int this_cpu, int that_cpu); | 999 | bool cpus_share_cache(int this_cpu, int that_cpu); |
1000 | 1000 | ||
1001 | typedef const struct cpumask *(*sched_domain_mask_f)(int cpu); | 1001 | typedef const struct cpumask *(*sched_domain_mask_f)(int cpu); |
1002 | typedef const int (*sched_domain_flags_f)(void); | 1002 | typedef int (*sched_domain_flags_f)(void); |
1003 | 1003 | ||
1004 | #define SDTL_OVERLAP 0x01 | 1004 | #define SDTL_OVERLAP 0x01 |
1005 | 1005 | ||
diff --git a/include/linux/sfi_acpi.h b/include/linux/sfi_acpi.h index 4723bbfa1c26..a6e555cbe05c 100644 --- a/include/linux/sfi_acpi.h +++ b/include/linux/sfi_acpi.h | |||
@@ -63,8 +63,6 @@ | |||
63 | #include <linux/sfi.h> | 63 | #include <linux/sfi.h> |
64 | 64 | ||
65 | #ifdef CONFIG_SFI | 65 | #ifdef CONFIG_SFI |
66 | #include <acpi/acpi.h> /* FIXME: inclusion should be removed */ | ||
67 | |||
68 | extern int sfi_acpi_table_parse(char *signature, char *oem_id, | 66 | extern int sfi_acpi_table_parse(char *signature, char *oem_id, |
69 | char *oem_table_id, | 67 | char *oem_table_id, |
70 | int (*handler)(struct acpi_table_header *)); | 68 | int (*handler)(struct acpi_table_header *)); |
@@ -78,7 +76,6 @@ static inline int __init acpi_sfi_table_parse(char *signature, | |||
78 | return sfi_acpi_table_parse(signature, NULL, NULL, handler); | 76 | return sfi_acpi_table_parse(signature, NULL, NULL, handler); |
79 | } | 77 | } |
80 | #else /* !CONFIG_SFI */ | 78 | #else /* !CONFIG_SFI */ |
81 | |||
82 | static inline int sfi_acpi_table_parse(char *signature, char *oem_id, | 79 | static inline int sfi_acpi_table_parse(char *signature, char *oem_id, |
83 | char *oem_table_id, | 80 | char *oem_table_id, |
84 | int (*handler)(struct acpi_table_header *)) | 81 | int (*handler)(struct acpi_table_header *)) |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 8e98297f1388..ec538fc287a6 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -305,8 +305,6 @@ struct ucred { | |||
305 | /* IPX options */ | 305 | /* IPX options */ |
306 | #define IPX_TYPE 1 | 306 | #define IPX_TYPE 1 |
307 | 307 | ||
308 | extern int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov, | ||
309 | int offset, int len); | ||
310 | extern int csum_partial_copy_fromiovecend(unsigned char *kdata, | 308 | extern int csum_partial_copy_fromiovecend(unsigned char *kdata, |
311 | struct iovec *iov, | 309 | struct iovec *iov, |
312 | int offset, | 310 | int offset, |
@@ -315,8 +313,6 @@ extern unsigned long iov_pages(const struct iovec *iov, int offset, | |||
315 | unsigned long nr_segs); | 313 | unsigned long nr_segs); |
316 | 314 | ||
317 | extern int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr_storage *address, int mode); | 315 | extern int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr_storage *address, int mode); |
318 | extern int memcpy_toiovecend(const struct iovec *v, unsigned char *kdata, | ||
319 | int offset, int len); | ||
320 | extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr_storage *kaddr); | 316 | extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr_storage *kaddr); |
321 | extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); | 317 | extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); |
322 | 318 | ||
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index f76994b9396c..519064e0c943 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -327,6 +327,7 @@ extern unsigned long get_safe_page(gfp_t gfp_mask); | |||
327 | extern void hibernation_set_ops(const struct platform_hibernation_ops *ops); | 327 | extern void hibernation_set_ops(const struct platform_hibernation_ops *ops); |
328 | extern int hibernate(void); | 328 | extern int hibernate(void); |
329 | extern bool system_entering_hibernation(void); | 329 | extern bool system_entering_hibernation(void); |
330 | extern bool hibernation_available(void); | ||
330 | asmlinkage int swsusp_save(void); | 331 | asmlinkage int swsusp_save(void); |
331 | extern struct pbe *restore_pblist; | 332 | extern struct pbe *restore_pblist; |
332 | #else /* CONFIG_HIBERNATION */ | 333 | #else /* CONFIG_HIBERNATION */ |
@@ -339,6 +340,7 @@ static inline void swsusp_unset_page_free(struct page *p) {} | |||
339 | static inline void hibernation_set_ops(const struct platform_hibernation_ops *ops) {} | 340 | static inline void hibernation_set_ops(const struct platform_hibernation_ops *ops) {} |
340 | static inline int hibernate(void) { return -ENOSYS; } | 341 | static inline int hibernate(void) { return -ENOSYS; } |
341 | static inline bool system_entering_hibernation(void) { return false; } | 342 | static inline bool system_entering_hibernation(void) { return false; } |
343 | static inline bool hibernation_available(void) { return false; } | ||
342 | #endif /* CONFIG_HIBERNATION */ | 344 | #endif /* CONFIG_HIBERNATION */ |
343 | 345 | ||
344 | /* Hibernation and suspend events */ | 346 | /* Hibernation and suspend events */ |
diff --git a/include/linux/uio.h b/include/linux/uio.h index e2231e47cec1..09a7cffc224e 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
@@ -94,8 +94,20 @@ static inline size_t iov_iter_count(struct iov_iter *i) | |||
94 | return i->count; | 94 | return i->count; |
95 | } | 95 | } |
96 | 96 | ||
97 | static inline void iov_iter_truncate(struct iov_iter *i, size_t count) | 97 | /* |
98 | * Cap the iov_iter by given limit; note that the second argument is | ||
99 | * *not* the new size - it's upper limit for such. Passing it a value | ||
100 | * greater than the amount of data in iov_iter is fine - it'll just do | ||
101 | * nothing in that case. | ||
102 | */ | ||
103 | static inline void iov_iter_truncate(struct iov_iter *i, u64 count) | ||
98 | { | 104 | { |
105 | /* | ||
106 | * count doesn't have to fit in size_t - comparison extends both | ||
107 | * operands to u64 here and any value that would be truncated by | ||
108 | * conversion in assignement is by definition greater than all | ||
109 | * values of size_t, including old i->count. | ||
110 | */ | ||
99 | if (i->count > count) | 111 | if (i->count > count) |
100 | i->count = count; | 112 | i->count = count; |
101 | } | 113 | } |
@@ -111,6 +123,9 @@ static inline void iov_iter_reexpand(struct iov_iter *i, size_t count) | |||
111 | 123 | ||
112 | int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); | 124 | int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); |
113 | int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len); | 125 | int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len); |
114 | 126 | int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov, | |
127 | int offset, int len); | ||
128 | int memcpy_toiovecend(const struct iovec *v, unsigned char *kdata, | ||
129 | int offset, int len); | ||
115 | 130 | ||
116 | #endif | 131 | #endif |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 1a64b26046ed..9b7de1b46437 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -70,7 +70,9 @@ | |||
70 | US_FLAG(NEEDS_CAP16, 0x00400000) \ | 70 | US_FLAG(NEEDS_CAP16, 0x00400000) \ |
71 | /* cannot handle READ_CAPACITY_10 */ \ | 71 | /* cannot handle READ_CAPACITY_10 */ \ |
72 | US_FLAG(IGNORE_UAS, 0x00800000) \ | 72 | US_FLAG(IGNORE_UAS, 0x00800000) \ |
73 | /* Device advertises UAS but it is broken */ | 73 | /* Device advertises UAS but it is broken */ \ |
74 | US_FLAG(BROKEN_FUA, 0x01000000) \ | ||
75 | /* Cannot handle FUA in WRITE or READ CDBs */ \ | ||
74 | 76 | ||
75 | #define US_FLAG(name, value) US_FL_##name = value , | 77 | #define US_FLAG(name, value) US_FL_##name = value , |
76 | enum { US_DO_ALL_FLAGS }; | 78 | enum { US_DO_ALL_FLAGS }; |
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 7277caf3743d..47f425464f84 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -203,7 +203,6 @@ struct neigh_table { | |||
203 | void (*proxy_redo)(struct sk_buff *skb); | 203 | void (*proxy_redo)(struct sk_buff *skb); |
204 | char *id; | 204 | char *id; |
205 | struct neigh_parms parms; | 205 | struct neigh_parms parms; |
206 | /* HACK. gc_* should follow parms without a gap! */ | ||
207 | int gc_interval; | 206 | int gc_interval; |
208 | int gc_thresh1; | 207 | int gc_thresh1; |
209 | int gc_thresh2; | 208 | int gc_thresh2; |
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 7ee6ce6564ae..c4d86198d3d6 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/netfilter/nfnetlink.h> | 6 | #include <linux/netfilter/nfnetlink.h> |
7 | #include <linux/netfilter/x_tables.h> | 7 | #include <linux/netfilter/x_tables.h> |
8 | #include <linux/netfilter/nf_tables.h> | 8 | #include <linux/netfilter/nf_tables.h> |
9 | #include <linux/u64_stats_sync.h> | ||
9 | #include <net/netlink.h> | 10 | #include <net/netlink.h> |
10 | 11 | ||
11 | #define NFT_JUMP_STACK_SIZE 16 | 12 | #define NFT_JUMP_STACK_SIZE 16 |
@@ -503,9 +504,9 @@ enum nft_chain_flags { | |||
503 | * @net: net namespace that this chain belongs to | 504 | * @net: net namespace that this chain belongs to |
504 | * @table: table that this chain belongs to | 505 | * @table: table that this chain belongs to |
505 | * @handle: chain handle | 506 | * @handle: chain handle |
506 | * @flags: bitmask of enum nft_chain_flags | ||
507 | * @use: number of jump references to this chain | 507 | * @use: number of jump references to this chain |
508 | * @level: length of longest path to this chain | 508 | * @level: length of longest path to this chain |
509 | * @flags: bitmask of enum nft_chain_flags | ||
509 | * @name: name of the chain | 510 | * @name: name of the chain |
510 | */ | 511 | */ |
511 | struct nft_chain { | 512 | struct nft_chain { |
@@ -514,9 +515,9 @@ struct nft_chain { | |||
514 | struct net *net; | 515 | struct net *net; |
515 | struct nft_table *table; | 516 | struct nft_table *table; |
516 | u64 handle; | 517 | u64 handle; |
517 | u8 flags; | 518 | u32 use; |
518 | u16 use; | ||
519 | u16 level; | 519 | u16 level; |
520 | u8 flags; | ||
520 | char name[NFT_CHAIN_MAXNAMELEN]; | 521 | char name[NFT_CHAIN_MAXNAMELEN]; |
521 | }; | 522 | }; |
522 | 523 | ||
@@ -528,8 +529,9 @@ enum nft_chain_type { | |||
528 | }; | 529 | }; |
529 | 530 | ||
530 | struct nft_stats { | 531 | struct nft_stats { |
531 | u64 bytes; | 532 | u64 bytes; |
532 | u64 pkts; | 533 | u64 pkts; |
534 | struct u64_stats_sync syncp; | ||
533 | }; | 535 | }; |
534 | 536 | ||
535 | #define NFT_HOOK_OPS_MAX 2 | 537 | #define NFT_HOOK_OPS_MAX 2 |
diff --git a/include/net/netns/ieee802154_6lowpan.h b/include/net/netns/ieee802154_6lowpan.h index 079030c853d8..e2070960bac0 100644 --- a/include/net/netns/ieee802154_6lowpan.h +++ b/include/net/netns/ieee802154_6lowpan.h | |||
@@ -16,7 +16,7 @@ struct netns_sysctl_lowpan { | |||
16 | struct netns_ieee802154_lowpan { | 16 | struct netns_ieee802154_lowpan { |
17 | struct netns_sysctl_lowpan sysctl; | 17 | struct netns_sysctl_lowpan sysctl; |
18 | struct netns_frags frags; | 18 | struct netns_frags frags; |
19 | u16 max_dsize; | 19 | int max_dsize; |
20 | }; | 20 | }; |
21 | 21 | ||
22 | #endif | 22 | #endif |
diff --git a/include/net/netns/nftables.h b/include/net/netns/nftables.h index 26a394cb91a8..eee608b12cc9 100644 --- a/include/net/netns/nftables.h +++ b/include/net/netns/nftables.h | |||
@@ -13,8 +13,8 @@ struct netns_nftables { | |||
13 | struct nft_af_info *inet; | 13 | struct nft_af_info *inet; |
14 | struct nft_af_info *arp; | 14 | struct nft_af_info *arp; |
15 | struct nft_af_info *bridge; | 15 | struct nft_af_info *bridge; |
16 | unsigned int base_seq; | ||
16 | u8 gencursor; | 17 | u8 gencursor; |
17 | u8 genctr; | ||
18 | }; | 18 | }; |
19 | 19 | ||
20 | #endif | 20 | #endif |
diff --git a/include/net/sock.h b/include/net/sock.h index 07b7fcd60d80..156350745700 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1730,8 +1730,8 @@ sk_dst_get(struct sock *sk) | |||
1730 | 1730 | ||
1731 | rcu_read_lock(); | 1731 | rcu_read_lock(); |
1732 | dst = rcu_dereference(sk->sk_dst_cache); | 1732 | dst = rcu_dereference(sk->sk_dst_cache); |
1733 | if (dst) | 1733 | if (dst && !atomic_inc_not_zero(&dst->__refcnt)) |
1734 | dst_hold(dst); | 1734 | dst = NULL; |
1735 | rcu_read_unlock(); | 1735 | rcu_read_unlock(); |
1736 | return dst; | 1736 | return dst; |
1737 | } | 1737 | } |
@@ -1768,9 +1768,11 @@ __sk_dst_set(struct sock *sk, struct dst_entry *dst) | |||
1768 | static inline void | 1768 | static inline void |
1769 | sk_dst_set(struct sock *sk, struct dst_entry *dst) | 1769 | sk_dst_set(struct sock *sk, struct dst_entry *dst) |
1770 | { | 1770 | { |
1771 | spin_lock(&sk->sk_dst_lock); | 1771 | struct dst_entry *old_dst; |
1772 | __sk_dst_set(sk, dst); | 1772 | |
1773 | spin_unlock(&sk->sk_dst_lock); | 1773 | sk_tx_queue_clear(sk); |
1774 | old_dst = xchg((__force struct dst_entry **)&sk->sk_dst_cache, dst); | ||
1775 | dst_release(old_dst); | ||
1774 | } | 1776 | } |
1775 | 1777 | ||
1776 | static inline void | 1778 | static inline void |
@@ -1782,9 +1784,7 @@ __sk_dst_reset(struct sock *sk) | |||
1782 | static inline void | 1784 | static inline void |
1783 | sk_dst_reset(struct sock *sk) | 1785 | sk_dst_reset(struct sock *sk) |
1784 | { | 1786 | { |
1785 | spin_lock(&sk->sk_dst_lock); | 1787 | sk_dst_set(sk, NULL); |
1786 | __sk_dst_reset(sk); | ||
1787 | spin_unlock(&sk->sk_dst_lock); | ||
1788 | } | 1788 | } |
1789 | 1789 | ||
1790 | struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie); | 1790 | struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie); |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 42ed789ebafc..e0ae71098144 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -318,7 +318,7 @@ static inline void set_driver_byte(struct scsi_cmnd *cmd, char status) | |||
318 | 318 | ||
319 | static inline unsigned scsi_transfer_length(struct scsi_cmnd *scmd) | 319 | static inline unsigned scsi_transfer_length(struct scsi_cmnd *scmd) |
320 | { | 320 | { |
321 | unsigned int xfer_len = blk_rq_bytes(scmd->request); | 321 | unsigned int xfer_len = scsi_out(scmd)->length; |
322 | unsigned int prot_op = scsi_get_prot_op(scmd); | 322 | unsigned int prot_op = scsi_get_prot_op(scmd); |
323 | unsigned int sector_size = scmd->device->sector_size; | 323 | unsigned int sector_size = scmd->device->sector_size; |
324 | 324 | ||
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 5853c913d2b0..27ab31017f09 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -173,6 +173,7 @@ struct scsi_device { | |||
173 | unsigned is_visible:1; /* is the device visible in sysfs */ | 173 | unsigned is_visible:1; /* is the device visible in sysfs */ |
174 | unsigned wce_default_on:1; /* Cache is ON by default */ | 174 | unsigned wce_default_on:1; /* Cache is ON by default */ |
175 | unsigned no_dif:1; /* T10 PI (DIF) should be disabled */ | 175 | unsigned no_dif:1; /* T10 PI (DIF) should be disabled */ |
176 | unsigned broken_fua:1; /* Don't set FUA bit */ | ||
176 | 177 | ||
177 | atomic_t disk_events_disable_depth; /* disable depth for disk events */ | 178 | atomic_t disk_events_disable_depth; /* disable depth for disk events */ |
178 | 179 | ||
diff --git a/include/sound/core.h b/include/sound/core.h index eedda2cdfe57..1df3f2fe5350 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -116,6 +116,8 @@ struct snd_card { | |||
116 | int user_ctl_count; /* count of all user controls */ | 116 | int user_ctl_count; /* count of all user controls */ |
117 | struct list_head controls; /* all controls for this card */ | 117 | struct list_head controls; /* all controls for this card */ |
118 | struct list_head ctl_files; /* active control files */ | 118 | struct list_head ctl_files; /* active control files */ |
119 | struct mutex user_ctl_lock; /* protects user controls against | ||
120 | concurrent access */ | ||
119 | 121 | ||
120 | struct snd_info_entry *proc_root; /* root for soundcard specific files */ | 122 | struct snd_info_entry *proc_root; /* root for soundcard specific files */ |
121 | struct snd_info_entry *proc_id; /* the card id */ | 123 | struct snd_info_entry *proc_id; /* the card id */ |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 0fd06fef9fac..26b4f2e13275 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -44,6 +44,12 @@ | |||
44 | #undef __field_ext | 44 | #undef __field_ext |
45 | #define __field_ext(type, item, filter_type) type item; | 45 | #define __field_ext(type, item, filter_type) type item; |
46 | 46 | ||
47 | #undef __field_struct | ||
48 | #define __field_struct(type, item) type item; | ||
49 | |||
50 | #undef __field_struct_ext | ||
51 | #define __field_struct_ext(type, item, filter_type) type item; | ||
52 | |||
47 | #undef __array | 53 | #undef __array |
48 | #define __array(type, item, len) type item[len]; | 54 | #define __array(type, item, len) type item[len]; |
49 | 55 | ||
@@ -122,6 +128,12 @@ | |||
122 | #undef __field_ext | 128 | #undef __field_ext |
123 | #define __field_ext(type, item, filter_type) | 129 | #define __field_ext(type, item, filter_type) |
124 | 130 | ||
131 | #undef __field_struct | ||
132 | #define __field_struct(type, item) | ||
133 | |||
134 | #undef __field_struct_ext | ||
135 | #define __field_struct_ext(type, item, filter_type) | ||
136 | |||
125 | #undef __array | 137 | #undef __array |
126 | #define __array(type, item, len) | 138 | #define __array(type, item, len) |
127 | 139 | ||
@@ -315,9 +327,21 @@ static struct trace_event_functions ftrace_event_type_funcs_##call = { \ | |||
315 | if (ret) \ | 327 | if (ret) \ |
316 | return ret; | 328 | return ret; |
317 | 329 | ||
330 | #undef __field_struct_ext | ||
331 | #define __field_struct_ext(type, item, filter_type) \ | ||
332 | ret = trace_define_field(event_call, #type, #item, \ | ||
333 | offsetof(typeof(field), item), \ | ||
334 | sizeof(field.item), \ | ||
335 | 0, filter_type); \ | ||
336 | if (ret) \ | ||
337 | return ret; | ||
338 | |||
318 | #undef __field | 339 | #undef __field |
319 | #define __field(type, item) __field_ext(type, item, FILTER_OTHER) | 340 | #define __field(type, item) __field_ext(type, item, FILTER_OTHER) |
320 | 341 | ||
342 | #undef __field_struct | ||
343 | #define __field_struct(type, item) __field_struct_ext(type, item, FILTER_OTHER) | ||
344 | |||
321 | #undef __array | 345 | #undef __array |
322 | #define __array(type, item, len) \ | 346 | #define __array(type, item, len) \ |
323 | do { \ | 347 | do { \ |
@@ -379,6 +403,12 @@ ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ | |||
379 | #undef __field_ext | 403 | #undef __field_ext |
380 | #define __field_ext(type, item, filter_type) | 404 | #define __field_ext(type, item, filter_type) |
381 | 405 | ||
406 | #undef __field_struct | ||
407 | #define __field_struct(type, item) | ||
408 | |||
409 | #undef __field_struct_ext | ||
410 | #define __field_struct_ext(type, item, filter_type) | ||
411 | |||
382 | #undef __array | 412 | #undef __array |
383 | #define __array(type, item, len) | 413 | #define __array(type, item, len) |
384 | 414 | ||
@@ -550,6 +580,9 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
550 | #undef __field | 580 | #undef __field |
551 | #define __field(type, item) | 581 | #define __field(type, item) |
552 | 582 | ||
583 | #undef __field_struct | ||
584 | #define __field_struct(type, item) | ||
585 | |||
553 | #undef __array | 586 | #undef __array |
554 | #define __array(type, item, len) | 587 | #define __array(type, item, len) |
555 | 588 | ||
diff --git a/include/trace/syscall.h b/include/trace/syscall.h index fed853f3d7aa..9674145e2f6a 100644 --- a/include/trace/syscall.h +++ b/include/trace/syscall.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/tracepoint.h> | 4 | #include <linux/tracepoint.h> |
5 | #include <linux/unistd.h> | 5 | #include <linux/unistd.h> |
6 | #include <linux/ftrace_event.h> | 6 | #include <linux/ftrace_event.h> |
7 | #include <linux/thread_info.h> | ||
7 | 8 | ||
8 | #include <asm/ptrace.h> | 9 | #include <asm/ptrace.h> |
9 | 10 | ||
@@ -32,4 +33,18 @@ struct syscall_metadata { | |||
32 | struct ftrace_event_call *exit_event; | 33 | struct ftrace_event_call *exit_event; |
33 | }; | 34 | }; |
34 | 35 | ||
36 | #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS) | ||
37 | static inline void syscall_tracepoint_update(struct task_struct *p) | ||
38 | { | ||
39 | if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) | ||
40 | set_tsk_thread_flag(p, TIF_SYSCALL_TRACEPOINT); | ||
41 | else | ||
42 | clear_tsk_thread_flag(p, TIF_SYSCALL_TRACEPOINT); | ||
43 | } | ||
44 | #else | ||
45 | static inline void syscall_tracepoint_update(struct task_struct *p) | ||
46 | { | ||
47 | } | ||
48 | #endif | ||
49 | |||
35 | #endif /* _TRACE_SYSCALL_H */ | 50 | #endif /* _TRACE_SYSCALL_H */ |
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h index 6f9c38ce45c7..2f47824e7a36 100644 --- a/include/uapi/linux/btrfs.h +++ b/include/uapi/linux/btrfs.h | |||
@@ -38,6 +38,7 @@ struct btrfs_ioctl_vol_args { | |||
38 | #define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2) | 38 | #define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2) |
39 | #define BTRFS_FSID_SIZE 16 | 39 | #define BTRFS_FSID_SIZE 16 |
40 | #define BTRFS_UUID_SIZE 16 | 40 | #define BTRFS_UUID_SIZE 16 |
41 | #define BTRFS_UUID_UNPARSED_SIZE 37 | ||
41 | 42 | ||
42 | #define BTRFS_QGROUP_INHERIT_SET_LIMITS (1ULL << 0) | 43 | #define BTRFS_QGROUP_INHERIT_SET_LIMITS (1ULL << 0) |
43 | 44 | ||
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h index 40b5ca8a1b1f..25084a052a1e 100644 --- a/include/uapi/linux/fuse.h +++ b/include/uapi/linux/fuse.h | |||
@@ -101,6 +101,7 @@ | |||
101 | * - add FATTR_CTIME | 101 | * - add FATTR_CTIME |
102 | * - add ctime and ctimensec to fuse_setattr_in | 102 | * - add ctime and ctimensec to fuse_setattr_in |
103 | * - add FUSE_RENAME2 request | 103 | * - add FUSE_RENAME2 request |
104 | * - add FUSE_NO_OPEN_SUPPORT flag | ||
104 | */ | 105 | */ |
105 | 106 | ||
106 | #ifndef _LINUX_FUSE_H | 107 | #ifndef _LINUX_FUSE_H |
@@ -229,6 +230,7 @@ struct fuse_file_lock { | |||
229 | * FUSE_READDIRPLUS_AUTO: adaptive readdirplus | 230 | * FUSE_READDIRPLUS_AUTO: adaptive readdirplus |
230 | * FUSE_ASYNC_DIO: asynchronous direct I/O submission | 231 | * FUSE_ASYNC_DIO: asynchronous direct I/O submission |
231 | * FUSE_WRITEBACK_CACHE: use writeback cache for buffered writes | 232 | * FUSE_WRITEBACK_CACHE: use writeback cache for buffered writes |
233 | * FUSE_NO_OPEN_SUPPORT: kernel supports zero-message opens | ||
232 | */ | 234 | */ |
233 | #define FUSE_ASYNC_READ (1 << 0) | 235 | #define FUSE_ASYNC_READ (1 << 0) |
234 | #define FUSE_POSIX_LOCKS (1 << 1) | 236 | #define FUSE_POSIX_LOCKS (1 << 1) |
@@ -247,6 +249,7 @@ struct fuse_file_lock { | |||
247 | #define FUSE_READDIRPLUS_AUTO (1 << 14) | 249 | #define FUSE_READDIRPLUS_AUTO (1 << 14) |
248 | #define FUSE_ASYNC_DIO (1 << 15) | 250 | #define FUSE_ASYNC_DIO (1 << 15) |
249 | #define FUSE_WRITEBACK_CACHE (1 << 16) | 251 | #define FUSE_WRITEBACK_CACHE (1 << 16) |
252 | #define FUSE_NO_OPEN_SUPPORT (1 << 17) | ||
250 | 253 | ||
251 | /** | 254 | /** |
252 | * CUSE INIT request/reply flags | 255 | * CUSE INIT request/reply flags |
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 5312fae47218..9269de254874 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h | |||
@@ -705,6 +705,7 @@ enum perf_event_type { | |||
705 | * u32 min; | 705 | * u32 min; |
706 | * u64 ino; | 706 | * u64 ino; |
707 | * u64 ino_generation; | 707 | * u64 ino_generation; |
708 | * u32 prot, flags; | ||
708 | * char filename[]; | 709 | * char filename[]; |
709 | * struct sample_id sample_id; | 710 | * struct sample_id sample_id; |
710 | * }; | 711 | * }; |
diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h index 2a4b4a72a4f9..24b68c59dcf8 100644 --- a/include/uapi/linux/usb/functionfs.h +++ b/include/uapi/linux/usb/functionfs.h | |||
@@ -33,6 +33,13 @@ struct usb_endpoint_descriptor_no_audio { | |||
33 | __u8 bInterval; | 33 | __u8 bInterval; |
34 | } __attribute__((packed)); | 34 | } __attribute__((packed)); |
35 | 35 | ||
36 | /* Legacy format, deprecated as of 3.14. */ | ||
37 | struct usb_functionfs_descs_head { | ||
38 | __le32 magic; | ||
39 | __le32 length; | ||
40 | __le32 fs_count; | ||
41 | __le32 hs_count; | ||
42 | } __attribute__((packed, deprecated)); | ||
36 | 43 | ||
37 | /* | 44 | /* |
38 | * Descriptors format: | 45 | * Descriptors format: |
diff --git a/include/uapi/sound/compress_offload.h b/include/uapi/sound/compress_offload.h index 21eed488783f..1964026b5e09 100644 --- a/include/uapi/sound/compress_offload.h +++ b/include/uapi/sound/compress_offload.h | |||
@@ -39,7 +39,7 @@ | |||
39 | struct snd_compressed_buffer { | 39 | struct snd_compressed_buffer { |
40 | __u32 fragment_size; | 40 | __u32 fragment_size; |
41 | __u32 fragments; | 41 | __u32 fragments; |
42 | }; | 42 | } __attribute__((packed, aligned(4))); |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * struct snd_compr_params: compressed stream params | 45 | * struct snd_compr_params: compressed stream params |
@@ -51,7 +51,7 @@ struct snd_compr_params { | |||
51 | struct snd_compressed_buffer buffer; | 51 | struct snd_compressed_buffer buffer; |
52 | struct snd_codec codec; | 52 | struct snd_codec codec; |
53 | __u8 no_wake_mode; | 53 | __u8 no_wake_mode; |
54 | }; | 54 | } __attribute__((packed, aligned(4))); |
55 | 55 | ||
56 | /** | 56 | /** |
57 | * struct snd_compr_tstamp: timestamp descriptor | 57 | * struct snd_compr_tstamp: timestamp descriptor |
@@ -70,7 +70,7 @@ struct snd_compr_tstamp { | |||
70 | __u32 pcm_frames; | 70 | __u32 pcm_frames; |
71 | __u32 pcm_io_frames; | 71 | __u32 pcm_io_frames; |
72 | __u32 sampling_rate; | 72 | __u32 sampling_rate; |
73 | }; | 73 | } __attribute__((packed, aligned(4))); |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * struct snd_compr_avail: avail descriptor | 76 | * struct snd_compr_avail: avail descriptor |
@@ -80,7 +80,7 @@ struct snd_compr_tstamp { | |||
80 | struct snd_compr_avail { | 80 | struct snd_compr_avail { |
81 | __u64 avail; | 81 | __u64 avail; |
82 | struct snd_compr_tstamp tstamp; | 82 | struct snd_compr_tstamp tstamp; |
83 | } __attribute__((packed)); | 83 | } __attribute__((packed, aligned(4))); |
84 | 84 | ||
85 | enum snd_compr_direction { | 85 | enum snd_compr_direction { |
86 | SND_COMPRESS_PLAYBACK = 0, | 86 | SND_COMPRESS_PLAYBACK = 0, |
@@ -107,7 +107,7 @@ struct snd_compr_caps { | |||
107 | __u32 max_fragments; | 107 | __u32 max_fragments; |
108 | __u32 codecs[MAX_NUM_CODECS]; | 108 | __u32 codecs[MAX_NUM_CODECS]; |
109 | __u32 reserved[11]; | 109 | __u32 reserved[11]; |
110 | }; | 110 | } __attribute__((packed, aligned(4))); |
111 | 111 | ||
112 | /** | 112 | /** |
113 | * struct snd_compr_codec_caps: query capability of codec | 113 | * struct snd_compr_codec_caps: query capability of codec |
@@ -119,7 +119,7 @@ struct snd_compr_codec_caps { | |||
119 | __u32 codec; | 119 | __u32 codec; |
120 | __u32 num_descriptors; | 120 | __u32 num_descriptors; |
121 | struct snd_codec_desc descriptor[MAX_NUM_CODEC_DESCRIPTORS]; | 121 | struct snd_codec_desc descriptor[MAX_NUM_CODEC_DESCRIPTORS]; |
122 | }; | 122 | } __attribute__((packed, aligned(4))); |
123 | 123 | ||
124 | /** | 124 | /** |
125 | * @SNDRV_COMPRESS_ENCODER_PADDING: no of samples appended by the encoder at the | 125 | * @SNDRV_COMPRESS_ENCODER_PADDING: no of samples appended by the encoder at the |
@@ -140,7 +140,7 @@ enum { | |||
140 | struct snd_compr_metadata { | 140 | struct snd_compr_metadata { |
141 | __u32 key; | 141 | __u32 key; |
142 | __u32 value[8]; | 142 | __u32 value[8]; |
143 | }; | 143 | } __attribute__((packed, aligned(4))); |
144 | 144 | ||
145 | /** | 145 | /** |
146 | * compress path ioctl definitions | 146 | * compress path ioctl definitions |
diff --git a/include/uapi/sound/compress_params.h b/include/uapi/sound/compress_params.h index 165e7059de75..d9bd9ca0d5b0 100644 --- a/include/uapi/sound/compress_params.h +++ b/include/uapi/sound/compress_params.h | |||
@@ -268,7 +268,7 @@ struct snd_enc_vorbis { | |||
268 | __u32 max_bit_rate; | 268 | __u32 max_bit_rate; |
269 | __u32 min_bit_rate; | 269 | __u32 min_bit_rate; |
270 | __u32 downmix; | 270 | __u32 downmix; |
271 | }; | 271 | } __attribute__((packed, aligned(4))); |
272 | 272 | ||
273 | 273 | ||
274 | /** | 274 | /** |
@@ -284,7 +284,7 @@ struct snd_enc_real { | |||
284 | __u32 quant_bits; | 284 | __u32 quant_bits; |
285 | __u32 start_region; | 285 | __u32 start_region; |
286 | __u32 num_regions; | 286 | __u32 num_regions; |
287 | }; | 287 | } __attribute__((packed, aligned(4))); |
288 | 288 | ||
289 | /** | 289 | /** |
290 | * struct snd_enc_flac | 290 | * struct snd_enc_flac |
@@ -308,12 +308,12 @@ struct snd_enc_real { | |||
308 | struct snd_enc_flac { | 308 | struct snd_enc_flac { |
309 | __u32 num; | 309 | __u32 num; |
310 | __u32 gain; | 310 | __u32 gain; |
311 | }; | 311 | } __attribute__((packed, aligned(4))); |
312 | 312 | ||
313 | struct snd_enc_generic { | 313 | struct snd_enc_generic { |
314 | __u32 bw; /* encoder bandwidth */ | 314 | __u32 bw; /* encoder bandwidth */ |
315 | __s32 reserved[15]; | 315 | __s32 reserved[15]; |
316 | }; | 316 | } __attribute__((packed, aligned(4))); |
317 | 317 | ||
318 | union snd_codec_options { | 318 | union snd_codec_options { |
319 | struct snd_enc_wma wma; | 319 | struct snd_enc_wma wma; |
@@ -321,7 +321,7 @@ union snd_codec_options { | |||
321 | struct snd_enc_real real; | 321 | struct snd_enc_real real; |
322 | struct snd_enc_flac flac; | 322 | struct snd_enc_flac flac; |
323 | struct snd_enc_generic generic; | 323 | struct snd_enc_generic generic; |
324 | }; | 324 | } __attribute__((packed, aligned(4))); |
325 | 325 | ||
326 | /** struct snd_codec_desc - description of codec capabilities | 326 | /** struct snd_codec_desc - description of codec capabilities |
327 | * @max_ch: Maximum number of audio channels | 327 | * @max_ch: Maximum number of audio channels |
@@ -358,7 +358,7 @@ struct snd_codec_desc { | |||
358 | __u32 formats; | 358 | __u32 formats; |
359 | __u32 min_buffer; | 359 | __u32 min_buffer; |
360 | __u32 reserved[15]; | 360 | __u32 reserved[15]; |
361 | }; | 361 | } __attribute__((packed, aligned(4))); |
362 | 362 | ||
363 | /** struct snd_codec | 363 | /** struct snd_codec |
364 | * @id: Identifies the supported audio encoder/decoder. | 364 | * @id: Identifies the supported audio encoder/decoder. |
@@ -399,6 +399,6 @@ struct snd_codec { | |||
399 | __u32 align; | 399 | __u32 align; |
400 | union snd_codec_options options; | 400 | union snd_codec_options options; |
401 | __u32 reserved[3]; | 401 | __u32 reserved[3]; |
402 | }; | 402 | } __attribute__((packed, aligned(4))); |
403 | 403 | ||
404 | #endif | 404 | #endif |