Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31986552rwd; Fri, 7 Jul 2023 07:12:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlETNFVwqTENoaiVs3p9sBTEnTWgrBxjS0s1JocA/qmzrsIAjjYNp7LzS254Ud0BpgTMx+U/ X-Received: by 2002:a17:902:d4c3:b0:1b8:1c9e:4453 with SMTP id o3-20020a170902d4c300b001b81c9e4453mr5180533plg.4.1688739177201; Fri, 07 Jul 2023 07:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688739177; cv=none; d=google.com; s=arc-20160816; b=st9cpcPYzs69AMtFd5oYIeLHGrcgYX0+DjwaLx/X1OWqs/Q8Eo23lLmIX8WF11Sg2J JW+C7Tbry86cLmTfwXBRrAb1utUJF+3k+MYH7+CcT+RWw1/qDgp82mO9aUhHq6oP+76T WMii/xC+dHnLjt5PrO3msB9uzZa9BuCjkvOC0AQW2IyAGdKFQxdvBEUXFgVkMe/aiyxg 1cpW7njeZdISKNVY1n57zBYltumYUOgv9l1JEoZqx7RZmpFCfUdslgDq2FThBVzN2a+4 m3yyAOWVqwbXVZu2WMOCZH5HcyeWFi40yRt1ad9UQyxmF6n3whQd1sT6vO4X82ux/3f+ vMYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hsDLZOIaMsdutOawC63k62k7hxKuoez0tGZig9GdB48=; fh=s/fXgexTPcP4+XqUU2/mFyLxLzfaGbIRMeOdno3aQeY=; b=bfPMDjn99zMpHx5t3O3a5PO1s0liU61+et+T+cv8wImq/fWkcLz0a/VhD8xfZKhJum z0sBfmy9CKSmzt6Dw3Kt/eawaGTyY9Tz50KoHRyAxHwRL/ogq6q8udh6q39rmeeL7RQi m7VBwnB96UFgqST5knSIUbbB4CY5YB3d5KZpneoIxbzkkzvWRIydgLewmczSQIkcHkds JziCMq0M07mPWanWyKfnNs6Z+HWIq6rwWh4XKlZO7dRkLvzriRJKSqf/Ru+TsKQcDgf5 aq4BejCGoMTvxjdIIOnR569ShGC2zEBL3TfpPg0ByzbDOZXDOSeGrvd2q7Rm4Tv6ryp5 zK2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ORn4zhRb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id li11-20020a170903294b00b001b890417a0bsi3412534plb.410.2023.07.07.07.12.44; Fri, 07 Jul 2023 07:12: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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ORn4zhRb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232796AbjGGOCY (ORCPT + 99 others); Fri, 7 Jul 2023 10:02:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232903AbjGGOCD (ORCPT ); Fri, 7 Jul 2023 10:02:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91227210C for ; Fri, 7 Jul 2023 07:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688738471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hsDLZOIaMsdutOawC63k62k7hxKuoez0tGZig9GdB48=; b=ORn4zhRb0jLa2A93NW/bhKRlAEMkfvB5lgoCFV8EAdqSIUp+OEYIs2I4zjhmVZGU80eTKi 5XKK3KDuQ32t3aG9/pHElhRILVziC1GgKFHXKgxyhaLrtKHzATj159cIvBsnqNWZu+IX9s OvBDyvdf1j9HOMTMLmhMO8wAPAx2cDc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-621-_yX0V8PePHiNzeIA8hA2sA-1; Fri, 07 Jul 2023 10:01:05 -0400 X-MC-Unique: _yX0V8PePHiNzeIA8hA2sA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4B612100812B; Fri, 7 Jul 2023 14:01:04 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-39.pek2.redhat.com [10.72.12.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id A18962166B25; Fri, 7 Jul 2023 14:00:51 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org, linux-mm@kvack.org, schnelle@linux.ibm.com, vkoul@kernel.org, eli.billauer@gmail.com, arnd@arndb.de, gregkh@linuxfoundation.org, derek.kiernan@amd.com, dragan.cvetic@amd.com, linux@dominikbrodowski.net, Jonathan.Cameron@huawei.com, linus.walleij@linaro.org, tsbogend@alpha.franken.de, joyce.ooi@intel.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, tglx@linutronix.de, maz@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, frowand.list@gmail.com, Baoquan He , kernel test robot , devicetree@vger.kernel.org Subject: [PATCH 8/8] of: make OF_EARLY_FLATTREE depend on HAS_IOMEM Date: Fri, 7 Jul 2023 21:58:52 +0800 Message-Id: <20230707135852.24292-9-bhe@redhat.com> In-Reply-To: <20230707135852.24292-1-bhe@redhat.com> References: <20230707135852.24292-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On s390 systems (aka mainframes), it has classic channel devices for networking and permanent storage that are currently even more common than PCI devices. Hence it could have a fully functional s390 kernel with CONFIG_PCI=n, then the relevant iomem mapping functions [including ioremap(), devm_ioremap(), etc.] are not available. In LKP error report at below on s390: ------ ld: kernel/dma/coherent.o: in function `dma_init_coherent_memory': coherent.c:(.text+0x102): undefined reference to `memremap' ld: coherent.c:(.text+0x226): undefined reference to `memunmap' ld: kernel/dma/coherent.o: in function `dma_declare_coherent_memory': coherent.c:(.text+0x8b8): undefined reference to `memunmap' ld: kernel/dma/coherent.o: in function `dma_release_coherent_memory': coherent.c:(.text+0x9aa): undefined reference to `memunmap' ------ In the config file, several Kconfig options are: ------ '# CONFIG_PCI is not set' CONFIG_OF_EARLY_FLATTREE=y CONFIG_DMA_DECLARE_COHERENT=y ------ So, enabling OF_EARLY_FLATTREE will select DMA_DECLARE_COHERENT and cause above building errors even though they are not needed because CONFIG_PCI is disabled. Here let OF_EARLY_FLATTREE depend on HAS_IOMEM so that it won't be built to cause compiling error if PCI is unset. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/ Signed-off-by: Baoquan He Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org --- drivers/of/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index e40f10bf2ba4..da9826accb1b 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -55,7 +55,7 @@ config OF_FLATTREE config OF_EARLY_FLATTREE bool - select DMA_DECLARE_COHERENT if HAS_DMA + select DMA_DECLARE_COHERENT if HAS_DMA && HAS_IOMEM select OF_FLATTREE config OF_PROMTREE -- 2.34.1