Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2178055imw; Sun, 17 Jul 2022 03:15:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t91RzX86FsAuvOqO5yeLN1Vuaoeg5DosIAhDzEIxJQL7Uy5I22VS1Oqo4VotMMD575NugE X-Received: by 2002:a17:902:db12:b0:16c:3273:c7b1 with SMTP id m18-20020a170902db1200b0016c3273c7b1mr22474745plx.172.1658052915055; Sun, 17 Jul 2022 03:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658052915; cv=none; d=google.com; s=arc-20160816; b=kchs0zBN9gkmab5K0UmN0Z9LcugEspFSp83MnVPSu9Qi+nLPKSVXAdOQvhQoQhN0bp 2HOtmYdI6IEm8ttg1Rd6+m5ITHef5FwHCh5GMxS+ObPSIMPQRqPb9RiTGIiq0R5/zuEv hZJDSKb5IBbkOIDedwqkC7KltwNv4KPmbYjV56MW+Gs/XTNkM8gyBO7Y5R8tioksOt2w wWHRvoAetP54jN6ZDiwS/SCB9dQGRShEaq7XuUdiJ8UzMzLeXJ4uwwnDO9XebsK6hAHP AYrFkTcL71grkZtD3zjJOa/bTGMYFp84tAIAPHRlt7/Yo/Q32etn7LDgZzGSaaCp0UHE pHEQ== 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=OAysQViL9xTLTeRlmlSZS/LEdk7n8LrmKWZs16BdJVgyG2yAM3ag7GTP5KUtwbVuDh 2unmlY1DdFNT46F6ZVjEruiglYeYmNs38vkwnfr7htBwAnzDzI9hSLUtBz9/45WkGICP dovmo+haKjBqqtdR3RMXtARpNtcHY3azgV/6dpY0IzxMjr2AyzI0xB0GllrJpSYTX7Ki niihzockTjdrYo5aaKyhpgvlphZypidQgehLmCavmlFLNbMDuvA1LjVWWWUAOnxAPd/J wujV9q/4qrqioPr/1MY7A7JlwlmYYlAGQgj9vH5JbHNw5d+UmNgLjodEQb5C6g6BTVmc eaBw== 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 s10-20020a170902b18a00b0016c65bbf115si11326795plr.131.2022.07.17.03.15.01; Sun, 17 Jul 2022 03:15:15 -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 S233041AbiGQKNq (ORCPT + 99 others); Sun, 17 Jul 2022 06:13:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232924AbiGQKNg (ORCPT ); Sun, 17 Jul 2022 06:13:36 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AD27186E2 for ; Sun, 17 Jul 2022 03:13:35 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0VJXkPSS_1658052810; Received: from localhost(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VJXkPSS_1658052810) by smtp.aliyun-inc.com; Sun, 17 Jul 2022 18:13:31 +0800 From: Xianting Tian To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, anup@brainfault.org, heiko@sntech.de, guoren@kernel.org, mick@ics.forth.gr, alexandre.ghiti@canonical.com Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, crash-utility@redhat.com, huanyi.xj@alibaba-inc.com, heinrich.schuchardt@canonical.com, k-hagio-ab@nec.com, hschauhan@nulltrace.org, Xianting Tian Subject: [PATCH 4/5] riscv: Add modules to virtual kernel memory layout dump Date: Sun, 17 Jul 2022 18:13:22 +0800 Message-Id: <20220717101323.370245-5-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220717101323.370245-1-xianting.tian@linux.alibaba.com> References: <20220717101323.370245-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,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,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