diff options
Diffstat (limited to 'include')
107 files changed, 1142 insertions, 293 deletions
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h index f97804bdf1ff..7461327e14e4 100644 --- a/include/acpi/acnames.h +++ b/include/acpi/acnames.h | |||
| @@ -52,6 +52,7 @@ | |||
| 52 | #define METHOD_NAME__CBA "_CBA" | 52 | #define METHOD_NAME__CBA "_CBA" |
| 53 | #define METHOD_NAME__CID "_CID" | 53 | #define METHOD_NAME__CID "_CID" |
| 54 | #define METHOD_NAME__CRS "_CRS" | 54 | #define METHOD_NAME__CRS "_CRS" |
| 55 | #define METHOD_NAME__DDN "_DDN" | ||
| 55 | #define METHOD_NAME__HID "_HID" | 56 | #define METHOD_NAME__HID "_HID" |
| 56 | #define METHOD_NAME__INI "_INI" | 57 | #define METHOD_NAME__INI "_INI" |
| 57 | #define METHOD_NAME__PLD "_PLD" | 58 | #define METHOD_NAME__PLD "_PLD" |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 57ee0528aacb..f34a0835aa4f 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
| @@ -433,6 +433,7 @@ int acpi_device_set_power(struct acpi_device *device, int state); | |||
| 433 | int acpi_bus_init_power(struct acpi_device *device); | 433 | int acpi_bus_init_power(struct acpi_device *device); |
| 434 | int acpi_device_fix_up_power(struct acpi_device *device); | 434 | int acpi_device_fix_up_power(struct acpi_device *device); |
| 435 | int acpi_bus_update_power(acpi_handle handle, int *state_p); | 435 | int acpi_bus_update_power(acpi_handle handle, int *state_p); |
| 436 | int acpi_device_update_power(struct acpi_device *device, int *state_p); | ||
| 436 | bool acpi_bus_power_manageable(acpi_handle handle); | 437 | bool acpi_bus_power_manageable(acpi_handle handle); |
| 437 | 438 | ||
| 438 | #ifdef CONFIG_PM | 439 | #ifdef CONFIG_PM |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 9fc1d71c82bc..ab2acf629a64 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 47 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
| 48 | 48 | ||
| 49 | #define ACPI_CA_VERSION 0x20140828 | 49 | #define ACPI_CA_VERSION 0x20140926 |
| 50 | 50 | ||
| 51 | #include <acpi/acconfig.h> | 51 | #include <acpi/acconfig.h> |
| 52 | #include <acpi/actypes.h> | 52 | #include <acpi/actypes.h> |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index ac03ec81d342..7000e66f768e 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -721,7 +721,7 @@ typedef u32 acpi_event_type; | |||
| 721 | * | | | +--- Enabled for wake? | 721 | * | | | +--- Enabled for wake? |
| 722 | * | | +----- Set? | 722 | * | | +----- Set? |
| 723 | * | +------- Has a handler? | 723 | * | +------- Has a handler? |
| 724 | * +----------- <Reserved> | 724 | * +------------- <Reserved> |
| 725 | */ | 725 | */ |
| 726 | typedef u32 acpi_event_status; | 726 | typedef u32 acpi_event_status; |
| 727 | 727 | ||
| @@ -729,7 +729,7 @@ typedef u32 acpi_event_status; | |||
| 729 | #define ACPI_EVENT_FLAG_ENABLED (acpi_event_status) 0x01 | 729 | #define ACPI_EVENT_FLAG_ENABLED (acpi_event_status) 0x01 |
| 730 | #define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02 | 730 | #define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02 |
| 731 | #define ACPI_EVENT_FLAG_SET (acpi_event_status) 0x04 | 731 | #define ACPI_EVENT_FLAG_SET (acpi_event_status) 0x04 |
| 732 | #define ACPI_EVENT_FLAG_HANDLE (acpi_event_status) 0x08 | 732 | #define ACPI_EVENT_FLAG_HAS_HANDLER (acpi_event_status) 0x08 |
| 733 | 733 | ||
| 734 | /* Actions for acpi_set_gpe, acpi_gpe_wakeup, acpi_hw_low_set_gpe */ | 734 | /* Actions for acpi_set_gpe, acpi_gpe_wakeup, acpi_hw_low_set_gpe */ |
| 735 | 735 | ||
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index e973540cd15b..2dd405c9be78 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
| @@ -74,7 +74,6 @@ | |||
| 74 | {0x1002, 0x4C64, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \ | 74 | {0x1002, 0x4C64, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \ |
| 75 | {0x1002, 0x4C66, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \ | 75 | {0x1002, 0x4C66, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \ |
| 76 | {0x1002, 0x4C67, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \ | 76 | {0x1002, 0x4C67, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \ |
| 77 | {0x1002, 0x4C6E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280|RADEON_IS_MOBILITY}, \ | ||
| 78 | {0x1002, 0x4E44, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \ | 77 | {0x1002, 0x4E44, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \ |
| 79 | {0x1002, 0x4E45, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \ | 78 | {0x1002, 0x4E45, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \ |
| 80 | {0x1002, 0x4E46, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \ | 79 | {0x1002, 0x4E46, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \ |
diff --git a/include/dt-bindings/clock/imx6qdl-clock.h b/include/dt-bindings/clock/imx6qdl-clock.h index ddaef8620b2c..b690cdba163b 100644 --- a/include/dt-bindings/clock/imx6qdl-clock.h +++ b/include/dt-bindings/clock/imx6qdl-clock.h | |||
| @@ -62,8 +62,8 @@ | |||
| 62 | #define IMX6QDL_CLK_USDHC3_SEL 50 | 62 | #define IMX6QDL_CLK_USDHC3_SEL 50 |
| 63 | #define IMX6QDL_CLK_USDHC4_SEL 51 | 63 | #define IMX6QDL_CLK_USDHC4_SEL 51 |
| 64 | #define IMX6QDL_CLK_ENFC_SEL 52 | 64 | #define IMX6QDL_CLK_ENFC_SEL 52 |
| 65 | #define IMX6QDL_CLK_EMI_SEL 53 | 65 | #define IMX6QDL_CLK_EIM_SEL 53 |
| 66 | #define IMX6QDL_CLK_EMI_SLOW_SEL 54 | 66 | #define IMX6QDL_CLK_EIM_SLOW_SEL 54 |
| 67 | #define IMX6QDL_CLK_VDO_AXI_SEL 55 | 67 | #define IMX6QDL_CLK_VDO_AXI_SEL 55 |
| 68 | #define IMX6QDL_CLK_VPU_AXI_SEL 56 | 68 | #define IMX6QDL_CLK_VPU_AXI_SEL 56 |
| 69 | #define IMX6QDL_CLK_CKO1_SEL 57 | 69 | #define IMX6QDL_CLK_CKO1_SEL 57 |
| @@ -106,8 +106,8 @@ | |||
| 106 | #define IMX6QDL_CLK_USDHC4_PODF 94 | 106 | #define IMX6QDL_CLK_USDHC4_PODF 94 |
| 107 | #define IMX6QDL_CLK_ENFC_PRED 95 | 107 | #define IMX6QDL_CLK_ENFC_PRED 95 |
| 108 | #define IMX6QDL_CLK_ENFC_PODF 96 | 108 | #define IMX6QDL_CLK_ENFC_PODF 96 |
| 109 | #define IMX6QDL_CLK_EMI_PODF 97 | 109 | #define IMX6QDL_CLK_EIM_PODF 97 |
| 110 | #define IMX6QDL_CLK_EMI_SLOW_PODF 98 | 110 | #define IMX6QDL_CLK_EIM_SLOW_PODF 98 |
| 111 | #define IMX6QDL_CLK_VPU_AXI_PODF 99 | 111 | #define IMX6QDL_CLK_VPU_AXI_PODF 99 |
| 112 | #define IMX6QDL_CLK_CKO1_PODF 100 | 112 | #define IMX6QDL_CLK_CKO1_PODF 100 |
| 113 | #define IMX6QDL_CLK_AXI 101 | 113 | #define IMX6QDL_CLK_AXI 101 |
diff --git a/include/dt-bindings/clock/qcom,mmcc-apq8084.h b/include/dt-bindings/clock/qcom,mmcc-apq8084.h index a929f86d0ddd..d72b5b35f15e 100644 --- a/include/dt-bindings/clock/qcom,mmcc-apq8084.h +++ b/include/dt-bindings/clock/qcom,mmcc-apq8084.h | |||
| @@ -60,7 +60,7 @@ | |||
| 60 | #define ESC1_CLK_SRC 43 | 60 | #define ESC1_CLK_SRC 43 |
| 61 | #define HDMI_CLK_SRC 44 | 61 | #define HDMI_CLK_SRC 44 |
| 62 | #define VSYNC_CLK_SRC 45 | 62 | #define VSYNC_CLK_SRC 45 |
| 63 | #define RBCPR_CLK_SRC 46 | 63 | #define MMSS_RBCPR_CLK_SRC 46 |
| 64 | #define RBBMTIMER_CLK_SRC 47 | 64 | #define RBBMTIMER_CLK_SRC 47 |
| 65 | #define MAPLE_CLK_SRC 48 | 65 | #define MAPLE_CLK_SRC 48 |
| 66 | #define VDP_CLK_SRC 49 | 66 | #define VDP_CLK_SRC 49 |
diff --git a/include/dt-bindings/clock/vf610-clock.h b/include/dt-bindings/clock/vf610-clock.h index d6b56b21539b..801c0ac50c47 100644 --- a/include/dt-bindings/clock/vf610-clock.h +++ b/include/dt-bindings/clock/vf610-clock.h | |||
| @@ -21,24 +21,24 @@ | |||
| 21 | #define VF610_CLK_FASK_CLK_SEL 8 | 21 | #define VF610_CLK_FASK_CLK_SEL 8 |
| 22 | #define VF610_CLK_AUDIO_EXT 9 | 22 | #define VF610_CLK_AUDIO_EXT 9 |
| 23 | #define VF610_CLK_ENET_EXT 10 | 23 | #define VF610_CLK_ENET_EXT 10 |
| 24 | #define VF610_CLK_PLL1_MAIN 11 | 24 | #define VF610_CLK_PLL1_SYS 11 |
| 25 | #define VF610_CLK_PLL1_PFD1 12 | 25 | #define VF610_CLK_PLL1_PFD1 12 |
| 26 | #define VF610_CLK_PLL1_PFD2 13 | 26 | #define VF610_CLK_PLL1_PFD2 13 |
| 27 | #define VF610_CLK_PLL1_PFD3 14 | 27 | #define VF610_CLK_PLL1_PFD3 14 |
| 28 | #define VF610_CLK_PLL1_PFD4 15 | 28 | #define VF610_CLK_PLL1_PFD4 15 |
| 29 | #define VF610_CLK_PLL2_MAIN 16 | 29 | #define VF610_CLK_PLL2_BUS 16 |
| 30 | #define VF610_CLK_PLL2_PFD1 17 | 30 | #define VF610_CLK_PLL2_PFD1 17 |
| 31 | #define VF610_CLK_PLL2_PFD2 18 | 31 | #define VF610_CLK_PLL2_PFD2 18 |
| 32 | #define VF610_CLK_PLL2_PFD3 19 | 32 | #define VF610_CLK_PLL2_PFD3 19 |
| 33 | #define VF610_CLK_PLL2_PFD4 20 | 33 | #define VF610_CLK_PLL2_PFD4 20 |
| 34 | #define VF610_CLK_PLL3_MAIN 21 | 34 | #define VF610_CLK_PLL3_USB_OTG 21 |
| 35 | #define VF610_CLK_PLL3_PFD1 22 | 35 | #define VF610_CLK_PLL3_PFD1 22 |
| 36 | #define VF610_CLK_PLL3_PFD2 23 | 36 | #define VF610_CLK_PLL3_PFD2 23 |
| 37 | #define VF610_CLK_PLL3_PFD3 24 | 37 | #define VF610_CLK_PLL3_PFD3 24 |
| 38 | #define VF610_CLK_PLL3_PFD4 25 | 38 | #define VF610_CLK_PLL3_PFD4 25 |
| 39 | #define VF610_CLK_PLL4_MAIN 26 | 39 | #define VF610_CLK_PLL4_AUDIO 26 |
| 40 | #define VF610_CLK_PLL5_MAIN 27 | 40 | #define VF610_CLK_PLL5_ENET 27 |
| 41 | #define VF610_CLK_PLL6_MAIN 28 | 41 | #define VF610_CLK_PLL6_VIDEO 28 |
| 42 | #define VF610_CLK_PLL3_MAIN_DIV 29 | 42 | #define VF610_CLK_PLL3_MAIN_DIV 29 |
| 43 | #define VF610_CLK_PLL4_MAIN_DIV 30 | 43 | #define VF610_CLK_PLL4_MAIN_DIV 30 |
| 44 | #define VF610_CLK_PLL6_MAIN_DIV 31 | 44 | #define VF610_CLK_PLL6_MAIN_DIV 31 |
| @@ -166,9 +166,32 @@ | |||
| 166 | #define VF610_CLK_DMAMUX3 153 | 166 | #define VF610_CLK_DMAMUX3 153 |
| 167 | #define VF610_CLK_FLEXCAN0_EN 154 | 167 | #define VF610_CLK_FLEXCAN0_EN 154 |
| 168 | #define VF610_CLK_FLEXCAN1_EN 155 | 168 | #define VF610_CLK_FLEXCAN1_EN 155 |
| 169 | #define VF610_CLK_PLL7_MAIN 156 | 169 | #define VF610_CLK_PLL7_USB_HOST 156 |
| 170 | #define VF610_CLK_USBPHY0 157 | 170 | #define VF610_CLK_USBPHY0 157 |
| 171 | #define VF610_CLK_USBPHY1 158 | 171 | #define VF610_CLK_USBPHY1 158 |
| 172 | #define VF610_CLK_END 159 | 172 | #define VF610_CLK_LVDS1_IN 159 |
| 173 | #define VF610_CLK_ANACLK1 160 | ||
| 174 | #define VF610_CLK_PLL1_BYPASS_SRC 161 | ||
| 175 | #define VF610_CLK_PLL2_BYPASS_SRC 162 | ||
| 176 | #define VF610_CLK_PLL3_BYPASS_SRC 163 | ||
| 177 | #define VF610_CLK_PLL4_BYPASS_SRC 164 | ||
| 178 | #define VF610_CLK_PLL5_BYPASS_SRC 165 | ||
| 179 | #define VF610_CLK_PLL6_BYPASS_SRC 166 | ||
| 180 | #define VF610_CLK_PLL7_BYPASS_SRC 167 | ||
| 181 | #define VF610_CLK_PLL1 168 | ||
| 182 | #define VF610_CLK_PLL2 169 | ||
| 183 | #define VF610_CLK_PLL3 170 | ||
| 184 | #define VF610_CLK_PLL4 171 | ||
| 185 | #define VF610_CLK_PLL5 172 | ||
| 186 | #define VF610_CLK_PLL6 173 | ||
| 187 | #define VF610_CLK_PLL7 174 | ||
| 188 | #define VF610_PLL1_BYPASS 175 | ||
| 189 | #define VF610_PLL2_BYPASS 176 | ||
| 190 | #define VF610_PLL3_BYPASS 177 | ||
| 191 | #define VF610_PLL4_BYPASS 178 | ||
| 192 | #define VF610_PLL5_BYPASS 179 | ||
| 193 | #define VF610_PLL6_BYPASS 180 | ||
| 194 | #define VF610_PLL7_BYPASS 181 | ||
| 195 | #define VF610_CLK_END 182 | ||
| 173 | 196 | ||
| 174 | #endif /* __DT_BINDINGS_CLOCK_VF610_H */ | 197 | #endif /* __DT_BINDINGS_CLOCK_VF610_H */ |
diff --git a/include/dt-bindings/pinctrl/dra.h b/include/dt-bindings/pinctrl/dra.h index 3d33794e4f3e..7448edff4723 100644 --- a/include/dt-bindings/pinctrl/dra.h +++ b/include/dt-bindings/pinctrl/dra.h | |||
| @@ -40,8 +40,8 @@ | |||
| 40 | 40 | ||
| 41 | /* Active pin states */ | 41 | /* Active pin states */ |
| 42 | #define PIN_OUTPUT (0 | PULL_DIS) | 42 | #define PIN_OUTPUT (0 | PULL_DIS) |
| 43 | #define PIN_OUTPUT_PULLUP (PIN_OUTPUT | PULL_ENA | PULL_UP) | 43 | #define PIN_OUTPUT_PULLUP (PULL_UP) |
| 44 | #define PIN_OUTPUT_PULLDOWN (PIN_OUTPUT | PULL_ENA) | 44 | #define PIN_OUTPUT_PULLDOWN (0) |
| 45 | #define PIN_INPUT (INPUT_EN | PULL_DIS) | 45 | #define PIN_INPUT (INPUT_EN | PULL_DIS) |
| 46 | #define PIN_INPUT_SLEW (INPUT_EN | SLEWCONTROL) | 46 | #define PIN_INPUT_SLEW (INPUT_EN | SLEWCONTROL) |
| 47 | #define PIN_INPUT_PULLUP (PULL_ENA | INPUT_EN | PULL_UP) | 47 | #define PIN_INPUT_PULLUP (PULL_ENA | INPUT_EN | PULL_UP) |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index b7926bb9b444..407a12f663eb 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -432,6 +432,7 @@ static inline bool acpi_driver_match_device(struct device *dev, | |||
| 432 | int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *); | 432 | int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *); |
| 433 | int acpi_device_modalias(struct device *, char *, int); | 433 | int acpi_device_modalias(struct device *, char *, int); |
| 434 | 434 | ||
| 435 | struct platform_device *acpi_create_platform_device(struct acpi_device *); | ||
| 435 | #define ACPI_PTR(_ptr) (_ptr) | 436 | #define ACPI_PTR(_ptr) (_ptr) |
| 436 | 437 | ||
| 437 | #else /* !CONFIG_ACPI */ | 438 | #else /* !CONFIG_ACPI */ |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 36dffeccebdb..e58fe7df8b9c 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -90,7 +90,7 @@ extern unsigned compat_dir_class[]; | |||
| 90 | extern unsigned compat_chattr_class[]; | 90 | extern unsigned compat_chattr_class[]; |
| 91 | extern unsigned compat_signal_class[]; | 91 | extern unsigned compat_signal_class[]; |
| 92 | 92 | ||
| 93 | extern int __weak audit_classify_compat_syscall(int abi, unsigned syscall); | 93 | extern int audit_classify_compat_syscall(int abi, unsigned syscall); |
| 94 | 94 | ||
| 95 | /* audit_names->type values */ | 95 | /* audit_names->type values */ |
| 96 | #define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */ | 96 | #define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */ |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index be5fd38bd5a0..5d858e02997f 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -18,8 +18,11 @@ | |||
| 18 | * position @h. For example | 18 | * position @h. For example |
| 19 | * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. | 19 | * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. |
| 20 | */ | 20 | */ |
| 21 | #define GENMASK(h, l) (((U32_C(1) << ((h) - (l) + 1)) - 1) << (l)) | 21 | #define GENMASK(h, l) \ |
| 22 | #define GENMASK_ULL(h, l) (((U64_C(1) << ((h) - (l) + 1)) - 1) << (l)) | 22 | (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) |
| 23 | |||
| 24 | #define GENMASK_ULL(h, l) \ | ||
| 25 | (((~0ULL) << (l)) & (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h)))) | ||
| 23 | 26 | ||
| 24 | extern unsigned int __sw_hweight8(unsigned int w); | 27 | extern unsigned int __sw_hweight8(unsigned int w); |
| 25 | extern unsigned int __sw_hweight16(unsigned int w); | 28 | extern unsigned int __sw_hweight16(unsigned int w); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 0207a78a8d82..aac0f9ea952a 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -1136,8 +1136,7 @@ static inline bool blk_needs_flush_plug(struct task_struct *tsk) | |||
| 1136 | /* | 1136 | /* |
| 1137 | * tag stuff | 1137 | * tag stuff |
| 1138 | */ | 1138 | */ |
| 1139 | #define blk_rq_tagged(rq) \ | 1139 | #define blk_rq_tagged(rq) ((rq)->cmd_flags & REQ_QUEUED) |
| 1140 | ((rq)->mq_ctx || ((rq)->cmd_flags & REQ_QUEUED)) | ||
| 1141 | extern int blk_queue_start_tag(struct request_queue *, struct request *); | 1140 | extern int blk_queue_start_tag(struct request_queue *, struct request *); |
| 1142 | extern struct request *blk_queue_find_tag(struct request_queue *, int); | 1141 | extern struct request *blk_queue_find_tag(struct request_queue *, int); |
| 1143 | extern void blk_queue_end_tag(struct request_queue *, struct request *); | 1142 | extern void blk_queue_end_tag(struct request_queue *, struct request *); |
| @@ -1583,13 +1582,13 @@ static inline bool blk_integrity_merge_rq(struct request_queue *rq, | |||
| 1583 | struct request *r1, | 1582 | struct request *r1, |
| 1584 | struct request *r2) | 1583 | struct request *r2) |
| 1585 | { | 1584 | { |
| 1586 | return 0; | 1585 | return true; |
| 1587 | } | 1586 | } |
| 1588 | static inline bool blk_integrity_merge_bio(struct request_queue *rq, | 1587 | static inline bool blk_integrity_merge_bio(struct request_queue *rq, |
| 1589 | struct request *r, | 1588 | struct request *r, |
| 1590 | struct bio *b) | 1589 | struct bio *b) |
| 1591 | { | 1590 | { |
| 1592 | return 0; | 1591 | return true; |
| 1593 | } | 1592 | } |
| 1594 | static inline bool blk_integrity_is_initialized(struct gendisk *g) | 1593 | static inline bool blk_integrity_is_initialized(struct gendisk *g) |
| 1595 | { | 1594 | { |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 4e2bd4c95b66..0995c2de8162 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
| @@ -46,6 +46,7 @@ extern unsigned long init_bootmem_node(pg_data_t *pgdat, | |||
| 46 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); | 46 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); |
| 47 | 47 | ||
| 48 | extern unsigned long free_all_bootmem(void); | 48 | extern unsigned long free_all_bootmem(void); |
| 49 | extern void reset_node_managed_pages(pg_data_t *pgdat); | ||
| 49 | extern void reset_all_zones_managed_pages(void); | 50 | extern void reset_all_zones_managed_pages(void); |
| 50 | 51 | ||
| 51 | extern void free_bootmem_node(pg_data_t *pgdat, | 52 | extern void free_bootmem_node(pg_data_t *pgdat, |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 324329ceea1e..73b45225a7ca 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
| @@ -175,12 +175,13 @@ void __wait_on_buffer(struct buffer_head *); | |||
| 175 | wait_queue_head_t *bh_waitq_head(struct buffer_head *bh); | 175 | wait_queue_head_t *bh_waitq_head(struct buffer_head *bh); |
| 176 | struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, | 176 | struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, |
| 177 | unsigned size); | 177 | unsigned size); |
| 178 | struct buffer_head *__getblk(struct block_device *bdev, sector_t block, | 178 | struct buffer_head *__getblk_gfp(struct block_device *bdev, sector_t block, |
| 179 | unsigned size); | 179 | unsigned size, gfp_t gfp); |
| 180 | void __brelse(struct buffer_head *); | 180 | void __brelse(struct buffer_head *); |
| 181 | void __bforget(struct buffer_head *); | 181 | void __bforget(struct buffer_head *); |
| 182 | void __breadahead(struct block_device *, sector_t block, unsigned int size); | 182 | void __breadahead(struct block_device *, sector_t block, unsigned int size); |
| 183 | struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size); | 183 | struct buffer_head *__bread_gfp(struct block_device *, |
| 184 | sector_t block, unsigned size, gfp_t gfp); | ||
| 184 | void invalidate_bh_lrus(void); | 185 | void invalidate_bh_lrus(void); |
| 185 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); | 186 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); |
| 186 | void free_buffer_head(struct buffer_head * bh); | 187 | void free_buffer_head(struct buffer_head * bh); |
| @@ -295,7 +296,13 @@ static inline void bforget(struct buffer_head *bh) | |||
| 295 | static inline struct buffer_head * | 296 | static inline struct buffer_head * |
| 296 | sb_bread(struct super_block *sb, sector_t block) | 297 | sb_bread(struct super_block *sb, sector_t block) |
| 297 | { | 298 | { |
| 298 | return __bread(sb->s_bdev, block, sb->s_blocksize); | 299 | return __bread_gfp(sb->s_bdev, block, sb->s_blocksize, __GFP_MOVABLE); |
| 300 | } | ||
| 301 | |||
| 302 | static inline struct buffer_head * | ||
| 303 | sb_bread_unmovable(struct super_block *sb, sector_t block) | ||
| 304 | { | ||
| 305 | return __bread_gfp(sb->s_bdev, block, sb->s_blocksize, 0); | ||
| 299 | } | 306 | } |
| 300 | 307 | ||
| 301 | static inline void | 308 | static inline void |
| @@ -307,7 +314,7 @@ sb_breadahead(struct super_block *sb, sector_t block) | |||
| 307 | static inline struct buffer_head * | 314 | static inline struct buffer_head * |
| 308 | sb_getblk(struct super_block *sb, sector_t block) | 315 | sb_getblk(struct super_block *sb, sector_t block) |
| 309 | { | 316 | { |
| 310 | return __getblk(sb->s_bdev, block, sb->s_blocksize); | 317 | return __getblk_gfp(sb->s_bdev, block, sb->s_blocksize, __GFP_MOVABLE); |
| 311 | } | 318 | } |
| 312 | 319 | ||
| 313 | static inline struct buffer_head * | 320 | static inline struct buffer_head * |
| @@ -344,6 +351,36 @@ static inline void lock_buffer(struct buffer_head *bh) | |||
| 344 | __lock_buffer(bh); | 351 | __lock_buffer(bh); |
| 345 | } | 352 | } |
| 346 | 353 | ||
| 354 | static inline struct buffer_head *getblk_unmovable(struct block_device *bdev, | ||
| 355 | sector_t block, | ||
| 356 | unsigned size) | ||
| 357 | { | ||
| 358 | return __getblk_gfp(bdev, block, size, 0); | ||
| 359 | } | ||
| 360 | |||
| 361 | static inline struct buffer_head *__getblk(struct block_device *bdev, | ||
| 362 | sector_t block, | ||
| 363 | unsigned size) | ||
| 364 | { | ||
| 365 | return __getblk_gfp(bdev, block, size, __GFP_MOVABLE); | ||
| 366 | } | ||
| 367 | |||
| 368 | /** | ||
| 369 | * __bread() - reads a specified block and returns the bh | ||
| 370 | * @bdev: the block_device to read from | ||
| 371 | * @block: number of block | ||
| 372 | * @size: size (in bytes) to read | ||
| 373 | * | ||
| 374 | * Reads a specified block, and returns buffer head that contains it. | ||
| 375 | * The page cache is allocated from movable area so that it can be migrated. | ||
| 376 | * It returns NULL if the block was unreadable. | ||
| 377 | */ | ||
| 378 | static inline struct buffer_head * | ||
| 379 | __bread(struct block_device *bdev, sector_t block, unsigned size) | ||
| 380 | { | ||
| 381 | return __bread_gfp(bdev, block, size, __GFP_MOVABLE); | ||
| 382 | } | ||
| 383 | |||
| 347 | extern int __set_page_dirty_buffers(struct page *page); | 384 | extern int __set_page_dirty_buffers(struct page *page); |
| 348 | 385 | ||
| 349 | #else /* CONFIG_BLOCK */ | 386 | #else /* CONFIG_BLOCK */ |
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index 6992afc6ba7f..b37ea95bc348 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h | |||
| @@ -99,6 +99,12 @@ inval_skb: | |||
| 99 | return 1; | 99 | return 1; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | static inline bool can_is_canfd_skb(const struct sk_buff *skb) | ||
| 103 | { | ||
| 104 | /* the CAN specific type of skb is identified by its data length */ | ||
| 105 | return skb->len == CANFD_MTU; | ||
| 106 | } | ||
| 107 | |||
| 102 | /* get data length from can_dlc with sanitized can_dlc */ | 108 | /* get data length from can_dlc with sanitized can_dlc */ |
| 103 | u8 can_dlc2len(u8 can_dlc); | 109 | u8 can_dlc2len(u8 can_dlc); |
| 104 | 110 | ||
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index be21af149f11..2839c639f092 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
| @@ -352,7 +352,6 @@ struct clk_divider { | |||
| 352 | #define CLK_DIVIDER_READ_ONLY BIT(5) | 352 | #define CLK_DIVIDER_READ_ONLY BIT(5) |
| 353 | 353 | ||
| 354 | extern const struct clk_ops clk_divider_ops; | 354 | extern const struct clk_ops clk_divider_ops; |
| 355 | extern const struct clk_ops clk_divider_ro_ops; | ||
| 356 | struct clk *clk_register_divider(struct device *dev, const char *name, | 355 | struct clk *clk_register_divider(struct device *dev, const char *name, |
| 357 | const char *parent_name, unsigned long flags, | 356 | const char *parent_name, unsigned long flags, |
| 358 | void __iomem *reg, u8 shift, u8 width, | 357 | void __iomem *reg, u8 shift, u8 width, |
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 653f0e2b6ca9..abcafaa20b86 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
| @@ -287,7 +287,7 @@ extern struct clocksource* clocksource_get_next(void); | |||
| 287 | extern void clocksource_change_rating(struct clocksource *cs, int rating); | 287 | extern void clocksource_change_rating(struct clocksource *cs, int rating); |
| 288 | extern void clocksource_suspend(void); | 288 | extern void clocksource_suspend(void); |
| 289 | extern void clocksource_resume(void); | 289 | extern void clocksource_resume(void); |
| 290 | extern struct clocksource * __init __weak clocksource_default_clock(void); | 290 | extern struct clocksource * __init clocksource_default_clock(void); |
| 291 | extern void clocksource_mark_unstable(struct clocksource *cs); | 291 | extern void clocksource_mark_unstable(struct clocksource *cs); |
| 292 | 292 | ||
| 293 | extern u64 | 293 | extern u64 |
diff --git a/include/linux/cma.h b/include/linux/cma.h index 0430ed05d3b9..a93438beb33c 100644 --- a/include/linux/cma.h +++ b/include/linux/cma.h | |||
| @@ -18,12 +18,12 @@ struct cma; | |||
| 18 | extern phys_addr_t cma_get_base(struct cma *cma); | 18 | extern phys_addr_t cma_get_base(struct cma *cma); |
| 19 | extern unsigned long cma_get_size(struct cma *cma); | 19 | extern unsigned long cma_get_size(struct cma *cma); |
| 20 | 20 | ||
| 21 | extern int __init cma_declare_contiguous(phys_addr_t size, | 21 | extern int __init cma_declare_contiguous(phys_addr_t base, |
| 22 | phys_addr_t base, phys_addr_t limit, | 22 | phys_addr_t size, phys_addr_t limit, |
| 23 | phys_addr_t alignment, unsigned int order_per_bit, | 23 | phys_addr_t alignment, unsigned int order_per_bit, |
| 24 | bool fixed, struct cma **res_cma); | 24 | bool fixed, struct cma **res_cma); |
| 25 | extern int cma_init_reserved_mem(phys_addr_t size, | 25 | extern int cma_init_reserved_mem(phys_addr_t base, |
| 26 | phys_addr_t base, int order_per_bit, | 26 | phys_addr_t size, int order_per_bit, |
| 27 | struct cma **res_cma); | 27 | struct cma **res_cma); |
| 28 | extern struct page *cma_alloc(struct cma *cma, int count, unsigned int align); | 28 | extern struct page *cma_alloc(struct cma *cma, int count, unsigned int align); |
| 29 | extern bool cma_release(struct cma *cma, struct page *pages, int count); | 29 | extern bool cma_release(struct cma *cma, struct page *pages, int count); |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 2507fd2a1eb4..d1a558239b1a 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
| @@ -71,7 +71,6 @@ | |||
| 71 | * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 | 71 | * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 |
| 72 | * | 72 | * |
| 73 | * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. | 73 | * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. |
| 74 | * Fixed in GCC 4.8.2 and later versions. | ||
| 75 | * | 74 | * |
| 76 | * (asm goto is automatically volatile - the naming reflects this.) | 75 | * (asm goto is automatically volatile - the naming reflects this.) |
| 77 | */ | 76 | */ |
diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h index cdd1cc202d51..c8c565952548 100644 --- a/include/linux/compiler-gcc5.h +++ b/include/linux/compiler-gcc5.h | |||
| @@ -53,7 +53,6 @@ | |||
| 53 | * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 | 53 | * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 |
| 54 | * | 54 | * |
| 55 | * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. | 55 | * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. |
| 56 | * Fixed in GCC 4.8.2 and later versions. | ||
| 57 | * | 56 | * |
| 58 | * (asm goto is automatically volatile - the naming reflects this.) | 57 | * (asm goto is automatically volatile - the naming reflects this.) |
| 59 | */ | 58 | */ |
diff --git a/include/linux/cpufreq-dt.h b/include/linux/cpufreq-dt.h new file mode 100644 index 000000000000..0414009e2c30 --- /dev/null +++ b/include/linux/cpufreq-dt.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 Marvell | ||
| 3 | * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __CPUFREQ_DT_H__ | ||
| 11 | #define __CPUFREQ_DT_H__ | ||
| 12 | |||
| 13 | struct cpufreq_dt_platform_data { | ||
| 14 | /* | ||
| 15 | * True when each CPU has its own clock to control its | ||
| 16 | * frequency, false when all CPUs are controlled by a single | ||
| 17 | * clock. | ||
| 18 | */ | ||
| 19 | bool independent_clocks; | ||
| 20 | }; | ||
| 21 | |||
| 22 | #endif /* __CPUFREQ_DT_H__ */ | ||
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 138336b6bb04..503b085b7832 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -219,6 +219,7 @@ __ATTR(_name, 0644, show_##_name, store_##_name) | |||
| 219 | struct cpufreq_driver { | 219 | struct cpufreq_driver { |
| 220 | char name[CPUFREQ_NAME_LEN]; | 220 | char name[CPUFREQ_NAME_LEN]; |
| 221 | u8 flags; | 221 | u8 flags; |
| 222 | void *driver_data; | ||
| 222 | 223 | ||
| 223 | /* needed by all drivers */ | 224 | /* needed by all drivers */ |
| 224 | int (*init) (struct cpufreq_policy *policy); | 225 | int (*init) (struct cpufreq_policy *policy); |
| @@ -312,6 +313,7 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data); | |||
| 312 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); | 313 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); |
| 313 | 314 | ||
| 314 | const char *cpufreq_get_current_driver(void); | 315 | const char *cpufreq_get_current_driver(void); |
| 316 | void *cpufreq_get_driver_data(void); | ||
| 315 | 317 | ||
| 316 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, | 318 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, |
| 317 | unsigned int min, unsigned int max) | 319 | unsigned int min, unsigned int max) |
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index 72ab536ad3de..3849fce7ecfe 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h | |||
| @@ -14,14 +14,13 @@ | |||
| 14 | extern unsigned long long elfcorehdr_addr; | 14 | extern unsigned long long elfcorehdr_addr; |
| 15 | extern unsigned long long elfcorehdr_size; | 15 | extern unsigned long long elfcorehdr_size; |
| 16 | 16 | ||
| 17 | extern int __weak elfcorehdr_alloc(unsigned long long *addr, | 17 | extern int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size); |
| 18 | unsigned long long *size); | 18 | extern void elfcorehdr_free(unsigned long long addr); |
| 19 | extern void __weak elfcorehdr_free(unsigned long long addr); | 19 | extern ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos); |
| 20 | extern ssize_t __weak elfcorehdr_read(char *buf, size_t count, u64 *ppos); | 20 | extern ssize_t elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos); |
| 21 | extern ssize_t __weak elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos); | 21 | extern int remap_oldmem_pfn_range(struct vm_area_struct *vma, |
| 22 | extern int __weak remap_oldmem_pfn_range(struct vm_area_struct *vma, | 22 | unsigned long from, unsigned long pfn, |
| 23 | unsigned long from, unsigned long pfn, | 23 | unsigned long size, pgprot_t prot); |
| 24 | unsigned long size, pgprot_t prot); | ||
| 25 | 24 | ||
| 26 | extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, | 25 | extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, |
| 27 | unsigned long, int); | 26 | unsigned long, int); |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 45cb4ffdea62..0949f9c7e872 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -92,6 +92,7 @@ typedef struct { | |||
| 92 | #define EFI_MEMORY_WC ((u64)0x0000000000000002ULL) /* write-coalescing */ | 92 | #define EFI_MEMORY_WC ((u64)0x0000000000000002ULL) /* write-coalescing */ |
| 93 | #define EFI_MEMORY_WT ((u64)0x0000000000000004ULL) /* write-through */ | 93 | #define EFI_MEMORY_WT ((u64)0x0000000000000004ULL) /* write-through */ |
| 94 | #define EFI_MEMORY_WB ((u64)0x0000000000000008ULL) /* write-back */ | 94 | #define EFI_MEMORY_WB ((u64)0x0000000000000008ULL) /* write-back */ |
| 95 | #define EFI_MEMORY_UCE ((u64)0x0000000000000010ULL) /* uncached, exported */ | ||
| 95 | #define EFI_MEMORY_WP ((u64)0x0000000000001000ULL) /* write-protect */ | 96 | #define EFI_MEMORY_WP ((u64)0x0000000000001000ULL) /* write-protect */ |
| 96 | #define EFI_MEMORY_RP ((u64)0x0000000000002000ULL) /* read-protect */ | 97 | #define EFI_MEMORY_RP ((u64)0x0000000000002000ULL) /* read-protect */ |
| 97 | #define EFI_MEMORY_XP ((u64)0x0000000000004000ULL) /* execute-protect */ | 98 | #define EFI_MEMORY_XP ((u64)0x0000000000004000ULL) /* execute-protect */ |
| @@ -502,6 +503,10 @@ typedef efi_status_t efi_get_next_variable_t (unsigned long *name_size, efi_char | |||
| 502 | typedef efi_status_t efi_set_variable_t (efi_char16_t *name, efi_guid_t *vendor, | 503 | typedef efi_status_t efi_set_variable_t (efi_char16_t *name, efi_guid_t *vendor, |
| 503 | u32 attr, unsigned long data_size, | 504 | u32 attr, unsigned long data_size, |
| 504 | void *data); | 505 | void *data); |
| 506 | typedef efi_status_t | ||
| 507 | efi_set_variable_nonblocking_t(efi_char16_t *name, efi_guid_t *vendor, | ||
| 508 | u32 attr, unsigned long data_size, void *data); | ||
| 509 | |||
| 505 | typedef efi_status_t efi_get_next_high_mono_count_t (u32 *count); | 510 | typedef efi_status_t efi_get_next_high_mono_count_t (u32 *count); |
| 506 | typedef void efi_reset_system_t (int reset_type, efi_status_t status, | 511 | typedef void efi_reset_system_t (int reset_type, efi_status_t status, |
| 507 | unsigned long data_size, efi_char16_t *data); | 512 | unsigned long data_size, efi_char16_t *data); |
| @@ -821,6 +826,7 @@ extern struct efi { | |||
| 821 | efi_get_variable_t *get_variable; | 826 | efi_get_variable_t *get_variable; |
| 822 | efi_get_next_variable_t *get_next_variable; | 827 | efi_get_next_variable_t *get_next_variable; |
| 823 | efi_set_variable_t *set_variable; | 828 | efi_set_variable_t *set_variable; |
| 829 | efi_set_variable_nonblocking_t *set_variable_nonblocking; | ||
| 824 | efi_query_variable_info_t *query_variable_info; | 830 | efi_query_variable_info_t *query_variable_info; |
| 825 | efi_update_capsule_t *update_capsule; | 831 | efi_update_capsule_t *update_capsule; |
| 826 | efi_query_capsule_caps_t *query_capsule_caps; | 832 | efi_query_capsule_caps_t *query_capsule_caps; |
| @@ -886,6 +892,13 @@ extern bool efi_poweroff_required(void); | |||
| 886 | (md) <= (efi_memory_desc_t *)((m)->map_end - (m)->desc_size); \ | 892 | (md) <= (efi_memory_desc_t *)((m)->map_end - (m)->desc_size); \ |
| 887 | (md) = (void *)(md) + (m)->desc_size) | 893 | (md) = (void *)(md) + (m)->desc_size) |
| 888 | 894 | ||
| 895 | /* | ||
| 896 | * Format an EFI memory descriptor's type and attributes to a user-provided | ||
| 897 | * character buffer, as per snprintf(), and return the buffer. | ||
| 898 | */ | ||
| 899 | char * __init efi_md_typeattr_format(char *buf, size_t size, | ||
| 900 | const efi_memory_desc_t *md); | ||
| 901 | |||
| 889 | /** | 902 | /** |
| 890 | * efi_range_is_wc - check the WC bit on an address range | 903 | * efi_range_is_wc - check the WC bit on an address range |
| 891 | * @start: starting kvirt address | 904 | * @start: starting kvirt address |
| @@ -1034,6 +1047,7 @@ struct efivar_operations { | |||
| 1034 | efi_get_variable_t *get_variable; | 1047 | efi_get_variable_t *get_variable; |
| 1035 | efi_get_next_variable_t *get_next_variable; | 1048 | efi_get_next_variable_t *get_next_variable; |
| 1036 | efi_set_variable_t *set_variable; | 1049 | efi_set_variable_t *set_variable; |
| 1050 | efi_set_variable_nonblocking_t *set_variable_nonblocking; | ||
| 1037 | efi_query_variable_store_t *query_variable_store; | 1051 | efi_query_variable_store_t *query_variable_store; |
| 1038 | }; | 1052 | }; |
| 1039 | 1053 | ||
| @@ -1227,4 +1241,7 @@ efi_status_t handle_cmdline_files(efi_system_table_t *sys_table_arg, | |||
| 1227 | unsigned long *load_addr, | 1241 | unsigned long *load_addr, |
| 1228 | unsigned long *load_size); | 1242 | unsigned long *load_size); |
| 1229 | 1243 | ||
| 1244 | efi_status_t efi_parse_options(char *cmdline); | ||
| 1245 | |||
| 1246 | bool efi_runtime_disabled(void); | ||
| 1230 | #endif /* _LINUX_EFI_H */ | 1247 | #endif /* _LINUX_EFI_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index a957d4366c24..9ab779e8a63c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -223,6 +223,13 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, | |||
| 223 | #define ATTR_TIMES_SET (1 << 16) | 223 | #define ATTR_TIMES_SET (1 << 16) |
| 224 | 224 | ||
| 225 | /* | 225 | /* |
| 226 | * Whiteout is represented by a char device. The following constants define the | ||
| 227 | * mode and device number to use. | ||
| 228 | */ | ||
| 229 | #define WHITEOUT_MODE 0 | ||
| 230 | #define WHITEOUT_DEV 0 | ||
| 231 | |||
| 232 | /* | ||
| 226 | * This is the Inode Attributes structure, used for notify_change(). It | 233 | * This is the Inode Attributes structure, used for notify_change(). It |
| 227 | * uses the above definitions as flags, to know which values have changed. | 234 | * uses the above definitions as flags, to know which values have changed. |
| 228 | * Also, in this manner, a Filesystem can look at only the values it cares | 235 | * Also, in this manner, a Filesystem can look at only the values it cares |
| @@ -254,6 +261,12 @@ struct iattr { | |||
| 254 | */ | 261 | */ |
| 255 | #include <linux/quota.h> | 262 | #include <linux/quota.h> |
| 256 | 263 | ||
| 264 | /* | ||
| 265 | * Maximum number of layers of fs stack. Needs to be limited to | ||
| 266 | * prevent kernel stack overflow | ||
| 267 | */ | ||
| 268 | #define FILESYSTEM_MAX_STACK_DEPTH 2 | ||
| 269 | |||
| 257 | /** | 270 | /** |
| 258 | * enum positive_aop_returns - aop return codes with specific semantics | 271 | * enum positive_aop_returns - aop return codes with specific semantics |
| 259 | * | 272 | * |
| @@ -626,11 +639,13 @@ static inline int inode_unhashed(struct inode *inode) | |||
| 626 | * 2: child/target | 639 | * 2: child/target |
| 627 | * 3: xattr | 640 | * 3: xattr |
| 628 | * 4: second non-directory | 641 | * 4: second non-directory |
| 629 | * The last is for certain operations (such as rename) which lock two | 642 | * 5: second parent (when locking independent directories in rename) |
| 643 | * | ||
| 644 | * I_MUTEX_NONDIR2 is for certain operations (such as rename) which lock two | ||
| 630 | * non-directories at once. | 645 | * non-directories at once. |
| 631 | * | 646 | * |
| 632 | * The locking order between these classes is | 647 | * The locking order between these classes is |
| 633 | * parent -> child -> normal -> xattr -> second non-directory | 648 | * parent[2] -> child -> grandchild -> normal -> xattr -> second non-directory |
| 634 | */ | 649 | */ |
| 635 | enum inode_i_mutex_lock_class | 650 | enum inode_i_mutex_lock_class |
| 636 | { | 651 | { |
| @@ -638,7 +653,8 @@ enum inode_i_mutex_lock_class | |||
| 638 | I_MUTEX_PARENT, | 653 | I_MUTEX_PARENT, |
| 639 | I_MUTEX_CHILD, | 654 | I_MUTEX_CHILD, |
| 640 | I_MUTEX_XATTR, | 655 | I_MUTEX_XATTR, |
| 641 | I_MUTEX_NONDIR2 | 656 | I_MUTEX_NONDIR2, |
| 657 | I_MUTEX_PARENT2, | ||
| 642 | }; | 658 | }; |
| 643 | 659 | ||
| 644 | void lock_two_nondirectories(struct inode *, struct inode*); | 660 | void lock_two_nondirectories(struct inode *, struct inode*); |
| @@ -1266,6 +1282,11 @@ struct super_block { | |||
| 1266 | struct list_lru s_dentry_lru ____cacheline_aligned_in_smp; | 1282 | struct list_lru s_dentry_lru ____cacheline_aligned_in_smp; |
| 1267 | struct list_lru s_inode_lru ____cacheline_aligned_in_smp; | 1283 | struct list_lru s_inode_lru ____cacheline_aligned_in_smp; |
| 1268 | struct rcu_head rcu; | 1284 | struct rcu_head rcu; |
| 1285 | |||
| 1286 | /* | ||
| 1287 | * Indicates how deep in a filesystem stack this SB is | ||
| 1288 | */ | ||
| 1289 | int s_stack_depth; | ||
| 1269 | }; | 1290 | }; |
| 1270 | 1291 | ||
| 1271 | extern struct timespec current_fs_time(struct super_block *sb); | 1292 | extern struct timespec current_fs_time(struct super_block *sb); |
| @@ -1398,6 +1419,7 @@ extern int vfs_link(struct dentry *, struct inode *, struct dentry *, struct ino | |||
| 1398 | extern int vfs_rmdir(struct inode *, struct dentry *); | 1419 | extern int vfs_rmdir(struct inode *, struct dentry *); |
| 1399 | extern int vfs_unlink(struct inode *, struct dentry *, struct inode **); | 1420 | extern int vfs_unlink(struct inode *, struct dentry *, struct inode **); |
| 1400 | extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *, struct inode **, unsigned int); | 1421 | extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *, struct inode **, unsigned int); |
| 1422 | extern int vfs_whiteout(struct inode *, struct dentry *); | ||
| 1401 | 1423 | ||
| 1402 | /* | 1424 | /* |
| 1403 | * VFS dentry helper functions. | 1425 | * VFS dentry helper functions. |
| @@ -1528,6 +1550,9 @@ struct inode_operations { | |||
| 1528 | umode_t create_mode, int *opened); | 1550 | umode_t create_mode, int *opened); |
| 1529 | int (*tmpfile) (struct inode *, struct dentry *, umode_t); | 1551 | int (*tmpfile) (struct inode *, struct dentry *, umode_t); |
| 1530 | int (*set_acl)(struct inode *, struct posix_acl *, int); | 1552 | int (*set_acl)(struct inode *, struct posix_acl *, int); |
| 1553 | |||
| 1554 | /* WARNING: probably going away soon, do not use! */ | ||
| 1555 | int (*dentry_open)(struct dentry *, struct file *, const struct cred *); | ||
| 1531 | } ____cacheline_aligned; | 1556 | } ____cacheline_aligned; |
| 1532 | 1557 | ||
| 1533 | ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, | 1558 | ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, |
| @@ -1625,6 +1650,9 @@ struct super_operations { | |||
| 1625 | #define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT) | 1650 | #define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT) |
| 1626 | #define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC) | 1651 | #define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC) |
| 1627 | 1652 | ||
| 1653 | #define IS_WHITEOUT(inode) (S_ISCHR(inode->i_mode) && \ | ||
| 1654 | (inode)->i_rdev == WHITEOUT_DEV) | ||
| 1655 | |||
| 1628 | /* | 1656 | /* |
| 1629 | * Inode state bits. Protected by inode->i_lock | 1657 | * Inode state bits. Protected by inode->i_lock |
| 1630 | * | 1658 | * |
| @@ -2040,6 +2068,7 @@ extern struct file *file_open_name(struct filename *, int, umode_t); | |||
| 2040 | extern struct file *filp_open(const char *, int, umode_t); | 2068 | extern struct file *filp_open(const char *, int, umode_t); |
| 2041 | extern struct file *file_open_root(struct dentry *, struct vfsmount *, | 2069 | extern struct file *file_open_root(struct dentry *, struct vfsmount *, |
| 2042 | const char *, int); | 2070 | const char *, int); |
| 2071 | extern int vfs_open(const struct path *, struct file *, const struct cred *); | ||
| 2043 | extern struct file * dentry_open(const struct path *, int, const struct cred *); | 2072 | extern struct file * dentry_open(const struct path *, int, const struct cred *); |
| 2044 | extern int filp_close(struct file *, fl_owner_t id); | 2073 | extern int filp_close(struct file *, fl_owner_t id); |
| 2045 | 2074 | ||
| @@ -2253,7 +2282,9 @@ extern sector_t bmap(struct inode *, sector_t); | |||
| 2253 | #endif | 2282 | #endif |
| 2254 | extern int notify_change(struct dentry *, struct iattr *, struct inode **); | 2283 | extern int notify_change(struct dentry *, struct iattr *, struct inode **); |
| 2255 | extern int inode_permission(struct inode *, int); | 2284 | extern int inode_permission(struct inode *, int); |
| 2285 | extern int __inode_permission(struct inode *, int); | ||
| 2256 | extern int generic_permission(struct inode *, int); | 2286 | extern int generic_permission(struct inode *, int); |
| 2287 | extern int __check_sticky(struct inode *dir, struct inode *inode); | ||
| 2257 | 2288 | ||
| 2258 | static inline bool execute_ok(struct inode *inode) | 2289 | static inline bool execute_ok(struct inode *inode) |
| 2259 | { | 2290 | { |
| @@ -2438,6 +2469,7 @@ extern ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, lo | |||
| 2438 | extern ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); | 2469 | extern ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); |
| 2439 | 2470 | ||
| 2440 | /* fs/block_dev.c */ | 2471 | /* fs/block_dev.c */ |
| 2472 | extern ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to); | ||
| 2441 | extern ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from); | 2473 | extern ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from); |
| 2442 | extern int blkdev_fsync(struct file *filp, loff_t start, loff_t end, | 2474 | extern int blkdev_fsync(struct file *filp, loff_t start, loff_t end, |
| 2443 | int datasync); | 2475 | int datasync); |
| @@ -2452,6 +2484,9 @@ extern ssize_t iter_file_splice_write(struct pipe_inode_info *, | |||
| 2452 | struct file *, loff_t *, size_t, unsigned int); | 2484 | struct file *, loff_t *, size_t, unsigned int); |
| 2453 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, | 2485 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, |
| 2454 | struct file *out, loff_t *, size_t len, unsigned int flags); | 2486 | struct file *out, loff_t *, size_t len, unsigned int flags); |
| 2487 | extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, | ||
| 2488 | loff_t *opos, size_t len, unsigned int flags); | ||
| 2489 | |||
| 2455 | 2490 | ||
| 2456 | extern void | 2491 | extern void |
| 2457 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); | 2492 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); |
| @@ -2737,6 +2772,14 @@ static inline int is_sxid(umode_t mode) | |||
| 2737 | return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP)); | 2772 | return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP)); |
| 2738 | } | 2773 | } |
| 2739 | 2774 | ||
| 2775 | static inline int check_sticky(struct inode *dir, struct inode *inode) | ||
| 2776 | { | ||
| 2777 | if (!(dir->i_mode & S_ISVTX)) | ||
| 2778 | return 0; | ||
| 2779 | |||
| 2780 | return __check_sticky(dir, inode); | ||
| 2781 | } | ||
| 2782 | |||
| 2740 | static inline void inode_has_no_xattr(struct inode *inode) | 2783 | static inline void inode_has_no_xattr(struct inode *inode) |
| 2741 | { | 2784 | { |
| 2742 | if (!is_sxid(inode->i_mode) && (inode->i_sb->s_flags & MS_NOSEC)) | 2785 | if (!is_sxid(inode->i_mode) && (inode->i_sb->s_flags & MS_NOSEC)) |
diff --git a/include/linux/iio/events.h b/include/linux/iio/events.h index 8bbd7bc1043d..03fa332ad2a8 100644 --- a/include/linux/iio/events.h +++ b/include/linux/iio/events.h | |||
| @@ -72,7 +72,7 @@ struct iio_event_data { | |||
| 72 | 72 | ||
| 73 | #define IIO_EVENT_CODE_EXTRACT_TYPE(mask) ((mask >> 56) & 0xFF) | 73 | #define IIO_EVENT_CODE_EXTRACT_TYPE(mask) ((mask >> 56) & 0xFF) |
| 74 | 74 | ||
| 75 | #define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0xCF) | 75 | #define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0x7F) |
| 76 | 76 | ||
| 77 | #define IIO_EVENT_CODE_EXTRACT_CHAN_TYPE(mask) ((mask >> 32) & 0xFF) | 77 | #define IIO_EVENT_CODE_EXTRACT_CHAN_TYPE(mask) ((mask >> 32) & 0xFF) |
| 78 | 78 | ||
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 0068708161ff..0a21fbefdfbe 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
| @@ -242,7 +242,7 @@ static inline void in_dev_put(struct in_device *idev) | |||
| 242 | static __inline__ __be32 inet_make_mask(int logmask) | 242 | static __inline__ __be32 inet_make_mask(int logmask) |
| 243 | { | 243 | { |
| 244 | if (logmask) | 244 | if (logmask) |
| 245 | return htonl(~((1<<(32-logmask))-1)); | 245 | return htonl(~((1U<<(32-logmask))-1)); |
| 246 | return 0; | 246 | return 0; |
| 247 | } | 247 | } |
| 248 | 248 | ||
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 0dae71e9971c..704b9a599b26 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
| @@ -1042,7 +1042,7 @@ void jbd2_update_log_tail(journal_t *journal, tid_t tid, unsigned long block); | |||
| 1042 | extern void jbd2_journal_commit_transaction(journal_t *); | 1042 | extern void jbd2_journal_commit_transaction(journal_t *); |
| 1043 | 1043 | ||
| 1044 | /* Checkpoint list management */ | 1044 | /* Checkpoint list management */ |
| 1045 | int __jbd2_journal_clean_checkpoint_list(journal_t *journal); | 1045 | void __jbd2_journal_clean_checkpoint_list(journal_t *journal); |
| 1046 | int __jbd2_journal_remove_checkpoint(struct journal_head *); | 1046 | int __jbd2_journal_remove_checkpoint(struct journal_head *); |
| 1047 | void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *); | 1047 | void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *); |
| 1048 | 1048 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 40728cf1c452..3d770f5564b8 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -403,6 +403,7 @@ int vsscanf(const char *, const char *, va_list); | |||
| 403 | extern int get_option(char **str, int *pint); | 403 | extern int get_option(char **str, int *pint); |
| 404 | extern char *get_options(const char *str, int nints, int *ints); | 404 | extern char *get_options(const char *str, int nints, int *ints); |
| 405 | extern unsigned long long memparse(const char *ptr, char **retptr); | 405 | extern unsigned long long memparse(const char *ptr, char **retptr); |
| 406 | extern bool parse_option_str(const char *str, const char *option); | ||
| 406 | 407 | ||
| 407 | extern int core_kernel_text(unsigned long addr); | 408 | extern int core_kernel_text(unsigned long addr); |
| 408 | extern int core_kernel_data(unsigned long addr); | 409 | extern int core_kernel_data(unsigned long addr); |
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 8422b4ed6882..b9376cd5a187 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
| @@ -77,11 +77,6 @@ static inline unsigned int kstat_cpu_irqs_sum(unsigned int cpu) | |||
| 77 | return kstat_cpu(cpu).irqs_sum; | 77 | return kstat_cpu(cpu).irqs_sum; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | /* | ||
| 81 | * Lock/unlock the current runqueue - to extract task statistics: | ||
| 82 | */ | ||
| 83 | extern unsigned long long task_delta_exec(struct task_struct *); | ||
| 84 | |||
| 85 | extern void account_user_time(struct task_struct *, cputime_t, cputime_t); | 80 | extern void account_user_time(struct task_struct *, cputime_t, cputime_t); |
| 86 | extern void account_system_time(struct task_struct *, int, cputime_t, cputime_t); | 81 | extern void account_system_time(struct task_struct *, int, cputime_t, cputime_t); |
| 87 | extern void account_steal_time(cputime_t); | 82 | extern void account_steal_time(cputime_t); |
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index 6b06d378f3df..e465bb15912d 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h | |||
| @@ -283,7 +283,7 @@ struct kgdb_io { | |||
| 283 | 283 | ||
| 284 | extern struct kgdb_arch arch_kgdb_ops; | 284 | extern struct kgdb_arch arch_kgdb_ops; |
| 285 | 285 | ||
| 286 | extern unsigned long __weak kgdb_arch_pc(int exception, struct pt_regs *regs); | 286 | extern unsigned long kgdb_arch_pc(int exception, struct pt_regs *regs); |
| 287 | 287 | ||
| 288 | #ifdef CONFIG_SERIAL_KGDB_NMI | 288 | #ifdef CONFIG_SERIAL_KGDB_NMI |
| 289 | extern int kgdb_register_nmi_console(void); | 289 | extern int kgdb_register_nmi_console(void); |
diff --git a/include/linux/khugepaged.h b/include/linux/khugepaged.h index 6b394f0b5148..eeb307985715 100644 --- a/include/linux/khugepaged.h +++ b/include/linux/khugepaged.h | |||
| @@ -6,7 +6,8 @@ | |||
| 6 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 6 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
| 7 | extern int __khugepaged_enter(struct mm_struct *mm); | 7 | extern int __khugepaged_enter(struct mm_struct *mm); |
| 8 | extern void __khugepaged_exit(struct mm_struct *mm); | 8 | extern void __khugepaged_exit(struct mm_struct *mm); |
| 9 | extern int khugepaged_enter_vma_merge(struct vm_area_struct *vma); | 9 | extern int khugepaged_enter_vma_merge(struct vm_area_struct *vma, |
| 10 | unsigned long vm_flags); | ||
| 10 | 11 | ||
| 11 | #define khugepaged_enabled() \ | 12 | #define khugepaged_enabled() \ |
| 12 | (transparent_hugepage_flags & \ | 13 | (transparent_hugepage_flags & \ |
| @@ -35,13 +36,13 @@ static inline void khugepaged_exit(struct mm_struct *mm) | |||
| 35 | __khugepaged_exit(mm); | 36 | __khugepaged_exit(mm); |
| 36 | } | 37 | } |
| 37 | 38 | ||
| 38 | static inline int khugepaged_enter(struct vm_area_struct *vma) | 39 | static inline int khugepaged_enter(struct vm_area_struct *vma, |
| 40 | unsigned long vm_flags) | ||
| 39 | { | 41 | { |
| 40 | if (!test_bit(MMF_VM_HUGEPAGE, &vma->vm_mm->flags)) | 42 | if (!test_bit(MMF_VM_HUGEPAGE, &vma->vm_mm->flags)) |
| 41 | if ((khugepaged_always() || | 43 | if ((khugepaged_always() || |
| 42 | (khugepaged_req_madv() && | 44 | (khugepaged_req_madv() && (vm_flags & VM_HUGEPAGE))) && |
| 43 | vma->vm_flags & VM_HUGEPAGE)) && | 45 | !(vm_flags & VM_NOHUGEPAGE)) |
| 44 | !(vma->vm_flags & VM_NOHUGEPAGE)) | ||
| 45 | if (__khugepaged_enter(vma->vm_mm)) | 46 | if (__khugepaged_enter(vma->vm_mm)) |
| 46 | return -ENOMEM; | 47 | return -ENOMEM; |
| 47 | return 0; | 48 | return 0; |
| @@ -54,11 +55,13 @@ static inline int khugepaged_fork(struct mm_struct *mm, struct mm_struct *oldmm) | |||
| 54 | static inline void khugepaged_exit(struct mm_struct *mm) | 55 | static inline void khugepaged_exit(struct mm_struct *mm) |
| 55 | { | 56 | { |
| 56 | } | 57 | } |
| 57 | static inline int khugepaged_enter(struct vm_area_struct *vma) | 58 | static inline int khugepaged_enter(struct vm_area_struct *vma, |
| 59 | unsigned long vm_flags) | ||
| 58 | { | 60 | { |
| 59 | return 0; | 61 | return 0; |
| 60 | } | 62 | } |
| 61 | static inline int khugepaged_enter_vma_merge(struct vm_area_struct *vma) | 63 | static inline int khugepaged_enter_vma_merge(struct vm_area_struct *vma, |
| 64 | unsigned long vm_flags) | ||
| 62 | { | 65 | { |
| 63 | return 0; | 66 | return 0; |
| 64 | } | 67 | } |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 28be31f49250..a6059bdf7b03 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -703,7 +703,7 @@ void kvm_arch_sync_events(struct kvm *kvm); | |||
| 703 | int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu); | 703 | int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu); |
| 704 | void kvm_vcpu_kick(struct kvm_vcpu *vcpu); | 704 | void kvm_vcpu_kick(struct kvm_vcpu *vcpu); |
| 705 | 705 | ||
| 706 | bool kvm_is_mmio_pfn(pfn_t pfn); | 706 | bool kvm_is_reserved_pfn(pfn_t pfn); |
| 707 | 707 | ||
| 708 | struct kvm_irq_ack_notifier { | 708 | struct kvm_irq_ack_notifier { |
| 709 | struct hlist_node link; | 709 | struct hlist_node link; |
| @@ -1080,6 +1080,7 @@ void kvm_device_get(struct kvm_device *dev); | |||
| 1080 | void kvm_device_put(struct kvm_device *dev); | 1080 | void kvm_device_put(struct kvm_device *dev); |
| 1081 | struct kvm_device *kvm_device_from_filp(struct file *filp); | 1081 | struct kvm_device *kvm_device_from_filp(struct file *filp); |
| 1082 | int kvm_register_device_ops(struct kvm_device_ops *ops, u32 type); | 1082 | int kvm_register_device_ops(struct kvm_device_ops *ops, u32 type); |
| 1083 | void kvm_unregister_device_ops(u32 type); | ||
| 1083 | 1084 | ||
| 1084 | extern struct kvm_device_ops kvm_mpic_ops; | 1085 | extern struct kvm_device_ops kvm_mpic_ops; |
| 1085 | extern struct kvm_device_ops kvm_xics_ops; | 1086 | extern struct kvm_device_ops kvm_xics_ops; |
diff --git a/include/linux/leds.h b/include/linux/leds.h index e43686472197..a57611d0c94e 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
| @@ -13,8 +13,8 @@ | |||
| 13 | #define __LINUX_LEDS_H_INCLUDED | 13 | #define __LINUX_LEDS_H_INCLUDED |
| 14 | 14 | ||
| 15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
| 16 | #include <linux/spinlock.h> | ||
| 17 | #include <linux/rwsem.h> | 16 | #include <linux/rwsem.h> |
| 17 | #include <linux/spinlock.h> | ||
| 18 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
| 19 | #include <linux/workqueue.h> | 19 | #include <linux/workqueue.h> |
| 20 | 20 | ||
| @@ -31,8 +31,8 @@ enum led_brightness { | |||
| 31 | 31 | ||
| 32 | struct led_classdev { | 32 | struct led_classdev { |
| 33 | const char *name; | 33 | const char *name; |
| 34 | int brightness; | 34 | enum led_brightness brightness; |
| 35 | int max_brightness; | 35 | enum led_brightness max_brightness; |
| 36 | int flags; | 36 | int flags; |
| 37 | 37 | ||
| 38 | /* Lower 16 bits reflect status */ | 38 | /* Lower 16 bits reflect status */ |
| @@ -140,6 +140,16 @@ extern void led_blink_set_oneshot(struct led_classdev *led_cdev, | |||
| 140 | */ | 140 | */ |
| 141 | extern void led_set_brightness(struct led_classdev *led_cdev, | 141 | extern void led_set_brightness(struct led_classdev *led_cdev, |
| 142 | enum led_brightness brightness); | 142 | enum led_brightness brightness); |
| 143 | /** | ||
| 144 | * led_update_brightness - update LED brightness | ||
| 145 | * @led_cdev: the LED to query | ||
| 146 | * | ||
| 147 | * Get an LED's current brightness and update led_cdev->brightness | ||
| 148 | * member with the obtained value. | ||
| 149 | * | ||
| 150 | * Returns: 0 on success or negative error value on failure | ||
| 151 | */ | ||
| 152 | extern int led_update_brightness(struct led_classdev *led_cdev); | ||
| 143 | 153 | ||
| 144 | /* | 154 | /* |
| 145 | * LED Triggers | 155 | * LED Triggers |
diff --git a/include/linux/mailbox_client.h b/include/linux/mailbox_client.h new file mode 100644 index 000000000000..307d9cab2026 --- /dev/null +++ b/include/linux/mailbox_client.h | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2013-2014 Linaro Ltd. | ||
| 3 | * Author: Jassi Brar <jassisinghbrar@gmail.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __MAILBOX_CLIENT_H | ||
| 11 | #define __MAILBOX_CLIENT_H | ||
| 12 | |||
| 13 | #include <linux/of.h> | ||
| 14 | #include <linux/device.h> | ||
| 15 | |||
| 16 | struct mbox_chan; | ||
| 17 | |||
| 18 | /** | ||
| 19 | * struct mbox_client - User of a mailbox | ||
| 20 | * @dev: The client device | ||
| 21 | * @tx_block: If the mbox_send_message should block until data is | ||
| 22 | * transmitted. | ||
| 23 | * @tx_tout: Max block period in ms before TX is assumed failure | ||
| 24 | * @knows_txdone: If the client could run the TX state machine. Usually | ||
| 25 | * if the client receives some ACK packet for transmission. | ||
| 26 | * Unused if the controller already has TX_Done/RTR IRQ. | ||
| 27 | * @rx_callback: Atomic callback to provide client the data received | ||
| 28 | * @tx_done: Atomic callback to tell client of data transmission | ||
| 29 | */ | ||
| 30 | struct mbox_client { | ||
| 31 | struct device *dev; | ||
| 32 | bool tx_block; | ||
| 33 | unsigned long tx_tout; | ||
| 34 | bool knows_txdone; | ||
| 35 | |||
| 36 | void (*rx_callback)(struct mbox_client *cl, void *mssg); | ||
| 37 | void (*tx_done)(struct mbox_client *cl, void *mssg, int r); | ||
| 38 | }; | ||
| 39 | |||
| 40 | struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index); | ||
| 41 | int mbox_send_message(struct mbox_chan *chan, void *mssg); | ||
| 42 | void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */ | ||
| 43 | bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */ | ||
| 44 | void mbox_free_channel(struct mbox_chan *chan); /* may sleep */ | ||
| 45 | |||
| 46 | #endif /* __MAILBOX_CLIENT_H */ | ||
diff --git a/include/linux/mailbox_controller.h b/include/linux/mailbox_controller.h new file mode 100644 index 000000000000..d4cf96f07cfc --- /dev/null +++ b/include/linux/mailbox_controller.h | |||
| @@ -0,0 +1,133 @@ | |||
| 1 | /* | ||
| 2 | * This program is free software; you can redistribute it and/or modify | ||
| 3 | * it under the terms of the GNU General Public License version 2 as | ||
| 4 | * published by the Free Software Foundation. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef __MAILBOX_CONTROLLER_H | ||
| 8 | #define __MAILBOX_CONTROLLER_H | ||
| 9 | |||
| 10 | #include <linux/of.h> | ||
| 11 | #include <linux/types.h> | ||
| 12 | #include <linux/timer.h> | ||
| 13 | #include <linux/device.h> | ||
| 14 | #include <linux/completion.h> | ||
| 15 | |||
| 16 | struct mbox_chan; | ||
| 17 | |||
| 18 | /** | ||
| 19 | * struct mbox_chan_ops - methods to control mailbox channels | ||
| 20 | * @send_data: The API asks the MBOX controller driver, in atomic | ||
| 21 | * context try to transmit a message on the bus. Returns 0 if | ||
| 22 | * data is accepted for transmission, -EBUSY while rejecting | ||
| 23 | * if the remote hasn't yet read the last data sent. Actual | ||
| 24 | * transmission of data is reported by the controller via | ||
| 25 | * mbox_chan_txdone (if it has some TX ACK irq). It must not | ||
| 26 | * sleep. | ||
| 27 | * @startup: Called when a client requests the chan. The controller | ||
| 28 | * could ask clients for additional parameters of communication | ||
| 29 | * to be provided via client's chan_data. This call may | ||
| 30 | * block. After this call the Controller must forward any | ||
| 31 | * data received on the chan by calling mbox_chan_received_data. | ||
| 32 | * The controller may do stuff that need to sleep. | ||
| 33 | * @shutdown: Called when a client relinquishes control of a chan. | ||
| 34 | * This call may block too. The controller must not forward | ||
| 35 | * any received data anymore. | ||
| 36 | * The controller may do stuff that need to sleep. | ||
| 37 | * @last_tx_done: If the controller sets 'txdone_poll', the API calls | ||
| 38 | * this to poll status of last TX. The controller must | ||
| 39 | * give priority to IRQ method over polling and never | ||
| 40 | * set both txdone_poll and txdone_irq. Only in polling | ||
| 41 | * mode 'send_data' is expected to return -EBUSY. | ||
| 42 | * The controller may do stuff that need to sleep/block. | ||
| 43 | * Used only if txdone_poll:=true && txdone_irq:=false | ||
| 44 | * @peek_data: Atomic check for any received data. Return true if controller | ||
| 45 | * has some data to push to the client. False otherwise. | ||
| 46 | */ | ||
| 47 | struct mbox_chan_ops { | ||
| 48 | int (*send_data)(struct mbox_chan *chan, void *data); | ||
| 49 | int (*startup)(struct mbox_chan *chan); | ||
| 50 | void (*shutdown)(struct mbox_chan *chan); | ||
| 51 | bool (*last_tx_done)(struct mbox_chan *chan); | ||
| 52 | bool (*peek_data)(struct mbox_chan *chan); | ||
| 53 | }; | ||
| 54 | |||
| 55 | /** | ||
| 56 | * struct mbox_controller - Controller of a class of communication channels | ||
| 57 | * @dev: Device backing this controller | ||
| 58 | * @ops: Operators that work on each communication chan | ||
| 59 | * @chans: Array of channels | ||
| 60 | * @num_chans: Number of channels in the 'chans' array. | ||
| 61 | * @txdone_irq: Indicates if the controller can report to API when | ||
| 62 | * the last transmitted data was read by the remote. | ||
| 63 | * Eg, if it has some TX ACK irq. | ||
| 64 | * @txdone_poll: If the controller can read but not report the TX | ||
| 65 | * done. Ex, some register shows the TX status but | ||
| 66 | * no interrupt rises. Ignored if 'txdone_irq' is set. | ||
| 67 | * @txpoll_period: If 'txdone_poll' is in effect, the API polls for | ||
| 68 | * last TX's status after these many millisecs | ||
| 69 | * @of_xlate: Controller driver specific mapping of channel via DT | ||
| 70 | * @poll: API private. Used to poll for TXDONE on all channels. | ||
| 71 | * @node: API private. To hook into list of controllers. | ||
| 72 | */ | ||
| 73 | struct mbox_controller { | ||
| 74 | struct device *dev; | ||
| 75 | struct mbox_chan_ops *ops; | ||
| 76 | struct mbox_chan *chans; | ||
| 77 | int num_chans; | ||
| 78 | bool txdone_irq; | ||
| 79 | bool txdone_poll; | ||
| 80 | unsigned txpoll_period; | ||
| 81 | struct mbox_chan *(*of_xlate)(struct mbox_controller *mbox, | ||
| 82 | const struct of_phandle_args *sp); | ||
| 83 | /* Internal to API */ | ||
| 84 | struct timer_list poll; | ||
| 85 | struct list_head node; | ||
| 86 | }; | ||
| 87 | |||
| 88 | /* | ||
| 89 | * The length of circular buffer for queuing messages from a client. | ||
| 90 | * 'msg_count' tracks the number of buffered messages while 'msg_free' | ||
| 91 | * is the index where the next message would be buffered. | ||
| 92 | * We shouldn't need it too big because every transfer is interrupt | ||
| 93 | * triggered and if we have lots of data to transfer, the interrupt | ||
| 94 | * latencies are going to be the bottleneck, not the buffer length. | ||
| 95 | * Besides, mbox_send_message could be called from atomic context and | ||
| 96 | * the client could also queue another message from the notifier 'tx_done' | ||
| 97 | * of the last transfer done. | ||
| 98 | * REVISIT: If too many platforms see the "Try increasing MBOX_TX_QUEUE_LEN" | ||
| 99 | * print, it needs to be taken from config option or somesuch. | ||
| 100 | */ | ||
| 101 | #define MBOX_TX_QUEUE_LEN 20 | ||
| 102 | |||
| 103 | /** | ||
| 104 | * struct mbox_chan - s/w representation of a communication chan | ||
| 105 | * @mbox: Pointer to the parent/provider of this channel | ||
| 106 | * @txdone_method: Way to detect TXDone chosen by the API | ||
| 107 | * @cl: Pointer to the current owner of this channel | ||
| 108 | * @tx_complete: Transmission completion | ||
| 109 | * @active_req: Currently active request hook | ||
| 110 | * @msg_count: No. of mssg currently queued | ||
| 111 | * @msg_free: Index of next available mssg slot | ||
| 112 | * @msg_data: Hook for data packet | ||
| 113 | * @lock: Serialise access to the channel | ||
| 114 | * @con_priv: Hook for controller driver to attach private data | ||
| 115 | */ | ||
| 116 | struct mbox_chan { | ||
| 117 | struct mbox_controller *mbox; | ||
| 118 | unsigned txdone_method; | ||
| 119 | struct mbox_client *cl; | ||
| 120 | struct completion tx_complete; | ||
| 121 | void *active_req; | ||
| 122 | unsigned msg_count, msg_free; | ||
| 123 | void *msg_data[MBOX_TX_QUEUE_LEN]; | ||
| 124 | spinlock_t lock; /* Serialise access to the channel */ | ||
| 125 | void *con_priv; | ||
| 126 | }; | ||
| 127 | |||
| 128 | int mbox_controller_register(struct mbox_controller *mbox); /* can sleep */ | ||
| 129 | void mbox_controller_unregister(struct mbox_controller *mbox); /* can sleep */ | ||
| 130 | void mbox_chan_received_data(struct mbox_chan *chan, void *data); /* atomic */ | ||
| 131 | void mbox_chan_txdone(struct mbox_chan *chan, int r); /* atomic */ | ||
| 132 | |||
| 133 | #endif /* __MAILBOX_CONTROLLER_H */ | ||
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 19df5d857411..6b75640ef5ab 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -139,48 +139,23 @@ static inline bool mem_cgroup_disabled(void) | |||
| 139 | return false; | 139 | return false; |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | void __mem_cgroup_begin_update_page_stat(struct page *page, bool *locked, | 142 | struct mem_cgroup *mem_cgroup_begin_page_stat(struct page *page, bool *locked, |
| 143 | unsigned long *flags); | 143 | unsigned long *flags); |
| 144 | 144 | void mem_cgroup_end_page_stat(struct mem_cgroup *memcg, bool locked, | |
| 145 | extern atomic_t memcg_moving; | 145 | unsigned long flags); |
| 146 | 146 | void mem_cgroup_update_page_stat(struct mem_cgroup *memcg, | |
| 147 | static inline void mem_cgroup_begin_update_page_stat(struct page *page, | 147 | enum mem_cgroup_stat_index idx, int val); |
| 148 | bool *locked, unsigned long *flags) | 148 | |
| 149 | { | 149 | static inline void mem_cgroup_inc_page_stat(struct mem_cgroup *memcg, |
| 150 | if (mem_cgroup_disabled()) | ||
| 151 | return; | ||
| 152 | rcu_read_lock(); | ||
| 153 | *locked = false; | ||
| 154 | if (atomic_read(&memcg_moving)) | ||
| 155 | __mem_cgroup_begin_update_page_stat(page, locked, flags); | ||
| 156 | } | ||
| 157 | |||
| 158 | void __mem_cgroup_end_update_page_stat(struct page *page, | ||
| 159 | unsigned long *flags); | ||
| 160 | static inline void mem_cgroup_end_update_page_stat(struct page *page, | ||
| 161 | bool *locked, unsigned long *flags) | ||
| 162 | { | ||
| 163 | if (mem_cgroup_disabled()) | ||
| 164 | return; | ||
| 165 | if (*locked) | ||
| 166 | __mem_cgroup_end_update_page_stat(page, flags); | ||
| 167 | rcu_read_unlock(); | ||
| 168 | } | ||
| 169 | |||
| 170 | void mem_cgroup_update_page_stat(struct page *page, | ||
| 171 | enum mem_cgroup_stat_index idx, | ||
| 172 | int val); | ||
| 173 | |||
| 174 | static inline void mem_cgroup_inc_page_stat(struct page *page, | ||
| 175 | enum mem_cgroup_stat_index idx) | 150 | enum mem_cgroup_stat_index idx) |
| 176 | { | 151 | { |
| 177 | mem_cgroup_update_page_stat(page, idx, 1); | 152 | mem_cgroup_update_page_stat(memcg, idx, 1); |
| 178 | } | 153 | } |
| 179 | 154 | ||
| 180 | static inline void mem_cgroup_dec_page_stat(struct page *page, | 155 | static inline void mem_cgroup_dec_page_stat(struct mem_cgroup *memcg, |
| 181 | enum mem_cgroup_stat_index idx) | 156 | enum mem_cgroup_stat_index idx) |
| 182 | { | 157 | { |
| 183 | mem_cgroup_update_page_stat(page, idx, -1); | 158 | mem_cgroup_update_page_stat(memcg, idx, -1); |
| 184 | } | 159 | } |
| 185 | 160 | ||
| 186 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | 161 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
| @@ -315,13 +290,14 @@ mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p) | |||
| 315 | { | 290 | { |
| 316 | } | 291 | } |
| 317 | 292 | ||
| 318 | static inline void mem_cgroup_begin_update_page_stat(struct page *page, | 293 | static inline struct mem_cgroup *mem_cgroup_begin_page_stat(struct page *page, |
| 319 | bool *locked, unsigned long *flags) | 294 | bool *locked, unsigned long *flags) |
| 320 | { | 295 | { |
| 296 | return NULL; | ||
| 321 | } | 297 | } |
| 322 | 298 | ||
| 323 | static inline void mem_cgroup_end_update_page_stat(struct page *page, | 299 | static inline void mem_cgroup_end_page_stat(struct mem_cgroup *memcg, |
| 324 | bool *locked, unsigned long *flags) | 300 | bool locked, unsigned long flags) |
| 325 | { | 301 | { |
| 326 | } | 302 | } |
| 327 | 303 | ||
| @@ -343,12 +319,12 @@ static inline bool mem_cgroup_oom_synchronize(bool wait) | |||
| 343 | return false; | 319 | return false; |
| 344 | } | 320 | } |
| 345 | 321 | ||
| 346 | static inline void mem_cgroup_inc_page_stat(struct page *page, | 322 | static inline void mem_cgroup_inc_page_stat(struct mem_cgroup *memcg, |
| 347 | enum mem_cgroup_stat_index idx) | 323 | enum mem_cgroup_stat_index idx) |
| 348 | { | 324 | { |
| 349 | } | 325 | } |
| 350 | 326 | ||
| 351 | static inline void mem_cgroup_dec_page_stat(struct page *page, | 327 | static inline void mem_cgroup_dec_page_stat(struct mem_cgroup *memcg, |
| 352 | enum mem_cgroup_stat_index idx) | 328 | enum mem_cgroup_stat_index idx) |
| 353 | { | 329 | { |
| 354 | } | 330 | } |
diff --git a/include/linux/memory.h b/include/linux/memory.h index bb7384e3c3d8..8b8d8d12348e 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
| @@ -35,7 +35,7 @@ struct memory_block { | |||
| 35 | }; | 35 | }; |
| 36 | 36 | ||
| 37 | int arch_get_memory_phys_device(unsigned long start_pfn); | 37 | int arch_get_memory_phys_device(unsigned long start_pfn); |
| 38 | unsigned long __weak memory_block_size_bytes(void); | 38 | unsigned long memory_block_size_bytes(void); |
| 39 | 39 | ||
| 40 | /* These states are exposed to userspace as text strings in sysfs */ | 40 | /* These states are exposed to userspace as text strings in sysfs */ |
| 41 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ | 41 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ |
diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h index f34723f7663c..910e3aa1e965 100644 --- a/include/linux/mfd/arizona/core.h +++ b/include/linux/mfd/arizona/core.h | |||
| @@ -141,6 +141,7 @@ struct arizona { | |||
| 141 | 141 | ||
| 142 | uint16_t dac_comp_coeff; | 142 | uint16_t dac_comp_coeff; |
| 143 | uint8_t dac_comp_enabled; | 143 | uint8_t dac_comp_enabled; |
| 144 | struct mutex dac_comp_lock; | ||
| 144 | }; | 145 | }; |
| 145 | 146 | ||
| 146 | int arizona_clk32k_enable(struct arizona *arizona); | 147 | int arizona_clk32k_enable(struct arizona *arizona); |
diff --git a/include/linux/mfd/davinci_voicecodec.h b/include/linux/mfd/davinci_voicecodec.h index cb01496bfa49..8e1cdbef3dad 100644 --- a/include/linux/mfd/davinci_voicecodec.h +++ b/include/linux/mfd/davinci_voicecodec.h | |||
| @@ -99,12 +99,6 @@ struct davinci_vcif { | |||
| 99 | dma_addr_t dma_rx_addr; | 99 | dma_addr_t dma_rx_addr; |
| 100 | }; | 100 | }; |
| 101 | 101 | ||
| 102 | struct cq93vc { | ||
| 103 | struct platform_device *pdev; | ||
| 104 | struct snd_soc_codec *codec; | ||
| 105 | u32 sysclk; | ||
| 106 | }; | ||
| 107 | |||
| 108 | struct davinci_vc; | 102 | struct davinci_vc; |
| 109 | 103 | ||
| 110 | struct davinci_vc { | 104 | struct davinci_vc { |
| @@ -122,7 +116,6 @@ struct davinci_vc { | |||
| 122 | 116 | ||
| 123 | /* Client devices */ | 117 | /* Client devices */ |
| 124 | struct davinci_vcif davinci_vcif; | 118 | struct davinci_vcif davinci_vcif; |
| 125 | struct cq93vc cq93vc; | ||
| 126 | }; | 119 | }; |
| 127 | 120 | ||
| 128 | #endif | 121 | #endif |
diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h index fc17d56581b2..582e67f34054 100644 --- a/include/linux/mfd/max77693-private.h +++ b/include/linux/mfd/max77693-private.h | |||
| @@ -330,6 +330,13 @@ enum max77693_irq_source { | |||
| 330 | MAX77693_IRQ_GROUP_NR, | 330 | MAX77693_IRQ_GROUP_NR, |
| 331 | }; | 331 | }; |
| 332 | 332 | ||
| 333 | #define SRC_IRQ_CHARGER BIT(0) | ||
| 334 | #define SRC_IRQ_TOP BIT(1) | ||
| 335 | #define SRC_IRQ_FLASH BIT(2) | ||
| 336 | #define SRC_IRQ_MUIC BIT(3) | ||
| 337 | #define SRC_IRQ_ALL (SRC_IRQ_CHARGER | SRC_IRQ_TOP \ | ||
| 338 | | SRC_IRQ_FLASH | SRC_IRQ_MUIC) | ||
| 339 | |||
| 333 | #define LED_IRQ_FLED2_OPEN BIT(0) | 340 | #define LED_IRQ_FLED2_OPEN BIT(0) |
| 334 | #define LED_IRQ_FLED2_SHORT BIT(1) | 341 | #define LED_IRQ_FLED2_SHORT BIT(1) |
| 335 | #define LED_IRQ_FLED1_OPEN BIT(2) | 342 | #define LED_IRQ_FLED1_OPEN BIT(2) |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 02d11ee7f19d..b46461116cd2 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -1176,6 +1176,7 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, | |||
| 1176 | 1176 | ||
| 1177 | extern void truncate_pagecache(struct inode *inode, loff_t new); | 1177 | extern void truncate_pagecache(struct inode *inode, loff_t new); |
| 1178 | extern void truncate_setsize(struct inode *inode, loff_t newsize); | 1178 | extern void truncate_setsize(struct inode *inode, loff_t newsize); |
| 1179 | void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to); | ||
| 1179 | void truncate_pagecache_range(struct inode *inode, loff_t offset, loff_t end); | 1180 | void truncate_pagecache_range(struct inode *inode, loff_t offset, loff_t end); |
| 1180 | int truncate_inode_page(struct address_space *mapping, struct page *page); | 1181 | int truncate_inode_page(struct address_space *mapping, struct page *page); |
| 1181 | int generic_error_remove_page(struct address_space *mapping, struct page *page); | 1182 | int generic_error_remove_page(struct address_space *mapping, struct page *page); |
| @@ -1234,7 +1235,6 @@ int __set_page_dirty_no_writeback(struct page *page); | |||
| 1234 | int redirty_page_for_writepage(struct writeback_control *wbc, | 1235 | int redirty_page_for_writepage(struct writeback_control *wbc, |
| 1235 | struct page *page); | 1236 | struct page *page); |
| 1236 | void account_page_dirtied(struct page *page, struct address_space *mapping); | 1237 | void account_page_dirtied(struct page *page, struct address_space *mapping); |
| 1237 | void account_page_writeback(struct page *page); | ||
| 1238 | int set_page_dirty(struct page *page); | 1238 | int set_page_dirty(struct page *page); |
| 1239 | int set_page_dirty_lock(struct page *page); | 1239 | int set_page_dirty_lock(struct page *page); |
| 1240 | int clear_page_dirty_for_io(struct page *page); | 1240 | int clear_page_dirty_for_io(struct page *page); |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 48bf12ef6620..ffe66e381c04 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -431,6 +431,15 @@ struct zone { | |||
| 431 | */ | 431 | */ |
| 432 | int nr_migrate_reserve_block; | 432 | int nr_migrate_reserve_block; |
| 433 | 433 | ||
| 434 | #ifdef CONFIG_MEMORY_ISOLATION | ||
| 435 | /* | ||
| 436 | * Number of isolated pageblock. It is used to solve incorrect | ||
| 437 | * freepage counting problem due to racy retrieving migratetype | ||
| 438 | * of pageblock. Protected by zone->lock. | ||
| 439 | */ | ||
| 440 | unsigned long nr_isolate_pageblock; | ||
| 441 | #endif | ||
| 442 | |||
| 434 | #ifdef CONFIG_MEMORY_HOTPLUG | 443 | #ifdef CONFIG_MEMORY_HOTPLUG |
| 435 | /* see spanned/present_pages for more description */ | 444 | /* see spanned/present_pages for more description */ |
| 436 | seqlock_t span_seqlock; | 445 | seqlock_t span_seqlock; |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 9262e4bf0cc3..c2c561dc0114 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
| @@ -81,6 +81,9 @@ extern struct vfsmount *mntget(struct vfsmount *mnt); | |||
| 81 | extern struct vfsmount *mnt_clone_internal(struct path *path); | 81 | extern struct vfsmount *mnt_clone_internal(struct path *path); |
| 82 | extern int __mnt_is_readonly(struct vfsmount *mnt); | 82 | extern int __mnt_is_readonly(struct vfsmount *mnt); |
| 83 | 83 | ||
| 84 | struct path; | ||
| 85 | extern struct vfsmount *clone_private_mount(struct path *path); | ||
| 86 | |||
| 84 | struct file_system_type; | 87 | struct file_system_type; |
| 85 | extern struct vfsmount *vfs_kern_mount(struct file_system_type *type, | 88 | extern struct vfsmount *vfs_kern_mount(struct file_system_type *type, |
| 86 | int flags, const char *name, | 89 | int flags, const char *name, |
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index 9e6294f32ba8..046a0a2e4c4e 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h | |||
| @@ -187,32 +187,17 @@ struct spi_nor { | |||
| 187 | /** | 187 | /** |
| 188 | * spi_nor_scan() - scan the SPI NOR | 188 | * spi_nor_scan() - scan the SPI NOR |
| 189 | * @nor: the spi_nor structure | 189 | * @nor: the spi_nor structure |
| 190 | * @id: the spi_device_id provided by the driver | 190 | * @name: the chip type name |
| 191 | * @mode: the read mode supported by the driver | 191 | * @mode: the read mode supported by the driver |
| 192 | * | 192 | * |
| 193 | * The drivers can use this fuction to scan the SPI NOR. | 193 | * The drivers can use this fuction to scan the SPI NOR. |
| 194 | * In the scanning, it will try to get all the necessary information to | 194 | * In the scanning, it will try to get all the necessary information to |
| 195 | * fill the mtd_info{} and the spi_nor{}. | 195 | * fill the mtd_info{} and the spi_nor{}. |
| 196 | * | 196 | * |
| 197 | * The board may assigns a spi_device_id with @id which be used to compared with | 197 | * The chip type name can be provided through the @name parameter. |
| 198 | * the spi_device_id detected by the scanning. | ||
| 199 | * | 198 | * |
| 200 | * Return: 0 for success, others for failure. | 199 | * Return: 0 for success, others for failure. |
| 201 | */ | 200 | */ |
| 202 | int spi_nor_scan(struct spi_nor *nor, const struct spi_device_id *id, | 201 | int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode); |
| 203 | enum read_mode mode); | ||
| 204 | extern const struct spi_device_id spi_nor_ids[]; | ||
| 205 | |||
| 206 | /** | ||
| 207 | * spi_nor_match_id() - find the spi_device_id by the name | ||
| 208 | * @name: the name of the spi_device_id | ||
| 209 | * | ||
| 210 | * The drivers use this function to find the spi_device_id | ||
| 211 | * specified by the @name. | ||
| 212 | * | ||
| 213 | * Return: returns the right spi_device_id pointer on success, | ||
| 214 | * and returns NULL on failure. | ||
| 215 | */ | ||
| 216 | const struct spi_device_id *spi_nor_match_id(char *name); | ||
| 217 | 202 | ||
| 218 | #endif | 203 | #endif |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 983876f24aed..47ebb4fafd87 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -1224,11 +1224,22 @@ struct nfs41_free_stateid_res { | |||
| 1224 | unsigned int status; | 1224 | unsigned int status; |
| 1225 | }; | 1225 | }; |
| 1226 | 1226 | ||
| 1227 | static inline void | ||
| 1228 | nfs_free_pnfs_ds_cinfo(struct pnfs_ds_commit_info *cinfo) | ||
| 1229 | { | ||
| 1230 | kfree(cinfo->buckets); | ||
| 1231 | } | ||
| 1232 | |||
| 1227 | #else | 1233 | #else |
| 1228 | 1234 | ||
| 1229 | struct pnfs_ds_commit_info { | 1235 | struct pnfs_ds_commit_info { |
| 1230 | }; | 1236 | }; |
| 1231 | 1237 | ||
| 1238 | static inline void | ||
| 1239 | nfs_free_pnfs_ds_cinfo(struct pnfs_ds_commit_info *cinfo) | ||
| 1240 | { | ||
| 1241 | } | ||
| 1242 | |||
| 1232 | #endif /* CONFIG_NFS_V4_1 */ | 1243 | #endif /* CONFIG_NFS_V4_1 */ |
| 1233 | 1244 | ||
| 1234 | #ifdef CONFIG_NFS_V4_2 | 1245 | #ifdef CONFIG_NFS_V4_2 |
diff --git a/include/linux/of.h b/include/linux/of.h index 6545e7aec7bb..29f0adc5f3e4 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -267,14 +267,12 @@ extern int of_property_read_u64(const struct device_node *np, | |||
| 267 | extern int of_property_read_string(struct device_node *np, | 267 | extern int of_property_read_string(struct device_node *np, |
| 268 | const char *propname, | 268 | const char *propname, |
| 269 | const char **out_string); | 269 | const char **out_string); |
| 270 | extern int of_property_read_string_index(struct device_node *np, | ||
| 271 | const char *propname, | ||
| 272 | int index, const char **output); | ||
| 273 | extern int of_property_match_string(struct device_node *np, | 270 | extern int of_property_match_string(struct device_node *np, |
| 274 | const char *propname, | 271 | const char *propname, |
| 275 | const char *string); | 272 | const char *string); |
| 276 | extern int of_property_count_strings(struct device_node *np, | 273 | extern int of_property_read_string_helper(struct device_node *np, |
| 277 | const char *propname); | 274 | const char *propname, |
| 275 | const char **out_strs, size_t sz, int index); | ||
| 278 | extern int of_device_is_compatible(const struct device_node *device, | 276 | extern int of_device_is_compatible(const struct device_node *device, |
| 279 | const char *); | 277 | const char *); |
| 280 | extern int of_device_is_available(const struct device_node *device); | 278 | extern int of_device_is_available(const struct device_node *device); |
| @@ -486,15 +484,9 @@ static inline int of_property_read_string(struct device_node *np, | |||
| 486 | return -ENOSYS; | 484 | return -ENOSYS; |
| 487 | } | 485 | } |
| 488 | 486 | ||
| 489 | static inline int of_property_read_string_index(struct device_node *np, | 487 | static inline int of_property_read_string_helper(struct device_node *np, |
| 490 | const char *propname, int index, | 488 | const char *propname, |
| 491 | const char **out_string) | 489 | const char **out_strs, size_t sz, int index) |
| 492 | { | ||
| 493 | return -ENOSYS; | ||
| 494 | } | ||
| 495 | |||
| 496 | static inline int of_property_count_strings(struct device_node *np, | ||
| 497 | const char *propname) | ||
| 498 | { | 490 | { |
| 499 | return -ENOSYS; | 491 | return -ENOSYS; |
| 500 | } | 492 | } |
| @@ -668,6 +660,70 @@ static inline int of_property_count_u64_elems(const struct device_node *np, | |||
| 668 | } | 660 | } |
| 669 | 661 | ||
| 670 | /** | 662 | /** |
| 663 | * of_property_read_string_array() - Read an array of strings from a multiple | ||
| 664 | * strings property. | ||
| 665 | * @np: device node from which the property value is to be read. | ||
| 666 | * @propname: name of the property to be searched. | ||
| 667 | * @out_strs: output array of string pointers. | ||
| 668 | * @sz: number of array elements to read. | ||
| 669 | * | ||
| 670 | * Search for a property in a device tree node and retrieve a list of | ||
| 671 | * terminated string values (pointer to data, not a copy) in that property. | ||
| 672 | * | ||
| 673 | * If @out_strs is NULL, the number of strings in the property is returned. | ||
| 674 | */ | ||
| 675 | static inline int of_property_read_string_array(struct device_node *np, | ||
| 676 | const char *propname, const char **out_strs, | ||
| 677 | size_t sz) | ||
| 678 | { | ||
| 679 | return of_property_read_string_helper(np, propname, out_strs, sz, 0); | ||
| 680 | } | ||
| 681 | |||
| 682 | /** | ||
| 683 | * of_property_count_strings() - Find and return the number of strings from a | ||
| 684 | * multiple strings property. | ||
| 685 | * @np: device node from which the property value is to be read. | ||
| 686 | * @propname: name of the property to be searched. | ||
| 687 | * | ||
| 688 | * Search for a property in a device tree node and retrieve the number of null | ||
| 689 | * terminated string contain in it. Returns the number of strings on | ||
| 690 | * success, -EINVAL if the property does not exist, -ENODATA if property | ||
| 691 | * does not have a value, and -EILSEQ if the string is not null-terminated | ||
| 692 | * within the length of the property data. | ||
| 693 | */ | ||
| 694 | static inline int of_property_count_strings(struct device_node *np, | ||
| 695 | const char *propname) | ||
| 696 | { | ||
| 697 | return of_property_read_string_helper(np, propname, NULL, 0, 0); | ||
| 698 | } | ||
| 699 | |||
| 700 | /** | ||
| 701 | * of_property_read_string_index() - Find and read a string from a multiple | ||
| 702 | * strings property. | ||
| 703 | * @np: device node from which the property value is to be read. | ||
| 704 | * @propname: name of the property to be searched. | ||
| 705 | * @index: index of the string in the list of strings | ||
| 706 | * @out_string: pointer to null terminated return string, modified only if | ||
| 707 | * return value is 0. | ||
| 708 | * | ||
| 709 | * Search for a property in a device tree node and retrieve a null | ||
| 710 | * terminated string value (pointer to data, not a copy) in the list of strings | ||
| 711 | * contained in that property. | ||
| 712 | * Returns 0 on success, -EINVAL if the property does not exist, -ENODATA if | ||
| 713 | * property does not have a value, and -EILSEQ if the string is not | ||
| 714 | * null-terminated within the length of the property data. | ||
| 715 | * | ||
| 716 | * The out_string pointer is modified only if a valid string can be decoded. | ||
| 717 | */ | ||
| 718 | static inline int of_property_read_string_index(struct device_node *np, | ||
| 719 | const char *propname, | ||
| 720 | int index, const char **output) | ||
| 721 | { | ||
| 722 | int rc = of_property_read_string_helper(np, propname, output, 1, index); | ||
| 723 | return rc < 0 ? rc : 0; | ||
| 724 | } | ||
| 725 | |||
| 726 | /** | ||
| 671 | * of_property_read_bool - Findfrom a property | 727 | * of_property_read_bool - Findfrom a property |
| 672 | * @np: device node from which the property value is to be read. | 728 | * @np: device node from which the property value is to be read. |
| 673 | * @propname: name of the property to be searched. | 729 | * @propname: name of the property to be searched. |
diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h index 5b5efae09135..ad2f67054372 100644 --- a/include/linux/of_reserved_mem.h +++ b/include/linux/of_reserved_mem.h | |||
| @@ -16,7 +16,7 @@ struct reserved_mem { | |||
| 16 | }; | 16 | }; |
| 17 | 17 | ||
| 18 | struct reserved_mem_ops { | 18 | struct reserved_mem_ops { |
| 19 | void (*device_init)(struct reserved_mem *rmem, | 19 | int (*device_init)(struct reserved_mem *rmem, |
| 20 | struct device *dev); | 20 | struct device *dev); |
| 21 | void (*device_release)(struct reserved_mem *rmem, | 21 | void (*device_release)(struct reserved_mem *rmem, |
| 22 | struct device *dev); | 22 | struct device *dev); |
| @@ -28,14 +28,17 @@ typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem); | |||
| 28 | _OF_DECLARE(reservedmem, name, compat, init, reservedmem_of_init_fn) | 28 | _OF_DECLARE(reservedmem, name, compat, init, reservedmem_of_init_fn) |
| 29 | 29 | ||
| 30 | #ifdef CONFIG_OF_RESERVED_MEM | 30 | #ifdef CONFIG_OF_RESERVED_MEM |
| 31 | void of_reserved_mem_device_init(struct device *dev); | 31 | int of_reserved_mem_device_init(struct device *dev); |
| 32 | void of_reserved_mem_device_release(struct device *dev); | 32 | void of_reserved_mem_device_release(struct device *dev); |
| 33 | 33 | ||
| 34 | void fdt_init_reserved_mem(void); | 34 | void fdt_init_reserved_mem(void); |
| 35 | void fdt_reserved_mem_save_node(unsigned long node, const char *uname, | 35 | void fdt_reserved_mem_save_node(unsigned long node, const char *uname, |
| 36 | phys_addr_t base, phys_addr_t size); | 36 | phys_addr_t base, phys_addr_t size); |
| 37 | #else | 37 | #else |
| 38 | static inline void of_reserved_mem_device_init(struct device *dev) { } | 38 | static inline int of_reserved_mem_device_init(struct device *dev) |
| 39 | { | ||
| 40 | return -ENOSYS; | ||
| 41 | } | ||
| 39 | static inline void of_reserved_mem_device_release(struct device *pdev) { } | 42 | static inline void of_reserved_mem_device_release(struct device *pdev) { } |
| 40 | 43 | ||
| 41 | static inline void fdt_init_reserved_mem(void) { } | 44 | static inline void fdt_init_reserved_mem(void) { } |
diff --git a/include/linux/oom.h b/include/linux/oom.h index 647395a1a550..e8d6e1058723 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h | |||
| @@ -50,6 +50,9 @@ static inline bool oom_task_origin(const struct task_struct *p) | |||
| 50 | extern unsigned long oom_badness(struct task_struct *p, | 50 | extern unsigned long oom_badness(struct task_struct *p, |
| 51 | struct mem_cgroup *memcg, const nodemask_t *nodemask, | 51 | struct mem_cgroup *memcg, const nodemask_t *nodemask, |
| 52 | unsigned long totalpages); | 52 | unsigned long totalpages); |
| 53 | |||
| 54 | extern int oom_kills_count(void); | ||
| 55 | extern void note_oom_kill(void); | ||
| 53 | extern void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, | 56 | extern void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, |
| 54 | unsigned int points, unsigned long totalpages, | 57 | unsigned int points, unsigned long totalpages, |
| 55 | struct mem_cgroup *memcg, nodemask_t *nodemask, | 58 | struct mem_cgroup *memcg, nodemask_t *nodemask, |
diff --git a/include/linux/page-isolation.h b/include/linux/page-isolation.h index 3fff8e774067..2dc1e1697b45 100644 --- a/include/linux/page-isolation.h +++ b/include/linux/page-isolation.h | |||
| @@ -2,6 +2,10 @@ | |||
| 2 | #define __LINUX_PAGEISOLATION_H | 2 | #define __LINUX_PAGEISOLATION_H |
| 3 | 3 | ||
| 4 | #ifdef CONFIG_MEMORY_ISOLATION | 4 | #ifdef CONFIG_MEMORY_ISOLATION |
| 5 | static inline bool has_isolate_pageblock(struct zone *zone) | ||
| 6 | { | ||
| 7 | return zone->nr_isolate_pageblock; | ||
| 8 | } | ||
| 5 | static inline bool is_migrate_isolate_page(struct page *page) | 9 | static inline bool is_migrate_isolate_page(struct page *page) |
| 6 | { | 10 | { |
| 7 | return get_pageblock_migratetype(page) == MIGRATE_ISOLATE; | 11 | return get_pageblock_migratetype(page) == MIGRATE_ISOLATE; |
| @@ -11,6 +15,10 @@ static inline bool is_migrate_isolate(int migratetype) | |||
| 11 | return migratetype == MIGRATE_ISOLATE; | 15 | return migratetype == MIGRATE_ISOLATE; |
| 12 | } | 16 | } |
| 13 | #else | 17 | #else |
| 18 | static inline bool has_isolate_pageblock(struct zone *zone) | ||
| 19 | { | ||
| 20 | return false; | ||
| 21 | } | ||
| 14 | static inline bool is_migrate_isolate_page(struct page *page) | 22 | static inline bool is_migrate_isolate_page(struct page *page) |
| 15 | { | 23 | { |
| 16 | return false; | 24 | return false; |
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 64dacb7288a6..24c7728ca681 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
| @@ -41,8 +41,13 @@ static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) | |||
| 41 | 41 | ||
| 42 | if (pci_is_root_bus(pbus)) | 42 | if (pci_is_root_bus(pbus)) |
| 43 | dev = pbus->bridge; | 43 | dev = pbus->bridge; |
| 44 | else | 44 | else { |
| 45 | /* If pbus is a virtual bus, there is no bridge to it */ | ||
| 46 | if (!pbus->self) | ||
| 47 | return NULL; | ||
| 48 | |||
| 45 | dev = &pbus->self->dev; | 49 | dev = &pbus->self->dev; |
| 50 | } | ||
| 46 | 51 | ||
| 47 | return ACPI_HANDLE(dev); | 52 | return ACPI_HANDLE(dev); |
| 48 | } | 53 | } |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 5be8db45e368..4c8ac5fcc224 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -331,6 +331,7 @@ struct pci_dev { | |||
| 331 | unsigned int is_added:1; | 331 | unsigned int is_added:1; |
| 332 | unsigned int is_busmaster:1; /* device is busmaster */ | 332 | unsigned int is_busmaster:1; /* device is busmaster */ |
| 333 | unsigned int no_msi:1; /* device may not use msi */ | 333 | unsigned int no_msi:1; /* device may not use msi */ |
| 334 | unsigned int no_64bit_msi:1; /* device may only use 32-bit MSIs */ | ||
| 334 | unsigned int block_cfg_access:1; /* config space access is blocked */ | 335 | unsigned int block_cfg_access:1; /* config space access is blocked */ |
| 335 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ | 336 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ |
| 336 | unsigned int irq_reroute_variant:2; /* device needs IRQ rerouting variant */ | 337 | unsigned int irq_reroute_variant:2; /* device needs IRQ rerouting variant */ |
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h index d5c89e0dd0e6..51ce60c35f4c 100644 --- a/include/linux/percpu-refcount.h +++ b/include/linux/percpu-refcount.h | |||
| @@ -133,7 +133,13 @@ static inline bool __ref_is_percpu(struct percpu_ref *ref, | |||
| 133 | /* paired with smp_store_release() in percpu_ref_reinit() */ | 133 | /* paired with smp_store_release() in percpu_ref_reinit() */ |
| 134 | smp_read_barrier_depends(); | 134 | smp_read_barrier_depends(); |
| 135 | 135 | ||
| 136 | if (unlikely(percpu_ptr & __PERCPU_REF_ATOMIC)) | 136 | /* |
| 137 | * Theoretically, the following could test just ATOMIC; however, | ||
| 138 | * then we'd have to mask off DEAD separately as DEAD may be | ||
| 139 | * visible without ATOMIC if we race with percpu_ref_kill(). DEAD | ||
| 140 | * implies ATOMIC anyway. Test them together. | ||
| 141 | */ | ||
| 142 | if (unlikely(percpu_ptr & __PERCPU_REF_ATOMIC_DEAD)) | ||
| 137 | return false; | 143 | return false; |
| 138 | 144 | ||
| 139 | *percpu_countp = (unsigned long __percpu *)percpu_ptr; | 145 | *percpu_countp = (unsigned long __percpu *)percpu_ptr; |
diff --git a/include/linux/mailbox.h b/include/linux/pl320-ipc.h index 5161f63ec1c8..5161f63ec1c8 100644 --- a/include/linux/mailbox.h +++ b/include/linux/pl320-ipc.h | |||
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 73e938b7e937..2e0e06daf8c0 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h | |||
| @@ -72,8 +72,10 @@ struct generic_pm_domain { | |||
| 72 | bool max_off_time_changed; | 72 | bool max_off_time_changed; |
| 73 | bool cached_power_down_ok; | 73 | bool cached_power_down_ok; |
| 74 | struct gpd_cpuidle_data *cpuidle_data; | 74 | struct gpd_cpuidle_data *cpuidle_data; |
| 75 | void (*attach_dev)(struct device *dev); | 75 | int (*attach_dev)(struct generic_pm_domain *domain, |
| 76 | void (*detach_dev)(struct device *dev); | 76 | struct device *dev); |
| 77 | void (*detach_dev)(struct generic_pm_domain *domain, | ||
| 78 | struct device *dev); | ||
| 77 | }; | 79 | }; |
| 78 | 80 | ||
| 79 | static inline struct generic_pm_domain *pd_to_genpd(struct dev_pm_domain *pd) | 81 | static inline struct generic_pm_domain *pd_to_genpd(struct dev_pm_domain *pd) |
| @@ -104,7 +106,7 @@ struct generic_pm_domain_data { | |||
| 104 | struct notifier_block nb; | 106 | struct notifier_block nb; |
| 105 | struct mutex lock; | 107 | struct mutex lock; |
| 106 | unsigned int refcount; | 108 | unsigned int refcount; |
| 107 | bool need_restore; | 109 | int need_restore; |
| 108 | }; | 110 | }; |
| 109 | 111 | ||
| 110 | #ifdef CONFIG_PM_GENERIC_DOMAINS | 112 | #ifdef CONFIG_PM_GENERIC_DOMAINS |
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h index 9ab4bf7c4646..636e82834506 100644 --- a/include/linux/pm_qos.h +++ b/include/linux/pm_qos.h | |||
| @@ -15,6 +15,7 @@ enum { | |||
| 15 | PM_QOS_CPU_DMA_LATENCY, | 15 | PM_QOS_CPU_DMA_LATENCY, |
| 16 | PM_QOS_NETWORK_LATENCY, | 16 | PM_QOS_NETWORK_LATENCY, |
| 17 | PM_QOS_NETWORK_THROUGHPUT, | 17 | PM_QOS_NETWORK_THROUGHPUT, |
| 18 | PM_QOS_MEMORY_BANDWIDTH, | ||
| 18 | 19 | ||
| 19 | /* insert new class ID */ | 20 | /* insert new class ID */ |
| 20 | PM_QOS_NUM_CLASSES, | 21 | PM_QOS_NUM_CLASSES, |
| @@ -32,6 +33,7 @@ enum pm_qos_flags_status { | |||
| 32 | #define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) | 33 | #define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) |
| 33 | #define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) | 34 | #define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) |
| 34 | #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0 | 35 | #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0 |
| 36 | #define PM_QOS_MEMORY_BANDWIDTH_DEFAULT_VALUE 0 | ||
| 35 | #define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE 0 | 37 | #define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE 0 |
| 36 | #define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE 0 | 38 | #define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE 0 |
| 37 | #define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1) | 39 | #define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1) |
| @@ -69,7 +71,8 @@ struct dev_pm_qos_request { | |||
| 69 | enum pm_qos_type { | 71 | enum pm_qos_type { |
| 70 | PM_QOS_UNITIALIZED, | 72 | PM_QOS_UNITIALIZED, |
| 71 | PM_QOS_MAX, /* return the largest value */ | 73 | PM_QOS_MAX, /* return the largest value */ |
| 72 | PM_QOS_MIN /* return the smallest value */ | 74 | PM_QOS_MIN, /* return the smallest value */ |
| 75 | PM_QOS_SUM /* return the sum */ | ||
| 73 | }; | 76 | }; |
| 74 | 77 | ||
| 75 | /* | 78 | /* |
diff --git a/include/linux/pnfs_osd_xdr.h b/include/linux/pnfs_osd_xdr.h index fe25876c1a5d..17d7d0d20eca 100644 --- a/include/linux/pnfs_osd_xdr.h +++ b/include/linux/pnfs_osd_xdr.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * All rights reserved. | 5 | * All rights reserved. |
| 6 | * | 6 | * |
| 7 | * Benny Halevy <bhalevy@panasas.com> | 7 | * Benny Halevy <bhalevy@panasas.com> |
| 8 | * Boaz Harrosh <bharrosh@panasas.com> | 8 | * Boaz Harrosh <ooo@electrozaur.com> |
| 9 | * | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License version 2 | 11 | * it under the terms of the GNU General Public License version 2 |
diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h index 07e7945a1ff2..e97fc656a058 100644 --- a/include/linux/power/charger-manager.h +++ b/include/linux/power/charger-manager.h | |||
| @@ -253,9 +253,6 @@ struct charger_manager { | |||
| 253 | struct device *dev; | 253 | struct device *dev; |
| 254 | struct charger_desc *desc; | 254 | struct charger_desc *desc; |
| 255 | 255 | ||
| 256 | struct power_supply *fuel_gauge; | ||
| 257 | struct power_supply **charger_stat; | ||
| 258 | |||
| 259 | #ifdef CONFIG_THERMAL | 256 | #ifdef CONFIG_THERMAL |
| 260 | struct thermal_zone_device *tzd_batt; | 257 | struct thermal_zone_device *tzd_batt; |
| 261 | #endif | 258 | #endif |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 3ed049673022..096dbced02ac 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
| @@ -200,6 +200,12 @@ struct power_supply { | |||
| 200 | void (*external_power_changed)(struct power_supply *psy); | 200 | void (*external_power_changed)(struct power_supply *psy); |
| 201 | void (*set_charged)(struct power_supply *psy); | 201 | void (*set_charged)(struct power_supply *psy); |
| 202 | 202 | ||
| 203 | /* | ||
| 204 | * Set if thermal zone should not be created for this power supply. | ||
| 205 | * For example for virtual supplies forwarding calls to actual | ||
| 206 | * sensors or other supplies. | ||
| 207 | */ | ||
| 208 | bool no_thermal; | ||
| 203 | /* For APM emulation, think legacy userspace. */ | 209 | /* For APM emulation, think legacy userspace. */ |
| 204 | int use_for_apm; | 210 | int use_for_apm; |
| 205 | 211 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index a4a819ffb2d1..53ff1a752d7e 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -617,6 +617,21 @@ static inline void rcu_preempt_sleep_check(void) | |||
| 617 | #define RCU_INITIALIZER(v) (typeof(*(v)) __force __rcu *)(v) | 617 | #define RCU_INITIALIZER(v) (typeof(*(v)) __force __rcu *)(v) |
| 618 | 618 | ||
| 619 | /** | 619 | /** |
| 620 | * lockless_dereference() - safely load a pointer for later dereference | ||
| 621 | * @p: The pointer to load | ||
| 622 | * | ||
| 623 | * Similar to rcu_dereference(), but for situations where the pointed-to | ||
| 624 | * object's lifetime is managed by something other than RCU. That | ||
| 625 | * "something other" might be reference counting or simple immortality. | ||
| 626 | */ | ||
| 627 | #define lockless_dereference(p) \ | ||
| 628 | ({ \ | ||
| 629 | typeof(p) _________p1 = ACCESS_ONCE(p); \ | ||
| 630 | smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ | ||
| 631 | (_________p1); \ | ||
| 632 | }) | ||
| 633 | |||
| 634 | /** | ||
| 620 | * rcu_assign_pointer() - assign to RCU-protected pointer | 635 | * rcu_assign_pointer() - assign to RCU-protected pointer |
| 621 | * @p: pointer to assign to | 636 | * @p: pointer to assign to |
| 622 | * @v: value to assign (publish) | 637 | * @v: value to assign (publish) |
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index c5ed83f49c4e..4419b99d8d6e 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
| @@ -27,6 +27,7 @@ struct spmi_device; | |||
| 27 | struct regmap; | 27 | struct regmap; |
| 28 | struct regmap_range_cfg; | 28 | struct regmap_range_cfg; |
| 29 | struct regmap_field; | 29 | struct regmap_field; |
| 30 | struct snd_ac97; | ||
| 30 | 31 | ||
| 31 | /* An enum of all the supported cache types */ | 32 | /* An enum of all the supported cache types */ |
| 32 | enum regcache_type { | 33 | enum regcache_type { |
| @@ -340,6 +341,8 @@ struct regmap *regmap_init_spmi_ext(struct spmi_device *dev, | |||
| 340 | struct regmap *regmap_init_mmio_clk(struct device *dev, const char *clk_id, | 341 | struct regmap *regmap_init_mmio_clk(struct device *dev, const char *clk_id, |
| 341 | void __iomem *regs, | 342 | void __iomem *regs, |
| 342 | const struct regmap_config *config); | 343 | const struct regmap_config *config); |
| 344 | struct regmap *regmap_init_ac97(struct snd_ac97 *ac97, | ||
| 345 | const struct regmap_config *config); | ||
| 343 | 346 | ||
| 344 | struct regmap *devm_regmap_init(struct device *dev, | 347 | struct regmap *devm_regmap_init(struct device *dev, |
| 345 | const struct regmap_bus *bus, | 348 | const struct regmap_bus *bus, |
| @@ -356,6 +359,10 @@ struct regmap *devm_regmap_init_spmi_ext(struct spmi_device *dev, | |||
| 356 | struct regmap *devm_regmap_init_mmio_clk(struct device *dev, const char *clk_id, | 359 | struct regmap *devm_regmap_init_mmio_clk(struct device *dev, const char *clk_id, |
| 357 | void __iomem *regs, | 360 | void __iomem *regs, |
| 358 | const struct regmap_config *config); | 361 | const struct regmap_config *config); |
| 362 | struct regmap *devm_regmap_init_ac97(struct snd_ac97 *ac97, | ||
| 363 | const struct regmap_config *config); | ||
| 364 | |||
| 365 | bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg); | ||
| 359 | 366 | ||
| 360 | /** | 367 | /** |
| 361 | * regmap_init_mmio(): Initialise register map | 368 | * regmap_init_mmio(): Initialise register map |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index d347c805f923..f540b1496e2f 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
| @@ -35,6 +35,8 @@ | |||
| 35 | #ifndef __LINUX_REGULATOR_CONSUMER_H_ | 35 | #ifndef __LINUX_REGULATOR_CONSUMER_H_ |
| 36 | #define __LINUX_REGULATOR_CONSUMER_H_ | 36 | #define __LINUX_REGULATOR_CONSUMER_H_ |
| 37 | 37 | ||
| 38 | #include <linux/err.h> | ||
| 39 | |||
| 38 | struct device; | 40 | struct device; |
| 39 | struct notifier_block; | 41 | struct notifier_block; |
| 40 | struct regmap; | 42 | struct regmap; |
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 49a4d6f59108..e2c13cd863bd 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
| @@ -97,7 +97,7 @@ __ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *k | |||
| 97 | __ring_buffer_alloc((size), (flags), &__key); \ | 97 | __ring_buffer_alloc((size), (flags), &__key); \ |
| 98 | }) | 98 | }) |
| 99 | 99 | ||
| 100 | int ring_buffer_wait(struct ring_buffer *buffer, int cpu); | 100 | int ring_buffer_wait(struct ring_buffer *buffer, int cpu, bool full); |
| 101 | int ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, | 101 | int ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, |
| 102 | struct file *filp, poll_table *poll_table); | 102 | struct file *filp, poll_table *poll_table); |
| 103 | 103 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a59d9343c25b..6c8b6f604e76 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -557,7 +557,9 @@ struct sk_buff { | |||
| 557 | /* fields enclosed in headers_start/headers_end are copied | 557 | /* fields enclosed in headers_start/headers_end are copied |
| 558 | * using a single memcpy() in __copy_skb_header() | 558 | * using a single memcpy() in __copy_skb_header() |
| 559 | */ | 559 | */ |
| 560 | /* private: */ | ||
| 560 | __u32 headers_start[0]; | 561 | __u32 headers_start[0]; |
| 562 | /* public: */ | ||
| 561 | 563 | ||
| 562 | /* if you move pkt_type around you also must adapt those constants */ | 564 | /* if you move pkt_type around you also must adapt those constants */ |
| 563 | #ifdef __BIG_ENDIAN_BITFIELD | 565 | #ifdef __BIG_ENDIAN_BITFIELD |
| @@ -642,7 +644,9 @@ struct sk_buff { | |||
| 642 | __u16 network_header; | 644 | __u16 network_header; |
| 643 | __u16 mac_header; | 645 | __u16 mac_header; |
| 644 | 646 | ||
| 647 | /* private: */ | ||
| 645 | __u32 headers_end[0]; | 648 | __u32 headers_end[0]; |
| 649 | /* public: */ | ||
| 646 | 650 | ||
| 647 | /* These elements must be at the end, see alloc_skb() for details. */ | 651 | /* These elements must be at the end, see alloc_skb() for details. */ |
| 648 | sk_buff_data_t tail; | 652 | sk_buff_data_t tail; |
| @@ -795,15 +799,19 @@ struct sk_buff_fclones { | |||
| 795 | * @skb: buffer | 799 | * @skb: buffer |
| 796 | * | 800 | * |
| 797 | * Returns true is skb is a fast clone, and its clone is not freed. | 801 | * Returns true is skb is a fast clone, and its clone is not freed. |
| 802 | * Some drivers call skb_orphan() in their ndo_start_xmit(), | ||
| 803 | * so we also check that this didnt happen. | ||
| 798 | */ | 804 | */ |
| 799 | static inline bool skb_fclone_busy(const struct sk_buff *skb) | 805 | static inline bool skb_fclone_busy(const struct sock *sk, |
| 806 | const struct sk_buff *skb) | ||
| 800 | { | 807 | { |
| 801 | const struct sk_buff_fclones *fclones; | 808 | const struct sk_buff_fclones *fclones; |
| 802 | 809 | ||
| 803 | fclones = container_of(skb, struct sk_buff_fclones, skb1); | 810 | fclones = container_of(skb, struct sk_buff_fclones, skb1); |
| 804 | 811 | ||
| 805 | return skb->fclone == SKB_FCLONE_ORIG && | 812 | return skb->fclone == SKB_FCLONE_ORIG && |
| 806 | fclones->skb2.fclone == SKB_FCLONE_CLONE; | 813 | fclones->skb2.fclone == SKB_FCLONE_CLONE && |
| 814 | fclones->skb2.sk == sk; | ||
| 807 | } | 815 | } |
| 808 | 816 | ||
| 809 | static inline struct sk_buff *alloc_skb_fclone(unsigned int size, | 817 | static inline struct sk_buff *alloc_skb_fclone(unsigned int size, |
diff --git a/include/linux/socket.h b/include/linux/socket.h index ec538fc287a6..bb9b83640070 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -256,7 +256,7 @@ struct ucred { | |||
| 256 | #define MSG_EOF MSG_FIN | 256 | #define MSG_EOF MSG_FIN |
| 257 | 257 | ||
| 258 | #define MSG_FASTOPEN 0x20000000 /* Send data in TCP SYN */ | 258 | #define MSG_FASTOPEN 0x20000000 /* Send data in TCP SYN */ |
| 259 | #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exit for file | 259 | #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exec for file |
| 260 | descriptor received through | 260 | descriptor received through |
| 261 | SCM_RIGHTS */ | 261 | SCM_RIGHTS */ |
| 262 | #if defined(CONFIG_COMPAT) | 262 | #if defined(CONFIG_COMPAT) |
diff --git a/include/linux/string.h b/include/linux/string.h index e6edfe51575a..2e22a2e58f3a 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
| @@ -132,7 +132,7 @@ int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) __printf(3, 4); | |||
| 132 | #endif | 132 | #endif |
| 133 | 133 | ||
| 134 | extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, | 134 | extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, |
| 135 | const void *from, size_t available); | 135 | const void *from, size_t available); |
| 136 | 136 | ||
| 137 | /** | 137 | /** |
| 138 | * strstarts - does @str start with @prefix? | 138 | * strstarts - does @str start with @prefix? |
| @@ -144,7 +144,8 @@ static inline bool strstarts(const char *str, const char *prefix) | |||
| 144 | return strncmp(str, prefix, strlen(prefix)) == 0; | 144 | return strncmp(str, prefix, strlen(prefix)) == 0; |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | extern size_t memweight(const void *ptr, size_t bytes); | 147 | size_t memweight(const void *ptr, size_t bytes); |
| 148 | void memzero_explicit(void *s, size_t count); | ||
| 148 | 149 | ||
| 149 | /** | 150 | /** |
| 150 | * kbasename - return the last part of a pathname. | 151 | * kbasename - return the last part of a pathname. |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 0305cde21a74..ef90838b36a0 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
| @@ -44,6 +44,10 @@ | |||
| 44 | #define KELVIN_TO_CELSIUS(t) (long)(((long)t-2732 >= 0) ? \ | 44 | #define KELVIN_TO_CELSIUS(t) (long)(((long)t-2732 >= 0) ? \ |
| 45 | ((long)t-2732+5)/10 : ((long)t-2732-5)/10) | 45 | ((long)t-2732+5)/10 : ((long)t-2732-5)/10) |
| 46 | #define CELSIUS_TO_KELVIN(t) ((t)*10+2732) | 46 | #define CELSIUS_TO_KELVIN(t) ((t)*10+2732) |
| 47 | #define DECI_KELVIN_TO_MILLICELSIUS_WITH_OFFSET(t, off) (((t) - (off)) * 100) | ||
| 48 | #define DECI_KELVIN_TO_MILLICELSIUS(t) DECI_KELVIN_TO_MILLICELSIUS_WITH_OFFSET(t, 2732) | ||
| 49 | #define MILLICELSIUS_TO_DECI_KELVIN_WITH_OFFSET(t, off) (((t) / 100) + (off)) | ||
| 50 | #define MILLICELSIUS_TO_DECI_KELVIN(t) MILLICELSIUS_TO_DECI_KELVIN_WITH_OFFSET(t, 2732) | ||
| 47 | 51 | ||
| 48 | /* Adding event notification support elements */ | 52 | /* Adding event notification support elements */ |
| 49 | #define THERMAL_GENL_FAMILY_NAME "thermal_event" | 53 | #define THERMAL_GENL_FAMILY_NAME "thermal_event" |
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h index 1ad4724458de..baa81718d985 100644 --- a/include/linux/uio_driver.h +++ b/include/linux/uio_driver.h | |||
| @@ -63,7 +63,17 @@ struct uio_port { | |||
| 63 | 63 | ||
| 64 | #define MAX_UIO_PORT_REGIONS 5 | 64 | #define MAX_UIO_PORT_REGIONS 5 |
| 65 | 65 | ||
| 66 | struct uio_device; | 66 | struct uio_device { |
| 67 | struct module *owner; | ||
| 68 | struct device *dev; | ||
| 69 | int minor; | ||
| 70 | atomic_t event; | ||
| 71 | struct fasync_struct *async_queue; | ||
| 72 | wait_queue_head_t wait; | ||
| 73 | struct uio_info *info; | ||
| 74 | struct kobject *map_dir; | ||
| 75 | struct kobject *portio_dir; | ||
| 76 | }; | ||
| 67 | 77 | ||
| 68 | /** | 78 | /** |
| 69 | * struct uio_info - UIO device capabilities | 79 | * struct uio_info - UIO device capabilities |
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h index 4f844c6b03ee..60beb5dc7977 100644 --- a/include/linux/uprobes.h +++ b/include/linux/uprobes.h | |||
| @@ -98,11 +98,11 @@ struct uprobes_state { | |||
| 98 | struct xol_area *xol_area; | 98 | struct xol_area *xol_area; |
| 99 | }; | 99 | }; |
| 100 | 100 | ||
| 101 | extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); | 101 | extern int set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); |
| 102 | extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); | 102 | extern int set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); |
| 103 | extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); | 103 | extern bool is_swbp_insn(uprobe_opcode_t *insn); |
| 104 | extern bool __weak is_trap_insn(uprobe_opcode_t *insn); | 104 | extern bool is_trap_insn(uprobe_opcode_t *insn); |
| 105 | extern unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs); | 105 | extern unsigned long uprobe_get_swbp_addr(struct pt_regs *regs); |
| 106 | extern unsigned long uprobe_get_trap_addr(struct pt_regs *regs); | 106 | extern unsigned long uprobe_get_trap_addr(struct pt_regs *regs); |
| 107 | extern int uprobe_write_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_t); | 107 | extern int uprobe_write_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_t); |
| 108 | extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); | 108 | extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); |
| @@ -128,8 +128,8 @@ extern bool arch_uprobe_xol_was_trapped(struct task_struct *tsk); | |||
| 128 | extern int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data); | 128 | extern int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data); |
| 129 | extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs); | 129 | extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs); |
| 130 | extern unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs *regs); | 130 | extern unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs *regs); |
| 131 | extern bool __weak arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs); | 131 | extern bool arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs); |
| 132 | extern void __weak arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, | 132 | extern void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, |
| 133 | void *src, unsigned long len); | 133 | void *src, unsigned long len); |
| 134 | #else /* !CONFIG_UPROBES */ | 134 | #else /* !CONFIG_UPROBES */ |
| 135 | struct uprobes_state { | 135 | struct uprobes_state { |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 26088feb6608..d9a4905e01d0 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
| @@ -78,6 +78,7 @@ struct usbnet { | |||
| 78 | # define EVENT_NO_RUNTIME_PM 9 | 78 | # define EVENT_NO_RUNTIME_PM 9 |
| 79 | # define EVENT_RX_KILL 10 | 79 | # define EVENT_RX_KILL 10 |
| 80 | # define EVENT_LINK_CHANGE 11 | 80 | # define EVENT_LINK_CHANGE 11 |
| 81 | # define EVENT_SET_RX_MODE 12 | ||
| 81 | }; | 82 | }; |
| 82 | 83 | ||
| 83 | static inline struct usb_driver *driver_of(struct usb_interface *intf) | 84 | static inline struct usb_driver *driver_of(struct usb_interface *intf) |
| @@ -159,6 +160,9 @@ struct driver_info { | |||
| 159 | /* called by minidriver when receiving indication */ | 160 | /* called by minidriver when receiving indication */ |
| 160 | void (*indication)(struct usbnet *dev, void *ind, int indlen); | 161 | void (*indication)(struct usbnet *dev, void *ind, int indlen); |
| 161 | 162 | ||
| 163 | /* rx mode change (device changes address list filtering) */ | ||
| 164 | void (*set_rx_mode)(struct usbnet *dev); | ||
| 165 | |||
| 162 | /* for new devices, use the descriptor-reading code instead */ | 166 | /* for new devices, use the descriptor-reading code instead */ |
| 163 | int in; /* rx endpoint */ | 167 | int in; /* rx endpoint */ |
| 164 | int out; /* tx endpoint */ | 168 | int out; /* tx endpoint */ |
diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h index 2a3038ee17a3..395b70e0eccf 100644 --- a/include/linux/watchdog.h +++ b/include/linux/watchdog.h | |||
| @@ -97,13 +97,8 @@ struct watchdog_device { | |||
| 97 | #define WDOG_UNREGISTERED 4 /* Has the device been unregistered */ | 97 | #define WDOG_UNREGISTERED 4 /* Has the device been unregistered */ |
| 98 | }; | 98 | }; |
| 99 | 99 | ||
| 100 | #ifdef CONFIG_WATCHDOG_NOWAYOUT | 100 | #define WATCHDOG_NOWAYOUT IS_BUILTIN(CONFIG_WATCHDOG_NOWAYOUT) |
| 101 | #define WATCHDOG_NOWAYOUT 1 | 101 | #define WATCHDOG_NOWAYOUT_INIT_STATUS (WATCHDOG_NOWAYOUT << WDOG_NO_WAY_OUT) |
| 102 | #define WATCHDOG_NOWAYOUT_INIT_STATUS (1 << WDOG_NO_WAY_OUT) | ||
| 103 | #else | ||
| 104 | #define WATCHDOG_NOWAYOUT 0 | ||
| 105 | #define WATCHDOG_NOWAYOUT_INIT_STATUS 0 | ||
| 106 | #endif | ||
| 107 | 102 | ||
| 108 | /* Use the following function to check whether or not the watchdog is active */ | 103 | /* Use the following function to check whether or not the watchdog is active */ |
| 109 | static inline bool watchdog_active(struct watchdog_device *wdd) | 104 | static inline bool watchdog_active(struct watchdog_device *wdd) |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index d9fa68f26c41..2a25dec30211 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
| @@ -34,7 +34,6 @@ | |||
| 34 | * @list: used to maintain a list of currently available transports | 34 | * @list: used to maintain a list of currently available transports |
| 35 | * @name: the human-readable name of the transport | 35 | * @name: the human-readable name of the transport |
| 36 | * @maxsize: transport provided maximum packet size | 36 | * @maxsize: transport provided maximum packet size |
| 37 | * @pref: Preferences of this transport | ||
| 38 | * @def: set if this transport should be considered the default | 37 | * @def: set if this transport should be considered the default |
| 39 | * @create: member function to create a new connection on this transport | 38 | * @create: member function to create a new connection on this transport |
| 40 | * @close: member function to discard a connection on this transport | 39 | * @close: member function to discard a connection on this transport |
diff --git a/include/net/inet_common.h b/include/net/inet_common.h index fe7994c48b75..b2828a06a5a6 100644 --- a/include/net/inet_common.h +++ b/include/net/inet_common.h | |||
| @@ -37,6 +37,8 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); | |||
| 37 | int inet_ctl_sock_create(struct sock **sk, unsigned short family, | 37 | int inet_ctl_sock_create(struct sock **sk, unsigned short family, |
| 38 | unsigned short type, unsigned char protocol, | 38 | unsigned short type, unsigned char protocol, |
| 39 | struct net *net); | 39 | struct net *net); |
| 40 | int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, | ||
| 41 | int *addr_len); | ||
| 40 | 42 | ||
| 41 | static inline void inet_ctl_sock_destroy(struct sock *sk) | 43 | static inline void inet_ctl_sock_destroy(struct sock *sk) |
| 42 | { | 44 | { |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 97f472012438..4292929392b0 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
| @@ -671,6 +671,8 @@ static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_add | |||
| 671 | return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); | 671 | return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); |
| 672 | } | 672 | } |
| 673 | 673 | ||
| 674 | void ipv6_proxy_select_ident(struct sk_buff *skb); | ||
| 675 | |||
| 674 | int ip6_dst_hoplimit(struct dst_entry *dst); | 676 | int ip6_dst_hoplimit(struct dst_entry *dst); |
| 675 | 677 | ||
| 676 | static inline int ip6_sk_dst_hoplimit(struct ipv6_pinfo *np, struct flowi6 *fl6, | 678 | static inline int ip6_sk_dst_hoplimit(struct ipv6_pinfo *np, struct flowi6 *fl6, |
diff --git a/include/net/netfilter/ipv4/nf_reject.h b/include/net/netfilter/ipv4/nf_reject.h index e8427193c777..03e928a55229 100644 --- a/include/net/netfilter/ipv4/nf_reject.h +++ b/include/net/netfilter/ipv4/nf_reject.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _IPV4_NF_REJECT_H | 1 | #ifndef _IPV4_NF_REJECT_H |
| 2 | #define _IPV4_NF_REJECT_H | 2 | #define _IPV4_NF_REJECT_H |
| 3 | 3 | ||
| 4 | #include <linux/skbuff.h> | ||
| 5 | #include <net/ip.h> | ||
| 4 | #include <net/icmp.h> | 6 | #include <net/icmp.h> |
| 5 | 7 | ||
| 6 | static inline void nf_send_unreach(struct sk_buff *skb_in, int code) | 8 | static inline void nf_send_unreach(struct sk_buff *skb_in, int code) |
| @@ -10,4 +12,12 @@ static inline void nf_send_unreach(struct sk_buff *skb_in, int code) | |||
| 10 | 12 | ||
| 11 | void nf_send_reset(struct sk_buff *oldskb, int hook); | 13 | void nf_send_reset(struct sk_buff *oldskb, int hook); |
| 12 | 14 | ||
| 15 | const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb, | ||
| 16 | struct tcphdr *_oth, int hook); | ||
| 17 | struct iphdr *nf_reject_iphdr_put(struct sk_buff *nskb, | ||
| 18 | const struct sk_buff *oldskb, | ||
| 19 | __be16 protocol, int ttl); | ||
| 20 | void nf_reject_ip_tcphdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb, | ||
| 21 | const struct tcphdr *oth); | ||
| 22 | |||
| 13 | #endif /* _IPV4_NF_REJECT_H */ | 23 | #endif /* _IPV4_NF_REJECT_H */ |
diff --git a/include/net/netfilter/ipv6/nf_reject.h b/include/net/netfilter/ipv6/nf_reject.h index 48e18810a9be..23216d48abf9 100644 --- a/include/net/netfilter/ipv6/nf_reject.h +++ b/include/net/netfilter/ipv6/nf_reject.h | |||
| @@ -15,4 +15,14 @@ nf_send_unreach6(struct net *net, struct sk_buff *skb_in, unsigned char code, | |||
| 15 | 15 | ||
| 16 | void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook); | 16 | void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook); |
| 17 | 17 | ||
| 18 | const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb, | ||
| 19 | struct tcphdr *otcph, | ||
| 20 | unsigned int *otcplen, int hook); | ||
| 21 | struct ipv6hdr *nf_reject_ip6hdr_put(struct sk_buff *nskb, | ||
| 22 | const struct sk_buff *oldskb, | ||
| 23 | __be16 protocol, int hoplimit); | ||
| 24 | void nf_reject_ip6_tcphdr_put(struct sk_buff *nskb, | ||
| 25 | const struct sk_buff *oldskb, | ||
| 26 | const struct tcphdr *oth, unsigned int otcplen); | ||
| 27 | |||
| 18 | #endif /* _IPV6_NF_REJECT_H */ | 28 | #endif /* _IPV6_NF_REJECT_H */ |
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 3d7292392fac..3ae969e3acf0 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h | |||
| @@ -396,14 +396,12 @@ struct nft_rule { | |||
| 396 | /** | 396 | /** |
| 397 | * struct nft_trans - nf_tables object update in transaction | 397 | * struct nft_trans - nf_tables object update in transaction |
| 398 | * | 398 | * |
| 399 | * @rcu_head: rcu head to defer release of transaction data | ||
| 400 | * @list: used internally | 399 | * @list: used internally |
| 401 | * @msg_type: message type | 400 | * @msg_type: message type |
| 402 | * @ctx: transaction context | 401 | * @ctx: transaction context |
| 403 | * @data: internal information related to the transaction | 402 | * @data: internal information related to the transaction |
| 404 | */ | 403 | */ |
| 405 | struct nft_trans { | 404 | struct nft_trans { |
| 406 | struct rcu_head rcu_head; | ||
| 407 | struct list_head list; | 405 | struct list_head list; |
| 408 | int msg_type; | 406 | int msg_type; |
| 409 | struct nft_ctx ctx; | 407 | struct nft_ctx ctx; |
| @@ -530,6 +528,9 @@ enum nft_chain_type { | |||
| 530 | NFT_CHAIN_T_MAX | 528 | NFT_CHAIN_T_MAX |
| 531 | }; | 529 | }; |
| 532 | 530 | ||
| 531 | int nft_chain_validate_dependency(const struct nft_chain *chain, | ||
| 532 | enum nft_chain_type type); | ||
| 533 | |||
| 533 | struct nft_stats { | 534 | struct nft_stats { |
| 534 | u64 bytes; | 535 | u64 bytes; |
| 535 | u64 pkts; | 536 | u64 pkts; |
diff --git a/include/net/netfilter/nft_masq.h b/include/net/netfilter/nft_masq.h index c72729f954f4..e2a518b60e19 100644 --- a/include/net/netfilter/nft_masq.h +++ b/include/net/netfilter/nft_masq.h | |||
| @@ -13,4 +13,7 @@ int nft_masq_init(const struct nft_ctx *ctx, | |||
| 13 | 13 | ||
| 14 | int nft_masq_dump(struct sk_buff *skb, const struct nft_expr *expr); | 14 | int nft_masq_dump(struct sk_buff *skb, const struct nft_expr *expr); |
| 15 | 15 | ||
| 16 | int nft_masq_validate(const struct nft_ctx *ctx, const struct nft_expr *expr, | ||
| 17 | const struct nft_data **data); | ||
| 18 | |||
| 16 | #endif /* _NFT_MASQ_H_ */ | 19 | #endif /* _NFT_MASQ_H_ */ |
diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h index a47790bcaa38..2a50a70ef587 100644 --- a/include/net/udp_tunnel.h +++ b/include/net/udp_tunnel.h | |||
| @@ -100,6 +100,15 @@ static inline struct sk_buff *udp_tunnel_handle_offloads(struct sk_buff *skb, | |||
| 100 | return iptunnel_handle_offloads(skb, udp_csum, type); | 100 | return iptunnel_handle_offloads(skb, udp_csum, type); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | static inline void udp_tunnel_gro_complete(struct sk_buff *skb, int nhoff) | ||
| 104 | { | ||
| 105 | struct udphdr *uh; | ||
| 106 | |||
| 107 | uh = (struct udphdr *)(skb->data + nhoff - sizeof(struct udphdr)); | ||
| 108 | skb_shinfo(skb)->gso_type |= uh->check ? | ||
| 109 | SKB_GSO_UDP_TUNNEL_CSUM : SKB_GSO_UDP_TUNNEL; | ||
| 110 | } | ||
| 111 | |||
| 103 | static inline void udp_tunnel_encap_enable(struct socket *sock) | 112 | static inline void udp_tunnel_encap_enable(struct socket *sock) |
| 104 | { | 113 | { |
| 105 | #if IS_ENABLED(CONFIG_IPV6) | 114 | #if IS_ENABLED(CONFIG_IPV6) |
diff --git a/include/net/vxlan.h b/include/net/vxlan.h index d5f59f3fc35d..57cccd0052e5 100644 --- a/include/net/vxlan.h +++ b/include/net/vxlan.h | |||
| @@ -8,6 +8,12 @@ | |||
| 8 | #define VNI_HASH_BITS 10 | 8 | #define VNI_HASH_BITS 10 |
| 9 | #define VNI_HASH_SIZE (1<<VNI_HASH_BITS) | 9 | #define VNI_HASH_SIZE (1<<VNI_HASH_BITS) |
| 10 | 10 | ||
| 11 | /* VXLAN protocol header */ | ||
| 12 | struct vxlanhdr { | ||
| 13 | __be32 vx_flags; | ||
| 14 | __be32 vx_vni; | ||
| 15 | }; | ||
| 16 | |||
| 11 | struct vxlan_sock; | 17 | struct vxlan_sock; |
| 12 | typedef void (vxlan_rcv_t)(struct vxlan_sock *vh, struct sk_buff *skb, __be32 key); | 18 | typedef void (vxlan_rcv_t)(struct vxlan_sock *vh, struct sk_buff *skb, __be32 key); |
| 13 | 19 | ||
| @@ -45,6 +51,18 @@ int vxlan_xmit_skb(struct vxlan_sock *vs, | |||
| 45 | __be32 src, __be32 dst, __u8 tos, __u8 ttl, __be16 df, | 51 | __be32 src, __be32 dst, __u8 tos, __u8 ttl, __be16 df, |
| 46 | __be16 src_port, __be16 dst_port, __be32 vni, bool xnet); | 52 | __be16 src_port, __be16 dst_port, __be32 vni, bool xnet); |
| 47 | 53 | ||
| 54 | static inline bool vxlan_gso_check(struct sk_buff *skb) | ||
| 55 | { | ||
| 56 | if ((skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL) && | ||
| 57 | (skb->inner_protocol_type != ENCAP_TYPE_ETHER || | ||
| 58 | skb->inner_protocol != htons(ETH_P_TEB) || | ||
| 59 | (skb_inner_mac_header(skb) - skb_transport_header(skb) != | ||
| 60 | sizeof(struct udphdr) + sizeof(struct vxlanhdr)))) | ||
| 61 | return false; | ||
| 62 | |||
| 63 | return true; | ||
| 64 | } | ||
| 65 | |||
| 48 | /* IP header + UDP + VXLAN + Ethernet header */ | 66 | /* IP header + UDP + VXLAN + Ethernet header */ |
| 49 | #define VXLAN_HEADROOM (20 + 8 + 8 + 14) | 67 | #define VXLAN_HEADROOM (20 + 8 + 8 + 14) |
| 50 | /* IPv6 header + UDP + VXLAN + Ethernet header */ | 68 | /* IPv6 header + UDP + VXLAN + Ethernet header */ |
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h index b2e85fdd2ae0..a09cca829082 100644 --- a/include/scsi/osd_initiator.h +++ b/include/scsi/osd_initiator.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Copyright (C) 2008 Panasas Inc. All rights reserved. | 4 | * Copyright (C) 2008 Panasas Inc. All rights reserved. |
| 5 | * | 5 | * |
| 6 | * Authors: | 6 | * Authors: |
| 7 | * Boaz Harrosh <bharrosh@panasas.com> | 7 | * Boaz Harrosh <ooo@electrozaur.com> |
| 8 | * Benny Halevy <bhalevy@panasas.com> | 8 | * Benny Halevy <bhalevy@panasas.com> |
| 9 | * | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/scsi/osd_ore.h b/include/scsi/osd_ore.h index 6ca3265a4dca..7a8d2cd30328 100644 --- a/include/scsi/osd_ore.h +++ b/include/scsi/osd_ore.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2011 | 2 | * Copyright (C) 2011 |
| 3 | * Boaz Harrosh <bharrosh@panasas.com> | 3 | * Boaz Harrosh <ooo@electrozaur.com> |
| 4 | * | 4 | * |
| 5 | * Public Declarations of the ORE API | 5 | * Public Declarations of the ORE API |
| 6 | * | 6 | * |
diff --git a/include/scsi/osd_protocol.h b/include/scsi/osd_protocol.h index a2594afe05c7..e0ca835e7bf7 100644 --- a/include/scsi/osd_protocol.h +++ b/include/scsi/osd_protocol.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Copyright (C) 2008 Panasas Inc. All rights reserved. | 4 | * Copyright (C) 2008 Panasas Inc. All rights reserved. |
| 5 | * | 5 | * |
| 6 | * Authors: | 6 | * Authors: |
| 7 | * Boaz Harrosh <bharrosh@panasas.com> | 7 | * Boaz Harrosh <ooo@electrozaur.com> |
| 8 | * Benny Halevy <bhalevy@panasas.com> | 8 | * Benny Halevy <bhalevy@panasas.com> |
| 9 | * | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
| @@ -496,7 +496,7 @@ struct osd_timestamp { | |||
| 496 | */ | 496 | */ |
| 497 | 497 | ||
| 498 | struct osd_key_identifier { | 498 | struct osd_key_identifier { |
| 499 | u8 id[7]; /* if you know why 7 please email bharrosh@panasas.com */ | 499 | u8 id[7]; /* if you know why 7 please email ooo@electrozaur.com */ |
| 500 | } __packed; | 500 | } __packed; |
| 501 | 501 | ||
| 502 | /* for osd_capability.format */ | 502 | /* for osd_capability.format */ |
diff --git a/include/scsi/osd_sec.h b/include/scsi/osd_sec.h index f96151c9c9e8..7abeb0f0db30 100644 --- a/include/scsi/osd_sec.h +++ b/include/scsi/osd_sec.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Copyright (C) 2008 Panasas Inc. All rights reserved. | 4 | * Copyright (C) 2008 Panasas Inc. All rights reserved. |
| 5 | * | 5 | * |
| 6 | * Authors: | 6 | * Authors: |
| 7 | * Boaz Harrosh <bharrosh@panasas.com> | 7 | * Boaz Harrosh <ooo@electrozaur.com> |
| 8 | * Benny Halevy <bhalevy@panasas.com> | 8 | * Benny Halevy <bhalevy@panasas.com> |
| 9 | * | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/scsi/osd_sense.h b/include/scsi/osd_sense.h index 91db543a5502..d52aa93a0b2d 100644 --- a/include/scsi/osd_sense.h +++ b/include/scsi/osd_sense.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Copyright (C) 2008 Panasas Inc. All rights reserved. | 4 | * Copyright (C) 2008 Panasas Inc. All rights reserved. |
| 5 | * | 5 | * |
| 6 | * Authors: | 6 | * Authors: |
| 7 | * Boaz Harrosh <bharrosh@panasas.com> | 7 | * Boaz Harrosh <ooo@electrozaur.com> |
| 8 | * Benny Halevy <bhalevy@panasas.com> | 8 | * Benny Halevy <bhalevy@panasas.com> |
| 9 | * | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/scsi/osd_types.h b/include/scsi/osd_types.h index bd0be7ed4bcf..48e8a165e136 100644 --- a/include/scsi/osd_types.h +++ b/include/scsi/osd_types.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Copyright (C) 2008 Panasas Inc. All rights reserved. | 4 | * Copyright (C) 2008 Panasas Inc. All rights reserved. |
| 5 | * | 5 | * |
| 6 | * Authors: | 6 | * Authors: |
| 7 | * Boaz Harrosh <bharrosh@panasas.com> | 7 | * Boaz Harrosh <ooo@electrozaur.com> |
| 8 | * Benny Halevy <bhalevy@panasas.com> | 8 | * Benny Halevy <bhalevy@panasas.com> |
| 9 | * | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h index e64583560701..56ed843969ca 100644 --- a/include/scsi/scsi_tcq.h +++ b/include/scsi/scsi_tcq.h | |||
| @@ -67,8 +67,9 @@ static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth) | |||
| 67 | if (!sdev->tagged_supported) | 67 | if (!sdev->tagged_supported) |
| 68 | return; | 68 | return; |
| 69 | 69 | ||
| 70 | if (!shost_use_blk_mq(sdev->host) && | 70 | if (shost_use_blk_mq(sdev->host)) |
| 71 | !blk_queue_tagged(sdev->request_queue)) | 71 | queue_flag_set_unlocked(QUEUE_FLAG_QUEUED, sdev->request_queue); |
| 72 | else if (!blk_queue_tagged(sdev->request_queue)) | ||
| 72 | blk_queue_init_tags(sdev->request_queue, depth, | 73 | blk_queue_init_tags(sdev->request_queue, depth, |
| 73 | sdev->host->bqt); | 74 | sdev->host->bqt); |
| 74 | 75 | ||
| @@ -81,8 +82,7 @@ static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth) | |||
| 81 | **/ | 82 | **/ |
| 82 | static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth) | 83 | static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth) |
| 83 | { | 84 | { |
| 84 | if (!shost_use_blk_mq(sdev->host) && | 85 | if (blk_queue_tagged(sdev->request_queue)) |
| 85 | blk_queue_tagged(sdev->request_queue)) | ||
| 86 | blk_queue_free_tags(sdev->request_queue); | 86 | blk_queue_free_tags(sdev->request_queue); |
| 87 | scsi_adjust_queue_depth(sdev, 0, depth); | 87 | scsi_adjust_queue_depth(sdev, 0, depth); |
| 88 | } | 88 | } |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index e862497f7556..8bb00a27e219 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
| @@ -184,6 +184,8 @@ struct snd_pcm_ops { | |||
| 184 | #define SNDRV_PCM_FMTBIT_DSD_U8 _SNDRV_PCM_FMTBIT(DSD_U8) | 184 | #define SNDRV_PCM_FMTBIT_DSD_U8 _SNDRV_PCM_FMTBIT(DSD_U8) |
| 185 | #define SNDRV_PCM_FMTBIT_DSD_U16_LE _SNDRV_PCM_FMTBIT(DSD_U16_LE) | 185 | #define SNDRV_PCM_FMTBIT_DSD_U16_LE _SNDRV_PCM_FMTBIT(DSD_U16_LE) |
| 186 | #define SNDRV_PCM_FMTBIT_DSD_U32_LE _SNDRV_PCM_FMTBIT(DSD_U32_LE) | 186 | #define SNDRV_PCM_FMTBIT_DSD_U32_LE _SNDRV_PCM_FMTBIT(DSD_U32_LE) |
| 187 | #define SNDRV_PCM_FMTBIT_DSD_U16_BE _SNDRV_PCM_FMTBIT(DSD_U16_BE) | ||
| 188 | #define SNDRV_PCM_FMTBIT_DSD_U32_BE _SNDRV_PCM_FMTBIT(DSD_U32_BE) | ||
| 187 | 189 | ||
| 188 | #ifdef SNDRV_LITTLE_ENDIAN | 190 | #ifdef SNDRV_LITTLE_ENDIAN |
| 189 | #define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_LE | 191 | #define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_LE |
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index e8b3080d196a..2df96b1384c7 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
| @@ -206,7 +206,6 @@ struct snd_soc_dai_driver { | |||
| 206 | /* DAI description */ | 206 | /* DAI description */ |
| 207 | const char *name; | 207 | const char *name; |
| 208 | unsigned int id; | 208 | unsigned int id; |
| 209 | int ac97_control; | ||
| 210 | unsigned int base; | 209 | unsigned int base; |
| 211 | 210 | ||
| 212 | /* DAI driver callbacks */ | 211 | /* DAI driver callbacks */ |
| @@ -216,6 +215,8 @@ struct snd_soc_dai_driver { | |||
| 216 | int (*resume)(struct snd_soc_dai *dai); | 215 | int (*resume)(struct snd_soc_dai *dai); |
| 217 | /* compress dai */ | 216 | /* compress dai */ |
| 218 | bool compress_dai; | 217 | bool compress_dai; |
| 218 | /* DAI is also used for the control bus */ | ||
| 219 | bool bus_control; | ||
| 219 | 220 | ||
| 220 | /* ops */ | 221 | /* ops */ |
| 221 | const struct snd_soc_dai_ops *ops; | 222 | const struct snd_soc_dai_ops *ops; |
| @@ -241,7 +242,6 @@ struct snd_soc_dai { | |||
| 241 | const char *name; | 242 | const char *name; |
| 242 | int id; | 243 | int id; |
| 243 | struct device *dev; | 244 | struct device *dev; |
| 244 | void *ac97_pdata; /* platform_data for the ac97 codec */ | ||
| 245 | 245 | ||
| 246 | /* driver ops */ | 246 | /* driver ops */ |
| 247 | struct snd_soc_dai_driver *driver; | 247 | struct snd_soc_dai_driver *driver; |
| @@ -268,7 +268,6 @@ struct snd_soc_dai { | |||
| 268 | unsigned int sample_bits; | 268 | unsigned int sample_bits; |
| 269 | 269 | ||
| 270 | /* parent platform/codec */ | 270 | /* parent platform/codec */ |
| 271 | struct snd_soc_platform *platform; | ||
| 272 | struct snd_soc_codec *codec; | 271 | struct snd_soc_codec *codec; |
| 273 | struct snd_soc_component *component; | 272 | struct snd_soc_component *component; |
| 274 | 273 | ||
| @@ -276,8 +275,6 @@ struct snd_soc_dai { | |||
| 276 | unsigned int tx_mask; | 275 | unsigned int tx_mask; |
| 277 | unsigned int rx_mask; | 276 | unsigned int rx_mask; |
| 278 | 277 | ||
| 279 | struct snd_soc_card *card; | ||
| 280 | |||
| 281 | struct list_head list; | 278 | struct list_head list; |
| 282 | }; | 279 | }; |
| 283 | 280 | ||
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 3a4d7da67b8d..89823cfe6f04 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
| @@ -435,7 +435,7 @@ void snd_soc_dapm_auto_nc_pins(struct snd_soc_card *card); | |||
| 435 | unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol); | 435 | unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol); |
| 436 | 436 | ||
| 437 | /* Mostly internal - should not normally be used */ | 437 | /* Mostly internal - should not normally be used */ |
| 438 | void dapm_mark_io_dirty(struct snd_soc_dapm_context *dapm); | 438 | void dapm_mark_endpoints_dirty(struct snd_soc_card *card); |
| 439 | 439 | ||
| 440 | /* dapm path query */ | 440 | /* dapm path query */ |
| 441 | int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream, | 441 | int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream, |
| @@ -508,9 +508,9 @@ struct snd_soc_dapm_path { | |||
| 508 | 508 | ||
| 509 | /* status */ | 509 | /* status */ |
| 510 | u32 connect:1; /* source and sink widgets are connected */ | 510 | u32 connect:1; /* source and sink widgets are connected */ |
| 511 | u32 walked:1; /* path has been walked */ | ||
| 512 | u32 walking:1; /* path is in the process of being walked */ | 511 | u32 walking:1; /* path is in the process of being walked */ |
| 513 | u32 weak:1; /* path ignored for power management */ | 512 | u32 weak:1; /* path ignored for power management */ |
| 513 | u32 is_supply:1; /* At least one of the connected widgets is a supply */ | ||
| 514 | 514 | ||
| 515 | int (*connected)(struct snd_soc_dapm_widget *source, | 515 | int (*connected)(struct snd_soc_dapm_widget *source, |
| 516 | struct snd_soc_dapm_widget *sink); | 516 | struct snd_soc_dapm_widget *sink); |
| @@ -544,11 +544,13 @@ struct snd_soc_dapm_widget { | |||
| 544 | unsigned char active:1; /* active stream on DAC, ADC's */ | 544 | unsigned char active:1; /* active stream on DAC, ADC's */ |
| 545 | unsigned char connected:1; /* connected codec pin */ | 545 | unsigned char connected:1; /* connected codec pin */ |
| 546 | unsigned char new:1; /* cnew complete */ | 546 | unsigned char new:1; /* cnew complete */ |
| 547 | unsigned char ext:1; /* has external widgets */ | ||
| 548 | unsigned char force:1; /* force state */ | 547 | unsigned char force:1; /* force state */ |
| 549 | unsigned char ignore_suspend:1; /* kept enabled over suspend */ | 548 | unsigned char ignore_suspend:1; /* kept enabled over suspend */ |
| 550 | unsigned char new_power:1; /* power from this run */ | 549 | unsigned char new_power:1; /* power from this run */ |
| 551 | unsigned char power_checked:1; /* power checked this run */ | 550 | unsigned char power_checked:1; /* power checked this run */ |
| 551 | unsigned char is_supply:1; /* Widget is a supply type widget */ | ||
| 552 | unsigned char is_sink:1; /* Widget is a sink type widget */ | ||
| 553 | unsigned char is_source:1; /* Widget is a source type widget */ | ||
| 552 | int subseq; /* sort within widget type */ | 554 | int subseq; /* sort within widget type */ |
| 553 | 555 | ||
| 554 | int (*power_check)(struct snd_soc_dapm_widget *w); | 556 | int (*power_check)(struct snd_soc_dapm_widget *w); |
| @@ -567,6 +569,7 @@ struct snd_soc_dapm_widget { | |||
| 567 | struct list_head sinks; | 569 | struct list_head sinks; |
| 568 | 570 | ||
| 569 | /* used during DAPM updates */ | 571 | /* used during DAPM updates */ |
| 572 | struct list_head work_list; | ||
| 570 | struct list_head power_list; | 573 | struct list_head power_list; |
| 571 | struct list_head dirty; | 574 | struct list_head dirty; |
| 572 | int inputs; | 575 | int inputs; |
diff --git a/include/sound/soc-dpcm.h b/include/sound/soc-dpcm.h index 2883a7a6f9f3..98f2ade0266e 100644 --- a/include/sound/soc-dpcm.h +++ b/include/sound/soc-dpcm.h | |||
| @@ -102,6 +102,8 @@ struct snd_soc_dpcm_runtime { | |||
| 102 | /* state and update */ | 102 | /* state and update */ |
| 103 | enum snd_soc_dpcm_update runtime_update; | 103 | enum snd_soc_dpcm_update runtime_update; |
| 104 | enum snd_soc_dpcm_state state; | 104 | enum snd_soc_dpcm_state state; |
| 105 | |||
| 106 | int trigger_pending; /* trigger cmd + 1 if pending, 0 if not */ | ||
| 105 | }; | 107 | }; |
| 106 | 108 | ||
| 107 | /* can this BE stop and free */ | 109 | /* can this BE stop and free */ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 7ba7130037a0..29a52909ddef 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
| @@ -36,6 +36,11 @@ | |||
| 36 | {.reg = xreg, .rreg = xreg, .shift = shift_left, \ | 36 | {.reg = xreg, .rreg = xreg, .shift = shift_left, \ |
| 37 | .rshift = shift_right, .max = xmax, .platform_max = xmax, \ | 37 | .rshift = shift_right, .max = xmax, .platform_max = xmax, \ |
| 38 | .invert = xinvert, .autodisable = xautodisable}) | 38 | .invert = xinvert, .autodisable = xautodisable}) |
| 39 | #define SOC_DOUBLE_S_VALUE(xreg, shift_left, shift_right, xmin, xmax, xsign_bit, xinvert, xautodisable) \ | ||
| 40 | ((unsigned long)&(struct soc_mixer_control) \ | ||
| 41 | {.reg = xreg, .rreg = xreg, .shift = shift_left, \ | ||
| 42 | .rshift = shift_right, .min = xmin, .max = xmax, .platform_max = xmax, \ | ||
| 43 | .sign_bit = xsign_bit, .invert = xinvert, .autodisable = xautodisable}) | ||
| 39 | #define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert, xautodisable) \ | 44 | #define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert, xautodisable) \ |
| 40 | SOC_DOUBLE_VALUE(xreg, xshift, xshift, xmax, xinvert, xautodisable) | 45 | SOC_DOUBLE_VALUE(xreg, xshift, xshift, xmax, xinvert, xautodisable) |
| 41 | #define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \ | 46 | #define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \ |
| @@ -171,11 +176,9 @@ | |||
| 171 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ | 176 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ |
| 172 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ | 177 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ |
| 173 | .tlv.p = (tlv_array), \ | 178 | .tlv.p = (tlv_array), \ |
| 174 | .info = snd_soc_info_volsw_s8, .get = snd_soc_get_volsw_s8, \ | 179 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ |
| 175 | .put = snd_soc_put_volsw_s8, \ | 180 | .put = snd_soc_put_volsw, \ |
| 176 | .private_value = (unsigned long)&(struct soc_mixer_control) \ | 181 | .private_value = SOC_DOUBLE_S_VALUE(xreg, 0, 8, xmin, xmax, 7, 0, 0) } |
| 177 | {.reg = xreg, .min = xmin, .max = xmax, \ | ||
| 178 | .platform_max = xmax} } | ||
| 179 | #define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xitems, xtexts) \ | 182 | #define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xitems, xtexts) \ |
| 180 | { .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \ | 183 | { .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \ |
| 181 | .items = xitems, .texts = xtexts, \ | 184 | .items = xitems, .texts = xtexts, \ |
| @@ -366,8 +369,6 @@ struct snd_soc_jack_gpio; | |||
| 366 | 369 | ||
| 367 | typedef int (*hw_write_t)(void *,const char* ,int); | 370 | typedef int (*hw_write_t)(void *,const char* ,int); |
| 368 | 371 | ||
| 369 | extern struct snd_ac97_bus_ops *soc_ac97_ops; | ||
| 370 | |||
| 371 | enum snd_soc_pcm_subclass { | 372 | enum snd_soc_pcm_subclass { |
| 372 | SND_SOC_PCM_CLASS_PCM = 0, | 373 | SND_SOC_PCM_CLASS_PCM = 0, |
| 373 | SND_SOC_PCM_CLASS_BE = 1, | 374 | SND_SOC_PCM_CLASS_BE = 1, |
| @@ -409,13 +410,9 @@ int devm_snd_soc_register_component(struct device *dev, | |||
| 409 | const struct snd_soc_component_driver *cmpnt_drv, | 410 | const struct snd_soc_component_driver *cmpnt_drv, |
| 410 | struct snd_soc_dai_driver *dai_drv, int num_dai); | 411 | struct snd_soc_dai_driver *dai_drv, int num_dai); |
| 411 | void snd_soc_unregister_component(struct device *dev); | 412 | void snd_soc_unregister_component(struct device *dev); |
| 412 | int snd_soc_cache_sync(struct snd_soc_codec *codec); | ||
| 413 | int snd_soc_cache_init(struct snd_soc_codec *codec); | 413 | int snd_soc_cache_init(struct snd_soc_codec *codec); |
| 414 | int snd_soc_cache_exit(struct snd_soc_codec *codec); | 414 | int snd_soc_cache_exit(struct snd_soc_codec *codec); |
| 415 | int snd_soc_cache_write(struct snd_soc_codec *codec, | 415 | |
| 416 | unsigned int reg, unsigned int value); | ||
| 417 | int snd_soc_cache_read(struct snd_soc_codec *codec, | ||
| 418 | unsigned int reg, unsigned int *value); | ||
| 419 | int snd_soc_platform_read(struct snd_soc_platform *platform, | 416 | int snd_soc_platform_read(struct snd_soc_platform *platform, |
| 420 | unsigned int reg); | 417 | unsigned int reg); |
| 421 | int snd_soc_platform_write(struct snd_soc_platform *platform, | 418 | int snd_soc_platform_write(struct snd_soc_platform *platform, |
| @@ -500,14 +497,28 @@ int snd_soc_update_bits_locked(struct snd_soc_codec *codec, | |||
| 500 | int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg, | 497 | int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg, |
| 501 | unsigned int mask, unsigned int value); | 498 | unsigned int mask, unsigned int value); |
| 502 | 499 | ||
| 503 | int snd_soc_new_ac97_codec(struct snd_soc_codec *codec, | 500 | #ifdef CONFIG_SND_SOC_AC97_BUS |
| 504 | struct snd_ac97_bus_ops *ops, int num); | 501 | struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec); |
| 505 | void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); | 502 | void snd_soc_free_ac97_codec(struct snd_ac97 *ac97); |
| 506 | 503 | ||
| 507 | int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops); | 504 | int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops); |
| 508 | int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops, | 505 | int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops, |
| 509 | struct platform_device *pdev); | 506 | struct platform_device *pdev); |
| 510 | 507 | ||
| 508 | extern struct snd_ac97_bus_ops *soc_ac97_ops; | ||
| 509 | #else | ||
| 510 | static inline int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops, | ||
| 511 | struct platform_device *pdev) | ||
| 512 | { | ||
| 513 | return 0; | ||
| 514 | } | ||
| 515 | |||
| 516 | static inline int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops) | ||
| 517 | { | ||
| 518 | return 0; | ||
| 519 | } | ||
| 520 | #endif | ||
| 521 | |||
| 511 | /* | 522 | /* |
| 512 | *Controls | 523 | *Controls |
| 513 | */ | 524 | */ |
| @@ -545,12 +556,6 @@ int snd_soc_get_volsw_sx(struct snd_kcontrol *kcontrol, | |||
| 545 | struct snd_ctl_elem_value *ucontrol); | 556 | struct snd_ctl_elem_value *ucontrol); |
| 546 | int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol, | 557 | int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol, |
| 547 | struct snd_ctl_elem_value *ucontrol); | 558 | struct snd_ctl_elem_value *ucontrol); |
| 548 | int snd_soc_info_volsw_s8(struct snd_kcontrol *kcontrol, | ||
| 549 | struct snd_ctl_elem_info *uinfo); | ||
| 550 | int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol, | ||
| 551 | struct snd_ctl_elem_value *ucontrol); | ||
| 552 | int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol, | ||
| 553 | struct snd_ctl_elem_value *ucontrol); | ||
| 554 | int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol, | 559 | int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol, |
| 555 | struct snd_ctl_elem_info *uinfo); | 560 | struct snd_ctl_elem_info *uinfo); |
| 556 | int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, | 561 | int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, |
| @@ -780,24 +785,18 @@ struct snd_soc_codec { | |||
| 780 | struct device *dev; | 785 | struct device *dev; |
| 781 | const struct snd_soc_codec_driver *driver; | 786 | const struct snd_soc_codec_driver *driver; |
| 782 | 787 | ||
| 783 | struct mutex mutex; | ||
| 784 | struct list_head list; | 788 | struct list_head list; |
| 785 | struct list_head card_list; | 789 | struct list_head card_list; |
| 786 | 790 | ||
| 787 | /* runtime */ | 791 | /* runtime */ |
| 788 | struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ | ||
| 789 | unsigned int cache_bypass:1; /* Suppress access to the cache */ | 792 | unsigned int cache_bypass:1; /* Suppress access to the cache */ |
| 790 | unsigned int suspended:1; /* Codec is in suspend PM state */ | 793 | unsigned int suspended:1; /* Codec is in suspend PM state */ |
| 791 | unsigned int ac97_registered:1; /* Codec has been AC97 registered */ | ||
| 792 | unsigned int ac97_created:1; /* Codec has been created by SoC */ | ||
| 793 | unsigned int cache_init:1; /* codec cache has been initialized */ | 794 | unsigned int cache_init:1; /* codec cache has been initialized */ |
| 794 | u32 cache_sync; /* Cache needs to be synced to hardware */ | ||
| 795 | 795 | ||
| 796 | /* codec IO */ | 796 | /* codec IO */ |
| 797 | void *control_data; /* codec control (i2c/3wire) data */ | 797 | void *control_data; /* codec control (i2c/3wire) data */ |
| 798 | hw_write_t hw_write; | 798 | hw_write_t hw_write; |
| 799 | void *reg_cache; | 799 | void *reg_cache; |
| 800 | struct mutex cache_rw_mutex; | ||
| 801 | 800 | ||
| 802 | /* component */ | 801 | /* component */ |
| 803 | struct snd_soc_component component; | 802 | struct snd_soc_component component; |
| @@ -860,8 +859,6 @@ struct snd_soc_platform_driver { | |||
| 860 | 859 | ||
| 861 | int (*probe)(struct snd_soc_platform *); | 860 | int (*probe)(struct snd_soc_platform *); |
| 862 | int (*remove)(struct snd_soc_platform *); | 861 | int (*remove)(struct snd_soc_platform *); |
| 863 | int (*suspend)(struct snd_soc_dai *dai); | ||
| 864 | int (*resume)(struct snd_soc_dai *dai); | ||
| 865 | struct snd_soc_component_driver component_driver; | 862 | struct snd_soc_component_driver component_driver; |
| 866 | 863 | ||
| 867 | /* pcm creation and destruction */ | 864 | /* pcm creation and destruction */ |
| @@ -886,7 +883,7 @@ struct snd_soc_platform_driver { | |||
| 886 | 883 | ||
| 887 | struct snd_soc_dai_link_component { | 884 | struct snd_soc_dai_link_component { |
| 888 | const char *name; | 885 | const char *name; |
| 889 | const struct device_node *of_node; | 886 | struct device_node *of_node; |
| 890 | const char *dai_name; | 887 | const char *dai_name; |
| 891 | }; | 888 | }; |
| 892 | 889 | ||
| @@ -894,8 +891,6 @@ struct snd_soc_platform { | |||
| 894 | struct device *dev; | 891 | struct device *dev; |
| 895 | const struct snd_soc_platform_driver *driver; | 892 | const struct snd_soc_platform_driver *driver; |
| 896 | 893 | ||
| 897 | unsigned int suspended:1; /* platform is suspended */ | ||
| 898 | |||
| 899 | struct list_head list; | 894 | struct list_head list; |
| 900 | 895 | ||
| 901 | struct snd_soc_component component; | 896 | struct snd_soc_component component; |
| @@ -990,7 +985,7 @@ struct snd_soc_codec_conf { | |||
| 990 | * DT/OF node, but not both. | 985 | * DT/OF node, but not both. |
| 991 | */ | 986 | */ |
| 992 | const char *dev_name; | 987 | const char *dev_name; |
| 993 | const struct device_node *of_node; | 988 | struct device_node *of_node; |
| 994 | 989 | ||
| 995 | /* | 990 | /* |
| 996 | * optional map of kcontrol, widget and path name prefixes that are | 991 | * optional map of kcontrol, widget and path name prefixes that are |
| @@ -1007,7 +1002,7 @@ struct snd_soc_aux_dev { | |||
| 1007 | * DT/OF node, but not both. | 1002 | * DT/OF node, but not both. |
| 1008 | */ | 1003 | */ |
| 1009 | const char *codec_name; | 1004 | const char *codec_name; |
| 1010 | const struct device_node *codec_of_node; | 1005 | struct device_node *codec_of_node; |
| 1011 | 1006 | ||
| 1012 | /* codec/machine specific init - e.g. add machine controls */ | 1007 | /* codec/machine specific init - e.g. add machine controls */ |
| 1013 | int (*init)(struct snd_soc_component *component); | 1008 | int (*init)(struct snd_soc_component *component); |
| @@ -1264,6 +1259,17 @@ unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); | |||
| 1264 | int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg, | 1259 | int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg, |
| 1265 | unsigned int val); | 1260 | unsigned int val); |
| 1266 | 1261 | ||
| 1262 | /** | ||
| 1263 | * snd_soc_cache_sync() - Sync the register cache with the hardware | ||
| 1264 | * @codec: CODEC to sync | ||
| 1265 | * | ||
| 1266 | * Note: This function will call regcache_sync() | ||
| 1267 | */ | ||
| 1268 | static inline int snd_soc_cache_sync(struct snd_soc_codec *codec) | ||
| 1269 | { | ||
| 1270 | return regcache_sync(codec->component.regmap); | ||
| 1271 | } | ||
| 1272 | |||
| 1267 | /* component IO */ | 1273 | /* component IO */ |
| 1268 | int snd_soc_component_read(struct snd_soc_component *component, | 1274 | int snd_soc_component_read(struct snd_soc_component *component, |
| 1269 | unsigned int reg, unsigned int *val); | 1275 | unsigned int reg, unsigned int *val); |
| @@ -1277,6 +1283,45 @@ void snd_soc_component_async_complete(struct snd_soc_component *component); | |||
| 1277 | int snd_soc_component_test_bits(struct snd_soc_component *component, | 1283 | int snd_soc_component_test_bits(struct snd_soc_component *component, |
| 1278 | unsigned int reg, unsigned int mask, unsigned int value); | 1284 | unsigned int reg, unsigned int mask, unsigned int value); |
| 1279 | 1285 | ||
| 1286 | #ifdef CONFIG_REGMAP | ||
| 1287 | |||
| 1288 | void snd_soc_component_init_regmap(struct snd_soc_component *component, | ||
| 1289 | struct regmap *regmap); | ||
| 1290 | void snd_soc_component_exit_regmap(struct snd_soc_component *component); | ||
| 1291 | |||
| 1292 | /** | ||
| 1293 | * snd_soc_codec_init_regmap() - Initialize regmap instance for the CODEC | ||
| 1294 | * @codec: The CODEC for which to initialize the regmap instance | ||
| 1295 | * @regmap: The regmap instance that should be used by the CODEC | ||
| 1296 | * | ||
| 1297 | * This function allows deferred assignment of the regmap instance that is | ||
| 1298 | * associated with the CODEC. Only use this if the regmap instance is not yet | ||
| 1299 | * ready when the CODEC is registered. The function must also be called before | ||
| 1300 | * the first IO attempt of the CODEC. | ||
| 1301 | */ | ||
| 1302 | static inline void snd_soc_codec_init_regmap(struct snd_soc_codec *codec, | ||
| 1303 | struct regmap *regmap) | ||
| 1304 | { | ||
| 1305 | snd_soc_component_init_regmap(&codec->component, regmap); | ||
| 1306 | } | ||
| 1307 | |||
| 1308 | /** | ||
| 1309 | * snd_soc_codec_exit_regmap() - De-initialize regmap instance for the CODEC | ||
| 1310 | * @codec: The CODEC for which to de-initialize the regmap instance | ||
| 1311 | * | ||
| 1312 | * Calls regmap_exit() on the regmap instance associated to the CODEC and | ||
| 1313 | * removes the regmap instance from the CODEC. | ||
| 1314 | * | ||
| 1315 | * This function should only be used if snd_soc_codec_init_regmap() was used to | ||
| 1316 | * initialize the regmap instance. | ||
| 1317 | */ | ||
| 1318 | static inline void snd_soc_codec_exit_regmap(struct snd_soc_codec *codec) | ||
| 1319 | { | ||
| 1320 | snd_soc_component_exit_regmap(&codec->component); | ||
| 1321 | } | ||
| 1322 | |||
| 1323 | #endif | ||
| 1324 | |||
| 1280 | /* device driver data */ | 1325 | /* device driver data */ |
| 1281 | 1326 | ||
| 1282 | static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card, | 1327 | static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card, |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 9ec9864ecf38..23c518a0340c 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -108,6 +108,8 @@ | |||
| 108 | #define DA_EMULATE_ALUA 0 | 108 | #define DA_EMULATE_ALUA 0 |
| 109 | /* Enforce SCSI Initiator Port TransportID with 'ISID' for PR */ | 109 | /* Enforce SCSI Initiator Port TransportID with 'ISID' for PR */ |
| 110 | #define DA_ENFORCE_PR_ISIDS 1 | 110 | #define DA_ENFORCE_PR_ISIDS 1 |
| 111 | /* Force SPC-3 PR Activate Persistence across Target Power Loss */ | ||
| 112 | #define DA_FORCE_PR_APTPL 0 | ||
| 111 | #define DA_STATUS_MAX_SECTORS_MIN 16 | 113 | #define DA_STATUS_MAX_SECTORS_MIN 16 |
| 112 | #define DA_STATUS_MAX_SECTORS_MAX 8192 | 114 | #define DA_STATUS_MAX_SECTORS_MAX 8192 |
| 113 | /* By default don't report non-rotating (solid state) medium */ | 115 | /* By default don't report non-rotating (solid state) medium */ |
| @@ -680,6 +682,7 @@ struct se_dev_attrib { | |||
| 680 | enum target_prot_type pi_prot_type; | 682 | enum target_prot_type pi_prot_type; |
| 681 | enum target_prot_type hw_pi_prot_type; | 683 | enum target_prot_type hw_pi_prot_type; |
| 682 | int enforce_pr_isids; | 684 | int enforce_pr_isids; |
| 685 | int force_pr_aptpl; | ||
| 683 | int is_nonrot; | 686 | int is_nonrot; |
| 684 | int emulate_rest_reord; | 687 | int emulate_rest_reord; |
| 685 | u32 hw_block_size; | 688 | u32 hw_block_size; |
| @@ -903,4 +906,18 @@ struct se_wwn { | |||
| 903 | struct config_group fabric_stat_group; | 906 | struct config_group fabric_stat_group; |
| 904 | }; | 907 | }; |
| 905 | 908 | ||
| 909 | static inline void atomic_inc_mb(atomic_t *v) | ||
| 910 | { | ||
| 911 | smp_mb__before_atomic(); | ||
| 912 | atomic_inc(v); | ||
| 913 | smp_mb__after_atomic(); | ||
| 914 | } | ||
| 915 | |||
| 916 | static inline void atomic_dec_mb(atomic_t *v) | ||
| 917 | { | ||
| 918 | smp_mb__before_atomic(); | ||
| 919 | atomic_dec(v); | ||
| 920 | smp_mb__after_atomic(); | ||
| 921 | } | ||
| 922 | |||
| 906 | #endif /* TARGET_CORE_BASE_H */ | 923 | #endif /* TARGET_CORE_BASE_H */ |
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h index b04ee7e5a466..88cf39d96d0f 100644 --- a/include/trace/events/asoc.h +++ b/include/trace/events/asoc.h | |||
| @@ -288,31 +288,6 @@ TRACE_EVENT(snd_soc_jack_notify, | |||
| 288 | TP_printk("jack=%s %x", __get_str(name), (int)__entry->val) | 288 | TP_printk("jack=%s %x", __get_str(name), (int)__entry->val) |
| 289 | ); | 289 | ); |
| 290 | 290 | ||
| 291 | TRACE_EVENT(snd_soc_cache_sync, | ||
| 292 | |||
| 293 | TP_PROTO(struct snd_soc_codec *codec, const char *type, | ||
| 294 | const char *status), | ||
| 295 | |||
| 296 | TP_ARGS(codec, type, status), | ||
| 297 | |||
| 298 | TP_STRUCT__entry( | ||
| 299 | __string( name, codec->component.name) | ||
| 300 | __string( status, status ) | ||
| 301 | __string( type, type ) | ||
| 302 | __field( int, id ) | ||
| 303 | ), | ||
| 304 | |||
| 305 | TP_fast_assign( | ||
| 306 | __assign_str(name, codec->component.name); | ||
| 307 | __assign_str(status, status); | ||
| 308 | __assign_str(type, type); | ||
| 309 | __entry->id = codec->component.id; | ||
| 310 | ), | ||
| 311 | |||
| 312 | TP_printk("codec=%s.%d type=%s status=%s", __get_str(name), | ||
| 313 | (int)__entry->id, __get_str(type), __get_str(status)) | ||
| 314 | ); | ||
| 315 | |||
| 316 | #endif /* _TRACE_ASOC_H */ | 291 | #endif /* _TRACE_ASOC_H */ |
| 317 | 292 | ||
| 318 | /* This part must be outside protection */ | 293 | /* This part must be outside protection */ |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index d4f70a7fe876..ff4bd1b35246 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
| @@ -2369,7 +2369,7 @@ TRACE_EVENT(ext4_es_lookup_extent_exit, | |||
| 2369 | show_extent_status(__entry->found ? __entry->status : 0)) | 2369 | show_extent_status(__entry->found ? __entry->status : 0)) |
| 2370 | ); | 2370 | ); |
| 2371 | 2371 | ||
| 2372 | TRACE_EVENT(ext4_es_shrink_enter, | 2372 | DECLARE_EVENT_CLASS(ext4__es_shrink_enter, |
| 2373 | TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt), | 2373 | TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt), |
| 2374 | 2374 | ||
| 2375 | TP_ARGS(sb, nr_to_scan, cache_cnt), | 2375 | TP_ARGS(sb, nr_to_scan, cache_cnt), |
| @@ -2391,26 +2391,38 @@ TRACE_EVENT(ext4_es_shrink_enter, | |||
| 2391 | __entry->nr_to_scan, __entry->cache_cnt) | 2391 | __entry->nr_to_scan, __entry->cache_cnt) |
| 2392 | ); | 2392 | ); |
| 2393 | 2393 | ||
| 2394 | TRACE_EVENT(ext4_es_shrink_exit, | 2394 | DEFINE_EVENT(ext4__es_shrink_enter, ext4_es_shrink_count, |
| 2395 | TP_PROTO(struct super_block *sb, int shrunk_nr, int cache_cnt), | 2395 | TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt), |
| 2396 | 2396 | ||
| 2397 | TP_ARGS(sb, shrunk_nr, cache_cnt), | 2397 | TP_ARGS(sb, nr_to_scan, cache_cnt) |
| 2398 | ); | ||
| 2399 | |||
| 2400 | DEFINE_EVENT(ext4__es_shrink_enter, ext4_es_shrink_scan_enter, | ||
| 2401 | TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt), | ||
| 2402 | |||
| 2403 | TP_ARGS(sb, nr_to_scan, cache_cnt) | ||
| 2404 | ); | ||
| 2405 | |||
| 2406 | TRACE_EVENT(ext4_es_shrink_scan_exit, | ||
| 2407 | TP_PROTO(struct super_block *sb, int nr_shrunk, int cache_cnt), | ||
| 2408 | |||
| 2409 | TP_ARGS(sb, nr_shrunk, cache_cnt), | ||
| 2398 | 2410 | ||
| 2399 | TP_STRUCT__entry( | 2411 | TP_STRUCT__entry( |
| 2400 | __field( dev_t, dev ) | 2412 | __field( dev_t, dev ) |
| 2401 | __field( int, shrunk_nr ) | 2413 | __field( int, nr_shrunk ) |
| 2402 | __field( int, cache_cnt ) | 2414 | __field( int, cache_cnt ) |
| 2403 | ), | 2415 | ), |
| 2404 | 2416 | ||
| 2405 | TP_fast_assign( | 2417 | TP_fast_assign( |
| 2406 | __entry->dev = sb->s_dev; | 2418 | __entry->dev = sb->s_dev; |
| 2407 | __entry->shrunk_nr = shrunk_nr; | 2419 | __entry->nr_shrunk = nr_shrunk; |
| 2408 | __entry->cache_cnt = cache_cnt; | 2420 | __entry->cache_cnt = cache_cnt; |
| 2409 | ), | 2421 | ), |
| 2410 | 2422 | ||
| 2411 | TP_printk("dev %d,%d shrunk_nr %d cache_cnt %d", | 2423 | TP_printk("dev %d,%d nr_shrunk %d cache_cnt %d", |
| 2412 | MAJOR(__entry->dev), MINOR(__entry->dev), | 2424 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2413 | __entry->shrunk_nr, __entry->cache_cnt) | 2425 | __entry->nr_shrunk, __entry->cache_cnt) |
| 2414 | ); | 2426 | ); |
| 2415 | 2427 | ||
| 2416 | TRACE_EVENT(ext4_collapse_range, | 2428 | TRACE_EVENT(ext4_collapse_range, |
| @@ -2438,6 +2450,37 @@ TRACE_EVENT(ext4_collapse_range, | |||
| 2438 | __entry->offset, __entry->len) | 2450 | __entry->offset, __entry->len) |
| 2439 | ); | 2451 | ); |
| 2440 | 2452 | ||
| 2453 | TRACE_EVENT(ext4_es_shrink, | ||
| 2454 | TP_PROTO(struct super_block *sb, int nr_shrunk, u64 scan_time, | ||
| 2455 | int skip_precached, int nr_skipped, int retried), | ||
| 2456 | |||
| 2457 | TP_ARGS(sb, nr_shrunk, scan_time, skip_precached, nr_skipped, retried), | ||
| 2458 | |||
| 2459 | TP_STRUCT__entry( | ||
| 2460 | __field( dev_t, dev ) | ||
| 2461 | __field( int, nr_shrunk ) | ||
| 2462 | __field( unsigned long long, scan_time ) | ||
| 2463 | __field( int, skip_precached ) | ||
| 2464 | __field( int, nr_skipped ) | ||
| 2465 | __field( int, retried ) | ||
| 2466 | ), | ||
| 2467 | |||
| 2468 | TP_fast_assign( | ||
| 2469 | __entry->dev = sb->s_dev; | ||
| 2470 | __entry->nr_shrunk = nr_shrunk; | ||
| 2471 | __entry->scan_time = div_u64(scan_time, 1000); | ||
| 2472 | __entry->skip_precached = skip_precached; | ||
| 2473 | __entry->nr_skipped = nr_skipped; | ||
| 2474 | __entry->retried = retried; | ||
| 2475 | ), | ||
| 2476 | |||
| 2477 | TP_printk("dev %d,%d nr_shrunk %d, scan_time %llu skip_precached %d " | ||
| 2478 | "nr_skipped %d retried %d", | ||
| 2479 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->nr_shrunk, | ||
| 2480 | __entry->scan_time, __entry->skip_precached, | ||
| 2481 | __entry->nr_skipped, __entry->retried) | ||
| 2482 | ); | ||
| 2483 | |||
| 2441 | #endif /* _TRACE_EXT4_H */ | 2484 | #endif /* _TRACE_EXT4_H */ |
| 2442 | 2485 | ||
| 2443 | /* This part must be outside protection */ | 2486 | /* This part must be outside protection */ |
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index 9b56f37148cf..e335e7d8c6c2 100644 --- a/include/trace/events/rcu.h +++ b/include/trace/events/rcu.h | |||
| @@ -660,18 +660,18 @@ TRACE_EVENT(rcu_torture_read, | |||
| 660 | /* | 660 | /* |
| 661 | * Tracepoint for _rcu_barrier() execution. The string "s" describes | 661 | * Tracepoint for _rcu_barrier() execution. The string "s" describes |
| 662 | * the _rcu_barrier phase: | 662 | * the _rcu_barrier phase: |
| 663 | * "Begin": rcu_barrier_callback() started. | 663 | * "Begin": _rcu_barrier() started. |
| 664 | * "Check": rcu_barrier_callback() checking for piggybacking. | 664 | * "Check": _rcu_barrier() checking for piggybacking. |
| 665 | * "EarlyExit": rcu_barrier_callback() piggybacked, thus early exit. | 665 | * "EarlyExit": _rcu_barrier() piggybacked, thus early exit. |
| 666 | * "Inc1": rcu_barrier_callback() piggyback check counter incremented. | 666 | * "Inc1": _rcu_barrier() piggyback check counter incremented. |
| 667 | * "Offline": rcu_barrier_callback() found offline CPU | 667 | * "OfflineNoCB": _rcu_barrier() found callback on never-online CPU |
| 668 | * "OnlineNoCB": rcu_barrier_callback() found online no-CBs CPU. | 668 | * "OnlineNoCB": _rcu_barrier() found online no-CBs CPU. |
| 669 | * "OnlineQ": rcu_barrier_callback() found online CPU with callbacks. | 669 | * "OnlineQ": _rcu_barrier() found online CPU with callbacks. |
| 670 | * "OnlineNQ": rcu_barrier_callback() found online CPU, no callbacks. | 670 | * "OnlineNQ": _rcu_barrier() found online CPU, no callbacks. |
| 671 | * "IRQ": An rcu_barrier_callback() callback posted on remote CPU. | 671 | * "IRQ": An rcu_barrier_callback() callback posted on remote CPU. |
| 672 | * "CB": An rcu_barrier_callback() invoked a callback, not the last. | 672 | * "CB": An rcu_barrier_callback() invoked a callback, not the last. |
| 673 | * "LastCB": An rcu_barrier_callback() invoked the last callback. | 673 | * "LastCB": An rcu_barrier_callback() invoked the last callback. |
| 674 | * "Inc2": rcu_barrier_callback() piggyback check counter incremented. | 674 | * "Inc2": _rcu_barrier() piggyback check counter incremented. |
| 675 | * The "cpu" argument is the CPU or -1 if meaningless, the "cnt" argument | 675 | * The "cpu" argument is the CPU or -1 if meaningless, the "cnt" argument |
| 676 | * is the count of remaining callbacks, and "done" is the piggybacking count. | 676 | * is the count of remaining callbacks, and "done" is the piggybacking count. |
| 677 | */ | 677 | */ |
diff --git a/include/trace/events/thermal.h b/include/trace/events/thermal.h new file mode 100644 index 000000000000..0f4f95d63c03 --- /dev/null +++ b/include/trace/events/thermal.h | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM thermal | ||
| 3 | |||
| 4 | #if !defined(_TRACE_THERMAL_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_THERMAL_H | ||
| 6 | |||
| 7 | #include <linux/thermal.h> | ||
| 8 | #include <linux/tracepoint.h> | ||
| 9 | |||
| 10 | TRACE_EVENT(thermal_temperature, | ||
| 11 | |||
| 12 | TP_PROTO(struct thermal_zone_device *tz), | ||
| 13 | |||
| 14 | TP_ARGS(tz), | ||
| 15 | |||
| 16 | TP_STRUCT__entry( | ||
| 17 | __string(thermal_zone, tz->type) | ||
| 18 | __field(int, id) | ||
| 19 | __field(int, temp_prev) | ||
| 20 | __field(int, temp) | ||
| 21 | ), | ||
| 22 | |||
| 23 | TP_fast_assign( | ||
| 24 | __assign_str(thermal_zone, tz->type); | ||
| 25 | __entry->id = tz->id; | ||
| 26 | __entry->temp_prev = tz->last_temperature; | ||
| 27 | __entry->temp = tz->temperature; | ||
| 28 | ), | ||
| 29 | |||
| 30 | TP_printk("thermal_zone=%s id=%d temp_prev=%d temp=%d", | ||
| 31 | __get_str(thermal_zone), __entry->id, __entry->temp_prev, | ||
| 32 | __entry->temp) | ||
| 33 | ); | ||
| 34 | |||
| 35 | TRACE_EVENT(cdev_update, | ||
| 36 | |||
| 37 | TP_PROTO(struct thermal_cooling_device *cdev, unsigned long target), | ||
| 38 | |||
| 39 | TP_ARGS(cdev, target), | ||
| 40 | |||
| 41 | TP_STRUCT__entry( | ||
| 42 | __string(type, cdev->type) | ||
| 43 | __field(unsigned long, target) | ||
| 44 | ), | ||
| 45 | |||
| 46 | TP_fast_assign( | ||
| 47 | __assign_str(type, cdev->type); | ||
| 48 | __entry->target = target; | ||
| 49 | ), | ||
| 50 | |||
| 51 | TP_printk("type=%s target=%lu", __get_str(type), __entry->target) | ||
| 52 | ); | ||
| 53 | |||
| 54 | TRACE_EVENT(thermal_zone_trip, | ||
| 55 | |||
| 56 | TP_PROTO(struct thermal_zone_device *tz, int trip, | ||
| 57 | enum thermal_trip_type trip_type), | ||
| 58 | |||
| 59 | TP_ARGS(tz, trip, trip_type), | ||
| 60 | |||
| 61 | TP_STRUCT__entry( | ||
| 62 | __string(thermal_zone, tz->type) | ||
| 63 | __field(int, id) | ||
| 64 | __field(int, trip) | ||
| 65 | __field(enum thermal_trip_type, trip_type) | ||
| 66 | ), | ||
| 67 | |||
| 68 | TP_fast_assign( | ||
| 69 | __assign_str(thermal_zone, tz->type); | ||
| 70 | __entry->id = tz->id; | ||
| 71 | __entry->trip = trip; | ||
| 72 | __entry->trip_type = trip_type; | ||
| 73 | ), | ||
| 74 | |||
| 75 | TP_printk("thermal_zone=%s id=%d trip=%d trip_type=%d", | ||
| 76 | __get_str(thermal_zone), __entry->id, __entry->trip, | ||
| 77 | __entry->trip_type) | ||
| 78 | ); | ||
| 79 | |||
| 80 | #endif /* _TRACE_THERMAL_H */ | ||
| 81 | |||
| 82 | /* This part must be outside protection */ | ||
| 83 | #include <trace/define_trace.h> | ||
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 6cad97485bad..8523f9bb72f2 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild | |||
| @@ -125,6 +125,7 @@ header-y += filter.h | |||
| 125 | header-y += firewire-cdev.h | 125 | header-y += firewire-cdev.h |
| 126 | header-y += firewire-constants.h | 126 | header-y += firewire-constants.h |
| 127 | header-y += flat.h | 127 | header-y += flat.h |
| 128 | header-y += fou.h | ||
| 128 | header-y += fs.h | 129 | header-y += fs.h |
| 129 | header-y += fsl_hypervisor.h | 130 | header-y += fsl_hypervisor.h |
| 130 | header-y += fuse.h | 131 | header-y += fuse.h |
| @@ -141,6 +142,7 @@ header-y += hid.h | |||
| 141 | header-y += hiddev.h | 142 | header-y += hiddev.h |
| 142 | header-y += hidraw.h | 143 | header-y += hidraw.h |
| 143 | header-y += hpet.h | 144 | header-y += hpet.h |
| 145 | header-y += hsr_netlink.h | ||
| 144 | header-y += hyperv.h | 146 | header-y += hyperv.h |
| 145 | header-y += hysdn_if.h | 147 | header-y += hysdn_if.h |
| 146 | header-y += i2c-dev.h | 148 | header-y += i2c-dev.h |
| @@ -251,6 +253,7 @@ header-y += mii.h | |||
| 251 | header-y += minix_fs.h | 253 | header-y += minix_fs.h |
| 252 | header-y += mman.h | 254 | header-y += mman.h |
| 253 | header-y += mmtimer.h | 255 | header-y += mmtimer.h |
| 256 | header-y += mpls.h | ||
| 254 | header-y += mqueue.h | 257 | header-y += mqueue.h |
| 255 | header-y += mroute.h | 258 | header-y += mroute.h |
| 256 | header-y += mroute6.h | 259 | header-y += mroute6.h |
| @@ -374,6 +377,7 @@ header-y += swab.h | |||
| 374 | header-y += synclink.h | 377 | header-y += synclink.h |
| 375 | header-y += sysctl.h | 378 | header-y += sysctl.h |
| 376 | header-y += sysinfo.h | 379 | header-y += sysinfo.h |
| 380 | header-y += target_core_user.h | ||
| 377 | header-y += taskstats.h | 381 | header-y += taskstats.h |
| 378 | header-y += tcp.h | 382 | header-y += tcp.h |
| 379 | header-y += tcp_metrics.h | 383 | header-y += tcp_metrics.h |
| @@ -423,6 +427,7 @@ header-y += virtio_net.h | |||
| 423 | header-y += virtio_pci.h | 427 | header-y += virtio_pci.h |
| 424 | header-y += virtio_ring.h | 428 | header-y += virtio_ring.h |
| 425 | header-y += virtio_rng.h | 429 | header-y += virtio_rng.h |
| 430 | header-y += vm_sockets.h | ||
| 426 | header-y += vt.h | 431 | header-y += vt.h |
| 427 | header-y += wait.h | 432 | header-y += wait.h |
| 428 | header-y += wanrouter.h | 433 | header-y += wanrouter.h |
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index ca1a11bb4443..3735fa0a6784 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | #define RENAME_NOREPLACE (1 << 0) /* Don't overwrite target */ | 38 | #define RENAME_NOREPLACE (1 << 0) /* Don't overwrite target */ |
| 39 | #define RENAME_EXCHANGE (1 << 1) /* Exchange source and dest */ | 39 | #define RENAME_EXCHANGE (1 << 1) /* Exchange source and dest */ |
| 40 | #define RENAME_WHITEOUT (1 << 2) /* Whiteout source */ | ||
| 40 | 41 | ||
| 41 | struct fstrim_range { | 42 | struct fstrim_range { |
| 42 | __u64 start; | 43 | __u64 start; |
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h index 39f621a9fe82..da17e456908d 100644 --- a/include/uapi/linux/if_bridge.h +++ b/include/uapi/linux/if_bridge.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
| 17 | #include <linux/if_ether.h> | 17 | #include <linux/if_ether.h> |
| 18 | #include <linux/in6.h> | ||
| 18 | 19 | ||
| 19 | #define SYSFS_BRIDGE_ATTR "bridge" | 20 | #define SYSFS_BRIDGE_ATTR "bridge" |
| 20 | #define SYSFS_BRIDGE_FDB "brforward" | 21 | #define SYSFS_BRIDGE_FDB "brforward" |
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h index 1874ebe9ac1e..a1d7e931ab72 100644 --- a/include/uapi/linux/input.h +++ b/include/uapi/linux/input.h | |||
| @@ -739,6 +739,13 @@ struct input_keymap_entry { | |||
| 739 | #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ | 739 | #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ |
| 740 | #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ | 740 | #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ |
| 741 | 741 | ||
| 742 | #define KEY_KBDINPUTASSIST_PREV 0x260 | ||
| 743 | #define KEY_KBDINPUTASSIST_NEXT 0x261 | ||
| 744 | #define KEY_KBDINPUTASSIST_PREVGROUP 0x262 | ||
| 745 | #define KEY_KBDINPUTASSIST_NEXTGROUP 0x263 | ||
| 746 | #define KEY_KBDINPUTASSIST_ACCEPT 0x264 | ||
| 747 | #define KEY_KBDINPUTASSIST_CANCEL 0x265 | ||
| 748 | |||
| 742 | #define BTN_TRIGGER_HAPPY 0x2c0 | 749 | #define BTN_TRIGGER_HAPPY 0x2c0 |
| 743 | #define BTN_TRIGGER_HAPPY1 0x2c0 | 750 | #define BTN_TRIGGER_HAPPY1 0x2c0 |
| 744 | #define BTN_TRIGGER_HAPPY2 0x2c1 | 751 | #define BTN_TRIGGER_HAPPY2 0x2c1 |
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 9269de254874..9d845404d875 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h | |||
| @@ -364,7 +364,7 @@ struct perf_event_mmap_page { | |||
| 364 | /* | 364 | /* |
| 365 | * Bits needed to read the hw events in user-space. | 365 | * Bits needed to read the hw events in user-space. |
| 366 | * | 366 | * |
| 367 | * u32 seq, time_mult, time_shift, idx, width; | 367 | * u32 seq, time_mult, time_shift, index, width; |
| 368 | * u64 count, enabled, running; | 368 | * u64 count, enabled, running; |
| 369 | * u64 cyc, time_offset; | 369 | * u64 cyc, time_offset; |
| 370 | * s64 pmc = 0; | 370 | * s64 pmc = 0; |
| @@ -383,11 +383,11 @@ struct perf_event_mmap_page { | |||
| 383 | * time_shift = pc->time_shift; | 383 | * time_shift = pc->time_shift; |
| 384 | * } | 384 | * } |
| 385 | * | 385 | * |
| 386 | * idx = pc->index; | 386 | * index = pc->index; |
| 387 | * count = pc->offset; | 387 | * count = pc->offset; |
| 388 | * if (pc->cap_usr_rdpmc && idx) { | 388 | * if (pc->cap_user_rdpmc && index) { |
| 389 | * width = pc->pmc_width; | 389 | * width = pc->pmc_width; |
| 390 | * pmc = rdpmc(idx - 1); | 390 | * pmc = rdpmc(index - 1); |
| 391 | * } | 391 | * } |
| 392 | * | 392 | * |
| 393 | * barrier(); | 393 | * barrier(); |
| @@ -415,7 +415,7 @@ struct perf_event_mmap_page { | |||
| 415 | }; | 415 | }; |
| 416 | 416 | ||
| 417 | /* | 417 | /* |
| 418 | * If cap_usr_rdpmc this field provides the bit-width of the value | 418 | * If cap_user_rdpmc this field provides the bit-width of the value |
| 419 | * read using the rdpmc() or equivalent instruction. This can be used | 419 | * read using the rdpmc() or equivalent instruction. This can be used |
| 420 | * to sign extend the result like: | 420 | * to sign extend the result like: |
| 421 | * | 421 | * |
| @@ -439,10 +439,10 @@ struct perf_event_mmap_page { | |||
| 439 | * | 439 | * |
| 440 | * Where time_offset,time_mult,time_shift and cyc are read in the | 440 | * Where time_offset,time_mult,time_shift and cyc are read in the |
| 441 | * seqcount loop described above. This delta can then be added to | 441 | * seqcount loop described above. This delta can then be added to |
| 442 | * enabled and possible running (if idx), improving the scaling: | 442 | * enabled and possible running (if index), improving the scaling: |
| 443 | * | 443 | * |
| 444 | * enabled += delta; | 444 | * enabled += delta; |
| 445 | * if (idx) | 445 | * if (index) |
| 446 | * running += delta; | 446 | * running += delta; |
| 447 | * | 447 | * |
| 448 | * quot = count / running; | 448 | * quot = count / running; |
diff --git a/include/uapi/linux/sched.h b/include/uapi/linux/sched.h index 34f9d7387d13..b932be9f5c5b 100644 --- a/include/uapi/linux/sched.h +++ b/include/uapi/linux/sched.h | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | #define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ | 13 | #define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ |
| 14 | #define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ | 14 | #define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ |
| 15 | #define CLONE_THREAD 0x00010000 /* Same thread group? */ | 15 | #define CLONE_THREAD 0x00010000 /* Same thread group? */ |
| 16 | #define CLONE_NEWNS 0x00020000 /* New namespace group? */ | 16 | #define CLONE_NEWNS 0x00020000 /* New mount namespace group */ |
| 17 | #define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */ | 17 | #define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */ |
| 18 | #define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */ | 18 | #define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */ |
| 19 | #define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */ | 19 | #define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */ |
diff --git a/include/uapi/linux/target_core_user.h b/include/uapi/linux/target_core_user.h new file mode 100644 index 000000000000..7dcfbe6771b1 --- /dev/null +++ b/include/uapi/linux/target_core_user.h | |||
| @@ -0,0 +1,142 @@ | |||
| 1 | #ifndef __TARGET_CORE_USER_H | ||
| 2 | #define __TARGET_CORE_USER_H | ||
| 3 | |||
| 4 | /* This header will be used by application too */ | ||
| 5 | |||
| 6 | #include <linux/types.h> | ||
| 7 | #include <linux/uio.h> | ||
| 8 | |||
| 9 | #ifndef __packed | ||
| 10 | #define __packed __attribute__((packed)) | ||
| 11 | #endif | ||
| 12 | |||
| 13 | #define TCMU_VERSION "1.0" | ||
| 14 | |||
| 15 | /* | ||
| 16 | * Ring Design | ||
| 17 | * ----------- | ||
| 18 | * | ||
| 19 | * The mmaped area is divided into three parts: | ||
| 20 | * 1) The mailbox (struct tcmu_mailbox, below) | ||
| 21 | * 2) The command ring | ||
| 22 | * 3) Everything beyond the command ring (data) | ||
| 23 | * | ||
| 24 | * The mailbox tells userspace the offset of the command ring from the | ||
| 25 | * start of the shared memory region, and how big the command ring is. | ||
| 26 | * | ||
| 27 | * The kernel passes SCSI commands to userspace by putting a struct | ||
| 28 | * tcmu_cmd_entry in the ring, updating mailbox->cmd_head, and poking | ||
| 29 | * userspace via uio's interrupt mechanism. | ||
| 30 | * | ||
| 31 | * tcmu_cmd_entry contains a header. If the header type is PAD, | ||
| 32 | * userspace should skip hdr->length bytes (mod cmdr_size) to find the | ||
| 33 | * next cmd_entry. | ||
| 34 | * | ||
| 35 | * Otherwise, the entry will contain offsets into the mmaped area that | ||
| 36 | * contain the cdb and data buffers -- the latter accessible via the | ||
| 37 | * iov array. iov addresses are also offsets into the shared area. | ||
| 38 | * | ||
| 39 | * When userspace is completed handling the command, set | ||
| 40 | * entry->rsp.scsi_status, fill in rsp.sense_buffer if appropriate, | ||
| 41 | * and also set mailbox->cmd_tail equal to the old cmd_tail plus | ||
| 42 | * hdr->length, mod cmdr_size. If cmd_tail doesn't equal cmd_head, it | ||
| 43 | * should process the next packet the same way, and so on. | ||
| 44 | */ | ||
| 45 | |||
| 46 | #define TCMU_MAILBOX_VERSION 1 | ||
| 47 | #define ALIGN_SIZE 64 /* Should be enough for most CPUs */ | ||
| 48 | |||
| 49 | struct tcmu_mailbox { | ||
| 50 | __u16 version; | ||
| 51 | __u16 flags; | ||
| 52 | __u32 cmdr_off; | ||
| 53 | __u32 cmdr_size; | ||
| 54 | |||
| 55 | __u32 cmd_head; | ||
| 56 | |||
| 57 | /* Updated by user. On its own cacheline */ | ||
| 58 | __u32 cmd_tail __attribute__((__aligned__(ALIGN_SIZE))); | ||
| 59 | |||
| 60 | } __packed; | ||
| 61 | |||
| 62 | enum tcmu_opcode { | ||
| 63 | TCMU_OP_PAD = 0, | ||
| 64 | TCMU_OP_CMD, | ||
| 65 | }; | ||
| 66 | |||
| 67 | /* | ||
| 68 | * Only a few opcodes, and length is 8-byte aligned, so use low bits for opcode. | ||
| 69 | */ | ||
| 70 | struct tcmu_cmd_entry_hdr { | ||
| 71 | __u32 len_op; | ||
| 72 | } __packed; | ||
| 73 | |||
| 74 | #define TCMU_OP_MASK 0x7 | ||
| 75 | |||
| 76 | static inline enum tcmu_opcode tcmu_hdr_get_op(struct tcmu_cmd_entry_hdr *hdr) | ||
| 77 | { | ||
| 78 | return hdr->len_op & TCMU_OP_MASK; | ||
| 79 | } | ||
| 80 | |||
| 81 | static inline void tcmu_hdr_set_op(struct tcmu_cmd_entry_hdr *hdr, enum tcmu_opcode op) | ||
| 82 | { | ||
| 83 | hdr->len_op &= ~TCMU_OP_MASK; | ||
| 84 | hdr->len_op |= (op & TCMU_OP_MASK); | ||
| 85 | } | ||
| 86 | |||
| 87 | static inline __u32 tcmu_hdr_get_len(struct tcmu_cmd_entry_hdr *hdr) | ||
| 88 | { | ||
| 89 | return hdr->len_op & ~TCMU_OP_MASK; | ||
| 90 | } | ||
| 91 | |||
| 92 | static inline void tcmu_hdr_set_len(struct tcmu_cmd_entry_hdr *hdr, __u32 len) | ||
| 93 | { | ||
| 94 | hdr->len_op &= TCMU_OP_MASK; | ||
| 95 | hdr->len_op |= len; | ||
| 96 | } | ||
| 97 | |||
| 98 | /* Currently the same as SCSI_SENSE_BUFFERSIZE */ | ||
| 99 | #define TCMU_SENSE_BUFFERSIZE 96 | ||
| 100 | |||
| 101 | struct tcmu_cmd_entry { | ||
| 102 | struct tcmu_cmd_entry_hdr hdr; | ||
| 103 | |||
| 104 | uint16_t cmd_id; | ||
| 105 | uint16_t __pad1; | ||
| 106 | |||
| 107 | union { | ||
| 108 | struct { | ||
| 109 | uint64_t cdb_off; | ||
| 110 | uint64_t iov_cnt; | ||
| 111 | struct iovec iov[0]; | ||
| 112 | } req; | ||
| 113 | struct { | ||
| 114 | uint8_t scsi_status; | ||
| 115 | uint8_t __pad1; | ||
| 116 | uint16_t __pad2; | ||
| 117 | uint32_t __pad3; | ||
| 118 | char sense_buffer[TCMU_SENSE_BUFFERSIZE]; | ||
| 119 | } rsp; | ||
| 120 | }; | ||
| 121 | |||
| 122 | } __packed; | ||
| 123 | |||
| 124 | #define TCMU_OP_ALIGN_SIZE sizeof(uint64_t) | ||
| 125 | |||
| 126 | enum tcmu_genl_cmd { | ||
| 127 | TCMU_CMD_UNSPEC, | ||
| 128 | TCMU_CMD_ADDED_DEVICE, | ||
| 129 | TCMU_CMD_REMOVED_DEVICE, | ||
| 130 | __TCMU_CMD_MAX, | ||
| 131 | }; | ||
| 132 | #define TCMU_CMD_MAX (__TCMU_CMD_MAX - 1) | ||
| 133 | |||
| 134 | enum tcmu_genl_attr { | ||
| 135 | TCMU_ATTR_UNSPEC, | ||
| 136 | TCMU_ATTR_DEVICE, | ||
| 137 | TCMU_ATTR_MINOR, | ||
| 138 | __TCMU_ATTR_MAX, | ||
| 139 | }; | ||
| 140 | #define TCMU_ATTR_MAX (__TCMU_ATTR_MAX - 1) | ||
| 141 | |||
| 142 | #endif | ||
diff --git a/include/uapi/linux/v4l2-dv-timings.h b/include/uapi/linux/v4l2-dv-timings.h index 6a0764c89fcb..6c8f159e416e 100644 --- a/include/uapi/linux/v4l2-dv-timings.h +++ b/include/uapi/linux/v4l2-dv-timings.h | |||
| @@ -21,8 +21,17 @@ | |||
| 21 | #ifndef _V4L2_DV_TIMINGS_H | 21 | #ifndef _V4L2_DV_TIMINGS_H |
| 22 | #define _V4L2_DV_TIMINGS_H | 22 | #define _V4L2_DV_TIMINGS_H |
| 23 | 23 | ||
| 24 | #if __GNUC__ < 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ < 6)) | ||
| 25 | /* Sadly gcc versions older than 4.6 have a bug in how they initialize | ||
| 26 | anonymous unions where they require additional curly brackets. | ||
| 27 | This violates the C1x standard. This workaround adds the curly brackets | ||
| 28 | if needed. */ | ||
| 24 | #define V4L2_INIT_BT_TIMINGS(_width, args...) \ | 29 | #define V4L2_INIT_BT_TIMINGS(_width, args...) \ |
| 25 | { .bt = { _width , ## args } } | 30 | { .bt = { _width , ## args } } |
| 31 | #else | ||
| 32 | #define V4L2_INIT_BT_TIMINGS(_width, args...) \ | ||
| 33 | .bt = { _width , ## args } | ||
| 34 | #endif | ||
| 26 | 35 | ||
| 27 | /* CEA-861-E timings (i.e. standard HDTV timings) */ | 36 | /* CEA-861-E timings (i.e. standard HDTV timings) */ |
| 28 | 37 | ||
diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index 6ee586728df9..941d32f007dc 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h | |||
| @@ -220,7 +220,9 @@ typedef int __bitwise snd_pcm_format_t; | |||
| 220 | #define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */ | 220 | #define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */ |
| 221 | #define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */ | 221 | #define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */ |
| 222 | #define SNDRV_PCM_FORMAT_DSD_U32_LE ((__force snd_pcm_format_t) 50) /* DSD, 4-byte samples DSD (x32), little endian */ | 222 | #define SNDRV_PCM_FORMAT_DSD_U32_LE ((__force snd_pcm_format_t) 50) /* DSD, 4-byte samples DSD (x32), little endian */ |
| 223 | #define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_LE | 223 | #define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */ |
| 224 | #define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */ | ||
| 225 | #define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE | ||
| 224 | 226 | ||
| 225 | #ifdef SNDRV_LITTLE_ENDIAN | 227 | #ifdef SNDRV_LITTLE_ENDIAN |
| 226 | #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE | 228 | #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE |
