Displaying 20 results from an estimated 81 matches for "of_device".
2018 Jul 27
1
[PATCH] daemon: inspect: ignore fstab devs that cannot be resolved (RHBZ#1608131)
...emon/inspect_fs_unix_fstab.ml
@@ -115,12 +115,20 @@ and check_fstab_entry md_map root_mountable os_type aug entry =
if String.is_prefix spec "UUID=" then (
let uuid = String.sub spec 5 (String.length spec - 5) in
let uuid = shell_unquote uuid in
- Mountable.of_device (Findfs.findfs_uuid uuid)
+ (* Just ignore the device if the UUID cannot be resolved. *)
+ try
+ Mountable.of_device (Findfs.findfs_uuid uuid)
+ with
+ Failure _ -> return None
)
else if String.is_prefix spec "LABEL=" then (...
2017 Nov 21
2
[PATCH REPOST 1/2] common/mlstdutils: Add return statement.
No change, just reposting without the "for discussion" tag.
I think we should allow this as it seems like a nice coding style for
a limited subset of imperative-style code.
Rich.
2017 Nov 05
2
[PATCH 0/2] (mainly for discussion) Add ‘return’ statement.
When rewriting the heavily imperative original inspection code, I
longed for a ‘return’ statement so I could keep the new code as close
as possible to the original. OCaml of course does not have such a
statement, but it's relatively simply to implement it in the language.
The first patch does so, and the second patch rewrites a sample of the
inspection code to use it.
Rich.
2019 Jan 14
1
[PATCH] inspect: fix inspection of partition-less devices (RHBZ#1661038)
...504,7 @@ and resolve_xdev typ disk part default =
let i = drive_index disk in
if i >= 0 && i < Array.length devices then (
let dev = Array.get devices i in
- let dev = dev ^ string_of_int part in
+ let dev = dev ^ part in
if is_partition dev then
Mountable.of_device dev
else
--
2.20.1
2017 Aug 09
0
[PATCH v12 09/11] daemon: Implement inspection of Linux and other Unix-like operating systems.
...let mountable =
+ (* Resolve UUID= and LABEL= to the actual device. *)
+ if String.is_prefix spec "UUID=" then (
+ let uuid = String.sub spec 5 (String.length spec - 5) in
+ let uuid = shell_unquote uuid in
+ Some (Mountable.of_device (Findfs.findfs_uuid uuid))
+ )
+ else if String.is_prefix spec "LABEL=" then (
+ let label = String.sub spec 6 (String.length spec - 6) in
+ let label = shell_unquote label in
+ Some (Mountable.of_device (Findfs.findfs_label label))...
2017 Jul 31
0
[PATCH v11 08/10] daemon: Implement inspection of Linux and other Unix-like operating systems.
...let mountable =
+ (* Resolve UUID= and LABEL= to the actual device. *)
+ if String.is_prefix spec "UUID=" then (
+ let uuid = String.sub spec 5 (String.length spec - 5) in
+ let uuid = shell_unquote uuid in
+ Some (Mountable.of_device (Findfs.findfs_uuid uuid))
+ )
+ else if String.is_prefix spec "LABEL=" then (
+ let label = String.sub spec 6 (String.length spec - 6) in
+ let label = shell_unquote label in
+ Some (Mountable.of_device (Findfs.findfs_label label))...
2018 Apr 10
0
[PATCH v2 3/5] daemon: move Lvm.lv_canonical to new Lvm_utils module
...b/daemon/inspect_fs_unix_fstab.ml
@@ -327,7 +327,7 @@ and resolve_fstab_device spec md_map os_type =
* we have implemented lvm_canonical_lv_name in the daemon.
*)
try
- match Lvm.lv_canonical spec with
+ match Lvm_utils.lv_canonical spec with
| None -> Mountable.of_device spec
| Some device -> Mountable.of_device device
with
diff --git a/daemon/lvm.ml b/daemon/lvm.ml
index ed4ed7462..ef45ed4bc 100644
--- a/daemon/lvm.ml
+++ b/daemon/lvm.ml
@@ -97,30 +97,3 @@ and filter_convert_old_lvs_output out =
) lines in
List.sort compare lines
-
-(* Conve...
2015 Apr 17
3
[PATCH 1/6] platform: specify the IOMMU physical translation bit
...m.c
> index 775277f1edb0..0d002f73e356 100644
> --- a/drm/nouveau/nouveau_platform.c
> +++ b/drm/nouveau/nouveau_platform.c
> @@ -25,6 +25,7 @@
> #include <linux/module.h>
> #include <linux/platform_device.h>
> #include <linux/of.h>
> +#include <linux/of_device.h>
> #include <linux/reset.h>
> #include <linux/regulator/consumer.h>
> #include <linux/iommu.h>
> @@ -92,6 +93,22 @@ static int nouveau_platform_power_down(struct nouveau_platform_gpu *gpu)
> return 0;
> }
>
> +static unsigned long nouveau_p...
2017 Jul 14
0
[PATCH 04/27] daemon: Reimplement ‘vfs_type’ API in OCaml.
...| MountableDevice
+ | MountablePath
+ | MountableBtrfsVol of string (* volume *)
+
+let to_string { m_type = t; m_device = device } =
+ match t with
+ | MountableDevice | MountablePath -> device
+ | MountableBtrfsVol volume ->
+ sprintf "btrfsvol:%s/%s" device volume
+
+let of_device device =
+ { m_type = MountableDevice; m_device = device }
+
+let of_path path =
+ { m_type = MountablePath; m_device = path }
+
+let of_btrfsvol device volume =
+ { m_type = MountableBtrfsVol volume; m_device = device }
diff --git a/daemon/mountable.mli b/daemon/mountable.mli
new file mode 1006...
2020 Feb 14
0
[PATCH 2/3] PCI: Add DMA configuration for virtual platforms
...s/pci/pci-driver.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 0454ca0e4e3f..69303a814f21 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -18,6 +18,7 @@
#include <linux/kexec.h>
#include <linux/of_device.h>
#include <linux/acpi.h>
+#include <linux/virt_iommu.h>
#include "pci.h"
#include "pcie/portdrv.h"
@@ -1602,6 +1603,10 @@ static int pci_dma_configure(struct device *dev)
struct device *bridge;
int ret = 0;
+ ret = virt_dma_configure(dev);
+ if (ret)...
2020 Aug 04
0
[vhost:vhost 42/49] drivers/rpmsg/virtio_rpmsg_bus.c:28:10: fatal error: 'linux/virtio_rpmsg.h' file not found
...ers/rpmsg/virtio_rpmsg_bus.c
13
14 #include <linux/dma-mapping.h>
15 #include <linux/idr.h>
16 #include <linux/jiffies.h>
17 #include <linux/kernel.h>
18 #include <linux/module.h>
19 #include <linux/mutex.h>
20 #include <linux/of_device.h>
21 #include <linux/rpmsg.h>
22 #include <linux/scatterlist.h>
23 #include <linux/slab.h>
24 #include <linux/sched.h>
25 #include <linux/virtio.h>
26 #include <linux/virtio_ids.h>
27 #include <linux/virtio_config.h>
> 2...
2020 Feb 14
1
[PATCH 2/3] PCI: Add DMA configuration for virtual platforms
...ed, 5 insertions(+)
>
> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index 0454ca0e4e3f..69303a814f21 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -18,6 +18,7 @@
> #include <linux/kexec.h>
> #include <linux/of_device.h>
> #include <linux/acpi.h>
> +#include <linux/virt_iommu.h>
> #include "pci.h"
> #include "pcie/portdrv.h"
>
> @@ -1602,6 +1603,10 @@ static int pci_dma_configure(struct device *dev)
> struct device *bridge;
> int ret = 0;...
2020 Feb 14
5
[PATCH 0/3] virtio-iommu on non-devicetree platforms
Add topology description to the virtio-iommu driver and enable x86
platforms. Since the RFC [1] I've mostly given up on ACPI tables, since
the internal discussions seem to have reached a dead end. The built-in
topology description presented here isn't ideal, but it is simple to
implement and doesn't impose a dependency on ACPI or device-tree, which
can be beneficial to lightweight
2020 Sep 02
0
[PATCH v6 2/4] rpmsg: move common structures and defines to headers
...rtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
> > index 9006fc7f73d0..f39c426f9c5e 100644
> > --- a/drivers/rpmsg/virtio_rpmsg_bus.c
> > +++ b/drivers/rpmsg/virtio_rpmsg_bus.c
> > @@ -19,6 +19,7 @@
> > #include <linux/mutex.h>
> > #include <linux/of_device.h>
> > #include <linux/rpmsg.h>
> > +#include <linux/rpmsg/virtio.h>
> > #include <linux/scatterlist.h>
> > #include <linux/slab.h>
> > #include <linux/sched.h>
> > @@ -27,6 +28,7 @@
> > #include <linux/virtio_ids.h&...
2017 Aug 02
2
Re: [PATCH 0/2] Add lightweight bindings for PCRE.
...n (
debug_matching "cciss";
let disk = PCRE.sub 1
and part = try Some (int_of_string (PCRE.sub 2)) with Not_found -> None in
resolve_cciss disk part default
)
else if PCRE.matches re_mdN spec then (
debug_matching "md<N>";
try
Mountable.of_device (StringMap.find spec md_map)
with
| Not_found -> default
)
Rewriting if/else chains without the global state is a pain too.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com...
2020 Sep 03
0
[PATCH v6 2/4] rpmsg: move common structures and defines to headers
...; > > index 9006fc7f73d0..f39c426f9c5e 100644
> > > > --- a/drivers/rpmsg/virtio_rpmsg_bus.c
> > > > +++ b/drivers/rpmsg/virtio_rpmsg_bus.c
> > > > @@ -19,6 +19,7 @@
> > > > #include <linux/mutex.h>
> > > > #include <linux/of_device.h>
> > > > #include <linux/rpmsg.h>
> > > > +#include <linux/rpmsg/virtio.h>
> > > > #include <linux/scatterlist.h>
> > > > #include <linux/slab.h>
> > > > #include <linux/sched.h>
> > > > @...
2015 Sep 04
4
[PATCH 0/4] tegra: DMA mask and IOMMU bit fixes
These 4 patches fix two issues that existed on Tegra regarding DMA:
1) The bit indicating whether to use an IOMMU or not was hardcoded ; make this
a platform property and use it in instmem
2) The DMA mask was not set for platform devices. Fix this by converting
more pci_dma* to the DMA API, and use that more generic code to set the
DMA mask properly for all platforms.
Tested on both x86
2018 Apr 10
9
[PATCH v2 0/5] daemon: generate almall the API OCaml interfaces
Hi,
as a followup for the signature fix for mount_vfs [1], here it is a
patch series to generate automatically all the OCaml interfaces of
daemon actions.
[1] https://www.redhat.com/archives/libguestfs/2018-April/msg00059.html
Thanks,
Pino Toscano (5):
daemon: directly use Optgroups
daemon: use the structs from the Structs module
daemon: move Lvm.lv_canonical to new Lvm_utils module
2020 Sep 01
8
[PATCH v6 0/4] Add a vhost RPMsg API
Hi,
Next update:
v6:
- rename include/linux/virtio_rpmsg.h -> include/linux/rpmsg/virtio.h
v5:
- don't hard-code message layout
v4:
- add endianness conversions to comply with the VirtIO standard
v3:
- address several checkpatch warnings
- address comments from Mathieu Poirier
v2:
- update patch #5 with a correct vhost_dev_init() prototype
- drop patch #6 - it depends on a different
2020 Sep 01
8
[PATCH v6 0/4] Add a vhost RPMsg API
Hi,
Next update:
v6:
- rename include/linux/virtio_rpmsg.h -> include/linux/rpmsg/virtio.h
v5:
- don't hard-code message layout
v4:
- add endianness conversions to comply with the VirtIO standard
v3:
- address several checkpatch warnings
- address comments from Mathieu Poirier
v2:
- update patch #5 with a correct vhost_dev_init() prototype
- drop patch #6 - it depends on a different