Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp362518imw; Thu, 14 Jul 2022 02:47:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uhpuhEb8GThcSLgtKJ3Oyxd6Lks7t0X+xqH0356E2saC+YH7v7x3ZAJrU/r66pGqFn6QD4 X-Received: by 2002:a05:6a00:15c5:b0:52a:f58a:86fb with SMTP id o5-20020a056a0015c500b0052af58a86fbmr7599294pfu.23.1657792059010; Thu, 14 Jul 2022 02:47:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657792059; cv=none; d=google.com; s=arc-20160816; b=BnBAIrm4Q4u0dn5zIRN+prcdmVwWkqpYc2+/DrFhxzmtCJyhQwZWWU+DaN/phBuhqF irOf6sWos5jRrBBhMZUrIMAvh2Swqc45VTl6NrxecieSCDNoxJgw/wxB+GqT+4Ge6Fld i7hsIOeeRpShvmozpmu4dRWuNNWLOpzjOWSULqLGpxI8RZct4eQz7D8pcNdb24M8s7Lv +tCQbBnxaT3wNt+aRi+4nZmcmJJQ1ZSc91ck8vCiagrOd/mMhbeGf8bAla5GMyWVzCvN hS0ZXa1ozGHMLTMkozlbNamifiA3jWQj42+ReDiXaaHj7LxOxcEsiElvKHQ6iSyiMDq3 T29Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=GBWOXTl7GvHQuqC67HnrBTDL+YuvInOuoi3stlkK5aU=; b=Q9FN8ZFKeof3qdXV7Nj8YBX5MwKRq07kKphcaVAhHK6iNSnDtaFLE5QuUbWS8D0p8L bG7Fop/K+Thg2His1kcOmB3+MUp6EyQjwacCQAfYjq0DM/+vwca3xd+notuEI9dbX3d9 sa9ZtqZpiJpwxGT3eE3jSWGMUAyMUuv1S4ttx5LA+fHDtK2h0XSTPwkNfBTOH91FZ1IB UvJ0QqY9hIa/EMMGU5nAQrPkJ6xRg9wqKCk9oegS1Ly6c3s9bP89Rgfj++PuB9vO72su eJd0qvGbTp5z1qT28Oc3T9ACkbxX24WGcEaRlfyCQRUQZDJYkul/0N/cgvMofwfZXrHM hpXA== 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 m10-20020a170902db0a00b0016360b6cec1si1706912plx.230.2022.07.14.02.47.27; Thu, 14 Jul 2022 02:47:39 -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 S237641AbiGNJV3 (ORCPT + 99 others); Thu, 14 Jul 2022 05:21:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237621AbiGNJVQ (ORCPT ); Thu, 14 Jul 2022 05:21:16 -0400 Received: from out199-2.us.a.mail.aliyun.com (out199-2.us.a.mail.aliyun.com [47.90.199.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E09243328 for ; Thu, 14 Jul 2022 02:18:06 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R561e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0VJIm16b_1657790247; Received: from B-LB6YLVDL-0141.local(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VJIm16b_1657790247) by smtp.aliyun-inc.com; Thu, 14 Jul 2022 17:17:29 +0800 Subject: Re: [PATCH V2 2/2] riscv: Add modules to virtual kernel memory layout dump To: Arnd Bergmann Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Guo Ren , Anup Patel , Nick Kossifidis , Mike Rapoport , Heiko Stuebner , linux-riscv , Linux Kernel Mailing List , huanyi.xj@alibaba-inc.com References: <20220714025901.359695-1-xianting.tian@linux.alibaba.com> <20220714025901.359695-3-xianting.tian@linux.alibaba.com> From: Xianting Tian Message-ID: Date: Thu, 14 Jul 2022 17:17:26 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,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 在 2022/7/14 下午4:24, Arnd Bergmann 写道: > On Thu, Jul 14, 2022 at 4:59 AM Xianting Tian > wrote: >> As MODULES is only defined for CONFIG_64BIT, so we dump it when >> CONFIG_64BIT. > Doesn't this cause a compile-time error on 32-bit? I tested, rv32 compile is OK. > >> (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); > The IS_ENABLED() check prevents the line from getting executed, but > unlike an #ifdef it still relies on it to be parsable. Thanks, I will use #ifdef instead of IS_ENABLED > > Arnd