From patchwork Fri Jul 7 13:58:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 13304925 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00521C001B0 for ; Fri, 7 Jul 2023 14:03:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 935DA8E0002; Fri, 7 Jul 2023 10:03:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8E5A78D0001; Fri, 7 Jul 2023 10:03:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 786B68E0002; Fri, 7 Jul 2023 10:03:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 66A1F8D0001 for ; Fri, 7 Jul 2023 10:03:20 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 32823A0DBB for ; Fri, 7 Jul 2023 14:03:20 +0000 (UTC) X-FDA: 80984982960.24.77B9A87 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf22.hostedemail.com (Postfix) with ESMTP id C62CEC021B for ; Fri, 7 Jul 2023 14:01:10 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=i+RzuGw+; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf22.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688738473; h=from:from:sender: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:dkim-signature; bh=hsDLZOIaMsdutOawC63k62k7hxKuoez0tGZig9GdB48=; b=mbaUnPQGIO7QNbTBghSv9/AQIfPa2pqfBwYyQE1gDj9V1FkYg+63eG0cS4HE1UkFFYggae O2i9ZoaXeWb8hde0JEQOmSGYrYyGMYcNLWmARQ9V35UYGTbH/CA++QjTdveMG3CxodFqbF tfDiMjuqs2Q5EOxI6RE602Ry6CXxhus= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=i+RzuGw+; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf22.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688738473; a=rsa-sha256; cv=none; b=voSw6EKD76YmykhmYMYDfspss+Rn2qEK4Co6lrQjq9AsTthoPzv2/5g7kQf7PSXMq+VJw2 02HUsEFyGnI1MudTEl41Ljv6TC8F58TRZSMYWISuBCgABBiPnQhwdltA+1vfeFcx7SNZwF 0/8Sq2lt51V1Z5agw3SwV+e8Khxc2EU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688738469; 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=i+RzuGw+SvMpOQnYT6xdWgaJnsyTLNI3wNSGmmrYdbUN0c1YnJmZslYckylYBCgTVtBaRz hGkN/xr6yQz4cb/fybJ4wac1FzJ/wlKNmP9BG4crXH+H/BahMNukDdO7J2amD3Wp5thu+s M3x8e3lZlY/8ui5QK+6U3Rvu070/vnc= 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 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: C62CEC021B X-Stat-Signature: 1freyc63j893kim91rbjbem3uouug7tg X-HE-Tag: 1688738470-554166 X-HE-Meta: U2FsdGVkX19jvlzw9+BgyA1p8qj7Wh4eegBvjR0zUOFUx1BAGO7tCF7xvdbqMLMToha4KuafqjLEJ5PT6k2QhzNCFFNh7pGfhmSqyOU2k4CElb1odRuzPqX/wYNklT+yvK7vdiSWtz5hKO7/EPNgXDRoGUjnvVsEeAWNSIG3fqbHXIWjhx1TdRtTY8RphG70W316gdx3NL8RncT0+TZYrPODAsMsTqQx3iSfiX87zJJLD2AfTcbiXMi81BI7VMJQxH0I6WSJ76umxhEDd4T612nXOJmSBAxyKQQ1KkLPaL0eAf0eyyqR292bVNRVl/HrsBT9V8I3tkkw2PcTJRv/iY21TmRM1KlnLAMDWovPBjIDjIf3H6438RBf0EirdnYvr/qj3nXpBY9t9ORQ111Arh8C4uVRKkAbX4dNGwWkwbBnO3fD9ck+5ZoM8k2kw3yyHxaXr0obbdh9AJ8beyvutpJRyq0H88jXmrQaF+L2j7dCclnFPTmshLXtDqxqmxe+StaZha/4ByGdFQt6WLa+CtgJmVIFDLWafZ/12r2WVvaMu61aFJio0BCq3VU1u2ZAdK9o2JyUiXgtE2/bObREiFtxOTaMVYlZnm4hyrYUX9Rt1xmzlJilUy189LuacEV44JBJF8cGC3+3UrOy0djE6yUwhg4o3MBa3lYW3FAoNYbXErgggc26hEJd1HJkO6KpZI3C36CzP867V2uloureap0SNeIEEABxDExDV6KM4gDHwNGIgIQxdZGOpCUuNiYwMaEkaw5pe5kgHt1KlxTo8nogVxGCTglKoBc/6EOqXHhg+nyz13RfLq0MxR8FVGDr8FmmkKkafWiH1hkEHP1K8NPwjxmweHuX2OvGekgHwZNlf6rCqipY9a/M5JJzE2IscgecTW64nCOdAUhFnbyey3xRKhAkhES/ZxS8DB2Sp2z327rLHjb+SJi3XEykqTkAHLfRWbzGMCDufKKm6ub VwotJ/p1 2DfcD+1ydKuGYCTZuUDuRNmc5b1qFddfeY+IMTCLC7ls/1RDfj2FGRigmrI+rg5JyeA7j1zyLlfx00qFrMo+fyHq7NF8Ebk8g77J2eXETQjguX6++dbWCscSo4toQSRTiYN8BYeWGTjsXeMChOW8aPyBfYW1NtW5WQ3rGhAO2voJghcAGuTmFWoIm1wBIA804q9iVwho3yinEYfb20YYvN4nHhJkjmhv0aA2lTEeiYwo5XkDt4/YjlumEeL4locb4FyppUADGyiNey1XWdbAvCcf/J8vTNtGUdp/3Rc13MNnFfY/Q0tveVye6VMn/6yeL88HZuUv/CjxDCHYNFKqnqiaaBNRIh1O/5bcOHJqFrAUEn3crfJ9lg86Q2IdyYMWxCyJBMLBlHe6XUKo= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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