From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug Date: Fri, 17 Aug 2018 19:02:39 +0200 Message-ID: <20180817170239.GF24945@kroah.com> References: <20180817075901.4608-1-david@redhat.com> <20180817075901.4608-2-david@redhat.com> <20180817084146.GB14725@kroah.com> <5a5d73e9-e4aa-ffed-a2e3-8aef64e61923@redhat.com> <42df9062-f647-3ad6-5a07-be2b99531119@redhat.com> <20180817100604.GA18164@kroah.com> <4ac624be-d2d6-5975-821f-b20a475781dc@redhat.com> <20180817112850.GB3565@osiris> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Archive: List-Post: To: David Hildenbrand Cc: Heiko Carstens , Michal Hocko , "Rafael J. Wysocki" , Benjamin Herrenschmidt , Linux Memory Management List , Paul Mackerras , linux-s390@vger.kernel.org, sthemmin@microsoft.com, Pavel Tatashin , ACPI Devel Maling List , David Rientjes , xen-devel@lists.xenproject.org, Len Brown , haiyangz@microsoft.com, Dan Williams , Vitaly Kuznetsov , Vlastimil Babka , osalvador@suse.de, "Rafael J. Wysocki" , Linux Kernel Mailing List , Martin List-ID: On Fri, Aug 17, 2018 at 01:56:35PM +0200, David Hildenbrand wrote: > E.g. When adding the memory block devices, we know that there won't be a > driver to attach to (as there are no drivers for the "memory" subsystem) > - the bus_probe_device() function that takes the device_lock() could > pretty much be avoided for that case. But burying such special cases > down in core driver code definitely won't make locking related to memory > hotplug easier. You don't have to have a driver for a device if you don't want to, or you can just have a default one for all memory devices if you somehow need it. No reason to not do this if it makes things easier for you. thanks, greg k-h