search for: add_device

Displaying 20 results from an estimated 135 matches for "add_device".

2020 Apr 14
0
[PATCH v2 32/33] iommu: Remove add_device()/remove_device() code-paths
From: Joerg Roedel <jroedel at suse.de> All drivers are converted to use the probe/release_device() call-backs, so the add_device/remove_device() pointers are unused and the code using them can be removed. Signed-off-by: Joerg Roedel <jroedel at suse.de> --- drivers/iommu/iommu.c | 149 ++++++++---------------------------------- include/linux/iommu.h | 4 -- 2 files changed, 29 insertions(+), 124 deletions(-) diff...
2020 Apr 14
0
[PATCH v2 06/33] iommu/amd: Return -ENODEV in add_device when device is not handled by IOMMU
From: Joerg Roedel <jroedel at suse.de> When check_device() fails on the device, it is not handled by the IOMMU and amd_iommu_add_device() needs to return -ENODEV. Signed-off-by: Joerg Roedel <jroedel at suse.de> --- drivers/iommu/amd_iommu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 504f2db75eda..3e0d27f7622e 100644 --- a/drivers/iommu...
2020 Apr 14
0
[RFC PATCH 33/34] iommu: Remove add_device()/remove_device() code-paths
Hi Marek, On Fri, Apr 10, 2020 at 12:39:38PM +0200, Marek Szyprowski wrote: > > + if (!group->default_domain) > > + continue; > > It doesn't look straight from the above diff, but this continue leaks > group->lock taken. You are right, thanks for the review! I fixed it in v2. Regards, Joerg
2017 Jan 19
3
[PATCH 1/2] daemon: Fix part-to-dev when the partition name includes p<N>.
From: Pino Toscano <ptoscano@redhat.com> If the device name ends with a number, Linux uses partition names of the form <device>p<N>. Handle this case by knocking off the 'p' character. --- daemon/devsparts.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 5862ae2..b764f63 100644 --- a/daemon/devsparts.c +++
2020 Apr 14
0
[PATCH v2 07/33] iommu: Add probe_device() and remove_device() call-backs
From: Joerg Roedel <jroedel at suse.de> Add call-backs to 'struct iommu_ops' as an alternative to the add_device() and remove_device() call-backs, which will be removed when all drivers are converted. The new call-backs will not setupt IOMMU groups and domains anymore, so also add a probe_finalize() call-back where the IOMMU driver can do per-device setup work which require the device to be set up with a gro...
2004 May 28
1
ipconfig related question (do not get static IP setting)
Hi!! I found your ipconfig stuff in the udev rpm in SuSE 9.1. I'm about to setup a initramfs (pretty cool - much better than initrd) to boot linux diskless clients over the net. All the tools I would need, seem to be there with ipconfig/nfsmount ... I like to use the information I get from PXE/syslinux or Etherboot writing something like:
2020 Apr 14
35
[PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code
...Thanks, Joerg Joerg Roedel (32): iommu: Move default domain allocation to separate function iommu/amd: Implement iommu_ops->def_domain_type call-back iommu/vt-d: Wire up iommu_ops->def_domain_type iommu/amd: Remove dma_mask check from check_device() iommu/amd: Return -ENODEV in add_device when device is not handled by IOMMU iommu: Add probe_device() and remove_device() call-backs iommu: Move default domain allocation to iommu_probe_device() iommu: Keep a list of allocated groups in __iommu_probe_device() iommu: Move new probe_device path to separate function iommu: Spl...
2020 Apr 14
35
[PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code
...Thanks, Joerg Joerg Roedel (32): iommu: Move default domain allocation to separate function iommu/amd: Implement iommu_ops->def_domain_type call-back iommu/vt-d: Wire up iommu_ops->def_domain_type iommu/amd: Remove dma_mask check from check_device() iommu/amd: Return -ENODEV in add_device when device is not handled by IOMMU iommu: Add probe_device() and remove_device() call-backs iommu: Move default domain allocation to iommu_probe_device() iommu: Keep a list of allocated groups in __iommu_probe_device() iommu: Move new probe_device path to separate function iommu: Spl...
2020 Apr 29
35
[PATCH v3 00/34] iommu: Move iommu_group setup to IOMMU core code
...Thanks, Joerg Joerg Roedel (33): iommu: Move default domain allocation to separate function iommu/amd: Implement iommu_ops->def_domain_type call-back iommu/vt-d: Wire up iommu_ops->def_domain_type iommu/amd: Remove dma_mask check from check_device() iommu/amd: Return -ENODEV in add_device when device is not handled by IOMMU iommu: Add probe_device() and release_device() call-backs iommu: Move default domain allocation to iommu_probe_device() iommu: Keep a list of allocated groups in __iommu_probe_device() iommu: Move new probe_device path to separate function iommu: Sp...
2017 Jan 19
0
[PATCH 2/2] daemon: Return MD partitions in guestfs_list_partitions (RHBZ#1414510).
...gt;d_name, "sr", 2) || + (return_md && + STREQLEN (d->d_name, "md", 2) && c_isdigit (d->d_name[2]))) { snprintf (dev_path, sizeof dev_path, "/dev/%s", d->d_name); /* Ignore the root device. */ @@ -131,7 +134,12 @@ add_device (const char *device, struct stringsbuf *r) char ** do_list_devices (void) { - return foreach_block_device (add_device); + /* For backwards compatibility, don't return MD devices in the + * list returned by guestfs_list_devices. This is because most + * API users expect that this list...
2020 Apr 07
41
[RFC PATCH 00/34] iommu: Move iommu_group setup to IOMMU core code
...e default domain type and then allocates it for the group. It turned out that this required to remove the calls of iommu_group_get_for_dev() from the IOMMU drivers. While at it, the calls to iommu_device_link()/unlink() where also moved out of the drivers, which required a different interface than add_device()/remove_device(). The result is the new probe_device()/release_device() interface, where the driver just does its own setup and then returns the iommu_device which belongs to the device being probed. There is certainly more room for cleanups, but I think this is a good start to simplify the code...
2020 Apr 07
41
[RFC PATCH 00/34] iommu: Move iommu_group setup to IOMMU core code
...e default domain type and then allocates it for the group. It turned out that this required to remove the calls of iommu_group_get_for_dev() from the IOMMU drivers. While at it, the calls to iommu_device_link()/unlink() where also moved out of the drivers, which required a different interface than add_device()/remove_device(). The result is the new probe_device()/release_device() interface, where the driver just does its own setup and then returns the iommu_device which belongs to the device being probed. There is certainly more room for cleanups, but I think this is a good start to simplify the code...
2020 Apr 14
0
[PATCH v2 17/33] iommu/arm-smmu: Convert to probe/release_device() call-backs
...b/drivers/iommu/arm-smmu-v3.c index 82508730feb7..42e1ee7e5197 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -2914,27 +2914,26 @@ static bool arm_smmu_sid_in_range(struct arm_smmu_device *smmu, u32 sid) static struct iommu_ops arm_smmu_ops; -static int arm_smmu_add_device(struct device *dev) +static struct iommu_device *arm_smmu_probe_device(struct device *dev) { int i, ret; struct arm_smmu_device *smmu; struct arm_smmu_master *master; struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); - struct iommu_group *group; if (!fwspec || fwspec->ops !=...
2020 Apr 08
1
[RFC PATCH 17/34] iommu/arm-smmu: Store device instead of group in arm_smmu_s2cr
On 2020-04-08 3:37 pm, Joerg Roedel wrote: > Hi Robin, > > thanks for looking into this. > > On Wed, Apr 08, 2020 at 01:09:40PM +0100, Robin Murphy wrote: >> For a hot-pluggable bus where logical devices may share Stream IDs (like >> fsl-mc), this could happen: >> >> create device A >> iommu_probe_device(A) >> iommu_device_group(A)
2020 Apr 14
0
[PATCH v2 10/33] iommu: Move new probe_device path to separate function
...ue is not yet - * checked. - */ - if (!ret) - iommu_alloc_default_domain(dev); - - group = iommu_group_get(dev); - if (group && group->default_domain) { - ret = __iommu_attach_device(group->default_domain, dev); - iommu_group_put(group); - } - - } else { - ret = ops->add_device(dev); - } + if (ops->probe_device) + return __iommu_probe_device_helper(dev); + ret = ops->add_device(dev); if (ret) goto err_module_put; -- 2.17.1
2020 Apr 15
0
[PATCH v2 07/33] iommu: Add probe_device() and remove_device() call-backs
On Wed, Apr 15, 2020 at 02:36:20PM +0800, Lu Baolu wrote: > On 2020/4/14 21:15, Joerg Roedel wrote: > > From: Joerg Roedel<jroedel at suse.de> > > > > Add call-backs to 'struct iommu_ops' as an alternative to the > > add_device() and remove_device() call-backs, which will be removed when > > all drivers are converted. > > > > The new call-backs will not setupt IOMMU groups and domains anymore, > > so also add a probe_finalize() call-back where the IOMMU driver can do > > per-device setup wor...
2017 Apr 19
1
[PATCH] daemon: Remove use of fixed-size stack buffers.
...++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 584e7d8b8..eac79197e 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -125,13 +125,16 @@ foreach_block_device (block_dev_func_t func, bool return_md) static int add_device (const char *device, struct stringsbuf *r) { - char dev_path[256]; - snprintf (dev_path, sizeof dev_path, "/dev/%s", device); + CLEANUP_FREE char *dev_path; - if (add_string (r, dev_path) == -1) { + if (asprintf (&dev_path, "/dev/%s", device) == -1) { + reply_with...
2005 Jan 06
0
skip unconnected interfaces
...t[i] = '\0'; - fd = open(t, O_RDONLY); - if (fd < 0) { - perror(t); + if ((flags & IFF_LOOPBACK) + || !(flags & (IFF_BROADCAST|IFF_POINTOPOINT))) continue; - } - i = read(fd, &p, sizeof(p) - 1); - close(fd); - if (i < 0) { - perror(t); + + if ( !(dev = add_device(de->d_name)) ) continue; - } - p[i] = '\0'; - flags = strtoul(p, NULL, 0); - /* Heuristic for if this is a reasonable boot interface. - This is the same - logic the in-kernel ipconfig uses... */ - if ( !(flags & IFF_LOOPBACK) && - (flags & (IFF_BROA...
2015 Mar 17
1
KVM guest not running but cannot stop either
...e running machine. Would you like to make the device available after the next guest shutdown? Requested operation is not valid: cannot do live update a device on inactive domain Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/addhardware.py", line 1095, in add_device self.vm.attach_device(self._dev) File "/usr/share/virt-manager/virtManager/domain.py", line 756, in attach_device self._backend.attachDevice(devxml) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 403, in attachDevice if ret == -1: raise libvirtError (...
2020 Apr 14
0
[PATCH v2 08/33] iommu: Move default domain allocation to iommu_probe_device()
...ue is not yet + * checked. + */ + if (!ret) + iommu_alloc_default_domain(dev); + + group = iommu_group_get(dev); + if (group && group->default_domain) { + ret = __iommu_attach_device(group->default_domain, dev); + iommu_group_put(group); + } + + } else { ret = ops->add_device(dev); + } if (ret) goto err_module_put; @@ -268,15 +297,6 @@ void iommu_release_device(struct device *dev) dev_iommu_free(dev); } -static struct iommu_domain *__iommu_domain_alloc(struct bus_type *bus, - unsigned type); -static int __iommu_attach_device(struct iommu_domain *domain...