From: Greg Kroah-Hartman Date: Fri, 4 Aug 2017 22:26:07 +0000 (-0700) Subject: 4.4-stable patches X-Git-Tag: v4.12.5~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=741c2fb7ff0180001fd3eb6e02f4c05c1cd32602;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: acpi-scan-prefer-devices-without-_hid-_cid-for-_adr-matching.patch arm-s3c2410_defconfig-fix-invalid-values-for-nf_ct_proto_.patch arm64-zynqmp-fix-i2c-node-s-compatible-string.patch arm64-zynqmp-fix-w-1-dtc-1.4-warnings.patch asoc-nau8825-fix-invalid-configuration-in-pre-scalar-of-fll.patch btrfs-adjust-outstanding_extents-counter-properly-when-dio-write-is-split.patch btrfs-use-down_read_nested-to-make-lockdep-silent.patch dmaengine-ioatdma-add-skylake-pci-dev-id.patch dmaengine-ioatdma-workaround-skx-ioatdma-version.patch dmaengine-ti-dma-crossbar-add-some-of_node_put-in-error-path.patch irqchip-mxs-enable-skip_set_wake-and-mask_on_suspend.patch openrisc-add-_text-symbol-to-fix-ksym-build-error.patch tools-lib-traceevent-fix-prev-next_prio-for-deadline-tasks.patch usb-gadget-fix-copy-pasted-error-message.patch xfrm-don-t-use-sk_family-for-socket-policy-lookups.patch --- diff --git a/queue-4.4/acpi-scan-prefer-devices-without-_hid-_cid-for-_adr-matching.patch b/queue-4.4/acpi-scan-prefer-devices-without-_hid-_cid-for-_adr-matching.patch new file mode 100644 index 00000000000..58dc20cd2d3 --- /dev/null +++ b/queue-4.4/acpi-scan-prefer-devices-without-_hid-_cid-for-_adr-matching.patch @@ -0,0 +1,55 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: "Rafael J. Wysocki" +Date: Fri, 30 Dec 2016 02:27:31 +0100 +Subject: ACPI / scan: Prefer devices without _HID/_CID for _ADR matching + +From: "Rafael J. Wysocki" + + +[ Upstream commit c2a6bbaf0c5f90463a7011a295bbdb7e33c80b51 ] + +The way acpi_find_child_device() works currently is that, if there +are two (or more) devices with the same _ADR value in the same +namespace scope (which is not specifically allowed by the spec and +the OS behavior in that case is not defined), the first one of them +found to be present (with the help of _STA) will be returned. + +This covers the majority of cases, but is not sufficient if some of +the devices in question have a _HID (or _CID) returning some valid +ACPI/PNP device IDs (which is disallowed by the spec) and the +ASL writers' expectation appears to be that the OS will match +devices without a valid ACPI/PNP device ID against a given bus +address first. + +To cover this special case as well, modify find_child_checks() +to prefer devices without ACPI/PNP device IDs over devices that +have them. + +Suggested-by: Mika Westerberg +Signed-off-by: Rafael J. Wysocki +Tested-by: Hans de Goede +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/acpi/glue.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +--- a/drivers/acpi/glue.c ++++ b/drivers/acpi/glue.c +@@ -98,7 +98,15 @@ static int find_child_checks(struct acpi + if (check_children && list_empty(&adev->children)) + return -ENODEV; + +- return sta_present ? FIND_CHILD_MAX_SCORE : FIND_CHILD_MIN_SCORE; ++ /* ++ * If the device has a _HID (or _CID) returning a valid ACPI/PNP ++ * device ID, it is better to make it look less attractive here, so that ++ * the other device with the same _ADR value (that may not have a valid ++ * device ID) can be matched going forward. [This means a second spec ++ * violation in a row, so whatever we do here is best effort anyway.] ++ */ ++ return sta_present && list_empty(&adev->pnp.ids) ? ++ FIND_CHILD_MAX_SCORE : FIND_CHILD_MIN_SCORE; + } + + struct acpi_device *acpi_find_child_device(struct acpi_device *parent, diff --git a/queue-4.4/arm-s3c2410_defconfig-fix-invalid-values-for-nf_ct_proto_.patch b/queue-4.4/arm-s3c2410_defconfig-fix-invalid-values-for-nf_ct_proto_.patch new file mode 100644 index 00000000000..1149e49eb49 --- /dev/null +++ b/queue-4.4/arm-s3c2410_defconfig-fix-invalid-values-for-nf_ct_proto_.patch @@ -0,0 +1,38 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: Krzysztof Kozlowski +Date: Thu, 29 Dec 2016 14:41:05 +0200 +Subject: ARM: s3c2410_defconfig: Fix invalid values for NF_CT_PROTO_* + +From: Krzysztof Kozlowski + + +[ Upstream commit 3ef01c968fbfb21c2f16281445d30a865ee4412c ] + +NF_CT_PROTO_DCCP/SCTP/UDPLITE were switched from tristate to boolean so +defconfig needs to be adjusted to silence warnings: + warning: symbol value 'm' invalid for NF_CT_PROTO_DCCP + warning: symbol value 'm' invalid for NF_CT_PROTO_SCTP + warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE + +Signed-off-by: Krzysztof Kozlowski +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/configs/s3c2410_defconfig | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/arm/configs/s3c2410_defconfig ++++ b/arch/arm/configs/s3c2410_defconfig +@@ -87,9 +87,9 @@ CONFIG_IPV6_TUNNEL=m + CONFIG_NETFILTER=y + CONFIG_NF_CONNTRACK=m + CONFIG_NF_CONNTRACK_EVENTS=y +-CONFIG_NF_CT_PROTO_DCCP=m +-CONFIG_NF_CT_PROTO_SCTP=m +-CONFIG_NF_CT_PROTO_UDPLITE=m ++CONFIG_NF_CT_PROTO_DCCP=y ++CONFIG_NF_CT_PROTO_SCTP=y ++CONFIG_NF_CT_PROTO_UDPLITE=y + CONFIG_NF_CONNTRACK_AMANDA=m + CONFIG_NF_CONNTRACK_FTP=m + CONFIG_NF_CONNTRACK_H323=m diff --git a/queue-4.4/arm64-zynqmp-fix-i2c-node-s-compatible-string.patch b/queue-4.4/arm64-zynqmp-fix-i2c-node-s-compatible-string.patch new file mode 100644 index 00000000000..1d10c78335f --- /dev/null +++ b/queue-4.4/arm64-zynqmp-fix-i2c-node-s-compatible-string.patch @@ -0,0 +1,46 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: Moritz Fischer +Date: Thu, 22 Dec 2016 09:19:25 -0800 +Subject: ARM64: zynqmp: Fix i2c node's compatible string + +From: Moritz Fischer + + +[ Upstream commit c415f9e8304a1d235ef118d912f374ee2e46c45d ] + +The Zynq Ultrascale MP uses version 1.4 of the Cadence IP core +which fixes some silicon bugs that needed software workarounds +in Version 1.0 that was used on Zynq systems. + +Signed-off-by: Moritz Fischer +Cc: Michal Simek +Cc: Sören Brinkmann +Cc: Rob Herring +Acked-by: Sören Brinkmann +Signed-off-by: Michal Simek +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi ++++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi +@@ -191,7 +191,7 @@ + }; + + i2c0: i2c@ff020000 { +- compatible = "cdns,i2c-r1p10"; ++ compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10"; + status = "disabled"; + interrupt-parent = <&gic>; + interrupts = <0 17 4>; +@@ -202,7 +202,7 @@ + }; + + i2c1: i2c@ff030000 { +- compatible = "cdns,i2c-r1p10"; ++ compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10"; + status = "disabled"; + interrupt-parent = <&gic>; + interrupts = <0 18 4>; diff --git a/queue-4.4/arm64-zynqmp-fix-w-1-dtc-1.4-warnings.patch b/queue-4.4/arm64-zynqmp-fix-w-1-dtc-1.4-warnings.patch new file mode 100644 index 00000000000..9f549a8b5c9 --- /dev/null +++ b/queue-4.4/arm64-zynqmp-fix-w-1-dtc-1.4-warnings.patch @@ -0,0 +1,46 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: Michal Simek +Date: Tue, 15 Nov 2016 14:53:13 +0100 +Subject: ARM64: zynqmp: Fix W=1 dtc 1.4 warnings + +From: Michal Simek + + +[ Upstream commit 4ea2a6be9565455f152c12f80222af1582ede0c7 ] + +The patch removes these warnings reported by dtc 1.4: +Warning (unit_address_vs_reg): Node /amba_apu has a reg or ranges +property, but no unit name +Warning (unit_address_vs_reg): Node /memory has a reg or ranges +property, but no unit name + +Signed-off-by: Michal Simek +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts | 2 +- + arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts ++++ b/arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts +@@ -26,7 +26,7 @@ + stdout-path = "serial0:115200n8"; + }; + +- memory { ++ memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x40000000>; + }; +--- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi ++++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi +@@ -71,7 +71,7 @@ + <1 10 0xf01>; + }; + +- amba_apu { ++ amba_apu: amba_apu@0 { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <1>; diff --git a/queue-4.4/asoc-nau8825-fix-invalid-configuration-in-pre-scalar-of-fll.patch b/queue-4.4/asoc-nau8825-fix-invalid-configuration-in-pre-scalar-of-fll.patch new file mode 100644 index 00000000000..8270bf869b2 --- /dev/null +++ b/queue-4.4/asoc-nau8825-fix-invalid-configuration-in-pre-scalar-of-fll.patch @@ -0,0 +1,47 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: John Hsu +Date: Tue, 20 Dec 2016 12:03:09 +0800 +Subject: ASoC: nau8825: fix invalid configuration in Pre-Scalar of FLL + +From: John Hsu + + +[ Upstream commit a1792cda51300e15b03549cccf0b09f3be82e697 ] + +The clk_ref_div is not configured in the correct position of the +register. The patch fixes that clk_ref_div, Pre-Scalar, is assigned +the wrong value. + +Signed-off-by: John Hsu +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/codecs/nau8825.c | 3 ++- + sound/soc/codecs/nau8825.h | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +--- a/sound/soc/codecs/nau8825.c ++++ b/sound/soc/codecs/nau8825.c +@@ -936,7 +936,8 @@ static void nau8825_fll_apply(struct nau + NAU8825_FLL_INTEGER_MASK, fll_param->fll_int); + /* FLL pre-scaler */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL4, +- NAU8825_FLL_REF_DIV_MASK, fll_param->clk_ref_div); ++ NAU8825_FLL_REF_DIV_MASK, ++ fll_param->clk_ref_div << NAU8825_FLL_REF_DIV_SFT); + /* select divided VCO input */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5, + NAU8825_FLL_FILTER_SW_MASK, 0x0000); +--- a/sound/soc/codecs/nau8825.h ++++ b/sound/soc/codecs/nau8825.h +@@ -114,7 +114,8 @@ + #define NAU8825_FLL_INTEGER_MASK (0x3ff << 0) + + /* FLL4 (0x07) */ +-#define NAU8825_FLL_REF_DIV_MASK (0x3 << 10) ++#define NAU8825_FLL_REF_DIV_SFT 10 ++#define NAU8825_FLL_REF_DIV_MASK (0x3 << NAU8825_FLL_REF_DIV_SFT) + + /* FLL5 (0x08) */ + #define NAU8825_FLL_FILTER_SW_MASK (0x1 << 14) diff --git a/queue-4.4/btrfs-adjust-outstanding_extents-counter-properly-when-dio-write-is-split.patch b/queue-4.4/btrfs-adjust-outstanding_extents-counter-properly-when-dio-write-is-split.patch new file mode 100644 index 00000000000..4553b905518 --- /dev/null +++ b/queue-4.4/btrfs-adjust-outstanding_extents-counter-properly-when-dio-write-is-split.patch @@ -0,0 +1,52 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: Liu Bo +Date: Thu, 22 Dec 2016 17:13:54 -0800 +Subject: Btrfs: adjust outstanding_extents counter properly when dio write is split + +From: Liu Bo + + +[ Upstream commit c2931667c83ded6504b3857e99cc45b21fa496fb ] + +Currently how btrfs dio deals with split dio write is not good +enough if dio write is split into several segments due to the +lack of contiguous space, a large dio write like 'dd bs=1G count=1' +can end up with incorrect outstanding_extents counter and endio +would complain loudly with an assertion. + +This fixes the problem by compensating the outstanding_extents +counter in inode if a large dio write gets split. + +Reported-by: Anand Jain +Tested-by: Anand Jain +Signed-off-by: Liu Bo +Signed-off-by: David Sterba +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + fs/btrfs/inode.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/fs/btrfs/inode.c ++++ b/fs/btrfs/inode.c +@@ -7521,11 +7521,18 @@ static void adjust_dio_outstanding_exten + * within our reservation, otherwise we need to adjust our inode + * counter appropriately. + */ +- if (dio_data->outstanding_extents) { ++ if (dio_data->outstanding_extents >= num_extents) { + dio_data->outstanding_extents -= num_extents; + } else { ++ /* ++ * If dio write length has been split due to no large enough ++ * contiguous space, we need to compensate our inode counter ++ * appropriately. ++ */ ++ u64 num_needed = num_extents - dio_data->outstanding_extents; ++ + spin_lock(&BTRFS_I(inode)->lock); +- BTRFS_I(inode)->outstanding_extents += num_extents; ++ BTRFS_I(inode)->outstanding_extents += num_needed; + spin_unlock(&BTRFS_I(inode)->lock); + } + } diff --git a/queue-4.4/btrfs-use-down_read_nested-to-make-lockdep-silent.patch b/queue-4.4/btrfs-use-down_read_nested-to-make-lockdep-silent.patch new file mode 100644 index 00000000000..9a3a3d361a1 --- /dev/null +++ b/queue-4.4/btrfs-use-down_read_nested-to-make-lockdep-silent.patch @@ -0,0 +1,41 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: Liu Bo +Date: Wed, 30 Nov 2016 16:11:04 -0800 +Subject: Btrfs: use down_read_nested to make lockdep silent + +From: Liu Bo + + +[ Upstream commit e321f8a801d7b4c40da8005257b05b9c2b51b072 ] + +If @block_group is not @used_bg, it'll try to get @used_bg's lock without +droping @block_group 's lock and lockdep has throwed a scary deadlock warning +about it. +Fix it by using down_read_nested. + +Signed-off-by: Liu Bo +Reviewed-by: David Sterba +Signed-off-by: David Sterba +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + fs/btrfs/extent-tree.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c +index e46e7fbe1b34..14a37ff0b9e3 100644 +--- a/fs/btrfs/extent-tree.c ++++ b/fs/btrfs/extent-tree.c +@@ -7401,7 +7401,8 @@ btrfs_lock_cluster(struct btrfs_block_group_cache *block_group, + + spin_unlock(&cluster->refill_lock); + +- down_read(&used_bg->data_rwsem); ++ /* We should only have one-level nested. */ ++ down_read_nested(&used_bg->data_rwsem, SINGLE_DEPTH_NESTING); + + spin_lock(&cluster->refill_lock); + if (used_bg == cluster->block_group) +-- +2.13.4 + diff --git a/queue-4.4/dmaengine-ioatdma-add-skylake-pci-dev-id.patch b/queue-4.4/dmaengine-ioatdma-add-skylake-pci-dev-id.patch new file mode 100644 index 00000000000..c88e803cdb2 --- /dev/null +++ b/queue-4.4/dmaengine-ioatdma-add-skylake-pci-dev-id.patch @@ -0,0 +1,60 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: Dave Jiang +Date: Tue, 13 Dec 2016 11:15:21 -0700 +Subject: dmaengine: ioatdma: Add Skylake PCI Dev ID + +From: Dave Jiang + + +[ Upstream commit 1594c18fd297a8edcc72bc4b161f3f52603ebb92 ] + +Adding Skylake Xeon PCI device ids for ioatdma and related bits. + +Signed-off-by: Dave Jiang +Signed-off-by: Vinod Koul +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/dma/ioat/hw.h | 2 ++ + drivers/dma/ioat/init.c | 9 ++++++++- + 2 files changed, 10 insertions(+), 1 deletion(-) + +--- a/drivers/dma/ioat/hw.h ++++ b/drivers/dma/ioat/hw.h +@@ -64,6 +64,8 @@ + #define PCI_DEVICE_ID_INTEL_IOAT_BDX8 0x6f2e + #define PCI_DEVICE_ID_INTEL_IOAT_BDX9 0x6f2f + ++#define PCI_DEVICE_ID_INTEL_IOAT_SKX 0x2021 ++ + #define IOAT_VER_1_2 0x12 /* Version 1.2 */ + #define IOAT_VER_2_0 0x20 /* Version 2.0 */ + #define IOAT_VER_3_0 0x30 /* Version 3.0 */ +--- a/drivers/dma/ioat/init.c ++++ b/drivers/dma/ioat/init.c +@@ -105,6 +105,8 @@ static struct pci_device_id ioat_pci_tbl + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_BDX8) }, + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_BDX9) }, + ++ { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_SKX) }, ++ + /* I/OAT v3.3 platforms */ + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_BWD0) }, + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_BWD1) }, +@@ -250,10 +252,15 @@ static bool is_bdx_ioat(struct pci_dev * + } + } + ++static inline bool is_skx_ioat(struct pci_dev *pdev) ++{ ++ return (pdev->device == PCI_DEVICE_ID_INTEL_IOAT_SKX) ? true : false; ++} ++ + static bool is_xeon_cb32(struct pci_dev *pdev) + { + return is_jf_ioat(pdev) || is_snb_ioat(pdev) || is_ivb_ioat(pdev) || +- is_hsw_ioat(pdev) || is_bdx_ioat(pdev); ++ is_hsw_ioat(pdev) || is_bdx_ioat(pdev) || is_skx_ioat(pdev); + } + + bool is_bwd_ioat(struct pci_dev *pdev) diff --git a/queue-4.4/dmaengine-ioatdma-workaround-skx-ioatdma-version.patch b/queue-4.4/dmaengine-ioatdma-workaround-skx-ioatdma-version.patch new file mode 100644 index 00000000000..1fe73cc850e --- /dev/null +++ b/queue-4.4/dmaengine-ioatdma-workaround-skx-ioatdma-version.patch @@ -0,0 +1,33 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: Dave Jiang +Date: Tue, 13 Dec 2016 11:15:27 -0700 +Subject: dmaengine: ioatdma: workaround SKX ioatdma version + +From: Dave Jiang + + +[ Upstream commit 34a31f0af84158955a9747fb5c6712da5bbb5331 ] + +The Skylake ioatdma is technically CBDMA 3.2+ and contains the same hardware +bits with some additional 3.3 features, but it's not really 3.3 where the +driver is concerned. + +Signed-off-by: Dave Jiang +Signed-off-by: Vinod Koul +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/dma/ioat/init.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/dma/ioat/init.c ++++ b/drivers/dma/ioat/init.c +@@ -1357,6 +1357,8 @@ static int ioat_pci_probe(struct pci_dev + + device->version = readb(device->reg_base + IOAT_VER_OFFSET); + if (device->version >= IOAT_VER_3_0) { ++ if (is_skx_ioat(pdev)) ++ device->version = IOAT_VER_3_2; + err = ioat3_dma_probe(device, ioat_dca_enabled); + + if (device->version >= IOAT_VER_3_3) diff --git a/queue-4.4/dmaengine-ti-dma-crossbar-add-some-of_node_put-in-error-path.patch b/queue-4.4/dmaengine-ti-dma-crossbar-add-some-of_node_put-in-error-path.patch new file mode 100644 index 00000000000..5324d441a32 --- /dev/null +++ b/queue-4.4/dmaengine-ti-dma-crossbar-add-some-of_node_put-in-error-path.patch @@ -0,0 +1,38 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: Christophe JAILLET +Date: Mon, 19 Dec 2016 06:33:51 +0100 +Subject: dmaengine: ti-dma-crossbar: Add some 'of_node_put()' in error path. + +From: Christophe JAILLET + + +[ Upstream commit 75bdc7f31a3a6e9a12e218b31a44a1f54a91554c ] + +Add some missing 'of_node_put()' in early exit error path. + +Signed-off-by: Christophe JAILLET +Signed-off-by: Vinod Koul +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/dma/ti-dma-crossbar.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/dma/ti-dma-crossbar.c ++++ b/drivers/dma/ti-dma-crossbar.c +@@ -146,6 +146,7 @@ static int ti_am335x_xbar_probe(struct p + match = of_match_node(ti_am335x_master_match, dma_node); + if (!match) { + dev_err(&pdev->dev, "DMA master is not supported\n"); ++ of_node_put(dma_node); + return -EINVAL; + } + +@@ -310,6 +311,7 @@ static int ti_dra7_xbar_probe(struct pla + match = of_match_node(ti_dra7_master_match, dma_node); + if (!match) { + dev_err(&pdev->dev, "DMA master is not supported\n"); ++ of_node_put(dma_node); + return -EINVAL; + } + diff --git a/queue-4.4/irqchip-mxs-enable-skip_set_wake-and-mask_on_suspend.patch b/queue-4.4/irqchip-mxs-enable-skip_set_wake-and-mask_on_suspend.patch new file mode 100644 index 00000000000..5a4bd1a1568 --- /dev/null +++ b/queue-4.4/irqchip-mxs-enable-skip_set_wake-and-mask_on_suspend.patch @@ -0,0 +1,48 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: Stefan Wahren +Date: Tue, 27 Dec 2016 18:29:57 +0000 +Subject: irqchip/mxs: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND + +From: Stefan Wahren + + +[ Upstream commit 88e20c74ee020f9e0c99dfce0dd9aa61c3f0cca0 ] + +The ICOLL controller doesn't provide any facility to configure the +wakeup sources. That's the reason why this implementation lacks +the irq_set_wake implementation. But this prevent us from properly +entering power management states like "suspend to idle". + +So enable the flags IRQCHIP_SKIP_SET_WAKE and +IRQCHIP_MASK_ON_SUSPEND to let the irqchip core allows and handles +the power management. + +Signed-off-by: Stefan Wahren +Reviewed-by: Fabio Estevam +Link: https://lkml.kernel.org/r/1482863397-11400-1-git-send-email-stefan.wahren@i2se.com +Signed-off-by: Jason Cooper +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/irqchip/irq-mxs.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/irqchip/irq-mxs.c ++++ b/drivers/irqchip/irq-mxs.c +@@ -131,12 +131,16 @@ static struct irq_chip mxs_icoll_chip = + .irq_ack = icoll_ack_irq, + .irq_mask = icoll_mask_irq, + .irq_unmask = icoll_unmask_irq, ++ .flags = IRQCHIP_MASK_ON_SUSPEND | ++ IRQCHIP_SKIP_SET_WAKE, + }; + + static struct irq_chip asm9260_icoll_chip = { + .irq_ack = icoll_ack_irq, + .irq_mask = asm9260_mask_irq, + .irq_unmask = asm9260_unmask_irq, ++ .flags = IRQCHIP_MASK_ON_SUSPEND | ++ IRQCHIP_SKIP_SET_WAKE, + }; + + asmlinkage void __exception_irq_entry icoll_handle_irq(struct pt_regs *regs) diff --git a/queue-4.4/openrisc-add-_text-symbol-to-fix-ksym-build-error.patch b/queue-4.4/openrisc-add-_text-symbol-to-fix-ksym-build-error.patch new file mode 100644 index 00000000000..71fc6c6344b --- /dev/null +++ b/queue-4.4/openrisc-add-_text-symbol-to-fix-ksym-build-error.patch @@ -0,0 +1,37 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: Stafford Horne +Date: Wed, 14 Dec 2016 21:27:57 +0900 +Subject: openrisc: Add _text symbol to fix ksym build error + +From: Stafford Horne + + +[ Upstream commit 086cc1c31a0ec075dac02425367c871bb65bc2c9 ] + +The build robot reports: + + .tmp_kallsyms1.o: In function `kallsyms_relative_base': +>> (.rodata+0x8a18): undefined reference to `_text' + +This is when using 'make alldefconfig'. Adding this _text symbol to mark +the start of the kernel as in other architecture fixes this. + +Signed-off-by: Stafford Horne +Acked-by: Jonas Bonn +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + arch/openrisc/kernel/vmlinux.lds.S | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/openrisc/kernel/vmlinux.lds.S ++++ b/arch/openrisc/kernel/vmlinux.lds.S +@@ -38,6 +38,8 @@ SECTIONS + /* Read-only sections, merged into text segment: */ + . = LOAD_BASE ; + ++ _text = .; ++ + /* _s_kernel_ro must be page aligned */ + . = ALIGN(PAGE_SIZE); + _s_kernel_ro = .; diff --git a/queue-4.4/series b/queue-4.4/series index be69507d9b8..2181ad0e9a3 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -62,3 +62,18 @@ vfio-pci-use-32-bit-comparisons-for-register-address-for-gcc-4.5.patch irqchip-keystone-fix-scheduling-while-atomic-on-rt.patch asoc-tlv320aic3x-mark-the-reset-register-as-volatile.patch spi-dw-make-debugfs-name-unique-between-instances.patch +asoc-nau8825-fix-invalid-configuration-in-pre-scalar-of-fll.patch +irqchip-mxs-enable-skip_set_wake-and-mask_on_suspend.patch +openrisc-add-_text-symbol-to-fix-ksym-build-error.patch +dmaengine-ioatdma-add-skylake-pci-dev-id.patch +dmaengine-ioatdma-workaround-skx-ioatdma-version.patch +dmaengine-ti-dma-crossbar-add-some-of_node_put-in-error-path.patch +arm64-zynqmp-fix-w-1-dtc-1.4-warnings.patch +arm64-zynqmp-fix-i2c-node-s-compatible-string.patch +arm-s3c2410_defconfig-fix-invalid-values-for-nf_ct_proto_.patch +acpi-scan-prefer-devices-without-_hid-_cid-for-_adr-matching.patch +usb-gadget-fix-copy-pasted-error-message.patch +btrfs-adjust-outstanding_extents-counter-properly-when-dio-write-is-split.patch +tools-lib-traceevent-fix-prev-next_prio-for-deadline-tasks.patch +xfrm-don-t-use-sk_family-for-socket-policy-lookups.patch +btrfs-use-down_read_nested-to-make-lockdep-silent.patch diff --git a/queue-4.4/tools-lib-traceevent-fix-prev-next_prio-for-deadline-tasks.patch b/queue-4.4/tools-lib-traceevent-fix-prev-next_prio-for-deadline-tasks.patch new file mode 100644 index 00000000000..d8f8bca8c75 --- /dev/null +++ b/queue-4.4/tools-lib-traceevent-fix-prev-next_prio-for-deadline-tasks.patch @@ -0,0 +1,119 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: Daniel Bristot de Oliveira +Date: Tue, 3 Jan 2017 12:42:42 +0100 +Subject: tools lib traceevent: Fix prev/next_prio for deadline tasks + +From: Daniel Bristot de Oliveira + + +[ Upstream commit 074859184d770824f4437dca716bdeb625ae8b1c ] + +Currently, the sched:sched_switch tracepoint reports deadline tasks with +priority -1. But when reading the trace via perf script I've got the +following output: + + # ./d & # (d is a deadline task, see [1]) + # perf record -e sched:sched_switch -a sleep 1 + # perf script + ... + swapper 0 [000] 2146.962441: sched:sched_switch: swapper/0:0 [120] R ==> d:2593 [4294967295] + d 2593 [000] 2146.972472: sched:sched_switch: d:2593 [4294967295] R ==> g:2590 [4294967295] + +The task d reports the wrong priority [4294967295]. This happens because +the "int prio" is stored in an unsigned long long val. Although it is +set as a %lld, as int is shorter than unsigned long long, +trace_seq_printf prints it as a positive number. + +The fix is just to cast the val as an int, and print it as a %d, +as in the sched:sched_switch tracepoint's "format". + +The output with the fix is: + + # ./d & + # perf record -e sched:sched_switch -a sleep 1 + # perf script + ... + swapper 0 [000] 4306.374037: sched:sched_switch: swapper/0:0 [120] R ==> d:10941 [-1] + d 10941 [000] 4306.383823: sched:sched_switch: d:10941 [-1] R ==> swapper/0:0 [120] + +[1] d.c + + --- + #include + #include + #include + #include + #include + + struct sched_attr { + __u32 size, sched_policy; + __u64 sched_flags; + __s32 sched_nice; + __u32 sched_priority; + __u64 sched_runtime, sched_deadline, sched_period; + }; + + int sched_setattr(pid_t pid, const struct sched_attr *attr, unsigned int flags) + { + return syscall(__NR_sched_setattr, pid, attr, flags); + } + + int main(void) + { + struct sched_attr attr = { + .size = sizeof(attr), + .sched_policy = SCHED_DEADLINE, /* This creates a 10ms/30ms reservation */ + .sched_runtime = 10 * 1000 * 1000, + .sched_period = attr.sched_deadline = 30 * 1000 * 1000, + }; + + if (sched_setattr(0, &attr, 0) < 0) { + perror("sched_setattr"); + return -1; + } + + for(;;); + } + --- + +Committer notes: + +Got the program from the provided URL, http://bristot.me/lkml/d.c, +trimmed it and included in the cset log above, so that we have +everything needed to test it in one place. + +Signed-off-by: Daniel Bristot de Oliveira +Acked-by: Steven Rostedt +Tested-by: Arnaldo Carvalho de Melo +Cc: Alexander Shishkin +Cc: Daniel Bristot de Oliveira +Cc: Jiri Olsa +Cc: Peter Zijlstra +Link: http://lkml.kernel.org/r/866ef75bcebf670ae91c6a96daa63597ba981f0d.1483443552.git.bristot@redhat.com +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + tools/lib/traceevent/plugin_sched_switch.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/tools/lib/traceevent/plugin_sched_switch.c ++++ b/tools/lib/traceevent/plugin_sched_switch.c +@@ -111,7 +111,7 @@ static int sched_switch_handler(struct t + trace_seq_printf(s, "%lld ", val); + + if (pevent_get_field_val(s, event, "prev_prio", record, &val, 0) == 0) +- trace_seq_printf(s, "[%lld] ", val); ++ trace_seq_printf(s, "[%d] ", (int) val); + + if (pevent_get_field_val(s, event, "prev_state", record, &val, 0) == 0) + write_state(s, val); +@@ -129,7 +129,7 @@ static int sched_switch_handler(struct t + trace_seq_printf(s, "%lld", val); + + if (pevent_get_field_val(s, event, "next_prio", record, &val, 0) == 0) +- trace_seq_printf(s, " [%lld]", val); ++ trace_seq_printf(s, " [%d]", (int) val); + + return 0; + } diff --git a/queue-4.4/usb-gadget-fix-copy-pasted-error-message.patch b/queue-4.4/usb-gadget-fix-copy-pasted-error-message.patch new file mode 100644 index 00000000000..afc2dd82558 --- /dev/null +++ b/queue-4.4/usb-gadget-fix-copy-pasted-error-message.patch @@ -0,0 +1,35 @@ +From foo@baz Fri Aug 4 15:15:51 PDT 2017 +From: David Lechner +Date: Mon, 2 Jan 2017 17:28:39 -0600 +Subject: usb: gadget: Fix copy/pasted error message + +From: David Lechner + + +[ Upstream commit 43aef5c2ca90535b3227e97e71604291875444ed ] + +This fixes an error message that was probably copied and pasted. The same +message is used for both the in and out endpoints, so it makes it impossible +to know which one actually failed because both cases say "IN". + +Make the out endpoint error message say "OUT". + +Signed-off-by: David Lechner +Signed-off-by: Felipe Balbi +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/gadget/function/f_hid.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/gadget/function/f_hid.c ++++ b/drivers/usb/gadget/function/f_hid.c +@@ -539,7 +539,7 @@ static int hidg_set_alt(struct usb_funct + } + status = usb_ep_enable(hidg->out_ep); + if (status < 0) { +- ERROR(cdev, "Enable IN endpoint FAILED!\n"); ++ ERROR(cdev, "Enable OUT endpoint FAILED!\n"); + goto fail; + } + hidg->out_ep->driver_data = hidg; diff --git a/queue-4.4/xfrm-don-t-use-sk_family-for-socket-policy-lookups.patch b/queue-4.4/xfrm-don-t-use-sk_family-for-socket-policy-lookups.patch new file mode 100644 index 00000000000..6a5d0eab45c --- /dev/null +++ b/queue-4.4/xfrm-don-t-use-sk_family-for-socket-policy-lookups.patch @@ -0,0 +1,64 @@ +From 4c86d77743a54fb2d8a4d18a037a074c892bb3be Mon Sep 17 00:00:00 2001 +From: Steffen Klassert +Date: Tue, 14 Feb 2017 07:43:56 +0100 +Subject: xfrm: Don't use sk_family for socket policy lookups + +From: Steffen Klassert + +commit 4c86d77743a54fb2d8a4d18a037a074c892bb3be upstream. + +On IPv4-mapped IPv6 addresses sk_family is AF_INET6, +but the flow informations are created based on AF_INET. +So the routing set up 'struct flowi4' but we try to +access 'struct flowi6' what leads to an out of bounds +access. Fix this by using the family we get with the +dst_entry, like we do it for the standard policy lookup. + +Reported-by: Dmitry Vyukov +Tested-by: Dmitry Vyukov +Signed-off-by: Steffen Klassert +Signed-off-by: Greg Kroah-Hartman + +--- + net/xfrm/xfrm_policy.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +--- a/net/xfrm/xfrm_policy.c ++++ b/net/xfrm/xfrm_policy.c +@@ -1216,7 +1216,7 @@ static inline int policy_to_flow_dir(int + } + + static struct xfrm_policy *xfrm_sk_policy_lookup(const struct sock *sk, int dir, +- const struct flowi *fl) ++ const struct flowi *fl, u16 family) + { + struct xfrm_policy *pol; + struct net *net = sock_net(sk); +@@ -1225,8 +1225,7 @@ static struct xfrm_policy *xfrm_sk_polic + read_lock_bh(&net->xfrm.xfrm_policy_lock); + pol = rcu_dereference(sk->sk_policy[dir]); + if (pol != NULL) { +- bool match = xfrm_selector_match(&pol->selector, fl, +- sk->sk_family); ++ bool match = xfrm_selector_match(&pol->selector, fl, family); + int err = 0; + + if (match) { +@@ -2174,7 +2173,7 @@ struct dst_entry *xfrm_lookup(struct net + sk = sk_const_to_full_sk(sk); + if (sk && sk->sk_policy[XFRM_POLICY_OUT]) { + num_pols = 1; +- pols[0] = xfrm_sk_policy_lookup(sk, XFRM_POLICY_OUT, fl); ++ pols[0] = xfrm_sk_policy_lookup(sk, XFRM_POLICY_OUT, fl, family); + err = xfrm_expand_policies(fl, family, pols, + &num_pols, &num_xfrms); + if (err < 0) +@@ -2453,7 +2452,7 @@ int __xfrm_policy_check(struct sock *sk, + pol = NULL; + sk = sk_to_full_sk(sk); + if (sk && sk->sk_policy[dir]) { +- pol = xfrm_sk_policy_lookup(sk, dir, &fl); ++ pol = xfrm_sk_policy_lookup(sk, dir, &fl, family); + if (IS_ERR(pol)) { + XFRM_INC_STATS(net, LINUX_MIB_XFRMINPOLERROR); + return 0;