From patchwork Wed Oct 4 16:10:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 148388 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp242815vqb; Wed, 4 Oct 2023 09:11:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/NKqoxQgtuaMrdZU79o+j3Bg/Dx9NEbyjXUMsLREQXvCC7btwnTy6FbjmacilN4NYM9wl X-Received: by 2002:a05:6a20:7487:b0:14e:43b0:5f99 with SMTP id p7-20020a056a20748700b0014e43b05f99mr2912457pzd.52.1696435895525; Wed, 04 Oct 2023 09:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696435895; cv=none; d=google.com; s=arc-20160816; b=VfXWNuPIRBv+iMdxjmUfYPr9pzUb3pw4nGQAOzr6/v+UGx1pDnLGdHKKk8p8t8qU0Z +az2znpGhiLjl9ELZ9pVCH2Hfr3nKPani0fOAyNG0ROTv3SLwH+mrHFHkZX3PLkjKlXm ApS0pfTKkGYgzO7YAP8vfpVgzlu5A0rTuUEI0U7ZOQXy7BsZBQbOJ4UutefjPTay8P9R Hdy80rI3QX+RcgyB2/rvTLpdOk5SmCRR750suBwXf4mA8JeCy9hDrwLOMCoKhjAUpWuN ALYzIm8l6OMPOe8odde26mTzCQ3xSvAhrphQEc7sr+r5L8O/pqTuj4ZMiLNE347Yq9ML 18/g== 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 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id l3-20020a170902f68300b001c7755dccbcsi4419024plg.619.2023.10.04.09.11.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 09:11:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; 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 23.128.96.34 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 6EF2A8348D92; Wed, 4 Oct 2023 09:11:16 -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 S243262AbjJDQLD (ORCPT + 19 others); Wed, 4 Oct 2023 12:11:03 -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_Lebr?= =?utf-8?q?un?= , 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 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:16 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778841965772497057 X-GMAIL-MSGID: 1778841965772497057 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