From: Greg Kroah-Hartman Date: Mon, 10 Mar 2025 17:00:30 +0000 (+0100) Subject: drop riscv patch from 5.15 X-Git-Tag: v5.4.291~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0db63220ad08e0c173f41af3cb0f34ee879cef6c;p=thirdparty%2Fkernel%2Fstable-queue.git drop riscv patch from 5.15 breaks the build --- diff --git a/queue-5.15/revert-riscv-set-more-data-to-cacheinfo.patch b/queue-5.15/revert-riscv-set-more-data-to-cacheinfo.patch deleted file mode 100644 index 7a9d445e60..0000000000 --- a/queue-5.15/revert-riscv-set-more-data-to-cacheinfo.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 6a926a8e4697df959c64eaca9afad2d559360816 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 8 Mar 2023 14:47:34 +0800 -Subject: Revert "riscv: Set more data to cacheinfo" - -From: Song Shuai - -[ Upstream commit 6a24915145c922b79d3ac78f681137a4c14a6d6b ] - -This reverts commit baf7cbd94b5688f167443a2cc3dcea3300132099. - -There are some duplicate cache attributes populations executed -in both ci_leaf_init() and later cache_setup_properties(). - -Revert the commit baf7cbd94b56 ("riscv: Set more data to cacheinfo") -to setup only the level and type attributes at this early place. - -Signed-off-by: Song Shuai -Acked-by: Sudeep Holla -Acked-by: Conor Dooley -Link: https://lore.kernel.org/r/20230308064734.512457-1-suagrfillet@gmail.com -Signed-off-by: Palmer Dabbelt -Stable-dep-of: fb8179ce2996 ("riscv: cacheinfo: Use of_property_present() for non-boolean properties") -Signed-off-by: Sasha Levin ---- - arch/riscv/kernel/cacheinfo.c | 66 ++++++++--------------------------- - 1 file changed, 15 insertions(+), 51 deletions(-) - -diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c -index 90deabfe63eaa..56141a65c7348 100644 ---- a/arch/riscv/kernel/cacheinfo.c -+++ b/arch/riscv/kernel/cacheinfo.c -@@ -64,53 +64,12 @@ uintptr_t get_cache_geometry(u32 level, enum cache_type type) - 0; - } - --static void ci_leaf_init(struct cacheinfo *this_leaf, enum cache_type type, -- unsigned int level, unsigned int size, -- unsigned int sets, unsigned int line_size) -+static void ci_leaf_init(struct cacheinfo *this_leaf, -+ struct device_node *node, -+ enum cache_type type, unsigned int level) - { - this_leaf->level = level; - this_leaf->type = type; -- this_leaf->size = size; -- this_leaf->number_of_sets = sets; -- this_leaf->coherency_line_size = line_size; -- -- /* -- * If the cache is fully associative, there is no need to -- * check the other properties. -- */ -- if (sets == 1) -- return; -- -- /* -- * Set the ways number for n-ways associative, make sure -- * all properties are big than zero. -- */ -- if (sets > 0 && size > 0 && line_size > 0) -- this_leaf->ways_of_associativity = (size / sets) / line_size; --} -- --static void fill_cacheinfo(struct cacheinfo **this_leaf, -- struct device_node *node, unsigned int level) --{ -- unsigned int size, sets, line_size; -- -- if (!of_property_read_u32(node, "cache-size", &size) && -- !of_property_read_u32(node, "cache-block-size", &line_size) && -- !of_property_read_u32(node, "cache-sets", &sets)) { -- ci_leaf_init((*this_leaf)++, CACHE_TYPE_UNIFIED, level, size, sets, line_size); -- } -- -- if (!of_property_read_u32(node, "i-cache-size", &size) && -- !of_property_read_u32(node, "i-cache-sets", &sets) && -- !of_property_read_u32(node, "i-cache-block-size", &line_size)) { -- ci_leaf_init((*this_leaf)++, CACHE_TYPE_INST, level, size, sets, line_size); -- } -- -- if (!of_property_read_u32(node, "d-cache-size", &size) && -- !of_property_read_u32(node, "d-cache-sets", &sets) && -- !of_property_read_u32(node, "d-cache-block-size", &line_size)) { -- ci_leaf_init((*this_leaf)++, CACHE_TYPE_DATA, level, size, sets, line_size); -- } - } - - int init_cache_level(unsigned int cpu) -@@ -163,24 +122,29 @@ int populate_cache_leaves(unsigned int cpu) - struct device_node *prev = NULL; - int levels = 1, level = 1; - -- /* Level 1 caches in cpu node */ -- fill_cacheinfo(&this_leaf, np, level); -+ if (of_property_read_bool(np, "cache-size")) -+ ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level); -+ if (of_property_read_bool(np, "i-cache-size")) -+ ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level); -+ if (of_property_read_bool(np, "d-cache-size")) -+ ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level); - -- /* Next level caches in cache nodes */ - prev = np; - while ((np = of_find_next_cache_node(np))) { - of_node_put(prev); - prev = np; -- - if (!of_device_is_compatible(np, "cache")) - break; - if (of_property_read_u32(np, "cache-level", &level)) - break; - if (level <= levels) - break; -- -- fill_cacheinfo(&this_leaf, np, level); -- -+ if (of_property_read_bool(np, "cache-size")) -+ ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level); -+ if (of_property_read_bool(np, "i-cache-size")) -+ ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level); -+ if (of_property_read_bool(np, "d-cache-size")) -+ ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level); - levels = level; - } - of_node_put(np); --- -2.39.5 - diff --git a/queue-5.15/riscv-cacheinfo-initialize-cacheinfo-s-level-and-typ.patch b/queue-5.15/riscv-cacheinfo-initialize-cacheinfo-s-level-and-typ.patch deleted file mode 100644 index 54c215f612..0000000000 --- a/queue-5.15/riscv-cacheinfo-initialize-cacheinfo-s-level-and-typ.patch +++ /dev/null @@ -1,74 +0,0 @@ -From efe8d5b42d78aaf69eb9f6e5ec51f347c8cfe59d Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 17 Jun 2024 21:14:24 +0800 -Subject: riscv: cacheinfo: initialize cacheinfo's level and type from ACPI - PPTT - -From: Yunhui Cui - -[ Upstream commit 604f32ea6909b0ebb8ab0bf1ab7dc66ee3dc8955 ] - -Before cacheinfo can be built correctly, we need to initialize level -and type. Since RISC-V currently does not have a register group that -describes cache-related attributes like ARM64, we cannot obtain them -directly, so now we obtain cache leaves from the ACPI PPTT table -(acpi_get_cache_info()) and set the cache type through split_levels. - -Suggested-by: Jeremy Linton -Suggested-by: Sudeep Holla -Reviewed-by: Conor Dooley -Reviewed-by: Sunil V L -Reviewed-by: Jeremy Linton -Reviewed-by: Sudeep Holla -Signed-off-by: Yunhui Cui -Link: https://lore.kernel.org/r/20240617131425.7526-2-cuiyunhui@bytedance.com -Signed-off-by: Palmer Dabbelt -Stable-dep-of: fb8179ce2996 ("riscv: cacheinfo: Use of_property_present() for non-boolean properties") -Signed-off-by: Sasha Levin ---- - arch/riscv/kernel/cacheinfo.c | 22 ++++++++++++++++++++++ - 1 file changed, 22 insertions(+) - -diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c -index 7c6dff3dac2d6..8290cced2e62e 100644 ---- a/arch/riscv/kernel/cacheinfo.c -+++ b/arch/riscv/kernel/cacheinfo.c -@@ -3,6 +3,7 @@ - * Copyright (C) 2017 SiFive - */ - -+#include - #include - #include - #include -@@ -121,6 +122,27 @@ int populate_cache_leaves(unsigned int cpu) - struct device_node *prev = NULL; - int levels = 1, level = 1; - -+ if (!acpi_disabled) { -+ int ret, fw_levels, split_levels; -+ -+ ret = acpi_get_cache_info(cpu, &fw_levels, &split_levels); -+ if (ret) -+ return ret; -+ -+ BUG_ON((split_levels > fw_levels) || -+ (split_levels + fw_levels > this_cpu_ci->num_leaves)); -+ -+ for (; level <= this_cpu_ci->num_levels; level++) { -+ if (level <= split_levels) { -+ ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); -+ ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); -+ } else { -+ ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); -+ } -+ } -+ return 0; -+ } -+ - if (of_property_read_bool(np, "cache-size")) - ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); - if (of_property_read_bool(np, "i-cache-size")) --- -2.39.5 - diff --git a/queue-5.15/riscv-cacheinfo-remove-the-useless-input-parameter-n.patch b/queue-5.15/riscv-cacheinfo-remove-the-useless-input-parameter-n.patch deleted file mode 100644 index 3364cb28e5..0000000000 --- a/queue-5.15/riscv-cacheinfo-remove-the-useless-input-parameter-n.patch +++ /dev/null @@ -1,71 +0,0 @@ -From e73a44154d61f71cb23056500a8ef31f032541eb Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 17 Jun 2024 21:14:23 +0800 -Subject: riscv: cacheinfo: remove the useless input parameter (node) of - ci_leaf_init() - -From: Yunhui Cui - -[ Upstream commit ee3fab10cb1566562aa683f319066eaeecccf918 ] - -ci_leaf_init() is a declared static function. The implementation of the -function body and the caller do not use the parameter (struct device_node -*node) input parameter, so remove it. - -Fixes: 6a24915145c9 ("Revert "riscv: Set more data to cacheinfo"") -Signed-off-by: Yunhui Cui -Reviewed-by: Jeremy Linton -Reviewed-by: Sudeep Holla -Link: https://lore.kernel.org/r/20240617131425.7526-1-cuiyunhui@bytedance.com -Signed-off-by: Palmer Dabbelt -Stable-dep-of: fb8179ce2996 ("riscv: cacheinfo: Use of_property_present() for non-boolean properties") -Signed-off-by: Sasha Levin ---- - arch/riscv/kernel/cacheinfo.c | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) - -diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c -index 56141a65c7348..7c6dff3dac2d6 100644 ---- a/arch/riscv/kernel/cacheinfo.c -+++ b/arch/riscv/kernel/cacheinfo.c -@@ -65,7 +65,6 @@ uintptr_t get_cache_geometry(u32 level, enum cache_type type) - } - - static void ci_leaf_init(struct cacheinfo *this_leaf, -- struct device_node *node, - enum cache_type type, unsigned int level) - { - this_leaf->level = level; -@@ -123,11 +122,11 @@ int populate_cache_leaves(unsigned int cpu) - int levels = 1, level = 1; - - if (of_property_read_bool(np, "cache-size")) -- ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level); -+ ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); - if (of_property_read_bool(np, "i-cache-size")) -- ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level); -+ ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); - if (of_property_read_bool(np, "d-cache-size")) -- ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level); -+ ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); - - prev = np; - while ((np = of_find_next_cache_node(np))) { -@@ -140,11 +139,11 @@ int populate_cache_leaves(unsigned int cpu) - if (level <= levels) - break; - if (of_property_read_bool(np, "cache-size")) -- ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level); -+ ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); - if (of_property_read_bool(np, "i-cache-size")) -- ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level); -+ ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); - if (of_property_read_bool(np, "d-cache-size")) -- ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level); -+ ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); - levels = level; - } - of_node_put(np); --- -2.39.5 - diff --git a/queue-5.15/riscv-cacheinfo-use-of_property_present-for-non-bool.patch b/queue-5.15/riscv-cacheinfo-use-of_property_present-for-non-bool.patch deleted file mode 100644 index 0f8f64ebf5..0000000000 --- a/queue-5.15/riscv-cacheinfo-use-of_property_present-for-non-bool.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 6ff9980af5a09b18734baf0094b269ff7b52feea Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 4 Nov 2024 13:03:13 -0600 -Subject: riscv: cacheinfo: Use of_property_present() for non-boolean - properties -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Rob Herring - -[ Upstream commit fb8179ce2996bffaa36a04e2b6262843b01b7565 ] - -The use of of_property_read_bool() for non-boolean properties is -deprecated in favor of of_property_present() when testing for property -presence. - -Signed-off-by: Rob Herring (Arm) -Reviewed-by: Clément Léger -Cc: stable@vger.kernel.org -Fixes: 76d2a0493a17 ("RISC-V: Init and Halt Code") -Link: https://lore.kernel.org/r/20241104190314.270095-1-robh@kernel.org -Signed-off-by: Palmer Dabbelt -Signed-off-by: Sasha Levin ---- - arch/riscv/kernel/cacheinfo.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c -index c196d1a0b8d98..f42c0886484a4 100644 ---- a/arch/riscv/kernel/cacheinfo.c -+++ b/arch/riscv/kernel/cacheinfo.c -@@ -146,11 +146,11 @@ int populate_cache_leaves(unsigned int cpu) - if (!np) - return -ENOENT; - -- if (of_property_read_bool(np, "cache-size")) -+ if (of_property_present(np, "cache-size")) - ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); -- if (of_property_read_bool(np, "i-cache-size")) -+ if (of_property_present(np, "i-cache-size")) - ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); -- if (of_property_read_bool(np, "d-cache-size")) -+ if (of_property_present(np, "d-cache-size")) - ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); - - prev = np; -@@ -163,11 +163,11 @@ int populate_cache_leaves(unsigned int cpu) - break; - if (level <= levels) - break; -- if (of_property_read_bool(np, "cache-size")) -+ if (of_property_present(np, "cache-size")) - ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); -- if (of_property_read_bool(np, "i-cache-size")) -+ if (of_property_present(np, "i-cache-size")) - ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); -- if (of_property_read_bool(np, "d-cache-size")) -+ if (of_property_present(np, "d-cache-size")) - ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); - levels = level; - } --- -2.39.5 - diff --git a/queue-5.15/riscv-prevent-a-bad-reference-count-on-cpu-nodes.patch b/queue-5.15/riscv-prevent-a-bad-reference-count-on-cpu-nodes.patch deleted file mode 100644 index f6f7d97881..0000000000 --- a/queue-5.15/riscv-prevent-a-bad-reference-count-on-cpu-nodes.patch +++ /dev/null @@ -1,67 +0,0 @@ -From c78c4280de09038dde48e207301dd6ddbdf64146 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 13 Sep 2024 10:00:52 +0200 -Subject: riscv: Prevent a bad reference count on CPU nodes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Miquel Sabaté Solà - -[ Upstream commit 37233169a6ea912020c572f870075a63293b786a ] - -When populating cache leaves we previously fetched the CPU device node -at the very beginning. But when ACPI is enabled we go through a -specific branch which returns early and does not call 'of_node_put' for -the node that was acquired. - -Since we are not using a CPU device node for the ACPI code anyways, we -can simply move the initialization of it just passed the ACPI block, and -we are guaranteed to have an 'of_node_put' call for the acquired node. -This prevents a bad reference count of the CPU device node. - -Moreover, the previous function did not check for errors when acquiring -the device node, so a return -ENOENT has been added for that case. - -Signed-off-by: Miquel Sabaté Solà -Reviewed-by: Sudeep Holla -Reviewed-by: Sunil V L -Reviewed-by: Alexandre Ghiti -Fixes: 604f32ea6909 ("riscv: cacheinfo: initialize cacheinfo's level and type from ACPI PPTT") -Cc: stable@vger.kernel.org -Link: https://lore.kernel.org/r/20240913080053.36636-1-mikisabate@gmail.com -Signed-off-by: Palmer Dabbelt -Stable-dep-of: fb8179ce2996 ("riscv: cacheinfo: Use of_property_present() for non-boolean properties") -Signed-off-by: Sasha Levin ---- - arch/riscv/kernel/cacheinfo.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c -index 8290cced2e62e..c196d1a0b8d98 100644 ---- a/arch/riscv/kernel/cacheinfo.c -+++ b/arch/riscv/kernel/cacheinfo.c -@@ -118,8 +118,7 @@ int populate_cache_leaves(unsigned int cpu) - { - struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu); - struct cacheinfo *this_leaf = this_cpu_ci->info_list; -- struct device_node *np = of_cpu_device_node_get(cpu); -- struct device_node *prev = NULL; -+ struct device_node *np, *prev; - int levels = 1, level = 1; - - if (!acpi_disabled) { -@@ -143,6 +142,10 @@ int populate_cache_leaves(unsigned int cpu) - return 0; - } - -+ np = of_cpu_device_node_get(cpu); -+ if (!np) -+ return -ENOENT; -+ - if (of_property_read_bool(np, "cache-size")) - ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); - if (of_property_read_bool(np, "i-cache-size")) --- -2.39.5 - diff --git a/queue-5.15/series b/queue-5.15/series index 1112afee53..5acd95b955 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -530,11 +530,6 @@ pfifo_tail_enqueue-drop-new-packet-when-sch-limit-0.patch smb-client-add-check-for-next_buffer-in-receive_encr.patch drm-amdgpu-check-extended-configuration-space-regist.patch drm-amdgpu-disable-bar-resize-on-dell-g5-se.patch -revert-riscv-set-more-data-to-cacheinfo.patch -riscv-cacheinfo-remove-the-useless-input-parameter-n.patch -riscv-cacheinfo-initialize-cacheinfo-s-level-and-typ.patch -riscv-prevent-a-bad-reference-count-on-cpu-nodes.patch -riscv-cacheinfo-use-of_property_present-for-non-bool.patch revert-of-reserved-memory-fix-using-wrong-number-of-cells-to-get-property-alignment.patch hid-appleir-fix-potential-null-dereference-at-raw-event-handle.patch gpio-rcar-use-raw_spinlock-to-protect-register-access.patch @@ -622,3 +617,4 @@ vsock-keep-the-binding-until-socket-destruction.patch vsock-orphan-socket-after-transport-release.patch sched-sch_cake-add-bounds-checks-to-host-bulk-flow-fairness-counts.patch kbuild-userprogs-use-correct-lld-when-linking-through-clang.patch +net-ipv6-fix-dst-refleaks-in-rpl-seg6-and-ioam6-lwtunnels.patch