Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp108526imw; Wed, 13 Jul 2022 20:22:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tj/hhX8I57dSgrxdBMSvF64vpEYyoaocFx2EBNT1Z1dB5BjKPit8E2PKShYwSbFScpMtad X-Received: by 2002:a63:884:0:b0:412:9c83:47b1 with SMTP id 126-20020a630884000000b004129c8347b1mr5568018pgi.387.1657768977482; Wed, 13 Jul 2022 20:22:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657768977; cv=none; d=google.com; s=arc-20160816; b=TxBc00zfMExiwfjceKpvWLumy6rfTffKfrS/UUoTRHIwYavL3iDF0wAxKX/x1X6j7e SeQDjScXvHHz8pyvITkhbm0cO3yxnMznF5MKvj8GBis+NOeWYMIBR47+75VnX/jDmQtv 3VLwv86p24P4CGTlZc1baqidOb0+EMSai2nSYzUW/4Rgw4gJtIioYbKF8pHQayGz+Wdd gRE1+l6JKonaIzsaLTX58eW5Vw2QA/HLcrZUc5zmap1nXviRiiKTtM0aKb0VZHbrz0Gy g6+8B2T+wD62495CipB3no50Py7iSy6WGOPbMheW62bkM6AsPxz7NTK6ZzmpEFiEbbm7 dB8g== 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=AOAvL6/EGv8KLY41r7rjJN2mEnX+Dul3vrrbp91mPhQ=; b=j3fXs2uIZI7elopIPUltOT6d1AlF09mprkuRrjxeBZHehY2QpiBuA8Kb6nTUD8tnuU /6FTOP03pSffET22iF+JV9bAXZ72i0U6uwdB3eGRlwB22IvWrYvZIpKCkHD/RgXJ3fom YzCnEQPEZ0LqN/Eem6IVswD8+upk2tPnaq+ovGE2X2mkZMiwTGQvdLa4inStTJVUaTZ0 tXCAQxQhaXFnJWcq5ypN4vXynhri9c9P4bRUbX74HCLEgY7fDR9f1NqdoAx1Uw2MmZQf UaqDC4kcAE7rNiZ7PK77meSnDU7Yt/J3Ya+QeCyL/SROuwuppZmGc/ho3J5ZgxumNDdg eqCg== 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 p2-20020a170902bd0200b0016c39c15fb9si481991pls.201.2022.07.13.20.22.45; Wed, 13 Jul 2022 20:22:57 -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 S232086AbiGNC7Q (ORCPT + 99 others); Wed, 13 Jul 2022 22:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232137AbiGNC7L (ORCPT ); Wed, 13 Jul 2022 22:59:11 -0400 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1E0719C03 for ; Wed, 13 Jul 2022 19:59:10 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R371e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0VJH72kJ_1657767545; Received: from localhost(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VJH72kJ_1657767545) by smtp.aliyun-inc.com; Thu, 14 Jul 2022 10:59:06 +0800 From: Xianting Tian To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, alexandre.ghiti@canonical.com, guoren@kernel.org, anup@brainfault.org, mick@ics.forth.gr, rppt@kernel.org, heiko@sntech.de Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, huanyi.xj@alibaba-inc.com, Xianting Tian Subject: [PATCH V2 2/2] riscv: Add modules to virtual kernel memory layout dump Date: Thu, 14 Jul 2022 10:59:01 +0800 Message-Id: <20220714025901.359695-3-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220714025901.359695-1-xianting.tian@linux.alibaba.com> References: <20220714025901.359695-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. eg, MODULES_VADDR - MODULES_END 0xffffffff01133000 - 0xffffffff80000000 Signed-off-by: Xianting Tian --- arch/riscv/mm/init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index d466ec670e1f..bbc9431e9042 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -135,6 +135,9 @@ static void __init print_vm_layout(void) (unsigned long)VMEMMAP_END); print_ml("vmalloc", (unsigned long)VMALLOC_START, (unsigned long)VMALLOC_END); + if (IS_ENABLED(CONFIG_64BIT)) + print_ml("modules", (unsigned long)MODULES_VADDR, + (unsigned long)MODULES_END); print_ml("lowmem", (unsigned long)PAGE_OFFSET, (unsigned long)high_memory); if (IS_ENABLED(CONFIG_64BIT)) { -- 2.17.1