From patchwork Tue Oct 4 06:43:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Condrea X-Patchwork-Id: 9361247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A6BE8600C8 for ; Tue, 4 Oct 2016 07:02:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94E2228ADC for ; Tue, 4 Oct 2016 07:02:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 899A028AE0; Tue, 4 Oct 2016 07:02:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E768528ADC for ; Tue, 4 Oct 2016 07:02:38 +0000 (UTC) Received: from localhost ([::1]:40525 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brJkM-0007YA-0L for patchwork-qemu-devel@patchwork.kernel.org; Tue, 04 Oct 2016 03:02:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brJT8-0001sL-Ds for qemu-devel@nongnu.org; Tue, 04 Oct 2016 02:44:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brJT5-0005tv-23 for qemu-devel@nongnu.org; Tue, 04 Oct 2016 02:44:49 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:33151) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brJT4-0005t6-Kv for qemu-devel@nongnu.org; Tue, 04 Oct 2016 02:44:46 -0400 Received: by mail-wm0-x242.google.com with SMTP id p138so18018070wmb.0 for ; Mon, 03 Oct 2016 23:44:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8MVCbWjWri8VnCIS4k7bI+GMADMHrO6XFzuOw3Yf9X0=; b=OhQGwT1uCA6BAuKB+HnOFFm5F2zA56E3vEiFfpEvytbcYHJgGSqRjUlO181H0DHD5R 65zuxr7rZu9GTTiTyf7MiDPSEXM58el/9GjT8NK1amt9TxHv9R+FMUXu1fD01g0PgLOk bH3ZEQtZo5TxNYYAh23cY8ZXo6ak/NWhPbebhFpwWYd0Q6f+toNGCGvjEtfRZFsevFkp NF4beKTS41BvwfxIv3uslTn/05cXgPO0rvcVEIVqWn7uK+pwqNL/8i3sJz0V2hnguREV YPXJcbSmOLsazfGr/Gc8hOe2J6hXmwvTxVItwy/LOeU5jbryCApCjqs06LfEnFMBANjS U15Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8MVCbWjWri8VnCIS4k7bI+GMADMHrO6XFzuOw3Yf9X0=; b=bdauZN2wVoJ/CHiY9sCpfVUJa04K51K42jbFFTe+qFjsp6Wn6EGQiUBvlUbOSJiYAi i37gc0r1qgf8LQ3PjygLlawbOBNxkHvrkSV93bvP7MnyaFny07tI2CsdPPKnrFvzbOPO gy8OGiNl2wuxdVlQvXwsxyBzbcQ37pab/BUsfJZnZobCX9UHn7jAsj92M+Gc4fXnjZcO z3935QCeXcz0+kqYl5dP9kAIlQ/JFezemNxk3FJZlJZEKZP2bse4XhToeFa8iWGS2APq FeXyGRnTnAWGWb/6bzwq8plgrPZ6I9ub3ODTcywZHgqf6SGL0dL6umFB60Zi9TLyIexD qU5w== X-Gm-Message-State: AA6/9RltoAfBS8VN3bLbNc2frCVBU8yseGiXiM9dN6TB6GwyYfiNLjHw3ewiSBzAIP8iJQ== X-Received: by 10.28.228.138 with SMTP id b132mr1955295wmh.124.1475563485916; Mon, 03 Oct 2016 23:44:45 -0700 (PDT) Received: from localhost.localdomain ([79.112.35.35]) by smtp.gmail.com with ESMTPSA id f142sm2341423wmf.19.2016.10.03.23.44.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Oct 2016 23:44:44 -0700 (PDT) From: Emil Condrea To: qemu-devel@nongnu.org Date: Tue, 4 Oct 2016 09:43:40 +0300 Message-Id: <1475563424-6604-12-git-send-email-emilcondrea@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1475563424-6604-1-git-send-email-emilcondrea@gmail.com> References: <1475563424-6604-1-git-send-email-emilcondrea@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PATCH 11/15] xen: Rename xen_be_send_notify X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: xuquan8@huawei.com, sstabellini@kernel.org, wei.liu2@citrix.com, stefanb@linux.vnet.ibm.com, xen-devel@lists.xen.org, anthony.perard@citrix.com, dgdegra@tycho.nsa.gov, Emil Condrea Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Prepare xen_be_send_notify to be shared with frontends: * xen_be_send_notify -> xen_pv_send_notify Signed-off-by: Emil Condrea Acked-by: Anthony PERARD Reviewed-by: Quan Xu --- hw/block/xen_disk.c | 4 ++-- hw/char/xen_console.c | 4 ++-- hw/display/xenfb.c | 8 ++++---- hw/net/xen_nic.c | 4 ++-- hw/usb/xen-usb.c | 6 +++--- hw/xen/xen_pvdev.c | 2 +- include/hw/xen/xen_pvdev.h | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c index 3688a4b..799ee25 100644 --- a/hw/block/xen_disk.c +++ b/hw/block/xen_disk.c @@ -797,7 +797,7 @@ static void blk_send_response_all(struct XenBlkDev *blkdev) ioreq_release(ioreq, true); } if (send_notify) { - xen_be_send_notify(&blkdev->xendev); + xen_pv_send_notify(&blkdev->xendev); } } @@ -867,7 +867,7 @@ static void blk_handle_requests(struct XenBlkDev *blkdev) }; if (blk_send_response_one(ioreq)) { - xen_be_send_notify(&blkdev->xendev); + xen_pv_send_notify(&blkdev->xendev); } ioreq_release(ioreq, false); continue; diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c index 6dc2d81..dbe4755 100644 --- a/hw/char/xen_console.c +++ b/hw/char/xen_console.c @@ -72,7 +72,7 @@ static void buffer_append(struct XenConsole *con) xen_mb(); intf->out_cons = cons; - xen_be_send_notify(&con->xendev); + xen_pv_send_notify(&con->xendev); if (buffer->max_capacity && buffer->size > buffer->max_capacity) { @@ -140,7 +140,7 @@ static void xencons_receive(void *opaque, const uint8_t *buf, int len) } xen_wmb(); intf->in_prod = prod; - xen_be_send_notify(&con->xendev); + xen_pv_send_notify(&con->xendev); } static void xencons_send(struct XenConsole *con) diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index a86d990..9a7b298 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -216,7 +216,7 @@ static int xenfb_kbd_event(struct XenInput *xenfb, XENKBD_IN_RING_REF(page, prod) = *event; xen_wmb(); /* ensure ring contents visible */ page->in_prod = prod + 1; - return xen_be_send_notify(&xenfb->c.xendev); + return xen_pv_send_notify(&xenfb->c.xendev); } /* Send a keyboard (or mouse button) event */ @@ -398,7 +398,7 @@ static void input_event(struct XenDevice *xendev) if (page->out_prod == page->out_cons) return; page->out_cons = page->out_prod; - xen_be_send_notify(&xenfb->c.xendev); + xen_pv_send_notify(&xenfb->c.xendev); } /* -------------------------------------------------------------------- */ @@ -673,7 +673,7 @@ static void xenfb_send_event(struct XenFB *xenfb, union xenfb_in_event *event) xen_wmb(); /* ensure ring contents visible */ page->in_prod = prod + 1; - xen_be_send_notify(&xenfb->c.xendev); + xen_pv_send_notify(&xenfb->c.xendev); } static void xenfb_send_refresh_period(struct XenFB *xenfb, int period) @@ -946,7 +946,7 @@ static void fb_event(struct XenDevice *xendev) struct XenFB *xenfb = container_of(xendev, struct XenFB, c.xendev); xenfb_handle_events(xenfb); - xen_be_send_notify(&xenfb->c.xendev); + xen_pv_send_notify(&xenfb->c.xendev); } /* -------------------------------------------------------------------- */ diff --git a/hw/net/xen_nic.c b/hw/net/xen_nic.c index c6af5dc..89a2f43 100644 --- a/hw/net/xen_nic.c +++ b/hw/net/xen_nic.c @@ -70,7 +70,7 @@ static void net_tx_response(struct XenNetDev *netdev, netif_tx_request_t *txp, i netdev->tx_ring.rsp_prod_pvt = ++i; RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&netdev->tx_ring, notify); if (notify) { - xen_be_send_notify(&netdev->xendev); + xen_pv_send_notify(&netdev->xendev); } if (i == netdev->tx_ring.req_cons) { @@ -222,7 +222,7 @@ static void net_rx_response(struct XenNetDev *netdev, netdev->rx_ring.rsp_prod_pvt = ++i; RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&netdev->rx_ring, notify); if (notify) { - xen_be_send_notify(&netdev->xendev); + xen_pv_send_notify(&netdev->xendev); } } diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c index f93c73d..7b0abf4 100644 --- a/hw/usb/xen-usb.c +++ b/hw/usb/xen-usb.c @@ -315,7 +315,7 @@ static void usbback_do_response(struct usbback_req *usbback_req, int32_t status, RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&usbif->urb_ring, notify); if (notify) { - xen_be_send_notify(xendev); + xen_pv_send_notify(xendev); } } @@ -591,7 +591,7 @@ static void usbback_hotplug_notify(struct usbback_info *usbif) /* Check for full ring. */ if ((RING_SIZE(ring) - ring->rsp_prod_pvt - ring->req_cons) == 0) { - xen_be_send_notify(&usbif->xendev); + xen_pv_send_notify(&usbif->xendev); return; } @@ -610,7 +610,7 @@ static void usbback_hotplug_notify(struct usbback_info *usbif) RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(ring, notify); if (notify) { - xen_be_send_notify(&usbif->xendev); + xen_pv_send_notify(&usbif->xendev); } TR_BUS(&usbif->xendev, "hotplug port %d speed %d\n", usb_hp->port, diff --git a/hw/xen/xen_pvdev.c b/hw/xen/xen_pvdev.c index 85f7430..61e40c9 100644 --- a/hw/xen/xen_pvdev.c +++ b/hw/xen/xen_pvdev.c @@ -258,7 +258,7 @@ void xen_pv_unbind_evtchn(struct XenDevice *xendev) xendev->local_port = -1; } -int xen_be_send_notify(struct XenDevice *xendev) +int xen_pv_send_notify(struct XenDevice *xendev) { return xenevtchn_notify(xendev->evtchndev, xendev->local_port); } diff --git a/include/hw/xen/xen_pvdev.h b/include/hw/xen/xen_pvdev.h index bc8a3ea..0ebcda7 100644 --- a/include/hw/xen/xen_pvdev.h +++ b/include/hw/xen/xen_pvdev.h @@ -70,7 +70,7 @@ void xen_be_del_xendev(struct XenDevice *xendev); struct XenDevice *xen_be_find_xendev(const char *type, int dom, int dev); void xen_pv_unbind_evtchn(struct XenDevice *xendev); -int xen_be_send_notify(struct XenDevice *xendev); +int xen_pv_send_notify(struct XenDevice *xendev); void xen_pv_printf(struct XenDevice *xendev, int msg_level, const char *fmt, ...) GCC_FMT_ATTR(3, 4);