Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp270925rwb; Thu, 11 Aug 2022 00:49:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR7iYmImDMIirjSHvNtmO/1Yd8emaEiU72GXY0yzeQm6yAXIWr3FKjXq6c1TXvU7UjBR98Ut X-Received: by 2002:a17:907:7f11:b0:730:6f6f:e444 with SMTP id qf17-20020a1709077f1100b007306f6fe444mr22215125ejc.657.1660204157008; Thu, 11 Aug 2022 00:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660204157; cv=none; d=google.com; s=arc-20160816; b=BuSFouLMmM17O7G0zJeH2QQl35FS4e9nu4Qt0jqYKffkLkIjTCxhFp8ypFI6bwabek fR8GRyYNodIEpq8O2H/8Y1dOyjMczlzR4m8iuV+PfpQ2tfL62I9aYiVR349A165Bd9k5 ez2PUu1lDbKK78kciZV3GH1sszrNl7fPbMjg0RTLBumPhQEwnP30IzjY1Zgg4pOBKtwl DgaUNpl0WiPX8/05Xi4bvryV58SuISvCRowr/8jXZP6F++cVRlTwnTLAn+VnCPvnffbj ZaeJA8NARcOUWJEkJdCVsll0ujy4FSgZC+uE5mx90Skq7uTSjBwLE4pxmJdu2rMaVp25 a7hQ== 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=45EDLSsaZCRRpK//J5lG7KFTuxnICHDYD0oZ7npFuDM=; b=gaTDIVjlwupLrxJoh6brbKdoj1NHnqrv5nB9CjXXWs0JaKgRkHjUD2ow9RnTzkzW1n 1Yx3xkGpohv0qpJLbzmjKWXENBdnHwf8ttig+OOw0mSgP+Mwle99MbrOLzohTSYUfuEQ V46TaarbDh4Vzj3aE7QKnDQJ6soR0y0fSQHL1yOq0yCa8FQmYw7/Cw+J42P2T/kkW6i8 1czr7ct+WWvQhtT7jzk0MVQDe/M7Dtpb+J9Gzi4JNuDLlUXo4sbIu/3ecOmP9hmUbVod 33geYbe9rF1MSA3yvQUkpHAr5dsHA9dRm+hGLITAAzrIYluG7Z3QFtSgb3u/tz9K3ahe Jr8Q== 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 ho7-20020a1709070e8700b0072b2377bab0si6971034ejc.649.2022.08.11.00.48.51; Thu, 11 Aug 2022 00:49:16 -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 S234457AbiHKHmS (ORCPT + 99 others); Thu, 11 Aug 2022 03:42:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234431AbiHKHmH (ORCPT ); Thu, 11 Aug 2022 03:42:07 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D77691D25; Thu, 11 Aug 2022 00:42:05 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R951e4;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=23;SR=0;TI=SMTPD_---0VLyDZ0M_1660203718; Received: from localhost(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VLyDZ0M_1660203718) by smtp.aliyun-inc.com; Thu, 11 Aug 2022 15:41:59 +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, heinrich.schuchardt@canonical.com, k-hagio-ab@nec.com, hschauhan@nulltrace.org, yixun.lan@gmail.com, Xianting Tian Subject: [PATCH V6 4/6] RISC-V: Add modules to virtual kernel memory layout dump Date: Thu, 11 Aug 2022 15:41:48 +0800 Message-Id: <20220811074150.3020189-5-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220811074150.3020189-1-xianting.tian@linux.alibaba.com> References: <20220811074150.3020189-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 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 a88b7dc31a68..b56a0a75533f 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