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=1566829526; cv=none; d=zoho.com; s=zohoarc; b=DiDSGfcH4JhNuhEVQth/5vzemXJlPbXR0UDMttERbDZU5sMib2Z0DEwBm7VI/quLeOuZtWlJTFs1aI5tvlj4mEPZ46sXfE83A/qXmyA88/Pwa07sjVcken/Un59ol3DgrLM59hYibnNjUgDmgtGoXo/uPBJeNdVadTZK2i4Fgu8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566829526; 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=w+/HTH9bTie+DwR9+TOJKeRW3q2Bopv9Eygkd62qb68=; b=KmMpwmjzCSc2JBoULDJKI3DaHHAr0i2aPb3jKay7reE2Q+gZ72xl60oEgW7IqsXSJ/JZbej9oewg1vKQtSzSED1biUkcB2MMUCT5zmTJoB1LAff+qqPR6jhexNm/cB0me/BrQe6IGMsSb+GvQ+aEMYQHN8mq4d262ToY8LKOy5s= 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 1566829526506928.3362430821247; Mon, 26 Aug 2019 07:25:26 -0700 (PDT) Received: from localhost ([::1]:53592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2Fvx-00017O-2B for importer@patchew.org; Mon, 26 Aug 2019 10:25:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42589) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2FpR-0004Ls-5E for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2FpQ-0008Hp-1C for qemu-devel@nongnu.org; Mon, 26 Aug 2019 10:18:41 -0400 Received: from nsstlmta30p.bpe.bigpond.com ([203.38.21.30]:50653) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2FpP-0008DY-Cf; Mon, 26 Aug 2019 10:18:39 -0400 Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep30p-svc.bpe.nexus.telstra.com.au with ESMTP id <20190826141834.VLFB11917.nsstlfep30p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Tue, 27 Aug 2019 00:18:34 +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 5D2D117510588D64; Tue, 27 Aug 2019 00:18:33 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduvddrudehgedgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhonhihucfpghhuhigvnhcuoehtohhnhidrnhhguhihvghnsegsthdrtghomheqnecukfhppeehkedrudejfedrleekrdeikeenucfrrghrrghmpehhvghlohepuggsiidrthgvlhhsthhrrgdrtghomhdrrghupdhinhgvthepheekrddujeefrdelkedrieekpdhmrghilhhfrhhomhepoehtohhnhidrnhhguhihvghnsegsthdrtghomheqpdhrtghpthhtohepoegrrhhikhgrlhhoseifrghvvggtohhmphdrtghomheqpdhrtghpthhtohepoegsrghlrhhoghhgsehgmhgrihhlrdgtohhmqedprhgtphhtthhopeeohhhpohhushhsihhnsehrvggrtghtohhsrdhorhhgqedprhgtphhtthhopeeoihdrmhhithhshigrnhhkohesghhmrghilhdrtghomheqpdhrtghpthhtohepoehpvghtvghrrdhmrgihuggvlhhlsehlihhnrghrohdrohhrgheqpdhrtghpthhtohepoehqvghmuhdqrghrmhesnhhonhhgnhhurdhorhhgqedprhgtphhtthhopeeoqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrgheqpdhrtghpthhtohepoehtohhnhidrnhhguhihvghnsegs thdrtghomheqnecuvehluhhsthgvrhfuihiivgeptd 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:31 +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.30 Subject: [Qemu-devel] [PATCH 05/19] hw/display: 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 , Peter Maydell , Igor Mitsyanko , Aleksandar Rikalo , qemu-arm@nongnu.org, =?UTF-8?q?Herv=C3=A9=20Poussineau?= 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/display/exynos4210_fimd.c | 2 +- hw/display/jazz_led.c | 2 +- hw/display/pl110.c | 2 +- hw/display/tc6393xb.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c index c1071ecd46..d570346329 100644 --- a/hw/display/exynos4210_fimd.c +++ b/hw/display/exynos4210_fimd.c @@ -1821,7 +1821,7 @@ static const MemoryRegionOps exynos4210_fimd_mmio_ops= =3D { .max_access_size =3D 4, .unaligned =3D false }, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static int exynos4210_fimd_load(void *opaque, int version_id) diff --git a/hw/display/jazz_led.c b/hw/display/jazz_led.c index 3e0112b1ca..cda87a8c57 100644 --- a/hw/display/jazz_led.c +++ b/hw/display/jazz_led.c @@ -73,7 +73,7 @@ static void jazz_led_write(void *opaque, hwaddr addr, static const MemoryRegionOps led_ops =3D { .read =3D jazz_led_read, .write =3D jazz_led_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_HOST_ENDIAN, .impl.min_access_size =3D 1, .impl.max_access_size =3D 1, }; diff --git a/hw/display/pl110.c b/hw/display/pl110.c index c2991a28d2..3831505165 100644 --- a/hw/display/pl110.c +++ b/hw/display/pl110.c @@ -473,7 +473,7 @@ static void pl110_write(void *opaque, hwaddr offset, static const MemoryRegionOps pl110_ops =3D { .read =3D pl110_read, .write =3D pl110_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void pl110_mux_ctrl_set(void *opaque, int line, int level) diff --git a/hw/display/tc6393xb.c b/hw/display/tc6393xb.c index 49a676d1b0..6a9477a0c7 100644 --- a/hw/display/tc6393xb.c +++ b/hw/display/tc6393xb.c @@ -549,7 +549,7 @@ TC6393xbState *tc6393xb_init(MemoryRegion *sysmem, uint= 32_t base, qemu_irq irq) static const MemoryRegionOps tc6393xb_ops =3D { .read =3D tc6393xb_readb, .write =3D tc6393xb_writeb, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .impl =3D { .min_access_size =3D 1, .max_access_size =3D 1, --=20 2.23.0