Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2712172rdb; Wed, 4 Oct 2023 09:11:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGa5JkF6/MYJRBbgkYgYrzO6gT7j/sygXMHcU6EUyLXE8Rfr+H4sn3wv8k0u+MRLWavwUWd X-Received: by 2002:a17:90a:b387:b0:274:4e9b:7a1a with SMTP id e7-20020a17090ab38700b002744e9b7a1amr2586385pjr.44.1696435890736; Wed, 04 Oct 2023 09:11:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696435890; cv=none; d=google.com; s=arc-20160816; b=VupWi9Q387fsgzlpjboE3eJ+haNXv422DFbXu8sgg1HEOYFHesPueV3KiHhCUGUXpi YUeDs2HmeQw7nNb/aNvvosY/eV5iTpSN8oz7mNZbnhTakT9phNFOInQEhXlZ+sAi7M72 uMzDcyTb2Q08MxDwxgsmGDHppyCmQHjBGUzAhXU0XmH99sKo9L3rOXgKb5d4KVKXN/7w 3Ar+wfSFtBlOHSYb5tlcRLWKTE4jxkOFzcVd9d5bFU8TLznMVZvsh975B9dMrt7Xl8us 0cLgMrZd3FD5Hy/jJFv9BE9wfMibVz+Cn2uRkpaof1FopSrIYeC8s+PdyK80zCyhfQTm 795Q== 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 :dkim-signature; bh=VOjmWr0mfjgBp7nTWHYGPwk6e22EOwSF4b0ZHDI/Irc=; fh=Se1ENV7S1WlWgaTZX3WsmbP5gu1FYEREoZ/dljQcGVE=; b=FPj61UC5VloSieZgvcNIJnZ9GzG+DFVD7+c0Vt4N9oAuoKMk2rYIKQXGMA2q+5UvtQ 3fWQ32pT6zam0D4MA98sp/q45dDi3aPTUxZX4+/C3S9vCuJ5Sl1wrOgedb05rLVLzCJP R6tEQFHWBaCAk8716WHprW3QNyH7Pdj8UWMAHwWKcPOrDfRQEdfVwe7+YMbHX/qmIN4e b6hnMUYmUemnMBpoc+z9H8VNBLVFJkpX6fddRMail5BL4KwXnQ6XKrROfKAHnQKACHjD rCMWnrwojahJ4jNF71qh6dnycj8ZoGeQmLOSiR5EH4e7Kddg7Q2PPhUXgiN9YVrtllCX PqHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mK6smk9v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id w20-20020a170902c79400b001c60ecf8f7asi3799880pla.258.2023.10.04.09.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 09:11:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mK6smk9v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 03D1682D755C; Wed, 4 Oct 2023 09:11:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233537AbjJDQLC (ORCPT + 99 others); Wed, 4 Oct 2023 12:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243244AbjJDQK4 (ORCPT ); Wed, 4 Oct 2023 12:10:56 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7A47C0; Wed, 4 Oct 2023 09:10:52 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id D2623E0006; Wed, 4 Oct 2023 16:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696435851; 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=VOjmWr0mfjgBp7nTWHYGPwk6e22EOwSF4b0ZHDI/Irc=; b=mK6smk9vHL4Vz1l1in2vpkrJfRKPFK5FWJ/iGAp0VFPia3gMZAa1jSIoybLSXms4wEB9+5 EuY4Q042RL7K5FRQZieMtyubzN4Fvnyr8/udm4tmIqYNj91o0GAEaa9MN/80cprFJd0iYF tAT2DermcTvyHEMy2rrieelCWPFbTM/2D6JBQtyGWdjWdEg+AbBo8u6whRPOfBY9gI1LU4 EH5/7oXEYrasvjmvAxcI+ePVL6Hhe3PLrPI8cotMRE85SvO1BInV+MG/6j8olGOfNSMv5j ukHuI4V3mIF/9845SJCizcDJC74Z2HatyWu561L7nvPkKRTrQRMD21BgbOKPNw== From: Gregory CLEMENT To: Paul Burton , 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=20Lebrun?= , Thomas Petazzoni , Gregory CLEMENT Subject: [PATCH 03/11] MIPS: support RAM beyond 32-bit Date: Wed, 4 Oct 2023 18:10:30 +0200 Message-Id: <20231004161038.2818327-4-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231004161038.2818327-1-gregory.clement@bootlin.com> References: <20231004161038.2818327-1-gregory.clement@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: gregory.clement@bootlin.com 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, 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 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 09:11:11 -0700 (PDT) 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. 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 cluster, unsigned core) return min(smp_max_threads, mips_cps_numvps(cluster, core)); } +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 -- 2.40.1