Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1268611rdb; Fri, 16 Feb 2024 10:05:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUAcPp07+Ps76X2gDemxiPJEIzqMyonggYya012GNJ87doNdhwO+3r8Yjt2ssE8RZtGQwM5UipoVI0IE4G2J9mt9eGuDqupw5Ez9STncA== X-Google-Smtp-Source: AGHT+IF2bw4up0fEm0uR4m4aOzcDEMhETE1v2gZrXHFhVe2bsiXS7bHBG9ZQWqhZciIF0hjs1ICE X-Received: by 2002:aa7:88cf:0:b0:6dd:e398:2a84 with SMTP id k15-20020aa788cf000000b006dde3982a84mr7317134pff.7.1708106728801; Fri, 16 Feb 2024 10:05:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708106728; cv=pass; d=google.com; s=arc-20160816; b=t8FMSd6WESYRRzJJar9RuDGHdHwDYfFDq6RNF9hRGL5um0xZttlxqqCCZtRry3D+yF z0Km7DpRfsXLIc0mm6mSKGeca7c92eCedtsy40heJIyHUC5aId12KZ9jazqK/t25dWrE p8XFbODLwsSGWT6J3paFym14oM934GHDyn0Ug0PwcQlud2OeWZyH6nlYxrA51s7xHnN8 dCTCSU/XtmO6lPBkjAvJWzQSxn9PTvtPVSs2TMyqwmo7xGeoowM7ErnUNbAz8Rkxu7Si Xe4mAjKsjjYVxfzqU+e0Vw0Yb9gq6+ZcWjN3hMyttzbmNT5208pH3IUAOOusbi8/Zgby MekA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=sm6ABzVaGE03VL5KhWQvFUqXceq6K/iThPKbCcwB5eM=; fh=MwmhOnPCNEKQUh9CETmL1NjqsCe+66NMqSNy76XJ1mw=; b=Q6kjy3yTORr4SfWZfoiUcb60f1WhGB6r5Rma6+KLvtfisGqLhaosAOvhcf7ICJNGGO 5UoyzkOwfJ72glU18e3WBQL4Fp+jAF7EOEC/wkpRuQzyprVhyJfifWNcreFDHJ5yrScw mli85IUXKtaeACL2mytPs7Bo8TN2jHIqpHw0CV/oBSzMDMPBjDR4x5c36TOzvmqdA316 uQSC5/yDkMi780ioN1hnnkD0P/2wwXGolkLCLmSzl9F9TWoB/4W5p8jSvX13Kcik+Ps0 3yPB0lvfQem9Ynk3B/AOftbj2pTQxwA7zq9WeAb8NCIyDfiPksQ1ZueOSkg94GysR92r WzJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=nU9Hnxx8; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-69087-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69087-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id g2-20020a056a000b8200b006e09331f027si261332pfj.308.2024.02.16.10.05.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 10:05:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69087-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=nU9Hnxx8; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-69087-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69087-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BA039B25556 for ; Fri, 16 Feb 2024 17:42:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1AE541332AC; Fri, 16 Feb 2024 17:42:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="nU9Hnxx8" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 AD4D4132472; Fri, 16 Feb 2024 17:42:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708105357; cv=none; b=HXXg1h7bXq4lGW4XoGCOZtJxVL+4AiTB9X6VmNcmVCnKuBbyloIjPSYZVPP8kUgjLn1hh0cjQLkLxtp7vYpTCUmgy53miiWC+QvqFsmThXMcTn9zU4vjBZ01BmQfTTQxS8AJScqKNplTNzvTeBZYNeWkrRFBcKKsq1RXLPaZ+7U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708105357; c=relaxed/simple; bh=rp7klZcscRHI7H80OaeJy1/tHR2TlRZAKcODnRytUDM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jFjEt+zKRG3jW9FtYv9336F9r7KKCwlowXz7eYB+AtAebduQ9gP9q21sDeka6RDd7Ej/PVTdgvFbBt0TS+IJgAzBwP26XU3iivgsCpxLookA7Hi/bHtd2hX72R8ICpw1/7uOS+0nEWPBE8uywWo/0xLvyOgerP/cdKRy6+OJIjk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=nU9Hnxx8; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id ED049240007; Fri, 16 Feb 2024 17:42:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708105352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sm6ABzVaGE03VL5KhWQvFUqXceq6K/iThPKbCcwB5eM=; b=nU9Hnxx8KUt9MdyahkBYJb3afEs7DpmoJIOG4xlpTVe//fjhU/bT4rGsG2EtOf6bznCNOu GwDCNKzu67xKUdJbxJrZl67E3ZNu7JpMuw72b0bpGoylIRg5mtTgCQmRgHBbs6ZHadaO8A KaKJWMDKyL/W3+PCSsL6dbRPatUO9MzHXR63uz/m/SM3VDT6LTOLtBEmStyc3AOKpM0w4G wzIjVcyWOsdtWjndC9/9DHYg61Z55MPf7EZKcAMKl9Kvka0DQjsKzumPRQjSdfTcGsHYVE d1lOAAW51Bn0LNmCd4LBBdSzEVFtifhOy2AkdjaQMkFODEEew6tCJqHd/Pt+fg== From: Gregory CLEMENT To: Paul Burton , Thomas Bogendoerfer , linux-mips@vger.kernel.org, Jiaxun Yang , 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=20Lebrun?= , Thomas Petazzoni , Vladimir Kondratiev , Gregory CLEMENT Subject: [PATCH v8 02/14] MIPS: Fix set_uncached_handler for ebase in XKPHYS Date: Fri, 16 Feb 2024 18:42:11 +0100 Message-ID: <20240216174227.409400-3-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240216174227.409400-1-gregory.clement@bootlin.com> References: <20240216174227.409400-1-gregory.clement@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: gregory.clement@bootlin.com From: Jiaxun Yang ebase might reside in XKPHYS if memblock is unable to allocate memory within the KSEG0 physical range. To map EBASE into uncached space, we convert it back to its physical address and utilize the new CKSEG1ADDR_OR_64BIT helper for mapping. Co-developed-by: Vladimir Kondratiev Signed-off-by: Vladimir Kondratiev Co-developed-by: Gregory CLEMENT Signed-off-by: Jiaxun Yang Signed-off-by: Gregory CLEMENT --- 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 c3cc6fff9d80a..075bb08543eca 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -2293,7 +2293,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 = CKSEG1ADDR_OR_64BIT(__pa(ebase)); if (!addr) panic(panic_null_cerr); -- 2.43.0