From nobody Mon Feb 9 17:24:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=bt.com ARC-Seal: i=1; a=rsa-sha256; t=1566588421; cv=none; d=zoho.com; s=zohoarc; b=c29CD5lOTK6Xhm5Byor4ltgJORN6+tzF02EryZLKiw/6871kYJHFCmliqGc4gS6l0e8UjupsILoBKsA8PtbuF8vbLSCWw7soYQuR8uJlx8bF9X/S52nUUs417iDD9GDAapT8+NpWImwWG3sgDQidFwtqfUWmfm26aiFzvL1a8/o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566588421; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=2ZZ08n/NDy0/mdPSCemT4Py6+zPq9VZOuDCvTnfm6C8=; b=hi6pD9vAsyZ7nKGVHPaggJSZ6PengrwZ/12dA4d2n5doWumwJ6BDsaNddCxUztTRAiUAzOgck+MlpkpYFIUB7N30eqyxn087wMtE11DkUFeG15jwQCP1V5T38ugIgzykYqp0NAM+gv2+F5HbSZcD68VVOxzeTwkblWI1Kt6nqvE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1566588421656127.84235718411901; Fri, 23 Aug 2019 12:27:01 -0700 (PDT) Received: from localhost ([::1]:33370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i1FD8-0002rN-7j for importer@patchew.org; Fri, 23 Aug 2019 15:26:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43236) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i1EhP-0003hd-3b for qemu-devel@nongnu.org; Fri, 23 Aug 2019 14:54:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i1EhN-0003Pa-Sy for qemu-devel@nongnu.org; Fri, 23 Aug 2019 14:54:10 -0400 Received: from nsstlmta12p.bpe.bigpond.com ([203.38.21.12]:46602) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i1EhN-0003Mv-7G; Fri, 23 Aug 2019 14:54:09 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep12p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190823185404.TOWL1023.nsstlfep12p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Sat, 24 Aug 2019 04:54:04 +1000 Received: from dbz.telstra.com.au (58.173.98.68) by smtp.telstra.com (5.8.335) (authenticated as tony.nguyen.git@bigpond.com) id 5D3692920C8C20B5; Sat, 24 Aug 2019 04:54:03 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudegkedguddvkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfupfevtfgpvffgnffuvffttedpqfgfvfenuceurghilhhouhhtmecugedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvohhnhicupfhguhihvghnuceothhonhihrdhnghhuhigvnhessghtrdgtohhmqeenucfkphepheekrddujeefrdelkedrieeknecurfgrrhgrmhephhgvlhhopegusgiirdhtvghlshhtrhgrrdgtohhmrdgruhdpihhnvghtpeehkedrudejfedrleekrdeikedpmhgrihhlfhhrohhmpeeothhonhihrdhnghhuhigvnhessghtrdgtohhmqedprhgtphhtthhopeeorghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgvqedprhgtphhtthhopeeophgvthgvrhdrmhgrhiguvghllheslhhinhgrrhhordhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdgrrhhmsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehqvghmuhdquggvvhgvlhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoshhunhguvggvphdrlhhkmhhlsehgmhgrihhlrdgtohhmqedprhgtphhtthhopeeothhonhihrdhnghhuhigvnhessghtrdgtohhmqeenucevlhhushhtvghrufhiiigvpedutd X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean X-RG-VS-CLASS: clean X-Authentication-Info: Submitted using ID tony.nguyen.git@bigpond.com From: Tony Nguyen To: qemu-devel@nongnu.org Date: Sat, 24 Aug 2019 04:56:36 +1000 Message-Id: X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 203.38.21.12 Subject: [Qemu-devel] [RFC PATCH 15/17] hw/ssi: Declare device little or big endian X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Tony Nguyen , Alistair Francis , qemu-arm@nongnu.org, Subbaraya Sundeep Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" For each device declared with DEVICE_NATIVE_ENDIAN, find the set of targets from the set of target/hw/*/device.o. If the set of targets are all little or all big endian, re-declare the device endianness as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. This *naive* deduction may result in genuinely native endian devices being incorrectly declared as little or big endian, but should not introduce regressions for current targets. These devices should be re-declared as DEVICE_NATIVE_ENDIAN if 1) it has a new target with an opposite endian or 2) someone informed knows better =3D) Signed-off-by: Tony Nguyen --- hw/ssi/mss-spi.c | 2 +- hw/ssi/pl022.c | 2 +- hw/ssi/stm32f2xx_spi.c | 2 +- hw/ssi/xilinx_spips.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/ssi/mss-spi.c b/hw/ssi/mss-spi.c index 3050fabb69..914f90f3ad 100644 --- a/hw/ssi/mss-spi.c +++ b/hw/ssi/mss-spi.c @@ -361,7 +361,7 @@ static void spi_write(void *opaque, hwaddr addr, static const MemoryRegionOps spi_ops =3D { .read =3D spi_read, .write =3D spi_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid =3D { .min_access_size =3D 1, .max_access_size =3D 4 diff --git a/hw/ssi/pl022.c b/hw/ssi/pl022.c index cade2e92a8..1501af2850 100644 --- a/hw/ssi/pl022.c +++ b/hw/ssi/pl022.c @@ -228,7 +228,7 @@ static void pl022_reset(DeviceState *dev) static const MemoryRegionOps pl022_ops =3D { .read =3D pl022_read, .write =3D pl022_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static int pl022_post_load(void *opaque, int version_id) diff --git a/hw/ssi/stm32f2xx_spi.c b/hw/ssi/stm32f2xx_spi.c index cd6e8443db..dbb109b2dc 100644 --- a/hw/ssi/stm32f2xx_spi.c +++ b/hw/ssi/stm32f2xx_spi.c @@ -167,7 +167,7 @@ static void stm32f2xx_spi_write(void *opaque, hwaddr ad= dr, static const MemoryRegionOps stm32f2xx_spi_ops =3D { .read =3D stm32f2xx_spi_read, .write =3D stm32f2xx_spi_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const VMStateDescription vmstate_stm32f2xx_spi =3D { diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c index a309c712ca..e622e38f6d 100644 --- a/hw/ssi/xilinx_spips.c +++ b/hw/ssi/xilinx_spips.c @@ -1240,7 +1240,7 @@ static MemTxResult lqspi_write(void *opaque, hwaddr o= ffset, uint64_t value, static const MemoryRegionOps lqspi_ops =3D { .read_with_attrs =3D lqspi_read, .write_with_attrs =3D lqspi_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .impl =3D { .min_access_size =3D 4, .max_access_size =3D 4, --=20 2.23.0