Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp364633ybl; Wed, 29 Jan 2020 01:53:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxwVTyf1xVspielirKhpmu0+9C9MfulE9PO9+yaDtE62Iefr/Mavd8+J3UyOgguy8Qvf4BA X-Received: by 2002:aca:b302:: with SMTP id c2mr5639089oif.112.1580291630800; Wed, 29 Jan 2020 01:53:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580291630; cv=none; d=google.com; s=arc-20160816; b=QW7LH4tRRaqPgHOx2vYCi3ZvNUg5GpLGuL35ndsRGCKHnmobip/BomcjhKMWLZ6XBe kirtdTIg1DuiWv1VCaxepndddE2pth0iR/rQ/wgro5M8AU4uxnVYWvsjkIiY8vrD1VR8 IziH1vqoZKFP+uK29JfBThzfuv145FAHjR7UIpNB6fovvjdiGfuantKtgeCDvqwzS8ud edYpzrXAPhNPtYX6IARCXwhNU5aukAKqWHNKFyFKZKEujwlSjObyKMl5bkuCfbM+DKsb qiP07WGfwGl5R1WTz2+ghDqOPrfcA3jNr3TG5urLwJib3WNkezau+MhBCIHY4PirJclb Q8Hg== 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=/0LC5hN+j/3JqWf+tv6EvQHFBgfCucpknONpLTdp5is=; b=pIo65k4DlB0rtbvAdYRZ7+xbS7qGsHVgyWVr5EOQtNklk1BCG21Pav0RLLhGJAD/GZ yDBf/F4+2kASlxr7IdRdNvkhjuAOVz+y0U05/FOqjnhUZYxzCGlMAlBlnKekDs0auSIE 4B+k9wkqGqsDzZosSgLA6bdiS7akT0dBdE0HEcp/QFgQ/07RHpKuZOMWj+8Kg8qDGWJa tFPBpCpwPQWKIIS8a4r8HB3ExHeKlNfS9xzI0DnOvWsHxKDgSGOQbeWor69HCFNC0CwO 2rWnwHAwSVo7/C7NSQU2l8E9nrm/RA4mfONJnwKg+Av8WT01Cv77/gxB3TZM8fTvgFZu j6pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QUK2LESO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u130si799381oif.94.2020.01.29.01.53.38; Wed, 29 Jan 2020 01:53:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QUK2LESO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726284AbgA2Jwo (ORCPT + 99 others); Wed, 29 Jan 2020 04:52:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:50312 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726010AbgA2Jwo (ORCPT ); Wed, 29 Jan 2020 04:52:44 -0500 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 5D37B20708; Wed, 29 Jan 2020 09:52:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580291562; bh=pdUBb1VQFGtjiKTWA/mvQZEtWw7DqY38KlcazbW826Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QUK2LESONcolYBI3s5wOXXcjHaEJ8H1iR0J80W8KANmfFzfT0PW9vRtvDxXC9Cvoi xR6FH51RcnUw429y18Ef34Rnlzqc5c2PVNuo0RvtR2gAPFjja/VVMeCXVNvIrBLEQo r1w+UKXRgGsUfod5GOM7fD45CDRTOq5SZ3Rnwk+Y= Date: Wed, 29 Jan 2020 10:52:40 +0100 From: Greg KH To: Linus Walleij Cc: Benjamin GAIGNARD , "robh@kernel.org" , Loic PALLARDY , "arnd@arndb.de" , "devicetree@vger.kernel.org" , "system-dt@lists.openampproject.org" , "s.hauer@pengutronix.de" , "linux-kernel@vger.kernel.org" , "broonie@kernel.org" , "lkml@metux.net" , "linux-imx@nxp.com" , "kernel@pengutronix.de" , "sudeep.holla@arm.com" , "fabio.estevam@nxp.com" , "stefano.stabellini@xilinx.com" , "shawnguo@kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v2 2/7] bus: Introduce firewall controller framework Message-ID: <20200129095240.GA3852081@kroah.com> References: <20200128153806.7780-1-benjamin.gaignard@st.com> <20200128153806.7780-3-benjamin.gaignard@st.com> <20200128155243.GC3438643@kroah.com> <0dd9dc95-1329-0ad4-d03d-99899ea4f574@st.com> <20200128165712.GA3667596@kroah.com> <62b38576-0e1a-e30e-a954-a8b6a7d8d897@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 29, 2020 at 10:42:39AM +0100, Linus Walleij wrote: > On Tue, Jan 28, 2020 at 9:30 PM Benjamin GAIGNARD > wrote: > > On 1/28/20 5:57 PM, Greg KH wrote: > > > On Tue, Jan 28, 2020 at 04:41:29PM +0000, Benjamin GAIGNARD wrote: > > >> On 1/28/20 4:52 PM, Greg KH wrote: > > > >>> So put this in the bus-specific code that controls the bus that these > > >>> devices live on. Why put it in the driver core when this is only on one > > >>> "bus" (i.e. the catch-all-and-a-bag-of-chips platform bus)? > > > >> It is really similar to what pin controller does, configuring an > > >> hardware block given DT information. > > > > Great, then use that instead :) > > > I think that Linus W. will complain if I do that :) > > So the similarity would be something like the way that pin control > states are configured in the device tree and the pin control > handles are taken before probe in drivers/base/pinctrl.c embedding > a hook into dd.c. > > Not that it in any way controls any hardware even remotely > similar to pin control. Pin control is an electronic thing, > this firewalling is about bus access. > > IIUC this framework wants to discover at kernel boot time > whether certain devices are accessible to it or not by inspecting > the state of the firewalling hardware and then avoid probing > those that are inaccessible. > > It needs the same deep hooks into dd.c to achieve this > I believe. It just needs to be part of the bus logic for the specific bus that this "firewall" is on. Just like we do the same thing for USB or thunderbolt devices. Put this in the bus-specific code please. thanks, greg k-h