From nobody Sat Nov 23 23:58:47 2024 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=1730918834; cv=none; d=zohomail.com; s=zohoarc; b=U39RYa7gUTG2KR2bA1+ZIwyGCXhUOwTtwMSfoXj1ZGekAk6bqlQHrxfF2QvFDGr6Z9VOlwtklXsQ63+1+tqTyYbuT+iP7598+Guv7LGk4CiBG3IncNPmF6mQsZI4HRSoEApA21uFnGgAx7ZaFCBqtfjOmtNarXFU1JG62bP4N1M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730918834; 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=yO3kVmbmcBoFVWzYS+y583sX7R+jYDZcKW8eZMLJiQc=; b=LdBGpsA2mpR63JkTstyM50ntU4ihnlumQFg3KYF8VmTCmsiL45GrTqsNnBnNgEUdnqayVQ64oOgFX5AKzqRBWAX7n7LO8/4rttuRkcHYUItB0Bn5T5TRGI5307tIHAAA63P5ApeeXvWmAnw6nABz64LbESHEHo7WePUfDR9MNk4= 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= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730918834345768.4712186419664; Wed, 6 Nov 2024 10:47:14 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8l37-0008SG-SR; Wed, 06 Nov 2024 13:46: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 ) id 1t8l34-0008RJ-E9 for qemu-devel@nongnu.org; Wed, 06 Nov 2024 13:46:35 -0500 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8l32-0000vm-Qa for qemu-devel@nongnu.org; Wed, 06 Nov 2024 13:46:34 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a99f1fd20c4so11610066b.0 for ; Wed, 06 Nov 2024 10:46:32 -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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730918791; x=1731523591; 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=yO3kVmbmcBoFVWzYS+y583sX7R+jYDZcKW8eZMLJiQc=; b=NgFGhTipH9Q57B0CgUSTZwcisRJrrerO575IRQ8mlU+ITHWkQIBblkurs2owa1VlCN c7mbTYedBooI/RXQTMqdJSgLVnhy/kKDz5Hv9DmdaLGugCtRO9PClSaghVjYk8KwpXiM 4Pd8mbvyj28bVIQ4fD0sRAKZ9GArc9Z/Glp/ACvMlkU2ggHWQe02l1hzjVIsDBITNoGO Lv9cjJ0Tx1lpkbwA6UYK0erdXQSS6YfwkEaDefw1CXuOQRJi+pBG/qgr+vavY/GzwpGe i1x89eTXhHMJu4UZkmbh2wTwYfwWaggabAFUuoB3QwreYmsywVjBxWNuq7I9w/t6Ki7F cv9w== 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=sPTQ8fRbMFlPVfy8kftpPbieoRtePU53+hRs/oBL9UYG1QC9Aegm4VxvsSIXrjTyZE C38UibogPsefrffvq0YVv1Lavx6CND4Uyb3XStnEy5YeaVlvjPpUC1ZaC3d/bWbpgvwg Q8z9gGddYWiuWtZJfyosfm3NQKAR/5IK+6R2M/PGVyoymhYeEhhw7Hpv6br+CnMwrwUC lSyW+p7JtYBzxdRh/1+iiwsSMP0gydf8+JU7dOPECAss8SU63tsHND9T2todUQ5UJj5n QRpQOtzMhJe/jR+OjDPzHbe9tw0DYQUhExVh6vVkE8gqZ+n/g1zvW3gOZ5nxJHnkWxhG iSQQ== X-Gm-Message-State: AOJu0YwxWrqVcnhFn3hgqiqimvvie5S2o5RlzKzxdLGxk5crYKA63Y/5 yjNA1fBvNQEKMY0R3CtzHZGAWbeCTsyCFybbS5FtYM7itpASbh+zf0eQmmQG7dH0hWiclACKCtU o 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=20Mathieu-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=20Mathieu-Daud=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 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::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1730918835587116600 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=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- 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 =3D { .write =3D m5206_mbar_writefn, .valid.min_access_size =3D 1, .valid.max_access_size =3D 4, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 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 a= ddr, static const MemoryRegionOps m5208_timer_ops =3D { .read =3D m5208_timer_read, .write =3D m5208_timer_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 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 =3D { .read =3D m5208_sys_read, .write =3D m5208_sys_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 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 =3D { .read =3D m5208_rcm_read, .write =3D m5208_rcm_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 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 =3D { .read =3D mcf_intc_read, .write =3D mcf_intc_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 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 =3D { .write =3D kbd_writefn, .valid.min_access_size =3D 1, .valid.max_access_size =3D 4, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_BIG_ENDIAN, }; =20 static void nextkbd_event(void *opaque, int ch) --=20 2.45.2