Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2461451rdb; Fri, 8 Dec 2023 08:46:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJ63WTMm1Jw8ZAKm3h8i7uyhN5ZMTfwMqfN76lFbdHLcD+k8Qwh31VzxJQMwrXdsig+q13 X-Received: by 2002:a05:6a20:431a:b0:18f:97c:4f67 with SMTP id h26-20020a056a20431a00b0018f097c4f67mr396556pzk.115.1702053961871; Fri, 08 Dec 2023 08:46:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702053961; cv=none; d=google.com; s=arc-20160816; b=C/d6tEnEz/Pxdtuv6Yl5WJ2YPqaa6tyrW6NZaNYUx37Fhb8iMzDl/oFDRjK2MO+xha LAfSJrMB6HEepZhcK5PRR4chPZ1ib3YFnPMSDT59oArBvXjqb/zVrJU04W9QIZTJuwgX /tgGnBNRMr46s/pJw2IWulHLaGCdnKMm0xwtQFRHs6NgM3lnvcg6DjoG9mKTYAlAvdgl 9in7UXBQFJB1CU+RVMlakeXD3HRaMWKfZA5ThGS5hC0ATd1tY8xmTAsG3O7p1rB6tzsp ImuUs97csyX0RxVIHd+lU9BshVdIW7q33BUu2x7dFGBvT6Oruh9Bcb+3G3v0HcchE/kM 8X5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject; bh=JE7zt8m4YT/GhQZ+otAyGIlu5r8HTdNAZkdPJnqmSaY=; fh=4ceizjbic+bV4OQheHSfiR1nb1zdT9ouEN0tgKMHg/w=; b=wGglg4WNel24wFAAXD1gNmI1DkfPJdohfU/lNJLGqBwUjkltYY29b/WTn74BVwW/jN eUTgqkgVOI2tKLl/WevnFg9DDSAesocTYnSOEpoabak0S31mV4sam+rEVcAP45sbWBSG JeJ9ZGwiI252Qq3j65ck09cDRzkbEBNEARzXByV08VOP8RXPUi6Lae+P8nYufPSIlFXU JQOFbvlbaaxIRbWPAKmMDGxcrQMN27rHMk8Sj9Z7HIIX/wtzYnqXZwMFlh+0QPkPWrUG MmcQhexeJONxhu515q0qVLbKSx2MAXctBSjf647oYgXzuzSy9lHCpqzPm8eHacoyElny fNgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id a6-20020a17090a740600b002810ae70420si3081871pjg.121.2023.12.08.08.46.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 08:46:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0334B80702DB; Fri, 8 Dec 2023 08:45:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233524AbjLHQp3 (ORCPT + 99 others); Fri, 8 Dec 2023 11:45:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232481AbjLHQp1 (ORCPT ); Fri, 8 Dec 2023 11:45:27 -0500 Received: from mx01.omp.ru (mx01.omp.ru [90.154.21.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C09F2198E; Fri, 8 Dec 2023 08:45:32 -0800 (PST) Received: from [192.168.1.104] (178.176.72.145) by msexch01.omp.ru (10.188.4.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Fri, 8 Dec 2023 19:45:21 +0300 Subject: Re: [PATCH v4 13/22] MIPS: traps: Give more explanations if ebase doesn't belong to KSEG0 To: Gregory CLEMENT , Paul Burton , Thomas Bogendoerfer , , Jiaxun Yang , Rob Herring , Krzysztof Kozlowski , , CC: Vladimir Kondratiev , Tawfik Bayouk , Alexandre Belloni , =?UTF-8?Q?Th=c3=a9o_Lebrun?= , Thomas Petazzoni References: <20231208161249.1827174-1-gregory.clement@bootlin.com> <20231208161249.1827174-14-gregory.clement@bootlin.com> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: Date: Fri, 8 Dec 2023 19:45:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20231208161249.1827174-14-gregory.clement@bootlin.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [178.176.72.145] X-ClientProxiedBy: msexch01.omp.ru (10.188.4.12) To msexch01.omp.ru (10.188.4.12) X-KSE-ServerInfo: msexch01.omp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 6.0.0, Database issued on: 12/08/2023 16:36:06 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 59 X-KSE-AntiSpam-Info: Lua profiles 181987 [Dec 08 2023] X-KSE-AntiSpam-Info: Version: 6.0.0.2 X-KSE-AntiSpam-Info: Envelope from: s.shtylyov@omp.ru X-KSE-AntiSpam-Info: LuaCore: 6 0.3.6 62f5a4619c57459c9a142aa1486ed27913162963 X-KSE-AntiSpam-Info: {rep_avail} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {relay has no DNS name} X-KSE-AntiSpam-Info: {SMTP from is not routable} X-KSE-AntiSpam-Info: {Found in DNSBL: 178.176.72.145 in (user) b.barracudacentral.org} X-KSE-AntiSpam-Info: {Found in DNSBL: 178.176.72.145 in (user) dbl.spamhaus.org} X-KSE-AntiSpam-Info: d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;omp.ru:7.1.1;127.0.0.199:7.1.2 X-KSE-AntiSpam-Info: ApMailHostAddress: 178.176.72.145 X-KSE-AntiSpam-Info: {DNS response errors} X-KSE-AntiSpam-Info: Rate: 59 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dmarc=temperror header.from=omp.ru;spf=temperror smtp.mailfrom=omp.ru;dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 12/08/2023 16:40:00 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 12/8/2023 1:21:00 PM X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-Spam-Status: No, score=0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 08 Dec 2023 08:45:51 -0800 (PST) On 12/8/23 7:12 PM, Gregory CLEMENT wrote: > Now that we support having the kernel in XPHYS and not only in KSEG0, > the case where ebase doesn't belong to KSEG0 is more likely to > occur. However, in this scenariowe encounter a significant and Scenario we? :-) > intimidating stack dump without any explanation. To address this, we > should eliminate the uninformative stack dump and replace it with a > warning that provides a clear explanation of the issue. > > Signed-off-by: Gregory CLEMENT > --- > 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 68f1dd54cde1c..ec0cebfd2ef7b 100644 > --- a/arch/mips/kernel/traps.c > +++ b/arch/mips/kernel/traps.c > @@ -2420,10 +2420,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", I think it's called KSEG0... [...] MBR, Sergey