Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1126958rdb; Sat, 7 Oct 2023 13:15:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHBWflgRU0RTfzcjKJvYzcSyZM4PT7kcCSJCCPVyKGAzVAVk3LxJ7/NVjhYgdmqSDQQoJbC X-Received: by 2002:a05:6870:808a:b0:1c7:ebf5:b6cb with SMTP id q10-20020a056870808a00b001c7ebf5b6cbmr12990024oab.25.1696709708900; Sat, 07 Oct 2023 13:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696709708; cv=none; d=google.com; s=arc-20160816; b=kesZog9nHzB115McyvZlUtyF0YgRlhUBIcGzmPZx2qVpcqeDPmATUrZmN97UmkLrXV rSEfvPDTIJvqFbNWVeTXTVnqN6jAnm4zn1NzUKoQd3QDPiq733hAiQ8yTTqZTK/i3aKj JuxiYkLwmQkIJLUUystd+w5ABSki2Fszh4jspfQpx64nvSoNiInC9ITJUDaYnazlJDc6 TnEes4niVzqFBilF09or/Q6yj41YNjLjVBiQoCu7+J0BVZrQgNxJ62S3Nuebo1iJVqZP C78DsNg9qDX49tGFXbiuZ65K919zdg3tW40vjW6suVvEamFB528s9UidIHMZGr5jWyQI YIAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=HAd1G1CE8pMJy+IQqhNmJgcfkB8TtDe7tK8J8WflhKQ=; fh=OkVIfZu6hUmEm15jTL3DnRei0gdKEmtHJXZ/s8d4biY=; b=vA6PbOFBVjZA2t7QfBkqaNK/wSEjS/fjKUnp1JVMvLvKPwpmSzV4UJGTjopBr//4UQ MJ3QEuv5jgxHSI+tzCBPZtfyVbJpxKvD6ZPOidD1NMmshYSC6nBFAux9OcNLK9OZMOSb 2sxpRkujgmFGTtyqpkK0wxsc44RwRUWBntIFA+r+tnOZb2nCWZWfE/eHl9JOsqh6ciWi nr55GmtngxTKqphaJ8VcX+ta1t5BKZ7nbwVI3rvzsu/tDSr2ABN5AZ9z9iYFDu8dgedT g6m8kHW28nfdiAcB2arwqTLs4EPaxFiYb5+789x9cDPNcG2SVOz+Dd/sDkX/aDX6/coE x+qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm3 header.b=A1lblkpK; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=MyYd0mb0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id d19-20020a056a00199300b0068ffeb6a949si4271213pfl.73.2023.10.07.13.15.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 13:15:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm3 header.b=A1lblkpK; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=MyYd0mb0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id F0981809C414; Sat, 7 Oct 2023 13:15:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344156AbjJGUO6 (ORCPT + 99 others); Sat, 7 Oct 2023 16:14:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343782AbjJGUO4 (ORCPT ); Sat, 7 Oct 2023 16:14:56 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 217F9C5; Sat, 7 Oct 2023 13:14:55 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id B11963200AFB; Sat, 7 Oct 2023 16:14:51 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute3.internal (MEProxy); Sat, 07 Oct 2023 16:14:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type: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=fm3; t= 1696709691; x=1696796091; bh=HAd1G1CE8pMJy+IQqhNmJgcfkB8TtDe7tK8 J8WflhKQ=; b=A1lblkpKm1sih/Lz24VdS7Kqa27QIOHQxeLLmg8DW3ZhnJOsvYg X0Kzqog/j1RGX+Ag3jyXUisBGhU4xvevkxSPpfVfFl/L9jRVZoCxSDL64W/BOTOK PVhjzdg96Ohnnr6u/r8lpKvtXoC5jjDDrF+tefaY2nvuKep/RIfmndRXWpnec9Ko WHLSBxpSN+OClSXW8SfUxwZKQYKQK4o6h598Ax9lkSJTbB7K47qqn+k/DZIUKlus xqsn+sCyj8wf4qKTTy7pLzMiWisINlYFbMTT2Ngw2Va3NPSG2kTIODDGYvhYlGxz WEp5us7/Vmzee2HxghnXI8giqwtmkykgOUA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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=fm2; t= 1696709691; x=1696796091; bh=HAd1G1CE8pMJy+IQqhNmJgcfkB8TtDe7tK8 J8WflhKQ=; b=MyYd0mb0piU10gXi8GuZntCd+O9GcH7SazJXKah19uzTqldK11i Pc88fUtnls7jXyw+3GZxcemfk2gxYwouFiXs15LFaTrgKTpekpP5yKrV94oKDIbf TRpn0JSEoSu/X7ndo72Bl9jOgPr5aHF8Ww3ABb/SgCyxdUgT5zAvEIBJbVe2oODb FxK3Qj4NtajUXHOzNKPPIGmZkrhWwtdX96myNbaJzufV9R2BXOfg6QWTOqjrZHlf JwlGeMkMxOC+w7VaxmUKLOasEchr/oK0xOEum73rdGqL8km5XIcmxoJc92mrVq1G tng6l0Xkpkr73nGmMOPEKWziRo+04NX9ZMA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrgeelgddugeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdfl ihgrgihunhcujggrnhhgfdcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtoh hmqeenucggtffrrghtthgvrhhnpedufeegfeetudeghefftdehfefgveffleefgfehhfej ueegveethfduuddvieehgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 07853B60089; Sat, 7 Oct 2023 16:14:49 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-958-g1b1b911df8-fm-20230927.002-g1b1b911d MIME-Version: 1.0 Message-Id: In-Reply-To: <20231004161038.2818327-4-gregory.clement@bootlin.com> References: <20231004161038.2818327-1-gregory.clement@bootlin.com> <20231004161038.2818327-4-gregory.clement@bootlin.com> Date: Sat, 07 Oct 2023 21:14:29 +0100 From: "Jiaxun Yang" To: "Gregory CLEMENT" , "paulburton@kernel.org" , "Thomas Bogendoerfer" , "linux-mips@vger.kernel.org" , "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_Lebrun?= , "Thomas Petazzoni" Subject: Re: [PATCH 03/11] MIPS: support RAM beyond 32-bit Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Sat, 07 Oct 2023 13:15:06 -0700 (PDT) X-Spam-Level: ** =E5=9C=A82023=E5=B9=B410=E6=9C=884=E6=97=A5=E5=8D=81=E6=9C=88 =E4=B8=8B=E5= =8D=885:10=EF=BC=8CGregory CLEMENT=E5=86=99=E9=81=93=EF=BC=9A > From: Vladimir Kondratiev > > Support platforms where RAM is mapped beyond 32-bit. > > The kernel parameter ddr32_alias allows to setup the alias to point > outside the first 4 GB of memory. Are you trying to fix the problem that if kernel text is loaded in XKPHYS there is no way to to set EBASE to that region? The common practice for other 64bit MIPS system is to load kernel in KSEG0 and add low 4G mirror with rest of the high memory to buddy system. By doing this Kernel still have access to all memory beyond 32 bit, the only draw back is Kernel's text and data can't be relocted beyond 32-bit. Loading kernel into KSEG0 (i.e. with KBUILD_SYM32) have significant bene= fit on performance, so I think you shouldn't try to load kernel into XKPHYS without a good reason, but it might be helpful to add a BUG_ON at CPS driver to handle such situation. Btw: Is your target hardware publicly available? Folks at CIP United are looking for EyeQ5 boards for a while, they are supporting MIPS R6 support at various projects. Thanks Jiaxun > > Signed-off-by: Vladimir Kondratiev > Signed-off-by: Gregory CLEMENT > --- > arch/mips/kernel/smp-cps.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c > index 47e76722a306..fcfb19487612 100644 > --- a/arch/mips/kernel/smp-cps.c > +++ b/arch/mips/kernel/smp-cps.c > @@ -34,6 +34,16 @@ static unsigned __init core_vpe_count(unsigned int=20 > cluster, unsigned core) > return min(smp_max_threads, mips_cps_numvps(cluster, core)); > } >=20 > +static int ddr32_alias; > + > +static int __init ddr32_alias_setup(char *str) > +{ > + get_option(&str, &ddr32_alias); > + > + return 0; > +} > +early_param("ddr32_alias", ddr32_alias_setup); > + > /** > * plat_core_entry - query reset vector for NMI/reset > * > @@ -52,7 +62,7 @@ static u32 plat_core_entry(void) > { > #if defined(CONFIG_USE_XKPHYS) > return (UNCAC_ADDR(mips_cps_core_entry) & 0xffffffff) > - | CM_GCR_Cx_RESET_BASE_MODE; > + | ddr32_alias | CM_GCR_Cx_RESET_BASE_MODE; > #else > return CKSEG1ADDR((unsigned long)mips_cps_core_entry); > #endif > --=20 > 2.40.1 --=20 - Jiaxun