From patchwork Wed Nov 6 18:46:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 841073 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp686027wru; Wed, 6 Nov 2024 10:47:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW44mE7LrIYMjuEQeduZX1xy741zwA5tMpTyGhTUFOGrHMZZjslBjZxenpnJNHGfpwFUOf+Yg==@linaro.org X-Google-Smtp-Source: AGHT+IGh8GNKY3pBFGPG5d095uy5RTHMi+xhyfKeD81rOZCfiL/MMyVLa1c4JVAdqQwEWDSW4yRI X-Received: by 2002:a05:6358:5d89:b0:1aa:c4b4:b26f with SMTP id e5c5f4694b2df-1c5f9a4e397mr990121255d.26.1730918850547; Wed, 06 Nov 2024 10:47:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1730918850; cv=none; d=google.com; s=arc-20240605; b=eNZ65jXdJwUa0ULpVves0JQT5wX/J+MTYfd9Kb2pbBfyEDBVqUerY4HcFORsaaqMo0 p2OIGTTPB5ngbVloG+DFpwqT+cuZloRMU+1Ai1lu3/mpJK5Uh/GRJbFFQCjmdJDEFC9b Tz5zLcJfxffVbv4USkGbh+q1AJWBOO3WKrIhpEIMRBiYqUQiC8Cs8Kn3iQ0UxYqDs0JX i1mIC6um4YJLJVlD0nTphwM6VGYJRWR3ToE+v8264gWiQNGGYj8+INPgkcr0WhKHTLmf POi3tp3dSnJghsOCiAsvnnF0ZswKMsKvrNR1VuI5iCz22FcapiOB7Wv3SxWccpm+hfS4 5YfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=MkGkfKVgrldMieE36JppEsQQQbpaD8YlgbmPxpDRAVA=; fh=jDhTT5t6/SNd3Lmy0g3KlPwh8+DK1Bwi2jXD8rwBeIY=; b=HrEORxhy9Lh3deguY3L45fdDUp+E+fmD0nyM5/fjui+faVN0YUGZRqG6lnRQqH0D1E i6bak6iLWzcMZjW4C/oQhWsFlQSdGe0kpVXKEXahopry1cQk7poq3ktaLUKcowCzmUZg +AX2SUL+Tu7d26IwwUOK7/Jucka5hmAdNlv/4AJQtfkLFUOT+LVMSmXMThPLFPnDX57O YkYrNVHS72ERqYfQMvN+TSsJc0x1ashJ/HepFA9pioiJFesTVEt/HvgG9fykgaDlAI0o ndLUk1R6J0+ry50ZJ9ZU1mfjjO3QFrbM13wq7QgRdAbCtLiCHa8gn3w1a5sFAZ2W4rSX 1z1Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=osv6OU1H; 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-7b2f3ab1362si1639392785a.547.2024.11.06.10.47.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Nov 2024 10:47:30 -0800 (PST) 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=osv6OU1H; 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 1t8l3H-0000IT-JV; Wed, 06 Nov 2024 13:46:47 -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 ) id 1t8l3E-0000GD-T5 for qemu-devel@nongnu.org; Wed, 06 Nov 2024 13:46:44 -0500 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8l3D-0000xY-9o for qemu-devel@nongnu.org; Wed, 06 Nov 2024 13:46:44 -0500 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-539ee1acb86so60977e87.0 for ; Wed, 06 Nov 2024 10:46:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730918801; x=1731523601; 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=MkGkfKVgrldMieE36JppEsQQQbpaD8YlgbmPxpDRAVA=; b=osv6OU1HWBee3MMmvMD60DrfReffFfr36fmC2BoZHr+p+1MRjX/LOR0DQ9MhXNEMnS 1PW7ON0HuxuQJOiNDMIgx5QLsf6kMh82X3olvoZRkTjLQ2b2sqmfr9FDY5FZuR5H1Mbc GPshzs6H0E4Z4NeJLI1L1vBMHwFMHN7D80+Yb0Qgstbu3kKA2MWbOmHCDsJGWcWQZ430 /x98iiUTjIzLkNMmoF9vGsuSSEf9IArrvwBZWtQaMnc4v2gbRjd1KppDN59AUwv6H8l4 FKzSZS2GQWZ2AFOqcfTLTT1D503/BOvoYf4MRvAeCedIiFNIyx2i8dVcypZdfN8F8qGt JF9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730918801; x=1731523601; 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=MkGkfKVgrldMieE36JppEsQQQbpaD8YlgbmPxpDRAVA=; b=VYOZ+p626y8VBHdFaYXtViKt4WZRLn0lyl3T/XclRHvhGNWXQhLH+TONMEUyaJFtHT QUrahuf31oMVb6Kyr3dMTvefH5MzyWBz8URGvmObTS72gHLi92Nlrfi26ORWvYqKnyB1 qDLFLZiMFl8b4PBc8pEpXwT4Sg6tEpb2YzrvNmwUy/AVP7Rg+IPQcXsT+bj/+jRTjupP tLz25UdW1htrWxwFNDORJsd5myC2f0TAuKF4zn0fzdiJmO6i7Qp/87Q/zP8mNqc+egDN iJD08wYeq8OWp2Wd74fps6Ty+wYM3uMP9p1gTnpPdOiPjKx0xuckfEnd/WZ5yExYWbkv xn0A== X-Gm-Message-State: AOJu0YwvjqnspmI5LXezWfgkVQhkbDvDwIdoa/FksxY7mRjTI0Wnxqnx 8Vdrdc+6B6dVTSGNJLJ7INYlTLBK9/LYGaT+PrYvCW/qqr6W/y0I8tyYDVhKeZbZNl5wSkKdehK A X-Received: by 2002:a05:6512:3c96:b0:530:aa09:b6bf with SMTP id 2adb3069b0e04-53d65df7628mr10283658e87.24.1730918800919; Wed, 06 Nov 2024 10:46:40 -0800 (PST) Received: from localhost.localdomain ([89.101.134.25]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9eb16a7dc6sm314521266b.7.2024.11.06.10.46.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 06 Nov 2024 10:46:40 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Artyom Tarasenko , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, Paolo Bonzini , Marcel Apfelbaum , "Edgar E. Iglesias" , Bastian Koppelmann , Anthony PERARD , Eduardo Habkost , Thomas Huth , Jia Liu , Stafford Horne , Paul Durrant , Mark Cave-Ayland , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH 5/5] hw/sparc: Mark devices as big-endian Date: Wed, 6 Nov 2024 18:46:12 +0000 Message-ID: <20241106184612.71897-6-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241106184612.71897-1-philmd@linaro.org> References: <20241106184612.71897-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=philmd@linaro.org; helo=mail-lf1-x12c.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: 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 These devices are only used by the SPARC targets, which are only built as big-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_BIG_ENDIAN (besides, the DEVICE_LITTLE_ENDIAN case isn't tested). Simplify directly using DEVICE_BIG_ENDIAN. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Reviewed-by: Richard Henderson --- hw/sparc/sun4m_iommu.c | 2 +- hw/sparc64/sun4u.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sparc/sun4m_iommu.c b/hw/sparc/sun4m_iommu.c index 6f765e97e4..4486508e3b 100644 --- a/hw/sparc/sun4m_iommu.c +++ b/hw/sparc/sun4m_iommu.c @@ -238,7 +238,7 @@ static void iommu_mem_write(void *opaque, hwaddr addr, static const MemoryRegionOps iommu_mem_ops = { .read = iommu_mem_read, .write = iommu_mem_write, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_BIG_ENDIAN, .valid = { .min_access_size = 4, .max_access_size = 4, diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 541c7f74fa..9d7aebf632 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -254,7 +254,7 @@ static void power_mem_write(void *opaque, hwaddr addr, static const MemoryRegionOps power_mem_ops = { .read = power_mem_read, .write = power_mem_write, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_BIG_ENDIAN, .valid = { .min_access_size = 4, .max_access_size = 4,