Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2944194ybk; Mon, 18 May 2020 11:43:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOn3lmTUXY/4ebc4hyRr1MviCDGh6/uNYZGUSFfJkd7vREBQm/3X0aHNDWLyaMoYPrKWlm X-Received: by 2002:aa7:d706:: with SMTP id t6mr15437732edq.210.1589827408403; Mon, 18 May 2020 11:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589827408; cv=none; d=google.com; s=arc-20160816; b=u65QCikyysGjcch1V7si6ERH/D+vLvUvqtSl/z7Hd1cYGb/fIQHU6PuA9+Y9QqL3SV kzEvUGIaIQvrg/JmsMKZPL/aGJjB+UhhBpIIhCEKNUZYBFCFztAQ/zZ5vscSrIOmJUYW hj0JjCVKCm+KC2hyg8uSn2zL8I46lQ374bWAiVYwO68DnDUTbgkkLwnw6z7qPbwHq3Gb ub1ZYUljqzYCuaUi/1O80eXnIsErWAMtG8fIsunnf9g9bCauwBAG6yBp19q790mjFuTP NA3mlTxCockIoJIzsEyiX6o960EQ3xWHQ8Cx+aN9JW0aupjNpCLaW4apetHaJZN5G3Pq L/kg== 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=BbV/LEIOeouRXOmK+GKN6o5kBO4anE2Qst31rAC/h8s=; b=NqU5Kqas3uo9sFnehmTAEw4kvsWxJ8g8wdH5o9jcK+crzXPz+RFNVrMDgvdeLDHhzD 1lRSqsIz4fq3WhaFXfV91w0vLCV65tmGUwUCuLRqIxlx8o6Lqyu+sA3C3KdQP1dESa5K cO/1QsprOqZvdwFl6ftuttT7HApNVOJIV+HvbBwZ7hoSjsnbUvuDByj40eQmhDc5y6ck DF4Aj80CHI1/ge+bWcxD4uEo7jX6NYj+D0tXrITt3ushyZUWZ6eVsRTF6ICDq4ZnYrUw ZHkZxJC6D/CjqU12UUzzObMVcrQsUoRfT8NhPUcfUtfIOUnJtfKwxbVzp0xuq5yvUxy9 QQrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wpk1EG3w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g19si2971464edf.191.2020.05.18.11.43.04; Mon, 18 May 2020 11:43:28 -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=@linaro.org header.s=google header.b=wpk1EG3w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728650AbgERSlg (ORCPT + 99 others); Mon, 18 May 2020 14:41:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728304AbgERSlg (ORCPT ); Mon, 18 May 2020 14:41:36 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5B25C061A0C for ; Mon, 18 May 2020 11:41:35 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id u35so5242304pgk.6 for ; Mon, 18 May 2020 11:41:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BbV/LEIOeouRXOmK+GKN6o5kBO4anE2Qst31rAC/h8s=; b=wpk1EG3wH9AfuuSAZTKJ+/n0Q9IjxGLodBjTu4ynOAG7Oao8ePt7F7SjaPQi9rYFBW vTCGn5jpPiGn8sP5TKR4fBIzl8X9fsFTOYKFPTb5F3AHf4SMLBDa30kiGOOx9gMf0vy1 aCFLjZgohKiam+RjD+RPJxjAMEV3Movg6BLoGWxnmo9SwsN7aYuVgFyq3fhx2D23ln2S YfMxuQDebgG45W/1YRp1agw9YqdJ9v0+swjux9ma+c/ER6RwDShQ18qxv2t9S/AHctoO lxbR3qnHIIx8VG8ImM0hPjjD/EYgZ8jlOYCuvhtqOm3rlT2aF+H9ymdN8ob3LH3KMKPa NDrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BbV/LEIOeouRXOmK+GKN6o5kBO4anE2Qst31rAC/h8s=; b=lgsx4gLj/wdG/0b0OjT51cD/1u9Wvr5H7pwRTLrRALOVdEmDY0NXCe2jeSRZlssbTx hguODWN7DvbnP7/nQ9qX0SFwohV+5PPm8garidhpbuAAh6mdg+6N6a6DWiezDDgUX9uR mzJMzjNr4+4FFXon03kUHIs27EDSuHFKx4ftj4CWu9KSqzy0eq3EX1FDuoBmQXO9uBPx JeJ4fH71LT014G0cQeUk460XnLLLVqVRGJgLi7w1fqtU8Rq+DNG15UnYVQbxJHNy+DaR Mwz6ROAOTZ9LjBYjKrycsfdt2lvOMaUXccvjlmPb0pkqxyomU14J9CoMl0xzBe7PMJJ/ JXTw== X-Gm-Message-State: AOAM533A/aGeAftSxeqNjqh2FsvNE0EqJoD7KCca6zV9pRgEMdejYAVo UJI+QhWCOr1sJWevlZiHMVutgw== X-Received: by 2002:a63:f64d:: with SMTP id u13mr15918251pgj.151.1589827294403; Mon, 18 May 2020 11:41:34 -0700 (PDT) Received: from builder.lan (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id x62sm9251663pfc.46.2020.05.18.11.41.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 11:41:33 -0700 (PDT) Date: Mon, 18 May 2020 11:40:10 -0700 From: Bjorn Andersson To: Greg Kroah-Hartman Cc: Georgi Djakov , 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: <20200518184010.GF2165@builder.lan> References: <66c3d470-48e2-619a-dd95-6064a85161e0@linaro.org> <20200515071152.GA1274556@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200515071152.GA1274556@kroah.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 15 May 00:11 PDT 2020, Greg Kroah-Hartman wrote: > 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. > It most certainly does. With INTERCONNECT as a bool we can handle its absence with stub functions - like every other framework does. But as a tristate then every driver with a call to the interconnect api needs an entry in Kconfig to ensure the client driver must be a module if the interconnect framework is. Regards, Bjorn