Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1455501rdh; Fri, 27 Oct 2023 15:12:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRdLZ94/YAw5sdWJ1IOzjsJ2IVTijvc8l2Z6eeK2TMsiU6KNHvK+J5z5cs6Q7PG1pTexUY X-Received: by 2002:a05:6a20:3ca7:b0:17b:3438:cf95 with SMTP id b39-20020a056a203ca700b0017b3438cf95mr4903197pzj.14.1698444762417; Fri, 27 Oct 2023 15:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698444762; cv=none; d=google.com; s=arc-20160816; b=UbO+cOWoc20iQiiv8YYcSu/mixxx5GA1J7vdIRTgi96wCTZ74pmg4ZNTDghPKt+dp9 f9PYU3oOLkTxrvUYqL0ZO3WVE8saMbaGRPyvth5fEvNbTBPwpXzZY3oqidREpntRf2N5 3YRHhxsR+ZwEhELjfhcyHxwh+hj8S0q78dI95VwAW6P+7Epq8WEL7vODSLEGeZBf2/kd f3dygrxtxzD5kFkKjqvXJcDcC1DGhyar6PBwwT642SNNTYzoYihNz44UoZPodNLQP7Dc WP3ENvlTTIea/FpXBMdQzyGH/HaJOaD2JK1bbb1Y+1thjd0sM+mibgM5/+96fiTYwsRk rCaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=z1/hT0gfhZcXEOcRfnRggstjECOl2aSsJ7lZKpBlqTw=; fh=34VXqKbbbRVUWYKB0XlF9D4jmhXxe51P2+smd1zcTfU=; b=exYc6TD+m1RLCkdG5c/v22fBO0jQ36QfVbAQyDxIWggSxG3jAKtkUR9ugQiBr0mPlJ jJU7Hi9NuKJyj3wQQ1/GIWNY1/s+AOpzEW1aA4QVQFWBGNw6suFnNPcYV2mj7G+Cottn pghFgNi7P3rxTgYTwnlrEV3ru3avnUo9MteOxosP0Xlr+HVs5HVSaqL+lNGSJ5ZAI384 VNTB+0K6IcCZI+bbLF5a6yRmyJv2BB2NUOZFhyED7xQj4nWDR1sGRXIjOr2EFNk65crq IpuEdVZ/o0IuqoDzZ/yMn1oAhy0r0yDpucbQVjE/CK2+2Puk/tBa39GniJKjZix1UWUB ArrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=ie76scIs; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=mUpktjBn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id pg16-20020a17090b1e1000b0027909685905si1538058pjb.149.2023.10.27.15.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 15:12:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=ie76scIs; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=mUpktjBn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4FC51811F927; Fri, 27 Oct 2023 15:11:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346675AbjJ0WLg (ORCPT + 99 others); Fri, 27 Oct 2023 18:11:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346649AbjJ0WLZ (ORCPT ); Fri, 27 Oct 2023 18:11:25 -0400 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 791F01B9; Fri, 27 Oct 2023 15:11:22 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 7889B3200930; Fri, 27 Oct 2023 18:11:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 27 Oct 2023 18:11:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1698444680; x= 1698531080; bh=z1/hT0gfhZcXEOcRfnRggstjECOl2aSsJ7lZKpBlqTw=; b=i e76scIspHwkejyfMlnNEsixiVulfjcVKOLLUtgoLrR11xkpC01KVmQhVHs2TefaD os2qKf+GPYO7zQEtb2JpXtEqsAvCecYBKwyw71y/mB4Z1YkU5+ItMtj4gt+oU1kF VvywaEgcocRVyucR8+JkP7vOsX9xYXX9qkF1X+7J/wGCPKbmwVhls7iRmBOpmlVW CubsWCdA35vNnHZhUyINIEzT9PPioX8vtRspLjG6TtzZe/+2oiwj1XHFj9oM2+7D nnWIX8fAxCtmUK5QjlIBrZlf5XuvVdZ1/nZqEw5UYqW/v6HSlK2e0xhUxnUZTriQ 0YLCDxpkIWVzoe+kozbIw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1698444680; x= 1698531080; bh=z1/hT0gfhZcXEOcRfnRggstjECOl2aSsJ7lZKpBlqTw=; b=m UpktjBn4KhValcLCW3JZDXm2MAbITWg2wnxsAVP4ABdz6qTmcSs661UOCnGARar4 rNjg8ncG9spH9kheEDBsZgHrpkgp62yis2D11+/JX39HJRLghnhBi8R7ghQN16Po 0uKuS5Oz6BYMLNkjBBa+G2xnHcW3kkEul8obcaS/fYtGJ13yfpJJGh1xUvZB/k3A h6UTk3lOQkeADwj+8YYh3SKb6Ahqq1sETozW8iubI0kTCHAmTiNvM6rF5z1/HJlH WBTVAn/SvFxRfNACEfITQmCUtJAyEbW5Mbz/JwNJg9HB77vvU9pldwePiaeOo+JV 2n6JYAvVoMKTIGOjNVJqw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrleehgddtjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhgggfestdekre dtredttdenucfhrhhomheplfhirgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhg sehflhihghhorghtrdgtohhmqeenucggtffrrghtthgvrhhnpeefledufeehgedvuedvvd egkefgvddttedtleeiiefhgeetudegkefhvdfhjeeftdenucevlhhushhtvghrufhiiigv pedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihgh horghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Oct 2023 18:11:19 -0400 (EDT) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org, tsbogend@alpha.franken.de, gregory.clement@bootlin.com, vladimir.kondratiev@intel.com, Jiaxun Yang Subject: [PATCH v2 04/10] MIPS: Fix set_uncached_handler for ebase in XKPHYS Date: Fri, 27 Oct 2023 23:11:00 +0100 Message-Id: <20231027221106.405666-5-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231027221106.405666-1-jiaxun.yang@flygoat.com> References: <20231027221106.405666-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Fri, 27 Oct 2023 15:11:52 -0700 (PDT) ebase may be in XKPHYS if memblock unable to allocate memory within KSEG0 physical range. To map ebase into uncached space we just convert it back to physical address and then use platform's TO_UNCAC helper to create mapping. Co-developed-by: Vladimir Kondratiev Signed-off-by: Vladimir Kondratiev Co-developed-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT Signed-off-by: Jiaxun Yang --- arch/mips/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 60c513c51684..230728d76d11 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -2346,7 +2346,7 @@ static const char panic_null_cerr[] = void set_uncached_handler(unsigned long offset, void *addr, unsigned long size) { - unsigned long uncached_ebase = CKSEG1ADDR(ebase); + unsigned long uncached_ebase = TO_UNCAC(__pa(ebase)); if (!addr) panic(panic_null_cerr); -- 2.34.1