From nobody Fri May 9 01:58:01 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1733958308; cv=none; d=zohomail.com; s=zohoarc; b=Qnv+cAIvV+xh4HNx2T/gcA3KyjMV5HSyXvwk2X1ACFtiDNf5t5oL5YakfWy9xsdgxwtaZVcA6VdrSfIMoFmMlJQLl7gie20i5M2I8gL5Xq1jbVhhW5GE7DOScuOc81EVIqr4jFroMVkbah5oqk/rQHW3jPk9lf6B5uXyusmWxE8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733958308; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=q84BF+ePAefMMrHK1zEl0KjUdaMQRdy3zhrx62Em4cY=; b=VUfT6I2A/SOTkiv9vrTkMX43F1mhUpxR4uh8Todoo22YZKuh5DrbWRIsEfNGeQxnWqpm7j+eVYfFxXmsrZgoTHS9cB6iXeBf3Lidi/D63q/YoXuSGIg+P0oVyNLC9b7MTVZRHQwhd6IbFQCtP49Hgq27xOBZnAkH6XjiyszMYu8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<philmd@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17339583086931001.5542488101772; Wed, 11 Dec 2024 15:05:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tLVkX-0002oz-Vf; Wed, 11 Dec 2024 18:04:10 -0500 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 <philmd@linaro.org>) id 1tLVkW-0002oJ-RT for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:08 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tLVkV-0001rS-8T for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:08 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-385d7b4da2bso6022449f8f.1 for <qemu-devel@nongnu.org>; Wed, 11 Dec 2024 15:04:06 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38782514dc3sm2279838f8f.67.2024.12.11.15.04.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Dec 2024 15:04:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733958245; x=1734563045; 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=q84BF+ePAefMMrHK1zEl0KjUdaMQRdy3zhrx62Em4cY=; b=A7ymYIDO5fap9DrW/EBuzh7/yEydEefzdDuEfKHedx5RcI4wSuCV5V55XUhPcIkajG JiUJbLRJR41PR+DwSgdBi047I+zg9ZylSlnR4CtmC8gGmdQjuTKZYKVM8pSEc1qasYmm 5ztNXDuzPcP5k+lkHCmku3wgrOz4gLiKrSrX1PSBNvGsQBrnbjFy7qmreAyPj0qnTOYm yFErLFM7CXFctn9La0dFsOMtiNWKCzrinER09og6FJEoqLDKrI1ZaAMtj8De9WcehdO3 L/M4Xx+iX8xuwNwQDvL2HP0Wt5Wzd+8lKOk31114f2cMJ//cpuwfANBFzIqDdC8zVXnB VL6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733958245; x=1734563045; 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=q84BF+ePAefMMrHK1zEl0KjUdaMQRdy3zhrx62Em4cY=; b=Hpmc5tLfHeiZGN1CITkLLqcKrl9oAuHZVUUTR05j5cWwBki6llDnDGak/5CHUK5h6k a5MtxYmQMGPD2xTWX7aR0jMUtk6bqwO5LkChNXpbzy6gY56cMyrYb/nT6cKaMdZNmAnW KM/qE0dgQgi7KMO2+NvkuRqf5wpsIoPwGK6T6LMd6va1OchlL+2zD6bc0q89He5H8i8e ahN+aU3Q1JsdbenpZanWzl3h/C5p2DzZuzWwzHDU2E2a4Olfk9bpJnfc3j5QHuoHVd8s sYRBkLTzOTkIgiVgDm0cUR5A0jhISY5MblNXwK5sK+sbYOv0s9R9Q2LW4UJ4cWaB/g8X ALoQ== X-Gm-Message-State: AOJu0YyHGW1O+ur0l0fCzNU6iM+MGeevpZIv8lIL4KUuZDUsBtPxDO+I R0NFEzcJYolCZRAWtmMjq2GeP52LZq3CRL7DRTqlcyfw7e1QOfxfGiLS32IpLJIrzphw5RdOf4n q X-Gm-Gg: ASbGncumTikcgP+3xnSMVNNpacsxDXwIQOWxVpA+hlHzJfNKPB9qSOAYMor6lj3qnQF 1Nq/rWQPLh0/1yyYI/gf7RSoZbdaNFrmTCLaayqIYMgDsTZygVuosVOHsH61FtQFC/rB2fPtAcZ 98qxtFhN9n3FKlso0NsXMb7CGoFErZmqO6h32cVpF3cWTo4dYmS2FKCqTRppez8LVjp8qpPJySt pFQIJxIIh4GqNmUVGDmhzP7pJP6/0Lw6v+Om08ainOreqANex4gJqIsATKNfyDzNZkL1vQqBRtG HuNiPP8YOi3nQ2NIPUWo51cv7i7t4u3XiQ== X-Google-Smtp-Source: AGHT+IFj4wDYdVTeVwuYH2TKwtEA6LG+06PYKJPO47q/hi6nNnWcScJdwe5EV5X9ap37AMBzXiD+XQ== X-Received: by 2002:a5d:5983:0:b0:386:3903:86eb with SMTP id ffacd0b85a97d-3864ce97148mr3804619f8f.23.1733958245097; Wed, 11 Dec 2024 15:04:05 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Richard Henderson <richard.henderson@linaro.org>, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Peter Maydell <peter.maydell@linaro.org> Subject: [PATCH v2 1/9] target/xtensa: Remove tswap() calls in semihosting simcall() helper Date: Thu, 12 Dec 2024 00:03:49 +0100 Message-ID: <20241211230357.97036-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241211230357.97036-1-philmd@linaro.org> References: <20241211230357.97036-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1733958309496116600 In preparation of heterogeneous emulation where cores with different endianness can run concurrently, we need to remove the tswap() calls -- which use a fixed per-binary endianness. Get the endianness of the CPU accessed using the libisa xtensa_isa_is_big_endian() call and replace the tswap() calls by bswap() ones when necessary. Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- target/xtensa/xtensa-semi.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/target/xtensa/xtensa-semi.c b/target/xtensa/xtensa-semi.c index fa21b7e11fc..2ded8e5634e 100644 --- a/target/xtensa/xtensa-semi.c +++ b/target/xtensa/xtensa-semi.c @@ -30,6 +30,7 @@ #include "chardev/char-fe.h" #include "exec/helper-proto.h" #include "semihosting/semihost.h" +#include "semihosting/uaccess.h" #include "qapi/error.h" #include "qemu/log.h" =20 @@ -323,15 +324,12 @@ void HELPER(simcall)(CPUXtensaState *env) uint32_t fd =3D regs[3]; uint32_t rq =3D regs[4]; uint32_t target_tv =3D regs[5]; - uint32_t target_tvv[2]; =20 struct timeval tv =3D {0}; =20 if (target_tv) { - cpu_memory_rw_debug(cs, target_tv, - (uint8_t *)target_tvv, sizeof(target_tvv), 0); - tv.tv_sec =3D (int32_t)tswap32(target_tvv[0]); - tv.tv_usec =3D (int32_t)tswap32(target_tvv[1]); + get_user_u32(tv.tv_sec, target_tv); + get_user_u32(tv.tv_sec, target_tv + 4); } if (fd < 3 && sim_console) { if ((fd =3D=3D 1 || fd =3D=3D 2) && rq =3D=3D SELECT_ONE_W= RITE) { @@ -387,11 +385,8 @@ void HELPER(simcall)(CPUXtensaState *env) const char *str =3D semihosting_get_arg(i); int str_size =3D strlen(str) + 1; =20 - argptr =3D tswap32(regs[3] + str_offset); - - cpu_memory_rw_debug(cs, - regs[3] + i * sizeof(uint32_t), - (uint8_t *)&argptr, sizeof(argptr), 1); + put_user_u32(regs[3] + str_offset, + regs[3] + i * sizeof(uint32_t)); cpu_memory_rw_debug(cs, regs[3] + str_offset, (uint8_t *)str, str_size, 1); --=20 2.45.2 From nobody Fri May 9 01:58:01 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1733958392; cv=none; d=zohomail.com; s=zohoarc; b=IpO3DhHnas9+gkeKP80Rvy+k+H7/HP1L55BaL9Q9h7XwXcgP6OGwegAcZJvq4A3iOdeCzCJrWaPysNuwEp6vf38uU7cBjS0z+1Xb3U8dczDIEGHqHO3qTUsNm19nrL9yuZbAVrS+gMmABW1X70Q79Byqu/I3adJakVvKC1mFDQc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733958392; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=KujEMlgf4sTtMREgvgm8kU4qI7hcBzQ7iBZYjiigW3U=; b=DKGnesBKh/bW8uz99vqg1u5SeaEe4mAq6PDFozGz4sPLte4EHsZQgK57q6reeAzPxjVjba8prOS9/7C/SWIYhpP+IJFHC/yM3f30jRYM2OZupvjoxV9HyxDSkyevGISnQfF+zI8qQFSVYeLe9VpruvtxE6exqz5rP2oGcYHEe1I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<philmd@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733958392797390.13152286867785; Wed, 11 Dec 2024 15:06:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tLVkd-0002sb-T2; Wed, 11 Dec 2024 18:04:15 -0500 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 <philmd@linaro.org>) id 1tLVkc-0002r2-8C for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:14 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tLVkZ-0001uY-GU for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:14 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4361b0ec57aso15702875e9.0 for <qemu-devel@nongnu.org>; Wed, 11 Dec 2024 15:04:11 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4361ec75410sm22742245e9.1.2024.12.11.15.04.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Dec 2024 15:04:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733958249; x=1734563049; 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=KujEMlgf4sTtMREgvgm8kU4qI7hcBzQ7iBZYjiigW3U=; b=ehh76pDGgXM8krjWCraj4aZE3l+G3tJjdHms0Krkpg4Z2AmG2w1Euu3jAIHJfyio7Y H6x6XcItkMMWOkE4njc6fWdMXR6APW7YmCDLO1lAPQacUKy0/xqnvm8nEmU1t9xh8X0O nPsy6XCqimhDT68/bIpNDKw3kAIXIGITs8SFLdCEp28/Cen/OFQkJfKlhZzjT7iTogkS VkAodSjoK87YCo5TVoMgB8X4poR8jlX4Y7ipDTWt1QEZfqjk4fqWy1KaR6gLrcycnvC/ 52BRulV/gpxdDv2TL+9Hfv2uYDf42E7YXVfTe/xHCVe8AkA3uydKMpl5E2FP/QyvXUJv 9HIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733958249; x=1734563049; 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=KujEMlgf4sTtMREgvgm8kU4qI7hcBzQ7iBZYjiigW3U=; b=j/sbo7Zgn5R8IZl0NOsPpMgIWpdfUpNpv7vIpjMeS75amlCfzLkMe7JfQqHoHXJsFd UBAOwzVLEIIQmZSTwGcnVPYHNbIgu7I1BXWElkGOaW5E9y4RzM0pjXYUEz2/NCO9Uqr5 V0+dTL6GXQGd0Fz9bWcTNz7XWQ+1eS0jyrXDkDFyq7Aa7OByZdZxGfBECliMnxrBB6NZ e6fOYhP+Fajyrhc1fvRsJR13OXpvnghzsGuYTeWvzcclRxtWFQuJ11F4AONbylV8CKTC iFHFsGA8DPCgzdeWCrdZ2t6A9alBQy75O9gBGzjnf8NZKKMg/GKiR1pnw49XHHfLfeA1 NuIg== X-Gm-Message-State: AOJu0Yw8ad8M5YOIoT4szE7uqDAcyPO5bk47JcUkmYEwdRIS43a3iilA G9MqtCzjlF1/Q0CXmL7/L3WxqFlFb8cI3ItkFA2278T4sOjJl5dDzds2fpY2eH3ZJyBTsdJU4wj J X-Gm-Gg: ASbGncuFy2VyG+MX1cvEtAMhQ7BLtnmtmezV22B26wgvlQaNp+P/IXbi0v55Hs8rSJ8 M8r9W/X0TS1y6IyKH3Ivvu1rdPJWS9JtzZdpieEStZ5pIRqQhiro/TrFGZ6FWUShRnkedC80JmY DEU7GxyQzLesgEWF59nK3EXSupQUXc0i/q7pT7h226THb5A3oaQrqGjYwOdFtZHjxo9ymaSvgXX VizBED/4Wi2EJHUDAO46jwuN9bCS565y8NVHM1gY4FnAvztbP0mzr4PSrM4bhhEZONlXL6eOgq1 4jzl0LTzW7wygNrzrQRjRXyICbsuw/KXnw== X-Google-Smtp-Source: AGHT+IGpwgPFHStTPt9kR8GQ8LspXiu9RplHxeBHemwtjTDX9Po+JLjAVa+bSKV6l4RW6UhjLeW7Jg== X-Received: by 2002:a05:600c:5104:b0:42c:c28c:e477 with SMTP id 5b1f17b1804b1-4362286383amr10729675e9.23.1733958249569; Wed, 11 Dec 2024 15:04:09 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Richard Henderson <richard.henderson@linaro.org>, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH v2 2/9] target/mips: Remove tswap() calls in semihosting uhi_fstat_cb() Date: Thu, 12 Dec 2024 00:03:50 +0100 Message-ID: <20241211230357.97036-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241211230357.97036-1-philmd@linaro.org> References: <20241211230357.97036-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1733958393857116600 In preparation of heterogeneous emulation where cores with different endianness can run concurrently, we need to remove the tswap() calls -- which use a fixed per-binary endianness. Get the endianness of the UHI CPU accessed using mips_env_is_bigendian() and replace the tswap() calls by bswap() ones when necessary. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 <philmd@linaro.org> --- target/mips/tcg/sysemu/mips-semi.c | 43 +++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/target/mips/tcg/sysemu/mips-semi.c b/target/mips/tcg/sysemu/mi= ps-semi.c index 5ba06e95734..df0c3256d9e 100644 --- a/target/mips/tcg/sysemu/mips-semi.c +++ b/target/mips/tcg/sysemu/mips-semi.c @@ -168,6 +168,7 @@ static void uhi_fstat_cb(CPUState *cs, uint64_t ret, in= t err) =20 if (!err) { CPUMIPSState *env =3D cpu_env(cs); + bool swap_needed =3D HOST_BIG_ENDIAN !=3D mips_env_is_bigendian(en= v); target_ulong addr =3D env->active_tc.gpr[5]; UHIStat *dst =3D lock_user(VERIFY_WRITE, addr, sizeof(UHIStat), 1); struct gdb_stat s; @@ -179,19 +180,35 @@ static void uhi_fstat_cb(CPUState *cs, uint64_t ret, = int err) memcpy(&s, dst, sizeof(struct gdb_stat)); memset(dst, 0, sizeof(UHIStat)); =20 - dst->uhi_st_dev =3D tswap16(be32_to_cpu(s.gdb_st_dev)); - dst->uhi_st_ino =3D tswap16(be32_to_cpu(s.gdb_st_ino)); - dst->uhi_st_mode =3D tswap32(be32_to_cpu(s.gdb_st_mode)); - dst->uhi_st_nlink =3D tswap16(be32_to_cpu(s.gdb_st_nlink)); - dst->uhi_st_uid =3D tswap16(be32_to_cpu(s.gdb_st_uid)); - dst->uhi_st_gid =3D tswap16(be32_to_cpu(s.gdb_st_gid)); - dst->uhi_st_rdev =3D tswap16(be32_to_cpu(s.gdb_st_rdev)); - dst->uhi_st_size =3D tswap64(be64_to_cpu(s.gdb_st_size)); - dst->uhi_st_atime =3D tswap64(be32_to_cpu(s.gdb_st_atime)); - dst->uhi_st_mtime =3D tswap64(be32_to_cpu(s.gdb_st_mtime)); - dst->uhi_st_ctime =3D tswap64(be32_to_cpu(s.gdb_st_ctime)); - dst->uhi_st_blksize =3D tswap64(be64_to_cpu(s.gdb_st_blksize)); - dst->uhi_st_blocks =3D tswap64(be64_to_cpu(s.gdb_st_blocks)); + dst->uhi_st_dev =3D be32_to_cpu(s.gdb_st_dev); + dst->uhi_st_ino =3D be32_to_cpu(s.gdb_st_ino); + dst->uhi_st_mode =3D be32_to_cpu(s.gdb_st_mode); + dst->uhi_st_nlink =3D be32_to_cpu(s.gdb_st_nlink); + dst->uhi_st_uid =3D be32_to_cpu(s.gdb_st_uid); + dst->uhi_st_gid =3D be32_to_cpu(s.gdb_st_gid); + dst->uhi_st_rdev =3D be32_to_cpu(s.gdb_st_rdev); + dst->uhi_st_size =3D be64_to_cpu(s.gdb_st_size); + dst->uhi_st_atime =3D be32_to_cpu(s.gdb_st_atime); + dst->uhi_st_mtime =3D be32_to_cpu(s.gdb_st_mtime); + dst->uhi_st_ctime =3D be32_to_cpu(s.gdb_st_ctime); + dst->uhi_st_blksize =3D be64_to_cpu(s.gdb_st_blksize); + dst->uhi_st_blocks =3D be64_to_cpu(s.gdb_st_blocks); + + if (swap_needed) { + dst->uhi_st_dev =3D bswap16(dst->uhi_st_dev); + dst->uhi_st_ino =3D bswap16(dst->uhi_st_ino); + dst->uhi_st_mode =3D bswap32(dst->uhi_st_mode); + dst->uhi_st_nlink =3D bswap16(dst->uhi_st_nlink); + dst->uhi_st_uid =3D bswap16(dst->uhi_st_uid); + dst->uhi_st_gid =3D bswap16(dst->uhi_st_gid); + dst->uhi_st_rdev =3D bswap16(dst->uhi_st_rdev); + dst->uhi_st_size =3D bswap64(dst->uhi_st_size); + dst->uhi_st_atime =3D bswap64(dst->uhi_st_atime); + dst->uhi_st_mtime =3D bswap64(dst->uhi_st_mtime); + dst->uhi_st_ctime =3D bswap64(dst->uhi_st_ctime); + dst->uhi_st_blksize =3D bswap64(dst->uhi_st_blksize); + dst->uhi_st_blocks =3D bswap64(dst->uhi_st_blocks); + } =20 unlock_user(dst, addr, sizeof(UHIStat)); } --=20 2.45.2 From nobody Fri May 9 01:58:01 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1733958355; cv=none; d=zohomail.com; s=zohoarc; b=dXLMXRNeZQecGJvcd42H4w46G4RsvcRUMRaL9dUEddOmJFtUrva9lqBmfnik9xaNRQlimihbWNr/n8Lpujl1sw1yjf6x5BmbGLKlYgrulBC9bxe4eq7zYOy9qfIdkDIIpd93igOmutX34TxRA3bDGcPEHxHLMHOVFN5ErvYfK1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733958355; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VCHSGNyFv8LSm9JlTuEHKD53SXdp1uauhC0W87/H+/o=; b=bCZLDgSL2+rGdzgyNHZY2vc432NrUb0ZqY90rYGNOGjs3S7BFu8Je145LiEkfdDbndKjzTmt98jF7XJTJTta0ndHZ1frVe4cvk7REpk5mSWCw7JZfTc0zq0e16FYK1NXBr35ktdHFlpvTeOvkNsKUFYxe+Jy9u03cQAeXu2zGJY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<philmd@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733958355838996.6915765214078; Wed, 11 Dec 2024 15:05:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tLVkh-0002uC-Jg; Wed, 11 Dec 2024 18:04:19 -0500 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 <philmd@linaro.org>) id 1tLVkg-0002tH-08 for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:18 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tLVkd-0001xt-Rf for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:17 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-434a736518eso81064555e9.1 for <qemu-devel@nongnu.org>; Wed, 11 Dec 2024 15:04:15 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-435aab63baesm62036735e9.38.2024.12.11.15.04.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Dec 2024 15:04:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733958254; x=1734563054; 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=VCHSGNyFv8LSm9JlTuEHKD53SXdp1uauhC0W87/H+/o=; b=YywzPHbWUWQp+LriOA1CcyVn2HTyfr2hPLLOv8gtwPo1GCVfVn15ZM0fjBtpQsl4Rf CFVhPETVF5/EJHfjaHmlmx6IxJO2QqTUXj+AChr8oscMXJCLV2UHthyvL2ifbSOmaZrH qK1OsWkF+3mTocxJQpLBoZ0QF/UYZJsEwg5alQA6/msC9EPFS/zpm7vvZilPhjJPmS3i LEOYYTLT2GiI7htjI7Ab0SBgzBHNUDBIECHFf3z9p6vZt1nMEYEZ17BYng7HSaXvsB33 HdMUio5oAKzcU+TF3EAGvJMF84c33J1yFTDiM9j/7IZJ4kSuxrHbWMbvUEWZY4gxnbFP vqjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733958254; x=1734563054; 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=VCHSGNyFv8LSm9JlTuEHKD53SXdp1uauhC0W87/H+/o=; b=dub2oGi2K0W0ndVvKy/8nXt3hDB7wFcBGrasx9KjHp6DTePV1LjANVyb9LFlsuE4h6 DdqiCC4Vx20lDtURpj6EEdZ8A8fJYl5xgrYwxEVXjx41MFphtbAVYzYNWCk2ZvxWcB/k bKYYa+DRi9Ao3bbY5IU3jexQ5vPPVrhXwoH2N/cSp1OIHPLxx/rLwnoJk+aLJZqHr7e3 aVR1FQB2VoZvKODkkY1AMzzipjaahRdcy1tCblEMik+p77hqaD2WOh17whKRESN+mosK Nlh0/WnaBnTcBrnOou7Zz60WFQZ99cbLpBvq+LjENirOqzz/sweILDMuh7jwUruAfrlq 5JcQ== X-Gm-Message-State: AOJu0YzZItUtMAUzeXi9FTk24LfFptX+wTB+JSNrXfQzSQZ6bISoBb64 zaw+YkkqWy4RxTL5n6GbUgcvg1AJRWaJtQEEAZ5VeuW4U5ZWv2TNuZUWNDsJlTQ02cCNtxGuL4i P X-Gm-Gg: ASbGncuf1Ux8EYALlJFL9pg7xyPOkxYCuWLL0kEEFxr8bXYgiwauDnU6bf1JHiZk4rf 6TI/kz+Q5+TLeujtbO+BjVgTbNEOy/A6kkeE4c7REGZ3AGZtXNgJIApq1UelsPCHkRW9jsX4SHc lOBQIP277rpwIOd/xWz9W5hUzYT8zYl7ikp49VRwEu41iN3YSAxGDCV3j+TIyp0Iw3a2F17EhGi cLU2Xr9IKMqzPA+KePbZ11Su2ZSW6o30iyq+2CqLD9M0b1lEz36YbfMnXcDNMEvQqr42Cf6okan I5CG7gmfFLvKgGWGGlDLyercklrlbG7x9Q== X-Google-Smtp-Source: AGHT+IGc3/AWzOOAriMV+IbB28ThDUkQnPPwa4fCXVt4koxt2DxrUannj4gUNc61UUYJBiBPXKTxTw== X-Received: by 2002:a5d:598c:0:b0:385:ebaf:3824 with SMTP id ffacd0b85a97d-3864cea38edmr4351410f8f.27.1733958254128; Wed, 11 Dec 2024 15:04:14 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Richard Henderson <richard.henderson@linaro.org>, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH v2 3/9] accel/tcg: Include missing 'exec/tswap.h' header in translator.c Date: Thu, 12 Dec 2024 00:03:51 +0100 Message-ID: <20241211230357.97036-4-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241211230357.97036-1-philmd@linaro.org> References: <20241211230357.97036-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1733958357702116600 translator.c indirectly gets "exec/tswap.h" declarations via "exec/cpu-all.h". Include it directly to be able to remove the former from the latter, otherwise we get: accel/tcg/translator.c:433:15: error: call to undeclared function 'tswap1= 6'; ISO C99 and later do not support implicit function declarations [-Wimpl= icit-function-declaration] 433 | tgt =3D tswap16(raw); | ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- accel/tcg/translator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index cbad00a5172..ff5dabc9014 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -15,6 +15,7 @@ #include "exec/cpu_ldst.h" #include "exec/plugin-gen.h" #include "exec/cpu_ldst.h" +#include "exec/tswap.h" #include "tcg/tcg-op-common.h" #include "internal-target.h" #include "disas/disas.h" --=20 2.45.2 From nobody Fri May 9 01:58:01 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1733958293; cv=none; d=zohomail.com; s=zohoarc; b=YFTqgpbH2lwZXQ0+Mcp5NouBrtFBBf9aGe7NRl1UuNU32gfo24N2+sRTbsHvziUl9TRfVAYM1YZIuntdKB4ox2e5XAqcCFiKUQOa8XKwcjhozPkLTiNZNuRm7PSGO0+yy2mNdmfocg7vchMP2iffF3ts3IAL+lsnFyavsyVK5Aw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733958293; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2CyImSr/vh1Hw5UwjATJ/bss7/ONFU9Y4xODnyBojcs=; b=Ntm5NhBrOwCxlMlfnqcAjpX1RWRG832rzPJw9rUJovKsPa2o8OSVq5d3hBDbxuOHqTvhzz98UI7BreCo3BHFwk4YvmWdY+5RBH+WgLQo9FD6JjgKZFUlV+znrqwMBfZk/3NJWa0mA2QjgQl224S+m0IYUi8MDSi9ovmvyFnOCMI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<philmd@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733958293273337.2413680116888; Wed, 11 Dec 2024 15:04:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tLVkn-0002zU-Ii; Wed, 11 Dec 2024 18:04:25 -0500 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 <philmd@linaro.org>) id 1tLVkl-0002yC-S6 for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:23 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tLVkj-00020r-JT for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:23 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3862b364538so4192f8f.1 for <qemu-devel@nongnu.org>; Wed, 11 Dec 2024 15:04:21 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824bd8b9sm2332636f8f.47.2024.12.11.15.04.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Dec 2024 15:04:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733958259; x=1734563059; 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=2CyImSr/vh1Hw5UwjATJ/bss7/ONFU9Y4xODnyBojcs=; b=UQAyced1MDSkY9dJpr7ZzoiGcU6leSsIWzdg+uN+OfiI4vs3y8qqf2cVbV2r+xVjXA l46bzLnmzu+HTV/6h6elTVgNo/c5QQo+J6k8Y0v7gMPepHx1zfOwYx4+C+LVJlFjYe5/ SnfqQTEG2Qnx/TeIiu9c7mXxHHwGvcZeG1pXVvlUufm6oHncsPMhNk6PwWcIv01YRVPV /Y3jkA3FFyO8edFyRICdRUh3DZzee0eJmW8CnmZqz+Gee+5RDV1vjR+J1wSibIlbboeF 4/2Y3AdvykHsmxufl72bKuZItzYJC0JyxBFFtqpX2K21yZrgrB/WOElfyhCyuePIn9sY xEAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733958259; x=1734563059; 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=2CyImSr/vh1Hw5UwjATJ/bss7/ONFU9Y4xODnyBojcs=; b=g22aPwDasLvTKf2CHEx00LadcwkVJHZ92KVrPvaCbdMUMsuJtEs7i6WHgs4603u6Be tkgsipafYCbkrwBwansknocBlziw3CbaWtE+77iPsVC/PTwKwPv8lHAEE5SUpiXoGog0 mCPMjN2If5IAEChsc5y4b6nr+pGiFBNhTPuDGoeGqDN2Ea0TB37ZgDhKeNpRfbqfSznv zoWp69diaQXaYtRYOtddxeG2jiOieRXQ6bLZS6f4gmFKlKU7eUsVx39HprZ9uy+cpjEN 896l0UkHs07cJPw5CcHPiOVd4ID5WxSS1A7Fob6SE7yBlIdU1MTroaXk5cmmD5Ib5IWV hX7A== X-Gm-Message-State: AOJu0YzgxOsPz19Ktvl37HzpVrzWZVsArlFKFVXUlEEEWzQ4ym6h9smh IFpe0hZaZmSOL7Ix+zpkHrBF9JhvxKrfczKLjVGbNkEcUjB1k1QhfEE+HGSkjp+tiAhQdnzb1v2 5 X-Gm-Gg: ASbGnct4r04C3PSpqTVLhj86cUYgtARhGAKsm1eat25GaehauRYodOhD0nQI+xQs/4H heN6OvmrEpvVfPQ2Mi5rWU+6TtwiPIZz7dUeWc8msSavyakFL7R+6LjzJMW0F2CiotqComxakYu iwPd90/kC8/E8+NbzFIDZFEqDdM/3dRIt1ku5jcXcdXW/Ng0FHtKIwVn0GN0ZHcMMKGhU0NiXy4 McQvAqQEerug0yZlGdbpXjJbmduUJ9TP9+jvBUEBl8yeRt0JOZK/3EK6Vk0axqx5FXX5T9kqa5u S+kXCcULHNakYuMRd+cyD3cNGOLIBXEPEA== X-Google-Smtp-Source: AGHT+IHqHQT7Cea2Wnc1ed4/tVD7++I0hUY9dC1tLd1/pRYYVNW7km+DEaIbfVAJ6hA0okp2xjfubQ== X-Received: by 2002:a05:6000:2cf:b0:386:32ca:7b5e with SMTP id ffacd0b85a97d-38788807815mr629903f8f.16.1733958259604; Wed, 11 Dec 2024 15:04:19 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Richard Henderson <richard.henderson@linaro.org>, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH v2 4/9] hw/arm: Include missing 'exec/tswap.h' header Date: Thu, 12 Dec 2024 00:03:52 +0100 Message-ID: <20241211230357.97036-5-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241211230357.97036-1-philmd@linaro.org> References: <20241211230357.97036-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1733958295660116600 Some files indirectly get "exec/tswap.h" declarations via "exec/cpu-all.h". Include it directly to be able to remove the former from the latter, otherwise we get: hw/arm/boot.c:175:19: error: call to undeclared function 'tswap32'; ISO C= 99 and later do not support implicit function declarations [-Wimplicit-func= tion-declaration] 175 | code[i] =3D tswap32(insn); | ^ hw/arm/npcm7xx.c:326:26: error: call to undeclared function 'tswap32'; IS= O C99 and later do not support implicit function declarations [-Wimplicit-f= unction-declaration] 326 | board_setup[i] =3D tswap32(board_setup[i]); | ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 <philmd@linaro.org> --- hw/arm/boot.c | 1 + hw/arm/npcm7xx.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 5301d8d318c..30ba98d52fb 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -26,6 +26,7 @@ #include "qemu/config-file.h" #include "qemu/option.h" #include "qemu/units.h" +#include "exec/tswap.h" =20 /* Kernel boot protocol is specified in the kernel docs * Documentation/arm/Booting and Documentation/arm64/booting.txt diff --git a/hw/arm/npcm7xx.c b/hw/arm/npcm7xx.c index af04c4b7ec4..3a5ef26f689 100644 --- a/hw/arm/npcm7xx.c +++ b/hw/arm/npcm7xx.c @@ -28,6 +28,7 @@ #include "qemu/units.h" #include "sysemu/sysemu.h" #include "target/arm/cpu-qom.h" +#include "exec/tswap.h" =20 /* * This covers the whole MMIO space. We'll use this to catch any MMIO acce= sses --=20 2.45.2 From nobody Fri May 9 01:58:01 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1733958335; cv=none; d=zohomail.com; s=zohoarc; b=lQN3yZquN7vf7+ptojqNArMvB5RugGqIOHI+tIFvBQG9iIYdYlAeGEJpfISiPdWPMFF3XmSQ1LkWpVVoVh41T569622sXn0zHb5XdGfioU7ibCC50RNauc3b+vrCNVPXMJor+URMDP4uq8E3GYUKl2ootoZPS9tEdypqXhpR8Dc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733958335; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=e1gkSU7M75EFdbW95JvRzZevk5diVkYdExWvAc1of60=; b=CY4NBzDhX8ca+cnkbdD+32OFnfx92Anp09GN4PsHEpDGbInhcVMxDFPzDUgyrj+0yU6jHCKQbRx9F0v2ntv0w1aHOoWnt5BsXMfBOYfyIYhjT4D9ckJS90/cpYTd0wn0GnJRq2L2jFpaqDzo27ox80hizz6EpCfQtylzU60OpIw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<philmd@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733958335823308.14802315944473; Wed, 11 Dec 2024 15:05:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tLVku-00035A-E9; Wed, 11 Dec 2024 18:04:32 -0500 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 <philmd@linaro.org>) id 1tLVkr-00031V-UN for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:29 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tLVkp-00023S-FN for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:29 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-436202dd7f6so9679795e9.0 for <qemu-devel@nongnu.org>; Wed, 11 Dec 2024 15:04:27 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434f981880csm117938685e9.44.2024.12.11.15.04.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Dec 2024 15:04:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733958266; x=1734563066; 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=e1gkSU7M75EFdbW95JvRzZevk5diVkYdExWvAc1of60=; b=R/eBWH5z2dx6cjzsEN6u3+idu3vFuwzErwO8oX11xXUX49xg7u3+co4bLtb8Lwtojd 5NHmmaixLvtSXFqWCc2Jgbd40xh+tbLlPsc251PbFJ9YmL8Q2NXnPExaZcudXcqXOu/j 3HOJ5ZQeVfiblEkwyYcKRDfEEduHeHlE9GFVeQ4VeMTyHH/XoCh8GIx3eDq4QLBAcagv zAxyQs58tKFEF1Zf1vJ+6Z6uU9+1pMMeT9e3DP0+KHzEiflCuXTUtTyO4dDnkAnGt8Wi jTd6vixOeaHcpuPvX0SG2FSGxAGhAa4Anwj4I9VDP4et61vZCi0Emut8HYBzWO7qlTzY 0syw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733958266; x=1734563066; 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=e1gkSU7M75EFdbW95JvRzZevk5diVkYdExWvAc1of60=; b=AUk8Kp3o+2R71Cu7UkZoaL0MvrffSlmQi2LUSkpaksoRUwhzWdFDPnDM1lTcoUbvaZ JdJ8vLcE6Ej5mxarcscZUiGGFGA7DmdUGANcVRcu3PHuULR1sYVjSo0JcHOVBoH78OLx lgTDvnXw0W2gFUrM+HWvfF5LOnnN7vlImzaIg9zEgXyHiXyFyoAkDYVCIeyxjSPLVD+p pwHFvUNdt1Ogceq7ZogS2fAHKuUH/waV9VAsvLjstAZ9AQGep53wjOSQVuok0d44VrR0 Afj35d3naaSJPGyCQovLJJjMYDvcbdn+ww01ajpJpcIlVV4hyxr4K50h6fUEBWkqV6yF e+Cw== X-Gm-Message-State: AOJu0YzfpOGomkAkuLdgtCDh67FQKQFGRuXmvg9ESaMSgSjq9OJZZblT 7GL83uJtes+fk4QSoJ2A2yNWxDOCofMvXQTR5iU11ayt/DctMz7/v/VGEG8nIq8ybBgnJeffODN n X-Gm-Gg: ASbGnctPFhUcdsXqrpiOgk3tuuP1D5m/UkamQE/J4bs/xB15SuPvrE5aVfz81na+rOF PLaTpiu4LcXZoVUexBuMxXeRmnMbljH+2Wx6TYbZQpcQOsppUFC1jF4A4hIpHrQU4ecyZsCyOtT NKxZ0EQey7QaGhqSqUYtvzPttDmn7hJT+N1uIqByr0yemd3BA4X/+o8h9kQsHrueJlb0mhZ986v RK5UFtGjKZLgk7IS5+0Vot7GHpOAhia49L0OZuCB4lRcTXzJLMqwTJy6/BIJq/3zG06qtPL3pMk iQVqQvtRH4bNty1OjZh8V6C9cDHuRAaItA== X-Google-Smtp-Source: AGHT+IH13sBDrrNq1YNP2KE3qw+IE73kK1J9viuwif4RhVJDSJvBV6NWIotfSC1dDfDCvcGxhZZv6Q== X-Received: by 2002:a05:600c:46c6:b0:434:f9c4:a850 with SMTP id 5b1f17b1804b1-43622833224mr13851425e9.10.1733958265695; Wed, 11 Dec 2024 15:04:25 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Richard Henderson <richard.henderson@linaro.org>, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH v2 5/9] hw/ppc: Include missing 'exec/tswap.h' header Date: Thu, 12 Dec 2024 00:03:53 +0100 Message-ID: <20241211230357.97036-6-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241211230357.97036-1-philmd@linaro.org> References: <20241211230357.97036-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1733958337814116600 Some files indirectly get "exec/tswap.h" declarations via "exec/cpu-all.h". Include it directly to be able to remove the former from the latter, otherwise we get: hw/ppc/virtex_ml507.c:123:19: error: call to undeclared function 'tswap32= '; ISO C99 and later do not support implicit function declarations [-Wimpli= cit-function-declaration] 123 | env->gpr[6] =3D tswap32(EPAPR_MAGIC); | ^ hw/ppc/sam460ex.c:238:23: error: call to undeclared function 'tswap32'; I= SO C99 and later do not support implicit function declarations [-Wimplicit-= function-declaration] 238 | env->gpr[6] =3D tswap32(EPAPR_MAGIC); | ^ hw/ppc/spapr.c:1617:13: error: call to undeclared function 'tswap64'; ISO= C99 and later do not support implicit function declarations [-Wimplicit-fu= nction-declaration] 1617 | DIRTY_HPTE(HPTE(spapr->htab, i)); | ^ hw/ppc/spapr.c:1406:55: note: expanded from macro 'DIRTY_HPTE' 1406 | #define DIRTY_HPTE(_hpte) ((*(uint64_t *)(_hpte)) |=3D tswap64(H= PTE64_V_HPTE_DIRTY)) | ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- hw/ppc/sam460ex.c | 1 + hw/ppc/spapr.c | 1 + hw/ppc/virtex_ml507.c | 1 + 3 files changed, 3 insertions(+) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 78e2a46e753..3bbab263ae8 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -22,6 +22,7 @@ #include "sysemu/device_tree.h" #include "sysemu/block-backend.h" #include "exec/page-protection.h" +#include "exec/tswap.h" #include "hw/loader.h" #include "elf.h" #include "exec/memory.h" diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 0d4efaa0c09..02136b3295a 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -90,6 +90,7 @@ #include "hw/ppc/spapr_numa.h" =20 #include <libfdt.h> +#include "exec/tswap.h" =20 /* SLOF memory layout: * diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c index f378e5c4a90..0e9a2469599 100644 --- a/hw/ppc/virtex_ml507.c +++ b/hw/ppc/virtex_ml507.c @@ -26,6 +26,7 @@ #include "qemu/datadir.h" #include "qemu/units.h" #include "exec/page-protection.h" +#include "exec/tswap.h" #include "cpu.h" #include "hw/sysbus.h" #include "hw/char/serial-mm.h" --=20 2.45.2 From nobody Fri May 9 01:58:01 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1733958382; cv=none; d=zohomail.com; s=zohoarc; b=gsWxoscQhkT1hNlVwSpNH0Vb93Ypjz8YgL2kAP1ZrzHBilS0R8VItL/85ZU6GRhihy0bThITyu9y2vqnHBqW5Ak3DkHpraJWrhxhepiqxLAeX88nfPdS2Oz97pNy/PPoGgZYIl6zaIn9ZxRA9/BPezK40VPlDrggR8lFIwW2yS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733958382; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=J+4/L4+9GPQca3Ynp9H2GzuGT1XQzOn/jP/hpV92NZU=; b=AA8P/vrHmKULCk2mGQHuTFrnB9n+7j6rnjmJfJCSMzgTY4oCXS3z00AsC8MG6jyHlaY/H91RPZIDwVn0iNPoVzBlGhRc1OlaNI+XQTs6yJQ6ZYekACz3qhikWO578HTjmC/+kyzMhUheHEiweJwboHce734YVJQa0j0q10J8scY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<philmd@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733958382335481.82126418227745; Wed, 11 Dec 2024 15:06:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tLVky-0003DO-Vz; Wed, 11 Dec 2024 18:04:37 -0500 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 <philmd@linaro.org>) id 1tLVkx-00038a-7n for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:35 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tLVku-00026G-TM for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:34 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3863494591bso2378422f8f.1 for <qemu-devel@nongnu.org>; Wed, 11 Dec 2024 15:04:32 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38782514db8sm2347116f8f.84.2024.12.11.15.04.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Dec 2024 15:04:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733958271; x=1734563071; 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=J+4/L4+9GPQca3Ynp9H2GzuGT1XQzOn/jP/hpV92NZU=; b=fKgJrvMZpvXa1FAvrauWPhM35j3CnjBlytfeLBMADbmhyWdAJIARj1IG27+Y/ZA4uW sfz/D3i6vB+znRddS7qVBOlIqhlQGIHeGQ5olL3U8EWn3sX3yMWdPaPbN0Q+YJsZ5bMY 5zDFyRjmYn4RtqvoAFgFj2Duj1Mg60n/I/znmuNGoyx1hiaxTxGmMLC2Da1n4XFVDyfC Qpx9FsK44Qczmm2Q04GxrM7LjPXP/I7jLSnpnVprl9mgmjsbCL7yibr55ZgaMcQabI6b 3sUJjrHraOdla7jK/LHjtdHsWkLuel19hD4wBLV39Uk5l6G0+9l6gOPDxZuQUlEvJjJA +pJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733958271; x=1734563071; 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=J+4/L4+9GPQca3Ynp9H2GzuGT1XQzOn/jP/hpV92NZU=; b=hVRFYsb1V+55Z5Ro/q2xLGdBQ3mZK7Rrph3tQz9UZTw365ZW6jU7/fvEilf4xd1ISK XafMqCuI7kjAapSopnikwtyu3zdFwOFz20uYMpLXcGv1b0Twexx9l1SIpFly9/lD2Sig FMgaWJg5417xqwKIxsD8U50MSxhw/+uaQ6nuIt3qnnUMsqnmA15MEQobvWpE1BIckLPq wYPNVj7YY5wUz4NRZnOZlv/KMbZGzhgpa0O+8oZE9hAEjLqLx3YzZv7itPJYC3zRJPq9 QktgqsaqNh0d8z7Lr+lwzHhm7mV6x3doiywPKF4Velk0lldx71aCa+BPDHDFj/uaC1/U LgPw== X-Gm-Message-State: AOJu0YxjkB3XkDXgAAucjbNgpNX6fQL5dS5vkYN3Fvd0JxoH19r8QXl4 3bjPNAXQeGvVYQXl1WWhmnHRN7ZBL7Gj+q8yQxBPZq2YK2iRziuX47YBBZjrGOGWTjuH/4WysUT J X-Gm-Gg: ASbGncuWM9HTCcShqCqqNoVIATYlkgMA/izdYbCQomStPy/NQREEbkhhZfh3UcV3ivq 16WxE+xts9Drc4Yjp54zlYRS+DBHmijn7p4FdT9suH4DUtEOiGktJhJHgJvrSWHjaxFyvJk3ZxY Ofh94N6xchZ4EUEHPEHL8yP5eCy4UtN1CCgKNDrsHX8raNRtqbSHtMSFrpD62gDP+W/Q9mt+Q0T T0oOzWRFh5qIxrP2kT7pR8VTN6bZprnLfB9Rsgki4CBQF8NV4Wabe/Ffs2XpxpkBj+vKHnExw1c Nx0S9/wP+I4wERFPDcieKFFm9uJWQ4CXtg== X-Google-Smtp-Source: AGHT+IF3qMRbCL0VgNH7+bQrXp6oZOW0PcG2/8u/3GJ1CWD6wsbyUQMFe6AQCr1M7K48q8hVuUm1Lg== X-Received: by 2002:a05:6000:2ab:b0:382:450c:2607 with SMTP id ffacd0b85a97d-3864ce495a8mr3829234f8f.4.1733958270738; Wed, 11 Dec 2024 15:04:30 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Richard Henderson <richard.henderson@linaro.org>, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH v2 6/9] hw/mips: Include missing 'exec/tswap.h' header Date: Thu, 12 Dec 2024 00:03:54 +0100 Message-ID: <20241211230357.97036-7-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241211230357.97036-1-philmd@linaro.org> References: <20241211230357.97036-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-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 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1733958383836116600 Some files indirectly get "exec/tswap.h" declarations via "exec/cpu-all.h". Include it directly to be able to remove the former from the latter, otherwise we get: hw/mips/malta.c:674:22: error: call to undeclared function 'tswap32'; ISO= C99 and later do not support implicit function declarations [-Wimplicit-fu= nction-declaration] 674 | tswap32((1 << 31) /* ConfigEn */ | ^ hw/mips/fuloong2e.c:89:23: error: call to undeclared function 'tswap32'; = ISO C99 and later do not support implicit function declarations [-Wimplicit= -function-declaration] 89 | prom_buf[index] =3D tswap32(ENVP_VADDR + table_addr); | ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- hw/mips/fuloong2e.c | 1 + hw/mips/malta.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index 7fd8296ccb6..904c10b90e3 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -40,6 +40,7 @@ #include "sysemu/reset.h" #include "sysemu/sysemu.h" #include "qemu/error-report.h" +#include "exec/tswap.h" =20 #define ENVP_PADDR 0x2000 #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 198da5ba3d4..834636dae59 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -28,6 +28,7 @@ #include "qemu/datadir.h" #include "qemu/cutils.h" #include "qemu/guest-random.h" +#include "exec/tswap.h" #include "hw/clock.h" #include "hw/southbridge/piix.h" #include "hw/isa/superio.h" --=20 2.45.2 From nobody Fri May 9 01:58:01 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1733958308; cv=none; d=zohomail.com; s=zohoarc; b=cZIU4/+DJUXm23a1lkdbwoaG2RPMVa8/bDyiaocRUSY+Nq+mZyPZAg3kLg8vejwc+hzey4NwW7/k4DdBhroycJM3VbFlKNnMPN47GQoAMpZ7VCYrSlq6NTiKrkJiiwZpn0ZhjGyWv1czUENBzj7u+ZATxFSlQN0Ea4jfIAAfK/k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733958308; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=i5TDVgq/CwukR+NJEtHbkNKroUN70sGumVux+smwBCQ=; b=JnJz9F6tWKRK+YbKQAiKZ1HhcMYf+nXcOg0+Gyqa2Cky9ruNoge5dJKEXkCoAqdgQ54+dOdATRP5Na2l7G5ai0pGEv63KcFAzA57K3eN7UZ1odYWbKVyVwLZmZC/wa4ZB35nApLkB2+Db4slPtTcdNwej3CH2rGA9VZRBc5nFCY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<philmd@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733958308745686.4870531744396; Wed, 11 Dec 2024 15:05:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tLVl9-0003KH-KK; Wed, 11 Dec 2024 18:04:49 -0500 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 <philmd@linaro.org>) id 1tLVl2-0003Fu-2M for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:40 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tLVl0-0002BF-Fx for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:39 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-436249df846so70595e9.3 for <qemu-devel@nongnu.org>; Wed, 11 Dec 2024 15:04:38 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38782514c06sm2341763f8f.73.2024.12.11.15.04.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Dec 2024 15:04:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733958277; x=1734563077; 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=i5TDVgq/CwukR+NJEtHbkNKroUN70sGumVux+smwBCQ=; b=Ub7ilO+7J0750n7OF58vshIkm3AV+78t9nLKtlDukYpRCpPARfq/Wl3LqXEL8h7zQL Z+7b57wnVSRjPIj55Zo6aJjCYjDTFoTCmUR2flLDU6NTOd09KmRzPLgc0+D1cSvy0YGC lbrz0ihNzV+wYN32slUeDPyoYLmMWSKX7JzTSHG3X56LyEM0c1g3GnxIoywT34Rhj2Cy aDgQpNa3PZbLfNuCDNOCsJpCN8br+R6d1NHxgXrGueCzBjLQtQApSgosGOXkY41e45xm LnxTedqgzFjlOSnW2GVWlH3rWWJm0eefKNULxpeoqzADWhLUybTrLFtjrrOyoPdJHPcl PHgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733958277; x=1734563077; 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=i5TDVgq/CwukR+NJEtHbkNKroUN70sGumVux+smwBCQ=; b=FbqQGGUtt8FTzLXNHETrsXbiERq1QhcwUbD1jocmZt+c/h/u9dS6ILRavQng+ay20Q dl3vguOXOxfnltAJZBYfj+Z34RY/ZnKwcld4fdhgsH4rQuSAdj+xUkPseyOmY+suF1n7 6vrwLjewtJ827x/qCxz5qycADZVGt0B1Tdmuz+PRKtI/y3miQIimBkKSVAHes2k6HojU RMlLK0kDiO2VZr6RJO1o/7vlddbgcuH6vnn6nQsCDxOb9BpvmedHQ+sUg4a2kk/5qgX1 ppGXjSZCCBvbN/iOsMvkWoyncAO1hQRvXKf7wbs/srev3h4HdM7VDmjBHh/1G3VHpp5K ZHHw== X-Gm-Message-State: AOJu0Ywrzjj7kKMiFOAS2BhreV3j08FWzYhrDBN/KBYHPlj2fb7/bcrm LCDe/FMx9AGKWVUScmb67xfwW3F5ixGT8Nip9sxOhFlUfBBO2vLtTlPizQBwNGqzy0CaXJtxEdy O X-Gm-Gg: ASbGncuDZtCrYXVSQ1NSoHDmOXV6Xe+u0/UlzBMy1I0eUYOyEIUxS2KuspB/LTnz6GR vIWeBNfCDindjYbQcm0fg9eL7ibgSpWuuBwCS9wiculUhbFcyfWOws/17MgvEjg3a8dosLeH4ZX 98B2WkuuFOaS1wUyckH8R6X5dgGsuYZEmhkaHar5NDEx4OIx4XRLxusKXibvi70I/M6AlTj6Gb1 +hWxO1gsd2h/JO9QytRlLJmGSY/Bx/J9lCzrOdBb8+V7pNy1WeMtvIYhkQydD54nefusSibOZPn 9uDQj+bPgImNf/W5F5iTvNZe1Jr0sbfrOQ== X-Google-Smtp-Source: AGHT+IEhm6oddSIUhSNEWiz9LFRT/gvZfGHNmjndFdBk7CFLy2+kvYb3ZuIpawuLW7nNHrcK5WzsAg== X-Received: by 2002:a05:600c:1f0d:b0:434:a923:9310 with SMTP id 5b1f17b1804b1-4361c3c5015mr37873435e9.15.1733958276747; Wed, 11 Dec 2024 15:04:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Richard Henderson <richard.henderson@linaro.org>, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH v2 7/9] hw/sh4/r2d: Include missing 'exec/tswap.h' header Date: Thu, 12 Dec 2024 00:03:55 +0100 Message-ID: <20241211230357.97036-8-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241211230357.97036-1-philmd@linaro.org> References: <20241211230357.97036-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1733958309442116600 r2d.c indirectly get "exec/tswap.h" declarations via "exec/cpu-all.h". Include it directly to be able to remove the former from the latter, otherwise we get: hw/sh4/r2d.c:357:35: error: call to undeclared function 'tswap32'; ISO C9= 9 and later do not support implicit function declarations [-Wimplicit-funct= ion-declaration] 357 | boot_params.loader_type =3D tswap32(1); | ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- hw/sh4/r2d.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index 7eecd79fcc1..e6cc156c238 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -43,6 +43,7 @@ #include "hw/loader.h" #include "hw/usb.h" #include "hw/block/flash.h" +#include "exec/tswap.h" =20 #define FLASH_BASE 0x00000000 #define FLASH_SIZE (16 * MiB) --=20 2.45.2 From nobody Fri May 9 01:58:01 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1733958412; cv=none; d=zohomail.com; s=zohoarc; b=ZM53tQlG1pLx/vp3BLfii+CffKJqp2u5iJmpO/+giun5RsjbGR7J0RTCPlJgMXxIch4bPZRnlXXkQjMEwBduh++IihzegjkdavIyakf6PeEI8VDjmLAAnWLPHkRHuZm7EYFhqcVaf274WNTPj/E3Cf7ZYT0rPwUGLxmulFgBosg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733958412; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+71ZOpdVAG9B9l+7/FqsTNfCtOJJsIHhAT40qDCr+hM=; b=OaJku5QbvxYR5J9Vl9CpYNjqWZjsA+WDCx9Q/+mXzf3wUjtWGYJkC/JESUpBCqddUqcfOvYIS6/v29HfBy8O6S0TSR3wghS5jEYH2CMb+Fy3f4EpXpJ7Racvx7H3UqhMK3plgRWfGhSXWpeEI23b3jV57h/cZh0Nf1uDh5la2gw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<philmd@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733958412094962.8736206598262; Wed, 11 Dec 2024 15:06:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tLVlL-0003YB-GB; Wed, 11 Dec 2024 18:04:59 -0500 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 <philmd@linaro.org>) id 1tLVl9-0003LT-Og for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:49 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tLVl7-0002Ff-7x for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:47 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3863703258fso705231f8f.1 for <qemu-devel@nongnu.org>; Wed, 11 Dec 2024 15:04:44 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824a4a25sm2330451f8f.27.2024.12.11.15.04.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Dec 2024 15:04:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733958283; x=1734563083; 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=+71ZOpdVAG9B9l+7/FqsTNfCtOJJsIHhAT40qDCr+hM=; b=p1ZWY7xkla3DXjQ2g68P2igLCFqO3MLeBEFavRFoJGRHqyWYrJyNvdjO/8aVleAlt6 /APUezHJ9mtF+7vQLRK0Evvo22DlLjJ0wISNzi9ED7CUQDfXN96VQO28GwkZGIKKD4Zg f7CDEw2Ing6WhvdpFj5kEkYKXgGOOdAJnSjKbGC7evsOyMl1qY2eX9CGuFlx2JleLN6I P9TNAhP1o1BtbuaSfm5tIg1buvkSsys5/IQNle8L+WKkATnqtFXVI8nJ12vCjlomp8Ez EHKZd8Z2tDxTM1+ryjVUIXSJsAmeAfpU9KblT0XTzDPjIUtiPYe8hRhx0jFrN2DT1hGt MBvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733958283; x=1734563083; 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=+71ZOpdVAG9B9l+7/FqsTNfCtOJJsIHhAT40qDCr+hM=; b=r8dfhlEMbyxen93xY+MtDL/3hiVv7QaMrT4FXUz2ICEFruMPuXAqJnxglwVq/fR4sE alm+yESYtFrUALTt4u94zyUrqV2hEyxj4n2MzrY4JvQZgvtH/H8oUNQiqw+G38IuRKlk fB0N9z6HAxWpcHcQhrfu5B3i/BbFq4LJdAFcWTYQ8boQseAUtyeHRxBWICU0ZJef4eFe BUXEQ/OI4oT8r0xuXMw+7sa2sy+jyrLWObQYYSkl0vezXpwk6nXbRBc3/R73Vu4Fpzye fKidxjEx3LnbyvtedY8RdguEEVhwnw1v3N91awBCymjhhGBMvwG6lfTo+0fkkiSfa7ZW KzHw== X-Gm-Message-State: AOJu0YztTCXOi9NRH1uOUsZijaOa7tN/BAH/4dN7lKUWXtV9x9F0GEpK r7XC/WGBlZ0NqQnH/t34RdCY1Oi3kTMoY0Y73dtbc7kSCkzvvNW0S/J2GW4t3bIlNCw+F/HFYB0 D X-Gm-Gg: ASbGncswebuh7GcrP4DFhmFo8A4OOxQt4sEXXACR5gwcDZFMN9a08zUCF53FqBHB9Mh 1V6tTSSZo1VMJNUWjJJ9dEVT8bae+es+vAnLv5po+rTcg+diNBfPT5Xnt4cCTeZoiRHwFREGsmP 8MeH308aldsASD7t6FnHfjeRBVLu/eVxUmxnKjpPjRHIcmj0vRsNPx4LXk4wZ0c1KCb96Mzf3kZ Bsit6deg64orN5Z8MnpIYOQO8Tz2li91sNmwo10aS8MF7QKijJLwr9cT/PCA8W9/xDAQnl11MP9 /9PLMEzwGZexaEl/07FhVPq5++w4BXcqDw== X-Google-Smtp-Source: AGHT+IEe6dwlE3rKQ3ehwUu/JJmDhcTIUXRgm4CPz2wR2Px26X3yPZt8sxZ/CCCrwsGPC7Xrs/pwyg== X-Received: by 2002:a05:6000:a07:b0:385:e10a:4d97 with SMTP id ffacd0b85a97d-38788825765mr681479f8f.21.1733958282175; Wed, 11 Dec 2024 15:04:42 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Richard Henderson <richard.henderson@linaro.org>, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH v2 8/9] hw/xtensa: Include missing 'exec/tswap.h' header Date: Thu, 12 Dec 2024 00:03:56 +0100 Message-ID: <20241211230357.97036-9-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241211230357.97036-1-philmd@linaro.org> References: <20241211230357.97036-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1733958413883116600 Some files indirectly get "exec/tswap.h" declarations via "exec/cpu-all.h". Include it directly to be able to remove the former from the latter, otherwise we get: hw/xtensa/bootparam.h:40:16: error: call to undeclared function 'tswap16'= ; ISO C99 and later do not support implicit function declarations [-Wimplic= it-function-declaration] 40 | .tag =3D tswap16(tag), | ^ Signed-off-by: Philippe Mathieu-Daud=C3=A9 <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- hw/xtensa/bootparam.h | 1 + hw/xtensa/xtfpga.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/xtensa/bootparam.h b/hw/xtensa/bootparam.h index f57ff850bcb..4418c78d5bb 100644 --- a/hw/xtensa/bootparam.h +++ b/hw/xtensa/bootparam.h @@ -2,6 +2,7 @@ #define HW_XTENSA_BOOTPARAM_H =20 #include "exec/cpu-common.h" +#include "exec/tswap.h" =20 #define BP_TAG_COMMAND_LINE 0x1001 /* command line (0-terminated stri= ng)*/ #define BP_TAG_INITRD 0x1002 /* ramdisk addr and size (bp_memin= fo) */ diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index 398e6256e1d..2e264c61988 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -35,6 +35,7 @@ #include "hw/qdev-properties.h" #include "elf.h" #include "exec/memory.h" +#include "exec/tswap.h" #include "hw/char/serial-mm.h" #include "net/net.h" #include "hw/sysbus.h" --=20 2.45.2 From nobody Fri May 9 01:58:01 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1733958388; cv=none; d=zohomail.com; s=zohoarc; b=Weys1G7xIJkuJgilDAOiotR7+FyTQmMmrHcLJ2jyymX7O1yO+dERKMz/6wAK2tyFV9fNy6a+virg/ovRiHdn7dxQBI3CgZCVTtVlsUuOL/nTaN8+ylmOVjyyt36tSRlFeZ9bKj5o51wpAflsbtQSv2JfJHEZFQUh3We/g/Kyosw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733958388; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Mtq+tz8nJw6Nv1owIoGgw4Z1D4TMY45KGCnnPE+QKMo=; b=Tdn8NAZkFdihxR9A9HlQ3pFNeHf6LnZsTM9AM7mjVg1CDVmM8xQ4kKfrHRck9rqsbztPZw+wZGCO1Q6x93Ezdh9ClNaRMwz1Gu5IQ8h5i9ikFDys5LN779AYMzQpvdarIWQq7cz9L2P/fBTJh27R3Q8q//sInlKHNFkF37/RV8Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<philmd@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733958388927281.78859512285555; Wed, 11 Dec 2024 15:06:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tLVlO-0003be-Dk; Wed, 11 Dec 2024 18:05:02 -0500 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 <philmd@linaro.org>) id 1tLVlH-0003Sd-I9 for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:57 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tLVlA-0002GV-IV for qemu-devel@nongnu.org; Wed, 11 Dec 2024 18:04:53 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4361b0ec57aso15706435e9.0 for <qemu-devel@nongnu.org>; Wed, 11 Dec 2024 15:04:48 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4362429d2b7sm2433615e9.32.2024.12.11.15.04.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Dec 2024 15:04:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733958287; x=1734563087; 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=Mtq+tz8nJw6Nv1owIoGgw4Z1D4TMY45KGCnnPE+QKMo=; b=e69AEBB2j0CM1riQyst3VbzaBHFRmMXwAoSEUbAWzwSa3T1+aThqoerH802ElCuxgt jRnu7/TtE61Zad+tCwt3iS8BPinKKyyPj/jgUtnQJ+GJU9ZuKAtVbdHWSb/K2QqlgpAf ydeTkrqACOHG6Z2lrDRFsT7H8RVFYmHuasDjelkLb2e/b9m5efPFph2i677PsJocJzO8 0LL+TT+g95ulagZo3rX6ICzTkv56hjMR3lot0s5jxjlDkmdU/R4o53JpGPXqFWjf3zlw z5sTA0ifUFXqoCPc3OY1mtr+SgbcU8W/zfMdB+tKyk+QulH3/ZVQieDc0i0TPhrqxvFl bekQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733958287; x=1734563087; 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=Mtq+tz8nJw6Nv1owIoGgw4Z1D4TMY45KGCnnPE+QKMo=; b=OZL/VuLuHaOKpFmL/86RqK1rO9lEWH0Xv+cOX8IwT8UcSxPZvBBJRVAhS1PXm0F78C sZSCoRAN04Z2/UixPPD8lsCO2/bNC3Ns2wRuaJXAC9rptdxADcuO6TrP2ZcXes7CHP9J OfJKBCvZqyqH3YzPiY8F5A+tcSmbyEbi2215Md/5yHRv9RBlzpfLgBlDANciLE7pVpdQ tn9KnqAHBXBKEvSfG3eRDRdhKnOju8q+NKAIWBEl9OQXCWtfI4OKjL6fez27SinpQ/qQ PSR5qHca8K1s9EzrwLH2JouWPzboSih7xNEBkSzRLoeNRFeOB0EtB9eUvPpq/5vHkCvr Z4JA== X-Gm-Message-State: AOJu0YwFeFP9HfLWbvRZWoBs6raMxvx1u+/OcS+YL4Rky83mYOdAOp+2 8YFcnSleYDzMoM9DFz9OzEjZxVrLxTzFMi8WAe9Qe+za9zFI4STlXnx0HpaFoi0VXRJbeDFqaER 9 X-Gm-Gg: ASbGnctgOMWousvydIvgGG36TM5YTj5MlfkTlBev89hZYvAHSYFpQukq+g63c1U4v3T +qXdnim+9Nwv2cDNU/q1oRqHHRK9hf/9zZJxRRtD1G8RlAew3D0pRL6Uf8nocKOZZuOKlzeibWG 0Sa/L8Em0vp0iNEaK6R3eVd7uVz8Y1bN8Af7gvB8hssUw8tJq/Sq9vAT64th/9Nh3neyaIqgQdz HUxsVzWZ08jqHNehMKpwo5t0kvfGYF3sRXPPkZZD9YoUtLs763Vbl1FOkywEpQf2+BgPflB6Vx9 qDunwEFYitB7RIGBd8adROgsI8+qfr2ECw== X-Google-Smtp-Source: AGHT+IHNxoMS7H787UzGLl1ddjWHHJT87JIsbwguE/8eCzKLWmLYd0do9HUUbufvmwY4IUU4fI9C9w== X-Received: by 2002:a05:600c:4e50:b0:431:44f6:566f with SMTP id 5b1f17b1804b1-4362282e1d9mr11425275e9.13.1733958286646; Wed, 11 Dec 2024 15:04:46 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Richard Henderson <richard.henderson@linaro.org>, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH v2 9/9] exec/cpu-all: Do not include 'exec/tswap.h' header Date: Thu, 12 Dec 2024 00:03:57 +0100 Message-ID: <20241211230357.97036-10-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241211230357.97036-1-philmd@linaro.org> References: <20241211230357.97036-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1733958389804116600 Nothing in "exec/cpu-all.h" requires "exec/tswap.h" declarations. Remove it to reduce headers preprocessing and poisonned target definitions polution. Signed-off-by: Philippe Mathieu-Daud=C3=A9 <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- include/exec/cpu-all.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 45e66769380..b45defdbf43 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -22,7 +22,6 @@ #include "exec/page-protection.h" #include "exec/cpu-common.h" #include "exec/memory.h" -#include "exec/tswap.h" #include "hw/core/cpu.h" =20 /* some important defines: --=20 2.45.2