* [PATCH] MIPS: OCTEON: program L2C_CTL on CNF71XX too
@ 2026-10-19 3:49 Orgad Shaneh
2026-12-05 10:47 ` Thomas Bogendoerfer
0 siblings, 1 reply; 2+ messages in thread
From: Orgad Shaneh @ 2026-10-19 3:49 UTC (permalink / raw)
To: tsbogend; +Cc: linux-mips, linux-kernel
Since commit bd978130307c ("MIPS: OCTEON: program L2C_CTL, not L2C_CFG,
on OCTEON II"), cvmx_helper_initialize_packet_io_global() writes L2C_CTL
instead of L2C_CFG, because L2C_CFG does not exist on OCTEON II and
writing it hangs a CN6335. The test is OCTEON_CN6XXX, which leaves the
CNF71XX - also an OCTEON II, as OCTEON_IS_OCTEON2() and the rest of this
file treat it - writing the register that commit says is not there.
Use OCTEON_IS_OCTEON2(). OCTEON III (CN7XXX) still takes the L2C_CFG
path, as before: I have no such part and do not know which register it
wants.
Fixes: bd978130307c ("MIPS: OCTEON: program L2C_CTL, not L2C_CFG, on OCTEON II")
Assisted-by: LLM
Signed-off-by: Orgad Shaneh <orgads@gmail.com>
---
Found by the Sashiko review bot on the original series. By inspection
only: I have no CNF71XX board to test on. The Fixes: hash is the one in
mips-next.
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
index 107b1be..c02448b 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
@@ -1028,7 +1028,7 @@ int cvmx_helper_initialize_packet_io_global(void)
* to the cores. This avoids conditions where IO blocks might
* be starved under very high L2 loads.
*/
- if (OCTEON_IS_MODEL(OCTEON_CN6XXX)) {
+ if (OCTEON_IS_OCTEON2()) {
union cvmx_l2c_ctl l2c_ctl;
l2c_ctl.u64 = cvmx_read_csr(CVMX_L2C_CTL);
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] MIPS: OCTEON: program L2C_CTL on CNF71XX too
2026-10-19 3:49 [PATCH] MIPS: OCTEON: program L2C_CTL on CNF71XX too Orgad Shaneh
@ 2026-12-05 10:47 ` Thomas Bogendoerfer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2026-12-05 10:47 UTC (permalink / raw)
To: Orgad Shaneh; +Cc: linux-mips, linux-kernel
On Mon, Oct 19, 2026 at 03:49:18AM +0000, Orgad Shaneh wrote:
> Since commit bd978130307c ("MIPS: OCTEON: program L2C_CTL, not L2C_CFG,
> on OCTEON II"), cvmx_helper_initialize_packet_io_global() writes L2C_CTL
> instead of L2C_CFG, because L2C_CFG does not exist on OCTEON II and
> writing it hangs a CN6335. The test is OCTEON_CN6XXX, which leaves the
> CNF71XX - also an OCTEON II, as OCTEON_IS_OCTEON2() and the rest of this
> file treat it - writing the register that commit says is not there.
>
> Use OCTEON_IS_OCTEON2(). OCTEON III (CN7XXX) still takes the L2C_CFG
> path, as before: I have no such part and do not know which register it
> wants.
>
> Fixes: bd978130307c ("MIPS: OCTEON: program L2C_CTL, not L2C_CFG, on OCTEON II")
> Assisted-by: LLM
> Signed-off-by: Orgad Shaneh <orgads@gmail.com>
> ---
> Found by the Sashiko review bot on the original series. By inspection
> only: I have no CNF71XX board to test on. The Fixes: hash is the one in
> mips-next.
>
> diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
> index 107b1be..c02448b 100644
> --- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
> +++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
> @@ -1028,7 +1028,7 @@ int cvmx_helper_initialize_packet_io_global(void)
> * to the cores. This avoids conditions where IO blocks might
> * be starved under very high L2 loads.
> */
> - if (OCTEON_IS_MODEL(OCTEON_CN6XXX)) {
> + if (OCTEON_IS_OCTEON2()) {
> union cvmx_l2c_ctl l2c_ctl;
>
> l2c_ctl.u64 = cvmx_read_csr(CVMX_L2C_CTL);
applied to mips-next
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-05 11:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 3:49 [PATCH] MIPS: OCTEON: program L2C_CTL on CNF71XX too Orgad Shaneh
2026-12-05 10:47 ` Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox