Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp285324ybk; Fri, 15 May 2020 00:13:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzv5ZIFKdw7RZQy6F1hHkJPTJ/QpiI9l0yOXMNVeT+NvR+gZ+lbRwNsDZb/0qk6Cd0LDMEs X-Received: by 2002:a17:906:90c1:: with SMTP id v1mr1415867ejw.322.1589526822708; Fri, 15 May 2020 00:13:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589526822; cv=none; d=google.com; s=arc-20160816; b=iGtMGQzro0SwsMJ1zj/80xXDkRs7UPgMJTbM2jLNqL3zLGdKV9IOvnvjyOANlAl7Zw CUBkst9iE37wo0pJ8YAOFwttu68xHq+rwXejhrGgvWn/aDKlo30Afh0pzebiQzh+0FC/ rqycmo33N+gO34WsqkLoktMGwiZM8d9LDLYKomzGdzQxzyW7eg+Y4G3wso0xGWYUnIqi y//NlQAkVjCcXK7cT/PBcau9OyZ32jv6e8PSas3zaoixsi2DhrH6IMt/HgM+oKiSiZBh NNCqA/TaDeHDk5eG9b99Wd2H+ToNoj8fOuSbAt/qZmf4SzZ0qzJexdwr8VcJrnzsboeS ji0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=W74dd+uW2ZGNjedkdhK/qy37gmGuoylQpDZ/IPBQiVc=; b=AXGHKCGkPPwSzS2u+IGl6dVvLC7d/GErE+dix36wCNMl4orMsF7Ejcu52JHv/DcQAj qqSZeauw+la+KcUoT8dbL9gm0gMauk1O8mY9TB68QU9XPvrcMKBaeQmmj88ev6dIC3aG NbEthZzjrbpGi1bDJuPX0HUFLN2TR2qWzq6VpRojg0SEEhP9WQ42+0gPFG9oLLWbVPam e4lXC0AWSRZBuBssU/XFC4HS1/bYnV6gSHqY4jkCH8Q4ycws2n/ICI21jLlLl/B6L0A7 Lazp8AM8Ang7n+/KIlCAP+9xKLwNVCkjm12DLK+OfnIzMzF9BRoqu2RugOR+Ku7bx4sm dxbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gYnEKRSF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m30si747097edb.193.2020.05.15.00.13.18; Fri, 15 May 2020 00:13:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gYnEKRSF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbgEOHL4 (ORCPT + 99 others); Fri, 15 May 2020 03:11:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:42570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbgEOHL4 (ORCPT ); Fri, 15 May 2020 03:11:56 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B832D206F1; Fri, 15 May 2020 07:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589526715; bh=bO56gu0bStJa4vn7t8SHLVGqZOgUKV4d9WF3KRFluMk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gYnEKRSFxTIOOTXSSfz64gxCP9PnNitGXe0AzDZ3nhC+xisp2VmVbc0YTmdcBSE+a WkXOdmm6R6cdIWWcu3D2RsDqeLfO/2oUeFrgZCeogzvSgzXqqw2yTF6Vg3ZcNh7UYk V59vecakrN237UppeFjGXvdW+U40njZH1mLER2iY= Date: Fri, 15 May 2020 09:11:52 +0200 From: Greg Kroah-Hartman To: Georgi Djakov Cc: Bjorn Andersson , Viresh Kumar , Vincent Guittot , Linux PM list , lkml , Arnd Bergmann , Matthias Kaehlcke Subject: Re: [PATCH] interconnect: Disallow interconnect core to be built as a module Message-ID: <20200515071152.GA1274556@kroah.com> References: <66c3d470-48e2-619a-dd95-6064a85161e0@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <66c3d470-48e2-619a-dd95-6064a85161e0@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 15, 2020 at 07:48:47AM +0300, Georgi Djakov wrote: > On 9/12/19 19:33, Bjorn Andersson wrote: > > On Thu, Aug 29, 2019 at 1:07 AM Viresh Kumar wrote: > >> > >> Building individual drivers as modules is fine but allowing a core > >> framework to be built as a module makes it really complex and should be > >> avoided. > >> > >> Whatever uses the interconnect core APIs must also be built as a module > >> if interconnect core is built as module, else we will see compilation > >> failures. > >> > >> If another core framework (like cpufreq, clk, etc), that can't be built > >> as module, needs to use interconnect APIs then we will start seeing > >> compilation failures with allmodconfig configurations as the symbols > >> (like of_icc_get()) used in other frameworks will not be available in > >> the built-in image. > >> > >> Disallow the interconnect core to be built as a module to avoid all > >> these issues. > > Hi Greg, > > We had a discussion [1] a few months back about frameworks being built as > modules. IIUC, you initially expressed some doubts about this patch, so i > wanted to check with you again on this. > > While i think that the possibility for a framework core to be a module is a > nice feature, and we should try to be as modular as possible, it seems that > handling dependencies between the different core frameworks becomes difficult > when one of them is tristate. > > This of course affects the drivers which use it (every client should express > the dependency in Kconfig as a "depends on framework || !framework"), in order > to avoid build failures in the case when framework=m and client=y. However, this > is not a big issue. > > But it gets more complex when another framework2 becomes a client of the modular > framework and especially when framework2 is "select"-ed in Kconfig by it's > users. When selects are used in Kconfig, it forces the option, without ever > visiting the dependencies. I am not sure what we should do in this case, maybe > we can continue and sprinkle more "depends on framework || !framework" also for > every single user which selects framework2.. But i believe that this is very > inconvenient. > > Well, the above is not impossible, but other frameworks (regulator, clk, reset, > pinctrl, etc.) are solving this problem by just being bool, instead of tristate. > This makes life much easier for everyone. So i am wondering if it wouldn't be > more appropriate to use the same approach here too? Ok, if it makes things easier, perhaps this is the best way to handle it. thanks, greg k-h