From patchwork Tue May 19 07:59:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 473765 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B64A0140D4E for ; Tue, 19 May 2015 18:00:01 +1000 (AEST) Received: from localhost ([::1]:44331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YucRU-00079B-1p for incoming@patchwork.ozlabs.org; Tue, 19 May 2015 04:00:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YucRF-0006sJ-7Z for qemu-devel@nongnu.org; Tue, 19 May 2015 03:59:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YucRA-0006wG-80 for qemu-devel@nongnu.org; Tue, 19 May 2015 03:59:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YucRA-0006w8-04 for qemu-devel@nongnu.org; Tue, 19 May 2015 03:59:40 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4J7xcce030493 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 May 2015 03:59:38 -0400 Received: from donizetti.redhat.com (ovpn-112-26.ams2.redhat.com [10.36.112.26]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4J7xYqX017177; Tue, 19 May 2015 03:59:36 -0400 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 19 May 2015 09:59:34 +0200 Message-Id: <1432022374-10496-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: agraf@suse.de Subject: [Qemu-devel] [PATCH] tci: do not use CPUArchState in tcg-target.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org tcg-target.h does not use any QEMU-specific symbols, save for tci's usage of CPUArchState. Pull that up to tcg/tcg.h. This will make it possible to include tcg-target.h in cpu-defs.h. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson --- tcg/tcg.h | 4 +++- tcg/tci/tcg-target.h | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index fbb3daf..647aa4e 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -876,7 +876,9 @@ static inline size_t tcg_current_code_size(TCGContext *s) #define TB_EXIT_ICOUNT_EXPIRED 2 #define TB_EXIT_REQUESTED 3 -#if !defined(tcg_qemu_tb_exec) +#ifdef HAVE_TCG_QEMU_TB_EXEC +uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr); +#else # define tcg_qemu_tb_exec(env, tb_ptr) \ ((uintptr_t (*)(void *, void *))tcg_ctx.code_gen_prologue)(env, tb_ptr) #endif diff --git a/tcg/tci/tcg-target.h b/tcg/tci/tcg-target.h index bd1e974..662d45c 100644 --- a/tcg/tci/tcg-target.h +++ b/tcg/tci/tcg-target.h @@ -175,8 +175,7 @@ typedef enum { void tci_disas(uint8_t opc); -uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr); -#define tcg_qemu_tb_exec tcg_qemu_tb_exec +#define HAVE_TCG_QEMU_TB_EXEC static inline void flush_icache_range(uintptr_t start, uintptr_t stop) {