From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>, Amit Shah <amit@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
virtualization@lists.linux-foundation.org
Subject: [PATCH 4/6] virtio_console: drop custom control queue cleanup
Date: Fri, 20 Apr 2018 21:18:03 +0300 [thread overview]
Message-ID: <1524248223-393618-5-git-send-email-mst__33711.8127187297$1524248207$gmane$org@redhat.com> (raw)
In-Reply-To: <1524248223-393618-1-git-send-email-mst@redhat.com>
We now cleanup all VQs on device removal - no need
to handle the control VQ specially.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/char/virtio_console.c | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 26a66ff..2d87ce5 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1988,21 +1988,6 @@ static void remove_vqs(struct ports_device *portdev)
kfree(portdev->out_vqs);
}
-static void remove_controlq_data(struct ports_device *portdev)
-{
- struct port_buffer *buf;
- unsigned int len;
-
- if (!use_multiport(portdev))
- return;
-
- while ((buf = virtqueue_get_buf(portdev->c_ivq, &len)))
- free_buf(buf, true);
-
- while ((buf = virtqueue_detach_unused_buf(portdev->c_ivq)))
- free_buf(buf, true);
-}
-
/*
* Once we're further in boot, we get probed like any other virtio
* device.
@@ -2163,7 +2148,6 @@ static void virtcons_remove(struct virtio_device *vdev)
* have to just stop using the port, as the vqs are going
* away.
*/
- remove_controlq_data(portdev);
remove_vqs(portdev);
kfree(portdev);
}
@@ -2208,7 +2192,6 @@ static int virtcons_freeze(struct virtio_device *vdev)
*/
if (use_multiport(portdev))
virtqueue_disable_cb(portdev->c_ivq);
- remove_controlq_data(portdev);
list_for_each_entry(port, &portdev->ports, list) {
virtqueue_disable_cb(port->in_vq);
--
MST
next prev parent reply other threads:[~2018-04-20 18:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1524248223-393618-1-git-send-email-mst@redhat.com>
2018-04-20 18:18 ` [PATCH 1/6] virtio_console: don't tie bufs to a vq Michael S. Tsirkin
2018-04-21 7:30 ` Greg Kroah-Hartman
[not found] ` <20180421073005.GA3744@kroah.com>
2018-04-24 18:56 ` Michael S. Tsirkin
[not found] ` <20180424215318-mutt-send-email-mst@kernel.org>
2018-04-25 5:50 ` Greg Kroah-Hartman
2018-04-20 18:18 ` [PATCH 2/6] virtio: add ability to iterate over vqs Michael S. Tsirkin
2018-04-20 18:18 ` [PATCH 3/6] virtio_console: free buffers after reset Michael S. Tsirkin
2018-04-24 2:40 ` Jason Wang
2018-04-20 18:18 ` Michael S. Tsirkin [this message]
2018-04-20 18:18 ` [PATCH 5/6] virtio_console: move removal code Michael S. Tsirkin
2018-04-20 18:18 ` [PATCH 6/6] virtio_console: reset on out of memory Michael S. Tsirkin
2018-04-24 18:41 ` [PATCH 0/6] virtio-console: spec compliance fixes Michael S. Tsirkin
[not found] ` <20180424214104-mutt-send-email-mst@kernel.org>
2018-05-03 3:34 ` Amit Shah
[not found] ` <20180503034529.GA16676@grmbl.mre>
2018-05-03 19:28 ` Michael S. Tsirkin
[not found] ` <20180503222702-mutt-send-email-mst@kernel.org>
2018-05-06 17:56 ` Amit Shah
[not found] ` <20180506182430.GB19628@grmbl.mre>
2018-05-06 19:52 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='1524248223-393618-5-git-send-email-mst__33711.8127187297$1524248207$gmane$org@redhat.com' \
--to=mst@redhat.com \
--cc=amit@kernel.org \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).