Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp551891imn; Tue, 26 Jul 2022 03:17:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u/q7q6xF5YlmN6NU205YuldFJeGCfcObdEKRgZspOMnajtgFqDB1pDzJXLumqrNinUl+Xx X-Received: by 2002:a17:907:1361:b0:72b:3554:4f7 with SMTP id yo1-20020a170907136100b0072b355404f7mr13663102ejb.420.1658830646383; Tue, 26 Jul 2022 03:17:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658830646; cv=none; d=google.com; s=arc-20160816; b=pel0B3y7pflZZjswnxATmDvmSzzxjTUOgbPWIuymkXhFoOr9sPkYrnpwwCyTIQRZ28 2wsAegXGGrav2WzyWCr3lu06/tuajlseUvjFyrAfnbdE2GM2gOo+obQrQ/CogApFzE7g 7S8XtdM0xj0VGMItgzVjzzfpOAC+0pxA+i6qnU0bIs9avnluBoiIhRLxaRVXurIy0qI8 mBzAWLhvlleBM1CXyCafJItDZepiLijgbPm2DZclmHi53OsI/hQyvSIsOobsQsBI51JP qLKFgAcTEe5P+DJGXplr7MfWO05Um+gos0SQv2G7cv7+ZgJJmWbraYI5tLwO1zsRQkpV kLOA== 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=XNaR12yMYorN9WKC2+uDfIfGeiXddCZcfxF3b/OKdkXUONiZxHUW5ESrjBFYtr6PBg GPRfaqCiwdnT5xRFHRDIO0+KzMF+LO0zDmqQqXN6MHaTY6vQEk0P5cum3ySXxHHgOHvS qLrXS9BJIb0l/jtXJr8PyDs8nP+f4B2bcz5r67TAxVugfDZKDF0xz2ccGFkamFsRW5pR nMaa2YSbMXl2+nMr4Oim1TAPeMvieHeuKaKOl6yLNbQZktvITRn16fsT+CbICJ9lnFdK Sd7DWbpX93aQ9Y/zgyF6MfhKYsZ7DDGVOHBNa/LvQGdEUuwOE7p/hxyIn/6CuoUscHPS P/hg== 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 sa20-20020a1709076d1400b0072f2f07ca4asi17582576ejc.585.2022.07.26.03.17.01; Tue, 26 Jul 2022 03:17:26 -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 S238290AbiGZJhw (ORCPT + 99 others); Tue, 26 Jul 2022 05:37:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238114AbiGZJho (ORCPT ); Tue, 26 Jul 2022 05:37:44 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF6C62E69A; Tue, 26 Jul 2022 02:37:43 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;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_---0VKV.3QI_1658828255; Received: from localhost(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VKV.3QI_1658828255) by smtp.aliyun-inc.com; Tue, 26 Jul 2022 17:37:36 +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: [PATCH V4 3/5] riscv: Add modules to virtual kernel memory layout dump Date: Tue, 26 Jul 2022 17:37:27 +0800 Message-Id: <20220726093729.1231867-4-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220726093729.1231867-1-xianting.tian@linux.alibaba.com> References: <20220726093729.1231867-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,RCVD_IN_MSPIKE_H2, 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