From: Greg Kroah-Hartman Date: Wed, 15 Apr 2020 10:16:49 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v4.19.116~51 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=adb21660f15c2f48db0a98ac74cc8550112e0ff7;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: arm64-dts-allwinner-h6-fix-pmu-compatible.patch mm-use-fixed-constant-in-page_frag_alloc-instead-of-size-1.patch net-qualcomm-rmnet-allow-configuration-updates-to-existing-devices.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 --- diff --git a/queue-4.19/arm64-dts-allwinner-h6-fix-pmu-compatible.patch b/queue-4.19/arm64-dts-allwinner-h6-fix-pmu-compatible.patch new file mode 100644 index 00000000000..ca1b55c4bf9 --- /dev/null +++ b/queue-4.19/arm64-dts-allwinner-h6-fix-pmu-compatible.patch @@ -0,0 +1,37 @@ +From 4c7eeb9af3e41ae7d840977119c58f3bbb3f4f59 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Mon, 10 Feb 2020 10:56:00 +0100 +Subject: arm64: dts: allwinner: h6: Fix PMU compatible + +From: Maxime Ripard + +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 +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- 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 = , + , + , diff --git a/queue-4.19/mm-use-fixed-constant-in-page_frag_alloc-instead-of-size-1.patch b/queue-4.19/mm-use-fixed-constant-in-page_frag_alloc-instead-of-size-1.patch new file mode 100644 index 00000000000..75b62454dda --- /dev/null +++ b/queue-4.19/mm-use-fixed-constant-in-page_frag_alloc-instead-of-size-1.patch @@ -0,0 +1,57 @@ +From 8644772637deb121f7ac2df690cbf83fa63d3b70 Mon Sep 17 00:00:00 2001 +From: Alexander Duyck +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 + +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 +Signed-off-by: David S. Miller +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + mm/page_alloc.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/mm/page_alloc.c ++++ b/mm/page_alloc.c +@@ -4537,11 +4537,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; + } + +@@ -4557,10 +4557,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.19/net-qualcomm-rmnet-allow-configuration-updates-to-existing-devices.patch b/queue-4.19/net-qualcomm-rmnet-allow-configuration-updates-to-existing-devices.patch new file mode 100644 index 00000000000..2ddda07b649 --- /dev/null +++ b/queue-4.19/net-qualcomm-rmnet-allow-configuration-updates-to-existing-devices.patch @@ -0,0 +1,74 @@ +From 2abb5792387eb188b12051337d5dcd2cba615cb0 Mon Sep 17 00:00:00 2001 +From: Subash Abhinov Kasiviswanathan +Date: Wed, 1 Apr 2020 15:23:55 -0600 +Subject: net: qualcomm: rmnet: Allow configuration updates to existing devices + +From: Subash Abhinov Kasiviswanathan + +commit 2abb5792387eb188b12051337d5dcd2cba615cb0 upstream. + +This allows the changelink operation to succeed if the mux_id was +specified as an argument. Note that the mux_id must match the +existing mux_id of the rmnet device or should be an unused mux_id. + +Fixes: 1dc49e9d164c ("net: rmnet: do not allow to change mux id if mux id is duplicated") +Reported-and-tested-by: Alex Elder +Signed-off-by: Sean Tranchetti +Signed-off-by: Subash Abhinov Kasiviswanathan +Signed-off-by: David S. Miller +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 31 ++++++++++++--------- + 1 file changed, 19 insertions(+), 12 deletions(-) + +--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c ++++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +@@ -288,7 +288,6 @@ static int rmnet_changelink(struct net_d + { + struct rmnet_priv *priv = netdev_priv(dev); + struct net_device *real_dev; +- struct rmnet_endpoint *ep; + struct rmnet_port *port; + u16 mux_id; + +@@ -303,19 +302,27 @@ static int rmnet_changelink(struct net_d + + if (data[IFLA_RMNET_MUX_ID]) { + mux_id = nla_get_u16(data[IFLA_RMNET_MUX_ID]); +- if (rmnet_get_endpoint(port, mux_id)) { +- NL_SET_ERR_MSG_MOD(extack, "MUX ID already exists"); +- return -EINVAL; +- } +- ep = rmnet_get_endpoint(port, priv->mux_id); +- if (!ep) +- return -ENODEV; + +- hlist_del_init_rcu(&ep->hlnode); +- hlist_add_head_rcu(&ep->hlnode, &port->muxed_ep[mux_id]); ++ if (mux_id != priv->mux_id) { ++ struct rmnet_endpoint *ep; ++ ++ ep = rmnet_get_endpoint(port, priv->mux_id); ++ if (!ep) ++ return -ENODEV; ++ ++ if (rmnet_get_endpoint(port, mux_id)) { ++ NL_SET_ERR_MSG_MOD(extack, ++ "MUX ID already exists"); ++ return -EINVAL; ++ } ++ ++ hlist_del_init_rcu(&ep->hlnode); ++ hlist_add_head_rcu(&ep->hlnode, ++ &port->muxed_ep[mux_id]); + +- ep->mux_id = mux_id; +- priv->mux_id = mux_id; ++ ep->mux_id = mux_id; ++ priv->mux_id = mux_id; ++ } + } + + if (data[IFLA_RMNET_FLAGS]) { diff --git a/queue-4.19/powerpc-pseries-drop-pointless-static-qualifier-in-vpa_debugfs_init.patch b/queue-4.19/powerpc-pseries-drop-pointless-static-qualifier-in-vpa_debugfs_init.patch new file mode 100644 index 00000000000..87c7604f618 --- /dev/null +++ b/queue-4.19/powerpc-pseries-drop-pointless-static-qualifier-in-vpa_debugfs_init.patch @@ -0,0 +1,35 @@ +From 11dd34f3eae5a468013bb161a1dcf1fecd2ca321 Mon Sep 17 00:00:00 2001 +From: YueHaibing +Date: Mon, 18 Feb 2019 12:56:44 +0000 +Subject: powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init() + +From: YueHaibing + +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 +Reviewed-by: Daniel Axtens +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20190218125644.87448-1-yuehaibing@huawei.com +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -1056,7 +1056,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; diff --git a/queue-4.19/series b/queue-4.19/series index 802a24ad044..1ee0ecb0150 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -93,3 +93,9 @@ btrfs-fix-missing-file-extent-item-for-hole-after-ranged-fsync.patch btrfs-fix-missing-semaphore-unlock-in-btrfs_sync_file.patch crypto-mxs-dcp-fix-scatterlist-linearization-for-hash.patch erofs-correct-the-remaining-shrink-objects.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 +net-qualcomm-rmnet-allow-configuration-updates-to-existing-devices.patch +arm64-dts-allwinner-h6-fix-pmu-compatible.patch diff --git a/queue-4.19/tools-gpio-fix-out-of-tree-build-regression.patch b/queue-4.19/tools-gpio-fix-out-of-tree-build-regression.patch new file mode 100644 index 00000000000..d1357aec44c --- /dev/null +++ b/queue-4.19/tools-gpio-fix-out-of-tree-build-regression.patch @@ -0,0 +1,42 @@ +From 82f04bfe2aff428b063eefd234679b2d693228ed Mon Sep 17 00:00:00 2001 +From: Anssi Hannula +Date: Wed, 25 Mar 2020 12:31:54 +0200 +Subject: tools: gpio: Fix out-of-tree build regression + +From: Anssi Hannula + +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: +Cc: Laura Abbott +Signed-off-by: Anssi Hannula +Link: https://lore.kernel.org/r/20200325103154.32235-1-anssi.hannula@bitwise.fi +Reviewed-by: Bartosz Golaszewski +Signed-off-by: Linus Walleij +Signed-off-by: Greg Kroah-Hartman + +--- + 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.19/x86-speculation-remove-redundant-arch_smt_update-invocation.patch b/queue-4.19/x86-speculation-remove-redundant-arch_smt_update-invocation.patch new file mode 100644 index 00000000000..3f1c9b3832b --- /dev/null +++ b/queue-4.19/x86-speculation-remove-redundant-arch_smt_update-invocation.patch @@ -0,0 +1,54 @@ +From 34d66caf251df91ff27b24a3a786810d29989eca Mon Sep 17 00:00:00 2001 +From: Zhenzhong Duan +Date: Thu, 17 Jan 2019 02:10:59 -0800 +Subject: x86/speculation: Remove redundant arch_smt_update() invocation + +From: Zhenzhong Duan + +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 +Signed-off-by: Thomas Gleixner +Cc: +Cc: +Cc: +Cc: +Cc: +Cc: +Link: https://lkml.kernel.org/r/e2e064f2-e8ef-42ca-bf4f-76b612964752@default +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/cpu.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/kernel/cpu.c ++++ b/kernel/cpu.c +@@ -2070,10 +2070,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; + } +@@ -2084,7 +2082,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)))