Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2504631imn; Tue, 2 Aug 2022 05:35:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Xsa0iAQEza10E2hxsbEKFPdSUDc4KuGFcqfWQkdOQFCSgNvHqACQ7uO0DU42gfvjn1W8J X-Received: by 2002:a05:6402:42cb:b0:43d:bf29:cf89 with SMTP id i11-20020a05640242cb00b0043dbf29cf89mr7225037edc.400.1659443724828; Tue, 02 Aug 2022 05:35:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659443724; cv=none; d=google.com; s=arc-20160816; b=sSPXOk8SI8JN/96Q1smGODkNkBJhuANjKNv+Vx1uTPb25yfQ17hVte9IKFj3TlP3fw TayUWdMm46HmLwPZS/Sd+WQOjpoVO2b2AHqufzN/TNiVDLmYyU35PZVOWGkHJ1wNfy4n f2NMByd0nMRXMbC+bplUJ4HnndQgVW/tTDWA5EWbmcSCu7pQHwU4O+/V5CmWcAnPxMiZ t3dPVG4UcYGHBoPTjO4zHU3H62f+zW3tWhdDm+R+4Xb0wF+7TpMATQtZQuHKnqQp4tg2 gd3yEve0OVZDsB5lw7o8/sCn0MYvif55zv0sITb3wW7RVkfBtUYmkzduteS3njRqlUCf IW7A== 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=cthBIsQfVlDYi6JKKQnGf3V5Ctb3436lOMGXRJK+UCpKZYNDMxYW1NN957b6lGYwoS FFPTzQ9Nt7PVZ4xL9zL28a+z3jD/b8tz87fEmXqAceyK/RY0gznRRm4Qr5ncdPVIhs7p AsbfpwhWozI6FZeHCcqv2wrbcF4bGGxc4qGItm+/lLbr1rKlo6JolBRKyJboyz6FFaWl +1XS7mBSXCWHMp/FaADAQppootY3eWvPY6IxoNFMcc0uVqp9JaLJQ7RbQ3USzequVGAr Q2puD80SfqkwE3Y0uD3iZVdDKzRUuEL5cy5g8xa0qDKtU3DBPaUQJQ8ptgGgA2iVIVYA LS4g== 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 e13-20020a17090658cd00b00730869f1d14si5502740ejs.778.2022.08.02.05.35.00; Tue, 02 Aug 2022 05:35:24 -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 S236991AbiHBMSv (ORCPT + 99 others); Tue, 2 Aug 2022 08:18:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236867AbiHBMSe (ORCPT ); Tue, 2 Aug 2022 08:18:34 -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 6C2293DBDF; Tue, 2 Aug 2022 05:18:32 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R911e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=24;SR=0;TI=SMTPD_---0VLBjY1U_1659442705; Received: from localhost(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VLBjY1U_1659442705) by smtp.aliyun-inc.com; Tue, 02 Aug 2022 20:18:26 +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, Conor.Dooley@microchip.com 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, yixun.lan@gmail.com, Xianting Tian Subject: [PATCH V5 3/6] riscv: Add modules to virtual kernel memory layout dump Date: Tue, 2 Aug 2022 20:18:15 +0800 Message-Id: <20220802121818.2201268-4-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220802121818.2201268-1-xianting.tian@linux.alibaba.com> References: <20220802121818.2201268-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