From patchwork Fri Feb 12 17:31:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 8294211 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 33E2C9F1E0 for ; Fri, 12 Feb 2016 17:34:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44067203ED for ; Fri, 12 Feb 2016 17:34:13 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6DB732042A for ; Fri, 12 Feb 2016 17:34:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aUHZO-0003oV-NI; Fri, 12 Feb 2016 17:31:50 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aUHZN-0003nA-7C for xen-devel@lists.xensource.com; Fri, 12 Feb 2016 17:31:49 +0000 Received: from [85.158.143.35] by server-1.bemta-4.messagelabs.com id E0/71-09708-4071EB65; Fri, 12 Feb 2016 17:31:48 +0000 X-Env-Sender: prvs=843c78e41=Stefano.Stabellini@citrix.com X-Msg-Ref: server-7.tower-21.messagelabs.com!1455298304!15589871!3 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1044 invoked from network); 12 Feb 2016 17:31:48 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-7.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 12 Feb 2016 17:31:48 -0000 X-IronPort-AV: E=Sophos;i="5.22,436,1449532800"; d="scan'208";a="331404941" From: Stefano Stabellini To: Date: Fri, 12 Feb 2016 17:31:05 +0000 Message-ID: <1455298265-16795-5-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Campbell , xen-devel@lists.xensource.com, qemu-devel@nongnu.org, Stefano Stabellini Subject: [Xen-devel] [PULL 5/5] xen: Drop __XEN_LATEST_INTERFACE_VERSION__ checks from prior to Xen 4.2 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ian Campbell We assume (and check for in configure) 4.2 or later now. In reality all of the removed checks are for far older versions. FMT_ioreq_size is no longer needed. Signed-off-by: Ian Campbell Reviewed-by: Stefano Stabellini Signed-off-by: Stefano Stabellini --- hw/display/xenfb.c | 7 ------- xen-hvm.c | 19 ++----------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index a533c3d..40b096a 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -241,9 +241,7 @@ static int xenfb_send_motion(struct XenInput *xenfb, event.type = XENKBD_TYPE_MOTION; event.motion.rel_x = rel_x; event.motion.rel_y = rel_y; -#if __XEN_LATEST_INTERFACE_VERSION__ >= 0x00030207 event.motion.rel_z = rel_z; -#endif return xenfb_kbd_event(xenfb, &event); } @@ -258,12 +256,7 @@ static int xenfb_send_position(struct XenInput *xenfb, event.type = XENKBD_TYPE_POS; event.pos.abs_x = abs_x; event.pos.abs_y = abs_y; -#if __XEN_LATEST_INTERFACE_VERSION__ == 0x00030207 - event.pos.abs_z = z; -#endif -#if __XEN_LATEST_INTERFACE_VERSION__ >= 0x00030208 event.pos.rel_z = z; -#endif return xenfb_kbd_event(xenfb, &event); } diff --git a/xen-hvm.c b/xen-hvm.c index fbe0e3a..039680a 100644 --- a/xen-hvm.c +++ b/xen-hvm.c @@ -67,17 +67,6 @@ struct shared_vmport_iopage { typedef struct shared_vmport_iopage shared_vmport_iopage_t; #endif -#if __XEN_LATEST_INTERFACE_VERSION__ < 0x0003020a -static inline uint32_t xen_vcpu_eport(shared_iopage_t *shared_page, int i) -{ - return shared_page->vcpu_iodata[i].vp_eport; -} -static inline ioreq_t *xen_vcpu_ioreq(shared_iopage_t *shared_page, int vcpu) -{ - return &shared_page->vcpu_iodata[vcpu].vp_ioreq; -} -# define FMT_ioreq_size PRIx64 -#else static inline uint32_t xen_vcpu_eport(shared_iopage_t *shared_page, int i) { return shared_page->vcpu_ioreq[i].vp_eport; @@ -86,8 +75,6 @@ static inline ioreq_t *xen_vcpu_ioreq(shared_iopage_t *shared_page, int vcpu) { return &shared_page->vcpu_ioreq[vcpu]; } -# define FMT_ioreq_size "u" -#endif #define BUFFER_IO_MAX_DELAY 100 @@ -688,7 +675,7 @@ static ioreq_t *cpu_get_ioreq_from_shared_memory(XenIOState *state, int vcpu) if (req->state != STATE_IOREQ_READY) { DPRINTF("I/O request not ready: " "%x, ptr: %x, port: %"PRIx64", " - "data: %"PRIx64", count: %" FMT_ioreq_size ", size: %" FMT_ioreq_size "\n", + "data: %"PRIx64", count: %u, size: %u\n", req->state, req->data_is_ptr, req->addr, req->data, req->count, req->size); return NULL; @@ -1050,9 +1037,7 @@ static void cpu_handle_ioreq(void *opaque) if (req->state != STATE_IOREQ_INPROCESS) { fprintf(stderr, "Badness in I/O request ... not in service?!: " "%x, ptr: %x, port: %"PRIx64", " - "data: %"PRIx64", count: %" FMT_ioreq_size - ", size: %" FMT_ioreq_size - ", type: %"FMT_ioreq_size"\n", + "data: %"PRIx64", count: %u, size: %u, type: %u\n", req->state, req->data_is_ptr, req->addr, req->data, req->count, req->size, req->type); destroy_hvm_domain(false);