From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hiroshi Doyu Subject: Re: [PATCHv3 01/19] [HACK] of: dev_node has struct device pointer Date: Fri, 25 Oct 2013 13:08:34 +0200 Message-ID: <20131025.140834.1484720286118607126.hdoyu@nvidia.com> References: <20131025091104.GG19622@ulmo.nvidia.com><20131025.124905.1154427805530939055.hdoyu@nvidia.com><20131025104937.GA25080@ulmo.nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20131025104937.GA25080-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , "thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Stephen Warren , "rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org" , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: devicetree@vger.kernel.org Thierry Reding wrote @ Fri, 25 Oct 2013 12:49:38 +0200: > The way notifiers work is that they run completely hidden from whatever > triggers them. For instance you register the IOMMU bus notifier from the > IOMMU driver (by calling bus_set_iommu()). That registers a function to > be called when some event happens on that bus. When a device's driver is > probed successfully, the driver core will notify the bus, which causes > the IOMMU callback to be run. > > Some of this code runs before the driver has successfully been probed, > so I imagine it would be possible to use it to abort probing. But that's > not possible at least with the current code. At least I'll experiment this way to see if it's acceptable or not. > > This looks somewhat similar to the above iommu_bus notifier. > > > > Is there any way to implement the same mechanism rather than using > > bus? > > Yes, I think it should be possible to get this to work without using the > bus notifier at all. I can try to code something up but wanted to wait > for feedback from Grant first. That's interesting too.