* Re: [PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
From: Yuval Shaia @ 2019-04-10 14:38 UTC (permalink / raw)
To: Cornelia Huck, pagupta
Cc: jack, kvm, mst, jasowang, david, qemu-devel, virtualization,
adilger.kernel, zwisler, aarcange, linux-nvdimm, david, willy,
hch, linux-acpi, linux-ext4, lenb, kilobyte, riel, stefanha,
pbonzini, lcapitulino, kwolf, nilal, tytso, xiaoguangrong.eric,
darrick.wong, rjw, linux-kernel, linux-xfs, linux-fsdevel,
imammedo
In-Reply-To: <20190410142426.5bf0d9a4.cohuck@redhat.com>
On Wed, Apr 10, 2019 at 02:24:26PM +0200, Cornelia Huck wrote:
> On Wed, 10 Apr 2019 09:38:22 +0530
> Pankaj Gupta <pagupta@redhat.com> wrote:
>
> > This patch adds virtio-pmem driver for KVM guest.
> >
> > Guest reads the persistent memory range information from
> > Qemu over VIRTIO and registers it on nvdimm_bus. It also
> > creates a nd_region object with the persistent memory
> > range information so that existing 'nvdimm/pmem' driver
> > can reserve this into system memory map. This way
> > 'virtio-pmem' driver uses existing functionality of pmem
> > driver to register persistent memory compatible for DAX
> > capable filesystems.
> >
> > This also provides function to perform guest flush over
> > VIRTIO from 'pmem' driver when userspace performs flush
> > on DAX memory range.
> >
> > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > ---
> > drivers/nvdimm/virtio_pmem.c | 88 ++++++++++++++++++++++
> > drivers/virtio/Kconfig | 10 +++
> > drivers/virtio/Makefile | 1 +
> > drivers/virtio/pmem.c | 124 +++++++++++++++++++++++++++++++
> > include/linux/virtio_pmem.h | 60 +++++++++++++++
> > include/uapi/linux/virtio_ids.h | 1 +
> > include/uapi/linux/virtio_pmem.h | 10 +++
> > 7 files changed, 294 insertions(+)
> > create mode 100644 drivers/nvdimm/virtio_pmem.c
> > create mode 100644 drivers/virtio/pmem.c
> > create mode 100644 include/linux/virtio_pmem.h
> > create mode 100644 include/uapi/linux/virtio_pmem.h
> >
> (...)
> > diff --git a/drivers/virtio/pmem.c b/drivers/virtio/pmem.c
> > new file mode 100644
> > index 000000000000..cc9de9589d56
> > --- /dev/null
> > +++ b/drivers/virtio/pmem.c
> > @@ -0,0 +1,124 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * virtio_pmem.c: Virtio pmem Driver
> > + *
> > + * Discovers persistent memory range information
> > + * from host and registers the virtual pmem device
> > + * with libnvdimm core.
> > + */
> > +#include <linux/virtio_pmem.h>
> > +#include <../../drivers/nvdimm/nd.h>
> > +
> > +static struct virtio_device_id id_table[] = {
> > + { VIRTIO_ID_PMEM, VIRTIO_DEV_ANY_ID },
> > + { 0 },
> > +};
> > +
> > + /* Initialize virt queue */
> > +static int init_vq(struct virtio_pmem *vpmem)
>
> IMHO, you don't gain much by splitting off this function...
It make sense to have all the vq-init-related stuff in one function, so
here pmem_lock and req_list are used only for the vq.
Saying that - maybe it would be better to have the 3 in one struct.
>
> > +{
> > + struct virtqueue *vq;
> > +
> > + /* single vq */
> > + vpmem->req_vq = vq = virtio_find_single_vq(vpmem->vdev,
> > + host_ack, "flush_queue");
> > + if (IS_ERR(vq))
> > + return PTR_ERR(vq);
>
> I'm personally not a fan of chained assignments... I think I'd just
> drop the 'vq' variable and operate on vpmem->req_vq directly.
+1
>
> > +
> > + spin_lock_init(&vpmem->pmem_lock);
> > + INIT_LIST_HEAD(&vpmem->req_list);
> > +
> > + return 0;
> > +};
> > +
> > +static int virtio_pmem_probe(struct virtio_device *vdev)
> > +{
> > + int err = 0;
> > + struct resource res;
> > + struct virtio_pmem *vpmem;
> > + struct nvdimm_bus *nvdimm_bus;
> > + struct nd_region_desc ndr_desc = {};
> > + int nid = dev_to_node(&vdev->dev);
> > + struct nd_region *nd_region;
> > +
> > + if (!vdev->config->get) {
> > + dev_err(&vdev->dev, "%s failure: config disabled\n",
>
> Maybe s/config disabled/config access disabled/ ? That seems to be the
> more common message.
>
> > + __func__);
> > + return -EINVAL;
> > + }
> > +
> > + vdev->priv = vpmem = devm_kzalloc(&vdev->dev, sizeof(*vpmem),
> > + GFP_KERNEL);
>
> Here, the vpmem variable makes sense for convenience, but I'm again not
> a fan of the chaining :)
+1
>
> > + if (!vpmem) {
> > + err = -ENOMEM;
> > + goto out_err;
> > + }
> > +
> > + vpmem->vdev = vdev;
> > + err = init_vq(vpmem);
> > + if (err)
> > + goto out_err;
> > +
> > + virtio_cread(vpmem->vdev, struct virtio_pmem_config,
> > + start, &vpmem->start);
> > + virtio_cread(vpmem->vdev, struct virtio_pmem_config,
> > + size, &vpmem->size);
> > +
> > + res.start = vpmem->start;
> > + res.end = vpmem->start + vpmem->size-1;
> > + vpmem->nd_desc.provider_name = "virtio-pmem";
> > + vpmem->nd_desc.module = THIS_MODULE;
> > +
> > + vpmem->nvdimm_bus = nvdimm_bus = nvdimm_bus_register(&vdev->dev,
> > + &vpmem->nd_desc);
>
> And here :)
>
> > + if (!nvdimm_bus)
> > + goto out_vq;
> > +
> > + dev_set_drvdata(&vdev->dev, nvdimm_bus);
> > +
> > + ndr_desc.res = &res;
> > + ndr_desc.numa_node = nid;
> > + ndr_desc.flush = virtio_pmem_flush;
> > + set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);
> > + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> > + nd_region = nvdimm_pmem_region_create(nvdimm_bus, &ndr_desc);
> > + nd_region->provider_data = dev_to_virtio
> > + (nd_region->dev.parent->parent);
>
> Isn't it clear that this parent chain will always end up at &vdev->dev?
> Maybe simply set ->provider_data to vdev directly? (Does it need to
> grab a reference count of the device, BTW?)
>
> > +
> > + if (!nd_region)
> > + goto out_nd;
>
> Probably better to do this check before you access nd_region's
> members :)
>
> > +
> > + return 0;
> > +out_nd:
> > + err = -ENXIO;
> > + nvdimm_bus_unregister(nvdimm_bus);
> > +out_vq:
> > + vdev->config->del_vqs(vdev);
> > +out_err:
> > + dev_err(&vdev->dev, "failed to register virtio pmem memory\n");
> > + return err;
> > +}
> > +
> > +static void virtio_pmem_remove(struct virtio_device *vdev)
> > +{
> > + struct virtio_pmem *vpmem = vdev->priv;
> > + struct nvdimm_bus *nvdimm_bus = dev_get_drvdata(&vdev->dev);
> > +
> > + nvdimm_bus_unregister(nvdimm_bus);
>
> I haven't followed this around the nvdimm code, but is the nd_region
> you created during probe cleaned up automatically, or would you need to
> do something here?
>
> > + vdev->config->del_vqs(vdev);
> > + vdev->config->reset(vdev);
> > + kfree(vpmem);
>
> You allocated vpmem via devm_kzalloc; isn't it freed automatically on
> remove?
>
> > +}
> > +
> > +static struct virtio_driver virtio_pmem_driver = {
> > + .driver.name = KBUILD_MODNAME,
> > + .driver.owner = THIS_MODULE,
> > + .id_table = id_table,
> > + .probe = virtio_pmem_probe,
> > + .remove = virtio_pmem_remove,
> > +};
> > +
> > +module_virtio_driver(virtio_pmem_driver);
> > +MODULE_DEVICE_TABLE(virtio, id_table);
> > +MODULE_DESCRIPTION("Virtio pmem driver");
> > +MODULE_LICENSE("GPL");
>
> Only looked at this from the general virtio driver angle; seems fine
> apart from some easy-to-fix issues and some personal style preference
> things.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply
* Re: [PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
From: Yuval Shaia @ 2019-04-10 14:38 UTC (permalink / raw)
To: Cornelia Huck
Cc: Pankaj Gupta, jack, kvm, mst, david, qemu-devel, virtualization,
adilger.kernel, zwisler, aarcange, dave.jiang, linux-nvdimm,
vishal.l.verma, willy, hch, linux-acpi, jmoyer, linux-ext4, lenb,
kilobyte, riel, stefanha, pbonzini, dan.j.williams, lcapitulino,
nilal, tytso, xiaoguangrong.eric, darrick.wong, rjw, linux-kernel,
linux-xfs, linux-fsdevel, imammedo
In-Reply-To: <20190410142426.5bf0d9a4.cohuck@redhat.com>
On Wed, Apr 10, 2019 at 02:24:26PM +0200, Cornelia Huck wrote:
> On Wed, 10 Apr 2019 09:38:22 +0530
> Pankaj Gupta <pagupta@redhat.com> wrote:
>
> > This patch adds virtio-pmem driver for KVM guest.
> >
> > Guest reads the persistent memory range information from
> > Qemu over VIRTIO and registers it on nvdimm_bus. It also
> > creates a nd_region object with the persistent memory
> > range information so that existing 'nvdimm/pmem' driver
> > can reserve this into system memory map. This way
> > 'virtio-pmem' driver uses existing functionality of pmem
> > driver to register persistent memory compatible for DAX
> > capable filesystems.
> >
> > This also provides function to perform guest flush over
> > VIRTIO from 'pmem' driver when userspace performs flush
> > on DAX memory range.
> >
> > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > ---
> > drivers/nvdimm/virtio_pmem.c | 88 ++++++++++++++++++++++
> > drivers/virtio/Kconfig | 10 +++
> > drivers/virtio/Makefile | 1 +
> > drivers/virtio/pmem.c | 124 +++++++++++++++++++++++++++++++
> > include/linux/virtio_pmem.h | 60 +++++++++++++++
> > include/uapi/linux/virtio_ids.h | 1 +
> > include/uapi/linux/virtio_pmem.h | 10 +++
> > 7 files changed, 294 insertions(+)
> > create mode 100644 drivers/nvdimm/virtio_pmem.c
> > create mode 100644 drivers/virtio/pmem.c
> > create mode 100644 include/linux/virtio_pmem.h
> > create mode 100644 include/uapi/linux/virtio_pmem.h
> >
> (...)
> > diff --git a/drivers/virtio/pmem.c b/drivers/virtio/pmem.c
> > new file mode 100644
> > index 000000000000..cc9de9589d56
> > --- /dev/null
> > +++ b/drivers/virtio/pmem.c
> > @@ -0,0 +1,124 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * virtio_pmem.c: Virtio pmem Driver
> > + *
> > + * Discovers persistent memory range information
> > + * from host and registers the virtual pmem device
> > + * with libnvdimm core.
> > + */
> > +#include <linux/virtio_pmem.h>
> > +#include <../../drivers/nvdimm/nd.h>
> > +
> > +static struct virtio_device_id id_table[] = {
> > + { VIRTIO_ID_PMEM, VIRTIO_DEV_ANY_ID },
> > + { 0 },
> > +};
> > +
> > + /* Initialize virt queue */
> > +static int init_vq(struct virtio_pmem *vpmem)
>
> IMHO, you don't gain much by splitting off this function...
It make sense to have all the vq-init-related stuff in one function, so
here pmem_lock and req_list are used only for the vq.
Saying that - maybe it would be better to have the 3 in one struct.
>
> > +{
> > + struct virtqueue *vq;
> > +
> > + /* single vq */
> > + vpmem->req_vq = vq = virtio_find_single_vq(vpmem->vdev,
> > + host_ack, "flush_queue");
> > + if (IS_ERR(vq))
> > + return PTR_ERR(vq);
>
> I'm personally not a fan of chained assignments... I think I'd just
> drop the 'vq' variable and operate on vpmem->req_vq directly.
+1
>
> > +
> > + spin_lock_init(&vpmem->pmem_lock);
> > + INIT_LIST_HEAD(&vpmem->req_list);
> > +
> > + return 0;
> > +};
> > +
> > +static int virtio_pmem_probe(struct virtio_device *vdev)
> > +{
> > + int err = 0;
> > + struct resource res;
> > + struct virtio_pmem *vpmem;
> > + struct nvdimm_bus *nvdimm_bus;
> > + struct nd_region_desc ndr_desc = {};
> > + int nid = dev_to_node(&vdev->dev);
> > + struct nd_region *nd_region;
> > +
> > + if (!vdev->config->get) {
> > + dev_err(&vdev->dev, "%s failure: config disabled\n",
>
> Maybe s/config disabled/config access disabled/ ? That seems to be the
> more common message.
>
> > + __func__);
> > + return -EINVAL;
> > + }
> > +
> > + vdev->priv = vpmem = devm_kzalloc(&vdev->dev, sizeof(*vpmem),
> > + GFP_KERNEL);
>
> Here, the vpmem variable makes sense for convenience, but I'm again not
> a fan of the chaining :)
+1
>
> > + if (!vpmem) {
> > + err = -ENOMEM;
> > + goto out_err;
> > + }
> > +
> > + vpmem->vdev = vdev;
> > + err = init_vq(vpmem);
> > + if (err)
> > + goto out_err;
> > +
> > + virtio_cread(vpmem->vdev, struct virtio_pmem_config,
> > + start, &vpmem->start);
> > + virtio_cread(vpmem->vdev, struct virtio_pmem_config,
> > + size, &vpmem->size);
> > +
> > + res.start = vpmem->start;
> > + res.end = vpmem->start + vpmem->size-1;
> > + vpmem->nd_desc.provider_name = "virtio-pmem";
> > + vpmem->nd_desc.module = THIS_MODULE;
> > +
> > + vpmem->nvdimm_bus = nvdimm_bus = nvdimm_bus_register(&vdev->dev,
> > + &vpmem->nd_desc);
>
> And here :)
>
> > + if (!nvdimm_bus)
> > + goto out_vq;
> > +
> > + dev_set_drvdata(&vdev->dev, nvdimm_bus);
> > +
> > + ndr_desc.res = &res;
> > + ndr_desc.numa_node = nid;
> > + ndr_desc.flush = virtio_pmem_flush;
> > + set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);
> > + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> > + nd_region = nvdimm_pmem_region_create(nvdimm_bus, &ndr_desc);
> > + nd_region->provider_data = dev_to_virtio
> > + (nd_region->dev.parent->parent);
>
> Isn't it clear that this parent chain will always end up at &vdev->dev?
> Maybe simply set ->provider_data to vdev directly? (Does it need to
> grab a reference count of the device, BTW?)
>
> > +
> > + if (!nd_region)
> > + goto out_nd;
>
> Probably better to do this check before you access nd_region's
> members :)
>
> > +
> > + return 0;
> > +out_nd:
> > + err = -ENXIO;
> > + nvdimm_bus_unregister(nvdimm_bus);
> > +out_vq:
> > + vdev->config->del_vqs(vdev);
> > +out_err:
> > + dev_err(&vdev->dev, "failed to register virtio pmem memory\n");
> > + return err;
> > +}
> > +
> > +static void virtio_pmem_remove(struct virtio_device *vdev)
> > +{
> > + struct virtio_pmem *vpmem = vdev->priv;
> > + struct nvdimm_bus *nvdimm_bus = dev_get_drvdata(&vdev->dev);
> > +
> > + nvdimm_bus_unregister(nvdimm_bus);
>
> I haven't followed this around the nvdimm code, but is the nd_region
> you created during probe cleaned up automatically, or would you need to
> do something here?
>
> > + vdev->config->del_vqs(vdev);
> > + vdev->config->reset(vdev);
> > + kfree(vpmem);
>
> You allocated vpmem via devm_kzalloc; isn't it freed automatically on
> remove?
>
> > +}
> > +
> > +static struct virtio_driver virtio_pmem_driver = {
> > + .driver.name = KBUILD_MODNAME,
> > + .driver.owner = THIS_MODULE,
> > + .id_table = id_table,
> > + .probe = virtio_pmem_probe,
> > + .remove = virtio_pmem_remove,
> > +};
> > +
> > +module_virtio_driver(virtio_pmem_driver);
> > +MODULE_DEVICE_TABLE(virtio, id_table);
> > +MODULE_DESCRIPTION("Virtio pmem driver");
> > +MODULE_LICENSE("GPL");
>
> Only looked at this from the general virtio driver angle; seems fine
> apart from some easy-to-fix issues and some personal style preference
> things.
^ permalink raw reply
* Re: [PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
From: Yuval Shaia @ 2019-04-10 14:38 UTC (permalink / raw)
To: Cornelia Huck, pagupta-H+wXaHxf7aLQT0dZR+AlfA
Cc: jack-AlSwsSmVLrQ, kvm-u79uwXL29TY76Z2rM5mHXA,
mst-H+wXaHxf7aLQT0dZR+AlfA, jasowang-H+wXaHxf7aLQT0dZR+AlfA,
david-FqsqvQoI3Ljby3iVrkZq2A, qemu-devel-qX2TKyscuCcdnm+yROfE0A,
virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
adilger.kernel-m1MBpc4rdrD3fQ9qLvQP4Q,
zwisler-DgEjT+Ai2ygdnm+yROfE0A, aarcange-H+wXaHxf7aLQT0dZR+AlfA,
linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw, david-H+wXaHxf7aLQT0dZR+AlfA,
willy-wEGCiKHe2LqWVfeAwA7xHQ, hch-wEGCiKHe2LqWVfeAwA7xHQ,
linux-acpi-u79uwXL29TY76Z2rM5mHXA,
linux-ext4-u79uwXL29TY76Z2rM5mHXA, lenb-DgEjT+Ai2ygdnm+yROfE0A,
kilobyte-b9QjgO8OEXPVItvQsEIGlw, riel-ebMLmSuQjDVBDgjK7y7TUQ,
stefanha-H+wXaHxf7aLQT0dZR+AlfA, pbonzini-H+wXaHxf7aLQT0dZR+AlfA,
lcapitulino-H+wXaHxf7aLQT0dZR+AlfA, kwolf-H+wXaHxf7aLQT0dZR+AlfA,
nilal-H+wXaHxf7aLQT0dZR+AlfA, tytso-3s7WtUTddSA,
xiaoguangrong.eric-Re5JQEeQqe8AvxtiuMwx3w,
darrick.wong-QHcLZuEGTsvQT0dZR+AlfA, rjw-LthD3rsA81gm4RdzfppkhA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-xfs-u79uwXL29TY76Z2rM5mHXA,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
imammedo-H+wXaHxf7aLQT0dZR+AlfA
In-Reply-To: <20190410142426.5bf0d9a4.cohuck-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On Wed, Apr 10, 2019 at 02:24:26PM +0200, Cornelia Huck wrote:
> On Wed, 10 Apr 2019 09:38:22 +0530
> Pankaj Gupta <pagupta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>
> > This patch adds virtio-pmem driver for KVM guest.
> >
> > Guest reads the persistent memory range information from
> > Qemu over VIRTIO and registers it on nvdimm_bus. It also
> > creates a nd_region object with the persistent memory
> > range information so that existing 'nvdimm/pmem' driver
> > can reserve this into system memory map. This way
> > 'virtio-pmem' driver uses existing functionality of pmem
> > driver to register persistent memory compatible for DAX
> > capable filesystems.
> >
> > This also provides function to perform guest flush over
> > VIRTIO from 'pmem' driver when userspace performs flush
> > on DAX memory range.
> >
> > Signed-off-by: Pankaj Gupta <pagupta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> > ---
> > drivers/nvdimm/virtio_pmem.c | 88 ++++++++++++++++++++++
> > drivers/virtio/Kconfig | 10 +++
> > drivers/virtio/Makefile | 1 +
> > drivers/virtio/pmem.c | 124 +++++++++++++++++++++++++++++++
> > include/linux/virtio_pmem.h | 60 +++++++++++++++
> > include/uapi/linux/virtio_ids.h | 1 +
> > include/uapi/linux/virtio_pmem.h | 10 +++
> > 7 files changed, 294 insertions(+)
> > create mode 100644 drivers/nvdimm/virtio_pmem.c
> > create mode 100644 drivers/virtio/pmem.c
> > create mode 100644 include/linux/virtio_pmem.h
> > create mode 100644 include/uapi/linux/virtio_pmem.h
> >
> (...)
> > diff --git a/drivers/virtio/pmem.c b/drivers/virtio/pmem.c
> > new file mode 100644
> > index 000000000000..cc9de9589d56
> > --- /dev/null
> > +++ b/drivers/virtio/pmem.c
> > @@ -0,0 +1,124 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * virtio_pmem.c: Virtio pmem Driver
> > + *
> > + * Discovers persistent memory range information
> > + * from host and registers the virtual pmem device
> > + * with libnvdimm core.
> > + */
> > +#include <linux/virtio_pmem.h>
> > +#include <../../drivers/nvdimm/nd.h>
> > +
> > +static struct virtio_device_id id_table[] = {
> > + { VIRTIO_ID_PMEM, VIRTIO_DEV_ANY_ID },
> > + { 0 },
> > +};
> > +
> > + /* Initialize virt queue */
> > +static int init_vq(struct virtio_pmem *vpmem)
>
> IMHO, you don't gain much by splitting off this function...
It make sense to have all the vq-init-related stuff in one function, so
here pmem_lock and req_list are used only for the vq.
Saying that - maybe it would be better to have the 3 in one struct.
>
> > +{
> > + struct virtqueue *vq;
> > +
> > + /* single vq */
> > + vpmem->req_vq = vq = virtio_find_single_vq(vpmem->vdev,
> > + host_ack, "flush_queue");
> > + if (IS_ERR(vq))
> > + return PTR_ERR(vq);
>
> I'm personally not a fan of chained assignments... I think I'd just
> drop the 'vq' variable and operate on vpmem->req_vq directly.
+1
>
> > +
> > + spin_lock_init(&vpmem->pmem_lock);
> > + INIT_LIST_HEAD(&vpmem->req_list);
> > +
> > + return 0;
> > +};
> > +
> > +static int virtio_pmem_probe(struct virtio_device *vdev)
> > +{
> > + int err = 0;
> > + struct resource res;
> > + struct virtio_pmem *vpmem;
> > + struct nvdimm_bus *nvdimm_bus;
> > + struct nd_region_desc ndr_desc = {};
> > + int nid = dev_to_node(&vdev->dev);
> > + struct nd_region *nd_region;
> > +
> > + if (!vdev->config->get) {
> > + dev_err(&vdev->dev, "%s failure: config disabled\n",
>
> Maybe s/config disabled/config access disabled/ ? That seems to be the
> more common message.
>
> > + __func__);
> > + return -EINVAL;
> > + }
> > +
> > + vdev->priv = vpmem = devm_kzalloc(&vdev->dev, sizeof(*vpmem),
> > + GFP_KERNEL);
>
> Here, the vpmem variable makes sense for convenience, but I'm again not
> a fan of the chaining :)
+1
>
> > + if (!vpmem) {
> > + err = -ENOMEM;
> > + goto out_err;
> > + }
> > +
> > + vpmem->vdev = vdev;
> > + err = init_vq(vpmem);
> > + if (err)
> > + goto out_err;
> > +
> > + virtio_cread(vpmem->vdev, struct virtio_pmem_config,
> > + start, &vpmem->start);
> > + virtio_cread(vpmem->vdev, struct virtio_pmem_config,
> > + size, &vpmem->size);
> > +
> > + res.start = vpmem->start;
> > + res.end = vpmem->start + vpmem->size-1;
> > + vpmem->nd_desc.provider_name = "virtio-pmem";
> > + vpmem->nd_desc.module = THIS_MODULE;
> > +
> > + vpmem->nvdimm_bus = nvdimm_bus = nvdimm_bus_register(&vdev->dev,
> > + &vpmem->nd_desc);
>
> And here :)
>
> > + if (!nvdimm_bus)
> > + goto out_vq;
> > +
> > + dev_set_drvdata(&vdev->dev, nvdimm_bus);
> > +
> > + ndr_desc.res = &res;
> > + ndr_desc.numa_node = nid;
> > + ndr_desc.flush = virtio_pmem_flush;
> > + set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);
> > + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> > + nd_region = nvdimm_pmem_region_create(nvdimm_bus, &ndr_desc);
> > + nd_region->provider_data = dev_to_virtio
> > + (nd_region->dev.parent->parent);
>
> Isn't it clear that this parent chain will always end up at &vdev->dev?
> Maybe simply set ->provider_data to vdev directly? (Does it need to
> grab a reference count of the device, BTW?)
>
> > +
> > + if (!nd_region)
> > + goto out_nd;
>
> Probably better to do this check before you access nd_region's
> members :)
>
> > +
> > + return 0;
> > +out_nd:
> > + err = -ENXIO;
> > + nvdimm_bus_unregister(nvdimm_bus);
> > +out_vq:
> > + vdev->config->del_vqs(vdev);
> > +out_err:
> > + dev_err(&vdev->dev, "failed to register virtio pmem memory\n");
> > + return err;
> > +}
> > +
> > +static void virtio_pmem_remove(struct virtio_device *vdev)
> > +{
> > + struct virtio_pmem *vpmem = vdev->priv;
> > + struct nvdimm_bus *nvdimm_bus = dev_get_drvdata(&vdev->dev);
> > +
> > + nvdimm_bus_unregister(nvdimm_bus);
>
> I haven't followed this around the nvdimm code, but is the nd_region
> you created during probe cleaned up automatically, or would you need to
> do something here?
>
> > + vdev->config->del_vqs(vdev);
> > + vdev->config->reset(vdev);
> > + kfree(vpmem);
>
> You allocated vpmem via devm_kzalloc; isn't it freed automatically on
> remove?
>
> > +}
> > +
> > +static struct virtio_driver virtio_pmem_driver = {
> > + .driver.name = KBUILD_MODNAME,
> > + .driver.owner = THIS_MODULE,
> > + .id_table = id_table,
> > + .probe = virtio_pmem_probe,
> > + .remove = virtio_pmem_remove,
> > +};
> > +
> > +module_virtio_driver(virtio_pmem_driver);
> > +MODULE_DEVICE_TABLE(virtio, id_table);
> > +MODULE_DESCRIPTION("Virtio pmem driver");
> > +MODULE_LICENSE("GPL");
>
> Only looked at this from the general virtio driver angle; seems fine
> apart from some easy-to-fix issues and some personal style preference
> things.
^ permalink raw reply
* Re: [PATCH v2 0/4] Extended Key ID support
From: Marcel Holtmann @ 2019-04-10 14:37 UTC (permalink / raw)
To: Alexander Wetzel; +Cc: Johannes Berg, linux-wireless
In-Reply-To: <e8ad598e-a2c4-45be-6923-11fccf80d296@wetzel-home.de>
Ho Alexander,
>>> This patch series adds support for IEEE 802.11-2016 Extended Key ID
>>> support. Compared to the last RFC there are again quite some API
>>> changes, but also some bug fixes. (The bug fixes I remember are outlined
>>> in the different patches.)
>> FWIW, I've applied the first two patches here.
>> I'd really like you to continue with only that for now, and (try to) get
>> hostapd/wpa_supplicant changes upstream, perhaps with corresponding
>> hwsim tests. That way, we can see this working live.
>
> That's splendid:-)
> I'll try to get the hostapd/wpa_supplicant patches finalized in the next weeks. Hopefully I have something to submit here once the Extended Key ID API is in mainline immediately.
have you tried to add Extended Key ID support into iwd?
Regards
Marcel
^ permalink raw reply
* Re: (unknown)
From: Jan Kiszka @ 2019-04-10 14:36 UTC (permalink / raw)
To: Norbert Lange, xenomai
In-Reply-To: <20190410111408.18824-1-norbert.lange@andritz.com>
On 10.04.19 13:14, Norbert Lange via Xenomai wrote:
> V3 of the patchset, corrected many checkstyle issues,
> simplified condvar autoinit.
>
> I did not use ARRAY_SIZE, as that would need another include.
>
All applied now. Patch 1 was not cleanly based on next, though. I think some
local style cleanup was missing.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply
* Re: [dpdk-dev] [PATCH] doc: add guideines for initial PMD submission
From: Rami Rosen @ 2019-04-10 14:36 UTC (permalink / raw)
To: Trahe, Fiona
Cc: dev@dpdk.org, Yigit, Ferruh, De Lara Guarch, Pablo,
akhil.goyal@nxp.com, Mcnamara, John, Kovacevic, Marko,
stable@dpdk.org
In-Reply-To: <348A99DA5F5B7549AA880327E580B4358973D6A7@IRSMSX101.ger.corp.intel.com>
Hi Fiona,
>[Fiona] Good idea to add this patch. However despite the name crypto is
actual broader.... so maybe
>"If you add a new crypto or compression PMD.... "
Thanks for this feedback, I will fix it in V2 of the patch.
Regards,
Rami Rosen
^ permalink raw reply
* [PATCH] nvme: improve logging
From: Hannes Reinecke @ 2019-04-10 14:36 UTC (permalink / raw)
In-Reply-To: <a6b38bc2-8b59-e36c-7d43-db56ebaac452@gmail.com>
On 4/10/19 4:25 PM, Minwoo Im wrote:
> On 4/10/19 11:17 PM, Hannes Reinecke wrote:
>> Currently nvme is very reluctant if it comes to logging anything,
>> _unless_ it's an ANA AEN. So this patch tries to remedy this by
>> decreasing the priority for the ANA AEN logging message, and improve
>> the logging when calling nvme_reset_ctrl().
>>
>> Signed-off-by: Hannes Reinecke <hare at suse.com>
>> ---
>> ? drivers/nvme/host/core.c????? | 44
>> +++++++++++++++++++++++++++++--------------
>> ? drivers/nvme/host/multipath.c |? 5 ++++-
>> ? 2 files changed, 34 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
>> index 8d285bfcd352..98260b2c7a6f 100644
>> --- a/drivers/nvme/host/core.c
>> +++ b/drivers/nvme/host/core.c
>> @@ -94,6 +94,24 @@ static void nvme_put_subsystem(struct
>> nvme_subsystem *subsys);
>> ? static void nvme_remove_invalid_namespaces(struct nvme_ctrl *ctrl,
>> ???????????????????????? unsigned nsid);
>> +static const char *nvme_ctrl_state_name(struct nvme_ctrl *ctrl)
>> +{
>> +??? static const char *const state_name[] = {
>> +??????? [NVME_CTRL_NEW]??????? = "new",
>> +??????? [NVME_CTRL_LIVE]??? = "live",
>> +??????? [NVME_CTRL_ADMIN_ONLY]??? = "only-admin",
>> +??????? [NVME_CTRL_RESETTING]??? = "resetting",
>> +??????? [NVME_CTRL_CONNECTING]??? = "connecting",
>> +??????? [NVME_CTRL_DELETING]??? = "deleting",
>> +??????? [NVME_CTRL_DEAD]??? = "dead",
>> +??? };
>> +
>> +??? if ((unsigned)ctrl->state < ARRAY_SIZE(state_name) &&
>> +??????? state_name[ctrl->state])
>> +??????? return state_name[ctrl->state];
>> +??? return NULL;
>
> Hi, Hannes,
>
> IMHO, If you want to print out "unknown" in the caller level, why don't
> we just
> return "unknown" string itself to the caller to make caller don't need
> to print
> out "unknown" OR "unknown state\n" just like below ?
>
> I think this might make duplications for "unknown" string in callers.
>
> Thanks,
>
>> +}
>> +
>> ? static void nvme_set_queue_dying(struct nvme_ns *ns)
>> ? {
>> ????? /*
>> @@ -119,10 +137,17 @@ static void nvme_queue_scan(struct nvme_ctrl *ctrl)
>> ? int nvme_reset_ctrl(struct nvme_ctrl *ctrl)
>> ? {
>> -??? if (!nvme_change_ctrl_state(ctrl, NVME_CTRL_RESETTING))
>> +??? if (!nvme_change_ctrl_state(ctrl, NVME_CTRL_RESETTING)) {
>> +??????? const char *state_name = nvme_ctrl_state_name(ctrl);
>> +
>> +??????? dev_warn(ctrl->device, "cannot reset ctrl in state %s\n",
>> +???????????? state_name ? state_name : "unknown");
>> ????????? return -EBUSY;
>> -??? if (!queue_work(nvme_reset_wq, &ctrl->reset_work))
>> +??? }
>> +??? if (!queue_work(nvme_reset_wq, &ctrl->reset_work)) {
>> +??????? dev_dbg(ctrl->device, "ctrl reset already queued\n");
>> ????????? return -EBUSY;
>> +??? }
>> ????? return 0;
>> ? }
>> ? EXPORT_SYMBOL_GPL(nvme_reset_ctrl);
>> @@ -2971,19 +2996,10 @@ static ssize_t nvme_sysfs_show_state(struct
>> device *dev,
>> ?????????????????????? char *buf)
>> ? {
>> ????? struct nvme_ctrl *ctrl = dev_get_drvdata(dev);
>> -??? static const char *const state_name[] = {
>> -??????? [NVME_CTRL_NEW]??????? = "new",
>> -??????? [NVME_CTRL_LIVE]??? = "live",
>> -??????? [NVME_CTRL_ADMIN_ONLY]??? = "only-admin",
>> -??????? [NVME_CTRL_RESETTING]??? = "resetting",
>> -??????? [NVME_CTRL_CONNECTING]??? = "connecting",
>> -??????? [NVME_CTRL_DELETING]??? = "deleting",
>> -??????? [NVME_CTRL_DEAD]??? = "dead",
>> -??? };
>> +??? const char *state_name = nvme_ctrl_state_name(ctrl);
>> -??? if ((unsigned)ctrl->state < ARRAY_SIZE(state_name) &&
>> -??????? state_name[ctrl->state])
>> -??????? return sprintf(buf, "%s\n", state_name[ctrl->state]);
>> +??? if (state_name)
>> +??????? return sprintf(buf, "%s\n", state_name);
>> ????? return sprintf(buf, "unknown state\n");
>> ? }
>> diff --git a/drivers/nvme/host/multipath.c
>> b/drivers/nvme/host/multipath.c
>> index 503539d4616a..cca60044163b 100644
>> --- a/drivers/nvme/host/multipath.c
>> +++ b/drivers/nvme/host/multipath.c
>> @@ -81,6 +81,9 @@ void nvme_failover_req(struct request *req)
>> ?????????? * Reset the controller for any non-ANA error as we don't know
>> ?????????? * what caused the error.
>> ?????????? */
>> +??????? dev_info(ns->ctrl->device,
>> +??????????? "nvme status 0x%04x, resetting controller\n",
>> +??????????? status);
>> ????????? nvme_reset_ctrl(ns->ctrl);
>> ????????? break;
>> ????? }
>> @@ -423,7 +426,7 @@ static int nvme_update_ana_state(struct nvme_ctrl
>> *ctrl,
>> ????? unsigned *nr_change_groups = data;
>> ????? struct nvme_ns *ns;
>> -??? dev_info(ctrl->device, "ANA group %d: %s.\n",
>> +??? dev_dbg(ctrl->device, "ANA group %d: %s.\n",
>> ????????????? le32_to_cpu(desc->grpid),
>> ????????????? nvme_ana_state_names[desc->state]);
>>
>
Good point. Will be resending.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare at suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG N?rnberg)
^ permalink raw reply
* [U-Boot] [PATCH v2] imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
From: Parthiban Nallathambi @ 2019-04-10 14:35 UTC (permalink / raw)
To: u-boot
Extend PHYTEC phyBOARD-i.MX6UL for phyCORE-i.MX6UL SoM (PCL063)
with eMMC on SoM.
CPU: Freescale i.MX6ULL rev1.0 792 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 38C
Reset cause: POR
Model: Phytec phyBOARD-i.MX6ULL-Segin SBC
Board: PHYTEC phyCORE-i.MX6ULL
DRAM: 256 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
In: serial at 02020000
Out: serial at 02020000
Err: serial at 02020000
Net: FEC0
Working:
- Eth0
- i2C
- MMC/SD
- eMMC
- UART (1 & 5)
- USB (host & otg)
Signed-off-by: Parthiban Nallathambi <parthitce@gmail.com>
---
Notes:
Changes in v2:
- disabled gpmi and usdhc by default in pcl063-common.dtsi. Board
dts enables it based on the flash storage which is present.
- added CONFIG_SYS_FSL_USDHC_NUM in pcl063.h
arch/arm/dts/Makefile | 1 +
arch/arm/dts/imx6ul-phycore-segin.dts | 7 +-
arch/arm/dts/imx6ull-phycore-segin.dts | 70 +++++++++++
...{imx6ul-pcl063.dtsi => pcl063-common.dtsi} | 33 ++++-
arch/arm/mach-imx/mx6/Kconfig | 12 ++
board/phytec/pcl063/Kconfig | 13 ++
board/phytec/pcl063/MAINTAINERS | 6 +-
board/phytec/pcl063/pcl063.c | 5 +-
board/phytec/pcl063/spl.c | 76 +++++++++++-
configs/phycore_pcl063_ull_defconfig | 54 ++++++++
include/configs/pcl063.h | 2 +
include/configs/pcl063_ull.h | 117 ++++++++++++++++++
12 files changed, 384 insertions(+), 12 deletions(-)
create mode 100644 arch/arm/dts/imx6ull-phycore-segin.dts
rename arch/arm/dts/{imx6ul-pcl063.dtsi => pcl063-common.dtsi} (83%)
create mode 100644 configs/phycore_pcl063_ull_defconfig
create mode 100644 include/configs/pcl063_ull.h
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 930b7e03db..8459acb344 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -539,6 +539,7 @@ dtb-$(CONFIG_MX6UL) += \
dtb-$(CONFIG_MX6ULL) += \
imx6ull-14x14-evk.dtb \
imx6ull-colibri.dtb \
+ imx6ull-phycore-segin.dtb
dtb-$(CONFIG_MX7) += imx7d-sdb.dtb \
imx7d-sdb-qspi.dtb \
diff --git a/arch/arm/dts/imx6ul-phycore-segin.dts b/arch/arm/dts/imx6ul-phycore-segin.dts
index a46012e2b4..7d68bf8430 100644
--- a/arch/arm/dts/imx6ul-phycore-segin.dts
+++ b/arch/arm/dts/imx6ul-phycore-segin.dts
@@ -16,7 +16,8 @@
/dts-v1/;
-#include "imx6ul-pcl063.dtsi"
+#include "imx6ul.dtsi"
+#include "pcl063-common.dtsi"
/ {
model = "Phytec phyBOARD-i.MX6UL-Segin SBC";
@@ -24,6 +25,10 @@
"fsl,imx6ul";
};
+&gpmi {
+ status = "okay";
+};
+
&i2c1 {
i2c_rtc: rtc at 68 {
compatible = "microcrystal,rv4162";
diff --git a/arch/arm/dts/imx6ull-phycore-segin.dts b/arch/arm/dts/imx6ull-phycore-segin.dts
new file mode 100644
index 0000000000..6df3ad2e4a
--- /dev/null
+++ b/arch/arm/dts/imx6ull-phycore-segin.dts
@@ -0,0 +1,70 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2019 Parthiban Nallathambi <parthitce@gmail.com>
+ */
+
+/dts-v1/;
+
+#include "imx6ull.dtsi"
+#include "pcl063-common.dtsi"
+
+/ {
+ model = "Phytec phyBOARD-i.MX6ULL-Segin SBC";
+ compatible = "phytec,phyboard-imx6ull-segin", "phytec,imx6ull-pcl063",
+ "fsl,imx6ull";
+};
+
+&i2c1 {
+ i2c_rtc: rtc at 68 {
+ compatible = "microcrystal,rv4162";
+ reg = <0x68>;
+ status = "okay";
+ };
+};
+
+&uart5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart5>;
+ uart-has-rtscts;
+ status = "okay";
+};
+
+&usdhc2 {
+ status = "okay";
+};
+
+&usbotg1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usb_otg1_id>;
+ dr_mode = "otg";
+ srp-disable;
+ hnp-disable;
+ adp-disable;
+ status = "okay";
+};
+
+&usbotg2 {
+ dr_mode = "host";
+ disable-over-current;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl-names = "default";
+
+ pinctrl_uart5: uart5grp {
+ fsl,pins = <
+ MX6UL_PAD_UART5_TX_DATA__UART5_DCE_TX 0x1b0b1
+ MX6UL_PAD_UART5_RX_DATA__UART5_DCE_RX 0x1b0b1
+ MX6UL_PAD_GPIO1_IO08__UART5_DCE_RTS 0x1b0b1
+ MX6UL_PAD_GPIO1_IO09__UART5_DCE_CTS 0x1b0b1
+ >;
+ };
+
+ pinctrl_usb_otg1_id: usbotg1idgrp {
+ fsl,pins = <
+ MX6UL_PAD_GPIO1_IO00__ANATOP_OTG1_ID 0x17059
+ >;
+ };
+
+};
diff --git a/arch/arm/dts/imx6ul-pcl063.dtsi b/arch/arm/dts/pcl063-common.dtsi
similarity index 83%
rename from arch/arm/dts/imx6ul-pcl063.dtsi
rename to arch/arm/dts/pcl063-common.dtsi
index 24a6a47983..2b14b2dc5f 100644
--- a/arch/arm/dts/imx6ul-pcl063.dtsi
+++ b/arch/arm/dts/pcl063-common.dtsi
@@ -7,10 +7,6 @@
* Author: Christian Hemp <c.hemp@phytec.de>
*/
-/dts-v1/;
-
-#include "imx6ul.dtsi"
-
/ {
model = "Phytec phyCORE-i.MX6 Ultra Lite SOM";
compatible = "phytec,imx6ul-pcl063", "fsl,imx6ul";
@@ -47,7 +43,7 @@
pinctrl-0 = <&pinctrl_gpmi_nand>;
nand-on-flash-bbt;
fsl,no-blockmark-swap;
- status = "okay";
+ status = "disabled";
#address-cells = <1>;
#size-cells = <1>;
@@ -99,6 +95,18 @@
status = "okay";
};
+&usdhc2 {
+ u-boot,dm-spl;
+ u-boot,dm-pre-reloc;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usdhc2>;
+ bus-width = <8>;
+ no-1-8-v;
+ non-removable;
+ keep-power-in-suspend;
+ status = "disabled";
+};
+
&iomuxc {
pinctrl-names = "default";
@@ -170,4 +178,19 @@
>;
};
+
+ pinctrl_usdhc2: usdhc2grp {
+ fsl,pins = <
+ MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x170f9
+ MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x100f9
+ MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x170f9
+ MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x170f9
+ MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x170f9
+ MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x170f9
+ MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x170f9
+ MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x170f9
+ MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x170f9
+ MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x170f9
+ >;
+ };
};
diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
index e782859b1e..5e2f08e500 100644
--- a/arch/arm/mach-imx/mx6/Kconfig
+++ b/arch/arm/mach-imx/mx6/Kconfig
@@ -443,6 +443,18 @@ config TARGET_PCL063
select DM_THERMAL
select SUPPORT_SPL
+config TARGET_PCL063_ULL
+ bool "PHYTEC PCL063 (phyCORE-i.MX6ULL)"
+ select MX6ULL
+ select DM
+ select DM_ETH
+ select DM_GPIO
+ select DM_I2C
+ select DM_MMC
+ select DM_SERIAL
+ select DM_THERMAL
+ select SUPPORT_SPL
+
config TARGET_SECOMX6
bool "secomx6 boards"
diff --git a/board/phytec/pcl063/Kconfig b/board/phytec/pcl063/Kconfig
index 977db70f64..58f72f2791 100644
--- a/board/phytec/pcl063/Kconfig
+++ b/board/phytec/pcl063/Kconfig
@@ -10,3 +10,16 @@ config SYS_CONFIG_NAME
default "pcl063"
endif
+
+if TARGET_PCL063_ULL
+
+config SYS_BOARD
+ default "pcl063"
+
+config SYS_VENDOR
+ default "phytec"
+
+config SYS_CONFIG_NAME
+ default "pcl063_ull"
+
+endif
diff --git a/board/phytec/pcl063/MAINTAINERS b/board/phytec/pcl063/MAINTAINERS
index c65a951f3d..70e03cfe71 100644
--- a/board/phytec/pcl063/MAINTAINERS
+++ b/board/phytec/pcl063/MAINTAINERS
@@ -1,8 +1,12 @@
PCL063 BOARD
M: Martyn Welch <martyn.welch@collabora.com>
+M: Parthiban Nallathambi <parthitce@gmail.com>
S: Maintained
-F: arch/arm/dts/imx6ul-pcl063.dtsi
F: arch/arm/dts/imx6ul-phycore-segin.dts
+F: arch/arm/dts/imx6ull-phycore-segin.dts
+F: arch/arm/dts/pcl063-common.dtsi
F: board/phytec/pcl063/
F: configs/phycore_pcl063_defconfig
+F: configs/phycore_pcl063_ull_defconfig
F: include/configs/pcl063.h
+F: include/configs/pcl063_ull.h
diff --git a/board/phytec/pcl063/pcl063.c b/board/phytec/pcl063/pcl063.c
index 38b233d1b0..17012df037 100644
--- a/board/phytec/pcl063/pcl063.c
+++ b/board/phytec/pcl063/pcl063.c
@@ -200,7 +200,10 @@ int board_init(void)
int checkboard(void)
{
- puts("Board: PHYTEC phyCORE-i.MX6UL\n");
+ u32 cpurev = get_cpu_rev();
+
+ printf("Board: PHYTEC phyCORE-i.MX%s\n",
+ get_imx_type((cpurev & 0xFF000) >> 12));
return 0;
}
diff --git a/board/phytec/pcl063/spl.c b/board/phytec/pcl063/spl.c
index b93cd493f2..73a774645d 100644
--- a/board/phytec/pcl063/spl.c
+++ b/board/phytec/pcl063/spl.c
@@ -13,6 +13,7 @@
#include <asm/arch/mx6-ddr.h>
#include <asm/arch/mx6-pins.h>
#include <asm/arch/crm_regs.h>
+#include <asm/arch/sys_proto.h>
#include <fsl_esdhc.h>
/* Configuration for Micron MT41K256M16TW-107 IT:P, 32M x 16 x 8 -> 256MiB */
@@ -117,11 +118,32 @@ static iomux_v3_cfg_t const usdhc1_pads[] = {
MX6_PAD_UART1_RTS_B__USDHC1_CD_B | MUX_PAD_CTRL(USDHC_PAD_CTRL),
};
+#ifndef CONFIG_NAND_MXS
+static iomux_v3_cfg_t const usdhc2_pads[] = {
+ MX6_PAD_NAND_RE_B__USDHC2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+ MX6_PAD_NAND_WE_B__USDHC2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+ MX6_PAD_NAND_DATA00__USDHC2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+ MX6_PAD_NAND_DATA01__USDHC2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+ MX6_PAD_NAND_DATA02__USDHC2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+ MX6_PAD_NAND_DATA03__USDHC2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+ MX6_PAD_NAND_DATA04__USDHC2_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+ MX6_PAD_NAND_DATA05__USDHC2_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+ MX6_PAD_NAND_DATA06__USDHC2_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+ MX6_PAD_NAND_DATA07__USDHC2_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+};
+#endif
+
static struct fsl_esdhc_cfg usdhc_cfg[] = {
{
.esdhc_base = USDHC1_BASE_ADDR,
.max_bus_width = 4,
},
+#ifndef CONFIG_NAND_MXS
+ {
+ .esdhc_base = USDHC2_BASE_ADDR,
+ .max_bus_width = 8,
+ },
+#endif
};
int board_mmc_getcd(struct mmc *mmc)
@@ -131,12 +153,58 @@ int board_mmc_getcd(struct mmc *mmc)
int board_mmc_init(bd_t *bis)
{
- imx_iomux_v3_setup_multiple_pads(usdhc1_pads, ARRAY_SIZE(usdhc1_pads));
- usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
-
- return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
+ int i, ret;
+
+ for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) {
+ switch (i) {
+ case 0:
+ SETUP_IOMUX_PADS(usdhc1_pads);
+ usdhc_cfg[i].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
+ break;
+#ifndef CONFIG_NAND_MXS
+ case 1:
+ SETUP_IOMUX_PADS(usdhc2_pads);
+ usdhc_cfg[i].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
+ break;
+#endif
+ default:
+ printf("Warning - USDHC%d controller not supporting\n",
+ i + 1);
+ return 0;
+ }
+
+ ret = fsl_esdhc_initialize(bis, &usdhc_cfg[i]);
+ if (ret) {
+ printf("Warning: failed to initialize mmc dev %d\n", i);
+ return ret;
+ }
+ }
+
+ return 0;
}
+void board_boot_order(u32 *spl_boot_list)
+{
+ u32 bmode = imx6_src_get_boot_mode();
+ u8 boot_dev = BOOT_DEVICE_MMC1;
+
+ switch ((bmode & IMX6_BMODE_MASK) >> IMX6_BMODE_SHIFT) {
+ case IMX6_BMODE_SD:
+ case IMX6_BMODE_ESD:
+ boot_dev = BOOT_DEVICE_MMC1;
+ break;
+ case IMX6_BMODE_MMC:
+ case IMX6_BMODE_EMMC:
+ boot_dev = BOOT_DEVICE_MMC2;
+ break;
+ default:
+ /* Default - BOOT_DEVICE_MMC1 */
+ printf("Wrong board boot order\n");
+ break;
+ }
+
+ spl_boot_list[0] = boot_dev;
+}
#endif /* CONFIG_FSL_ESDHC */
void board_init_f(ulong dummy)
diff --git a/configs/phycore_pcl063_ull_defconfig b/configs/phycore_pcl063_ull_defconfig
new file mode 100644
index 0000000000..75408a8344
--- /dev/null
+++ b/configs/phycore_pcl063_ull_defconfig
@@ -0,0 +1,54 @@
+CONFIG_ARM=y
+CONFIG_ARCH_MX6=y
+CONFIG_SYS_TEXT_BASE=0x87800000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_TARGET_PCL063_ULL=y
+CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL=y
+# CONFIG_CMD_DEKBLOB is not set
+CONFIG_DISTRO_DEFAULTS=y
+CONFIG_NR_DRAM_BANKS=8
+CONFIG_FIT=y
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
+CONFIG_BOOTDELAY=3
+# CONFIG_USE_BOOTCOMMAND is not set
+CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_SPL_USB_HOST_SUPPORT=y
+CONFIG_SPL_WATCHDOG_SUPPORT=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+# CONFIG_RANDOM_UUID is not set
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_USB_SDP=y
+CONFIG_CMD_CACHE=y
+# CONFIG_ISO_PARTITION is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DEFAULT_DEVICE_TREE="imx6ull-phycore-segin"
+CONFIG_DM_I2C_GPIO=y
+CONFIG_SYS_I2C_MXC=y
+CONFIG_FSL_ESDHC=y
+CONFIG_PHYLIB=y
+CONFIG_PHY_MICREL=y
+CONFIG_FEC_MXC=y
+CONFIG_MII=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX6=y
+CONFIG_DM_PMIC=y
+# CONFIG_SPL_PMIC_CHILDREN is not set
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_MXC_UART=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="Phytec"
+CONFIG_USB_GADGET_VENDOR_NUM=0x01b67
+CONFIG_USB_GADGET_PRODUCT_NUM=0x4fff
+CONFIG_CI_UDC=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_LZO=y
diff --git a/include/configs/pcl063.h b/include/configs/pcl063.h
index 4ceab519cb..c032f05fc5 100644
--- a/include/configs/pcl063.h
+++ b/include/configs/pcl063.h
@@ -24,6 +24,8 @@
#undef CONFIG_SPL_TEXT_BASE
#define CONFIG_SPL_TEXT_BASE 0x00909000
+#define CONFIG_SYS_FSL_USDHC_NUM 1
+
/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M)
diff --git a/include/configs/pcl063_ull.h b/include/configs/pcl063_ull.h
new file mode 100644
index 0000000000..0f1a010b4e
--- /dev/null
+++ b/include/configs/pcl063_ull.h
@@ -0,0 +1,117 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Board configuration file for Phytec phyBOARD-i.MX6ULL-Segin SBC
+ * Copyright (C) 2019 Parthiban Nallathambi <parthitce@gmail.com>
+ *
+ * Based on include/configs/xpress.h:
+ * Copyright (C) 2015-2016 Stefan Roese <sr@denx.de>
+ */
+#ifndef __PCL063_ULL_H
+#define __PCL063_ULL_H
+
+#include <linux/sizes.h>
+#include "mx6_common.h"
+
+/* SPL options */
+#include "imx6_spl.h"
+
+#define CONFIG_SYS_FSL_USDHC_NUM 2
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M)
+
+/* Environment settings */
+#define CONFIG_ENV_SIZE (0x4000)
+#define CONFIG_ENV_OFFSET (0x80000)
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+#define CONFIG_ENV_OFFSET_REDUND \
+ (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
+
+/* Environment in SD */
+#define CONFIG_SYS_MMC_ENV_DEV 0
+#define CONFIG_SYS_MMC_ENV_PART 0
+#define MMC_ROOTFS_DEV 0
+#define MMC_ROOTFS_PART 2
+
+/* Console configs */
+#define CONFIG_MXC_UART_BASE UART1_BASE
+
+/* MMC Configs */
+#define CONFIG_FSL_USDHC
+
+#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
+#define CONFIG_SUPPORT_EMMC_BOOT
+
+/* I2C configs */
+#ifdef CONFIG_CMD_I2C
+#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
+#define CONFIG_SYS_I2C_SPEED 100000
+#endif
+
+/* Miscellaneous configurable options */
+#define CONFIG_SYS_MEMTEST_START 0x80000000
+#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x10000000)
+
+#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
+#define CONFIG_SYS_HZ 1000
+
+/* Physical Memory Map */
+#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
+#define PHYS_SDRAM_SIZE SZ_256M
+
+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
+#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
+#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
+
+#define CONFIG_SYS_INIT_SP_OFFSET \
+ (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR \
+ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
+
+/* NAND */
+#define CONFIG_SYS_MAX_NAND_DEVICE 1
+#define CONFIG_SYS_NAND_BASE 0x40000000
+
+/* USB Configs */
+#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
+#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
+#define CONFIG_MXC_USB_FLAGS 0
+#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
+
+#define CONFIG_IMX_THERMAL
+
+#define ENV_MMC \
+ "mmcdev=" __stringify(MMC_ROOTFS_DEV) "\0" \
+ "mmcpart=" __stringify(MMC_ROOTFS_PART) "\0" \
+ "fitpart=1\0" \
+ "bootdelay=3\0" \
+ "silent=1\0" \
+ "optargs=rw rootwait\0" \
+ "mmcautodetect=yes\0" \
+ "mmcrootfstype=ext4\0" \
+ "mmcfit_name=fitImage\0" \
+ "mmcloadfit=fatload mmc ${mmcdev}:${fitpart} ${fit_addr} " \
+ "${mmcfit_name}\0" \
+ "mmcargs=setenv bootargs " \
+ "root=/dev/mmcblk${mmcdev}p${mmcpart} ${optargs} " \
+ "console=${console} rootfstype=${mmcrootfstype}\0" \
+ "mmc_mmc_fit=run mmcloadfit;run mmcargs addcon; bootm ${fit_addr}\0" \
+
+/* Default environment */
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "fdt_high=0xffffffff\0" \
+ "console=ttymxc0,115200n8\0" \
+ "addcon=setenv bootargs ${bootargs} console=${console},${baudrate}\0" \
+ "fit_addr=0x82000000\0" \
+ ENV_MMC
+
+#define CONFIG_BOOTCOMMAND "run mmc_mmc_fit"
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
+ func(MMC, mmc, 1) \
+ func(DHCP, dhcp, na)
+
+#include <config_distro_bootcmd.h>
+
+#endif /* __PCL063_ULL_H */
--
2.17.2
^ permalink raw reply related
* Re: [PATCH v5 0/7] sunxi: Add DT representation for the MBUS controller
From: Maxime Ripard @ 2019-04-10 14:34 UTC (permalink / raw)
To: Rob Herring
Cc: Mark Rutland, devicetree, Thomas Petazzoni, Arnd Bergmann,
Robin Murphy, dri-devel, Georgi Djakov, Paul Kocialkowski,
Chen-Yu Tsai, Yong Deng, Frank Rowand, Dave Martin,
linux-arm-kernel
In-Reply-To: <20190410140128.GA6232@bogus>
[-- Attachment #1.1: Type: text/plain, Size: 1326 bytes --]
On Wed, Apr 10, 2019 at 09:01:28AM -0500, Rob Herring wrote:
> On Mon, Apr 08, 2019 at 10:11:26AM +0200, Maxime Ripard wrote:
> > On Sat, Apr 06, 2019 at 01:06:07AM -0500, Rob Herring wrote:
> > > On Mon, Apr 01, 2019 at 10:56:40AM +0200, Maxime Ripard wrote:
> > > > Hi,
> > > >
> > > > We've had for quite some time to hack around in our drivers to take into
> > > > account the fact that our DMA accesses are not done through the parent
> > > > node, but through another bus with a different mapping than the CPU for the
> > > > RAM (0 instead of 0x40000000 for most SoCs).
> > > >
> > > > After some discussion after the submission of a camera device suffering of
> > > > the same hacks, I've decided to put together a serie that introduce a
> > > > special interconnect name called "dma" that that allows to express the DMA
> > > > relationship between a master and its bus, even if they are not direct
> > > > parents in the DT.
> > > >
> > > > Let me know what you think,
> > > > Maxime
> > >
> > > LGTM.
> > >
> > > How do you propose merging this? I can take 1-5, and 6 and 7 thru
> > > arm-soc?
> >
> > You can merge 1-4, and I'll merge 5 through drm-misc and 6-7 through
> > arm-soc
>
> Done.
Thanks!
Applied 5, 6 and 7
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v5 0/7] sunxi: Add DT representation for the MBUS controller
From: Maxime Ripard @ 2019-04-10 14:34 UTC (permalink / raw)
To: Rob Herring
Cc: Mark Rutland, devicetree, Thomas Petazzoni, Arnd Bergmann,
Robin Murphy, dri-devel, Georgi Djakov, Paul Kocialkowski,
Chen-Yu Tsai, Yong Deng, Frank Rowand, Dave Martin,
linux-arm-kernel
In-Reply-To: <20190410140128.GA6232@bogus>
[-- Attachment #1.1: Type: text/plain, Size: 1326 bytes --]
On Wed, Apr 10, 2019 at 09:01:28AM -0500, Rob Herring wrote:
> On Mon, Apr 08, 2019 at 10:11:26AM +0200, Maxime Ripard wrote:
> > On Sat, Apr 06, 2019 at 01:06:07AM -0500, Rob Herring wrote:
> > > On Mon, Apr 01, 2019 at 10:56:40AM +0200, Maxime Ripard wrote:
> > > > Hi,
> > > >
> > > > We've had for quite some time to hack around in our drivers to take into
> > > > account the fact that our DMA accesses are not done through the parent
> > > > node, but through another bus with a different mapping than the CPU for the
> > > > RAM (0 instead of 0x40000000 for most SoCs).
> > > >
> > > > After some discussion after the submission of a camera device suffering of
> > > > the same hacks, I've decided to put together a serie that introduce a
> > > > special interconnect name called "dma" that that allows to express the DMA
> > > > relationship between a master and its bus, even if they are not direct
> > > > parents in the DT.
> > > >
> > > > Let me know what you think,
> > > > Maxime
> > >
> > > LGTM.
> > >
> > > How do you propose merging this? I can take 1-5, and 6 and 7 thru
> > > arm-soc?
> >
> > You can merge 1-4, and I'll merge 5 through drm-misc and 6-7 through
> > arm-soc
>
> Done.
Thanks!
Applied 5, 6 and 7
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply
* [Qemu-devel] Questions about acpi interrupt link device's ‘_PRS' field
From: Li Qiang @ 2019-04-10 14:33 UTC (permalink / raw)
To: pbonzini@redhat.com, mst@redhat.com
Cc: liq3ea@gmail.com, qemu-devel@nongnu.org
Hi all,
I see the link device ‘_PRS’ uses irq line 5, 10, 11 in ‘build_link_dev’ function.
But I never see the 5 lines uses in the guest, just uses 10 and 11.
Why this happen? Maybe related with the guest?
Thanks,
Li Qiang
^ permalink raw reply
* [Bug 107325] Reported temperature of nvidia card with nouveau driver is wrong
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-04-10 14:34 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
In-Reply-To: <bug-107325-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
[-- Attachment #1.1: Type: text/plain, Size: 322 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=107325
--- Comment #7 from Roy <nouveau-NQbd8FSOZ1kdnm+yROfE0A@public.gmane.org> ---
Will this bug interact with Lyude's recent patch, "drm/nouveau/i2c: Disable i2c
bus access after ->fini()"?
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1109 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply
* Re: [RFC net-next 1/1] tdc.py: Introduce required plugins
From: Nicolas Dichtel @ 2019-04-10 14:33 UTC (permalink / raw)
To: Lucas Bates, netdev
Cc: davem, jhs, xiyou.wangcong, jiri, mleitner, vladbu, dcaratti,
kernel
In-Reply-To: <1554846285-20657-1-git-send-email-lucasb@mojatatu.com>
Le 09/04/2019 à 23:44, Lucas Bates a écrit :
> Some of the testcases (for example, all of the fw tests) in tdc
> require activating the nsplugin. This RFC introduces a feature which
> tags one such test with the keyword "requires". Anyone running a test
> that requires nsplugin will now get a warning if they are missing
> the plugin.
>
> After compiling the list of test cases to execute, tdc will
> gather all of the required plugins for that run, and validate
> that they have been enabled with a symlink in the plugins/
> directory. If required plugins are missing, tdc will create the
> symlink for the user and then terminate. (This is because plugin-
> specific options may exist and need to be parsed at startup)
I still don't understand the goal of this plugin. Why not simply include it in
the core code (like it was some times ago)?
>
> Please provide feedback. If this is amenable to all, I will proceed
> to submit for the rest.
After your patch, I got the following error:
$ ./tdc.py
Traceback (most recent call last):
File "./tdc.py", line 740, in <module>
main()
File "./tdc.py", line 734, in main
set_operation_mode(pm, args)
File "./tdc.py", line 692, in set_operation_mode
check_required_plugins(pm, alltests)
File "./tdc.py", line 583, in check_required_plugins
os.chown('plugins/{}'.format(fname), uid=int(os.getenv('SUDO_UID')),
TypeError: int() argument must be a string or a number, not 'NoneType'
Regards,
Nicolas
^ permalink raw reply
* Re: WARN_ON_ONCE() hit at kernel/events/core.c:330
From: Peter Zijlstra @ 2019-04-10 14:33 UTC (permalink / raw)
To: Thomas-Mich Richter
Cc: Mark Rutland, Kees Cook, acme, Linux Kernel Mailing List,
Heiko Carstens, Hendrik Brueckner, Martin Schwidefsky, jolsa,
Alexander Shishkin
In-Reply-To: <a24a2dca-72f3-ff56-5004-97c6ce86f6af@linux.ibm.com>
On Wed, Apr 10, 2019 at 03:51:24PM +0200, Thomas-Mich Richter wrote:
> Thanks for the fix with commit id 86071b11317550d994b55ce5e31aa06bcad783b5.
>
> However doing an fgrep on the pending_disable member of struct perf_event
> reveals two more hits in file kernel/events/ringbuffer.c when events
> have auxiliary data.
>
> Not sure if this needs to be addresses too, just wanted to let you know.
*groan* indeed, and yes that would need fixing too. I completely missed
the AUX stuff using that too.
I think we can simply do the below on top, Alexander?
---
kernel/events/ring_buffer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index 678ccec60d8f..ab2b7b38adc5 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -392,7 +392,7 @@ void *perf_aux_output_begin(struct perf_output_handle *handle,
* store that will be enabled on successful return
*/
if (!handle->size) { /* A, matches D */
- event->pending_disable = 1;
+ event->pending_disable = smp_processor_id();
perf_output_wakeup(handle);
local_set(&rb->aux_nest, 0);
goto err_put;
@@ -480,7 +480,7 @@ void perf_aux_output_end(struct perf_output_handle *handle, unsigned long size)
if (wakeup) {
if (handle->aux_flags & PERF_AUX_FLAG_TRUNCATED)
- handle->event->pending_disable = 1;
+ handle->event->pending_disable = smp_processor_id();
perf_output_wakeup(handle);
}
^ permalink raw reply related
* [Qemu-devel] Questions about acpi interrupt link device's ‘_PRS' field
From: Li Qiang @ 2019-04-10 14:33 UTC (permalink / raw)
To: pbonzini@redhat.com, mst@redhat.com
Cc: qemu-devel@nongnu.org, liq3ea@gmail.com
Hi all,
I see the link device ‘_PRS’ uses irq line 5, 10, 11 in ‘build_link_dev’ function.
But I never see the 5 lines uses in the guest, just uses 10 and 11.
Why this happen? Maybe related with the guest?
Thanks,
Li Qiang
^ permalink raw reply
* Re: [Qemu-devel] [PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
From: Cornelia Huck @ 2019-04-10 14:31 UTC (permalink / raw)
To: Pankaj Gupta
Cc: jack, kvm, david, jasowang, david, qemu-devel, virtualization,
adilger kernel, zwisler, aarcange, dave jiang, linux-nvdimm,
vishal l verma, Michael S. Tsirkin, willy, hch, linux-acpi,
jmoyer, linux-ext4, lenb, kilobyte, riel, yuval shaia, stefanha,
imammedo, dan j williams, lcapitulino, kwolf, nilal, tytso,
xiaoguangrong eric, darrick wong, rjw, linux-kernel, linux-xfs,
linux-fsdevel, pbonzini
In-Reply-To: <127904196.20807948.1554904981681.JavaMail.zimbra@redhat.com>
On Wed, 10 Apr 2019 10:03:01 -0400 (EDT)
Pankaj Gupta <pagupta@redhat.com> wrote:
> >
> > On Wed, Apr 10, 2019 at 09:38:22AM +0530, Pankaj Gupta wrote:
> > > This patch adds virtio-pmem driver for KVM guest.
> > >
> > > Guest reads the persistent memory range information from
> > > Qemu over VIRTIO and registers it on nvdimm_bus. It also
> > > creates a nd_region object with the persistent memory
> > > range information so that existing 'nvdimm/pmem' driver
> > > can reserve this into system memory map. This way
> > > 'virtio-pmem' driver uses existing functionality of pmem
> > > driver to register persistent memory compatible for DAX
> > > capable filesystems.
> > >
> > > This also provides function to perform guest flush over
> > > VIRTIO from 'pmem' driver when userspace performs flush
> > > on DAX memory range.
> > >
> > > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > > diff --git a/include/uapi/linux/virtio_ids.h
> > > b/include/uapi/linux/virtio_ids.h
> > > index 6d5c3b2d4f4d..346389565ac1 100644
> > > --- a/include/uapi/linux/virtio_ids.h
> > > +++ b/include/uapi/linux/virtio_ids.h
> > > @@ -43,5 +43,6 @@
> > > #define VIRTIO_ID_INPUT 18 /* virtio input */
> > > #define VIRTIO_ID_VSOCK 19 /* virtio vsock transport */
> > > #define VIRTIO_ID_CRYPTO 20 /* virtio crypto */
> > > +#define VIRTIO_ID_PMEM 25 /* virtio pmem */
> > >
> > > #endif /* _LINUX_VIRTIO_IDS_H */
> >
> > Didn't Paolo point out someone is using 25 for audio?
>
>
> Sorry! I did not notice this.
>
> >
> > Please, reserve an ID with the Virtio TC before using it.
>
> I thought I requested[1] ID 25.
>
> [1] https://github.com/oasis-tcs/virtio-spec/issues/38
> [2] https://lists.oasis-open.org/archives/virtio-dev/201805/threads.html
>
> In that case I will send request for next available ID i.e 26?
Have the folks using this for audio sent a reservation request as well?
If not, I'd say the first requester should get the id...
(And yes, we need to be quicker with voting on/applying id
reservations :/)
^ permalink raw reply
* Re: Tun congestion/BQL
From: David Woodhouse @ 2019-04-10 14:33 UTC (permalink / raw)
To: Toke Høiland-Jørgensen, Jason Wang, netdev
In-Reply-To: <87ftqqugbj.fsf@toke.dk>
[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]
On Wed, 2019-04-10 at 15:42 +0200, Toke Høiland-Jørgensen wrote:
> > > That doesn't seem to make much difference at all; it's still dropping a
> > > lot of packets because ptr_ring_produce() is returning non-zero.
> >
> >
> > I think you need try to stop the queue just in this case? Ideally we may
> > want to stop the queue when the queue is about to full, but we don't
> > have such helper currently.
I don't quite understand. If the ring isn't full after I've put a
packet into it... how can it be full subsequently? We can't end up in
tun_net_xmit() concurrently, right? I'm not (knowingly) using XDP.
> Ideally we want to react when the queue starts building rather than when
> it starts getting full; by pushing back on upper layers (or, if
> forwarding, dropping packets to signal congestion).
This is precisely what my first accidental if (!ptr_ring_empty())
variant was doing, right? :)
> In practice, this means tuning the TX ring to the *minimum* size it can
> be without starving (this is basically what BQL does for Ethernet), and
> keeping packets queued in the qdisc layer instead, where it can be
> managed...
I was going to add BQL (as $SUBJECT may have caused you to infer) but
trivially adding the netdev_sent_queue() in tun_net_xmit() and
netdev_completed_queue() for xdp vs. skb in tun_do_read() was tripping
the BUG in dql_completed(). I just ripped that part out and focused on
the queue stop/start and haven't gone back to it yet.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5174 bytes --]
^ permalink raw reply
* ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] drm/i915: Use dedicated rc6 enabling sequence for gen11 (rev2)
From: Patchwork @ 2019-04-10 14:32 UTC (permalink / raw)
To: Mika Kuoppala; +Cc: intel-gfx
In-Reply-To: <20190410105923.18546-1-mika.kuoppala@linux.intel.com>
== Series Details ==
Series: series starting with [1/7] drm/i915: Use dedicated rc6 enabling sequence for gen11 (rev2)
URL : https://patchwork.freedesktop.org/series/59278/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
b962927fa121 drm/i915: Use dedicated rc6 enabling sequence for gen11
-:29: WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#29: FILE: drivers/gpu/drm/i915/intel_pm.c:7132:
+ * hasn't enabled a state yet where we need forcewake, BIOS may have.*/
total: 0 errors, 1 warnings, 0 checks, 84 lines checked
a8f9a680f9cb drm/i915/icl: Apply a recommended rc6 threshold
fab7a9f30081 drm/i915/icl: Enable media sampler powergate
8954dd26252c drm/i915/icl: Disable video turbo mode for rp control
26aced1cf366 drm/i915/icl: Handle rps interrupts without irq lock
202c43511515 drm/i915: Use Engine1 instance for gen11 pm interrupts
3ac25ab2e2c8 drm/i915/icl: Don't warn on spurious interrupts
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [PATCH v2 1/1] cobalt: mode argument from open forwarded for O_TMPFILE
From: Jan Kiszka @ 2019-04-10 14:32 UTC (permalink / raw)
To: Norbert Lange, xenomai
In-Reply-To: <20190410142518.12791-2-norbert.lange@andritz.com>
On 10.04.19 16:25, Norbert Lange via Xenomai wrote:
> The optional mode argument (open is a vararg function),
> was only be read and forwarded if the O_CREAT flag is set.
>
> That is not complete, as O_TMPFILE will require this
> argument aswell. Fixed in this commit, and a fallback definition
> of O_TMPFILE is added, incase libcobalt is built against an
> library lacking this macro.
>
> Signed-off-by: Norbert Lange <norbert.lange@andritz.com>
> ---
> lib/cobalt/rtdm.c | 10 ++++++++--
> lib/cobalt/wrappers.c | 9 +++++++--
> 2 files changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/lib/cobalt/rtdm.c b/lib/cobalt/rtdm.c
> index 6b8898e70..176210ddc 100644
> --- a/lib/cobalt/rtdm.c
> +++ b/lib/cobalt/rtdm.c
> @@ -30,6 +30,12 @@
> #include <asm/xenomai/syscall.h>
> #include "internal.h"
>
> +/* support for very old c libraries not supporting O_TMPFILE */
> +#ifndef O_TMPFILE
> +#define O_TMPFILE (020000000 | 0200000)
> +#endif
> +
> +
> static inline int set_errno(int ret)
> {
> if (ret >= 0)
> @@ -65,7 +71,7 @@ COBALT_IMPL(int, open, (const char *path, int oflag, ...))
> mode_t mode = 0;
> va_list ap;
>
> - if (oflag & O_CREAT) {
> + if ((oflag & O_CREAT) || (oflag & O_TMPFILE) == O_TMPFILE) {
> va_start(ap, oflag);
> mode = va_arg(ap, int);
> va_end(ap);
> @@ -79,7 +85,7 @@ COBALT_IMPL(int, open64, (const char *path, int oflag, ...))
> mode_t mode = 0;
> va_list ap;
>
> - if (oflag & O_CREAT) {
> + if ((oflag & O_CREAT) || (oflag & O_TMPFILE) == O_TMPFILE) {
> va_start(ap, oflag);
> mode = va_arg(ap, int);
> va_end(ap);
> diff --git a/lib/cobalt/wrappers.c b/lib/cobalt/wrappers.c
> index 20ad63a61..323f60b92 100644
> --- a/lib/cobalt/wrappers.c
> +++ b/lib/cobalt/wrappers.c
> @@ -44,6 +44,11 @@
> #include <malloc.h>
> #include <boilerplate/compiler.h>
>
> +/* support for very old c libraries not supporting O_TMPFILE */
> +#ifndef O_TMPFILE
> +#define O_TMPFILE (020000000 | 0200000)
> +#endif
> +
> /* sched */
> __weak
> int __real_pthread_setschedparam(pthread_t thread,
> @@ -174,7 +179,7 @@ int __real_open(const char *path, int oflag, ...)
> mode_t mode = 0;
> va_list ap;
>
> - if (oflag & O_CREAT) {
> + if ((oflag & O_CREAT) || (oflag & O_TMPFILE) == O_TMPFILE) {
> va_start(ap, oflag);
> mode = va_arg(ap, mode_t);
> va_end(ap);
> @@ -190,7 +195,7 @@ int __real_open64(const char *path, int oflag, ...)
> mode_t mode = 0;
> va_list ap;
>
> - if (oflag & O_CREAT) {
> + if ((oflag & O_CREAT) || (oflag & O_TMPFILE) == O_TMPFILE) {
> va_start(ap, oflag);
> mode = va_arg(ap, mode_t);
> va_end(ap);
>
OK, taken this one now, instead of v1.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply
* Re: [Qemu-devel] [PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
From: Cornelia Huck @ 2019-04-10 14:31 UTC (permalink / raw)
To: Pankaj Gupta
Cc: Michael S. Tsirkin, jack, kvm, david, jasowang, david, qemu-devel,
virtualization, adilger kernel, zwisler, aarcange, dave jiang,
linux-nvdimm, vishal l verma, willy, hch, linux-acpi, jmoyer,
linux-ext4, lenb, kilobyte, riel, yuval shaia, stefanha, pbonzini,
dan j williams, lcapitulino, kwolf, nilal, tytso,
xiaoguangrong eric, darrick wong, rjw, linux-kernel, linux-xfs,
linux-fsdevel, imammedo
In-Reply-To: <127904196.20807948.1554904981681.JavaMail.zimbra@redhat.com>
On Wed, 10 Apr 2019 10:03:01 -0400 (EDT)
Pankaj Gupta <pagupta@redhat.com> wrote:
> >
> > On Wed, Apr 10, 2019 at 09:38:22AM +0530, Pankaj Gupta wrote:
> > > This patch adds virtio-pmem driver for KVM guest.
> > >
> > > Guest reads the persistent memory range information from
> > > Qemu over VIRTIO and registers it on nvdimm_bus. It also
> > > creates a nd_region object with the persistent memory
> > > range information so that existing 'nvdimm/pmem' driver
> > > can reserve this into system memory map. This way
> > > 'virtio-pmem' driver uses existing functionality of pmem
> > > driver to register persistent memory compatible for DAX
> > > capable filesystems.
> > >
> > > This also provides function to perform guest flush over
> > > VIRTIO from 'pmem' driver when userspace performs flush
> > > on DAX memory range.
> > >
> > > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > > diff --git a/include/uapi/linux/virtio_ids.h
> > > b/include/uapi/linux/virtio_ids.h
> > > index 6d5c3b2d4f4d..346389565ac1 100644
> > > --- a/include/uapi/linux/virtio_ids.h
> > > +++ b/include/uapi/linux/virtio_ids.h
> > > @@ -43,5 +43,6 @@
> > > #define VIRTIO_ID_INPUT 18 /* virtio input */
> > > #define VIRTIO_ID_VSOCK 19 /* virtio vsock transport */
> > > #define VIRTIO_ID_CRYPTO 20 /* virtio crypto */
> > > +#define VIRTIO_ID_PMEM 25 /* virtio pmem */
> > >
> > > #endif /* _LINUX_VIRTIO_IDS_H */
> >
> > Didn't Paolo point out someone is using 25 for audio?
>
>
> Sorry! I did not notice this.
>
> >
> > Please, reserve an ID with the Virtio TC before using it.
>
> I thought I requested[1] ID 25.
>
> [1] https://github.com/oasis-tcs/virtio-spec/issues/38
> [2] https://lists.oasis-open.org/archives/virtio-dev/201805/threads.html
>
> In that case I will send request for next available ID i.e 26?
Have the folks using this for audio sent a reservation request as well?
If not, I'd say the first requester should get the id...
(And yes, we need to be quicker with voting on/applying id
reservations :/)
^ permalink raw reply
* Re: [Qemu-devel] [PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
From: Cornelia Huck @ 2019-04-10 14:31 UTC (permalink / raw)
To: Pankaj Gupta
Cc: jack, kvm, david, jasowang, david, qemu-devel, virtualization,
adilger kernel, zwisler, aarcange, linux-nvdimm,
Michael S. Tsirkin, willy, hch, linux-acpi, linux-ext4, lenb,
kilobyte, riel, yuval shaia, stefanha, imammedo, lcapitulino,
kwolf, nilal, tytso, xiaoguangrong eric, darrick wong, rjw,
linux-kernel, linux-xfs, linux-fsdevel, pbonzini
In-Reply-To: <127904196.20807948.1554904981681.JavaMail.zimbra@redhat.com>
On Wed, 10 Apr 2019 10:03:01 -0400 (EDT)
Pankaj Gupta <pagupta@redhat.com> wrote:
> >
> > On Wed, Apr 10, 2019 at 09:38:22AM +0530, Pankaj Gupta wrote:
> > > This patch adds virtio-pmem driver for KVM guest.
> > >
> > > Guest reads the persistent memory range information from
> > > Qemu over VIRTIO and registers it on nvdimm_bus. It also
> > > creates a nd_region object with the persistent memory
> > > range information so that existing 'nvdimm/pmem' driver
> > > can reserve this into system memory map. This way
> > > 'virtio-pmem' driver uses existing functionality of pmem
> > > driver to register persistent memory compatible for DAX
> > > capable filesystems.
> > >
> > > This also provides function to perform guest flush over
> > > VIRTIO from 'pmem' driver when userspace performs flush
> > > on DAX memory range.
> > >
> > > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > > diff --git a/include/uapi/linux/virtio_ids.h
> > > b/include/uapi/linux/virtio_ids.h
> > > index 6d5c3b2d4f4d..346389565ac1 100644
> > > --- a/include/uapi/linux/virtio_ids.h
> > > +++ b/include/uapi/linux/virtio_ids.h
> > > @@ -43,5 +43,6 @@
> > > #define VIRTIO_ID_INPUT 18 /* virtio input */
> > > #define VIRTIO_ID_VSOCK 19 /* virtio vsock transport */
> > > #define VIRTIO_ID_CRYPTO 20 /* virtio crypto */
> > > +#define VIRTIO_ID_PMEM 25 /* virtio pmem */
> > >
> > > #endif /* _LINUX_VIRTIO_IDS_H */
> >
> > Didn't Paolo point out someone is using 25 for audio?
>
>
> Sorry! I did not notice this.
>
> >
> > Please, reserve an ID with the Virtio TC before using it.
>
> I thought I requested[1] ID 25.
>
> [1] https://github.com/oasis-tcs/virtio-spec/issues/38
> [2] https://lists.oasis-open.org/archives/virtio-dev/201805/threads.html
>
> In that case I will send request for next available ID i.e 26?
Have the folks using this for audio sent a reservation request as well?
If not, I'd say the first requester should get the id...
(And yes, we need to be quicker with voting on/applying id
reservations :/)
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply
* Re: [PATCH 0/7] media: atmel: atmel-isc: new features
From: Hans Verkuil @ 2019-04-10 14:31 UTC (permalink / raw)
To: Eugen.Hristev, linux-media, Nicolas.Ferre, linux-arm-kernel,
linux-kernel, mchehab
Cc: ksloat
In-Reply-To: <1554807715-2353-1-git-send-email-eugen.hristev@microchip.com>
On 4/9/19 1:07 PM, Eugen.Hristev@microchip.com wrote:
> From: Eugen Hristev <eugen.hristev@microchip.com>
>
> This series includes feature rework, feature additions and bug fixes for the
> atmel-isc driver.
> It applies only on top of my previous patchset:
> media: atmel: atmel-isc: removed ARGB32 added ABGR32 and XBGR32
> media: atmel: atmel-isc: reworked driver and formats
> available at:
> https://git.linuxtv.org/hverkuil/media_tree.git/commit/?h=for-v5.2b&id=03ef1b56cba6ad17f6ead13c85a81e0e80fbc9d1
>
> One open question is regarding the WHITE_BALANCE error returns: it would seem
> logical to return EAGAIN or EBUSY, but this is not compliant with
> v4l2-compliance.
> Does it make sense to return success on every occasion? even if the
> DO_WHITE_BALANCE does nothing?
> In this series I used the return EAGAIN or EBUSY from the v4l2-ctrls, but I
> can change if always success is a better way of returning (even if normally
> a return value serves this exact purpose - return some code )
See my comments. Use v4l2_ctrl_activate() instead to mark controls active
or inactive and the control framework will do the rest.
I think it would speed up matters if you split up your series: one series
containing just fixes (I can merged those quickly) and one for the new
functionality.
Regards,
Hans
>
> Eugen Hristev (7):
> media: atmel: atmel-isc: add safe checks and fixed wrong ISC state in
> error case
> media: atmel: atmel-isc: reworked white balance feature
> media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE
> media: atmel: atmel-isc: add support for DO_WHITE_BALANCE
> media: atmel: atmel-isc: limit incoming pixels per frame
> media: atmel: atmel-isc: fix INIT_WORK misplacement
> media: atmel: atmel-isc: fix asd memory allocation
>
> drivers/media/platform/atmel/atmel-isc-regs.h | 25 +-
> drivers/media/platform/atmel/atmel-isc.c | 346 +++++++++++++++++++++++---
> drivers/media/v4l2-core/v4l2-ctrls.c | 1 +
> 3 files changed, 336 insertions(+), 36 deletions(-)
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 0/7] media: atmel: atmel-isc: new features
From: Hans Verkuil @ 2019-04-10 14:31 UTC (permalink / raw)
To: Eugen.Hristev, linux-media, Nicolas.Ferre, linux-arm-kernel,
linux-kernel, mchehab
Cc: ksloat
In-Reply-To: <1554807715-2353-1-git-send-email-eugen.hristev@microchip.com>
On 4/9/19 1:07 PM, Eugen.Hristev@microchip.com wrote:
> From: Eugen Hristev <eugen.hristev@microchip.com>
>
> This series includes feature rework, feature additions and bug fixes for the
> atmel-isc driver.
> It applies only on top of my previous patchset:
> media: atmel: atmel-isc: removed ARGB32 added ABGR32 and XBGR32
> media: atmel: atmel-isc: reworked driver and formats
> available at:
> https://git.linuxtv.org/hverkuil/media_tree.git/commit/?h=for-v5.2b&id=03ef1b56cba6ad17f6ead13c85a81e0e80fbc9d1
>
> One open question is regarding the WHITE_BALANCE error returns: it would seem
> logical to return EAGAIN or EBUSY, but this is not compliant with
> v4l2-compliance.
> Does it make sense to return success on every occasion? even if the
> DO_WHITE_BALANCE does nothing?
> In this series I used the return EAGAIN or EBUSY from the v4l2-ctrls, but I
> can change if always success is a better way of returning (even if normally
> a return value serves this exact purpose - return some code )
See my comments. Use v4l2_ctrl_activate() instead to mark controls active
or inactive and the control framework will do the rest.
I think it would speed up matters if you split up your series: one series
containing just fixes (I can merged those quickly) and one for the new
functionality.
Regards,
Hans
>
> Eugen Hristev (7):
> media: atmel: atmel-isc: add safe checks and fixed wrong ISC state in
> error case
> media: atmel: atmel-isc: reworked white balance feature
> media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE
> media: atmel: atmel-isc: add support for DO_WHITE_BALANCE
> media: atmel: atmel-isc: limit incoming pixels per frame
> media: atmel: atmel-isc: fix INIT_WORK misplacement
> media: atmel: atmel-isc: fix asd memory allocation
>
> drivers/media/platform/atmel/atmel-isc-regs.h | 25 +-
> drivers/media/platform/atmel/atmel-isc.c | 346 +++++++++++++++++++++++---
> drivers/media/v4l2-core/v4l2-ctrls.c | 1 +
> 3 files changed, 336 insertions(+), 36 deletions(-)
>
^ permalink raw reply
* Re: [Qemu-devel] [PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
From: Cornelia Huck @ 2019-04-10 14:31 UTC (permalink / raw)
To: Pankaj Gupta
Cc: jack, kvm, david, qemu-devel, virtualization, adilger kernel,
zwisler, aarcange, dave jiang, linux-nvdimm, vishal l verma,
Michael S. Tsirkin, willy, hch, linux-acpi, jmoyer, linux-ext4,
lenb, kilobyte, riel, yuval shaia, stefanha, imammedo,
dan j williams, lcapitulino, nilal, tytso, xiaoguangrong eric,
darrick wong, rjw, linux-kernel, linux-xfs, linux-fsdevel
In-Reply-To: <127904196.20807948.1554904981681.JavaMail.zimbra@redhat.com>
On Wed, 10 Apr 2019 10:03:01 -0400 (EDT)
Pankaj Gupta <pagupta@redhat.com> wrote:
> >
> > On Wed, Apr 10, 2019 at 09:38:22AM +0530, Pankaj Gupta wrote:
> > > This patch adds virtio-pmem driver for KVM guest.
> > >
> > > Guest reads the persistent memory range information from
> > > Qemu over VIRTIO and registers it on nvdimm_bus. It also
> > > creates a nd_region object with the persistent memory
> > > range information so that existing 'nvdimm/pmem' driver
> > > can reserve this into system memory map. This way
> > > 'virtio-pmem' driver uses existing functionality of pmem
> > > driver to register persistent memory compatible for DAX
> > > capable filesystems.
> > >
> > > This also provides function to perform guest flush over
> > > VIRTIO from 'pmem' driver when userspace performs flush
> > > on DAX memory range.
> > >
> > > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > > diff --git a/include/uapi/linux/virtio_ids.h
> > > b/include/uapi/linux/virtio_ids.h
> > > index 6d5c3b2d4f4d..346389565ac1 100644
> > > --- a/include/uapi/linux/virtio_ids.h
> > > +++ b/include/uapi/linux/virtio_ids.h
> > > @@ -43,5 +43,6 @@
> > > #define VIRTIO_ID_INPUT 18 /* virtio input */
> > > #define VIRTIO_ID_VSOCK 19 /* virtio vsock transport */
> > > #define VIRTIO_ID_CRYPTO 20 /* virtio crypto */
> > > +#define VIRTIO_ID_PMEM 25 /* virtio pmem */
> > >
> > > #endif /* _LINUX_VIRTIO_IDS_H */
> >
> > Didn't Paolo point out someone is using 25 for audio?
>
>
> Sorry! I did not notice this.
>
> >
> > Please, reserve an ID with the Virtio TC before using it.
>
> I thought I requested[1] ID 25.
>
> [1] https://github.com/oasis-tcs/virtio-spec/issues/38
> [2] https://lists.oasis-open.org/archives/virtio-dev/201805/threads.html
>
> In that case I will send request for next available ID i.e 26?
Have the folks using this for audio sent a reservation request as well?
If not, I'd say the first requester should get the id...
(And yes, we need to be quicker with voting on/applying id
reservations :/)
^ permalink raw reply
* Re: [Qemu-devel] [PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
From: Cornelia Huck @ 2019-04-10 14:31 UTC (permalink / raw)
To: Pankaj Gupta
Cc: Michael S. Tsirkin, jack, kvm, david, jasowang, david, qemu-devel,
virtualization, adilger kernel, zwisler, aarcange, dave jiang,
linux-nvdimm, vishal l verma, willy, hch, linux-acpi, jmoyer,
linux-ext4, lenb, kilobyte, riel, yuval shaia, stefanha, pbonzini,
dan j williams, lcapitulino, kwolf, nilal, tytso,
xiaoguangrong eric <xiaogu>
In-Reply-To: <127904196.20807948.1554904981681.JavaMail.zimbra@redhat.com>
On Wed, 10 Apr 2019 10:03:01 -0400 (EDT)
Pankaj Gupta <pagupta@redhat.com> wrote:
> >
> > On Wed, Apr 10, 2019 at 09:38:22AM +0530, Pankaj Gupta wrote:
> > > This patch adds virtio-pmem driver for KVM guest.
> > >
> > > Guest reads the persistent memory range information from
> > > Qemu over VIRTIO and registers it on nvdimm_bus. It also
> > > creates a nd_region object with the persistent memory
> > > range information so that existing 'nvdimm/pmem' driver
> > > can reserve this into system memory map. This way
> > > 'virtio-pmem' driver uses existing functionality of pmem
> > > driver to register persistent memory compatible for DAX
> > > capable filesystems.
> > >
> > > This also provides function to perform guest flush over
> > > VIRTIO from 'pmem' driver when userspace performs flush
> > > on DAX memory range.
> > >
> > > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > > diff --git a/include/uapi/linux/virtio_ids.h
> > > b/include/uapi/linux/virtio_ids.h
> > > index 6d5c3b2d4f4d..346389565ac1 100644
> > > --- a/include/uapi/linux/virtio_ids.h
> > > +++ b/include/uapi/linux/virtio_ids.h
> > > @@ -43,5 +43,6 @@
> > > #define VIRTIO_ID_INPUT 18 /* virtio input */
> > > #define VIRTIO_ID_VSOCK 19 /* virtio vsock transport */
> > > #define VIRTIO_ID_CRYPTO 20 /* virtio crypto */
> > > +#define VIRTIO_ID_PMEM 25 /* virtio pmem */
> > >
> > > #endif /* _LINUX_VIRTIO_IDS_H */
> >
> > Didn't Paolo point out someone is using 25 for audio?
>
>
> Sorry! I did not notice this.
>
> >
> > Please, reserve an ID with the Virtio TC before using it.
>
> I thought I requested[1] ID 25.
>
> [1] https://github.com/oasis-tcs/virtio-spec/issues/38
> [2] https://lists.oasis-open.org/archives/virtio-dev/201805/threads.html
>
> In that case I will send request for next available ID i.e 26?
Have the folks using this for audio sent a reservation request as well?
If not, I'd say the first requester should get the id...
(And yes, we need to be quicker with voting on/applying id
reservations :/)
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.