From patchwork Wed Aug 14 23:36:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 819158 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp921071wrm; Wed, 14 Aug 2024 16:38:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU8Abirp1G1hksCEX4Q18CyCFv1YfM5IPWgYFWh4mdQlW1AqWJTPtUQXNonnBHn0ztGO44UD90TKC10oJzfI+zs X-Google-Smtp-Source: AGHT+IFAlDJb0mGGJc+7cg6vUD6mpEmlig2FhbW1ENSEQ5c/VgQ9HNTuV+G/F3AX+PP/KF8xECPF X-Received: by 2002:a05:620a:d8b:b0:79f:750:e5df with SMTP id af79cd13be357-7a4ee3e82e7mr491099885a.66.1723678709914; Wed, 14 Aug 2024 16:38:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723678709; cv=none; d=google.com; s=arc-20160816; b=FDAX+H9fOMM00K/UhTxh5JQRaPtJjCUVYy8VyIyywrEyui2UyUByL5nkCWo+7hAW5B Zqm779THVF3gMihYVi4GjUu356m8dcF2IKdhdkEbKi4W7NtqQLtSetSAjrhVJMm1H/4O AVxRG1s12naFUnl4EDXQzb0ukTD7e99vdtMx/8rF1RLPb64JzafwUpTG6MUHFvY3J05/ 9yx6vFTd+zPIj/5fmVP9fZ8VQPlauL6WTmq9DnlSPoXvmvvtVT/50fQWqnH2+jmCaPWE ssZpJRdE7O5OcqdmlUgI5yt8x6YkxGq9ALEQTYILFjKAHDPmnSg60wXtg+qJ+hlIVMw/ IrwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bzoJvs+/ktmRvV/uludFrSeMjpPKw38xy+lGwp2LWAA=; fh=oXkr8tRtU3V0Y/ys4wmfLP1vjmnh5XTVxxercrnp+aA=; b=sVG3jE8G3F+QYDMzLzdszrfoPliv9xONArBbw7N9y3/lZgSVyfDMWgafEF6vPOA0m8 z7QIY/eKPTFfuUTkruFAXvb7VE49CP+vfuLC+YWyUzF+3p+3pXlyzbGUo2QAoJuBrdcX iwqediP+lj0CV3ffpaVMsmHIjuv/HumG+Pvqn7tSxXRTeJml/E+uyuUbkpsoUFYb6qS6 Dx3JqHaVy580GhkpOIjy5T6DH2ljjSIGPlLKX6ybqy0tBryhokgw0LoAbR2bvMXLBVji ED8NcIAIqqvBhbTs0sSltuWNRQc3N1/s+cBfCKhdZM1NcUS/ZHz4yvgDYZ12eLj0my6B PYHg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CqIMZho1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a4ff114a68si42932885a.660.2024.08.14.16.38.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Aug 2024 16:38:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CqIMZho1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seNYA-00023A-ST; Wed, 14 Aug 2024 19:37:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seNY6-0001ki-8h for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:37:02 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seNY4-0006WR-Lt for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:37:02 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-70f5ef740b7so319819b3a.2 for ; Wed, 14 Aug 2024 16:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723678619; x=1724283419; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bzoJvs+/ktmRvV/uludFrSeMjpPKw38xy+lGwp2LWAA=; b=CqIMZho1iQIzGr/SHFL9AtS4K0w0BAfgozvIyT26wP3J+eJxtF5m/jjt/1CPhiSrRm 35XlCvnFZbumzBuKYuGA3yhf12ZpuC5lvrxdYI++XzXmPqytzGrt0jJDzRmg5eu+jy6c 0TLXGD5YnTp4JI3qwobtYD4LQ/k13bQ5WU6UOqpC3d3tTSiSGoS0+QzKZEnsp41aei2v HlgHHW/A6cvcJ+59fOrdQLsu2KvXlHXiNjQQnn8McqPKGN2UkjHz8bXWVpWPuk1LwEV8 okfrsylTxNa7u9CoH4I3fE0rVK9pNvAnEk79xpO0FXpFG/Cn+shmisCAxzedYBzuv23o d6IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723678619; x=1724283419; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bzoJvs+/ktmRvV/uludFrSeMjpPKw38xy+lGwp2LWAA=; b=L8H/DJ00/ipzbaUmNqyiaytLkFhm6zZcOTthgQhb9kHjKc42+EFZiWHzwBP31GLgZj MBqWNTC5D5eoS/RMFXW49g485VtzPXdV3gFT8eL5CtcSxfLGi2CmJCOzt0fh4CI8EmcK iUyhXjyF69+mKAB5wY3n2dxxEg4TxP8qDb9vRpv4JqJcqAaFlYxazhkUXmsnQNgN2kAI VIEc0NQ9btHFGWXt/JpN0efsaWsVGa0M3Z6SETZQVnyJJth8PFPV1OgrW/nJgLxC71k9 m39Xb2UGHy+krRXKbj+ujlZMoNfVHG9T6Uz1GRXTedC9vFwUEo1WduoSxpfwcJxBil5A fZag== X-Gm-Message-State: AOJu0Ywo4uJcrpnd44ZeNueVgJKMzRNevs3X+q3IpSa3yR9MoNZxBJwC 8o2yLWe07xBGgMGuNxkapvBeBGXoX/+xiN/yY/OeKcyCTbXWNGg5R1EtV8IQ4DUMdtqZqwELE3K h1gs= X-Received: by 2002:a05:6a00:1ad1:b0:706:29e6:2ed2 with SMTP id d2e1a72fcca58-712670fa392mr6336540b3a.5.1723678619237; Wed, 14 Aug 2024 16:36:59 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::b861]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7127aef57dfsm112164b3a.115.2024.08.14.16.36.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 16:36:58 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Mahmoud Mandour , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Alexandre Iooss , Thomas Huth , Pierrick Bouvier , =?utf-8?q?Marc-Andr=C3=A9_L?= =?utf-8?q?ureau?= , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= Subject: [PATCH 4/6] contrib/plugins/hotblocks: fix warning when compiling on 32bits host Date: Wed, 14 Aug 2024 16:36:43 -0700 Message-Id: <20240814233645.944327-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814233645.944327-1-pierrick.bouvier@linaro.org> References: <20240814233645.944327-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Found on debian stable (i386). ../contrib/plugins/hotblocks.c: In function 'vcpu_tb_trans': ../contrib/plugins/hotblocks.c:117:56: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 117 | cnt = (ExecCount *) g_hash_table_lookup(hotblocks, (gconstpointer) hash); | ^ ../contrib/plugins/hotblocks.c:126:40: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 126 | g_hash_table_insert(hotblocks, (gpointer) hash, (gpointer) cnt); | Signed-off-by: Pierrick Bouvier --- contrib/plugins/hotblocks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 02bc5078bdd..d540f1b7f0b 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -109,9 +109,9 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *udata) static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) { ExecCount *cnt; - uint64_t pc = qemu_plugin_tb_vaddr(tb); + uintptr_t pc = qemu_plugin_tb_vaddr(tb); size_t insns = qemu_plugin_tb_n_insns(tb); - uint64_t hash = pc ^ insns; + uintptr_t hash = pc ^ insns; g_mutex_lock(&lock); cnt = (ExecCount *) g_hash_table_lookup(hotblocks, (gconstpointer) hash);