Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2477590rdb; Mon, 5 Feb 2024 07:46:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIJSXIIid0b6DgiXi9VKCym1BbUEDxznLHxkbjgvjuFOVRcx1g66buG6ra2J1YMgxE/6R+ X-Received: by 2002:a05:6e02:1211:b0:363:b214:2492 with SMTP id a17-20020a056e02121100b00363b2142492mr101838ilq.10.1707147998577; Mon, 05 Feb 2024 07:46:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707147998; cv=pass; d=google.com; s=arc-20160816; b=ZIBjmz+uyEaiRnfYCtXKpkDHy58c2kfCr4EeAkxiG85r59LVpbRl5MpexTcDnpXye5 nGvelU7l3/Y3QPeRWc17bsz9TODJ8PeQwrdm3kQMagZ1PyK4RkiaBTtvA7yARMYPD8Xm awzNlkcAaYDyhoiCXIlL+gWXUoMarE8NhHud15wQOQ/vJ7uDsDcXA0ATXideESzP/epA Qkw1yTe6LO2kmkcp9h+pA1Iy69S9QSWXFi8xWnwfbWJq7w+v+3J6uKnbGbwo0imxK0Dk +bsdDx7DyKmkAj14mgmw7sbLES1v+oLX90tNXhLbzml9GpAaH4UFx8NLGquYFNeDf/KB EekA== 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=kCu7pbyVCXYyBTkd+j43VhZPPnMfAyc4JbkgYZulLro=; fh=oYOi8ZTuKfoEBw6V+7P+QZL375AohvVT8J/aRoWT3N8=; b=JBFXTfaWLDyPo1goUlP8kfy3/BM4NsnJq4RtS3LD7MYrXD8SrX/Lpv0gwq43as/KFq Ar6+xyRyWVZxUvIaCvv5PEUyu0E4n8HTz2giDEgWcJVOiICi4WdRdxQIrY4B2hUKVdDZ C1EOPzr9avY46pRsgJqaNJ4nAdgi5VPtyl6L9h+2NrRXfGlVK9ctw9lRY8QJrK66S0t1 zJ2VYnqwluDP0NzWloWXGVp1YbD3A68tlArfg0twcpnHsqv0V0X3hWrfUiJbruxXrdM2 aKchFBiXqFgkKBEqa5JqXnPbaTxtrfbwtX1IdH4VKg3WePFmSs2jgvmbpjbP9/diM20i Z7ZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PbRjKJGe; 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-52924-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52924-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com X-Forwarded-Encrypted: i=1; AJvYcCWDnvWHn/EF2NZuHgj5RIjAZ8BY6mUZze82EDb9iM2K9fVcBLc1R4TAMzC58TJXetq6npnMNaclTmimXayrad5kVP/4v0j8RsTe/pqItQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m185-20020a633fc2000000b005ce0205d0cfsi55078pga.306.2024.02.05.07.46.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 07:46:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52924-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PbRjKJGe; 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-52924-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52924-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2A05F28B8F2 for ; Mon, 5 Feb 2024 15:35:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07F8835884; Mon, 5 Feb 2024 15:35:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="PbRjKJGe" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (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 82A2F2E634; Mon, 5 Feb 2024 15:35:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707147313; cv=none; b=In7HNgu9BS84Ct5AgkRoRaOhBPr245rlZz/rRtGDXoWYmICvBKqe6JJBPnFe3PiR4HTNTXC4SucjcAbBWCw2/GB90Le9qfqLabOjRceP3p6Rws/pEoy+nhNIuPxYyrQRB/efTsTgylL2w57CIDtfbj77zKwVPXshQMVyWRbCN+Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707147313; c=relaxed/simple; bh=oa5sejmaTh9U90I2mSDvC4U+biGVOnXDlP5i08xONzc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RUVhpcumZkndubKJB/fMQtCA78wenLDdeEGNw7OIDdGD3y1agq9184wjZwt+gnlV/6I25pM1KqRz1E+liak4GKgbrMotZjqLuIWMPiSf6n7F3x1f1Xzcdjp/KEGRAGk+dKPV05GWqLtmUOUqHjFQ90MuIYcAqB51W4GuIpx1214= 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=PbRjKJGe; arc=none smtp.client-ip=217.70.183.201 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 064CA1BF208; Mon, 5 Feb 2024 15:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1707147308; 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=kCu7pbyVCXYyBTkd+j43VhZPPnMfAyc4JbkgYZulLro=; b=PbRjKJGe20Wre3g36e4elqWGh2SQLjS5H0anTaXoffAmMjTX/ucQLd32l6/nqucNABPa5O sEl7D56VJ2307krtD3AwN99Q1Zpicqt6z4WewCW2FGt1jBZpEHJsLcLuMpFhLTZA3eAGDX RKw29VHd8oAQMuHKeguplFrUpm+y4igmqgaMXM/yS3HBZqOZIdtQVYdRGj3YW454exU5sf vQN27JDxsiY82Cmb9OCg+RyrHXFhWlUT9iYRcLX++UzYwoMEhe5LTwFl0wZ/bXRXTcRSUV S/OVcUjS+ik2QEBpbacoZBlMpP5Sh77jFv97a+AJIc5J7LQsbC1LhuNwHKZDiw== 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 v7 02/14] MIPS: Fix set_uncached_handler for ebase in XKPHYS Date: Mon, 5 Feb 2024 16:34:48 +0100 Message-ID: <20240205153503.574468-3-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240205153503.574468-1-gregory.clement@bootlin.com> References: <20240205153503.574468-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 0e3f2f2fa732b..355d0f0709de8 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -2295,7 +2295,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