diff for duplicates of <20260225012401.972609551@linuxfoundation.org> diff --git a/a/1.txt b/N1/1.txt index 6c38521..aa51b95 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,86 +1,83 @@ -6.19-stable review patch. If anyone has any objections, please let me know. +6.18-stable review patch. If anyone has any objections, please let me know. ------------------ -From: Stephen Eta Zhou <stephen.eta.zhou@gmail.com> +From: Hariprasad Kelam <hkelam@marvell.com> -[ Upstream commit 694921a93f3e3621e067afc545cedf6fe3b234a9 ] +[ Upstream commit 45be47bf5d7db0f762a93e9c0ede6cb3c91edf3b ] -On SP804, the delay timer shares the same clkevt instance with -sched_clock. On some platforms, when -sp804_clocksource_and_sched_clock_init is called with use_sched_clock -not set to 1, sched_clkevt is not properly initialized. However, -sp804_register_delay_timer is invoked unconditionally, and -read_current_timer() subsequently calls sp804_read on an uninitialized -sched_clkevt, leading to a kernel Oops when accessing -sched_clkevt->value. +As per design, AF should update the default MCAM action only when +mcam_index is -1. A bug in the previous patch caused default entries +to be changed even when the request was not for them. -Declare a dedicated clkevt instance exclusively for delay timer, -instead of sharing the same clkevt with sched_clock. This ensures -that read_current_timer continues to work correctly regardless of -whether SP804 is selected as the sched_clock. - -Fixes: 640594a04f11 ("clocksource/drivers/timer-sp804: Fix read_current_timer() issue when clock source is not registered") -Reported-by: kernel test robot <lkp@intel.com> -Closes: https://lore.kernel.org/oe-kbuild-all/202512250520.APOMkYRQ-lkp@intel.com/ -Signed-off-by: Stephen Eta Zhou <stephen.eta.zhou@gmail.com> -Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> -Link: https://patch.msgid.link/20251225-fix_timersp804-v2-1-a366d7157f58@gmail.com +Fixes: 570ba37898ec ("octeontx2-af: Update RSS algorithm index") +Signed-off-by: Hariprasad Kelam <hkelam@marvell.com> +Reviewed-by: Simon Horman <horms@kernel.org> +Link: https://patch.msgid.link/20260216090338.1318976-1-hkelam@marvell.com +Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> --- - drivers/clocksource/timer-sp804.c | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) + .../ethernet/marvell/octeontx2/af/rvu_npc.c | 41 ++++++++++--------- + 1 file changed, 22 insertions(+), 19 deletions(-) -diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c -index e82a95ea47247..d698584273596 100644 ---- a/drivers/clocksource/timer-sp804.c -+++ b/drivers/clocksource/timer-sp804.c -@@ -106,21 +106,25 @@ static u64 notrace sp804_read(void) - return ~readl_relaxed(sched_clkevt->value); - } - -+/* Register delay timer backed by the hardware counter */ - #ifdef CONFIG_ARM - static struct delay_timer delay; -+static struct sp804_clkevt *delay_clkevt; -+ - static unsigned long sp804_read_delay_timer_read(void) - { -- return sp804_read(); -+ return ~readl_relaxed(delay_clkevt->value); - } +diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c +index c7c70429eb6c1..8658cb2143dfc 100644 +--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c ++++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c +@@ -1042,32 +1042,35 @@ void rvu_npc_update_flowkey_alg_idx(struct rvu *rvu, u16 pcifunc, int nixlf, + rvu_write64(rvu, blkaddr, + NPC_AF_MCAMEX_BANKX_ACTION(index, bank), *(u64 *)&action); --static void sp804_register_delay_timer(int freq) -+static void sp804_register_delay_timer(struct sp804_clkevt *clk, int freq) - { -+ delay_clkevt = clk; - delay.freq = freq; - delay.read_current_timer = sp804_read_delay_timer_read; - register_current_timer_delay(&delay); - } - #else --static inline void sp804_register_delay_timer(int freq) {} -+static inline void sp804_register_delay_timer(struct sp804_clkevt *clk, int freq) {} - #endif - - static int __init sp804_clocksource_and_sched_clock_init(void __iomem *base, -@@ -135,8 +139,6 @@ static int __init sp804_clocksource_and_sched_clock_init(void __iomem *base, - if (rate < 0) - return -EINVAL; - -- sp804_register_delay_timer(rate); +- /* update the VF flow rule action with the VF default entry action */ +- if (mcam_index < 0) +- npc_update_vf_flow_entry(rvu, mcam, blkaddr, pcifunc, +- *(u64 *)&action); - - clkevt = sp804_clkevt_get(base); + /* update the action change in default rule */ + pfvf = rvu_get_pfvf(rvu, pcifunc); + if (pfvf->def_ucast_rule) + pfvf->def_ucast_rule->rx_action = action; + +- index = npc_get_nixlf_mcam_index(mcam, pcifunc, +- nixlf, NIXLF_PROMISC_ENTRY); ++ if (mcam_index < 0) { ++ /* update the VF flow rule action with the VF default ++ * entry action ++ */ ++ npc_update_vf_flow_entry(rvu, mcam, blkaddr, pcifunc, ++ *(u64 *)&action); - writel(0, clkevt->ctrl); -@@ -152,6 +154,8 @@ static int __init sp804_clocksource_and_sched_clock_init(void __iomem *base, - clocksource_mmio_init(clkevt->value, name, - rate, 200, 32, clocksource_mmio_readl_down); +- /* If PF's promiscuous entry is enabled, +- * Set RSS action for that entry as well +- */ +- npc_update_rx_action_with_alg_idx(rvu, action, pfvf, index, blkaddr, +- alg_idx); ++ index = npc_get_nixlf_mcam_index(mcam, pcifunc, ++ nixlf, NIXLF_PROMISC_ENTRY); -+ sp804_register_delay_timer(clkevt, rate); +- index = npc_get_nixlf_mcam_index(mcam, pcifunc, +- nixlf, NIXLF_ALLMULTI_ENTRY); +- /* If PF's allmulti entry is enabled, +- * Set RSS action for that entry as well +- */ +- npc_update_rx_action_with_alg_idx(rvu, action, pfvf, index, blkaddr, +- alg_idx); ++ /* If PF's promiscuous entry is enabled, ++ * Set RSS action for that entry as well ++ */ ++ npc_update_rx_action_with_alg_idx(rvu, action, pfvf, index, ++ blkaddr, alg_idx); + - if (use_sched_clock) { - sched_clkevt = clkevt; - sched_clock_register(sp804_read, 32, rate); ++ index = npc_get_nixlf_mcam_index(mcam, pcifunc, ++ nixlf, NIXLF_ALLMULTI_ENTRY); ++ /* If PF's allmulti entry is enabled, ++ * Set RSS action for that entry as well ++ */ ++ npc_update_rx_action_with_alg_idx(rvu, action, pfvf, index, ++ blkaddr, alg_idx); ++ } + } + + void npc_enadis_default_mce_entry(struct rvu *rvu, u16 pcifunc, -- 2.51.0 diff --git a/a/content_digest b/N1/content_digest index 52ee238..22a6c05 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,101 +1,98 @@ - "ref\020260225012359.695468795@linuxfoundation.org\0" + "ref\020260225012348.915798704@linuxfoundation.org\0" "From\0Greg Kroah-Hartman <gregkh@linuxfoundation.org>\0" - "Subject\0[PATCH 6.19 093/781] clocksource/drivers/timer-sp804: Fix an Oops when read_current_timer is called on ARM32 platforms where the SP804 is not registered as the sched_clock.\0" - "Date\0Tue, 24 Feb 2026 17:13:22 -0800\0" + "Subject\0[PATCH 6.18 555/641] octeontx2-af: Fix default entries mcam entry action\0" + "Date\0Tue, 24 Feb 2026 17:24:41 -0800\0" "To\0stable@vger.kernel.org\0" "Cc\0Greg Kroah-Hartman <gregkh@linuxfoundation.org>" patches@lists.linux.dev - kernel test robot <lkp@intel.com> - Stephen Eta Zhou <stephen.eta.zhou@gmail.com> - Daniel Lezcano <daniel.lezcano@linaro.org> + Hariprasad Kelam <hkelam@marvell.com> + Simon Horman <horms@kernel.org> + Jakub Kicinski <kuba@kernel.org> " Sasha Levin <sashal@kernel.org>\0" "\00:1\0" "b\0" - "6.19-stable review patch. If anyone has any objections, please let me know.\n" + "6.18-stable review patch. If anyone has any objections, please let me know.\n" "\n" "------------------\n" "\n" - "From: Stephen Eta Zhou <stephen.eta.zhou@gmail.com>\n" + "From: Hariprasad Kelam <hkelam@marvell.com>\n" "\n" - "[ Upstream commit 694921a93f3e3621e067afc545cedf6fe3b234a9 ]\n" + "[ Upstream commit 45be47bf5d7db0f762a93e9c0ede6cb3c91edf3b ]\n" "\n" - "On SP804, the delay timer shares the same clkevt instance with\n" - "sched_clock. On some platforms, when\n" - "sp804_clocksource_and_sched_clock_init is called with use_sched_clock\n" - "not set to 1, sched_clkevt is not properly initialized. However,\n" - "sp804_register_delay_timer is invoked unconditionally, and\n" - "read_current_timer() subsequently calls sp804_read on an uninitialized\n" - "sched_clkevt, leading to a kernel Oops when accessing\n" - "sched_clkevt->value.\n" + "As per design, AF should update the default MCAM action only when\n" + "mcam_index is -1. A bug in the previous patch caused default entries\n" + "to be changed even when the request was not for them.\n" "\n" - "Declare a dedicated clkevt instance exclusively for delay timer,\n" - "instead of sharing the same clkevt with sched_clock. This ensures\n" - "that read_current_timer continues to work correctly regardless of\n" - "whether SP804 is selected as the sched_clock.\n" - "\n" - "Fixes: 640594a04f11 (\"clocksource/drivers/timer-sp804: Fix read_current_timer() issue when clock source is not registered\")\n" - "Reported-by: kernel test robot <lkp@intel.com>\n" - "Closes: https://lore.kernel.org/oe-kbuild-all/202512250520.APOMkYRQ-lkp@intel.com/\n" - "Signed-off-by: Stephen Eta Zhou <stephen.eta.zhou@gmail.com>\n" - "Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>\n" - "Link: https://patch.msgid.link/20251225-fix_timersp804-v2-1-a366d7157f58@gmail.com\n" + "Fixes: 570ba37898ec (\"octeontx2-af: Update RSS algorithm index\")\n" + "Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>\n" + "Reviewed-by: Simon Horman <horms@kernel.org>\n" + "Link: https://patch.msgid.link/20260216090338.1318976-1-hkelam@marvell.com\n" + "Signed-off-by: Jakub Kicinski <kuba@kernel.org>\n" "Signed-off-by: Sasha Levin <sashal@kernel.org>\n" "---\n" - " drivers/clocksource/timer-sp804.c | 14 +++++++++-----\n" - " 1 file changed, 9 insertions(+), 5 deletions(-)\n" + " .../ethernet/marvell/octeontx2/af/rvu_npc.c | 41 ++++++++++---------\n" + " 1 file changed, 22 insertions(+), 19 deletions(-)\n" "\n" - "diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c\n" - "index e82a95ea47247..d698584273596 100644\n" - "--- a/drivers/clocksource/timer-sp804.c\n" - "+++ b/drivers/clocksource/timer-sp804.c\n" - "@@ -106,21 +106,25 @@ static u64 notrace sp804_read(void)\n" - " \treturn ~readl_relaxed(sched_clkevt->value);\n" - " }\n" - " \n" - "+/* Register delay timer backed by the hardware counter */\n" - " #ifdef CONFIG_ARM\n" - " static struct delay_timer delay;\n" - "+static struct sp804_clkevt *delay_clkevt;\n" - "+\n" - " static unsigned long sp804_read_delay_timer_read(void)\n" - " {\n" - "-\treturn sp804_read();\n" - "+\treturn ~readl_relaxed(delay_clkevt->value);\n" - " }\n" + "diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c\n" + "index c7c70429eb6c1..8658cb2143dfc 100644\n" + "--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c\n" + "+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c\n" + "@@ -1042,32 +1042,35 @@ void rvu_npc_update_flowkey_alg_idx(struct rvu *rvu, u16 pcifunc, int nixlf,\n" + " \trvu_write64(rvu, blkaddr,\n" + " \t\t NPC_AF_MCAMEX_BANKX_ACTION(index, bank), *(u64 *)&action);\n" " \n" - "-static void sp804_register_delay_timer(int freq)\n" - "+static void sp804_register_delay_timer(struct sp804_clkevt *clk, int freq)\n" - " {\n" - "+\tdelay_clkevt = clk;\n" - " \tdelay.freq = freq;\n" - " \tdelay.read_current_timer = sp804_read_delay_timer_read;\n" - " \tregister_current_timer_delay(&delay);\n" - " }\n" - " #else\n" - "-static inline void sp804_register_delay_timer(int freq) {}\n" - "+static inline void sp804_register_delay_timer(struct sp804_clkevt *clk, int freq) {}\n" - " #endif\n" - " \n" - " static int __init sp804_clocksource_and_sched_clock_init(void __iomem *base,\n" - "@@ -135,8 +139,6 @@ static int __init sp804_clocksource_and_sched_clock_init(void __iomem *base,\n" - " \tif (rate < 0)\n" - " \t\treturn -EINVAL;\n" - " \n" - "-\tsp804_register_delay_timer(rate);\n" + "-\t/* update the VF flow rule action with the VF default entry action */\n" + "-\tif (mcam_index < 0)\n" + "-\t\tnpc_update_vf_flow_entry(rvu, mcam, blkaddr, pcifunc,\n" + "-\t\t\t\t\t *(u64 *)&action);\n" "-\n" - " \tclkevt = sp804_clkevt_get(base);\n" + " \t/* update the action change in default rule */\n" + " \tpfvf = rvu_get_pfvf(rvu, pcifunc);\n" + " \tif (pfvf->def_ucast_rule)\n" + " \t\tpfvf->def_ucast_rule->rx_action = action;\n" + " \n" + "-\tindex = npc_get_nixlf_mcam_index(mcam, pcifunc,\n" + "-\t\t\t\t\t nixlf, NIXLF_PROMISC_ENTRY);\n" + "+\tif (mcam_index < 0) {\n" + "+\t\t/* update the VF flow rule action with the VF default\n" + "+\t\t * entry action\n" + "+\t\t */\n" + "+\t\tnpc_update_vf_flow_entry(rvu, mcam, blkaddr, pcifunc,\n" + "+\t\t\t\t\t *(u64 *)&action);\n" " \n" - " \twritel(0, clkevt->ctrl);\n" - "@@ -152,6 +154,8 @@ static int __init sp804_clocksource_and_sched_clock_init(void __iomem *base,\n" - " \tclocksource_mmio_init(clkevt->value, name,\n" - " \t\trate, 200, 32, clocksource_mmio_readl_down);\n" + "-\t/* If PF's promiscuous entry is enabled,\n" + "-\t * Set RSS action for that entry as well\n" + "-\t */\n" + "-\tnpc_update_rx_action_with_alg_idx(rvu, action, pfvf, index, blkaddr,\n" + "-\t\t\t\t\t alg_idx);\n" + "+\t\tindex = npc_get_nixlf_mcam_index(mcam, pcifunc,\n" + "+\t\t\t\t\t\t nixlf, NIXLF_PROMISC_ENTRY);\n" " \n" - "+\tsp804_register_delay_timer(clkevt, rate);\n" + "-\tindex = npc_get_nixlf_mcam_index(mcam, pcifunc,\n" + "-\t\t\t\t\t nixlf, NIXLF_ALLMULTI_ENTRY);\n" + "-\t/* If PF's allmulti entry is enabled,\n" + "-\t * Set RSS action for that entry as well\n" + "-\t */\n" + "-\tnpc_update_rx_action_with_alg_idx(rvu, action, pfvf, index, blkaddr,\n" + "-\t\t\t\t\t alg_idx);\n" + "+\t\t/* If PF's promiscuous entry is enabled,\n" + "+\t\t * Set RSS action for that entry as well\n" + "+\t\t */\n" + "+\t\tnpc_update_rx_action_with_alg_idx(rvu, action, pfvf, index,\n" + "+\t\t\t\t\t\t blkaddr, alg_idx);\n" "+\n" - " \tif (use_sched_clock) {\n" - " \t\tsched_clkevt = clkevt;\n" - " \t\tsched_clock_register(sp804_read, 32, rate);\n" + "+\t\tindex = npc_get_nixlf_mcam_index(mcam, pcifunc,\n" + "+\t\t\t\t\t\t nixlf, NIXLF_ALLMULTI_ENTRY);\n" + "+\t\t/* If PF's allmulti entry is enabled,\n" + "+\t\t * Set RSS action for that entry as well\n" + "+\t\t */\n" + "+\t\tnpc_update_rx_action_with_alg_idx(rvu, action, pfvf, index,\n" + "+\t\t\t\t\t\t blkaddr, alg_idx);\n" + "+\t}\n" + " }\n" + " \n" + " void npc_enadis_default_mce_entry(struct rvu *rvu, u16 pcifunc,\n" "-- \n" 2.51.0 -56c8a66312a83c9cef258254135fd644b6581841a7b5558c541bf5842afae2aa +c07a3a01251913e1d656eb505b4199c37947c897d824cd03f8ab2d080f91e9b0
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.