<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/mips/kernel/mips-cm.c, branch linux-6.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-02-21T13:49:21Z</updated>
<entry>
<title>MIPS: cm: Detect CM quirks from device tree</title>
<updated>2025-02-21T13:49:21Z</updated>
<author>
<name>Gregory CLEMENT</name>
</author>
<published>2025-01-23T11:01:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e27fbe16af5cfc40639de4ced67d1a866a1953e9'/>
<id>urn:sha1:e27fbe16af5cfc40639de4ced67d1a866a1953e9</id>
<content type='text'>
Some information that should be retrieved at runtime for the Coherence
Manager can be either absent or wrong. This patch allows checking if
some of this information is available from the device tree and updates
the internal variable accordingly.

For now, only the compatible string associated with the broken HCI is
being retrieved.

Signed-off-by: Gregory CLEMENT &lt;gregory.clement@bootlin.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>MIPS: CPS: Boot CPUs in secondary clusters</title>
<updated>2025-02-21T09:19:37Z</updated>
<author>
<name>Paul Burton</name>
</author>
<published>2025-01-29T12:32:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0856c143e1cd3ffd6ce10a72671335ca6a2cb841'/>
<id>urn:sha1:0856c143e1cd3ffd6ce10a72671335ca6a2cb841</id>
<content type='text'>
Probe for &amp; boot CPUs (cores &amp; VPs) in secondary clusters (ie. not the
cluster that began booting Linux) when they are present in systems with
CM 3.5 or higher.

Signed-off-by: Paul Burton &lt;paulburton@kernel.org&gt;
Signed-off-by: Chao-ying Fu &lt;cfu@wavecomp.com&gt;
Signed-off-by: Dragan Mladjenovic &lt;dragan.mladjenovic@syrmia.com&gt;
Signed-off-by: Aleksandar Rikalo &lt;arikalo@gmail.com&gt;
Tested-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Tested-by: Gregory CLEMENT &lt;gregory.clement@bootlin.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>MIPS: CPS: Add a couple of multi-cluster utility functions</title>
<updated>2024-07-09T08:48:17Z</updated>
<author>
<name>Paul Burton</name>
</author>
<published>2024-05-11T10:43:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=36675ac2a759c6dc99e3155fd6b9ebcc75ef8a45'/>
<id>urn:sha1:36675ac2a759c6dc99e3155fd6b9ebcc75ef8a45</id>
<content type='text'>
This patch introduces a couple of utility functions which help later
patches with introducing support for multi-cluster systems.

 - mips_cps_multicluster_cpus() allows its caller to determine whether
   the system includes CPUs spread across multiple clusters. This is
   useful because in some cases behaviour can be more optimal taking
   this knowledge into account. The means by which we check this is
   dependent upon the way we probe CPUs &amp; assign their numbers, so
   keeping this knowledge confined here in arch/mips/ seems appropriate.

 - mips_cps_first_online_in_cluster() allows its caller to determine
   whether it is running upon the first CPU online within its cluster.
   This information is useful in cases where some cluster-wide
   configuration may need to occur, but should not be repeated if
   another CPU in the cluster is already online. Similarly to the above
   this is determined based upon knowledge of CPU numbering so it makes
   sense to keep that knowledge in arch/mips/. The function is defined
   in mips-cm.c rather than in asm/mips-cps.h in order to allow us to
   use asm/cpu-info.h &amp; linux/smp.h without encountering an include
   nightmare.

Signed-off-by: Paul Burton &lt;paulburton@kernel.org&gt;
Signed-off-by: Chao-ying Fu &lt;cfu@wavecomp.com&gt;
Signed-off-by: Dragan Mladjenovic &lt;dragan.mladjenovic@syrmia.com&gt;
Signed-off-by: Aleksandar Rikalo &lt;aleksandar.rikalo@syrmia.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>mips: cm: Convert __mips_cm_phys_base() to weak function</title>
<updated>2024-03-11T13:02:15Z</updated>
<author>
<name>Serge Semin</name>
</author>
<published>2024-02-26T10:54:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=732932220078f6312f3ef57c17523d3d7f995655'/>
<id>urn:sha1:732932220078f6312f3ef57c17523d3d7f995655</id>
<content type='text'>
Based on the design pattern utilized in the CM GCR base address getter
implementation, the platform-specific code is capable to re-define the
getter and re-use the weakly defined initial version. But since the
pattern hasn't been used for over 10 years and another similar case (CM
L2-sync only base address getter) has just been fixed, let's unify the
interface and convert it to a more traditional single weakly defined
method: mips_cm_phys_base() (see the link below for the discussion around
this).

Link: https://lore.kernel.org/linux-mips/20240215171740.14550-3-fancer.lancer@gmail.com
Signed-off-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>mips: cm: Convert __mips_cm_l2sync_phys_base() to weak function</title>
<updated>2024-03-11T13:02:11Z</updated>
<author>
<name>Serge Semin</name>
</author>
<published>2024-02-26T10:54:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8bc8db2ab2832daabdd06feeabdd511dc9575bb6'/>
<id>urn:sha1:8bc8db2ab2832daabdd06feeabdd511dc9575bb6</id>
<content type='text'>
The __mips_cm_l2sync_phys_base() and mips_cm_l2sync_phys_base() couple was
introduced in commit 9f98f3dd0c51 ("MIPS: Add generic CM probe &amp; access
code") where the former method was a weak implementation of the later
function. Such design pattern permitted to re-define the original method
and to use the weak implementation in the new function. A similar approach
was introduced in the framework of another arch-specific programmable
interface: mips_cm_phys_base() and __mips_cm_phys_base(). The only
difference is that the underscored method of the later couple was declared
in the "asm/mips-cm.h" header file, but it wasn't done for the CM L2-sync
methods in the subject. Due to the missing global function declaration
the "missing prototype" warning was spotted in the framework of the commit
9a2036724cd6 ("mips: mark local function static if possible") and fixed
just be re-qualifying the weak method as static. Doing that broke what was
originally implied by having the weak implementation globally defined.

Let's fix the broken CM2 L2-sync arch-interface by dropping the static
qualifier and, seeing the implemented pattern hasn't been used for over 10
years but will be required soon (see the link for the discussion around
it), converting it to a single weakly defined method:
mips_cm_l2sync_phys_base().

Fixes: 9a2036724cd6 ("mips: mark local function static if possible")
Link: https://lore.kernel.org/linux-mips/20240215171740.14550-3-fancer.lancer@gmail.com
Signed-off-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>mips: mark local function static if possible</title>
<updated>2023-12-11T01:21:39Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2023-12-04T11:56:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9a2036724cd693fef6c7609a856e56fa0d348be9'/>
<id>urn:sha1:9a2036724cd693fef6c7609a856e56fa0d348be9</id>
<content type='text'>
These two functions are global but have no extern prototypes or other
callers, so it's best to mark them as static, avoiding these warnings:

arch/mips/kernel/mips-cm.c:204:13: error: no previous prototype for '__mips_cm_l2sync_phys_base' [-Werror=missing-prototypes]
arch/mips/mm/c-r4k.c:1827:12: error: no previous prototype for 'r4k_cache_init_pm' [-Werror=missing-prototypes]

Link: https://lkml.kernel.org/r/20231204115710.2247097-7-arnd@kernel.org
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Stephen Rothwell &lt;sfr@rothwell.id.au&gt;
Cc: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>MIPS: mips-cm: Check availability of config registers</title>
<updated>2023-04-05T07:45:08Z</updated>
<author>
<name>Jiaxun Yang</name>
</author>
<published>2023-04-04T09:33:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e1aa1dfef69320141f5d00eddbf279b41e70d4e7'/>
<id>urn:sha1:e1aa1dfef69320141f5d00eddbf279b41e70d4e7</id>
<content type='text'>
Prevent reading unsupported config register during probing process.

Signed-off-by: Jiaxun Yang &lt;jiaxun.yang@flygoat.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>mips: cm: Convert to bitfield API to fix out-of-bounds access</title>
<updated>2021-11-02T09:53:52Z</updated>
<author>
<name>Geert Uytterhoeven</name>
</author>
<published>2021-10-29T09:58:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18b8f5b6fc53d097cadb94a93d8d6566ba88e389'/>
<id>urn:sha1:18b8f5b6fc53d097cadb94a93d8d6566ba88e389</id>
<content type='text'>
mips_cm_error_report() extracts the cause and other cause from the error
register using shifts.  This works fine for the former, as it is stored
in the top bits, and the shift will thus remove all non-related bits.
However, the latter is stored in the bottom bits, hence thus needs masking
to get rid of non-related bits.  Without such masking, using it as an
index into the cm2_causes[] array will lead to an out-of-bounds access,
probably causing a crash.

Fix this by using FIELD_GET() instead.  Bite the bullet and convert all
MIPS CM handling to the bitfield API, to improve readability and safety.

Fixes: 3885c2b463f6a236 ("MIPS: CM: Add support for reporting CM cache errors")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Jiaxun Yang &lt;jiaxun.yang@flygoat.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>mips: cm: add missing iounmap() on error in mips_cm_probe()</title>
<updated>2020-11-06T10:33:11Z</updated>
<author>
<name>Qinglang Miao</name>
</author>
<published>2020-10-28T09:15:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2673ecf9586551c5bcee499c1cc1949f6f7cc9a1'/>
<id>urn:sha1:2673ecf9586551c5bcee499c1cc1949f6f7cc9a1</id>
<content type='text'>
Add the missing iounmap() of iounmap(mips_gcr_base) before
return from mips_cm_probe() in the error handling case.

Signed-off-by: Qinglang Miao &lt;miaoqinglang@huawei.com&gt;
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
<entry>
<title>mips: cm: Add L2 ECC/parity errors reporting</title>
<updated>2020-05-07T11:11:38Z</updated>
<author>
<name>Serge Semin</name>
</author>
<published>2020-05-06T17:42:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=109111b33202e19c956c32cb65960b3b31730650'/>
<id>urn:sha1:109111b33202e19c956c32cb65960b3b31730650</id>
<content type='text'>
According to the MIPS32 InterAptiv software manual error codes 24 - 26
of CM2 indicate L2 ECC/parity error with switching to a corresponding
errors info fields. This patch provides these errors parsing code,
which handles the read/write uncorrectable and correctable ECC/parity
errors, and prints instruction causing the fault, RAM array type, cache
way/dword and syndrome associated with the faulty data.

Co-developed-by: Alexey Malahov &lt;Alexey.Malahov@baikalelectronics.ru&gt;
Signed-off-by: Alexey Malahov &lt;Alexey.Malahov@baikalelectronics.ru&gt;
Signed-off-by: Serge Semin &lt;Sergey.Semin@baikalelectronics.ru&gt;
Cc: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
Cc: Paul Burton &lt;paulburton@kernel.org&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: linux-pm@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
</content>
</entry>
</feed>
