Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp470850imw; Thu, 14 Jul 2022 05:07:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sTuRSG4NfEf0bcz+8OEBfvSRK/oekK3deyOGKcpidtl7gQiPYW6A4z/bz1i28ttnO3vF9q X-Received: by 2002:a17:907:7347:b0:72d:78bb:b0d7 with SMTP id dq7-20020a170907734700b0072d78bbb0d7mr6063789ejc.45.1657800440257; Thu, 14 Jul 2022 05:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657800440; cv=none; d=google.com; s=arc-20160816; b=wgxUcLcHinu1Uu/rX9Q2inezAZx0y76wWILTFxnbbTbyGmSVklG4anHFWv0LXg0qIR cdicvDSIQh6uc5tzDS/4yWhagssN1A6/1tlu+L+RVJS2GGCJT/f1kOWeW8WdrCq7WELF QVayKVxQXQjJGc+jZJMn671+mq73H7NQ5C6lpDYFxUKafVnWeS0ZZQpMB5gHYofxBHZR CJYZsydiK8DrEgcf1jJypKhZjAz1EadjqD+019EyZCPbMZPqg268e0zT4Cs3D5VazLsF p/hPlLuk3ak5KP5EoLqJIgs0J4b5BNUqWkvvGYPdBb1Jgke1MWlFSDsDnTeK2g6t73hk RhlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=0AWDAzWLNPBdbtPtU7MYAd3E98HkbAsZdjYbMGgZoBM=; b=s3AHhthsfn1p55NNh2FDJ9gDRQzDWh0c0MiaTuXgtdIkgTyRgDVvIDeYqMtgUFDbhM toPdMMpxKAy9KEIEPLqbogiCSfPHcnZDaB9GK3UZ6okL2mmyo8TQeMtwvcDD4ogt5czu IaZLFjYoy3MrPENWuQa1WnpThL6jDg6SthRiaYo8YQI06eOV2rQows/5kWrQl0SfCUMB 8oizEeLwcOtAx7eetfyQJag7AQx2QKIENn86+HfXm8dRNGqZNbiIcj1HsPyeetSiad0T EzaFSYGQ6FuRo91rpXnpc6gWHQ298kDOT6qSFYItTz0Rkm4duuXBADlRO27KD4fMigST surQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds1-20020a170907724100b00711f20051f2si2262270ejc.697.2022.07.14.05.06.54; Thu, 14 Jul 2022 05:07:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238936AbiGNLdU (ORCPT + 99 others); Thu, 14 Jul 2022 07:33:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238917AbiGNLdM (ORCPT ); Thu, 14 Jul 2022 07:33:12 -0400 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A168412768 for ; Thu, 14 Jul 2022 04:33:11 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0VJJB-IB_1657798385; Received: from localhost(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VJJB-IB_1657798385) by smtp.aliyun-inc.com; Thu, 14 Jul 2022 19:33:06 +0800 From: Xianting Tian To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, alexandre.ghiti@canonical.com, guoren@kernel.org, anup@brainfault.org, mick@ics.forth.gr, rppt@kernel.org, heiko@sntech.de Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, huanyi.xj@alibaba-inc.com, Xianting Tian Subject: [PATCH V3 2/2] riscv: Add modules to virtual kernel memory layout dump Date: Thu, 14 Jul 2022 19:33:00 +0800 Message-Id: <20220714113300.367854-3-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220714113300.367854-1-xianting.tian@linux.alibaba.com> References: <20220714113300.367854-1-xianting.tian@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 Modules always live before the kernel, MODULES_END is fixed but MODULES_VADDR isn't fixed, it depends on the kernel size. Let's add it to virtual kernel memory layout dump. As MODULES is only defined for CONFIG_64BIT, so we dump it when CONFIG_64BIT=y. eg, MODULES_VADDR - MODULES_END 0xffffffff01133000 - 0xffffffff80000000 Signed-off-by: Xianting Tian --- arch/riscv/mm/init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index d466ec670e1f..2c4a64e97aec 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -135,6 +135,10 @@ static void __init print_vm_layout(void) (unsigned long)VMEMMAP_END); print_ml("vmalloc", (unsigned long)VMALLOC_START, (unsigned long)VMALLOC_END); +#ifdef CONFIG_64BIT + print_ml("modules", (unsigned long)MODULES_VADDR, + (unsigned long)MODULES_END); +#endif print_ml("lowmem", (unsigned long)PAGE_OFFSET, (unsigned long)high_memory); if (IS_ENABLED(CONFIG_64BIT)) { -- 2.17.1