From: Joerg Roedel Date: Mon, 21 Aug 2023 12:18:43 +0000 (+0200) Subject: Merge branches 'apple/dart', 'arm/mediatek', 'arm/renesas', 'arm/rockchip', 'arm... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d8fe59f11096d6470b5f53739e49cdce67f3e127;p=linux.git Merge branches 'apple/dart', 'arm/mediatek', 'arm/renesas', 'arm/rockchip', 'arm/smmu', 'unisoc', 'x86/vt-d', 'x86/amd' and 'core' into next --- d8fe59f11096d6470b5f53739e49cdce67f3e127 diff --cc MAINTAINERS index d590ce31aa726,3be1bdfe8ecc7,3eec0065be9d9,3be1bdfe8ecc7,3be1bdfe8ecc7,d516295978a4c,3be1bdfe8ecc7,0f966f05fb0d4,3be1bdfe8ecc7,3be1bdfe8ecc7..416e0e7599d8c --- a/MAINTAINERS +++ b/MAINTAINERS @@@@@@@@@@@ -21628,16 -21625,14 -21626,14 -21625,14 -21625,14 -21638,14 -21625,14 -21636,20 -21625,14 -21625,14 +21629,16 @@@@@@@@@@@ W: https://github.com/srcres258/linux-d 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 M: Jiri Slaby ++++++ ++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 diff --cc drivers/iommu/iommu.c index caaf563d38ae0,da340f11c5f5b,da340f11c5f5b,da340f11c5f5b,da340f11c5f5b,caaf563d38ae0,da340f11c5f5b,e385a99e25e1a,da340f11c5f5b,c53a4942f7457..39601fbfd0e0c --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@@@@@@@@@@ -500,44 -500,44 -500,44 -500,44 -500,44 -500,44 -500,44 -501,44 -500,44 -561,39 +562,39 @@@@@@@@@@@ static void __iommu_group_remove_device { 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) diff --cc drivers/iommu/ipmmu-vmsa.c index 9f64c5c9f5b90,9f64c5c9f5b90,9f64c5c9f5b90,c31552d6a5fad,9f64c5c9f5b90,9f64c5c9f5b90,9f64c5c9f5b90,9f64c5c9f5b90,9f64c5c9f5b90,0aeedd3e14941..65ff69477c43e --- a/drivers/iommu/ipmmu-vmsa.c +++ b/drivers/iommu/ipmmu-vmsa.c @@@@@@@@@@@ -17,8 -17,8 -17,8 -18,9 -17,8 -17,8 -17,8 -17,8 -17,8 -17,7 +18,8 @@@@@@@@@@@ #include #include #include --------- #include #include +++ ++++++#include #include #include #include diff --cc include/linux/iommu.h index d316425966759,d316425966759,d316425966759,d316425966759,d316425966759,d316425966759,d316425966759,54bae452975f8,d316425966759,b1dcb1b9b1704..389fffc0b3a2d --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@@@@@@@@@@ -409,6 -409,6 -409,6 -409,6 -409,6 -409,6 -409,6 -411,7 -409,6 -409,7 +411,8 @@@@@@@@@@@ struct iommu_fault_param * @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; @@@@@@@@@@@ -422,6 -422,6 -422,6 -422,6 -422,6 -422,6 -422,6 -425,7 -422,6 -423,7 +426,8 @@@@@@@@@@@ struct dev_iommu 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,