From patchwork Sun Jul 16 20:04:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 9843639 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 C5AF260212 for ; Sun, 16 Jul 2017 20:24:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C428326E16 for ; Sun, 16 Jul 2017 20:24:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B90E027BA5; Sun, 16 Jul 2017 20:24:11 +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_SIGNED, 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 68A9D26E16 for ; Sun, 16 Jul 2017 20:24:11 +0000 (UTC) Received: from localhost ([::1]:46784 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWq5K-00005K-Io for patchwork-qemu-devel@patchwork.kernel.org; Sun, 16 Jul 2017 16:24:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWpmc-0001B0-Mu for qemu-devel@nongnu.org; Sun, 16 Jul 2017 16:04:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWpmW-0008NE-NG for qemu-devel@nongnu.org; Sun, 16 Jul 2017 16:04:50 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:57813) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dWpmW-0008My-JF for qemu-devel@nongnu.org; Sun, 16 Jul 2017 16:04:44 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5327020A5F; Sun, 16 Jul 2017 16:04:44 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Sun, 16 Jul 2017 16:04:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=rezXetaBobQWS9Q X2k4GHgXvfTBeY9n7/+dmkFYiZ/A=; b=sZaiN76GFFjURWtRGvbYUKefmatdB4u u/JgZYtvWe5qqK5qb37GZNH3glD3EwyiFEKUS4katR7E8wauCO/qkeaE3KGK/Uv7 yzMikTq7zYHxytI1C1Po9oYPwzxThdf87a0p7oDubBuW+GBYU8jxRMsNnHbYDZ9b +xcJKtA4B0zM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=rezXetaBobQWS9QX2k4GHgXvfTBeY9n7/+dmkFYiZ/A=; b=kN7442Pg rsDbr8iJzo3T8vwN+5dQ6eWijM1nLgyR/8lsMCr3597XUovms0Icq08IfGxF6sb+ p8dEhTl7GiQcOklZcgcIcwDxgf5XhkIp2/BaToIJl/gomWXgRARwa168tzDuPdIX iMF+gqfHmbuT/hfoV7Vb+ATKvMsroDyprc3qT0+kE/MnxRNkpIe53mMzZXrCRXGI EJtiuEIu1uQoDEgF7P0CV0jVakRo2FVezIczll2zqKxndD28rA1iJyYyZOovInHf lFeWW68pYQeIMBep+43+nXVQBCVzK506jpWSr+fvuAxJ5bx8iNpY+752M4Ti0RRQ TiNsNDYK7Jhl3w== X-ME-Sender: X-Sasl-enc: 5ixChuQA5S8ADASqIhFffreyVp+lEFDHStWq0DdFx6xP 1500235484 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 144042450F; Sun, 16 Jul 2017 16:04:44 -0400 (EDT) From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Sun, 16 Jul 2017 16:04:07 -0400 Message-Id: <1500235468-15341-25-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500235468-15341-1-git-send-email-cota@braap.org> References: <1500235468-15341-1-git-send-email-cota@braap.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 Subject: [Qemu-devel] [PATCH v2 24/45] exec-all: introduce TB_PAGE_ADDR_FMT 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: Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP And fix the following warning when DEBUG_TB_INVALIDATE is enabled in translate-all.c: CC mipsn32-linux-user/accel/tcg/translate-all.o /data/src/qemu/accel/tcg/translate-all.c: In function ‘tb_alloc_page’: /data/src/qemu/accel/tcg/translate-all.c:1201:16: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘tb_page_addr_t {aka unsigned int}’ [-Werror=format=] printf("protecting code page: 0x" TARGET_FMT_lx "\n", ^ cc1: all warnings being treated as errors /data/src/qemu/rules.mak:66: recipe for target 'accel/tcg/translate-all.o' failed make[1]: *** [accel/tcg/translate-all.o] Error 1 Makefile:328: recipe for target 'subdir-mipsn32-linux-user' failed make: *** [subdir-mipsn32-linux-user] Error 2 cota@flamenco:/data/src/qemu/build ((18f3fe1...) *$)$ Signed-off-by: Emilio G. Cota Reviewed-by: Richard Henderson --- include/exec/exec-all.h | 2 ++ accel/tcg/translate-all.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index b3f04c3..13975af 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -31,8 +31,10 @@ type. */ #if defined(CONFIG_USER_ONLY) typedef abi_ulong tb_page_addr_t; +#define TB_PAGE_ADDR_FMT TARGET_ABI_FMT_lx #else typedef ram_addr_t tb_page_addr_t; +#define TB_PAGE_ADDR_FMT RAM_ADDR_FMT #endif /* is_jmp field values */ diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index c38448c..c8fa86a 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -1198,8 +1198,7 @@ static inline void tb_alloc_page(TranslationBlock *tb, mprotect(g2h(page_addr), qemu_host_page_size, (prot & PAGE_BITS) & ~PAGE_WRITE); #ifdef DEBUG_TB_INVALIDATE - printf("protecting code page: 0x" TARGET_FMT_lx "\n", - page_addr); + printf("protecting code page: 0x" TB_PAGE_ADDR_FMT "\n", page_addr); #endif } #else