From patchwork Tue Oct 10 00:55:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 115322 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp3174003qgn; Mon, 9 Oct 2017 18:07:28 -0700 (PDT) X-Received: by 10.200.38.110 with SMTP id v43mr17197865qtv.296.1507597648363; Mon, 09 Oct 2017 18:07:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507597648; cv=none; d=google.com; s=arc-20160816; b=P2XuwDpSrBbD2+8OJjzz6NwFgo7vPdXEupYksmTPh8VS/ojLGfJqVMr8qbg3DrhvqM IWc3/32uwCtN8qtIrLBg77xhht2cBxKHFxUDFoW37ZwbWTSYb0fVhiNbu8ksfFz3b5RT hiuHLJPp5lll8w7iXnDe72cZCsIJIEvV7xy4kPfebfXePfuWdX30rGq/BnasnocrR7Qh KdJud5lle7FEDIHqq548M2Mh/6wHWpbUhqj066iCmiXPDdMOh0qi7bHR9JGsOwowHbcV aZ3HvKxUCE39I/YR23y73h+gwo5L9kyQln5gcLSC8Xa+PZmjB7scyVIOZdAbEIOjVgZm 6kkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=nCHgQRfd/6L6A+ZFLqYH/ozIQbUkersXx+TPVXfIV2w=; b=qkemRMLOuI3v3ICSLED2m09BQITyiGN4tZDJ6Y2pkB+fMZ2ATh8UJTpzOjeRve2S/A 2Uufc8qp+f+EP5v1hLvsAZ5Tn/R6dZXp7Ti3M7SxGcfvq8A3LSwbf8ILcmSL3U972uM+ Z59FJNrnBUE2C9MgGiLLCex2V4eRcJH2MclfjU+fcJ/CsMGdGr8ma8YgbPR7KZjGh4Np bhrAeqPOFpm5Uz1X8o8ca5hDg6j7v2KDuM5v6oeWtD+ucvWoMSIYk00JyXpzjoO19wO5 Iml9Wv8v1poe53apAco6okNu/bRxoBAYGB8XmB7Wvw24CK06btDfkKARWQhuatTlpn+a LJfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JtDbDyIJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p5si2469422qkf.227.2017.10.09.18.07.28 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 09 Oct 2017 18:07:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JtDbDyIJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1j14-0002RY-B6 for patch@linaro.org; Mon, 09 Oct 2017 21:07:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1iqL-0002LH-5P for qemu-devel@nongnu.org; Mon, 09 Oct 2017 20:56:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1iqK-0004Tb-7o for qemu-devel@nongnu.org; Mon, 09 Oct 2017 20:56:21 -0400 Received: from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]:43662) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1iqK-0004TE-2D for qemu-devel@nongnu.org; Mon, 09 Oct 2017 20:56:20 -0400 Received: by mail-pf0-x235.google.com with SMTP id d2so12283029pfh.0 for ; Mon, 09 Oct 2017 17:56:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nCHgQRfd/6L6A+ZFLqYH/ozIQbUkersXx+TPVXfIV2w=; b=JtDbDyIJyGwXyhSqW9TjdNsbm8lXL0CEmSBnw9L1KCgb3BKLHkRru4I+RazstUkcHn 0rMGdpKrpdhkQPDzCmcy34RgOIZMOToyy4ypwCiYvRNDte1uxuEUDb8qiuqLJb4RqKQu lu6l5t6s6pXjH7MD6ltUN7Ur2fRaZw/oNAy24= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nCHgQRfd/6L6A+ZFLqYH/ozIQbUkersXx+TPVXfIV2w=; b=B+PbpMnn8o+ipr/sC/aYmnHuLZQYdxgWCrxNmKCxvWTDWKjuB8uxGtfbolkGMnZYyQ jbl9BlesQsYcQupmvheTNQ59mpWtYfMcKeu7leqk+KxW6EeNNFO+QAyIml7iWVq9lsCb +wW0cshsjde4aFpcgnQNToY+zipO7MQc4aaHQ4TGrCvSV/9mTH+m2jl4j6uzgiBruM5p EgLFntaZyUW8YQeUllt9a6SfHaFSvc6Kru+lbkxQUXLOkDGBEi7qtm46fGZfZYH+7Ked DFRd+GVf01w/VaPO9dRvQT5GhTQiL/iBbmBo3be4xXbltQa1rafE6X7rcqebtaKkjqGC lDjQ== X-Gm-Message-State: AMCzsaXTiRbOhbu42Ujkfr8OeTVokGfDXP9MJcLkJxXdLkR56QkpwFcg QQZgq3P8JdA2yrSBQ66cT+4sdxcCuI4= X-Google-Smtp-Source: AOwi7QAiubOPwdHiyaZWUxf/sDg3/oLFZ2IZe1vTFghq0wOO8DXa/Ja79tqcA2FExCZA2nODIZBcjQ== X-Received: by 10.98.182.15 with SMTP id j15mr881941pff.47.1507596978793; Mon, 09 Oct 2017 17:56:18 -0700 (PDT) Received: from bigtime.twiddle.net (97-126-104-76.tukw.qwest.net. [97.126.104.76]) by smtp.gmail.com with ESMTPSA id n19sm17121368pfj.52.2017.10.09.17.56.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2017 17:56:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 9 Oct 2017 17:55:49 -0700 Message-Id: <20171010005600.28735-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171010005600.28735-1-richard.henderson@linaro.org> References: <20171010005600.28735-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::235 Subject: [Qemu-devel] [PULL 12/23] 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: peter.maydell@linaro.org, "Emilio G. Cota" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" 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...) *$)$ Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 2 ++ accel/tcg/translate-all.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.13.6 diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 3135aaf4c9..79f8041811 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 #include "qemu/log.h" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 799b027e79..90b3eed9c6 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -1193,8 +1193,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