From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Gregory CLEMENT <gregory.clement@bootlin.com>
Cc: "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
"Théo Lebrun" <theo.lebrun@bootlin.com>,
"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] MIPS: disable MMID when not supported by the hardware
Date: Wed, 16 Jul 2025 20:06:19 +0200 [thread overview]
Message-ID: <aHfqG2yhp3-rVUms@alpha.franken.de> (raw)
In-Reply-To: <20250710-mmid_disable_no_ginv_on_noc-v2-1-228aa2056dfa@bootlin.com>
On Thu, Jul 10, 2025 at 04:54:42PM +0200, Gregory CLEMENT wrote:
> It is possible that MMID is supported at the CPU level, but its
> integration in a SoC prevents its usage. For instance, if the
> System-level Interconnect (also known as Network on Chip) does not
> support global invalidation, then the MMID feature is not usable. The
> current implementation of MMID relies on the GINV* instructions.
>
> This patch allows the disabling of MMID based on a device tree
> property, as this issue cannot be detected at runtime.
>
> MMID is set up very early during the boot process, even before device
> tree data can be accessed. Therefore, when we determine whether MMID
> needs to be disabled, some MMID setup has already been performed for
> the boot CPU. Consequently, we must revert the MMID setup on the first
> CPU before disabling the feature for the subsequent CPUs that will be
> initialized later.
>
> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
> ---
> Since the issue around MMID support cannot be detected at runtime,
> this patch now relies on a device tree property instead of a Kconfig
> option, as requested by Jiaxun and Thomas. However, as I pointed out
> in the commit log, MMID is enabled very early in the boot
> process. Therefore, I had to track all the parts of the kernel where
> MMID was set up before being able to access the device tree.
>
> I found that MMID was only set up for the first CPU, and I also
> ensured that we can revert the MMID configuration. Indeed, the MMID
> feature is not actively used until paging is set up, which occurs
> later in the boot process.
>
> Gregory
> ---
> Changes in v2:
> - Remove Kconfig dependencies
> - Rely on device tree property
> - Link to v1: https://lore.kernel.org/r/20250625-mmid_disable_no_ginv_on_noc-v1-1-38a3902607a7@bootlin.com
> ---
> arch/mips/include/asm/cpu-info.h | 1 +
> arch/mips/kernel/cpu-probe.c | 42 ++++++++++++++++++++++++++++++++++++++--
> arch/mips/kernel/mips-cm.c | 5 +++++
> 3 files changed, 46 insertions(+), 2 deletions(-)
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 ]
prev parent reply other threads:[~2025-07-16 18:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 14:54 [PATCH v2] MIPS: disable MMID when not supported by the hardware Gregory CLEMENT
2025-07-16 18:06 ` Thomas Bogendoerfer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aHfqG2yhp3-rVUms@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=gregory.clement@bootlin.com \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tawfik.bayouk@mobileye.com \
--cc=theo.lebrun@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vladimir.kondratiev@mobileye.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.