[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57c76891-afca-40e8-ad80-21dc7da9e663@flygoat.com>
Date: Fri, 19 Jan 2024 09:58:08 +0000
From: Jiaxun Yang <jiaxun.yang@...goat.com>
To: Gregory CLEMENT <gregory.clement@...tlin.com>,
Paul Burton <paulburton@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>, linux-mips@...r.kernel.org,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>,
Tawfik Bayouk <tawfik.bayouk@...ileye.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Théo Lebrun <theo.lebrun@...tlin.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v6 04/15] MIPS: traps: Give more explanations if ebase
doesn't belong to KSEG0
在 2024/1/18 15:52, Gregory CLEMENT 写道:
> With the expanded support for placing the kernel in XPHYS rather than
> just KSEG0, scenarios where ebase doesn't belong to KSEG0 are more
> likely to occur. In such cases, we currently experience a substantial
> and perplexing stack dump without any accompanying explanation. To
> rectify this, we aim to replace the uninformative stack dump with a
> warning that offers a clear explanation of the issue.
>
> Signed-off-by: Gregory CLEMENT <gregory.clement@...tlin.com>
Reviewed-by: Jiaxun Yang <jiaxun.yang@...goat.com>
> ---
> arch/mips/kernel/traps.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
> index 355d0f0709de8..911d2233d6d0b 100644
> --- a/arch/mips/kernel/traps.c
> +++ b/arch/mips/kernel/traps.c
> @@ -2347,10 +2347,13 @@ void __init trap_init(void)
> * EVA is special though as it allows segments to be rearranged
> * and to become uncached during cache error handling.
> */
> - if (!IS_ENABLED(CONFIG_EVA) && !WARN_ON(ebase_pa >= 0x20000000))
> + if (!IS_ENABLED(CONFIG_EVA) && ebase_pa < 0x20000000)
> ebase = CKSEG0ADDR(ebase_pa);
> else
> ebase = (unsigned long)phys_to_virt(ebase_pa);
> + if (ebase_pa >= 0x20000000)
> + pr_warn("ebase(%pa) should better be in KSeg0",
> + &ebase_pa);
> }
>
> if (cpu_has_mmips) {
--
---
Jiaxun Yang
Powered by blists - more mailing lists