T: git git://github.com/srcres258/linux-doc.git doc-zh-tw
F: Documentation/translations/zh_TW/
---------TTY LAYER
+++++++++TTY LAYER AND SERIAL DRIVERS
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M: Jiri Slaby <jirislaby@kernel.org>
++++++ ++L: linux-kernel@vger.kernel.org
++++++ ++L: linux-serial@vger.kernel.org
S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
+++++++++F: Documentation/devicetree/bindings/serial/
F: Documentation/driver-api/serial/
F: drivers/tty/
- F: drivers/tty/serial/serial_base.h
- F: drivers/tty/serial/serial_base_bus.c
---------F: drivers/tty/serial/serial_core.c
- F: drivers/tty/serial/serial_ctrl.c
- F: drivers/tty/serial/serial_port.c
F: include/linux/selection.h
F: include/linux/serial.h
F: include/linux/serial_core.h
{
struct iommu_group *group = dev->iommu_group;
struct group_device *device;
--------- const struct iommu_ops *ops;
---------
--------- if (!dev->iommu || !group)
--------- return;
---------
--------- iommu_device_unlink(dev->iommu->iommu_dev, dev);
mutex_lock(&group->mutex);
--------- device = __iommu_group_remove_device(group, dev);
+++++++++ for_each_group_device(group, device) {
+++++++++ if (device->dev != dev)
+++++++++ continue;
--------- /*
--------- * If the group has become empty then ownership must have been released,
--------- * and the current domain must be set back to NULL or the default
--------- * domain.
--------- */
--------- if (list_empty(&group->devices))
--------- WARN_ON(group->owner_cnt ||
--------- group->domain != group->default_domain);
+++++++++ list_del(&device->list);
+++++++++ __iommu_group_free_device(group, device);
+++++++++ if (dev->iommu && dev->iommu->iommu_dev)
+++++++++ iommu_deinit_device(dev);
+++++++++ else
+++++++++ dev->iommu_group = NULL;
+++++++++ break;
+++++++++ }
+++++++++ mutex_unlock(&group->mutex);
/*
--------- * release_device() must stop using any attached domain on the device.
--------- * If there are still other devices in the group they are not effected
--------- * by this callback.
--------- *
--------- * The IOMMU driver must set the device to either an identity or
--------- * blocking translation and stop using any domain pointer, as it is
--------- * going to be freed.
+++++++++ * Pairs with the get in iommu_init_device() or
+++++++++ * iommu_group_add_device()
*/
--------- ops = dev_iommu_ops(dev);
--------- if (ops->release_device)
--------- ops->release_device(dev);
--------- mutex_unlock(&group->mutex);
+++++++++ iommu_group_put(group);
+++++++++ }
++++ + +
- - - if (device)
- - - __iommu_group_release_device(group, device);
+++++++++ static void iommu_release_device(struct device *dev)
+++++++++ {
+++++++++ struct iommu_group *group = dev->iommu_group;
- - - module_put(ops->owner);
- - - dev_iommu_free(dev);
---- - - if (device)
---- - - __iommu_group_release_device(group, device);
+++++++++ if (group)
+++++++++ __iommu_group_remove_device(dev);
+ + +
---- - - module_put(ops->owner);
---- - - dev_iommu_free(dev);
+++++++++ /* Free any fwspec if no iommu_driver was ever attached */
+++++++++ if (dev->iommu)
+++++++++ dev_iommu_free(dev);
}
static int __init iommu_set_def_domain_type(char *str)
* @priv: IOMMU Driver private data
* @max_pasids: number of PASIDs this device can consume
* @attach_deferred: the dma domain attachment is deferred
+++++++++ * @pci_32bit_workaround: Limit DMA allocations to 32-bit IOVAs
+++++++ ++ * @require_direct: device requires IOMMU_RESV_DIRECT regions
*
* TODO: migrate other per device data pointers under iommu_dev_data, e.g.
* struct iommu_group *iommu_group;
void *priv;
u32 max_pasids;
u32 attach_deferred:1;
+++++++++ u32 pci_32bit_workaround:1;
+++++++ ++ u32 require_direct:1;
};
int iommu_device_register(struct iommu_device *iommu,