From nobody Wed Nov 12 00:12:53 2025 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=1566829309; cv=none; d=zoho.com; s=zohoarc; b=iGKAkH5Enl6+wmLyOGlo6DvdJ5qCCU8r5RI+AJI1WHOuj6lVd1PKKu1NYJMB0vaA/JKoFPwLGAUxBQC18533iaWNFqM/le3+hHBvoFG7piX5gOdwiEhNy4eiJ5bqSBFgnx3+gnBNRf6Ku1pI78beTfiYHuCXbgO3EoVXxio68FU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566829309; 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=YEywIrKZc8DG5j6lAYKU8LPY+J1MDSyPJJTh2rQIS9w=; b=NWF8O3zOg9Q/UOuC7J47ZYyoeMmaS/4A07n6lAwToM+3rfVr/w1rU3PtQXvqtoQnQIalGWGp0EhL+76ACW/l3H6ilXuUF6a1WLOFkYQe/bB5uMhH7yX2EU9boPvNVPZDeF0UGyCPxgkLTPNXVaBBUuKLZuBRdCykNOO8lkRpSZc= 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1566829308903841.9775819322883; Mon, 26 Aug 2019 07:21:48 -0700 (PDT) Received: from localhost ([::1]:53532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2FsM-0005qa-08 for importer@patchew.org; Mon, 26 Aug 2019 10:21:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42509) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2Fp5-0003vk-7U for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2Fp4-00082P-4m for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:19 -0400 Received: from nsstlmta25p.bpe.bigpond.com ([203.38.21.25]:54243) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2Fp3-0007yy-I8 for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:18 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep25p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141813.QFET14235.nsstlfep25p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:18:13 +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 5D2D11751058881D; Tue, 27 Aug 2019 00:18:12 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoehkrhgrgigvlhesrhgvughhrghtrdgtohhmqedprhgtphhtthhopeeomhhitghhrggvlhesfigrlhhlvgdrtggtqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecuvehluhhsthgvrhfuihiivgeptd 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: Tue, 27 Aug 2019 00:21:27 +1000 Message-Id: <22d1ae0d922dc496fb5edfe17fcfe8efe0fa55c4.1566829168.git.tony.nguyen@bt.com> 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.25 Subject: [Qemu-devel] [PATCH 01/19] hw/audio: 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: Tony Nguyen , Michael Walle , Gerd Hoffmann 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 as DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN respectively. Then, on inspection: - if not used, re-declare as DEVICE_HOST_ENDIAN. - if max/min size=3D1, re-declare as DEVICE_HOST_ENDIAN. - if just a bit bucket, re-declare as DEVICE_HOST_ENDIAN - if PCI, re-declare as DEVICE_LITTLE_ENDIAN. - if for {ARM|unicore32} only, re-declare as DEVICE_LITTLE_ENDIAN. - if for SPARC only, re-declare as DEVICE_BIG_ENDIAN. Signed-off-by: Tony Nguyen --- hw/audio/cs4231.c | 2 +- hw/audio/intel-hda.c | 2 +- hw/audio/marvell_88w8618.c | 2 +- hw/audio/milkymist-ac97.c | 2 +- hw/audio/pl041.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/audio/cs4231.c b/hw/audio/cs4231.c index b5d3e895ce..0c1817d431 100644 --- a/hw/audio/cs4231.c +++ b/hw/audio/cs4231.c @@ -133,7 +133,7 @@ static void cs_mem_write(void *opaque, hwaddr addr, static const MemoryRegionOps cs_mem_ops =3D { .read =3D cs_mem_read, .write =3D cs_mem_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const VMStateDescription vmstate_cs4231 =3D { diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index 6ecd383540..44ded6df64 100644 --- a/hw/audio/intel-hda.c +++ b/hw/audio/intel-hda.c @@ -1069,7 +1069,7 @@ static const MemoryRegionOps intel_hda_mmio_ops =3D { .min_access_size =3D 1, .max_access_size =3D 4, }, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 /* --------------------------------------------------------------------- */ diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c index 883ef74c8b..da1ab89ce6 100644 --- a/hw/audio/marvell_88w8618.c +++ b/hw/audio/marvell_88w8618.c @@ -242,7 +242,7 @@ static void mv88w8618_audio_reset(DeviceState *d) static const MemoryRegionOps mv88w8618_audio_ops =3D { .read =3D mv88w8618_audio_read, .write =3D mv88w8618_audio_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void mv88w8618_audio_init(Object *obj) diff --git a/hw/audio/milkymist-ac97.c b/hw/audio/milkymist-ac97.c index 6d409eff1b..ffc490e456 100644 --- a/hw/audio/milkymist-ac97.c +++ b/hw/audio/milkymist-ac97.c @@ -177,7 +177,7 @@ static const MemoryRegionOps ac97_mmio_ops =3D { .min_access_size =3D 4, .max_access_size =3D 4, }, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void ac97_in_cb(void *opaque, int avail_b) diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c index c30417d46d..5803bfcf0c 100644 --- a/hw/audio/pl041.c +++ b/hw/audio/pl041.c @@ -522,7 +522,7 @@ static void pl041_device_reset(DeviceState *d) static const MemoryRegionOps pl041_ops =3D { .read =3D pl041_read, .write =3D pl041_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void pl041_init(Object *obj) --=20 2.23.0