+++ /dev/null
-From 6a926a8e4697df959c64eaca9afad2d559360816 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 8 Mar 2023 14:47:34 +0800
-Subject: Revert "riscv: Set more data to cacheinfo"
-
-From: Song Shuai <suagrfillet@gmail.com>
-
-[ 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 <suagrfillet@gmail.com>
-Acked-by: Sudeep Holla <sudeep.holla@arm.com>
-Acked-by: Conor Dooley <conor.dooley@microchip.com>
-Link: https://lore.kernel.org/r/20230308064734.512457-1-suagrfillet@gmail.com
-Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
-Stable-dep-of: fb8179ce2996 ("riscv: cacheinfo: Use of_property_present() for non-boolean properties")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
+++ /dev/null
-From efe8d5b42d78aaf69eb9f6e5ec51f347c8cfe59d Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 17 Jun 2024 21:14:24 +0800
-Subject: riscv: cacheinfo: initialize cacheinfo's level and type from ACPI
- PPTT
-
-From: Yunhui Cui <cuiyunhui@bytedance.com>
-
-[ 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 <jeremy.linton@arm.com>
-Suggested-by: Sudeep Holla <sudeep.holla@arm.com>
-Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
-Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
-Reviewed-by: Jeremy Linton <jeremy.linton@arm.com>
-Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
-Signed-off-by: Yunhui Cui <cuiyunhui@bytedance.com>
-Link: https://lore.kernel.org/r/20240617131425.7526-2-cuiyunhui@bytedance.com
-Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
-Stable-dep-of: fb8179ce2996 ("riscv: cacheinfo: Use of_property_present() for non-boolean properties")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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 <linux/acpi.h>
- #include <linux/cpu.h>
- #include <linux/of.h>
- #include <linux/of_device.h>
-@@ -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
-
+++ /dev/null
-From e73a44154d61f71cb23056500a8ef31f032541eb Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-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 <cuiyunhui@bytedance.com>
-
-[ 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 <cuiyunhui@bytedance.com>
-Reviewed-by: Jeremy Linton <jeremy.linton@arm.com>
-Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
-Link: https://lore.kernel.org/r/20240617131425.7526-1-cuiyunhui@bytedance.com
-Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
-Stable-dep-of: fb8179ce2996 ("riscv: cacheinfo: Use of_property_present() for non-boolean properties")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
+++ /dev/null
-From 6ff9980af5a09b18734baf0094b269ff7b52feea Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-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 <robh@kernel.org>
-
-[ 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) <robh@kernel.org>
-Reviewed-by: Clément Léger <cleger@rivosinc.com>
-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 <palmer@rivosinc.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
+++ /dev/null
-From c78c4280de09038dde48e207301dd6ddbdf64146 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-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à <mikisabate@gmail.com>
-
-[ 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à <mikisabate@gmail.com>
-Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
-Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
-Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
-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 <palmer@rivosinc.com>
-Stable-dep-of: fb8179ce2996 ("riscv: cacheinfo: Use of_property_present() for non-boolean properties")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
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
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