From patchwork Wed Nov 6 18:46:08 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: 13865241 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 092A5D59F5E for ; Wed, 6 Nov 2024 18:46:44 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.831301.1246521 (Exim 4.92) (envelope-from ) id 1t8l2w-0001uS-Qd; Wed, 06 Nov 2024 18:46:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 831301.1246521; Wed, 06 Nov 2024 18:46:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l2w-0001uL-Nm; Wed, 06 Nov 2024 18:46:26 +0000 Received: by outflank-mailman (input) for mailman id 831301; Wed, 06 Nov 2024 18:46:24 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l2u-0001q9-TX for xen-devel@lists.xenproject.org; Wed, 06 Nov 2024 18:46:24 +0000 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [2a00:1450:4864:20::52e]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 6a65c4e5-9c6f-11ef-99a3-01e77a169b0f; Wed, 06 Nov 2024 19:46:21 +0100 (CET) Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5c937b5169cso297591a12.1 for ; Wed, 06 Nov 2024 10:46:21 -0800 (PST) Received: from localhost.localdomain ([154.14.63.34]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cee6b0fc4dsm3129846a12.84.2024.11.06.10.46.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 06 Nov 2024 10:46:20 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 6a65c4e5-9c6f-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo1MmUiLCJoZWxvIjoibWFpbC1lZDEteDUyZS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6IjZhNjVjNGU1LTljNmYtMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMwOTE4NzgxLjM3NDM5Miwic2VuZGVyIjoicGhpbG1kQGxpbmFyby5vcmciLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730918781; x=1731523581; darn=lists.xenproject.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=JkT1yg2VZs3DMTFUZrgUQwWp62WZ2rdU+E0+QzLt/pA=; b=yZK4pvOHyx0FRptNpygrQTSHqtVeYHcV12nKz3s7TzDbiuCYeLfatVfGlFP7sbTZIh vfamdS8af1za08SVbwueT/sHtLmcwM7oowXHPDt1rXGX1vhsVqH/SZ86xqED4IyrG97R Ue3wIVy4pBfMZKoMOE2H1Es+MPx2G/a7WGI9SgHCR/+KtXnTqIJprDKXzDxeAgdE2nBA pJx7udqm3OpzMNkgh02GF+hQakY/6KlHKiu62+ZNTa9Z/PmqWUX0V0v7voHAk6r0SigD RoY9MRiAJDXFuzCLsd30Qr0DAL9bIjTGHhNKe8ZpzQOvkolxSXgHpLLf+hm0I3qEG1wp 3QEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730918781; x=1731523581; 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=JkT1yg2VZs3DMTFUZrgUQwWp62WZ2rdU+E0+QzLt/pA=; b=ZsirUvqKwmqNvBW/1TREUnkLPJXax2GgGtdyHcJeVaDi7Kj3vonZ+vNxGbB0kI98t4 s/t8cE4M6sEMV/XWexX2AdPBHoE7kH4XovZ6JwTGm4Udklaig9LsILOqJnLdTLN9CDlS sZtF7j6lFJFZBr0ruPwAZ9OlxWF/Vg6qryvtIwiaAhm7EZta2GtioeOdB2lHvrCAdWgX 2TNSCJIInwxp8JIC3ad/iH6MoJdJwJKoKDHrHTa/1/Z2/jDCChpzVHF5osa5Yllg84ad hTBk2EI4Rx3rc2iuKEWjsWH5sE5o8mcmTF729VGKVOV+gj52sXJaGjtg4P7d9XoNmp+o oaZw== X-Forwarded-Encrypted: i=1; AJvYcCXr4NmMwC5qgwJleOoY03H6ZHo9DcYSh40qyj3+hX69g9IfISY1p5cPa/ESDKNqDnzQa2W1+czm0aA=@lists.xenproject.org X-Gm-Message-State: AOJu0Yyd0GsesqyAXXD5rSRPDmbsrrtdDy0RDj2jhx9bZn/PNttwyhh3 cK+qWFfHQSStKWaG1ZQQzZHTEa/LUoTfLW35LfoE5iRqKYvEKDskI/S48L5WLtM= X-Google-Smtp-Source: AGHT+IFRztwwFzuqDMLCKe1HJL0VyN7UZW2IThAYmIBOBL/vYMjon6/glkSd1siXs1SQu1MAzFb96Q== X-Received: by 2002:a05:6402:26c8:b0:5ce:e5be:d042 with SMTP id 4fb4d7f45d1cf-5cefc66ec4amr296655a12.5.1730918780697; Wed, 06 Nov 2024 10:46:20 -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 1/5] hw/i386: Mark devices as little-endian Date: Wed, 6 Nov 2024 18:46:08 +0000 Message-ID: <20241106184612.71897-2-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 These devices are only used by the X86 targets, which are only built as little-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_LITTLE_ENDIAN (besides, the DEVICE_BIG_ENDIAN case isn't tested). Simplify directly using DEVICE_LITTLE_ENDIAN. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/kvm/apic.c | 2 +- hw/i386/pc.c | 4 ++-- hw/i386/vapic.c | 2 +- hw/i386/xen/xen_apic.c | 2 +- hw/i386/xen/xen_platform.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/i386/kvm/apic.c b/hw/i386/kvm/apic.c index a72c28e8a7..3a5d69e8d0 100644 --- a/hw/i386/kvm/apic.c +++ b/hw/i386/kvm/apic.c @@ -214,7 +214,7 @@ static void kvm_apic_mem_write(void *opaque, hwaddr addr, static const MemoryRegionOps kvm_apic_io_ops = { .read = kvm_apic_mem_read, .write = kvm_apic_mem_write, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, }; static void kvm_apic_reset(APICCommonState *s) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 830614d930..2259589e0d 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1064,7 +1064,7 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus) static const MemoryRegionOps ioport80_io_ops = { .write = ioport80_write, .read = ioport80_read, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, .impl = { .min_access_size = 1, .max_access_size = 1, @@ -1074,7 +1074,7 @@ static const MemoryRegionOps ioport80_io_ops = { static const MemoryRegionOps ioportF0_io_ops = { .write = ioportF0_write, .read = ioportF0_read, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, .impl = { .min_access_size = 1, .max_access_size = 1, diff --git a/hw/i386/vapic.c b/hw/i386/vapic.c index ef7f8b967f..fd906fdf78 100644 --- a/hw/i386/vapic.c +++ b/hw/i386/vapic.c @@ -718,7 +718,7 @@ static uint64_t vapic_read(void *opaque, hwaddr addr, unsigned size) static const MemoryRegionOps vapic_ops = { .write = vapic_write, .read = vapic_read, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, }; static void vapic_realize(DeviceState *dev, Error **errp) diff --git a/hw/i386/xen/xen_apic.c b/hw/i386/xen/xen_apic.c index 101e16a766..a94e9005cb 100644 --- a/hw/i386/xen/xen_apic.c +++ b/hw/i386/xen/xen_apic.c @@ -36,7 +36,7 @@ static void xen_apic_mem_write(void *opaque, hwaddr addr, static const MemoryRegionOps xen_apic_io_ops = { .read = xen_apic_mem_read, .write = xen_apic_mem_write, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, }; static void xen_apic_realize(DeviceState *dev, Error **errp) diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c index ec0e536e85..3b3e745822 100644 --- a/hw/i386/xen/xen_platform.c +++ b/hw/i386/xen/xen_platform.c @@ -514,7 +514,7 @@ static void platform_mmio_write(void *opaque, hwaddr addr, static const MemoryRegionOps platform_mmio_handler = { .read = &platform_mmio_read, .write = &platform_mmio_write, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, }; static void platform_mmio_setup(PCIXenPlatformState *d) From patchwork Wed Nov 6 18:46:09 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: 13865244 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4811AD59F63 for ; Wed, 6 Nov 2024 18:46:53 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.831302.1246531 (Exim 4.92) (envelope-from ) id 1t8l31-0002BD-0v; Wed, 06 Nov 2024 18:46:31 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 831302.1246531; Wed, 06 Nov 2024 18:46:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l30-0002B3-U9; Wed, 06 Nov 2024 18:46:30 +0000 Received: by outflank-mailman (input) for mailman id 831302; Wed, 06 Nov 2024 18:46:29 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l2z-0001bx-Sw for xen-devel@lists.xenproject.org; Wed, 06 Nov 2024 18:46:29 +0000 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [2a00:1450:4864:20::52d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 6d42fc42-9c6f-11ef-a0c6-8be0dac302b0; Wed, 06 Nov 2024 19:46:26 +0100 (CET) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5cb15b84544so60659a12.2 for ; Wed, 06 Nov 2024 10:46:26 -0800 (PST) Received: from localhost.localdomain ([89.101.134.25]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9eb16d9f96sm318040866b.75.2024.11.06.10.46.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 06 Nov 2024 10:46:25 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 6d42fc42-9c6f-11ef-a0c6-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo1MmQiLCJoZWxvIjoibWFpbC1lZDEteDUyZC5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6IjZkNDJmYzQyLTljNmYtMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMwOTE4Nzg2LjE4NzU3Mywic2VuZGVyIjoicGhpbG1kQGxpbmFyby5vcmciLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730918785; x=1731523585; darn=lists.xenproject.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=iNstnbcurcwe9tiYawZfa8Zi088/DUlHFBmK9/a+8zY=; b=sruHHMZyssMgzhOqYMe+sYjr0w1eMmCgkOkvAksLwg/mqXhj2NKg7TXW9EQ02mOVSP mn3GL7uTN0yTF2Zy3fzGrNMY9WlcDiCtxUuroBDV5mWSSan/SJw1HKIPuPTd4G/iBkZS vzNosczKOmO00uhJVIamOTs1nNrBeCSDIJZ7Aj8R7PA6SgRNpfrKoJr+MuWHfCnO4WJS 5H8+OyeN9sFNnBriI8WZ0aPd+MNgoV3H9/6p89WJXr8eNQvBopyhqT+NX1iVY9etjddN oF6y/C+7yUsCenZSnBBvwbY0vLRZ+8GHYZiWJ0+ynJCbuoAoAV6QZkwZ3vK/pq7H60ul S3qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730918785; x=1731523585; 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=iNstnbcurcwe9tiYawZfa8Zi088/DUlHFBmK9/a+8zY=; b=J5tKR/wC/unQRQD3P+aeZH8lfUESxCrFUBsridW8AWDYSnnprnG5HyIKUimk3leOCo /LM55m8McFd5F8jRbcrA7zzJXyKso68RslwEwg2a194r21mNIo3jCcNyg/LjZyFVzuJO R2w97zIZ8dSQ25ZBlba0EIvGsPO5zzN34QfQmSO13brUlvPMX2ZXFP5H71Eh08Q3Kj3h yoWIvU8L/27kaXMZGd+ayw7HZVdvsF2wnUq9afAQYO0DNoBQu3ZXfC0FUZz7Wf/XiUNr sVjC9ZpC/QY9Q+2gegEVXeNFuTVM+N5fQTIhbaz7S7kmdUedho1Xd2gfo3gJwnc5e2yf 9nNg== X-Forwarded-Encrypted: i=1; AJvYcCVq4lPezw24DigGPJK88KlrSyZkG2JVxLpfqAMXCYkrAOL3z7TlAYnd7BH6Egf/ikUeza0/olIIiAY=@lists.xenproject.org X-Gm-Message-State: AOJu0Yz3jycs2MoUFQmY6BNqp/4ACfR7GkYV6rxs32Zks23/FyMkfMLf gUxj4eI9Sv5hTCCNyOdPsZcB+ELHswmxDAP/VbIQRZ6b+ItRAi9AfUeOx/w4TgI= X-Google-Smtp-Source: AGHT+IGjArD1IMYMRr0Wdsufa3Pz3wV1Bnd8QpL2R9nInPp4yr8/a39mB/pkO2WyFWxS76ZZlJR3WQ== X-Received: by 2002:a17:907:94cb:b0:a9a:835b:fc77 with SMTP id a640c23a62f3a-a9e6549106bmr2239257766b.8.1730918785638; Wed, 06 Nov 2024 10:46:25 -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 2/5] hw/tricore: Mark devices as little-endian Date: Wed, 6 Nov 2024 18:46:09 +0000 Message-ID: <20241106184612.71897-3-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 These devices are only used by the TriCore target, which is only built as little-endian. Therefore the DEVICE_NATIVE_ENDIAN definition expand to DEVICE_LITTLE_ENDIAN (besides, the DEVICE_BIG_ENDIAN case isn't tested). Simplify directly using DEVICE_LITTLE_ENDIAN. Signed-off-by: Philippe Mathieu-Daudé --- hw/tricore/tricore_testdevice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/tricore/tricore_testdevice.c b/hw/tricore/tricore_testdevice.c index ae95c49565..169f5907e9 100644 --- a/hw/tricore/tricore_testdevice.c +++ b/hw/tricore/tricore_testdevice.c @@ -47,7 +47,7 @@ static const MemoryRegionOps tricore_testdevice_ops = { .min_access_size = 4, .max_access_size = 4, }, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, }; static void tricore_testdevice_init(Object *obj) From patchwork Wed Nov 6 18:46:10 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: 13865242 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2AFBFD59F5E for ; Wed, 6 Nov 2024 18:46:50 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.831303.1246541 (Exim 4.92) (envelope-from ) id 1t8l36-0002Uo-9f; Wed, 06 Nov 2024 18:46:36 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 831303.1246541; Wed, 06 Nov 2024 18:46:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l36-0002Ub-4w; Wed, 06 Nov 2024 18:46:36 +0000 Received: by outflank-mailman (input) for mailman id 831303; Wed, 06 Nov 2024 18:46:34 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l34-0001q9-Rx for xen-devel@lists.xenproject.org; Wed, 06 Nov 2024 18:46:34 +0000 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [2a00:1450:4864:20::62d]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7081103d-9c6f-11ef-99a3-01e77a169b0f; Wed, 06 Nov 2024 19:46:31 +0100 (CET) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a9ec267b879so10426066b.2 for ; Wed, 06 Nov 2024 10:46:31 -0800 (PST) Received: from localhost.localdomain ([89.101.241.141]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9eb16f8e2csm315523366b.91.2024.11.06.10.46.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 06 Nov 2024 10:46:30 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7081103d-9c6f-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MmQiLCJoZWxvIjoibWFpbC1lajEteDYyZC5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6IjcwODExMDNkLTljNmYtMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMwOTE4NzkxLjY1MTExNSwic2VuZGVyIjoicGhpbG1kQGxpbmFyby5vcmciLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730918791; x=1731523591; darn=lists.xenproject.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=yO3kVmbmcBoFVWzYS+y583sX7R+jYDZcKW8eZMLJiQc=; b=NUt1njxNyP8K7t5dDpRveanq80bKrNrMgU6qV2xkKJLI/uePjUWSeoKhlxfTHwMvIw A/DIDcX1HF8nWkWfW8cdI0sVzmRuFjX9DxxxQZ3cFC70ASg5ziFEIaML9wjk7Rhx/QNw ctn9SSRs7X/m3UkS5kqSSkWfkcx6FPFRaQG7FGS51luUnSJ3qXkDYu0b0ZsbwoeLPIae caGQZew0oW/Xdvhz70NKDCFBsDrjOlFud4EXLCJ0D5PCt9vAB3A9g+upyw4zkvwY2cgf 7NvpTivJjgvbIBKKNVc5V8p0JzH403mo5826ji381tHKxrS9dFbKzEVq1IQ3fzxfviLl Z2bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730918791; x=1731523591; 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=yO3kVmbmcBoFVWzYS+y583sX7R+jYDZcKW8eZMLJiQc=; b=ZMsVqjbqRrLPjo1skImcGIB2a+XNjjEhyvJaYAX8+J+6I8sIb1NZUcDXOlOEg3B8Lk HJBrrLnG5oc//zOk4hr+lEHTtpJM0fmgrEPctNVBMcOO94S1EeksbCu/+KTZYSmy0RDk Th/lF86PXZ0/c8lcwiibh0q3I+yrdspUPTGvUd0jH3iHUCCJMHNewBX5+u0a6vGOD7lO ZbQpwVsIxE79UkVYuaTOiWqON65egdqup2f1tRJTW3gUk5OG1bO3C0wlAKKnnuAdrj6s 494W8OqSB8dCN4WSn8cK4nX1gvKWyLIL9WJtceB2Jw+gGVvAyiNtXkcqjxuchPtfI33+ tX4g== X-Forwarded-Encrypted: i=1; AJvYcCWVvcEHmJQmBUam66u4RN8M0ECYlZXcNRe27yA9YPF5BY33LIE6XoGCdaD8yLofS0Ql0sWP3kJWZTo=@lists.xenproject.org X-Gm-Message-State: AOJu0YxbaLjydEfog9Mj5cb8JaByWDI7LJRUhUXtSw0DrBRrYaCkx+Ou KpGwQFDvVlft2Q1+hgMQRuR0d8Ze7/UiXe48sPmSYPb+XVWIr4fF+tia70fS9F4= X-Google-Smtp-Source: AGHT+IHLwEYzjh7bE7VY6UKu2vqJy3kDHJGLTpvdAYwpwyzxfVfdumNtAIjQKBsxyhavBG7XBennEQ== X-Received: by 2002:a17:907:7ba7:b0:a9a:522a:eddd with SMTP id a640c23a62f3a-a9e5089b4admr2275919566b.11.1730918790907; Wed, 06 Nov 2024 10:46:30 -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 3/5] hw/m68k: Mark devices as big-endian Date: Wed, 6 Nov 2024 18:46:10 +0000 Message-ID: <20241106184612.71897-4-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 These devices are only used by the M68K target, which is 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é --- hw/m68k/mcf5206.c | 2 +- hw/m68k/mcf5208.c | 6 +++--- hw/m68k/mcf_intc.c | 2 +- hw/m68k/next-kbd.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/m68k/mcf5206.c b/hw/m68k/mcf5206.c index 7247cdbe5e..4892924fc2 100644 --- a/hw/m68k/mcf5206.c +++ b/hw/m68k/mcf5206.c @@ -582,7 +582,7 @@ static const MemoryRegionOps m5206_mbar_ops = { .write = m5206_mbar_writefn, .valid.min_access_size = 1, .valid.max_access_size = 4, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_BIG_ENDIAN, }; static void mcf5206_mbar_realize(DeviceState *dev, Error **errp) diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c index e37cd50d18..4166877066 100644 --- a/hw/m68k/mcf5208.c +++ b/hw/m68k/mcf5208.c @@ -155,7 +155,7 @@ static uint64_t m5208_timer_read(void *opaque, hwaddr addr, static const MemoryRegionOps m5208_timer_ops = { .read = m5208_timer_read, .write = m5208_timer_write, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_BIG_ENDIAN, }; static uint64_t m5208_sys_read(void *opaque, hwaddr addr, @@ -192,7 +192,7 @@ static void m5208_sys_write(void *opaque, hwaddr addr, static const MemoryRegionOps m5208_sys_ops = { .read = m5208_sys_read, .write = m5208_sys_write, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_BIG_ENDIAN, }; static uint64_t m5208_rcm_read(void *opaque, hwaddr addr, @@ -224,7 +224,7 @@ static void m5208_rcm_write(void *opaque, hwaddr addr, static const MemoryRegionOps m5208_rcm_ops = { .read = m5208_rcm_read, .write = m5208_rcm_write, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_BIG_ENDIAN, }; static void mcf5208_sys_init(MemoryRegion *address_space, qemu_irq *pic, diff --git a/hw/m68k/mcf_intc.c b/hw/m68k/mcf_intc.c index 9fc30b03ba..5f38c49077 100644 --- a/hw/m68k/mcf_intc.c +++ b/hw/m68k/mcf_intc.c @@ -166,7 +166,7 @@ static void mcf_intc_reset(DeviceState *dev) static const MemoryRegionOps mcf_intc_ops = { .read = mcf_intc_read, .write = mcf_intc_write, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_BIG_ENDIAN, }; static void mcf_intc_instance_init(Object *obj) diff --git a/hw/m68k/next-kbd.c b/hw/m68k/next-kbd.c index bc67810f31..4d87edc2de 100644 --- a/hw/m68k/next-kbd.c +++ b/hw/m68k/next-kbd.c @@ -163,7 +163,7 @@ static const MemoryRegionOps kbd_ops = { .write = kbd_writefn, .valid.min_access_size = 1, .valid.max_access_size = 4, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_BIG_ENDIAN, }; static void nextkbd_event(void *opaque, int ch) From patchwork Wed Nov 6 18:46:11 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: 13865245 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9CD7BD59F60 for ; Wed, 6 Nov 2024 18:46:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.831306.1246551 (Exim 4.92) (envelope-from ) id 1t8l3A-0002sD-HL; Wed, 06 Nov 2024 18:46:40 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 831306.1246551; Wed, 06 Nov 2024 18:46:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l3A-0002s4-D0; Wed, 06 Nov 2024 18:46:40 +0000 Received: by outflank-mailman (input) for mailman id 831306; Wed, 06 Nov 2024 18:46:39 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l39-0001q9-Ke for xen-devel@lists.xenproject.org; Wed, 06 Nov 2024 18:46:39 +0000 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [2a00:1450:4864:20::62f]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7365aef6-9c6f-11ef-99a3-01e77a169b0f; Wed, 06 Nov 2024 19:46:36 +0100 (CET) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a9acafdb745so35862666b.0 for ; Wed, 06 Nov 2024 10:46:36 -0800 (PST) Received: from localhost.localdomain ([89.101.134.25]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9eb16d9d68sm317330266b.72.2024.11.06.10.46.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 06 Nov 2024 10:46:35 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7365aef6-9c6f-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MmYiLCJoZWxvIjoibWFpbC1lajEteDYyZi5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6IjczNjVhZWY2LTljNmYtMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMwOTE4Nzk2LjQ5NjAwOCwic2VuZGVyIjoicGhpbG1kQGxpbmFyby5vcmciLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730918796; x=1731523596; darn=lists.xenproject.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=YsFK2U3XFqb/vEljmH+2siHctjoVhJmmiNdlJHfI0/4=; b=W/J9lIP6zrElw4Hq74bucweEH1iuYzhVkfIZnGeKvjmhiR637CEOELSdwbQ5ov/FzW XUhrEcp/0eByp4ffvDhX8XpY79dFhu8zwzLcG7ZzFD+TEynWkoC3J/U42YkuXsTQ9klK QCztpol6HIUaPiKFk97spKmU2bX29AVbVwsHrLaMyFBdm3ce3l89LucJP0zNr1F6Qvvy vKipokhQYP4AkczuC6DWCsmxR3SAfRGPgOuKWbRk22raHwL8catbRDmryJi6Z3ewnkl3 9hWby6R00rOi8t3E3Kdf+grGfMkOqSp9PpfSTEvZ4DzVn0uniHNazPBEwZPlyeZPVh5L IBtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730918796; x=1731523596; 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=YsFK2U3XFqb/vEljmH+2siHctjoVhJmmiNdlJHfI0/4=; b=QtycT7FjhMyvnwCN1HQMyNNiRQXXblxZ8IOezV7m2v8/fJUjnx/01kEdfWp6OS+3Yw 9u0oHl3ySAhZ30nOSfBLKiKFSh6+4/gehHv4jjgwBRw/uQdzJEW10yfjeKD3BK7xufaz MnFlRc1t3IRaZj9CvL+uwSvuvDd2YL1WQpC1sdMcSyXkSBnAJX+ND6G4RikzMjgMwZ9A sneQ7EJ5k4xGm+xEg71XykFJzT5HaRGOBT+hr5eS2lfDeIWjRZCDW70G6BHwZh9kbTmh DpPKfSKw9AVjDbz/VXquJMEesOzhtgJUIP9b7eY8KFKMbH8xuc67tZSK/5bqC3sBTWDk LoNA== X-Forwarded-Encrypted: i=1; AJvYcCUjHSc1O/tm83TUcbpyIDRMzboflgJ/e+gNL6+BwhZOFff+J5YmPC6zdMOCzxefFHsA1LHFZzyZCLo=@lists.xenproject.org X-Gm-Message-State: AOJu0YwT5qLqg1Rf/SqDQI38huvA47Gr44/KDtQdpur4D+6i57JIEvQJ wr2W9jrzpNew5OB7xleZM6vd0JAyuFhjvXLJ8cod87GPvjoedBsKaMOsYU1pmfE= X-Google-Smtp-Source: AGHT+IE+L+yQyHT39fSRf4/OhKcpAqJYHinN1o/h9Nj2ZuOUgW78Lq2jC2oQuBoUyZL+R29YcaV+GA== X-Received: by 2002:a17:907:7f90:b0:a9e:670f:9485 with SMTP id a640c23a62f3a-a9ed51c6ed6mr17121666b.30.1730918795914; Wed, 06 Nov 2024 10:46:35 -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 4/5] hw/openrisc: Mark devices as big-endian Date: Wed, 6 Nov 2024 18:46:11 +0000 Message-ID: <20241106184612.71897-5-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 These devices are only used by the OpenRISC target, which is 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é --- hw/openrisc/openrisc_sim.c | 2 +- hw/openrisc/virt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c index 9fb63515ef..794c175bdb 100644 --- a/hw/openrisc/openrisc_sim.c +++ b/hw/openrisc/openrisc_sim.c @@ -266,7 +266,7 @@ static void openrisc_sim_serial_init(Or1ksimState *state, hwaddr base, } serial_mm_init(get_system_memory(), base, 0, serial_irq, 115200, serial_hd(OR1KSIM_UART_COUNT - uart_idx - 1), - DEVICE_NATIVE_ENDIAN); + DEVICE_BIG_ENDIAN); /* Add device tree node for serial. */ nodename = g_strdup_printf("/serial@%" HWADDR_PRIx, base); diff --git a/hw/openrisc/virt.c b/hw/openrisc/virt.c index 47d2c9bd3c..ede57fe391 100644 --- a/hw/openrisc/virt.c +++ b/hw/openrisc/virt.c @@ -236,7 +236,7 @@ static void openrisc_virt_serial_init(OR1KVirtState *state, hwaddr base, qemu_irq serial_irq = get_per_cpu_irq(cpus, num_cpus, irq_pin); serial_mm_init(get_system_memory(), base, 0, serial_irq, 115200, - serial_hd(0), DEVICE_NATIVE_ENDIAN); + serial_hd(0), DEVICE_BIG_ENDIAN); /* Add device tree node for serial. */ nodename = g_strdup_printf("/serial@%" HWADDR_PRIx, base); 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: 13865246 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 74D36D59F60 for ; Wed, 6 Nov 2024 18:47:01 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.831310.1246561 (Exim 4.92) (envelope-from ) id 1t8l3F-0003JH-SR; Wed, 06 Nov 2024 18:46:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 831310.1246561; Wed, 06 Nov 2024 18:46:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l3F-0003J5-P8; Wed, 06 Nov 2024 18:46:45 +0000 Received: by outflank-mailman (input) for mailman id 831310; Wed, 06 Nov 2024 18:46:44 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8l3E-0001q9-LQ for xen-devel@lists.xenproject.org; Wed, 06 Nov 2024 18:46:44 +0000 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [2a00:1450:4864:20::12e]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7676c029-9c6f-11ef-99a3-01e77a169b0f; Wed, 06 Nov 2024 19:46:41 +0100 (CET) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-53a097aa3daso33057e87.1 for ; Wed, 06 Nov 2024 10:46:41 -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) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7676c029-9c6f-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjoxMmUiLCJoZWxvIjoibWFpbC1sZjEteDEyZS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6Ijc2NzZjMDI5LTljNmYtMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMwOTE4ODAxLjU3MzQzOCwic2VuZGVyIjoicGhpbG1kQGxpbmFyby5vcmciLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730918801; x=1731523601; darn=lists.xenproject.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=EOmEPHvSv1wcVQwCWiWpG7S6c3OlvR54obZp1jOR63EAZ9qDnE1DnKmW2QKC8tJ/mV 1FPVnMadyv/cWy94mNDAS03yzb34OtrWUkueDzVFwcrTlFqg5rwtawICgEwOMA+J7bS/ ThUogKEVzUxXkdPY8zwBOh9UBrsQWNkz9XyL/wumycnr5VLzV94iwifRBraoKU0PPPSz uShXBolxIp4EIYxFeivGx4Ky8NVy5vuT3/Vfk8KDpZYZAHi/7qV9p+ZGW/IOuwzP8JrR Zs+pgw+LXCz+ek6scG2Iq0LLJOxIUYZlF45AruQuH4dtmfFzgn7fsmxEpSRycoremOI+ CHJw== 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=XKXdnKSrUOM2u8X5iLKI6rJtKMq0JBO+ou3rNCRjL1fqNcur/5pCP00ZT2Eb18tu3T HeIJbqNguBWud+9jQCIWeorqe72fSwQP1fIfqlasI1+G8AG/4/I+o5hDVrmDpCeCylXS lGfDzW8zSMkCbEeMCLIAPCGg+fXkQ8+j7Zq4n34GICOtWNydy+4IqtiGrN8qBE59SDaO nx173I90HGAQVKYuJRZAgCg5mn2GAVpNdJ5+MwDQlJOo4wVgN7IaGfuJ4cYY/7ydFvOj /VLufE58aZKYiINj8U4Ixx6sGdMU3u+dM4h7QPsDADKIqCMJXHcgyJvrlgPRMgVNj7ar hJjQ== X-Forwarded-Encrypted: i=1; AJvYcCUXdqOc4XdCAnKiFY2RZW0UIPB5ugRrgM4qc9EYCDix1ltQWttrsStfl5C84t/kiFubHpjg5hBWc3w=@lists.xenproject.org X-Gm-Message-State: AOJu0YxaWfJd73Jf6xUNayatKNV6QcqQV/XT77PSWv95qid8Fr7DMlbq cXIJfvNM7VfxIswJNJARrc1XTayM4qgBs3zuBBz3ENn3XxCpc/49Rvn4jZY1B5g= X-Google-Smtp-Source: AGHT+IGZ7yhvC/Wx3siWVWtSGdKVwGW9oG3YHsndXh771V6dpEgTCitAC2JnhInj+huJT/sEjeTvSw== 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) 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 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 --- 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,