From patchwork Sun Dec 29 07:24:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 854176 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp5937438wrq; Sat, 28 Dec 2024 23:28:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXMX8DBnBjFpJ4rdQqGO7EfaS8FVAdMYWuRZ9oW4qpCWo1KT5gQEYAFJi4uqOYdceQzersakQ==@linaro.org X-Google-Smtp-Source: AGHT+IFmSumP5zZifghGrfnDY68drT3eUsyQTdUiaz8GRyh1MgtEI+81Y94Ta48Yxx5Zwd9JpAcf X-Received: by 2002:a05:622a:82:b0:467:5f2f:4a9f with SMTP id d75a77b69052e-46a4b0d6f1emr511071371cf.3.1735457306490; Sat, 28 Dec 2024 23:28:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735457306; cv=none; d=google.com; s=arc-20240605; b=JPDNaUAq72VnuBj2iC5xfp3Ls7Hp4IlzGeqewZOsD7Xey5RTLgs4u591mIsfyw1DA/ rYSjXrpYUVL1uBNaj8UZBP8g43TRpKb7mEkTi0ynUi9c/Xu4IqIHUmikQ77vGZOBVm0b MtVAEWTQ9zUeMfvSebyBChTEqxVk16DEj+0VLtBVzO+ygBHcX1JFxvTAxNp83wkcnHP0 JLrglhiEOxbZy/psc66hZqvl6P8D2VgJFJMUO0ScVF0Ud/jh30WNdRKAnumiX87vVZU9 8iqFjYNF+V3eQofVPV3W5z85bWZ2rVdlG03wGVEzDwwVbmfvGvonHlgecufklHJdZWGT Zd3A== 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:to:from; bh=qAtx5jrlA9KZeccpdqCh6rBdfWSP4VBSS5wQmXaUrf4=; fh=ScQ8SbtpoUrMJmap/2vn/hkLROump0sIUYGXgYS13Us=; b=hA4A9TgOun9itlDi2zMzwJppEJXe7nO/4eKz6MflwRXWi8yMqLSKrsuB+MEg6hu6WH J81W1c9EZh83E3Spm0EyilzFyvBj3di/fA31DyLsYhp709DVlQaly3W7MgrMr1tq9VtV QhGtERUO890J9FRrUwDcDIbmOztxBdVJBGWoBu3QVOkwuZXgdQbcEo+mgRbKlYjRm5Wz v6FB08PBGc7e/e57wmi31v3WAcfQCrjL4Mwvq7+OPpG1UorL+5PoIAT8TeD/fBj/poOJ Weog8LLdsKxpIk30na9GAbJkyEUraujPvaCf+uwsEUY9LH2qw42EbfkJdiqd+NitOpA1 K6Hg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46a3eb999a1si240881371cf.287.2024.12.28.23.28.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 28 Dec 2024 23:28:26 -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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRnh6-0006TU-7c; Sun, 29 Dec 2024 02:26:36 -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 1tRngz-0006Sc-Vz for qemu-devel@nongnu.org; Sun, 29 Dec 2024 02:26:30 -0500 Received: from mail-ej1-f49.google.com ([209.85.218.49]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tRngy-00026c-CR for qemu-devel@nongnu.org; Sun, 29 Dec 2024 02:26:29 -0500 Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-aaee0b309adso766586666b.3 for ; Sat, 28 Dec 2024 23:26:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735457187; x=1736061987; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qAtx5jrlA9KZeccpdqCh6rBdfWSP4VBSS5wQmXaUrf4=; b=FuTJX/NSrLQQ1RbikITnI5M+wZywnCKZ+M0iU11jH1wfggFPhE7Ss7VXuAqXeNfvZp vzYgLMA0X27JV88XQu2HDBrHl/ZfSEy0gTPl6m7BA37EosB64SEjMCLFlqRAf16ebwEf VLpW6k1aUS326/INQSj7KtnUOphmaxvWeyXwv9uAoW+oZLqB9N7o8wADm20jspeShS1b kC8VTStLezZXysJLvywuafTFReClS++6zc3zZ1u3IzuNey5BlZ7IqC7hzwRRSwmchnax FV0IWp5iijKvr2QhblN9c4BmwRiSfOG8/ZPu/XWN7bh13/Q6fz7kz3b/eZu6dFwbCWAF TZsg== X-Forwarded-Encrypted: i=1; AJvYcCUvXL0F/x8EzXNfUdNmyhv3vc+GVqtUyHMBUIoYWxBpoTg/qyT3rlcdX36+iyPlTjHv2H39LnkSJVEN@nongnu.org X-Gm-Message-State: AOJu0YylgAnIveAMsMret4mgtAJVlHoKhc1/x9t1c829O5QEDalHlXXj FAJckBt/lPJZKWEYu/OeguUSokq24MWHEekd0C+wrS4XWWkEWhfmOTSXXg== X-Gm-Gg: ASbGnctTV8RirMmy/P6Q0RyOsW5snWonMLti1FNiOo3GaDErDyFkEwvrTy5+ooWhmYB VnI2xt1VfR6tgrcWJYWXjYjgUlmmn2A4cN3NBJKrmdZwEgXSMIj6VBVCKBC+T8TzxADOIc9+beE PVKHI3QJxHcykACo0+UupeLoUJIuftrzGtKLNMf7y5rm4mTv479wYLwLXlzsHGp1jZIohvqBqkG a+jG67If9I4M/uS4yuXCFRFMrq5oIHPfJlYy/fllnK9dwcbUkSSSjPxa4OUjW1Efm7xwJWmj6gz o7Y= X-Received: by 2002:a17:907:2d8b:b0:aa6:6e41:ea53 with SMTP id a640c23a62f3a-aac271316a3mr3208956766b.7.1735457186535; Sat, 28 Dec 2024 23:26:26 -0800 (PST) Received: from tpx1.. (ip-109-42-49-90.web.vodafone.de. [109.42.49.90]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895194sm1329218666b.70.2024.12.28.23.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2024 23:26:25 -0800 (PST) From: Thomas Huth To: Stefan Hajnoczi , qemu-devel@nongnu.org Subject: [PULL 01/35] hw/m68k: Mark devices as big-endian Date: Sun, 29 Dec 2024 08:24:52 +0100 Message-ID: <20241229072526.166555-2-huth@tuxfamily.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241229072526.166555-1-huth@tuxfamily.org> References: <20241229072526.166555-1-huth@tuxfamily.org> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.218.49; envelope-from=th.huth@gmail.com; helo=mail-ej1-f49.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, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.156, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 From: Philippe Mathieu-Daudé 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é Message-ID: <20241106184612.71897-4-philmd@linaro.org> Signed-off-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 ef619cb9a4..c22e615f7a 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 f290ccc739..409bb72574 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 008626f813..7b9213947d 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 dacc26413f..68b17786b2 100644 --- a/hw/m68k/next-kbd.c +++ b/hw/m68k/next-kbd.c @@ -162,7 +162,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 const int qcode_to_nextkbd_keycode[] = {