]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Apr 2020 10:16:31 +0000 (12:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Apr 2020 10:16:31 +0000 (12:16 +0200)
added patches:
alsa-hda-initialize-power_state-field-properly.patch
arm64-dts-allwinner-h6-fix-pmu-compatible.patch
mm-use-fixed-constant-in-page_frag_alloc-instead-of-size-1.patch
net-rtnl_configure_link-fix-dev-flags-changes-arg-to-__dev_notify_flags.patch
powerpc-pseries-drop-pointless-static-qualifier-in-vpa_debugfs_init.patch
tools-gpio-fix-out-of-tree-build-regression.patch
x86-speculation-remove-redundant-arch_smt_update-invocation.patch

queue-4.14/alsa-hda-initialize-power_state-field-properly.patch [new file with mode: 0644]
queue-4.14/arm64-dts-allwinner-h6-fix-pmu-compatible.patch [new file with mode: 0644]
queue-4.14/mm-use-fixed-constant-in-page_frag_alloc-instead-of-size-1.patch [new file with mode: 0644]
queue-4.14/net-rtnl_configure_link-fix-dev-flags-changes-arg-to-__dev_notify_flags.patch [new file with mode: 0644]
queue-4.14/powerpc-pseries-drop-pointless-static-qualifier-in-vpa_debugfs_init.patch [new file with mode: 0644]
queue-4.14/series
queue-4.14/tools-gpio-fix-out-of-tree-build-regression.patch [new file with mode: 0644]
queue-4.14/x86-speculation-remove-redundant-arch_smt_update-invocation.patch [new file with mode: 0644]

diff --git a/queue-4.14/alsa-hda-initialize-power_state-field-properly.patch b/queue-4.14/alsa-hda-initialize-power_state-field-properly.patch
new file mode 100644 (file)
index 0000000..ae71e67
--- /dev/null
@@ -0,0 +1,35 @@
+From 183ab39eb0ea9879bb68422a83e65f750f3192f0 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Sat, 13 Apr 2019 10:04:49 +0200
+Subject: ALSA: hda: Initialize power_state field properly
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 183ab39eb0ea9879bb68422a83e65f750f3192f0 upstream.
+
+The recent commit 98081ca62cba ("ALSA: hda - Record the current power
+state before suspend/resume calls") made the HD-audio driver to store
+the PM state in power_state field.  This forgot, however, the
+initialization at power up.  Although the codec drivers usually don't
+need to refer to this field in the normal operation, let's initialize
+it properly for consistency.
+
+Fixes: 98081ca62cba ("ALSA: hda - Record the current power state before suspend/resume calls")
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/hda_codec.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/hda_codec.c
++++ b/sound/pci/hda/hda_codec.c
+@@ -942,6 +942,7 @@ int snd_hda_codec_new(struct hda_bus *bu
+       /* power-up all before initialization */
+       hda_set_power_state(codec, AC_PWRST_D0);
++      codec->core.dev.power.power_state = PMSG_ON;
+       snd_hda_codec_proc_new(codec);
diff --git a/queue-4.14/arm64-dts-allwinner-h6-fix-pmu-compatible.patch b/queue-4.14/arm64-dts-allwinner-h6-fix-pmu-compatible.patch
new file mode 100644 (file)
index 0000000..47e02eb
--- /dev/null
@@ -0,0 +1,35 @@
+From 4c7eeb9af3e41ae7d840977119c58f3bbb3f4f59 Mon Sep 17 00:00:00 2001
+From: Maxime Ripard <maxime@cerno.tech>
+Date: Mon, 10 Feb 2020 10:56:00 +0100
+Subject: arm64: dts: allwinner: h6: Fix PMU compatible
+
+From: Maxime Ripard <maxime@cerno.tech>
+
+commit 4c7eeb9af3e41ae7d840977119c58f3bbb3f4f59 upstream.
+
+The commit 7aa9b9eb7d6a ("arm64: dts: allwinner: H6: Add PMU mode")
+introduced support for the PMU found on the Allwinner H6. However, the
+binding only allows for a single compatible, while the patch was adding
+two.
+
+Make sure we follow the binding.
+
+Fixes: 7aa9b9eb7d6a ("arm64: dts: allwinner: H6: Add PMU mode")
+Signed-off-by: Maxime Ripard <maxime@cerno.tech>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+index 41b58ffa8596..967249e58811 100644
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+@@ -70,8 +70,7 @@
+       };
+       pmu {
+-              compatible = "arm,cortex-a53-pmu",
+-                           "arm,armv8-pmuv3";
++              compatible = "arm,cortex-a53-pmu";
+               interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/queue-4.14/mm-use-fixed-constant-in-page_frag_alloc-instead-of-size-1.patch b/queue-4.14/mm-use-fixed-constant-in-page_frag_alloc-instead-of-size-1.patch
new file mode 100644 (file)
index 0000000..18e7b02
--- /dev/null
@@ -0,0 +1,57 @@
+From 8644772637deb121f7ac2df690cbf83fa63d3b70 Mon Sep 17 00:00:00 2001
+From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
+Date: Fri, 15 Feb 2019 14:44:12 -0800
+Subject: mm: Use fixed constant in page_frag_alloc instead of size + 1
+
+From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
+
+commit 8644772637deb121f7ac2df690cbf83fa63d3b70 upstream.
+
+This patch replaces the size + 1 value introduced with the recent fix for 1
+byte allocs with a constant value.
+
+The idea here is to reduce code overhead as the previous logic would have
+to read size into a register, then increment it, and write it back to
+whatever field was being used. By using a constant we can avoid those
+memory reads and arithmetic operations in favor of just encoding the
+maximum value into the operation itself.
+
+Fixes: 2c2ade81741c ("mm: page_alloc: fix ref bias in page_frag_alloc() for 1-byte allocs")
+Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ mm/page_alloc.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -4325,11 +4325,11 @@ refill:
+               /* Even if we own the page, we do not use atomic_set().
+                * This would break get_page_unless_zero() users.
+                */
+-              page_ref_add(page, size);
++              page_ref_add(page, PAGE_FRAG_CACHE_MAX_SIZE);
+               /* reset page count bias and offset to start of new frag */
+               nc->pfmemalloc = page_is_pfmemalloc(page);
+-              nc->pagecnt_bias = size + 1;
++              nc->pagecnt_bias = PAGE_FRAG_CACHE_MAX_SIZE + 1;
+               nc->offset = size;
+       }
+@@ -4345,10 +4345,10 @@ refill:
+               size = nc->size;
+ #endif
+               /* OK, page count is 0, we can safely set it */
+-              set_page_count(page, size + 1);
++              set_page_count(page, PAGE_FRAG_CACHE_MAX_SIZE + 1);
+               /* reset page count bias and offset to start of new frag */
+-              nc->pagecnt_bias = size + 1;
++              nc->pagecnt_bias = PAGE_FRAG_CACHE_MAX_SIZE + 1;
+               offset = size - fragsz;
+       }
diff --git a/queue-4.14/net-rtnl_configure_link-fix-dev-flags-changes-arg-to-__dev_notify_flags.patch b/queue-4.14/net-rtnl_configure_link-fix-dev-flags-changes-arg-to-__dev_notify_flags.patch
new file mode 100644 (file)
index 0000000..763265f
--- /dev/null
@@ -0,0 +1,37 @@
+From 56a49d7048703f5ffdb84d3a0ee034108fba6850 Mon Sep 17 00:00:00 2001
+From: Roopa Prabhu <roopa@cumulusnetworks.com>
+Date: Wed, 12 Sep 2018 13:21:48 -0700
+Subject: net: rtnl_configure_link: fix dev flags changes arg to __dev_notify_flags
+
+From: Roopa Prabhu <roopa@cumulusnetworks.com>
+
+commit 56a49d7048703f5ffdb84d3a0ee034108fba6850 upstream.
+
+This fix addresses https://bugzilla.kernel.org/show_bug.cgi?id=201071
+
+Commit 5025f7f7d506 wrongly relied on __dev_change_flags to notify users of
+dev flag changes in the case when dev->rtnl_link_state = RTNL_LINK_INITIALIZED.
+Fix it by indicating flag changes explicitly to __dev_notify_flags.
+
+Fixes: 5025f7f7d506 ("rtnetlink: add rtnl_link_state check in rtnl_configure_link")
+Reported-By: Liam mcbirnie <liam.mcbirnie@boeing.com>
+Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/core/rtnetlink.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/core/rtnetlink.c
++++ b/net/core/rtnetlink.c
+@@ -2424,7 +2424,7 @@ int rtnl_configure_link(struct net_devic
+       }
+       if (dev->rtnl_link_state == RTNL_LINK_INITIALIZED) {
+-              __dev_notify_flags(dev, old_flags, 0U);
++              __dev_notify_flags(dev, old_flags, (old_flags ^ dev->flags));
+       } else {
+               dev->rtnl_link_state = RTNL_LINK_INITIALIZED;
+               __dev_notify_flags(dev, old_flags, ~0U);
diff --git a/queue-4.14/powerpc-pseries-drop-pointless-static-qualifier-in-vpa_debugfs_init.patch b/queue-4.14/powerpc-pseries-drop-pointless-static-qualifier-in-vpa_debugfs_init.patch
new file mode 100644 (file)
index 0000000..30a051b
--- /dev/null
@@ -0,0 +1,35 @@
+From 11dd34f3eae5a468013bb161a1dcf1fecd2ca321 Mon Sep 17 00:00:00 2001
+From: YueHaibing <yuehaibing@huawei.com>
+Date: Mon, 18 Feb 2019 12:56:44 +0000
+Subject: powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init()
+
+From: YueHaibing <yuehaibing@huawei.com>
+
+commit 11dd34f3eae5a468013bb161a1dcf1fecd2ca321 upstream.
+
+There is no need to have the 'struct dentry *vpa_dir' variable static
+since new value always be assigned before use it.
+
+Fixes: c6c26fb55e8e ("powerpc/pseries: Export raw per-CPU VPA data via debugfs")
+Signed-off-by: YueHaibing <yuehaibing@huawei.com>
+Reviewed-by: Daniel Axtens <dja@axtens.net>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/20190218125644.87448-1-yuehaibing@huawei.com
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/powerpc/platforms/pseries/lpar.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/powerpc/platforms/pseries/lpar.c
++++ b/arch/powerpc/platforms/pseries/lpar.c
+@@ -1060,7 +1060,7 @@ static int __init vpa_debugfs_init(void)
+ {
+       char name[16];
+       long i;
+-      static struct dentry *vpa_dir;
++      struct dentry *vpa_dir;
+       if (!firmware_has_feature(FW_FEATURE_SPLPAR))
+               return 0;
index 9fc0d51dc1c070c679161533af98f5cbb6f3b263..79c13fb651dd587d3224d64cf23c463df4221138 100644 (file)
@@ -63,3 +63,10 @@ kvm-vmx-fix-crash-cleanup-when-kvm-wasn-t-used.patch
 cifs-fix-bug-which-the-return-value-by-asynchronous-read-is-error.patch
 btrfs-drop-block-from-cache-on-error-in-relocation.patch
 crypto-mxs-dcp-fix-scatterlist-linearization-for-hash.patch
+alsa-hda-initialize-power_state-field-properly.patch
+net-rtnl_configure_link-fix-dev-flags-changes-arg-to-__dev_notify_flags.patch
+powerpc-pseries-drop-pointless-static-qualifier-in-vpa_debugfs_init.patch
+x86-speculation-remove-redundant-arch_smt_update-invocation.patch
+tools-gpio-fix-out-of-tree-build-regression.patch
+mm-use-fixed-constant-in-page_frag_alloc-instead-of-size-1.patch
+arm64-dts-allwinner-h6-fix-pmu-compatible.patch
diff --git a/queue-4.14/tools-gpio-fix-out-of-tree-build-regression.patch b/queue-4.14/tools-gpio-fix-out-of-tree-build-regression.patch
new file mode 100644 (file)
index 0000000..d1357ae
--- /dev/null
@@ -0,0 +1,42 @@
+From 82f04bfe2aff428b063eefd234679b2d693228ed Mon Sep 17 00:00:00 2001
+From: Anssi Hannula <anssi.hannula@bitwise.fi>
+Date: Wed, 25 Mar 2020 12:31:54 +0200
+Subject: tools: gpio: Fix out-of-tree build regression
+
+From: Anssi Hannula <anssi.hannula@bitwise.fi>
+
+commit 82f04bfe2aff428b063eefd234679b2d693228ed upstream.
+
+Commit 0161a94e2d1c7 ("tools: gpio: Correctly add make dependencies for
+gpio_utils") added a make rule for gpio-utils-in.o but used $(output)
+instead of the correct $(OUTPUT) for the output directory, breaking
+out-of-tree build (O=xx) with the following error:
+
+  No rule to make target 'out/tools/gpio/gpio-utils-in.o', needed by 'out/tools/gpio/lsgpio-in.o'.  Stop.
+
+Fix that.
+
+Fixes: 0161a94e2d1c ("tools: gpio: Correctly add make dependencies for gpio_utils")
+Cc: <stable@vger.kernel.org>
+Cc: Laura Abbott <labbott@redhat.com>
+Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
+Link: https://lore.kernel.org/r/20200325103154.32235-1-anssi.hannula@bitwise.fi
+Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/gpio/Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/gpio/Makefile
++++ b/tools/gpio/Makefile
+@@ -35,7 +35,7 @@ $(OUTPUT)include/linux/gpio.h: ../../inc
+ prepare: $(OUTPUT)include/linux/gpio.h
+-GPIO_UTILS_IN := $(output)gpio-utils-in.o
++GPIO_UTILS_IN := $(OUTPUT)gpio-utils-in.o
+ $(GPIO_UTILS_IN): prepare FORCE
+       $(Q)$(MAKE) $(build)=gpio-utils
diff --git a/queue-4.14/x86-speculation-remove-redundant-arch_smt_update-invocation.patch b/queue-4.14/x86-speculation-remove-redundant-arch_smt_update-invocation.patch
new file mode 100644 (file)
index 0000000..222a64b
--- /dev/null
@@ -0,0 +1,54 @@
+From 34d66caf251df91ff27b24a3a786810d29989eca Mon Sep 17 00:00:00 2001
+From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
+Date: Thu, 17 Jan 2019 02:10:59 -0800
+Subject: x86/speculation: Remove redundant arch_smt_update() invocation
+
+From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
+
+commit 34d66caf251df91ff27b24a3a786810d29989eca upstream.
+
+With commit a74cfffb03b7 ("x86/speculation: Rework SMT state change"),
+arch_smt_update() is invoked from each individual CPU hotplug function.
+
+Therefore the extra arch_smt_update() call in the sysfs SMT control is
+redundant.
+
+Fixes: a74cfffb03b7 ("x86/speculation: Rework SMT state change")
+Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: <konrad.wilk@oracle.com>
+Cc: <dwmw@amazon.co.uk>
+Cc: <bp@suse.de>
+Cc: <srinivas.eeda@oracle.com>
+Cc: <peterz@infradead.org>
+Cc: <hpa@zytor.com>
+Link: https://lkml.kernel.org/r/e2e064f2-e8ef-42ca-bf4f-76b612964752@default
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/cpu.c |    5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+--- a/kernel/cpu.c
++++ b/kernel/cpu.c
+@@ -2089,10 +2089,8 @@ int cpuhp_smt_disable(enum cpuhp_smt_con
+                */
+               cpuhp_offline_cpu_device(cpu);
+       }
+-      if (!ret) {
++      if (!ret)
+               cpu_smt_control = ctrlval;
+-              arch_smt_update();
+-      }
+       cpu_maps_update_done();
+       return ret;
+ }
+@@ -2103,7 +2101,6 @@ int cpuhp_smt_enable(void)
+       cpu_maps_update_begin();
+       cpu_smt_control = CPU_SMT_ENABLED;
+-      arch_smt_update();
+       for_each_present_cpu(cpu) {
+               /* Skip online CPUs and CPUs on offline nodes */
+               if (cpu_online(cpu) || !node_online(cpu_to_node(cpu)))