Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2136927imi; Sun, 24 Jul 2022 08:35:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tqQFLKsFJGc5CFQalq/TDXv5WjhCKDR1mgRyBr24P41yRQP8vyEzzCV3cx9xonSzVpEUng X-Received: by 2002:a63:5364:0:b0:41a:529b:c1af with SMTP id t36-20020a635364000000b0041a529bc1afmr8042811pgl.98.1658676916185; Sun, 24 Jul 2022 08:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658676916; cv=none; d=google.com; s=arc-20160816; b=S5t7+OAfhkW3cQdQYR/aGrk3+SAS9rJO/BWxGdwBO145cu2WurYkz6v8PYHTO/TgGH 1zQ1O6udh8HbgaHIkI7VqKJRYetsYx/B4oTA0Fr5kEyUqv8u6Sv6vzDWivLQeVO2E57j K+fVl7T1w1wNYg3SRtfvlvMfoPmRPd5CJTvah29L9hqNMMrQjmHEe0kTQ0hLMgDybreD SbzDkchMY0BN7QNozPi8C64FZ0/7yolkX3Fq5ykcFgj99/XucF9g3Cx2zZ8OpqkvSpqh tyltfEFG2uv19oCK1gFnU2izYrVxlU4tzf2wQ2C1KClKCafyOqFZvUE26/6+Xb2OygxG /XgQ== 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=OVRQw1U5/CuzP11au1WKDPgU/IL8RxyHwGUSuRZkmFxPC2yl+YJWxeAZAcaUZkwb0x 2D21FgQuHY18N8cte7T1owqNGln6kUoo09NyS+0r3xwM43tYzcyUyw8hSMCiCAP6wCTD ysf3B0oig2Gi0Mp+2udmVWNGb6vrWOm7WjLXMb0sXZy4xmaXsGOaXO4GDjX9PXxfr7Tf LEiX24J5sj34tWtEvyhY25qum/GqT4K7GZ8i/DMayI0G3A1B979yUofkFPZv8/WGE7Y3 vqMq45Lsk+yCEgh1HhDlYL15j4PONe4hb6aN/569rEGJiQD2noqOZmGSM3rWssPBjKJZ sYaQ== 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 e11-20020a17090a4a0b00b001f02e5a1428si10238350pjh.105.2022.07.24.08.34.59; Sun, 24 Jul 2022 08:35: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 S233957AbiGXPX0 (ORCPT + 99 others); Sun, 24 Jul 2022 11:23:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233428AbiGXPXT (ORCPT ); Sun, 24 Jul 2022 11:23:19 -0400 Received: from out30-54.freemail.mail.aliyun.com (out30-54.freemail.mail.aliyun.com [115.124.30.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BCB811C08 for ; Sun, 24 Jul 2022 08:23:18 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R971e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0VKDZF39_1658676191; Received: from localhost(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VKDZF39_1658676191) by smtp.aliyun-inc.com; Sun, 24 Jul 2022 23:23:12 +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 V2 3/5] riscv: Add modules to virtual kernel memory layout dump Date: Sun, 24 Jul 2022 23:23:03 +0800 Message-Id: <20220724152305.1037212-4-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220724152305.1037212-1-xianting.tian@linux.alibaba.com> References: <20220724152305.1037212-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