Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp238265rdb; Thu, 8 Feb 2024 04:49:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWPB0fn94Tvq8E1rL656EK4VrpojJqgEN85m959qBCdj1GfSFgF4Q2kq/tA1rAfK3zxgMtpdlQ7z0Mm3+5aFMoe6X+9rjzZMn2PB6HS9g== X-Google-Smtp-Source: AGHT+IHxUMPdgQXKBAbZ8gsJZ1AnlvEMLSVeyNOgV6Q4LIVtxH+dvyoypcsUxV6ox4kaWK/ZsdcM X-Received: by 2002:a05:6214:240a:b0:68c:629d:1ca6 with SMTP id fv10-20020a056214240a00b0068c629d1ca6mr11620219qvb.15.1707396599073; Thu, 08 Feb 2024 04:49:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707396599; cv=pass; d=google.com; s=arc-20160816; b=iwhp5wj8wV8SWrzh80Oko9yRRmKpJPZzoNyGIoOxh7Z9jtzJ+mhazQOtSbasOZsrx0 D9340r3H34/Z7/wCLvPPeM1vU+Mzmj9TFNgEkiBKQJaGY1I/b0wR1hcZExeLbHv9Avm0 4TtKyAOBbYMZkYsLN+C90pFXDbYadW4vtQXNHq5Zl5I9YrVC5O4Y5SIYDNF5+0STjTHT v+EmC2q8hVGlDGW5miQtLadu7bs3o/LliC3MW43eVwaRsvHVhTh9Kv9dA+PTm1CUf+BC iLwbldumAg8PSBnaGu8UYjzFBV0ewcmxuccD0wsftSnvfwWkDheGOCsFF0wjShTmrYOC hKFQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=cEYT/OwK4N+lXpTHYtYvx1TRhq9xnW1TXrJ6/gHTSCs=; fh=E0bqazy0L1pwRXUX4cLUX+VsyQ0vvA0Lgb2ssr/xqSU=; b=s1U6XIYqeo06gqm6Ld+qpaspOUhWITICjttFz85IJY5UJQYkawNzsf0ibRn38Cge0r IPRi/Jknxp3hSbM/GGNfgaVRCjkyoGj7XoxBikFmg0BEZxt3QPb7/e2UENQJZgOydP63 L2rLNrxFTdcGYNxZ8RvCiNxwvCkhKnanEIVNrAn7AfXrH71CMJ+NPF5Jsdt/sqm9B+w9 RcmFC1lNBIA7uOnDGnikCWbtq7TFnc5XBXdbenCBuOTxZbip+l5isqRLO1moYsUIukSJ a4KO92/EI7KAhxFUYq5az8Jhmij8w3ivtl8RITm4zCNeWq7Bogpzu+vkMC5FoB4WyN1v vMuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=alpha.franken.de); spf=pass (google.com: domain of linux-kernel+bounces-58090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58090-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCUgnUnqkZEZixkJ6K4NfBpwikG0aC65JbFBxAXykvh2rGsPBoVeFuD9PMHpQlfo7NjsrHhLOQemdN26aoIthW7YiQUQCO609oygQeR5jQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id bq16-20020a05620a469000b0078553706039si1230499qkb.678.2024.02.08.04.49.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 04:49:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58090-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; arc=pass (i=1 spf=pass spfdomain=alpha.franken.de); spf=pass (google.com: domain of linux-kernel+bounces-58090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58090-linux.lists.archive=gmail.com@vger.kernel.org" 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 CAC471C296EE for ; Thu, 8 Feb 2024 12:49:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75C84762D9; Thu, 8 Feb 2024 12:49:52 +0000 (UTC) Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 363242EB1A; Thu, 8 Feb 2024 12:49:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.175.24.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707396592; cv=none; b=VK+Jl4dZL3Wb2OVurMHDOP+5ROoJApImEaE6MuGG4pRPQ/IvsXc+MRS1EQqeuVQv7roMQmG5eaMtL9ozg9etxAyh5+hg95/e99DCIWcCR4LNoxsi/IyNlJRAVkBpkacX1HGMgT1rYK0e6FeLh+/owbMMY41loTO3+z78o2gVVjY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707396592; c=relaxed/simple; bh=UYSlbZmLjurXnUNDON8vfhJ+CuykhF4aVAA+Uan4bzw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eBI1eSoXgVupoaaOFMA+MOQREfe0UcOtDGqnbU/CJJ3jCCHI02uBgDldFcxh7BDshypd+DWhqlqsevuO78j/Ewz78InuDW3/F5xhMiswFA3NyZrxab5DhzmCB1n59q1Grd1I7ZZZytTNQLtNbtG3AKrZRQmN1F6Jsothyjra9RE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de; spf=pass smtp.mailfrom=alpha.franken.de; arc=none smtp.client-ip=193.175.24.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alpha.franken.de Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1rY3Mr-000329-00; Thu, 08 Feb 2024 13:19:01 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id A3824C0267; Thu, 8 Feb 2024 13:14:17 +0100 (CET) Date: Thu, 8 Feb 2024 13:14:17 +0100 From: Thomas Bogendoerfer To: Gregory CLEMENT Cc: Paul Burton , linux-mips@vger.kernel.org, Jiaxun Yang , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Kondratiev , Tawfik Bayouk , Alexandre Belloni , =?iso-8859-1?Q?Th=E9o?= Lebrun , Thomas Petazzoni Subject: Re: [PATCH v7 01/14] MIPS: spaces: Define a couple of handy macros Message-ID: References: <20240205153503.574468-1-gregory.clement@bootlin.com> <20240205153503.574468-2-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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240205153503.574468-2-gregory.clement@bootlin.com> On Mon, Feb 05, 2024 at 04:34:47PM +0100, Gregory CLEMENT wrote: > Define KSEGX_SIZE to represent the size of each KSEG segment. > > Introduce CKSEG0ADDR_OR_64BIT and CKSEG1ADDR_OR_64BIT to get an XPHYS > address in 64bits and CKSEG[01]ADDR() in 32 bits mode. > > Co-developed-by: Jiaxun Yang > Signed-off-by: Gregory CLEMENT > --- > arch/mips/include/asm/addrspace.h | 5 +++++ > arch/mips/include/asm/mach-generic/spaces.h | 4 ++++ > 2 files changed, 9 insertions(+) > > diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h > index 59a48c60a065c..03a5e2c8b5dc9 100644 > --- a/arch/mips/include/asm/addrspace.h > +++ b/arch/mips/include/asm/addrspace.h > @@ -47,6 +47,11 @@ > */ > #define KSEGX(a) ((_ACAST32_(a)) & _ACAST32_(0xe0000000)) > > +/* > + * Gives the size of each kernel segment > + */ > +#define KSEGX_SIZE 0x20000000 well this is the KSEG size for 32bit and defined in a common section, so better use CSEGX_SIZE Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]