From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 66E8B2112FACC for ; Tue, 6 Nov 2018 15:48:37 -0800 (PST) Received: by mail-pg1-f196.google.com with SMTP id n10-v6so6511214pgv.10 for ; Tue, 06 Nov 2018 15:48:37 -0800 (PST) Message-ID: <1541548114.196084.195.camel@acm.org> Subject: Re: [driver-core PATCH v5 5/9] driver core: Establish clear order of operations for deferred probe and remove From: Bart Van Assche Date: Tue, 06 Nov 2018 15:48:34 -0800 In-Reply-To: <154145232484.29224.1635232599636954462.stgit@ahduyck-desk1.jf.intel.com> References: <154145223352.29224.8912797012647157172.stgit@ahduyck-desk1.jf.intel.com> <154145232484.29224.1635232599636954462.stgit@ahduyck-desk1.jf.intel.com> Mime-Version: 1.0 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Alexander Duyck , linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Cc: len.brown@intel.com, linux-pm@vger.kernel.org, rafael@kernel.org, jiangshanlai@gmail.com, linux-nvdimm@lists.01.org, pavel@ucw.cz, zwisler@kernel.org, tj@kernel.org, akpm@linux-foundation.org List-ID: On Mon, 2018-11-05 at 13:12 -0800, Alexander Duyck wrote: > One change I made in addition is I replaced the use of "bool X:1" to define > the bitfield to a "u8 X:1" setup in order to resolve some checkpatch > warnings. Please use "bool X:1" instead of "u8 X:1". I think it was a bad idea to make checkpatch complain about "bool X:1" since "bool X:1" should only be avoided in structures for which alignment must be architecture-independent. For struct device it is fine if member alignment differs per architecture. Additionally, changing "bool X:1" into "u8 X:1" will reduce performance on architectures that cannot do byte addressing. > static void __device_release_driver(struct device *dev, struct device *parent) > { > - struct device_driver *drv; > + struct device_driver *drv = dev->driver; > > - drv = dev->driver; > - if (drv) { > - while (device_links_busy(dev)) { > - __device_driver_unlock(dev, parent); > + /* > + * In the event that we are asked to release the driver on an > + * interface that is still waiting on a probe we can just terminate > + * the probe by setting async_probe to false. When the async call > + * is finally completed it will see this state and just exit. > + */ > + dev->async_probe = false; > + if (!drv) > + return; > > - device_links_unbind_consumers(dev); > + while (device_links_busy(dev)) { > + __device_driver_unlock(dev, parent); > > - __device_driver_lock(dev, parent); > - /* > - * A concurrent invocation of the same function might > - * have released the driver successfully while this one > - * was waiting, so check for that. > - */ > - if (dev->driver != drv) > - return; > - } > + device_links_unbind_consumers(dev); > > - pm_runtime_get_sync(dev); > - pm_runtime_clean_up_links(dev); > + __device_driver_lock(dev, parent); > + /* > + * A concurrent invocation of the same function might > + * have released the driver successfully while this one > + * was waiting, so check for that. > + */ > + if (dev->driver != drv) > + return; > + } > > - driver_sysfs_remove(dev); > + pm_runtime_get_sync(dev); > + pm_runtime_clean_up_links(dev); > > - if (dev->bus) > - blocking_notifier_call_chain(&dev->bus->p->bus_notifier, > - BUS_NOTIFY_UNBIND_DRIVER, > - dev); > + driver_sysfs_remove(dev); > > - pm_runtime_put_sync(dev); > + if (dev->bus) > + blocking_notifier_call_chain(&dev->bus->p->bus_notifier, > + BUS_NOTIFY_UNBIND_DRIVER, > + dev); > > - if (dev->bus && dev->bus->remove) > - dev->bus->remove(dev); > - else if (drv->remove) > - drv->remove(dev); > + pm_runtime_put_sync(dev); > > - device_links_driver_cleanup(dev); > - arch_teardown_dma_ops(dev); > + if (dev->bus && dev->bus->remove) > + dev->bus->remove(dev); > + else if (drv->remove) > + drv->remove(dev); > > - devres_release_all(dev); > - dev->driver = NULL; > - dev_set_drvdata(dev, NULL); > - if (dev->pm_domain && dev->pm_domain->dismiss) > - dev->pm_domain->dismiss(dev); > - pm_runtime_reinit(dev); > - dev_pm_set_driver_flags(dev, 0); > + device_links_driver_cleanup(dev); > + arch_teardown_dma_ops(dev); > + > + devres_release_all(dev); > + dev->driver = NULL; > + dev_set_drvdata(dev, NULL); > + if (dev->pm_domain && dev->pm_domain->dismiss) > + dev->pm_domain->dismiss(dev); > + pm_runtime_reinit(dev); > + dev_pm_set_driver_flags(dev, 0); > > - klist_remove(&dev->p->knode_driver); > - device_pm_check_callbacks(dev); > - if (dev->bus) > - blocking_notifier_call_chain(&dev->bus->p->bus_notifier, > - BUS_NOTIFY_UNBOUND_DRIVER, > - dev); > + klist_remove(&dev->p->knode_driver); > + device_pm_check_callbacks(dev); > + if (dev->bus) > + blocking_notifier_call_chain(&dev->bus->p->bus_notifier, > + BUS_NOTIFY_UNBOUND_DRIVER, > + dev); > > - kobject_uevent(&dev->kobj, KOBJ_UNBIND); > - } > + kobject_uevent(&dev->kobj, KOBJ_UNBIND); > } This patch mixes functional changes with whitespace changes. Please move the whitespace changes into a separate patch such that this patch becomes easier to read. > void device_release_driver_internal(struct device *dev, > diff --git a/include/linux/device.h b/include/linux/device.h > index 1b25c7a43f4c..fc7091d436c2 100644 > --- a/include/linux/device.h > +++ b/include/linux/device.h > @@ -1043,14 +1043,15 @@ struct device { > struct iommu_group *iommu_group; > struct iommu_fwspec *iommu_fwspec; > > - bool offline_disabled:1; > - bool offline:1; > - bool of_node_reused:1; > + u8 offline_disabled:1; > + u8 offline:1; > + u8 of_node_reused:1; > #if defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \ > defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU) || \ > defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL) > - bool dma_coherent:1; > + u8 dma_coherent:1; > #endif > + u8 async_probe:1; The new async_probe field can be changed from multiple threads. Concurrent changes of a bitfield are only safe if these are serialized in some way. Please document the locking requirements for the async_probe bitfield in device.h. Thanks, Bart. _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart Van Assche Subject: Re: [driver-core PATCH v5 5/9] driver core: Establish clear order of operations for deferred probe and remove Date: Tue, 06 Nov 2018 15:48:34 -0800 Message-ID: <1541548114.196084.195.camel@acm.org> References: <154145223352.29224.8912797012647157172.stgit@ahduyck-desk1.jf.intel.com> <154145232484.29224.1635232599636954462.stgit@ahduyck-desk1.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <154145232484.29224.1635232599636954462.stgit-+uVpp3jiz/RcxmDmkzA3yGt3HXsI98Cx0E9HWUfgJXw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: Alexander Duyck , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org Cc: len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, rafael-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, jiangshanlai-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, pavel-+ZI9xUNit7I@public.gmane.org, zwisler-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org List-Id: linux-pm@vger.kernel.org On Mon, 2018-11-05 at 13:12 -0800, Alexander Duyck wrote: > One change I made in addition is I replaced the use of "bool X:1" to define > the bitfield to a "u8 X:1" setup in order to resolve some checkpatch > warnings. Please use "bool X:1" instead of "u8 X:1". I think it was a bad idea to make checkpatch complain about "bool X:1" since "bool X:1" should only be avoided in structures for which alignment must be architecture-independent. For struct device it is fine if member alignment differs per architecture. Additionally, changing "bool X:1" into "u8 X:1" will reduce performance on architectures that cannot do byte addressing. > static void __device_release_driver(struct device *dev, struct device *parent) > { > - struct device_driver *drv; > + struct device_driver *drv = dev->driver; > > - drv = dev->driver; > - if (drv) { > - while (device_links_busy(dev)) { > - __device_driver_unlock(dev, parent); > + /* > + * In the event that we are asked to release the driver on an > + * interface that is still waiting on a probe we can just terminate > + * the probe by setting async_probe to false. When the async call > + * is finally completed it will see this state and just exit. > + */ > + dev->async_probe = false; > + if (!drv) > + return; > > - device_links_unbind_consumers(dev); > + while (device_links_busy(dev)) { > + __device_driver_unlock(dev, parent); > > - __device_driver_lock(dev, parent); > - /* > - * A concurrent invocation of the same function might > - * have released the driver successfully while this one > - * was waiting, so check for that. > - */ > - if (dev->driver != drv) > - return; > - } > + device_links_unbind_consumers(dev); > > - pm_runtime_get_sync(dev); > - pm_runtime_clean_up_links(dev); > + __device_driver_lock(dev, parent); > + /* > + * A concurrent invocation of the same function might > + * have released the driver successfully while this one > + * was waiting, so check for that. > + */ > + if (dev->driver != drv) > + return; > + } > > - driver_sysfs_remove(dev); > + pm_runtime_get_sync(dev); > + pm_runtime_clean_up_links(dev); > > - if (dev->bus) > - blocking_notifier_call_chain(&dev->bus->p->bus_notifier, > - BUS_NOTIFY_UNBIND_DRIVER, > - dev); > + driver_sysfs_remove(dev); > > - pm_runtime_put_sync(dev); > + if (dev->bus) > + blocking_notifier_call_chain(&dev->bus->p->bus_notifier, > + BUS_NOTIFY_UNBIND_DRIVER, > + dev); > > - if (dev->bus && dev->bus->remove) > - dev->bus->remove(dev); > - else if (drv->remove) > - drv->remove(dev); > + pm_runtime_put_sync(dev); > > - device_links_driver_cleanup(dev); > - arch_teardown_dma_ops(dev); > + if (dev->bus && dev->bus->remove) > + dev->bus->remove(dev); > + else if (drv->remove) > + drv->remove(dev); > > - devres_release_all(dev); > - dev->driver = NULL; > - dev_set_drvdata(dev, NULL); > - if (dev->pm_domain && dev->pm_domain->dismiss) > - dev->pm_domain->dismiss(dev); > - pm_runtime_reinit(dev); > - dev_pm_set_driver_flags(dev, 0); > + device_links_driver_cleanup(dev); > + arch_teardown_dma_ops(dev); > + > + devres_release_all(dev); > + dev->driver = NULL; > + dev_set_drvdata(dev, NULL); > + if (dev->pm_domain && dev->pm_domain->dismiss) > + dev->pm_domain->dismiss(dev); > + pm_runtime_reinit(dev); > + dev_pm_set_driver_flags(dev, 0); > > - klist_remove(&dev->p->knode_driver); > - device_pm_check_callbacks(dev); > - if (dev->bus) > - blocking_notifier_call_chain(&dev->bus->p->bus_notifier, > - BUS_NOTIFY_UNBOUND_DRIVER, > - dev); > + klist_remove(&dev->p->knode_driver); > + device_pm_check_callbacks(dev); > + if (dev->bus) > + blocking_notifier_call_chain(&dev->bus->p->bus_notifier, > + BUS_NOTIFY_UNBOUND_DRIVER, > + dev); > > - kobject_uevent(&dev->kobj, KOBJ_UNBIND); > - } > + kobject_uevent(&dev->kobj, KOBJ_UNBIND); > } This patch mixes functional changes with whitespace changes. Please move the whitespace changes into a separate patch such that this patch becomes easier to read. > void device_release_driver_internal(struct device *dev, > diff --git a/include/linux/device.h b/include/linux/device.h > index 1b25c7a43f4c..fc7091d436c2 100644 > --- a/include/linux/device.h > +++ b/include/linux/device.h > @@ -1043,14 +1043,15 @@ struct device { > struct iommu_group *iommu_group; > struct iommu_fwspec *iommu_fwspec; > > - bool offline_disabled:1; > - bool offline:1; > - bool of_node_reused:1; > + u8 offline_disabled:1; > + u8 offline:1; > + u8 of_node_reused:1; > #if defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \ > defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU) || \ > defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL) > - bool dma_coherent:1; > + u8 dma_coherent:1; > #endif > + u8 async_probe:1; The new async_probe field can be changed from multiple threads. Concurrent changes of a bitfield are only safe if these are serialized in some way. Please document the locking requirements for the async_probe bitfield in device.h. Thanks, Bart. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2596C32789 for ; Tue, 6 Nov 2018 23:48:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9FED920830 for ; Tue, 6 Nov 2018 23:48:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FED920830 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388227AbeKGJQW (ORCPT ); Wed, 7 Nov 2018 04:16:22 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:35564 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387726AbeKGJQW (ORCPT ); Wed, 7 Nov 2018 04:16:22 -0500 Received: by mail-pg1-f194.google.com with SMTP id 32-v6so6531854pgu.2; Tue, 06 Nov 2018 15:48:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=hPcRdl+fVZ7K/XmxsWrM9/WvMiO+cdHK6C26sWAH0Yg=; b=r0v+zjDkUl3WbVBd9EakFBXzT4sWLky/Y3JmS4axYD16YpIlV1xO0602Yz2ds4rcLX Ky+gcdAoOKDJiL3c6xmRNEQmoj20JrBISGbM3r4kXqpY7ZG42VRK0TgoZns8cOLZViNR +9gvWjpS/SVAR4E9fNJjG6A/7MLcUSWrZ/S/ycTxcwpAM2RqXZGON3UEP4HyDGhr1q8K /G8YQ0rcTiRy/rrDk7r8KMWvMOU13M5Wpfi0Eh4HzO1OB8l8Obl5I01mXjwcrsBj7dDq bjkJOE3fJy+6wLyM1vDvPbwNu0cyM8KI4nnflNDmIvssUMu+yhA8GH0eyDAc54ZEB111 eDPA== X-Gm-Message-State: AGRZ1gLTdqWkkc03tGUjbDrMGJhbC0r6/6DY/ITpQtIuSkyZbtniIqE2 oKXYxXkuSz4NT0esJIHsiu8= X-Google-Smtp-Source: AJdET5fiOvIbGLYrd6uOouTcHn9SiNCrwGM4VnJKiB2pHVsUKANh6DEz6vt/lSCTFMpA7SvMsOWZ5w== X-Received: by 2002:a65:4b82:: with SMTP id t2mr11328591pgq.189.1541548116412; Tue, 06 Nov 2018 15:48:36 -0800 (PST) Received: from ?IPv6:2620:15c:2cd:203:5cdc:422c:7b28:ebb5? ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id 62sm44385819pgc.61.2018.11.06.15.48.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Nov 2018 15:48:35 -0800 (PST) Message-ID: <1541548114.196084.195.camel@acm.org> Subject: Re: [driver-core PATCH v5 5/9] driver core: Establish clear order of operations for deferred probe and remove From: Bart Van Assche To: Alexander Duyck , linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Cc: linux-nvdimm@lists.01.org, tj@kernel.org, akpm@linux-foundation.org, linux-pm@vger.kernel.org, jiangshanlai@gmail.com, rafael@kernel.org, len.brown@intel.com, pavel@ucw.cz, zwisler@kernel.org, dan.j.williams@intel.com, dave.jiang@intel.com Date: Tue, 06 Nov 2018 15:48:34 -0800 In-Reply-To: <154145232484.29224.1635232599636954462.stgit@ahduyck-desk1.jf.intel.com> References: <154145223352.29224.8912797012647157172.stgit@ahduyck-desk1.jf.intel.com> <154145232484.29224.1635232599636954462.stgit@ahduyck-desk1.jf.intel.com> Content-Type: text/plain; charset="UTF-7" X-Mailer: Evolution 3.26.2-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-11-05 at 13:12 -0800, Alexander Duyck wrote: +AD4 One change I made in addition is I replaced the use of +ACI-bool X:1+ACI to define +AD4 the bitfield to a +ACI-u8 X:1+ACI setup in order to resolve some checkpatch +AD4 warnings. Please use +ACI-bool X:1+ACI instead of +ACI-u8 X:1+ACI. I think it was a bad idea to make checkpatch complain about +ACI-bool X:1+ACI since +ACI-bool X:1+ACI should only be avoided in structures for which alignment must be architecture-independent. For struct device it is fine if member alignment differs per architecture. Additionally, changing +ACI-bool X:1+ACI into +ACI-u8 X:1+ACI will reduce performance on architectures that cannot do byte addressing. +AD4 static void +AF8AXw-device+AF8-release+AF8-driver(struct device +ACo-dev, struct device +ACo-parent) +AD4 +AHs +AD4 - struct device+AF8-driver +ACo-drv+ADs +AD4 +- struct device+AF8-driver +ACo-drv +AD0 dev-+AD4-driver+ADs +AD4 +AD4 - drv +AD0 dev-+AD4-driver+ADs +AD4 - if (drv) +AHs +AD4 - while (device+AF8-links+AF8-busy(dev)) +AHs +AD4 - +AF8AXw-device+AF8-driver+AF8-unlock(dev, parent)+ADs +AD4 +- /+ACo +AD4 +- +ACo In the event that we are asked to release the driver on an +AD4 +- +ACo interface that is still waiting on a probe we can just terminate +AD4 +- +ACo the probe by setting async+AF8-probe to false. When the async call +AD4 +- +ACo is finally completed it will see this state and just exit. +AD4 +- +ACo-/ +AD4 +- dev-+AD4-async+AF8-probe +AD0 false+ADs +AD4 +- if (+ACE-drv) +AD4 +- return+ADs +AD4 +AD4 - device+AF8-links+AF8-unbind+AF8-consumers(dev)+ADs +AD4 +- while (device+AF8-links+AF8-busy(dev)) +AHs +AD4 +- +AF8AXw-device+AF8-driver+AF8-unlock(dev, parent)+ADs +AD4 +AD4 - +AF8AXw-device+AF8-driver+AF8-lock(dev, parent)+ADs +AD4 - /+ACo +AD4 - +ACo A concurrent invocation of the same function might +AD4 - +ACo have released the driver successfully while this one +AD4 - +ACo was waiting, so check for that. +AD4 - +ACo-/ +AD4 - if (dev-+AD4-driver +ACEAPQ drv) +AD4 - return+ADs +AD4 - +AH0 +AD4 +- device+AF8-links+AF8-unbind+AF8-consumers(dev)+ADs +AD4 +AD4 - pm+AF8-runtime+AF8-get+AF8-sync(dev)+ADs +AD4 - pm+AF8-runtime+AF8-clean+AF8-up+AF8-links(dev)+ADs +AD4 +- +AF8AXw-device+AF8-driver+AF8-lock(dev, parent)+ADs +AD4 +- /+ACo +AD4 +- +ACo A concurrent invocation of the same function might +AD4 +- +ACo have released the driver successfully while this one +AD4 +- +ACo was waiting, so check for that. +AD4 +- +ACo-/ +AD4 +- if (dev-+AD4-driver +ACEAPQ drv) +AD4 +- return+ADs +AD4 +- +AH0 +AD4 +AD4 - driver+AF8-sysfs+AF8-remove(dev)+ADs +AD4 +- pm+AF8-runtime+AF8-get+AF8-sync(dev)+ADs +AD4 +- pm+AF8-runtime+AF8-clean+AF8-up+AF8-links(dev)+ADs +AD4 +AD4 - if (dev-+AD4-bus) +AD4 - blocking+AF8-notifier+AF8-call+AF8-chain(+ACY-dev-+AD4-bus-+AD4-p-+AD4-bus+AF8-notifier, +AD4 - BUS+AF8-NOTIFY+AF8-UNBIND+AF8-DRIVER, +AD4 - dev)+ADs +AD4 +- driver+AF8-sysfs+AF8-remove(dev)+ADs +AD4 +AD4 - pm+AF8-runtime+AF8-put+AF8-sync(dev)+ADs +AD4 +- if (dev-+AD4-bus) +AD4 +- blocking+AF8-notifier+AF8-call+AF8-chain(+ACY-dev-+AD4-bus-+AD4-p-+AD4-bus+AF8-notifier, +AD4 +- BUS+AF8-NOTIFY+AF8-UNBIND+AF8-DRIVER, +AD4 +- dev)+ADs +AD4 +AD4 - if (dev-+AD4-bus +ACYAJg dev-+AD4-bus-+AD4-remove) +AD4 - dev-+AD4-bus-+AD4-remove(dev)+ADs +AD4 - else if (drv-+AD4-remove) +AD4 - drv-+AD4-remove(dev)+ADs +AD4 +- pm+AF8-runtime+AF8-put+AF8-sync(dev)+ADs +AD4 +AD4 - device+AF8-links+AF8-driver+AF8-cleanup(dev)+ADs +AD4 - arch+AF8-teardown+AF8-dma+AF8-ops(dev)+ADs +AD4 +- if (dev-+AD4-bus +ACYAJg dev-+AD4-bus-+AD4-remove) +AD4 +- dev-+AD4-bus-+AD4-remove(dev)+ADs +AD4 +- else if (drv-+AD4-remove) +AD4 +- drv-+AD4-remove(dev)+ADs +AD4 +AD4 - devres+AF8-release+AF8-all(dev)+ADs +AD4 - dev-+AD4-driver +AD0 NULL+ADs +AD4 - dev+AF8-set+AF8-drvdata(dev, NULL)+ADs +AD4 - if (dev-+AD4-pm+AF8-domain +ACYAJg dev-+AD4-pm+AF8-domain-+AD4-dismiss) +AD4 - dev-+AD4-pm+AF8-domain-+AD4-dismiss(dev)+ADs +AD4 - pm+AF8-runtime+AF8-reinit(dev)+ADs +AD4 - dev+AF8-pm+AF8-set+AF8-driver+AF8-flags(dev, 0)+ADs +AD4 +- device+AF8-links+AF8-driver+AF8-cleanup(dev)+ADs +AD4 +- arch+AF8-teardown+AF8-dma+AF8-ops(dev)+ADs +AD4 +- +AD4 +- devres+AF8-release+AF8-all(dev)+ADs +AD4 +- dev-+AD4-driver +AD0 NULL+ADs +AD4 +- dev+AF8-set+AF8-drvdata(dev, NULL)+ADs +AD4 +- if (dev-+AD4-pm+AF8-domain +ACYAJg dev-+AD4-pm+AF8-domain-+AD4-dismiss) +AD4 +- dev-+AD4-pm+AF8-domain-+AD4-dismiss(dev)+ADs +AD4 +- pm+AF8-runtime+AF8-reinit(dev)+ADs +AD4 +- dev+AF8-pm+AF8-set+AF8-driver+AF8-flags(dev, 0)+ADs +AD4 +AD4 - klist+AF8-remove(+ACY-dev-+AD4-p-+AD4-knode+AF8-driver)+ADs +AD4 - device+AF8-pm+AF8-check+AF8-callbacks(dev)+ADs +AD4 - if (dev-+AD4-bus) +AD4 - blocking+AF8-notifier+AF8-call+AF8-chain(+ACY-dev-+AD4-bus-+AD4-p-+AD4-bus+AF8-notifier, +AD4 - BUS+AF8-NOTIFY+AF8-UNBOUND+AF8-DRIVER, +AD4 - dev)+ADs +AD4 +- klist+AF8-remove(+ACY-dev-+AD4-p-+AD4-knode+AF8-driver)+ADs +AD4 +- device+AF8-pm+AF8-check+AF8-callbacks(dev)+ADs +AD4 +- if (dev-+AD4-bus) +AD4 +- blocking+AF8-notifier+AF8-call+AF8-chain(+ACY-dev-+AD4-bus-+AD4-p-+AD4-bus+AF8-notifier, +AD4 +- BUS+AF8-NOTIFY+AF8-UNBOUND+AF8-DRIVER, +AD4 +- dev)+ADs +AD4 +AD4 - kobject+AF8-uevent(+ACY-dev-+AD4-kobj, KOBJ+AF8-UNBIND)+ADs +AD4 - +AH0 +AD4 +- kobject+AF8-uevent(+ACY-dev-+AD4-kobj, KOBJ+AF8-UNBIND)+ADs +AD4 +AH0 This patch mixes functional changes with whitespace changes. Please move the whitespace changes into a separate patch such that this patch becomes easier to read. +AD4 void device+AF8-release+AF8-driver+AF8-internal(struct device +ACo-dev, +AD4 diff --git a/include/linux/device.h b/include/linux/device.h +AD4 index 1b25c7a43f4c..fc7091d436c2 100644 +AD4 --- a/include/linux/device.h +AD4 +-+-+- b/include/linux/device.h +AD4 +AEAAQA -1043,14 +-1043,15 +AEAAQA struct device +AHs +AD4 struct iommu+AF8-group +ACo-iommu+AF8-group+ADs +AD4 struct iommu+AF8-fwspec +ACo-iommu+AF8-fwspec+ADs +AD4 +AD4 - bool offline+AF8-disabled:1+ADs +AD4 - bool offline:1+ADs +AD4 - bool of+AF8-node+AF8-reused:1+ADs +AD4 +- u8 offline+AF8-disabled:1+ADs +AD4 +- u8 offline:1+ADs +AD4 +- u8 of+AF8-node+AF8-reused:1+ADs +AD4 +ACM-if defined(CONFIG+AF8-ARCH+AF8-HAS+AF8-SYNC+AF8-DMA+AF8-FOR+AF8-DEVICE) +AHwAfA +AFw +AD4 defined(CONFIG+AF8-ARCH+AF8-HAS+AF8-SYNC+AF8-DMA+AF8-FOR+AF8-CPU) +AHwAfA +AFw +AD4 defined(CONFIG+AF8-ARCH+AF8-HAS+AF8-SYNC+AF8-DMA+AF8-FOR+AF8-CPU+AF8-ALL) +AD4 - bool dma+AF8-coherent:1+ADs +AD4 +- u8 dma+AF8-coherent:1+ADs +AD4 +ACM-endif +AD4 +- u8 async+AF8-probe:1+ADs The new async+AF8-probe field can be changed from multiple threads. Concurrent changes of a bitfield are only safe if these are serialized in some way. Please document the locking requirements for the async+AF8-probe bitfield in device.h. Thanks, Bart.