Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2396182imi; Sun, 24 Jul 2022 18:47:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sMpG6ajntizOhJqeBBqKZgpLFw/ABhjGzwwtHiw1MssOUszhzbylemBDf6t7cbB4bFy4VJ X-Received: by 2002:a05:6402:28c3:b0:43a:6d78:1b64 with SMTP id ef3-20020a05640228c300b0043a6d781b64mr10870748edb.93.1658713663552; Sun, 24 Jul 2022 18:47:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658713663; cv=none; d=google.com; s=arc-20160816; b=Ey3txJBB+y99HI3EyeTD8AX18TwFe1xtIFoK0wheG0UkvZejFw8wmm53DGV5C/2501 EeOyLM7PkxzOvLp+J7csMjDOsL1+VcQhmRzItrOtDXWKl4egsWRzcR+IzkSXFhqzn2dZ gtPgX+Z4DYg4nTtWn8AXaTcElAFEtb5dim0Bx0uiFhIyf6d2jUjUOQbXLU/lHm1bQL2u uHj8vqdmRH7rNBK2Wf/CLwjMht/raOPgqVjGrknU52dGB2xB1U1HFCT+44l84GfQ35eO v6IO6wrU6X36iEuIvB9XvaaHO9DcBKp8IvRZ6Og6z8L/hfLmJ7Jgm0sGEA/fUwLMS4oS rYPg== 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=LfNc0X3dzpjQjuINibG+B9tgaOnhwm5QMAFVffuq0BM=; b=0A0g7spO901Yga7D6sLzqfr1/kMQweoluA5rMTvtm1cjOil5c5Ecrc7LjMJLI0vltW MsTYxcZDmtoMSG7nj8X75LPX8WPQJuknPWU6f123lwmciOzNIC1gfT9qRPzRimwMeDJl o5i7nIe2N8PgrPNiIuaX3NuebpsLclkrj0+Q3gc+2ksRAR9F5OM3iMGuu/DsQXXnbORR 843Ep1635fIi9qIoVydOk3Wq0fuo1QHBaV4U4xEsv4zq/h7YVLBn5r//SVF5A6uO//9O 7KAkfulRPVbhPXBk5X+jMtVETN+ERkrkk43KeYbM5AJRrFKxJuWktUJyakb3cPuYlS3H jcUQ== 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 um6-20020a170906cf8600b0072f48ca37d2si10952652ejb.442.2022.07.24.18.47.19; Sun, 24 Jul 2022 18:47:43 -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 S232347AbiGYBqD (ORCPT + 99 others); Sun, 24 Jul 2022 21:46:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231997AbiGYBpw (ORCPT ); Sun, 24 Jul 2022 21:45:52 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC84A135; Sun, 24 Jul 2022 18:45:51 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R561e4;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=22;SR=0;TI=SMTPD_---0VKFiQ8a_1658713545; Received: from localhost(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VKFiQ8a_1658713545) by smtp.aliyun-inc.com; Mon, 25 Jul 2022 09:45:46 +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, bhe@redhat.com, vgoyal@redhat.com, dyoung@redhat.com, corbet@lwn.net Cc: kexec@lists.infradead.org, linux-doc@vger.kernel.org, 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: [RESEND PATCH V2 3/5] riscv: Add modules to virtual kernel memory layout dump Date: Mon, 25 Jul 2022 09:45:37 +0800 Message-Id: <20220725014539.1037627-4-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220725014539.1037627-1-xianting.tian@linux.alibaba.com> References: <20220725014539.1037627-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, 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 Reviewed-by: Guo Ren Reviewed-by: Heiko Stuebner 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