Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp892647rdb; Fri, 19 Jan 2024 01:58:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFrjFtscMsB1xBWZl390qL2AHvom36JSR5+U4ZJxc7ODn3Qkf6Hfqlm1tCcmbswQPL0FssO X-Received: by 2002:a05:620a:4002:b0:783:89cc:f08a with SMTP id h2-20020a05620a400200b0078389ccf08amr721899qko.8.1705658304508; Fri, 19 Jan 2024 01:58:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705658304; cv=pass; d=google.com; s=arc-20160816; b=s/nPdsTdvngbHRYnJfKs3BcLLBotAz7epiq9FjsLQU7RdemUfKWesnB/+9Gicv37ab w9s6hhvtxv1bz44iqCGkmgUuW8trw6eThmrtTOay6e3vTg4fev7CvOfOUubWoUzz71wt ciBhjco7PMBVxwLtOpo+RSnWSh7wPy5rSCtJAlxM9gG1PpMRY9sM6AW/S2c5D025YvhR p6mTqCodYA1HDwkYwcCvG4ukrgcAbpv1s7t9siZg2M+QAjN1Sz9Ypb/XT2EAX1L7QdmA aw7hUnW/WMU4M2cGlT1ftXc4jiUG5xzk9ZP4wN6CgXX11eexi1rwL1IIFi1KdU4qALZx q7Vw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :feedback-id:dkim-signature:dkim-signature; bh=Y1aAdvlrmWl8c1Tb12LCfyP8q3aR+uk5/BpRCazyGSE=; fh=Lka2m9CCwsqg+2lOySRH9MOTiWNkTJ3CsmHWJfrLG+U=; b=CKZQvkXRERvPMZ+Hfxm6SaeN8pAgbmonWExBg3SMXjQ4dn5mP1a149jSliBF8hRiT/ 7QDakrSPDK9YMtHc+Wyaqp6B2syYXLRsV8YxjNSw+FEoDLmEPH8fT24a6AxoCLmYJwFZ 2y2E5FxMdD7oq6cUFLo2xNvR5b/sUHqpeg7rQku1mwa1zyEe/F/MO+HU+K21Ia9CJH06 BUlpkzEFzpTcL8u8+6wQjkgI4Rqhd1m87Itl/8sP/DQxAW6FGJEXBEt/kNww2Unah1Dh xH3UfMvQlZctZk6wCDDg412bri2pBMKdi1pR0ah8oQjw5eyeAi2ORP40O/cFPrmIG/SE ZEsg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=X1jNMqVY; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=SR5BRVrL; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-30987-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30987-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vr16-20020a05620a55b000b0078319ef15basi15502332qkn.564.2024.01.19.01.58.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 01:58:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30987-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=X1jNMqVY; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=SR5BRVrL; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-30987-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30987-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 255A71C22632 for ; Fri, 19 Jan 2024 09:58:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3D7903C47E; Fri, 19 Jan 2024 09:58:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="X1jNMqVY"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="SR5BRVrL" Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B1EB83C087; Fri, 19 Jan 2024 09:58:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.111.4.29 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705658293; cv=none; b=KCTZAsfjznwQ35zFdtVajqr9ri9saG2zBXKI5HQe86z3w3lAi3eeS41gqxxOiBmEXkiw8JUQyZ6GWtW04LplR5IjSllWOFt3+a/n9DTB2sMSiVagkhT8+koZO/2G1XQegHuakM0GHkhzPb+BWi+G6pXZ48fVZvcxva7pCxMKNEA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705658293; c=relaxed/simple; bh=laGQpW42lgmBqwhwGuEYTUyeGm+KG2KnoNFzaeak+ik=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=q3tO85ukXMahziu1/BZPZ+6Am4FtD2IR45qhUZ92oLN10BHdPx+rL8nZitXHQzNfXLMIqpcGKizf2rIP2GwRte0ahWx77HzHiGXeE6DHkXRspLMuM/PMfqJp53acadITdEKiNC+vs+KB8cpAJqK6vs5hUPIpOAvlE+eKHBe1UQU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com; spf=pass smtp.mailfrom=flygoat.com; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b=X1jNMqVY; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=SR5BRVrL; arc=none smtp.client-ip=66.111.4.29 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flygoat.com Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BA3915C0190; Fri, 19 Jan 2024 04:58:10 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 19 Jan 2024 04:58:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1705658290; x=1705744690; bh=Y1aAdvlrmWl8c1Tb12LCfyP8q3aR+uk5/BpRCazyGSE=; b= X1jNMqVYz49sOP0C0Vc4PJW97jmxq6UQ2UC0rsJrpsTK00pW+PHYfIBl5zvqGQBw gP3ewePK26vvrxqU7wYnNEzAjXyaiShGt+xNTYxDSWsULztwN4fXUprw7Gl718h3 R8EGaTDMgWBfetU8uKn0RRvXug7s1oIrnkZxkbZQX8xVAKrweaxy8Hrzvk6kQ03D 1aiIZoXC2WatQgwDRPEo5I7M/JRVaf0nwMGqvij1LJGUxihvN/Dnd9MFOunx8SxE WndofkWplYMtbq2nkO9GPA+yB6pT6i4at1nF/kMRDD+T8dkD+rMjk+hut215HGmC Tlsqxoeo8KfTZs6RNGyibw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1705658290; x= 1705744690; bh=Y1aAdvlrmWl8c1Tb12LCfyP8q3aR+uk5/BpRCazyGSE=; b=S R5BRVrLaNBjRnwAypJDfgXVDEqfNCgQK7RChbBlfTqPAcU+Jtto41X7fUxnOwnEh laEk5HnCugNoN3Qb2UkKqNA6mn9OjqOpus6Wl/svwq1pK0gNG0I+wgI5QYJq46f4 zk+IpymHsNcoaErf84YeXADgTFKerDXxH2lhAtiLq61+5oVa38I/jOzniw5iVvb2 eMt8URBC6fajfnqzKM8qi6z6jlnBFOHfzpu2K4NSh0hh4f/EGhRqYtmBDCLBY3pm 2yuUSrNw6WZZLMlfdaxni1OX2AW55CiuOZaZaec/Oj18O967bhdd2EgItqQ3/wcR ztFqrZMTCwDdNk8rE+SoQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdektddgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeflihgr gihunhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqne cuggftrfgrthhtvghrnhepleeuffehheegleeuvdelgffhueekjeetueevuefhffdtgfeu hfeggfeukefffedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 19 Jan 2024 04:58:08 -0500 (EST) Message-ID: <57c76891-afca-40e8-ad80-21dc7da9e663@flygoat.com> Date: Fri, 19 Jan 2024 09:58:08 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 04/15] MIPS: traps: Give more explanations if ebase doesn't belong to KSEG0 Content-Language: en-US To: Gregory CLEMENT , Paul Burton , Thomas Bogendoerfer , linux-mips@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vladimir Kondratiev , Tawfik Bayouk , Alexandre Belloni , =?UTF-8?Q?Th=C3=A9o_Lebrun?= , Thomas Petazzoni References: <20240118155252.397947-1-gregory.clement@bootlin.com> <20240118155252.397947-5-gregory.clement@bootlin.com> From: Jiaxun Yang Autocrypt: addr=jiaxun.yang@flygoat.com; keydata= xsFNBFnp/kwBEADEHKlSYJNLpFE1HPHfvsxjggAIK3ZtHTj5iLuRkEHDPiyyiLtmIgimmD3+ XN/uu2k1FFbrYiYgMjpGCXeRtdCLqkd+g9V4kYMlgi4MPHLt3XEuHcoKD1Yd2qYPT/OiQeGM 6bPtGUZlgfOpze1XuqHQ2VMWATL+kLYzk6FUUL715t8J5J9TgZBvSy8zc6gvpp3awsCwjFSv X3fiPMTC2dIiiMh4rKQKGboI1c7svgu6blHpy/Q5pXlEVqfLc7tFTGnvUp95jsK639GD8Ht3 0fSBxHGrTslrT775Aqi+1IsbJKBOmxIuU9eUGBUaZ00beGE09ovxiz2n2JKXKKZklNqhzifb 6uyVCOKdckR8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CvFSpJkiJM/q71Erhyqn6c1weRnMok3hmG0rZ8RCSh5t7HllmyUUWe4OT97d5dhI7K/rnhc ze8vkrTNT6/fOvyPFqpSgYRDXGz2qboX/P6MG3zOOARlnqgjEgorBgEEAZdVAQUBAQdAUBqi bYcf0EGVya3wlwRABMwYsMimlsLEzvE4cKwoZzEDAQgHwsF2BBgBCAAgFiEEmAN5vv6/v0d+ oE75wRGUkHP8D2cFAmWeqCMCGwwACgkQwRGUkHP8D2dXlw/8CGKNXDloh1d7v/jDgcPPmlXd lQ4hssICgi6D+9aj3qYChIyuaNncRsUEOYvTmZoCHgQ6ymUUUBDuuog1KpuP3Ap8Pa3r5Tr6 TXtOl6Zi23ZWsrmthuYtJ8Yn5brxs6KQ5k4vCTkbF8ukue4Xl4O0RVlaIgJihJHZTfd9rUZy QugM8X98iLuUqYHCq2bAXHOq9h+mTLrhdy09dUalFyhOVejWMftULGfoXnRVz6OaHSBjTz5P HwZDAFChOUUR6vh31Lac2exTqtY/g+TjiUbXUPDEzN4mENACF/Aw+783v5CSEkSNYNxrCdt8 5+MRdhcj7y1wGfnSsKubHTOkBQJSanNr0cZZlPsJK0gxB2YTG6Nin13oX8mV7sAa3vBqqwfj ZtjNA+Up9IJY4Iz5upykUDAtCcvm82UnJoe5bMuoiyVccuqd5K/058AAxWv8fIvB4bSgmGMM aAN9l7GLyi4NhsKCCcAGSc2YAsxFrH6whVqY6JIF+08n1kur5ULrEKHpTTeffwajCgZPWpFc 7Mg2PDpoOwdpKLKlmIpyDexGVH0Lj/ycBL8ujDYZ2tA9HhEaO4dW6zsQyt1v6mZffpWK+ZXb Cs8oFeACbrtNFF0nhNI6LUPH3oaVOkUoRQUYDuX6mIc4VTwMA8EoZlueKEHfZIKrRf2QYbOZ HVO98ZmbMeg= In-Reply-To: <20240118155252.397947-5-gregory.clement@bootlin.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 在 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 Reviewed-by: Jiaxun Yang > --- > 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