From patchwork Tue Oct 10 19:29:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 115463 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp4123654qgn; Tue, 10 Oct 2017 12:42:07 -0700 (PDT) X-Received: by 10.237.32.172 with SMTP id 41mr20456277qtb.213.1507664527497; Tue, 10 Oct 2017 12:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507664527; cv=none; d=google.com; s=arc-20160816; b=zCOvE+UTHzlMuWC+01YgFZhrh09haeqq047mxZpO4Zbp39IXXG99R3c+aKsWTDAO0j 5fyeDzk8TiOSmTK+urT7x6iRWN23k0A/g1jHTqSBTvdHmOkp21r+jHtBT6dwOwBBk/pL lWBj+awNOcgE8Q8v5cv+DGoCNV4JfOCDDLWzASsokhwkDxMM+UPb1UP10xmRj+javj+K If0dMUNDkOTBBJFpE+GoIHrs9w1UzHVxjIMqj0l3GtTAGTdrhtXiC/xMduB7fAKkE9u0 X/moD86IDEolymf5mswKDyspd7KpMKm1vJMoOQNWysqOgEMreQBRJIW49GfSTwSI3GUI AK7w== 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=JMYytFj0QCjJBdyzZqo/7/LtYv6nLluONZOHZTfmJK/CnMk/LhZtM4L3IMK+8oCfVj AJOYxJyJjxbGdwqdarwfKVG+FlTHrfie3xKkFQd8cwTvvMigiIVjYPR/GawjDIDDBQob h/P5Oo5w7j6EWNyodn5OWiJnjwrSenidWWRiEJuie0kvPRFpI5JAa8aPTgBHL3C/jGV2 BIFy+NWteNPlMwcXFjvhzV5EYaJ7T+xJ+MF+/JAIFTI+ba+ETqKCY0O5PTkg29+FEMT6 k1lqYoOE8Z2+0wS4jRHxUCtyGOF33yp0lkDjXBHOrDR4w/MJ+zrfM7xU8BMyMQDO+m/M i2pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fWPlj9Ab; 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 d198si2349285qkg.484.2017.10.10.12.42.07 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 10 Oct 2017 12:42:07 -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=fWPlj9Ab; 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]:36846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e20Pl-0001Bo-Bn for patch@linaro.org; Tue, 10 Oct 2017 15:42:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e20EZ-0000mo-DW for qemu-devel@nongnu.org; Tue, 10 Oct 2017 15:30:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e20ET-00055P-QX for qemu-devel@nongnu.org; Tue, 10 Oct 2017 15:30:31 -0400 Received: from mail-pf0-x233.google.com ([2607:f8b0:400e:c00::233]:54759) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e20ET-00054m-Jy for qemu-devel@nongnu.org; Tue, 10 Oct 2017 15:30:25 -0400 Received: by mail-pf0-x233.google.com with SMTP id m28so13339949pfi.11 for ; Tue, 10 Oct 2017 12:30:23 -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=fWPlj9AbltdQtnuBqPNPux1kN2vFh8Kyc6GhMNgerN+Tck6b6EFEy6N1O/7pSmdy2u SG3ZHCALoJgC3lS77gqCkZwcjfApjShxbhC8vKsBvYXxdjrkPGFcgdcYAcONwdfeWpBp mDmQt3juUWsnxozpWKmjp4ld8Bw2PQb3EghY4= 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=Nknr+K12G97lNvW1XRnMSFuk3R+RsGt8MaOeXbkZWTJv3aJ/Io9DEQUfIRPehICATz wm8haKATDVBeHJFmFIZhnpWxnvd6vmpyRgIR3MCdDnQ506IQjHRdT3SVELLrG/x5AGA7 elr70Awd14//OpGUvW6Z2BR5jV+h0XCagtNS7OYhoP+HtgDe/pL3me0++FSBuMjGQ+gz k5PdHq3ZMZm/zdhR4IkbT6MaedpdUhfjnpFU2RqM7/7puq3HBofK15M+fDGDFrU1UClE vYjB2DCTGa1LCU/vQGHvtI78+/c9cPoLyou1e6Ew0zVc3tRcc1i0IQ3LdTK04NSzeO8w vPIw== X-Gm-Message-State: AMCzsaX6rqAhEYIeTKw9kJks1rSYpAQI6DdTr3w8Cq6JId1fjIXz1eUA U7gA8K+sz5CJz26oG2owK2I0HIK/g4A= X-Google-Smtp-Source: AOwi7QC6bmoL69oh9hFA5qv54bdN++zziW0rosKQhlUtpqzA3czzXPQmk8Vt7CTMnU55YzSlM6i9Sg== X-Received: by 10.99.167.68 with SMTP id w4mr12937604pgo.390.1507663822260; Tue, 10 Oct 2017 12:30:22 -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 r22sm19859788pfl.15.2017.10.10.12.30.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Oct 2017 12:30:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 10 Oct 2017 12:29:55 -0700 Message-Id: <20171010193003.28857-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171010193003.28857-1-richard.henderson@linaro.org> References: <20171010193003.28857-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::233 Subject: [Qemu-devel] [PULL v2 12/20] 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